query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
This function prints contents of linked list starting from the given node
public void printList() { Node tnode = head; while (tnode != null) { System.out.print(tnode.data+" "); tnode = tnode.next; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void printlist(Node node) {\n\t\twhile (node != null) {\n\t\t\tSystem.out.print(node.data + \"->\");\n\t\t\tnode = node.next;\n\t\t}\n\t}", "void printList(Node node) {\n\t\twhile (node != null) {\n\t\t\tSystem.out.print(node.data + \" \");\n\t\t\tnode = node.next;\n\t\t}\n\t}", "public void print(){\r\n ListNode temp = head;\r\n while(temp != null){\r\n System.out.println(temp.data.toString());//TODO check this\r\n temp = temp.link;\r\n }\r\n }", "public void print() {\n\r\n Node aux = head;\r\n while (aux != null) {\r\n\r\n System.out.println(\" \" + aux.data);\r\n aux = aux.Next;\r\n\r\n }\r\n System.out.println();\r\n\r\n }", "public void print(){\n NodeD tmp = this.head;\n\n while(tmp!=null){\n System.out.println(tmp.getObject().asString());\n tmp = tmp.getNext();\n }\n }", "public void printList(Node node) {\n\t\tif (node == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tSystem.out.print(node.data + \" \");\n\t\tprintList(node.next);\n\t}", "public void print(){\n\t\t\tNode current = head;\n\t\t\tSystem.out.println(\"--------------------------\");\n\t\t\twhile(current != null) \n\t\t\t{\n\t\t\t\tSystem.out.println(current.data);\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\t}", "public void printList(Node head) \n { \n Node n = head; \n \n while (n != null) \n { \n System.out.print(n.data+\" \"); \n n = n.next; \n } \n }", "public void print() {\n\t\tNode temp = head;\n\n\t\tif(temp == null) {\n\t\t\treturn;\n\t\t} \n\n\t\twhile(temp.next != null) {\n\t\t\tSystem.out.print(temp.data + \"->\");\n\t\t\ttemp = temp.next;\n\t\t}\n\t\tSystem.out.println(temp.data);\n\t}", "public void print(){\n\t\tif(isEmpty()){\n\t\t\tSystem.out.printf(\"Empty %s\\n\", name);\n\t\t\treturn;\n\t\t}//end if\n\n\t\tSystem.out.printf(\"The %s is: \", name);\n\t\tListNode current = firstNode;\n\n\t\t//while not at end of list, output current node's data\n\t\twhile(current != null){\n\t\t\tSystem.out.printf(\"%s \", current.data);\n\t\t\tcurrent = current.nextNode;\n\t\t}//end while\n\n\t\tSystem.out.println(\"\\n\");\n\t}", "public void print() {\r\n\t\tif(isEmpty()) {\r\n\t\t\tSystem.out.printf(\"%s is Empty%n\", name);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.printf(\"%s: %n\", name);\r\n\t\tNode<E> current = first;//node to traverse the list\r\n\t\t\r\n\t\twhile(current != null) {\r\n\t\t\tSystem.out.printf(\"%d \", current.data);\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void show() {\n Node<T> node = head;\n while (node.next != null) {\n System.out.println(node.data);\n node = node.next;\n }\n System.out.println(node.data);\n }", "public void printList() {\n\t\tNode tnode = head;\n\t\twhile (tnode != null) {\n\t\t\tSystem.out.print(tnode.data + \"->\");\n\t\t\ttnode = tnode.next;\n\t\t}\n\t}", "public static void print()\r\n\t {\r\n\t\t Node n = head; \r\n\t\t\t\r\n\t\t\twhile(n!=null)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(n.data+\" \");\r\n\t\t\t\r\n\t\t\t\tn=n.next;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t }", "public void print_list() {\n \t \n \t//define current node as\n \t node<Type> current_node = new node<>();\n \t \n \t //now keep for loop and print the answer\n \t current_node = head;\n \t \n \t //print first element\n \t System.out.println(current_node.show_element());\n \t \n \t //now run for loop\n \t for (int i = 1 ; i <= len - 1 ; i ++) {\n \t\t \n \t\t //change current node\n \t\t current_node = current_node.show_next();\n \t\t \n \t\t //just print the answer\n \t\t System.out.println(current_node.show_element());\n \t }\n }", "void printList(){\n Node iter = this.head;\n\n while(iter != null)\n {\n System.out.print(iter.data+\"->\");\n iter = iter.next;\n }\n System.out.print(\"null\\n\");\n }", "public void print(){\r\n\t\t\tNode temp = this.head;\r\n\t\t\twhile(temp!=null){\r\n\t\t\t\tSystem.out.print(\"| prev=\"+temp.prev+\", val=\"+temp.val+\", next=\"+temp.next+\" |\");\r\n\t\t\t\ttemp = temp.next;\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}", "public void printList()\n {\n Node temp;\n temp = head;\n while (temp != null)\n {\n System.out.print(temp.data + \" \");\n temp = temp.next;\n }\n }", "void printList(){\n Node temp=head;\n while (temp!=null){\n System.out.println(temp.data+\" \");\n temp=temp.next;\n }\n }", "public void printList(Node head)\n {\n while(head!=null){\n System.out.print(head.data+\" \");\n head = head.next;\n }\n }", "public void print() \n //POST:\tThe contents of the linked list are printed\n\t{\n\t\tNode<T> tmp = start;\n\t\tint count = 0; //counter to keep track of how many loops occur\n\t\tif(length == 0) //if empty list \n\t\t{\n\t\t\tSystem.out.println(\"0: []\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"start: \" + tmp.value);\n\t\tSystem.out.print(length + \": [\");\n\n\t\t//while the end of the list is not reached and it has not already looped once\n\t\twhile((tmp.next != start && count == 0) || count < 1) \n\t\t{\n\t\t\tSystem.out.print(tmp.value.toString() + \", \");\n\t\t\tif(tmp.next == start) //if we have reached the end of the list\n\t\t\t{\n\t\t\t\tcount++;\t\t//increment loop counter\n\t\t\t}\n\t\t\ttmp = tmp.next;\t\t//traverse list\n\t\t}\n\t\tSystem.out.print(\"]\\n\");\n\t}", "public void printList(){\n MovieNode temp = head;\t\t//Iterator\n System.out.print(\"Data: \");\n while(temp.next != null){\t\t//While theres data\n System.out.print(temp.next.data + \"->\");\t//Print the data\n temp = temp.next;\t\t\t\t\t\t\t//Point to the next MovieNode\n }\n System.out.println();\t\t\t\t\t\t//Go to the next line\n }", "public static void printList(ListNode node) {\n StringBuilder sb = new StringBuilder();\n sb.append(node.val);\n node = node.next;\n while (true) {\n if (node == null) { break; }\n sb.append(\" -> \").append(node.val);\n node = node.next;\n }\n System.out.println(sb.toString());\n }", "public void print() {\r\n\r\n Node currentNode = this.head;\r\n while (currentNode != null) {\r\n System.out.print(currentNode.data + \" \");\r\n currentNode = currentNode.next;\r\n }\r\n\r\n }", "static\nvoid\nprintList(Node head) \n\n{ \n\nwhile\n(head != \nnull\n) \n\n{ \n\nSystem.out.print(head.data + \n\" \"\n); \n\nhead = head.next; \n\n} \n\n\n}", "void printList(Node head)\n {\n Node temp = head;\n while (temp != null)\n {\n System.out.print(temp.data+\" \");\n temp = temp.next;\n } \n System.out.println();\n }", "public void print() {\r\n\t\tfor (ListNode temp = head; temp != null; temp = temp.link) {\r\n\t\t\tSystem.out.println(temp.data);\r\n\t\t}\r\n\t}", "void print(Node head) {\n\t\tNode curr = head;\n\t\twhile (curr != null) {\n\t\t\tSystem.out.print(curr.data + \"->\");\n\t\t\tcurr = curr.next;\n\t\t}\n\t\tSystem.out.println();\n\n\t}", "public void printlist(Node node) {\n Node last = null;\n \n System.out.println(\"Traversal in forward Direction\");\n while (node != null) {\n System.out.print(node.data + \" ==> \");\n last = node;\n node = node.next;\n }\n System.out.println();\n System.out.println(\"Traversal in reverse direction\");\n while (last != null) {\n System.out.print(last.data + \" ==> \");\n last = last.prev;\n }\n \n }", "static void printList(Node head) {\n while (head != null) {\n System.out.print(head.data + \" \");\n head = head.next;\n }\n }", "public void printList()\n {\n ListNode currNode = this.head;\n while(true)\n {\n System.out.println(currNode.getValue());\n currNode = currNode.getNextNode();\n if(currNode == null)\n {\n break;\n }\n }\n }", "public void show()\n\t{\n\t\tNode temp= head;\n\t\t\n\t\twhile(temp.next!=null)\n\t\t{\n\t\t\tSystem.out.println(temp.data);\n\t\t\ttemp=temp.next;\n\t\t}\n\t\tSystem.out.println(temp.data); //to print last node\n\t}", "public void printList() {\n ListNode currentNode = head;\n\n while (currentNode != null) {\n // Print the data at current node\n System.out.print(currentNode.data + \" \");\n // Go to next node\n currentNode = currentNode.next;\n }\n System.out.println();\n\n }", "public void print() {\r\n\t\tif (this.isEmpty()) {\r\n\t\t\tSystem.out.println(\"The linked list is empty!\");\r\n\t\t}else if (this.size() == 1) {\r\n\t\t\tSystem.out.println(head.getValue());\r\n\t\t}else {\r\n\t\t\tpointer = head;\r\n\t\t\twhile (pointer != null) {\r\n\t\t\t\tif (pointer != tail) System.out.print(pointer.getValue()+\"-->\");\r\n\t\t\t\telse System.out.println(pointer.getValue());\r\n\t\t\t\tpointer = pointer.getNext();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void print()\n {\n for (Node curr = first; curr != null; curr = curr.next)\n System.out.print(curr.val + \" \");\n System.out.println();\n }", "public void printList() {\r\n //traversing the linked list and will print each node.\r\n // assigning head to temp\r\n System.out.println(\"Printing list\");\r\n Node temp = head;\r\n while (temp != null) {\r\n System.out.print(temp.getData());\r\n // updating temp\r\n temp = temp.getNext();\r\n if (temp != null) {\r\n System.out.print(\"---->\");\r\n }\r\n\r\n\r\n }\r\n System.out.println();\r\n }", "public void show() {\n\n\t\tNode n = head;\n\t\twhile (n.next != null) {\n\t\t\t//logger.info(n.data);\n\t\t\tn = n.next;\n\t\t}\n\t\t//logger.info(n.data);\n\n\t}", "public void printLinkedList(){\n System.out.println(\"--------Head node: \" + this.data);\n\n if (this.next == null){\n return;\n }\n\n int count = 1;\n Node<T> currentNode = this.next;\n while (currentNode.next != null){\n System.out.println(\"Node \" + count++ + \" with value: \" + currentNode.data);\n currentNode = currentNode.next;\n }\n System.out.println(\"---------Tail node: \" + currentNode.data);\n }", "public void displayNodes() {\n Node node = this.head;\n StringBuilder sb = new StringBuilder();\n while (node != null) {\n sb.append(node.data).append(\" \");\n node = node.next;\n };\n\n System.out.println(sb.toString());\n }", "public static void print(ListNode node) {\n while (node != null) {\n System.out.print(node.val + \" \");\n node = node.next;\n }\n System.out.println(\"\");\n }", "void display(){\r\n\t\t if(start==null){\r\n\t\t\t System.out.println(\"linklist is empty\");\r\n\t\t\t }\r\n\t\telse{\r\n\t\t\tnode temp=start;\r\n\t\t\twhile(temp!=null){\r\n\t\t\t\tSystem.out.println(temp.data);\r\n\t\t\t\ttemp=temp.next;\r\n\t\t\t\t}//end of while\r\n\t\t\t}//end of else statement\r\n\r\n\t\t }", "public void printList(){\n MyNode p;\n System.out.print(\"The list contains [\");\n for(p=head.next;p!=null;p=p.next)\n System.out.print(p.word +\" \");\n System.out.print(\"]\\n\");\n }", "public void printForward(){\n\t\t\n\t\tif(isEmpty())\n\t\t\treturn;\n\t\t\n\t\tNode theNode = head;\n\n\t\twhile(theNode != null){\n\t\t\tSystem.out.print(theNode.data + \" \");\n\t\t\ttheNode = theNode.next;\n\t\t}\n\t\tSystem.out.println();\n\n\t}", "public void display() {\r\n\t\tNode curr = new Node();\r\n\t\tcurr = head;\r\n\t\tString Output = \"Here is the linked list from the head node till the end\";\r\n\t\twhile (curr != null) {\r\n\t\t\tOutput += \"\\n\" + curr.num + \", \" + curr.str;\r\n\t\t\tcurr = curr.next;\r\n\t\t}\r\n\t\tSystem.out.print(Output);\r\n\t}", "private void printNode() {\n System.out.println(\"value:\" + value + \" next:\" + nextNode);\n }", "public static void printList(Node head)\n {\n Node ptr = head;\n while (ptr != null)\n {\n System.out.print(ptr.data + \" -> \");\n ptr = ptr.next;\n }\n \n System.out.println(\"null\");\n }", "void display(Nodetype list)\n{\n\tNodetype temp;\n\tif(list==null)\n\t\tSystem.out.println(\"\\nEmpty linked list\");\n\telse\n\t{\n\t\ttemp=list;\n\t\twhile(temp!=null)\n\t\t{\n\t\t\tSystem.out.print(\"->\"+temp.info);\n\t\t\ttemp=temp.next;\n\t\t}\n\t}\n\tSystem.out.println();\n}", "public void display() {\n MyMapNode current = head;\n if (head == null) {\n System.out.println(\"List is empty\");\n return;\n }\n while (current != null) {\n //Prints each node by incrementing pointer\n System.out.print(current.data + \" \");\n current = current.next;\n }\n System.out.println();\n }", "public void display()\n\n {\n\n System.out.print(\"\\nDoubly Linked List = \");\n\n if (size == 0) \n\n {\n\n System.out.print(\"empty\\n\");\n\n return;\n\n }\n\n if (start.getLinkNext() == null) \n\n {\n\n System.out.println(start.getData() );\n\n return;\n\n }\n\n Node ptr = start;\n\n System.out.print(start.getData()+ \" <-> \");\n\n ptr = start.getLinkNext();\n\n while (ptr.getLinkNext() != null)\n\n {\n\n System.out.print(ptr.getData()+ \" <-> \");\n\n ptr = ptr.getLinkNext();\n\n }\n\n System.out.print(ptr.getData()+ \"\\n\");\n\n }", "public static void printDigitListContents(ListNode head){\n while(head != null){\n System.out.print(head.val + \" -> \");\n head = head.next;\n }\n System.out.println();\n }", "public void printNode(Node n);", "public void printList(){\n \t\t\tListNode temp = this;\n\t \t\tdo{\n\t \t\t\tSystem.out.print(temp.val + \"->\");\n\t \t\t\ttemp = temp.next;\n\t \t\t}while(temp != null);\n\t \t\tSystem.out.print(\"null\");\n\t \t\tSystem.out.println();\n\t \t}", "public void printList()\n {\n String str = \"head > \";\n \n if(head == null)\n {\n str += \"null\";\n }\n else if(head.next == head)\n {\n str += head.data + \" (singly-linked, circular)\";\n }\n else\n {\n Node current = head;\n \n //While loop to create the string of all nodes besides the last one\n while(current.next != head)\n {\n str += current.data + \" > \";\n \n current = current.next;\n }\n \n str += current.data + \" (singly-linked, circular)\";\n }\n \n System.out.println(str);\n }", "private void traverse(Node<T> node) {\r\n\t\tif (null == node.next) {\r\n\t\t\tSystem.out.println(String.valueOf(node.data) + \"--->END\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tSystem.out.print(String.valueOf(node.data) + \"--->\");\r\n\t\t\ttraverse(node.next);\r\n\t\t}\r\n\t}", "public void printList() {\n System.out.println(\"Linked list contents:\");\n for (Node p = head; p != null; p = p.next)\n System.out.println(p.data);\n }", "public void printAll() {\n Node node = head;\n\n while (node != null) {\n System.out.println(node.getStudent());\n node = node.getLink();\n }\n System.out.println();\n }", "public void printAllNodes() {\n\t\tNode current = head;\n\n\t\twhile( current != null ) {\n\t\t\tSystem.out.println(current.data);\n\t\t\tcurrent = current.next;\n\t\t}\n\t}", "public void printNodes() {\n\t\tNode currentNode = headNode;\n\t\tif(currentNode==null) {\n\t\t\tSystem.out.println(\" The Node is Null\");\n\t\t\treturn;\n\t\t} else {\n\t\t\tSystem.out.print(\" \"+ currentNode.getData());\n\t\t\twhile(currentNode.getNextNode()!=null) {\n\t\t\t\tcurrentNode = currentNode.getNextNode();\n\t\t\t\tSystem.out.print(\"=> \"+ currentNode.getData());\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void printNodes() { \n //Node current will point to head \n Node current = head; \n if(head == null) { \n System.out.println(\"Doubly linked list is empty\"); \n return; \n } \n System.out.println(\"Nodes of doubly linked list: \"); \n while(current != null) { \n //Print each node and then go to next. \n System.out.print(current.item + \" \"); \n current = current.next; \n } \n }", "public void display()\n {\n System.out.print(\"\\nDoubly Linked List = \");\n if (size == 0)\n {\n System.out.print(\"empty\\n\");\n return;\n }\n if (start.getListNext()== null)\n {\n System.out.println(start.getData() );\n return;\n }\n List ptr = start;\n System.out.print(start.getData()+ \" <-> \");\n ptr = start.getListNext();\n while (ptr.getListNext()!= null)\n {\n System.out.print(ptr.getData()+ \" <-> \");\n ptr = ptr.getListNext();\n }\n System.out.print(ptr.getData()+ \"\\n\");\n }", "public void printInReverse(Node node)\n {\n if(node.next != null) {\n printInReverse(node.next);\n }\n System.out.println(node.data);\n }", "void printList() {\n Entry<T> node = header;\n while(node!=null){\n System.out.print(node.element+\" \");\n node = node.next;\n }\n }", "public void printAscend() {\r\n\t\tMovieListNode<m> cur = head;\r\n\t\twhile (cur != null) {\r\n\t\t\tSystem.out.println(cur);\t//prints current node\r\n\t\t\tcur = cur.next;\t\t//moves on to next node\r\n\t\t}\r\n\t}", "public static void display(Node head) {\r\n for (Node node = head; node != null; node = node.next) {\r\n System.out.print(node.data + \" \");\r\n }\r\n }", "static void display(ListNode head) {\n\n if (head == null) {\n return;\n }\n ListNode current = head;\n\n while (current != null) {\n\n System.out.print(current.data + \" ==> \"); //print current element's data\n current = current.next;\n }\n System.out.println(current); //then current is null\n\n }", "public static void printList(String msg, Node head)\n {\n System.out.print(msg);\n \n Node ptr = head;\n while (ptr != null) {\n System.out.print(ptr.data + \" -> \");\n ptr = ptr.next;\n }\n System.out.println(\"null\");\n }", "public void display(ListNode head) {\n\t\tif(head == null) {\n\t\t\treturn;\n\t\t}\n\t\tListNode current = head;\n\t\twhile (current != null) {\n\t\t\tSystem.out.print(current.data + \" --> \");\n\t\t\tcurrent = current.next;\n\t\t}\n\t\tSystem.out.println(current);\n\t\t\n\t}", "public static void display(Node head) {\n\t\tif (head ==null) {\n\t\t\treturn;\n\t\t}\n\t\tNode current = head; // create temporary current node to point to head node\n\t\t\n\t\twhile (current !=null) {\n\t\t\tSystem.out.print(current.val + \" -> \"); //print current node with data\n\t\t\tcurrent = current.next; // move to next node\n\t\t}\n\t\tSystem.out.println(current); //last node is null \n\t}", "public static void display(Node head) {\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{\n\t\t\tNode currentNode = head;\n\t\t\twhile(currentNode != null) {\n\t\t\t\tSystem.out.print(currentNode.data + \" \");\n\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t}\n\t\t}\n\t}", "public static void printList(Node head) {\r\n Node current = head;\r\n\r\n while (current != null) {\r\n System.out.print(Integer.toString(current.value) + \" \");\r\n current = current.right;\r\n if (current == head)\r\n break;\r\n }\r\n\r\n System.out.println();\r\n }", "public void displayList(){\n ArtistNode node = head;\n \n //while the next node isnt null, we print out the node\n while(node.next!=null){\n \n System.out.println(node);\n \n //once we've printed out the current node, we set our node equal to the next node.\n node=node.next;\n \n }\n \n //We need this because it stops printing when node.next has a null value which the end node will always have a null value so we must print the last node\n //after the while loop ends\n System.out.println(node);\n \n \n }", "private static void print(ArrayList<Node<BinaryTreeNode<Integer>>> n) {\n\t\tfor(int i=0; i<n.size(); i++) {\n\t\t\tNode<BinaryTreeNode<Integer>> head = n.get(i);\n\t\t\twhile(head != null) {\n\t\t\t\tSystem.out.print(head.data.data+\" \");\n\t\t\t\thead = head.next;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "void print() {\n Node current = this;\n while (current != null) {\n System.out.format(\"%d \", current.value);\n current = current.next;\n }\n System.out.println();\n }", "public void print() {\n\t\tIntNode curr;\n\t\tfor (curr = head; curr != null; curr = curr.next) {\n\t\t\tSystem.out.print(curr.key + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void print()\n\t{\n\t\tDNode tem=first;\n\t\tSystem.out.print(tem.distance+\" \");\n\t\twhile(tem.nextDNode!=null)\n\t\t{\n\t\t\ttem=tem.nextDNode;\n\t\t\tSystem.out.print(tem.distance+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void print(Node node, PrintWriter w)\n{\n print(node, 0, w);\n}", "@Override\n public String toString(){\n String str = \"\";\n DLNode<T> current = first;//a reference to the first node\n while (current != null) {//loop as long as we reach the end of the list\n str += current + \"\\n\";//store current element in a String at every iteration\n current = current.next;\n }\n return str;\n }", "public void printList()\n {\n System.out.print(\"SinglyLinkedList:\\n\");\n ListNode cur = first;\n while(cur != null)\n {\n System.out.println(cur.getValue());\n cur = cur.getNext();\n }\n }", "public void print() {\n System.out.print(datum+\" \");\n if (next != null) {\n next.print();\n }\n }", "public void printList(LinkedList list) {\n Node currNode = list.head;\n\n System.out.println(\"LinkedList: \");\n\n // Traverse through the LinkedList\n while (currNode != null) {\n // Print the data at current node\n System.out.print(currNode.data + \" \");\n\n // Go to next node\n currNode = currNode.next;\n }\n }", "public void printDescend() {\r\n\t\tMovieListNode<m> cur = tail;\r\n\t\twhile (cur != null) {\r\n\t\t\tSystem.out.println(cur);\t//prints current node\r\n\t\t\tcur = cur.prev;\t\t//moves back to previous node\r\n\t\t}\r\n\t}", "public void printList(){\n Date212Node p = first.next;\n while(p != null){\n System.out.println(p.data.toString());\n p = p.next;\n }\n }", "void printNode() {\n\t\tint j;\n\t\tSystem.out.print(\"[\");\n\t\tfor (j = 0; j <= lastindex; j++) {\n\n\t\t\tif (j == 0)\n\t\t\t\tSystem.out.print (\" * \");\n\t\t\telse\n\t\t\t\tSystem.out.print(keys[j] + \" * \");\n\n\t\t\tif (j == lastindex)\n\t\t\t\tSystem.out.print (\"]\");\n\t\t}\n\t}", "public void displayNode() {\n\t\t\tSystem.out.println(\"{ \" + data + \" } \");\n\t\t}", "private void printList() {\n if (head == null)\n return;\n ListNode current = head;\n int count = 0;\n while (current != null) {\n count++;\n System.out.print(current.data + \" \");\n current = current.next;\n }\n System.out.println();\n System.out.println(\"Number of nodes in the list are:: \" + count);\n }", "private void printList2(Node curr)\n {\n if(curr.next == null)\n {\n System.out.println(curr.item);\n }\n else\n {\n System.out.print(curr.item + \" \");\n printList2(curr.next);\n }\n }", "public void display(){\n if (this.listSize == 0){\n System.out.println(\"This is an empty list!\");\n return;\n }else if(this.head.getNextNode() == null){\n System.out.print(this.head.getData()); //single-node list\n return;\n }\n System.out.print(this.head.getData() + \" -> \"); //print out head node\n singlyListNode ptr = this.head.getNextNode();\n while(ptr.getNextNode() != null){\n System.out.print(ptr.getData() + \" -> \");\n ptr = ptr.getNextNode();\n }\n //when ptr reaches second last node\n System.out.println(ptr.getData());\n }", "private static void printList() {\n\tNode n=head;\n\tint size=0;\n\twhile(n!=null)\n\t{\n\t\tSystem.out.print(n.data+\" \");\n\t\tn=n.next;\n\t\tsize++;\n\t}\n\tn=head;\n\tfor(int i=0;i<size-1;i++)\n\t\tn=n.next;\n\tSystem.out.println(\"\\nreverse direction\");\n\twhile(n!=null)\n\t{\n\t\t\n\t\tSystem.out.print(n.data+\" \");\n\t\tn=n.prev;\n\t}\n\t\n}", "@Override\n\tpublic void processNode(DirectedGraphNode node) {\n\t\tSystem.out.print(node.getLabel()+\" \");\n\t}", "private static void printNodeList(ListNode head) {\n StringBuilder sb = new StringBuilder();\n\n while (head != null) {\n sb.append(head.val);\n sb.append(\"->\");\n head = head.next;\n }\n sb.append(\"null\");\n\n System.out.println(sb.toString());\n }", "public void printNode(TrieNode curr) {\n if (curr == null)\n return;\n\n System.out.println(curr.getText());\n\n TrieNode next = null;\n for (Character c : curr.getValidNextCharacters()) {\n next = curr.getChild(c);\n printNode(next);\n }\n }", "public String printList() {\n String str = \"\";\n Node<T> currentNode = head;\n\n if(head == null)\n return \"Empty List\";\n else {\n while (currentNode.next != null) {\n str += currentNode.data + \",\";\n currentNode = currentNode.next;\n }\n str += currentNode.data;\n //System.out.println(str);\n }\n return str;\n }", "public void print() {\n LinkedList i = this;\n\n System.out.print(\"LinkedList: \");\n while (i.next != null) {\n System.out.print(i.name + ' ');\n i = i.next;\n }\n System.out.print(i.name);\n }", "static void preorderPrint(TreeNode node) {\n if (node == null)\n return;\n\n System.out.print(\" \" + node.data);\n Iterator iter = node.getChildren().iterator();\n while (iter.hasNext()) {\n preorderPrint((TreeNode) iter.next());\n }\n }", "public void display(Node node)\n\t{\n\t\tif(node == null)\n\t\t\treturn;\n\t\tSystem.out.print(node.getData()+\"\\t\");\n\t\tdisplay(node.left);\n\t\tdisplay(node.right);\n\t}", "static void display(Node head) {\n Node Rp; \n \n // pointer to move down \n Node Dp = head; \n \n // loop till node->down is not NULL \n while (Dp != null) { \n Rp = Dp; \n \n \n while (Rp != null) { \n System.out.print(Rp.data + \" \"); \n Rp = Rp.right; \n } \n System.out.println(); \n Dp = Dp.down; \n \n } \n }", "public void displayNode() // display ourself\n\t{\n\t\tSystem.out.print('{');\n\t\tSystem.out.print(iData);\n\t\t\n\t\tSystem.out.print(\"} \");\n\t}", "public void printQueue() {\r\n\t\tNode current = head; //Instantiated node which will cycle through\r\n\t\tfor(int i = 0; i < size; i++) { //While the current instantiated node isn't null (meaning thats it's in the list), increment through the list and print the data\r\n\t\t\tSystem.out.print(current.data + \"[\" +current.index+ \"] \");\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\tif(head == null) System.out.println(\"THE QUEUE IS EMPTY!\");\r\n\t\tSystem.out.println(\"\\n\");\r\n\t}", "@Override\n public String toString(){\n Node curr=this.head;\n String str=\"\";\n while(curr!=null){\n str+=(curr.data + \" -> \");\n curr=curr.next;\n }\n return str;\n }", "private void iter() {\n Node curr = new Node();\n curr = head;\n while (curr != null) {\n System.out.print(curr.card + \" \");\n curr = curr.next;\n }\n }" ]
[ "0.7803719", "0.7774481", "0.76632714", "0.76465195", "0.762311", "0.75960416", "0.75607383", "0.751654", "0.7514664", "0.74883306", "0.7486307", "0.74784636", "0.74757874", "0.74649453", "0.7442837", "0.74317086", "0.74030715", "0.7390856", "0.73891675", "0.7368258", "0.7330116", "0.7329086", "0.7325145", "0.73249924", "0.7320902", "0.72986656", "0.7294676", "0.72758794", "0.727472", "0.72626716", "0.7251148", "0.7244726", "0.72442716", "0.72214323", "0.7219371", "0.721569", "0.72129166", "0.7166861", "0.71613336", "0.7157104", "0.7130699", "0.7087387", "0.7072298", "0.7060642", "0.70158803", "0.7002709", "0.6999155", "0.69927645", "0.6990362", "0.69850254", "0.6974531", "0.6973227", "0.69660395", "0.69425684", "0.6935439", "0.6933237", "0.6911354", "0.69086903", "0.6902416", "0.68846416", "0.68826133", "0.68809694", "0.6880865", "0.6869525", "0.6844662", "0.68301034", "0.6813925", "0.6810159", "0.67828035", "0.67705566", "0.6755218", "0.675398", "0.6734659", "0.6717875", "0.6696453", "0.6682224", "0.6680988", "0.6679177", "0.6677953", "0.66649866", "0.664845", "0.664662", "0.6646264", "0.66414416", "0.6636908", "0.66314954", "0.6630797", "0.66166663", "0.6608446", "0.660266", "0.66011435", "0.6599393", "0.65967095", "0.6563834", "0.6561128", "0.6560005", "0.6549869", "0.65381217", "0.65181386", "0.6508285" ]
0.77008724
2
======= private Button backButton; >>>>>>> 119aa4894c2e45db3ce3b525cae85ac9d9c30345
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_kebijakan_privasi); //<<<<<<< HEAD backButton = (ImageView) findViewById(R.id.backButton); //======= // backButton = (Button)findViewById(R.id.backButton); //>>>>>>> 119aa4894c2e45db3ce3b525cae85ac9d9c30345 // backButton.setOnClickListener(new View.OnClickListener() { // @Override // public void onClick(View v) { // // startActivity(new Intent(KebijakanPrivasiActivity.this,HomePageActivity.class)); // finish(); // } // }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }", "@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}", "@Override\n\tpublic void backButton() {\n\n\t}", "public void goBack() {\n goBackBtn();\n }", "private void configureBackButton() {\n LinearLayout layoutTop = (LinearLayout) findViewById(R.id.title);\n layoutTop.bringToFront();\n\n Button button = (Button) findViewById(R.id.backButton);\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n finish();\n }\n });\n }", "void onGoBackButtonClick();", "@Override\n public void backButton() {\n\n\n }", "private void setupBack() {\n\t\tmakeButton(\"Back\", (ActionEvent e) -> {\n\t\t\tchangeView(\"login\");\n\t\t});\n\t}", "public void clickBackButton() {\n\t\tbackButton.click();\n\n\t}", "public void onBackPressed() {\n backbutton();\n }", "private void backButtonAction() {\n CurrentUI.changeScene(SceneNames.LOGIN);\n }", "private JButton getBtnBack() {\r\n\t\tif (btnBack == null) {\r\n\t\t\tbtnBack = new JButton();\r\n\t\t\tbtnBack.setText(\"<\");\r\n\t\t\tbtnBack.setToolTipText(\"Back\");\r\n\t\t\tbtnBack.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tif(historyIndex > 0) {\r\n\t\t\t\t\t\thistoryIndex --;\r\n\t\t\t\t\t\tgoTo(history.get(historyIndex), HistoryManagement.NAVIGATE);\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 btnBack;\r\n\t}", "private void displayBackButton() {\n RegularButton backButton = new RegularButton(\"BACK\", 200, 600);\n\n backButton.setOnAction(e -> backButtonAction());\n\n sceneNodes.getChildren().add(backButton);\n }", "protected void drawBackButton() {\n backButton = new TextButton(\"Back\", skin);\n stage.addActor(backButton);\n\n setPrevious();\n }", "public JButton getBtnBack(){\n\t\treturn btnBack;\n\t}", "public void back()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"BackButton\")).click();\n\t}", "public void back() {\n Views.goBack();\n }", "@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}", "private void showBack() {\n Drawable buttonDrawableBack = new TextureRegionDrawable(new TextureRegion((Texture)game.getAssetManager().get(\"buttonBack.png\")));\n BackButton = new ImageButton(buttonDrawableBack);\n BackButton.setSize(MENU_WIDTH/7,MENU_HEIGHT/7);\n BackButton.setPosition(7*MENU_WIDTH/8 - BackButton.getWidth()/2, MENU_HEIGHT/7 -DELTA_Y_MENU);\n stage.addActor(BackButton);\n }", "private JButton getJButton_back() {\r\n\t\tif (jButton_back == null) {\r\n\t\t\tjButton_back = new JButton();\r\n\t\t\tjButton_back.setLocation(new Point(94, 480));\r\n\t\t\tjButton_back.setText(\"Back\");\r\n\t\t\tjButton_back.setSize(new Dimension(208, 34));\r\n\t\t\tjButton_back.addActionListener(this);\r\n\t\t}\r\n\t\treturn jButton_back;\r\n\t}", "public void backButtonClicked()\r\n {\n manager = sond.getManager();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n else if (manager.canUndo())\r\n {\r\n manager.undo();\r\n }\r\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}", "@Override\r\n\tpublic void onBackPressed()\r\n\t{\r\n\t\tif (flipper.getDisplayedChild() != 0)\r\n\t\t{\r\n\t\t\tflipper.showPrevious();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsuper.onBackPressed();\r\n\t\t}\r\n\t}", "private void setUpBackButton() {\n mBackButton = mDetailToolbar.getChildAt(0);\n if (null != mBackButton && mBackButton instanceof ImageView) {\n\n // the scrim makes the back arrow more visible when the image behind is very light\n mBackButton.setBackgroundResource(R.drawable.scrim);\n\n ViewGroup.MarginLayoutParams lpt = (ViewGroup.MarginLayoutParams) mBackButton.getLayoutParams();\n lpt.setMarginStart((int) getResources().getDimension(R.dimen.keyline_1));\n\n ViewGroup.LayoutParams lp = mBackButton.getLayoutParams();\n lp.height = (int) getResources().getDimension(R.dimen.small_back_arrow);\n lp.width = (int) getResources().getDimension(R.dimen.small_back_arrow);\n\n // tapping the back button or the Up button should return to the list of articles\n mBackButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onBackPressed();\n supportFinishAfterTransition();\n }\n });\n }\n }", "@Override\n\tpublic void onBackPressed() {\n\t\texitApplication().onClick(null);\n\t\tsuper.onBackPressed();\n\t}", "@Override\n public void onBackPressed() {\n \tshowDialog(DLG_BUTTONS);\n }", "private void setupBackButton(){\n\t\tImageIcon back_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"back.png\");\n\t\tJButton back_button = new JButton(\"\", back_button_image);\n\t\tback_button.setBorderPainted(false);\n\t\tback_button.setContentAreaFilled(false);\n\t\tback_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean leave_result = askToLeave();\n\t\t\t\tif (leave_result){\n\t\t\t\t\t//no point speaking any more words if exiting\n\t\t\t\t\tparent_frame.getFestival().emptyWorkerQueue();\n\t\t\t\t\tparent_frame.changePanel(PanelID.MainMenu);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tback_button.addMouseListener(new VoxMouseAdapter(back_button,null));\n\t\tadd(back_button);\n\t\tback_button.setBounds(1216, 598, 100, 100);\n\t}", "public void BackBtn(MouseEvent event) {\n\t}", "public void clickbtnBack() {\n\t\tdriver.findElement(btnBack).click();\n\t}", "private void navBack() {\n Intent intent = new Intent(this, standard_home.class);\n startActivity(intent);\n }", "@Override\n\tprotected void titleBtnBack() {\n\t\tsuper.titleBtnBack();\n\t}", "@Override\n\tpublic void goToBack() {\n\t\tif(uiHomePrestamo!=null){\n\t\tuiHomePrestamo.getHeader().getLblTitulo().setText(constants.prestamos());\n\t\tuiHomePrestamo.getHeader().setVisibleBtnMenu(true);\n\t\tuiHomePrestamo.getContainer().showWidget(1);\n\t\t}else if(uiHomeCobrador!=null){\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tuiHomeCobrador.getContainer().showWidget(2);\n\t\t\tuiHomeCobrador.getUiClienteImpl().cargarClientesAsignados();\n\t\t\tuiHomeCobrador.getUiClienteImpl().reloadTitleCobrador();\n\t\t}\n\t}", "void setActionBtnBack(LinkActionGUI mainAction, LinkActionGUI linkAction);", "@Override\n public void backPressed(){\n }", "public void onBackButton() {\n WindowLoader wl = new WindowLoader(backButton);\n wl.load(\"MenuScreen\", getInitData());\n RETURN_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }", "public void Back(){\n setImage(\"button-blue.png\");\n }", "private void addBackButton() {\n\t\tbackButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlayer.show(userViewPort, \"WebBrowser\");\n\t\t\t\tmenuBar.remove(backButton);\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 3;\n\t\t\t}\n\t\t});\n\t\tmenuBar.add(backButton);\n\t\tmenuBar.revalidate();\n\t}", "public void actionPerformedBack(ActionListener back) {\n btnBack.addActionListener(back);\n }", "private void backButton() {\n // Set up the button to add a new fish using a seperate activity\n backButton = (Button) findViewById(R.id.backButton);\n backButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n // Start up the add fish activity with an intent\n Intent detailActIntent = new Intent(view.getContext(), MainActivity.class);\n finish();\n startActivity(detailActIntent);\n\n\n }\n });\n }", "@Override\n\tpublic void onBackPressed() {\n\t\t\n\t}", "public void onClickBackButton() {\n this.backButton.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n\n\n Stage stage = (Stage) backButton.getScene().getWindow();\n stage.close();\n }\n });\n }", "@FXML\n public void backButtonClicked(MouseEvent event) {\n toggleBackBtnVisibility(false);\n setMainScene(previousView, null);\n }", "JButton backButton() {\r\n JButton button = new JButton(\"Back\");\r\n Font buttonsFront = new Font(\"Serif\", Font.PLAIN, 17);\r\n\r\n button.setFont(buttonsFront);\r\n button.setPreferredSize(new Dimension(80,30));\r\n\r\n button.setToolTipText(\"return formal page\");\r\n\r\n button.addActionListener(new ActionListener(){\r\n public void actionPerformed(ActionEvent e) {\r\n // Get text and check input.\r\n Object[] options ={ \"Yes\", \"No\" };\r\n //yes = 0 no = 1\r\n int m = JOptionPane.showOptionDialog(null, \"Go Back?\", \"tips\",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n\r\n if (m == 0)\r\n {\r\n frame.dispose();\r\n new init();\r\n }\r\n }\r\n });\r\n return button;\r\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tif (v == backBtn)\n\t\t\tfinish();\n\t}", "public void backButtonClicked(ActionEvent actionEvent) {\n Stage current = (Stage) locationName.getScene().getWindow();\n\n current.setScene(getPreviousScreen());\n }", "@Override\n\tpublic void onBackPressed() {\n\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tbackButtonHandler();\r\n\t\treturn;\r\n\t}", "boolean onBackPressed();", "boolean onBackPressed();", "@Override\n\tpublic void onBackPressed()\n\t{\n\t}", "@Override\n \tpublic void onBackPressed() {\n \t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "private void backBtnActionPerformed(java.awt.event.ActionEvent evt) {\n backButtonFunction();\n }", "public void onBackPressed() {\r\n }", "void setTextButtonBack(String textBtnBack);", "@Override\n public void onBackPressed() {\n backToHome();\n }", "void setupBtnBack() {\n Intent intent = getIntent();\n Bundle bundle = intent.getExtras();\n String str = bundle.getString(\"str\");\n\n ToastTip(str);\n\n Button btn_back = (Button)findViewById(R.id.btn_btn_back);\n\n btn_back.setOnClickListener(back_listener);\n }", "@Override\n public void onBackPressed()\n {\n mIsBackButtonPressed = true;\n super.onBackPressed();\n \n }", "public Finland_HomePage clickbsrBackBtn() throws Throwable {\r\n\t\ttry {\r\n\t\t\tclickBrowserBackButton();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn new Finland_HomePage();\r\n\t}", "public abstract boolean onBackPressed();", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\n\t\t\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\n // Detect when the back button is pressed\n public void onBackPressed() {\n\n // Let the system handle the back button\n\n super.onBackPressed();\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ttry\n\t\t\t\t{if(wb.canGoBack())\n\t\t\t\t\twb.goBack();\n\t\t\t\t}catch(Exception e)\n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void onBackPressed() {\n\treturn;\n\t}", "@Override\r\n public void onBackPressed() {\n }", "private void clickInBack(Vector3 touchPos) {\n if (touchPos.x > 10 && touchPos.x < backButton.getWidth()\n && (height - touchPos.y) > (height - backButton.getHeight()) && (height - touchPos.y) < height) {\n game.setScreen(new MainMenu(game));\n dispose();\n }\n }", "@FXML\r\n private void handleBackButton() {\r\n\r\n CommonFunctions.showAdminMenu(backButton);\r\n\r\n }", "default public void clickBack() {\n\t\tclickMenu();\n\t}", "@Override\n public void onBackPressed() {}", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "void onUpOrBackClick();", "public static void clickBackBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"backquest\\\"]\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Back button doesnt work\");\n\t\t}\n\t}", "private void backActionPerformed(ActionEvent e) {\r\n ctr_pres.principal();\r\n setVisible(false);\r\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\treturn;\n\t}", "private void configureBackButton(){\n Button backButton = (Button) findViewById(R.id.backButton);\n backButton.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view){\n //TODO add the code that erases saved login key\n\n //opens login page and closes home page stack\n startActivity(new Intent(homePage.this, MainActivity.class));\n finish();\n\n }\n });\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\treturn;\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tdoBack();\r\n\t}", "@Override\n public void onClick(View view) {\n onBackPressed(); }", "@Override\n public void onBackPressed() { }", "@Override\n\tpublic void onBackPressed() {\n\t\tthis.finish();\n\t\tsuper.onBackPressed();\n\t}", "public void onBackPressed()\n {\n }", "@Override\n public void onBackPressed() {\n exitReveal();\n\n super.onBackPressed();\n }", "protected void goBack() {\r\n\t\tfinish();\r\n\t}" ]
[ "0.83464426", "0.8303687", "0.8192091", "0.80647445", "0.80423635", "0.8025823", "0.79928744", "0.77522564", "0.7726775", "0.76804465", "0.7635073", "0.7634089", "0.76169497", "0.75851905", "0.75718117", "0.7555924", "0.751378", "0.75094336", "0.74889857", "0.7484366", "0.7481826", "0.74729055", "0.747087", "0.74312747", "0.74185747", "0.741366", "0.7405851", "0.74031", "0.7391165", "0.7372311", "0.73488414", "0.73487186", "0.73301387", "0.7323231", "0.7318456", "0.7316558", "0.73148197", "0.7314154", "0.72956383", "0.728993", "0.72861457", "0.7274541", "0.72524697", "0.72396016", "0.7235873", "0.7234067", "0.7230903", "0.721607", "0.721607", "0.72096944", "0.7208225", "0.72025245", "0.72025245", "0.72025245", "0.72025245", "0.72014654", "0.7195157", "0.7189534", "0.718928", "0.7184424", "0.7182154", "0.7166607", "0.71491164", "0.71468824", "0.7145263", "0.7145263", "0.7145263", "0.7145263", "0.7145263", "0.7145263", "0.7145263", "0.7145263", "0.7144399", "0.7144399", "0.71305966", "0.71215767", "0.71207637", "0.7111248", "0.71093804", "0.71021867", "0.7084571", "0.7082332", "0.7081059", "0.7081059", "0.70767397", "0.7066675", "0.70658296", "0.7059502", "0.7057497", "0.7046259", "0.7046259", "0.70452076", "0.7039195", "0.7039195", "0.7038853", "0.7033581", "0.7033271", "0.70309556", "0.7025437", "0.7015919", "0.70115876" ]
0.0
-1
This is valid even for unsorted lists but the specification assumes the parametarized arrays are sorted
public static int[] merge_v1(int[] arr1, int[] arr2) { // checking if the arrays are null if ((arr1 == null || arr1.length == 0) && (arr2 == null || arr2.length == 0)) { return null; } else if (arr1 == null || arr1.length == 0) { return arr2; } else if (arr2 == null || arr2.length == 0) { return arr1; } int[] result = new int[arr1.length + arr2.length]; boolean[] isUsed = new boolean[arr1.length + arr2.length]; Arrays.fill(isUsed, false); int index = -1; boolean check; for (int i = 0; i < result.length; i++) { result[i] = Integer.MIN_VALUE; check = false; for (int j = 0; j < arr1.length; j++) { // if the current int is greater than lowest and is not used if ((check == false && isUsed[j] == false) || (result[i] > arr1[j] && isUsed[j] == false)) { result[i] = arr1[j]; index = j; check = true; // isUsed[j] = true; } } for (int j = 0; j < arr2.length; j++) { // if the current int is greater than lowest and is not used if ((check == false && isUsed[j + arr1.length] == false) || (result[i] > arr2[j] && isUsed[j + arr1.length] == false)) { result[i] = arr2[j]; index = j + arr1.length; check = true; // isUsed[j + + arr1.length] = true; } } isUsed[index] = true; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void givenAnArrayWithTwoElements_ThenItIsSorted() {\n\t\tList<Integer> unsorted = new ArrayList<>();\n\t\tunsorted.add(2);\n\t\tunsorted.add(1);\n\t\t\n\t\t// Execute the code\n\t\tList<Integer> sorted = QuickSort.getInstance().sort(unsorted);\n\t\t\t\n\t\t// Verify the test result(s)\n\t\tassertThat(sorted.get(0), is(1));\n\t\tassertThat(sorted.get(1), is(2));\n\t}", "public abstract void sort(int[] sortMe);", "@Test\r\n public void trivialTest() {\r\n int[] unsorted = new int[0];\r\n int[] expResult = new int[0];\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n\tpublic void testSortOneElementInArray() {\n\t\tint[] arrayBeforeSort = { 565 };\n\t\tint[] arrayAfterSort = { 565 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "private static <T,P> void sort1(List<T> x, List<P> a2, Comparator<T> comp, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x.get(j-1),x.get(j))>0; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tT v = x.get(m);\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x.get(b),v)<=0) {\n\t\t\t\tif (x.get(b) == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x.get(c),v)>=0) {\n\t\t\t\tif (x.get(c) == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2,comp, n-s, s);\n\t}", "@Test\r\n public void SortTest() {\r\n System.out.println(\"sort\");\r\n List<String> array = Arrays.asList(\"3\", \"2\", \"1\");\r\n List<String> expResult = Arrays.asList(\"1\",\"2\",\"3\");\r\n instance.sort(array);\r\n assertEquals(expResult,array);\r\n }", "@Test\r\n public void confirmNumericalSortTest() {\r\n int[] unsorted = new int[]{2,10,1,3,4,100,20};\r\n int[] expResult = new int[]{1,2,3,4,10,20,100};\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "private static <T> boolean isSorted(Comparable<T>[] a) {\n\t\tfor(int i=1; i<a.length; i++) {\r\n\t\t\tif(less(a[i],a[i-1]))\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void testSortAndDedup() {\n assertDeduped(List.<String>of(), Comparator.naturalOrder(), 0);\n // test no elements in an integer array\n assertDeduped(List.<Integer>of(), Comparator.naturalOrder(), 0);\n // test unsorted array\n assertDeduped(List.of(-1, 0, 2, 1, -1, 19, -1), Comparator.naturalOrder(), 5);\n // test sorted array\n assertDeduped(List.of(-1, 0, 1, 2, 19, 19), Comparator.naturalOrder(), 5);\n // test sorted\n }", "@Override\n public void sort(int[] input) {\n }", "@Override\n public void sortIt(final Comparable a[]) {\n }", "@Test\n public void testSort_intArr() {\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\r\n public void testSortedArr() {\r\n System.out.println(\"SortedArr\");\r\n int length = 0;\r\n Class sortClass = null;\r\n int[] expResult = null;\r\n int[] result = GenerateArr.SortedArr(length, sortClass);\r\n assertArrayEquals(expResult, result);\r\n }", "public interface Sorter<T> {\n\n void sort(Comparable<T>[] data);\n}", "@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(List.class).withType(Number.class).build();\r\n Type arrayType = Types.createGenericArrayType(t0);\r\n test(arrayType);\r\n }", "@Test\n\tpublic void testSortNormalElements() {\n\t\tint[] arrayBeforeSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tint[] arrayAfterSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\n public void newSortingTest4() {\n newSorting sort = new newSorting();\n int[] arr = {-1, 0, 1, 0, 1, 0, -1};\n int[] expected = {-1, -1, 0, 0, 0, 1, 1};\n sort.newSorting(arr, 3);\n assertArrayEquals(arr, expected);\n\n }", "public SortedArrayInfo sortArray(List<Integer> randomNumbers);", "private static <T,P> void sort1(T x[], P[] a2, Comparator<T> comp, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x[j-1],x[j])>0; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tT v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x[b],v)<=0) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x[c],v)>=0) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2,comp, n-s, s);\n\t}", "@Test\n public void testSort_intArr_IntegerComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public abstract void sort(int[] array);", "public static <T extends Comparable<? super T>> void sortTest(T[] a) {\n int N = a.length;\n int q = 0;\n for (int i = 1; i < N; i++) { \n // Insert a[i] among a[i-1], a[i-2], a[i-3]... ..\n for (int j = i; j > 0 && less(a[j], a[j-1]); j--) {\n exch(a, j, j-1); q = j;\n }\n }\n System.out.println(\"q==j==\"+q);\n }", "private static <T,P> void sort1(T x[], int[] a2, Comparator<T> comp, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x[j-1],x[j])>0; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tT v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x[b],v)<=0) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x[c],v)>=0) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2,comp, n-s, s);\n\t}", "@Test\n public void testSort_intArr_IntegerComparator() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testQuickSort() {\n System.out.println(\"QuickSort listo\");\n Comparable[] list = {3,2,5,4,1};\n QuickSort instance = new QuickSort();\n Comparable[] expResult = {1,2,3,4,5};\n Comparable[] result = instance.QuickSort(list, 0, list.length-1);\n assertArrayEquals(expResult, result);\n }", "<T extends Comparable<T>> void sort(T[] unsorted);", "@Test\n public void testSort_intArr_IntegerComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\r\n public void repeatedValuesTest() {\r\n int[] unsorted = new int[]{1,33,1,0,33,-23,1,-23,1,0,-23};\r\n int[] expResult = new int[]{-23,-23,-23,0,0,1,1,1,1,33,33};\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "@Test\n public void testSort_intArr_IntComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testSort_intArr_IntegerComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testSort_intArr_IntComparator_Asc_Middle() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_MIDDLE_SORT_ARRAY;\n sorter.sort(data, 4, 10, comparator);\n// System.out.println(\"Expected: \" + Arrays.toString(expResult));\n// System.out.println(\"Result: \" + Arrays.toString(data));\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testSort_intArr_IntComparator() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyInsertionSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.insertionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.insertionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "private static <T> void sort1(long x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tlong v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}", "private static boolean isSorted(Comparable[] a) {\n for (int i = 1; i < a.length; i++)\n if (less(a[i], a[i-1])) return false;\n return true;\n }", "@Test\r\n public void testSort() {\r\n System.out.println(\"sort\");\r\n int[] array = {6, 3, 7, 9, 4, 1, 3, 7, 0};\r\n int[] expResult = {0, 1, 3, 3, 4, 6, 7, 7, 9};\r\n\r\n int[] result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n \r\n array = new int[10000];\r\n for (int i = 0; i < array.length; i++) {\r\n array[i] = new Random().nextInt(Integer.MAX_VALUE);\r\n }\r\n expResult = Arrays.copyOf(array, array.length);\r\n Arrays.sort(expResult);\r\n \r\n result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n }", "private static void sort1(int[] x, IntComparator comp, int off, int len) {\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x[j-1],x[j])>0; j--)\n\t\t\t\t\tswap(x, j, j-1);\n\t\t}\n\t\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\t\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x[b],v)<=0) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x[c],v)>=0) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x, b++, c--);\n\t\t}\n\t\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,b, n-s, s);\n\t\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,comp, n-s, s);\n\t}", "private void assertStablySorted(final IntPlus[] origArr,\n final IntPlus[] testArr,\n Comparator<IntPlus> cmp) {\n //Create copy of original array and sort it\n IntPlus[] stablySortedArr = cloneArr(origArr);\n Arrays.parallelSort(stablySortedArr, cmp); //guaranteed to be stable\n\n //Works since stable sorts are unique - there is 1 right answer.\n for (int i = 0; i < origArr.length; i++) {\n assertEquals(\"Array was not stably sorted: element \" + i + \" was \"\n + \"out of order. Expected:\\n\"\n + Arrays.deepToString(stablySortedArr) + \"\\nYours:\"\n + \"\\n\" + Arrays.deepToString(testArr),\n stablySortedArr[i], testArr[i]);\n }\n }", "@Test\n public void testSort_intArr_half() {\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "static boolean isSorted(int arr[]) {\n\t\tif(arr.length==1) {\n\t\t\treturn true;\n\t\t}\n\t\tif(arr[0]>arr[1]) {\n\t\t\treturn false;\n\t\t}\n\t\tint paritialArray [] = new int[arr.length-1];\n\t\tfor(int i=0; i<paritialArray.length; i++) {\n\t\t\tparitialArray[i] = arr[i+1];\n\t\t}\n\t\tboolean result = isSorted(paritialArray);\n\t\treturn result;\n\t\t\n\t\t\n\t}", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyCocktailShakerSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.cocktailSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.cocktailSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "@Test\n public void testSort_intArr_IntComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public static void sort(Comparable[] a)\n {\n // Do lg N passes of pairwise merges.\n int N = a.length;\n aux = new Comparable[N];\n for (int sz = 1; sz < N; sz = sz+sz) // sz: subarray size\n for (int lo = 0; lo < N - sz; lo += sz + sz) // lo: subarray index\n merge(a, lo, lo + sz - 1, Math.min(lo + sz + sz - 1, N - 1));\n }", "@Test(timeout = SHORT_TIMEOUT, expected = IllegalArgumentException.class)\n public void testNullArrInsertionSort() {\n Sorting.insertionSort(null, comp);\n }", "@Specialization(\n guards = {\n \"interop.hasArrayElements(self)\",\n \"areAllDefaultComparators(interop, hostValueToEnsoNode, comparators)\",\n \"interop.isNull(byFunc)\",\n \"interop.isNull(onFunc)\"\n }, limit = \"3\")\n Object sortPrimitives(\n State state,\n Object self,\n long ascending,\n Object comparators,\n Object compareFunctions,\n Object byFunc,\n Object onFunc,\n long problemBehavior,\n @Shared(\"lessThanNode\") @Cached LessThanNode lessThanNode,\n @Shared(\"equalsNode\") @Cached EqualsNode equalsNode,\n @Cached HostValueToEnsoNode hostValueToEnsoNode,\n @Shared(\"typeOfNode\") @Cached TypeOfNode typeOfNode,\n @Shared(\"anyToTextNode\") @Cached AnyToTextNode toTextNode,\n @Shared(\"interop\") @CachedLibrary(limit = \"10\") InteropLibrary interop) {\n EnsoContext ctx = EnsoContext.get(this);\n Object[] elems;\n try {\n long size = interop.getArraySize(self);\n assert size < Integer.MAX_VALUE;\n elems = new Object[(int) size];\n for (int i = 0; i < size; i++) {\n if (interop.isArrayElementReadable(self, i)) {\n elems[i] = hostValueToEnsoNode.execute(interop.readArrayElement(self, i));\n } else {\n CompilerDirectives.transferToInterpreter();\n throw new PanicException(\n ctx.getBuiltins()\n .error()\n .makeUnsupportedArgumentsError(\n new Object[] {self},\n \"Cannot read array element at index \" + i + \" of \" + self),\n this);\n }\n }\n } catch (UnsupportedMessageException | InvalidArrayIndexException e) {\n throw new IllegalStateException(\"Should not reach here\", e);\n }\n var javaComparator =\n createDefaultComparator(\n lessThanNode, equalsNode, typeOfNode, toTextNode, ascending, problemBehavior, interop);\n try {\n return sortPrimitiveVector(elems, javaComparator);\n } catch (CompareException e) {\n return DataflowError.withoutTrace(\n incomparableValuesError(e.leftOperand, e.rightOperand), this);\n }\n }", "private static <T> void sort1(float x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2,j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tfloat v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x, a2,b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}", "public interface SortAlgorithm {\n\tpublic int[] sort(int[] numbers);\n}", "private static <T> void sort1(double x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tdouble v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}", "@Test\r\n public void testCompare() {\r\n\r\n double[] r1;\r\n double[] r2;\r\n Comparator<double[]> instance = new DoubleArrayComparator();\r\n \r\n r1 = new double[]{1,2,3};\r\n r2 = new double[]{1,2,3}; \r\n assertEquals(0, instance.compare(r1, r2));\r\n\r\n r1 = new double[]{1,2,3};\r\n r2 = new double[]{1,3,2}; \r\n assertEquals(-1, instance.compare(r1, r2));\r\n \r\n r1 = new double[]{1,3,3};\r\n r2 = new double[]{1,3,2}; \r\n assertEquals(1, instance.compare(r1, r2));\r\n \r\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveInsertionSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[3] = new IntPlus(-1);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [0, 2, 4, -1, 8, 10]\n Should require 7 comparisons to sort\n */\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }", "@Test\n public void testSort_intArr_IntComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "void sort(int a[]) throws Exception {\n }", "private static <T> void sort1(short x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2,j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tshort v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}", "protected void sort1(double x[], int off, int len) {\r\n // Insertion sort on smallest arrays\r\n if (len < 7) {\r\n for (int i = off; i < len + off; i++) {\r\n for (int j = i; j > off && x[j - 1] > x[j]; j--) {\r\n swap(x, j, j - 1);\r\n }\r\n }\r\n return;\r\n }\r\n\r\n // Choose a partition element, v\r\n int m = off + (len >> 1); // Small arrays, middle element\r\n if (len > 7) {\r\n int l = off;\r\n int n = off + len - 1;\r\n if (len > 40) { // Big arrays, pseudomedian of 9\r\n int s = len / 8;\r\n l = med3(x, l, l + s, l + 2 * s);\r\n m = med3(x, m - s, m, m + s);\r\n n = med3(x, n - 2 * s, n - s, n);\r\n }\r\n m = med3(x, l, m, n); // Mid-size, med of 3\r\n }\r\n double v = x[m];\r\n\r\n // Establish Invariant: v* (<v)* (>v)* v*\r\n int a = off, b = a, c = off + len - 1, d = c;\r\n while (true) {\r\n while (b <= c && x[b] <= v) {\r\n if (x[b] == v) {\r\n swap(x, a++, b);\r\n }\r\n b++;\r\n }\r\n while (c >= b && x[c] >= v) {\r\n if (x[c] == v) {\r\n swap(x, c, d--);\r\n }\r\n c--;\r\n }\r\n if (b > c) {\r\n break;\r\n }\r\n swap(x, b++, c--);\r\n }\r\n\r\n // Swap partition elements back to middle\r\n int s, n = off + len;\r\n s = Math.min(a - off, b - a);\r\n vecswap(x, off, b - s, s);\r\n s = Math.min(d - c, n - d - 1);\r\n vecswap(x, b, n - s, s);\r\n\r\n // Recursively sort non-partition-elements\r\n if ((s = b - a) > 1) {\r\n sort1(x, off, s);\r\n }\r\n if ((s = d - c) > 1) {\r\n sort1(x, n - s, s);\r\n }\r\n }", "@Override\n\tpublic boolean checkHomogeneous(List<int[]> input) {\n\t\treturn false;\n\t}", "private static <T> void sort1(int x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2,a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}", "@Test(expectedExceptions = IllegalArgumentException.class)\n\tpublic void testSortEmptyArray() {\n\t\tint[] array = {};\n\t\tArrayQuickSort.sort(array);\n\t}", "public <T extends Comparable<? super T>> void sort (T[] a) {\n int n = a.length;\n for (int i = 0; i< n - 1; i++) {\n for (int j = 0; j < n -1 - i; j++) {\n if (a[j+1].compareTo(a[j]) < 0) \n {\n T tmp = a[j]; \n a[j] = a[j+1];\n a[j+1] = tmp;\n }\n }\n }\n }", "@Test(timeout = SHORT_TIMEOUT, expected = IllegalArgumentException.class)\n public void testNullArrMergeSort() {\n Sorting.mergeSort(null, comp);\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyMergeSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.mergeSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.mergeSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "public interface IArraySort {\n int[] sort(int [] sort);\n}", "private static <T extends Comparable<T>> void sort(T[] list, int lo, int hi) {\n\t\tif (hi - lo <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint splitPoint = splitList(list, lo, hi);\r\n\t\tSystem.out.println(\"splitPoint: \" + splitPoint);\r\n\t\tsort(list, lo, splitPoint - 1);\r\n\t\tsort(list, splitPoint + 1, hi);\r\n\t}", "public void timSort(int[] nums) {\n\t\t\t\n\t}", "@Test\n\tpublic void testSortTwoElements() {\n\t\tint[] arrayBeforeSort = { 565, 45 };\n\t\tint[] arrayAfterSort = { 565, 45 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test\n public void newSortingTest2() {\n newSorting sort = new newSorting();\n int[] arr = {0, 5, 1, 8, 0, 0};\n int[] expected = {0, 0, 0, 1, 5, 8};\n sort.newSorting(arr, 4);\n assertArrayEquals(arr, expected);\n }", "private static <T> void quickSort(@Nonnull List<T> x, @Nonnull Comparator<? super T> comparator, int off, int len) {\n if (len < 7) {\n for (int i = off; i < len + off; i++) {\n for (int j = i; j > off && comparator.compare(x.get(j), x.get(j - 1)) < 0; j--) {\n swapElements(x, j, j - 1);\n }\n }\n return;\n }\n\n // Choose a partition element, v\n int m = off + (len >> 1); // Small arrays, middle element\n if (len > 7) {\n int l = off;\n int n = off + len - 1;\n if (len > 40) { // Big arrays, pseudomedian of 9\n int s = len / 8;\n l = med3(x, comparator, l, l + s, l + 2 * s);\n m = med3(x, comparator, m - s, m, m + s);\n n = med3(x, comparator, n - 2 * s, n - s, n);\n }\n m = med3(x, comparator, l, m, n); // Mid-size, med of 3\n }\n T v = x.get(m);\n\n // Establish Invariant: v* (<v)* (>v)* v*\n int a = off;\n int b = a;\n int c = off + len - 1;\n int d = c;\n while (true) {\n while (b <= c && comparator.compare(x.get(b), v) <= 0) {\n if (comparator.compare(x.get(b), v) == 0) {\n swapElements(x, a++, b);\n }\n b++;\n }\n while (c >= b && comparator.compare(v, x.get(c)) <= 0) {\n if (comparator.compare(x.get(c), v) == 0) {\n swapElements(x, c, d--);\n }\n c--;\n }\n if (b > c) break;\n swapElements(x, b++, c--);\n }\n\n // Swap partition elements back to middle\n int n = off + len;\n int s = Math.min(a - off, b - a);\n vecswap(x, off, b - s, s);\n s = Math.min(d - c, n - d - 1);\n vecswap(x, b, n - s, s);\n\n // Recursively sort non-partition-elements\n if ((s = b - a) > 1) quickSort(x, comparator, off, s);\n if ((s = d - c) > 1) quickSort(x, comparator, n - s, s);\n }", "public static void sort(Comparable[] a){\n for(int i=1;i<a.length;i++){\n // Insert a[i] among a[i-1],a[i-2],a[i-3]...\n for (int j=i;j>0&&less(a[j],a[j-1]);j--){\n exch(a,j,j-1);\n }\n }\n }", "@Test\n public void newSortingTest3() {\n newSorting sort = new newSorting();\n int[] arr = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};\n int[] expected = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n sort.newSorting(arr, 5);\n assertArrayEquals(arr, expected);\n\n }", "private static void sort1(double x[], int[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tdouble v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}", "void sort(int[] sort);", "private static void sort1(int x[], double[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2,a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}", "private void assertSorted(final IntPlus[] testArr,\n Comparator<IntPlus> cmp) {\n for (int i = 0; i < testArr.length - 1; i++) {\n assertTrue(\"Array was not sorted: element \" + i + \" was out \"\n + \"of order: \\n\" + Arrays.deepToString(testArr),\n cmp.compare(testArr[i], testArr[i + 1]) <= 0);\n\n }\n }", "public interface Sorter {\n int[] sort(int[] sequence);\n}", "@Test(timeout = SHORT_TIMEOUT, expected = IllegalArgumentException.class)\n public void testNullArrQuickSort() {\n Sorting.quickSort(null, comp, new Random(1301));\n }", "private static <T> void sort1(byte x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tbyte v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}", "public static <T extends Comparable<? super T>> void sortTest2(T[] a) {\n int N = a.length;\n for (int i = 1; i < N; i++) { \n // Insert a[i] among a[i-1], a[i-2], a[i-3]... ..\n for (int j = i; j > 0 && lessTest(a[j], a[j-1]); j--) {\n exch(a, j, j-1);\n }\n }\n }", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "private void mergesort(int[] array) {\n\t\t\n\t}", "public static void sort(Comparable[] a) {\n for (int i = 0 ; i < a.length ; i++) { // each position scan\n int min = i;\n for (int j = i+1; j < a.length; j++) { // each time we have to scan through remaining entry\n if (HelperFunctions.less(a[j], a[min])) {\n min = j ;\n }\n HelperFunctions.exch(a, i, min);\n }\n }\n }", "@Test\n public void newSortingTest5() {\n newSorting sort = new newSorting();\n int[] arr = {10, 100, 20, 90, 30, 80, 40, 70, 50, 60};\n int[] expected = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};\n sort.newSorting(arr, 2);\n assertArrayEquals(arr, expected);\n }", "private void improperArgumentCheck(Point[] points) {\n int N = points.length;\n for (int i = 0; i < N; i++) {\n if (null == points[i])\n throw new NullPointerException();\n }\n\n Arrays.sort(points);\n for (int i = 1; i < N; i++) {\n if (points[i-1].equals(points[i]))\n throw new IllegalArgumentException();\n }\n }", "@Override\n\tpublic int[] sort(int[] numbers) {\n\t\treturn null;\n\t}", "public interface Sort<E extends Comparable<E>> {\n void sort(E[] e);\n\n default void show(E[] e) {\n StringBuffer res = new StringBuffer(\"[\");\n for (int i = 0; i < e.length; i++) {\n res.append(e[i] + \",\");\n }\n\n res = res.deleteCharAt(res.length() - 1);\n res.append(\"]\");\n System.out.println(res.toString());\n }\n\n default boolean isSorted(E[] e) {\n for (int i = 0; i < e.length - 1; i++) {\n if (e[i].compareTo(e[i + 1]) > 0)\n throw new IllegalArgumentException(\"排序出错, 请检查程序\");\n }\n\n System.out.println(\"排序正常...\");\n return true;\n }\n}", "private static void sort1(double x[], double[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tdouble v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}", "@Test\n\tpublic void givenAnUnsortedList_ThenListIsSorted() {\n\t\tList<Integer> unsorted = new ArrayList<>();\n\t\tunsorted.add(2);\n\t\tunsorted.add(1);\n\t\tunsorted.add(3);\n\t\tunsorted.add(5);\n\t\tunsorted.add(4);\n\t\t\n\t\t// Execute the code\n\t\tList<Integer> sorted = QuickSort.getInstance().sort(unsorted);\n\t\t\n\t\t// Verify the test result(s)\n\t\tassertThat(sorted.get(0), is(1));\n\t\tassertThat(sorted.get(1), is(2));\n\t\tassertThat(sorted.get(2), is(3));\n\t\tassertThat(sorted.get(3), is(4));\n\t\tassertThat(sorted.get(4), is(5));\n\t}", "@Test\n public void case4SortSameSequence(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2,3};\n data2.initializeArray(\"1 2 3\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n data2.runAlgo(algoUnderTest);\n\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n\n }", "@Test\n\tpublic void testSortRepeatableNumbers() {\n\t\tint[] arrayBeforeSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tint[] arrayAfterSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinySelectionSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.selectionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.selectionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "@Override\n\tpublic void sort(T[] nums) {\n\t\tsort(nums,0,nums.length - 1);\n\t}", "@Test(timeout = SHORT_TIMEOUT, expected = IllegalArgumentException.class)\n public void testNullArrSelectionSort() {\n Sorting.selectionSort(null, comp);\n }", "private static void sort1(int x[], int[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2,a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void validateSortedData() {\n Preconditions.checkArgument(\n indices.length == values.length,\n \"Indices size and values size should be the same.\");\n if (this.indices.length > 0) {\n Preconditions.checkArgument(\n this.indices[0] >= 0 && this.indices[this.indices.length - 1] < this.n,\n \"Index out of bound.\");\n }\n for (int i = 1; i < this.indices.length; i++) {\n Preconditions.checkArgument(\n this.indices[i] > this.indices[i - 1], \"Indices duplicated.\");\n }\n }", "private static void sort(Object[] a, Object[] tmp,\n int from, int to, Fun isLess) {\n int split = (from + to) / 2;\n if (split - from > 1)\n sort(tmp, a, from, split, isLess);\n if (to - split > 1)\n sort(tmp, a, split, to, isLess);\n int i = from, j = split;\n while (i < split && j < to) {\n if (isLess.apply(tmp[i], tmp[j]) == Boolean.TRUE)\n a[from] = tmp[i++];\n else\n a[from] = tmp[j++];\n ++from;\n }\n if (i < split)\n System.arraycopy(tmp, i, a, from, split - i);\n else if (j < to)\n System.arraycopy(tmp, j, a, from, to - j);\n }", "@Test\n public void newSortingTest() {\n newSorting sort = new newSorting();\n int[] arr = {3, 2, 6, 5, 1, 7, 4};\n int[] expected = {1, 2, 3, 4, 5, 6, 7};\n sort.newSorting(arr, 4);\n assertArrayEquals(arr, expected);\n }", "private int isArraySorted(int[] arr, int length) {\n\t\tif(length==1){\n\t\t\t//Base case, if the length is 1 ..array is sorted\n\t\t\treturn 1;\n\t\t}\n\t\t/*If second last element is bigger than last element (length-1)th element \n\t\t return 0 else check if (length-3)th element is bigger than (length-2)th element*/\n\t\treturn ((arr[length-1]<arr[length-2])? 0: isArraySorted(arr, length-1));\n\t}", "@Test\n public void testRecoverRotatedSortedArray() {\n System.out.println(\"recoverRotatedSortedArray\");\n ArrayList<Integer> nums = null;\n RecoverRotatedSortedArray instance = new RecoverRotatedSortedArray();\n instance.recoverRotatedSortedArray(nums);\n \n ArrayList<Integer> nums2 = new ArrayList<Integer>();\n nums2.add(4);\n nums2.add(5);\n nums2.add(1);\n nums2.add(2);\n nums2.add(3);\n instance.recoverRotatedSortedArray(nums2);\n assertEquals(1, (long)nums2.get(0));\n assertEquals(2, (long)nums2.get(1));\n assertEquals(3, (long)nums2.get(2));\n assertEquals(4, (long)nums2.get(3));\n assertEquals(5, (long)nums2.get(4));\n \n ArrayList<Integer> nums3 = new ArrayList<Integer>();\n for (int i = 0; i < 9; i++) {\n nums3.add(1);\n }\n nums3.add(-1);\n for (int i = 0; i < 11; i++) {\n nums3.add(1);\n }\n instance.recoverRotatedSortedArray(nums3);\n assertEquals(-1, (long)nums3.get(0));\n assertEquals(1, (long)nums3.get(1));\n assertEquals(1, (long)nums3.get(2));\n assertEquals(1, (long)nums3.get(9));\n }", "public static void sort(Comparable[] a)\n {\n aux= new Comparable[a.length]; //Allocate space just once\n sort(a,0,a.length); //this uses the sort method in the bottom and tells where it should merge sort.\n }", "public static int[] partialSort(int[] a) {\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < 2 - i; j++) {\n if (a[j] > a[j+1]) {\n int temp = a[j+1];\n a[j+1] = a[j];\n a[j] = temp;\n }\n }\n }\n return a;\n}", "@Test\n public void testSelectionSort(){\n SimpleList<Integer> simpleList = new SimpleList<Integer>();\n simpleList.append(1);\n simpleList.append(2);\n simpleList.append(3);\n simpleList.append(4);\n simpleList.append(5);\n simpleList.append(6);\n simpleList.append(7);\n simpleList.append(8);\n simpleList.append(9);\n simpleList.append(10);\n Sorter.selectionSort(simpleList);\n List<Integer> list = simpleList.getList();\n Integer[] expected = new Integer[]{10,9,8,7,6,5,4,3,2,1};\n Integer[] real = new Integer[simpleList.size()];\n list.toArray(real);\n assertArrayEquals(expected, real);\n }", "@Override\n\tpublic void sort(int[] array) {\n\n\t}" ]
[ "0.61285144", "0.6115892", "0.6083639", "0.6003909", "0.5952579", "0.59414834", "0.5925763", "0.58924824", "0.5892448", "0.58900267", "0.5884143", "0.58153445", "0.5811471", "0.57446367", "0.5739827", "0.5729019", "0.57250977", "0.57247734", "0.5722034", "0.5720706", "0.57000315", "0.5699139", "0.56941926", "0.56901747", "0.568278", "0.5677781", "0.5666096", "0.5657037", "0.56558746", "0.5630237", "0.5626207", "0.56244355", "0.56173414", "0.56145626", "0.5611209", "0.5598827", "0.55944145", "0.55832505", "0.55828834", "0.5581958", "0.55802953", "0.55706835", "0.5570154", "0.5567399", "0.55560595", "0.5550463", "0.5544222", "0.5532974", "0.55298984", "0.5523287", "0.55182976", "0.5515312", "0.54993856", "0.549258", "0.54878354", "0.5486305", "0.5486294", "0.5474998", "0.54727554", "0.5471558", "0.5469542", "0.5465227", "0.5458855", "0.5452735", "0.5448253", "0.5446828", "0.5445791", "0.5445416", "0.5426911", "0.5425534", "0.54228413", "0.5419808", "0.5417576", "0.5408327", "0.5407949", "0.5398863", "0.53982025", "0.53969824", "0.5395816", "0.539408", "0.53897035", "0.5387361", "0.53832054", "0.5378979", "0.53774595", "0.53720576", "0.5361526", "0.5356021", "0.534283", "0.53368783", "0.5334277", "0.5326625", "0.5326431", "0.53256476", "0.5321708", "0.53207916", "0.53085923", "0.53073364", "0.5302679", "0.5301795", "0.5299063" ]
0.0
-1
checking if the arrays are null
public static int[] merge_v2(int[] arr1, int[] arr2) { if ((arr1 == null || arr1.length == 0) && (arr2 == null || arr2.length == 0)) { return null; } else if (arr1 == null || arr1.length == 0) { return Arrays.copyOf(arr2, arr2.length); } else if (arr2 == null || arr2.length == 0) { return Arrays.copyOf(arr1, arr1.length); } // assuming arr1 and arr2 are null int pointer1 = 0; int pointer2 = 0; int[] result = new int[arr1.length + arr2.length]; for (int i = 0; i < result.length; i++) { if (pointer2 > arr2.length - 1) { result[i] = arr1[pointer1]; pointer1++; } else if ((pointer1 > arr1.length - 1) || (arr1[pointer1] > arr2[pointer2])) { result[i] = arr2[pointer2]; pointer2++; } else { result[i] = arr1[pointer1]; pointer1++; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkEmpty() {\n\t\treturn this.array[0] == null;\n\t}", "protected boolean arrayIsEmpty(Object arr[]) {\n boolean empty = true;\n \n for (Object obj : arr) {\n \tif (obj != null) {\n \t\tempty = false;\n \t\tbreak;\n \t}\n }\n \treturn empty;\n }", "@Test\n\tvoid testCheckNulls3() {\n\t\tObject[] o = {null,null,null,null,null};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "@Test\n\tvoid testCheckNulls2() {\n\t\tObject[] o = {2,5f,\"Test\",null,\"Test2\"};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "private void checkFormNullInput(Point[] points) {\n // No null inputs are allowed\n if (points == null) throw new IllegalArgumentException();\n\n for (Point p : points) {\n // No null elements are allowed\n if (p == null) {\n throw new IllegalArgumentException();\n }\n }\n }", "@Test\n\tvoid testCheckNulls4() {\n\t\tObject[] o = {2,5f,\"Test\",Duration.ZERO,new Station(0,0,\"Test\")};\n\t\tassertFalse(DataChecker.checkNulls(o));\n\t}", "boolean hasArray();", "private boolean checkFull() {\n\t\treturn this.array.length - 1 == this.lastNotNull();\n\t}", "public boolean isEmpty(){\n for(int i = 0; i < arrayList.length; i++) {\n if (arrayList[i] != null)\n return false;\n }\n return true;\n }", "protected boolean matchData() {\n for (int i = 0; i < itsNumPoints; i++) {\n if (itsValues[i] == null || itsValues[i].getData() == null) {\n return false;\n }\n }\n return true;\n }", "public boolean isNilArrayOfValuationAggregate1()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1 target = null;\r\n target = (com.msbinfo.expresslync.rct.ArrayOfValuationAggregate1)get_store().find_element_user(ARRAYOFVALUATIONAGGREGATE1$0, 0);\r\n if (target == null) return false;\r\n return target.isNil();\r\n }\r\n }", "public boolean isEmpty( Object[] array ){\n if( array == null || array.length == 0 ){\n return true;\n }\n return false;\n }", "public void testCheckArray_NullInArg() {\n Object[] objects = new Object[] {\"one\", null};\n try {\n Util.checkArray(objects, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "private boolean isEmpty()\n {\n return dimensions.isEmpty();\n }", "public static boolean isNotNullOrEmpty(Object[] array) {\n return array != null && array.length > 0;\n }", "@Test\n public void testNullArray()\n {\n assertNull(ArrayFlattener.flattenArray(null));\n }", "protected boolean islSubsWithTranslationsNull() {\n List<List<NetSubtitle>> swt = lSubsWithTranslations;\n return (swt == null || swt.size() < 2 ||\n swt.get(0) == null || swt.get(0).isEmpty() ||\n swt.get(1) == null || swt.get(1).isEmpty());\n }", "protected boolean checkEmptyList(){\n boolean emptyArray = true;\n String empty= alertList.get(AppCSTR.FIRST_ELEMENT).get(AppCSTR.NAME);\n if(!empty.equals(\"null\") && !empty.equals(\"\")) {\n emptyArray = false;\n }\n return emptyArray;\n }", "public static boolean isEmpty(Object[] values) {\n return values == null || values.length == 0;\n }", "public static boolean isEmpty(Object[] array) {\n return array == null || array.length == 0;\n }", "void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }", "boolean isNilArrayOfFaultTypeArray(int i);", "public void testCheckArray_NullArg() {\n try {\n Util.checkArray(null, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public static boolean isAllNulls(final Iterable<?> array) {\n return StreamSupport.stream(array.spliterator(), true).allMatch(o -> o == null);\n }", "public static boolean isEmpty(Object[] array) {\r\n return (array == null || array.length == 0);\r\n }", "public static <T> void checkNull(T[] obj){\n if(obj == null || obj.length == 0){\n throw new IllegalArgumentException(\"Object is null\");\n }\n for(T val:obj){\n checkNull(val);\n }\n }", "protected boolean checkEmpty(String[] parameters) {\n return parameters == null || parameters.length == 0;\n }", "public boolean hasArrayFiller() {\n return get(ARRAY_FILLER).isPresent();\n }", "private boolean allCardsAreNull(ArrayList<Card> set) {\r\n\t\tfor (Card c : set) {\r\n\t\t\tif (c != null) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\n\tvoid testCheckNulls1() {\n\t\tassertTrue(DataChecker.checkNulls(null));\n\t}", "public int checkforNull() {\r\n\t\t int notNull=0;\r\n\t\t for(int a=0; a<populationSize();a++) {\r\n\t\t\t if(getTour(a)!=null) {\r\n\t\t\t\t notNull++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t return notNull;\r\n\t }", "public boolean isEmpty() {\n\t\treturn array.isEmpty();\n\t}", "public boolean hasMatch(int[] values) {\n\t\treturn values == null;\n\t}", "public static <T> void checkNull(T[] obj, final int length){\n if(length<0){\n throw new IllegalArgumentException(String.format(\"Invalid length specified %d\", length));\n }\n if(obj == null || obj.length != length){\n throw new IllegalArgumentException(String.format(\"Either Array is\" +\n \" null or lenght of array is not %d\", length));\n }\n for(T val:obj){\n checkNull(val);\n }\n }", "public static boolean isEmpty(Object[] array) {\n if (array == null || array.length == 0) {\n return true;\n }\n return false;\n }", "public boolean canProcessNull() {\n return false;\n }", "public boolean existsAnyMissingValue(){\r\n\t\treturn (anyMissingValue[0] || anyMissingValue[1]);\r\n\t}", "public boolean isNull() {\n return this.data == null;\n }", "private boolean isEmpty() {\n return dataSize == 0;\n }", "public static boolean check(String[] i) {\r\n\t\tboolean result = false;\r\n\t\tif (i != null && i.length != 0) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public boolean isNullRecord () {\n if ((latitude == FLOATNULL) &&\n (longitude == FLOATNULL) &&\n (depth == FLOATNULL) &&\n (temperatureMin == FLOATNULL) &&\n (temperatureMax == FLOATNULL) &&\n (salinityMin == FLOATNULL) &&\n (salinityMax == FLOATNULL) &&\n (oxygenMin == FLOATNULL) &&\n (oxygenMax == FLOATNULL) &&\n (nitrateMin == FLOATNULL) &&\n (nitrateMax == FLOATNULL) &&\n (phosphateMin == FLOATNULL) &&\n (phosphateMax == FLOATNULL) &&\n (silicateMin == FLOATNULL) &&\n (silicateMax == FLOATNULL) &&\n (chlorophyllMin == FLOATNULL) &&\n (chlorophyllMax == FLOATNULL)) {\n return true;\n } else {\n return false;\n } // if ...\n }", "private static boolean nullOk(Schema schema) {\n if (Schema.Type.NULL == schema.getType()) {\n return true;\n } else if (Schema.Type.UNION == schema.getType()) {\n for (Schema possible : schema.getTypes()) {\n if (nullOk(possible)) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean isEmpty()\n {return data == null;}", "boolean isEmpty(int[] array) {\n return array.length == 0;\n }", "public boolean hasArray()\r\n/* 122: */ {\r\n/* 123:151 */ return true;\r\n/* 124: */ }", "@Override\n public boolean isEmpty(){\n return points.isEmpty();\n }", "@Test\n public void testNullInputPerturbDataSet() throws Exception {\n int[] result = NoiseGenerator.perturbDataSet(null, 2);\n Assert.assertTrue(result == null);\n }", "public static boolean isNullOrEmpty(byte[] array) {\r\n\t\treturn array == null || array.length == 0;\r\n\t}", "public boolean checkAllNull() {\n return (locationFilterCriteria == null || locationFilterCriteria.checkAllNull()) &&\n minPricePerM2 == null && maxPricePerM2 == null &&\n sizeInM2LowerBound == null &&\n sizeInM2UpperBound == null && roofed == null &&\n leasingTimeFrom == null && leasingTimeTo == null &&\n keywords == null && electricity == null && water == null &&\n high == null && glassHouse == null;\n }", "public static boolean isNullOrEmpty(Object[] array) {\n return !isNotNullOrEmpty(array);\n }", "public boolean checkListNull() {\n\t\treturn ((drawerItems == null) ? true : false);\n\t}", "boolean checkNull();", "public static boolean arrayNotEmpty(String[] a) {\n return a != null && a.length > 0;\n }", "public boolean hasUnderflow() {\r\n\t\t\treturn (data.size() <= 0);\r\n\t\t}", "public boolean isEmpty() {\r\n return (Double.isNaN(x) && Double.isNaN(y));\r\n }", "public boolean isEmpty() {\r\n\tfor (int i = 0; i < this.size; i++) {\r\n\t if (this.territory[0][i] != 0 || this.territory[1][i] != 0) {\r\n\t\treturn false;\r\n\t }\r\n\t}\r\n\r\n\treturn true;\r\n }", "private static boolean allElementsEqual(Mark[] array) {\n\t\t\n\t\tboolean areEqual = true;\n\t\t\n for(int i=0 ; i < array.length; i++) {\n \t\n \t\n \tif (array[i] == null) {\n \t\tareEqual = false;\n \t\tbreak;\n \t}\n \t\n if(!array[0].equals(array[i])) {\n areEqual = false;\n break;\n }\n }\n\n return areEqual;\n }", "public static boolean isEmpty(JSONArray array) {\n return array == null || array.length() == 0;\n }", "public final boolean isNull()\n\t{\n\t\treturn (dataValue == null) && (stream == null) && (_blobValue == null);\n\t}", "private boolean isEmpty( int r, int c ) {\n\treturn matrix[r][c] == null;\n }", "public boolean checkData()\n {\n boolean ok = true;\n int l = -1;\n for(Enumeration<Vector<Double>> iter = data.elements(); iter.hasMoreElements() && ok ;)\n {\n Vector<Double> v = iter.nextElement();\n if(l == -1)\n l = v.size();\n else\n ok = (l == v.size()); \n }\n return ok; \n }", "@Override\n\tpublic Boolean isEnd() {\n\t\tfor (int i = 0;i < grid.length;i++){\n\t\t\tfor (int j = 0;j < grid.length;j++){\n\t\t\t\tif(grid[i][j] == null){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean isEmpty() {\n \n return point2DSET.isEmpty();\n }", "public static boolean arrayEmpty(String[] a) {\n return a == null || a.length == 0;\n }", "boolean isNilConstraints();", "public boolean existsInputMissingValues(){\r\n\t\treturn anyMissingValue[0];\r\n\t}", "public boolean isEmpty()\n\t{\n\t\treturn arraySize == 0;\n\t}", "public boolean isEmpty()\n {\n return ( name == null ) && ( data == null ) && ( notes == null );\n }", "private boolean isEmpty() {return first == null;}", "private boolean testNulls(Fact req, ArrayList<Fact> facts) {\n boolean isNull = req.valueIsNotNull();\n for (Fact fact: facts) if (fact.getName().equals(req.getName())) {\n return isNull;\n }\n return !isNull;\n }", "@Test\r\n\tpublic void getRelatedFieldsArrayEmpty() {\r\n\t\tassertEquals(\"relatedFields should be empty\", 0, testObj.getRelatedFieldsArray().length);\r\n\t}", "public boolean checkIsEmpty() {\n return isEmpty(minimumInstances) && isEmpty(maximumInstances) && isEmpty(dependentProfiles);\n }", "public static boolean isNullOrEmpty(@Nullable Iterable<?> potentiallyNull) {\n return potentiallyNull == null || isEmpty(potentiallyNull);\n }", "public void assertNotEmpty(Object[] objArr) {\n if (objArr == null || objArr.length == 0) {\n throw new IllegalArgumentException(\"Arguments is null or its length is empty\");\n }\n }", "@Test\r\n\tpublic void getNativeFieldsArrayEmpty() {\r\n\t\tassertEquals(\"nativeFields should be empty\", 0, testObj.getNativeFieldsArray().length);\r\n\t}", "public boolean isFull() {\n int size = 0;\n for (int i = 0; i < items.length; i++) {\n if (items[i] != null) {\n size++;\n }\n }\n return size == items.length;\n }", "boolean isNilScansArray(int i);", "private boolean isEmpty() {\n/* 547 */ return (this.filters.isEmpty() && this.maxArrayLength == Long.MAX_VALUE && this.maxDepth == Long.MAX_VALUE && this.maxReferences == Long.MAX_VALUE && this.maxStreamBytes == Long.MAX_VALUE);\n/* */ }", "private void validate(Cacheable[] cache) throws NullPointerException {\n if (cache == null) {\n throw new NullPointerException(\"Cache cannot be null!\");\n }\n\n for (int i = 0; i < cache.length; i++) {\n final Cacheable c = cache[i];\n if (c == null) {\n throw new NullPointerException(String.format(\"A cacheable of the cache array at index %d is null!\", i));\n }\n\n final Serializable[] ss = c.cache();\n if (ss == null) {\n throw new NullPointerException(String.format(\"An array of the cacheable object at index %d is null!\",\n i));\n }\n\n for (int j = 0; j < ss.length; j++) {\n final Serializable s = ss[j];\n if (s == null) {\n throw new NullPointerException(String.format(\"An object at index %d in cacheable %d is null!\"\n , j, i));\n }\n }\n }\n }", "public boolean isEmpty() {\r\n\t\treturn allCardsAreNull(set1) && allCardsAreNull(set2a)\r\n\t\t\t\t&& allCardsAreNull(set2b) && allCardsAreNull(set3a)\r\n\t\t\t\t&& allCardsAreNull(set3b);\r\n\t}", "void isArrayEmpty(ArrayList<UserContactInfo> contactDeatailsList);", "public boolean isEmpty() {\n return points.isEmpty();\n }", "@Test\r\n\tpublic void getRelatedTablesArrayEmpty() {\r\n\t\tassertEquals(\"relatedTables should be empty\", 0, testObj.getRelatedTablesArray().length);\r\n\t}", "public boolean isPracticallyEmpty() {\n\treturn getDimension()==0 ||\n\t getDimension()==1 && id2label.elementAt(0).equals(DUMMY_LABEL);\n }", "@Test\n public void validateArrayIndexIsNull(){\n String[] a = new String[2];\n Validate.validIndex(a,20);\n }", "public boolean isEmptyImage() {\n if (mbarrayImg == null || mbarrayImg.length == 0 || mbarrayImg[0].length == 0 || mnWidth == 0 || mnHeight == 0) {\n return true;\n }\n return false;\n }", "private boolean isEmpty() {\n/* 549 */ return (this.filters.isEmpty() && this.maxArrayLength == Long.MAX_VALUE && this.maxDepth == Long.MAX_VALUE && this.maxReferences == Long.MAX_VALUE && this.maxStreamBytes == Long.MAX_VALUE);\n/* */ }", "public boolean anyNull () ;", "public boolean isEmpty(){\n return first == null;\n }", "public boolean isEmpty(){\n return raiz == null;\n }", "public boolean isEmpty(){\n\t\tfor(int i = 0; i < hashMap.length; i++){\n\t\t\tif(hashMap[i]!=null){\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t\treturn(true);\n\t}", "public boolean isEmpty()\n {\n return ((elements == null) || elements.isEmpty());\n }", "public boolean isEmpty()\r\n\t{\r\n\t\treturn data.size() == 0;\r\n\t}", "private boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "public static boolean isArrayEmpty(Player[] array) {\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (array[i] != Player.EMPTY) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isEmpty() {\r\n\t\tfor (double d : values) {\r\n\t\t\tif (!Double.isNaN(d)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\r\n\t\treturn data.isEmpty();\r\n\t}", "static boolean checkSplitsArray (double[][] splitsArray) { throw new RuntimeException(); }", "@Test\r\n public void test_containNull_True() {\r\n Collection<?> collection = Arrays.asList(new Object[] {1, TestsHelper.EMPTY_STRING, null});\r\n\r\n boolean res = Helper.containNull(collection);\r\n\r\n assertTrue(\"'containNull' should be correct.\", res);\r\n }", "@Test\r\n public void test_containNull_False() {\r\n Collection<?> collection = Arrays.asList(new Object[] {1, TestsHelper.EMPTY_STRING});\r\n\r\n boolean res = Helper.containNull(collection);\r\n\r\n assertFalse(\"'containNull' should be correct.\", res);\r\n }", "public boolean canAdd() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] == null) {\r\n temp++;\r\n }\r\n }\r\n if (temp > 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.7407028", "0.7116774", "0.69554156", "0.6815766", "0.6782189", "0.6574275", "0.65640604", "0.65471154", "0.65221983", "0.651497", "0.64830196", "0.6455924", "0.64379495", "0.64083546", "0.6398787", "0.6376817", "0.63604224", "0.62838364", "0.62705064", "0.6259737", "0.62392056", "0.6226709", "0.6223218", "0.6211569", "0.6188891", "0.61777997", "0.6173732", "0.6152093", "0.6142624", "0.61367023", "0.61345553", "0.61267763", "0.61257726", "0.61175764", "0.6107967", "0.6102477", "0.6094797", "0.6092334", "0.6086122", "0.60779685", "0.6049078", "0.60474575", "0.6045125", "0.60381526", "0.60338205", "0.6031867", "0.60314983", "0.6015506", "0.600934", "0.5983848", "0.5977996", "0.59453267", "0.59436506", "0.5940986", "0.59368885", "0.593623", "0.5931483", "0.59306824", "0.5926608", "0.59259695", "0.5925527", "0.59250057", "0.5918445", "0.59091914", "0.59042156", "0.5893143", "0.58879626", "0.5882803", "0.587384", "0.5871955", "0.58640164", "0.58584994", "0.585663", "0.58483464", "0.58442426", "0.5836238", "0.58331066", "0.5826468", "0.5825941", "0.5823954", "0.5821837", "0.5820425", "0.58143014", "0.58096886", "0.58089125", "0.5802818", "0.58010453", "0.5797017", "0.5795043", "0.57910943", "0.5789358", "0.57833683", "0.57713443", "0.5761222", "0.5759482", "0.57551444", "0.57353705", "0.57340795", "0.5729536", "0.5726695", "0.57235533" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.synonym, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
=========================================================== Getter & Setter ===========================================================
public Orientation getOrientation() { return mOrientation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "@Override\n public void get() {}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "protected abstract Set method_1559();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n void init() {\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void init() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "private void assignment() {\n\n\t\t\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\npublic void setAttributes() {\n\t\n}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void init() {}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void setData() {\n\n\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "public void setdat()\n {\n }", "@Override\n String get();", "private Value() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "String setValue();", "@Override\n\tprotected void getExras() {\n\n\t}", "public String getName () { return this.name; }", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "@Override\n\tprotected void setValueOnUi() {\n\n\t}", "private ReadProperty()\r\n {\r\n\r\n }", "@Override\n protected void getExras() {\n }", "@Override\n public void init() {\n }", "@Override\n protected void updateProperties() {\n }", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void initializeValues() {\n\n\t}", "@Override\n public Object getValue()\n {\n return value;\n }", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "public Object getValue() { return _value; }", "public int\t\tget() { return value; }", "@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 inizializza() {\n\n super.inizializza();\n }", "public Change() {\n // Required for WebServices to work. Comment added to please Sonar.\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void onSetSuccess() {\n }", "@Override\n public void onSetSuccess() {\n }", "public Object get()\n {\n return m_internalValue;\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public int getValue() {\n return super.getValue();\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "@Override\n public void init() {\n\n super.init();\n\n }", "public contrustor(){\r\n\t}", "@Override public void init()\n\t\t{\n\t\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}", "@Override\n public String getName(){\n return Name; \n }", "@Override\n\tprotected void initialize() {\n\n\t}" ]
[ "0.65319645", "0.64282036", "0.64009315", "0.6387676", "0.63788813", "0.6266885", "0.6217548", "0.6172981", "0.6143174", "0.6143174", "0.6134374", "0.6133767", "0.6102565", "0.6064462", "0.60481626", "0.6023258", "0.60172707", "0.60172707", "0.60172707", "0.60172707", "0.60172707", "0.60172707", "0.60167193", "0.60166603", "0.60056233", "0.5997907", "0.59905463", "0.5979431", "0.5974847", "0.5974847", "0.5974847", "0.5974847", "0.5974847", "0.5974847", "0.5973437", "0.596957", "0.5964471", "0.5955932", "0.5954486", "0.5954486", "0.5954486", "0.5935486", "0.5935486", "0.5930335", "0.5925341", "0.5925341", "0.59248185", "0.5923298", "0.5918623", "0.5917456", "0.5917456", "0.59158623", "0.59118277", "0.59082216", "0.59050685", "0.5904994", "0.5891969", "0.5887393", "0.58782727", "0.5867303", "0.5859278", "0.58565265", "0.5856114", "0.5853753", "0.5852483", "0.5845946", "0.5834438", "0.58240193", "0.58203447", "0.58203447", "0.5812869", "0.5811394", "0.581128", "0.580523", "0.580314", "0.57936174", "0.57936174", "0.57936174", "0.57936174", "0.57936174", "0.57924074", "0.5780344", "0.5776346", "0.5776346", "0.5776346", "0.57697743", "0.57697743", "0.57633984", "0.57631785", "0.575941", "0.57571167", "0.57571167", "0.57571167", "0.57550275", "0.57547134", "0.57508075", "0.57458156", "0.5743443", "0.5736338", "0.573416", "0.5723334" ]
0.0
-1
=========================================================== Methods for/from SuperClass/Interfaces ===========================================================
@Override public void setScaleX(final float pScaleX) { super.setScaleX(1f); //scale not allowed on Layout Object }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "@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\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\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 dosomething() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public boolean isInterface() { return false; }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void Interior() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public interface PhrasingContent extends ContentInterface {\r\n\r\n}", "@Override\n\tvoid methodAbstractAndSubclassIsAbstract() {\n\t\t\n\t}", "public void interfaceMethod() {\n\t\tSystem.out.println(\"overriden method from interface\");\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void checkSubclass() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void type() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public interface BaseObject {\n}", "public interface AbstractC1953c50 {\n}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void interfaceMethod() {\n\t\tSystem.out.println(\"childClass - interfaceMethod\");\r\n\t\tSystem.out.println(\"Val of variable from interface: \" + DemoInterface.val );\r\n\t}", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}", "@Override // opcional\n public void init(){\n\n }", "public interface IOverride extends IMeasurement_descriptor{\n\n\tpublic IRI iri();\n\n}", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "public interface BaseItem {\n}", "public interface AbstractC03680oI {\n}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\r\n public String toString() {\n return super.toString();\r\n }", "public interface AbstractC2502fH1 extends IInterface {\n}", "@Override\n public String toString() {\n return (super.toString());\n\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "public InterfaceAbout() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public String toString () {\n return super.toString();\n }", "@Override\n public void init() {}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public interface Position {}", "private interface Base {\n\t\tString getId();\n\t\tvoid setId(String identifier);\n\t\tboolean isValid();\n\t\tvoid setValid(boolean valid);\n\t}", "public void buildSuperInterfacesInfo() {\n\t\twriter.writeSuperInterfacesInfo();\n\t}", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n\t\tpublic void visit(int version, int access, String name, String signature, String superName, String[] interfaces) \n\t\t{\n\t\t\tsuper.visit(version, Constants.ACC_PUBLIC, className, (String)null, this.superType.getInternalName(), interfaces);\n\t\t}", "@Override\r\n public String toString() {\n return super.toString();\r\n }", "@Override\n public void init() {\n\n super.init();\n\n }", "public interface InterfaceB extends SuperInterface{\n\n int getB();\n}" ]
[ "0.6647618", "0.66267765", "0.6450554", "0.6426596", "0.6335329", "0.6322835", "0.6322835", "0.62517524", "0.62289923", "0.6216249", "0.6193892", "0.6193518", "0.6172878", "0.6164457", "0.61408776", "0.613328", "0.6111796", "0.61112046", "0.6110321", "0.6108772", "0.6068662", "0.6067113", "0.6063077", "0.6063077", "0.60598457", "0.6056391", "0.6047876", "0.60390186", "0.60352415", "0.60254276", "0.6022166", "0.6012676", "0.6002371", "0.59999424", "0.59837663", "0.59836084", "0.5981856", "0.59807026", "0.59778", "0.59574354", "0.59459984", "0.59405196", "0.5936032", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59356785", "0.59346783", "0.59276676", "0.59239215", "0.59223956", "0.5903864", "0.5903864", "0.5903864", "0.58940065", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.5891248", "0.58895", "0.5881163", "0.58779144", "0.58696586", "0.5852735", "0.5851859", "0.5851859", "0.5851859", "0.5851221", "0.5848869", "0.5846808", "0.58453983", "0.5840877", "0.5838215", "0.58378327", "0.5837737", "0.5834779", "0.58290005", "0.5823676" ]
0.0
-1
/ 3.Electricity bill is calculated based on below conditions find the actual amount to be paid by the user.Units Cost/Unit 0100 $1 100300 $0.75 300500 $0.50 500> $0.25 Write program to calculate the monthly bill user needs to pay get units consumed from user? cumulative amount
public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter the number of units consumed: "); int units = input.nextInt(); double amount; double totalamt = 0; if (units < 0 || units == 0) { System.out.println("Error! Units consumed should be more than 0"); } else if (units > 0 && units <= 100) { amount = 1; totalamt = amount * units; } else if (units > 100 && units <= 300) { amount = 0.75; totalamt = 100 * 1 + (amount * (units - 100)); } else if (units > 300 && units <= 500) { amount = 0.50; totalamt = 100 * 1 + 200 * 0.75 + (amount * (units - 300)); } else { amount = 0.25; totalamt = 100 * 1 + 200 * 0.75 + 200 * 0.50 + (amount * (units - 500)); } System.out.println("Your monthly bill is: $" + totalamt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calculateBill() {\n\t\tif (unit <= 100) {\r\n\t\t\tbill = unit * 5;\r\n\t\t}else if(unit<=200){\r\n\t\t\tbill=((unit-100)*7+500);\r\n\t\t}else if(unit<=300){\r\n\t\t\tbill=((unit-200)*10+1200);\r\n\t\t}else if(unit>300){\r\n\t\t\tbill=((unit-300)*15+2200);\r\n\t\t}\r\n\t\tSystem.out.println(\"EB amount is :\"+bill);\r\n\t}", "@Test\n public void whenComputingBillForPeopleOver70WithDiagnosisXRayAndECG() {\n double result = billingService.computeBill(1);\n // 90% discount on Diagnosis (60£) = 6\n // 90% discount on X-RAY (150£) = 15\n // 90% discount on ECG (200.40£) = 20.04\n Assert.assertEquals(41.04, result, 0);\n }", "public void calculateCommission(){\r\n commission = (sales) * 0.15;\r\n //A sales Person makes 15% commission on sales\r\n }", "private void calcBills() {\n\t\tint changeDueRemaining = (int) this.changeDue;\n\n\t\tif (changeDueRemaining >= 20) {\n\t\t\tthis.twenty += changeDueRemaining / 20;\n\t\t\tchangeDueRemaining = changeDueRemaining % 20;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.ten += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.five += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.one += changeDueRemaining;\n\t\t}\n\t}", "void calculateReceivableByUIComponent() throws Exception{\t\t\n\t\tdouble receivableAmt = ConvertUtil.convertCTextToNumber(txtDueAmount).doubleValue();\t\n\t\tdouble receiveAmt = chkPayall.isSelected()?ConvertUtil.convertCTextToNumber(txtDueAmount).doubleValue()\n\t\t\t\t:ConvertUtil.convertCTextToNumber(txtReceiptAmount).doubleValue();\n\t\tdouble bfAmt = ConvertUtil.convertCTextToNumber(txtCustomerBF).doubleValue();\n\t\tdouble paidAmt = ConvertUtil.convertCTextToNumber(txtPaidAmount).doubleValue(); \n\t\tdouble cfAmt = bfAmt + receivableAmt - receiveAmt - paidAmt;\t\t\n\t\ttxtReceiptAmount.setText(SystemConfiguration.decfm.format(receiveAmt));\n\t\ttxtCustomerCfAmount.setText(SystemConfiguration.decfm.format(cfAmt));\t\n\t\ttxtReceiptAmount.selectAll();\n\t}", "public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request\r\n }", "private String bulkorderqtycalculation() {\n String strSubtotal = estimatedSubTotalPriceDisplayShoppingCart.getText();\n float intSubtotal = Float.parseFloat(strSubtotal.replaceAll(\"[^0-9.]\", \"\"));\n DecimalFormat df = new DecimalFormat(\"#\");\n String forSubtotal = df.format(intSubtotal);\n int forIntSubtotal = Integer.parseInt(forSubtotal);\n System.out.println(\"=== Subtotal after trimming: \" + forIntSubtotal);\n int reqqty = 0;\n reqqty = (3000 / forIntSubtotal);\n System.out.println(\"=== Qty Require is: \" + reqqty);\n String qtystr = String.valueOf(reqqty);\n return qtystr;\n }", "public void amount() {\n \t\tfloat boxOHamt=boxOH*.65f*48f;\n \t\tSystem.out.printf(boxOH+\" boxes of Oh Henry ($0.65 x 48)= $%4.2f \\n\",boxOHamt);\n \t\tfloat boxCCamt=boxCC*.80f*48f;\n \t\tSystem.out.printf(boxCC+\" boxes of Coffee Crisp ($0.80 x 48)= $%4.2f \\n\", boxCCamt);\n \t\tfloat boxAEamt=boxAE*.60f*48f;\n \t\tSystem.out.printf(boxAE+\" boxes of Aero ($0.60 x 48)= $%4.2f \\n\", boxAEamt);\n \t\tfloat boxSMamt=boxSM*.70f*48f;\n \t\tSystem.out.printf(boxSM+\" boxes of Smarties ($0.70 x 48)= $%4.2f \\n\", boxSMamt);\n \t\tfloat boxCRamt=boxCR*.75f*48f;\n \t\tSystem.out.printf(boxCR+\" boxes of Crunchies ($0.75 x 48)= $%4.2f \\n\",boxCRamt);\n \t\tSystem.out.println(\"----------------------------------------------\");\n \t\t//display the total prices\n \t\tsubtotal=boxOHamt+boxCCamt+boxAEamt+boxSMamt+boxCRamt;\n \t\tSystem.out.printf(\"Sub Total = $%4.2f \\n\", subtotal);\n \t\ttax=subtotal*.07f;\n \t\tSystem.out.printf(\"Tax = $%4.2f \\n\", tax);\n \t\tSystem.out.println(\"==============================================\");\n \t\ttotal=subtotal+tax;\n \t\tSystem.out.printf(\"Amount Due = $%4.2f \\n\", total);\n \t}", "public float calculateTotalFee(){\n int endD = parseInt(endDay);\n int startD = parseInt(startDay);\n int endM = parseInt(convertMonthToDigit(endMonth));\n int startM = parseInt(convertMonthToDigit(startMonth));\n int monthDiff = 0;\n float totalFee = 0;\n //get the stay duration in months\n monthDiff = endM - startM;\n \n System.out.println(\"CALCULATING TOTAL FEE:\");\n \n stayDuration = 1;\n if(monthDiff == 0){ //on the same month\n if(startD == endD){\n stayDuration = 1;\n }else if(startD < endD){ //Same month, diff days\n stayDuration = 1 + (parseInt(endDay) - parseInt(startDay));\n }\n }else if(monthDiff > 0){ //1 month difference\n \n if(startD > endD){ // End day is next month\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ( (31+ parseInt(endDay)) - parseInt(startDay));\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ((30+ parseInt(endDay)) - parseInt(startDay));\n break; \n \n case \"February\": \n stayDuration = 1 + ((29+ parseInt(endDay)) - parseInt(startDay));\n break; \n default:\n break;\n }\n }else if(startD <= endD){ //if end day is greater than start day\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ((parseInt(endDay)) - parseInt(startDay));\n stayDuration += 31;\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ( (parseInt(endDay)) - parseInt(startDay));\n stayDuration += 30;\n break; \n \n case \"February\": \n stayDuration = 1 + ( (parseInt(endDay)) - parseInt(startDay));\n stayDuration += 29;\n break; \n \n default:\n break;\n }\n }\n }else if(monthDiff < 0){\n if(startMonth == \"December\" && endMonth == \"January\"){\n if(startD > endD){ // End day is next month\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ( (31+ parseInt(endDay)) - parseInt(startDay));\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ((30+ parseInt(endDay)) - parseInt(startDay));\n break; \n\n case \"February\": \n stayDuration = 1 + ((29+ parseInt(endDay)) - parseInt(startDay));\n break; \n default:\n break;\n }\n }else{\n stayDuration = 1 + ((parseInt(endDay)) - parseInt(startDay));\n stayDuration += 31;\n }\n }\n }\n \n totalFee = (int) (getSelectedRoomsCounter() * getSelectedRoomPrice());\n totalFee *= stayDuration;\n \n //console log\n System.out.println(\"stayDuration: \"+ stayDuration);\n System.out.println(\"Total Fee: \" + totalFee +\"php\");\n return totalFee;\n }", "public _179._6._235._119.cebwebservice.Bill billing_CalculateDetailMonthlyBill(java.lang.String accessToken, int tariff, int kwh) throws java.rmi.RemoteException;", "private void calcCoins() {\n\t\tint changeDueRemaining = (int) Math.round((this.changeDue - (int) this.changeDue) * 100);\n\n\t\tif (changeDueRemaining >= 25) {\n\t\t\tthis.quarter += changeDueRemaining / 25;\n\t\t\tchangeDueRemaining = changeDueRemaining % 25;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.dime += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.nickel += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.penny += changeDueRemaining / 1;\n\t\t}\n\t}", "private void billing_calculate() {\r\n\r\n // need to search patient before calculating amount due\r\n if (billing_fullNameField.equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"Must search for a patient first!\\nGo to the Search Tab.\",\r\n \"Need to Search Patient\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if (MainGUI.pimsSystem.lookUpAppointmentDate(currentPatient).equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"No Appointment to pay for!\\nGo to Appointment Tab to make one.\",\r\n \"Nothing to pay for\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n // patient has been searched - get info from patient info panel\r\n else {\r\n\r\n currentPatient = MainGUI.pimsSystem.patient_details\r\n (pInfo_lastNameTextField.getText(), Integer.parseInt(pInfo_ssnTextField.getText()));\r\n // patient has a policy, amount due is copay: $50\r\n // no policy, amount due is cost amount\r\n double toPay = MainGUI.pimsSystem.calculate_charge(currentPatient, billing_codeCB.getSelectedItem().toString());\r\n billing_amtDueField.setText(\"$\" + doubleToDecimalString(toPay));\r\n\r\n\r\n\r\n JOptionPane.showMessageDialog(this, \"Amount Due Calculated.\\nClick \\\"Ok\\\" to go to Payment Form\",\r\n \"Calculate\", JOptionPane.DEFAULT_OPTION);\r\n\r\n paymentDialog.setVisible(true);\r\n }\r\n\r\n }", "public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1200;\n\t\telse if (this.materialStandard.equals(\"above standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1500;\n\t\telse if(this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1800;\n\t\telse if (this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == true)\n\t\t\tcostperfeet = 2500;\n\t\t\n\t\tint totalCost = costperfeet * this.totalArea;\n\t\t/*s = \"Total Cost of Construction is :- \";\n\t\twriter.printf(\"%s\" + totalCost, s);\n\t\twriter.flush();*/\n\t\tlog.log(Level.INFO, \"Total Cost of Construction is :- \" + totalCost);\n\t}", "public static void main(String[] args) {\n Scanner Keyboard = new Scanner(System.in);\r\n System.out.println(\"how many sof u wnt to purchase\");\r\n int numSoftware =Keyboard.nextInt();\r\n double discount=0;\r\n if(numSoftware >=10 &&numSoftware<=19){\r\n\t discount=0.20;\r\n }\r\n else if (numSoftware>=20 &&numSoftware<=49){\r\n\t discount=0.30;\r\n }\r\n else if (numSoftware>=50 &&numSoftware<=99){\r\n\t discount=0.40;\r\n }\r\n else if (numSoftware>=100){\r\n\t discount=0.50;\r\n }\r\n double subtotal =99*numSoftware;\r\n double discountAmount=subtotal*discount;\r\n double finalAmount=subtotal-discountAmount;\r\n \r\n System.out.println(\"subtotal:$\"+subtotal);\r\n System.out.println(\"discount percent:$\"+discount*100+\"%\");\r\n System.out.println(\"discountAmount:$\"+discountAmount);\r\n \r\n System.out.println(\"finalAmount:$\"+finalAmount);\r\n //System.out.printf(\"finalAmount:$%.2f\",finalAmount);\r\n \r\n \r\n //rounded to 2 decimal points\r\n System.out.printf(\"final price:%.2f\",finalAmount);\r\n \r\n \r\n \r\n \r\n \r\n // string formatting\r\n \r\n\t}", "BigDecimal calculateDailyIncome(List<Instruction> instructions);", "public static void main(String[] args) {\n\t\t\n\t\tdouble check,servicefee;\n\t\tcheck=40;\n\t\tservicefee=1000;\n\t\t\n\t\tif (check<20 && check>=0) {\n\t\t\tservicefee=10+(0.1*check);\n\t\t}else if(check>=20 && check<40) {\n\t\t\tservicefee=10+(0.08*check);\n\t\t}else if(check>=40 && check<60) {\n\t\t\tservicefee=10+(0.06*check);\n\t\t}else if(check>=60) {\n\t\t\tservicefee=10+(0.04*check);\n\t\t}else {\n\t\t\tSystem.out.println(\"Invalid Operator\");\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"You use \" + check + \" check\\nYour monthly service fee is $\" + servicefee);\n\t\t\n\t\t\n\t\t\n\t}", "public double calculateCost(Purchase purchase);", "private double requestCashPayment(double total) {\n double paid = 0;\n while (paid < total) {\n double entered = ScannerHelper.getDoubleInput(\"Enter amount paid: \", 0);\n paid += entered;\n System.out.printf(\"Accepted $%.2f in cash, Remaining amount to pay: $%.2f\\n\", entered, (total - paid >= 0) ? total - paid : 0);\n }\n return paid;\n }", "public void determineWeeklyPay(){\r\n weeklyPay = commission*sales;\r\n }", "public void cal_AdjustedFuelMoist(){\r\n\tADFM=0.9*FFM+0.5+9.5*Math.exp(-BUO/50);\r\n}", "BigDecimal getCommission( String officeCode );", "public static void main(String[]args){\n\t\n\tdouble budget =500;\n\t\n\tdouble phone =250.0;\n\tdouble watch =105.5;\n\tdouble bag = 80.00;\n\t\n\t\n\tif(budget< 80.0) {\n\t\tSystem.out.println(\"Cannot buy anything\");\n\t\t\n\t}if (budget >=435.5) {\n\t\tSystem.out.println(\"You can buy all items\");\n\t\n\t\t\n\t} else if (budget >= phone + watch) {\n\t\tSystem.out.println(\"You can buy Phone +Watch OR Phone + Bag OR watch + Bag\");\n\t\t\n\t} else if (budget >= phone +bag); {\n\t\tSystem.out.println(\"You can buy Phone OR watch + bag\");\n\t\t\t\t\n\t if (budget >= watch) {\n\t\tSystem.out.println(\"You can buy a watch or a bag\");\n\t\t\n\t} else {\n\t\tSystem.out.println(\"You can buy a bag\");}\n\t\n\t}\n\t}", "public double getCharges()\r\n {\r\n //variables\r\n double charges = 0.0;\r\n double parts = 0.0;\r\n double hours = 0.0;\r\n\r\n //get user input and change double\r\n parts = Double.parseDouble(chargeField.getText());\r\n hours = Double.parseDouble(hourField.getText());\r\n\r\n //math for charges\r\n charges = hours * LABOR_RATE + parts;\r\n return charges;\r\n }", "public BigDecimal getBSCA_ProfitPriceLimitEntered();", "public int calculateBill() {\n\t\treturn chargeVehicle(); \n\t}", "public double getCEMENTAmount();", "public static void main(String[] args) {\n final byte MONTHS_IN_YEAR = 12;\n final byte PRECENT = 100;\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Welcome to your mortgage calculator. \\nPlease type in the information...\");\n\n//// Method 1\n// System.out.print(\"principal ($1K - $1M): \");\n// int principal = scanner.nextInt();\n// while (principal < 1000 || principal > 1_000_000){\n// System.out.println(\"Enter a number between 1,000 and 1,000,000.\");\n// System.out.print(\"principal ($1K - $1M): \");\n// principal = scanner.nextInt();\n// // can use while true + a if break condition here\n// // notice you need to init principal either way.\n// // otherwise it will only be available inside the {} block\n// }\n//// Method 2\n int principal = 0;\n while(true){\n System.out.print(\"principal ($1K - $1M): \");\n principal = scanner.nextInt();\n if (principal >= 1_000 && principal <= 1_000_000)\n break;\n System.out.println(\"Enter a number between 1,000 and 1,000,000.\");\n }\n\n System.out.print(\"Annual Interest Rate (0-30) in percentage: \");\n float annualInterestRate = scanner.nextFloat();\n while (annualInterestRate<0 || annualInterestRate>30){\n System.out.println(\"Enter a value between 0 and 30\");\n System.out.print(\"Annual Interest Rate (0-30) in percentage: \");\n annualInterestRate = scanner.nextFloat();\n }\n float monthInterestRate = annualInterestRate / PRECENT / MONTHS_IN_YEAR;\n\n System.out.print(\"Period (years): \");\n int years = scanner.nextInt();\n while (years < 1 || years > 30){\n System.out.println(\"Enter a value between 1 and 30\");\n System.out.print(\"Period (years): \");\n years = scanner.nextInt();\n }\n int numberOfPayment = years * MONTHS_IN_YEAR;\n double mortgage = principal\n * (monthInterestRate * Math.pow(1+monthInterestRate, numberOfPayment))\n / (Math.pow(1+monthInterestRate, numberOfPayment) - 1);\n String mortgageFormatted = NumberFormat.getCurrencyInstance().format(mortgage);\n System.out.println(\"Mortgage: \" + mortgageFormatted);\n }", "public static void main(String[] args) {\n Scanner kb = new Scanner(System.in);\n System.out.print(\"Enter investment amount: \");\n double amountInvested = kb.nextDouble();\n System.out.print(\"Enter the annual interest rate in percentage: \");\n double annualInterestRate = kb.nextDouble();\n double monthlyInterestRate = (annualInterestRate / 100) / 12;\n System.out.print(\"Enter the number of years: \");\n int numberOfYears = kb.nextInt();\n\n //Calculate future investment value w/ given formula\n double futureInvestmentValue = amountInvested \n * Math.pow(1 + monthlyInterestRate, numberOfYears * 12);\n\n //Display resulting future investment amount on the console\n System.out.println(\"Accumulated value is $\" \n + (int)(futureInvestmentValue * 100) / 100.0);\n\n }", "void calculate() {\n if (price <= 1000)\n price = price - (price * 2 / 100);\n else if (price > 1000 && price <= 3000)\n price = price - (price * 10 / 100);\n else\n price = price - (price * 15 / 100);\n }", "public static void main(String[] args) {\n var balance = MoneyRound.roundToXPlaces(sayThenGetDouble(\"What is your balance? \"),\n PRECISION_TO_ROUND_TO);\n //Then, do the same with the APR and monthly payment. (Divided APR when first gotten)\n var apr = sayThenGetDouble(\"What is the APR on the card (as a percent)? \") / DOUBLE_TO_PERCENT_DIVISOR;\n var monthlyPayment = MoneyRound.roundToXPlaces(\n sayThenGetDouble(\"What is the monthly payment you can make? \"), PRECISION_TO_ROUND_TO);\n System.out.print(\"\\n\");\n //Newline here for better text formatting.\n //Then, call calculateMonthsUntilPaidOff from the PaymentCalculator class.\n var payCalc = new PaymentCalculator(apr, balance, monthlyPayment);\n var monthsUntilPaidOff = payCalc.calculateMonthsUntilPaidOff();\n //Finally, return the amount of months until the card is paid off.\n System.out.println(\"It will take you \" + monthsUntilPaidOff + \" months to pay off this card.\");\n\n\n }", "public void generateBill(){\n System.out.println(\" Supermercado la 33 \");\n System.out.println(getName());\n System.out.println(getId());\n System.out.println(LocalDate.now() + \" -- \" +LocalTime.now());\n //System.out.println(\"Cantidad Denominacion nombre precio \");\n for (int i=0; i<bill.getProducts().size(); i++){\n Product temporal = bill.getProducts().get(i);\n System.out.println(temporal.getAvailableQuantity().getAmount() + \" \" + temporal.getAvailableQuantity().getProductDenomination() + \" \"\n + temporal.getName() + \" \" + temporal.getAvailableQuantity().getAmount() * temporal.getPrice());\n }\n System.out.println(\"Total : \" + bill.calculateTotal());\n System.out.println(\" Gracias por su compra vuelva pronto \");\n\n }", "public void totalBill(){\r\n\t\tint numOfItems = ItemsList.size();\r\n\t\t\r\n\t\tBigDecimal runningSum = new BigDecimal(\"0\");\r\n\t\tBigDecimal runningTaxSum = new BigDecimal(\"0\");\r\n\t\t\r\n\t\tfor(int i = 0;i<numOfItems;i++){\r\n\t\t\t\r\n\t\t\trunningTaxSum = BigDecimal.valueOf(0);\r\n\t\t\t\r\n\t\t\tBigDecimal totalBeforeTax = new BigDecimal(String.valueOf(this.ItemsList.get(i).getPrice()));\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(totalBeforeTax);\r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isSalesTaxable()){\r\n\t\t\t\r\n\t\t\t BigDecimal salesTaxPercent = new BigDecimal(\".10\");\r\n\t\t\t BigDecimal salesTax = salesTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t salesTax = round(salesTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(salesTax);\r\n\t\t\t \r\n \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isImportedTaxable()){\r\n\r\n\t\t\t BigDecimal importTaxPercent = new BigDecimal(\".05\");\r\n\t\t\t BigDecimal importTax = importTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t importTax = round(importTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(importTax);\r\n\t\t\t \r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tItemsList.get(i).setPrice(runningTaxSum.floatValue() + ItemsList.get(i).getPrice());\r\n\t\t\r\n\t\t\ttaxTotal += runningTaxSum.doubleValue();\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(runningTaxSum);\r\n\t\t}\r\n\t\t\ttaxTotal = roundTwoDecimals(taxTotal);\r\n\t\t\ttotal = runningSum.doubleValue();\r\n\t}", "double getTotal_Discount(int job_ID, int customer_acc_no);", "public static void main(String[] args) {\n\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.printf(\"Enter the initial deposit amount: \");\n\t\tdouble amount = input.nextDouble();\n\t\t\n\t\tSystem.out.printf(\"Enter annual percentage yield: \");\n\t\tdouble rate = input.nextDouble();\n\t\tdouble monthlyRate = rate / 1200.0;\n\t\t\n\t\tSystem.out.printf(\"Enter maturity period (number of months): \");\n\t\tint month = input.nextInt();\n\t\t\n\t\tdouble sum = 0.0;\n\t\tsum = amount;\n\t\t\n\t\tSystem.out.printf(\"\\nMonth\\t\\tCD Value\\n\");\n\t\tint i;\n\t\tfor (i = 1;i <= month;i++) {\n\t\t\tsum = sum * (1 + monthlyRate);\n\t\t\tSystem.out.printf(\"%d\\t\\t%.2f\\n\", i, sum);\n\t\t}\n\n\t}", "public abstract void msgComputeBill(String choice, Customer c, Waiter w, int tableNumber, Map<String, Double> menu);", "@Override\n public double getTotalCommission() {\n double cost = 0.0;\n //increase cost for each report in the order\n for (Report report : reports.keySet()) {\n //report cost depends on the WorkType\n //audits are not capped by max employee count\n //regular orders are limited by max employee count\n int employeeCount = reports.get(report);\n cost += workType.calculateReportCost(report, employeeCount);\n }\n //increase cost of order based on priority\n //critical orders increase based on their critical loading\n //regular orders don't have an effect\n cost = priorityType.loadCost(cost);\n return cost;\n }", "@Override\r\n\tpublic BigDecimal calculateFinalBill(BillingContext billingContext) {\n\t Discount discount = new Slab3Discount(new Slab2Discount(new Slab1Discount(new NoDiscount())));\r\n\t\treturn billingContext.getBillAmount().subtract((discount.calculate(billingContext.getBillAmount())));\r\n\t}", "public Masary_Error CheckBillType(String BTC, double CusAmount, String CustId, double serv_balance, double masry_balance, double billamount, double fees, Main_Provider provider, double deductedAmount) {\n Masary_Error Status = new Masary_Error();\n try {\n Masary_Bill_Type bill_type = MasaryManager.getInstance().getBTC(BTC);\n double trunccusamount = Math.floor(CusAmount);\n// double deductedAmount = MasaryManager.getInstance().GetDeductedAmount(Integer.parseInt(CustId), Integer.parseInt(BTC), CusAmount, provider.getPROVIDER_ID());\n if ((deductedAmount > serv_balance) || deductedAmount == -1) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-501\", provider);\n } else if (!bill_type.isIS_PART_ACC() && CusAmount < billamount) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-502\", provider);\n } else if (!bill_type.isIS_OVER_ACC() && CusAmount > billamount && billamount != 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-503\", provider);\n } else if (!bill_type.isIS_ADV_ACC() && billamount == 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-504\", provider);\n } else if (!bill_type.isIS_FRAC_ACC() && (CusAmount - trunccusamount) > 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-505\", provider);\n } else if ((CusAmount > masry_balance) || deductedAmount == -2 || deductedAmount == -3 || deductedAmount == -4) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-506\", provider);\n } else {\n Status = MasaryManager.getInstance().GETMasary_Error(\"200\", provider);\n }\n } catch (Exception ex) {\n\n MasaryManager.logger.error(\"Exception \" + ex.getMessage(), ex);\n }\n\n return Status;\n }", "private String money() {\r\n\t\tint[] m =tile.getAgentMoney();\r\n\t\tString out =\"Agent Money: \\n\";\r\n\t\tint total=0;\r\n\t\tint square=(int)Math.sqrt(m.length);\r\n\t\tif(square*square<m.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<m.length;) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<m.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%8s\", m[i]+\"\"));\r\n\t\t\t\t\ttotal=total+m[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tj=square;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout=out.concat(\"\\n\");\r\n\t\t}\r\n\t\tout=out.concat(\"Agent Total: \"+total);\r\n\t\tint companyTotal=0;\r\n\t\tout=out.concat(\"\\n\\nCompany Money: \\n\");\r\n\t\tm=tile.getCompanyMoney();\r\n\t\tsquare=(int)Math.sqrt(m.length);\r\n\t\tif(square*square<m.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<m.length;) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<m.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%8s\", m[i]));\r\n\t\t\t\t\tcompanyTotal=companyTotal+m[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tj=square;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout=out.concat(\"\\n\");\r\n\t\t}\r\n\t\tout=out.concat(\"Company Total: \"+companyTotal);\r\n\t\tout=out.concat(\"\\nTotal total: \"+(total+companyTotal));\r\n\t\tif(total+companyTotal!=tile.getPeopleSize()*tile.getAverageMoney()) {\r\n\t\t\tSTART=false;\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "public void DeductCharges () {\r\n\r\n\t\tdouble Temp = 0;\r\n\r\n\t\tfor ( Map.Entry<String, Double> CA : _ChargeAmounts.entrySet() ) {\r\n\r\n\t\t\tTemp += CA.getValue();;\r\n\r\n\t\t}\r\n\r\n\t\t_MonthlyChargeAmounts.put( _Tick.getMonthNumber(), Temp );\r\n\r\n\t\t_FundValue -= Temp;\r\n\r\n\t\tSystem.out.println( \"\\t\\t\\t \" + _Name + \" After Charges : \" + _FundValue );\r\n\t}", "public static void main(String[] args) {\nScanner s=new Scanner(System.in);\nSystem.out.println(\"Enter the name\");\nString name=s.nextLine();\nSystem.out.println(\"Enter the address\");\nString address=s.nextLine();\nSystem.out.println(\"Number of room\");\nint room=s.nextInt();\nSystem.out.println(\"Number of persons\");\nint persons=s.nextInt();\nSystem.out.println(\"AC OR Non-AC\");\nString ac=s.next();\nSystem.out.println(\"Booking Date\");\nString booking=s.next();\nSystem.out.println(\"Checkout Date\");\nString checkout=s.next();\nLocalDate ds=LocalDate.parse(booking);\nLocalDate de=LocalDate.parse(checkout);\nlong total=ChronoUnit.DAYS.between(ds, de);\nlong total=0;int p=(person%2);\nSystem.out.println(\"Reg-Details: \");\nSystem.out.println(\"Name : \"+name);\nSystem.out.println(\"Address : \"+address);\nSystem.out.println(\"No.of rooms : \"+room);\nSystem.out.println(\"No.of.Guest : \"+persons);\nint ac_amount=0,flag=0;\nif(ac.equals(\"AC\"))\n{\n\tac_amount=100;\n\tflag=1;\n}\n\t\nelse\n{\n\tac_amount=0;\n\tflag=0;\n}\nif(flag==1)\n\tSystem.out.println(\"AC :Yes\");\nelse\n\tSystem.out.println(\"AC :No\");\n\n\n\nint rent=500,flag1=0;;\n\nif(persons==(room*2)+1)\n{\n\t\n\tint amount=(int)((500+ac_amount)*(persons*total))+250;\n\tSystem.out.print(\"Amount :\"+amount);\n}\n\t\nelse\n{\n\tint amount=(int)((500+ac_amount)*(persons*total));\n\tSystem.out.print(\"Amount :\"+amount);\n\t\n\t}\n\n}", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n final byte PERCENT = 100;\n final byte MONTHS_IN_YEAR = 12;\n\n int principal = getPrincipal(scanner);\n\n float annualRate = getAnnualRate(scanner);\n float monthlyRate = annualRate / PERCENT / MONTHS_IN_YEAR;\n\n byte years = getYears(scanner);\n int numberOfPayments = years * MONTHS_IN_YEAR;\n \n String mortgage = calculateMortgage(\n principal, \n monthlyRate, \n numberOfPayments\n );\n\n String paymentSchedule = calculateSchedule(\n principal,\n monthlyRate,\n numberOfPayments\n );\n\n System.out.println(createMsg(\"MORTGAGE\", mortgage));\n System.out.println(createMsg(\"BREAKDOWN\", paymentSchedule));\n\n scanner.close();\n \n //NOTES\n\n // byte = 1 = [-128, 127]\n // short = 2 = [-32k, 32k]\n // int = 4 = [-2b, 2b]\n // long = 8 => even larger than 2b\n // float = 4 => decimals\n // double = 8 => larger decimals\n // char = 2 = [A,B,C,...]\n // boolean = 1 = [true/false]\n\n // reference types are tricky\n // be sure to remember that a refernece is being assigned to a variable. So if a variable is being assigned to another, it's reference is being assigned and the data changed to one of the variables will affect all the varaibles using the reference type\n\n // to print data in an array you need the Arrays package and use Arrays.toString(arrayName) and Arrays.deepToString(arrayName) for Mulit-deminsional arrays\n\n // implicit casting = automatic casting by Java\n // byte => short => int => long => float => double\n // happens when no chance of data lose\n\n // explicit casting\n // double x = 1.1;\n // int y = (int)x + 2;\n // by (int)x we are explicitly converting the x variable into an integer from a double\n\n // to convert a string number to a number you must use the correct wrapper class and then it's method parse\"wrapperClassNameHere\"(value)\n }", "@Test\n public void computeFactor_SummerTimeMonth() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-01-13 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-04-25 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-01-01 00:00:00\", \"2012-05-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.MONTH,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(4, factor, 0);\n }", "public double calculateCommissionTest() {\n\t\tCommission commission = new Commission(lockPrice, stockPrice, barrelPrice);\n\t\tcommission.processNewSale(locks, stocks, barrels);\n\t\tcommission.calculateSales();\n\t\treturn commission.calculateCommission();\n\t}", "public static void main(String[] args)\n {\n final String DISPLAYMESSAGE = \"Please enter your account number (int), account type (char), minimum balance, and current balance: \";\n \n final double SAVINGSINTREST = 0.04;\n final double CHECKINGSERVICEFEE = 25;\n final double SAVINGSSERVICEFEE = 10;\n double minimumBalance, currentBalance, checkingIntrestRate, serviceCharge;\n \n int accountNumber;\n \n char accountType;\n \n boolean checking = false;\n boolean savings = true;\n boolean applyFee = false;\n \n checkingIntrestRate = 0;\n \n //\n Scanner accountInfo = new Scanner(System.in);\n \n System.out.println(DISPLAYMESSAGE);\n accountNumber = accountInfo.nextInt();\n accountType = accountInfo.next().charAt(0);\n accountType = Character.toLowerCase(accountType);\n minimumBalance = accountInfo.nextDouble();\n currentBalance = accountInfo.nextDouble();\n //System.out.printf(\"Account Number: %0d\", accountNumber);\n \n // \n switch (accountType)\n {\n case 'c':\n checking = true;\n System.out.println(\"Account Number: \" + accountNumber);\n System.out.println(\"Account type: \" + accountType);\n \n\n if ((minimumBalance + 5000) > currentBalance)\n {\n checkingIntrestRate = 0.03;\n System.out.printf(\"You have earned $%.2f intrest on your account%n\", (currentBalance * checkingIntrestRate));\n currentBalance = currentBalance + (currentBalance * checkingIntrestRate);\n \n }\n else\n {\n checkingIntrestRate = 0.05;\n System.out.printf(\"You have earned $%.2f intrest on your account%n\", (currentBalance * checkingIntrestRate));\n currentBalance = currentBalance + (currentBalance * checkingIntrestRate);\n }\n \n break;\n \n case 's':\n savings = true;\n System.out.println(\"Account Number: \" + accountNumber);\n System.out.println(\"Account type: \" + accountType);\n System.out.printf(\"You have earned $%.2f intrest on your account%n\", (currentBalance * SAVINGSINTREST));\n currentBalance = currentBalance + (currentBalance * SAVINGSINTREST);\n\n\n break;\n \n default:\n System.out.println(\"Invalid account type!\");\n \n }\n \n if (minimumBalance > currentBalance)\n { \n if (accountType == 'c')\n {\n System.out.printf(\"Your account balance has fallen below the $%.0f minimum balance %n\", minimumBalance);\n System.out.printf(\"You have been charged a $%.2f Service Fee %n\", CHECKINGSERVICEFEE);\n currentBalance = (currentBalance - CHECKINGSERVICEFEE);\n System.out.printf(\"Your current balance is $%.2f%n\", currentBalance);\n \n }\n else\n {\n System.out.printf(\"Your account balance has fallen below the $%.0f minimum balance %n\", minimumBalance);\n System.out.printf(\"You have been charged a $%.2f Service Fee %n\", SAVINGSSERVICEFEE);\n currentBalance = (currentBalance - SAVINGSSERVICEFEE);\n System.out.printf(\"Your current balance is $%.2f%n\", currentBalance);\n }\n }\n \n \n \n \n }", "double calculateDeliveryCost(Cart cart);", "@Test\n public void shouldCalculatePaymentWhen24MonthsIsSelected() {\n\n\n //1. Select '24'\n //2. Enter 7 in the Interest Rate field\n //3. Enter 25000 in the Price field.\n //4. Enter 1500 in the Down Payment Field.\n //5. Inter 3000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $945 / month for 24 months at 7.0%.\n\n\n //1. Select '36'\n //2. Enter 4 in the Interest Rate field\n //3. Enter 35000 in the Price field.\n //4. Enter 2500 in the Down Payment Field.\n //5. Inter 2000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $919 / month for 36 months at 4.0%.\n\n\n //1. Select '48'\n //2. Enter 5 in the Interest Rate field\n //3. Enter 45000 in the Price field.\n //4. Enter 3500 in the Down Payment Field.\n //5. Inter 3000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $901 / month for 48 months at 5.0%.\n\n\n //1. Select '60'\n //2. Enter 6 in the Interest Rate field\n //3. Enter 55000 in the Price field.\n //4. Enter 4500 in the Down Payment Field.\n //5. Inter 4000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $911 / month for 60 months at 6.0%.\n\n\n //1. Select '72'\n //2. Enter 8 in the Interest Rate field\n //3. Enter 65000 in the Price field.\n //4. Enter 5500 in the Down Payment Field.\n //5. Inter 5000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $966 / month for 72 months at 8.0%.\n\n\n }", "public static void main(String[] args) throws IOException {\n InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n BufferedReader in = new BufferedReader(reader);\n String line;\n while ((line = in.readLine()) != null) {\n \n List<String> InputStringList = Arrays.asList(line.split(\"~\"));\n double total_amount = Double.parseDouble(InputStringList.get(0));\n double total_years = Double.parseDouble(InputStringList.get(1));\n double annual_interest_rate = Double.parseDouble(InputStringList.get(2));\n double down_payment = Double.parseDouble(InputStringList.get(3));\n\n double total_months = total_years*12;\n double monthly_interest_rate = annual_interest_rate/(100*12);\n double monthly_payment = (monthly_interest_rate*(total_amount-down_payment))/(1-Math.pow(1+monthly_interest_rate,-(total_years*12)));\n double total_payback = monthly_payment*total_months;\n double interst_payment = total_payback-total_amount+down_payment;\n \n double round_mp_to_2dp = Math.round(monthly_payment*100.0)/100.0;\n long round_ip = Math.round(interst_payment);\n System.out.println(\"$\"+round_mp_to_2dp+\"~$\"+round_ip);\n }\n }", "@Override\n\tpublic void calculate() {\n\t\tSystem.out.println(\"Military credit calculated\");\n\t}", "public static void main(String[] args)\n {\n Scanner input = new Scanner(System.in);\n System.out.println(\"Your name please\");\n String name = input.nextLine();\n\n // get a number from the user\n System.out.println(\"Give me the amount of money in cents please, \" + name);\n int money = input.nextInt();\n \n // limit the size of the number\n while(money>100000000)\n {\n\tSystem.out.println(\"This number is too big.\");\n\tSystem.out.println(\"Please enter something smaller\");\n\tmoney = input.nextInt();\n }\n \n // do the calculations\n\n int hundreds = money / 10000;\n int leftover = money % 10000;\n\n int fifties = leftover / 5000;\n leftover = leftover % 5000;\n\n int twenties = leftover / 2000;\n leftover = leftover % 2000;\n\n int tens = leftover / 1000;\n leftover = leftover % 1000;\n\n int fives = leftover / 500;\n leftover = leftover % 500;\n\n int ones = leftover / 100;\n leftover = leftover % 100;\n\n int quarters = leftover / 25;\n leftover = leftover % 25;\n\n int dimes = leftover / 10;\n leftover = leftover % 10;\n\n int nickels = leftover / 5;\n leftover = leftover % 5;\n\n int pennies = leftover / 1;\n\n // print the results\n System.out.println(\"\"); System.out.println(\"\"); //formating for results\n\n System.out.println(\"******Dollar Bills******\"); //This is printout of dollar bills \n System.out.print(hundreds + \" Hundred dollar bill(s), \");\n System.out.print(fifties + \" Fifty dollar bill(s), \");\n System.out.print(twenties + \" Twenty dollar bill(s), \"); \n System.out.print(tens + \" Ten dollar bill(s), \");\n System.out.print(fives + \" Five dollar bill(s), \");\n System.out.print(ones + \" One dollar bill(s)\");\n \n System.out.println(\"\"); System.out.println(\"\"); \n\n System.out.println(\"******Coins******\"); //This will printout coins \n System.out.print(quarters + \" Quarter(s), \");\n System.out.print(dimes + \" Dime(s), \");\n System.out.print(nickels + \" Nickel(s), \");\n System.out.print(pennies + \" Penny(s)\");\n\n System.out.println(\"\"); //formating for results2\n\n }", "public abstract double calculateQuarterlyFees();", "double getTotalCost();", "public static BigDecimal calcTotalMoney()\n {\n SharedPreferences defaultSP;\n defaultSP = PreferenceManager.getDefaultSharedPreferences(MainActivity.mActivity);\n manualTime = Integer.valueOf(defaultSP.getString(\"moneyMode\", \"4\"));\n boolean plus = PolyApplication.plus;\n PolyApplication app = ((PolyApplication) MainActivity.mActivity.getApplication());\n\n if(!plus)\n {\n\n if (manualTime == 4 && app.user.getMeals() > 0)\n {\n today.setToNow();\n int minutes = (today.hour * 60) + today.minute;\n if (minutes >= 420 && minutes <= 599)\n {\n money = mealWorth[0];\n } else if (minutes >= 600 && minutes <= 1019)\n {\n money = mealWorth[1];\n } else if (minutes >= 1020 && minutes <= 1214)\n {\n money = mealWorth[2];\n } else\n {\n money = mealWorth[3];\n }\n return money.subtract(moneySpent).setScale(2);\n } else if(app.user.getMeals() > 0)\n {\n return mealWorth[manualTime].subtract(moneySpent).setScale(2);\n }\n else\n {\n return new BigDecimal(0.00).subtract(moneySpent).setScale(2);\n }\n }\n else\n {\n return ((PolyApplication) MainActivity.mActivity.getApplication()).user.getPlusDollars().subtract(moneySpent);\n }\n }", "public static void main(String[] args) {\n int desposit=50;\n double interest=(50*0.005);\n double totalamount=desposit+interest;\n \n System.out.print(\"Total balance after the year is \");\n \n System.out.print(totalamount*12);\n System.out.println(\" Kyat\");\n\t}", "public void calculateEndPrice(int TotalPrice, int Discount) {\n\n }", "public static double calcMonthlyPayment(int term, double amount, double rate)\r\n {\r\n // Your code goes here ... use cut and paste as much as possible!\r\n rate = rate / 100;\r\n double num1 = rate * (Math.pow((1 + rate), (term * 12)));\r\n double num2 = Math.pow((1 + rate), (term * 12)) - 1;\r\n double monthlyPayment = amount * (num1 / num2);\r\n return monthlyPayment;\r\n }", "public String calcTotalPaymentsAndCredits(String withholding, String EIC){\n BigDecimal withHoldings = new BigDecimal(withholding);\n BigDecimal calculatedEIC = new BigDecimal(EIC);\n BigDecimal totalPaymentsAndCredits = withHoldings.add(calculatedEIC);\n totalPaymentsAndCredits = totalPaymentsAndCredits.setScale(0, RoundingMode.HALF_UP);\n \n return totalPaymentsAndCredits.toPlainString();\n }", "public void calculateMonthBills() {\r\n\t\tdouble sum = 0;\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\r\n\t\t\tsum += invoiceInfo[i].getAmount();\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\\nTotal monthly bills: \" + sum);\r\n\t}", "public static void main(String[] args) {\n\r\n int cent = 200;\r\n\r\n // you have purchase candle for 74 cent, what would be your remainder\r\n\r\n cent -= 74 ; // 126 cent\r\n\r\n int quarter = cent / 25 ; // 126/25---->\r\n int penny = cent % 25; //126%25 ---> 1 is remaining\r\n\r\n System.out.println(quarter);\r\n System.out.println(penny);\r\n\r\n int dime= cent / 10 ; // 126 / 10 --->12\r\n // how much penny I have after getting dime 126 %10---->6\r\n int penny2 = cent % 10 ; //---->6\r\n System.out.println(dime);\r\n System.out.println(penny2);\r\n\r\n\r\n\r\n }", "@Override\n\tpublic Double discountsAppliedOnTotalBill(Double billCost) {\n\t\tlogger.info(\"Bill Amount Beofre Final Discount is : \" + billCost);\n\t\t// Logic For Decreasing 5 for each 100\n\t\tretailCustomerUserBill.setTotalBillCost(billCost - Math.floor(Math.floor(billCost) / 100) * 5);\n\t\tlogger.info(\"Bill Amount After Final Discount is : \" + retailCustomerUserBill.getTotalBillCost());\n\t\treturn retailCustomerUserBill.getTotalBillCost();\n\t}", "public double calcTotal(){\n\t\tdouble total; // amount to be returned\n\t\t\n\t\t// add .50 cents for any milk that isn't whole or skim, and .35 cents for flavoring\n\t\tif ((milk != \"whole\" && milk != \"skim\") && flavor != \"no\"){\n\t\t\tcost += 0.85;\t\n\t\t}\n\t\t\n\t\t// add .35 cents for flavoring\n\t\telse if (flavor != \"no\"){\n\t\t\tcost += 0.35;\t\n\t\t}\n\t\t\n\t\t// add .50 cents for milk that isn't whole or skim\n\t\telse if (milk != \"whole\" && milk != \"skim\"){\n\t\t\tcost += 0.50;\n\t\t}\n\t\t\n\t\telse{\n\t\t}\n\t\t\n\t\t// add .50 cents for extra shot of espresso\n\t\tif (extraShot != false){\n\t\t\ttotal = cost + 0.50;\n\t\t}\n\t\telse\n\t\t\ttotal = cost;\n\t\t\n\t\treturn total;\n\t}", "public void processBills() {\r\n \r\n System.out.printf(\"%nHow many bills are there to process? \");\r\n int numBills = input.nextInt(); //local variable captures int from user.\r\n \r\n cableBills = new Invoice[numBills];\r\n billingStmts = new String[numBills];\r\n \r\n for(int i=0; i < numBills; i++) {\r\n cableBills[i] = new Invoice();\r\n cableBills[i].setCustNm(i);\r\n cableBills[i].determineCableSrv(i);\r\n cableBills[i].setMoviesPurchased(i);\r\n \r\n double total = cableBills[i].getMoviePurchased() + cableBills[i].getCableSrv(); //local variable calculates the total/\r\n double movieCharges = cableBills[i].getMoviePurchased(); //local variable calculates the movie charges.\r\n \r\n billingStmts[i] = String.format(\"%nCustomer: %S\"\r\n + \"%n%nCable Service: %20c%,10.2f\"\r\n + \"%nMovies-On-Demand-HD: %14c%,10.2f\"\r\n + \"%n%nTOTAL DUE: %24c%,10.2f%n\",\r\n cableBills[i].getCustNm(), '$',\r\n cableBills[i].getCableSrv(), ' ', movieCharges, '$', total);\r\n }\r\n }", "int main()\n{\n int units,r;\n cin>>units;\n if (units<=200) {\n r=units*0.5;\n cout<<\"Rs.\"<<r;\n }\n else if (units>=200 && units<=400){\n r=0.65*units+100;\n cout<<\"Rs.\"<<r;\n }\n else if (units>=400 && units<=600){\n r=0.8*units+200;\n cout<<\"Rs.\"<<r;\n }\n else{\n r=1.25*units+425;\n cout<<\"Rs.\"<<r;\n }\n}", "public static void main(String[] args) {\n\t\tString input = \"30000~10~6~5000\";\r\n\t\t\r\n\t\tString[] values = input.split(\"~\");\r\n\t\t\r\n\t\tint loan = Integer.parseInt(values[0]);\r\n\t\tint year = Integer.parseInt(values[1]);\r\n\t\tint annualRate = Integer.parseInt(values[2]);\r\n\t\tint downpayment = Integer.parseInt(values[3]);\r\n\t\t\r\n\t\tint interestLoan = loan - downpayment;\r\n\t\t\r\n\t\tdouble month = year * 12;\r\n\t\tdouble montlyRate = (double)annualRate / 1200;\r\n\t\tDecimalFormat format = new DecimalFormat(\"#.00\");\r\n\t\tdouble interest = ((interestLoan * montlyRate)/ (1 - Math.pow((1 + montlyRate),-month)));\r\n\t\t\r\n\t\tSystem.out.println(format.format(interest));\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int returnDay = scanner.nextInt();\n int returnMonth = scanner.nextInt();\n int returnYear = scanner.nextInt();\n int dueDay = scanner.nextInt();\n int dueMonth = scanner.nextInt();\n int dueYear = scanner.nextInt();\n int fine = 0;\n if(returnYear > dueYear) fine = 10000;\n else if(returnYear < dueYear) fine = 0;\n else if(returnMonth == dueMonth && returnDay > dueDay) {\n fine = 15 * (returnDay - dueDay);\n }\n else if(returnMonth > dueMonth){\n fine = 500 * (returnMonth - dueMonth);\n }\n\n System.out.println(fine);\n\n }", "public static void main(String[] args) {\r\n // calculate how much it would cost to purchase different quantities of computer parts\n String name;\n System.out.println(\"Welcome! Enter which computer parts you would like to purchase along with a quantity:\");\n System.out.println(\"How many Chromebook Chargers would you like?:\");\n // Creates a Scanner used for input\n Scanner input = new Scanner(System.in);\n int chromebookCharger = input.nextInt();\n\n\n System.out.println(\"How many Replacement Motherboards would you like?:\"); \n int replacementMotherboard = input.nextInt();\n \n System.out.println(\"How many Computer Mouses would you like?:\");\n int computerMouse = input.nextInt();\n\n double Subtotal = (chromebookCharger*34.99 + replacementMotherboard*127.50 + computerMouse*18.00);\n\n double Tax = (1.13);\n\n // declare and calculate the quotient\n System.out.println(Subtotal*1.13);\n\n\n\n \r\n \r\n }", "public static void main(String[] args) {\n //ENTER CODE HERE\n Scanner scan =new Scanner(System.in);\n System.out.println(\"Enter price in cents:\");\n\n int itemPrice = scan.nextInt();\n\n if (itemPrice < 25 || itemPrice > 100 || (itemPrice % 5 != 0) ) {\n System.out.println(\"Invalid entry\");\n }\n else\n {\n int change=(100-itemPrice);\n int quarterCount = change / 25;\n int remainder1 = change % 25;\n int dimeCount = remainder1 / 10;\n int remainder2 = remainder1 % 10;\n int nickelCount = remainder2 / 5;\n\n System.out.println(\"When you give $1 for \" +itemPrice+ \"cents item. You will get back \"+\n quarterCount+ (quarterCount>1 ? \"quarters \" :\"quarter \")+\n dimeCount + (dimeCount > 1 ? \"dimes \" : \"dime \") +\n nickelCount+ (nickelCount > 1 ? \"nickels \" :\"nickel \") );\n\n }\n\n\n\n }", "@Test\r\n\tpublic void getTotal_4bc(){\n\t\tcart = new TourShoppingCart(MockRules.getRules());\r\n\t\t\r\n\t\tcart.add(new Item(ItemType.BC, BigDecimal.valueOf(110.00)) );\r\n\t\tcart.add(new Item(ItemType.BC, BigDecimal.valueOf(110.00)) );\r\n\t\tcart.add(new Item(ItemType.BC, BigDecimal.valueOf(110.00)) );\r\n\t\tcart.add(new Item(ItemType.BC, BigDecimal.valueOf(110.00)) );\r\n\t\tcart.add(new Item(ItemType.BC, BigDecimal.valueOf(110.00)) );\r\n\t\t\r\n\t\tcart.add(new Item(ItemType.OH, BigDecimal.valueOf(300.00)) );\r\n\t\t\r\n\t\tassert cart.total().equals(BigDecimal.valueOf(760.00));\r\n\t\tSystem.out.println(cart.total());\r\n\t}", "BigDecimal calculateDailyOutcome(List<Instruction> instructions);", "@Override\n\tpublic double CalcularFuel() {\n\t\tdouble consumo=this.getCargaActual()*30+2*numEje;\n\t\treturn consumo;\n\t}", "private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }", "public Object creditEarningsAndPayTaxes()\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setInitialCash : \" + \"Agent\");\r\n/* 144 */ \tgetPriceFromWorld();\r\n/* 145 */ \tgetDividendFromWorld();\r\n/* */ \r\n/* */ \r\n/* 148 */ \tthis.cash -= (this.price * this.intrate - this.dividend) * this.position;\r\n/* 149 */ \tif (this.cash < this.mincash) {\r\n/* 150 */ \tthis.cash = this.mincash;\r\n/* */ }\t\r\n/* */ \r\n/* 153 */ \tthis.wealth = (this.cash + this.price * this.position);\r\n/* */ \r\n/* 155 */ \treturn this;\r\n/* */ }", "public void calc() {\n /*\n * Creates BigDecimals for each Tab.\n */\n BigDecimal registerSum = new BigDecimal(\"0.00\");\n BigDecimal rouleauSum = new BigDecimal(\"0.00\");\n BigDecimal coinageSum = new BigDecimal(\"0.00\");\n BigDecimal billSum = new BigDecimal(\"0.00\");\n /*\n * Iterates over all TextFields, where the User might have entered values into.\n */\n for (int i = 0; i <= 7; i++) {\n /*\n * If i <= 1 is true, we still have registerFields to add to their BigDecimal.\n */\n if (i <= 1) {\n try {\n /*\n * Stores the Text of the RegisterField at the index i with all non-digit characters.\n */\n String str = registerFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n /*\n * Creates a new BigDecimal, that is created by getting the Factor of the current \n * RegisterField and multiplying this with the input.\n */\n BigDecimal result = getFactor(i, FactorType.REGISTER).multiply(new BigDecimal(str));\n /*\n * Displays the result of the multiplication above in the associated Label.\n */\n registerLabels.get(i).setText(result.toString().replace('.', ',') + \"€\");\n /*\n * Adds the result of the multiplication to the BigDecimal for the RegisterTab.\n */\n registerSum = registerSum.add(result);\n } catch (NumberFormatException nfe) {\n //If the Input doesn't contain any numbers at all, a NumberFormatException is thrown, \n //but we don't have to do anything in this case\n }\n }\n /*\n * If i <= 4 is true, we still have rouleauFields to add to their BigDecimal.\n */\n if (i <= 4) {\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = rouleauFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.ROULEAU).multiply(new BigDecimal(str));\n rouleauLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n rouleauSum = rouleauSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * If i <= 6 is true, we still have billFields to add to their BigDecimal.\n */\n if (i <= 6) {\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = billFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.BILL).multiply(new BigDecimal(str));\n billLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n billSum = billSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * We have 8 coinageFields, so since the for-condition is 0 <= i <=7, we don't have to check \n * if i is in range and can simply calculate it's sum.\n */\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = coinageFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.COINAGE).multiply(new BigDecimal(str));\n coinageLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n coinageSum = coinageSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * Displays all results in the associated Labels.\n */\n sumLabels.get(0).setText(registerSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(1).setText(rouleauSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(2).setText(coinageSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(3).setText(billSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(4).setText(billSum.add(coinageSum).add(rouleauSum).add(registerSum).toString()\n .replace('.', ',') + \"€\");\n }", "private final void taxCalculations(){\n\r\n hraDeduction = totalHRA - 0.1*basicIncome;\r\n ltaDeduction = totalLTA - 0.7*totalLTA;\r\n\r\n //exemptions\r\n fundsExemption = fundsIncome - 150000; //upto 1.5 lakhs are exempted under IT Regulation 80C\r\n\r\n grossIncome = basicIncome + totalHRA + totalLTA + totalSpecialAl + fundsIncome ;\r\n\r\n totalDeduction = hraDeduction + ltaDeduction;\r\n\r\n totalTaxableIncome = grossIncome - (totalDeduction + fundsExemption);\r\n\r\n taxLiability = 0.05 * (totalTaxableIncome - 250000) + 0.2*(totalTaxableIncome - 500000);\r\n\r\n taxToPay = (cessPercent*taxLiability)/100 + taxLiability;\r\n }", "@Test\n\tpublic void testCase3()\n\t{\n\t\tString caseType=\"silicone\";\n\t\tint numberOfCases=10;\n\t\tfloat amount=BillEstimation.fareCalculation(caseType,numberOfCases);\n\t\tSystem.out.println(\"Bill amount\"+amount);\n\t\tAssert.assertEquals(5000.1f,amount,0.2f); \n\t\t/*\n\t\t * Assert.assertEquals(expected, actual, delta) delta is how long the actual\n\t\t * value differs from expected\n\t\t */\n\t}", "public static void main(String[] args) {\n \n// scanner\n Scanner myScanner;\n myScanner = new Scanner( System.in );\n \n// user inputs\n System.out.print(\n \"Enter the number of Big Macs(an interger > 0): \"); // asking user for the number of Big Macs\n int nBigMacs = myScanner.nextInt(); // declare that input as an interger nBigMacs\n \n System.out.print(\"Enter the cost per Big Mac as\"+ \n \" a double (in the form xx.xx) :\"); // prompts for the cost of 1 Big Mac\n double bigMac$ = myScanner.nextDouble(); //declaration of the Big Mac cost as a variable\n \n System.out.print(\n \"Enter the percent tax as a whole number (xx): \"); // prompts user for tax percent\n double taxRate = myScanner.nextDouble(); // decleration of tax rate\n taxRate/=100; // converts whole number to a usable proportion\n \n// eeclare variables for output and calculation\n double cost$;\n int dollars,dimes, pennies; // make variables for dollars, dimes, and pennies for storing digits\n cost$=nBigMacs*bigMac$*(1+taxRate); //calculation for the cost of all Big Macs\n dollars=(int)cost$; //gets dollars as a whole interger\n dimes=(int)(cost$*10)%10; //isolates one digit after the decimal place\n pennies=(int)(cost$*100)%10; //isolates the second degit after the decimal place\n \n// print results\n System.out.println(\"The total cost of \"+nBigMacs+\" Big Macs, at $\"+bigMac$+\" per Big Mac, with a sales tax of \"+(int)(taxRate*100) + \"%, is $\"+dollars+'.'+dimes+pennies);\n \n }", "@Override\r\n\tpublic double monthlyFee(double balance) {\r\n \tif(balance >= 300){\r\n \treturn 0;\r\n \t}\r\n \telse\r\n \treturn 5;\r\n \t}", "double getTotalProfit();", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan;\n\t\tdouble salesAmount;\n\t\tdouble commission;\n\t\t\n\t\tscan= new Scanner(System.in);\n\t\tSystem.out.println(\" please enter your sales amount\");\n\t\tsalesAmount=scan.nextDouble();\n\t\t\n\t\tif(salesAmount>=1 && salesAmount<100) {\n\t\t\t//lets give user 10% commision of a sale\n\t\t\tcommission=salesAmount*0.1;\n\t\t}else if(salesAmount>=100 && salesAmount <200) {\n\t\t\t//lets give user 20% commision of a sale\n\t\t\tcommission=salesAmount*0.2;\n\t\t}else if(salesAmount>=200 && salesAmount<500) {\n\t\t\t// lets give user 30% commision of a sale\n\t\t\tcommission=salesAmount*0.3;\n\t\t}else if(salesAmount>=500) {\n\t\t\t//lets give user 50% commision of a sale\n\t\t\tcommission=salesAmount*0.5;\n\t\t}else {\n\t\t\tcommission=0;\n\t\t}\n\t\tSystem.out.println(\"Based on the sales your commision is \"+commission);\n\t}", "public static void main(String[] args) {\n\n System.out.print(\"Input an annual interest rate: \");\n float annualInterestRate = getNumber();\n \n System.out.print(\"Input a starting principal: \");\n float principal = getNumber();\n \n System.out.print(\"Input total years in fund: \");\n float yearsInFund = getNumber();\n \n System.out.print(\"Quarterly, monthly or daily? \");\n String answer = getInput();\n \n System.out.println(\"\");\n \n \n \n float currentBalance = principal;\n int year = 2017;\n float quarterlyInterestMultiplier = (1 + (annualInterestRate/4) /100);\n System.out.println(\"q\" + quarterlyInterestMultiplier);\n float monthlyInterestMultiplier = (1 + (annualInterestRate/12) /100);\n System.out.println(\"q\" + monthlyInterestMultiplier);\n float dailyInterestMultiplier = (1 + (annualInterestRate/365) /100);\n System.out.println(\"q\" + dailyInterestMultiplier);\n // System.out.println(monthlyInterestMultiplier);\n \n \n for (int i = 0; i < yearsInFund; i++) {\n \n if (answer.equals(\"quarterly\")) {\n float pastBalance = currentBalance;\n System.out.println(\"The current year is: \" + year);\n System.out.println(\"Current principal is: \" + currentBalance);\n for (int j = 0; j < 4; j++) {\n currentBalance *= quarterlyInterestMultiplier;\n }\n System.out.println(\"Total anticipated interest is: \" + (currentBalance - pastBalance));\n System.out.println(\"Expected principal at the end of \" + year + \" is: \" + currentBalance);\n System.out.println(\"\");\n year++;\n } else if (answer.equals(\"monthly\")) {\n for (int k = 0; k < 12; k++) {\n switch (k) {\n case 0:\n System.out.println(\"The current month is January \" + year);\n break;\n case 1:\n System.out.println(\"The current month is February \" + year);\n break;\n case 2:\n System.out.println(\"The current month is March \" + year);\n break;\n case 3:\n System.out.println(\"The current month is April \" + year);\n break;\n case 4:\n System.out.println(\"The current month is May \" + year);\n break;\n case 5:\n System.out.println(\"The current month is June \" + year);\n break;\n case 6:\n System.out.println(\"The current month is July \" + year);\n break;\n case 7:\n System.out.println(\"The current month is August \" + year);\n break;\n case 8:\n System.out.println(\"The current month is September \" + year);\n break;\n case 9:\n System.out.println(\"The current month is October \" + year);\n break;\n case 10:\n System.out.println(\"The current month is November \" + year);\n break;\n case 11:\n System.out.println(\"The current month is December \" + year);\n break;\n default:\n }\n float pastBalance = currentBalance;\n System.out.println(\"The current principal is: \" + currentBalance);\n currentBalance *= monthlyInterestMultiplier;\n System.out.println(\"Total anticipated interest is: \" + (currentBalance - pastBalance));\n System.out.println(\"Expected principal at the end of this month is: \" + currentBalance);\n System.out.println(\"\");\n }\n year++;\n } else if (answer.equals(\"daily\")) {\n for (int l = 0; l < 365; l++) {\n System.out.println(\"Today is day \" + (l+1) + \", \" + year);\n float pastBalance = currentBalance;\n System.out.println(\"The current principal is: \" + currentBalance);\n currentBalance *= dailyInterestMultiplier;\n System.out.println(\"Total anticipated interest by the end of day is: \" + (currentBalance - pastBalance));\n System.out.println(\"Expected principal at the end of the day is: \" + currentBalance);\n System.out.println(\"\");\n }\n year++;\n }\n \n }\n \n System.out.println(currentBalance);\n \n }", "void chargeTf(double amount);", "private void calculateEarnings()\n {\n // get user input\n int items = Integer.parseInt( itemsSoldJTextField.getText() );\n double price = Double.parseDouble( priceJTextField.getText() );\n Integer integerObject = \n ( Integer ) commissionJSpinner.getValue();\n int commissionRate = integerObject.intValue();\n \n // calculate total sales and earnings\n double sales = items * price;\n double earnings = ( sales * commissionRate ) / 100;\n \n // display the results\n DecimalFormat dollars = new DecimalFormat( \"$0.00\" );\n grossSalesJTextField.setText( dollars.format( sales ) );\n earningsJTextField.setText( dollars.format( earnings ) );\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tint CarInsurance = 370+170;\n\t\tint HealthInsurancePlusCollege = 1400+170;\n\t\tint aptFees = 650;\n\t\tint perHour = 90 ;\n\t\tint interestRate = 16;\n\t\tint insource = perHour * 160 *(100-interestRate)/100 ;\n\t\tint trainFee = 150;\n\t\tint MonthlyFoodAndExpense = 500;\n\t\tint LoanPaymentMonthly = 800;\n\t\tint save = insource - (CarInsurance + HealthInsurancePlusCollege + aptFees + trainFee + MonthlyFoodAndExpense + LoanPaymentMonthly);\n\n\t\tSystem.out.print(\"Salary = \"+ insource + \" yearly Salary = \" +insource * 12 +\" Saved money = \" + save + \", In year = \" + save *12);\n\n\n\t}", "private double calcuCMetric() {\n\t\treturn (p-1)/fcost;\n\t}", "public double calculatePrice(Model model)\n\t{\n\t\t//sum each of the price components price value\n\t\tString finalprice = \"\";\n\t\tdouble pc_price = -1, lower_limit = -1, upper_limit = -1, function_price = -1,finalvalue=0;\n\t\tfor(PriceComponent pc : this.priceComponents)\n\t\t{\n\t\t\tpc_price = -1; lower_limit = -1; upper_limit = -1;function_price = -1;\n\t\t\t//get the variables and define their value\n\t\t\tif(pc.getPriceFunction() != null)\n\t\t\t{\n\t\t\t\tif (pc.getPriceFunction().getSPARQLFunction() != null) {\n\t\t\t\t\tcom.hp.hpl.jena.query.Query q = ARQFactory.get().createQuery(pc.getPriceFunction().getSPARQLFunction());\n\t\t\t\t\tQueryExecution qexecc = ARQFactory.get().createQueryExecution(q, model);\t\n\t\t\t\t\t\n\t\t\t\t\tResultSet rsc = qexecc.execSelect();\n//\t\t\t\t\tSystem.out.println(q.toString());\n\t\t\t\t\tfunction_price = rsc.nextSolution().getLiteral(\"result\").getDouble();// final result is store in the ?result variable of the query\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pc.getComponentCap() != null) {\n\t\t\t\tupper_limit = pc.getComponentCap().getValue();\n\t\t\t}\n\n\t\t\tif (pc.getComponentFloor() != null) {\n\t\t\t\tlower_limit =pc.getComponentFloor().getValue();\n\t\t\t}\n\n\t\t\tif (pc.getPrice() != null) {\n\t\t\t\tpc_price = pc.getPrice().getValue();\n\t\t\t}\n\t\t\t\n\t\t\tif(function_price >=0)\n\t\t\t{\n\t\t\t\tif(function_price > upper_limit && upper_limit >= 0)\n\t\t\t\t\tfunction_price = upper_limit;\n\t\t\t\telse if(function_price < lower_limit && lower_limit >=0)\n\t\t\t\t\tfunction_price = lower_limit;\n\t\t\t}\n\t\t\t\n\t\t\tif(pc_price >= 0)\n\t\t\t{\n\t\t\t\tif(pc_price > upper_limit && upper_limit >=0)\n\t\t\t\t\tpc_price = upper_limit;\n\t\t\t\telse if(pc_price < lower_limit && lower_limit >= 0)\n\t\t\t\t\tpc_price = lower_limit;\n\t\t\t}\n\t\t\t\n\t\t\tif(pc.getPrice() != null && pc.getPriceFunction() != null)\n\t\t\t\tSystem.out.println(\"Dynamic and static price? offer->\"+this.name+\",pc->\"+pc.getName() + \"price ->\"+pc_price);//throw expection?\n\t\t\t\n\t\t\t\n\t\t\tif(pc.isDeduction())\n\t\t\t{\n\t\t\t\tif(function_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" - \" +function_price;\n\t\t\t\t\tfinalvalue-=function_price;\n\t\t\t\t}\n\t\t\t\tif(pc_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" - \" +pc_price;\n\t\t\t\t\tfinalvalue-=pc_price;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(function_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" + \" +function_price;\n\t\t\t\t\tfinalvalue+=function_price;\n\t\t\t\t}\n\t\t\t\tif(pc_price >= 0)\n\t\t\t\t{\n\t\t\t\t\tfinalprice = finalprice+\" + \" +pc_price;\n\t\t\t\t\tfinalvalue+=pc_price;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//conditions to verify that the final price is inside the interval defined by the lower and upper limit, in case these exist\n\t\tif(this.getPriceCap() != null)\n\t\t{\n\t\t\tif(this.getPriceCap().getValue() >= 0 && finalvalue < this.getPriceCap().getValue())\n\t\t\t\tfinalvalue = this.getPriceCap().getValue();\n\t\t}\n\t\tif(this.getPriceFloor() != null)\n\t\t{\n\t\t\tif(this.getPriceFloor().getValue() >= 0 && finalvalue > this.getPriceFloor().getValue())\n\t\t\t\tfinalvalue = this.getPriceFloor().getValue();\n\t\t}\n\t\t\t\t\n\t\treturn finalvalue;\n\t}", "protected KualiDecimal calculateM113PendActual1(boolean financialBeginBalanceLoadInd, Integer universityFiscalYear, String chartOfAccountsCode, String accountNumber, boolean isEqualDebitCode, String financialObjectCodeForCashInBank) {\n Criteria criteria = new Criteria();\n criteria.addEqualTo(OLEConstants.FINANCIAL_BALANCE_TYPE_CODE_PROPERTY_NAME, OLEConstants.BALANCE_TYPE_ACTUAL);\n\n if (financialBeginBalanceLoadInd) {\n criteria.addEqualTo(OLEConstants.UNIVERSITY_FISCAL_YEAR_PROPERTY_NAME, universityFiscalYear);\n }\n else {\n Criteria sub1 = new Criteria();\n sub1.addEqualTo(OLEConstants.UNIVERSITY_FISCAL_YEAR_PROPERTY_NAME, universityFiscalYear);\n Criteria sub1_1 = new Criteria();\n sub1_1.addEqualTo(OLEConstants.UNIVERSITY_FISCAL_YEAR_PROPERTY_NAME, new Integer(universityFiscalYear.intValue() - 1));\n sub1.addOrCriteria(sub1_1);\n criteria.addAndCriteria(sub1);\n }\n\n criteria.addEqualTo(OLEConstants.CHART_OF_ACCOUNTS_CODE_PROPERTY_NAME, chartOfAccountsCode);\n criteria.addEqualTo(OLEConstants.ACCOUNT_NUMBER_PROPERTY_NAME, accountNumber);\n criteria.addEqualTo(OLEConstants.FINANCIAL_OBJECT_CODE_PROPERTY_NAME, financialObjectCodeForCashInBank);\n\n if (isEqualDebitCode) {\n criteria.addEqualTo(OLEConstants.TRANSACTION_DEBIT_CREDIT_CODE, OLEConstants.GL_DEBIT_CODE);\n }\n else {\n criteria.addNotEqualTo(OLEConstants.TRANSACTION_DEBIT_CREDIT_CODE, OLEConstants.GL_DEBIT_CODE);\n }\n\n criteria.addNotEqualTo(OLEConstants.DOCUMENT_HEADER_PROPERTY_NAME + \".\" + OLEConstants.DOCUMENT_HEADER_DOCUMENT_STATUS_CODE_PROPERTY_NAME, OLEConstants.DocumentStatusCodes.CANCELLED);\n\n ReportQueryByCriteria reportQuery = QueryFactory.newReportQuery(GeneralLedgerPendingEntry.class, criteria);\n reportQuery.setAttributes(new String[] { \"sum(\" + OLEConstants.TRANSACTION_LEDGER_ENTRY_AMOUNT + \")\" });\n\n return executeReportQuery(reportQuery);\n }", "@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }", "public static void main(String[] args) {\n\t\n\t\t\tint size = 0; \n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Enter the size of currency denominations \");\n\t\t\tsize = sc.nextInt();\n\t\t\t\n\t\t\tint currArray[] = new int[size];\n\t\t\tSystem.out.println(\"Enter the currency denominations value\");\n\t\t\tfor(int i = 0; i < size; i++) {\n\t\t\t\tcurrArray[i] = sc.nextInt();\n\t\t\t}\t\n\t\t\t\n\t\t\tint amount = 0;\n\t\t\tCurrencyDenomService service = new CurrencyDenomService();\n\t\t\tSystem.out.println(\"Enter the amount you want to pay \");\n\t\t\tamount = sc.nextInt();\n\t\t\t\n\t\t\t//sort the notes in descending order as we have to give min notes count\n\t\t\tservice.sortAmount(currArray, 0, currArray.length-1);\n\t\t\t\n\t\t\t//find the min counts of notes to pay amount\n\t\t\tservice.notesCount(currArray, amount);\n\t\t\t\n\t\t\tsc.close(); //close scanner \n\t\t\t\n\t}", "public Double retornaSubTotal(Double totalGeral,Double desconto){\n return totalGeral - (totalGeral*(desconto/100));\n}", "public static void monthlyPayment()\n\t{\n\t\tSystem.out.println(\"enter principal loan amount, years , and rate of interest\");\n\t\tfloat principal = scanner.nextFloat();\n\t\tfloat years = scanner.nextFloat();\n\t\tfloat rate = scanner.nextFloat();\n\t\t\n\t\tfloat n = 12 * years;\n\t\tfloat r = rate / (12*100);\n\t\tdouble x = Math.pow(1+rate,(-n));\t\n\t\t\n\t\tdouble payment = (principal*r) / (1-x);\n\t\tSystem.out.println(\"monthly payment is: \" + payment);\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter the investment amounth: \");\n\t\tdouble investment = input.nextDouble();\n\t\tSystem.out.println(\"Enter annual interest rate ( in percentage e.g. 3.5%) : \");\n\t\tdouble interestRate = input.nextDouble();\n\t\tSystem.out.println(\"Enter number of years: \");\n\t\tdouble numberOfYears = input.nextDouble();\n\t\t\n\t\tdouble acumulatedValue = investment * Math.pow(( 1 + (interestRate /1200) ),(numberOfYears * 12));\n\t\t\n\t\tSystem.out.println(\"Acumulated value is: \" + acumulatedValue);\n\t}", "private void CalculateTotalAmount()\n {\n double dSubTotal = 0,dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0;\n float dTaxPercent = 0, dSerTaxPercent = 0;\n double dTotalBillAmount_for_reverseTax =0;\n double dIGSTAmt =0, dcessAmt =0;\n // Item wise tax calculation ----------------------------\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++)\n {\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\n if (RowItem.getChildAt(0) != null)\n {\n TextView ColQuantity = (TextView) RowItem.getChildAt(3);\n TextView ColRate = (TextView) RowItem.getChildAt(4);\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\n TextView ColTax = (TextView) RowItem.getChildAt(7);\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\n TextView ColTaxValue = (TextView) RowItem.getChildAt(28);\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\n dcessAmt += Double.parseDouble(ColcessAmount.getText().toString());\n if (crsrSettings!=null && crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) // forward tax\n {\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\n }\n else // reverse tax\n {\n double qty = ColQuantity.getText().toString().equals(\"\")?0.00 : Double.parseDouble(ColQuantity.getText().toString());\n double baseRate = ColRate.getText().toString().equals(\"\")?0.00 : Double.parseDouble(ColRate.getText().toString());\n dSubTotal += (qty*baseRate);\n dTotalBillAmount_for_reverseTax += Double.parseDouble(ColAmount.getText().toString());\n }\n\n }\n }\n // ------------------------------------------\n // Bill wise tax Calculation -------------------------------\n Cursor crsrtax = db.getTaxConfigs(1);\n if (crsrtax.moveToFirst()) {\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\n }\n Cursor crsrtax1 = db.getTaxConfigs(2);\n if (crsrtax1.moveToFirst()) {\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\n }\n // -------------------------------------------------\n\n dOtherCharges = Double.valueOf(textViewOtherCharges.getText().toString());\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\n if (crsrSettings.moveToFirst()) {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) // forward tax\n {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\"))\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\n }\n else\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\n }\n }\n else // reverse tax\n {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) // item wise\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dTotalBillAmount_for_reverseTax + dOtherCharges));\n\n }\n else\n {\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvBillAmount.setText(String.format(\"%.2f\", dTotalBillAmount_for_reverseTax + dOtherCharges));\n }\n }\n }\n }", "public void calculatePayment() {}", "public double calculatingCostO(int quantity)\n { \n cost = 750 + (0.25 * quantity);\n return cost;\n \n }", "public static void main(String[] args) {\n\n\t\tDemo dem = new Demo();\n\t\tBigDecimal initialDeposit = new BigDecimal(0);\n\n\t\tPerson customer1 = dem.addPerson(\"Ade\", \"104 Lane Dr\", 28738);\n\t\tdem.customers.put(dem.custTracker, customer1);\n\t\tBigDecimal startingNum1 = new BigDecimal(100);\n\t\tCustomer customer2 = dem.addPerson(\"Jane\", \"104 Lane Dr\", 43436);\n\t\tdem.customers.put(dem.custTracker, customer2);\n\t\tBigDecimal startingNum2 = new BigDecimal(30);\n\t\tCompany company1 = dem.addCompany(\"This Company\", \"3948 Lego Ln\", 76858);\n\t\tdem.customers.put(dem.custTracker, company1);\n\t\tBigDecimal startingNum3 = new BigDecimal(30124);\n\t\t\n\t\t\n\n\t\tSavings forcustomer1 = dem.addSavAcc(startingNum1);\n\t\tdem.accounts.put(dem.accTracker, forcustomer1);\n\t\tCurrent forcustomer2 = dem.addCurrAcc(startingNum2, 5615652, 8744155); //saving first check num and next cheque num\n\t\tdem.accounts.put(dem.accTracker, forcustomer2);\n\t\tCurrent forcompany1 = dem.addCurrAcc(startingNum3, 52929526, 615651922);\n\t\tdem.accounts.put(dem.accTracker, forcompany1);\n\n\t\tBigDecimal withdrawl = new BigDecimal(110); //testing no overdraft of savings\n\t\tforcustomer1.withdraw(withdrawl);\n\t\t\n\t\tBigDecimal deposit = new BigDecimal(40); //test deposit method\n\t\tforcustomer2.deposit(deposit);\n\t\t\n\t\tBigDecimal reset = new BigDecimal(1000);\n\t\tcustomer1.reset(reset);\n\n\t\t\n\t\tcompany1.add(deposit);\n\t\t\n\t\t\n\t\t//company1.add(bd);\n\t\t\n\t\t//forcustomer2.overdraw(); // test overdraft fee method\n\t\t\n\t\t//BigDecimal correctbalance = new BigDecimal(1000); // test correction method\n\t\t//forcustomer2.correction(correctbalance);\n\n\t\t\n\t\t\n\t\tSystem.out.println(dem.customers);\n\t\tSystem.out.println(dem.accounts);\n\n\t\t// BigDecimal accBalance = new BigDecimal(0);\n\t\t// currAcc.setBalance(accBalance); // okay it works. i guess. so thats good.\n\t\t// System.out.println(currAcc.getBalance());\n\t\t//\n\t\t// accountSetUp(accBalance, 1000);\n\t}", "public static double calculateCommission(double sales) {\n double commission; //The commision\n \n if (sales > 5000) { //Sales over $5000, 10% commission\n commission = sales * 0.1;\n }\n else if (sales > 3000) { //Sales over $3000 to $5000, 8% commission\n commission = sales * 0.08;\n }\n else if (sales > 1000) { //Sales over $1000 to $3000, 5% commission\n commission = sales * 0.05;\n }\n else { //Sales to $1000, 2% commission\n commission = sales * 0.02;\n }\n \n //Return commission\n return commission;\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}", "public static void main(String[] args) {\n\n final byte mounthsInYyears = 12; // mounts in years\n final byte ofPresentage = 100; // total presentage\n\n String input=null, inputs=null, inputsi=null;\n int myPrincipal = 0;\n float annualInterstRate=0, actuallRate=0, periodInMounths=0, period=0;\n boolean err=true;\n\n // running the program \n\n do{\n try{\n input = JOptionPane.showInputDialog(\"principal (1K shekels - 1M shekels): \");\n myPrincipal = Integer.parseInt(input);\n err=false;\n\n while (myPrincipal<1_000 || myPrincipal>1_000_000) { // create while loop becuse we check our condition until it works\n JOptionPane.showMessageDialog(null,\"Error, your principal should be a number between 1K to 1M! \"); // printing error line\n myPrincipal = Integer.parseInt(JOptionPane.showInputDialog(\"principal (1K shekels - 1M shekels): \")); // adding again the input line\n if (myPrincipal>1000 && myPrincipal<1000000) // declare our condition\n break; // if the condition will work we will break out of the loop\n }\n\n }catch(NumberFormatException e){\n e.printStackTrace();\n }\n }while(err);\n \n do{\n try{\n err = true;\n inputs = JOptionPane.showInputDialog(\"Annual Interst Rate: \");\n annualInterstRate = Float.parseFloat(inputs);\n err=false;\n while (annualInterstRate<0 || annualInterstRate>30) { // create while loop becuse we check our condition until it works\n JOptionPane.showMessageDialog(null,\"Error,enter a number between 0 to 30!\"); // printing error line\n annualInterstRate = Float.parseFloat(JOptionPane.showInputDialog(\"Annual Interst Rate: \"));\n if (myPrincipal>0 && myPrincipal<=30) // declare our condition\n break; // if the condition will work we will break out of the loop\n } \n actuallRate = annualInterstRate/(ofPresentage*mounthsInYyears); // creting new calculated variable \n\n }catch(NumberFormatException e){\n e.printStackTrace();\n }\n }while(err);\n\n do{\n try{\n err = true;\n inputsi = JOptionPane.showInputDialog(\"Period (Years):\");\n period = Float.parseFloat(inputsi);\n err=false;\n while (period<0 || period>30) { // create while loop becuse we check our condition until it works\n JOptionPane.showMessageDialog(null,\"Error,enter a number between 0 to 30!\"); // printing error line\n period = Float.parseFloat(JOptionPane.showInputDialog(\"Period (Years):\"));\n if (period>0 && period<=30) // declare our condition\n break; // if the condition will work we will break out of the loop\n }\n periodInMounths = period*mounthsInYyears; // creting new calculated variable\n\n }catch(NumberFormatException e){\n e.printStackTrace();\n }\n }while(err);\n \n // calculations\n float parenthesisValue = 1 + actuallRate;\n double parenthesisValuePower = Math.pow(parenthesisValue, periodInMounths);\n double Mortgage = myPrincipal * ((actuallRate * parenthesisValuePower)/(parenthesisValuePower -1 ));\n \n // formating statements\n NumberFormat currency = NumberFormat.getCurrencyInstance();\n String result = currency.format(Mortgage);\n \n JOptionPane.showMessageDialog(null, \"The Mortgage is \" + result); \n\n }", "private String getBillPrice() {\n double cost = 0.00;\n\n for (MenuItem item : bill.getItems()) {\n cost += (item.getPrice() * item.getQuantity());\n cost += item.getExtraIngredientPrice();\n cost -= item.getRemovedIngredientsPrice();\n }\n\n return String.format(\"%.2f\", cost);\n }" ]
[ "0.7619908", "0.66972136", "0.62433606", "0.62324554", "0.6147246", "0.61425817", "0.6104827", "0.61029863", "0.6087097", "0.60799354", "0.60632205", "0.6062701", "0.6059543", "0.60392916", "0.60332406", "0.5981073", "0.5928855", "0.59235895", "0.5912168", "0.5907946", "0.5906839", "0.58987194", "0.58930236", "0.5883222", "0.5873809", "0.5873787", "0.5865138", "0.58635896", "0.584784", "0.5845615", "0.58451784", "0.58379424", "0.58304137", "0.58295757", "0.5829565", "0.58200276", "0.58140945", "0.581243", "0.579734", "0.57951236", "0.57896364", "0.577343", "0.57731616", "0.5770356", "0.57700086", "0.5765863", "0.5760634", "0.5741944", "0.57264394", "0.57196665", "0.5717927", "0.5717919", "0.571645", "0.571147", "0.5703329", "0.57013947", "0.56952566", "0.5695242", "0.569505", "0.569075", "0.56893796", "0.5683376", "0.56810987", "0.56730455", "0.5660331", "0.5645776", "0.564241", "0.563613", "0.5631719", "0.5616893", "0.5616038", "0.5615992", "0.5615959", "0.5610337", "0.5603456", "0.5597521", "0.559741", "0.5596793", "0.5594262", "0.55877584", "0.5580348", "0.55801135", "0.5572139", "0.5570164", "0.55698264", "0.55646646", "0.55619663", "0.55489755", "0.5544972", "0.5540098", "0.5532957", "0.5512996", "0.55129117", "0.5510274", "0.5506752", "0.5502006", "0.5498867", "0.54942346", "0.54907197", "0.5488197" ]
0.7133997
1
TODO Autogenerated method stub
@Override public IBinder onBind(Intent arg0) { 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
stopService(new Intent(MainActivity.this, MyService.class)); Toast.makeText(MainActivity.this, "SAVE", Toast.LENGTH_SHORT).show();
@Override public void onClick(View view) { Log.d("CALL_TEST", "SAVE!"); DbManager db = DbManager.getInstance(getApplicationContext()); ContentValues contentValues = new ContentValues(); contentValues.put("NAME", "홍길동"); contentValues.put("PHONE", "1234"); db.insert(contentValues); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n stopService(new Intent(MainActivity.this, MyService.class));\n }", "public void stopService() {\r\n Log.d(LOG, \"in stopService\");\r\n stopService(new Intent(getBaseContext(), EventListenerService.class));\r\n stopService(new Intent(getBaseContext(), ActionService.class));\r\n }", "@Override\n protected void onPause() {\n super.onPause();\n //stopService(serviceIntent);\n\n }", "@Override\n public void onClick(View v) {\n startService(new Intent(MainActivity.this, MyService.class));\n }", "@Override\n public void onClick (View arg0){\n stopService(new Intent(Main2Activity.this,NotifyService.class));\n\n }", "public void stopService() {\n stopService(new Intent(getBaseContext(), OrderService.class));\n }", "public void onStopButton(View view)\r\n {\n myService.onDestroy();\r\n //isBound=false;\r\n // Log.i(TAG, \"stop service\");\r\n }", "public void StopService() {\n\n\n TrackLisinterService tracklisiten = new TrackLisinterService(context, ((Activity) context).getApplication());\n tracklisiten.StopService();\n\n }", "@Override\n public void onDestroy() {\n Toast.makeText(this, \"Service stopped\", Toast.LENGTH_LONG).show();\n }", "public void sendToService(){\n stopService(new Intent(this, MediaPlayerService.class));\n Intent intent = new Intent(this, MediaPlayerService.class);\n\n intent.putExtra(MediaPlayerService.MEDIA_FILE_PATH_EXTRA, GotoRingtoneActivity.musicPath);\n\n startService(intent);\n }", "@Override\r\n public void onPause() {\r\n super.onPause();\r\n Intent intent = new Intent(MainActivity.this, MusicService.class);\r\n stopService(intent);\r\n }", "public void stopService(View view) {\n stopService(new Intent(getBaseContext(), MyFirstService.class));\n }", "@Override\n public void onStart(Intent intent, int startId) {\n Toast.makeText(this, \" Service Started\", Toast.LENGTH_LONG).show();\n \n }", "public void stopService(View view) {\n stopService(new Intent(getBaseContext(), Myservice.class));\n }", "public void stopService(View view) { \n\t\tstopService(new Intent(getBaseContext(), TestService.class)); \n\t}", "@Override\n protected void onStop() {\n\n // MOVE to onCreate?\n// startService(new Intent(getApplicationContext(), NotificationService.class));\n super.onStop();\n }", "private void stopTalePlay_Service(){\n sBtn_PlayResume.setImageResource(R.drawable.select_btn_play);\n mAudioTaleSeekBar.setProgress(0);\n mCurrTimePosText.setText(\"00:00\");\n this.stopService(mServiceIntent);\n unregisterBroadcastReceivers();\n\n /** unregister broadcastReceiver for alertDialog */\n unregisterAfterCallBroadcastReceiver();\n }", "protected void stopService() {\n\t\t//if (isServiceRunning(Constants.SERVICE_CLASS_NAME))\n\t\tthis.stopService(new Intent(this, LottoService.class));\n\t}", "@Override\n protected void onStop() {\n stopService(new Intent(this, MyJobService.class));\n super.onStop();\n }", "public void stopService();", "@Override\n public void run() {\n stopService(new Intent(MainActivity.this, UnReadMessageService.class)); // So that it does not receive any notifications\n stopService(new Intent(MainActivity.this, MyService.class));\n pDialog.dismiss();\n finish();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(MainActivity.this, MyService.class);\n\t\t\t\tunbindService(conn);\n\t\t\t\t// stopService(intent);\n\t\t\t}", "private void StopService() {\n\n TrackLisinterService tracklisiten = new TrackLisinterService(context, getApplication());\n tracklisiten.StopService();\n\n }", "@Override\n public void onDestroy() {\n Log.d(\"ServiceTest\", \"Service stopped\");\n }", "private void stopLoggerService() {\n Intent intent = new Intent(this, GestureLoggerService.class);\n intent.putExtra(GestureLoggerService.EXTRA_START_SERVICE, false);\n\n startService(intent);\n }", "@Override\r\npublic void onDestroy() {\n\tsuper.onDestroy();\r\n\tif(mIntent!=null){\r\n\t\tgetActivity().stopService(mIntent);\t\r\n\t}\r\n\t\r\n}", "@Override\n protected void onDestroy() {\n\tsuper.onDestroy ();\n\tstartService ( new Intent ( getBaseContext (), BackgroundService.class ) );\n }", "public void stopService(View view) {\r\n stopService(new Intent(this, CustomService.class));\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tstopService(myserviceIntent);\n\t\t\t}", "@Override\r\n public void onDestroy() {\r\n super.onDestroy();\r\n if (toggleButton1==true) {\r\n Intent intent = new Intent(MainActivity.this, MusicService.class);\r\n stopService(intent);\r\n }\r\n }", "@Override\n public void onDestroy() {\n stopService();\n }", "public void onStopServiceButtonClick(View view) {\n new AlertDialog.Builder(this)\n .setMessage(getString(R.string.stop_confirm_msg))\n .setPositiveButton(\"OK\", (dialog, which) -> {\n // Stop the service\n stopService(getClipServiceIntent());\n isStarted = false;\n isBound = false;\n\n // Enable/disable buttons\n updateUi();\n }).setNegativeButton(\"Cancel\", null)\n .create()\n .show();\n }", "@Override\n public void onFinish() {\n mpAudio.start();\n stopService(new Intent( getBaseContext(), MeditationService.class ) );\n }", "@Override\r\n public void onClick(View view) {\n new SignOut();\r\n\r\n // stop all services\r\n stopService(new Intent(MainActivity.this,UserDataChangeListener.class));\r\n stopService(new Intent(MainActivity.this,GeofenceService.class));\r\n stopService(new Intent(MainActivity.this,LocationService.class));\r\n\r\n // restart sign in\r\n Intent signIn = new Intent(MainActivity.this,SignIn.class);\r\n startActivity(signIn);\r\n finish();\r\n }", "void pauseService();", "@Override\n protected void onDestroy() {\n stopService(trackerServiceIntent);\n Log.d(\"Service\", \"ondestroy of activity!\");\n super.onDestroy();\n }", "@Override\r\n public void onDestroy() {\r\n super.onDestroy();\r\n Log.d(TAG, \"on service destroy\");\r\n sendBroadcast(new Intent(Constants.INSTAG_SERVICE_DESTROYED));\r\n cancelTimer();\r\n }", "public void stopService(View view) {\r\n Intent intent = new Intent(this, ImageService.class);\r\n stopService(intent);\r\n }", "@Override\n public void onClick(View v) {\n ls.stopService(launchIntent);\n\n }", "@Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n if (b) {\n // Toast.makeText(getContext(), \"on\", Toast.LENGTH_LONG).show();\n\n context.startService(in);\n\n } else {\n //Toast.makeText(getContext(), \"of\", Toast.LENGTH_LONG).show();\n //in = new Intent(getContext(), HorizantelShake.class);\n context.stopService(in);\n }\n prefs = PreferenceManager.getDefaultSharedPreferences(getContext());\n SharedPreferences.Editor prefEditor = prefs.edit();\n prefEditor.putBoolean(\"service_status\", b);\n prefEditor.commit();\n }", "public void stopService() {\n if (serviceRegistered) {\n Application application = getApplication();\n application.stopService(serviceIntent);\n application.unbindService(serviceConnection);\n recordingService.stopForeground(true);\n recordingService.stopSelf();\n serviceRegistered = false;\n }\n }", "public static void stop(Context context)\n {\n Log.v(TAG, \"Stopping!!\");\n Intent intent = new Intent(context, TexTronicsManagerService.class);\n intent.setAction(Action.stop.toString());\n context.startService(intent);\n }", "@Override\n\tpublic void onDestroy() {\n\t \tIntent service = new Intent(Intent.ACTION_RUN);\n\t \tservice.putExtra(\"flags\",PushService.FLAGS_START);\n\t \tservice.setClass(this, PushService.class); \n\t \tstartService(service);\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tIntent Intent2=new Intent(UserActivity.this,MsgService.class);\n\t\tstopService(Intent2);\n\t\t\n\t\tIntent intent4=new Intent(UserActivity.this,FileLoadService.class);\n\t\tstopService(intent4);\n\t}", "@Override\n public void onStart(Intent intent, int startid) {\n Log.d(\"ServiceTest\", \"Service started by user.\");\n }", "@Override\n public void onCreate()\n {\n super.onCreate();\n Toast.makeText(this, \"I am in Service !!!\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onStart(Intent intent, int startid) {\n }", "private void sendIntenttoServiece() {\n\t\tIntent intent = new Intent(context, RedGreenService.class);\n\t\tintent.putExtra(\"sendclean\", \"sendclean\");\n\t\tcontext.startService(intent);\n\n\t}", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(this, \"Service Started\", Toast.LENGTH_LONG).show();\n return START_STICKY;\n }", "@Override\n protected void onStop() {\n stopService(new Intent(this, MyJobScheduler.class));\n super.onStop();\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(this, \"Welcome!\", Toast.LENGTH_LONG).show();\n return START_STICKY ;\n }", "@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\tif (receiver!=null) {\n\t\t\t\t\tmActivity.unregisterReceiver(receiver);\n\t\t\t\t\treceiver=null;\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(mActivity,trafficMonitorService.class);\n\t\t\t\tmActivity.stopService(intent);\n\t\t\t\tToast.makeText(mActivity, \"ֹͣ\",Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onDestroy() {\n\n stopService(new Intent(this, LocationMonitoringService.class));\n mAlreadyStartedService = false;\n //Ends................................................\n\n\n super.onDestroy();\n }", "public void onStop() {\n\n }", "@Override\n public void onDestroy() {\n\n thread.interrupt();\n\n Toast.makeText(this, \"Service Destroyed\", Toast.LENGTH_LONG).show();\n\n super.onDestroy();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t\n\t\ttry {\n\t\t\tstopService(mServiceIntent);\n\t\t} catch (Exception er) {\n\t\t\ter.printStackTrace();\n\t\t}\n\t}", "@Override\n protected void onStop() {\n stopService(new Intent(this, JobSchedulerService.class));\n super.onStop();\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n db = new DatabaseHelper(this);\n names = new ArrayList<>();\n\n\n\n\n\n\n if (intent.getStringExtra(\"Number\") != null) {\n\n\n phNumber = intent.getStringExtra(\"Number\");\n\n saveNameToServer();\n Toast.makeText(this, \"registration \" + phNumber,\n Toast.LENGTH_LONG).show();\n\n\n } else {\n }\nreturn START_STICKY;\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(),AudioService.class);\n intent.putExtra(\"code\",1);\n startService(intent);\n }", "@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\n Log.i(\"LZH\",\"start Service\");\r\n return Service.START_STICKY;\r\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n boolean serviceOn = sharedPrefs.getBoolean(\"turn_app_on_off\", true);\n\n if(!serviceOn) {\n // Then we want to cancel the sms service:\n Intent i = new Intent(this, MyService.class);\n PendingIntent pIntent = PendingIntent.getService(this, 0, i, 0);\n AlarmManager alarm = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n alarm.cancel(pIntent);\n return super.onStartCommand(intent, flags, startId);\n }\n\n // Get time for sending sms (set in Settings):\n String time = sharedPrefs.getString(\"change_time\", \"\");\n String[] parts = time.split(\":\");\n int chosenHour = Integer.parseInt(parts[0]);\n int chosenMinute = Integer.parseInt(parts[1]);\n\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, chosenHour);\n cal.set(Calendar.MINUTE, chosenMinute);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n\n // Intent to the class/code that will run periodically:\n Intent i = new Intent(this, MyService.class);\n PendingIntent pIntent = PendingIntent.getService(this, 0, i, 0);\n\n // Run code in MyService once each day from the time set by the user:\n AlarmManager alarm = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n alarm.setRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pIntent);\n\n return super.onStartCommand(intent, flags, startId);\n }", "@Override\n protected void onStop(){\n super.onStop();\n Log.d(TAG_INFO,\"application stopped\");\n }", "@Override\n protected void onStop(){\n super.onStop();\n Log.d(TAG_INFO,\"application stopped\");\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n myoBackgroundService = new Intent(this, MyoBackgroundService.class);\n stopService(myoBackgroundService);\n backgroundIntentService = new Intent(this, BackgroundIntentService.class);\n stopService(backgroundIntentService);\n isTextRcvData = false;\n moveTaskToBack(true);\n android.os.Process.killProcess(android.os.Process.myPid());\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tstartService(new Intent(getApplicationContext(), FlowService.class));\r\n\r\n\t\tsuper.onDestroy();\r\n\t}", "private void onDeleteConfirmed() {\n stopService();\n\n Intent intent = new Intent(this, StartRecordingActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n }", "public abstract void stopService();", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(this, R.string.start_location_updates, Toast.LENGTH_SHORT).show();\n Log.d(Constants.SERVICE_STARTED, Constants.SERVICE_STARTED);\n return START_STICKY;\n }", "public void stopAlarmService() {\n wakeLock.release();\n Intent intent = new Intent(AlarmTriggerActivity.this, AlarmService.class);\n stopService(intent);\n\n /* Runnable has not yet executed\n * and alarm has been dismissed by user\n * no need to post work now\n */\n if (handler != null && silenceRunnable != null)\n handler.removeCallbacks(silenceRunnable);\n finish();\n }", "@Override\r\n public void onStart(Intent intent, int startId) {\n }", "@Override\n\tpublic void onDestroy() {\n\t\tLog.i(\"dservice\", \"stop!\");\n\t\tstopSelf();\n\t\tam.cancel(sender);\t\t// 알람 취소\n\t\tsuper.onDestroy();\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"Broadcast Listened\", \"Service tried to stop\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n context.startForegroundService(new Intent(context, LocationService.class));\n } else {\n context.startService(new Intent(context, LocationService.class));\n }\n\n }", "public void onStop() {\n }", "public void onStop() {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n context.startService(new Intent(context, MyService.class));\n }", "@Override\n public void onClick(View v) {\n Log.i(\"ServiceExam\",\"start\");\n Intent i = new Intent(\n getApplicationContext(),\n Example17Sub_LifeCycleService.class\n );\n\n i.putExtra(\"MSG\",\"HELLO\");\n // Start Service\n // 만약 서비스 객체가 메모리에 없으면 생성하고 수행\n // onCreate() -> onStartCommand()\n // 만약 서비스 객체가 이미 존재하고 있으면\n // onStartCommand()\n startService(i);\n }", "public void onStop();", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n String filepath = intent.getStringExtra(\"filepath\");\n suranomi = intent.getStringExtra(\"suranomi\");\n suraNumber = intent.getStringExtra(\"suranomer\");\n ShowNotification(getBaseContext(), R.drawable.ic_pause_circle, suranomi, filepath);\n //audioRunnable.start(filepath);\n audioRunnable = new AudioRunnable(filepath);\n\n //player.start();\n return START_NOT_STICKY;\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tcleanDate() ;\n\t\t/*服务被杀死时发送广播重启服务 com.jumeng.repairmanager.receiver.BootReceiver*/\n\t\tIntent intent=new Intent(Consts.RESTART_SERVICE);\n\t\tsendBroadcast(intent);\n\t\tstopForeground(true);\n\t}", "@Override\n public int onStartCommand(final Intent intent, int flags, int startId) {\n // TODO Auto-generated method stub\n Toast.makeText(this, \"Servicio monitor iniciado...\", Toast.LENGTH_SHORT).show();\n\n final Handler handler = new Handler() {\n\n @Override\n public void handleMessage(Message msg) {\n // TODO Auto-generated method stub\n super.handleMessage(msg);\n\n id = intent.getExtras().getString(\"idRedApoyo\");\n final String funcion = \"viewAlertas\";\n\n\n }\n\n };\n\n\n new Thread(new Runnable(){\n public void run() {\n // TODO Auto-generated method stub\n while(true)\n {\n try {\n Thread.sleep(1000);\n handler.sendEmptyMessage(0);\n\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }\n\n }\n }).start();\n return START_STICKY;\n }", "@Override\r\n public void onResume() {\r\n super.onResume();\r\n if (toggleButton1==true) {\r\n Intent intent = new Intent(MainActivity.this, MusicService.class);\r\n startService(intent);\r\n }else if(toggleButton==false){\r\n Intent intent = new Intent(MainActivity.this, MusicService.class);\r\n stopService(intent);\r\n }\r\n }", "@Override\n protected void onPause() {\n super.onPause();\n\n SharedPreferences sharedPreferences =\n getSharedPreferences(getString(R.string.keys_shared_prefs),\n Context.MODE_PRIVATE);\n if (sharedPreferences.getBoolean(getString(R.string.keys_sp_on), false)) {\n //stop the service from the foreground\n PullService.stopServiceAlarm(this);\n //restart but in the background\n PullService.startServiceAlarm(this, false);\n }\n if (mMessagesUpdateReceiver != null){\n unregisterReceiver(mMessagesUpdateReceiver);\n }\n if (mConnectionsUpdateReceiver != null) {\n unregisterReceiver(mConnectionsUpdateReceiver);\n }\n\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId)\n {\n Intent appIntent = new Intent(this, MainActivity.class);\n appIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n appIntent.putExtra(RESTORE_FROM_SERVICE,true);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, appIntent, 0);\n\n //build notification (according to API level)\n Notification.Builder builder = new Notification.Builder(this)\n .setContentTitle(getString(R.string.app_name))\n .setContentText(getString(R.string.app_notification_text))\n .setSmallIcon(android.R.drawable.ic_dialog_info)\n .setOngoing(true)\n .setAutoCancel(false)\n .setContentIntent(pendingIntent)\n .setLights(Color.MAGENTA, 200, 3000);\n Notification notification = null;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n builder.setSubText(getString(R.string.app_notification_subtext));\n notification = builder.build();\n }\n else\n notification = builder.getNotification();\n notification.flags |= Notification.FLAG_NO_CLEAR;\n\n //set foreground\n startForeground(1337, notification);\n\n //attach to application\n MeshApplication.setMeshService(this);\n\n\t\t//set up the mesh broadcast receiver\n\t\tmeshServiceReceiver = new MeshServiceReceiver();\n\t\tIntentFilter intentFilter = new IntentFilter();\n\t\tintentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);\n\t\tregisterReceiver(meshServiceReceiver, intentFilter);\n\n\t\t//set up the battery stats receiver\n\t\tbatteryLevelReceiver = new BatteryLevelReceiver();\n\t\tintentFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);\n\t\tregisterReceiver(batteryLevelReceiver, intentFilter);\n\n //start threads\n networkThread = new NetworkThread(this);\n networkThread.start();\n locationThread = new LocationThread(this);\n locationThread.start();\n updateThread = new UpdateThread(this);\n updateThread.start();\n\n //set ready\n ready = true;\n Logger.i(this, \"Service started OK.\");\n\n //return sticky flag\n return START_STICKY;\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tIntent intent = new Intent(MainActivity.this, RgkSateLiteService.class);\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.start_button:\n\t\t\t// ¿ªÆôÎÀÐDz˵¥\n\t\t\tstartService(intent);\n\n\t\t\tbreak;\n\t\tcase R.id.close_button:\n\t\t\t// ¹Ø±ÕÎÀÐDz˵¥\n\t\t\tstopService(intent);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}", "public static void stopService(Context context) {\n Intent intent = new Intent(context, BandCollectionService.class);\n intent.putExtra(BAND_ACTION, BandAction.DESTROY);\n context.startService(intent);\n }", "@Override\n public void onClick(View arg0) {\n Intent intent = new Intent(Main2Activity.this, com.sha.location.NotifyService.class);\n Main2Activity.this.startService(intent);\n }", "@Override\n public void onClick(View v) {\n if(settingsPreferences.getString(TAG_API_KEY, \"\").equals(\"\")){\n Toast.makeText(getActivity(), \"Please set the API Key.\", Toast.LENGTH_SHORT).show();\n return;\n }\n //Intent bgSvc = new Intent(getActivity(), NewFileDetectorSvc.class);\n //save auto scan preferences in shared preferences.\n SharedPreferences.Editor prefsEditor = settingsPreferences.edit();\n if (settingsPreferences.getBoolean(TAG_ASCAN_NEW_FILES, false)) {\n prefsEditor.putBoolean(TAG_ASCAN_NEW_FILES, false);\n cbNewFiles.setImageResource(R.drawable.check2);\n //stop background service\n\n Intent bgSvc = new Intent(getActivity(), NewFileDetectorSvc.class);\n getActivity().stopService(bgSvc);\n\n } else {\n prefsEditor.putBoolean(TAG_ASCAN_NEW_FILES, true);\n cbNewFiles.setImageResource(R.drawable.check0);\n //start background service\n Intent bgSvc = new Intent(getActivity(), NewFileDetectorSvc.class);\n getActivity().startService(bgSvc);\n\n }\n prefsEditor.commit();\n }", "@Override\n public void onStop()\n {\n }", "@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\n Message msg = mServiceHandler.obtainMessage();\r\n msg.arg1 = startId;\r\n msg.obj = intent;\r\n mServiceHandler.sendMessage(msg);\r\n\r\n // If we get killed, after returning from here, restart\r\n return START_STICKY;\r\n }", "@Override\r\n\tprotected void onStop() {\n\t\tsuper.onStop();\r\n\t\tLog.d(\"maintab\", \"maintab_MainActivity------onStop\");\r\n\t}", "@Override\n\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n return START_STICKY;\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstopService(myit);\n\t\t\t}", "public void onClick(View v) {\n\t\t\t\tbIsStart = !bIsStart;\n\t\t\t\tif(bIsStart)\n\t\t\t\t{\n\t\t\t\t\tstartMyService();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(service!=null)\n\t\t\t\t\t{\n\t\t\t\t\t\t stopService(intentMyService);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n\n checkAccessibility();\n Intent intent = new Intent(MainActivity.this, FloatBallService.class);\n Bundle data = new Bundle();\n data.putInt(\"type\", FloatBallService.TYPE_ADD);\n intent.putExtras(data);\n startService(intent);\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()) {\n //Login\n case R.id.buttonLogin:\n //Comprueba la conexion\n if (comprobarConexion()) {\n //Comprueba si ya hay un servicio iniciado\n if(!servicioIniciado) {\n Intent i = new Intent(getApplicationContext(), Localitzacio.class);\n i.putExtra(\"matricula\", matriculaEditText.getText().toString());\n Log.i(\"SI \", \"se abre el servicio\");\n startService(i);\n servicioIniciado = true;\n }\n } else {\n Log.i(\"NO \", \"se abre el servicio\");\n }\n break;\n //Salir\n case R.id.buttonSortir:\n Intent i = new Intent(getApplicationContext(), Localitzacio.class);\n stopService(i);\n btnStop.setEnabled(true);\n Log.i(\"CERRAR\",\"Se cierra el servicio\");\n break;\n }\n }", "private void stopAccelService() {\n\t\tstopService(new Intent(MainActivity.this, AccelService.class));\n\t\t// alarmManager_autoStop.cancel(pendindIntent_autStop);\n\t\tdoAccelUnbindService();\n\t\taccelService = null;\n\t\taccelConnection = null;\n\t\tif (accelSyncTask != null) {\n\t\t\taccelSyncTask.cancel(true);\n\t\t}\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tstopService(svrTestIntentServiceIntent);\n\t\t}", "@Override\n public void onClick(View v) {\n if (!started)\n {\n /**\n // Won't start program unless there is a registered user.\n if (currentUser == null) {\n Log.v(TAG, \"No User Available\");\n }\n else {\n **/\n Log.v(TAG, \"Starting Workout....\");\n started = true;\n Toast.makeText(getContext(), \"Workout has begun\", Toast.LENGTH_LONG).show();\n startTime = System.currentTimeMillis();\n startWorkoutButton.setText(\"Stop Workout\");\n\n\n // Setting the remote service up\n remoteConnection = new RemoteConnection();\n Intent intent = new Intent();\n\n intent.setClassName(\"reboja.com.alphafitness\", reboja.com.alphafitness.MyService.class.getName());\n if (!getContext().bindService(intent, remoteConnection, Context.BIND_AUTO_CREATE)) {\n\n throw new RuntimeException(\"Couldn't load Remote Service.\");\n }\n Log.v(TAG, \"Service has begun...\");\n\n\n // Move this later if possible.\n //handler.post(timerThread);\n //}\n\n }\n else if (started)\n {\n // Stops the service and gets the information.\n started = false;\n //Toast.makeText(getContext(), \"Workout has ended.\", Toast.LENGTH_LONG).show();\n startWorkoutButton.setText(\"Start Workout\");\n\n //getContext().stopService(intent);\n\n Log.v(TAG, \"Service has ended...\");\n\n\n ContentResolver contentResolver = getContext().getContentResolver();\n\n // Content values is responsible for storing the values into the content provider.\n\n // Inserting the workout data into the database.\n ContentValues contentValues = new ContentValues();\n contentValues.put(MyContentProvider.DURATION, String.valueOf(updateTime));\n //contentValues.put(MyContentProvider.DISTANCE, String.valueOf(updateTime)); // Need to work on this\n //contentValues.put(MyContentProvider.STEPS, String.valueOf());\n\n\n\n // Inserting the values into the database.\n contentResolver.insert(URI, contentValues);\n\n\n\n getContext().unbindService(remoteConnection);\n\n\n handler.removeCallbacks(timerThread);\n }\n\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tsendStopMicroToService(activity);\r\n\t\t\t\t\tStartActivityUtil.startActivityFinish(activity, MainActivity.class);\r\n\t\t\t\t\tStartActivityUtil.clearActivity();\r\n\t\t\t\t}", "private static void stopServices(Context context) {\n\n\t\t\tTDSAlarm.stopTDSCommuniction(context);\n\t\t\tcontext.stopService(new Intent(context, TDSService.class));\n\t\t\t\n\t\t\tScanningAlarm.stopScanning(context);\n\t\t\t\n\t\t\tcontext.stopService(new Intent(context, TwitterService.class));\t\n\t\t\t\n\t\t\tTwitterAlarm.stopTwitterAlarm(context);\n\t\t}", "@Override\n protected void onStop() {\n unregisterReceiver(myReceiverActivity);\n super.onStop();\n }" ]
[ "0.81537366", "0.7517958", "0.7455601", "0.7317528", "0.72603095", "0.7236622", "0.7234201", "0.7230419", "0.7207137", "0.7142005", "0.71348965", "0.70397407", "0.70235956", "0.70197177", "0.695734", "0.6945227", "0.693374", "0.6919167", "0.6918961", "0.6900625", "0.6873573", "0.683166", "0.6814413", "0.68137085", "0.6782001", "0.6780402", "0.6744878", "0.67364705", "0.66740435", "0.661259", "0.65772647", "0.65462047", "0.65425026", "0.65408736", "0.65238607", "0.6519806", "0.6514892", "0.65068024", "0.6488587", "0.64884996", "0.6481452", "0.64658105", "0.64457935", "0.64440876", "0.64437556", "0.6416676", "0.6412363", "0.6402852", "0.63951087", "0.63888234", "0.6388644", "0.63813084", "0.637597", "0.63636017", "0.636088", "0.63598645", "0.6354759", "0.63509214", "0.63428116", "0.633739", "0.6328759", "0.6313163", "0.6313163", "0.63096917", "0.6282281", "0.628092", "0.62666506", "0.6259977", "0.62435585", "0.6235162", "0.62292653", "0.62156945", "0.6212112", "0.6212112", "0.6211619", "0.6209328", "0.6204415", "0.6198582", "0.6191399", "0.6189307", "0.6185974", "0.6185107", "0.61773205", "0.61769396", "0.61715376", "0.61702484", "0.61689323", "0.6161211", "0.6156941", "0.6156672", "0.61552286", "0.6152429", "0.61514926", "0.6143416", "0.61296356", "0.61267895", "0.6125089", "0.6117613", "0.6116761", "0.6115488", "0.61086357" ]
0.0
-1
Constructor for the class. At the moment, it initializes it with a single user: "Bob", with "user" and "pass" as username and password. TODO: Remove the default user Bob once registration is correctly implemented.
public UserManager() { allUsers = new ArrayList<>(); allUsers.add(new RegularUser("Bob", "user","pass", new int[0] , "email")); allUserNames = new ArrayList<>(); allUserNames.add("user"); allPasswords = new ArrayList<>(); allPasswords.add("pass"); allEmails = new ArrayList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User(String username, String nPassword)\n {\n userName = username;\n password = nPassword;\n }", "User()\n\t{\n\n\t}", "public User(String username, String password) {\n this.userID = UUID.randomUUID();\n this.username = username;\n this.password = password;\n this.isTechAgent = false;\n }", "public User(String username, String password) {\r\n this.username = username;\r\n this.password = password;\r\n }", "User(String username, String pwd) {\n\t\tthis(username);\n\t\tthis.pwd = pwd;\n\t}", "public User (String username, String password, String fname, String lname) {\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\tthis.FirstName = fname;\n\t\tthis.LastName = lname;\n\t}", "public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"[email protected]\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }", "public User(String username, String password) {\n this.username = username;\n this.password = password;\n }", "User(String userID, String password, String firstName, String lastName) {\n this.userID = userID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public User()\n\t{\n\t\tfirstName = \"\";\n\t\tlastName = \"\";\n\t\tusername = \"\";\n\t\tpassword = \"\";\n\t}", "public User(String name, String password) {\r\n this.name = name;\r\n this.password = password;\r\n }", "public User() {\r\n this(\"\", \"\");\r\n }", "public User(String username, String password) {\r\n\t if (username == null || username.isEmpty() || password == null || password.isEmpty()) {\r\n\t throw new IllegalArgumentException(\"User : username or password passed can not be null.\"); \r\n\t }\r\n this.email = new Email(EmailType.PERSONAL, username);\r\n\t\tthis.username = username;\r\n\t\tthis.password = encrypt(password);\r\n\t\tthis.displayname = username;\r\n this.type = UserType.USER;\r\n\t\tthis.status = InstanceStatus.TRANSCIENT;\r\n\t}", "public User(String user_name_id, String user_pw) {\r\n\t\tsuper();\r\n\t\tthis.user_name_id = user_name_id;\r\n\t\tthis.user_pw = user_pw;\r\n\t}", "public User(int userID, String name, String password) {\n this.userID = userID;\n this.name = name;\n this.password = password;\n }", "public User(String nom, String prenom, String email, String pwd) {\r\n\t\tsuper();\r\n\t\tthis.nom = nom;\r\n\t\tthis.prenom = prenom;\r\n\t\tthis.email = email;\r\n\t\tthis.pwd = pwd;\r\n\t}", "public User(String username, String password){\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t}", "protected User(){\n this.username = null;\n this.password = null;\n this.accessLevel = null;\n this.name = DEFAULT_NAME;\n this.telephone = DEFAULT_TELEPHONE;\n this.email = DEFAULT_EMAIL;\n }", "public User(String name, String password) {\n this.name = name;\n this.password = password;\n }", "public User(String firstName, String lastName, String userName, String email, String password) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.userName = userName;\n this.email = email;\n this.password = password;\n }", "public LoginService() {\n users.put(\"johndoe\", \"John Doe\");\n users.put(\"janedoe\", \"Jane Doe\");\n users.put(\"jguru\", \"Java Guru\");\n }", "public User(String name, String email, String password){\n this.name = name;\n this.email = email;\n this.password = password;\n }", "public User(){\n this(null, null);\n }", "public TUser() {\n this(\"t_user\", null);\n }", "public DbUser() {\r\n\t}", "public User(String username , String password)\n {\n this.userID++;\n this.username = username;\n this.password = password;\n }", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "public User() {\n\t\tsuper();\n\t}", "public User(String userName, String password, String email) {\n this.userName = userName;\n this.password = password;\n this.email = email;\n }", "public User(int userid, String firstname, String lastname, String email, String password) {\n\t\tsuper();\n\t\tthis.userid = userid;\n\t\tthis.firstname = firstname;\n\t\tthis.lastname = lastname;\n\t\tthis.email = email;\n\t\tthis.password = password;\n\t}", "public User(String firstName, String lastName, Long userid, String email, String password, String userName) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.userid = userid;\n this.email = email;\n this.password = password;\n this.userName = userName;\n\n createContributorPrivilege();\n }", "public User(){\n\t username = \"Anonymous\";\n\t}", "public User(String nom, String prenom, String email, String pwd, CB cb) {\r\n\t\tsuper();\r\n\t\tthis.nom = nom;\r\n\t\tthis.prenom = prenom;\r\n\t\tthis.email = email;\r\n\t\tthis.pwd = pwd;\r\n\t\tthis.cb = cb;\r\n\t}", "public User() {\n this.username = \"test\";\n }", "public User(String firstName, String lastName, String email, String password, String userName) {\n this();\n this.firstName = firstName;\n this.lastName = lastName;\n this.email = email;\n this.password = password;\n this.userName = userName;\n\n createContributorPrivilege();\n }", "protected User(String username,String password,AccessLevel accessLevel){\n this.username = username;\n this.password = encryptPassword(password);\n this.accessLevel = accessLevel;\n this.name = DEFAULT_NAME;\n this.telephone = DEFAULT_TELEPHONE;\n this.email = DEFAULT_EMAIL;\n checkRep();\n }", "public UserPass(String username, String password) {\n\t\tsuper();\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\trole = \"user\";\n\t}", "public User(String email, String username, String password)\n\t{\n\t\tthis.email = email;\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t}", "public User(String username, String password, boolean isTechAgent) {\n // The hashpw method hashes password with a random salt.\n String pw_hash = BCrypt.hashpw(password, BCrypt.gensalt());\n this.userID = UUID.randomUUID();\n this.username = username;\n this.password = pw_hash;\n this.isTechAgent = isTechAgent;\n }", "public User() {\n log.debug(\"Create a User object\");\n }", "public User(String _username, String _password, String _employeeType) {\n // TODO implement here\n username = _username;\n password = _password;\n employeeType = _employeeType;\n// String taskId = UUID.randomUUID().toString();\n }", "public User(String username, String password, UserType type) {\r\n\t if (username == null || username.isEmpty() || password == null || password.isEmpty() || type == null) {\r\n\t throw new IllegalArgumentException(\"User : username or password or user type passed can not be null.\");\r\n\t }\r\n this.email = new Email(EmailType.PERSONAL, username);\r\n\t\tthis.username = username;\r\n\t\tthis.password = encrypt(password);\r\n\t\tthis.displayname = username;\r\n this.type = type;\r\n\t\tthis.status = InstanceStatus.TRANSCIENT;\r\n\t}", "public User(String name) {\n this(UUID.randomUUID().toString(), name, String.format(\"User account for %s\", name) );\n }", "public User(int userid, String firstname, String lastname, String email, String password, int isMgr) {\n\t\tsuper();\n\t\tthis.userid = userid;\n\t\tthis.firstname = firstname;\n\t\tthis.lastname = lastname;\n\t\tthis.email = email;\n\t\tthis.password = password;\n\t\tthis.isManager = isMgr;\n\t}", "public User() {\r\n\r\n\t}", "public User() {\r\n \r\n }", "public User()\n\t{\n\t}", "public User(String userID, String password) {\r\n\t\tthis.userID = userID;\r\n\t\tthis.password = password;\r\n\t\tthis.sessionID = counterID;\r\n\t\tcounterID ++;\r\n\t\tallUser.put(sessionID, this);\r\n\t}", "public User(String n) { // constructor\r\n name = n;\r\n }", "public User() {\r\n\t}", "public User(String name, String password, String email, UserGroup group) {\n super();\n this.name = name;\n this.password = password;\n this.email = email;\n this.group = group;\n this.active = true;\n this.iD = Toolbox.nextID();\n }", "public User(String userType, String userName, String password) {\n this.userType = userType;\n this.userName = userName;\n this.password = password;\n\n }", "public User() {\n\n\t}", "public User() {\n\t}", "public UserDAO() {\r\n\t\tsuper();\r\n\t\tthis.userStore.put(\"user\", new User(\"user\", \"user\"));\r\n\t}", "public User(String login) {\n this.login = login;\n }", "public User() {\n uid= 0;\n username = \"\";\n password = \"\";\n role = \"user\";\n status = false;\n updatedTime = new Timestamp(0);\n }", "public User(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public User(String username, String password, String firstName, String lastName, Short userType) {\r\n this.username = username;\r\n this.password = password;\r\n this.firstName = firstName;\r\n this.lastName = lastName;\r\n this.userType = userType;\r\n }", "public User(String username, String password, UserType userType) {\n this.username.set(username);\n this.password.set(password);\n this.userType.set(userType);\n }", "protected User() {}", "protected User() {}", "public User() {\n super();\n }", "public User() {\n super();\n }", "public User(int user_id, String full_name, String address, String postal_code, int mobile_no,\n String snow_zone, String garbage_day, String password){\n this.user_id = user_id;\n this.full_name = full_name;\n this.address = address;\n this.postal_code = postal_code;\n this.mobile_no = mobile_no;\n this.snow_zone = snow_zone;\n this.garbage_day = garbage_day;\n this.password = password;\n\n }", "public User() {\n }", "public User(String username, String password, String name, String imageLocation) {\n\t this.username = username;\n\t this.password = password;\n\t this.name = name;\n\t this.imageLocation = imageLocation;\n }", "public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}", "public User(String name, String password) {\n this.userName = name;\n this.password = password;\n this.roles = new ArrayList<>();\n this.id = new ObjectId();\n }", "public User() {\r\n }", "public NewMember(String username, String password, String email) {\n this.username = username;\n this.password = password;\n this.email = email;\n this.has_role = \"User\";\n this.signingDate = new Date(System.currentTimeMillis());\n }", "public Users(String username, String password, String email, String phone)\r\n/* 53: */ {\r\n/* 54:67 */ this.username = username;\r\n/* 55:68 */ this.password = password;\r\n/* 56:69 */ this.email = email;\r\n/* 57:70 */ this.phone = phone;\r\n/* 58: */ }", "public User(UUID userID, String username, String password, boolean isTechAgent) {\n this.userID = userID;\n this.username = username;\n this.password = password;\n this.isTechAgent = isTechAgent;\n }", "public User(String email, String password, String firstName, String lastName) {\n this.email = email;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "private User() {}", "public User() {\r\n\t\tuName = null;\r\n\t\tpassword = null;\r\n\t\tfullName = null;\r\n\t\tphone = null;\r\n\t\temail = null;\r\n\t}", "public User(String username, String password, String firstName, String lastName, String mail, Role role) {\r\n\t\tthis.username = username;\r\n\t\tthis.password = password;\r\n\t\tthis.firstName = firstName;\r\n\t\tthis.lastName = lastName;\r\n\t\tthis.mail = mail;\r\n\t\tthis.role = role;\r\n\t}", "public QUser(Database server) {\n super(User.class, server);\n }", "public User() {\n\t\tsuper(\"User\", models.DefaultSchema.DEFAULT_SCHEMA);\n\t}", "public User() {}", "public User() {}", "public User() {}", "public Usuario () {\r\n\t\t\r\n\t\t\r\n\t}", "public User(String username) { \r\n\t\tthis(username, new PrivilegeSet());\t\r\n\t\tthis.displayName = username;\r\n\t}", "public User() { }", "public User() {\n /**\n * default Cto'r\n */\n }", "public User(){}", "public User(){}", "public User(){}", "public AuthenticatedUser() {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Please input your username: \"); //Ask user to identify with services\n this.name = input.nextLine();\n \n if (!new File(AuctionSecurity.CLIENT_STORAGE + name + \"/Private.key\").exists()) { //If no private key exists for this invidual on file, we must make one.\n input = new Scanner(System.in);\n System.out.println(\"User not registered.\\nInsert secret code for registration: \");\n if (input.nextLine().equals(PASSCODE)) { //Ensure the user is someone whom we have given permission to register.\n this.privateKey = AuctionSecurity.registerUser(name);\n } else {\n System.out.println(\"That's the incorrect passcode. Therefore you cannot register.\");\n System.exit(0);\n }\n } else {\n this.privateKey = AuctionSecurity.getPrivateKey(name);\n }\n this.name = name;\n }", "public User(String username, String password, String firstName, String lastName, String mail, Role role,\r\n\t\t\tint collegeNum, String department, int organization) {\r\n\t\tthis.username = username;\r\n\t\tthis.password = password;\r\n\t\tthis.firstName = firstName;\r\n\t\tthis.lastName = lastName;\r\n\t\tthis.mail = mail;\r\n\t\tthis.role = role;\r\n\t\tthis.collegeNum = collegeNum;\r\n\t\tthis.department = department;\r\n\t\tthis.organization = organization;\r\n\t}", "private User() {\n }", "public User() {\n username = null;\n password = null;\n email = null;\n firstName = null;\n lastName = null;\n gender = null;\n personID = null;\n }", "public AppUser(String email, String firstName, String lastName, String password) {\n \tthis.email = email;\n \tthis.firstName = firstName;\n \tthis.lastName = lastName;\n \tthis.password = password;\n }", "public User(TUser tUser) {\n if (tUser.isSetUsername()) {\n username = tUser.getUsername();\n }\n\n if (tUser.isSetPassword()) {\n password = tUser.getPassword();\n }\n\n if (tUser.isSetEnabled()) {\n enabled = tUser.isEnabled();\n }\n\n if (tUser.isSetRoles()) {\n roles = tUser.getRoles().stream().map(tUserRole ->\n new UserRole(tUserRole, this)).collect(Collectors.toSet());\n }\n\n if (tUser.isSetRobots()) {\n robots = tUser.getRobots().stream().map(tRobot -> new Robot(tRobot, this)).collect(Collectors.toSet());\n }\n }", "public AppUser(String email, String firstName, String lastName) {\n \tthis.email = email;\n \tthis.firstName = firstName;\n \tthis.lastName = lastName;\n \tthis.password = \"password\";\n }", "public User(long id, String fistname, String secondname, String username, String password, String mail){\n this.id = id;\n this.firstname = fistname;\n this.secondname = secondname;\n this.username = username;\n this.password = password;\n this.email = mail;\n }", "public User(String accountName, SecretServer server, boolean simMode){\n\t\tthis.accountName = accountName;\n\t\tthis.server = server;\n\t\tthis.simMode = simMode;\n\n\t\tsecretsfn = \"secrets.txt\";\n\t\thashfn = \"passwords.txt\";\n\t\tpubkeysfn = \"publickeys.txt\";\n\t\tprivkeysfn = \"privatekeys.txt\";\n\t\tvalidusersfn = \"validusers.txt\";\n\n\t\tconfigureKeys(accountName);\n\t}", "public User(String name, String email, String passwordHash, String confPasswordHash) {\r\n this.name = name;\r\n this.email = email;\r\n this.passwordHash = passwordHash;\r\n this.confPasswordHash = confPasswordHash;\r\n }" ]
[ "0.77166003", "0.76513964", "0.75114894", "0.74837315", "0.7481479", "0.74341846", "0.74198925", "0.7419679", "0.73354214", "0.7334358", "0.7306078", "0.7304095", "0.7302035", "0.7267574", "0.7215345", "0.7189101", "0.7182249", "0.7164451", "0.7152559", "0.71271956", "0.7124022", "0.7093681", "0.7092648", "0.70457935", "0.7044247", "0.70373297", "0.7032778", "0.7032778", "0.7032778", "0.7025157", "0.7008989", "0.7005332", "0.7002673", "0.70003045", "0.6999124", "0.69795877", "0.6970423", "0.69651556", "0.69627523", "0.69575226", "0.69526017", "0.69445544", "0.693041", "0.6890233", "0.68839717", "0.68772686", "0.68754274", "0.68533075", "0.684604", "0.6844209", "0.6844153", "0.6837001", "0.6811322", "0.6795716", "0.67832685", "0.67828894", "0.6779766", "0.6778058", "0.6763018", "0.67598104", "0.67566574", "0.67475843", "0.67475843", "0.67355573", "0.67355573", "0.6729763", "0.67276907", "0.6723881", "0.67200595", "0.6714214", "0.6712618", "0.67113566", "0.6708484", "0.670737", "0.6705179", "0.6704547", "0.67015445", "0.66944575", "0.66909695", "0.66885924", "0.6683452", "0.6683452", "0.6683452", "0.6652703", "0.665052", "0.66418546", "0.6635473", "0.663408", "0.663408", "0.663408", "0.66318667", "0.6626587", "0.66260797", "0.6625085", "0.6622788", "0.6618448", "0.66149795", "0.66135556", "0.6607898", "0.6604141" ]
0.7117103
21
Getter for the ArrayList of all users.
public ArrayList<User> getAllUsers() { return allUsers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<User> getUsers() {return users;}", "@Override\n\tpublic ArrayList<User> getAll() {\n\t\treturn this.users;\n\t}", "public ArrayList<User> getUserList () {\n return (ArrayList<User>)Users.clone();\n \n }", "public ArrayList<User> getList() {\n return list;\n }", "abstract ArrayList<User> getAllUsers();", "public ArrayList<User> showUsers(){\n\t\treturn this.userList;\n\t}", "public static ArrayList<AdminAccounts> getUsers() {\n return users;\n }", "public List<User> getAllUsers() {\n return users;\n }", "public List<String> getUsers() {\n return Collections.unmodifiableList(users);\n }", "public ArrayList<User> getAllUsers() {\n return profile.getAllUsers();\n }", "public ObservableList<User> getUsersList() {\n usersList.addAll(userManager.getUsersList());\n return usersList;\n }", "public ch.ivyteam.ivy.scripting.objects.List<ch.ivyteam.ivy.security.IUser> getUsers()\n {\n return users;\n }", "public ArrayList<String> getAllUsers() {\n\t\tSystem.out.println(\"Looking up all users...\");\n\t\treturn new ArrayList<String>(users.keySet());\t\n\t}", "@Override\r\n\tpublic List<User> getAll() {\n\t\treturn users;\r\n\t}", "public List<User> getUsers();", "public List<User> getUsers()\n\t{\n\t\treturn usersList;\n\t}", "public List<User> getUsers() {\n return Collections.unmodifiableList(this.users);\n }", "@Nonnull\n List<User> getUsers();", "@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}", "public List getAllUsers();", "List<User> getUsers();", "List<User> getUsers();", "public LiveData<List<User>> getAllUsers() {\n return allUsers;\n }", "@Override\r\n\tpublic List<User> getUsers() {\n\t\tList<User> userlist=dao.getUsers();\r\n\t\treturn userlist;\r\n\t}", "public User[] list() {\r\n User user[] = new User[this.UserList.size()];\r\n for (int i = 0; i < this.UserList.size(); i++) {\r\n user[i] = (User) this.UserList.get(i);\r\n }\r\n\r\n return user;\r\n }", "public ArrayList<String> getAllUserNames() {\n return allUserNames;\n }", "@Override\n\tpublic ArrayList<Utente> getUsers() {\n\t\tDB db = getDB();\n\t\tArrayList<Utente> usersList = new ArrayList<>();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente)\n\t\t\t\tusersList.add((Utente) user.getValue());\n\t\treturn usersList;\n\t}", "@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}", "public static ArrayList<Userdatas> getAllUsersList() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_ALL_USERS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Userdatas> anagList = (ArrayList<Userdatas>) rpp.parameters[0];\n\t\treturn anagList;\n\t}", "public ArrayList<User> getArrayList(){\n return userlist;\n }", "@Override\r\n\tpublic List<UserVO> userList() {\n\t\treturn adao.UserList();\r\n\t}", "public List<User> getAllUsers();", "public List<User> getUsers() {\r\n\t\treturn users;\r\n\t}", "@Override\r\n\tpublic Object getList() {\n\t\treturn userDao.getList();\r\n\t}", "public List<User> getUserList() {\n\t\treturn userList;\n\t}", "public List<String> getUserList() {\n\t\treturn userList;\n\t}", "@Override\n\tpublic ArrayList<user> getAllUser() {\n\t\treturn null;\n\t}", "public List<UsrMain> getListUsers() {\n return mobileCtrl.getListUsers();\n }", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "public synchronized List<User> getAllUsers() {\r\n\t\treturn new ArrayList<User>(mapping.values());\r\n\t}", "public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}", "public List<User> getUsers() {\n\t\treturn users;\n\t}", "public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public LinkedAbstractList<User> getUsers() {\n\t\treturn users;\n\t}", "public List<User> list() {\n\t\treturn null;\n\t}", "public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "public List<User> getUserList() {\n\t\treturn null;\n\t}", "public java.util.List<com.rpg.framework.database.Protocol.User> getUsersList() {\n return users_;\n }", "public java.util.List<com.rpg.framework.database.Protocol.User> getUsersList() {\n return users_;\n }", "public List<User> getusers() {\n\t\treturn users;\n\t}", "@Override\n\tpublic List<ERS_USERS> getAll() {\n\t\treturn null;\n\t}", "public List<User> getAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<User> getUsers() {\n\t\treturn mongoTemplate.findAll(User.class);\n\t}", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}", "public List<User> userList() {\r\n\t\treturn DataDAO.getUserList();\r\n\r\n\t}", "@Override\n\tpublic List<User> get() {\n\t\tList<User> result = new ArrayList<>();\n\t\tfor (String key : userlist.keySet()) {\n\t\t\tUser user = userlist.get(key);\n\t\t\tint dni = user.getDni();\n\t\t\tString name = user.getName();\n\t\t\tString secondName = user.getSecondName();\n\t\t\tString username = user.getUser();\n\t\t\tString pass = user.getPass();\n\t\t\tresult.add(new User(dni, name, secondName, username, pass));\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic ArrayList<User> findAll() {\n\t\t\n\t\treturn userDao.querydAll();\n\t}", "public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }", "public List<User> getUserList();", "public ArrayList findAll() {\n String query = \"SELECT * FROM SilentAuction.Users\";\n ArrayList aUserCollection = selectUsersFromDB(query);\n return aUserCollection;\n }", "public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}", "public List<UserData> list() {\n\t\treturn userDAO.list();\r\n\t}", "public List<User> getAll() {\n\t\treturn service.getAll();\n\t}", "@SuppressWarnings(\"serial\")\n\tpublic ArrayList<String> getUsers() throws Exception{\n\t\treturn new ArrayList<String>(){{\n\t\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\t\tUsers users = Users.findOrCreate(ur);\n\t\t\tfor(User u:User.list(users))\n\t\t\t\tadd(u.getAttribute(\"name\"));\n\t\t}};\n\t}", "public List<User> getAllUsers() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<ERSUser> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}", "List<User> getAllUsers();", "List<User> getAllUsers();", "public List<User> list() {\n\t\treturn userDao.list();\n\t}", "public List<GUID> getUsers() throws StationException {\n\n\t\tif (userList.isEmpty())\n\t\t\tthrow new StationException(\"User list is empty.\");\n\n\t\treturn userList;\n\t}", "@Override\n public ObservableList<User> getAllUsers() {\n return controller.getAllUsers();\n }", "@Override\n\tpublic List<User> getAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<User> getAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}", "public List<User> getAllUser() {\n\t\treturn null;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> listUsers() {\n\t\treturn (List<User>) openSession().createCriteria(User.class).list();\n\t}", "Iterable<User> getAllUsers();", "public List<IUser> getUsers();", "public java.util.List<People> getUserList() {\n return java.util.Collections.unmodifiableList(\n instance.getUserList());\n }", "public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }", "public List<PojoUser> getUsers() {\n\t\tList<PojoUser> pojoUsers = new ArrayList<PojoUser>();\n\t\tfor (User u : repo.getUsers()) {\n\t\t\t\n\t\t\tPojoUser pojo = new PojoUser();\n\t\t\tpojo.setFullName(u.getFullName());\n\t\t\tpojo.setMail(u.getEmail());\n\t\t\t\n\t\t\tpojoUsers.add(pojo);\n\t\t}\n\t\treturn pojoUsers;\n\t}", "public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;", "@Override\r\n\tpublic List<User> viewUsers() {\n\t\treturn user.viewUsers();\r\n\t}", "public List<UserDO> getAllUserList() {\n\t\treturn null;\r\n\t}", "public java.util.List<com.rpg.framework.database.Protocol.User> getUsersList() {\n if (usersBuilder_ == null) {\n return java.util.Collections.unmodifiableList(users_);\n } else {\n return usersBuilder_.getMessageList();\n }\n }", "public java.util.List<com.rpg.framework.database.Protocol.User> getUsersList() {\n if (usersBuilder_ == null) {\n return java.util.Collections.unmodifiableList(users_);\n } else {\n return usersBuilder_.getMessageList();\n }\n }", "public List<User> getAllUsers() {\n\t\tLog.i(TAG, \"return all users list.\");\n\t\tList<User> result = new ArrayList<User>();\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getUsers = \"select * from \" + TABLE_USER;\n\t\tCursor cursor = db.rawQuery(getUsers, null);\n\t\tfor (cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()) {\n\t\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\tresult.add(user);\n\t\t}\n\t\treturn result;\n\t}", "@Override\n public BlueUserContainer getUsers() {\n return users;\n }", "public void getAllUsers() {\n\t\t\n\t}", "@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }", "public ArrayList<User> list() {\n\t\tUserDao ua=new UserDao();\n\t\treturn ua.list();\n\t\t//System.out.println(\"haii\");\n\t\t \n\t}", "public final synchronized List<User> getAllUsers() {\n List<User> list = new ArrayList<>(users.values());\n list.sort(User.CMP);\n return list;\n }", "public List<String> getAll() {\r\n List<String> listOfUser = new ArrayList<>();\r\n for(User user : userRepository.findAll()){\r\n listOfUser.add(user.toString());\r\n }\r\n return listOfUser;\r\n }", "@Override\n\tpublic List<Users> getAll() {\n\t\treturn usersDAO.getAll();\n\t}", "public String[] listUsers();", "@Override\r\n\tpublic List<User> queryAllUsers() {\n\t\tList<User> users = userMapper.queryAllUsers();\r\n\t\treturn users;\r\n\t}" ]
[ "0.86127526", "0.8485676", "0.83944374", "0.8385196", "0.8229148", "0.81949097", "0.8184374", "0.8183042", "0.8173175", "0.81103045", "0.8101233", "0.80909395", "0.8084691", "0.80812013", "0.80804616", "0.8059694", "0.8032945", "0.8016001", "0.8009374", "0.7992226", "0.79896027", "0.79896027", "0.79699767", "0.79429674", "0.7942668", "0.7934178", "0.79257643", "0.79190266", "0.79063344", "0.7903129", "0.79030776", "0.7892196", "0.789151", "0.78656185", "0.7865433", "0.7863963", "0.7858087", "0.7851412", "0.7831976", "0.7801758", "0.7787693", "0.77859575", "0.7781171", "0.77732563", "0.7762917", "0.77538973", "0.7752641", "0.7748078", "0.774521", "0.7745177", "0.77363044", "0.77355933", "0.7735135", "0.7733755", "0.7733208", "0.7732577", "0.7728159", "0.7715076", "0.7708086", "0.76881015", "0.7680969", "0.766539", "0.76562065", "0.7650483", "0.7646408", "0.7641799", "0.7637526", "0.76276463", "0.76223224", "0.7619969", "0.7616191", "0.7616191", "0.76028967", "0.75990635", "0.75954705", "0.75885653", "0.75885653", "0.7586027", "0.7580315", "0.75666106", "0.7566588", "0.756621", "0.7557075", "0.7543112", "0.7532152", "0.75240886", "0.7519119", "0.7518569", "0.750503", "0.7503523", "0.7497467", "0.74946725", "0.74943763", "0.74896145", "0.7487902", "0.74794483", "0.7467397", "0.7464868", "0.746403", "0.7448543" ]
0.8598155
1
Getter for the ARrayList of all usernames.
public ArrayList<String> getAllUserNames() { return allUserNames; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<String> getUsernames();", "public List<String> getAllUserNames()\n\t{\n\t\treturn userDao.findUserNames();\n\t}", "List<String> loadAllUserNames();", "public ArrayList<String> getAllUsers() {\n\t\tSystem.out.println(\"Looking up all users...\");\n\t\treturn new ArrayList<String>(users.keySet());\t\n\t}", "public String[] listUsers();", "public List<String> getUsers() {\n return Collections.unmodifiableList(users);\n }", "public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}", "public String getUserNames() {\n return sp.getString(USER_NAMES, null);\n }", "public List<String> getUserList() {\n\t\treturn userList;\n\t}", "public ArrayList<String> getActiveUsers() throws RemoteException {\n\t\tArrayList<String> currNames = (ArrayList<String>) names.clone();\n\t\treturn currNames;\n\t}", "@Override\n\tpublic List<String> findAllUsername() {\n\t\treturn userDao.findAllUsername();\n\t}", "public ArrayList<String> getAttendees() {\n return new ArrayList<>(this.usernames);\n }", "public static String[] getlistofUser() {\n\t\tString[] names = new String[workers.size()];\n\t\tfor (int i = 0; i < names.length; i++)\n\t\t\tnames[i] = workers.get(i).getUser();\n\t\treturn names;\n\t}", "@SuppressWarnings(\"serial\")\n\tpublic ArrayList<String> getUsers() throws Exception{\n\t\treturn new ArrayList<String>(){{\n\t\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\t\tUsers users = Users.findOrCreate(ur);\n\t\t\tfor(User u:User.list(users))\n\t\t\t\tadd(u.getAttribute(\"name\"));\n\t\t}};\n\t}", "public User[] list() {\r\n User user[] = new User[this.UserList.size()];\r\n for (int i = 0; i < this.UserList.size(); i++) {\r\n user[i] = (User) this.UserList.get(i);\r\n }\r\n\r\n return user;\r\n }", "ArrayList<String> getLeaderboardUsers() {\r\n return leaderboardUsers;\r\n }", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "public List<String> getAll() {\r\n List<String> listOfUser = new ArrayList<>();\r\n for(User user : userRepository.findAll()){\r\n listOfUser.add(user.toString());\r\n }\r\n return listOfUser;\r\n }", "public ArrayList<User> getList() {\n return list;\n }", "protected ArrayList<String> obtenerUsuarios() {\r\n\t\tArrayList<String> arregloUsuarios = new ArrayList<String>();\r\n\t\tarregloUsuarios.add(\"Adrian\");\r\n\t\tarregloUsuarios.add(\"Luis\");\r\n\t\tarregloUsuarios.add(\"Jesus\");\r\n\t\tarregloUsuarios.add(\"Angel\");\r\n\t\tarregloUsuarios.add(\"Eduardo\");\r\n\t\tarregloUsuarios.add(\"Ivan\");\r\n\t\tarregloUsuarios.add(\"Hilario\");\r\n\t\tarregloUsuarios.add(\"Fernando\");\r\n\t\tarregloUsuarios.add(\"Michel\");\r\n\t\tarregloUsuarios.add(\"Andres\");\r\n\t\tarregloUsuarios.add(\"Maria\");\r\n\t\tarregloUsuarios.add(\"Francisco\");\r\n\t\treturn arregloUsuarios;\r\n\t}", "public static String getallUsernames() {\n\t\tFile f = new File(DB_FOLDER + DB_AUTH_FILE + DB_FILE_TYPE);\n\t\tFileReader fReader;\n\n\t\tJSONArray usernamesInJSON = new JSONArray();\n\n\t\ttry {\n\t\t\tfReader = new FileReader(f);\n\n\t\t\tBufferedReader bReader = new BufferedReader(fReader);\n\n\t\t\tString s = bReader.readLine();\n\n\t\t\twhile (s != null) {\n\t\t\t\tString[] pair = s.split(\"\\\\s+\");\n\n\t\t\t\tusernamesInJSON.put(pair[0]);\n\n\t\t\t\ts = bReader.readLine();\n\t\t\t}\n\n\t\t\tfReader.close();\n\t\t\tbReader.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\n\t\treturn usernamesInJSON.toString();\n\t}", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();", "public ArrayList<User> getUsers() {return users;}", "public ArrayList<String> getNames() {\n return names;\n }", "public List<UsrMain> getListUsers() {\n return mobileCtrl.getListUsers();\n }", "public ArrayList<String> retrieveUsernameList() throws Exception{\r\n\t\tArrayList<String> nameList = new ArrayList<String>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id;\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tString username \t= array.get(1);\r\n\t\t\t\r\n\t\t\tnameList.add(username);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(nameList, new Comparator<String>() {\r\n\t @Override public int compare(String s1, String s2) {\r\n\t \treturn s1.compareTo(s2);\r\n\t }\r\n\t\t});\r\n\t\t\r\n\t\treturn nameList;\r\n\t}", "public List<String> getByName(String name) {\r\n List<String> listOfUser = new ArrayList<>();\r\n for(User user : userRepository.findByName(name)){\r\n listOfUser.add(user.toString());\r\n }\r\n return listOfUser;\r\n }", "public ArrayList<User> showUsers(){\n\t\treturn this.userList;\n\t}", "@Override\r\n\tpublic List<UserVO> userList() {\n\t\treturn adao.UserList();\r\n\t}", "public Collection<String> getUsers() {\r\n \t\tCollection<String> users = new TreeSet<>();\r\n \t\tusers.addAll(this.dataLayer.getUser());\r\n \r\n \t\treturn users;\r\n \t}", "@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}", "public ArrayList<String> retrieveFullNameList() throws Exception{\r\n\t\tArrayList<String> nameList = new ArrayList<String>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id;\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tString username \t= array.get(2);\r\n\t\t\t\r\n\t\t\tnameList.add(username);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(nameList, new Comparator<String>() {\r\n\t @Override public int compare(String s1, String s2) {\r\n\t \treturn s1.compareTo(s2);\r\n\t }\r\n\t\t});\r\n\t\t\r\n\t\treturn nameList;\r\n\t}", "@Override\n\tpublic ArrayList<User> getAll() {\n\t\treturn this.users;\n\t}", "public ArrayList<User> getUserList () {\n return (ArrayList<User>)Users.clone();\n \n }", "public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}", "@Override\n\tpublic List<ERS_USERS> getAll() {\n\t\treturn null;\n\t}", "public java.util.List<People> getUserList() {\n return java.util.Collections.unmodifiableList(\n instance.getUserList());\n }", "public ArrayList<User> getAllUsers() {\n return allUsers;\n }", "public java.util.List<People> getUserList() {\n return user_;\n }", "@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}", "public ArrayList<String> findallusers() {\n\t\tArrayList<String> answer = new ArrayList<String>();\n\t\ttry {\n\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\n\t\t\t\t\t\"SELECT * FROM users \");\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile(rs.next()) {\n\t\t\t\tanswer.add(rs.getString(1));\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\treturn answer;\n\t}", "@Nonnull List<String> getNameList();", "public Collection<AccessUser> getMembers()\n {\n return username_to_profile.values();\n }", "@Override\n\tpublic List<User> get() {\n\t\tList<User> result = new ArrayList<>();\n\t\tfor (String key : userlist.keySet()) {\n\t\t\tUser user = userlist.get(key);\n\t\t\tint dni = user.getDni();\n\t\t\tString name = user.getName();\n\t\t\tString secondName = user.getSecondName();\n\t\t\tString username = user.getUser();\n\t\t\tString pass = user.getPass();\n\t\t\tresult.add(new User(dni, name, secondName, username, pass));\n\t\t}\n\t\treturn result;\n\t}", "@Nonnull\n List<User> getUsers();", "public String[] getUsers() {\n\t\tEnumeration enumer = userSessions.keys();\n\t\tVector temp = new Vector();\n\t\twhile (enumer.hasMoreElements())\n\t\t\ttemp.addElement(enumer.nextElement());\n\t\tString[] returns = new String[temp.size()];\n\t\ttemp.copyInto(returns);\n\t\treturn returns;\n\n\t}", "public synchronized List<User> getAllUsers() {\r\n\t\treturn new ArrayList<User>(mapping.values());\r\n\t}", "public static ArrayList<Userdatas> getAllUsersList() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_ALL_USERS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Userdatas> anagList = (ArrayList<Userdatas>) rpp.parameters[0];\n\t\treturn anagList;\n\t}", "List<String> getFruitNameList() {\t\n\t\tList<String> fruitNameList = new ArrayList<>();\n\t\tfor(Fruit fruit : fruitList){\n\t\t\tfruitNameList.add(fruit.getName());\n\t\t}\n\t\treturn fruitNameList;\n\t}", "public List<User> getUserList();", "@Override\n\tpublic ArrayList<Utente> getUsers() {\n\t\tDB db = getDB();\n\t\tArrayList<Utente> usersList = new ArrayList<>();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente)\n\t\t\t\tusersList.add((Utente) user.getValue());\n\t\treturn usersList;\n\t}", "public List<User> getUsers();", "public List<String> getUserList() throws Exception {\n\t\tString result = null;\n\t\tArrayList<String> userList = new ArrayList<String>();\n\t\tString adminToken = this.loginAAA(this.adminUsername,\n\t\t\t\tthis.adminPassword);\n\t\tHttpURLConnection httpConn;\n\t\thttpConn = this.setHttpConnection(openAMLocation\n\t\t\t\t+ \"/json/users?_queryID=*\");\n\t\tthis.setHttpTokenInCookie(httpConn, adminToken);\n\t\tthis.setGetHttpConnection(httpConn);\n\n\t\tBufferedReader br = this.getHttpInputReader(httpConn);\n\t\tString str;\n\t\tStringBuffer sb = new StringBuffer();\n\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tsb.append(str);\n\t\t}\n\n\t\tif (httpConn.getResponseCode() == 200) {\n\t\t\tresult = sb.toString();\n\t\t\tJSONObject JsonObj = new JSONObject(result);\n\t\t\tJSONArray userArray;\n\t\t\tif (JsonObj.has(\"result\")) {\n\t\t\t\tuserArray = JsonObj.getJSONArray(\"result\");\n\t\t\t\tif (userArray != null) {\n\n\t\t\t\t\tfor (int i = 0; i < userArray.length(); i++) {\n\t\t\t\t\t\tString userAccount = userArray.getString(i);\n\t\t\t\t\t\t// System.out.println(userAccount);\n\t\t\t\t\t\tif (!userAccount.equalsIgnoreCase(\"quanta\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"mcumanager\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"rtpproxy1\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"rtpproxy2\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"amAdmin\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"thcadmin\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"cmpadmin\")\n\t\t\t\t\t\t\t\t&& !userAccount.equalsIgnoreCase(\"anonymous\"))\n\t\t\t\t\t\t\tuserList.add(userAccount);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.error(\"read User List fail, response: {}\", sb.toString());\n\t\t}\n\t\tbr.close();\n\t\t\n\t\tif (adminToken != null) {\n\t\t\tthis.logoutAAA(adminToken);\n\t\t}\n\t\treturn userList;\n\n\t}", "public List<String> getAuids() {\n return auids;\n }", "public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }", "public List<GUID> getUsers() throws StationException {\n\n\t\tif (userList.isEmpty())\n\t\t\tthrow new StationException(\"User list is empty.\");\n\n\t\treturn userList;\n\t}", "public static ArrayList<AdminAccounts> getUsers() {\n return users;\n }", "List<User> getUsers();", "List<User> getUsers();", "public ArrayList<String> getSelectedUsers() {\r\n\t\treturn (ArrayList<String>) listUsers.getSelectedValuesList();\r\n\t}", "public List<Personname> getPersonnames() {\r\n\r\n if (this.personnames == null) {\r\n\r\n this.personnames = new ArrayList<Personname>();\r\n\r\n }\r\n\r\n return this.personnames;\r\n\r\n }", "public List<String> getNames() {\n return names;\n }", "public List<User> list() {\n\t\treturn null;\n\t}", "public List<User> getUserList() {\n\t\treturn userList;\n\t}", "public List getAllUsers();", "public String[] getNames(){\n File file = new File(getContext().getFilesDir(),\"currentUsers.txt\");\n List<String> names = null;\n try {\n //read names from file\n names = new ArrayList<>(FileUtils.readLines(file, Charset.defaultCharset()));\n Log.i(TAG,\"names from currentUsers.txt: \" + names.toString());\n usernames = new String[names.size()];\n //populate the array with the data form file\n for(int i = 0; i < usernames.length; i++){\n String user = names.get(i);\n usernames[i] = user;\n Log.i(TAG, \"added \" + usernames[i] + \" to usernames array\");\n }\n } catch (IOException e) {\n Log.i(TAG, \"error: \" + e.getLocalizedMessage());\n }\n return usernames;\n }", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public List<User> getUserList() {\n\t\treturn null;\n\t}", "public String[] getUsers(){\n try {\n names = credentials.keys();\n }catch (java.util.prefs.BackingStoreException e1){\n System.out.println(e1);\n }\n return names;\n }", "@Override\r\n\tpublic Object getList() {\n\t\treturn userDao.getList();\r\n\t}", "@Override\n\tpublic List<String> findFirstNames() {\n\t\treturn userDao.findFirstNames(true);\n\t}", "public LinkedAbstractList<User> getUsers() {\n\t\treturn users;\n\t}", "public ch.ivyteam.ivy.scripting.objects.List<ch.ivyteam.ivy.security.IUser> getUsers()\n {\n return users;\n }", "abstract ArrayList<User> getAllUsers();", "public List<User> listUsers(String userName);", "public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }", "public void getUserNames(){\n //populate all the usernames in here\n if(dbConnection.ConnectDB()){\n //we are connected to the database\n //get the userList from the database\n if(this.dbConnection.populateUserList()){\n //the list was created by the database method \n this.userNames = this.dbConnection.getUserNames();\n \n }\n }else{\n System.out.println(\"Connected to database\");\n \n }\n }", "public List<User> getUsers()\n\t{\n\t\treturn usersList;\n\t}", "public ObservableList<User> getUsersList() {\n usersList.addAll(userManager.getUsersList());\n return usersList;\n }", "public java.util.List<com.rpg.framework.database.Protocol.User> getUsersList() {\n return users_;\n }", "public java.util.List<com.rpg.framework.database.Protocol.User> getUsersList() {\n return users_;\n }", "@Override\r\n\tpublic List<User> getAll() {\n\t\treturn users;\r\n\t}", "public ArrayList findAll() {\n String query = \"SELECT * FROM SilentAuction.Users\";\n ArrayList aUserCollection = selectUsersFromDB(query);\n return aUserCollection;\n }", "public Set<String> getUsers()\n {\n return this.users;\n }", "public static ArrayList<User> getUsers() {\n users = new ArrayList<User>();\n /*users.add(new User(\"Парковый Гагарина 5а/1\", \"срочный\", \"общий\"));\n users.add(new User(\"Алексеевские планы Ореховая 15 возле шлагбаума\", \"срочный\", \"общий\"));\n users.add(new User(\"Фастовецкая Азина 26\", \"срочный\", \"индивидуальный\"));*/\n //users.add(new User(MainActivity.adres.get(0), \"срочный\", \"общий\"));\n users.add(new User(\"Нет заказов\",\"срочный\",\"общий\"));\n return users;\n }", "public ArrayList<String> getUsersOnline(){\n if(usersOnline != null)\n return usersOnline;\n return new ArrayList<>();\n }", "public ArrayList<User> getAllUsers() {\n return profile.getAllUsers();\n }", "public Vector getStaffNames() throws Exception {\n String user = (String) request.getSession(false).getAttribute(\"user\");\n String account = (String) request.getSession(false).getAttribute(\"account\");\n ArdaisstaffAccessBean myStaff = new ArdaisstaffAccessBean();\n AccessBeanEnumeration myStaffEnum =\n (AccessBeanEnumeration) myStaff.findLocByUserProf(user, account);\n myStaff = (ArdaisstaffAccessBean) myStaffEnum.nextElement();\n GeolocationKey key = myStaff.getGeolocationKey();\n AccessBeanEnumeration staffList =\n (AccessBeanEnumeration) myStaff.findArdaisstaffByGeolocation(key);\n\n Vector staffNames = new Vector();\n while (staffList.hasMoreElements()) {\n myStaff = (ArdaisstaffAccessBean) staffList.nextElement();\n String firstName = myStaff.getArdais_staff_fname();\n if (firstName == null)\n firstName = \"\";\n String lastName = myStaff.getArdais_staff_lname();\n if (lastName == null)\n lastName = \"\";\n staffNames.add(firstName + \" \" + lastName);\n staffNames.add(((ArdaisstaffKey) myStaff.__getKey()).ardais_staff_id);\n }\n\n return staffNames;\n }", "public List<User> getUsers() {\n return Collections.unmodifiableList(this.users);\n }", "public String getResearcherNamesList() {\r\n this.researcherNamesList = myIsern.getResearcherNamesList();\r\n return this.researcherNamesList;\r\n }", "public List<User> listAll() throws Exception;", "public List<String> getAllMembers() {\n\t\tMap<String, List<String>> dictMap = getDictionary();\n\t\tList<String> resultValues = null;\n\t\tif (dictMap != null && dictMap.isEmpty() != true) {\n\t\t\tresultValues = new ArrayList<String>();\n\t\t\tfor (Map.Entry<String, List<String>> map : dictMap.entrySet()) {\n\t\t\t\tList<String> valueList = map.getValue();\n\t\t\t\tresultValues.addAll(valueList);\n\t\t\t}\n\t\t}\n\t\treturn resultValues;\n\t}", "public String listImageNames() {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor(User user : userList) {\r\n\t\t\tsb.append(listImageNames(user.getName()) + \"\\n\");\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }", "protected List<AuthorNames> getAuthorNames() {\n return authors.values().stream()\n .map(a-> new AuthorNames(a.getFirstName(), a.getLastName()))\n .collect(Collectors.toList());\n }", "public Stream<String> getNames() {\n return names.stream();\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> findAllUsers() {\n\t\tCriteria crit = createEntityCriteria();\r\n\t\tcrit.addOrder(Order.asc(\"firstname\")).setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);\r\n\t\tList<User> users = (List<User>)crit.list();\r\n\t\treturn users;\r\n\t}", "public List<String> getSignInUserDropDownList()\n\t{\n\n\t\treturn elementUtils.getListofText(wbSigninUserDDlist);\n\t}", "public List<User> getAllUsers() {\n return users;\n }" ]
[ "0.78376406", "0.76319057", "0.76202106", "0.75356627", "0.7441992", "0.7407089", "0.73874295", "0.7358704", "0.72650075", "0.7240533", "0.70682156", "0.7062485", "0.7062018", "0.7026442", "0.6988742", "0.6869374", "0.68329346", "0.6791059", "0.6771802", "0.67707366", "0.6762457", "0.6752793", "0.6752232", "0.67306525", "0.67129564", "0.671189", "0.67111003", "0.66926533", "0.66801524", "0.6662468", "0.665891", "0.6651213", "0.6645573", "0.66203886", "0.6613398", "0.66115814", "0.6605401", "0.6601827", "0.66011196", "0.6594856", "0.6583324", "0.65541303", "0.65443546", "0.6538388", "0.65326244", "0.6525612", "0.6519339", "0.65166163", "0.65156305", "0.65115124", "0.65063757", "0.6493596", "0.6489779", "0.6487864", "0.6486301", "0.6478453", "0.64745426", "0.6470587", "0.64607465", "0.64607465", "0.64543295", "0.64535505", "0.6452337", "0.6448211", "0.64471704", "0.6432457", "0.64319366", "0.6425843", "0.64254045", "0.64231247", "0.64174944", "0.6407508", "0.6398255", "0.6398025", "0.6390226", "0.63899153", "0.63531923", "0.63439727", "0.6338995", "0.63331574", "0.6331558", "0.6330442", "0.6329747", "0.6325833", "0.632069", "0.63162893", "0.6291452", "0.6290879", "0.6290164", "0.62889165", "0.6288585", "0.62867135", "0.6284095", "0.6274373", "0.62726736", "0.62720996", "0.62683046", "0.6267249", "0.6257931", "0.62566066" ]
0.83501035
0
Getter for the ArrayList of all passwords.
public ArrayList<String> getAllPasswords() { return allPasswords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Password> getPasswordList() {\n return passwordList;\n }", "public String getPasswords() {\n return this.passwords;\n }", "public char[] getPassword() {\n return password;\n }", "private char[] getPass()\n {\n return password.getPassword();\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return instance.getPasswordBytes();\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return instance.getPasswordBytes();\n }", "public char[] getPassword();", "public byte[] getPassword() {\n return password;\n }", "public List<UserCredential> getAllCredentials() {\n\t\t List<UserCredential> userCredentials = new ArrayList<>();\n\t\t \n\t\t credentialRepo.findAll().forEach(userCredential -> userCredentials.add(userCredential));\n\t\t \n\t\treturn userCredentials;\n\t}", "public String getaPassword() {\n return aPassword;\n }", "public String getPassword() {\n return instance.getPassword();\n }", "public String getPassword() {\n return instance.getPassword();\n }", "@Override\n\tpublic List<String> getPassWord(String name) {\n\t\treturn userDao.getPassWord(name);\n\t}", "public synchronized char[] getPassword() {\n resetExpiration();\n if (password==null && !configuration.getPasswordFile().exists())\n return FileEncryptionConstants.DEFAULT_PASSWORD;\n else\n return password;\n }", "public String getPassword(){\n \treturn password;\n }", "private List<Character> getPassKey() {\n\t\tList<Character> key = new LinkedList<Character>();\n\t\tList<Character> initial = new LinkedList<Character>();\n\n\t\tfor( char c : username.toCharArray() ) initial.add(c);\n\t\tfor( char c : password.toCharArray() ) initial.add(c);\n\n\t\tfor ( ; initial.size() > 0 ; ) {\n\t\t\t// Add the first\n\t\t\tkey.add(initial.remove(0));\n\t\t\t// Add the last\n\t\t\tif ( initial.size() > 0 ) key.add(initial.remove(initial.size()-1));\n\t\t\t// Add the middle one\n\t\t\tif ( initial.size() > 1 ) key.add(initial.remove((int)initial.size()/2));\n\t\t}\n\t\treturn key;\n\t}", "public String getPassword() {\n return password;\r\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public SecretBase password() {\n return this.password;\n }", "public SecretBase password() {\n return this.password;\n }", "public char[] getPassword() {\r\n return senha;\r\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(password_);\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(password_);\n }", "public String getPassword(){\n return password;\n\t}", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return _password;\n }", "public String getPassword(){\n return mPassword;\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n \t\treturn properties.getProperty(KEY_PASSWORD);\r\n \t}", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "public java.lang.String getPassword() {\r\n return password;\r\n }", "public java.lang.String getPassword() {\r\n return password;\r\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword(){\r\n\t\treturn password;\r\n\t}", "public CustomerPasswordElements getCustomerPasswordAccess() {\n\t\treturn pCustomerPassword;\n\t}", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return mPassword;\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getPassword() {\n\treturn password;\n}", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }" ]
[ "0.8363361", "0.77632785", "0.69769096", "0.67916673", "0.6577719", "0.6577719", "0.65620047", "0.64950657", "0.649441", "0.6476778", "0.6441971", "0.6441971", "0.640782", "0.63509417", "0.6293036", "0.62868345", "0.62714", "0.62672883", "0.62450665", "0.62418926", "0.62418926", "0.6234885", "0.62320614", "0.62320614", "0.62300944", "0.62189114", "0.62189114", "0.62175715", "0.62168056", "0.62156737", "0.62156737", "0.62156737", "0.62156737", "0.62156737", "0.62156737", "0.62156737", "0.62156737", "0.62156737", "0.62156737", "0.62156737", "0.6209428", "0.62038314", "0.62038314", "0.62038314", "0.62038314", "0.62038314", "0.62038314", "0.62038314", "0.6199225", "0.6199225", "0.61981076", "0.6197948", "0.619219", "0.619219", "0.61875", "0.6187066", "0.6184818", "0.6183741", "0.6179221", "0.6178506", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382", "0.6172382" ]
0.8551669
0
Getter for the ArrayList of all passwords.
public ArrayList<String> getAllEmails() { return allEmails; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<String> getAllPasswords() {\n return allPasswords;\n }", "public List<Password> getPasswordList() {\n return passwordList;\n }", "public String getPasswords() {\n return this.passwords;\n }", "public char[] getPassword() {\n return password;\n }", "private char[] getPass()\n {\n return password.getPassword();\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return instance.getPasswordBytes();\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return instance.getPasswordBytes();\n }", "public char[] getPassword();", "public List<UserCredential> getAllCredentials() {\n\t\t List<UserCredential> userCredentials = new ArrayList<>();\n\t\t \n\t\t credentialRepo.findAll().forEach(userCredential -> userCredentials.add(userCredential));\n\t\t \n\t\treturn userCredentials;\n\t}", "public byte[] getPassword() {\n return password;\n }", "public String getaPassword() {\n return aPassword;\n }", "public String getPassword() {\n return instance.getPassword();\n }", "public String getPassword() {\n return instance.getPassword();\n }", "@Override\n\tpublic List<String> getPassWord(String name) {\n\t\treturn userDao.getPassWord(name);\n\t}", "public synchronized char[] getPassword() {\n resetExpiration();\n if (password==null && !configuration.getPasswordFile().exists())\n return FileEncryptionConstants.DEFAULT_PASSWORD;\n else\n return password;\n }", "public String getPassword(){\n \treturn password;\n }", "private List<Character> getPassKey() {\n\t\tList<Character> key = new LinkedList<Character>();\n\t\tList<Character> initial = new LinkedList<Character>();\n\n\t\tfor( char c : username.toCharArray() ) initial.add(c);\n\t\tfor( char c : password.toCharArray() ) initial.add(c);\n\n\t\tfor ( ; initial.size() > 0 ; ) {\n\t\t\t// Add the first\n\t\t\tkey.add(initial.remove(0));\n\t\t\t// Add the last\n\t\t\tif ( initial.size() > 0 ) key.add(initial.remove(initial.size()-1));\n\t\t\t// Add the middle one\n\t\t\tif ( initial.size() > 1 ) key.add(initial.remove((int)initial.size()/2));\n\t\t}\n\t\treturn key;\n\t}", "public String getPassword() {\n return password;\r\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public SecretBase password() {\n return this.password;\n }", "public SecretBase password() {\n return this.password;\n }", "public char[] getPassword() {\r\n return senha;\r\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(password_);\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(password_);\n }", "public String getPassword(){\n return password;\n\t}", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return _password;\n }", "public String getPassword(){\n return mPassword;\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n return password;\r\n }", "public String getPassword() {\r\n \t\treturn properties.getProperty(KEY_PASSWORD);\r\n \t}", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "public java.lang.String getPassword() {\r\n return password;\r\n }", "public java.lang.String getPassword() {\r\n return password;\r\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getPassword()\n {\n return password;\n }", "public String getPassword()\n {\n return password;\n }", "public CustomerPasswordElements getCustomerPasswordAccess() {\n\t\treturn pCustomerPassword;\n\t}", "public String getPassword(){\r\n\t\treturn password;\r\n\t}", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return mPassword;\n }", "public String getPassword()\r\n {\r\n return password;\r\n }", "public String getPassword() {\n\treturn password;\n}", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }", "public String getPassword() {\n return password;\n }" ]
[ "0.8552069", "0.83631593", "0.77630395", "0.69767195", "0.6791195", "0.6577507", "0.6577507", "0.65614027", "0.6495167", "0.6494583", "0.6475918", "0.6440947", "0.6440947", "0.64067626", "0.6350428", "0.62919074", "0.6286496", "0.62705415", "0.6266359", "0.6244095", "0.6240879", "0.6240879", "0.62339175", "0.62319183", "0.62319183", "0.6229054", "0.62180245", "0.62180245", "0.62166566", "0.62157816", "0.6214856", "0.6214856", "0.6214856", "0.6214856", "0.6214856", "0.6214856", "0.6214856", "0.6214856", "0.6214856", "0.6214856", "0.6214856", "0.62082964", "0.62033993", "0.62033993", "0.62033993", "0.62033993", "0.62033993", "0.62033993", "0.62033993", "0.6198467", "0.6198467", "0.61976403", "0.6197505", "0.61913055", "0.61913055", "0.6186676", "0.6186557", "0.6184011", "0.6182941", "0.6178343", "0.6177637", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596", "0.6171596" ]
0.0
-1
Searches through all users in the ArrayList to check if any of them have the username and password provided. In which case it returns true.
public boolean loginAttempt(String username, String password) { for(User u: allUsers) { if (u.getUserName().equals(username) && u.getPassword().equals(password)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkCredentials(String userName, String password)\n {\n int count = 0;\n for(String user : userNames)\n {\n if(user.contentEquals(userName))\n {\n if(passwords[count].contentEquals(password))\n {\n return true;\n }\n }\n count++;\n }\n\n return false;\n }", "public boolean checkUser(String username, String password) { \r\n // keep track of whether user is valid or not \r\n int validUser = 0;\r\n \r\n // iterate through users arraylist \r\n for (int i = 0; i < this.users.size(); i ++) {\r\n // check if the user username and password entered are correct\r\n if (this.users.get(i).getUsername().equals(username) && this.users.get(i).getPassword(password).equals(password)) {\r\n // if so, change tracker to one indicating a valid user and break out of loop\r\n validUser = 1;\r\n break;\r\n }\r\n }\r\n \r\n // return true is validUser is 1, otherwise return false\r\n return validUser == 1;\r\n \r\n }", "private boolean checkUserNameExists(ArrayList<Member> members) throws Exception {\nfor(Member member:members) {\nif(this.userName.equals(member.userName)){\nreturn true;\n}\n}\nreturn false;\n}", "public boolean checkUser(String username, String password) {\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor mCursor = db.rawQuery(\"SELECT * FROM \" + TABLE_USERLIST + \" WHERE user_name=? AND user_password=?\", new String[]{username,password});\n if (mCursor != null) {\n if(mCursor.getCount() > 0)\n {\n return true;\n }\n }\n return false;\n\n }", "public static boolean authenticateUser(String name, String password) {\r\n\t\tfor(User user : userList) {\r\n\t\t\tif(user.getName().equals(name) && user.getPassword().equals(password)) {\r\n\t\t\t\treturn true;\r\n\t\t\t} \r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isCorrectLoginDetails(String username, String password) {\n boolean isExistingLogin = false; \n \n //Retrieve all existing user objects from the db. \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n //For each object in the array, check if there is a match for the user inputs and the object properties. \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username) && aUser.password.equals(password)) {\n isExistingLogin = true; \n }\n }\n return isExistingLogin; \n }", "private boolean checkUser(String username, String password){\n MongoCursor<Document> cursor = mongoAdapter.getUserCollection().find().iterator();\n\n while(cursor.hasNext()){\n Document document = cursor.next();\n System.out.println(document.get(\"_id\"));\n System.out.println(document.get(\"username\"));\n System.out.println(document.get(\"password\"));\n\n String dbusername = document.get(\"username\").toString();\n String dbpassword = document.get(\"password\").toString();\n\n if(dbusername.equals(username) && dbpassword.equals(password))\n return true;\n }\n return false;\n }", "public boolean registeredUser(String email, String password)\n {\n for (User user : users) {\n if(user.email.equals(email) && user.password.equals(password)) {\n Log.v(\"DonationApp\", \"Logging in as: \" + user.firstName + \" \" + user.lastName);\n return true;\n }\n }\n return false;\n }", "boolean hasUserList();", "public static boolean checkUser(User dto){\n\t\t//Filters by first name\n\t\tFilter firstNameFilter = new FilterPredicate(\n\t\t\t\t\"firstName\", FilterOperator.EQUAL, dto.getFirstName()\n\t\t\t\t);\n\t\t//Filters by last name\n\t\tFilter lastNameFilter = new FilterPredicate(\n\t\t\t\t\"lastName\", FilterOperator.EQUAL, dto.getLastName()\n\t\t\t\t);\n\t\t//Combines the filters into one so that it checks against ALL 3\n\t\tFilter combinedFilter = CompositeFilterOperator.and(firstNameFilter, lastNameFilter);\n\t\t\n\t\t//Prepare the Query\n\t\tQuery q = new Query(\"User\").setFilter(combinedFilter);\n\t\tlog.warning(\"Query = \" + q.toString());\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\t\n\t\t//Create the username/ pw structure like we did when we created it\n\t\tString username = dto.getFirstName() + \" \" + dto.getLastName();\n\t\tusername = username.toLowerCase();\n\t\t\n\t\t//Passwords, we will maintain their caps\n\t\tString superUsernamePassword = username + dto.getPassword();\n\t\t\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\t//Loops through all results. In our case, we are going to just use the first one\n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.warning(\"Entity returned, found user\");\n\t\t\t/*\n\t\t\tNow that we have the user, loop through the result(s) and check if the pw\n\t\t\tmatches via a special method call. Note, generally we would want to write\n\t\t\tsome code when a user is entered to check for duplicates, but for now, \n\t\t\tlet's stick with the simple stuff. Keep in mind that this will only check\n\t\t\tfor the FIRST result, so if you enter your name twice, you won't be able \n\t\t\tto pass validation without deleting one first. \n\t\t\t */\n\t\t\tString storedPassword = (String) result.getProperty(\"password\");\n\t\t\t\n\t\t\t//Now, compare the passed and stored passwords\n\t\t\tif(BCrypt.checkpw(superUsernamePassword, storedPassword)){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\t\n\t\t}\n\t\t//Nothing was returned, return false\n\t\tlog.warning(\"Entity not returned, found nothing\");\n\t\treturn false;\n\t}", "private boolean checkPass(String enterPass) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getPasswordHash() == enterPass.hashCode()) {\n return true;\n }\n }\n return false;\n }", "public boolean checkUsername(String username, String password) {\n try {\n remoteUserAccess = new RemoteUserAccess(new URI(\"http://localhost:8080/api/user/\"));\n } catch (Exception e) {\n remoteUserAccess = new DirectUserAccess();\n }\n Collection<User> userPasswords = remoteUserAccess.getUsers();\n if (!userPasswords.stream().anyMatch(a -> a.getUsername().equals(username))) {\n return false;\n } else if (!userPasswords.stream()\n .filter(p -> p.getUsername().equals(username))\n .findFirst().get().getPassword()\n .equals(password)) { // Chekcs if passwords match\n return false;\n }\n return true;\n\n }", "@Test\n public void userExist() {\n String username = argument.substring(0, 15);\n boolean found = false;\n\n for(int i = 0; i<users.size(); i++){\n if(users.get(i).substring(0, 15).trim().toLowerCase().contains(username.trim().toLowerCase())){\n found = true;\n }\n }\n assertTrue(\"User Not Found\", found);\n }", "public boolean checkUser(String username, String password) {\n String[] columns = {COL_1};\n SQLiteDatabase db = getReadableDatabase();\n String selection = COL_2 + \"=?\" + \" and \" + COL_3 + \"=?\";\n String[] selectionArgs = {username, password};\n Cursor cursor = db.query(USER_TABLE_NAME, columns, selection, selectionArgs, null, null, null);\n int count = cursor.getCount();\n cursor.close();\n db.close();\n\n if (count > 0)\n return true;\n else\n return false;\n }", "public boolean logOn(String username, String password) {\n ArrayList<String> listOfUsernames = database.returnAllUsernames();\n for (int rowBeingChecked = 0; rowBeingChecked < listOfUsernames.size(); rowBeingChecked++) {\n if (listOfUsernames.get(rowBeingChecked).equals(username)) {\n byte[] saltAndHash = pullSaltAndHashFromDatabase(username);\n byte[] saltPulled = new byte[16];\n byte[] hashPulled = new byte[16];\n\n //Splitting 'saltAndHash' into separate bytes:\n for (int byteCounter = 0; byteCounter < 16; byteCounter++) {\n saltPulled[byteCounter] = saltAndHash[byteCounter];\n }\n for (int byteCounter = 0; byteCounter < 16; byteCounter++) {\n hashPulled[byteCounter] = saltAndHash[byteCounter + 16];\n }\n\n //Creating the hash again, and returning boolean if they're equal.\n KeySpec spec = new PBEKeySpec(password.toCharArray(), saltPulled, 66536, 128);\n try {\n SecretKeyFactory factory = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n byte[] hashGenerated = factory.generateSecret(spec).getEncoded();\n return Arrays.equals(hashGenerated, hashPulled);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n return false;\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n //If user name not in table:\n return false;\n }", "@Override\n public void gotUsers(ArrayList<User> usersList) {\n for(int i = 0; i < usersList.size(); i++) {\n User currentUser = usersList.get(i);\n if(currentUser.getUser_name().equals(username) && currentUser.getUser_password()\n .equals(password)) {\n disableButton.setEnabled(true);\n Intent intent = new Intent(NewaccountActivity.this,\n OverviewActivity.class);\n intent.putExtra(\"loggedInUser\", currentUser);\n startActivity(intent);\n }\n }\n }", "public boolean userExists(String userName) {\r\n String qr = \"from UserCredsTbl where userName like '%\" + userName + \"%'\"\r\n + \"or userName like '%\" + userName + \"%'\";\r\n List userList = crud.getObject(qr);\r\n\r\n if (userList.size() > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public static boolean checkUserPass(String username, String password){\n getCurrentUsers();\n if(userPasses.containsKey(username)){\n System.out.println(\"bo\");\n if (userPasses.get(username).equals(password)){\n return true;\n }\n }\n System.out.println(username +\"|\"+password);\n return false;\n }", "public boolean passwordCheck() {\n\t\tSystem.out.println(\"Password is: \"+LoggedUser.getPassword());\n\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\tparams.addValue(\"username\", LoggedUser.getUsername());\n\t\tparams.addValue(\"password\", LoggedUser.getPassword());\n\t\treturn jdbc.queryForObject(\"select count(*) from authors where username=:username and password=:password\", \n\t\t\t\tparams, Integer.class) > 0;\n\t}", "public boolean validateUser (String username, String password){\n Cursor cursor = dbHelper.getReadableDatabase().rawQuery(\n \"SELECT * FROM \" + dbHelper.TABLE_USERS + \" WHERE \" + dbHelper.COLUMN_USERNAME\n + \"='\" + username + \"' AND \" + dbHelper.COLUMN_PASSWORD + \"='\" + password + \"'\",null);\n if (cursor.getCount()>0){\n return true;\n }else {\n return false;\n }\n }", "boolean checkLoginDetails(String email,String password){\n boolean isValidUser = false;\n dbConnection();\n try{\n stmt = con.prepareStatement(\"SELECT * FROM users ORDER BY email\");\n rs = stmt.executeQuery();\n while(rs.next()){\n String checkEmail = rs.getString(\"email\");\n String checkpassword = rs.getString(\"password\");\n if(checkEmail.equals(email) && checkpassword.equals(password)){\n isValidUser = true;\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n return isValidUser;\n }", "public static boolean checkUserExists(List<UserAccount> users, String name) {\n\t\tboolean isUserExists = false;\n\t\tfor (UserAccount user : users) {\n\t\t\tif (user.getUserFirstName().equals(name)) {\n\t\t\t\tisUserExists = true;\n\t\t\t}\n\t\t}\n\t\treturn isUserExists;\n\t}", "public boolean isUserExist(String email, String Password);", "public boolean checkProfileUsername(String username, String password) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_EMAIL\n };\n SQLiteDatabase db = this.getReadableDatabase();\n // selection criteria\n String selection = COLUMN_USERNAME + \" = ?\" + \" AND \" + COLUMN_PASSWORD + \" = ?\";\n\n // selection arguments\n String[] selectionArgs = {username, password};\n\n // query user table with conditions\n Cursor cursor = db.query(TABLE_PROFILE, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n\n int cursorCount = cursor.getCount();\n\n cursor.close();\n db.close();\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "public boolean isUser(String userName, String password){\n\t\treturn userName == this.userName && password == this.password;\n\t}", "public boolean checkUserPassword(String username, String password)\n\t{\n\t\t// Connect to database\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\t// SQL queries\n\t\t// Gets all rows from PageVisited\n\t\tString searchString = \"SELECT * FROM User WHERE username = ? AND password = ?\";\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(searchString);\n\t\t\tps.setString(1, username);\n\t\t\tps.setString(2, password);\n\t\t\trs = ps.executeQuery();\n\t\t\t\n\t\t\t// If we get some result, it means we have already seen this user\n\t\t\t// return true\n\t\t\tboolean foundMatch = false;\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\tString usernameValue = rs.getString(\"username\");\n\t\t\t\tString passwordValue = rs.getString(\"password\");\n\t\t\t\tif(password.contentEquals(passwordValue) && username.contentEquals(usernameValue))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// if we get a result with no rows, return false\n\t\t\tif(!foundMatch)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\t// Close connections\n\t\t\ttry {\n\t\t\t\tif(rs != null)\n\t\t\t\t{\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null)\n\t\t\t\t{\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(SQLException sqle)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sqle: \" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean user_login(Map<String, Object> map) {\n\t\tString sql = \"select * from tp_users where userName=:userName and userPwd=:userPwd\";\n\t\tList<Map<String, Object>> user = joaSimpleDao.queryForList(sql, map);\n\t\tif(user.size() == 1) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean isUserExist(String username, String password);", "public boolean login(String username, String password) {\n for (Account acc : accounts) {\n // If username and password is valid and then return true\n if (username.equals(acc.getUsername()) && getMd5(password).equals(acc.getPassword())) {\n return true;\n }\n }\n return false;\n }", "public boolean userDuplicateCheck(String username){\n ArrayList<User> users = new ArrayList<>(db.getAllUsers());\n\n for(User user : users){\n if(user.getUsername().equals(username)){\n return false;\n }\n }\n return true;\n }", "@Override\n\tpublic boolean loginService(List<Object> paraments) {\n\t\t\n\t\t\n\t\tboolean flag = false;\n\t\t\n\t\tString sql = \"select * from user where user_id=? and password=?\";\n\t\ttry{\n\t\t\t\n\t\t\tmJdbcUtil.getConnetion();\n\t\t\tMap<String,Object> map= mJdbcUtil.findSimpleResult(sql, paraments);\n\t\t\tflag = map.isEmpty()?false:true;\n\t\t\tSystem.out.println(\"-flag-->>\" + flag);\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tmJdbcUtil.releaseConn();\n\t\t}\n\t\t\n\t\t\n\t\treturn flag;\n\t}", "public boolean checkUsername(String username) {\n for(int i=0; i<listOfUsers.size(); i++) {\n if(listOfUsers.get(i).compareTo(username)==0)\n return false;\n }\n return true;\n }", "public boolean exists(String username) {\n\t\tfor(User user : users) {\n\t\t\tif(user.getUsername().equals(username)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean hasUserName();", "public boolean userNameExists(){\r\n boolean userNameExists = false;\r\n //reads username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n //creates statement\r\n //connects to database\r\n \r\n Connection myConn = DriverManager.getConnection(Main.URL); \r\n \r\n //creates statement\r\n Statement myStmt = myConn.createStatement();\r\n System.out.println(\"statement initiated\");\r\n //SQL query\r\n ResultSet myRs = myStmt.executeQuery(\"select * from LISTOFUSERS \");\r\n System.out.println(\"query initiated\");\r\n //process result set\r\n //checks to see if the username already exists in the database\r\n while (myRs.next()){\r\n System.out.println(\"check\");\r\n if(user.equals(myRs.getString(\"USERNAME\"))){\r\n \r\n userNameExists = true;\r\n break;\r\n }\r\n }\r\n myConn.close();\r\n \r\n \r\n \r\n } catch (Exception e) \r\n {\r\n System.err.println(e.getMessage());\r\n } \r\n return userNameExists; \r\n }", "public synchronized boolean isUser(String email, String password) {\r\n User user = this.email2user.get(email);\r\n return (user != null) && (password != null) && (password.equals(user.getPassword()));\r\n }", "@Override\n\tpublic Users isLogin(String uname, String password) {\n\t\treturn this.usersDao.selectByObject(uname, password);\n\t}", "private boolean userExists(Utente checkUser) {\n\t\tDB db = getDB();\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tfor(Map.Entry<Long, UtenteBase> user : users.entrySet())\n\t\t\tif(user.getValue() instanceof Utente && (((Utente)user.getValue()).getUsername().equals(checkUser.getUsername())))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean getLoginAuthorization(String sUser, String sPassword) {\r\n // Get the array of users\r\n JSONArray arUser = servlet.getCrpUtil().getUsers();\r\n // Check if this user may log in\r\n for (int i = 0 ; i < arUser.length(); i++) {\r\n // Get this object\r\n JSONObject oUser = arUser.getJSONObject(i);\r\n // Is this the user?\r\n if (oUser.get(\"name\").equals(sUser)) {\r\n // Set the user name\r\n this.sUserFound = sUser;\r\n // Check the password\r\n return (oUser.get(\"password\").equals(sPassword));\r\n }\r\n }\r\n // Getting here means we have no authentication\r\n return false;\r\n }", "public boolean RecorrerData(String Username,String Password) {\n Boolean Resultado = false;\n String[] ListaUsuarios,ListaPassword;\n ListaUsuarios = getResources().getStringArray(R.array.usuarios);\n ListaPassword = getResources().getStringArray(R.array.claves);\n\n for(int i = 0; i <= ListaUsuarios.length - 1; i = i + 1)\n {\n if (ListaUsuarios[i].toString().equals(Username)){\n if (ListaPassword[i].toString().equals(Password))\n {\n Resultado= true;\n break;\n }\n }\n }\n\n return Resultado;\n }", "public Boolean usernamepassword (String username,String password) {\n SQLiteDatabase sdb = this.getReadableDatabase();\n Cursor cursor = sdb.rawQuery(\"select * from user where username=? and password=?\",new String[]{username,password});\n if(cursor.getCount()>0) {\n return true;\n }\n else {\n return false;\n }\n }", "private Boolean findUser(String username){\n return usersDataBase.containsKey(username);\n }", "public boolean checkUser(String email, String password) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\" + \" AND \" + COLUMN_USER_PASSWORD + \" = ?\";\n \n // selection arguments\n String[] selectionArgs = {email, password};\n \n // query user table with conditions\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]' AND user_password = 'qwerty';\n */\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(\n TABLE_USER, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n\n cursor.close();\n db.close();\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "@Override\n public boolean verifyCredentials(int userId, String password){\n logger.info(\"Verifying Credentials...\");\n try{\n return userDaoInterface.verifyCredentials(userId,password);\n }catch (UserNotFoundException ex){\n System.out.println(ConsoleColors.RED+ex.getMessage()+ConsoleColors.RESET);\n return false;\n }\n\n// return DummyDB.userList.containsKey(userId) && DummyDB.userList.get(userId).getPassword().equals(password);\n }", "public boolean userMatchesPassword(String username, String password) throws FileNotFoundException, IOException {\n\t\tConnection connectionToDB = null;\n\t\tconnectionToDB = connectToDB();\n\t\tString query = \"Select count(*) from PESSOA where NOMEUTILIZADOR = ? and PASSWORD = ?\";\n\t\ttry (PreparedStatement ps= connectionToDB.prepareStatement(query)){\n ps.setString(1, username);\n ps.setString(2, password);\n ResultSet rs= ps.executeQuery();\n rs.next();\n\n return (rs.getInt(1)>=1);\n }\n catch (SQLException e){\n System.out.println(e);\n return false;\n }\n\t}", "public boolean existsUser(String username);", "public boolean checkUser(String email, String password) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n SQLiteDatabase db = this.getReadableDatabase();\n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\" + \" AND \" + COLUMN_USER_PASSWORD + \" = ?\";\n\n // selection arguments\n String[] selectionArgs = {email, password};\n\n // query user table with conditions\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]' AND user_password = 'qwerty';\n */\n Cursor cursor = db.query(TABLE_NAME, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n\n int cursorCount = cursor.getCount();\n\n cursor.close();\n db.close();\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "public boolean isExistingUsername(String username) {\n boolean isExistingUser = false; \n \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username)) {\n isExistingUser = true; \n }\n }\n \n return isExistingUser; \n }", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "public static boolean estaVacia(ArrayList lista){\n if(lista.isEmpty()){\n System.out.println(\"No hay usuarios u objetos registrados por el momento\");\n return true;\n }\n else{\n return false;\n }\n }", "@Override\n\tpublic boolean isUserAuthenticate(String username, String password) {\n\t\t// validate username and pwd with predefined credentials\n\t\tif (username.equals(Utility.USERNAME) && password.equals(Utility.PASSWORD)) {\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic boolean hasUser(Account acccount) {\n\n\n\n\n\n\n\n\n\n\t\t\n\t\treturn (usersHashtable.containsKey(acccount));\n\t}", "public boolean doesUserExist(String username) {\n\t\t\n\t\tfor(User u : users) {\n\t\t\tif(u.getUsername().equals(username)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean userExists(String email) {\n\t\treturn (searchIndex(email) >= 0);\n\t}", "@Override\n public boolean userExists(User user) {\n return DATABASE.getUsers().stream()\n .anyMatch(currentUser -> user.equals(currentUser));\n }", "public boolean hasUsers() {\n\t\treturn !this.userNames.isEmpty();\n\t}", "private boolean isOneUserName(String username){\r\n\t\tfor(int i = 0; i < users.size(); i++){\r\n\t\t\tif(users.get(i).username.equalsIgnoreCase(username)){\r\n\t\t\t\tSystem.out.println(\"Sorry the Username is already taken\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static boolean login(String userName, String password){\n boolean found = false;\n Connection connection = SQLiteConnection.dbConnection();\n ResultSet rs = null;\n try {\n Statement stmt = connection.createStatement();\n rs = stmt.executeQuery(\"SELECT * FROM Users\");\n while (rs.next()) {\n if (rs.getString(\"UserName\").equals(userName) && rs.getString(\"Password\").equals(password)){\n Login.signIn(rs.getRow());\n found = true;\n break;\n }\n }\n stmt.close();\n rs.close();\n connection.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n return found;\n\n }", "boolean exists(String username);", "public Boolean isUnique(String search) {\n\t\tfor (int i = 0; i < CarerAccounts.size(); i++) {\n if (CarerAccounts.get(i).getUsername().equals(search)){\n return false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean checkAuthentication(String login, String passwd) {\n Connection connect;\n boolean result = false;\n try {\n // connect db\n Class.forName(DRIVER_NAME);\n connect = DriverManager.getConnection(SQLITE_DB);\n // looking for login && passwd in db\n Statement stmt = connect.createStatement();\n ResultSet rs = stmt.executeQuery(SQL_SELECT.replace(\"?\", login));\n while (rs.next())\n result = rs.getString(PASSWD_COL).equals(passwd);\n // close all\n rs.close();\n stmt.close();\n connect.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n return false;\n }\n return result;\n }", "public boolean hasUsers() {\n\n return !realm.where(User.class).findAll().isEmpty();\n }", "private boolean isUserExists() {\n\t\treturn KliqDataStore.isUserExists(this.mobileNumber, null);\r\n\t}", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean hasUser();", "boolean isMatchPassword(Password toCheck) throws NoUserSelectedException;", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tfor(int i = 0; i < myUsers.size(); i++) {\r\n\t\t\t\t\tif(myUsers.get(i).getName() == username.getText() && myUsers.get(i).getPassword() == password.getText()) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Success!\");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Failure\");\r\n\t\t\t\t}", "public boolean Login(String username, String password)\n {\n //If there are no users\n if(userProfiles == null)\n {\n return false;\n }\n\n for (Profile f: userProfiles)\n {\n if(f.getUsername().equals(username) && f.getPassword().equals(password))\n {\n loggedInAs = f;\n\n return true;\n }\n }\n\n return false;\n }", "public boolean isThereSuchAUser(String username, String email) ;", "public boolean isUsersListEmpty() {\n\t\treturn this.listUsers.listIsEmpty();\n\t}", "public boolean authenticateUser(String userName,String password) throws ToDoListDAOException{\r\n\t\t\r\n\t\t User user = getUserByUserName(userName); \r\n\t\t System.out.println(userName + \" \" + password);\r\n\t if(user!=null && user.getUserName().equals(userName) && user.getPassword().equals(password)){\r\n\t return true;\r\n\t }else{\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t}", "public boolean checkUser(String email,String password){\n String[] columns = {\n UserColumns.COLUMN_USER_ID\n };\n SQLiteDatabase db = this.getReadableDatabase();\n // selection criteria\n String selection = UserColumns.COLUMN_USER_EMAIL + \" = ?\" + \" AND \" + UserColumns.COLUMN_USER_PASSWORD + \" = ?\";\n\n // selection arguments\n String[] selectionArgs = {email, password};\n\n // query user table with conditions\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]' AND user_password = 'qwerty';\n */\n Cursor cursor = db.query(TABLE_USER, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n\n int cursorCount = cursor.getCount();\n\n cursor.close();\n db.close();\n if (cursorCount > 0) {\n return true;\n }\n return false;\n }", "Boolean checkCredentials(String username, String password) throws\n SQLException, UserNotFoundException;", "public boolean findValidUsername(String username) {\n if (allUserNames.isEmpty()) {\n return true;\n }\n for (String s: allUserNames) {\n if(s.equals(username)) {\n return false;\n }\n }\n return true;\n }", "boolean isUserExists(Username username);", "public boolean checkUserNameIsOccupied(String name) {\n \t\tif (users.size() != 0) {\n \t\t\tfor (int i = 0; i < users.size(); i++) {\n \t\t\t\tif (name.equals(users.get(i).getName())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "public boolean validLogin(String username, String password) {\n\n String query = String.format(\"SELECT * FROM staff WHERE staff_password = '%s' and staff_id = '%s'\", password, username);\n try {\n preparedStatement = connection.prepareStatement(query);\n result = preparedStatement.executeQuery();\n if(result.next()){\n return true;\n }\n return false;\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return false;\n }", "public boolean isUsersExist(Pet pet);", "public boolean checkUser(User userobj)\n\t\t{\n\t\t\tCursor c = getUser();\n\t\t\tif(c!=null){\n\t\t\t\tc.moveToFirst();\n\t\t\t\tdo{\n\t\t\t\tif(userobj.getUserName().equalsIgnoreCase(c.getString(1))&& userobj.getPassword().equalsIgnoreCase(c.getString(2)))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t}while(c.moveToNext());\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "boolean isAuthenticate(String username, String password) throws UserDaoException;", "boolean login(String loginusre,String loginpass)\r\n{\r\nfor(int i = 0;i<users.length;i++)\r\n{\r\nif(loginusre.equals(users[i])&&loginpass.equals(password[i]))\r\n{\r\nx = (i);\r\nreturn true;\r\n}\r\n}\r\nreturn false;\r\n}", "static boolean logIn(String username, String password) {\r\n if (accounts.containsKey(username)) {\r\n if (accounts.get(username).getPassword().equals(password)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean checkCredentials(String inputLogin, String inputPassword) {\n //creates boolean variable flag and defines it as True\n boolean flag = false;\n //defines Connection con as null\n Connection con = MainWindow.dbConnection();\n try {\n //tries to create a SQL statement to retrieve values of a User object from the database\n String query = \"SELECT * FROM User WHERE userID = '\" + inputLogin + \"' AND password = '\" + inputPassword + \"';\";\n Statement statement = con.createStatement();\n ResultSet result = statement.executeQuery(query);\n /*\n if statement compares data entered by user with data in the database. If there is such data in the database\n users credentials are put into MainWindow variables and defines flag variable as True\n */\n if(result.getString(\"userID\").equals(inputLogin) && result.getString(\"password\").equals(inputPassword)) {\n flag = true;\n MainWindow.userLastName = result.getString(\"lastName\");\n MainWindow.userFirstName = result.getString(\"firstName\");\n MainWindow.userID = inputLogin;\n MainWindow.userPassword = inputPassword;\n }//end if statement\n } catch (Exception e) {\n //catches exceptions and show message about them\n System.out.println(e.getMessage());\n }//end try/catch\n //checks if Connection con is equaled null or not and closes it.\n MainWindow.closeConnection(con);\n return flag;\n }", "boolean hasLogin();", "boolean hasLogin();", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif(!(obj instanceof UserData))\n\t\t\treturn false;\n\t\telse {\n\t\t\tUserData that = (UserData) obj;\n\t\t\treturn password.equals(that.getPassword());\n\t\t}\n\t}", "boolean exists(String userName);", "boolean isUser(String username);", "public boolean checkUsername(String username) {\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(\"username\", username);\r\n\r\n // Returns whether at least one user with the given username exists\r\n return users.countDocuments(query) > 0;\r\n }", "public boolean userExists(String name,String pass)throws SQLException {\r\n\t\tResultSet rs;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tString query = \"SELECT username,password FROM lpro.users WHERE username=? AND password=?\";\r\n\t\ttry {\r\n\t\t\tstmt = con.prepareStatement(query);\r\n\t\t\tstmt.setString(1, name);\r\n\t\t\tstmt.setString(2, pass);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\tcon.commit();\r\n\t\t\tif(rs.next()) {\r\n\t\t\t\tString username = rs.getString(\"username\");\r\n\t\t\t\tString password = rs.getString(\"password\");\r\n\t\t\t\tif(username.equals(name) && pass.equals(password))\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Error accessing database: \"+e.getMessage());\r\n\t\t\tcon.rollback();\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t\tfinally {\r\n\t\t\tif(stmt!=null)\r\n\t\t\t\tstmt.close();\r\n\t\t}\r\n\t\treturn false;\r\n\t}" ]
[ "0.7525746", "0.73264474", "0.72557455", "0.7060866", "0.7021739", "0.6958311", "0.68639344", "0.68180305", "0.6778055", "0.6682553", "0.6622533", "0.66193914", "0.66074526", "0.6600222", "0.65515137", "0.65331733", "0.65290624", "0.6528763", "0.6462035", "0.643893", "0.64089745", "0.64018667", "0.63886994", "0.63711554", "0.6365986", "0.6358273", "0.6353498", "0.63429785", "0.6323272", "0.62852985", "0.62741244", "0.6272224", "0.62650025", "0.6220745", "0.61930275", "0.61856514", "0.6180786", "0.61608136", "0.6142692", "0.6132231", "0.61317706", "0.61305296", "0.61213696", "0.6119757", "0.6116348", "0.611362", "0.6112306", "0.6107572", "0.6106847", "0.6106847", "0.6106847", "0.6106847", "0.6106847", "0.6106847", "0.61065227", "0.6098869", "0.60895246", "0.6085543", "0.6075418", "0.60749626", "0.6071318", "0.6044035", "0.6037295", "0.6036152", "0.6031876", "0.6023458", "0.6021362", "0.6015427", "0.60092837", "0.60092837", "0.60092837", "0.60092837", "0.60092837", "0.60092837", "0.60092837", "0.600468", "0.6001723", "0.5982079", "0.59679174", "0.5963932", "0.59603107", "0.59565556", "0.59545785", "0.5953722", "0.5950411", "0.5934297", "0.5932035", "0.5928041", "0.59223497", "0.5921403", "0.5921189", "0.5919362", "0.5917171", "0.5913159", "0.5913159", "0.5911523", "0.5908952", "0.58973974", "0.58938324", "0.5891825" ]
0.6509924
18
Adds a user to the list of all users, along with the username and password.
public User addUser(User user) { allUsers.add(user); allUserNames.add(user.getUserName()); allPasswords.add(user.getPassword()); allEmails.add(user.getEmail()); return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addUser(User user){\r\n users.add(user);\r\n }", "public void addUser(User user) {\n\t\tuserList.addUser(user);\n\t}", "public void add(User user) {\r\n this.UserList.add(user);\r\n }", "public void addUser(User user) {\n\t\tSystem.out.println(\"adding user :\"+user.toString());\n\t\tuserList.add(user);\n\t}", "public void newUser(User user) {\n users.add(user);\n }", "public void addUser() {\n\t\tthis.users++;\n\t}", "public static void addUser(String name)\n {\n userList.add(name);\n }", "public void addUser(User user) {\n\t\t\r\n\t}", "public void addUser(User user) {\n users.add(new User(user.getUsername(), Hash.md5(user.getPassword())));\n // Naively dump the whole users list to file\n reader.dumpToFile(users);\n }", "public void addUser(User user) {\n if (this.users == null) {\n this.users = new ArrayList<>();\n }\n this.users.add(user);\n }", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "@Override\r\n\tpublic void add(User user) {\n\r\n\t}", "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "public void addUser(TIdentifiable user) {\r\n\t // make sure that the user doesn't exists already\r\n\t if (userExists(user)) return;\r\n\t \r\n\t // check to see if we need to expand the array:\r\n\t if (m_current_users_count == m_current_max_users) expandTable(2, 1);\t \r\n\t m_users.addID(user);\r\n\t m_current_users_count++;\r\n }", "public void addUser(User user);", "@Override\n\tpublic void addUser(User user) {\n\t\tuserMapper.addUser(user);\n\t}", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "public void addUser(User user){\n loginDAO.saveUser(user.getId(),user.getName(),user.getPassword());\n }", "public void add(User user) {\n\t\tuserDao.add(user);\n\t}", "public void addUser(User user) {\n \t\tuser.setId(userCounterIdCounter);\n \t\tusers.add(user);\n \t\tuserCounterIdCounter++;\n \t}", "@Override\n\tpublic void addUser(User user) {\n mapper.addUser(user);\n\t}", "void addUser(User user);", "void addUser(User user);", "public void addUser(String username) {\n\t\tusers.add(new User(username));\n\t}", "public void addUser(User user) {\n\t\tif(!users.containsKey(user.id)) {\n\t\t\tusers.put(user.id, user);\n\t\t}\n\t}", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "public void add(User user) {\n\t\tmapper.add(user);\n\t}", "public void addUser(User user) {\n users.put(user.getUsername(), user);\n persistenceFacade.addUser(user);\n }", "public boolean add(User user)\n\t\t{\n\t\t\t\treturn users.add(user);\n\t\t}", "@Override\n\tpublic void addUser(User user) {\n\t\tiUserDao.addUser(user);\n\t}", "public void addUser(User user) {\n\t\tuserDao.addUser(user);\r\n\r\n\t}", "@Override\n\tpublic void addUser(ERSUser user) {\n\t\tuserDao.insertUser(user);\n\t}", "@Override\r\n\tpublic int addUser(User user) {\n\t\treturn userMapper.addUser(user);\r\n\t}", "public void addUser(User user) {\n\t\tuserMapper.insert(user);\n\n\t}", "@Override\n\tpublic User addUser(User user) {\n\t\treturn userDatabase.put(user.getEmail(), user);\n\t}", "public void addToUsers(Users users) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERS_ADD_USER);\n preparedStatement.setString(1, users.getUser_login());\n preparedStatement.setString(2, users.getUser_pass());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "public void addUser(ArrayList<User> users) {\n comboCreateBox.removeAllItems();\n for (User usr : users) {\n comboCreateBox.addItem(usr.getUsername());\n }\n }", "public void addAccount(String user, String password);", "public boolean addUser(User user) {\n\t\treturn false;\r\n\t}", "public User addUser(String username, String password) {\n if (userList.containsKey(username)) {\n throw new NoSuchElementException(\"User already existed\");\n }\n if (username.length()==0) {\n throw new IllegalArgumentException(\"Username must contain at least one \" +\n \"character. Please try again.\");\n }\n User newUser = new User(username, password);\n userList.put(username, newUser);\n return newUser;\n }", "public void add(String nickname, String username, String hostname) {\r\n this.UserList.add(new User(nickname, username, hostname));\r\n }", "public boolean addUsers(List<User> users);", "public void addUser(UserModel user);", "public void addUser(String userName) throws Exception {\r\n try {\r\n if (users.size() < MAX_USERS) {\r\n for (int i = 0; i < users.size(); i++) {\r\n if (users.get(i).getUserName().equalsIgnoreCase(userName) && users.get(i) != null)\r\n throw new Exception(\"Error: Name Already Exist\");\r\n }\r\n users.add(new User(userName, users.size(), users.size() + 1));\r\n } else throw new Exception(\"Error: Reached Maximum User Capacity\");\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }", "@Override\r\n\tpublic User addUser(User user) {\n\t\treturn userReposotory.save(user);\r\n\t}", "@Override\n public boolean addUser(User user) {\n return controller.addUser(user);\n }", "public User addUser(User user) {\n\t\treturn null;\r\n\t}", "public void addUser(User user) {\n\t\tuserDao.insert(user);\n\t}", "public void userListStart() {\n\t\tfor (int i = 0; i < userServices.getAllUsers().length; i++) {\n\t\t\tuserList.add(userServices.getAllUsers()[i]);\n\t\t}\n\t}", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "public void addUser(String name)\r\n\t{\r\n\t\tperson= new User(name);\r\n\t\tusers.put(name, person);\r\n\t}", "@Override\r\n\tpublic boolean addNewUser(User user) {\n\t\treturn false;\r\n\t}", "public void register(User user) {\n\t\tboolean exists = false ;\n\t\tfor ( User currentUser : users )\n\t\t\tif ( currentUser.getId().equals(user.getId()) )\n\t\t\t\texists = true ;\n\t\tif ( !exists ) {\n\t\t\taddUser(user) ;\n\t\t\tSystem.out.println(\"[USER CREATED]\") ;\n\t\t\tSystem.out.println() ;\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"[INVALID ACTION] User Already Exists\") ;\n\t\t\tSystem.out.println() ;\n\t\t}\n\t}", "@Override\n\tpublic int addUser(User user) {\n\t\treturn userDao.addUser(user);\n\t}", "public void addUser(User user)\n\t{\n\t\tUser newUser = addNewUser(user.getEntity());\n\t\tnewUser.setDisplayText(user.getDisplayText());\n\t\tnewUser.setState(user.getState());\n\t\tfor (Endpoint endpoint : user.getEndpoints())\n\t\t\tnewUser.addEndpoint(endpoint);\n\t}", "public void addUser(User user){\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(USER_NAME,user.getName());\n values.put(USER_PASSWORD,user.getPassword());\n db.insert(TABLE_USER,null,values);\n db.close();\n }", "public void addUser(String name, String pass, String type)\n {\n registeredUsers.add(name);\n registeredUsers.add(pass);\n registeredUsers.add(type);\n }", "public void addUser(User tmpUser, User user) {\n\t\t\n\t}", "private void addUser() {\n\t\t//check for the user limit, and if it is reached, return an error.\n\t\tif(!(users[users.length-1].equals(\"\"))) {\n\t\t\terror(USER_LIMIT_REACHED);\n\t\t\tProgramGUI.this.dispose();\n\t\t}\n\t\telse {\n\t\t\tProgramGUI.this.dispose();\n\t\t\tindex = nextUserIndex();\n\t\t\tframe = new JFrame(\"Adding user #\" + (index+1));\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\t\tframe.setLocationRelativeTo(null);\n\t\t\tframe.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\tJPanel panel = new JPanel();\n\t\t\tpanel.setLayout(new GridLayout(2, 2));\n\t\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));\n\t\t\tpanel.add(new JLabel(\"Enter Username: \"));\n\t\t\tuser = new JTextField();\n\t\t\tpanel.add(user);\n\t\t\tpanel.add(new JLabel(\"Enter Password: \"));\n\t\t\tpass = new JPasswordField();\n\t\t\tpanel.add(pass);\n\t\t\tframe.add(panel, BorderLayout.NORTH);\n\t\t\tJPanel button = new JPanel();\n\t\t\tJButton ok = new JButton(\"Confirm User\");\n\t\t\tok.addActionListener(new AddListener());\n\t\t\tJButton cancel = new JButton(\"Cancel\");\n\t\t\tcancel.addActionListener(new ButtonListener());\n\t\t\tbutton.add(ok);\n\t\t\tbutton.add(cancel);\n\t\t\tframe.add(button, BorderLayout.SOUTH);\n\t\t\tframe.setVisible(true);\n\t\t}\n\t}", "public void addNewUser(String userName) {\n\t\tUser newUser = new User(userName, this);\n\t\tusers.add(newUser);\n\t}", "private boolean addUser(User user) {\r\n\t\tthis.storer.storeUser(user);\r\n\t\tmapping.put(user.getUsername(), user);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic void add(User1 user) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(user);\r\n\t}", "@Override\r\n\tpublic boolean addUser(user user) {\n\t\tif(userdao.insert(user)==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "public void addUser(String userName,String name) {\n\t\tUser newUser = new User(userName, name, false);\n\t\tusers.add(newUser);\t\n\t}", "public boolean addUser(User user) {\n if (!registeredUsers.containsKey(user.getUsername())) {\n registeredUsers.put(user.getUsername(), user);\n return true;\n }\n return false;\n }", "@Override\n\tpublic int addUser(TbUser user) {\n\t\treturn new userDaoImpl().addUser(user);\n\t}", "private void addAll(User[] users) {\n synchronized (this.base) {\n Stream.of(users).forEach(this::add);\n }\n }", "public void addUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tSystem.out.print(\"Please enter your username: \");\r\n\t\tString username=sc.nextLine();\r\n\t\tusername=username.trim();\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter your password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter your password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tSystem.out.print(\"Please enter your full name: \");\r\n\t\tString fullname=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your email address: \");\r\n\t\tString email=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your Phone number: \");\r\n\t\tlong phone_number=sc.nextLong();\r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(username,hash_password,fullname,email,phone_number,0,last_login,false));\r\n\t\tSystem.out.println(\"Record added successfully!\");\r\n\t}", "public boolean addUser(User newUser){\n try {\n if (searchUserInCourse(newUser)) {\n throw new Exception();\n }\n\n getUserListInCourse().add(newUser);\n return true;\n } catch (Exception exception) {\n System.err.println(\"This user already exists!\");\n return false;\n\n }\n\n }", "public void addUser(String fullName,String loginName,String password,boolean isAdmin) throws IOException {\n userManager.addUser(fullName, loginName, password, isAdmin);\n userManager.emptyLists();\n userManager.fillLists();\n AdminMainViewController.emptyStaticLists();\n AdminMainViewController.adminsObservableList.addAll(userManager.getAdminsList());\n AdminMainViewController.usersObservableList.addAll(userManager.getUsersList());\n }", "public void addUser(String userId) {\n addUser(new IndividualUser(userId));\n }", "public synchronized void addUser(String user, HttpSession session) {\n\t\tif (!userSessions.containsKey(user))\n\t\t\tuserSessions.put(user, session);\n\t}", "public User[] addUser(String userName, String password, int ageUser){\n boolean space = false;\n for(int i = 0; i<MAX_USER && !space; i++){\n if(user[i] == null){\n user[i] = new User(userName, password, ageUser);\n space = true;\n numUser++;\n }\n }\n return user;\n }", "public User add(User user) {\n\t\treturn userDao.add(user);\n\t}", "@Override\r\n\tpublic void addUser(User user) throws ToDoListDAOException{\r\n\t\tSession session = factory.openSession();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tsession.beginTransaction();\r\n\t\t\tsession.save(user);\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t}\r\n\t\tcatch (HibernateException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tif(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tif(session != null) \r\n\t\t\t{ \r\n\t\t\t\tsession.close(); \r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int userAdd(User user) {\n\t\treturn userDao.userAdd(user);\r\n\t}", "public void addUser(){\r\n //gets entered username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n \r\n //connects to database\r\n \r\n //creates statement\r\n Connection myConn = DriverManager.getConnection(Main.URL);\r\n //adds username and password into database\r\n PreparedStatement myStmt = myConn.prepareStatement(\"insert into LISTOFUSERS(USERNAME, PASSWORD)values(?,?)\");\r\n myStmt.setString(1,user);\r\n myStmt.setString(2,pass);\r\n int a = myStmt.executeUpdate();\r\n \r\n if(a>0){\r\n System.out.println(\"Row Update\");\r\n }\r\n myConn.close();\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n }", "public void add(String fullName, String username, String password, String accType, String email, String salary){\n\t\t\n\t\t// Determine position where new User needs to be added\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\t// Check if the list contains only the head\n\t\tif(marker.getNext()!= null){\n\t\tmarker = marker.getNext();\t\t\t\t\t\t\t\t\t/* ====> If not then skip the head */\n\t\t}\n\t\t\n\t\t\n\t\t/*Iterate through the whole list and compare Strings. Move the marker until it reaches the end or until the input\n\t\t * username is greater than the marker's username . */\n\t\twhile((marker.getNext() != null) && (username.compareTo(marker.getUsername())>0)){\n\t\t\t\t\tmarker = marker.getNext();\n\t\t\t\t}\t\t\n\t\t\n\t\t/* When marker finds a user whose username is greater than the input it moves the marker back a position so that the new\n\t\t * user can be appended to that marker */\n\t\tif(marker.getPrev() != null){\n\t\t\t\tif(username.compareTo(marker.getUsername())<0){\n\t\t\t\t\tmarker = marker.getPrev();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Create new user with the method's parameters as properties. Append it to the marker\n\t\tUser newUser = new User(marker.getNext(), marker);\n\t\tnewUser.setFullName(fullName);\n\t\tnewUser.setUsername(username);\n\t\tnewUser.setPassword(password);\n\t\tnewUser.setAccType(accType);\n\t\tnewUser.setEmail(email);\n\t\tnewUser.setSalary(salary);\n\t\t\n\t\t// Set connections to the new User\n\t\tnewUser.getPrev().setNext(newUser);\n\t\tif(newUser.getNext() != null){\n\t\tnewUser.getNext().setPrev(newUser);\n\t\t}\n\n\t}", "private void addUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureUserIsMutable();\n user_.add(value);\n }", "@Override\n\tpublic void regist(User user) {\n\t\tdao.addUser(user);\n\t}", "@Override\n\tpublic void addItem(User entity) {\n\t\tuserRepository.save(entity);\n\t\t\n\t}", "public void addUser(String u, String p) {\n \t//users.put(\"admin\",\"12345\");\n users.put(u, p);\n }", "ResponseMessage addUser(User user);", "private void addNewUser(User user) {\n\t\tSystem.out.println(\"BirdersRepo. Adding new user to DB: \" + user.getUsername());\n\t\tDocument document = Document.parse(gson.toJson(user));\n\t\tcollection.insertOne(document);\n\t}", "public void addUser(String username, String password, String balance) throws IOException {\r\n // create a new user\r\n User user = new User(username, password, balance);\r\n // add new user to arraylist\r\n this.users.add(user);\r\n // write the new user to the text file\r\n this.userInfo.writeToFile(this.users.get(this.users.size() - 1).getUsername(), this.users.get(this.users.size() - 1).getPassword(password), this.users.get(this.users.size() - 1).getBalance());\r\n }", "void add(User user) throws SQLException;", "User addUser(IDAOSession session, String fullName, String userName,\n\t\t\tString password);", "@Override\r\n\tpublic Utilisateur addUser() {\n\t\treturn null;\r\n\t}", "@WebMethod public void addUser(String name, String lastName, String email, String nid, String user, String password);", "public int addUser(Users users);", "protected void addUser(String key, User<PERM> user) {\n\t\tuserMap.put(key, user);\n\t}", "public void addUser(user user) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(COLUMN_USER_NAME, user.getName());\n values.put(COLUMN_USER_EMAIL, user.getEmail());\n values.put(COLUMN_USER_PASSWORD, user.getPassword());\n\n // Inserting Row\n db.insert(TABLE_NAME, null, values);\n db.close();\n }", "void addUser(Username username) throws UserAlreadyExistsException;", "public int add(Userinfo user) {\n\t\treturn userDAO.AddUser(user);\r\n\t}", "@Override\r\n\tpublic boolean add(User u) {\r\n\t\treturn executeAndIsModified(INSERT_INTO_USERS, u.getTax_code(),\r\n\t\t\t\tu.getName(),\r\n\t\t\t\tu.getSurname(),\r\n\t\t\t\tu.getPhone(),\r\n\t\t\t\tu.getAddress(),\r\n\t\t\t\tu.getEmail(),\r\n\t\t\t\tu.getPassword(),\r\n\t\t\t\tu.getRole());\r\n\r\n\t}", "public void addUser(User user) {\n\t\tet.begin();\n\t\tem.persist(user);\n\t\tet.commit();\n\t}", "public void Adduser(User u1) {\n\t\tUserDao ua=new UserDao();\n\t\tua.adduser(u1);\n\t\t\n\t}", "boolean addUser(User userToAdd, BankEmployee employee) {\n if(employee.isBankEmployee()){\n listOfUsers.add(userToAdd);\n return true;\n }else\n return false;\n }" ]
[ "0.8308536", "0.81180215", "0.80255216", "0.7981064", "0.7890688", "0.78592485", "0.78306675", "0.7819011", "0.77797824", "0.7571688", "0.7476158", "0.73968273", "0.73891914", "0.72982854", "0.72980124", "0.7283897", "0.72740537", "0.72612524", "0.7259495", "0.72229046", "0.7222746", "0.72088087", "0.72088087", "0.7172367", "0.7136428", "0.7132596", "0.7132228", "0.71299076", "0.7118796", "0.7108384", "0.7097654", "0.70870453", "0.70811415", "0.7070669", "0.7045424", "0.704303", "0.7003476", "0.6976866", "0.6970083", "0.69682574", "0.694826", "0.69140786", "0.691062", "0.69041735", "0.6902767", "0.6901233", "0.68960154", "0.6885682", "0.6883027", "0.687675", "0.68618727", "0.6852757", "0.6773364", "0.6770032", "0.67699546", "0.67198765", "0.6715714", "0.67100513", "0.6704379", "0.66983354", "0.6682699", "0.66744095", "0.666699", "0.6655015", "0.66522765", "0.6644378", "0.6641475", "0.6628209", "0.66253555", "0.6594449", "0.65928084", "0.65802824", "0.6574547", "0.6573543", "0.657168", "0.65694886", "0.65486974", "0.65481406", "0.6545178", "0.65384084", "0.65379363", "0.65282106", "0.65209186", "0.651919", "0.650062", "0.64999455", "0.6496384", "0.649619", "0.6491975", "0.64896804", "0.64825624", "0.64796734", "0.6479536", "0.64712584", "0.64711803", "0.6464808", "0.64621854", "0.6461141", "0.64584804", "0.6451053" ]
0.7367618
13
Takes in a username and sees if it already exists in the UserManager. Prevents the creation of multiple users with the same username.
public boolean findValidUsername(String username) { if (allUserNames.isEmpty()) { return true; } for (String s: allUserNames) { if(s.equals(username)) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkExistingUsername(String username) {\n boolean existingUsername = false;\n User user = userFacade.getUserByUsername(username);\n if (user != null) {\n existingUsername = true;\n }\n return existingUsername;\n }", "public boolean userDuplicateCheck(String username){\n ArrayList<User> users = new ArrayList<>(db.getAllUsers());\n\n for(User user : users){\n if(user.getUsername().equals(username)){\n return false;\n }\n }\n return true;\n }", "public boolean isExistingUsername(String username) {\n boolean isExistingUser = false; \n \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username)) {\n isExistingUser = true; \n }\n }\n \n return isExistingUser; \n }", "public boolean validateUsernameExist(String username) {\n return userRepository.findUsername(username);\n }", "@Override\n\t@Transactional(readOnly=true)\n\tpublic boolean isUsernameUnique(String username) {\n\t\treturn false;\n\t}", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public void userExists(String newUsername)\n\t\tthrows DuplicateUsernameException{\n\t\tfor(User user: getUserSet()){\n\t\t\tif(user.getUsername().equals(newUsername)){\n\t\t\t\tthrow new DuplicateUsernameException(newUsername);\n\t\t\t}\n\t\t}\n\t}", "boolean duplicatedUsername(String username);", "private boolean isOneUserName(String username){\r\n\t\tfor(int i = 0; i < users.size(); i++){\r\n\t\t\tif(users.get(i).username.equalsIgnoreCase(username)){\r\n\t\t\t\tSystem.out.println(\"Sorry the Username is already taken\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean existsUser(String username);", "void addUser(Username username) throws UserAlreadyExistsException;", "@Override\r\n\tpublic Boolean userExist(String username) {\n\t\treturn null;\r\n\t}", "public ResponseEntity<User> createUser(User user) {\n List<User> users=getAllUsers();\n boolean usernameIsUsed=false;\n\n\n for(User myUser : users){\n\n\n String username= myUser.getUsername();\n\n if(username.equals(user.getUsername())){\n usernameIsUsed=true;\n return ResponseEntity.badRequest().build();\n }\n\n\n }\n if(!usernameIsUsed){\n myUserDetailsService.addUser(user);\n return ResponseEntity.ok(user);\n }\n\n return null;\n }", "public boolean isUnique(String userName) {\n return userRepository.findByLogin(userName) == null ? true : false;\n }", "public boolean isUsernameValid(String username) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tUser user=(User)session.get(User.class, username);//select * from user where username=?\n\t\tif(user!=null)\n\t\t\treturn false; //duplicate username, invalid\n\t\telse\n\t\t\treturn true;\n\t}", "public boolean userNameExist(String username);", "public Boolean isUsernameExist(String username);", "@Override\n public boolean isUserNameExists(String userName) {\n User user = getUserInfo(userName);\n return user != null && user.getUserName() != null && !user.getUserName().equals(\"\");\n }", "boolean isUsernameExist(String username);", "@Override\r\n\tpublic boolean isUserUsernameUnique(Integer id, String username) {\n\t\tUser user = userDAO.findByUsername(username);\r\n\t\treturn (user == null || ((id != null) && (user.getId() == id)));\r\n\t}", "public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}", "boolean isUserExists(Username username);", "public synchronized boolean hasUser(String username) {\r\n\t\tif (!mapping.containsKey(username)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n @SuppressWarnings(\"unchecked\")\n public boolean checkExists(String username) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserProfile.class);\n crit.add(Restrictions.eq(\"username\", username));\n List<UserProfile> userList = crit.list();\n session.close();\n return !userList.isEmpty();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n\n }", "boolean existsByUsername(String username);", "public boolean existsByUsername(String username);", "public boolean existsByUsername(String username) {\n return userRepository.existsByUsername(username);\n }", "private Boolean findUser(String username){\n return usersDataBase.containsKey(username);\n }", "boolean isUniqueUsername(String username) throws SQLException;", "boolean exists(String username);", "public static boolean userNameDuplicate(String arg_username) {\n\n\t\tboolean userNameFound = false;\n\n\t\tfor (User u0 : userInfoArray) {\n\t\t\tString currentUserName = ((User) u0).getUserName();\n\t\t\tif (arg_username.toUpperCase().equals(currentUserName.toUpperCase())) {\n\t\t\t\tuserNameFound = true;\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\t\t\t\tuserNameFound = false;\n\t\t\t}\n\n\t\t}\n\t\treturn userNameFound;\n\t}", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "private boolean isExistUserName(String userName, String userId) {\n User user = userService.findByUserNameAndStatus(userName, Constant.Status.ACTIVE.getValue());\n if (user != null && !user.getUserId().equals(userId)) {\n return true;\n }\n return false;\n }", "public boolean hasUser(String username) {\n return users.containsKey(username);\n }", "@Override\n\tpublic boolean checkUser(String username) {\n\t\tboolean result = false;\n\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query = (Query) session.createQuery(\"from Member where username=?\");\n\n\t\tMember member = (Member) query.setString(0, username).uniqueResult();\n\t\tif (member != null) {\n\t\t\tresult = true;\n\t\t\tlogger.info(\"Member Exists\");\n\t\t} \n\n\t\treturn result;\n\n\t}", "public boolean doesUserExist(String username) {\n\t\t\n\t\tfor(User u : users) {\n\t\t\tif(u.getUsername().equals(username)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public boolean checkUsername(String username) {\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(\"username\", username);\r\n\r\n // Returns whether at least one user with the given username exists\r\n return users.countDocuments(query) > 0;\r\n }", "private void userNameErrorMessage(boolean exists, String userName){\n if(exists){\n System.out.println(\"\\nUserName: \" + userName + \" Already Exists In Database!\\n\");\n }\n }", "public User login(String username, boolean useExisting) throws UserAlreadyExistsException {\n User user = this.personRepository.find(username);\n if(null != user) {\n if(!useExisting) {\n throw new UserAlreadyExistsException();\n }\n return user;\n } else {\n return personRepository.addUser(username);\n }\n }", "public static boolean checkRegisteredUsername(String username){\n \tboolean found = false;\n \ttry {\n\t\t\tfound = DBHandler.isUsernameTaken(username, c); \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \treturn found;\n }", "private static boolean checkUsernameAvailable(String username) {\n if (username.length() <= 6) {\n return false; // Username too short.\n } else {\n if (!patients.isEmpty()) {\n for (Patient patient : patients\n ) {\n if (patient.getUserName().equals(username)) {\n return false; // Username already added for patient.\n }\n }\n for (Medic medic : medics\n ) {\n if (medic.getUserName().equals(username)) {\n return false; // Username already added for patient.\n }\n }\n }\n\n }\n return true;\n }", "public boolean isUsernameTaken(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select username from \"+ TABLE_NAME;\n Cursor cursor = db.rawQuery(query, null);\n\n String uname;\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(0);\n if(uname.equals(username)) {\n return true;\n }\n } while (cursor.moveToNext());\n }\n\n return false;\n }", "@Override\n public boolean checkUsername (User user) {\n String username = user.getUsername();\n User userEx = findByUserName(username);\n return userEx != null;\n }", "public boolean checkUserName(TextField userName) {\n String userNameSQL = \"SELECT * FROM user WHERE user_name = ? \";\n ResultSet rsUser;\n boolean username_exists = false;\n\n\n try {\n\n PreparedStatement userPST = connection.prepareStatement(userNameSQL);\n userPST.setString(1, userName.getText());\n rsUser = userPST.executeQuery();\n\n if (rsUser.next()) {\n username_exists = true;\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Username Already Exists\");\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n return username_exists;\n\n }", "private boolean checkNameExistModify(String userName, Integer id) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user && id != user.getUserId()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean isThereSuchAUser(String username, String email) ;", "@Override\n\tpublic boolean checkLoginNameExists(String loginName) {\n\n\t\tUser user = userDAO.getUserByName(loginName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public void add (User u) throws InvalidUsernameException{\n\t\tfor (User users: realm.getUsers()){\n\t\t\tif(u.getIdentifier().equalsIgnoreCase(users.getIdentifier()))\n\t\t\t\tthrow new InvalidUsernameException(\"Username Duplicato:\" + u.getIdentifier());\n\t\t\t}\n\t\trealm.getUsers().add(u);\n\n\t}", "private boolean isNameUnique(String name) {\n boolean isUnique = true;\n for (User user : this.users) {\n if (user.getName().equals(name)) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n }", "public boolean checkUserNameIsOccupied(String name) {\n \t\tif (users.size() != 0) {\n \t\t\tfor (int i = 0; i < users.size(); i++) {\n \t\t\t\tif (name.equals(users.get(i).getName())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "@Override\n @Transactional(readOnly = true)\n public Boolean existsByUsername(String username) {\n return this.pacienteRepository.existsByUsername(username);\n }", "@Test\n public void testCreateUserWithExistingUsername() {\n final String username = \"[email protected]\";\n final CreateUserRequest request1 = new CreateUserRequest(username, \"Michael\", \"Pickelbauer\");\n final CreateUserRequest request2 = new CreateUserRequest(username, \"Hugo\", \"Mayer\");\n\n // Now let's create the two user accounts\n final CreateUserResponse response1 = administration.createUser(token, request1);\n final CreateUserResponse response2 = administration.createUser(token, request2);\n\n // The first request should work like a charm\n assertThat(response1, is(not(nullValue())));\n assertThat(response1.isOk(), is(true));\n\n // The second request should fail, as we already have a user with this\n // username in the system\n assertThat(response2, is(not(nullValue())));\n assertThat(response2.isOk(), is(false));\n assertThat(response2.getError(), is(IWSErrors.USER_ACCOUNT_EXISTS));\n assertThat(response2.getMessage(), is(\"An account for the user with username \" + username + \" already exists.\"));\n }", "boolean hasUserName();", "public boolean usernameExists(String username){\r\n\t\tCursor mCursor =\r\n \t this.mDb.query(true, DATABASE_TABLE, new String[] {USERNAME,PASSWORD,FIRSTNAME,FAMILYNAME,\r\n \t \t\tMAIL,RELIABILITY,POSITION,CITY,BIRTHDATE, ROW_ID, IMGPATH}, \r\n \t \t\tUSERNAME + \"= '\" + username+ \"'\", null, null, null, null, null);\r\n \t if (mCursor != null ) {\r\n \t mCursor.moveToFirst();\r\n \t }\r\n \tboolean res = mCursor.isAfterLast();\r\n \tmCursor.close();\r\n \treturn res;\r\n\t}", "private int checkUserExists(String name)\r\n\t{\r\n\t\tfor (int i = 0; i < numOfUsers; i++)\r\n\t\t{\r\n\t\t\tif (name.equals(userAccounts[0][i]))\r\n\t\t\t\treturn i;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "boolean exists(String userName);", "@Override\n public User signUpUser(String name, String username, String password, String email) throws UsernameExistsException {\n User u = new User(name, username, password, email);\n if (userDataMapper.getUserByUserName(username) != null)\n throw new UsernameExistsException();\n userDataMapper.add(u);\n return u;\n }", "public boolean createNewUser(String username){\n boolean isCreated=false;\n try{\n\n database = dbH.getWritableDatabase();\n dbH.openDataBase();\n database.execSQL(\"INSERT INTO CurrentUser (Username) VALUES ('\" + username + \"');\");\n isCreated=true;\n dbH.close();\n }\n catch (SQLException e){\n }\n return isCreated;\n }", "public String checkUsername() {\n String username = \"\"; // Create username\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n username = checkEmpty(\"Account\"); // Call method to check input of username\n boolean isExist = false; // Check exist username\n for (Account acc : accounts) {\n // If username is exist, print out error\n if (username.equals(acc.getUsername())) {\n System.out.println(\"This account has already existed\");\n System.out.print(\"Try another account: \");\n isExist = true;\n }\n }\n // If username not exist then return username\n if (!isExist) {\n return username;\n }\n }\n return username; // Return username\n }", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "public boolean isRegisteredUserName(String userName);", "private static ErrorType handleAddUser(String username) {\n\t\tif (VersionControlDb.addUser(username) != null) {\n\t\t\treturn ErrorType.SUCCESS;\n\t\t}\n\t\telse {\n\t\t\treturn ErrorType.USERNAME_ALREADY_EXISTS;\n\t\t}\n\t}", "public boolean exists(String username) {\n\t\tfor(User user : users) {\n\t\t\tif(user.getUsername().equals(username)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean isUserAlreadyExist(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return false;\n }\n try {\n user = userDAO.getUserById(email);\n return user != null;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(\"failed to delete a user with id: \" + email);\n return false;\n }\n }", "public boolean userExists(String userName) {\r\n String qr = \"from UserCredsTbl where userName like '%\" + userName + \"%'\"\r\n + \"or userName like '%\" + userName + \"%'\";\r\n List userList = crud.getObject(qr);\r\n\r\n if (userList.size() > 0) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public static boolean userExists(String username) throws IOException, SQLException {\n ArrayList<String> user = retrieveUser(username);\n if (!user.isEmpty()) {\n if (user.get(0).equals(username)) {\n System.out.println(\"Username exists in database.\");\n return true;\n }\n }\n System.out.println(\"The user: \" + username + \" does not exist\");\n return false;\n }", "public boolean checkUserExists(String username) {\n boolean exists = false;\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS WHERE USERNAME=?\");\n ps.setString(1, username);\n\n ResultSet rs = ps.executeQuery();\n\n // rs.next() is false if the set is empty\n exists = rs.next();\n\n // close stuff\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return exists;\n }", "@Override\n public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n tr.edu.metu.ceng352.model.User user = userRepository.findByEmail(username);\n if (user == null) {\n throw new UsernameNotFoundException(\"user not found\");\n }\n return createUser(user);\n }", "private boolean checkUsername(String newUsername, Label label)\n {\n label.setText(\"\");\n\n if(newUsername.length() == 0){\n label.setText(\"Please choose a username \");\n return false;\n }\n for(Account account : getListOfAccounts()){\n if(newUsername.equals(account.getUsername())){\n label.setText(\"This field is already taken by another account. Please choose another username\");\n return false;\n }\n }\n return true;\n }", "public void setUsername(String name)\r\n {\r\n int index = -1;\r\n //Check if the new username is not already taken before setting the new username\r\n if(usernamesTaken.indexOf(name) == -1)\r\n {\r\n index = usernamesTaken.indexOf(this.username);\r\n usernamesTaken.set(index, name);\r\n this.username = name;\r\n }\r\n else\r\n {\r\n //Outouts a warning message\r\n System.out.println(\"WARNING: This username is already taken\");\r\n }//end if \r\n }", "Boolean checkUserExists(String userName) throws AppException;", "private void checkifUsernameExists(final String username) {\r\n Log.d(TAG, \"checkifUsernameExists: Checking if\" + username + \"Alredy Exists\");\r\n\r\n DatabaseReference reference=FirebaseDatabase.getInstance().getReference();\r\n Query query=reference.child(getString(R.string.dbname_users))\r\n .orderByChild(getString(R.string.field_username))\r\n .equalTo(username);\r\n query.addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n\r\n for(DataSnapshot singleSnapshot:dataSnapshot.getChildren())\r\n {\r\n if(singleSnapshot.exists())\r\n {\r\n Log.d(TAG, \"checkIfUsernameExists: FOUND A MATCH \"+singleSnapshot.getValue(User.class));\r\n append=myRef.push().getKey().substring(3,10);\r\n Log.d(TAG, \"onDataChange: username alredy exists,appending random string to name\"+append);\r\n }\r\n }\r\n String mUsername;\r\n mUsername = username + append;\r\n\r\n //add new user account settings to the database\r\n firebaseMethods.addNewUser(email,mUsername,\"\",\"\",\"\");\r\n Toast.makeText(mContext,\"Signup succesfull : sending Verification Email\",Toast.LENGTH_SHORT).show();\r\n mAuth.signOut();//Log out\r\n\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n\r\n }", "@Override\n\tpublic boolean registeringUser(UserDetails userDetails) {\n\t\tfor (UserDetails ud : Repository.USER_DETAILS) {\n\t\t\tif ((ud.getEmailId()).equalsIgnoreCase(userDetails.getEmailId())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tRepository.USER_DETAILS.add(userDetails);\n\t\treturn true;\n\t}", "boolean isUser(String username);", "@SuppressWarnings(\"static-method\")\n public @NotNull LocalUser findByName(String username) throws UserNotFoundException {\n if (\"admin\".equals(username)) {\n LocalUser user = new LocalUser(\"admin\", \"struts2\");\n return user;\n }\n throw new UserNotFoundException(username);\n }", "public boolean isUsernameExist(String un) {\n\n boolean exist = false;\n\n // accessing registeredUser table (collection)\n MongoCollection<Document> collection = db.getCollection(\"registeredUser\");\n\n // ----- get document of given username from registeredData -----\n System.out.println(\"\\nVerifying if username already exists or not\\n--------------------\\n\");\n String colUsername = \"username\"; // set key and value to look for in document\n FindIterable<Document> docOne = collection.find(Filters.eq(colUsername, un)); // find document by filters\n MongoCursor<Document> cursor1 = docOne.iterator(); // set up cursor to iterate rows of documents\n try {\n // cursor1 will only have 1 data if we found a match\n if (cursor1.hasNext()) {\n System.out.println(\"Username already exists\");\n exist = true;\n }\n else {\n System.out.println(\"Username is available to register\");\n }\n } finally {\n cursor1.close();\n }\n\n return exist;\n }", "public boolean checkUsername(String username) {\n for(int i=0; i<listOfUsers.size(); i++) {\n if(listOfUsers.get(i).compareTo(username)==0)\n return false;\n }\n return true;\n }", "public abstract boolean checkUser(String username);", "public boolean addUser ( String username, String password, String email ) {\n\n String passwordHash = makePasswordHash ( password, Integer.toString ( random.nextInt () ) );\n\n Document user = new Document ();\n\n user.append ( \"_id\", username ).append ( \"password\", passwordHash );\n\n if ( email != null && !email.equals ( \"\" ) ) {\n // the provided email address\n user.append ( \"email\", email );\n }\n\n try {\n usersCollection.insertOne ( user );\n return true;\n } catch ( MongoWriteException e ) {\n if ( e.getError ().getCategory ().equals ( ErrorCategory.DUPLICATE_KEY ) ) {\n System.out.println ( \"Username already in use: \" + username );\n return false;\n }\n throw e;\n }\n }", "public boolean checkUsername(String name) {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tResultSet rs = statement.executeQuery(\"SELECT count(*) FROM users where username = '\" + name + \"'\");\r\n\t\t\treturn rs.first();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void validateUserName(String name) throws UserException {\n\t\t\n\t}", "@Override\n\tpublic boolean editUtente(String username) {\n\t\tUtente user = (Utente)getUtente(username);\n\t\tif(userExists(user)) {\n\t\t\tuser.setGiudice(true);\n\t\t\tDB db = getDB();\n\t\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\t\tlong hash = (long) user.getUsername().hashCode();\n\t\t\tusers.put(hash, user);\n\t\t\tdb.commit();\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}", "@Test\n\tvoid repeatedUsernameTest() throws Exception {\n\t\tUser userObj = new User();\n\t\tuserObj.setName(\"Siva Murugan\");\n\t\tuserObj.setEmail(\"[email protected]\");\n\t\tuserObj.setGender(\"M\");\n\t\tuserObj.setMobileNumber(9878909878L);\n\t\tuserObj.setRole(\"C\");\n\t\tuserObj.setUsername(\"sivanew\");\n\t\tuserObj.setPassword(\"Siva123@\");\n\t\tString userJson = new ObjectMapper().writeValueAsString(userObj);\n\t\twhen(userService.registerUser(any(User.class))).thenThrow(new UsernameAlreadyExistException(\"E_UR01\"));\n\t\tmockMvc.perform(post(\"/vegapp/v1/users/register\").contentType(MediaType.APPLICATION_JSON).content(userJson))\n\t\t\t\t.andExpect(status().isConflict()).andExpect(jsonPath(\"$.errorMessage\").value(\"E_UR01\"));\n\t}", "public boolean checkUser(String username){\n String hql = \"SELECT c.id from Customer c where c.username = :username\";\n Query query = entityManager.createQuery(hql);\n query.setParameter(\"username\", username);\n try {\n query.getSingleResult();\n }catch(NoResultException e){\n return true;\n }\n return false;\n }", "boolean isUserExist(String username, String password);", "@Test\n\tpublic void FindUserByUsername() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\t\t\n\t\tString username = user.getUsername();\n\t\tUser user4 = userRepository.findByUsername(username);\n\t\n\t\tassertThat(user4).isNotNull();\n\t\tassertThat(user4).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t\t\n\t}", "public boolean isUser(String userName) throws Exception;", "boolean isUserExists(RegisterData data) throws DuplicateUserException;", "@Override\n\tpublic User findByName(String username) {\n\t\treturn userDao.findByName(username);\n\t}", "public boolean checkUsername(String user) {\n\n }", "public boolean checkUniqueLoginOnRegister(String login) {\n User user = userRepository.findByUsername(login);\n if (user == null) {\n return true;\n }\n return false;\n }", "@Test\n\tvoid shouldFindUserWithIncorrectUsername() throws Exception {\n\t\tUser user = this.userService.findUserByUsername(\"antonio98\");\n\t\tAssertions.assertThat(user.getUsername()).isNotEqualTo(\"fernando98\");\n\t}", "@RequestMapping(value = \"is_exist_user\", method = { RequestMethod.GET })\n\tpublic boolean isExistUser(@RequestParam(\"username\") String username) throws IOException {\n\t\tSystem.out.println(username);\n\t\tboolean result = true;\n\t\tMongoClient mongoClient = null;\n\t\ttry {\n\t\t\t// Create Mongo client\n\t\t\tmongoClient = new MongoClient(\"localhost\", 27017);\n\t\t\tMongoDatabase db = mongoClient.getDatabase(\"projectDB\");\n\n\t\t\t// Create Users collection and user document\n\t\t\tMongoCollection<Document> collection = db.getCollection(\"USERS\");\n\t\t\tDocument myDoc = collection.find(eq(\"username\", username)).first();\n\n\t\t\t//In case no document in the collection match the condition, the user not exist in the DB\n\t\t\tif (myDoc == null) {\n\t\t\t\tmongoClient.close();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t//Close DB connection\n\t\t\tmongoClient.close();\n\n\t\t} catch (Exception e) {\n\t\t\tmongoClient.close();\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic void deleteDuplicateUser(String userName) {\n\t\t\n\t}", "public void addUser(String userName) throws Exception {\r\n try {\r\n if (users.size() < MAX_USERS) {\r\n for (int i = 0; i < users.size(); i++) {\r\n if (users.get(i).getUserName().equalsIgnoreCase(userName) && users.get(i) != null)\r\n throw new Exception(\"Error: Name Already Exist\");\r\n }\r\n users.add(new User(userName, users.size(), users.size() + 1));\r\n } else throw new Exception(\"Error: Reached Maximum User Capacity\");\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }" ]
[ "0.7557953", "0.7461996", "0.7240872", "0.71811146", "0.7155683", "0.71125335", "0.69979674", "0.6992297", "0.6921815", "0.6903648", "0.68622637", "0.6857359", "0.68357927", "0.6795942", "0.67933667", "0.67464435", "0.67291594", "0.67192084", "0.66818714", "0.6671705", "0.6665916", "0.6645798", "0.66302377", "0.6628887", "0.6627227", "0.66076076", "0.6595255", "0.65786237", "0.6552512", "0.6499402", "0.6495177", "0.6449462", "0.6443163", "0.6441813", "0.64366627", "0.6428733", "0.6425836", "0.6332863", "0.6315197", "0.6310209", "0.63010633", "0.62948245", "0.629158", "0.627426", "0.6265738", "0.6262418", "0.6249788", "0.622142", "0.62063444", "0.62002295", "0.6199151", "0.61845225", "0.6183815", "0.6179487", "0.6174416", "0.61741656", "0.6164495", "0.6162014", "0.6161803", "0.6159433", "0.6159433", "0.6159433", "0.6159433", "0.6159433", "0.6159433", "0.6156579", "0.6133923", "0.61318433", "0.6099756", "0.60970366", "0.60920054", "0.60777146", "0.60767674", "0.6034337", "0.60267377", "0.6025621", "0.6021243", "0.6011211", "0.60007757", "0.5969928", "0.5957107", "0.59516346", "0.5950617", "0.5947777", "0.5946064", "0.59382796", "0.592071", "0.59118205", "0.59044135", "0.5902347", "0.589124", "0.58872646", "0.5866709", "0.5863612", "0.58302677", "0.5823387", "0.5818959", "0.5815742", "0.58153695", "0.5814364" ]
0.6029141
74
Takes in a password and sees if it already exists in the UserManager. Prevents the creation of multiple users with the same username.
public boolean findValidPassword(String password) { if (allPasswords.isEmpty()) { return true; } for (String s: allPasswords) { if(s.equals(password)) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic User checkUserLogin(String userName, String password) {\n\t\treturn objUserRegistrationDao.checkUserLogin(userName, password);\r\n\t}", "public synchronized boolean validateUser(String username, String password) {\r\n\t\tif (!mapping.containsKey(username)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tUser user = mapping.get(username);\r\n\t\treturn user.getPassword().equals(password);\r\n\t}", "public Boolean createUser(String name, String password) {\n if (userDao.findByUsername(name) != null) {\n return false;\n }\n\n User user = new User(name, password);\n \n try {\n userDao.createUser(user);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "private boolean isValidUser(String userName, String password) {\n\t\tif (userName.equals(\"Admin\") && password.equals(\"Admin\")) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "public boolean isUserExist(String email, String Password);", "@Override\n public String register(String name, String password) throws BakeryServiceException {\n if (name == null || password == null || name.length() < 3 || password.length() < 3)\n throw new BakeryServiceException(400);\n\n // check that the user does not already exist\n User existingUser = this.userDAO.getUserByName(name);\n if (existingUser != null)\n throw new BakeryServiceException(409);\n\n String passwordHash = BCrypt.hashpw(password, BCrypt.gensalt());\n String token = UUID.randomUUID().toString();\n this.userDAO.createUser(name, passwordHash, token);\n return token;\n }", "public boolean addUser(String username, String password, String role) throws InvalidUsername, InvalidRole {\n //Checking user name is valid:\n if (username == null) {\n throw new InvalidUsername(\"Username cannot be null!\");\n }\n //Checking role is valid:\n if (!checkRole(role)) {\n throw new InvalidRole(\"Role was not a valid input!\");\n }\n Pattern pattern = Pattern.compile(\"[^A-Za-z0-9]\");\n Matcher matcher = pattern.matcher(username);\n if (matcher.find()) {\n throw new InvalidUsername(\"Username cannot have special characters!\");\n }\n ArrayList<String> listOfUsernames = database.returnAllUsernames();\n for (int rowBeingChecked = 0; rowBeingChecked < listOfUsernames.size(); rowBeingChecked++) {\n if (listOfUsernames.get(rowBeingChecked).equals(username)) {\n throw new InvalidUsername(\"Name of username is not unique!\");\n }\n }\n\n //Hashing password, and generating salt:\n SecureRandom random = new SecureRandom();\n byte[] salt = new byte[16];\n random.nextBytes(salt);\n KeySpec spec = new PBEKeySpec(password.toCharArray(), salt, 66536, 128);\n SecretKeyFactory factory;\n byte[] hash;\n try {\n factory = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n hash = factory.generateSecret(spec).getEncoded();\n\n //Pushing to database (with hashed password + salt, instead of password)\n database.addAccount(username, role, byteToString(salt), byteToString(hash));\n return true;\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n return false;\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n return false;\n }\n }", "boolean isUserExist(String username, String password);", "@Override\n public boolean checkCurrentUserPassword(String password) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME_AND_PASSWORD);\n params.put(User.PARAM_PASSWORD, this.getPasswordHash(password));\n params.put(User.PARAM_USERNAME, getUserName());\n User user = getRepository().getEntity(User.class, params);\n\n return user != null && user.getUserName() != null && !user.getUserName().equals(\"\");\n }", "@Override\r\n public User checkUser(String username, String pwd) {\n return userMapper.checkuser(username, pwd);\r\n }", "@Override\n\t@Transactional\n\tpublic boolean validateuser(String username, String password) {\n\t\tboolean flag = this.logindao.validateuser(username, password);\n\t\treturn flag;\n\t}", "private boolean checkPass(String enterPass) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getPasswordHash() == enterPass.hashCode()) {\n return true;\n }\n }\n return false;\n }", "public boolean userDuplicateCheck(String username){\n ArrayList<User> users = new ArrayList<>(db.getAllUsers());\n\n for(User user : users){\n if(user.getUsername().equals(username)){\n return false;\n }\n }\n return true;\n }", "@Override\r\n\tpublic int checkUserExistsWithNamePassword(User user) {\n\t\tSession s = sessionFactory.openSession(); \r\n\t\t s.beginTransaction();\r\n\t\t \r\n\t\t System.out.println(\"Into checkUserExistsWithNamePassword...\");\r\n\t \r\n\t\t Query query = s.createQuery(\"select username,password from User u where u.username = ?\")\r\n\t\t \t\t.setParameter(0, user.getUsername());\r\n\t\t List<Object[]> list = query.list(); \r\n\t\t s.getTransaction().commit();\r\n\t\t System.out.println(\" checkUserExistsWithNamePassword rz=\"+list.size());\r\n\t\t if(list.size() > 0) {\r\n\t\t \tfor(Object[] object : list){ \r\n\t\t \t\tString passwd = (String)object[1]; \r\n\t\t \t\tString name = (String)object[0];\r\n\t\t System.out.println(name + \" : \" + passwd);\r\n\t\t if(passwd!=null && passwd.length()>0 \r\n\t\t \t\t&& passwd.trim().equalsIgnoreCase(user.getPassword().trim()))\r\n\t\t \treturn 1;\r\n\t\t else\r\n\t\t \treturn 3;\r\n\t\t }\r\n\t\t }\r\n\t return 2;\r\n\t\t\r\n\t}", "Boolean isValidUserPassword(String username, String password);", "public boolean register(String u_Name, String u_pw, String f_name){\n List<User> userList = userDao.getUserFromUsername(u_Name);\n //1.check if userName is used\n if (userList.size() != 0){ \n return false;\n }\n //2.create user and add to the DB\n User user = new User(u_Name, u_pw, f_name);\n userDao.addUser(user);\n //3.return true\n return true;\n }", "@Override\n\tpublic boolean isValidUser(String username, String password)\n\t{\n\t\treturn userDAO.isValidUser(username, password);\n\t}", "@Test\n public void testNonMatchingPasswords() {\n registerUser(username, password, password + password, email, email, forename, surname, null);\n assertNull(userService.getUser(username));\n }", "@Test\n public void testPasswordExists() {\n String userInput = \"Mounta1nM@n\";\n Owner testUser = ownerHelper.validateUser(\"harry.louis\", userInput);\n assertEquals(testUser.getPassword(), owner1.getPassword());\n assertEquals(testUser.getFirstName(), owner1.getFirstName());\n assertEquals(testUser.getLastName(), owner1.getLastName());\n\n }", "public boolean addUser ( String username, String password, String email ) {\n\n String passwordHash = makePasswordHash ( password, Integer.toString ( random.nextInt () ) );\n\n Document user = new Document ();\n\n user.append ( \"_id\", username ).append ( \"password\", passwordHash );\n\n if ( email != null && !email.equals ( \"\" ) ) {\n // the provided email address\n user.append ( \"email\", email );\n }\n\n try {\n usersCollection.insertOne ( user );\n return true;\n } catch ( MongoWriteException e ) {\n if ( e.getError ().getCategory ().equals ( ErrorCategory.DUPLICATE_KEY ) ) {\n System.out.println ( \"Username already in use: \" + username );\n return false;\n }\n throw e;\n }\n }", "boolean register(String nickname, String password) {\n try {\n User user = new User(nickname, password);\n return this.append(user);\n } catch (IllegalArgumentException e) {\n return false;\n }\n }", "@Override\r\n\tpublic boolean validate(String userName, String password) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tCriteria criteria = session.createCriteria(User1.class);\r\n\t\tcriteria.add(Restrictions.like(\"userName\", userName));\r\n\t\tboolean flag = false;\r\n\t\tObject result = criteria.uniqueResult();\r\n\t\tif (result != null) {\r\n\t\t\tUser1 user = (User1) result;\r\n\t\t\tif (user.getPassword().equalsIgnoreCase(password)) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (flag == true) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean loginUser(String username, String password) {\n if (registeredUsers.containsKey(username)) {\n User savedUser = registeredUsers.get(username);\n if (password.equals(savedUser.getPassword())) {\n return true;\n }\n }\n return false;\n }", "@Override\r\n\tpublic AccountBean validate(LoginBean login) throws PasswordDoesnotExistException {\r\n\t\tSession session = factory.openSession();\r\n\r\n\t\tAccountBean user = (AccountBean) session.bySimpleNaturalId(AccountBean.class).load(login.getEmail());\r\n\t\tif (user != null && user.getPassword().equals(login.getPassword())) {\r\n\t\t\treturn user;\r\n\t\t}\r\n\r\n\t\telse if (user != null && user.getPassword() != login.getPassword()) {\r\n\t\t\tthrow new PasswordDoesnotExistException(\"Incorrect password, Please try again!!!\");\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n public boolean login(String userName, String password) throws WrongCredentialsException, UserDatabaseNotFoundException, WrongUserDatabase {\n actualUser = userRepository.authenticate(userName, password);\n lastUserName = userName;\n return true;\n }", "@Override\n\tpublic boolean checkPassword(T u, String password) {\n\t\tif( u == null) {\n\t\t\treturn false;\n\t\t}\n\t\t// route all password checks through the same code\n\t\ttry {\n\t\t\tAndFilter<T> fil = getFactory().getAndFilter();\n\t\t\tfil.addFilter(getFactory().getFilter(u));\n\t\t\tfil.addFilter(getPasswordFilter(password));\n\t\t\tT temp = getFactory().find(fil,true);\n\t\t\tif (temp == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// is this the same person (paranoid check)\n\t\t\treturn (temp.getID() == u.getID());\n\t\t} catch (DataException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public String createUser(String name, String password) {\r\n\t\tUser newUser;\r\n\t\tnewUser = new User(name, password);\r\n\t\t//Check, if username already present\r\n\t\tfor(User user : userList) {\r\n\t\t\tif(user.getName().equals(name)) {\r\n\t\t\t\treturn (\"User already exists\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tuserList.add(newUser);\r\n\t\t//Export userList\r\n\t\ttry {\r\n\t\t\texportUserList();\r\n\t\t} catch (Exception e ) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn (\"User has been added\");\r\n\t}", "public boolean isUser(String userName, String password){\n\t\treturn userName == this.userName && password == this.password;\n\t}", "@Override\n\tpublic boolean checkUserForLogin(String email,String password) {\n\t\treturn userRepoImpl.checkUserForLogin(email,password);\n\t}", "private boolean isLoginValid(String userName, String password) throws NoSuchAlgorithmException {\n\t\tMultiValueMap<String, String> map = new LinkedMultiValueMap<String, String>();\n\t\tmap.add(\"username\", userName);\n\t\tmap.add(\"password\", Encoder.encodePassword(password));\n\t\tList<String> rolesStrs = this.userRoleService.findByUserName(userName);\n\t\treturn !rolesStrs.isEmpty();\n\t}", "private boolean checkExistingUsername(String username) {\n boolean existingUsername = false;\n User user = userFacade.getUserByUsername(username);\n if (user != null) {\n existingUsername = true;\n }\n return existingUsername;\n }", "@Override\n\tpublic boolean authenticate(final String name, final String password) {\n\t\treturn StringUtils.isNotBlank(name) && StringUtils.isNotBlank(password) && findByIdNoCache(name) != null;\n\t}", "public boolean validateUser (String username, String password){\n Cursor cursor = dbHelper.getReadableDatabase().rawQuery(\n \"SELECT * FROM \" + dbHelper.TABLE_USERS + \" WHERE \" + dbHelper.COLUMN_USERNAME\n + \"='\" + username + \"' AND \" + dbHelper.COLUMN_PASSWORD + \"='\" + password + \"'\",null);\n if (cursor.getCount()>0){\n return true;\n }else {\n return false;\n }\n }", "private User validateLogin(String name, String password){\n if (name == null || password == null){\n return null;\n }\n\n // Get a user by key\n User user = users.get(name);\n\n if (user == null){\n return null;\n }\n\n if (!user.getPassword().equals(password.trim())){\n return null;\n }\n\n return user;\n }", "boolean duplicatedUsername(String username);", "public final boolean validate(String username, String password) {\n\t\treturn authUser(userDao.findByUsername(username), password);\n\t}", "public boolean checkUsername(String username, String password) {\n try {\n remoteUserAccess = new RemoteUserAccess(new URI(\"http://localhost:8080/api/user/\"));\n } catch (Exception e) {\n remoteUserAccess = new DirectUserAccess();\n }\n Collection<User> userPasswords = remoteUserAccess.getUsers();\n if (!userPasswords.stream().anyMatch(a -> a.getUsername().equals(username))) {\n return false;\n } else if (!userPasswords.stream()\n .filter(p -> p.getUsername().equals(username))\n .findFirst().get().getPassword()\n .equals(password)) { // Chekcs if passwords match\n return false;\n }\n return true;\n\n }", "public boolean isCorrectLoginDetails(String username, String password) {\n boolean isExistingLogin = false; \n \n //Retrieve all existing user objects from the db. \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n //For each object in the array, check if there is a match for the user inputs and the object properties. \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username) && aUser.password.equals(password)) {\n isExistingLogin = true; \n }\n }\n return isExistingLogin; \n }", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "public String addNewUser(String username, String password) \n\t{\n\t\tif(userList.get(username) == null) \n\t\t{\n\t\t\tUser newUser = new User(username);\n\t\t\tnewUser.setPassword(NAME, hash(password));\n\t\t\tuserList.put(username, newUser);\n\t\t\treturn username;\n\t\t} \n\t\telse\n\t\t{\n\t\t\treturn USER_CONFLICT;\n\t\t}\n\t}", "boolean isUserExists(RegisterData data) throws DuplicateUserException;", "static boolean registerStaff(String name, String username, String password) {\r\n if (!StudentSystem.accounts.containsKey(username)) {\r\n Staff staff = new Staff();\r\n staff.setName(name);\r\n staff.setUsername(username);\r\n staff.setPassword(password);\r\n staff.setAccountType(3);\r\n\r\n accounts.put(username, staff);\r\n return true;\r\n }\r\n return false;\r\n }", "public void adicionaUtilizador(String username, String password) throws UserAlreadyExistsException {\n\t\tif (userCat.containsKey(username)) {\n\t\t\tthrow new UserAlreadyExistsException();\n\t\t}\n\t\tuserCat.put(username, new User(username, password));\n\t}", "public boolean verifyUser(String username, String password) throws SQLException {\n\n // update sql\n String pwGot = getPassword(username);\n\n if (pwGot.equals(password)) {\n return true;\n }\n\n return false;\n }", "@Override\n\tpublic boolean login(String username, String password)\n\t{\n\t\ttry\n\t\t{\n\t\t\tpassword = resolve(Hasher.class).hash(password);\n\t\t\tList<User> users = this.getRepository().findByFields(new String[]{\"username\", username}, new String[]{\"password\", password});\n\t\t\tif (!users.isEmpty())\n\t\t\t{\n\t\t\t\tthis.user = users.get(0);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tresolve(EventBus.class).fire(new ErrorEvent(e));\n\t\t}\n\n\t\treturn false;\n\t}", "@Override\n\tpublic void validatePassword(String password) throws UserException {\n\t\t\n\t}", "public boolean checkUniqueLoginOnRegister(String login) {\n User user = userRepository.findByUsername(login);\n if (user == null) {\n return true;\n }\n return false;\n }", "public boolean createUser(String username, String password) {\r\n \t\tboolean result = this.dataLayer.addUser(username, password);\r\n \r\n \t\treturn result;\r\n \t}", "public static boolean addUser (String username, String password) {\n return UserFactory.addRecord(username, password);\n }", "@Override\n public void validate(@NotNull final UserDto dto) {\n final char[] password = dto.getPassword();\n final char[] newPassword = dto.getRetypedPassword();\n if (!Arrays.equals(password, newPassword)) {\n passwordShredder.shred(password);\n passwordShredder.shred(newPassword);\n throw exceptionUtil.createBusinessValidationExceptionFrom(SECRETS_DO_NOT_MATCH, new Object[]{});\n }\n\n passwordShredder.shred(newPassword);\n }", "public void userExists(String newUsername)\n\t\tthrows DuplicateUsernameException{\n\t\tfor(User user: getUserSet()){\n\t\t\tif(user.getUsername().equals(newUsername)){\n\t\t\t\tthrow new DuplicateUsernameException(newUsername);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public User signUpUser(String name, String username, String password, String email) throws UsernameExistsException {\n User u = new User(name, username, password, email);\n if (userDataMapper.getUserByUserName(username) != null)\n throw new UsernameExistsException();\n userDataMapper.add(u);\n return u;\n }", "public boolean checkUser(String username, String password) {\n return checkUser(new User(username, password));\n }", "public boolean validateUsernameExist(String username) {\n return userRepository.findUsername(username);\n }", "public User addUser(String username, String password) {\n if (userList.containsKey(username)) {\n throw new NoSuchElementException(\"User already existed\");\n }\n if (username.length()==0) {\n throw new IllegalArgumentException(\"Username must contain at least one \" +\n \"character. Please try again.\");\n }\n User newUser = new User(username, password);\n userList.put(username, newUser);\n return newUser;\n }", "private boolean checkCredentials(String userName, String password)\n {\n int count = 0;\n for(String user : userNames)\n {\n if(user.contentEquals(userName))\n {\n if(passwords[count].contentEquals(password))\n {\n return true;\n }\n }\n count++;\n }\n\n return false;\n }", "boolean isMatchPassword(Password toCheck) throws NoUserSelectedException;", "@Override\n\tpublic boolean isValid() {\n\t\tif(password != null && password.length() > 0) {\n\t\t\tboolean rst = password.equals(repeatPassword);\n\t\t\tif(rst == false) {\n\t\t\t\tMap<String, String > validationRst = getValidationRst();\n\t\t\t\tvalidationRst.put(\"password\", \"重复输入的密码不一致\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn super.isValid();\n\t}", "@Override\n\tpublic Users isLogin(String uname, String password) {\n\t\treturn this.usersDao.selectByObject(uname, password);\n\t}", "@Override\n\t@Transactional(readOnly=true)\n\tpublic boolean isUsernameUnique(String username) {\n\t\treturn false;\n\t}", "User checkUser(String username, String password);", "@Override\n\tpublic boolean registeringUser(UserDetails userDetails) {\n\t\tfor (UserDetails ud : Repository.USER_DETAILS) {\n\t\t\tif ((ud.getEmailId()).equalsIgnoreCase(userDetails.getEmailId())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tRepository.USER_DETAILS.add(userDetails);\n\t\treturn true;\n\t}", "public boolean checkPassword(final UserName username,\n final char[] password) throws AuthenticationException {\n\n User userAttempt = getUser(username);\n\n if (userAttempt == null) {\n throw new UserDoesNotExistException();\n }\n\n if (password == null || !userAttempt.checkPassword(password)) {\n throw new IncorrectPasswordException();\n }\n\n return true;\n }", "@Test\n public void testPasswordHasNumbersAndLetters() {\n registerUser(username, \"123456789\");\n assertNull(userService.getUser(username));\n }", "@Override\n public boolean userLogin(String username, String password) \n {\n User tmpUser = null;\n tmpUser = getUser(username);\n if(tmpUser == null) return false;\n if(tmpUser.getPassword().equals(password)) return true;\n return false;\n }", "void saveNewPassword(String userName, String hashedPassword) throws DatabaseException;", "boolean isUniqueUsername(String username) throws SQLException;", "private boolean validatePassword() throws NoSuchAlgorithmException, NoSuchProviderException \n {\n String passwordToHash = Password.getText(); \n\t\t\n \tString securePassword = null;\n \tString testPass;\n \tBoolean success=false;\n \tbyte[] salt = null;\n\n\t \n\t \n\t \n try{ \n \t\tmycon=connect.getConnect();\n \t\t \n \t\t \n String query;\n\t query =\"select password, salt\\n\" + \n\t \t\t\"from employee\\n\" + \n\t \t\t\"where userName= ?;\";\n\t \n\t PreparedStatement pstm= mycon.prepareStatement(query);\n\t pstm.setString(1, Username.getText());\n\t ResultSet rs = pstm.executeQuery();\n\t \n\t if(rs.next()) {\n\t \tsecurePassword =rs.getString(1);\n\t \t\n\t \tBlob blob = rs.getBlob(2);\n\t \t int bloblen= (int) blob.length();\n\t \t salt = blob.getBytes(1, bloblen);\n\t \t blob.free();\n\t \t\n\t \t\n\t \n\t }\n\t \n\t \n\t testPass=SecurePass.getSecurePassword(passwordToHash, salt);\n \n \t if(securePassword.equals(testPass)) {\n \t success=true;\n \t this.ActiveUser=Username.getText();\n \t }\n \t\n \t\t\n \t\t\n \t\t\n \t\t} catch (SQLException e ) {\n \t\t\te.printStackTrace(); \t\n \t\t\t\n \t\t}\n\t\treturn success;\n \n\t \t \n \n \n\t\t\n \n }", "boolean validateUserAndPassword(String username, String password);", "public boolean checkUser(String username, String password) {\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor mCursor = db.rawQuery(\"SELECT * FROM \" + TABLE_USERLIST + \" WHERE user_name=? AND user_password=?\", new String[]{username,password});\n if (mCursor != null) {\n if(mCursor.getCount() > 0)\n {\n return true;\n }\n }\n return false;\n\n }", "@Override\n\tpublic boolean validate(String username, String password) throws Exception {\n\t\tboolean result=false;\n\t\tString hql=\"select count(um.username) from UserModel um where um.username=:username and um.password=:password\";\n\t\tQuery query=sf.getCurrentSession().createQuery(hql);\n\t\tquery.setString(\"username\",username);\n\t\tquery.setString(\"password\", password);\n\t\tLong lcount=(Long)query.uniqueResult();\n\t\tif(lcount!=null&&lcount>0){\n\t\t\tresult=true;\n\t\t}\n\t\treturn result;\n\t}", "public ResponseEntity<User> createUser(User user) {\n List<User> users=getAllUsers();\n boolean usernameIsUsed=false;\n\n\n for(User myUser : users){\n\n\n String username= myUser.getUsername();\n\n if(username.equals(user.getUsername())){\n usernameIsUsed=true;\n return ResponseEntity.badRequest().build();\n }\n\n\n }\n if(!usernameIsUsed){\n myUserDetailsService.addUser(user);\n return ResponseEntity.ok(user);\n }\n\n return null;\n }", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean isExistingUsername(String username) {\n boolean isExistingUser = false; \n \n List<User> retrievedUsersList = new LinkedList<User>(); \n retrievedUsersList = repo.returnAllUsers(); \n \n User aUser = null; \n for(var user : retrievedUsersList) {\n aUser = (User)user; \n \n if(aUser.username.equals(username)) {\n isExistingUser = true; \n }\n }\n \n return isExistingUser; \n }", "public void createUser(String username, String password, String role) {\r\n Optional<User> user = userRepo.findByName(username);\r\n if (!user.isPresent()) {\r\n User newUser = new User();\r\n newUser.setName(username);\r\n newUser.setPassword(password);\r\n newUser.setRole(role);\r\n userRepo.save(newUser);\r\n }\r\n }", "boolean verifyUser(User user, char[] password);", "public boolean isValidPassword(String username, String password) {\n \t\tString dbPassword = \"\";\n \t\ttry {\n \t\t\t\tArrayList<ArrayList<String>> list = myCon.retrieve(\"SELECT Password FROM User WHERE Username='\"+ username + \"'\");\n \t\t\t\tif(!list.isEmpty()) {\n\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\tdbPassword = DBManager.getElementInArray(list);\n \t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn false;\n\t\t\t}\n \t\tif(dbPassword.equals(password)) {\n \t\t\treturn true;\n \t\t}\n \t\treturn false;\t\n }", "public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}", "private void createUser(final String email, final String password) {\n\n }", "public boolean setRegisterEmployee(String username, String password) {\n\t\tboolean retVal = false;\n\t\t\n\t\t//Validate no one is currently signed onto the register\n\t\t//Note: Someone is logged into a register if the employee object isn't null\n\t\tif(null == register[registerSelected].getEmployee()) {\n\t\t\t//Search all employees to see if the username matches any\n\t\t\tfor(int i = 0; i < employee.size(); i++) {\n\t\t\t\tif(employee.get(i).getEmployeeUsername().equals(username)) {\n\t\t\t\t\t//Username has been found, validate password\n\t\t\t\t\tif(employee.get(i).getEmployeePassword().equals(password)) {\n\t\t\t\t\t\t//Everything is good to go, assign the employee to the register\n\t\t\t\t\t\tregister[registerSelected].setEmployee(employee.get(i));\n\t\t\t\t\t\t//Update return value to true telling the application an employee was logged in\n\t\t\t\t\t\tretVal = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn retVal;\n\t}", "@Override\n\tpublic boolean verifyUser(String username,String password )\n\t{\n\t\tboolean b;\n\t\tString sql = \"select username,password from f_loginTable where username=? and password=?\";\n\t\tint noOfRows=template.update(sql, new Object[] {username,password});\n\t\tif(noOfRows==1)\n\t\t{b=true;}\n\t\telse \n\t\t{b=false;}\n\t\treturn b;\t\t\n\t}", "@Override\n public boolean checkLogin(String login, String password) throws DaoException {\n User user = userDao.getByEmail(login);\n boolean result = false;\n if (user != null && user.getPassword().equalsIgnoreCase(DigestMD5Helper.computeHash(password))) {\n log.info(\"User {} {} has successfully logged in\", user.getFirstName(), user.getLastName());\n result = true;\n }\n return result;\n }", "public boolean logOn(String username, String password) {\n ArrayList<String> listOfUsernames = database.returnAllUsernames();\n for (int rowBeingChecked = 0; rowBeingChecked < listOfUsernames.size(); rowBeingChecked++) {\n if (listOfUsernames.get(rowBeingChecked).equals(username)) {\n byte[] saltAndHash = pullSaltAndHashFromDatabase(username);\n byte[] saltPulled = new byte[16];\n byte[] hashPulled = new byte[16];\n\n //Splitting 'saltAndHash' into separate bytes:\n for (int byteCounter = 0; byteCounter < 16; byteCounter++) {\n saltPulled[byteCounter] = saltAndHash[byteCounter];\n }\n for (int byteCounter = 0; byteCounter < 16; byteCounter++) {\n hashPulled[byteCounter] = saltAndHash[byteCounter + 16];\n }\n\n //Creating the hash again, and returning boolean if they're equal.\n KeySpec spec = new PBEKeySpec(password.toCharArray(), saltPulled, 66536, 128);\n try {\n SecretKeyFactory factory = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n byte[] hashGenerated = factory.generateSecret(spec).getEncoded();\n return Arrays.equals(hashGenerated, hashPulled);\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n return false;\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n //If user name not in table:\n return false;\n }", "@Override\n\tpublic boolean checkLoginNameExists(String loginName) {\n\n\t\tUser user = userDAO.getUserByName(loginName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "@Transactional\n public static User authenticate(String email, String password) {\n String sha1 = Utils.Hasher.hash(password);\n\n if (sha1 == null)\n return null;\n return User.find.where().eq(\"email\", email).eq(\"password\", sha1).findUnique();\n }", "private boolean isPasswordValid(String password) {\n return password.length() >= 1;\n }", "@Override\r\n\tpublic boolean registerSuperUser(String username, String password, String firstName, String lastName) {\n\t\tSuperUser tempSuperUser = new SuperUser(username, password, firstName, lastName);\r\n\t\t\r\n\t\treturn sudao.createSuperUser(tempSuperUser);\r\n\t}", "public String login(String userName, String userPassword){\n BCryptPasswordEncoder pass = new BCryptPasswordEncoder();\n Users users = new Users();\n Users userFromdb = userRepository.findByUserName(userName);\n if (userFromdb != null){\n if (!userFromdb.getPassword().equals(userPassword)){\n// if (!(pass.matches(userPassword, userFromdb.getPassword()))){\n throw new UsernameNotFoundException(\"kata sandi salah\");\n }else{\n UsernamePasswordAuthenticationToken authToken = new UsernamePasswordAuthenticationToken(userFromdb.getUsername(),\n userFromdb.getPassword(), userFromdb.getAuthorities());\n// Authentication authentication = authenticationManager.authenticate(authToken);\n SecurityContextHolder.getContext().setAuthentication(authToken);\n System.out.println(\"Session Created\");\n }\n return userFromdb.getUsername();\n }else{\n throw new UsernameNotFoundException(\"username tidak ditemukan\");\n }\n }", "boolean hasPassword2();", "public static boolean checkUserPass(String username, String password){\n getCurrentUsers();\n if(userPasses.containsKey(username)){\n System.out.println(\"bo\");\n if (userPasses.get(username).equals(password)){\n return true;\n }\n }\n System.out.println(username +\"|\"+password);\n return false;\n }", "public boolean existsUser(String username);", "boolean createUser(String username, String password);", "@Override\n\tpublic UserDetails checkUser(String emailId, String password) {\n\t\tfor (UserDetails ud :Repository.USER_DETAILS) {\n\t\t\tif ((ud.getEmailId().equalsIgnoreCase(emailId)) && (ud.getPassword().equals(password))) {\n\t\t\t\treturn ud;\n\t\t\t}\n\t\t}\n\t\tthrow new AirlineException(\"Invalid Credentials\");\n\t}", "public static boolean authenticateUser(String name, String password) {\r\n\t\tfor(User user : userList) {\r\n\t\t\tif(user.getName().equals(name) && user.getPassword().equals(password)) {\r\n\t\t\t\treturn true;\r\n\t\t\t} \r\n\t\t}\r\n\t\treturn false;\r\n\t}" ]
[ "0.64300084", "0.6350061", "0.6333303", "0.6315518", "0.63142943", "0.6297901", "0.628268", "0.62794197", "0.6262565", "0.62313545", "0.62252635", "0.62089366", "0.61974", "0.6169811", "0.613727", "0.61153173", "0.61015093", "0.6092", "0.609171", "0.6062452", "0.60577464", "0.6055501", "0.60201275", "0.60149544", "0.6014753", "0.6009902", "0.5987905", "0.5967847", "0.59577566", "0.5954931", "0.59464085", "0.5936115", "0.5923669", "0.590931", "0.59062773", "0.59044117", "0.5882807", "0.58682126", "0.58655256", "0.58655256", "0.58655256", "0.58655256", "0.58655256", "0.58655256", "0.58655256", "0.58655256", "0.5864687", "0.58386093", "0.58160627", "0.58156395", "0.5812135", "0.58082014", "0.58045655", "0.5804082", "0.5803113", "0.5757189", "0.5755729", "0.57544976", "0.5750105", "0.5742362", "0.57396674", "0.5736017", "0.5734701", "0.57275873", "0.57201725", "0.5717445", "0.57168144", "0.5710398", "0.5705762", "0.57054174", "0.57048446", "0.5703546", "0.5699083", "0.56970483", "0.56897247", "0.567533", "0.56738305", "0.5672963", "0.56676203", "0.56673837", "0.56668836", "0.5659572", "0.56593215", "0.56533796", "0.564755", "0.5642608", "0.5642033", "0.56418645", "0.5641784", "0.56411284", "0.5638691", "0.5634468", "0.56325394", "0.563083", "0.5620143", "0.5615109", "0.56104237", "0.5609631", "0.56064963", "0.5604553", "0.56037635" ]
0.0
-1
METHOD CONTRACT: Signature: method name is findValidEmail, parameters is an email string, returns boolean Preconditions: can be called at anytime Postconditions: object is not modified by method only accessed Framing Conditons: no instance variables are modified Invariants: none Takes in a email and sees if it already exists in the UserManager. Prevents the creation of multiple users with the same email.
public boolean findValidEmail(String email) { if (allEmails.isEmpty()) { return true; } for (String e: allEmails) { if(e.equals(email)) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User validExistingEmail(TextInputLayout tiEmail, EditText etEmail) {\n boolean result = isValidEmail(tiEmail, etEmail);\n User user = null;\n\n if (result) {\n String email = etEmail.getText().toString().trim();\n UserRepository userRepository = new UserRepository(c.getApplicationContext());\n user = userRepository.getUserByEmail(email);\n if (user == null)\n tiEmail.setError(c.getString(R.string.emailNotExist));\n else\n tiEmail.setError(null);\n }\n\n return user;\n }", "@Override\r\n\tpublic boolean isValid(String email, ConstraintValidatorContext context) {\n\t\t\r\n\t\tif(service==null){\r\n\t\t\t return true;\r\n\t\t}\r\n\t\treturn service.getUser(email)==null;\r\n\t\t\t\t\r\n\t}", "@Override\n public boolean isUserEmailExists(String email, String exludeUserName) {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_EMAIL_EXCLUDE_USERNAME);\n params.put(User.PARAM_EMAIL, email);\n params.put(User.PARAM_USERNAME, exludeUserName);\n User user = getRepository().getEntity(User.class, params);\n\n return user != null && user.getEmail() != null && !user.getEmail().equals(\"\");\n }", "public boolean findEmail(String email);", "public boolean checkIfEmailExist(String email){\n // create query to get user with asked email\n TypedQuery<UsersEntity> findUser = entityManager.createQuery(\n \"SELECT user FROM UsersEntity user WHERE user.email=:email\",\n UsersEntity.class);\n\n // set query email parameter\n findUser.setParameter(\"email\", email);\n\n try {\n findUser.getSingleResult();\n FacesMessage msg = new FacesMessage(\"User: \" + email + \" - already exist\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return true;\n } catch (NoResultException e) {\n return false;\n }\n }", "private boolean checkEmail() throws IOException {\n String email = getEmail.getText();\n \n if(email.contains(\"@\")) { \n UserDatabase db = new UserDatabase();\n \n if(db.emailExists(email)) {\n errorMessage.setText(\"This email address has already been registered.\");\n return false;\n }\n \n return true;\n }\n else {\n errorMessage.setText(\"Please enter a valid email. This email will be \"+\n \"used for verification and account retrieval.\");\n return false;\n }\n }", "public boolean isValidNewEmail(TextInputLayout tiEmail, EditText etEmail) {\n boolean result = isValidEmail(tiEmail, etEmail);\n\n if (result) {\n String email = etEmail.getText().toString().trim();\n UserRepository userRepository = new UserRepository(c.getApplicationContext());\n if (userRepository.getUserByEmail(email) != null) {\n tiEmail.setError(c.getString(R.string.emailExist));\n result = false;\n } else {\n tiEmail.setError(null);\n result = true;\n }\n }\n\n return result;\n }", "@Test\n\t\tvoid givenEmail_CheckForValidationForEmail_RetrunTrue() {\n\t\t\tboolean result = ValidateUserDetails.validateEmails(\"[email protected]\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "@Test\n\t\tvoid givenEmail_CheckForValidationForEmail_RetrunFalse() {\n\t\t\tboolean result =ValidateUserDetails.validateEmails(\"abc.xyz@bl\");\n\t\t\tAssertions.assertFalse(result);\n\t\t}", "public boolean isRegisteredEmail(String email);", "private boolean isExistUserEmail(String email, String userId) {\n User user = userService.findByEmailAndStatus(email, Constant.Status.ACTIVE.getValue());\n if (user != null && !user.getUserId().equals(userId)) {\n return true;\n }\n return false;\n }", "@Override\r\n\tpublic int emailcheck(String email) {\n\t\treturn dao.idcheck(email);\r\n\t}", "@Override\n\tpublic User findDuplicateByEmail(String email) {\n\t\tUser dbUser = userRepository.findByEmail(email);\n\t\tif (dbUser != null) {\n\t\t\tthrow new RuntimeException(\"User Already Registered.\");\n\t\t}\n\t\treturn null;\n\t}", "public User findUserByEmail(final String email);", "@Override\n @SuppressWarnings(\"unchecked\")\n public boolean checkExistsEmail(String emailAddress) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserProfile.class);\n crit.add(Restrictions.eq(\"emailAddress\", emailAddress));\n List<UserProfile> userList = crit.list();\n session.close();\n return !userList.isEmpty();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }", "private boolean check_email_available(String email) {\n // Search the database for this email address\n User test = UserDB.search(email);\n // If the email doesn't exist user will be null so return true\n return test == null;\n }", "User findUserByEmail(String email) throws Exception;", "Boolean checkEmailAlready(String email);", "public Boolean existsByEmail(String email);", "boolean emailExistant(String email, int id) throws BusinessException;", "void validate(String email);", "@RequestMapping(value = \"/signup/validateEmail\", method = RequestMethod.POST)\n @ResponseBody\n public SPResponse validateEmail(@RequestParam String email) {\n SPResponse spResponse = new SPResponse();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"The email to validate :\" + email);\n }\n // validate the email\n User user = userRepository.findByEmail(email); // signupForm.getEmail()\n if (user != null) {\n spResponse.addError(\"Duplicate_Email\",\n MessagesHelper.getMessage(\"exception.duplicateEmail.signup\"));\n } else {\n spResponse.isSuccess();\n }\n return spResponse;\n }", "public boolean existsByEmail(String email);", "public boolean existsByEmail(String email);", "public boolean checkEmail(String Email) {\n SQLiteDatabase db = DatabaseHelper.this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"select * from Users where Email=?\", new String[]{Email});\n if (cursor.getCount() > 0) {\n\n return false;\n } else {\n return true;\n }\n }", "boolean isEmailExist(String email);", "public Boolean checkEmail(String email){\n return databaseManager.CheckIsDataAlreadyInDBorNot(email);\n }", "public boolean isEmailValid(String email) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"from Customer where email=?\");\n\t\tquery.setString(0, email);\t\n\t\tCustomer customer=(Customer)query.uniqueResult();\n\t\tif(customer!=null)//duplicate email address, invalid\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t\t\n\t}", "boolean hasUserEmail();", "@Override\n public boolean isUserEmailExists(String email) {\n User user = getUserByEmail(email);\n return user != null && user.getEmail() != null && !user.getEmail().equals(\"\");\n }", "@Override\n\tpublic UserVO searchEmail(String email) throws Exception {\n\t\treturn dao.searchEmail(email);\n\t}", "boolean existsByEmail(String email);", "@Override\n\tpublic void checkDuplicateEmail(String email){\n\t\tif(userRepository.getUserByEmail(email) != null)\n\t\t\tthrow new BookException(HttpStatus.NOT_ACCEPTABLE,\"Email already exist\");\n\t}", "protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n System.out.println(emailResult(email));\n }", "public void checkEmail(String email,TableQueryCallback<BaseUser> callback) {\n mBaseUserTable.where().field(\"email\").eq(email).execute(callback);\n }", "boolean isEmailRequired();", "private boolean isEmailValid(String email) {\n return true;\r\n }", "boolean validateEmail(String email) {\n\t\treturn true;\n\n\t}", "@Override\n public boolean isUserAlreadyExist(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return false;\n }\n try {\n user = userDAO.getUserById(email);\n return user != null;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(\"failed to delete a user with id: \" + email);\n return false;\n }\n }", "public boolean checkUser(String email) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n \n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\";\n \n // selection argument\n String[] selectionArgs = {email};\n \n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(\n TABLE_USER, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "User findUserByEmail(String userEmail);", "public boolean checkUser(String email) {\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(\"email\", email);\r\n\r\n // Returns whether at least one user with the given email exists\r\n return users.countDocuments(query) > 0;\r\n }", "public static UserEntity search(String email) {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\t\n\t\tfor (Entity entity : pq.asIterable()) {\n\t\t\t \n\t\t\tif (entity.getProperty(\"email\").toString().equals(email)) {\n\t\t\t\tUserEntity returnedUser = new UserEntity(entity.getProperty(\n\t\t\t\t\t\t\"name\").toString(), entity.getProperty(\"email\")\n\t\t\t\t\t\t.toString());\n\t\t\t\treturnedUser.setId(entity.getKey().getId());\n\t\t\t\treturn returnedUser;\n\t\t\t }\nelse{\n\t\t\t\t\n }\n\t\t}\n\n\t\treturn null;\n\t}", "public static boolean email(String email) throws UserRegistrationException {\n\t\tboolean resultEmail = validateEmail.validator(email);\n\t\tif(true) {\n\t\t\treturn Pattern.matches(patternEmail, email);\n\t\t}else\n\t\t\tthrow new UserRegistrationException(\"Enter correct Email\");\n\t}", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "User find(String email);", "public boolean validateRegister(String email) {\n\t\tLog.i(TAG, \"validate current user whether exisits in db\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString val = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(val, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return true;\n\t\treturn false;\n\t}", "@Override\n\tpublic Boolean existsByEmail(String email) {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean userExists(String email) {\n\t\treturn (searchIndex(email) >= 0);\n\t}", "@Override\n\tpublic boolean emailisValid(String email) \n\t{\n\t\treturn false;\n\t}", "public boolean validateEmail() {\n\t\tString emailString = emailValidity.getText();\n\t\tString errorMsg = \"Email in use.\";\n\t\tboolean result = emailString.contains(errorMsg);\n\t\tif (result) {\n\t\t\tstoreVerificationResults(true, \"Email in use\");\n\t\t\tresult = true;\n\t\t} else {\n\t\t\tstoreVerificationResults(false, \"User able to reuse email id\");\n\t\t}\n\t\treturn result;\n\t}", "public boolean checkUser(String email) {\n\n // array of columns to fetch\n String[] columns = {\n COLUMN_USER_ID\n };\n SQLiteDatabase db = this.getReadableDatabase();\n\n // selection criteria\n String selection = COLUMN_USER_EMAIL + \" = ?\";\n\n // selection argument\n String[] selectionArgs = {email};\n\n // query user table with condition\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id FROM user WHERE user_email = '[email protected]';\n */\n Cursor cursor = db.query(TABLE_NAME, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n selectionArgs, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n int cursorCount = cursor.getCount();\n cursor.close();\n db.close();\n\n if (cursorCount > 0) {\n return true;\n }\n\n return false;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "boolean checkEmailExistsForClient(String email) throws RuntimeException;", "public User findEmail(String email){\n\t\t\n boolean found = false;\t\t\t\t\t\t\t\t\t\t/* ====> Boolean controls while loop */\n User correct = new User();\t\t\t\t\t\t\t\t\t/* ====> Create instance of the correct user*/\n User marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n marker = this.head;\t\t\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n \n // Loop keeps on going until the correct User is not found or until the next User is null\n while(!found){ \n \tif (marker.getEmail().equals(email)){\t\t\t\t\t/* ====> If the marker found the right user based on its email */ \n \t\tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \t\tcorrect = marker;\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the same User as marker */\n \t}\n \n else if (marker.getNext() == null){\t\t\t\t\t\t/* ====> If the marker reaches end of the list */ \n \tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \tcorrect = head;\t\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the head */\n }\n \n else {\n \tmarker = marker.getNext();\t\t\t\t\t\t\t/* ====> Move marker to the next element of the list */\n }\n }\n \n return correct;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Return correct User */ \n \n\t}", "public boolean checaExisteEmail(String email){\r\n\t\tfor (Usuario UsuarioTemp : listaDeUsuarios) {\r\n\t\t\tif(UsuarioTemp.getEmail().equals(email)){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn false;\r\n\t}", "User getUserByEmail(final String email);", "private void emailExistCheck() {\n usernameFromEmail(email.getText().toString());\n }", "@Override\n public TechGalleryUser getUserByEmail(final String email) throws NotFoundException {\n TechGalleryUser tgUser = userDao.findByEmail(email);\n// TechGalleryUser tgUser = userDao.findByEmail(\"[email protected]\");\n if (tgUser == null) {\n throw new NotFoundException(ValidationMessageEnums.USER_NOT_EXIST.message());\n } else {\n return tgUser;\n }\n }", "private void validateEmail() {\n mEmailValidator.processResult(\n mEmailValidator.apply(binding.registerEmail.getText().toString().trim()),\n this::validatePasswordsMatch,\n result -> binding.registerEmail.setError(\"Please enter a valid Email address.\"));\n }", "public String checkEmail() {\n String email = \"\"; // Create email\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n email = checkEmpty(\"Email\"); // Call method to check input of email\n // Pattern for email\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\" + \"[a-zA-Z0-9_+&*-]+)*@\"\n + \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" + \"A-Z]{2,7}$\";\n boolean isContinue = true; // Condition loop\n\n while (isContinue) {\n // If pattern not match, the print out error\n if (!Pattern.matches(emailRegex, email)) {\n System.out.println(\"Your email invalid!\");\n System.out.print(\"Try another email: \");\n email = checkEmpty(\"Email\");\n } else {\n isContinue = false;\n }\n }\n\n boolean isExist = false; // Check exist email\n for (Account acc : accounts) {\n if (email.equals(acc.getEmail())) {\n // Check email if exist print out error\n System.out.println(\"This email has already existed!\");\n System.out.print(\"Try another email: \");\n isExist = true;\n }\n }\n\n // If email not exist then return email\n if (!isExist) {\n return email;\n }\n }\n return email; // Return email\n }", "public boolean emailAvailability (String desiredEmail) {\n\t\t\n\t\tArrayList<User> companyMembers = myCompany.getCompanyMembers();\n\t\tfor(User companyMember: companyMembers) {\n\t\t\tif (companyMember.myAccount.getEmail().equalsIgnoreCase(desiredEmail))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "@Override\n\tpublic Users findUserByEmail(String email) {\n\t\treturn iUserDao.findUserByEmail(email);\n\t}", "@Override\n public OpenScienceFrameworkUser findOneUserByEmail(final String email) {\n final OpenScienceFrameworkUser user = findOneUserByUsername(email);\n if (user != null) {\n return user;\n }\n\n // check emails\n try {\n // JPA Hibernate does not support postgres query array operations, use postgres native queries\n // `query.setParameter()` does not work, use string concatenation instead\n final Query query= entityManager.createNativeQuery(\n \"select u.* from osf_osfuser u where u.emails @> '{\" + email + \"}'\\\\:\\\\:varchar[]\",\n OpenScienceFrameworkUser.class\n );\n return (OpenScienceFrameworkUser) query.getSingleResult();\n } catch (final PersistenceException e) {\n LOGGER.error(e.toString());\n return null;\n }\n }", "@Override\n public boolean checkEmail(User user) {\n String email = user.getEmail();\n User userEx = findByEmail(email);\n return userEx != null;\n }", "public Boolean checkEmailAvailability(String email) {\n\t\tBoolean res;\n\n\t\tUserTO user = getByEmail(email);\n\t\tif (user != null) {\n\t\t\tres = false;\n\t\t}\n\t\telse {\n\t\t\tres = true;\n\t\t}\n\n\t\treturn res;\n\t}", "public static boolean checkUserEmail(String email)\n\t{\n\t\tSearchResponse response = client.prepareSearch(\"projektzespolowy\")\n\t\t\t\t.setTypes(\"user\")\n\t\t\t\t.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)\n\t\t\t\t.setQuery(QueryBuilders.matchPhraseQuery(\"EMAIL\", email))\n\t\t\t\t.setSize(0).setFrom(0)\n\t\t\t\t.execute()\n\t\t\t\t.actionGet();\n\t\t\n\t\tif(response.getHits().getTotalHits() > 0)\n\t\t\treturn false;\n\t\telse \n\t\t\treturn true;\n\t}", "private void validationEmail(String email) throws FormValidationException {\n\t\tif (email != null) {\n\t\t\tif (!email.matches(\"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\")) {\n\t\t\t\tSystem.out.println(\"Merci de saisir une adresse mail valide.\");\n\n\t\t\t\tthrow new FormValidationException(\n\t\t\t\t\t\t\"Merci de saisir une adresse mail valide.\");\n\t\t\t\t// } else if ( groupDao.trouver( email ) != null ) {\n\t\t\t\t// System.out.println(\"Cette adresse email est déjà utilisée, merci d'en choisir une autre.\");\n\t\t\t\t// throw new FormValidationException(\n\t\t\t\t// \"Cette adresse email est déjà utilisée, merci d'en choisir une autre.\"\n\t\t\t\t// );\n\t\t\t}\n\t\t}\n\t}", "public Users findBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n Users registeredUser = (Users) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }", "public User retrieveUserByEmail(String email) throws ApplicationException;", "public User getUserByEmail(String email);", "public User getUserByEmail(String email);", "User getUserByEmail(String email);", "public boolean checkUser(String email) {\n db= openHelper.getReadableDatabase();\n String[] columns = {\n COLUMN_USER_ID\n };//coloane de returnat\n String selection = COLUMN_USER_EMAIL + \" = ?\";//criteriul de selectie\n String[] selectionArgs = {email};//argumentul pentru selectie\n // query user table with condition\n //SELECT column_user_id FROM useri WHERE column_user_email = '[email protected]';\n Cursor cursor = db.query(TABLE_USER, //tabel pentru query\n columns, //coloane de returnat\n selection, //coloane pentru clauze WHERE\n selectionArgs, //valori pentru clauza WHERE\n null, //group the rows\n null, //filter by row groups\n null); //ordinea de sortare\n int cursorCount = cursor.getCount();\n cursor.close();\n if (cursorCount > 0) {\n return true;\n }\n return false;\n }", "boolean isValidEmail(String email){\n boolean ValidEmail = !email.isEmpty() && Patterns.EMAIL_ADDRESS.matcher(email).matches();\n if(!ValidEmail){\n userEmail.setError(\"please fill this field correctly\");\n return false;\n }\n return true;\n }", "private boolean validateEmail(String email) {\n return Constants.VALID_EMAIL_PATTERN.matcher(email).find();\n }", "private boolean isValidEmail(TextInputLayout tiEmail, EditText etEmail) {\n String email = etEmail.getText().toString().trim();\n boolean result = false;\n\n if (email.length() == 0)\n tiEmail.setError(c.getString(R.string.required));\n else {\n Pattern emailPattern = Patterns.EMAIL_ADDRESS;\n if (!emailPattern.matcher(email).matches())\n tiEmail.setError(c.getString(R.string.invalid));\n else {\n tiEmail.setError(null);\n result = true;\n }\n }\n\n return result;\n }", "@Transactional(readOnly = true)\n public void validateEmailAddress(String email) {\n if (!EMAIL_PATTERN.matcher(email).matches()) {\n throw ApiException.of(ErrorCode.EMAIL_INVALID, email);\n }\n if (domainBlacklistRepository.existsByDomain(email.substring(email.lastIndexOf('@') + 1))) {\n throw ApiException.of(ErrorCode.EMAIL_BLACKLISTED, email);\n }\n }", "private void checkEmail(UserResource target, Errors errors) {\n final String proc = PACKAGE_NAME + \".checkEmail.\";\n final String userId = target.getId();\n final String email = target.getEmail();\n int found = 0;\n boolean doValidation = false;\n\n logger.debug(\"Entering: \" + proc + \"10\");\n\n final boolean isUpdating = apiUpdating(userId);\n logger.debug(proc + \"20\");\n\n if (isUpdating) {\n final UserEntry user = userRepository.findOne(userId);\n logger.debug(proc + \"30\");\n\n if (!user.getEmail()\n .equals(email)) {\n logger.debug(proc + \"40\");\n\n found = userRepository.updateEmail(email, userId);\n if (found > 0) {\n errors.rejectValue(\"email\", \"user.email.duplicate\");\n }\n else {\n doValidation = true;\n }\n }\n }\n else {\n logger.debug(proc + \"50\");\n\n found = userRepository.uniqueEmail(email);\n if (found > 0) {\n errors.rejectValue(\"email\", \"user.email.duplicate\");\n }\n else {\n doValidation = true;\n }\n }\n\n if (doValidation) {\n logger.debug(proc + \"60\");\n\n final laxstats.web.validators.Validator emailValidator = EmailValidator.getInstance();\n if (!emailValidator.isValid(email)) {\n errors.rejectValue(\"email\", \"user.email.invalidEmail\");\n }\n }\n logger.debug(\"Leaving: \" + proc + \"70\");\n }", "public static boolean emailAlreadyExists(String email) throws ParseException {\n ParseQuery<TipperUser> query = ParseQuery.getQuery(\"TipperUser\");\n query.whereEqualTo(\"email\", email);\n List<TipperUser> result = query.find();\n if (result.isEmpty()) {\n return false;\n } else return true;\n }", "@Override\n @Transactional(readOnly = true)\n public Boolean existsByEmail(String email) {\n return this.pacienteRepository.existsByEmail(email);\n }", "public boolean existeEmail(String email) {\n Conexion c = new Conexion();\n PreparedStatement ps = null;\n ResultSet rs = null;\n String sql = \"SELECT email FROM usuario WHERE usuario.email = ?\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n ps.setString(1, email);\n rs = ps.executeQuery();\n if (rs.next()) {\n return true;\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n rs.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return false;\n }", "@PreAuthorize(\"permitAll()\")\n @GetMapping(\"/users/email-available\")\n public ResponseEntity<Boolean> isEmailAvailable(@RequestParam(value = \"email\") String email) {\n return new ResponseEntity<>(userService.getUserByEmail(email) == null, HttpStatus.OK);\n }", "boolean checkEmailExist(String email){\n boolean isEmailExists = false;\n dbConnection();\n try{\n stmt = con.prepareStatement(\"SELECT * FROM users ORDER BY email\");\n rs = stmt.executeQuery();\n while(rs.next()){\n String checkEmail = rs.getString(\"email\");\n if(checkEmail.equals(email)){\n isEmailExists = true;\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n return isEmailExists;\n }", "public User validate(String emailID , String password);", "public boolean isUserExisted(String _fbEmail);", "static void emailValidation(String email) throws Exception {\n Pattern pattern_email = Pattern.compile(\"^[a-z0-9._-]+@[a-z0-9._-]{2,}\\\\.[a-z]{2,4}$\");\n if (email != null) {\n if (!pattern_email.matcher(email).find()) {\n throw new Exception(\"The value is not a valid email address\");\n }\n } else {\n throw new Exception(\"The email is required\");\n }\n }", "public boolean isExistingUser(String email){\n Long count = userRepository.countByEmail(email);\n\n return count > 0;\n }", "public boolean isUserExist(String emailId) {\n\t\tboolean exists = false;\n\n\t\tfor (User user : userVO.getUsers()) {\n\n\t\t\tif (user.getEmail().equals(emailId)) {\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\treturn exists;\n\t}", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);" ]
[ "0.6996556", "0.69522566", "0.6822273", "0.6682347", "0.6625094", "0.6565667", "0.65576166", "0.65305847", "0.6525182", "0.6511668", "0.65062714", "0.6501044", "0.64982945", "0.6490325", "0.6488355", "0.6486104", "0.64730716", "0.6467168", "0.6460338", "0.6447296", "0.64301056", "0.64291596", "0.6414984", "0.6414984", "0.6398439", "0.63949436", "0.6362309", "0.63573384", "0.63560027", "0.63539344", "0.63532674", "0.6348564", "0.63368607", "0.63209844", "0.6317827", "0.63103276", "0.630065", "0.62775016", "0.6264242", "0.6261582", "0.62476116", "0.624246", "0.62238336", "0.6214339", "0.6208986", "0.6208986", "0.6208986", "0.6208986", "0.6208986", "0.62043947", "0.61990553", "0.61982256", "0.61855555", "0.61663973", "0.616204", "0.6160486", "0.61526984", "0.61526984", "0.61526984", "0.61526984", "0.6130197", "0.61282825", "0.6128207", "0.6112295", "0.6101414", "0.6101351", "0.6078035", "0.60768867", "0.60736835", "0.6072986", "0.6069107", "0.6067922", "0.6066441", "0.60637057", "0.6060489", "0.60590017", "0.60480237", "0.6044494", "0.6044494", "0.6037487", "0.601142", "0.6005327", "0.59923965", "0.5988501", "0.59871227", "0.59844995", "0.598423", "0.59819585", "0.59772503", "0.5976288", "0.59709936", "0.5969062", "0.5968439", "0.5959052", "0.5951159", "0.5950997", "0.59391797", "0.59391797", "0.59391797", "0.59391797" ]
0.60848826
66
ToString method for the UserManager class.
@Override public String toString() { return "UserManager{"; //+ "allUsers=" + allUsers + //"\n, allPasswords=" + allPasswords + //"\n, allUserNames=" + allUserNames + //'}'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n StringBuffer sb = new StringBuffer(\"[User |\");\n sb.append(\" iduser=\").append(getIduser());\n sb.append(\"]\");\n return sb.toString();\n }", "public String toString () {\n\t\treturn \"User, name = \" + this.getName() + \" id = \" + this.getId();\n \t}", "@Override\n public String toString() {\n return \"User [id=\" + userId + \", userName=\" + userName + \", password=\" + password\n + \", firstName=\" + firstName + \", lastName=\" + lastName\n + \", email=\" + email + \"]\";\n }", "@Override\n public String toString() {\n return \"User{\" + \"userId=\" + userId + \", userName=\" + userName + \", password=\" + password + \", email=\" + email + \", loggedIn=\" + loggedIn + '}';\n }", "public String toString()\r\n/* 61: */ {\r\n/* 62:75 */ return \"User [username=\" + this.username + \", password=\" + this.password + \", email=\" + this.email + \", phone=\" + this.phone + \"]\";\r\n/* 63: */ }", "@Override\n public String toString() {\n \treturn \"lastname : \"+this.userLastname+\" firstname: \"+this.userFirstname+\" username: \"+this.userLogin+\" email: \"+this.userEmail+\" role: \"+this.roles;\n }", "public String toString() {\r\n\t\tStringBuffer out = new StringBuffer(\"toString: \");\r\n\t\tout.append(\"\\nclass User, mapping to table user\\n\");\r\n\t\tout.append(\"Persistent attributes: \\n\");\r\n\t\tout.append(\"id = \" + this.id + \"\\n\");\r\n\t\tout.append(\"password = \" + this.password + \"\\n\");\r\n\t\tout.append(\"name = \" + this.name + \"\\n\");\r\n\t\tout.append(\"role = \" + this.roles.get(0).getRole() + \"\\n\");\r\n\t\treturn out.toString();\r\n\t}", "@Override\n public String toString() {\n return \"userName \" + this.userName + \", pasword \" + this.passWord + \"sex \" + userSex.name();\n }", "@Override\n public String toString() {\n return \"User{\" +\n \"id=\" + id +\n \", imgUser=\" + imgUser +\n \", firstName='\" + firstName + '\\'' +\n \", lastName='\" + lastName + '\\'' +\n \", username='\" + username + '\\'' +\n \", email='\" + email + '\\'' +\n \", password='\" + password + '\\'' +\n \", city='\" + city + '\\'' +\n \", country='\" + country + '\\'' +\n \", gender='\" + gender + '\\'' +\n \", birthdate=\" + birthdate +\n \", age=\" + age +\n \", last_access=\" + last_access +\n \", registration_date=\" + registration_date +\n '}';\n }", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "public String toString() {\n StringBuffer buffer = new StringBuffer();\n\n buffer.append(getClass().getName());\n buffer.append(\"@\");\n buffer.append(Integer.toHexString(hashCode()));\n buffer.append(\" [\");\n buffer.append(\"userId\").append(\"='\").append(userId).append(\"' \");\n buffer.append(\"role\").append(\"='\").append(role).append(\"' \");\n buffer.append(\"]\");\n\n return buffer.toString();\n }", "@Override\n public String toString() {\n return \"User{\" +\n \"Id=\" + Id +\n \", name='\" + name + '\\'' +\n \", email='\" + email + '\\'' +\n \", phoneNumber=\" + phoneNumber +\n \", gender=\" + gender +\n \", age=\" + age +\n \", boardingPass=\" + boardingPass +\n \"'}'\\n\";\n }", "@java.lang.Override\n public java.lang.String toString() {\n return \"User{\"\n + \"id= \"\n + id\n + \"username='\"\n + username\n + '\\''\n + \", password='\"\n + password\n + '\\''\n + \", email='\"\n + email\n + '\\''\n + \", type=\"\n + type\n + '}';\n }", "@Override\n public String toString() {\n return \"User{\" +\n \"id=\" + id +\n \", name='\" + name + '\\'' +\n \", username='\" + username + '\\'' +\n \", password='\" + \"*******\" + '\\'' +\n '}';\n }", "@Override\r\n public String toString() {\r\n\t\tStringBuilder sb=new StringBuilder();\r\n\t\tsb.append(\"Usuario{\");\r\n\t\tsb.append(\"emailUsuario\" ).append(\"=\").append(emailUsuario).append(\"|\");\r\n\t\tsb.append(\"contrasenia\" ).append(\"=\").append(contrasenia).append(\"|\");\r\n\t\tsb.append(\"fechaCreacion\" ).append(\"=\").append(fechaCreacion).append(\"|\");\r\n\t\tsb.append(\"nombre\" ).append(\"=\").append(nombre).append(\"|\");\r\n\t\tsb.append(\"apellidoPaterno\" ).append(\"=\").append(apellidoPaterno).append(\"|\");\r\n\t\tsb.append(\"apellidoMaterno\" ).append(\"=\").append(apellidoMaterno).append(\"|\");\r\n\t\tsb.append(\"estatus\" ).append(\"=\").append(estatus).append(\"|\");\r\n\t\tsb.append(\"serialVersionUID=\").append(serialVersionUID).append(\"}\");\r\n\t\treturn sb.toString();\r\n\t}", "public String toString(){\r\n\t\treturn this.username+\"(\"+this.firstname+\" \"+this.lastname+\")\";\r\n\t}", "@Override\n\tpublic String toString () {\n\t\tString pUser = \"User: \" + getID();\n\t\tString pPass = \"Pass: \" + getPass();\n\t\treturn pUser + \" \" + pPass;\n\t}", "@Override\n public String toString() {\n return getUsername();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\t//new toString method for using possible fail checks (validation) later\r\n\t\t//it will not print PASSWORD\r\n\t\treturn String.format(\"UserID: \"+ userID +\"\\nUsername: \"+ username +\"\\nWeight: \"+ weight);\r\n\t}", "public String toString() {\r\n String users = \"\";\r\n for (int i = 0; i < this.UserList.size(); i++) {\r\n User user = (User) this.UserList.get(i);\r\n users += \" \" + user.nick();\r\n }\r\n\r\n return users.substring(1, users.length());\r\n }", "public String toString(){\n return username;\n\n }", "@Override\n public String toString() {\n return \"User{\" +\n \"id=\" + this.getId() +\n \", name='\" + this.getName() + '\\'' +\n \", password='\" + this.getPassword() + '\\'' +\n \", title='\" + this.getTitle() + '\\'' +\n \", username='\" + this.getUsername() + '\\'' +\n '}';\n }", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "@Override\n public String toString(){\n StringBuilder s = new StringBuilder();\n\n s.append(\"User\\n\");\n s.append(\"User's name: \" + this.name + \"\\n\");\n s.append(\"User's email: \" + this.email + \"\\n\");\n s.append(\"User's projects:\\n\");\n for(Project p : this.projects.getProjects().values()){\n s.append(\" -> \" + p.toString() + \"\\n\");\n }\n\n return s.toString();\n }", "@Override\n public String toString() {\n return username;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn this.id + \">>>>>>\" + this.name+\">>>>>>>\"+this.password;\r\n\t}", "@Override\n public String toString() {\n \treturn this.getUsername()+\"\\t\\t\"+this.getTel()+\"\\t\\t\"+this.getPassword()+\"\\t\"+this.getMembertypeid()+\"\\t\\t\"+this.getIntegral()+\"\\t\\t\"+this.getAddress();\n }", "public String toString() {\n if (group == null) {\n return \"Account[user=\" + user + \"]\";\n }\n return \"Account[user=\" + user + \", group=\" + group + \"]\";\n }", "@Override\n\tpublic String convertToString(Map context, Object o) {\n\t\tList<User> list=(List<User>)o;\n\t\tStringBuffer sb=new StringBuffer();\n\t\tfor(User user :list){\n\t\t\tString username = user.getUsername();\n\t\t\tString password = user.getPassword();\n\n\t\t\tsb.append(\"username: \").append(username).append(\" ,password: \")\n\t\t\t\t\t.append(password).append(\" \");\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn username;\n\t}", "@Override\n public String toString() {\n return \"--------------------------------------------\\n\"+\n \"username: \" + username + \"\\n\" + \n \"fullName: \" + lastName + \" \" + firstName + \"\\n\" + \n \"password: \" + password + \"\\n\" +\n \"phone: \" + phone + \"\\n\" + \n \"email: \" + email + \"\\n\";\n }", "@Override\n public String toString(){\n return role;\n }", "@Override\n public String toString() {\n return \"User{\" + \"id=\" + id + \", name=\" + name + \", cash=\" + cash + \", skills=\" + skills + \", potions=\" + potions + '}';\n }", "@Override\n public String toString() {\n return \"Username: \" + this.username + \"\\n\";\n }", "@Override\n public String toString() {\n return \"UserEntity{\" +\n \"id=\" + id +\n \", peerId=\" + peerId +\n \", gender=\" + gender +\n \", mainName='\" + mainName + '\\'' +\n \", pinyinName='\" + pinyinName + '\\'' +\n \", realName='\" + realName + '\\'' +\n \", avatar='\" + avatar + '\\'' +\n \", phone='\" + phone + '\\'' +\n \", email='\" + email + '\\'' +\n \", departmentId=\" + departmentId +\n \", status=\" + status +\n \", created=\" + created +\n \", updated=\" + updated +\n \", pinyinElement=\" + pinyinElement +\n \", searchElement=\" + searchElement +\n '}';\n }", "public String toString() \r\n {\r\n\t\treturn getLoginID() + \" [Age=\" + getAge() + \", Income=\" + getIncome() + \", Gender=\" + getGender() + \"]\";\r\n\t\t\t\t\r\n\t}", "@Override\n public String toString() {\n StringBuilder result = new StringBuilder();\n result.append(\"userProfile.id=[\").append(getId()).append(\"]\\n\");\n result.append(\"userProfile.city=[\").append(getCity()).append(\"]\\n\");\n result.append(\"userProfile.country=[\").append(getCountry()).append(\"]\\n\");\n result.append(\"userProfile.title=[\").append(getTitle()).append(\"]\\n\");\n result.append(\"userProfile.firstName=[\").append(getFirstName()).append(\"]\\n\");\n result.append(\"userProfile.lastName=[\").append(getLastName()).append(\"]\\n\");\n result.append(\"userProfile.gender=[\").append(getGender()).append(\"]\\n\");\n return result.toString();\n }", "@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }", "public String toString () {\n \tif (user)\n \t\tif (number1 == number2)\n \t\t\treturn \"user{\" + description + \", \" + number1 + \"}\";\n \t\telse\n \t\t\treturn \"user{\" + description + \", \" + number1 + \":\" + number2 + \"}\";\n \telse\n \t\treturn (new Integer(number1)).toString();\n }", "public String toString()\r\n\t{\r\n\t\tString out;\r\n\t\t\r\n\t\tif (locked)\r\n\t\t{\r\n\t\t\tout = \"***LOCKED ACCOUNT***\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tout = \"***UNLOCKED ACCOUNT***\";\r\n\t\t}\r\n\t\tout += String.format(\"\\nUser Name: %s\\nAccount Number: %s\\nEmail Address: %s\\n%s\",\r\n\t\t\t\tuserName, getAccountNumberString(), getEmailAddress(), getNotification());\r\n\t\t\r\n\t\tif (!locked)\r\n\t\t{\r\n\t\t\tnotification = null;\r\n\t\t}\r\n\t\t\r\n\t\treturn out;\r\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getUserArn() != null)\n sb.append(\"UserArn: \").append(getUserArn()).append(\",\");\n if (getProjectRole() != null)\n sb.append(\"ProjectRole: \").append(getProjectRole()).append(\",\");\n if (getRemoteAccessAllowed() != null)\n sb.append(\"RemoteAccessAllowed: \").append(getRemoteAccessAllowed());\n sb.append(\"}\");\n return sb.toString();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getMlUserDataEncryption() != null)\n sb.append(\"MlUserDataEncryption: \").append(getMlUserDataEncryption()).append(\",\");\n if (getTaskRunSecurityConfigurationName() != null)\n sb.append(\"TaskRunSecurityConfigurationName: \").append(getTaskRunSecurityConfigurationName());\n sb.append(\"}\");\n return sb.toString();\n }", "@Override\n public String toString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'@'HH:mm:ss\");\n String userInformation = new String();\n Date date = new Date();\n userInformation = \"[\" + username + \" - \" +\n socket.getInetAddress().getHostAddress() +\n \":\" + socket.getPort() + \" - \" + formatter.format(date)\n + \"]: \";\n return userInformation;\n }", "public String toString() {\n return userName+\"==\"+firstName+\"==\"+lastName+\"==\"+winPercentage+\"==\"+profileImage;\n }", "public String toString() {\n return (\"Principal's username: \" + name);\n }", "public String toString() {\n\t\tStringBuffer sb;\n\t\tsb = new StringBuffer(\"\\nlogin : \" + login);\n\t\tsb.append(\"\\npass : \" + passwd);\n\t\tif (admin) sb.append(\"admin\");\n\t\tif (pcreator) sb.append(\"pcreator\");\n\t\treturn sb.toString();\n\t}", "public String toString() {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(this.getClass().getName());\r\n sb.append(\"(\");\r\n\r\n sb.append(\", \").append(\"username=\").append(username);\r\n\r\n sb.append(\", \").append(\"email=\").append(email);\r\n\r\n sb.append(\", \").append(\"ragione_sociale=\").append(ragione_sociale);\r\n\r\n sb.append(\", \").append(\"nome=\").append(nome);\r\n\r\n sb.append(\", \").append(\"cognome=\").append(cognome);\r\n\r\n sb.append(\", \").append(\"immagine=\").append(immagine);\r\n\r\n sb.append(\", \").append(\"data_ultima_modifica=\").append(data_ultima_modifica);\r\n\r\n sb.append(\", \").append(\"oggetti=\").append(oggetti);\r\n\r\n sb.append(\", \").append(\"prestiti=\").append(prestiti);\r\n\r\n sb.append(\")\");\r\n return sb.toString();\r\n }", "@Override\r\n public String toString(){\r\n String out = \"Login - \";\r\n out += login;\r\n out += \" Password - \";\r\n out += Encryptor.decrypt(password,login);\r\n return out;\r\n }", "@Override\n public String toString() {\n return toStringHelper(this)\n .addValue(id)\n .addValue(firstName)\n .addValue(lastName)\n .addValue(email)\n .addValue(activities)\n .addValue(password).toString();\n }", "public String encode() {\n\t\tif (password != null)\n\t\t\treturn new StringBuffer()\n\t\t\t\t.append(user)\n\t\t\t\t.append(COLON)\n\t\t\t\t.append(password)\n\t\t\t\t.toString();\n\t\telse\n\t\t\treturn user;\n\t}", "public String toString() {\r\n\t\tif (!error)\r\n\t\t\treturn \"Username: \" + userName + \"\\nID: \" + id + \"\\nAuthToken: \" + authToken;\r\n\t\telse\r\n\t\t\treturn \"Error: \" + message; \r\n\t}", "public String toString() {\n return \"RoleName:DisplayName:Affiliate \" + getName() + \":\" + getDisplayName() + \":\" + getAffiliate().displayValue;\n }", "@Override \n public String toString() \n { \n return \"user\" + \n \"\\n\\t RecordNo: \" + this.recordNo + \n \"\\n\\t EmployeeName: \" + this.name + \n \"\\n\\t Age: \" + this.age + \n \"\\n\\t Sex: \" + this.sex + \n \"\\n\\t Date of Birth: \" + this.dob + \n \"\\n\\t Remark: \" + this.remark; \n }", "@Override\n\tpublic String toString() {\n\t\treturn wcRole.toString();\n\t}", "private String getUsersToString()\n {\n ArrayList<String> list = new ArrayList<>();\n Iterator iterator = userList.entrySet().iterator();\n while (iterator.hasNext())\n {\n Map.Entry mapEntry = (Map.Entry) iterator.next();\n list.add(\"\" + mapEntry.getKey());\n }\n \n String returnString = \"\";\n if(list.size() > 0)\n {\n returnString = list.get(0);\n for(int i = 1; i < list.size(); i++)\n {\n returnString = returnString + \",\" + list.get(i);\n }\n }\n return returnString;\n }", "@Override\n\tpublic String toString() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\treturn \"Usuario registrado \" + ((premium) ? \"premium \" : \"\") + \" [Nombre: \" + super.getNombre()\n\t\t\t\t+ \", fecha de nacimiento: \" + dateFormat.format(fechanac) + \", reproducidas = \"\n\t\t\t\t+ super.getReproducidas() + \", reproducciones = \" + reproducciones + \"]\";\n\t}", "@Override\n public String toString() {\n return \"\\r\\nUser: \" + user + \" Message: \" + message +\" \\r\\n\" ;\n }", "@Override\n\tpublic String toString(){\n\t\treturn \"Account{\"+\n\t\t\t\t\"id=\"+id+\n\t\t\t\t\", email='\"+email+'\\''+\n\t\t\t\t\", user=\"+user+\n\t\t\t\t\", accessLevel=\"+accessLevel+\n\t\t\t\t\", prefs=\"+prefs+\n\t\t\t\t\", createdAt=\"+createdAt+\n\t\t\t\t\", lastActive=\"+lastActive+\n\t\t\t\t\", banInfo=\"+banInfo+\n\t\t\t\t\", activationInfo=\"+activationInfo+\n\t\t\t\t\", invitedBy=\"+invitedBy+\n\t\t\t\t'}';\n\t}", "public static String toStringCurrentUser() {\n return new StringBuilder()\n .append(CURRENT_USER.getName())\n .append(\" - \")\n .append(CURRENT_USER.getEmployee().getName())\n .toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"No user with id \" + this.id + \" could be found in our system\";\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Hello, my name is: \" + getName() + \" and I have pass: \" + getPassword() + \" and balance: \" + getBalance() + \"$\" + \"\\n\";\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", encrptPassword=\").append(encrptPassword);\n sb.append(\", userId=\").append(userId);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "@Override\n public String toString() {\n return \"ID: \" + userID + \" Name: \" + name;\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s %s %s %b %s\", this.email, this.photoURL, this.getDisplayName(), this.isEmailVerified(),\n\t\t\t\tthis.getAccessToken());\n\t}", "@Override\n public String toString() {\n return getUserName() + \" on \" + getDate() + \"\\n\" + message + \"\\nType: \" + getType();\n }", "public String toString() {\n\t\tStringBuffer msg=new StringBuffer();\r\n\t\tmsg.append(\"\\n\");\r\n\t\tmsg.append(\"编号:\");\r\n\t\tmsg.append(id);\r\n\t\tmsg.append(\"\\n\");\r\n\t\tmsg.append(\"姓名:\");\r\n\t\tmsg.append(name);\r\n\t\tmsg.append(\"\\n\");\r\n\t\tmsg.append(\"权限:\");\r\n\t\tmsg.append(privledge);\r\n\t\tmsg.append(\"\\n\");\r\n\t\tmsg.append(\"性别:\");\r\n\t\tmsg.append(sex);\r\n\t\treturn msg.toString();\r\n\t}", "public String myToString() {\n\t\treturn \t\"User: \" + ((User)value1).toString() +\r\n\t\t\t\t\" | Job: \" + ((Job)key).name +\r\n\t\t\t\t\" | Recruiter: \" + ((Recruiter)value2).toString() +\r\n\t\t\t\t\" | Score: \" + df2.format(score);\r\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", userId=\").append(userId);\n sb.append(\", roleId=\").append(roleId);\n sb.append(\", updateUser=\").append(updateUser);\n sb.append(\", createUser=\").append(createUser);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\", updateTime=\").append(updateTime);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "@Override public final String toString() {\r\n return String.format(this.vId + \"\\t\" + this.vName\r\n + \"\\t\" + this.vUserName + \"\\t\" + this.vPassword + \"\\t\" + this.vPhone);\r\n }", "@Override\n public String toString() {\n return Role.class + \"[id=\" + this.id + \",desc=\" + this.getName() + \"]\";\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getFileSystemAssociationARN() != null)\n sb.append(\"FileSystemAssociationARN: \").append(getFileSystemAssociationARN()).append(\",\");\n if (getUserName() != null)\n sb.append(\"UserName: \").append(getUserName()).append(\",\");\n if (getPassword() != null)\n sb.append(\"Password: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getAuditDestinationARN() != null)\n sb.append(\"AuditDestinationARN: \").append(getAuditDestinationARN()).append(\",\");\n if (getCacheAttributes() != null)\n sb.append(\"CacheAttributes: \").append(getCacheAttributes());\n sb.append(\"}\");\n return sb.toString();\n }", "public String toString() {\n\t\treturn this.getClass().getName() + \"::\" + this.Id_Event + \"::\"\n\t\t\t\t+ this.Id_User;\n\t}", "public String toString() {\n return new StringBuffer(this.staffId).append(\"%\")\n .append(this.staffPass)\n .toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\t\n\t\tString s = \"user's id=\" + id +\"hotel Name = \" + hotelName +\", RoomNumber\" + roomNumber+\" hotelPrice=\" + price + \", roomType=\" + type; \n\t\treturn s;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"User [name=\" + name + \", score=\" + score + \", levelReached=\"\n\t\t\t\t+ levelReached + \"]\";\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", userMi=\").append(userMi);\n sb.append(\", passWord=\").append(passWord);\n sb.append(\", deleteFlag=\").append(deleteFlag);\n sb.append(\", name=\").append(name);\n sb.append(\", sex=\").append(sex);\n sb.append(\", paperType=\").append(paperType);\n sb.append(\", socialNo=\").append(socialNo);\n sb.append(\", tel=\").append(tel);\n sb.append(\", eMail=\").append(eMail);\n sb.append(\", homeAddress=\").append(homeAddress);\n sb.append(\", execUnit=\").append(execUnit);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "@Override\n public String getTypeForDisplay() {\n return \"User\";\n }", "public String toString() {\n return getFirstName() + \" \" + getLastName() + \" \" + getEmail() + \" \" + getPhone() + \" \" + getAffiliate();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Role : \"+name().toLowerCase();\n\t}", "public String toString() {\r\n\t\treturn \"Name: \" + getName() + \" Phone: \" + phoneNumber + \" Email: \" + email;\r\n\t\t\r\n\t}", "public String toString() {\n return (UUID + \" \" + name + \" \" + type + \" \" + universityName + \" \" + disabled);\n }", "@Override\n public String toString() {\n return \"\\nname: \" + name +\n \"\\npassword: \" + password +\n \"\\ndateOfBirth: \" + dateOfBirth +\n \"\\nmarriageStatus: \" + marriageStatus +\n \"\\naccountNumber: \" + accountNumber +\n \"\\namount in account 1 : \" + amountAccount1 +\n \"\\naccountNumber2: \" + accountNumber2 +\n \"\\namount in account 2 : \" + amountAccount2 +\n \"\\nrelativeName: \" + relativeName +\n \"\\nrelativeAge: \" + relativeAge;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", userId=\").append(userId);\n sb.append(\", identityType=\").append(identityType);\n sb.append(\", identifier=\").append(identifier);\n sb.append(\"]\");\n return sb.toString();\n }", "public String showUser(){\n String dataUser = \"\";\n for(int i = 0; i<MAX_USER; i++){\n if(user[i] != null){\n dataUser += user[i].showDataUser();\n }\n }\n return dataUser;\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.getFirstName() + \",\" + this.getLastName() + \",\" + this.getId() + \",\" + this.getEmail() + \",\" + this.getPassword() + \",\" + this.getMaxCourses();\n\t}", "public String getAllUsers() {\n\t\tString s = \"\";\n\t\tSet<String> ids = usersList.keySet();\n\t\tfor (String userId : ids) {\n\t\t\ts += \"<b>UserId :</b> \" + userId + \"&nbsp<b> UserName : </b>\" + usersList.get(userId).getName()\n\t\t\t\t\t+ \"<b>&nbsp Profession :</b> \" + usersList.get(userId).getProfession() + \"<br><br>\";\n\t\t}\n\t\treturn s;\n\n\t}", "@Override public String toString(){\n\t\treturn String.format(\"%s %s %s\", firstName, middleName, lastName);\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", coreUserId=\").append(coreUserId);\n sb.append(\", userName=\").append(userName);\n sb.append(\", password=\").append(password);\n sb.append(\", realName=\").append(realName);\n sb.append(\", sex=\").append(sex);\n sb.append(\", birthday=\").append(birthday);\n sb.append(\", mobile=\").append(mobile);\n sb.append(\", email=\").append(email);\n sb.append(\", comment=\").append(comment);\n sb.append(\", status=\").append(status);\n sb.append(\", coreDeptId=\").append(coreDeptId);\n sb.append(\", createdTime=\").append(createdTime);\n sb.append(\", modifiedTime=\").append(modifiedTime);\n sb.append(\", serialVersionUID=\").append(serialVersionUID);\n sb.append(\"]\");\n return sb.toString();\n }", "public String toString() {\n\t\treturn \"{\\\"username\\\":\\\"\" + this.username + \"\\\",\\\"apiKey\\\":\\\"\"\n\t\t\t\t+ this.apiKey + \"\\\",\\\"apiSecret:\\\"\" + this.apiSecret\n\t\t\t\t+ \"\\\",\\\"nonce:\\\"\" + this.nonce + \"\\\"}\";\n\t}", "@Override\n public String toString() {\n return String.format(\"[id = %d, PIN: %s, LastName = %s, gender=%s, FirstName: %s]\", id, pin,LastName, gender, FirstName);\n }", "public String toString() {\n return \"Full Name: \" + getFullName() + \", Username: \" + getUserName() + \", Interest: \" + getInterest();\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"Role[id=%s,nom=%s]\", id,nom);\n\t}", "public String toString()\r\n\t\t{\r\n\t\t\treturn firstName + \"#\" + familyName + \"#\" + ID + \"#\";\r\n\t\t}", "public String toString(){ \r\n return \"Nome: \" + this.nome + \"\\nEmail: \" + this.email +\r\n \"\\nEndereço: \" + this.endereco + \"\\nId: \" + this.id + \"\\n\"; \r\n }", "@JsonIgnore\n public String getRolesString() {\n return roles.stream()\n .map(Role::getDisplayName)\n .collect(joining(\", \"));\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(getClass().getSimpleName());\n sb.append(\" [\");\n sb.append(\"Hash = \").append(hashCode());\n sb.append(\", id=\").append(id);\n sb.append(\", uid=\").append(uid);\n sb.append(\", name=\").append(name);\n sb.append(\", account=\").append(account);\n sb.append(\", modifyTime=\").append(modifyTime);\n sb.append(\", createTime=\").append(createTime);\n sb.append(\"]\");\n return sb.toString();\n }", "public String toString(){\r\n String s=\"\";\r\n\r\n System.out.printf(\"Name: %s \\t Nickname: %s \\t\",getName(),getNickname());\r\n\r\n return s;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"nombre:%s, direccion: %s, telefono: %s\", nombre_banco, direccion, telefono);\n\t}", "@Override\n\tpublic String toString() {\n\t\t\n\t\treturn String.format(\"%s/%s, %s, %s, status: %s\",getNome(),getIdentificacao(),getEmail(),getCelular(),status);\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn id + \" \" + name + \" \" + surname;\n\t}" ]
[ "0.789604", "0.78530777", "0.7816114", "0.7694717", "0.76630366", "0.7625734", "0.7490825", "0.7487844", "0.7475417", "0.7436646", "0.7423196", "0.74056995", "0.7349455", "0.728115", "0.7278921", "0.72615117", "0.72606015", "0.72366583", "0.71866286", "0.7178046", "0.71761096", "0.7174084", "0.7146571", "0.7133971", "0.70958257", "0.70743126", "0.7054333", "0.6990427", "0.6982793", "0.69608086", "0.69571954", "0.6868788", "0.6854963", "0.68448794", "0.6840818", "0.6837878", "0.6818584", "0.6791776", "0.6778012", "0.67485", "0.67037034", "0.6681255", "0.66700053", "0.665798", "0.66463673", "0.66364086", "0.66329414", "0.66242164", "0.66217464", "0.6582311", "0.6562285", "0.65479124", "0.6537398", "0.6526274", "0.6504859", "0.64979464", "0.648754", "0.64588505", "0.6427294", "0.64234054", "0.6406533", "0.6404534", "0.6365883", "0.6357938", "0.6348019", "0.63397986", "0.63378835", "0.6337245", "0.6333841", "0.6332945", "0.63128716", "0.6312302", "0.63085663", "0.6304541", "0.62898344", "0.6267798", "0.62609553", "0.6257257", "0.6256459", "0.62503934", "0.6243148", "0.6222241", "0.62192845", "0.62145185", "0.62029666", "0.61972743", "0.6196777", "0.6188363", "0.61762595", "0.6171686", "0.61712444", "0.6159044", "0.6154742", "0.6149251", "0.6144435", "0.61398053", "0.6105915", "0.6103403", "0.610003", "0.60962325" ]
0.8272346
0
Constructs a new CrawlerThread object. It will use the information from the newThreadVertex object to search through that url and find more urls to add to the graph and queue up to the maximum pages and maximum depth, adhering to a politeness policy.
public CrawlerThread(Vertex newThreadVertex, LinkedHashMap<String, Vertex> crawledGraph, Queue<Vertex> graphQueue, int maximumPages, int maximumDepth, AtomicInteger politenessInt, Semaphore politenessSem) { threadVertex = newThreadVertex; graph = crawledGraph; urlQueue = graphQueue; maxPages = maximumPages; maxDepth = maximumDepth; politenessInteger = politenessInt; politenessSemaphore = politenessSem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WebCrawler(MultithreadedInvertedIndex index, int limit) {\n\t\tthis.index = index;\n\t\tthis.limit = limit;\n\t\tthis.queue = new WorkQueue(limit);\n\t\tthis.urls = new ArrayList<URL>();\n\t}", "@Override\n public void run()\n {\n Document doc = null;\n try\n {\n // Politeness policy\n try\n {\n // Used so that we don't have multiple threads sleeping, instead the rest just wait on the\n // semaphore\n if (PolitenessPolicy()) return;\n\n doc = Jsoup.connect(threadVertex.getUrl()).get();\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n return;\n }\n }\n catch (UnsupportedMimeTypeException e)\n {\n// System.out.println(\"--unsupported document type, do nothing\");\n return;\n }\n catch (HttpStatusException e)\n {\n// System.out.println(\"--invalid link, do nothing\");\n return;\n }\n catch (IOException e)\n {\n e.printStackTrace();\n return;\n }\n finally\n {\n politenessInteger.incrementAndGet();\n }\n\n Elements links = doc.select(\"a[href]\");\n for (Element link : links)\n {\n String v = link.attr(\"abs:href\");\n// System.out.println(\"Found: \" + v);\n\n// Document temp = null;\n if (!Util.ignoreLink(threadVertex.getUrl(), v))\n {\n // This was originally trying to catch invalid links before adding them to the graph\n // but I realized those are also valid notes, just leaf nodes.\n // This also greatly speeds up the execution of the program.\n// try\n// {\n// try\n// {\n// // Used so that we don't have multiple threads sleeping, instead the rest just wait on the\n// // semaphore\n// if (PolitenessPolicy()) return;\n//\n// temp = Jsoup.connect(v).get();\n// }\n// catch (InterruptedException e)\n// {\n// e.printStackTrace();\n// return;\n// }\n// }\n// catch (UnsupportedMimeTypeException e)\n// {\n// System.out.println(\"--unsupported document type, do nothing\");\n// return;\n// }\n// catch (HttpStatusException e)\n// {\n// System.out.println(\"--invalid link, do nothing\");\n// return;\n// }\n// catch (IOException e)\n// {\n// e.printStackTrace();\n// return;\n// }\n\n Vertex newVertex = new Vertex(v);\n\n // We need to synchronize the graph and the queue among each thread\n // This avoids dirty reads and dirty writes\n synchronized(graph)\n {\n synchronized(urlQueue)\n {\n if (!graph.containsKey(newVertex.getUrl()))\n {\n int newVertexDepth = threadVertex.getDepth() + 1;\n int currentPages = graph.size();\n\n if (currentPages < maxPages && newVertexDepth <= maxDepth)\n {\n // Set the new vertex's depth and add an ancestor\n newVertex.setDepth(newVertexDepth);\n newVertex.addAncestor(threadVertex);\n\n // Update the current vertex to have this one as a child\n threadVertex.addChild(newVertex);\n graph.put(threadVertex.getUrl(), threadVertex);\n\n // Place the new vertex in the discovered HashMap and place it in the queue\n graph.put(newVertex.getUrl(), newVertex);\n\n urlQueue.add(newVertex);\n }\n }\n else\n {\n // Done to update relationships of ancestors and children\n Vertex oldVertex = graph.get(newVertex.getUrl());\n\n oldVertex.addAncestor(threadVertex);\n threadVertex.addChild(oldVertex);\n\n graph.put(oldVertex.getUrl(), oldVertex);\n graph.put(threadVertex.getUrl(), threadVertex);\n }\n }\n }\n }\n else\n {\n// System.out.println(\"--ignore\");\n return;\n }\n }\n }", "public WebCrawler(String urlSeed) {\n\t\t\n\n\t\t\n\t\tconnection = db.openConnection();\n\n\t\t\ttry {\n\t\t\t\tthis.urlSeed = new URL(urlSeed);\n\t\t\t} catch(MalformedURLException ex) {\n\t\t\t\tlog.error(\"please input the right url with protocol part!\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tworkers = new WorkQueue(10);\n\t\t\tthis.count = 0;\n\t\t\tthis.pending = 0;\n\t\t\turlList = new ArrayList<String>();\n\t\t\t//index = new InvertedIndex();\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\tthis.HTMLFetcher();\n\t\t\tlong end = System.currentTimeMillis();\n\t\t\tlog.info(\"Running time for htmlFetcher: \" + (end - start));\n\t\t\tList<String> suggestedQuery = index.getSuggestedQuery();\n\t\t\tdb.updateSuggestedQuery(connection, suggestedQuery);\n\t\t\tdb.closeConnection(connection);\n\t}", "public WebCrawler(final URL startURL) {\n this.baseUrl = startURL.toString();\n this.links = new HashSet<>();\n this.startTime = System.currentTimeMillis();\n depth = 0;\n pagesVisited = 0;\n crawl(initURLS(startURL));\n try {\n goThroughLinks();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public Crawler(String seedUrlStr, int toDiscover)\n throws InterruptedException, FileNotFoundException,\n UnsupportedEncodingException {\n HTMLFetcher fetcher = null;\n urlQueue.add(seedUrlStr);\n String urlStr = \"\";\n while (discoveredUrls < toDiscover) {\n urlStr = urlQueue.poll(TIMEOUT_VAL, TimeUnit.SECONDS);\n\n if (urlStr == null) {\n // Happens if the crawler has waited for a new URL in the queue\n // for more than the timeout value. This means that all leafs\n // have been found and the crawler cannot continue.\n break;\n }\n\n // Acquire mutex to avoid collision when adding and\n // comparing at the same time\n mutex.acquireUninterruptibly();\n polledUrls.add(urlStr);\n mutex.release();\n\n System.out.println(\"Crawling: \" + urlStr);\n try {\n fetcher = new HTMLFetcher(new URL(urlStr), this);\n } catch (MalformedURLException e) {\n continue;\n }\n\n fetcherExecutor.execute(fetcher);\n }\n System.out.println(\"DONE: Discovered \" + discoveredUrls + \" URLs\");\n\n System.out.println(\"Dumping them into: urls.txt\");\n Collection<String> toDump = new LinkedList<String>(polledUrls);\n toDump.addAll(urlQueue);\n dumpCollection(toDump, \"urls.txt\");\n\n System.out.println(\"Waiting for \" + TIMEOUT_VAL + \" seconds for \"\n + Thread.activeCount() + \" threads to terminate...\");\n fetcherExecutor.awaitTermination(TIMEOUT_VAL, TimeUnit.SECONDS);\n }", "public CrawlWorker(String url) {\n\t\t\tthis.url = url;\n\t\t}", "public void crawl(URL url, int limit) {\n\t\turls.add(url);\n\t\tqueue.execute(new CrawlWorker(url.toString()));\n\n\t\tqueue.finish();\n\t\tqueue.shutdown();\n\t}", "private void innerCrawl(URL url, int limit) {\n\t\t\tsynchronized(urls) {\n\t\t\t\tif(urls.size() <= limit) {\n\t\t\t\t\tqueue.execute(new CrawlWorker(url.toString()));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public URLSpout() {\n \tURLSpout.activeThreads = new AtomicInteger();\n \tlog.debug(\"Starting URL spout\");\n \t\n \ttry { \t\t\n\t\t\treader = new BufferedReader(new FileReader(\"URLDisk.txt\"));\n\t\t\tint num_lines = XPathCrawler.getInstance().getFileCount().get();\n\t\t\tfor (int i = 0; i < num_lines; i++) {\n\t\t\t\treader.readLine(); //set reader to latest line\n\t\t\t}\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public static void main(String[] args) {\n\t\t\n\t\t/*MultiThreadedCrawler crawler = new MultiThreadedCrawler(\"https://cs.uic.edu\", \"uic.edu\", \"main\");\n\t\tcrawler.start();\n\t\tList<Map> p = new ArrayList<>();\n\t\tp.add(crawler.getResults());\n\t\t\n\t\ttry {\n\t\t\tGlobals.urlSet.add(new URL(\"https://disabilityresources.uic.edu\"));\n\t\t\tGlobals.urlSet.add(new URL(\"http://disabilityresources.uic.edu\"));\n\t\t\tGlobals.urlSet.add(new URL(\"http://cmhsrp.uic.edu/nrtc\")); \n\n\t\t} catch (MalformedURLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\tMultiThreadedCrawler c1 = new MultiThreadedCrawler(\"\", \"uic.edu\", \"c1\");\n\t\tMultiThreadedCrawler c2 = new MultiThreadedCrawler(\"\", \"uic.edu\", \"c2\");\n\t\tMultiThreadedCrawler c3 = new MultiThreadedCrawler(\"\", \"uic.edu\", \"c3\");\n\t\tMultiThreadedCrawler c4 = new MultiThreadedCrawler(\"\", \"uic.edu\", \"c4\");\n\t\tMultiThreadedCrawler c5 = new MultiThreadedCrawler(\"\", \"uic.edu\", \"c5\");\n\t\tMultiThreadedCrawler c6 = new MultiThreadedCrawler(\"\", \"uic.edu\", \"c6\");\n\t\t//MultiThreadedCrawler c7 = new MultiThreadedCrawler(\"https://housing.uic.edu\", \"uic.edu\", \"housing\");\n\t\t//MultiThreadedCrawler c8 = new MultiThreadedCrawler(\"https://grad.uic.edu\", \"uic.edu\", \"grad\");\n\t\t//MultiThreadedCrawler c9 = new MultiThreadedCrawler(\"https://today.uic.edu\", \"uic.edu\", \"today\");\n\t\t\n\t\t\n\t\t\n\t\tList<Thread> crawlers = new ArrayList<>();\n\t\tcrawlers.add(new Thread(c1, \"c1\"));\n\t\tcrawlers.add(new Thread(c2, \"c2\"));\n\t\tcrawlers.add(new Thread(c3, \"c3\"));\n\t\tcrawlers.add(new Thread(c4, \"c4\"));\n\t\tcrawlers.add(new Thread(c5, \"c5\"));\n\t\tcrawlers.add(new Thread(c6, \"c6\"));\n\t\tcrawlers.add(new Thread(c7, \"housing\"));\n\t\tcrawlers.add(new Thread(c8, \"grad\"));\n\t\tcrawlers.add(new Thread(c9, \"today\"));\n\t\t\n\t\t\n\t\tfor(Thread t: crawlers) {\n\t\t\tt.start();\n\t\t}\n\t\t\n\t\tfor(Thread t: crawlers) {\n\t\t\ttry {\n\t\t\t\tt.join();\n\t\t\t}catch(InterruptedException e) {\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tp.add(c1.getResults());\n\t\tp.add(c2.getResults());\n\t\tp.add(c3.getResults());\n\t\tp.add(c4.getResults());\n\t\tp.add(c5.getResults());\n\t\tp.add(c6.getResults());\n\t\t//p.add(c7.getResults());\n\t\t//p.add(c8.getResults());\n\t\t//p.add(c9.getResults());\n\t\t\n\t\t\n\t\twhile(true) {\n\t\t\tfor(Map m: p) {\n\t\t\t\tif(m == null)\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"All done\");\n\t\tmergeResults(p);\n\t\tUtil.updateDocVectLenMap();\n\t\tSystem.out.println(\"Total in collection: \" + Globals.pageDataMap.size());\n\t\tUtil.writeInvertedIndexTfMapAndMaxFreqMapToFile();*/\n\t\t\n\t\t\n\t\tUtil.loadDataFromFile();\n\t\tUtil.updateDocVectLenMap();\n\t\tSpringApplication.run(SearchApplication.class, args);\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic Indexer crawl (int limit) \n\t{\n\t\n\t\t////////////////////////////////////////////////////////////////////\n\t // Write your Code here as part of Priority Based Spider assignment\n\t // \n\t ///////////////////////////////////////////////////////////////////\n\t\tPQueue q=new PQueue();\n \t\n\t\ttry\n \t{\n\t\t\t final String authUser = \"iiit-63\";\n\t\t\t\tfinal String authPassword = \"MSIT123\";\n\n\t\t\t\tSystem.setProperty(\"http.proxyHost\", \"proxy.iiit.ac.in\");\n\t\t\t\tSystem.setProperty(\"http.proxyPort\", \"8080\");\n\t\t\t\tSystem.setProperty(\"http.proxyUser\", authUser);\n\t\t\t\tSystem.setProperty(\"http.proxyPassword\", authPassword);\n\n\t\t\t\tAuthenticator.setDefault(\n\t\t\t\t new Authenticator() \n\t\t\t\t {\n\t\t\t\t public PasswordAuthentication getPasswordAuthentication()\n\t\t\t\t {\n\t\t\t\t return new PasswordAuthentication(authUser, authPassword.toCharArray());\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t);\n\n\t\t\t\tSystem.setProperty(\"http.proxyUser\", authUser);\n\t\t\t\tSystem.setProperty(\"http.proxyPassword\", authPassword);\n \t\tURLTextReader in = new URLTextReader(u);\n \t\t// Parse the page into its elements\n \t\tPageLexer elts = new PageLexer(in, u);\t\t\n \t\tint count1=0;\n \t\t// Print out the tokens\n \t\tint count = 0;\n \t\t\n \t\twhile (elts.hasNext()) \n \t\t{\n \t\t\tcount++;\n \t\t\tPageElementInterface elt = (PageElementInterface)elts.next();\t\t\t \n \t\t\tif (elt instanceof PageHref)\n \t\t\tif(count1<limit)\n \t\t\t{\n \t\t\t\tif(q.isempty())\n \t\t\t\t{\n \t\t\t\t\tq.enqueue(elt.toString(),count);\n\t\t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tif(q.search(elt.toString(),count))\n \t\t\t\t\t{\n \t\t\t\t\t\tq.enqueue(elt.toString(),count);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tcount1++;\n \t\t\t\tSystem.out.println(\"link: \"+elt);\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\tSystem.out.println(\"links retrieved: \"+count1);\n \t\tq.display();\n \t\twhile(limit !=0)\n \t\t{\n \t\t\tObject elt=q.dequeue();\n \t\t\tURL u1=new URL(elt.toString());\n \t\t\tURLTextReader in1= new URLTextReader(u1);\n \t\t\t// Parse the page into its elements\n \t\t\tPageLexer elt1 = new PageLexer(in1, u1);\n \t\t\twhile (elt1.hasNext()) \n \t\t\t{\n \t\t\t\tPageElementInterface elts2= (PageElementInterface)elt1.next();\n \t\t\t\tif (elts2 instanceof PageWord)\n \t\t\t\t{\n \t\t\t\t\tv.add(elts2);\n \t\t\t\t}\n \t\t\t\tSystem.out.println(\"words:\"+elts2);\n \t\t\t} \t\t\t\n\t\t\t\tObjectIterator OI=new ObjectIterator(v);\n\t\t\t\ti.addPage(u1,OI);\n\t\t\t\tfor(int j=0;j<v.size();j++);\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"hello\"+v.get(count));\n\t\t\t\t}\n\t\t\t\tlimit--;\n \t\t}\n \t\t\n \t}\n \tcatch (Exception e)\n \t{\n \t\tSystem.out.println(\"Bad file or URL specification\");\n \t}\n return i;\n\t}", "public void crawlSite()\n {\n /** Init the logger */\n WorkLogger.log(\"WebCrawler start at site \" + this.urlStart.getFullUrl() + \" and maxDepth = \" + this.maxDepth);\n WorkLogger.log(\"====== START ======\");\n WorkLogger.log(\"\");\n /** Save the start time of crawling */\n long startTime = System.currentTimeMillis();\n /** Start our workers */\n this.taskHandler.startTask(this.urlStart, maxDepth);\n /** Check workers finished their work; in case then all workers wait, then no ones work, that leads no more tasks -> the program finished */\n while(this.taskHandler.isEnd() == false)\n {\n /** Default timeout for 1 sec cause the socket timeout I set to 1 sec */\n try{Thread.sleep(1000);}catch(Exception e){}\n }\n this.taskHandler.stopTasks();\n /** End the log file and add the time elapsed and total sites visited */\n WorkLogger.log(\"\\r\\n====== END ======\");\n WorkLogger.log(\"Time elapsed: \" + (System.currentTimeMillis() - startTime)/1000.);\n WorkLogger.log(\"Total visited sites: \" + this.pool.getVisitedSize());\n }", "public void process(CrawlTask crawlTask) {\n\n if (level == 0) {\n try {\n String boardLink = crawlTask.getUrl();\n MongoDatabase db = crawlTask.getDb();\n MongoCollection threadsCollection = db.getCollection(\"threads\");\n ForumConfig forumConfig = crawlTask.getForumConfig();\n\n List<ForumThread> threadList = new ArrayList<>();\n processBoard(forumConfig, boardLink, threadList, threadsCollection);\n System.out.println(\"***********************************************************TOTAL THREADS TO CRAWL IS: \" + threadList.size());\n for (ForumThread thread :\n threadList) {\n try {\n String link = thread.getThreadUrl();\n CrawlTask newTask = new CrawlTask(link, db, forumConfig);\n queue.push(newTask, level + 1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n // process of this object has failed, but we just ignore it here\n }\n } else if (level == 1) {\n try {\n String threadLink = crawlTask.getUrl();\n MongoDatabase db = crawlTask.getDb();\n ForumConfig forumConfig = crawlTask.getForumConfig();\n\n\t\t\t\t/*List<ForumPost> postList = new ArrayList<>();*/\n processThread(forumConfig, threadLink, db);\n\n } catch (Exception e) {\n e.printStackTrace();\n // process of this object has failed, but we just ignore it here\n }\n }\n\n\n }", "public void crawlAndIndex(String url) throws Exception {\r\n\t\t// TODO : Add code here\r\n\t\tQueue<String> queue=new LinkedList<>();\r\n\t\tqueue.add(url);\r\n\t\twhile (!queue.isEmpty()){\r\n\t\t\tString currentUrl=queue.poll();\r\n\t\t\tif(internet.getVisited(currentUrl)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tArrayList<String> urls = parser.getLinks(currentUrl);\r\n\t\t\tArrayList<String> contents = parser.getContent(currentUrl);\r\n\t\t\tupdateWordIndex(contents,currentUrl);\r\n\t\t\tinternet.addVertex(currentUrl);\r\n\t\t\tinternet.setVisited(currentUrl,true);\r\n\t\t\tfor(String u:urls){\r\n\t\t\t\tinternet.addVertex(u);\r\n\t\t\t\tinternet.addEdge(currentUrl,u);\r\n\t\t\t\tqueue.add(u);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void run() {\n\t\t\tString html = \"\";\n\t\t\ttry {\n\t\t\t\thtml = HTTPFetcher.fetchHTML(this.url);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\tSystem.out.println(\"Unknown host\");\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"IOException\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(html != null) {\n\t\t\t\t\tthis.newLinks = LinkParser.listLinks(new URL(this.url), html);\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t}\n\t\t\tif(newLinks != null) {\n\t\t\t\tfor(URL theURL : newLinks) {\n\t\t\t\t\tif(!(urls.contains(theURL))) {\n\t\t\t\t\t\tsynchronized(urls) {\n\t\t\t\t\t\t\turls.add(theURL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinnerCrawl(theURL, limit);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tInvertedIndex local = new InvertedIndex();\n\t\t\t\tString no_html = HTMLCleaner.stripHTML(html.toString());\n\t\t\t\tString[] the_words = WordParser.parseWords(no_html);\n\t\t\t\tlocal.addAll(the_words, this.url);\n\t\t\t\tindex.addAll(local);\n\t\t\t}\n\t\t}", "public void threadedCrawl(String url) {\n this.executor.submit(new Task(url));\n }", "public CrawlerResult crawl(URL url){\n //Creating the crawler result\n CrawlerResult rslt = new CrawlerResult(url);\n logger.info(url +\" started crawling....\");\n try{\n //Get the Document from the URL\n Document doc = Jsoup.connect(url.toString()).get();\n\n rslt.setTitle(doc.title());\n\n //links on the page\n Elements links = doc.select(\"a\");\n\n //Links on the page\n for(Element link : links){\n rslt.addLinksOnPage(new URL(link.attr(\"abs:href\")));\n }\n }catch(Exception e){\n //TODO\n }\n logger.info(url +\" finished crawled.\");\n return rslt;\n }", "public BufferPool(int numPages) {\n // some code goes here\n this.pageNum = numPages;\n this.bufferedPages = new ConcurrentHashMap<PageId, Node>();\n currentTransactions = new ConcurrentHashMap<TransactionId, Long>();\n lockManager = new LockManager();\n }", "public void crawl(String url);", "public static void main(String[] args) {\n \n FCrawler fc = new FCrawler();\n \n \n \n // now start all of the worker threads\n \n int N = 5;\n ArrayList<Thread> thread = new ArrayList<Thread>(N);\n for (int i = 0; i < N; i++) {\n Thread t = new Thread(fc.createWorker());\n thread.add(t);\n t.start();\n }\n \n// now place each directory into the workQ\n \n // fc.processDirectory(Args[0]);\n \n fc.processDirectory(\"D://\");\n// indicate that there are no more directories to add\n \n fc.workQ.finish();\n \n for (int i = 0; i < N; i++){\n try {\n thread.get(i).join();\n } catch (Exception e) {};\n }\n }", "public IMThread(String threadName, Integer urlid, ArrayList<String> keys){\n this.name = threadName;\n this.selectedUrlId = urlid;\n this.keyArrayList = keys;\n /*t = new Thread(this,name);\n t.start();*/\n}", "public void crawl(String url) {\n Queue<String> queue = new LinkedList<>();\n queue.add(url);\n this.visited_urls.put(url, 1);\n Set<String> urls;\n\n while (!queue.isEmpty()) {\n String link = queue.remove();\n try {\n urls = WebCrawlerUtil.getLinks(link);\n } catch (IOException e) {\n logger.debug(\"unable to parse link \" + link);\n continue;\n }\n System.out.println(WebCrawlerUtil.formatOutput(link, urls));\n for (String neighbor : urls) {\n if (!this.visited_urls.containsKey(neighbor)) {\n this.visited_urls.put(neighbor, 1);\n queue.add(neighbor);\n }\n }\n }\n }", "BackgroundWorker (String page, int id, int ivmin, int ivmax, String attack, String ulti, String name, String username, Context context) {this.context=context; this.page=page; this.id=id; this.ivmin=ivmin; this.ivmax=ivmax; this.attack=attack; this.ulti=ulti; this.name=name; this.username=username; flag=4;}", "public HttpTrafficGenerator() {\n\n\t\tworker = new Thread(this, \"HttpTrafficGenerator\");\n\t\ttry {\n\t\t\twebsite = new URL(\"http://google.com\");\n\t\t} catch (MalformedURLException e) {\n\t\t\tthrow new IllegalStateException(\"Internal error\", e);\n\t\t}\n\t}", "@Override\n public void crawl() throws IOException {\n final String seedURL = url;\n Queue<String> currentDepthQueue = new LinkedList<>();\n currentDepthQueue.add(seedURL);\n crawl(visitedURL, 1, currentDepthQueue);\n customObjectWriter.flush();\n }", "public MultiThreadedTabuSearch() {}", "public static void Execute ()\n\t{\n\t\tReceiveCollection (SpawnCrawler (target));\n\t\t\n\t\tList<String> initialCollection = overCollection;\n\t\t\n\t\tif ( ! initialCollection.isEmpty ())\n\t\t{\n\t\t\n\t\t\tfor (String collected : initialCollection)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (collected.contains (\"http\"))\n\t\t\t\t\tReceiveCollection (SpawnCrawler (collected));\n\t\t\t\telse\n\t\t\t\t\tReceiveCollection (SpawnCrawler (target + collected));\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t/*\n\t\t * Several loops should commence here where the system reiteratively goes over all the newly acquired URLs\n\t\t * so it may extend itself beyond the first and second depth.\n\t\t * However this process should be halted once it reaches a certain configurable depth.\n\t\t */\n\t\tint depth = 0;\n\t\tint newFoundings = 0;\n\t\t\n\t\tdepthLoop: while (depth <= MAX_DEPTH)\n\t\t{\n\t\t\t\n\t\t\tfor (String collected : overCollection)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (collected.contains (\"http\"))\n\t\t\t\t\tSpawnCrawler (collected);\n\t\t\t\telse\n\t\t\t\t\tSpawnCrawler (target + collected);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (newFoundings <= 0)\n\t\t\t\tbreak depthLoop;\n\t\t\t\n\t\t\tdepth++;\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "public void run() {\n for (CrawlTask newTask = queue.pop(level); newTask != null; newTask = queue.pop(level))\n /*while (queue.getQueueSize(currentLevel)>0)*/ {\n//\t\t\tObject newTask = queue.pop(currentLevel);\n // Tell the message receiver what we're doing now\n mainCrawler.receiveMessage(newTask, id);\n // Process the newTask\n process(newTask);\n // If there are less threads running than it could, try\n // starting more threads\n if (tc.getMaxThreads() > tc.getRunningThreads()) {\n try {\n tc.startThreads();\n } catch (Exception e) {\n System.err.println(\"[\" + id + \"] \" + e.toString());\n }\n }\n }\n // Notify the ThreadController that we're done\n tc.finished(id);\n }", "public Crawler(String domain) {\n this.domain = domain;\n this.startUrl = \"http://\" + domain;\n init();\n }", "netthread(String url,Handler h) {\n this.urlstring = url;\n this.ntthrd_handler = h;//指定activity\n }", "public static void main(String[] arg) throws IOException, URISyntaxException, InterruptedException {\n DB = new manageDB();\n Crawler crawler = new Crawler();\n DBLock=new AtomicInteger(0);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n crawler.CrawlerProcess(5);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n }\n }).start();\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n processedCrawledPages=0;\n outputSection = new HashSet<>();\n while (true) {\n crawlerOutput = crawler.crawlerOutput;\n if (crawlerOutput != null)\n {\n if (crawlerOutput.size() > 0)\n {\n Iterator<Crawler.OutputDoc> itr = crawlerOutput.iterator();\n if(itr.hasNext())\n {\n Crawler.OutputDoc output;\n synchronized (crawlerOutput) {\n output = itr.next();\n outputSection.add(output);\n }\n if(processedCrawledPages%10==0)\n {\n //lock db to be exclusive for POP function\n DBLock.set(1);\n processedCrawledPages=0;\n try {\n Thread popThread=new Thread(new POPClass(outputSection));\n popThread.start();\n popThread.join();\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n outputSection.clear();\n \n }\n while(DBLock.intValue()==1);\n processedCrawledPages +=1;\n DB.docProcess(output);\n synchronized (crawlerOutput) {\n crawlerOutput.remove(output);\n }\n }\n\n }\n }\n }\n }\n\n }).start();\n\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n ServerSocket serverSocket = new ServerSocket(7800);\n System.out.println(\"server is up and running...\");\n while (true) {\n Socket s = serverSocket.accept();\n System.out.println(\"server accepted the query...\");\n DataInputStream DIS = new DataInputStream(s.getInputStream());\n String query_and_flags = DIS.readUTF();\n Boolean imageSearch = false;\n Boolean phraseSearch = false;\n System.out.println(\"query_and_flags=\" + query_and_flags);\n String[] list_query_and_flags = query_and_flags.split(\"@\");\n String query = list_query_and_flags[0];\n if (list_query_and_flags[1].equals(\"phrase\"))\n phraseSearch = true;\n if (list_query_and_flags[2].equals(\"yes\"))\n imageSearch = true;\n\n if (imageSearch)\n manageDB.imageSearch(query);\n else manageDB.rank(query,phraseSearch);\n if (phraseSearch)\n System.out.println(\"it's phrase search\");\n else System.out.println(\"no phrase search\");\n DIS.close();\n s.close();\n\n }\n } catch (IOException | SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }).start();\n\n\n }", "public static void main(String[] args) throws Exception {\n\t\tString crawlStorageFolder = \"/data/crawl\";\r\n\t\tint numberOfCrawlers = 1;\r\n\t\t\r\n\t\tCrawlConfig config = new CrawlConfig();\r\n\t\tconfig.setCrawlStorageFolder(crawlStorageFolder);\r\n\t\tconfig.setMaxPagesToFetch(5000);\r\n\t\tconfig.setMaxDepthOfCrawling(5);\r\n\t\tconfig.setPolitenessDelay(500);\r\n\t\t\r\n\t\tconfig.setIncludeBinaryContentInCrawling(true);\r\n\t\t//config.setUserAgentString(userAgentString);\r\n\t\t\r\n\t\tPageFetcher pageFetcher = new PageFetcher(config);\r\n\t\tRobotstxtConfig robotstxtConfig = new RobotstxtConfig();\r\n\t\tRobotstxtServer robotstxtServer = new RobotstxtServer(robotstxtConfig,pageFetcher );\r\n\t\tCrawlController controller = new CrawlController(config,pageFetcher,robotstxtServer);\r\n\t\t\r\n\t\tcontroller.addSeed(\"http://www.marshall.usc.edu/\");\r\n\t\tcontroller.start(MyCrawler.class, numberOfCrawlers);\r\n\t\tSystem.out.println(\"All urls processed:\"+MyCrawler.URL_Count);\r\n\t\tSystem.out.println(\"All unique urls processed:\"+MyCrawler.hs.size());\r\n\t\tSystem.out.println(\"unique School urls processed:\"+MyCrawler.hs_uniqueSchool.size());\r\n\t\tSystem.out.println(\"unique USC urls processed:\"+MyCrawler.hs_uniqueUSC.size());\r\n\t\tSystem.out.println(\"other unique urls processed:\"+MyCrawler.hs_unique.size());\r\n\t\tSet set = MyCrawler.HM_Status.entrySet();\r\n\t Iterator i = set.iterator();\r\n\t while(i.hasNext()) {\r\n\t Map.Entry me = (Map.Entry)i.next();\r\n\t System.out.print(me.getKey() + \": \");\r\n\t System.out.println(me.getValue());\r\n\t }\r\n\t set=MyCrawler.HM_CT.entrySet();\r\n\t i = set.iterator();\r\n\t while(i.hasNext()) {\r\n\t Map.Entry me = (Map.Entry)i.next();\r\n\t System.out.print(me.getKey() + \": \");\r\n\t System.out.println(me.getValue());\r\n\t }\r\n\t System.out.println(\"F1:\"+MyCrawler.F1);\r\n\t System.out.println(\"F2:\"+MyCrawler.F2);\r\n\t System.out.println(\"F3:\"+MyCrawler.F3);\r\n\t System.out.println(\"F4:\"+MyCrawler.F4);\r\n\t \r\n\t System.out.println(\"Size < 1kb:\"+MyCrawler.size1);\r\n\t System.out.println(\"Size 1kb~10kb:\"+MyCrawler.size2);\r\n\t System.out.println(\"Size 10kb~100kb:\"+MyCrawler.size3);\r\n\t System.out.println(\"Size 100kb~1mb:\"+MyCrawler.size4);\r\n\t System.out.println(\"Size > 1mb:\"+MyCrawler.size5);\r\n\t \r\n\t}", "public Indexer crawl() \n\t{\n\t\t// This redirection may effect performance, but its OK !!\n\t\tSystem.out.println(\"Crawling: \"+u.toString());\n\t\treturn crawl(crawlLimitDefault);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 661, 454);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"\\t\\t\\t\\t\\t\\t\\t\\t\\tWiki Crawler\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 17));\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblNewLabel.setBounds(93, 0, 424, 45);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(10, 76, 438, 45);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Search\\r\\n\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfinal String Url = textField.getText();\n\t\t\t\t//Url = textField.getText();\n\t\t\t\t//CrawlHyperlinks crawl = new CrawlHyperlinks();\n\t\t\t\t//WikiCrawlerUI crawl = new WikiCrawlerUI();\n\t\t\t\tt = new Thread(new Runnable(){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t//while(!t.interrupted())\n\t\t\t\t\t\tString countWord = textField_1.getText();\n\t\t\t\t\t\t\tDriverMain.mainThread(Url,countWord);\t\n\t\t\t\t\t\ttry {\n\t\t Thread.sleep(1000);\n\t\t } catch (InterruptedException e) {\n\t\t return;\n\t\t }\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tt.start();\n\t\t\t\t//crawlPage(Url);\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnNewButton.setBounds(478, 75, 108, 45);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t//scroll = new JScrollPane (textArea, \n\t\t\t//\t JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\t//scroll.setBounds(0, 334, 605, -334);\n\t\t//scroll = new JScrollPane(textArea);\n\t\t//scroll.setBounds(0, 4, 13, -4);\n\t\t//scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\t//frame.getContentPane().add(scroll);\n\t\t//frame.getContentPane().add(textArea);\n\t\ttextArea.setEditable(false);\n\t\ttextArea.setLineWrap(true);\n\t\tscrollPane = new JScrollPane(textArea);\n\t\tscrollPane.setBounds(10, 215, 412, 178);\n\t\tscrollPane.setVisible(true);\n\t\tframe.getContentPane().add(scrollPane);\n\t\t//textArea = new JTextArea();\n\t\t//frame.getContentPane().add(textArea);\n\t\t//textArea.setEditable(false);\n\t\t//textArea.setLineWrap(true);\n\t\t\n\t\tlblNewLabel_1 = new JLabel(\"Enter Word to Count\");\n\t\tlblNewLabel_1.setBounds(10, 146, 180, 32);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\ttextField_1.setBounds(287, 146, 161, 32);\n\t\tframe.getContentPane().add(textField_1);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Word Count\\r\\n\");\n\t\tlblNewLabel_2.setBounds(478, 226, 108, 32);\n\t\tframe.getContentPane().add(lblNewLabel_2);\n\t\t\n\t\ttextField_2 = new JTextField();\n\t\ttextField_2.setBounds(478, 280, 108, 32);\n\t\tframe.getContentPane().add(textField_2);\n\t\ttextField_2.setColumns(10);\n\t\t//frame.getContentPane().add(new JScrollPane(textArea));\n\t}", "Collection<PageLink> crawl(CrawlerArgs args);", "public ThreadedTreeNode createThreadedBinaryTree()\n\t{\n\t\tThreadedTreeNode head=new ThreadedTreeNode();\n\t\tThreadedTreeNode a=new ThreadedTreeNode(80);\n\t\tThreadedTreeNode b=new ThreadedTreeNode(70);\n\t\tThreadedTreeNode c=new ThreadedTreeNode(90);\n\t\tThreadedTreeNode d=new ThreadedTreeNode(65);\n\t\tThreadedTreeNode e=new ThreadedTreeNode(75);\n\t\tThreadedTreeNode f=new ThreadedTreeNode(95);\n\t\tThreadedTreeNode g=new ThreadedTreeNode(85);\n\t\thead.left=a;\n\t\thead.right=head;\n\t\t\n\t\ta.left=b;\n\t\ta.right=c;\n\t\tb.left=d;\n\t\tb.right=e;\n\t\tc.left=g;\n\t\tc.right=f;\n\t\t//use empty links as threads\n\t\td.right=b;\n\t\td.rthread=1;\n\t\te.right=a;\n\t\te.rthread=1;\n\t\tg.right=c;\n\t\tg.rthread=1;\n\t\t\t\t\n\t\treturn head;\n\t\t\n\t}", "private VirtualThread createThread(String threadName) {\n\t\tJavaObjectReference threadObj = new JavaObjectReference(new LazyClassfile(\"java/lang/Thread\"));\n\t\t\n\t\t// TODO: We should invoke constructors here...\n\t\tthreadObj.setValueOfField(\"priority\", new JavaInteger(1));\n\t\tthreadObj.setValueOfField(\"name\", JavaArray.str2char(vm,threadName));\n\t\tthreadObj.setValueOfField(\"group\", new JavaObjectReference(bcl.load(\"java/lang/ThreadGroup\")));\n\t\t\n\t\tmainThread = new VirtualThread(vm, rda, threadName, threadObj);\n\t\tthreadAreas.add(mainThread);\n\t\treturn mainThread;\n\t}", "public NewsFilter()\n {\n this.queue = new LinkedBlockingQueue<>();\n this.uiContents = new HashMap<>();\n this.retrieved = new HashMap<>();\n this.running = new LinkedList<>();\n this.cancelled = false;\n\n // Start the filter task\n filter = new Thread( ()-> filter() ); \n filter.start();\n theLogger.info(\"NewsFilter Constructed and filter started\");\n }", "NetThread(){}", "public ContentfulCrawler(ContentCrawlConfiguration configuration) {\n Preconditions.checkNotNull(configuration, \"Crawler configuration can't be null\");\n Preconditions.checkNotNull(configuration.getElasticSearch(), \"ElasticSearch configuration can't be null\");\n Preconditions.checkNotNull(configuration.getContentful(), \"Contentful configuration can't be null\");\n this.configuration = configuration.getContentful();\n cdaClient = buildCdaClient();\n cmaClient = buildCmaClient();\n esClient = buildEsClient(configuration.getElasticSearch());\n esConfiguration = configuration.getElasticSearch();\n }", "public ThreadPool()\r\n {\r\n // 20 seconds of inactivity and a worker gives up\r\n suicideTime = 20000;\r\n // half a second for the oldest job in the queue before\r\n // spawning a worker to handle it\r\n spawnTime = 500;\r\n jobs = null;\r\n activeThreads = 0;\r\n askedToStop = false;\r\n }", "public void crawl() {\n\t\tOOSpider.create(Site.me().setSleepTime(3000).setRetryTimes(3).setDomain(\"movie.douban.com\")//.setHttpProxy(httpProxy)\n .setUserAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36\"),\n filmInfoDaoPipeline, DoubanFilm.class)\n .addUrl(\"https://movie.douban.com/top250\")//entry url\n .thread(1)\n .run();\n }", "public static void main(String args[]) throws Exception {\n if (args.length < 1) {\n System.out.println(\"Usage: CrawlTool (-local | -ndfs <nameserver:port>) <root_url_file> [-dir d] [-threads n] [-depth i] [-showThreadID]\");\n return;\n }\n\n String fs = \"-local\";\n String nameserver = \"\";\n if (\"-ndfs\".equals(args[0])) {\n fs = \"-ndfs\";\n nameserver = args[1];\n }\n NutchFileSystem nfs = NutchFileSystem.parseArgs(args, 0);\n try {\n String rootUrlFile = null;\n String dir = new File(\"crawl-\" + getDate()).getCanonicalFile().getName();\n int threads = NutchConf.getInt(\"fetcher.threads.fetch\", 10);\n int depth = 5;\n boolean showThreadID = false;\n\n for (int i = 0; i < args.length; i++) {\n if (\"-dir\".equals(args[i])) {\n dir = args[i+1];\n i++;\n } else if (\"-threads\".equals(args[i])) {\n threads = Integer.parseInt(args[i+1]);\n i++;\n } else if (\"-depth\".equals(args[i])) {\n depth = Integer.parseInt(args[i+1]);\n i++;\n } else if (\"-showThreadID\".equals(args[i])) {\n showThreadID = true;\n } else if (args[i] != null) {\n rootUrlFile = args[i];\n }\n }\n\n if (nfs.exists(new File(dir))) {\n throw new RuntimeException(dir + \" already exists.\");\n }\n\n LOG.info(\"crawl started in: \" + dir);\n LOG.info(\"rootUrlFile = \" + rootUrlFile);\n LOG.info(\"threads = \" + threads);\n LOG.info(\"depth = \" + depth);\n\n String db = new File(dir + \"/db\").getCanonicalPath();\n String segments = new File(dir + \"/segments\").getCanonicalPath();\n\n // initialize the web database\n WebDBAdminTool.main(prependFileSystem(fs, nameserver, new String[] { db, \"-create\"}));\n WebDBInjector.main(prependFileSystem(fs, nameserver, new String[] { db, \"-urlfile\", rootUrlFile }));\n\n for (int i = 0; i < depth; i++) {\n // generate a new segment\n FetchListTool.main(prependFileSystem(fs, nameserver, new String[] { db, segments } ));\n String segment = getLatestSegment(nfs, segments);\n Fetcher.main(prependFileSystem(fs, nameserver, new String[] { \"-threads\", \"\"+threads, segment } ));\n UpdateDatabaseTool.main(prependFileSystem(fs, nameserver, new String[] { db, segment } ));\n }\n\n // Re-fetch everything to get the complete set of incoming anchor texts\n // associated with each page. We should fix this, so that we can update\n // the previously fetched segments with the anchors that are now in the\n // database, but until that algorithm is written, we re-fetch.\n \n // delete all the old segment data\n FileUtil.fullyDelete(nfs, new File(segments));\n\n // generate a single segment containing all pages in the db\n FetchListTool.main(prependFileSystem(fs, nameserver, new String[] { db, segments, \"-adddays\", \"\" + Integer.MAX_VALUE } ));\n\n String segment = getLatestSegment(nfs, segments);\n\n // re-fetch everything\n Fetcher.main(prependFileSystem(fs, nameserver, new String[] { \"-threads\", \"\"+threads, segment } ));\n\n // index, dedup & merge\n File workDir = new File(dir, \"workdir\");\n IndexSegment.main(prependFileSystem(fs, nameserver, new String[] { segment, \"-dir\", workDir.getPath() } ));\n DeleteDuplicates.main(prependFileSystem(fs, nameserver, new String[] { segments }));\n IndexMerger.main(prependFileSystem(fs, nameserver, new String[] { new File(dir + \"/index\").getCanonicalPath(), segment } ));\n\n LOG.info(\"crawl finished: \" + dir);\n } finally {\n nfs.close();\n }\n }", "BackgroundWorker (String page, int id, Context context) {this.page=page; this.id=id; this.context=context; flag=3;}", "private Thread createThread() {\n return new Thread(this::_loadCatalog, \"CDS Hooks Catalog Retrieval\"\n );\n }", "public ThreadVerifMaj(String URL, JProgressBar progress,\r\n\t\t\tJLabel TailleTotale, JLabel Vitesse, JLabel FichierEnCOurs)\r\n\r\n\t{\r\n\t\tadresse = URL;\r\n\t\tBarreprogression = progress;\r\n\t\tTexteTailleTotale = TailleTotale;\r\n\t\tTexteVitesse = Vitesse;\r\n\t\tFichierActuel = FichierEnCOurs;\r\n\t}", "BackgroundWorker (String page, String name, String type, Context context) {this.page=page; this.name=name; this.type=type; this.context=context; flag=2;}", "@Override\r\n\tpublic void run()\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\t//System.out.println(\"beginning of Parser code\");\r\n\t\t\t\r\n\t\t\t//pull a page from the page que\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tpageText = SharedPage.getNextPage();\r\n\t\t\t\t//System.out.println(\"Parser Page Pulled\");\r\n\t\t\t} \r\n\t\t\tcatch (InterruptedException e) \r\n\t\t\t{\r\n\t\t\t\t//do nothing\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//search the page for all links in anchor (<a href=\"\") elements\r\n\t\t\t\r\n\t\t\t//Regex\r\n\t\t\t//loop will execute for each link found\r\n\t\t\tPattern pattern = Pattern.compile(\"href=\\\"(http:.*?)\\\"\");\r\n\t\t\tMatcher matcher = null;\r\n\t\t\t\r\n\t\t\t//Some pages are returning null values\r\n\t\t\tif(pageText != null)\r\n\t\t\t{\r\n\t\t\t\tmatcher = pattern.matcher(pageText);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//add each link found to the link queue\r\n\t\t\t\r\n\t\t\t//sometimes matcher is returning null values\r\n\t\t\twhile(matcher != null && matcher.find())\r\n\t\t\t{\r\n\t\t\t\tString link = matcher.group(1);\r\n\t\t\t\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tSharedLink.addLink(link);\r\n\t\t\t\t} \r\n\t\t\t\tcatch (InterruptedException e) \r\n\t\t\t\t{\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//search the page for keywords specified by the user of the webcrawler\r\n\t\t\tArrayList<String> keywords = WebCrawlerConsole.getKeywords();\r\n\t\t\t\r\n\t\t\t\tfor(String word : keywords)\r\n\t\t\t\t{\r\n\t\t\t\t\t//cannot split pageText if it is null\r\n\t\t\t\t\tif(pageText != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString[] keywordSearch = pageText.split(word);\r\n\t\t\t\t\t\tfor(int i=0; i < keywordSearch.length; i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tWebCrawlerConsole.keywordHit();\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//System.out.println(\"end of Parser code\");\r\n\t\t}\r\n\t}", "Object create(URL url) throws IOException, SAXException, ParserConfigurationException;", "CrawlController build(CrawlParameters parameters) throws Exception;", "public interface Crawler {\n int size();\n boolean visited(String link);\n void addNewLinkToSitemap(String link);\n void addToChildSitemap(String parent, String child);\n void addVisited(String s, Integer depth);\n void startCrawling(String requestid, String link, int maxDepth);\n ForkJoinPool getMainPool();\n Map<String, Collection<String>> getSiteMap();\n}", "public Crawler crawl() throws ParseException, IOException {\n\t\tlong start = System.currentTimeMillis();\n\n\t\tCrawler c = new Crawler(\"https://cs.purdue.edu\", 250);\n\t\tc.crawl();\n\n \tlong end = System.currentTimeMillis();\n \tSystem.out.println(\"Stats: \");\n \tSystem.out.println(\"Number of parsed pages: \" + c.getParsed().size());\n \tSystem.out.println(\"Number of words: \" + c.getWords().size());\n \t\n \tSystem.out.println(\"Total time: \" + (end - start) + \"ms.\");\n\n \treturn c;\n\t}", "public ImageManager(final Context context, final int cacheSize, \n final int threads ){\n\n // Instantiate the three queues. The task queue uses a custom comparator to \n // change the ordering from FIFO (using the internal comparator) to respect\n // request priorities. If two requests have equal priorities, they are \n // sorted according to creation date\n mTaskQueue = new PriorityBlockingQueue<Runnable>(QUEUE_SIZE, \n new ImageThreadComparator());\n mActiveTasks = new ConcurrentLinkedQueue<Runnable>();\n mBlockedTasks = new ConcurrentLinkedQueue<Runnable>();\n\n // The application context\n mContext = context;\n\n // Create a new threadpool using the taskQueue\n mThreadPool = new ThreadPoolExecutor(threads, threads, \n Long.MAX_VALUE, TimeUnit.SECONDS, mTaskQueue){\n\n\n @Override\n protected void beforeExecute(final Thread thread, final Runnable run) {\n // Before executing a request, place the request on the active queue\n // This prevents new duplicate requests being placed in the active queue\n mActiveTasks.add(run);\n super.beforeExecute(thread, run);\n }\n\n @Override\n protected void afterExecute(final Runnable r, final Throwable t) {\n // After a request has finished executing, remove the request from\n // the active queue, this allows new duplicate requests to be submitted\n mActiveTasks.remove(r);\n\n // Perform a quick check to see if there are any remaining requests in\n // the blocked queue. Peek the head and check for duplicates in the \n // active and task queues. If no duplicates exist, add the request to\n // the task queue. Repeat this until a duplicate is found\n synchronized (mBlockedTasks) {\n while(mBlockedTasks.peek()!=null && \n !mTaskQueue.contains(mBlockedTasks.peek()) && \n !mActiveTasks.contains(mBlockedTasks.peek())){\n Runnable runnable = mBlockedTasks.poll();\n if(runnable!=null){\n mThreadPool.execute(runnable);\n }\n }\n }\n super.afterExecute(r, t);\n }\n };\n\n // Calculate the cache size\n final int actualCacheSize = \n ((int) (Runtime.getRuntime().maxMemory() / 1024)) / cacheSize;\n\n // Create the LRU cache\n // http://developer.android.com/reference/android/util/LruCache.html\n\n // The items are no longer recycled as they leave the cache, turns out this wasn't the right\n // way to go about this and often resulted in recycled bitmaps being drawn\n // http://stackoverflow.com/questions/10743381/when-should-i-recycle-a-bitmap-using-lrucache\n mBitmapCache = new LruCache<String, Bitmap>(actualCacheSize){\n protected int sizeOf(final String key, final Bitmap value) {\n return value.getByteCount() / 1024;\n }\n };\n }", "public SearchQuery build() {\n this._Web_search.set_maxDepth(_maxDepth);\n this._Web_search.set_maxResults(_maxResults);\n this._Web_search.set_threshold(_threshold);\n this._Web_search.set_beamWidth(_beamWidth);\n if (heuristicSearchType == null) {\n this._Web_search.setHeuristicSearchType(Enums.HeuristicSearchType.BEST_FIRST);\n } else {\n this._Web_search.setHeuristicSearchType(heuristicSearchType);\n }\n\n return new SearchQuery(this._query, this._Web_search);\n }", "public Node(Status state, int x, int y){\n this.x=x;\n this.y=y;\n pathsToBaseStation = new LinkedList<>();\n this.neighbors=new LinkedList<>();\n this.liveNeighbors = new LinkedList<>();\n this.state = state;\n queue = new LinkedBlockingQueue<LinkedList<Object>>();\n Thread thread = new Thread(this);\n thread.start();\n }", "private void startCrawler()\n {\n String[] enteredKeywords = getKeywordsFromBar();\n \n if(spider.numSeeds() == 0)\n JOptionPane.showMessageDialog(null, \"Please add some seed URL's\");\n \n else if(spider.numWorkers() == 0)\n JOptionPane.showMessageDialog(null, \"Please add atleast one worker\");\n \n else if(enteredKeywords == null)\n JOptionPane.showMessageDialog(null, \"Please enter some keywords to search for\");\n \n else if(spider.getIndexer() == null)\n JOptionPane.showMessageDialog(null, \"No index found, please create or open one\");\n \n else\n {\n playButton.setEnabled(false);\n startCrawlerItem.setEnabled(false);\n stopButton.setEnabled(true);\n stopCrawlerItem.setEnabled(true);\n spider.initKeywords(enteredKeywords);\n \n if(!canResume) spider.crawl();\n else \n {\n spider.resumeCrawling();\n canResume = false;\n }\n }\n }", "@Override\n public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {\n Log.v(\"WVClient.onReceiveError\", \" receieved an error\" + error);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n onSendUpdate(\"WVClient has received an error!\");\n }\n });\n\n //do what would be done in processHTML but avoid anything to do with scraping, move onto next page\n crawlComplete = false;\n\n if (masterEmailSet.size() > 20){\n //if more than twenty emails have been discovered, the crawl is done\n crawlComplete = true;\n }\n\n if (masterEmailSet.size() > 0 && !searchTerm.equals(\"\")){\n //if at least one email with the search term has been found, crawl is done\n crawlComplete = true;\n }\n\n\n if (collectedLinks.iterator().hasNext() && !crawlComplete){\n //if there's another link and crawl isn't deemed complete, hit next URL\n browser.post(new Runnable() {\n @Override\n public void run() {\n Log.v(\"processHTML\", \" loading page on browser:\" + collectedLinks.iterator().next());\n visitedLinks.add(collectedLinks.iterator().next());\n browser.loadUrl(collectedLinks.iterator().next());\n }\n });\n }\n }", "public void run()\n\t\t{\n\t\t\tint num = 0;\n\t\t\ttry{\n\t\t\t\tlog.debug(\"Dealing with: \" + url.toString() + \" From : \" + urlp);\n\t\t\t\t\n\t\t\t\tSocket socket = new Socket(url.getHost(), PORT);\n\t\t\t\tPrintWriter writer = new PrintWriter(socket.getOutputStream());\n\t\t\t\tBufferedReader reader = \n\t\t\t\t\tnew BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\t\tString request = \"GET \" + url.getPath() + \" HTTP/1.1\\n\" +\n\t\t\t\t\t\t\t\t\"Host: \" + url.getHost() + \"\\n\" +\n\t\t\t\t\t\t\t\t\"Connection: close\\n\" + \n\t\t\t\t\t\t\t\t\"\\r\\n\";\n\t\t\t\twriter.println(request);\n\t\t\t\twriter.flush();\n\t\t\n\t\t\t\tString line = reader.readLine();\n\t\t\t\t// filter the head message of the response\n\t\t\t\twhile(line != null && line.length() != 0)\n\t\t\t\t{\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\t// keep the html context\n\t\t\t\twhile (line != null) \n\t\t\t\t{\n\t\t\t\t\tcontext += line + \"\\n\";\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t\twriter.close();\n\t\t\t\tsocket.close();\n\t\t\t\t//log.debug(context);\n\t\t\t\tstripper = new TagStripper(context);\n\t\t\t\tlog.debug(\"Removing script and style from: \" + url.toString());\n\t\t\t\tstripper.removeComments();\n\t\t\t\tstripper.removeScript();\n\t\t\t\tstripper.removeStyle();\n\t\t\t\tlog.debug(\"Getting links from: \" + url.toString());\n\t\t\t\tArrayList<String> link = new ArrayList<String>();\n\t\t\t\tstripper.buildLinks(url.toString());\n\t\t\t\t\n\t\t\t\tlink = stripper.getLinks();\n\t\t\t\tfor(String tmp : link) {\n\t\t\t\t\tif(getCount() < pageNum ) {\n\t\t\t\t\t\t// find if the link has been already visited\n\t\t\t\t\t\tif(!urlList.contains(tmp)) {\n\t\t\t\t\t\t\tworkers.execute(new SingleHTMLFetcher(new URL(tmp), this.url.toString()));\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\tString title = stripper.getTitle();\n\t\t\t\tif(title == null)\n\t\t\t\t\ttitle = \"NO title\";\n\t\t\t\ttitle = title.replaceAll(\"&[^;]*;\", \"\");\n\t\t\t\tlog.debug(\"Removing tags from: \" + url.toString());\n\t\t\t\tstripper.removeTags();\n\t\t\t\tstripper.removeSymbol();\n\t\t\t\tString snippet = stripper.getSnippet(title);\n\t\t\t\tdb.savePageInfo(connection, title, snippet, url.toString());\n\t\t\t\tcontext = stripper.getContext();\n\t\t\t\tString[] words = context.toLowerCase().split(\"\\\\s\");\n\t\t\t\tArrayList<String> wordsList = new ArrayList<String>();\n\t\t\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\t\t\t// delete non-word character\n\t\t\t\t\twords[i] = words[i].replaceAll(\"\\\\W\", \"\").replace(\"_\",\n\t\t\t\t\t\t\t\"\");\n\t\t\t\t\tif(words[i].length() != 0)\n\t\t\t\t\t\twordsList.add(words[i]);\n\t\t\t\t}\n\t\t\t\tfor (String w : wordsList) {\n\t\t\t\t\tif (w.length() != 0) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tindex.addNum(w, url.toString(), num);\n\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\tnum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlog.debug(\"URL: \" + url.toString() + \" is finished!\");\n\t\t\t\tdecrementPending();\n\t\t\t}catch(Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}", "private Thread createThreadFor(Agent ag) {\n ProcessData data = getDataFor(ag);\n\n data.thread = new Thread(threadGroup, ag);\n data.thread.setPriority(THREAD_PRIORITY);\n\n return data.thread;\n }", "NewThread (String threadname) {\r\n name = threadname;\r\n t = new Thread(this, name); // Constructor de un nuevo thread\r\n System.out.println(\"Nuevo hilo: \" +t);\r\n t.start(); // Aquí comienza el hilo\r\n }", "WebCrawlerData retrieve(String url);", "public Task(String url) {\n this.url = url;\n logger.debug(\"Created task for \" + url);\n }", "@Override\n public void run() {\n numStarted ++;\n\n while (true) {\n try {\n // pull a link from the link queue\n URL url = new URL(SharedLinkQueue.getNextLink());\n\n // download the HTML page text at the given URL\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n BufferedReader download = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\n // store the HTML page text on the page queue as a string\n String pageText = \"\";\n String inputLine;\n while ((inputLine = download.readLine()) != null) {\n pageText += inputLine;\n }\n SharedPageQueue.addPage(pageText);\n\n download.close();\n } catch (MalformedURLException e) {\n errorCount ++;\n System.out.println(\"MalformedURLException: \" + e.getMessage());\n } catch (IOException e) {\n errorCount ++;\n System.out.println(\"IOException: \" + e.getMessage());\n } catch (InterruptedException e) {\n errorCount ++;\n System.out.println(\"InterruptedException: \" + e.getMessage());\n }\n }\n }", "public String crawl() throws IOException {\n // FILL THIS IN!\n if(queue.isEmpty()){\n \treturn null;\n }\n String url = queue.remove();\n \tSystem.out.println(\"crawling \"+url);\n Elements paragraphs;\n \tif(index.isIndexed(url))\n \t{\n \t\tSystem.out.println(url+\" is already indexed\");\n \t\treturn null;\n \t}\n \tparagraphs = wf.fetchWikipedia(url);\n index.indexPage(url,paragraphs);\n queueInternalLinks(paragraphs);\t \n\t\treturn url;\n\t}", "void startCrawler() throws ParserConfigurationException, SAXException, IOException;", "public VertexServer(Properties props) {\n\n\t\tthis.jobServerAddr = props.getProperty(\"jobserver.address\");\n\t\tthis.jobServerPort = Integer.parseInt(props.getProperty(\"jobserver.port\"));\n\t\tthis.numThreads = Integer.parseInt(props.getProperty(\"threads\"));\n\t\tthis.execSrv = Executors.newFixedThreadPool(numThreads);\n\t\t\n\t\ttry{\n\t\t\thdfs = new HdfsUtils(props.getProperty(\"namenode.address\"), \n\t\t\t\tInteger.parseInt(props.getProperty(\"namenode.port\")));\n\t\t}catch(IOException e){\n\t\t\tlogger.log(Level.SEVERE, \"Failed connecting to HDFS\", e);\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t vManager = new VertexManager(numThreads);\n\t}", "@Override\n\t\t\tpublic Thread newThread(final Runnable r) {\n\t\t\t\tint id = threadNumber.getAndIncrement();\n\t\t\t\tString threadName = leftPad(String.valueOf(id), 2, \"0\");\n\t\t\t\tThread th = new Thread(r);\n\t\t\t\tth.setName(threadName);\n\t\t\t\tth.setDaemon(false);\n\t\t\t\treturn th;\n\t\t\t}", "public PoolDownloader(int howManyThreads, DefaultTableModel tableModel, String folderPath)\n\t{\n\t\tthis.threadPool = Executors.newFixedThreadPool(howManyThreads);\n\t\tthis.tableModel = tableModel;\n\t\tthis.folderPath = folderPath;\n\t}", "public static void main(String args[]) {\n if (args.length < 3 || args.length > 5) {\n System.out.println(\"Usage: Crawler {start URL} {database environment path} {max doc size in MB} {number of files to index}\");\n System.exit(1);\n }\n\n System.out.println(\"Crawler starting\");\n String startUrl = args[0];\n String envPath = args[1];\n Integer size = Integer.valueOf(args[2]);\n Integer count = args.length == 4 ? Integer.valueOf(args[3]) : 100;\n\n StorageInterface db = StorageFactory.getDatabaseInstance(envPath);\n\n Crawler crawler = new Crawler(startUrl, db, size, count);\n\n System.out.println(\"Starting crawl of \" + count + \" documents, starting at \" + startUrl);\n crawler.start();\n\n while (!crawler.isDone())\n try {\n Thread.sleep(10);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // TODO: final shutdown\n\n System.out.println(\"Done crawling!\");\n }", "public SfdcCrawler(SfdcCrawlState state) {\r\n this.state = state;\r\n\r\n \r\n this.ds = (CrawlDataSource)state.getDataSource();\r\n \r\n LOG.info(\"salesforce collection=\"+this.ds.getCollection()+ \" ds id=\"+this.ds.getId());\r\n // fetch last_crawl from solr API\r\n LAST_CRAWL = UtilityLib.getLastCrawl( this.ds.getCollection(), this.ds.getId());\r\n \r\n maxSize = ds.getLong(DataSource.MAX_BYTES,\r\n DataSource.defaults.getInt(Group.datasource, DataSource.MAX_BYTES));\r\n depth = ds.getInt(DataSource.CRAWL_DEPTH,\r\n DataSource.defaults.getInt(Group.datasource, DataSource.CRAWL_DEPTH));\r\n if (depth < 1) {\r\n depth = Integer.MAX_VALUE;\r\n }\r\n // initialize PQE\r\n partnerQueryEngine = new PartnerQueryEngine();\r\n\t\r\n }", "public DescriptionMovieThread(Context context, String link) //constructor\r\n {\r\n this.context = context;\r\n this.link = link;\r\n handler = new Handler();\r\n }", "private void searchNext(CrawlingSession executor, Link link) {\n HTMLLinkExtractor htmlLinkExtractor = HTMLLinkExtractor.getInstance();\n// htmlLinkExtractor.setWorking(link);\n \n Source source = CrawlingSources.getInstance().getSource(link.getSourceFullName());\n if(source == null) return;\n \n SessionStore store = SessionStores.getStore(source.getCodeName());\n if(store == null) return;\n\n List<Link> collection = htmlLinkExtractor.getLinks(link, /*link.getSource(),*/ pagePaths);\n// List<Link> collection = htmlLinkExtractor.getLinks(srResource);\n List<Link> nextLinks = createNextLink(link, collection);\n if(nextLinks.size() < 1) return;\n if(userPaths == null && contentPaths == null) {\n executor.addElement(nextLinks, link.getSourceFullName());\n return;\n }\n \n \n if(nextLinks.size() < 2) {\n executor.addElement(nextLinks, link.getSourceFullName());\n }\n \n// long start = System.currentTimeMillis();\n \n int [] posts = new int[nextLinks.size()];\n for(int i = 0; i < nextLinks.size(); i++) {\n try {\n posts[i] = PageDownloadedTracker.searchCode(nextLinks.get(i), true);\n } catch (Throwable e) {\n posts[i] = -1;\n LogService.getInstance().setThrowable(link.getSourceFullName(), e);\n// executor.abortSession();\n// return;\n }\n }\n \n int max = 1;\n for(int i = 0; i < posts.length; i++) {\n if(posts[i] > max) max = posts[i];\n }\n \n// System.out.println(\" thay max post la \"+ max);\n \n List<Link> updateLinks = new ArrayList<Link>();\n for(int i = 0; i < posts.length; i++) {\n if(posts[i] >= max) continue;\n updateLinks.add(nextLinks.get(i));\n }\n \n// long end = System.currentTimeMillis();\n// System.out.println(\"step. 4 \"+ link.getUrl()+ \" xu ly cai ni mat \" + (end - start));\n \n executor.addElement(updateLinks, link.getSourceFullName());\n \n /*int minPost = -1;\n Link minLink = null;\n List<Link> updateLinks = new ArrayList<Link>();\n for(int i = 0; i < nextLinks.size(); i++) {\n Link ele = nextLinks.get(i);\n int post = 0;\n try {\n post = PostForumTrackerService2.getInstance().read(ele.getAddressCode());\n } catch (Exception e) {\n LogService.getInstance().setThrowable(link.getSource(), e);\n }\n if(post < 1) {\n updateLinks.add(ele);\n continue;\n } \n\n if(minPost < 0 || post < minPost){\n minLink = ele;\n minPost = post; \n } \n }\n\n if(minLink != null) updateLinks.add(minLink);\n executor.addElement(updateLinks, link.getSource());*/\n }", "@Override\n\tpublic Thread newThread(Runnable r) {\n\t\t\n\t\tThread th = new Thread(r,\" custum Thread\");\n\t\treturn th;\n\t}", "DownloadThread(BlockingQueue<DownloadRequest> queue,\n DownloadRequestQueue.CallBackDelivery delivery) {\n mQueue = queue;\n mDelivery = delivery;\n\n }", "protected URLConnection createConnection(URL url) throws IOException\n {\n URLConnection con = url.openConnection();\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n return con;\n }", "public static void main(String[] args) {\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\tMyAbstractWebSpider mywebspider1=new MyConcreteWebSpider();\n\t\t//\n\t\t//\n\t\t//\n\t\tRunnable runnableProcessSpider=new ProcessSpider(mywebspider1);\n\t\tnew Thread(runnableProcessSpider).start();\n\t\t//\n\t\t//\n\t\tRunnable runnableDownLoadPicFactory=new DownLoadPicFactory(mywebspider1);\n\t\tnew Thread(runnableDownLoadPicFactory).start();\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\tMyThreadSleep.sleep10s();\n\t\tMyThreadSleep.sleep10s();\n\t\tProcessSpider runnableProcessSpiderToCatchAnswer1=new ProcessSpider(mywebspider1){\n\t\t\t@Override\n\t\t\tpublic void myprocess()\n\t\t\t{\n\t\t\t\t//存在有可能跟其他线程先后进入了同个收藏夹一起进行遍历,此时该收藏夹的搜索就由多个线程一起爬,但是已收入的答案就不会收入url队列里了\n\t\t\t\tfor(;this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueCollectionUrlToRequest1()>=0;)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"getStrqueueImgUrlToRequest1 size!!!!!!!!!!!!!!!!:\"+this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueImgUrlToRequest1() );\n\t\t\t\t\tif(this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueCollectionUrlToRequest1()<=0)\n\t\t\t\t\t{\n\t\t\t\t\t\tMyThreadSleep.sleep5s();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tMyThreadSleep.sleep2s();\n\t\t\t\t\tfor(int overI=0;overI<=this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueCollectionUrlToRequest1()-1;overI++)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.getWebDriver1().navigate().to(this.getMyWebSpider1().getUrlWarehouse1().pollStrqueueCollectionUrlToRequest1());\n\t\t\t\t\t\tMyThreadSleep.sleep2s();\n\t\t\t\t\t\t//搜寻每个收藏夹的答案(路径包括问题)\n\t\t\t\t\t\t//mywebspider1.getQuesionUrlWithoutAnswerUrlInSpecifiedPage(driver1);\n\t\t\t\t\t\tthis.getMyWebSpider1().getQuesionUrlWithAnswerUrlInSpecifiedPage(this.getWebDriver1());\n\t\t\t\t\t\tthis.getMyWebSpider1().getUrlToTurnToNextPageInInSpecifiedPage(this.getWebDriver1());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t};\n\t\tnew Thread((Runnable)runnableProcessSpiderToCatchAnswer1).start();\n\t\t//\n\t\t//\n/*\t\tMyThreadSleep.sleep10s();\n\t\tMyThreadSleep.sleep10s();\n\t\tProcessSpider runnableProcessSpiderToCatchAnswer2=new ProcessSpider(mywebspider1){\n\t\t\t@Override\n\t\t\tpublic void myprocess()\n\t\t\t{\n\t\t\t\t//存在有可能跟其他线程先后进入了同个收藏夹一起进行遍历,此时该收藏夹的搜索就由多个线程一起爬,但是已收入的答案就不会收入url队列里了\n\t\t\t\tfor(;this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueCollectionUrlToRequest1()>=0;)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"getStrqueueImgUrlToRequest1 size!!!!!!!!!!!!!!!!:\"+this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueImgUrlToRequest1() );\n\t\t\t\t\tif(this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueCollectionUrlToRequest1()<=0)\n\t\t\t\t\t{\n\t\t\t\t\t\tMyThreadSleep.sleep5s();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tMyThreadSleep.sleep2s();\n\t\t\t\t\tfor(int overI=0;overI<=this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueCollectionUrlToRequest1()-1;overI++)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.getWebDriver1().navigate().to(this.getMyWebSpider1().getUrlWarehouse1().pollStrqueueCollectionUrlToRequest1());\n\t\t\t\t\t\tMyThreadSleep.sleep2s();\n\t\t\t\t\t\t//搜寻每个收藏夹的答案(路径包括问题)\n\t\t\t\t\t\t//mywebspider1.getQuesionUrlWithoutAnswerUrlInSpecifiedPage(driver1);\n\t\t\t\t\t\tthis.getMyWebSpider1().getQuesionUrlWithAnswerUrlInSpecifiedPage(this.getWebDriver1());\n\t\t\t\t\t\tthis.getMyWebSpider1().getUrlToTurnToNextPageInInSpecifiedPage(this.getWebDriver1());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t};\n\t\tnew Thread((Runnable)runnableProcessSpiderToCatchAnswer2).start();*/\n\t\t//\n\t\t//\n\t\t//\n\t\t//\n\t\tMyThreadSleep.sleep10s();\n\t\tMyThreadSleep.sleep10s();\n\t\tProcessSpider runnableProcessSpiderToCatchContent=new ProcessSpider(mywebspider1){\n\t\t\t@Override\n\t\t\tpublic void myprocess()\n\t\t\t{\n\t\t\t\tfor(;this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueAnswerUrlToRequest1()>=0;)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"sizeStrqueueAnswerUrlToRequest1 size!!!!!!!!!!!!!!!!:\"+this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueAnswerUrlToRequest1() );\n\t\t\t\t\tif(this.getMyWebSpider1().getUrlWarehouse1().sizeStrqueueAnswerUrlToRequest1()<=0)\n\t\t\t\t\t{\n\t\t\t\t\t\tMyThreadSleep.sleep5s();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tthis.getWebDriver1().navigate().to(this.getMyWebSpider1().getUrlWarehouse1().pollStrqueueAnswerUrlToRequest1());\n\t\t\t\t\t//\n\t\t\t\t\tMyThreadSleep.sleep1s();\n\t\t\t\t\t//\n\t\t\t\t\tint scrollLength=0;\n\t\t\t\t\t//\n\t\t\t\t\tfor(int overI=0;overI<=100-1;overI++)\n\t\t\t\t\t{\n\t\t\t\t\t\tJavascriptExecutor jsDriverTemp = (JavascriptExecutor)this.getWebDriver1();\n\t\t\t\t\t\tscrollLength=scrollLength+200;\n\t\t\t\t\t\tString js=\"document.body.scrollTop =\"+scrollLength;\n\t\t\t\t\t\tjsDriverTemp.executeScript(js);\n\t\t\t\t\t\t//\n\t\t\t\t\t\tMyThreadSleep.sleep100ms();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t//get pic url in specified page\n\t\t\t\t\tthis.getMyWebSpider1().getSpecifiedAnswerContent2(this.getWebDriver1());\n\t\t\t\t\t//\n\t\t\t\t\t//\n\n\t\t\t\t\t//\n\t\t\t\t\t//\n\t\t\t\t}\n\n\t\t\t}\n\t\t};\n\t\tnew Thread((Runnable)runnableProcessSpiderToCatchContent).start();\n\t}", "public ThreadQueue newThreadQueue(boolean transferPriority) \n\t{\n\t\treturn new PriorityQueue(transferPriority);\n\t}", "public TraversalThread(LinkedList<Graph<NodeData,EdgeData>.Edge> path){\r\n this.path = path;\r\n }", "@Async\n\tpublic void start() {\n\t\tUrl url = null;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\turl = urlRepository.findFirstByDateScannedOrderByIdAsc(null);\n\t\t\t\tif (url == null) {\n\t\t\t\t\twhile (url == null) {\n\t\t\t\t\t\turl = WebSiteLoader.getRandomUrl();\n\n\t\t\t\t\t\tif (urlExists(url)) {\n\t\t\t\t\t\t\turl = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\turl = urlRepository.saveAndFlush(url);\n\t\t\t\t}\n\t\t\t\tlog.info(\"Crawling URL : \" + url);\n\n\t\t\t\tWebPage webPage = WebSiteLoader.readPage(url);\n\t\t\t\tif (webPage != null) {\n\t\t\t\t\tReport report = textAnalyzer.analyze(webPage.getText());\n\t\t\t\t\t\n\t\t\t\t\tfor(SentenceReport sentenceReport : report.getSentenceReports()){\n\t\t\t\t\t\tSentence sentence = sentenceReport.getSentence();\n\t\t\t\t\t\tsentence = sentenceRepository.saveAndFlush(sentence);\n\t\t\t\t\t\tsentenceReport.setSentence(sentence);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(Occurrence occurrence : sentenceReport.getOccurences()){\n\t\t\t\t\t\t\toccurrence = occurrenceRepository.saveAndFlush(occurrence);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSentenceOccurrence so = new SentenceOccurrence();\n\t\t\t\t\t\t\tSentenceOccurrenceId soId = new SentenceOccurrenceId();\n\t\t\t\t\t\t\tso.setSentenceOccurrenceId(soId);\n\t\t\t\t\t\t\tsoId.setOccurenceId(occurrence.getId());\n\t\t\t\t\t\t\tsoId.setSentenceId(sentence.getId());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsentenceOccurrenceRepository.saveAndFlush(so);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\taddUrls(webPage.getUrls());\n\t\t\t\t}\n\n\t\t\t\tlog.info(\"Done crawling URL : \" + url);\n\t\t\t} catch (PageNotInRightLanguageException ex) {\n\t\t\t\tlog.info(\"Page not in the right language : \" + ex.getText());\n\t\t\t} catch (Exception ex) {\n\t\t\t\tlog.error(\"Error while crawling : \" + url, ex);\n\t\t\t}\n\t\t\t\n\t\t\turl.setDateScanned(new Date());\n\t\t\turlRepository.saveAndFlush(url);\n\t\t\t\n\t\t\tif(stop){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<String> webCrawling(){\n\t\t\tfor(i=780100; i<790000; i++){\r\n\t\t\t\ttry{\r\n\t\t\t\tdoc = insertPage(i);\r\n\t\t\t\t//Thread.sleep(1000);\r\n\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tif(doc != null){\r\n\t\t\t\t\tElement ele = doc.select(\"div.more_comment a\").first();\r\n\t\t\t\t\t//System.out.println(ele.attr(\"href\"));\r\n\t\t\t\t\tcommentCrawling(ele.attr(\"href\"));//��۸�� ���� ��ũ\r\n\t\t\t\t\tcommentCrawlingList(commentURList);\r\n\t\t\t\t\tcommentURList = new ArrayList<String>();//��ũ ����� �ߺ��ǰ� ���̴� �� �����ϱ� ���� �ʱ�ȭ �۾�\r\n\t\t\t\t\tSystem.out.println(i+\"��° ������\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn replyComment;\r\n\t\t//return urlList.get(0);\r\n\t}", "public WebCrawler() {\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setSize(FRAME_SIZE_WIDTH, FRAME_SIZE_HEIGHT);\n setTitle(\"Simple Window\");\n\n\n JLabel l_URL = new JLabel();\n l_URL.setBounds(PADDING_LEFT,\n PADDING_TOP,\n LABEL_WIDTH, SINGLE_LINE_ELEMENT_HEIGHT);\n l_URL.setText(\"URL:\");\n\n JTextField tf_URL = new JTextField();\n tf_URL.setBounds(TF_PADDING, PADDING_TOP, TF_WIDTH, SINGLE_LINE_ELEMENT_HEIGHT);\n tf_URL.setName(\"UrlTextField\");\n\n\n JLabel l_tittle = new JLabel();\n l_tittle.setBounds(PADDING_LEFT,\n PADDING_TOP,\n LABEL_WIDTH, SINGLE_LINE_ELEMENT_HEIGHT);\n l_tittle.setText(\"URL:\");\n\n\n JLabel l_tittleContent = new JLabel();\n l_tittleContent.setBounds(PADDING_LEFT,\n PADDING_TOP * 2 + SINGLE_LINE_ELEMENT_HEIGHT,\n FRAME_SIZE_WIDTH - PADDING_LEFT * 3 - LABEL_WIDTH,\n SINGLE_LINE_ELEMENT_HEIGHT);\n l_tittleContent.setName(\"TitleLabel\");\n\n\n Object[] columnsHeader = new String[]{\"URL\", \"Title\"};\n\n\n final AtomicReference<DefaultTableModel> tModel = new AtomicReference<>(new DefaultTableModel(new Object[][]{}, columnsHeader));\n\n final JTable table = new JTable(tModel.get());\n table.setName(\"TitlesTable\");\n table.setEnabled(false);\n\n JScrollPane scrollPane = new JScrollPane(table);\n scrollPane.setBounds(PADDING_LEFT,\n PADDING_TOP * 3 + SINGLE_LINE_ELEMENT_HEIGHT * 2,\n SCROLL_PANE_WIDTH,\n SCROLL_PANE_HEIGHT);\n scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\n\n //table[0].setFillsViewportHeight(true);\n\n\n JButton b_download = new JButton(\"Parse\");\n b_download.setBounds(BUTTON_PADDING,\n PADDING_TOP,\n BUTTON_WIDTH,\n SINGLE_LINE_ELEMENT_HEIGHT);\n b_download.setName(\"RunButton\");\n\n\n b_download.addActionListener(actionEvent -> {\n final String url = tf_URL.getText();\n CrawlerConnectionHelper connectionHelper = new CrawlerConnectionHelper(url);\n //final String siteText = connectionHelper.getHTMLCode();\n final String title = connectionHelper.getTitle();\n if (title != null) {\n l_tittleContent.setText(title);\n }\n\n Object[][] crawlResults = connectionHelper.getURLsAndTitles();\n while (tModel.get().getRowCount() > 0) {\n tModel.get().removeRow(0);\n }\n\n for (Object[] crawlResult : crawlResults) {\n tModel.get().addRow(crawlResult);\n }\n\n SwingUtilities.updateComponentTreeUI(WebCrawler.this);\n System.out.println(\"processing finished\");\n });\n\n\n JLabel l_export = new JLabel();\n l_export.setBounds(PADDING_LEFT,\n PADDING_TOP*4 + SINGLE_LINE_ELEMENT_HEIGHT*2 + SCROLL_PANE_HEIGHT,\n LABEL_WIDTH,\n SINGLE_LINE_ELEMENT_HEIGHT);\n l_export.setText(\"Export:\");\n\n JTextField tf_fileName = new JTextField();\n tf_fileName.setBounds(TF_PADDING,\n PADDING_TOP*4 + SINGLE_LINE_ELEMENT_HEIGHT*2 + SCROLL_PANE_HEIGHT,\n TF_WIDTH,\n SINGLE_LINE_ELEMENT_HEIGHT);\n tf_fileName.setName(\"ExportUrlTextField\");\n\n JButton b_saveData = new JButton(\"Save\");\n b_saveData.setBounds(BUTTON_PADDING,\n PADDING_TOP*4 + SINGLE_LINE_ELEMENT_HEIGHT*2 + SCROLL_PANE_HEIGHT,\n BUTTON_WIDTH,\n SINGLE_LINE_ELEMENT_HEIGHT);\n b_saveData.setName(\"ExportButton\");\n b_saveData.addActionListener(actionEvent -> {\n DataSaverToFile dstf = new DataSaverToFile(tf_fileName.getText(), tModel.get().getDataVector());\n dstf.save();\n });\n\n add(l_URL);\n add(tf_URL);\n add(l_tittle);\n add(l_tittleContent);\n add(b_download);\n add(scrollPane);\n\n add(l_export);\n add(tf_fileName);\n add(b_saveData);\n\n\n setLayout(null);\n setVisible(true);\n }", "public Crawler(Config conf) {\n \t\tthis.conf = conf;\n \t}", "public RequestHandler(ThreadPoolExecutor taskExecutor) {\n super();\n this.taskExecutor = taskExecutor;\n }", "@Override\n public void nextTuple() {\n \tint fileCount = XPathCrawler.getInstance().getFileCount().get();\n \tif(XPathCrawler.getInstance().getFrontier().isEmpty()) { //refill from disk\n \t\tURLSpout.activeThreads.getAndIncrement();\n \t\t//System.out.println(\"refill time\");\n \t\tString url;\n\t\t\ttry {\n\t\t\t\twhile(!reader.ready()) {\n\t\t\t\t\t//System.out.println(\"busy\");\n\t\t\t\t}\n\t\t\t\turl = reader.readLine();\n\t\t\t\tif(url != null) {\n\t\t\t\t\t//System.out.println(\"enqueue: \" + url);\n\t \t\t\tXPathCrawler.getInstance().getFrontier().enqueue(url);\n\t \t\t\twhile(url != null) {\n\t \t\t\t\t//System.out.println(\"reading from file. Size is: \" + XPathCrawler.getInstance().getFrontier().getSize());\n\t \t\t\t\turl = reader.readLine();\n\t \t\t\t\tif(url == null) {\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t}\n\t \t\t\t\t//System.out.println(\"enqueue2: \" + url);\n\t \t\t\t\tXPathCrawler.getInstance().getFrontier().enqueue(url);\n\t \t\t\t\tif(XPathCrawler.getInstance().getFrontier().getSize() >= XPathCrawler.FRONTIER_BUFFER_SIZE) { //buffe\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t\t\t} catch (IOException e) {\t\t\t\t\n\t\t\t\tSystem.out.println(\"unable to read from URLDisk file\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tURLSpout.activeThreads.getAndDecrement();\n\t\t\t}\t\t\t\n \t}\n \t\n \tif(XPathCrawler.getInstance().getFrontier().isEmpty() || fileCount >= XPathCrawler.getInstance().getMaxFileNum()) { // Handle Shutdown\n \t\tif(URLSpout.getActiveThreads() <= 0 && CrawlerBolt.getActiveThreads() <= 0 && DocumentParserBolt.getActiveThreads() <= 0 && URLFilterBolt.getActiveThreads() <= 0 && \n \t\t\tXPathCrawler.getInstance().getInFlightMessages() <= 0) {\n \t\t\tXPathCrawler.getInstance().shutdown(); //call shutdown\n \t\t\t//System.out.println(\"Spout Called Shutdown\");\n \t\t\treturn;\n \t\t} else {\n \t\t\treturn; //just return and don't emit anything\n \t\t}\n \t\t\n \t} else {\n \t\tURLSpout.activeThreads.getAndIncrement(); //isIdle is now 1, hence this thread is not idle\n \tString url = XPathCrawler.getInstance().getFrontier().dequeue();\n \tif(url.startsWith(\"http://\")) {\n \t\tURLInfo urlInfo = new URLInfo(url);\t\n \t\tif(urlInfo.getHostName() == null) {\n \t\t\tURLSpout.activeThreads.decrementAndGet();\n \t\t\treturn;\n \t\t}\n \t\tString portString = \":\" + Integer.toString(urlInfo.getPortNo());\n \t\t\t if(!url.contains(portString)) { //make sure URL is in the form http://xyz.com:80/\n \t\t\t\t StringBuilder newURL = new StringBuilder(url);\n \t \t\t\t int index = 7 + urlInfo.getHostName().length();\n \t \t\t\t newURL.insert(index, portString);\n \t\t\t\t url = newURL.toString();\n \t\t\t }\n \t\t\t \n \t//log.debug(getExecutorId() + \" emitting \" + url);\n \t this.collector.emit(new Values<Object>(urlInfo.getHostName(), url, \"http\"));\n \t \n \t XPathCrawler.getInstance().incrementInflightMessages(); //signals a message is currently being routed\n \t}else {\n \t\ttry {\n\t\t\t\t\tURL httpsUrl = new URL(url); //emit https url\n\t\t\t\t\tint port = httpsUrl.getPort() == -1 ? 443 : httpsUrl.getPort();\n\t\t\t\t\tString portString = \":\" + Integer.toString(port);\n\t\t\t\t\tif(!url.contains(portString)) { //make sure URL is in the form http://xyz.com:443/\n\t \t\t\t\t StringBuilder newURL = new StringBuilder(url);\n\t \t \t\t\t int index = 8 + httpsUrl.getHost().length();\n\t \t \t\t\t newURL.insert(index, portString);\n\t \t\t\t\t url = newURL.toString();\n\t \t\t\t }\n\t\t\t\t\t//log.debug(getExecutorId() + \" emitting \" + url);\n\t \t this.collector.emit(new Values<Object>(httpsUrl.getHost(), url, \"https\"));\n\t \t XPathCrawler.getInstance().incrementInflightMessages(); //signals a message is currently being routed\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tURLSpout.activeThreads.decrementAndGet();\n\t\t\t\t}\n \t\treturn;\n \t}\n \t\n \tURLSpout.activeThreads.decrementAndGet(); //isIdle is now 0 hence this thread is idle\n \t} \t\n Thread.yield();\n }", "void execute(String link) throws CrawlerWorkerException;", "private WebSearchRequest createNextRequest() {\n\t\tWebSearchRequest _request = new WebSearchRequest(query);\n\t\t_request.setStart(BigInteger.valueOf(cacheStatus+1));\t\t\t\t\t//Yahoo API starts index with 1, not with 0\n\t\t_request.setResults(getFetchBlockSize());\n\t\treturn _request;\n\t}", "public interface Crawler {\n\t/**\n\t * Gets the location where crawled content is saved.\n\t * \n\t * @return location string of crawled content\n\t */\n\tpublic String getDumpLocation();\n\n\t/**\n\t * Starts the crawling from the root source of target.\n\t * \n\t * @throws IOException\n\t */\n\tpublic void disperse() throws IOException;\n\n\t/**\n\t * Crawls every <code>url</code> within the <code>target</code> url\n\t * \n\t * @param url\n\t * url which is either <code>target</code> or the one nested\n\t * inside\n\t * @param target\n\t * the target url declared to crawl\n\t * @throws IOException\n\t */\n\tpublic void crawl(final String url, final String target) throws IOException;\n\n\t/**\n\t * Picks up data from webpage.\n\t * \n\t * @param doc\n\t * <code>Document</code> retrieved from <code>url</code>\n\t * @param url\n\t * @return list of <code>Nugget</code> objects consisting of relevant data\n\t */\n\tpublic List<Nugget> scavenge(final Document doc, final String url);\n\n}", "private void init(int threadCount, Type type) {\r\n //The backend starts to polling threads.\r\n mPoolThread=new Thread(){\r\n @Override\r\n public void run() {\r\n Looper.prepare();\r\n mPoolThreadHandler=new Handler(){\r\n @Override\r\n public void handleMessage(Message msg) {\r\n //take a thread from the thread pool and execute it.\r\n mThreadPool.execute(getTask());\r\n try {\r\n mSemaphoreThreadPool.acquire();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n };\r\n //if this thread is finished, release a signal to the handler.\r\n mSemaphorePoolThreadHandler.release();\r\n Looper.loop();\r\n }\r\n };\r\n mPoolThread.start();\r\n //Get the maximum available memory for our service.\r\n int maxMemory= (int) Runtime.getRuntime().maxMemory();\r\n int cacheMemory = maxMemory / 8;//8\r\n mLruCache=new LruCache<String, Bitmap>(cacheMemory){\r\n @Override\r\n protected int sizeOf(String key, Bitmap value) {\r\n return value.getRowBytes()*value.getHeight();\r\n }\r\n };\r\n mThreadPool= Executors.newFixedThreadPool(threadCount);\r\n mTaskQueue=new LinkedList<>();\r\n mType=type==null? Type.LIFO:type;\r\n mSemaphoreThreadPool=new Semaphore(threadCount);\r\n\r\n }", "public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }", "public HttpRequest(URL url) throws IOException {\r\n this(url.openConnection());\r\n }", "BackgroundWorker (String page, String email, String username, String password, int appversion, Context context) {this.page=page; this.context=context; this.username=username; this.password=password; this.email=email; this.appversion=appversion; flag=6;}", "VertexNetwork() {\r\n /* This constructor creates an empty list of vertex locations. \r\n read The transmission range is set to 0.0. */\r\n transmissionRange = 0.0;\r\n location = new ArrayList<Vertex>(0);\r\n }", "WebCrawler addExtractor(Extractor extractor);", "public ThreadQueue newThreadQueue(boolean transferPriority) {\n return new PriorityQueue(transferPriority);\n }", "public IThread createThread() throws IllegalWriteException, BBException;", "public static void setNumThreads(int newNumThreads) throws Exception \n { \n /** In case of incorrect input */\n if(newNumThreads < 0)\n throw new Exception(\"attepmt to create negative count of threads\");\n numThreads = newNumThreads; \n }", "public static void main(String[] args) {\n final String filename = \"data/hungryGoWhereV2.csv\";\n try (final BusinessStorage storage = new BusinessStorage(filename)) {\n\n storage.append(Business.getHeader());\n\n final Session session = Session.builder()\n .put(STORAGE_KEY, storage)\n .build();\n\n try (final Crawler crawler = crawler(fetcher(), session).start()) {\n LOGGER.info(\"starting crawler...\");\n\n\n String csvFile = \"data/hungryGoWhere.csv\";\n String line = \"\";\n String cvsSplitBy = \",\";\n int counter = 2;\n ListingHandler handler = new ListingHandler();\n\n try (BufferedReader br = new BufferedReader(new FileReader(csvFile))) {\n int otherCounter = 1;\n while ((line = br.readLine()) != null) {\n String[] information = line.split(cvsSplitBy);\n\n if(counter == otherCounter){\n final String nextPageUrl = information[0];\n crawler.getScheduler().add(new VRequest(nextPageUrl), handler);\n// System.out.println(information[0] + \" \" + counter);\n counter ++;\n }\n otherCounter ++;\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n// final String startUrl = \"https://www.hungrygowhere.com/singapore/cafe_2000/\";\n// crawler.getScheduler().add(new VRequest(startUrl), new ListingHandler());\n } catch (Exception e) {\n LOGGER.error(\"Could not run crawler: \", e);\n }\n\n } catch (IOException e) {\n LOGGER.error(\"unable to open file: {}, {}\", filename, e);\n }\n }", "public void createThread() {\n }", "public ConnectionThread(DBManager dbm, String url, String user, String pass) {\n\t\t\tthis.url = url;\n\t\t\tthis.user = user;\n\t\t\tthis.pass = pass;\n\t\t\tthis.dbm = dbm;\n\t\t}", "public HttpTrafficGenerator(long timeout, URL website) {\n\t\tthis.timeout = timeout;\n\t\tthis.website = website;\n\n\t\tworker = new Thread(this, \"HttpTrafficGenerator\");\n\t}" ]
[ "0.60596025", "0.5916516", "0.5643408", "0.5570551", "0.54848677", "0.5476425", "0.54543585", "0.5428461", "0.5330394", "0.5268289", "0.5254906", "0.52231836", "0.51661956", "0.50530785", "0.50457275", "0.5021119", "0.49977547", "0.49472445", "0.49109793", "0.4885748", "0.48563892", "0.4781617", "0.47720608", "0.4762506", "0.4757869", "0.47452068", "0.46986848", "0.46669295", "0.46664062", "0.46622488", "0.4656392", "0.4654186", "0.464763", "0.4645967", "0.46437976", "0.46123147", "0.4599122", "0.45921126", "0.45907316", "0.45860788", "0.45625693", "0.45156506", "0.45125955", "0.45123172", "0.4510004", "0.45071882", "0.4499913", "0.44975194", "0.44604874", "0.4406385", "0.43979555", "0.43941337", "0.43676814", "0.4366657", "0.43651778", "0.43642965", "0.4348524", "0.4337523", "0.43268764", "0.4323642", "0.43089166", "0.43038514", "0.42985323", "0.42912", "0.42890984", "0.42745575", "0.426789", "0.4266501", "0.4262893", "0.425955", "0.42546704", "0.42377895", "0.42290717", "0.42290527", "0.42232645", "0.42226893", "0.4220728", "0.42203027", "0.42193118", "0.42180967", "0.4210118", "0.42095155", "0.42091364", "0.42048302", "0.42032528", "0.42004254", "0.41961938", "0.4193786", "0.41926047", "0.41858852", "0.4182996", "0.4182819", "0.41821238", "0.41795748", "0.41692048", "0.41578802", "0.4154287", "0.41519406", "0.4149394", "0.41428816" ]
0.76555556
0
This method connects to the base url provided in the constructor and begins searching through the page for more urls. If it finds a valid url, it will check the graph to determine if it has been discovered before or not. If it hasn't add it to the graph if either of the maximums hasn't been achieved yet, and add it to the queue as well. If it has been discovered, update its indegree as well as the original vertex's outdegree.
@Override public void run() { Document doc = null; try { // Politeness policy try { // Used so that we don't have multiple threads sleeping, instead the rest just wait on the // semaphore if (PolitenessPolicy()) return; doc = Jsoup.connect(threadVertex.getUrl()).get(); } catch (InterruptedException e) { e.printStackTrace(); return; } } catch (UnsupportedMimeTypeException e) { // System.out.println("--unsupported document type, do nothing"); return; } catch (HttpStatusException e) { // System.out.println("--invalid link, do nothing"); return; } catch (IOException e) { e.printStackTrace(); return; } finally { politenessInteger.incrementAndGet(); } Elements links = doc.select("a[href]"); for (Element link : links) { String v = link.attr("abs:href"); // System.out.println("Found: " + v); // Document temp = null; if (!Util.ignoreLink(threadVertex.getUrl(), v)) { // This was originally trying to catch invalid links before adding them to the graph // but I realized those are also valid notes, just leaf nodes. // This also greatly speeds up the execution of the program. // try // { // try // { // // Used so that we don't have multiple threads sleeping, instead the rest just wait on the // // semaphore // if (PolitenessPolicy()) return; // // temp = Jsoup.connect(v).get(); // } // catch (InterruptedException e) // { // e.printStackTrace(); // return; // } // } // catch (UnsupportedMimeTypeException e) // { // System.out.println("--unsupported document type, do nothing"); // return; // } // catch (HttpStatusException e) // { // System.out.println("--invalid link, do nothing"); // return; // } // catch (IOException e) // { // e.printStackTrace(); // return; // } Vertex newVertex = new Vertex(v); // We need to synchronize the graph and the queue among each thread // This avoids dirty reads and dirty writes synchronized(graph) { synchronized(urlQueue) { if (!graph.containsKey(newVertex.getUrl())) { int newVertexDepth = threadVertex.getDepth() + 1; int currentPages = graph.size(); if (currentPages < maxPages && newVertexDepth <= maxDepth) { // Set the new vertex's depth and add an ancestor newVertex.setDepth(newVertexDepth); newVertex.addAncestor(threadVertex); // Update the current vertex to have this one as a child threadVertex.addChild(newVertex); graph.put(threadVertex.getUrl(), threadVertex); // Place the new vertex in the discovered HashMap and place it in the queue graph.put(newVertex.getUrl(), newVertex); urlQueue.add(newVertex); } } else { // Done to update relationships of ancestors and children Vertex oldVertex = graph.get(newVertex.getUrl()); oldVertex.addAncestor(threadVertex); threadVertex.addChild(oldVertex); graph.put(oldVertex.getUrl(), oldVertex); graph.put(threadVertex.getUrl(), threadVertex); } } } } else { // System.out.println("--ignore"); return; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tpublic Indexer crawl (int limit) \n\t{\n\t\n\t\t////////////////////////////////////////////////////////////////////\n\t // Write your Code here as part of Priority Based Spider assignment\n\t // \n\t ///////////////////////////////////////////////////////////////////\n\t\tPQueue q=new PQueue();\n \t\n\t\ttry\n \t{\n\t\t\t final String authUser = \"iiit-63\";\n\t\t\t\tfinal String authPassword = \"MSIT123\";\n\n\t\t\t\tSystem.setProperty(\"http.proxyHost\", \"proxy.iiit.ac.in\");\n\t\t\t\tSystem.setProperty(\"http.proxyPort\", \"8080\");\n\t\t\t\tSystem.setProperty(\"http.proxyUser\", authUser);\n\t\t\t\tSystem.setProperty(\"http.proxyPassword\", authPassword);\n\n\t\t\t\tAuthenticator.setDefault(\n\t\t\t\t new Authenticator() \n\t\t\t\t {\n\t\t\t\t public PasswordAuthentication getPasswordAuthentication()\n\t\t\t\t {\n\t\t\t\t return new PasswordAuthentication(authUser, authPassword.toCharArray());\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t);\n\n\t\t\t\tSystem.setProperty(\"http.proxyUser\", authUser);\n\t\t\t\tSystem.setProperty(\"http.proxyPassword\", authPassword);\n \t\tURLTextReader in = new URLTextReader(u);\n \t\t// Parse the page into its elements\n \t\tPageLexer elts = new PageLexer(in, u);\t\t\n \t\tint count1=0;\n \t\t// Print out the tokens\n \t\tint count = 0;\n \t\t\n \t\twhile (elts.hasNext()) \n \t\t{\n \t\t\tcount++;\n \t\t\tPageElementInterface elt = (PageElementInterface)elts.next();\t\t\t \n \t\t\tif (elt instanceof PageHref)\n \t\t\tif(count1<limit)\n \t\t\t{\n \t\t\t\tif(q.isempty())\n \t\t\t\t{\n \t\t\t\t\tq.enqueue(elt.toString(),count);\n\t\t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tif(q.search(elt.toString(),count))\n \t\t\t\t\t{\n \t\t\t\t\t\tq.enqueue(elt.toString(),count);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tcount1++;\n \t\t\t\tSystem.out.println(\"link: \"+elt);\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\tSystem.out.println(\"links retrieved: \"+count1);\n \t\tq.display();\n \t\twhile(limit !=0)\n \t\t{\n \t\t\tObject elt=q.dequeue();\n \t\t\tURL u1=new URL(elt.toString());\n \t\t\tURLTextReader in1= new URLTextReader(u1);\n \t\t\t// Parse the page into its elements\n \t\t\tPageLexer elt1 = new PageLexer(in1, u1);\n \t\t\twhile (elt1.hasNext()) \n \t\t\t{\n \t\t\t\tPageElementInterface elts2= (PageElementInterface)elt1.next();\n \t\t\t\tif (elts2 instanceof PageWord)\n \t\t\t\t{\n \t\t\t\t\tv.add(elts2);\n \t\t\t\t}\n \t\t\t\tSystem.out.println(\"words:\"+elts2);\n \t\t\t} \t\t\t\n\t\t\t\tObjectIterator OI=new ObjectIterator(v);\n\t\t\t\ti.addPage(u1,OI);\n\t\t\t\tfor(int j=0;j<v.size();j++);\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"hello\"+v.get(count));\n\t\t\t\t}\n\t\t\t\tlimit--;\n \t\t}\n \t\t\n \t}\n \tcatch (Exception e)\n \t{\n \t\tSystem.out.println(\"Bad file or URL specification\");\n \t}\n return i;\n\t}", "private void searchNext(CrawlingSession executor, Link link) {\n HTMLLinkExtractor htmlLinkExtractor = HTMLLinkExtractor.getInstance();\n// htmlLinkExtractor.setWorking(link);\n \n Source source = CrawlingSources.getInstance().getSource(link.getSourceFullName());\n if(source == null) return;\n \n SessionStore store = SessionStores.getStore(source.getCodeName());\n if(store == null) return;\n\n List<Link> collection = htmlLinkExtractor.getLinks(link, /*link.getSource(),*/ pagePaths);\n// List<Link> collection = htmlLinkExtractor.getLinks(srResource);\n List<Link> nextLinks = createNextLink(link, collection);\n if(nextLinks.size() < 1) return;\n if(userPaths == null && contentPaths == null) {\n executor.addElement(nextLinks, link.getSourceFullName());\n return;\n }\n \n \n if(nextLinks.size() < 2) {\n executor.addElement(nextLinks, link.getSourceFullName());\n }\n \n// long start = System.currentTimeMillis();\n \n int [] posts = new int[nextLinks.size()];\n for(int i = 0; i < nextLinks.size(); i++) {\n try {\n posts[i] = PageDownloadedTracker.searchCode(nextLinks.get(i), true);\n } catch (Throwable e) {\n posts[i] = -1;\n LogService.getInstance().setThrowable(link.getSourceFullName(), e);\n// executor.abortSession();\n// return;\n }\n }\n \n int max = 1;\n for(int i = 0; i < posts.length; i++) {\n if(posts[i] > max) max = posts[i];\n }\n \n// System.out.println(\" thay max post la \"+ max);\n \n List<Link> updateLinks = new ArrayList<Link>();\n for(int i = 0; i < posts.length; i++) {\n if(posts[i] >= max) continue;\n updateLinks.add(nextLinks.get(i));\n }\n \n// long end = System.currentTimeMillis();\n// System.out.println(\"step. 4 \"+ link.getUrl()+ \" xu ly cai ni mat \" + (end - start));\n \n executor.addElement(updateLinks, link.getSourceFullName());\n \n /*int minPost = -1;\n Link minLink = null;\n List<Link> updateLinks = new ArrayList<Link>();\n for(int i = 0; i < nextLinks.size(); i++) {\n Link ele = nextLinks.get(i);\n int post = 0;\n try {\n post = PostForumTrackerService2.getInstance().read(ele.getAddressCode());\n } catch (Exception e) {\n LogService.getInstance().setThrowable(link.getSource(), e);\n }\n if(post < 1) {\n updateLinks.add(ele);\n continue;\n } \n\n if(minPost < 0 || post < minPost){\n minLink = ele;\n minPost = post; \n } \n }\n\n if(minLink != null) updateLinks.add(minLink);\n executor.addElement(updateLinks, link.getSource());*/\n }", "public CrawlerThread(Vertex newThreadVertex, LinkedHashMap<String, Vertex> crawledGraph, Queue<Vertex> graphQueue,\n int maximumPages, int maximumDepth, AtomicInteger politenessInt, Semaphore politenessSem)\n {\n threadVertex = newThreadVertex;\n graph = crawledGraph;\n urlQueue = graphQueue;\n maxPages = maximumPages;\n maxDepth = maximumDepth;\n politenessInteger = politenessInt;\n politenessSemaphore = politenessSem;\n }", "private void innerCrawl(URL url, int limit) {\n\t\t\tsynchronized(urls) {\n\t\t\t\tif(urls.size() <= limit) {\n\t\t\t\t\tqueue.execute(new CrawlWorker(url.toString()));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private String nextUrl()\n {\n String nextUrl;\n do\n {\n nextUrl = this.pagesToVisit.remove(0);\n } while(this.pagesVisited.contains(nextUrl));\n this.pagesVisited.add(nextUrl);\n return nextUrl;\n }", "private String nextURL() {\n\n\t\tString url;\n\t\t// Search the next url until the unique url is found\n\t\tdo {\n\t\t\turl = this.pagesToVisit.remove(0);\n\t\t} while (this.pagesVisited.contains(url));\n\t\tthis.pagesVisited.add(url);\n\t\treturn url;\n\n\t}", "@Override\n public void crawl() throws IOException {\n final String seedURL = url;\n Queue<String> currentDepthQueue = new LinkedList<>();\n currentDepthQueue.add(seedURL);\n crawl(visitedURL, 1, currentDepthQueue);\n customObjectWriter.flush();\n }", "public Graphs(int maxNumVertices) {\n\t\tthis.maxNumVertices = maxNumVertices + 1;\n\t\tthis.adjListMap = new HashMap<Integer, ArrayList<Integer>>();\n\t\tfor (int i = 0; i < this.maxNumVertices; i++) {\n\t\t\tadjListMap.put(i, new ArrayList<Integer>());\n\t\t}\n\t\t// Reachability matrix so that isLinked() look ups are O(1)\n\t\tthis.reachabilityMatrix = new boolean[this.maxNumVertices + 1][this.maxNumVertices + 1];\n\t}", "public void crawlAndIndex(String url) throws Exception {\r\n\t\t// TODO : Add code here\r\n\t\tQueue<String> queue=new LinkedList<>();\r\n\t\tqueue.add(url);\r\n\t\twhile (!queue.isEmpty()){\r\n\t\t\tString currentUrl=queue.poll();\r\n\t\t\tif(internet.getVisited(currentUrl)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tArrayList<String> urls = parser.getLinks(currentUrl);\r\n\t\t\tArrayList<String> contents = parser.getContent(currentUrl);\r\n\t\t\tupdateWordIndex(contents,currentUrl);\r\n\t\t\tinternet.addVertex(currentUrl);\r\n\t\t\tinternet.setVisited(currentUrl,true);\r\n\t\t\tfor(String u:urls){\r\n\t\t\t\tinternet.addVertex(u);\r\n\t\t\t\tinternet.addEdge(currentUrl,u);\r\n\t\t\t\tqueue.add(u);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void Execute ()\n\t{\n\t\tReceiveCollection (SpawnCrawler (target));\n\t\t\n\t\tList<String> initialCollection = overCollection;\n\t\t\n\t\tif ( ! initialCollection.isEmpty ())\n\t\t{\n\t\t\n\t\t\tfor (String collected : initialCollection)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (collected.contains (\"http\"))\n\t\t\t\t\tReceiveCollection (SpawnCrawler (collected));\n\t\t\t\telse\n\t\t\t\t\tReceiveCollection (SpawnCrawler (target + collected));\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t/*\n\t\t * Several loops should commence here where the system reiteratively goes over all the newly acquired URLs\n\t\t * so it may extend itself beyond the first and second depth.\n\t\t * However this process should be halted once it reaches a certain configurable depth.\n\t\t */\n\t\tint depth = 0;\n\t\tint newFoundings = 0;\n\t\t\n\t\tdepthLoop: while (depth <= MAX_DEPTH)\n\t\t{\n\t\t\t\n\t\t\tfor (String collected : overCollection)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (collected.contains (\"http\"))\n\t\t\t\t\tSpawnCrawler (collected);\n\t\t\t\telse\n\t\t\t\t\tSpawnCrawler (target + collected);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (newFoundings <= 0)\n\t\t\t\tbreak depthLoop;\n\t\t\t\n\t\t\tdepth++;\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "public URLSpout() {\n \tURLSpout.activeThreads = new AtomicInteger();\n \tlog.debug(\"Starting URL spout\");\n \t\n \ttry { \t\t\n\t\t\treader = new BufferedReader(new FileReader(\"URLDisk.txt\"));\n\t\t\tint num_lines = XPathCrawler.getInstance().getFileCount().get();\n\t\t\tfor (int i = 0; i < num_lines; i++) {\n\t\t\t\treader.readLine(); //set reader to latest line\n\t\t\t}\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void run() {\n\t\t\tString html = \"\";\n\t\t\ttry {\n\t\t\t\thtml = HTTPFetcher.fetchHTML(this.url);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\tSystem.out.println(\"Unknown host\");\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"IOException\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif(html != null) {\n\t\t\t\t\tthis.newLinks = LinkParser.listLinks(new URL(this.url), html);\n\t\t\t\t}\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\tSystem.out.println(\"MalformedURL\");\n\t\t\t}\n\t\t\tif(newLinks != null) {\n\t\t\t\tfor(URL theURL : newLinks) {\n\t\t\t\t\tif(!(urls.contains(theURL))) {\n\t\t\t\t\t\tsynchronized(urls) {\n\t\t\t\t\t\t\turls.add(theURL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinnerCrawl(theURL, limit);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tInvertedIndex local = new InvertedIndex();\n\t\t\t\tString no_html = HTMLCleaner.stripHTML(html.toString());\n\t\t\t\tString[] the_words = WordParser.parseWords(no_html);\n\t\t\t\tlocal.addAll(the_words, this.url);\n\t\t\t\tindex.addAll(local);\n\t\t\t}\n\t\t}", "public static void main(String[] args) throws IOException {\n Deque<String> urlsToVisit = new ArrayDeque<String>();\n // Keep track of which URLs we have visited, so we don't get ourselves stuck in a loop.\n List<String> visitedUrls = new ArrayList<String>();\n // Keep track of how we got to each page, so that we can find our trace back to the BEGIN_URL.\n Hashtable<String, String> referrers = new Hashtable<String, String>();\n boolean pathFound = false;\n\n // Begin with the BEGIN_URL\n urlsToVisit.push(BEGIN_URL);\n\n while(!urlsToVisit.isEmpty() && !pathFound) {\n String currentUrl = urlsToVisit.pop();\n visitedUrls.add(currentUrl);\n\n Elements paragraphs = wf.fetchWikipedia(BASE_URL + currentUrl);\n List<String> pageUrls = new ArrayList<String>();\n\n for (Element p : paragraphs) {\n pageUrls.addAll(getLinksFromParagraph(p));\n }\n\n // Reverse the order of all page urls so that when we're done pushing all the URLS\n // to the stack, the first URL in the page will be the first URL in the current page.\n Collections.reverse(pageUrls);\n\n // Add all the URLs to the list of URLs to visit.\n for (String newUrl : pageUrls) {\n if(!visitedUrls.contains(newUrl)) {\n urlsToVisit.push(newUrl);\n // Record how we ended up at newUrl.\n referrers.put(newUrl, currentUrl);\n\n // Check if one of the links in this page is the END_URL; which means we'll be done!\n if (newUrl.equals(END_URL)) {\n pathFound = true;\n }\n }\n }\n }\n\n if (pathFound) {\n System.out.println(\"=================\");\n System.out.println(\"Path found!\");\n System.out.println(\"=================\");\n\n // Back trace how we ended up at END_URL.\n String backtraceUrl = END_URL;\n System.out.println(backtraceUrl);\n while(backtraceUrl != BEGIN_URL) {\n String referrerUrl = referrers.get(backtraceUrl);\n System.out.println(referrerUrl);\n backtraceUrl = referrerUrl;\n }\n } else {\n System.out.println(\"=================\");\n System.out.println(\"No path found :(\");\n System.out.println(\"=================\");\n }\n }", "public void crawl(URL url, int limit) {\n\t\turls.add(url);\n\t\tqueue.execute(new CrawlWorker(url.toString()));\n\n\t\tqueue.finish();\n\t\tqueue.shutdown();\n\t}", "@Override\n\tpublic void setMaxNumOfUrls(int maxNumOfUrls) {\n\t\t\n\t}", "public static void liveDemo() {\n Scanner in = new Scanner( System.in );\n float srcTank1, srcTank2, destTank;\n int alternetPaths;\n Graph mnfld = new Graph();\n boolean runSearch = true;\n\n //might need to limit query results, too large maybe?\n //newnodes = JDBC.graphInformation(); //returns arraylist of nodes\n //mnfld.setPipes(newnodes); //set nodes to the manifold\n //JDBC.insertConnections(mnfld);\n\n//\t\t /*\n//\t\t\tfor (int i = 0; i < newnodes.length(); i++) { //length might be wrong\n//\t\t\t\t//need to look for way to add edges by looking for neighbor nodes i think\n//\t\t\t\t//loop through nodes and create Edges\n//\t\t\t\t//might need new query\n//\t\t\t\tnewedges.addEdge(node1,node2,cost);\n//\t\t\t}\n//\n//\t\t\tmnfld.setConnections(newedges);\n//\n//\t\t\tup to this point, graph should be global to Dijkstra and unused.\n//\t\t\tloop until user leaves page\n//\t\t\tget input from user for tanks to transfer\n//\t\t\tfind shortest path between both tanks\n//\t\t\tend loop\n//\t\t\tthis will change depending how html works so not spending any time now on it\n//\t\t*/\n //shortestPath.runTest();\n\n shortestPath.loadGraph( mnfld );\n while (runSearch) {\n // Gets user input\n System.out.print( \"First Source Tank: \" );\n srcTank1 = in.nextFloat();\n System.out.print( \"Second Source Tank: \" );\n srcTank2 = in.nextFloat();\n System.out.print( \"Destination Tank: \" );\n destTank = in.nextFloat();\n System.out.print( \"Desired Number of Alternate Paths: \" );\n alternetPaths = in.nextInt();\n\n // Prints outputs\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"True shortest with alt paths\" );\n Dijkstra.findAltPaths( mnfld, alternetPaths, srcTank1, destTank );\n mnfld.restoreDroppedConnections();\n\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"Lineup Considering used connections\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( srcTank1 ), true );\n mnfld.getPipe( destTank ).printLine();\n mnfld.restoreDroppedConnections();\n\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"Lineup Considering only open connections\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( srcTank1 ), false );\n mnfld.getPipe( destTank ).printLine();\n mnfld.restoreDroppedConnections();\n\n Dijkstra.resetCosts( mnfld );\n System.out.println( \"Merge Lineup\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( srcTank1 ) );\n System.out.println( \"\\t Original Lineup: \" );\n mnfld.getPipe( destTank ).printLine();\n System.out.println( \"\\t Merged Lineup: \" );\n Dijkstra.mergePaths( mnfld, srcTank2, mnfld.getPipe( destTank ).getPath(), mnfld.getPipe( destTank ) );\n System.out.print( \"\\nRun another search [1:Yes, 0:No] :: \" );\n if (in.nextInt() == 0) runSearch = false;\n else System.out.println( \"\\n\\n\\n\" );\n }\n\n\n }", "private String fetchUrl() {\n\t\tString url;\n\t\tint depth;\n\t\tdo\n\t\t{\n\t\t\tLandingPage lp = this.pagesToVisit.remove(0);\n\t\t\turl = lp.getUrl();\n\t\t\tdepth = lp.getDepth();\n\t\t\t\n\t\t}while(this.pagesVisited.containsKey(url) || !(isvalidURL(url)));\n\t\tthis.pagesVisited.put(url,depth);\n\t\treturn url;\n\t}", "@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }", "private void goThroughLinks() throws IOException {\n for (URL link :links) {\n pagesVisited++;\n Node node;\n if (link.toString().contains(\"?id=1\") && !books.contains(link)) {\n node = populateNode(link);\n depth = 2;\n books.add(node);\n } else if (link.toString().contains(\"?id=2\") && !movies.contains(link)) {\n node = populateNode(link);\n depth = 2;\n movies.add(node);\n } else if (link.toString().contains(\"?id=3\") && !music.contains(link)) {\n node = populateNode(link);\n depth = 2;\n music.add(node);\n }\n }\n }", "public List<Url> getNextUrls(Url url, int limit)\r\n\t{\n\t\treturn null;\r\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 }", "public PageRankAnalyzer(ISet<Webpage> webpages, double decay, double epsilon, int limit) {\n // Step 1: Make a graph representing the 'internet'\n IDictionary<URI, ISet<URI>> graph = this.makeGraph(webpages);\n\n // Step 2: Use this graph to compute the page rank for each webpage\n this.pageRanks = this.makePageRanks(graph, decay, limit, epsilon);\n }", "public void crawl(String url) {\n Queue<String> queue = new LinkedList<>();\n queue.add(url);\n this.visited_urls.put(url, 1);\n Set<String> urls;\n\n while (!queue.isEmpty()) {\n String link = queue.remove();\n try {\n urls = WebCrawlerUtil.getLinks(link);\n } catch (IOException e) {\n logger.debug(\"unable to parse link \" + link);\n continue;\n }\n System.out.println(WebCrawlerUtil.formatOutput(link, urls));\n for (String neighbor : urls) {\n if (!this.visited_urls.containsKey(neighbor)) {\n this.visited_urls.put(neighbor, 1);\n queue.add(neighbor);\n }\n }\n }\n }", "private void updateQueue(String url)\r\n\t{\r\n\t\tQueue temp = new Queue(SIZE);\r\n\t\tObject temp2 = ' ';\r\n\t\tObject target = ' ';\r\n\t\t\r\n\t\tfor (int i = 0; i < siteVisited; i++)\r\n\t\t{\r\n\t\t\ttemp2 = rChronological.dequeue();\r\n\t\t\tif (!url.equals(temp2))\r\n\t\t\t\ttemp.enqueue(temp2);\r\n\t\t\telse\r\n\t\t\t\ttarget = temp2;\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < siteVisited - 1; i++)\r\n\t\t\trChronological.enqueue(temp.dequeue());\r\n\t\trChronological.enqueue(target);\r\n\t}", "public void crawlSite()\n {\n /** Init the logger */\n WorkLogger.log(\"WebCrawler start at site \" + this.urlStart.getFullUrl() + \" and maxDepth = \" + this.maxDepth);\n WorkLogger.log(\"====== START ======\");\n WorkLogger.log(\"\");\n /** Save the start time of crawling */\n long startTime = System.currentTimeMillis();\n /** Start our workers */\n this.taskHandler.startTask(this.urlStart, maxDepth);\n /** Check workers finished their work; in case then all workers wait, then no ones work, that leads no more tasks -> the program finished */\n while(this.taskHandler.isEnd() == false)\n {\n /** Default timeout for 1 sec cause the socket timeout I set to 1 sec */\n try{Thread.sleep(1000);}catch(Exception e){}\n }\n this.taskHandler.stopTasks();\n /** End the log file and add the time elapsed and total sites visited */\n WorkLogger.log(\"\\r\\n====== END ======\");\n WorkLogger.log(\"Time elapsed: \" + (System.currentTimeMillis() - startTime)/1000.);\n WorkLogger.log(\"Total visited sites: \" + this.pool.getVisitedSize());\n }", "@Async\n\tpublic void start() {\n\t\tUrl url = null;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\turl = urlRepository.findFirstByDateScannedOrderByIdAsc(null);\n\t\t\t\tif (url == null) {\n\t\t\t\t\twhile (url == null) {\n\t\t\t\t\t\turl = WebSiteLoader.getRandomUrl();\n\n\t\t\t\t\t\tif (urlExists(url)) {\n\t\t\t\t\t\t\turl = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\turl = urlRepository.saveAndFlush(url);\n\t\t\t\t}\n\t\t\t\tlog.info(\"Crawling URL : \" + url);\n\n\t\t\t\tWebPage webPage = WebSiteLoader.readPage(url);\n\t\t\t\tif (webPage != null) {\n\t\t\t\t\tReport report = textAnalyzer.analyze(webPage.getText());\n\t\t\t\t\t\n\t\t\t\t\tfor(SentenceReport sentenceReport : report.getSentenceReports()){\n\t\t\t\t\t\tSentence sentence = sentenceReport.getSentence();\n\t\t\t\t\t\tsentence = sentenceRepository.saveAndFlush(sentence);\n\t\t\t\t\t\tsentenceReport.setSentence(sentence);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(Occurrence occurrence : sentenceReport.getOccurences()){\n\t\t\t\t\t\t\toccurrence = occurrenceRepository.saveAndFlush(occurrence);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSentenceOccurrence so = new SentenceOccurrence();\n\t\t\t\t\t\t\tSentenceOccurrenceId soId = new SentenceOccurrenceId();\n\t\t\t\t\t\t\tso.setSentenceOccurrenceId(soId);\n\t\t\t\t\t\t\tsoId.setOccurenceId(occurrence.getId());\n\t\t\t\t\t\t\tsoId.setSentenceId(sentence.getId());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsentenceOccurrenceRepository.saveAndFlush(so);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\taddUrls(webPage.getUrls());\n\t\t\t\t}\n\n\t\t\t\tlog.info(\"Done crawling URL : \" + url);\n\t\t\t} catch (PageNotInRightLanguageException ex) {\n\t\t\t\tlog.info(\"Page not in the right language : \" + ex.getText());\n\t\t\t} catch (Exception ex) {\n\t\t\t\tlog.error(\"Error while crawling : \" + url, ex);\n\t\t\t}\n\t\t\t\n\t\t\turl.setDateScanned(new Date());\n\t\t\turlRepository.saveAndFlush(url);\n\t\t\t\n\t\t\tif(stop){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void processOverlay(){\n \n // go for as long as edges still exist.\n while(this.availableVertices.size() > 0)\n {\n \n // pick the least weight vertex.\n Vertex next = this.availableVertices.poll(); // finding the least weight vertex.\n int distanceToNext = this.distances.get(convertToString(next.getVertexPortNum())); // must use the string version of the portnum.\n \n // and for each available squad member of the chosen vertex\n List<Edge> nextSquad = next.getSquad(); \n for(Edge e: nextSquad)\n {\n Vertex other = e.getNeighbor(next);\n if(this.visitedVertices.contains(other))\n {\n continue; // continue the while loop in this case.\n }\n \n // check for a shorter path, update if a new path is found within the overlay.\n int currentWeight = this.distances.get(convertToString(other.getVertexPortNum())); // using string version of the port number.\n int newWeight = distanceToNext + e.getWeight();\n \n if(newWeight < currentWeight){\n this.predecessors.put(convertToString(other.getVertexPortNum()), convertToString(next.getVertexPortNum())); // use the string versions of the port numbers.\n this.distances.put(convertToString(other.getVertexPortNum()), newWeight); // use the string version of the port numbers.\n // updating here.\n this.availableVertices.remove(other);\n this.availableVertices.add(other);\n }\n \n }\n \n this.visitedVertices.add(next); // add this vertex as \"visited\" so we do not visit it again.\n }\n }", "private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}", "public static int p413ComputeShortestPathNumber(Vertex start, Vertex end){\n\t Queue<Vertex> queue=new LinkedList<Vertex>();\n\t Map<Vertex, Status> statusMap=new HashMap<Vertex, Status>();\n\t Map<Vertex, Integer> levelMap=new HashMap<Vertex, Integer>();\n\t List<List<Vertex>> allLevelList=new LinkedList<List<Vertex>>();\n\t \n\t queue.offer(start);\n\t statusMap.put(start, Status.Queued);\n\t levelMap.put(start, 0);\n\t \n\t Vertex vertex;\n\t int lastLevel=-1;\n\t List<Vertex> levelList = null;\n\t\twhile ((vertex = queue.poll()) != null) {\n\t\t\tint currentLevel = levelMap.get(vertex);\n\n\t\t\tif (currentLevel != lastLevel) {\n\t\t\t\tlastLevel = currentLevel;\n\t\t\t\tlevelList = new LinkedList<Vertex>();\n\n\t\t\t\tallLevelList.add(levelList);\n\t\t\t}\n\n\t\t\tlevelList.add(vertex);\n\n\t\t\tif (vertex.equals(end)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tSet<Vertex> adjacentVertexes = vertex.getAdjacentVertexes();\n\t\t\tfor (Iterator iterator = adjacentVertexes.iterator(); iterator.hasNext();) {\n\t\t\t\tVertex adjacent = (Vertex) iterator.next();\n\n\t\t\t\tif (statusMap.get(adjacent) == null) {\n\t\t\t\t\tqueue.offer(adjacent);\n\t\t\t\t\tstatusMap.put(adjacent, Status.Queued);\n\t\t\t\t\tlevelMap.put(adjacent, currentLevel + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t \n\t int max=Integer.MIN_VALUE;\n\t List<Vertex> targetList=new LinkedList<Vertex>();\n\t targetList.add(end);\n\t for(int index=lastLevel-1;index>0;index--){\n\t\t List<Vertex> lastLevelList = allLevelList.get(index);\n\t\t List<Vertex> tmpList=new LinkedList<Vertex>();\n\n\t\t int count=0;\n\t\t for (Iterator iterator = lastLevelList.iterator(); iterator.hasNext();) {\n\t\t\t\tVertex lastLevelVertex = (Vertex) iterator.next();\n\t\t\t\tfor (Iterator iterator2 = targetList.iterator(); iterator2.hasNext();) {\n\t\t\t\t\tVertex vertex2 = (Vertex) iterator2.next();\n\t\t\t\t\tif(lastLevelVertex.getAdjacentVertexes().contains(vertex2)){\n\t\t\t\t\t count++;\n\t\t\t\t\t tmpList.add(lastLevelVertex);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t targetList=tmpList;\n\t\t \n\t\t if(count>max){\n\t\t \tmax=count;\n\t\t }\n\t }\n\t \n\t return max;\n\t}", "private IDictionary<URI, Double> makePageRanks(IDictionary<URI, ISet<URI>> graph,\n double decay,\n int limit,\n double epsilon) {\n \tIDictionary<URI, Double> computedPageRanks = new ChainedHashDictionary<URI, Double>();\n \tIDictionary<URI, Double> oldPageRanks = new ChainedHashDictionary<URI, Double>();\n \tdouble initPageRank = 1.0 / (double) graph.size();\n \tdouble newSurfers = (1.0 - decay) / (double) graph.size();\n \tfor (KVPair<URI, ISet<URI>> pair : graph) {\n \t\tURI pageUri = pair.getKey();\n \t\toldPageRanks.put(pageUri, initPageRank);\n \t}\n\n \tif (limit == 0) {\n \t\treturn oldPageRanks;\n \t}\n for (int i = 0; i < limit; i++) {\n \tfor (KVPair<URI, ISet<URI>> webpage : graph) {\n \t\tURI uri = webpage.getKey();\n \t\tcomputedPageRanks.put(uri, newSurfers);\n \t}\n \tfor (KVPair<URI, ISet<URI>> webpage : graph) {\n \t\tURI pageUri = webpage.getKey();\n \t\tISet<URI> links = webpage.getValue();\n \t\tdouble oldPageRank = oldPageRanks.get(pageUri);\n \t\tif (links.isEmpty()) {\n \t\t\t// d * oldPR / N\n \t\t\tfor (KVPair<URI, ISet<URI>> page : graph) {\n \t\t\t\tURI uri = page.getKey();\n \t\t\t\tdouble currPageRank = computedPageRanks.get(uri);\n \t\t\t\tdouble update = ((decay * oldPageRank) / ((double) graph.size()));\n \t\t\t\tcomputedPageRanks.put(uri, currPageRank + update);\n \t\t\t}\n \t\t} else {\n \t\t\t// d * oldPR / outgoing links\n \t\t\tfor (URI uri : links) {\n \t\t\t\tdouble update = ((decay * oldPageRank) / ((double) links.size()));\n \t\t\t\tdouble currPageRank = computedPageRanks.get(uri);\n \t\t\t\tcomputedPageRanks.put(uri, currPageRank + update);\n \t\t\t}\n \t\t}\n \t}\n\n \tboolean converged = true;\n \tfor (KVPair<URI, Double> pair : computedPageRanks) {\n \t\tURI pageUri = pair.getKey();\n \t\tdouble currPageRank = pair.getValue();\n \t\tdouble oldPageRank = oldPageRanks.get(pageUri);\n \t\tdouble difference = Math.abs(currPageRank - oldPageRank);\n \t\tif (converged) { \n \t\t\tconverged = (difference <= epsilon);\n \t\t}\n \t\toldPageRanks.put(pageUri, currPageRank);\n \t}\n \tif (converged) {\n \t\treturn computedPageRanks;\n \t}\n }\n return computedPageRanks;\n }", "FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}", "@Override\n public void nextTuple() {\n \tint fileCount = XPathCrawler.getInstance().getFileCount().get();\n \tif(XPathCrawler.getInstance().getFrontier().isEmpty()) { //refill from disk\n \t\tURLSpout.activeThreads.getAndIncrement();\n \t\t//System.out.println(\"refill time\");\n \t\tString url;\n\t\t\ttry {\n\t\t\t\twhile(!reader.ready()) {\n\t\t\t\t\t//System.out.println(\"busy\");\n\t\t\t\t}\n\t\t\t\turl = reader.readLine();\n\t\t\t\tif(url != null) {\n\t\t\t\t\t//System.out.println(\"enqueue: \" + url);\n\t \t\t\tXPathCrawler.getInstance().getFrontier().enqueue(url);\n\t \t\t\twhile(url != null) {\n\t \t\t\t\t//System.out.println(\"reading from file. Size is: \" + XPathCrawler.getInstance().getFrontier().getSize());\n\t \t\t\t\turl = reader.readLine();\n\t \t\t\t\tif(url == null) {\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t}\n\t \t\t\t\t//System.out.println(\"enqueue2: \" + url);\n\t \t\t\t\tXPathCrawler.getInstance().getFrontier().enqueue(url);\n\t \t\t\t\tif(XPathCrawler.getInstance().getFrontier().getSize() >= XPathCrawler.FRONTIER_BUFFER_SIZE) { //buffe\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t\t\t} catch (IOException e) {\t\t\t\t\n\t\t\t\tSystem.out.println(\"unable to read from URLDisk file\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tURLSpout.activeThreads.getAndDecrement();\n\t\t\t}\t\t\t\n \t}\n \t\n \tif(XPathCrawler.getInstance().getFrontier().isEmpty() || fileCount >= XPathCrawler.getInstance().getMaxFileNum()) { // Handle Shutdown\n \t\tif(URLSpout.getActiveThreads() <= 0 && CrawlerBolt.getActiveThreads() <= 0 && DocumentParserBolt.getActiveThreads() <= 0 && URLFilterBolt.getActiveThreads() <= 0 && \n \t\t\tXPathCrawler.getInstance().getInFlightMessages() <= 0) {\n \t\t\tXPathCrawler.getInstance().shutdown(); //call shutdown\n \t\t\t//System.out.println(\"Spout Called Shutdown\");\n \t\t\treturn;\n \t\t} else {\n \t\t\treturn; //just return and don't emit anything\n \t\t}\n \t\t\n \t} else {\n \t\tURLSpout.activeThreads.getAndIncrement(); //isIdle is now 1, hence this thread is not idle\n \tString url = XPathCrawler.getInstance().getFrontier().dequeue();\n \tif(url.startsWith(\"http://\")) {\n \t\tURLInfo urlInfo = new URLInfo(url);\t\n \t\tif(urlInfo.getHostName() == null) {\n \t\t\tURLSpout.activeThreads.decrementAndGet();\n \t\t\treturn;\n \t\t}\n \t\tString portString = \":\" + Integer.toString(urlInfo.getPortNo());\n \t\t\t if(!url.contains(portString)) { //make sure URL is in the form http://xyz.com:80/\n \t\t\t\t StringBuilder newURL = new StringBuilder(url);\n \t \t\t\t int index = 7 + urlInfo.getHostName().length();\n \t \t\t\t newURL.insert(index, portString);\n \t\t\t\t url = newURL.toString();\n \t\t\t }\n \t\t\t \n \t//log.debug(getExecutorId() + \" emitting \" + url);\n \t this.collector.emit(new Values<Object>(urlInfo.getHostName(), url, \"http\"));\n \t \n \t XPathCrawler.getInstance().incrementInflightMessages(); //signals a message is currently being routed\n \t}else {\n \t\ttry {\n\t\t\t\t\tURL httpsUrl = new URL(url); //emit https url\n\t\t\t\t\tint port = httpsUrl.getPort() == -1 ? 443 : httpsUrl.getPort();\n\t\t\t\t\tString portString = \":\" + Integer.toString(port);\n\t\t\t\t\tif(!url.contains(portString)) { //make sure URL is in the form http://xyz.com:443/\n\t \t\t\t\t StringBuilder newURL = new StringBuilder(url);\n\t \t \t\t\t int index = 8 + httpsUrl.getHost().length();\n\t \t \t\t\t newURL.insert(index, portString);\n\t \t\t\t\t url = newURL.toString();\n\t \t\t\t }\n\t\t\t\t\t//log.debug(getExecutorId() + \" emitting \" + url);\n\t \t this.collector.emit(new Values<Object>(httpsUrl.getHost(), url, \"https\"));\n\t \t XPathCrawler.getInstance().incrementInflightMessages(); //signals a message is currently being routed\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tURLSpout.activeThreads.decrementAndGet();\n\t\t\t\t}\n \t\treturn;\n \t}\n \t\n \tURLSpout.activeThreads.decrementAndGet(); //isIdle is now 0 hence this thread is idle\n \t} \t\n Thread.yield();\n }", "public DealwithURL(BlockingQueue<Page> queue){\n\t\tthis.queue = queue;\n\t}", "public WebCrawler(MultithreadedInvertedIndex index, int limit) {\n\t\tthis.index = index;\n\t\tthis.limit = limit;\n\t\tthis.queue = new WorkQueue(limit);\n\t\tthis.urls = new ArrayList<URL>();\n\t}", "public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }", "public void assignPageRanks(double epsilon) {\r\n\t\t// TODO : Add code here\r\n\t\tArrayList<String> vertices=internet.getVertices();\r\n\t\tList<Double> currentRank=Arrays.asList(new Double[vertices.size()]);\r\n\t\tCollections.fill(currentRank,1.0);\r\n\r\n\t\tdo{\r\n\t\t\tfor(int i=0;i<vertices.size();i++){\r\n\t\t\t\tinternet.setPageRank(vertices.get(i),currentRank.get(i));\r\n\t\t\t}\r\n\t\t\tcurrentRank=computeRanks(vertices);\r\n\t\t}while (!stopRank(epsilon,currentRank,vertices));\r\n\r\n\t}", "public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "private int setDownloadActive(List<DownloadLink> possibleLinks) {\r\n DownloadControlInfo dci = null;\r\n int ret = 0;\r\n\r\n int maxDownloads = config.getMaxSimultaneDownloads();\r\n int maxLoops = possibleLinks.size();\r\n\r\n HashMap<String, java.util.List<Account>> accountCache = new HashMap<String, java.util.List<Account>>();\r\n HashMap<String, PluginForHost> pluginCache = new HashMap<String, PluginForHost>();\r\n // java.util.List<DownloadLink> forcedLink = new ArrayList<DownloadLink>(1);\r\n startLoop: while (this.forcedLinksWaiting() || ((getActiveDownloads() < maxDownloads) && maxLoops >= 0)) {\r\n try {\r\n if (!this.newDLStartAllowed(forcedLinksWaiting()) || this.isStopMarkReached()) {\r\n break;\r\n }\r\n // forcedLink.clear();\r\n // synchronized (forcedLinks) {\r\n // if (forcedLinks.size() > 0) {\r\n // /*\r\n // * we remove the first one of forcedLinks list into local array which holds only 1 downloadLink\r\n // */\r\n // forcedLink.add(forcedLinks.removeFirst());\r\n // }\r\n // }\r\n // System.out.println(forcedLink);\r\n if (forcedLinks.size() > 0 || stopAfterForcedLinks) {\r\n /* we try to force the link in forcedLink array */\r\n\r\n ArrayList<DownloadLink> cleanup = new ArrayList<DownloadLink>();\r\n synchronized (forcedLinks) {\r\n // slow...maybe we should integrate this in getNextDownloadLink?\r\n for (DownloadLink dl : forcedLinks) {\r\n if (!dl.getLinkStatus().isStatus(LinkStatus.TODO)) {\r\n cleanup.add(dl);\r\n }\r\n }\r\n forcedLinks.removeAll(cleanup);\r\n dci = this.getNextDownloadLink(forcedLinks, accountCache, pluginCache, true);\r\n\r\n }\r\n if (dci == null) {\r\n break;\r\n }\r\n } else {\r\n /* we try to find next possible normal download */\r\n dci = this.getNextDownloadLink(possibleLinks, accountCache, pluginCache, false);\r\n if (dci == null) {\r\n /* no next possible download found */\r\n break;\r\n }\r\n }\r\n DownloadLink dlLink = dci.link;\r\n if (CaptchaDuringSilentModeAction.SKIP_LINK == CFG_SILENTMODE.CFG.getOnCaptchaDuringSilentModeAction()) {\r\n try {\r\n LazyHostPlugin lazy = HostPluginController.getInstance().get(dci.account.getHoster());\r\n if (lazy != null && lazy.getPrototype(null).hasCaptcha(dlLink, dci.account)) {\r\n dci.link.setSkipReason(SkipReason.CAPTCHA);\r\n continue;\r\n }\r\n } catch (final Throwable e) {\r\n logger.log(e);\r\n }\r\n }\r\n String dlFolder = dlLink.getFilePackage().getDownloadDirectory();\r\n DISKSPACECHECK check = this.checkFreeDiskSpace(new File(dlFolder), (dlLink.getDownloadSize() - dlLink.getDownloadCurrent()));\r\n synchronized (shutdownLock) {\r\n if (!ShutdownController.getInstance().isShutDownRequested()) {\r\n switch (check) {\r\n case OK:\r\n case UNKNOWN:\r\n logger.info(\"Start \" + dci);\r\n this.activateSingleDownloadController(dci);\r\n ret++;\r\n break;\r\n case FAILED:\r\n logger.info(\"Could not start \" + dci + \": not enough diskspace free in \" + dlFolder);\r\n dci.link.setSkipReason(SkipReason.DISK_FULL);\r\n break;\r\n case INVALIDFOLDER:\r\n logger.info(\"Could not start \" + dci + \": invalid downloadfolder->\" + dlFolder);\r\n dci.link.setSkipReason(SkipReason.INVALID_DESTINATION);\r\n break;\r\n }\r\n }\r\n }\r\n } finally {\r\n maxLoops--;\r\n }\r\n }\r\n return ret;\r\n }", "public static void testPersistenceAndPriority() {\n\t\tMap l = new TreeMap();\n\t\tl.put(\"http://www.google.it/\", new Double(1.1));\n\t\tl.put(\"http://www.federicovigna.it/\", new Double(1.4));\n\t\tl.put(\"http://localhost/php/cliniquefitness/\", new Double(1.1));\n\t\tl.put(\"http://www.yahoo.it/\", new Double(0.9));\n\t\t/*\n\t\tDownloader d = new Downloader(new NoDupPersistencePriorityQueue(), 1);\n\t\tlogger.log(Level.INFO,\"TEST testPersistenceAndPriority: All urls must be downloaded in priority sequence\");\n\n\t\t// Listener\n\t\td.addListener(new DebugListener());\n\n\t\td.setFollowRedirect(true);\n\t\td.setMaxSize(2000);\n\t\ttry {\n\t\t\td.addURLs(l);\n\t\t\td.start();\n\t\t\td.waitDone();\n\t\t} catch (LinkDbException e) {\n\t\t\te.printStackTrace();\n\t\t} */\n\t}", "@Override\n\tpublic void search() {\n\t\tpq = new IndexMinPQ<>(graph.getNumberOfStations());\n\t\tpq.insert(startIndex, distTo[startIndex]);\n\t\twhile (!pq.isEmpty()) {\n\t\t\tint v = pq.delMin();\n\t\t\tnodesVisited.add(graph.getStation(v));\n\t\t\tnodesVisitedAmount++;\n\t\t\tfor (Integer vertex : graph.getAdjacentVertices(v)) {\t\n\t\t\t\trelax(graph.getConnection(v, vertex));\n\t\t\t}\n\t\t}\n\t\tpathWeight = distTo[endIndex];\n\t\tpathTo(endIndex);\n\t}", "private void GreedySearch(){\n\n Queue<Node> expanded = new LinkedList<>();\n ArrayList<Node> fringe = new ArrayList<>();\n ArrayList<Node> fringeTemp = new ArrayList<>();\n\n\n Node current = startNode;\n\n while(expanded.size() < 1000){\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal is reached.\n solutionPath(current);\n expanded.add(current);\n printExpanded(expanded);\n System.exit(0);\n }\n\n\n boolean b = cycleCheck(current,expanded);\n\n if(!b) {\n expanded.add(current);\n }\n\n if(!b){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n\n }\n }\n\n if(current.getDigit().last_changed != 1){\n\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n }\n\n\n\n for(Node n : fringe){\n heuristicSetter(n);\n\n }\n\n fringeTemp.addAll(fringe);\n //now all the nodes in fringe have the heuristic value.\n //We can get the last added minm\n Node minm;\n if(fringeTemp.size() != 0){\n minm = fringeTemp.get(0);\n }else{\n break;\n }\n for(int i = 1; i<fringeTemp.size(); i++){\n if(fringeTemp.get(i).getHeuristic() <= minm.getHeuristic()){\n minm = fringeTemp.get(i);\n }\n }\n\n //now we have the minm for the next stage.\n current = minm;\n fringeTemp.remove(minm);\n fringe.clear();\n }\n\n //While loop ends\n System.out.println(\"No solution found.\");\n printExpanded(expanded);\n\n\n\n }", "private Document getPageWithRetries(URL url) throws IOException {\n Document doc;\n int retries = 3;\n while (true) {\n sendUpdate(STATUS.LOADING_RESOURCE, url.toExternalForm());\n LOGGER.info(\"Retrieving \" + url);\n doc = Http.url(url)\n .referrer(this.url)\n .cookies(cookies)\n .get();\n if (doc.toString().contains(\"IP address will be automatically banned\")) {\n if (retries == 0) {\n throw new IOException(\"Hit rate limit and maximum number of retries, giving up\");\n }\n LOGGER.warn(\"Hit rate limit while loading \" + url + \", sleeping for \" + IP_BLOCK_SLEEP_TIME + \"ms, \" + retries + \" retries remaining\");\n retries--;\n try {\n Thread.sleep(IP_BLOCK_SLEEP_TIME);\n } catch (InterruptedException e) {\n throw new IOException(\"Interrupted while waiting for rate limit to subside\");\n }\n }\n else {\n return doc;\n }\n }\n }", "private void e_Neighbours(int u){ \n int edgeDistance = -1; \n int newDistance = -1; \n \n // All the neighbors of v \n for (int i = 0; i < adj.get(u).size(); i++) { \n Node v = adj.get(u).get(i); \n \n // If current node hasn't already been processed \n if (!settled.contains(v.node)) { \n edgeDistance = v.cost; \n newDistance = dist[u] + edgeDistance; \n \n // If new distance is cheaper in cost \n if (newDistance < dist[v.node]) \n dist[v.node] = newDistance; \n \n // Add the current node to the queue \n pq.add(new Node(v.node, dist[v.node])); \n } \n } \n }", "@Test\r\n\tpublic void test_Big_Graph() {\n\t\tweighted_graph g = new WGraph_DS();\r\n\t\tint size = 1000*1000;\r\n\t\tint ten=1;\r\n\t\tfor (int i = 0; i <size; i++) {\r\n\t\t\tg.addNode(i);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i <size; i++) {\r\n\t\t\tint dest=i;\r\n\t\t\tg.connect(size-2, i, 0.23); \r\n\r\n\t\t\tif(i<size-1){\r\n\t\t\t\tg.connect(i,++dest,0.78);\r\n\t\t\t}\r\n\t\t\tif(i%2==0&&i<size-2) {\r\n\t\t\t\tg.connect(i,2+dest,0.94);\r\n\t\t\t}\t\r\n\r\n\t\t\tif(ten==i&&(i%2==0)) {\r\n\t\t\t\tfor (int j =0 ; j <size; j++) {\r\n\t\t\t\t\tg.connect(ten, j,0.56);\r\n\t\t\t\t\tg.connect(ten-2, j, 0.4);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tten=ten*10;\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\r\n\r\n\t\tweighted_graph_algorithms algo = new WGraph_Algo();\r\n\t\talgo.init(g);\r\n\t\tassertTrue(algo.isConnected());\r\n\t\tassertEquals(algo.shortestPathDist(0, 999998),0.23);\r\n\t\tassertEquals(algo.shortestPathDist(0, 8),0.46);\r\n\t\tint expected2 []= {6,999998,8};\r\n\t\tint actual2 [] = new int [3];\r\n\t\tint i=0;\r\n\t\tfor(node_info n :algo.shortestPath(6, 8)) {\r\n\t\t\tactual2[i++]=n.getKey();\r\n\t\t}\r\n\t\tassertArrayEquals(expected2,actual2);\r\n\r\n\t}", "public MaxFlow(final String filename) {\r\n\t\tthis.nodes = new ArrayList<>();\r\n\t\tArrayList<String> nodeNames = new ArrayList<>();\r\n Pattern pattern = Pattern.compile(\"[^->\\\"\\\\[\\\\s]+\");\r\n Matcher matcher;\r\n\r\n\t\ttry{\r\n\t\t\tFileReader fr = new FileReader(filename);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\r\n\t\t\tString currentLine = br.readLine();\r\n\t\t\tboolean finished = false;\r\n\t\t\t//create nodes and edges\r\n\r\n\t\t\twhile(!finished) {\r\n if(currentLine.matches(\".* -> .*\")) {\r\n matcher = pattern.matcher(currentLine);\r\n matcher.find();\r\n String start = matcher.group();\r\n matcher.find();\r\n String end = matcher.group();\r\n int maxFlow = Integer.parseInt(currentLine.substring(currentLine.indexOf(\"\\\"\") + 1, currentLine.indexOf(\"]\") - 1));\r\n\r\n if (!nodeNames.contains(start) && !nodeNames.contains(end)) {\r\n Node startNode = new Node(start, 0);\r\n Node endNode = new Node(end, 0);\r\n Edge connection = new Edge(startNode, endNode, maxFlow, 0);\r\n\r\n startNode.addEdge(connection);\r\n nodeNames.add(start);\r\n nodes.add(startNode);\r\n nodeNames.add(end);\r\n nodes.add(endNode);\r\n } else if (!nodeNames.contains(start) && nodeNames.contains(end)) {\r\n Node startNode = new Node(start, 0);\r\n Node endNode = findNode(end);\r\n Edge connection = new Edge(startNode, endNode, maxFlow, 0);\r\n\r\n startNode.addEdge(connection);\r\n nodeNames.add(start);\r\n nodes.add(startNode);\r\n } else if (nodeNames.contains(start) && !nodeNames.contains(end)) {\r\n Node startNode = findNode(start);\r\n Node endNode = new Node(end, 0);\r\n Edge connection = new Edge(startNode, endNode, maxFlow, 0);\r\n\r\n startNode.addEdge(connection);\r\n nodeNames.add(end);\r\n nodes.add(endNode);\r\n } else {\r\n Node startNode = findNode(start);\r\n Node endNode = findNode(end);\r\n Edge connection = new Edge(startNode, endNode, maxFlow, 0);\r\n startNode.addEdge(connection);\r\n }\r\n }\r\n currentLine = br.readLine();\r\n if (currentLine == null)\r\n finished = true;\r\n\r\n }\r\n this.pathfinder = new Navigation(nodes);\r\n\r\n\t\t} catch (IOException e){e.printStackTrace();}\r\n\t}", "public void flowAlgorithm(){\n while(!augmentedPath()){\n ArrayList<Integer> flowList = new ArrayList<>();//this is here just so we can print out the path\n int minFlow = 10000;\n int currentID = t;\n GraphNode node = graphNode[currentID];\n //very simply this part will start at the last node and go back through the path that was selected and fin the minimum flow\n flowList.add(t);\n while(node != graphNode[s]){\n int parent = node.parent;\n flowList.add(parent);\n if(graph.flow[parent][currentID][1] < minFlow){\n minFlow = graph.flow[parent][currentID][1];\n }\n node = graphNode[parent];\n currentID = parent;\n }\n currentID = t;//should this be here\n displayMaxFlow(flowList, minFlow);\n node = graphNode[t];\n //this will go back through the same list as the one up above and change their current value\n while(node != graphNode[s]){\n int parent = node.parent;\n graph.flow[parent][currentID][1] = graph.flow[parent][currentID][1] - minFlow;\n node = graphNode[parent];\n currentID = parent;\n }\n }\n }", "private int searchNext(JmtCell prev) {\r\n \t\tRectangle boundspadre = GraphConstants.getBounds((prev).getAttributes()).getBounds();\r\n \t\tObject[] listEdges = null;\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \t\tList<Object> next = new ArrayList<Object>();\r\n \r\n \t\tif (flag1 == false && prev.seen == false) {\r\n \r\n \t\t\t// Rectangle bounds =\r\n \t\t\t// GraphConstants.getBounds(((JmtCell)prev).getAttributes()).getBounds();\r\n \t\t\tif (!flag2) {\r\n \t\t\t\tboundspadre.setLocation(x, y + ((e + 1) * (42 + heightMax)) - (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t} else {\r\n \t\t\t\tboundspadre.setLocation(x - (int) (boundspadre.getWidth() / 2), y + ((e + 1) * (42 + heightMax))\r\n \t\t\t\t\t\t- (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t}\r\n \r\n \t\t\tGraphConstants.setBounds(prev.getAttributes(), boundspadre);\r\n \t\t\tx = (int) boundspadre.getCenterX() + widthMax + 50;\r\n \t\t\tprev.seen = true;\r\n \t\t\tflag2 = true;\r\n \t\t}\r\n \r\n \t\t// inserisco tutti gli archi uscenti e entranti di min.get(j) in\r\n \t\t// listEdges\r\n \t\tlistEdges = DefaultGraphModel.getOutgoingEdges(graphmodel, prev);\r\n \t\tVector<Object> listEdgestmp = new Vector<Object>();\r\n \t\tfor (Object listEdge : listEdges) {\r\n \t\t\tJmtCell qq = (JmtCell) (graphmodel.getParent(graphmodel.getTarget(listEdge)));\r\n \t\t\tif (!(qq).seen) {\r\n \t\t\t\tlistEdgestmp.add(listEdge);\r\n \t\t\t}\r\n \t\t}\r\n \t\tlistEdges = listEdgestmp.toArray();\r\n \r\n \t\tint numTarget = listEdges.length;\r\n \t\tif (numTarget == 0) {\r\n \t\t\treturn 1;\r\n \t\t}\r\n \r\n \t\tfor (int k = 0; k < numTarget; k++) {\r\n \t\t\tnext.add((graphmodel.getParent(graphmodel.getTarget(listEdges[k]))));\r\n \t\t}\r\n \r\n \t\tint j = 1;\r\n \t\tif (inRepositionSons == false && ((JmtCell) next.get(0)).seen == false) {\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t} else if (inRepositionSons == true && ((JmtCell) next.get(0)).seen == false) {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(((JmtCell) next.get(0)).getAttributes()).getBounds();\r\n \t\t\tbounds.setLocation((int) (boundspadre.getCenterX()) + widthMax + 50 - (int) (bounds.getWidth() / 2), (int) boundspadre.getCenterY()\r\n \t\t\t\t\t- (int) (bounds.getHeight() / 2));\r\n \t\t\tGraphConstants.setBounds(((JmtCell) next.get(0)).getAttributes(), bounds);\r\n \r\n \t\t\t((JmtCell) next.get(0)).seen = true;\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t}\r\n \r\n \t\tif (numTarget > 0) {\r\n \t\t\tif (!flag) {\r\n \t\t\t\trepositionSons(prev, next, j - 1, 1);\r\n \t\t\t} else {\r\n \t\t\t\trepositionSons(prev, next, -1, 0);\r\n \t\t\t}\r\n \t\t\tflag = false;\r\n \t\t}\r\n \r\n \t\t(prev).sons = 0;\r\n \t\tfor (int w = 0; w < numTarget; w++) {\r\n \t\t\tprev.sons += ((JmtCell) next.get(w)).sons;\r\n \t\t}\r\n \r\n \t\treturn prev.sons;\r\n \t}", "@Override\n protected KPMPSolution nextNeighbour() {\n List<KPMPSolutionWriter.PageEntry> edgePartition = bestSolution.getEdgePartition().stream().map(KPMPSolutionWriter.PageEntry::clone).collect(toCollection(ArrayList::new));\n KPMPSolution neighbourSolution = new KPMPSolution(bestSolution.getSpineOrder(), edgePartition, bestSolution.getNumberOfPages());\n edge = edgePartition.get(index);\n originalPageIndex = edge.page;\n newPageIndex = pageCounter;\n edgePartition.get(index).page = newPageIndex;\n index++;\n numberOfIterations++;\n return neighbourSolution;\n }", "@Override\n public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {\n Log.v(\"WVClient.onReceiveError\", \" receieved an error\" + error);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n onSendUpdate(\"WVClient has received an error!\");\n }\n });\n\n //do what would be done in processHTML but avoid anything to do with scraping, move onto next page\n crawlComplete = false;\n\n if (masterEmailSet.size() > 20){\n //if more than twenty emails have been discovered, the crawl is done\n crawlComplete = true;\n }\n\n if (masterEmailSet.size() > 0 && !searchTerm.equals(\"\")){\n //if at least one email with the search term has been found, crawl is done\n crawlComplete = true;\n }\n\n\n if (collectedLinks.iterator().hasNext() && !crawlComplete){\n //if there's another link and crawl isn't deemed complete, hit next URL\n browser.post(new Runnable() {\n @Override\n public void run() {\n Log.v(\"processHTML\", \" loading page on browser:\" + collectedLinks.iterator().next());\n visitedLinks.add(collectedLinks.iterator().next());\n browser.loadUrl(collectedLinks.iterator().next());\n }\n });\n }\n }", "public String crawl() throws IOException {\n // FILL THIS IN!\n if(queue.isEmpty()){\n \treturn null;\n }\n String url = queue.remove();\n \tSystem.out.println(\"crawling \"+url);\n Elements paragraphs;\n \tif(index.isIndexed(url))\n \t{\n \t\tSystem.out.println(url+\" is already indexed\");\n \t\treturn null;\n \t}\n \tparagraphs = wf.fetchWikipedia(url);\n index.indexPage(url,paragraphs);\n queueInternalLinks(paragraphs);\t \n\t\treturn url;\n\t}", "public abstract boolean isNextVisited();", "void parseline(){\n\t\ttry {\n\t\tString currentLine;\n\t\tBufferedReader freader = new BufferedReader(new FileReader(\"C:\\\\wt2g_inlinks.txt\")); //default to dataset\n\t//\tBufferedReader freader = new BufferedReader(new FileReader(\"C:\\\\inlink.txt\")); // Use this for Graph \n\t\tSet<String> ar ;\n\t\t\twhile((currentLine= freader.readLine()) != null){ \n\t\t\t\tSet<String> in_data = new HashSet<>();\n\t\t\t\tStringTokenizer st = new StringTokenizer(currentLine,\" \");\n\t\t\t\tString node = st.nextToken();\n\t\t\t\tif(!inlinks.containsKey(node)){\n\t\t\t\t\tinlinks.put(node, null); // All the nodes are stored in inlinks Map\n\t\t\t\t}\n\t\t\t\t\twhile(st.hasMoreTokens()){\n\t\t\t\t\t\tString edge = st.nextToken();\n\t\t\t\t\t if(!inlinks.containsKey(edge)){\n\t\t\t\t\t \tinlinks.put(edge, null);\n\t\t\t\t\t } \n\t\t\t\t\t if(inlinks.get(node)!=null){\n\t\t\t\t\t \tSet B = inlinks.get(node);\n\t\t\t\t\t \tB.add(edge);\n\t\t\t\t\t \tinlinks.put(node, B);\n\t\t\t\t\t }\n\t\t\t\t\t else{\n\t\t\t\t\t in_data.add(edge);\n\t\t\t\t\t inlinks.put(node, in_data);\n\t\t\t\t\t }\t\t\t\t\t \n\t\t\t\t\t if(!(outlinks.containsKey(edge))){ //Creating the outlinks Map \n\t\t\t\t\t\t Set<String > nd = new HashSet<>();\n\t\t\t\t\t\t nd.add(node);\n\t\t\t\t\t outlinks.put(edge, nd);\n\t\t\t\t\t }\t\n\t\t\t\t\t else{\n\t\t\t\t\t\t ar = outlinks.get(edge);\n\t\t\t\t\t\t ar.add(node);\n\t\t\t\t\t\t outlinks.put(edge, ar);\n\t\t\t\t\t }\n\t\t\t\t\t}\n \t\t\t\t \n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t }\n\t\t\n\t\tSystem.out.println(\"Total Nodes : \" +inlinks.size());\n\t\t\n for(String str : inlinks.keySet()){\n \tSet s1 = inlinks.get(str);\n \tif(s1 != null)\n \tinlinks_count.put(str, s1.size());\n \telse\n \t\tsource++;\n }\n System.out.println(\"Total Source \" +source);\n \n for(String str : outlinks.keySet()){\n \tSet s1 = outlinks.get(str);\n \toutlinks_count.put(str, s1.size());\n }\n\t}", "public void minCut(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n setNodesToUnvisited();\n queue.add(graphNode[0]);\n graphNode[0].visited = true;\n while(!queue.isEmpty()){//if queue is empty it means that we have made all the cuts that need to be cut and we cant get anywhere else\n GraphNode node = queue.get();\n int from = node.nodeID;\n for(int i = 0; i < node.succ.size(); i++){//get the successor of each node and then checks each of the edges between the node and that successor\n GraphNode.EdgeInfo info = node.succ.get(i);\n int to = info.to;\n if(graph.flow[from][to][1] == 0){//if it has no flow then it prints out that line\n System.out.printf(\"Edge (%d, %d) transports %d cases\\n\", from, to, graph.flow[from][to][0]);\n } else {//adds it to the queue if it still has flow to it and if we haven't gone there yet\n if(!graphNode[to].visited){\n graphNode[to].visited = true;\n queue.add(graphNode[to]);\n }\n }\n }\n }\n }", "private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }", "private void buildLinks() {\n ArrayDeque<Node> nodeQueue = new ArrayDeque<>();\n //Failure Rule 1: root has no failure link\n //Failure Rule 2: nodes one layer deeper than root have failure links pointing to root\n //Note: all root and depth 1 nodes have null dictionary links, so no work to be done there\n for (Edge e : root.edges.values()) {\n Node current = e.getTo();\n current.setFailureLink(root);\n for (Edge edge : current.edges.values())\n nodeQueue.add(edge.getTo());\n }\n //BFS while applying other rules\n while (!nodeQueue.isEmpty()) {\n Node current = nodeQueue.pollFirst();\n //First: find current's failure link node\n Node linked = current.getEdgeIn().getFrom().getFailureLink();\n while (true) {\n if (linked.hasEdge(current.getEdgeIn().getChar())) {\n //Failure Rule 3: if linked has a edge and node corresponding to current's edgeIn character,\n //link current to that node\n current.setFailureLink(linked.getEdge(current.getEdgeIn().getChar()).getTo());\n break;\n } else if (root == linked) {\n //Failure Rule 4: if linked is root and doesn't satisfy rule 3, current is linked to root\n current.setFailureLink(root);\n break;\n } else\n //Failure Rule 5: update linked and repeat until rule 3 or 4 applies\n linked = linked.getFailureLink();\n }\n //Second: use the failure link to find current's dictionaryLink\n Node currentLink = current.getFailureLink();\n if (currentLink.isWordEnd()) {\n //Dictionary Rule 1: if the failure link corresponds to a word, set current's dictionary link to it\n current.setDictionaryLink(currentLink);\n } else {\n //Dictionary Rule 2: if rule 1 doesn't apply, set current's DL to it's failure link's DL.\n current.setDictionaryLink(currentLink.getDictionaryLink());\n }\n //Third: add next layer of nodes into queue to continue BFS\n for (Edge e : current.edges.values())\n nodeQueue.add(e.getTo());\n }\n }", "@Override\n\tpublic void run() {\n\t\tMap<Integer, Integer> roots = new TreeMap<Integer, Integer>();\n\t\t\n\t\tEdge[] edges = new Edge[this.edges.length];\n\t\tint n, weight, relevantEdges, root, lowerBound = 0;\n\t\n\t\t// Sort edges by weight.\n\t\tquickSort(0, this.edges.length - 1);\n\t\n\t\t// Compute initial lower bound (best k - 1 edges).\n\t\t// Choosing the cheapest k - 1 edges is not very intelligent. There is no guarantee\n\t\t// that this subset of edges even induces a subgraph over the initial graph.\n\t\t// TODO: Find a better initial lower bound.\n\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\tlowerBound += this.edges[i].weight;\n\t\t}\n\t\n\t\t// Iterate over all nodes in the graph and run Prim's algorithm\n\t\t// until k - 1 edges are fixed.\n\t\t// As all induced subgraphs have k nodes and are connected according to Prim, they\n\t\t// are candidate solutions and thus submitted.\n\t\tfor (root = 0; root < taken.length; root++) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\n\t\t\ttaken[root] = true;\n\t\t\tn = 0;\n\t\t\tweight = 0;\n\t\t\trelevantEdges = this.edges.length;\n\n\t\t\twhile (n < solution.length) { \n\t\t\t\tfor (int i = 0; i < relevantEdges; i++) {\n\t\t\t\t\t// XOR to check if connected and no circle.\n\t\t\t\t\tif (taken[edges[i].node1] ^ taken[edges[i].node2]) {\n\t\t\t\t\t\ttaken[taken[edges[i].node1] ? edges[i].node2 : edges[i].node1] = true;\n\t\t\t\t\t\tsolution[n++] = edges[i];\n\t\t\t\t\t\tweight += edges[i].weight;\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Check for circle.\n\t\t\t\t\telse if (taken[edges[i].node1]) {\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sum up what we've just collected and submit this\n\t\t\t// solution to the framework.\n\t\t\tHashSet<Edge> set = new HashSet<Edge>(solution.length);\n\t\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\t\tset.add(solution[i]);\n\t\t\t}\n\t\t\tsetSolution(weight, set);\n\t\t\troots.put(weight, root);\n\t\t}\n\n\t\t// Now for the real business, let's do some Branch-and-Bound. Roots of \"k Prim Spanning Trees\"\n\t\t// are enumerated by weight to increase our chances to obtain the kMST earlier.\n\t\tfor (int item : roots.values()) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\t\t\ttaken[item] = true;\n\t\t\tbranchAndBound(edges, solution.length, 0, lowerBound);\n\t\t}\n\t}", "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 List<Graph> search() {\n\n long start = System.currentTimeMillis();\n TetradLogger.getInstance().log(\"info\", \"Starting ION Search.\");\n logGraphs(\"\\nInitial Pags: \", this.input);\n TetradLogger.getInstance().log(\"info\", \"Transfering local information.\");\n long steps = System.currentTimeMillis();\n\n /*\n * Step 1 - Create the empty graph\n */\n List<Node> varNodes = new ArrayList<>();\n for (String varName : variables) {\n varNodes.add(new GraphNode(varName));\n }\n Graph graph = new EdgeListGraph(varNodes);\n\n /*\n * Step 2 - Transfer local information from the PAGs (adjacencies\n * and edge orientations)\n */\n // transfers edges from each graph and finds definite noncolliders\n transferLocal(graph);\n // adds edges for variables never jointly measured\n for (NodePair pair : nonIntersection(graph)) {\n graph.addEdge(new Edge(pair.getFirst(), pair.getSecond(), Endpoint.CIRCLE, Endpoint.CIRCLE));\n }\n TetradLogger.getInstance().log(\"info\", \"Steps 1-2: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n System.out.println(\"step2\");\n System.out.println(graph);\n\n /*\n * Step 3\n *\n * Branch and prune step that blocks problematic undirectedPaths, possibly d-connecting undirectedPaths\n */\n steps = System.currentTimeMillis();\n Queue<Graph> searchPags = new LinkedList<>();\n // place graph constructed in step 2 into the queue\n searchPags.offer(graph);\n // get d-separations and d-connections\n List<Set<IonIndependenceFacts>> sepAndAssoc = findSepAndAssoc(graph);\n this.separations = sepAndAssoc.get(0);\n this.associations = sepAndAssoc.get(1);\n Map<Collection<Node>, List<PossibleDConnectingPath>> paths;\n// Queue<Graph> step3PagsSet = new LinkedList<Graph>();\n HashSet<Graph> step3PagsSet = new HashSet<>();\n Set<Graph> reject = new HashSet<>();\n // if no d-separations, nothing left to search\n if (separations.isEmpty()) {\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(graph);\n step3PagsSet.add(graph);\n }\n // sets length to iterate once if search over path lengths not enabled, otherwise set to 2\n int numNodes = graph.getNumNodes();\n int pl = numNodes - 1;\n if (pathLengthSearch) {\n pl = 2;\n }\n // iterates over path length, then adjacencies\n for (int l = pl; l < numNodes; l++) {\n if (pathLengthSearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path lengths: \" + l + \" of \" + (numNodes - 1));\n }\n int seps = separations.size();\n int currentSep = 1;\n int numAdjacencies = separations.size();\n for (IonIndependenceFacts fact : separations) {\n if (adjacencySearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path nonadjacencies: \" + currentSep + \" of \" + numAdjacencies);\n }\n seps--;\n // uses two queues to keep up with which PAGs are being iterated and which have been\n // accepted to be iterated over in the next iteration of the above for loop\n searchPags.addAll(step3PagsSet);\n recGraphs.add(searchPags.size());\n step3PagsSet.clear();\n while (!searchPags.isEmpty()) {\n System.out.println(\"ION Step 3 size: \" + searchPags.size());\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n // deques first PAG from searchPags\n Graph pag = searchPags.poll();\n // Part 3.a - finds possibly d-connecting undirectedPaths between each pair of nodes\n // known to be d-separated\n List<PossibleDConnectingPath> dConnections = new ArrayList<>();\n // checks to see if looping over adjacencies\n if (adjacencySearch) {\n for (Collection<Node> conditions : fact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, fact.getX(), fact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, fact.getX(), fact.getY(), conditions));\n }\n }\n } else {\n for (IonIndependenceFacts allfact : separations) {\n for (Collection<Node> conditions : allfact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, allfact.getX(), allfact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, allfact.getX(), allfact.getY(), conditions));\n }\n }\n }\n }\n // accept PAG go to next PAG if no possibly d-connecting undirectedPaths\n if (dConnections.isEmpty()) {\n// doFinalOrientation(pag);\n// Graph p = screenForKnowledge(pag);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(pag);\n continue;\n }\n // maps conditioning sets to list of possibly d-connecting undirectedPaths\n paths = new HashMap<>();\n for (PossibleDConnectingPath path : dConnections) {\n List<PossibleDConnectingPath> p = paths.get(path.getConditions());\n if (p == null) {\n p = new LinkedList<>();\n }\n p.add(path);\n paths.put(path.getConditions(), p);\n }\n // Part 3.b - finds minimal graphical changes to block possibly d-connecting undirectedPaths\n List<Set<GraphChange>> possibleChanges = new ArrayList<>();\n for (Set<GraphChange> changes : findChanges(paths)) {\n Set<GraphChange> newChanges = new HashSet<>();\n for (GraphChange gc : changes) {\n boolean okay = true;\n for (Triple collider : gc.getColliders()) {\n\n if (pag.isUnderlineTriple(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n\n }\n if (!okay) {\n continue;\n }\n for (Triple collider : gc.getNoncolliders()) {\n if (pag.isDefCollider(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n }\n if (okay) {\n newChanges.add(gc);\n }\n }\n if (!newChanges.isEmpty()) {\n possibleChanges.add(newChanges);\n } else {\n possibleChanges.clear();\n break;\n }\n }\n float starthitset = System.currentTimeMillis();\n Collection<GraphChange> hittingSets = IonHittingSet.findHittingSet(possibleChanges);\n recHitTimes.add((System.currentTimeMillis() - starthitset) / 1000.);\n // Part 3.c - checks the newly constructed graphs from 3.b and rejects those that\n // cycles or produce independencies known not to occur from the input PAGs or\n // include undirectedPaths from definite nonancestors\n for (GraphChange gc : hittingSets) {\n boolean badhittingset = false;\n for (Edge edge : gc.getRemoves()) {\n Node node1 = edge.getNode1();\n Node node2 = edge.getNode2();\n Set<Triple> triples = new HashSet<>();\n triples.addAll(gc.getColliders());\n triples.addAll(gc.getNoncolliders());\n if (triples.size() != (gc.getColliders().size() + gc.getNoncolliders().size())) {\n badhittingset = true;\n break;\n }\n for (Triple triple : triples) {\n if (node1.equals(triple.getY())) {\n if (node2.equals(triple.getX()) ||\n node2.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n if (node2.equals(triple.getY())) {\n if (node1.equals(triple.getX()) ||\n node1.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n }\n if (badhittingset) {\n break;\n }\n for (NodePair pair : gc.getOrients()) {\n if ((node1.equals(pair.getFirst()) && node2.equals(pair.getSecond())) ||\n (node2.equals(pair.getFirst()) && node1.equals(pair.getSecond()))) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (!badhittingset) {\n for (NodePair pair : gc.getOrients()) {\n for (Triple triple : gc.getNoncolliders()) {\n if (pair.getSecond().equals(triple.getY())) {\n if (pair.getFirst().equals(triple.getX()) &&\n pag.getEndpoint(triple.getZ(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n\n }\n if (pair.getFirst().equals(triple.getZ()) &&\n pag.getEndpoint(triple.getX(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n }\n if (badhittingset) {\n continue;\n }\n Graph changed = gc.applyTo(pag);\n // if graph change has already been rejected move on to next graph\n if (reject.contains(changed)) {\n continue;\n }\n // if graph change has already been accepted move on to next graph\n if (step3PagsSet.contains(changed)) {\n continue;\n }\n // reject if null, predicts false independencies or has cycle\n if (predictsFalseIndependence(associations, changed)\n || changed.existsDirectedCycle()) {\n reject.add(changed);\n }\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(changed);\n // now add graph to queue\n\n// Graph p = screenForKnowledge(changed);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(changed);\n }\n }\n // exits loop if not looping over adjacencies\n if (!adjacencySearch) {\n break;\n }\n }\n }\n TetradLogger.getInstance().log(\"info\", \"Step 3: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n Queue<Graph> step3Pags = new LinkedList<>(step3PagsSet);\n\n /*\n * Step 4\n *\n * Finds redundant undirectedPaths and uses this information to expand the list\n * of possible graphs\n */\n steps = System.currentTimeMillis();\n Map<Edge, Boolean> necEdges;\n Set<Graph> outputPags = new HashSet<>();\n\n while (!step3Pags.isEmpty()) {\n Graph pag = step3Pags.poll();\n necEdges = new HashMap<>();\n // Step 4.a - if x and y are known to be unconditionally associated and there is\n // exactly one trek between them, mark each edge on that trek as necessary and\n // make the tiples on the trek definite noncolliders\n // initially mark each edge as not necessary\n for (Edge edge : pag.getEdges()) {\n necEdges.put(edge, false);\n }\n // look for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n List<List<Node>> treks = treks(pag, fact.x, fact.y);\n if (treks.size() == 1) {\n List<Node> trek = treks.get(0);\n List<Triple> triples = new ArrayList<>();\n for (int i = 1; i < trek.size(); i++) {\n // marks each edge in trek as necessary\n necEdges.put(pag.getEdge(trek.get(i - 1), trek.get(i)), true);\n if (i == 1) {\n continue;\n }\n // makes each triple a noncollider\n pag.addUnderlineTriple(trek.get(i - 2), trek.get(i - 1), trek.get(i));\n }\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // Part 4.b - branches by generating graphs for every combination of removing\n // redundant undirectedPaths\n boolean elimTreks;\n // checks to see if removing redundant undirectedPaths eliminates every trek between\n // two variables known to be nconditionally assoicated\n List<Graph> possRemovePags = possRemove(pag, necEdges);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n for (Graph newPag : possRemovePags) {\n elimTreks = false;\n // looks for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n if (treks(newPag, fact.x, fact.y).isEmpty()) {\n elimTreks = true;\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // add new PAG to output unless a necessary trek has been eliminated\n if (!elimTreks) {\n outputPags.add(newPag);\n }\n }\n }\n outputPags = removeMoreSpecific(outputPags);\n// outputPags = applyKnowledge(outputPags);\n\n TetradLogger.getInstance().log(\"info\", \"Step 4: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n\n /*\n * Step 5\n *\n * Generate the Markov equivalence classes for graphs and accept only\n * those that do not predict false d-separations\n */\n steps = System.currentTimeMillis();\n Set<Graph> outputSet = new HashSet<>();\n for (Graph pag : outputPags) {\n Set<Triple> unshieldedPossibleColliders = new HashSet<>();\n for (Triple triple : getPossibleTriples(pag)) {\n if (!pag.isAdjacentTo(triple.getX(), triple.getZ())) {\n unshieldedPossibleColliders.add(triple);\n }\n }\n\n PowerSet<Triple> pset = new PowerSet<>(unshieldedPossibleColliders);\n for (Set<Triple> set : pset) {\n Graph newGraph = new EdgeListGraph(pag);\n for (Triple triple : set) {\n newGraph.setEndpoint(triple.getX(), triple.getY(), Endpoint.ARROW);\n newGraph.setEndpoint(triple.getZ(), triple.getY(), Endpoint.ARROW);\n }\n doFinalOrientation(newGraph);\n }\n for (Graph outputPag : finalResult) {\n if (!predictsFalseIndependence(associations, outputPag)) {\n Set<Triple> underlineTriples = new HashSet<>(outputPag.getUnderLines());\n for (Triple triple : underlineTriples) {\n outputPag.removeUnderlineTriple(triple.getX(), triple.getY(), triple.getZ());\n }\n outputSet.add(outputPag);\n }\n }\n }\n\n// outputSet = applyKnowledge(outputSet);\n outputSet = checkPaths(outputSet);\n\n output.addAll(outputSet);\n TetradLogger.getInstance().log(\"info\", \"Step 5: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n runtime = ((System.currentTimeMillis() - start) / 1000.);\n logGraphs(\"\\nReturning output (\" + output.size() + \" Graphs):\", output);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n return output;\n }", "protected abstract boolean sendNextRequests();", "void seek(String url) {\n if (url == null) {\n throw new ShouldNotHappenException(\"url is null.\");\n }\n if (StringUtil.compareToNullHigh(peekUrl(), url) > 0) {\n throw new ShouldNotHappenException(\"Current URL is \"+\n\t\t\t\t\t peekUrl()+\", past \"+url);\n }\n for (Entry e : participantsList) {\n participantsQueue.remove(e);\n // todo(bhayes): Change VoteBlockIterator to support a \"seek\"\n // operation.\n\n // VoteBlocks.getVoteBlock(url) has [unused] code trying to do\n // something similar. It creates a VoteBlocksIterator, and\n // iterates over the whole VoteBlocks, [ignoring that it should\n // already be in URL order] looking for a VoteBlock with the\n // given URL, and returns that block. What we could use is a\n // method VoteBlocksIterator.seek(url) that fast-forwards to\n // the right place. But we don't want to just get the VoteBlock,\n // we want to advance the iterator.\n // \n while (StringUtil.compareToNullHigh(e.getUrl(), url) < 0) {\n\te.nextVoteBlock();\n }\n participantsQueue.add(e);\n }\n // NOTE: Since the voters' iterators may not read from disk the\n // same as in the initial poll, some or all of the voters which\n // had the URL in the initial poll may deny having it now.\n // peekUrl() may not equal url.\n if (StringUtil.compareToNullHigh(peekUrl(), url) < 0) {\n throw new ShouldNotHappenException(\"Current URL is \"+\n\t\t\t\t\t peekUrl()+\", before \"+url);\n }\n }", "@Override\n protected String doInBackground(String... urls) {\n StringBuilder sb = new StringBuilder();\n StringBuilder sbCount = new StringBuilder();\n HttpURLConnection urlConnection = null;\n InputStream inputStream;\n try {\n URL url = new URL(urls[0]);\n URL urlCount = new URL(String.format(URL, url));\n\n // Open connection\n urlConnection = (HttpURLConnection) urlCount.openConnection();\n urlConnection.setChunkedStreamingMode(0);\n\n inputStream = new BufferedInputStream(urlConnection.getInputStream());\n if (inputStream != null){\n BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));\n String line = null;\n\n // Read Server Response\n while((line = br.readLine()) != null){\n // Append server response in string\n sbCount.append(line + \"\");\n }\n }\n String str = sbCount.toString();\n int count = Integer.parseInt(str);\n if(count<50){\n // Open connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setChunkedStreamingMode(0);\n \n inputStream = new BufferedInputStream(urlConnection.getInputStream());\n if (inputStream != null){\n BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));\n String line = null;\n \n // Read Server Response\n while((line = br.readLine()) != null){\n // Append server response in string\n sb.append(line + \"\");\n }\n }\n }else{\n return null;\n }\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }finally{\n if (urlConnection!=null){\n urlConnection.disconnect();\n }\n }\n return sb.toString();\n }", "public void visit(String url) {\n current.next = new Node(url);\n current.next.previous = current;\n\n current = current.next;\n }", "public WebCrawler(String urlSeed) {\n\t\t\n\n\t\t\n\t\tconnection = db.openConnection();\n\n\t\t\ttry {\n\t\t\t\tthis.urlSeed = new URL(urlSeed);\n\t\t\t} catch(MalformedURLException ex) {\n\t\t\t\tlog.error(\"please input the right url with protocol part!\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tworkers = new WorkQueue(10);\n\t\t\tthis.count = 0;\n\t\t\tthis.pending = 0;\n\t\t\turlList = new ArrayList<String>();\n\t\t\t//index = new InvertedIndex();\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\tthis.HTMLFetcher();\n\t\t\tlong end = System.currentTimeMillis();\n\t\t\tlog.info(\"Running time for htmlFetcher: \" + (end - start));\n\t\t\tList<String> suggestedQuery = index.getSuggestedQuery();\n\t\t\tdb.updateSuggestedQuery(connection, suggestedQuery);\n\t\t\tdb.closeConnection(connection);\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 WebCrawler(final URL startURL) {\n this.baseUrl = startURL.toString();\n this.links = new HashSet<>();\n this.startTime = System.currentTimeMillis();\n depth = 0;\n pagesVisited = 0;\n crawl(initURLS(startURL));\n try {\n goThroughLinks();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public Dijkstra(Graph graph, int firstVertexPortNum)\n {\n this.graph = graph;\n Set<String> vertexKeys = this.graph.vertexKeys();\n \n this.initialVertexPortNum = firstVertexPortNum;\n this.predecessors = new HashMap<String, String>();\n this.distances = new HashMap<String, Integer>();\n this.availableVertices = new PriorityQueue<Vertex>(vertexKeys.size(), new Comparator<Vertex>()\n {\n // compare weights of these two vertices.\n public int compare(Vertex v1, Vertex v2)\n {\n \t// errors are here.\n int weightOne = Dijkstra.this.distances.get(v1.convertToString(v1.getVertexPortNum())); // distances stored by portnum in string form.\n int weightTwo = Dijkstra.this.distances.get(v2.convertToString(v2.getVertexPortNum())); // distances stored by portnum in string form.\n return weightOne - weightTwo; // return the modified weight of the two vertices.\n }\n });\n \n this.visitedVertices = new HashSet<Vertex>();\n \n // for each Vertex in the graph\n for(String key: vertexKeys)\n {\n this.predecessors.put(key, null);\n this.distances.put(key, Integer.MAX_VALUE); // assuming that the distance of this is infinity.\n }\n \n \n //the distance from the initial vertex to itself is 0\n this.distances.put(convertToString(initialVertexPortNum), 0); \n \n //and seed initialVertex's neighbors\n Vertex initialVertex = this.graph.getVertex(convertToString(initialVertexPortNum)); // converted portnum to String to make this work.\n ArrayList<Edge> initialVertexNeighbors = initialVertex.getSquad();\n for(Edge e : initialVertexNeighbors)\n {\n Vertex other = e.getNeighbor(initialVertex);\n this.predecessors.put(convertToString(other.getVertexPortNum()), convertToString(initialVertexPortNum));\n this.distances.put(convertToString(other.getVertexPortNum()), e.getWeight()); // converted portnum to String to make this work.\n this.availableVertices.add(other); // add to available vertices.\n }\n \n this.visitedVertices.add(initialVertex); // add to list of visited vertices.\n \n // apply Dijkstra's algorithm to the overlay.\n processOverlay();\n \n }", "private static BigInteger connectedGraphs(\n final int v, final int e) {\n if (v == 0) {\n return ZERO;\n }\n if (v == 1) {\n // Fast exit #1: single-vertex\n return e == 0 ? ONE : ZERO;\n }\n final int allE = v * (v - 1) >> 1;\n if (e == allE) {\n // Fast exit #2: complete graph (the only result)\n return ONE;\n }\n final int key = v << 16 | e;\n if (CONN_GRAPHS_CACHE.containsKey(key)) {\n return CONN_GRAPHS_CACHE.get(key);\n }\n BigInteger result;\n if (e == v - 1) {\n // Fast exit #3: trees -> apply Cayley's formula\n result = BigInteger.valueOf(v).pow(v - 2);\n } else if (e > allE - (v - 1)) {\n // Fast exit #4: e > edges required to build a (v-1)-vertex\n // complete graph -> will definitely form connected graphs\n // in all cases, so just calculate allGraphs()\n result = allGraphs(v, e);\n } else {\n /*\n * In all other cases, we'll have to remove\n * partially-connected graphs from all graphs.\n *\n * We can define a partially-connected graph as a graph\n * with 2 sub-graphs A and B with no edges between them.\n * In addition, we require one of the sub-graphs (say, A)\n * to hold the following properties:\n * 1. A must be connected: this implies that the number\n * of possible patterns for A could be counted\n * by calling connectedGraphs().\n * 2. A must contain at least one fixed vertex:\n * this property - combined with 1. -\n * implies that A would not be over-counted.\n *\n * Under the definitions above, the number of\n * partially-connected graphs to be removed will be:\n *\n * (Combinations of vertices to be added from B to A) *\n * (number of possible A's, by connectedGraphs()) *\n * (number of possible B's, by allGraphs())\n * added up iteratively through v - 1 vertices\n * (one must be fixed in A) and all possible distributions\n * of the e edges through A and B\n */\n result = allGraphs(v, e);\n for (int vA = 1; vA < v; vA++) {\n // Combinations of vertices to be added from B to A\n final BigInteger aComb = nChooseR(v - 1, vA - 1);\n final int allEA = vA * (vA - 1) >> 1;\n // Maximum number of edges which could be added to A\n final int maxEA = allEA < e ? allEA : e;\n for (int eA = vA - 1; eA < maxEA + 1; eA++) {\n result = result.subtract(aComb\n // Number of possible A's\n .multiply(connectedGraphs(vA, eA))\n // Number of possible B's\n .multiply(allGraphs(v - vA, e - eA)));\n }\n }\n }\n CONN_GRAPHS_CACHE.put(key, result);\n return result;\n }", "private void updateNumVisits(String url)\r\n\t{\r\n\t\tfor(int i = 0; i < siteVisited; i++)\r\n\t\t{\r\n\t\t\tif (webVisited[0][i].equals(url))\t\t\t\t\t\t\t\t\t//if the url is found in the array\r\n\t\t\t{\r\n\t\t\t\twebVisited[1][i] = (int)webVisited[1][i] + 1;\t\t\t\t\t//increment the number of times user visited the site\r\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//break out of the loop\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void getWebUrl()\r\n\t{\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tString url =\" \";\r\n\t\t\r\n\t\t//prompt user for the URL\r\n\t\tSystem.out.println(\"Enter the web URL (Type Q or q to quit): \");\r\n\t\twhile (!url.equalsIgnoreCase(\"Q\"))\r\n\t\t{\r\n\t\t\turl = input.next();\t\r\n\t\t\tif(url.equalsIgnoreCase(\"Q\"))\r\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t//ignores all other code in the loop and exits the loop\r\n\t\t\trChronological.enqueue(url);\t\t\t\t\t//store url in queue\r\n\t\t\tqueueCount++;\t\t\t\t\t\t\t\t\t//increment number of elements in queue\r\n\t\t\tif (!checkSiteVisited(url))\t\t\t\t\t\t//if this is the user's first time visiting the url\r\n\t\t\t{\r\n\t\t\t\tchronological.push(url);\t\t\t\t\t//store url in stack\r\n\t\t\t\twebVisited[0][siteVisited] = url;\t\t\t//store url in 2-D array\r\n\t\t\t\twebVisited[1][siteVisited] = 1;\t\t\t\t//store 1 in 2-D array because it is user's first time visiting the site\r\n\t\t\t\tsiteVisited++;\t\t\t\t\t\t\t\t//increment number of websites visited\r\n\t\t\t}\r\n\t\t\telse\t\t\t\t\t\t\t\t\t\t\t//if the user has visited the website before\r\n\t\t\t{\r\n\t\t\t\tupdateStack(url);\t\t\t\t\t\t\t//move the url to the top of the stack\r\n\t\t\t\tupdateNumVisits(url);\t\t\t\t\t\t//increment the number of times the user has visited the site\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int getMaxRedirects()\n {\n return _maxRedirects;\n }", "public void setMax(){\n for (int i = 0; i < Nodes.size(); i++){\n this.MinDistance.add(Double.MAX_VALUE);\n }\n }", "private PathCostFlow findCheapestPath(int start, int end, double max_flow) throws Exception {\n if (getNode(start) == null || getNode(end) == null\n || !getNode(start).isSource() || getNode(end).isSource()) {\n throw new IllegalArgumentException(\"start must be the index of a source and end must be the index of a sink\");\n }\n double amount = Math.min(Math.min(getNode(start).getResidualCapacity(),\n getNode(end).getResidualCapacity()), max_flow);\n\n boolean[] visited = new boolean[n];\n int[] parent = new int[n];\n for (int i = 0; i < n; i++) {\n parent[i] = -1;\n }\n double[] cost = new double[n];\n for (int i = 0; i < n; i++) {\n cost[i] = Integer.MAX_VALUE;\n }\n cost[start] = 0;\n\n PriorityQueue<IndexCostTuple> queue = new PriorityQueue<IndexCostTuple>();\n queue.add(new IndexCostTuple(start, 0));\n\n while (!queue.isEmpty()) {\n IndexCostTuple current = queue.poll();\n\n // we found the target node\n if (current.getIndex() == end) {\n ArrayList<Integer> path = new ArrayList<Integer>();\n path.add(new Integer(end));\n while (path.get(path.size() - 1) != start) {\n path.add(parent[path.get(path.size() - 1)]);\n }\n Collections.reverse(path);\n if ((path.get(0) != start) || (path.get(path.size() - 1) != end)) {\n throw new Exception(\"I fucked up coding Dijkstra's\");\n }\n return new PathCostFlow(path, cost[end], amount);\n }\n\n // iterate through all possible neighbors of the current node\n for (int i = 0; i < n; i++) {\n SingleEdge e = matrix[current.getIndex()][i];\n if ((!visited[i]) && (e != null)\n && (current.getCost() + e.getCost(amount) < cost[i])) {\n cost[i] = current.getCost() + e.getCost(amount);\n parent[i] = current.getIndex();\n\n // update the entry for this node in the queue\n IndexCostTuple newCost = new IndexCostTuple(i, cost[i]);\n queue.remove(newCost);\n queue.add(newCost);\n }\n }\n visited[current.getIndex()] = true;\n }\n\n return null; //the target node was unreachable\n }", "public String breadthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 1;\n //make new vertex to check if its in list\n //make queue to hold vertices\n SemiConstantTimeQueue<Vertex<AnyType>> queue = new SemiConstantTimeQueue<Vertex<AnyType>>();\n //loop through and set not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if it's in list then set exists to true\n //and set visited \n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n } \n //if doesn't exist then throw the exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //make new queue\n queue.add(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n counter = 1;\n int k=0;\n Vertex<AnyType>e;\n //while the queue isn't empty\n while(queue.peek() !=null){\n //make e the top of the queue \n e = queue.peek(); \n //go through the list and if you reach the begining it exits loop\n for( k = 0; k < vertex_adjacency_list.size()-1; k++){\n if(vertex_adjacency_list.get(k).compareTo(e)==0){\n break;\n }\n } \n //go through loop and check if visited, if not then add it to queue, set visited\n for( int j = 0; j< vertex_adjacency_list.get(k).numberOfAdjacentVertices(); j++){\n if(vertex_adjacency_list.get(k).getAdjacentVertex(j).hasBeenVisited()==false){\n counter++;\n queue.add(vertex_adjacency_list.get(k).getAdjacentVertex(j));\n vertex_adjacency_list.get(k).getAdjacentVertex(j).setVisited(counter);\n }\n }\n //remove from queue when through loop once\n k++;\n queue.remove();\n }\n //loop through list and print vertex and when it was visited\n for(int o = 0; o< vertex_adjacency_list.size(); o++){\n buffer.append(vertex_adjacency_list.get(o) + \":\" + vertex_adjacency_list.get(o).getVisited()+ \"\\n\");\n }\n return buffer.toString();\n }", "private int getMinNumberofNewConnections(Map<String,\n AirportNode> airportGraph,\n List<AirportNode> unreachableAirportNodes) {\n unreachableAirportNodes.sort(\n (a1, a2) -> a2.unreachableConnections.size() - a1.unreachableConnections.size());\n int numberOfNewConnectionsToMake = 0;\n for (AirportNode eachUnreachableAirportNode : unreachableAirportNodes) {\n if (eachUnreachableAirportNode.isReachable) continue;\n // try to make a connection to the unreachable aiport and mark the airport as reachable\n numberOfNewConnectionsToMake++;\n for (String eachUnreachableConnection : eachUnreachableAirportNode.unreachableConnections) {\n airportGraph.get(eachUnreachableConnection).isReachable = true;\n }\n }\n return numberOfNewConnectionsToMake;\n }", "public static boolean Util(Graph<V, DefaultEdge> g, ArrayList<V> set, int colors, HashMap<String, Integer> coloring, int i, ArrayList<arc> arcs, Queue<arc> agenda)\n {\n /*if (i == set.size())\n {\n System.out.println(\"reached max size\");\n return true;\n }*/\n if (set.isEmpty())\n {\n System.out.println(\"Set empty\");\n return true;\n }\n //V currentVertex = set.get(i);\n\n /*System.out.println(\"vertices and mrv:\");\n V start = g.vertexSet().stream().filter(V -> V.getID().equals(\"0\")).findAny().orElse(null);\n Iterator<V> iterator = new DepthFirstIterator<>(g, start);\n while (iterator.hasNext()) {\n V v = iterator.next();\n System.out.println(\"vertex \" + v.getID() + \" has mrv of \" + v.mrv);\n }*/\n\n // Find vertex with mrv\n V currentVertex;\n int index = -1;\n int mrv = colors + 10;\n for (int it = 0; it < set.size(); it++)\n {\n if (set.get(it).mrv < mrv)\n {\n mrv = set.get(it).mrv;\n index = it;\n }\n }\n currentVertex = set.remove(index);\n\n //System.out.println(\"Got vertex: \" + currentVertex.getID());\n\n\n // Try to assign that vertex a color\n for (int c = 0; c < colors; c++)\n {\n currentVertex.color = c;\n if (verifyColor(g, currentVertex))\n {\n\n // We can assign color c to vertex v\n // See if AC3 is satisfied\n /*currentVertex.domain.clear();\n currentVertex.domain.add(c);*/\n if (!agenda.isEmpty()) numAgenda++;\n while(!agenda.isEmpty())\n {\n arc temp = agenda.remove();\n\n // Make sure there exists v1, v2, in V1, V2, such that v1 != v2\n V v1 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.x)).findAny().orElse(null);\n V v2 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.y)).findAny().orElse(null);\n\n\n\n // No solution exists in this branch if a domain is empty\n //if ((v1.domain.isEmpty()) || (v2.domain.isEmpty())) return false;\n\n if (v2.color == -1) continue;\n else\n {\n Boolean[] toRemove = new Boolean[colors];\n Boolean domainChanged = false;\n for (Integer it : v1.domain)\n {\n if (it == v2.color)\n {\n toRemove[it] = true;\n }\n }\n for (int j = 0; j < toRemove.length; j++)\n {\n if ((toRemove[j] != null))\n {\n v1.domain.remove(j);\n domainChanged = true;\n }\n }\n // Need to check constraints with v1 on the right hand side\n if (domainChanged)\n {\n for (arc it : arcs)\n {\n // Add arc back to agenda to check constraints again\n if (it.y.equals(v1.getID()))\n {\n agenda.add(it);\n }\n }\n }\n }\n if ((v1.domain.isEmpty()) || (v2.domain.isEmpty()))\n {\n System.out.println(\"returning gfalse here\");\n return false;\n }\n }\n\n // Reset agenda to check arc consistency on next iteration\n for (int j = 0; j < arcs.size(); j++)\n {\n agenda.add(arcs.get(i));\n }\n\n\n //System.out.println(\"Checking if vertex \" + currentVertex.getID() + \" can be assigned color \" + c);\n coloring.put(currentVertex.getID(), c);\n updateMRV(g, currentVertex);\n if (Util(g, set, colors, coloring, i + 1, arcs, agenda))\n {\n\n return true;\n }\n\n //System.out.println(\"Assigning vertex \" + currentVertex.getID() + \" to color \" + currentVertex.color + \" did not work\");\n coloring.remove(currentVertex.getID());\n currentVertex.color = -1;\n }\n }\n return false;\n }", "WebPage limit(int limit);", "public boolean hasNext() {\r\n\r\n\t\treturn counter < links.size();\r\n\t}", "void tryToFindNextKing()\n {\n if (nodeIds.size() != 0)\n {\n int nextKingId = Collections.max(nodeIds);\n CommunicationLink nextKing = allNodes.get(nextKingId);\n nextKing.sendMessage(new Message(\n Integer.toString(nextKingId), nextKing.getInfo(), myInfo, KING_IS_DEAD));\n }\n }", "private void addUrl(int urlID)\n\t{\n\t\tfor(int i=0;i<urlIDs.size();i++)\n\t\t{\n\t\t\tif(urlIDs.get(i)==urlID)\n\t\t\t{\n\t\t\t\tisUrlIDAssociatedWithSetInDatabase.set(i, false);//this will need to be updated\n\t\t\t\tthis.urlCount.set(i, urlCount.get(i)+1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tisUrlIDAssociatedWithSetInDatabase.add(false);\n\t\turlIDs.add(urlID);\n\t\tthis.urlCount.add(1);\n\t}", "public FixedGraph(int numOfVertices, int b, int seed) {\r\n super(numOfVertices);\r\n int adjVertex;\r\n double x = 0;\r\n int[] numOfEdges = new int[numOfVertices];\r\n Vector<Integer> graphVector = new Vector<Integer>();\r\n connectivity = b;\r\n\r\n\r\n Random random = new Random(seed);\r\n graphSeed = seed;\r\n\r\n for (int v = 0; v < numOfVertices; v++) {\r\n graphVector.add(new Integer(v));\r\n }\r\n\r\n for (int i = 0; i < numOfVertices; i++) {\r\n\r\n while ((numOfEdges[i] < b) && (graphVector.isEmpty() == false)) {\r\n x = random.nextDouble();\r\n do {\r\n adjVertex = (int) (x * numOfVertices);\r\n\r\n } while (adjVertex >= numOfVertices);\r\n\r\n\r\n if ((i == adjVertex) || (numOfEdges[adjVertex] >= b)) {\r\n if (numOfEdges[adjVertex] >= b) {\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n if (adjVertex == compInt) {\r\n graphVector.removeElementAt(v);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n\r\n }\r\n\r\n }\r\n if ((i != adjVertex) && (adjVertex < numOfVertices) && (numOfEdges[adjVertex] < b) && (super.isAdjacent(i, adjVertex) == false) && (numOfEdges[i] < b)) {\r\n super.addEdge(i, adjVertex);\r\n if (super.isAdjacent(i, adjVertex)) {\r\n numOfEdges[i] = numOfEdges[i] + 1;\r\n numOfEdges[adjVertex] = numOfEdges[adjVertex] + 1;\r\n }\r\n System.out.print(\"*\");\r\n\r\n }\r\n\r\n if (numOfEdges[i] >= b) {\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n if (i == compInt) {\r\n graphVector.removeElementAt(v);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n break;\r\n }\r\n if (graphVector.size() < b) {\r\n //boolean deadlock = false;\r\n System.out.println(\"Graph size= \" + graphVector.size());\r\n\r\n for (int v = 0; v < graphVector.size(); v++) {\r\n\r\n int compInt = ((Integer) graphVector.elementAt(v)).intValue();\r\n //System.out.println(\"i:= \" + i + \" and compInt:= \" + compInt);\r\n if (super.isAdjacent(i, compInt) || (i == compInt)) {\r\n //System.out.println(\"\" + i + \" adjacent to \" + compInt + \" \" + super.isAdjacent(i, compInt));\r\n // deadlock = false;\r\n } else {\r\n if ((numOfEdges[compInt] < b) && (numOfEdges[i] < b) && (i != compInt)) {\r\n super.addEdge(i, compInt);\r\n numOfEdges[i] = numOfEdges[i] + 1;\r\n numOfEdges[compInt] = numOfEdges[compInt] + 1;\r\n if (numOfEdges[i] >= b) {\r\n for (int w = 0; w < graphVector.size(); w++) {\r\n\r\n int compW = ((Integer) graphVector.elementAt(w)).intValue();\r\n if (i == compW) {\r\n graphVector.removeElementAt(w);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n break;\r\n }\r\n if (numOfEdges[compInt] >= b) {\r\n for (int w = 0; w < graphVector.size(); w++) {\r\n\r\n int compW = ((Integer) graphVector.elementAt(w)).intValue();\r\n if (compInt == compW) {\r\n graphVector.removeElementAt(w);\r\n }\r\n if (graphVector.isEmpty() == true) {\r\n System.out.println(\"Graph Vector Empty\");\r\n }\r\n }\r\n\r\n }\r\n // deadlock = true;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n\r\n System.out.println();\r\n }\r\n\r\n }", "private static int breadthFirstSearch(Vertex start) throws Queue.UnderflowException, Queue.EmptyException {\n boolean visited[] = new boolean[48];\n //Keep a queue of vertecies and a queue of the depth of the verticies - they will be added to and poped from identically\n ListQueue<Vertex> queue = new ListQueue<Vertex>();\n ListQueue<Integer> numQueue = new ListQueue<Integer>();\n //Set the starting node as visited\n visited[start.index()] = true;\n queue.enqueue(start);\n numQueue.enqueue(new Integer(1));\n\n //Keep last\n int last = -1;\n //While the queue isnt empty\n while (!queue.isEmpty()) {\n //Pop off the top from both queues and mark as visited\n start = queue.dequeue();\n int current = numQueue.dequeue();\n visited[start.index] = true;\n //For all neigbors\n for (Vertex v : start.neighbors) {\n //If we havent visited it make sure to visit it\n if (visited[v.index()] == false) {\n //As we keep adding new nodes to visit keep track of the depth\n queue.enqueue(v);\n numQueue.enqueue(current + 1);\n }\n }\n //Keep track of the most recent depth before we pop it off (queue will be empty when we exit)\n last = current;\n }\n //Return the max of the depth\n return last;\n }", "public static void main(String[] arg) throws IOException, URISyntaxException, InterruptedException {\n DB = new manageDB();\n Crawler crawler = new Crawler();\n DBLock=new AtomicInteger(0);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n crawler.CrawlerProcess(5);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n }\n }).start();\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n processedCrawledPages=0;\n outputSection = new HashSet<>();\n while (true) {\n crawlerOutput = crawler.crawlerOutput;\n if (crawlerOutput != null)\n {\n if (crawlerOutput.size() > 0)\n {\n Iterator<Crawler.OutputDoc> itr = crawlerOutput.iterator();\n if(itr.hasNext())\n {\n Crawler.OutputDoc output;\n synchronized (crawlerOutput) {\n output = itr.next();\n outputSection.add(output);\n }\n if(processedCrawledPages%10==0)\n {\n //lock db to be exclusive for POP function\n DBLock.set(1);\n processedCrawledPages=0;\n try {\n Thread popThread=new Thread(new POPClass(outputSection));\n popThread.start();\n popThread.join();\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n outputSection.clear();\n \n }\n while(DBLock.intValue()==1);\n processedCrawledPages +=1;\n DB.docProcess(output);\n synchronized (crawlerOutput) {\n crawlerOutput.remove(output);\n }\n }\n\n }\n }\n }\n }\n\n }).start();\n\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n ServerSocket serverSocket = new ServerSocket(7800);\n System.out.println(\"server is up and running...\");\n while (true) {\n Socket s = serverSocket.accept();\n System.out.println(\"server accepted the query...\");\n DataInputStream DIS = new DataInputStream(s.getInputStream());\n String query_and_flags = DIS.readUTF();\n Boolean imageSearch = false;\n Boolean phraseSearch = false;\n System.out.println(\"query_and_flags=\" + query_and_flags);\n String[] list_query_and_flags = query_and_flags.split(\"@\");\n String query = list_query_and_flags[0];\n if (list_query_and_flags[1].equals(\"phrase\"))\n phraseSearch = true;\n if (list_query_and_flags[2].equals(\"yes\"))\n imageSearch = true;\n\n if (imageSearch)\n manageDB.imageSearch(query);\n else manageDB.rank(query,phraseSearch);\n if (phraseSearch)\n System.out.println(\"it's phrase search\");\n else System.out.println(\"no phrase search\");\n DIS.close();\n s.close();\n\n }\n } catch (IOException | SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }).start();\n\n\n }", "private int getHitsAndArticlesByURL(Category node, String url)\r\n\t{\r\n\t\tDocumentBuilderFactory domfac = DocumentBuilderFactory.newInstance();\r\n\t\tint NumRes = 0;\r\n\t\tString totalHits;\r\n\t\ttry{\r\n\t\t\tURL queryurl = new URL(url);\r\n\t\t\tURLConnection connection = queryurl.openConnection();\r\n\t\t\tconnection.setDoInput(true);\r\n\t\t\tInputStream inStream = connection.getInputStream();\r\n\t\t\tDocumentBuilder dombuilder = domfac.newDocumentBuilder();\r\n\t\t\tDocument doc = dombuilder.parse(inStream);\r\n\t\t\tElement root = doc.getDocumentElement();\r\n\t\t\tNodeList resultset_web = root.getElementsByTagName(\"resultset_web\");\r\n\t\t\tNode resultset = resultset_web.item(0);\r\n\t\t\t\r\n\t\t\ttotalHits = resultset.getAttributes().getNamedItem(\"totalhits\").getNodeValue();\r\n\t\t\tNumRes = Integer.parseInt(totalHits);\r\n\t\t\t\r\n\t\t\tint count = 0;\r\n\t\t\tNodeList results = resultset.getChildNodes(); \r\n\t\t\tif(results != null)\r\n\t\t\t{\t\t\t\r\n\t\t\t\tfor(int i = 0 ; i < results.getLength(); i++){\r\n\t\t\t\t\tNode result = results.item(i);\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tArticle newArticle = new Article();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(result.getNodeType()==Node.ELEMENT_NODE){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(Node node1 = result.getFirstChild(); node1 != null; node1 = node1.getNextSibling()){\r\n\t\t\t\t\t\t\tif(node1.getNodeType()==Node.ELEMENT_NODE){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(node1.getNodeName().equals(\"url\") && node1.getFirstChild() != null && count < 4){\r\n\t\t\t\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\t\t\t\tString pageUrl = node1.getFirstChild().getNodeValue();\r\n\t\t\t\t\t\t\t\t\tArticle article = new Article();\r\n\t\t\t\t\t\t\t\t\tarticle.URL = pageUrl;\r\n\t\t\t\t\t\t\t\t\tarticle.words = getWordsLynx.runLynx(pageUrl);\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tnode.articles.add(article);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(ParserConfigurationException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}catch(SAXException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\treturn NumRes;\r\n\t}", "public final int getMaxLinkCount() {\n\t\tint r = 0;\n\t\tlockMe(this);\n\t\tr = maxLinkCount;\n\t\tunlockMe(this);\n\t\treturn r;\n\t}", "public boolean DijkstraHelp(int src, int dest) {\n PriorityQueue<Entry>queue=new PriorityQueue();//queue storages the nodes that we will visit by the minimum tag\n //WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n initializeTag();\n initializeInfo();\n node_info first=this.ga.getNode(src);\n first.setTag(0);//distance from itself=0\n queue.add(new Entry(first,first.getTag()));\n while(!queue.isEmpty()) {\n Entry pair=queue.poll();\n node_info current= pair.node;\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n Collection<node_info> listNeighbors = this.ga.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for(node_info n:Neighbors) {\n\n if(n.getTag()>ga.getEdge(n.getKey(),current.getKey())+current.getTag())\n {\n n.setTag(current.getTag() + ga.getEdge(n.getKey(), current.getKey()));//compute the new tag\n }\n queue.add(new Entry(n,n.getTag()));\n }\n }\n Iterator<node_info> it=this.ga.getV().iterator();\n while(it.hasNext()){\n if(it.next().getInfo()==null) return false;\n }\n return true;\n }", "public ArrayList<String> fetchTracks(String query, int limit) throws ClientProtocolException, IOException {\n\t\t\n\t\t//Empty ArrayList to store urls\n\t\tArrayList<String> permaLinkUrls = new ArrayList<String>();\n\t\t\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\n\t\t\n\t\t//Creating request URL with given information\n\t\tString composedUrl = BASE_URL + \"?client_id=\" + CLIENT_ID + \"&q=\" + query.replaceAll(\" \", \"%20\") + \"&limit=\" + limit;\n\t\t\n\t\tHttpGet getRequest = new HttpGet(composedUrl);\n\t\tCloseableHttpResponse response = httpClient.execute(getRequest);\n\t\t\n\t\tString json = \"\";\n\t\t\n\t\ttry {\n\t\t System.out.println(response.getStatusLine());\n\t\t HttpEntity entity = response.getEntity();\n\t\t \n\t\t BufferedReader in = new BufferedReader(new InputStreamReader(entity.getContent()));\n\t\t \n\t\t String line = null;\n\t\t \n\t\t //converting entity response into String \"json\"\n\t\t while((line = in.readLine()) != null){\n\t\t \tjson += line;\n\t\t }\n\t\t \n\t\t //calls method to parse permaLinkUrls and assigns value to the ArrayList\n\t\t permaLinkUrls = permaLinkParser(json, permaLinkUrls);\n\t\t \n\t\t EntityUtils.consume(entity);\n\t\t \n\t\t} finally {\n\t\t response.close();\n\t\t}\n\t\t\n\t\t//returns final ArrayList to UI Class\n\t\treturn permaLinkUrls;\n\t}", "private static void disjkstraAlgorithm(Node sourceNode, GraphBuilder graph){\n PriorityQueue<Node> smallestDisQueue = new PriorityQueue<>(graph.nodeArr.size(), new Comparator<Node>() {\n @Override\n public int compare(Node first, Node sec) {\n if(first.distance == Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return 0;\n }\n else if(first.distance == Integer.MAX_VALUE && sec.distance != Integer.MAX_VALUE){\n return 1;\n } else if(first.distance != Integer.MAX_VALUE && sec.distance == Integer.MAX_VALUE){\n return -1;\n }\n else\n return (int) (first.distance - sec.distance);\n }\n });\n\n smallestDisQueue.add(sourceNode); //add the node to the queue\n\n // until all vertices are know get the vertex with smallest distance\n\n while(!smallestDisQueue.isEmpty()) {\n\n Node currNode = smallestDisQueue.poll();\n// System.out.println(\"Curr: \");\n// System.out.println(currNode);\n if(currNode.known)\n continue; //do nothing if the currNode is known\n\n currNode.known = true; // otherwise, set it to be known\n\n for(Edge connectedEdge : currNode.connectingEdges){\n Node nextNode = connectedEdge.head;\n if(!nextNode.known){ // Visit all neighbors that are unknown\n\n long weight = connectedEdge.weight;\n if(currNode.distance == Integer.MAX_VALUE){\n continue;\n }\n else if(nextNode.distance == Integer.MAX_VALUE && currNode.distance == Integer.MAX_VALUE) {\n continue;\n }\n\n else if(nextNode.distance> weight + currNode.distance){//Update their distance and path variable\n smallestDisQueue.remove(nextNode); //remove it from the queue\n nextNode.distance = weight + currNode.distance;\n\n smallestDisQueue.add(nextNode); //add it again to the queue\n nextNode.pathFromSouce = currNode;\n\n// System.out.println(\"Next: \");\n// System.out.println(nextNode);\n }\n }\n }\n// System.out.println(\"/////////////\");\n }\n }", "public FollowGraph() {\r\n users = new ArrayList<>();\r\n connections = new boolean[MAX_USERS][MAX_USERS];\r\n }", "void queueInternalLinks(Elements paragraphs) {\n // FILL THIS IN!\n\t\tfor(Element paragraph: paragraphs)\n\t\t{\n\t\t\tIterable<Node> iterator = new WikiNodeIterable(paragraph);\n\t\t\tfor(Node node: iterator)\n\t\t\t{\n\t\t\t\tif(node instanceof Element)\n\t\t\t\t{\n\t\t\t\t\tString link = node.attr(\"href\");\n\t\t\t\t\tif(link.startsWith(\"/wiki/\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tqueue.add(\"https://en.wikipedia.org\" + ((Element)node).attr(\"href\"));\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void findSearchOrder() {\n boolean filled = false;\n for(int node: queryGraphNodes.keySet()) {\n\n vertexClass vc = queryGraphNodes.get(node);\n searchOrderSeq.add(node);\n for(int edge: queryGraphNodes.get(node).edges.keySet()) {\n filled = calcOrdering(edge);\n if (filled)\n break;\n }\n if(searchOrderSeq.size() == queryGraphNodes.size())\n break;\n\n }\n\n }", "public ArrayList<Edge> Prim (String s){\n Node Start = nodeMap.get(s);\n mst = new ArrayList<>();\n HashMap<String, String> inserted = new HashMap<String, String>();\n ArrayList<Edge> failed = new ArrayList<Edge>();\n PriorityQueue<Edge> pq = new PriorityQueue<Edge>();\n ArrayList<Edge> ed = new ArrayList<Edge>(edgeMap.values());\n Edge first = ed.get(0);\n mst.add(first);\n inserted.put(first.w, first.w);\n inserted.put(first.v, first.v);\n\n priorityEdgeInsert(pq, first);\n\n while (inserted.size() <= edges() && pq.size() != 0){ //O(E log(V))\n //runs for E checking the possible V, where the number of V is devided each time, or log(V), giving ELog(V)\n Edge e = pq.poll();\n String w = inserted.get(e.w);\n String v = inserted.get(e.v);\n\n if ((w == null) ^ (v == null)){\n priorityEdgeInsert(pq, e);\n for(Edge f : failed){\n if(f.v == e.v || f.v == e.w || f.w == e.v || f.w == e.w){\n\n }\n else{\n pq.add(f);\n }\n }\n failed.clear();\n mst.add(e);\n inserted.put(e.w, e.w); //only puts one, the null one is hashed to a meaningless spot\n inserted.put(e.v, e.v);\n }\n else if ((w == null) && (v == null) ){\n failed.add(e);\n }\n else if (!(w == null) && !(v == null) ){\n failed.remove(e);\n pq.remove(e);\n }\n else if (e == null){\n System.out.println(\"HOW?\"); //should never happen.\n }\n }\n return mst;\n }", "protected void buildGetLink(SearchRequest searchRequest, ItemCollection itemCollection, int finalLimit,\n String nextToken) {\n double[] bbox = searchRequest.getBbox();\n String link = LinksConfigProps.LINK_BASE + \"?limit=\" + finalLimit;\n if (null != bbox && (bbox.length == 4 || bbox.length == 6)) {\n link += bbox == null ? Strings.EMPTY : \"&bbox=\" + bbox[0] + \",\" + bbox[1] + \",\" + bbox[2] + \",\" + bbox[3];\n }\n link += searchRequest.getDatetime() == null ? Strings.EMPTY : \"&datetime=\" + searchRequest.getDatetime();\n link += searchRequest.getFilter() == null ? Strings.EMPTY : \"&filter=\" + searchRequest.getFilter();\n link += searchRequest.getIds() == null ? Strings.EMPTY :\n \"&ids=\" + String.join(\",\", searchRequest.getIds());\n link += searchRequest.getCollections() == null ? Strings.EMPTY :\n \"&collections=\" + String.join(\",\", searchRequest.getCollections());\n\n String fieldsValue = \"\";\n if (null != searchRequest.getFields()) {\n // add include fields\n fieldsValue += searchRequest.getFields().getInclude() == null ? Strings.EMPTY :\n String.join(\",\", searchRequest.getFields().getInclude());\n\n // add exclude fields\n Set<String> excludeFields = searchRequest.getFields().getExclude();\n if (null != excludeFields) {\n // need to add the \"-\" prefix for the get parameter\n List<String> prefixedExcludeFields = new ArrayList<>();\n excludeFields.forEach(field -> prefixedExcludeFields.add(\"-\" + field));\n String excludeFieldsString = String.join(\",\", prefixedExcludeFields);\n fieldsValue += fieldsValue.isBlank() ? excludeFieldsString : \",\" + excludeFieldsString;\n }\n }\n\n if (fieldsValue != null && !fieldsValue.isBlank()) {\n link += \"&fields=\" + fieldsValue;\n }\n\n if (nextToken != null) {\n itemCollection.addLink(new Link()\n .href(link + \"&next=\" + nextToken)\n .type(StaccatoMediaType.APPLICATION_GEO_JSON_VALUE)\n .rel(\"next\"));\n }\n\n String selfLink = searchRequest.getNext() == null ? link : link + \"&next=\" + searchRequest.getNext();\n itemCollection.addLink(new Link()\n .href(selfLink)\n .method(HttpMethod.GET.toString())\n .type(StaccatoMediaType.APPLICATION_GEO_JSON_VALUE)\n .rel(\"self\"));\n\n }", "private int createEdges() {\n\t\t// Use random numbers to generate random number of edges for each vertex\n\t\tint avgNumEdgesPerVertex = this.desiredTotalEdges / this.vertices.size();\n\t\tint countSuccessfulEdges = 0;\n\t\t// In order to determine the number of edges to create for each vertex\n\t\t// get a random number between 0 and 2 times the avgNumEdgesPerVertex\n\t\t// then add neighbors (edges are represented by the number of neighbors each\n\t\t// vertex has)\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\tfor (int j = 0; j <= (this.randomGen(avgNumEdgesPerVertex * 50) + 1); j++) {\n\t\t\t\t// select a random vertex from this.vertices (vertex list) and add as neighbor\n\t\t\t\t// ensure we don't add a vertex as a neighbor of itself\n\t\t\t\tint neighbor = this.randomGen(this.vertices.size());\n\t\t\t\tif (neighbor != i)\n\t\t\t\t\tif (this.vertices.get(i).addNeighbor(this.vertices.get(neighbor))) {\n\t\t\t\t\t\tthis.vertices.get(neighbor).addNeighbor(this.vertices.get(i));\n\t\t\t\t\t\tcountSuccessfulEdges++;\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn countSuccessfulEdges;\n\t}", "public boolean maxPeersReached(){\n\t\tif(peers.size()>=maxpeers){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void queryLimitedToNumberOfChildren(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tint nLimit = 0;\n\n if ( data.length() >= 2 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tnLimit = data.getInt(1);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryLimitedToNumberOfChildren : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n // Read data and react to changes\n urlRef.limit(nLimit).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"limit(limit).addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryLimitedToNumberOfChildren failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n });\n }", "public void processUrl() {\n try {\n\n JsonNode rootNode = getJsonRootNode(getJsonFromURL()); // todo: pass url in this method (to support multi-urls)\n getValuesFromJsonNodes(rootNode);\n setAndFormatValues();\n\n } catch (Exception e) {\n System.out.println(\"ERROR: caught error in processUrl()\");\n e.printStackTrace();\n }\n }", "public static int QTDelHeuristic1 (Graph<Integer,String> h) {\n\t\tint count = 0;\r\n\t\tboolean isQT = false;\r\n\t\t//h = Copy(g);\r\n\t\t//boolean moreToDo = true;\r\n\t\t\r\n\t\tIterator<Integer> a;\r\n\t\tIterator<Integer> b;\r\n\t\tIterator<Integer> c;\r\n\t\tIterator<Integer> d;\r\n\r\n\t\twhile (isQT == false) {\r\n\t\t\tisQT = true;\r\n\t\t\ta= h.getVertices().iterator();\r\n\t\t\twhile(a.hasNext()){\r\n\t\t\t\tInteger A = a.next();\r\n\t\t\t\t//System.out.print(\"\"+A+\" \");\r\n\t\t\t\tb = h.getNeighbors(A).iterator();\r\n\t\t\t\twhile(b.hasNext()){\r\n\t\t\t\t\tInteger B = b.next();\r\n\t\t\t\t\tc = h.getNeighbors(B).iterator();\r\n\t\t\t\t\twhile (c.hasNext()){\r\n\t\t\t\t\t\tInteger C = c.next();\r\n\t\t\t\t\t\tif (h.isNeighbor(C, A) || C==A) continue;\r\n\t\t\t\t\t\td = h.getNeighbors(C).iterator();\r\n\t\t\t\t\t\twhile (d.hasNext()){\r\n\t\t\t\t\t\t\tInteger D = d.next();\r\n\t\t\t\t\t\t\tif (D==B) continue; \r\n\t\t\t\t\t\t\tif (h.isNeighbor(D,B)) continue;\r\n\t\t\t\t\t\t\t//otherwise, we have a P4 or a C4\r\n\r\n\t\t\t\t\t\t\tisQT = false;\r\n\t\t\t\t\t\t\t//System.out.print(\"Found P4: \"+A+\"-\"+B+\"-\"+C+\"-\"+D+\"... not a cograph\\n\");\r\n\r\n\t\t\t\t\t\t\tif (h.isNeighbor(D,A)) {\r\n\t\t\t\t\t\t\t\t// we have a C4 = a-b-c-d-a\r\n\t\t\t\t\t\t\t\t// requires 2 deletions\r\n\t\t\t\t\t\t\t\tcount += 2;\r\n\t\t\t\t\t\t\t\th.removeVertex(A);\r\n\t\t\t\t\t\t\t\th.removeVertex(B);\r\n\t\t\t\t\t\t\t\th.removeVertex(C);\r\n\t\t\t\t\t\t\t\th.removeVertex(D);\r\n\t\t\t\t\t\t\t\treturn 2 + QTDelHeuristic1(h);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t// this case says:\r\n\t\t\t\t\t\t\t\t// else D is NOT adjacent to A. Then we have P4=abcd\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcount += 1;\r\n\t\t\t\t\t\t\t\th.removeVertex(A);\r\n\t\t\t\t\t\t\t\th.removeVertex(B);\r\n\t\t\t\t\t\t\t\th.removeVertex(C);\r\n\t\t\t\t\t\t\t\th.removeVertex(D);\r\n\t\t\t\t\t\t\t\treturn 1 + QTDelHeuristic1(h);\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\t\r\n\t\t\t\t\t} // end d.hasNext()\r\n\t\t\t\t} // end c.hasNext()\r\n\t\t\t} // end b.hasNext() \r\n\t\t} // end a.hasNext()\r\n\t\t\r\n\t\treturn count;\t\t\r\n\t}", "@Override\n\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\tif (!verifyStartEndVerticesExist(true, false)) {\n\t\t\t\t\tsetRunning(false);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Queue\n\t\t\t\tQueue<Vertex> q = new LinkedList<Vertex>();\n\t\t\t\t\n\t\t\t\t// set start vertex as visited\n\t\t\t\tpanel.getStartVertex().setVisited(true);\n\t\t\t\tq.add(panel.getStartVertex());\n\t\t\t\twhile (!q.isEmpty()) {\n\t\t\t\t\tVertex v = q.remove();\n\t\t\t\t\tv.setSelected(true);\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\tfor (Vertex vertex : getNeighbors(v)) {\n\t\t\t\t\t\tvertex.setHighlighted();\n\t\t\t\t\t\tpublish();\n\t\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t\t\tif (!vertex.isVisited()) {\n\t\t\t\t\t\t\tvertex.setVisited(true);\n\t\t\t\t\t\t\tvertex.setParent(v);\n\t\t\t\t\t\t\tq.add(vertex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tv.setSelected(false);\n\t\t\t\t\tv.setHighlighted();\n\t\t\t\t\tpublish();\n\t\t\t\t\tThread.sleep(panel.getCurrentDelay());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"BFS Finished!\");\n\t\t\t\tpublish();\n\t\t\t\tsetRunning(false);\n\t\t\t\treturn null;\n\t\t\t}", "public int getMaxRequestUrlsReported() {\n return maxRequestUrlsReported;\n }", "@Override\n public void crawl() {\n Document doc;\n try {\n\n\n doc = Jsoup.connect(rootURL).userAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A\").get();\n\n Elements articles = doc.select(\"section.list article\");\n\n System.out.println(\"Number of articles found:\"+articles.size());\n //list of links found\n for(Element article: articles){\n\n Element titleLink = article.select(\"a\").first();\n System.out.println(titleLink.attr(\"abs:href\"));\n\n //if the url found is in the cache, do not retrieve the url.\n if(urlCache.contains(titleLink.attr(\"abs:href\"))) {\n System.out.println(\"Doucment found in cache, ignoring document\");\n continue;\n }\n\n storeDocument(Jsoup.connect(titleLink.attr(\"abs:href\")).get());\n\n //add the URL to the cache so that we don't retrieve it again.\n urlCache.add(titleLink.attr(\"abs:href\"));\n }\n\n\n } catch (Exception e){\n logger.log(Level.SEVERE, \"Error Retrieving from URL\", e);\n e.printStackTrace();\n }\n }" ]
[ "0.5916012", "0.5897817", "0.57034117", "0.5577567", "0.5481147", "0.5479456", "0.54596364", "0.54560405", "0.5450447", "0.5344706", "0.52831554", "0.52691156", "0.5260269", "0.5209498", "0.52058214", "0.5205392", "0.5197493", "0.5183504", "0.508242", "0.5053828", "0.50502545", "0.5026005", "0.5017783", "0.50095457", "0.49941835", "0.4983141", "0.49751937", "0.49670005", "0.4965351", "0.49639875", "0.49382928", "0.4926292", "0.49075198", "0.48993558", "0.48922747", "0.48868695", "0.48759377", "0.4866269", "0.48512584", "0.48427096", "0.48223066", "0.48144242", "0.48119727", "0.4809628", "0.4808441", "0.4793993", "0.47895363", "0.47890174", "0.4777296", "0.4731675", "0.4726724", "0.47237158", "0.47213283", "0.4716781", "0.4714982", "0.47103453", "0.4703474", "0.47024548", "0.46990776", "0.46976238", "0.4679157", "0.4676144", "0.46452346", "0.46409288", "0.46408448", "0.4621149", "0.46166074", "0.4605746", "0.45931187", "0.4575169", "0.4574663", "0.4573958", "0.45717046", "0.45658076", "0.45652512", "0.45569012", "0.45526886", "0.45516056", "0.45501432", "0.45465273", "0.45457458", "0.45413083", "0.45395458", "0.45370117", "0.45360044", "0.45344722", "0.45303112", "0.45215023", "0.45203918", "0.4511378", "0.45092514", "0.4507717", "0.45020035", "0.44981974", "0.4495907", "0.4492114", "0.44823956", "0.44820252", "0.44788027", "0.44707796" ]
0.6126445
0
/ renamed from: a
public final C2445a m8809a() { this.f7382a.add(GoogleSignInOptions.zzehk); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final C2445a m8810a(Scope scope, Scope... scopeArr) { this.f7382a.add(scope); this.f7382a.addAll(Arrays.asList(scopeArr)); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: b
public final C2445a m8811b() { this.f7382a.add(GoogleSignInOptions.zzehi); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: c
public final GoogleSignInOptions m8812c() { if (this.f7382a.contains(GoogleSignInOptions.SCOPE_GAMES) && this.f7382a.contains(GoogleSignInOptions.SCOPE_GAMES_LITE)) { this.f7382a.remove(GoogleSignInOptions.SCOPE_GAMES_LITE); } if (this.f7385d && (this.f7387f == null || !this.f7382a.isEmpty())) { m8809a(); } return new GoogleSignInOptions(new ArrayList(this.f7382a), this.f7387f, this.f7385d, this.f7383b, this.f7384c, this.f7386e, this.f7388g, this.f7389h); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5289a(C5102c c5102c);", "public static void c0() {\n\t}", "void mo57278c();", "private static void cajas() {\n\t\t\n\t}", "void mo5290b(C5102c c5102c);", "void mo80457c();", "void mo12638c();", "void mo28717a(zzc zzc);", "void mo21072c();", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "public void c() {\n }", "void mo17012c();", "C2451d mo3408a(C2457e c2457e);", "void mo88524c();", "void mo86a(C0163d c0163d);", "void mo17021c();", "public abstract void mo53562a(C18796a c18796a);", "void mo4874b(C4718l c4718l);", "void mo4873a(C4718l c4718l);", "C12017a mo41088c();", "public abstract void mo70702a(C30989b c30989b);", "void mo72114c();", "public void mo12628c() {\n }", "C2841w mo7234g();", "public interface C0335c {\n }", "public void mo1403c() {\n }", "public static void c3() {\n\t}", "public static void c1() {\n\t}", "void mo8712a(C9714a c9714a);", "void mo67924c();", "public void mo97906c() {\n }", "public abstract void mo27385c();", "String mo20731c();", "public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }", "public interface C0939c {\n }", "void mo1582a(String str, C1329do c1329do);", "void mo304a(C0366h c0366h);", "void mo1493c();", "private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}", "java.lang.String getC3();", "C45321i mo90380a();", "public interface C11910c {\n}", "void mo57277b();", "String mo38972c();", "static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}", "public static void CC2_1() {\n\t}", "static int type_of_cc(String passed){\n\t\treturn 1;\n\t}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public void mo56167c() {\n }", "public interface C0136c {\n }", "private void kk12() {\n\n\t}", "abstract String mo1748c();", "public interface C0303q extends C0291e {\n /* renamed from: a */\n void mo1747a(int i);\n\n /* renamed from: a */\n void mo1749a(C0288c cVar);\n\n /* renamed from: a */\n void mo1751a(byte[] bArr);\n\n /* renamed from: b */\n void mo1753b(int i);\n\n /* renamed from: c */\n void mo1754c(int i);\n\n /* renamed from: d */\n void mo1755d(int i);\n\n /* renamed from: e */\n int mo1756e(int i);\n\n /* renamed from: g */\n int mo1760g();\n\n /* renamed from: g */\n void mo1761g(int i);\n\n /* renamed from: h */\n void mo1763h(int i);\n}", "public abstract void mo70710a(String str, C24343db c24343db);", "C3577c mo19678C();", "public abstract int c();", "public abstract int c();", "public final void mo11687c() {\n }", "byte mo30283c();", "@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "public interface C3196it extends C3208jc {\n /* renamed from: a */\n void mo30275a(long j);\n\n /* renamed from: b */\n C3197iu mo30281b(long j);\n\n /* renamed from: b */\n boolean mo30282b();\n\n /* renamed from: c */\n byte mo30283c();\n\n /* renamed from: c */\n String mo30285c(long j);\n\n /* renamed from: d */\n void mo30290d(long j);\n\n /* renamed from: e */\n int mo30291e();\n\n /* renamed from: f */\n long mo30295f();\n}", "public static void mmcc() {\n\t}", "java.lang.String getCit();", "public abstract C mo29734a();", "C15430g mo56154a();", "void mo41086b();", "@Override\n public void func_104112_b() {\n \n }", "public abstract String mo11611b();", "public interface C9223b {\n }", "void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);", "String getCmt();", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "interface C2578d {\n}", "public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}", "void mo72113b();", "double fFromC(double c) {\n return (c * 9 / 5) + 32;\n }", "void mo1749a(C0288c cVar);", "public interface C0764b {\n}", "void mo41083a();", "String[] mo1153c();", "C1458cs mo7613iS();", "public interface C0333a {\n }", "public abstract int mo41077c();", "public interface C8843g {\n}", "public abstract void mo70709a(String str, C41018cm c41018cm);", "void mo28307a(zzgd zzgd);", "public static void mcdc() {\n\t}", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "C1435c mo1754a(C1433a c1433a, C1434b c1434b);", "public interface C0389gj extends C0388gi {\n}", "C5727e mo33224a();", "C12000e mo41087c(String str);", "public abstract String mo118046b();", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "void mo80455b();", "public interface C0938b {\n }", "public interface C0385a {\n }", "public interface C5527c {\n /* renamed from: a */\n int mo4095a(int i);\n\n /* renamed from: b */\n C5537g mo4096b(int i);\n}", "public interface C32231g {\n /* renamed from: a */\n void mo8280a(int i, int i2, C1207m c1207m);\n}", "public final void cpp() {\n }" ]
[ "0.646086", "0.6442468", "0.6433268", "0.64192164", "0.6413362", "0.63989705", "0.62524456", "0.624802", "0.62461454", "0.62326145", "0.6192456", "0.61676776", "0.61534023", "0.61514014", "0.61394924", "0.6138327", "0.6131722", "0.6104166", "0.6099028", "0.6077975", "0.60623974", "0.6052802", "0.6049044", "0.60317516", "0.60279256", "0.60095847", "0.59994656", "0.59790796", "0.5956994", "0.59512067", "0.59389454", "0.59134877", "0.59056634", "0.5902709", "0.58844686", "0.58715206", "0.5866431", "0.5852408", "0.58198595", "0.5816208", "0.5803", "0.5790247", "0.57885146", "0.57785875", "0.57621634", "0.57348156", "0.57330364", "0.5728552", "0.57251126", "0.57143235", "0.5709671", "0.5709388", "0.5698617", "0.5698032", "0.56925666", "0.56885207", "0.56885207", "0.5676659", "0.56762725", "0.56601304", "0.5660092", "0.56578124", "0.5654235", "0.56522626", "0.5650417", "0.56426734", "0.5640711", "0.56393427", "0.56314474", "0.5631131", "0.5619572", "0.5616149", "0.56118184", "0.5597161", "0.5591113", "0.558282", "0.55824333", "0.55738276", "0.557319", "0.5571477", "0.5569317", "0.55637175", "0.5560288", "0.5557789", "0.55538803", "0.55502254", "0.5548218", "0.5546498", "0.5539702", "0.553626", "0.5531629", "0.55296135", "0.55191684", "0.55191225", "0.5518114", "0.55166477", "0.5516629", "0.55144393", "0.5510095", "0.55047446", "0.549915" ]
0.0
-1
elmina (status false o 0) un registro. Eliminacion logica
List<O> obtenertodos() throws DAOException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void carroNoEncontrado(){\n System.out.println(\"Su carro no fue removido porque no fue encontrado en el registro\");\n }", "@Override\r\n\tprotected boolean beforeDelete() {\r\n\t\t\r\n\t\tString valida = DB.getSQLValueString(null,\"SELECT DocStatus FROM C_Hes WHERE C_Hes_ID=\" + getC_Hes_ID());\r\n if (!valida.contains(\"DR\")){\r\n \t\r\n \tthrow new AdempiereException(\"No se puede Eliminar este documento por motivos de Auditoria\");\r\n\r\n }\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean eliminaDipendente() {\n\t\treturn false;\n\t}", "@Override\n public boolean excluirRegistro() {\n this.produto.excluir();\n return true;\n }", "public boolean statusCerradura(){\n return cerradura.estado();\r\n }", "@Override\n\tpublic void checkBotonEliminar() {\n\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 Integer DeletarTodos(){\n\n //REMOVENDO OS REGISTROS CADASTRADOS\n return databaseUtil.GetConexaoDataBase().delete(\"tb_log\",\"log_ID = log_ID\",null);\n\n }", "public boolean eliminar(){\n\t\tString query = \"DELETE FROM Almacen WHERE Id_Producto = \"+this.getId();\n\t\tif(updateQuery(query)){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic void eliminar(Object T) {\n\t\tSeccion seccionE= (Seccion)T;\n\t\tif(seccionE!=null){\n\t\t\ttry{\n\t\t\tString insertTableSQL = \"update seccion set estatus=?\" +\"where codigo=? and estatus='A'\";\n\t\t\tPreparedStatement preparedStatement = conexion.prepareStatement(insertTableSQL);\n\t\t\tpreparedStatement.setString(1, \"I\");\n\t\t\tpreparedStatement.setString(2, seccionE.getCodigo());\n\t\t\tpreparedStatement.executeUpdate();\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"No se elimino el registro\");\n\t\t}\n\t\tSystem.out.println(\"Eliminacion exitosa\");\n\t}\n\n\t}", "public String vistaEliminar(String codaloja, String codactiv) {Alojamiento alojbusc = alojamientoService.find(codaloja);\n// Actividad actbusc = actividadService.find(codactiv);\n// Alojamiento_actividad aloact = new Alojamiento_actividad();\n// Alojamiento_actividad_PK aloact_pk = new Alojamiento_actividad_PK();\n// aloact_pk.setActividad(actbusc);\n// aloact_pk.setAlojamiento(alojbusc);\n// aloact.setId(aloact_pk);\n// \n// actividadAlojamientoService.remove(aloact);\n// \n// \n// \n return \"eliminarAsignacion\";\n }", "public boolean EliminarProducto(int id) {\n boolean status=false;\n int res =0;\n try {\n conectar();\n res=state.executeUpdate(\"delete from producto where idproducto=\"+id+\";\");\n \n if(res>=1){\n status=true;\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return status;\n }", "@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}", "public void excluir(){\n\t\tSystem.out.println(\"\\n*** Excluindo Registro\\n\");\n\t\ttry{\n\t\t\tpacienteService.excluir(getPaciente());\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(\"Registro Deletado com Sucesso!!\")); //Mensagem de validacao \n\t\t}catch(Exception e){\n\t\t\tSystem.err.println(\"** Erro ao deletar: \"+e.getMessage());\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Erro ao deletar o paciente: \"+e.getMessage(), \"\")); //Mensagem de erro \n\t\t\t\n\t\t}\n\t}", "private void excluirAction() {\r\n Integer i = daoPedido.excluir(this.pedidoVO);\r\n\r\n if (i != null && i > 0) {\r\n msg = activity.getString(R.string.SUCCESS_excluido, pedidoVO.toString());\r\n Toast.makeText(activity, msg + \"(\" + i + \")\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"DB_INFO\", \"Sucesso ao Alterar: \" + this.pedidoVO.toString());\r\n\r\n// this.adapter.remove(this.pedidoVO);\r\n this.refreshData(2);\r\n } else {\r\n msg = activity.getString(R.string.ERROR_excluir, pedidoVO.toString());\r\n Toast.makeText(activity, msg, Toast.LENGTH_SHORT).show();\r\n Log.e(\"DB_INFO\", \"Erro ao Excluir: \" + this.pedidoVO.toString());\r\n }\r\n }", "@Override\n\tpublic void morir() {\n\t\tthis.estadoVida = false;\n\t}", "public void reiniciarEstadoSalud(){\n EmpleadosPrioridadAlta.clear();\n EmpleadosPrioridadMediaAlta.clear();\n EmpleadosPrioridadMedia.clear();\n EmpleadosPrioridadBaja.clear();\n }", "@Override\n\tpublic boolean eliminarTodos() {\n\t\treturn false;\n\t}", "public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }", "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 }", "@Override\r\n public Resultado excluir(EntidadeDominio entidade) {\n String nmClass = entidade.getClass().getName();\r\n //executando validações de regras de negocio \r\n String msg = executarRegras(entidade, \"EXCLUIR\");\r\n if (msg.isEmpty()) {\r\n IDAO dao = daos.get(nmClass);\r\n dao.excluir(entidade);\r\n resultado.setMsg(\"Dados excluidos\");\r\n } else {\r\n resultado.setMsg(msg.toString());\r\n }\r\n return resultado;\r\n }", "@Override\n\tpublic boolean eliminar(Long id) {\n\t\treturn false;\n\t}", "public void desactiveRegraJogadaDupla() {\n this.RegraJogadaDupla = true;\n }", "@Override\r\n\tpublic MensajeBean elimina(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.elimina(nuevo);\r\n\t}", "public boolean eliminarLoteria(int codigo) {\n\n String instruccion = \"delete from loteria where codigo =\" + codigo;\n boolean val = false;\n PreparedStatement pre;\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n pre = con.prepareStatement(instruccion);\n pre.execute();\n val = true;\n } catch (SQLException ex) {\n ex.printStackTrace();\n\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorLoteria.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return val;\n }\n\n }", "public void liberaIdProcesso(long idProcesso, String compNegocio, String status)\n\t{\n\t\tlogComponente(idProcesso,Definicoes.DEBUG,compNegocio,\"FIM\",status);\n\t}", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}", "public String eliminarDetalle()\r\n/* 340: */ {\r\n/* 341:400 */ this.cuentaContableDimensionContable = ((CuentaContableDimensionContable)this.dtCuentaContable.getRowData());\r\n/* 342:401 */ this.cuentaContableDimensionContable.setEliminado(true);\r\n/* 343:402 */ return \"\";\r\n/* 344: */ }", "public boolean isEliminable(VOUsuario us) {\n return true;\n }", "public void eliminarPrograma() {\r\n // Abro y obtengo la conexion\r\n this.conection.abrirConexion();\r\n Connection con = this.conection.getConexion();\r\n\r\n // Preparo la consulta\r\n String sql = \"UPDATE programa SET \\n\"\r\n + \"estado = '0'\\n\"\r\n + \"WHERE programa.codigo = ?\";\r\n System.out.println(sql);\r\n\r\n try {\r\n // La ejecuto\r\n PreparedStatement ps = con.prepareStatement(sql);\r\n ps.setInt(1, this.codigo);\r\n int rows = ps.executeUpdate();\r\n System.out.println(rows);\r\n // Cierro la conexion\r\n this.conection.cerrarConexion();\r\n } catch (SQLException ex) {\r\n System.out.println(ex.getMessage());\r\n }\r\n }", "public String eliminar()\r\n/* 88: */ {\r\n/* 89: */ try\r\n/* 90: */ {\r\n/* 91:101 */ this.servicioMotivoLlamadoAtencion.eliminar(this.motivoLlamadoAtencion);\r\n/* 92:102 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_eliminar\"));\r\n/* 93: */ }\r\n/* 94: */ catch (Exception e)\r\n/* 95: */ {\r\n/* 96:104 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_eliminar\"));\r\n/* 97:105 */ LOG.error(\"ERROR AL ELIMINAR DATOS\", e);\r\n/* 98: */ }\r\n/* 99:107 */ return \"\";\r\n/* 100: */ }", "public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;", "public void cancelar() {\n controlGrabar = false;\n validaVacios = true;\n segUsuPerfil = null; \n existe = false;\n usuario = \"\";\n perfil = \"\";\n }", "public void vaciarCarrito() {\r\n String sentSQL = \"DELETE from carrito\";\r\n try {\r\n Statement st = conexion.createStatement();\r\n st.executeUpdate(sentSQL);\r\n st.close();\r\n LOG.log(Level.INFO,\"Carrito vaciado\");\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n \tLOG.log(Level.WARNING,e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "public boolean eliminarUsuario(String cedula) {\n\n usuario = usuarioDAO.read(cedula);\n\n if (usuario != null) {\n \n usuarioDAO.delete(usuario);\n\n return true;\n\n } else {\n\n return false;\n }\n\n }", "public void deleteAnio()\r\n {\r\n this._has_anio= false;\r\n }", "public void eliminar (String idSalida) {\r\n String query = \"UPDATE actividad SET eliminar = true WHERE id_salida = \\\"\" + idSalida + \"\\\"\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad eliminada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void processEliminar() {\n }", "public void anularEquiparacion() {\n\n\n try {\n\n if (!equiparacionBeanSelected.getEqp_estado().equals(\"2\")) {\n EquiparacionesDao equiparacionDAo = new EquiparacionesDao();\n equiparacionBeanSelected.setEqp_estado(\"3\");\n\n equiparacionDAo.dmlDr_regt_equiparaciones(2, equiparacionBeanSelected);\n\n MateriasSolicitudDao materiaDao = new MateriasSolicitudDao();\n\n addMessage(\"Registro anulado satisfactoriamente\", 1);\n FacesContext facesContext = FacesContext.getCurrentInstance(); \n Dr_siseg_usuarioBean usuario= new Dr_siseg_usuarioBean();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n \n BitacoraSolicitudDao bitacoraSolicitudDao=new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean=new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(equiparacionBeanSelected.getEqp_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"E\");\n bitacoraSolicitudBean.setBit_detalle(\"La Equiparacion fue Eliminada\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n \n \n listaEquiparaciones();\n }else{\n addMessage(\"Equiparacion NO puede ser Eliminada\", 1);\n }\n\n } catch (ExceptionConnection ex) {\n /* Logger.getLogger(EquivalenciaController.class\n .getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al anular el registro, contacte al administrador del sistema\", 2);\n */ }\n\n }", "public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}", "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 }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "public void removeEmpleado(){\n //preguntar al empleado si realmente eliminar o no al objeto empleado\n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, \"<html>\"\n + \"¿Deseas remover el empleado del sistema?<br> \"\n + \"<b>OJO: EL EMPLEADO SERÁ ELIMINADO PERMANENTEMENTE.</b> \"\n + \"</html>\",\n new Callback<Boolean>(){\n @Override\n public void execute(Boolean[] answer) {\n //si la respuesta fue YES=true, remover al empleado y limpiar el formulario\n if(answer[0]){\n mEmpleado.remove();\n clear();\n }\n //si la respuesta es NO=false, no hacer nada\n }\n }\n );\n \n }", "public boolean MasaSil(int masa_no) throws SQLException {\n baglanti vb = new baglanti();\r\n\r\n try {\r\n vb.baglan();\r\n } catch (Exception e) {\r\n System.out.println(\"Bağlantı sağlanamadı\" + e);\r\n }\r\n try {\r\n String sorgu3 = \"DELETE m,i FROM masalar m LEFT JOIN ilisk_masa i ON m.masa_no=i.masa_no WHERE m.masa_no=\" + masa_no + \"\";\r\n\r\n ps = vb.con.prepareStatement(sorgu3);\r\n ps.executeUpdate();\r\n\r\n return true;\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n return false;\r\n }\r\n finally{\r\n vb.con.close();\r\n }\r\n }", "public void eliminarVenta(int codVenta) throws Exception {\n if (this.ventas.containsKey(codVenta)) {\r\n this.ventas.remove(codVenta);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"La Venta no Existe\");\r\n }\r\n //return retorno;\r\n }", "public void removeStatus() {\n this.setStatus(StatusNamesies.NO_STATUS.getStatus());\n }", "@Override\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino el usuario de la bd\");\n\t}", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public boolean eliminarCliente(int codigo){\n\t\ttry{\n\t\t\tString insert = \"DELETE FROM clientes WHERE codigo = ? ;\";\n\t\t\tPreparedStatement ps = con.prepareStatement(insert);\n\t\t\tps.setInt(1, codigo);\n\t\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\t\t\t\n\t\t\tps.executeUpdate();\t\n\t\t\tcon.commit();\n\t\t\treturn true;\n\t\t}catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "private void unDeleteValoresPago() {\n CQChangeStateVP( MVALORPAGO.ANULADO,MVALORPAGO.EMITIDO);\n }", "public void desactivarRecursos() {\n\r\n\t}", "@Override\r\n\tpublic void eliminar(Long idRegistro) {\n\t\t\r\n\t}", "public void eliminarMarca(String nombreMarca) throws Exception {\n if (this.marcas.containsKey(nombreMarca)) {\r\n this.generarAuditoria(\"BAJA\", \"MARCA\", nombreMarca, \"\", GuiIngresar.getUsuario());\r\n this.marcas.remove(nombreMarca);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"La marca no Existe\");\r\n }\r\n //return retorno;\r\n }", "public void carroRemovido(){\n System.out.println(\"Su carro fue removido exitosamente\");\n }", "protected boolean afterDelete() {\n if (!DOCSTATUS_Drafted.equals(getDocStatus())) {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n } \n \n //C_AllocationLine\n String sql = \"DELETE FROM C_AllocationLine \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PaymentAllocate\n sql = \"DELETE FROM C_PaymentAllocate \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_VALORPAGO\n sql = \"DELETE FROM C_VALORPAGO \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTVALORES\n sql = \"DELETE FROM C_PAYMENTVALORES \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTRET\n sql = \"DELETE FROM C_PAYMENTRET \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n return true;\n\n }", "public void despegar(){\n if(this.posicion == 1){\n this.setPosicion(2);\n this.indicarEstado(\"Volando\");\n } else{\n System.out.println(\"No estoy preparado para el despegue\");\n }\n }", "@Override\r\n\tpublic String eliminarCiudad(CiudadVO ciudad) {\n\t\ttry {\r\n\t\t\tConnection connection = null;\r\n\t\t\tconnection = crearConexion(connection);\r\n\t\t\tString query = \"UPDATE CIUDADES SET ESTADO = 0 WHERE ID = ?\";\r\n\t\t\tPreparedStatement statement = connection.prepareStatement(query);\r\n\t\t\tstatement.setInt(1, ciudad.getId());\r\n\t\t\tSystem.out.println(this.getClass() + \" -> MiSQL-> \" + query);\r\n\t\t\tstatement.executeUpdate();\r\n\t\t\tResultSet resultSet = statement.getResultSet();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tcerrarConexion(resultSet, statement, connection);\r\n\t\t\treturn \"1\";\r\n\t\t}catch(Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.out.println(\"Error en DAO\");\r\n\t\t\treturn \"0\";\r\n\t\t}\r\n\t}", "public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}", "public int eliminarUsuario(VOUsuario u) throws RemoteException {\n if(this.isEliminable(u)) {\n String r=u.getId();\n try {\n String val[]=new String[1];\n String tipo[]=new String[1];\n String s;\n val[0]=r;\n tipo[0]=\"id\";\n int l=0;\n int linea=buscarUsuario(val, tipo);\n\n if(linea>=0) {\n FileReader fr = new FileReader(datos);\n BufferedReader entrada = new BufferedReader(fr);\n\n FileWriter fw = new FileWriter(datost, false);\n BufferedWriter bw = new BufferedWriter(fw);\n PrintWriter salida = new PrintWriter(bw);\n\n while((s = entrada.readLine())!=null) {\n if(l!=linea) {\n salida.println(s);\n }\n l++;\n }\n entrada.close();\n salida.close();\n actualizar_datosUsuario();\n return 0;\n } else {\n return 1;\n }\n\n } catch (FileNotFoundException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n return 2;\n } catch (IOException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n return 2;\n }\n } else {\n return 3;\n }\n }", "@Override\n public boolean eliminar(ModelCliente cliente) {\n strSql = \"DELETE CLIENTE WHERE ID_CLIENTE = \" + cliente.getIdCliente();\n \n \n try {\n //se abre una conexión hacia la BD\n conexion.open();\n //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria\n respuesta = conexion.executeSql(strSql);\n //Se cierra la conexión hacia la BD\n conexion.close();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n return false;\n } catch(Exception ex){\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n }\n return respuesta;\n }", "public void excluirDados() {\n\n int linha;\n\n if (verificarAbaAtiva() == 0) {\n linha = HorarioDeTrabalho.getSelectedRow();\n modHT = (DefaultTableModel) HorarioDeTrabalho.getModel();\n tratDados.excluirDadosTabela(modHT, linha);\n txtEntrada_Horario.requestFocus();\n } else {\n linha = MarcacoesFeitas.getSelectedRow();\n modMF = (DefaultTableModel) MarcacoesFeitas.getModel();\n tratDados.excluirDadosTabela(modMF, linha);\n txtEntrada_Marcacoes.requestFocus();\n }\n \n //Limpa as tabelas de Atraso e Extras\n modAt.setRowCount(0);\n modEx.setRowCount(0);\n }", "public Boolean rechazarRegistro(Usuario u,String motivo) {\r\n\t\tif(!this.modoAdmin) return false;\r\n\t\tu.rechazar(motivo);\r\n\t\tthis.proponentes.remove(u);\r\n\t\treturn true;\r\n\t}", "public boolean eliminar() {\r\n if (colaVacia()) {\r\n return false;\r\n }\r\n\r\n if (ini == fin) {\r\n ini = fin = -1;\r\n } else {\r\n ini++;\r\n }\r\n\r\n return true;\r\n }", "@Override\n protected void validaRegrasExcluir(ArquivoLoteVO entity) throws AppException {\n\n }", "public void eliminar() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n clientefacadelocal.remove(userFound);\n FacesContext fc = FacesContext.getCurrentInstance();\n fc.getExternalContext().redirect(\"../index.xhtml\");\n System.out.println(\"Usuario Eliminado\");\n } else {\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n System.out.println(\"Error al eliminar el cliente \" + e);\n }\n }", "@Override\n\tpublic boolean eliminarPorId(Integer llave) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void naoAtirou() {\n\t\tatirou=false;\n\n\t}", "public void eliminarEmpleado(String nroDocEmpleado) throws Exception {\n if (this.empleados.containsKey(nroDocEmpleado)) {\r\n this.generarAuditoria(\"BAJA\", \"EMPLEADO\", nroDocEmpleado, \"\", GuiIngresar.getUsuario());\r\n this.empleados.remove(nroDocEmpleado);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"El cajero no Existe\");\r\n }\r\n //return retorno;\r\n }", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}", "public boolean limpiarHorariosCRN() {\n\n if (conectado) {\n try {\n String Query = String.format(\n \"DELETE FROM horarioscrn WHERE anio = YEAR(NOW()) AND ciclo = CURRENT_CICLO()\");\n System.out.println(\"QUERY -> \" + Query);\n Statement st = Conexion.createStatement();\n System.out.println(st.toString());\n st.executeUpdate(Query);\n return true;\n } catch (SQLException ex) {\n Logy.me(ex.getMessage());\n Logy.me(\"Error!!! elimanando registros de tabla HORARIOSCNR de la DB\");\n return false;\n }\n } else {\n Logy.me(\"Error!!! no se ha establecido previamente una conexion a la DB\");\n return false;\n }\n }", "@Override\n public boolean eliminar(T dato) {\n try {\n this.raiz = eliminar(this.raiz, dato);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "public void EliminarElmento(int el) throws Exception{\n if (!estVacia()) {\n if (inicio == fin && el == inicio.GetDato()) {\n inicio = fin = null;\n } else if (el == inicio.GetDato()) {\n inicio = inicio.GetSiguiente();\n } else {\n NodoDoble ante, temporal;\n ante = inicio;\n temporal = inicio.GetSiguiente();\n while (temporal != null && temporal.GetDato() != el) {\n ante = ante.GetSiguiente();\n temporal = temporal.GetSiguiente();\n }\n if (temporal != null) {\n ante.SetSiguiente(temporal.GetSiguiente());\n if (temporal == fin) {\n fin = ante;\n }\n }\n }\n }else{\n throw new Exception(\"No existen datos por borrar!!!\");\n }\n }", "public boolean deletePalvelupisteet();", "public boolean limpiarCRN() {\n\n if (conectado) {\n try {\n String Query = String.format(\n \"DELETE FROM crn WHERE anio = YEAR(NOW()) AND ciclo = CURRENT_CICLO()\");\n System.out.println(\"QUERY -> \" + Query);\n Statement st = Conexion.createStatement();\n System.out.println(st.toString());\n st.executeUpdate(Query);\n return true;\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n System.out.println(\"Error!!! elimanando registros de tabla crn de la DB\");\n return false;\n }\n } else {\n System.out.println(\"Error!!! no se ha establecido previamente una conexion a la DB\");\n return false;\n }\n }", "private void iniciarNovaVez() {\n this.terminouVez = false;\n }", "public void eliminarManoObra(ActionEvent actionEvent) {\r\n manoobraDao manobraDao = new manoobraDaoImpl();\r\n String msg;\r\n if (manobraDao.eliminarManoObra(this.manoobra.getCodigoManob())) {\r\n msg = \"Mano de Obra eliminada correctamente\";\r\n FacesMessage message1 = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, null);\r\n FacesContext.getCurrentInstance().addMessage(null, message1);\r\n } else {\r\n msg = \"No se elimino la Mano de Obra\";\r\n FacesMessage message2 = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, null);\r\n FacesContext.getCurrentInstance().addMessage(null, message2);\r\n }\r\n \r\n }", "protected boolean beforeDelete() {\n if (DOCSTATUS_Drafted.equals(getDocStatus())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n\n }", "public void anularPer(String cedula){\r\n String sql = \"UPDATE \\\"HIP_PERSONAS\\\" SET \\\"PER_ESTADO\\\" = 'I' WHERE \\\"PER_CEDULA\\\" = '\" + cedula + \"'\";\r\n System.out.println(\"Persona Eliminada eliminada \" + sql);\r\n db.conectar();\r\n try {\r\n\r\n Statement sta = db.getConexionBD().createStatement();\r\n sta.execute(sql);\r\n db.desconectar();\r\n\r\n } catch (SQLException error) {\r\n\r\n error.printStackTrace();\r\n\r\n }\r\n }", "@PostMapping(\"/remover1\")\r\nString remover1(@RequestParam(\"ava_0\") String ava_0,\r\n@RequestParam(\"ava_log\") String ava_log,\r\nModel model) {\n\r\n try (Connection connection = dataSource.getConnection()) {\r\n Statement stmt = connection.createStatement();\r\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM avaliacao WHERE id=\"+ava_0);\r\n\r\n ArrayList<String> output = new ArrayList<String>();\r\n //Se achou a ficha\r\n if (rs.next()) {\r\n\r\n\r\n stmt.executeUpdate(\"DELETE FROM goniometria WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM preensao WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM composicao WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM goniometria WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM avaliacaodor WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM evolucaodor WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM gural WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM qualidade WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM forca WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM pressao WHERE id=\"+ava_0);\r\n stmt.executeUpdate(\"DELETE FROM avaliacao WHERE id=\"+ava_0);//chave primaria\r\n\r\n model.addAttribute(\"ava_log\", \"Ficha excluída com sucesso!\");\r\n } else\r\n model.addAttribute(\"ava_log\", \"Ficha não encontrada.\");\r\n return \"dashboard_ficha\";\r\n } catch (Exception e) {\r\n //model.put(\"message\", e.getMessage());\r\n model.addAttribute(\"ava_log\", e.getMessage());\r\n return \"dashboard_ficha\";\r\n }\r\n}", "public void esborrarRegistresTaulaNews() throws SQLException {\n bd.execSQL(\"DELETE FROM \" + BD_TAULA );\n\n }", "public boolean eliminarVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n return modeloCarro.eliminarCarro((clsCarro) vehiculo);\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n return false;\n }", "public RespuestaBD eliminarRegistro(int codigoFlujo, int secuencia) {\n/* 296 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 299 */ String s = \"delete from wkf_detalle where codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* 304 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 306 */ catch (Exception e) {\n/* 307 */ e.printStackTrace();\n/* 308 */ Utilidades.writeError(\"FlujoDetalleDAO:eliminarRegistro \", e);\n/* 309 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 311 */ return rta;\n/* */ }", "private void eliminar(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n Connection con = null;//Objeto para la conexion\r\n Statement sentencia = null;//Objeto para definir y ejecutar las consultas sql\r\n int resultado = 0;//resultado de las filas borradas sql\r\n String sql = \"\";\r\n try {\r\n\r\n //ESTABLECER CONEXION\r\n con = conBD.getCConexion();\r\n System.out.println(\"Conectado a BD...\");\r\n\r\n //OBTENER EL DATO A ELIMINAR\r\n String emailUsuario = request.getParameter(\"ID\");\r\n\r\n //Definición de Sentencia SQL\r\n sql = \"DELETE FROM USUARIOS WHERE semail='\" + emailUsuario + \"'\";\r\n\r\n //Ejecutar sentencia\r\n sentencia = con.createStatement();\r\n resultado = sentencia.executeUpdate(sql);\r\n System.out.println(\"Borrado exitoso !\");\r\n request.setAttribute(\"mensaje\", \"Registro borrado exitosamente !\");\r\n //cerrar la conexion\r\n //con.close();\r\n\r\n //listar de nuevo los datos\r\n todos(request, response);\r\n\r\n } catch (SQLException ex) {\r\n System.out.println(\"No se ha podido establecer la conexión, o el SQL esta mal formado \" + sql);\r\n request.getRequestDispatcher(\"/Error.jsp\").forward(request, response);\r\n }\r\n }", "public int eliminar(Connection conn, alertas objeto) {\r\n\t\ttry {\r\n\r\n\t\t\tPreparedStatement statement = conn\r\n\t\t\t\t\t.prepareStatement(\"delete from alertas where ID_ALERTA = ?\");\r\n\t\t\tstatement.setInt(1, objeto.getAlerta());\r\n\t\t\tstatement.execute();\r\n\t\t\tstatement.close();\r\n\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\"Se ha Eliminado un Registro! \", \"Aviso!\",\r\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn 1;\r\n\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tJOptionPane.showMessageDialog(null, \"No se Eliminó Registro :\"\r\n\t\t\t\t\t+ e.getMessage(), \"Alerta!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t}", "private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }", "public boolean excluir(Long id) {\r\n\t\t\t\r\n\t\t\t//deleta seus relacionamentos\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tString sqlExcluir = \"DELETE FROM equipamentos_local WHERE id_equipamentos=?\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlExcluir);\r\n\t\t\t\tstatement.setLong(1, id);\r\n\t\t\t\tint linhasAfetadas = statement.executeUpdate();\r\n\t\t\t\tif(linhasAfetadas>0) {\r\n\t\t\t\t\treturn true;\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} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//agora exclui do banco\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tsqlExcluir = \"DELETE FROM equipamentos WHERE id_equipamentos=?\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlExcluir);\r\n\t\t\t\tstatement.setLong(1, id);\r\n\t\t\t\tint linhasAfetadas = statement.executeUpdate();\r\n\t\t\t\tif(linhasAfetadas>0) {\r\n\t\t\t\t\treturn true;\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} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t\r\n\t}", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "private void eliminaAccount(HttpServletRequest request, HttpServletResponse response) {\r\n HttpSession session = request.getSession();\r\n Medico medico = (Medico) session.getAttribute(\"utente\");\r\n if (medico != null) {\r\n\r\n if (PazienteModel.getPazientiSeguiti(medico.getCodiceFiscale()).size() != 0) {\r\n // non è possibile effettuare l'eliminazione, notificare al medico che non può\r\n // proseguire con l'opeazione fino a che\r\n // segue dei pazienti.\r\n } else {\r\n MedicoModel.removeMedico(medico.getCodiceFiscale());\r\n request.setAttribute(\"notifica\", \"Account eliminato con successo\");\r\n session.removeAttribute(\"utente\");\r\n session.setAttribute(\"accessDone\", false);\r\n }\r\n\r\n }\r\n\r\n }", "@Override\r\n\tpublic void validarSaldo() {\n\t\tSystem.out.println(\"Transaccion exitosa\");\r\n\t}", "public CensoCCVnoREMExcluidos() {\n this.nombre = \"\";\n this.apellidom = \"\";\n this.apellidop = \"\";\n this.rut = \"\";\n this.edad = 0;\n this.razon_exclusion = \"\";\n }", "@Override\r\n\tpublic boolean cadastrar(Loja loja) {\n\t\treturn false;\r\n\t}", "public int eliminardelFinal(){\n int elemento = fin.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n fin = fin.ant;\n fin.sig = null;\n }\n return elemento;\n \n \n }", "void unsetStatus();", "public boolean remover(Veterinario obj) throws ClassNotFoundException, SQLException{\n VeterinarioDAO dao = new VeterinarioDAO();\n return dao.remover(obj);\n }", "@Override\r\n\tpublic int elimina(int id) throws Exception {\n\t\treturn 0;\r\n\t}", "public void deletar() {\n if(Sessao.isConfirm()){\n Usuario use = new Usuario();\n use.setId(Sessao.getId());\n Delete_Banco del = new Delete_Banco();\n del.Excluir_Usuario(use);\n this.setVisible(false);\n Sessao.setId(0);\n tela_Principal prin = Sessao.getPrin();\n prin.atualizar_Tela();\n }\n }", "@Override\n public boolean delete(Revue objet) {\n return false;\n }", "public void eliminarTipoPago(String codTipoPago) throws Exception {\n if (this.tiposPagos.containsKey(codTipoPago)) {\r\n this.generarAuditoria(\"BAJA\", \"TIPOPAGO\", codTipoPago, \"\", GuiIngresar.getUsuario());\r\n this.tiposPagos.remove(codTipoPago);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"El tipo pago no Existe\");\r\n }\r\n //return retorno;\r\n }", "private boolean poseeSaldoAnterior() {\n boolean retorno = false;\n if(saldoAnterior !=null){\n retorno = true;\n }\n return retorno;\n }", "public String eliminarDetalleIVAFacturaSRI()\r\n/* 433: */ {\r\n/* 434:436 */ DetalleFacturaProveedorSRI detalleFacturaProveedorSRI = (DetalleFacturaProveedorSRI)this.dtDetalleIVAFacturaProveedorSRI.getRowData();\r\n/* 435:437 */ detalleFacturaProveedorSRI.setEliminado(true);\r\n/* 436: */ \r\n/* 437:439 */ return \"\";\r\n/* 438: */ }" ]
[ "0.6683469", "0.6578711", "0.6394368", "0.6315347", "0.61588526", "0.6106411", "0.6068982", "0.6055684", "0.5988657", "0.59766513", "0.59694475", "0.5964265", "0.5964", "0.5963999", "0.59542024", "0.5931825", "0.59243", "0.5892895", "0.58666325", "0.58540756", "0.58492005", "0.5837254", "0.5833145", "0.58150727", "0.58094245", "0.580883", "0.5785468", "0.57833284", "0.57766116", "0.57754964", "0.5761101", "0.57570136", "0.5750713", "0.5749892", "0.5741368", "0.573853", "0.57381886", "0.5735267", "0.57276076", "0.5724819", "0.57194406", "0.57094365", "0.5708631", "0.57034594", "0.57028735", "0.5697621", "0.5690017", "0.5683615", "0.5677237", "0.56688637", "0.5662465", "0.56622833", "0.5660208", "0.5659764", "0.5649191", "0.5647147", "0.5646644", "0.56400305", "0.5637204", "0.5633715", "0.5632715", "0.5631663", "0.56121314", "0.56063044", "0.5601179", "0.55958915", "0.5591997", "0.55797327", "0.5579284", "0.5575165", "0.5569942", "0.556847", "0.5565858", "0.5559884", "0.55551744", "0.55545294", "0.55486745", "0.5545099", "0.55418575", "0.55342054", "0.5528456", "0.5528333", "0.55276585", "0.55267197", "0.5526652", "0.55262035", "0.55261606", "0.55230117", "0.55219364", "0.55218554", "0.55208325", "0.5520282", "0.5516376", "0.55082935", "0.55080736", "0.54999477", "0.54975796", "0.5496876", "0.54882526", "0.5486537", "0.5484969" ]
0.0
-1
todos los registros en un list
O obtener(PK id) throws DAOException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void listarRegistros() {\n System.out.println(\"\\nLISTA DE TODOS LOS REGISTROS\\n\");\n for (persona ps: pd.listaPersonas()){\n System.out.println(ps.getId()+ \" \"+\n ps.getNombre()+ \" \"+\n ps.getAp_paterno()+ \" \"+ \n ps.getAp_materno()+ \" DIRECCION: \"+ \n ps.getDireccion()+ \" SEXO: \"+ ps.getSexo());\n }\n }", "public static void ExibirRegistros(Registro registros[]) {\n for (Registro registro : registros) {\n System.out.println(registro);\n }\n }", "public List<EntradaDeMaterial> buscarEntradasDisponibles();", "public ArrayList<DataRestaurante> listarRestaurantes(String patron) throws Exception;", "private void restList() {\n for (Processus tmp : listOfProcess) {\n tmp.resetProcess();\n }\n }", "public static void llenarListaProcesados() {\n List<String> lista = Datos.getInstance().getDocumentos();\n if (lista == null) {\n return;\n }\n modelProcesados.clear();\n for (String s : lista) {\n modelProcesados.addElement(s);\n }\n\n }", "public void abilitaRegoleconDispositivo(String nomeDispositivo, ArrayList<Sensore> listaSensori, ArrayList<Attuatore> listaAttuatori) {\n String[] regole = readRuleFromFile().split(\"\\n\");\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) && verificaAbilitazione(s,listaSensori,listaAttuatori)) {\n cambiaAbilitazioneRegola(s, true);\n }\n }\n }", "public ArrayList<A_MANOSCRITTO_0_Manoscritto> getListaManoscritti()\n\t{\n\t\tArrayList<A_MANOSCRITTO_0_Manoscritto> risultato = new funzionalitaVarieCONTROLLER().getListaManoscritti();\n\n\t\treturn risultato;\n\t}", "private void armarListaCheck() {\n listaCheck = new ArrayList();\n listaCheck.add(chkBici);\n listaCheck.add(chkMoto);\n listaCheck.add(chkAuto);\n }", "@Test\n\tpublic void validarPeticionListAllRegistros() {\n\t\t// Arrange\n\t\tint cantidadRegistros = 1;\n\t\t// Act\n\t\tList<Registro> registroRecuperados = (List<Registro>) registroService.listAllRegistro();\n\t\tint cantidadRegistrosRecuperdos = registroRecuperados.size();\n\t\t// Assert\n\t\tAssert.assertEquals(\"Valor recuperado es igual\", cantidadRegistrosRecuperdos, cantidadRegistros);\n\t}", "public List<Mobibus> darMobibus();", "public void addRegisseure( List<Person> listRegisseure ) {\n\t\tthis.listRegisseure.addAll( listRegisseure );\n\t}", "private final void inicializarListas() {\r\n\t\t//Cargo la Lista de orden menos uno\r\n\t\tIterator<Character> it = Constantes.LISTA_CHARSET_LATIN.iterator();\r\n\t\tCharacter letra;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tletra = it.next();\r\n\t\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(letra);\r\n\t\t}\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(Constantes.EOF);\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.actualizarProbabilidades();\r\n\t\t\r\n\t\t//Cargo las listas de ordenes desde 0 al orden definido en la configuración\r\n\t\tOrden ordenContexto;\r\n\t\tfor (int i = 0; i <= this.orden; i++) {\r\n\t\t\tordenContexto = new Orden();\r\n\t\t\tthis.listaOrdenes.add(ordenContexto);\r\n\t\t}\r\n\t}", "public void listarTodosLosVideojuegosRegistrados()\n {\n System.out.println(\"Videojuegos disponibles: \");\n for(Videojuegos videojuego : listaDeVideojuegos) {\n System.out.println(videojuego.getDatosVideojuego());\n }\n }", "private void setReglas(Element element) {\r\n\t\tMuestraRequerimientoInformatico req = (MuestraRequerimientoInformatico)getReq();\r\n\t\t//regla padre\r\n\t\tElement reglas = new Element(\"N_Reglas\");\r\n\t\tsetRegla(req.getRegla(), reglas);\r\n\t\t//subreglas\r\n\t\tif(req.getSubReglas() != null){\r\n\t\t\tfor(IVersionableRegla regla : req.getSubReglas()){\r\n\t\t\t\tsetRegla(regla, reglas);\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telement.addContent(reglas);\r\n\t}", "public List<GrupoLocalResponse> buscarTodos();", "public void borrarListas() {\n\n\t\tthis.jugadoresEnMesa = new ArrayList<Jugador>();\n\t\tListaJugadores.jugadoresRetirados = new ArrayList<Jugador>();\n\n\t}", "public void setListRegisseure( List<Person> listRegisseure ) {\n\t\tthis.listRegisseure.clear();\n\t\tthis.listRegisseure.addAll( listRegisseure );\n\t}", "public void listaFuncionarios() {\n this.telaFuncionario.mensagemListaFuncionarios();\n for (Funcionario funcionarioCadastrado : funcionarioDAO.getList()) { //funcionariosDAO list - coloca tudo em um arrayzao e depois manda pra tela\n int matricula = funcionarioCadastrado.getMatricula();\n String nome = funcionarioCadastrado.getNome();\n String dataNascimento = funcionarioCadastrado.getDataNascimento();\n int telefone = funcionarioCadastrado.getTelefone();\n int salario = funcionarioCadastrado.getSalario();\n Cargo cargo = funcionarioCadastrado.getCargo();\n this.telaFuncionario.exibeFuncionario(matricula, nome, dataNascimento, telefone, salario, cargo);\n }\n exibeMenuFuncionario();\n }", "public Collection<OrdenCompra> traerTodasLasOrdenesDeCompra() {\n Collection<OrdenCompra> resultado = null;\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n resultado = controlOC.traerTodasLasOrdenesDeCompra();\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return resultado;\n }", "public List<ReceitaDTO> listarReceitas() {\n return receitaOpenHelper.listar();\n }", "private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }", "public void 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}", "List<Oficios> buscarActivas();", "public static ArrayList<String> getReglesNoms() throws IOException{\n return ctrl_Persistencia.llistaFitxers(\"@../../Dades\",\"regles\");\n }", "public void notificarTodos(){\n for (Observer observer : list) {\n observer.notificar();\n }\n }", "public void listar() {\n\t\t\n\t}", "private void habilitarCamposModif() {\n\n listarPromotoresModif();\n //limpiarListaCrear();\n }", "public void importaRegole(String file, ArrayList<Sensore> listaSensori, ArrayList<Attuatore> listaAttuatori) {\n ArrayList<String> nomiDispPres = new ArrayList<>();\n\n for (Sensore s : listaSensori) {\n nomiDispPres.add(s.getNome());\n }\n\n for (Attuatore att : listaAttuatori) {\n nomiDispPres.add(att.getNome());\n }\n\n String regoleImport = readFromFile(file);\n\n if (regoleImport.equals(\"\")) {\n System.out.println(\"XX Errore di lettura file. Non sono state inserite regole per l'unita immobiliare XX\\n\");\n return;\n }\n\n String[] regole = regoleImport.split(\"\\n\");\n\n for (String r : regole) {\n try {\n ArrayList<String> dispTrovati = verificaCompRegola(r);\n\n for (String nomeDis : dispTrovati) {\n if (nomeDis.contains(\".\")){\n String nomeS = nomeDis.split(\"\\\\.\")[0];\n\n if (!nomiDispPres.contains(nomeS)) {\n throw new Exception(\"XX Dispositivi Incompatibili all'interno della regola XX\\n\");\n }\n\n Sensore s = listaSensori.stream().filter(sensore -> sensore.getNome().equals(nomeS)).iterator().next();\n String nomeInfo = nomeDis.split(\"\\\\.\")[1];\n\n if (s.getInformazione(nomeInfo) == null)\n throw new Exception(\"XX Regola non compatibile XX\\n\");\n\n\n } else if (!nomiDispPres.contains(nomeDis)) {\n throw new Exception(\"XX Dispositivi Incompatibili all'interno della regola XX\\n\");\n\n }\n }\n System.out.println(\"*** Importazione della regola avvenuta con successo ***\\n\");\n writeRuleToFile(r, true);\n\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n\n }\n eliminaDoppie(listaSensori,listaAttuatori);\n }", "public List<Person> getListRegisseure() {\n\t\treturn this.listRegisseure;\n\t}", "private void formatarPendencias(List<Pendencia> registos) {\n\n if(registos.size() == 0) {\n\n Bundle bundle = getIntent().getExtras();\n\n if(bundle != null){\n viewModel.obterUpload(PreferenciasUtil.obterIdUtilizador(this), bundle.getLong(getString(R.string.argumento_data)), handlerNotificacoesUI);\n }\n else{\n viewModel.obterUpload(PreferenciasUtil.obterIdUtilizador(this), handlerNotificacoesUI);\n }\n }\n else{\n activityUploadBinding.lnrLytProgresso.setVisibility(View.GONE);\n dialogo.alerta(getString(R.string.pendencias), getString(R.string.pendencias_tarefas_upload));\n }\n }", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "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 }", "private void getRecepcionSeros(){\n mRecepcionSeros = estudioAdapter.getListaRecepcionSeroSinEnviar();\n //ca.close();\n }", "public void armarPreguntas(){\n preguntas = file.listaPreguntas(\"Preguntas.txt\");\n }", "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<EntradaDeMaterial> buscarEntradasDisponibles(Almacen a);", "public ObservableList<String> AbmCorreos() {\n\t\t// crea un nuevo observable list\n\t\tObservableList<String> items = FXCollections.observableArrayList();\n\t\titems.addAll(\"Cargar Plantilla\", \"Mostrar Plantillas\");\n\t\treturn items;\n\t}", "@Override\n\tpublic HashSet<Registro> listDisponible() throws Exception {\n\t\treturn null;\n\t}", "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 }", "public void listadoCarreras() {\r\n try {\r\n this.sessionProyecto.getCarreras().clear();\r\n this.sessionProyecto.getFilterCarreras().clear();\r\n this.sessionProyecto.getCarreras().addAll(sessionUsuarioCarrera.getCarreras());\r\n this.sessionProyecto.setFilterCarreras(this.sessionProyecto.getCarreras());\r\n } catch (Exception e) {\r\n }\r\n }", "private void reestablecerComponentes()\n {\n tokenslist = new LinkedList<LineaToken>();\n tokenslistErrores = new LinkedList<LineaToken>();\n info_tabla_tokens.clear();\n info_tabla_errores.clear();\n ta_errores_sintacticos_id.clear();\n ta_errores_semanticos_id.clear();\n ta_tabla_simbolos_id.clear();\n ta_codigo_ensamblador_id.clear();\n Generador.contadorEtiq = 1;\n Generador.etiqAnterior = \"L0\";\n EliminarArchivoASM();\n }", "private void tokenizar(){\r\n String patron = \"(?<token>[\\\\(]|\\\\d+|[-+\\\\*/%^]|[\\\\)])\";\r\n Pattern pattern = Pattern.compile(patron);\r\n Matcher matcher = pattern.matcher(this.operacion);\r\n \r\n String token;\r\n \r\n while(matcher.find()){\r\n token = matcher.group(\"token\");\r\n tokens.add(token);\r\n \r\n }\r\n \r\n }", "protected List<String> listaVociCorrelate() {\n return null;\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 ArrayList<String> mostraRegles(){\n ArrayList<String> tauleta = new ArrayList<>();\n String aux = reg.getAssignacions().get(0).getAntecedents().getRangs().get(0).getNom();\n for (int i=1; i<list.getAtribs().size(); i++){\n aux += \"\\t\" + list.getAtribs().get(i).getNom();\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = list.getAtribs().get(0).getCasos().get(j);\n for (int i = 1; i < list.getAtribs().size(); i++) {\n aux += \"\\t\" + list.getAtribs().get(i).getCasos().get(j);\n }\n tauleta.add(aux);\n }\n return tauleta;\n }", "public List<LocalCentroComercial> consultarLocalesCentroComercialRegistrados();", "private void mostrarLibros() {\n dlmLibros.clear();\n for (Libro libro : modelo.getLibros()) {\n dlmLibros.addElement(libro);\n }\n seleccionarLibrosOriginales();\n }", "public void reiniciarLista(){\n lista_inicializada = false;\n }", "List<Matricula> listarMatriculas();", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Inscripcion.findAll\", null);\n }", "public List<NotaDeCredito> procesar();", "public String regresar() {\n reglaNavegacionDirecta(LISTA_MENSAJE);\n return null;\n }", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Curso.findAll\", null);\n }", "@Override\r\n\tpublic void deplacerRobot(ArrayList<Robot> listeRobot) {\n\t\t\r\n\t}", "private void buscarLista(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "public ArrayList<String> listarProgramas();", "public static void leerRegistros() {\n\n try { // Entrada a registros del archivo\n Scanner entrada = new Scanner(new File(\"data/tabula-FWC_2018_\"\n + \"Squadlists_4.csv\"));\n // Variables\n int cont = 0;\n double goals = 0;\n double totalG = 0;\n double height = 0;\n double totalH = 0;\n double promG = 0;\n double promH = 0;\n\n while (entrada.hasNext()) {\n String linea = entrada.nextLine();\n\n ArrayList<String> linea_partes = new ArrayList<>(\n Arrays.asList(linea.split(\"\\\\|\")));\n\n // Tomando las posiciones\n goals = Double.parseDouble(linea_partes.get(11)); \n height = Double.parseDouble(linea_partes.get(9));\n\n totalG = goals + totalG; // Cálculo de total de goles\n totalH = height + totalH; // Cálculo del total de estatura\n\n cont = cont + 1;\n }\n // Cálculo de promedios\n promG = totalG / cont; \n promH = totalH / cont;\n\n System.out.printf(\"El promedio de goles es: %.2f\\nEl promedio de \"\n + \"estatura es: %.2f\", promG, promH);\n entrada.close();\n } catch (Exception e) {\n System.err.println(\"Error al leer del archivo.\");\n System.exit(1);\n } // fin de catch\n }", "private List<RhFuncionario> getFuncionarios()\n {\n System.out.println(\"supiEscalaFacade.findEnfermeiros():\"+supiEscalaFacade.findEnfermeiros());\n return supiEscalaFacade.findEnfermeiros();\n }", "public ArrayList<Equipamento> todos() {\n return new ArrayList<>(lista.values());\n }", "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}", "public void BuscarGrupo() {\r\n try {\r\n // Inicializamos la tabla para refrescar todos los datos contenidos.\r\n InicializarTabla(_escuchador.session);\r\n Transaction tx = _escuchador.session.beginTransaction();\r\n List<Cursos> tabla=rsmodel.lista;\r\n List<Cursos> borrados = new <Cursos>ArrayList();\r\n if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Todos los campos\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase()) && !obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Código del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Nombre del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n tabla.removeAll(borrados);\r\n tx.commit();\r\n if(tabla.isEmpty()){tabla.add(new Cursos(null));}\r\n rs=tabla;\r\n ControladorTabla registrosBuscados = new ControladorTabla(tabla);\r\n menuCursos.getTablaCursos().setModel(registrosBuscados);\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, e, \"Excepción\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public ArrayList<String> Info_Disc_Mus_Compras(String genero) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Mus_Rep1(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Musica.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3])) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }", "private static List<Module> ajoutModulesEtudiant(List<String> dataEtudiant){\n\t\tList<Module> modules = new ArrayList<Module>();\n\t\tList<String> dataSemestreEtudiant = new ArrayList<String>(); //donnees d'un semestre de l'etudiant\n\t\tboolean enSemestre = false;\n\t\tIterator<String> it = dataEtudiant.iterator();\n\t\twhile (it.hasNext()) {//on parcourt les donnees\n\t\t\tString data = it.next();\n\t\t\tif(RecherchePattern.rechercheDebutSemestre(data)){\t//pour le premier semestre\n\t\t\t\tenSemestre = true;\n\t\t\t}\n\t\t\tif(enSemestre){//si on est dans la zone de semestres\n\t\t\t\tif(RecherchePattern.rechercheFinSemestre(data)){//si on est a la fin du semestre\n\t\t\t\t\tnbSemestres++; //on ajute un semestre a l'etudiant\n\t\t\t\t\tmodules.addAll(creationModulesSemestre(dataSemestreEtudiant));\n\t\t\t\t\tdataSemestreEtudiant = new ArrayList<String>();// on reset les donnees\n\t\t\t\t\tenSemestre=false;\n\t\t\t\t}\n\t\t\t\telse{//si on est dans la zone semestre\n\t\t\t\t\tdataSemestreEtudiant.add(data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn modules;\n\t}", "private void formatarUploads(List<Upload> registos) {\n\n if(registos.size() == 0) {\n\n OnDialogoListener listener = new OnDialogoListener() {\n @Override\n public void onExecutar() {\n finish();\n }\n };\n\n dialogo.alerta(getString(R.string.upload), getString(R.string.upload_dados_inexistentes), listener);\n activityUploadBinding.lnrLytProgresso.setVisibility(View.GONE);\n }\n else{\n activityUploadBinding.lnrLytProgresso.setVisibility(View.VISIBLE);\n }\n }", "public List<Tripulante> buscarTodosTripulantes();", "public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}", "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 static void ExibirResumo(Registro registros[]) {\n for (Registro registro : registros) {\n System.out.println(registro.toStringSummary());\n }\n }", "public List<String> verCarrito(){\n\t\treturn this.compras;\n\t}", "private void listViewPendentes(List<Compra> listAll) {\n\t\t\n\t}", "private void cargarMallas() {\n\tmallas.clear();\n\ttry {\n\t mallas = registroServicio.obtenerMallaCurricular(infoCarreraDto);\n\t} catch (Exception e) {\n\t e.printStackTrace();\n\t return;\n\t}\n }", "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 }", "private void enlistar(ArrayList<Caracter> caracteres){\n for (int i = 0; i < caracteres.size(); i++) {\n insertaOrdenado(new NodoCaracter((Caracter) caracteres.get(i)));\n }\n }", "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 }", "List<TipoHuella> listarTipoHuellas();", "public ArrayList<String> getModelos(String marca){\n \n ArrayList<String> modelos;\n modelos = modeloscarros.getModelo(marca);\n return modelos;\n }", "public ArrayList<Libro> recuperaTodos();", "List<T> buscarTodosComNomeLower();", "private void getMuestras(){\n mMuestras = estudioAdapter.getListaMuestrasSinEnviar();\n //ca.close();\n }", "public void carregarRegistro() {\n\t\tlimpar();\n\t\t\n\t\tlistaAlunos = repository.encontrarComQueryNomeada(AlunosMilitaresOMDS.class, \"alunosMilitaresOMDS.listarPorOMEPeriodo\",\n\t\t\t\tnew Object[]{\"periodo\", periodo},\n\t\t\t\tnew Object[]{\"organizacao\", subordinado},\n\t\t\t\tnew Object[]{\"ano\", anoSelecionado});\n\t\t\n\t\tif(listaAlunos.size() > 0) {\n\t\t\tlistaAlunos.forEach(efetivo ->{\n\t\t\t\tif (efetivo.getTipoAlunosMilitaresOMDS().equals(TipoAlunosMilitaresOMDS.OFICIAL))\n\t\t\t\t\tsetAlunosMilitarOficial(efetivo);\n\t\t\t\tif(efetivo.getTipoAlunosMilitaresOMDS().equals(TipoAlunosMilitaresOMDS.PRACA))\n\t\t\t\t\tsetAlunosMilitarPraca(efetivo);\n\t\t\t});\n\t\t\thabilitaBotao=false;\n\t\t}\n\t\torganizarValores();\n\t}", "@Override\n\tpublic List<Tramite_informesem> lista() {\n\t\treturn tramite_informesemDao.lista();\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 eventoFiltrar() {\n if (index >= 0) {\n if (tipoLista == 0) {\n tipoLista = 1;\n }\n RequestContext context = RequestContext.getCurrentInstance();\n infoRegistro = \"Cantidad de registros : \" + filtrarListFormulasProcesos.size();\n context.update(\"form:informacionRegistro\");\n }\n }", "public ArrayList<String> listarEdiciones(String nomCurso) throws CursoExcepcion;", "public ArrayList<String> Info_Disc_Pel_Compras(String genero) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep4(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3])) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }", "public void solicitarRutinasPorDia() {\n eliminarTodasRutinas();\n\n }", "public void searchAll() {\r\n\t\tconfiguracionUoDet = new ConfiguracionUoDet();\r\n\t\tidConfiguracionUoDet = null;\r\n\t\tidBarrio = null;\r\n\t\tidCiudad = null;\r\n\t\tidCpt = null;\r\n\t\tidDpto = null;\r\n\t\tmodalidadOcupacion = null;\r\n\t\tcodigoUnidOrgDep = null;\r\n\t\tdenominacion = null;\r\n\t\tllenarListado1();\r\n\t}", "public String mensagemDeRegistros(){//METODO QUE DIZ INICIO E FIM DOS REGISTROS LISTADOS\r\n\t\treturn dao.getMensagemNavegacao();\r\n\t}", "@Override\n\tpublic List<ControlAcceso> registroUsers(String fecha, int codigo) {\n\t\treturn controlA.registroUsers(fecha, codigo);\n\t}", "public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }", "@Override\n\tpublic List<RegistrationForm> findAll(int start, int num) {\n\t\tlogger.info(\"select all registration form\");\n\t\treturn rfi.findAll(start, num);\n\t}", "private void createGenres() {\n ArrayList<String> gen = new ArrayList<>();\n //\n for (Movie mov : moviedb.getAllMovies()) {\n for (String genre : mov.getGenre()) {\n if (!gen.contains(genre.toLowerCase()))\n gen.add(genre.toLowerCase());\n }\n }\n\n Collections.sort(gen);\n\n genres = gen;\n }", "public static void main(String[] args) {\n Perro perro = new Perro(1, \"Juanito\", \"Frespuder\", 'M');\n Gato gato = new Gato(2, \"Catya\", \"Egipcio\", 'F', true);\n Tortuga paquita = new Tortuga(3, \"Pquita\", \"Terracota\", 'F', 12345857);\n\n SetJuego equipo = new SetJuego(4, \"Gato equipo\", 199900, \"Variado\", \"16*16*60\", 15, \"Gatos\");\n PelotaMorder pelotita = new PelotaMorder(1, \"bola loca\", 15000, \"Azul\", \"60 diam\");\n\n System.out.println(perro.toString());//ToString original de \"mascotas\"\n System.out.println(gato.toString());//ToString sobrescrito\n System.out.println(paquita.toString());\n\n System.out.println(equipo);//ToString sobrescrito (tambien se ejecuta sin especificarlo)\n System.out.println(pelotita.toString());//Original de \"Juguetes\"\n\n //metodos clase mascota\n perro.darCredito();//aplicado de la interface darcredito\n paquita.darDeAlta(\"Terracota\",\"Paquita\");\n equipo.devolucion(4,\"Gato Equipo\");\n\n //vamos a crear un arraylist\n ArrayList<String> servicios = new ArrayList<String>();\n servicios.add(\"Inyectologia\");\n servicios.add(\"Peluqueria\");\n servicios.add(\"Baño\");\n servicios.add(\"Desparacitacion\");\n servicios.add(\"Castracion\");\n\n System.out.println(\"Lista de servicios: \" + servicios + \", con un total de \" + servicios.size());\n\n servicios.remove(3);//removemos el indice 3 \"Desparacitacion\"\n\n System.out.println(\"Se ha removido un servicio..................\");\n System.out.println(\"Lista de servicios: \" + servicios + \", con un total de \" + servicios.size());\n\n\n //creamos un vector\n Vector<String> promociones = new Vector<String>();\n\n promociones.addElement(\"Dia perruno\");\n promociones.addElement(\"Gatutodo\");\n promociones.addElement(\"10% Descuento disfraz de perro\");\n promociones.addElement(\"Jornada de vacunacion\");\n promociones.addElement(\"Serpiente-Promo\");\n\n System.out.println(\"Lista de promos: \" + promociones);\n System.out.println(\"Total de promos: \" + promociones.size());\n\n promociones.remove(4);//removemos 4 \"Serpiente-Promo\"\n System.out.println(\"Se ha removido una promocion..................\");\n\n System.out.println(\"Lista de promos: \" + promociones);\n System.out.println(\"Total de promos: \" + promociones.size());\n\n String[] dias_Semana = {\"Lunes\",\"Martes\",\"Miercoles\",\"Jueves\",\"Viernes\", \"Sabado\",\"Domingo\"};\n\n try{\n System.out.println(\"Elemento 6 de servicios: \" + dias_Semana[8]);\n } catch (ArrayIndexOutOfBoundsException e){\n System.out.println(\"Ey te pasaste del indice, solo hay 5 elementos\");\n } catch (Exception e){\n System.out.println(\"Algo paso, el problema es que no se que...\");\n System.out.println(\"La siguiente linea ayudara a ver el error\");\n e.printStackTrace();//solo para desarrolladores\n }finally {\n System.out.println(\"------------------------El curso termino! Pero sigue el de Intro a Android!!!!--------------------------\");\n }\n\n }", "private List<RhFuncionario> getFuncionariosMedicos()\n {\n System.out.println(\"supiEscalaFacade.findMedicos():\"+supiEscalaFacade.findMedicos());\n return supiEscalaFacade.findMedicos();\n }", "public void cargarNombre() {\n\n System.out.println(\"Indique nombre del alumno\");\n nombre = leer.next();\n nombres.add(nombre);\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 void afficherListeNoms(){\r\n\t\tfor (String nom: noms){\r\n\t\t\tSystem.out.println(nom);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void afterRegister(List<Element> list) {\n\n\t}", "public void transcribir() \r\n\t{\r\n\t\tpalabras = new ArrayList<List<CruciCasillas>>();\r\n\t\tmanejadorArchivos = new CruciSerializacion();\r\n\t\tint contador = 0;\r\n\t\t\r\n\t\tmanejadorArchivos.leer(\"src/Archivos/crucigrama.txt\");\r\n\t\t\r\n\t\tfor(int x = 0;x<manejadorArchivos.getPalabras().size();x++){\r\n\t\t\t\r\n\t\t\tcontador++;\r\n\t\t\t\r\n\t\t\tif (contador == 4) {\r\n\t\t\t\r\n\t\t\t\tList<CruciCasillas> generico = new ArrayList<CruciCasillas>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 0; y < manejadorArchivos.getPalabras().get(x).length();y++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tgenerico.add(new CruciCasillas(manejadorArchivos.getPalabras().get(x).charAt(y)));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (y == (manejadorArchivos.getPalabras().get(x).length() - 1)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpalabras.add(generico);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tcontador = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public void Mini_Parser(){\n Lista_ER Nuevo=null;\n String Nombre=\"\";\n String Contenido=\"\";\n ArrayList<String> tem = new ArrayList<String>();\n //este boleano sirve para concatenar la expresion regular\n int Estado=0;\n for (int x = 0; x < L_Tokens.size(); x++) {\n switch(Estado){\n //ESTADO 0\n case 0:\n //Conjuntos\n if(L_Tokens.get(x).getLexema().equals(\"CONJ\")){\n if(L_Tokens.get(x+1).getLexema().equals(\":\")){\n if(L_Tokens.get(x+2).getDescripcion().equals(\"Identificador\")){\n //Son conjuntos \n Nombre=L_Tokens.get(x+2).getLexema();\n Estado=1;\n x=x+4;\n }\n }\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n //pasaa estado de expresion regular\n Nombre=L_Tokens.get(x).getLexema();\n Estado=2;\n }\n break;\n \n case 1:\n //ESTADO 1\n //Concatena los conjuntos\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Digito\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n for(int i=6;i<=37;i++){\n if(L_Tokens.get(x).getID()==i){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n }\n //conjunto sin llaves\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n if(L_Tokens.get(x-1).getLexema().equals(\",\")){\n }else{\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n Estado=0;\n Contenido=\"\";\n\n }\n }else{\n Contenido+=L_Tokens.get(x).getLexema();\n }\n \n\n break;\n case 2:\n //ESTADO 2\n if(L_Tokens.get(x).getLexema().equals(\"-\")){\n if(L_Tokens.get(x+1).getLexema().equals(\">\")){\n //se mira que es expresion regular\n \n Lista_ER nuevo=new Lista_ER(L_Tokens.get(x-1).getLexema());\n Nuevo=nuevo;\n L_Tokens_ER.add(nuevo);\n x++;\n Estado=3;\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\":\")){\n //se mira que es lexema\n Estado=4;\n }\n break;\n case 3: \n //ESTADO 3\n //Concatenacion de Expresion Regular\n \n //System.out.println(\"---------------------------------\"+ L_Tokens.get(x).getLexema());\n if(L_Tokens.get(x).getDescripcion().equals(\"Punto\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Barra Vetical\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Interrogacion\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Asterisco\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Signo Mas\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Lexema de Entrada\")){ \n String tem1='\"'+L_Tokens.get(x).getLexema()+'\"';\n Nuevo.setER(tem1);\n \n }\n if(L_Tokens.get(x).getLexema().equals(\"{\")){ \n String tem1=\"\";\n if(L_Tokens.get(x+2).getLexema().equals(\"}\")){\n tem1=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n Nuevo.setER(tem1);\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n Estado=0;\n }\n break;\n case 4:\n// System.out.println(L_Tokens.get(x).getLexema());\n Contenido=L_Tokens.get(x+1).getLexema();\n L_Tokens_Lex.add(new Lista_LexemasE(L_Tokens.get(x-2).getLexema(), Contenido));\n Estado=0;\n \n break;\n }//fin switch\n }//Fin for\n }" ]
[ "0.7191243", "0.6155988", "0.6055079", "0.60520613", "0.5880459", "0.5850659", "0.5832921", "0.5798411", "0.5786416", "0.57837075", "0.5777163", "0.5775584", "0.5746515", "0.5746351", "0.5745456", "0.5711531", "0.571095", "0.5709421", "0.5707482", "0.5706424", "0.56977475", "0.56902313", "0.56736517", "0.56651455", "0.56430835", "0.5638283", "0.56166697", "0.5608025", "0.5604799", "0.5574684", "0.5572128", "0.5565919", "0.5564151", "0.55536854", "0.55472755", "0.5539135", "0.5533247", "0.55299574", "0.5494599", "0.54909027", "0.54763114", "0.5471284", "0.5469569", "0.5458609", "0.5444587", "0.5438015", "0.5433442", "0.5431635", "0.5425475", "0.5420052", "0.54122984", "0.53994876", "0.53934187", "0.5389827", "0.5386575", "0.5386397", "0.53831375", "0.53822196", "0.53804064", "0.53621817", "0.5360278", "0.53540367", "0.53510123", "0.5340492", "0.53392136", "0.53381854", "0.5335839", "0.532955", "0.53276485", "0.53274775", "0.5324135", "0.5322694", "0.5321527", "0.5321512", "0.5320444", "0.5318861", "0.5315508", "0.5315122", "0.53125215", "0.5311577", "0.5307685", "0.53067666", "0.52956975", "0.5294373", "0.5292129", "0.52909553", "0.5284081", "0.527715", "0.52744776", "0.52740633", "0.52727103", "0.5270276", "0.5266013", "0.52658916", "0.52610874", "0.52566004", "0.525061", "0.52502215", "0.52447015", "0.5244406", "0.5242958" ]
0.0
-1
obtiene un registro con su identidicador
void iniciarOperacion() throws DAOException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "ParqueaderoEntidad agregar(String nombre);", "TblSecuencia findByIdSecuencia(long idSecuencia );", "AuditoriaUsuario find(Object id);", "public void findbyid() throws Exception {\n try {\n Con_contadorDAO con_contadorDAO = getCon_contadorDAO();\n List<Con_contadorT> listTemp = con_contadorDAO.getByPK( con_contadorT);\n\n con_contadorT= listTemp.size()>0?listTemp.get(0):new Con_contadorT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }", "@Override\n public Asesor getAsesorId(int idUsuarioSistema){\n Asesor asesor = null;\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor where idUsuarioSistema =?\");\n orden.setInt(1, idUsuarioSistema);\n ResultSet resultadoConsulta = orden.executeQuery();\n if(resultadoConsulta.first()){\n String nombre;\n String idioma;\n String correo;\n String telefono;\n String numeroPersonal;\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n numeroPersonal = resultadoConsulta.getString(1);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n }else{\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"No se encuentra el asesor\");\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return asesor;\n }", "Usuario findById(long id);", "@Override\n\n public void run(String... strings) throws Exception {\n \n Usuario u= new Usuario(1521L, \"Viridiana Hernandez\",\"[email protected]\");\n \n //la guardamos\n \n // repoUsu.save(u);\n \n //GENERAMOS LA DIRECCION QUE VAMOS A GUARDAR\n \n Direccion d = new Direccion(new Usuario(1521L),\"Calle 13\", 55120, \"Ecatepec\");\n //repoDir.save(d);\n \n \n //AQUI HAREMOS EL JOIN\n \n \n Direccion d2= repoDir.findOne(2L);\n System.out.println(\"Correo:\"+d2.getU().getEmail()+ \" municipio \"+d2.getMunicipio());\n \n \n \n \n \n \n //repoMensa.save (new Mensajito(\"Primero\",\"Mi primera vez con hibernate\"))\n /*\n Mensajito m= repoMensa.findOne(1);\n System.out.println(m.getTitulo());\n \n \n \n // repoMensa.save(new Mensajito(\"17 de octubre\",\"No temblo\"));\n System.out.println(\"vamos a uscar todos\");\n \n for (Mensajito mensa:repoMensa.findAll()){\n System.out.println(mensa);\n \n }\n \n //para buscar por id FINDONE\n System.out.println(\"vamos a buscar por id\");\n System.out.println(repoMensa.findOne(1));\n \n \n // Actualizar \n repoMensa.save(new Mensajito(1,\"nuevo titulo\",\"nuevo cuerpo\"));\n System.out.println(repoMensa.findOne(1));\n*/\n }", "public Usuario findbyIdUsuario(Long idUsr){\n\t\t\t\t em.getTransaction().begin();\n\t\t\t\t Usuario u= em.find(Usuario.class, idUsr);\n\t\t\t\t em.getTransaction().commit();\n\t\t\t\t return u;\n\t\t\t }", "public Long getId() {\r\n return idComentario;\r\n }", "public Integer obterIdEmpresaPorRota(Rota rota) throws ErroRepositorioException;", "public void registro(View v) {\n\t\tsubeUsuario();\n\t\tif (userId == -1) { // si es nuevo\n\t\t\tfinish(); // hay que dejar que el server devuelva el id y leerlo\n\t\t}\n\t}", "Empleado findById(Integer id);", "ParUsuarios selectByPrimaryKey(Integer id);", "O obtener(PK id) throws DAOException;", "public Cliente carregarPorId(int id) throws Exception {\n \n Cliente c = new Cliente();\n String sql = \"SELECT * FROM cliente WHERE idCliente = ?\";\n PreparedStatement pst = conn.prepareStatement(sql);\n pst.setInt(1, id);\n ResultSet rs = pst.executeQuery();\n if (rs.next()) {\n c.setIdCliente(rs.getInt(\"idCliente\"));\n c.setEndereco(rs.getString(\"endereco\"));\n c.setCidade(rs.getString(\"cidade\"));\n c.setDdd(rs.getInt(\"ddd\"));\n c.setNome(rs.getString(\"nome\"));\n c.setUf(rs.getString(\"uf\"));\n c.setTelefone(rs.getString(\"telefone\"));\n Empresa e = new Empresa();\n EmpresaDAO ePB = new EmpresaDAO();\n ePB.conectar();\n e = ePB.carregarPorCnpj(rs.getString(\"Empresa_cnpj\"));\n ePB.desconectar();\n Usuario p = new Usuario();\n UsuarioDAO pPB = new UsuarioDAO();\n pPB.conectar();\n p = pPB.carregarPorId(rs.getInt(\"Usuario_idUsuario\"));\n pPB.desconectar();\n c.setEmpresa(e);\n c.setUsuario(p);\n }\n return c;\n }", "public Entidad obtenerEntidadPorId(Class<Entidad> clase, Serializable id) throws Exception;", "public Coche consultarUno(int id) {\n Coche coche =cochedao.consultarUno(id);\r\n \r\n return coche;\r\n }", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "UsuarioDetalle cargaDetalle(int id);", "public RecepcionSero getSerologiaById(String id)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n Query query = session.createQuery(\"from RecepcionSero s where s.id= :id \");\n query.setParameter(\"id\", id);\n return (RecepcionSero) query.uniqueResult();\n }", "Movimiento selectByPrimaryKey(Integer idMovCta);", "public RespuestaDTO registrarUsuario(Connection conexion, UsuarioDTO usuario) throws SQLException {\n PreparedStatement ps = null;\n ResultSet rs = null;\n int nRows = 0;\n StringBuilder cadSQL = null; //para crear el ddl \n RespuestaDTO registro = null;\n \n try {\n registro = new RespuestaDTO();\n System.out.println(\"usuario----\" + usuario.toStringJson());\n cadSQL = new StringBuilder();\n cadSQL.append(\" INSERT INTO usuario(usua_correo, usua_usuario,tius_id, usua_clave)\");\n cadSQL.append(\" VALUES (?, ?, ?, SHA2(?,256)) \");\n \n ps = conexion.prepareStatement(cadSQL.toString(), Statement.RETURN_GENERATED_KEYS);\n \n AsignaAtributoStatement.setString(1, usuario.getCorreo(), ps);// se envian los datos a los ?, el orden importa mucho\n AsignaAtributoStatement.setString(2, usuario.getUsuario(), ps);\n AsignaAtributoStatement.setString(3, usuario.getIdTipoUsuario(), ps);\n AsignaAtributoStatement.setString(4, usuario.getClave(), ps);\n \n nRows = ps.executeUpdate(); // ejecuta el proceso\n if (nRows > 0) { //nRows es el numero de filas que hubo de movimiento, es decir si hizo el registro, con este if se sabe\n rs = ps.getGeneratedKeys(); // esto se usa para capturar el id recien ingresado en caso de necesitarlo despues\n if (rs.next()) {\n registro.setRegistro(true);\n registro.setIdResgistrado(rs.getString(1)); // guardo el id en en este atributo del objeto\n\n }\n // cerramos los rs y ps\n ps.close();\n ps = null;\n rs.close();\n rs = null;\n }\n } catch (SQLException se) {\n LoggerMessage.getInstancia().loggerMessageException(se);\n return null;\n }\n return registro;\n }", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Usuario listarPorId(Usuario entidad) throws Exception {\n\t\tList<Usuario> lista = new ArrayList<>();\n\n\t\tQuery query = entityManager.createQuery(\"from Usuario c where c.id = ?1\");\n\t\tquery.setParameter(1, entidad.getId());\n\n\t\tlista = (List<Usuario>) query.getResultList();\n\n\t\tUsuario Usuario = new Usuario();\n\n\t\t// Nos aseguramos que exista un valor para retornar\n\t\tif (lista != null && !lista.isEmpty()) {\n\t\t\tUsuario = lista.get(0);\n\t\t}\n\n\t\treturn Usuario;\n\t}", "public Usuario recuperarUsuario(long ID) throws AbadiaException {\r\n String sSQL = \"Select * From usuario Where USUARIOID = ?\";\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n try {\r\n ps = con.prepareStatement(sSQL);\r\n ps.setLong(1, ID);\r\n rs = ps.executeQuery();\r\n if (rs.next()) {\r\n // añadir la clase\r\n Usuario usuario = new Usuario();\r\n usuario.setIdDeUsuario(rs.getInt(\"USUARIOID\")); // El nick ya existe\r\n usuario.setNombre(rs.getString(\"NOMBRE\"));\r\n usuario.setPrimerApellido(rs.getString(\"APELLIDO1\"));\r\n usuario.setSegundoApellido(rs.getString(\"APELLIDO2\"));\r\n usuario.setNick(rs.getString(\"NICK\"));\r\n usuario.setEmail(rs.getString(\"EMAIL\"));\r\n usuario.setIdDeIdioma(rs.getShort(\"IDIOMAID\"));\r\n usuario.setContrasena(rs.getString(\"CONTRASENA\"));\r\n usuario.setAdministrador(rs.getLong(\"USUARIO_TIPO\"));\r\n usuario.setRegistrado(rs.getLong(\"REGISTRADO\"));\r\n usuario.setBloqueado(getBloqueado(usuario.getIdDeUsuario()));\r\n usuario.setCongelado(rs.getShort(\"Abadia_congelada\"));\r\n usuario.setPais(rs.getInt(\"PAIS\"));\r\n usuario.setEdad(rs.getInt(\"EDAD\"));\r\n usuario.setFecha_alta(rs.getString(\"FECHAALTA\"));\r\n usuario.setAceptaNormas(rs.getBoolean(\"ACEPTA_NORMAS\"));\r\n // añadirlo a la session???\r\n return usuario;\r\n } else {\r\n throw new UsuarioNoEncontradoException(\"No se ha encontrado el usuario\", null, log);\r\n }\r\n } catch (SQLException e) {\r\n throw new AbadiaSQLException(\"adUsuario. recuperarUsuario. SQLException.\", e, log);\r\n } finally {\r\n DBMSUtils.cerrarObjetoSQL(rs);\r\n DBMSUtils.cerrarObjetoSQL(ps);\r\n }\r\n }", "DetalleVenta buscarDetalleVentaPorId(Long id) throws Exception;", "@Transactional(readOnly = true)\n DataRistorante getByID(String id);", "public void setId_usuario(String usuario) {\n this.id_usuario = usuario;\n }", "public Edificio( String id )\n {\n identificador = id;\n salones = new ArrayList<Salon>( );\n }", "Persona buscarPersonaPorId(Long id) throws Exception;", "@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }", "public int getIdUsuario() {\n return idUsuario;\n }", "@Override\n public Venda Buscar(int id) {\n Venda v;\n\n v = em.find(Venda.class, id);\n\n// transaction.commit();\n return v;\n }", "public java.lang.Long getUsua_id();", "public Usuario getUsuarioByID (int idUsuario) {\n Usuario usuario = null;\n Transaction trns = null;\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n trns = session.beginTransaction();\n String queryString = \"from Usuario where id_usuario = :idToFind\";\n Query query = session.createQuery(queryString);\n query.setInteger(\"idToFind\", idUsuario);\n usuario = (Usuario) query.uniqueResult();\n } catch (RuntimeException e){\n e.printStackTrace();\n } finally {\n session.flush();\n session.close();\n } \n\n return usuario;\n }", "public Cliente buscarClientePorDocumento(String id) throws ExceptionService {\n Optional<Cliente> verificar = repositorio.findById(Long.parseLong(id));\n if (verificar.isPresent()) { //verificamos que traiga un resultado\n Cliente cliente = verificar.get(); //con el get obtenemos del optional el objeto en este caso de tipo cliente\n return cliente;\n } else {\n throw new ExceptionService(\"no se encontro el cliente con el documento indicado\");\n }\n }", "public static Efectivo insertEfectivo(int id_efectivo, int numero_pago){\n \n Efectivo miEfectivo = new Efectivo(id_efectivo,numero_pago);\n miEfectivo.registrarEfectivo();\n return miEfectivo;\n }", "public void findbyid() throws Exception {\n try {\n Ume_unidade_medidaDAO ume_unidade_medidaDAO = getUme_unidade_medidaDAO();\n List<Ume_unidade_medidaT> listTemp = ume_unidade_medidaDAO.getByPK( ume_unidade_medidaT);\t \n\n ume_unidade_medidaT= listTemp.size()>0?listTemp.get(0):new Ume_unidade_medidaT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }", "int getIdRondaCancion(Cancion cancion,Date fecha) throws ExceptionDao;", "Especialidad getEspecialidadPorId(Integer especialidadId);", "Prueba selectByPrimaryKey(Integer id);", "public Cliente findByPrimaryKey(int idCliente) throws ClienteDaoException;", "public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}", "public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}", "@Override\n public boolean insertar(ModelCliente cliente) {\n strSql = \"INSERT INTO CLIENTE (ID_CLIENTE, NOMBRE, APELLIDO, NIT, TELEFONO, DIRECCION,ID_EMPRESA) \"\n + \"VALUES ( (SELECT ISNULL(MAX(ID_CLIENTE),0) + 1 FROM CLIENTE), \" + \n \"'\" + cliente.getNombre() + \"', \" + \n \"'\" + cliente.getApellido()+ \"', \" + \n \"'\" + cliente.getNit() + \"', \" +\n \"'\" + cliente.getTelefono()+ \"', \" +\n \"'\" + cliente.getDireccion()+ \"',\" +\n \"\" + cliente.getIdEmpresa()+ \"\" + \n \")\";\n \n try {\n //se abre una conexión hacia la BD\n conexion.open();\n //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria\n respuesta = conexion.executeSql(strSql);\n //Se cierra la conexión hacia la BD\n conexion.close();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n return false;\n } catch(Exception ex){\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n }\n return respuesta;\n }", "public void setIdUsuario(Integer idUsuario) {\n this.idUsuario = idUsuario;\n }", "public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }", "Videogioco findVideogiocoById(int id);", "Reserva Obtener();", "public void ponerUsuarioInactivo(String idUsuario);", "public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;", "public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\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}", "@Override\n\tpublic Empresa findById(int id_empresa) {\n\t\treturn empresaJpaRepository.getOne(id_empresa);\n\t}", "@Override\n public CerereDePrietenie save(CerereDePrietenie entity) {\n\n String SQL = \"INSERT INTO cereredeprietenie(id, id_1,id_2,status,datac) VALUES(?,?,?,?,?)\";\n\n long id = 0;\n\n\n try (Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(SQL,\n Statement.RETURN_GENERATED_KEYS)) {\n\n\n pstmt.setInt(1, Math.toIntExact(entity.getId()));\n pstmt.setInt(2, Math.toIntExact(entity.getTrimite().getId()));\n pstmt.setInt(3, Math.toIntExact(entity.getPrimeste().getId()));\n pstmt.setString(4, entity.getStatus());\n pstmt.setObject(5, entity.getData());\n\n\n int affectedRows = pstmt.executeUpdate();\n // check the affected rows\n if (affectedRows > 0) {\n // get the ID back\n try (ResultSet rs = pstmt.getGeneratedKeys()) {\n if (rs.next()) {\n id = rs.getLong(1);\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n\n\n return entity;\n\n }", "@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}", "public String getIdUsuarioRegistro() {\n\t\treturn this.idUsuarioRegistro;\n\t}", "public UsuarioDTO consultarUsuario(String idAfiliado);", "private void thenLaPuedoBuscarPorSuId(Long id) {\n\tIngrediente ingredienteBuscado = session().get(Ingrediente.class, id);\t\n\tassertThat(ingredienteBuscado).isNotNull();\n\t}", "public Empleado buscarEmpleadoPorId(String identificacion){\n Empleado empleadoEncontrado = null ;\n for (int i = 0; i < listaEmpleados.size(); i++) {\n if(listaEmpleados.get(i).getIdentificacion().equalsIgnoreCase(identificacion)){\n empleadoEncontrado = listaEmpleados.get(i);\n }\n }\n return empleadoEncontrado;\n }", "SeminarioDTO findOne(Long id);", "public void localizarDados(int idOrcamento){\n OrcamentoCursoController orcamentoCursoController = new OrcamentoCursoController();\n this.orcamentocurso = orcamentoCursoController.consultar(idOrcamento);\n if (orcamentocurso!=null){\n ClienteController clienteController = new ClienteController();\n cliente = clienteController.consultar(orcamentocurso.getCliente());\n if (cliente!=null){\n parajTextField.setText(cliente.getEmail());\n }\n }\n }", "public void peleaEn(int idPeleador,int idEmpresa){\n\t\t\n\t}", "int insertSelective(ParUsuarios record);", "public void addRegistro(String nombre, String apellidos, String dni) {\r\n\t\t\r\n\t\tSession ss = Util.getSessionFactory().openSession();\r\n\t\tTransaction tr = null;\r\n\t\ttry {\r\n\t\t\ttr = ss.beginTransaction();// comenzamos a hacer cositas\r\n\t\t\t// id incremental,por eso pongo cero\r\n\t\t\tPersona p = new Persona(0, nombre, apellidos, dni);\r\n\t\t\tss.save(p);\r\n\t\t\ttr.commit();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\tSystem.out.println(\"Pako_error= \" + e);\r\n\t\t} finally {\r\n\t\t\tss.close();\r\n\t\t\t// System.out.println(\"Final\");\r\n\t\t}\r\n\t}", "public Usuario buscar(int documento) {\n Usuario usuario = null;\n String consulta = \"select tipoDocumento, documento, nombre, apellido, password, correo, tipoUsuario from Usuario where \"\n + \" documento = \" + documento + \"\";\n Cursor temp = conex.ejecutarSearch(consulta);\n if (temp.getCount() > 0) {\n temp.moveToFirst();\n usuario = new Usuario(temp.getString(0), Integer.parseInt(temp.getString(1)), temp.getString(2), temp.getString(3), temp.getString(4), temp.getString(5), temp.getString(6));\n }\n conex.cerrarConexion();\n return usuario;\n }", "@Override\r\n\tpublic Registro obtener(Long idRegitro) {\n\t\treturn null;\r\n\t}", "Boolean agregar(String userName, Long idProducto);", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "CTipoPersona selectByPrimaryKey(String idTipoPersona) throws SQLException;", "@Override\n\tpublic Producto buscarIdProducto(Integer codigo) {\n\t\treturn productoDao.editarProducto(codigo);\n\t}", "@Override\n\tpublic Seccion obtenerSeccion(int id) {\n\n\t\tSeccion seccion = entity.find(Seccion.class, id);\n\t\treturn seccion;\n\t}", "@Override\r\n\tpublic Usuario findById(Usuario t) {\n\t\treturn null;\r\n\t}", "public Usuario findByIdCad(String idCad);", "public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\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/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }", "int insert(ParUsuarios record);", "public int getIdReceta() {\r\n return idReceta;\r\n }", "public Conocido agrega(Conocido modelo) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n em.persist(modelo);\n\n tx.commit();\n\n return modelo;\n\n } finally {\n\n em.close();\n\n }\n\n }", "public int buscar_usuario_id(VOUsuario usu) throws RemoteException {\n int linea=-1;\n int id=Integer.parseInt(usu.getId());\n try {\n FileReader fr = new FileReader(datos);\n BufferedReader entrada = new BufferedReader(fr);\n String s, texto=\"\";\n int n, num, l=0;\n boolean encontrado=false;\n while((s = entrada.readLine()) != null && !encontrado) {\n\n texto=s;\n n=texto.indexOf(\" \");\n texto=texto.substring(0, n);\n num=Integer.parseInt(texto);\n\n if(num==id) {\n encontrado=true;\n linea=l;\n }\n l++;\n }\n entrada.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n } catch (IOException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n }\n return linea;\n }", "@Override\n public long getPrimaryKey() {\n return _partido.getPrimaryKey();\n }", "public void salvarDadosUsuario(String idUsuario){\n editor.putString(CHAVE_ID, idUsuario);\n editor.commit();\n }", "public Integer getIdUsuario() {\n return idUsuario;\n }", "public UsuarioDTO consultarUsuario(String idUsuario);", "public static Comentario buscar(Integer id)\n {\n String idComentario = id.toString();\n Session sessionRecheio;\n sessionRecheio = HibernateUtil.getSession();\n Transaction tr = sessionRecheio.beginTransaction();\n String hql = \"from Comentario where u.id='\"+idComentario+\"'\";\n Comentario comentario = (Comentario)sessionRecheio.createQuery(hql).uniqueResult();\n tr.commit();\n return comentario;\n }", "@Repository\npublic interface SupergruppoDAO extends CrudRepository<Supergruppo, Integer> {\n List<Supergruppo> findAllByPersone_id(Integer idPersona);\n}", "public long getIdCadastroSelecionado(){\r\n \treturn idCadastroSelecionado;\r\n }", "public Long getId()\r\n\t{\r\n\t\treturn idContrat;\r\n\t}", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "private Usuario_DB consultar_Amigo(int idUsuarioAmigo2) {\n\t\treturn usuarioidentificado.consultar_Amigo(idUsuarioAmigo2);\n\t}", "public long save(Registro r) {\n\n long id = r.getCodigo();\n SQLiteDatabase db = banco.getWritableDatabase();\n try {\n\n\n ContentValues values = new ContentValues();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-M-d\");\n String dateString = sdf.format(r.getData());\n values.put(\"data\", dateString);\n values.put(\"distancia\", r.getDistancia());\n values.put(\"consumo\", r.getConsumo());\n values.put(\"mediaAceleracao\", r.getMediaAberturaBorboleta());\n values.put(\"mediaConsumo\", r.getMediaConsumo());\n values.put(\"codTipoCombustivel\", r.getTipoCombustivel().getCodigo());\n values.put(\"codCarro\", r.getCarro().getCodigo());\n values.put(\"codUsuario\", r.getUsuario().getCodigo());\n\n if (id != 0) {//SE O ID É DIFERENTE DE 0 ATUALIZA,\n\n System.out.println(\"Entrou !!\");\n String _id = String.valueOf(r.getCodigo());\n String[] whereArgs = new String[]{_id};\n\n // update registro set values = ... where _id=?\n int count = db.update(TABELA, values, \"codigo=?\", whereArgs);\n\n return count;\n } else {\n\n id = db.insert(TABELA, \"\", values);\n System.out.println(\"Deu certo !! \\n \" + values);\n return id;\n }\n } finally {\n db.close();\n }\n }", "public formularioNuevoProveedor() throws SQLException {\n Conexion c=new Conexion();\n Connection conexion=c.getConexion();\n java.sql.Statement declaracion;\n int id = 0;\n declaracion= conexion.createStatement();\n ResultSet resultado=declaracion.executeQuery(\"Select * from proveedor\");\n while(resultado.next()){\n id=resultado.getInt(\"id_proveedor\");\n }\n conexion.close();\n declaracion.close();\n resultado.close();\n initComponents(); \n campoId.setText(Integer.toString(id+1));\n }", "public Long getPersonaId();", "private Object buscaRegistro(BaseJDBC baseJDBC, Class<?> classe, Object id, int profundidade, Class<?>[] classes, int classesVerifica, List<OMObtido> jaObtidos) throws Exception\r\n\t{\r\n\t\tObject objetoAux, idAux;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfor(int i=0; i<jaObtidos.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tobjetoAux = jaObtidos.get(i).getOm();\r\n\t\t\t\tif(objetoAux!=null && objetoAux.getClass()==classe)\r\n\t\t\t\t{\r\n\t\t\t\t\tidAux = getIdValue(objetoAux);\r\n\t\t\t\t\tif(idAux!=null && idAux.equals(id))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(jaObtidos.get(i).getProfundidade()>=profundidade) \t{ return objetoAux; }\r\n\t\t\t\t\t\telse \t\t\t\t\t\t\t\t\t\t\t\t\t{ break; }\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\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLogs.addWarn(\"Nao foi possivel buscar o registro\", e);\r\n\t\t}\r\n\t\t\r\n\t\tobjetoAux = obtemUnico(baseJDBC, classe, id, profundidade, classes, classesVerifica, jaObtidos);\r\n\t\tjaObtidos.add(new OMObtido(objetoAux, profundidade));\r\n\t\treturn objetoAux;\r\n\t}", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public String getId_usuario() {\n return id_usuario;\n }", "@Override\r\npublic Detalle_pedido read(int id) {\n\treturn detalle_pedidoDao.read(id);\r\n}", "public int getId()\r\n/* 208: */ {\r\n/* 209:381 */ return this.idCargaEmpleado;\r\n/* 210: */ }", "void persiste(UsuarioDetalle usuarioDetalle);", "public Empleado buscarPorId(Short idEmpleado) {\n\t\tEmpleado empleado;\n\t\templeado = entityManager.find(Empleado.class, idEmpleado);\n\t\t//JPAUtil.shutdown();\n\t\treturn empleado;\n\t}", "public Identificador(int linea, int columna, String Archivo, String identificador) {\n super(linea, columna, Archivo);\n this.id = identificador;\n }", "public Cliente[] findWhereIdUsuarioAltaEquals(int idUsuarioAlta) throws ClienteDaoException;" ]
[ "0.67224693", "0.6669365", "0.66187626", "0.66101986", "0.66012853", "0.6593852", "0.65328485", "0.65157574", "0.6410607", "0.63813734", "0.63728964", "0.63717926", "0.6370542", "0.63693166", "0.6318511", "0.63066316", "0.6297834", "0.6283799", "0.62818575", "0.62667936", "0.6264174", "0.62633395", "0.6242217", "0.62338626", "0.623182", "0.62311494", "0.62120116", "0.6204774", "0.61926603", "0.6186975", "0.6166174", "0.6160204", "0.61415714", "0.61393785", "0.6137237", "0.6134556", "0.6132078", "0.61225456", "0.61153793", "0.60816455", "0.6080462", "0.60788023", "0.60777795", "0.60725814", "0.60650134", "0.6037836", "0.6034175", "0.6032754", "0.6024969", "0.602199", "0.601073", "0.6009946", "0.60086775", "0.6006414", "0.60020113", "0.5999679", "0.5990986", "0.59838027", "0.5979442", "0.59793884", "0.5971674", "0.59685147", "0.5966385", "0.5963489", "0.5963402", "0.59589785", "0.5957369", "0.59569865", "0.59554845", "0.5946341", "0.593994", "0.5933434", "0.5925889", "0.5917412", "0.5909621", "0.5903449", "0.5903039", "0.5901522", "0.5898763", "0.58946764", "0.58910215", "0.5888711", "0.5880911", "0.5880899", "0.5880757", "0.5878547", "0.5874099", "0.5870715", "0.58673686", "0.58629376", "0.5862207", "0.5858601", "0.58541036", "0.58531463", "0.585164", "0.5847317", "0.58402383", "0.5834737", "0.5833725", "0.58258384", "0.5819899" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<Book> findSomeBook(PageEntiy entiy) { String sql = "select * from books where tag=1 limit ?,?"; try { List<Book> books = runner.query(sql,new BeanListHandler<Book>(Book.class),entiy.getPageNum()*entiy.getPageSize(),entiy.getPageSize()); return books; } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } 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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean deleteByBookId(String id) { Connection conn=null; PreparedStatement pst=null; boolean flag=false; try { conn=Dbconn.getConnection(); String sql = "update books set tag=0 where id=?"; pst = conn.prepareStatement(sql); pst.setString(1, id); if(0<pst.executeUpdate()){ flag=true; } return flag; } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ Dbconn.closeConn(pst, null, conn); } return flag; }
{ "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 findtotalbooks() { String sql="select count(*) from books where tag=1"; try { Object query = runner.query(sql, new ScalarHandler<Object>(1)); Long long1=(Long)query; return long1.intValue(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } 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 boolean updateByBookId(Book book) { boolean flag=false; String sql="update books set title=?,author=?,publisherId=?,publishDate=?,isbn=?,wordsCount=?,unitPrice=?,contentDescription=?,aurhorDescription=?,editorComment=?,TOC=?,categoryId=?,booksImages=?,quantity=?,address=?,baoyou=? " + "where id=?"; List<Object> list=new ArrayList<Object>(); if(book!=null){ list.add(book.getTitle()); list.add(book.getAuthor()); list.add(book.getPublisherId()); list.add(book.getPublishDate()); list.add(book.getIsbn()); list.add(book.getWordsCount()); list.add(book.getUnitPrice()); list.add(book.getContentDescription()); list.add(book.getAurhorDescription()); list.add(book.getEditorComment()); list.add(book.getTOC()); list.add(book.getCategoryId()); list.add(book.getBooksImages()); list.add(book.getQuantity()); list.add(book.getAddress()); if(book.getBaoyou()=="0"){ book.setBaoyou("不包邮"); }else{ book.setBaoyou("包邮"); } list.add(book.getBaoyou()); list.add(book.getId()); } try { int update = runner.update(sql, list.toArray()); if(update>0){ flag=true; } return flag; } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return flag; }
{ "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 findTitletotal(String title, PageEntiy entiy) { String sql="select count(*) from books where tag=1 and title like ? "; try { Object query = runner.query(sql, new ScalarHandler<Object>(1),"%"+title+"%"); Long long1=(Long)query; return long1.intValue(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } 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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
@Override public Book findOneBook(String id) { String sql="select * from books where id= ?"; String sql2 ="select * from categories where id=?"; String sql3 ="select * from publishers where id=?"; try { Book book = runner.query(sql, new BeanHandler<Book>(Book.class), id); Category category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId()); Publisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId()); book.setPublisher(publisher); book.setCategory(category); if(book!=null) return book; } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } 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
obj check not null
public static boolean checkObjNotNull(Object obj) { Optional<Object> optional = Optional.ofNullable(obj); if (optional.isPresent()) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean m16125a(Object obj) {\n return obj == null || obj.toString().equals(\"\") || obj.toString().trim().equals(\"null\");\n }", "public static boolean checkObjNull(Object obj) {\n Optional<Object> optional = Optional.ofNullable(obj);\n if (!optional.isPresent()) {\n return true;\n }\n return false;\n }", "public static <T> void checkNull(T obj){\n if(obj == null){\n throw new IllegalArgumentException(\"Object is null\");\n }\n }", "private static boolean isNotNull(Object object) {\n\t\tif (object != null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean checkNull();", "public TestCase notNull( Object obj );", "public TestCase isNull( Object obj );", "public static boolean ensureNoNullField(Class<?> cls, Object obj) {\n\t\tif(AppUtils.isReleaseVersion()) {\n\t\t\treturn true;\n\t\t}\n\t\tif (cls == null || obj == null || !cls.isInstance(obj)) {\n\t\t\tthrow new IllegalArgumentException(\"Class: \" + cls + \",object: \" + obj);\n\t\t}\n\t\tfor (Field field : cls.getDeclaredFields()) {\n\t\t\ttry {\n\t\t\t\ttry {\n\t\t\t\t\tObject fieldvalue = field.get(obj);\n\t\t\t\t\tif (fieldvalue == null) {\n\t\t\t\t\t\tthrow new NullFieldException();\n\t\t\t\t\t}\n\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new IllegalArgumentException(\"Class: \" + cls + \" Field: \" + field + \" Object: \" + obj + \" doesn't match.\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean isNull(Object anObject) {\n\t\tif(anObject == null) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean isValid(AccessUser obj)\n {\n return obj != null && obj.username != null && !getMembers().contains(obj);\n }", "boolean isIsNotNull();", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "default boolean isNil(final SObjectWithoutFields obj) {\n return obj == Nil.nilObject;\n }", "public final boolean checkIfInZone(L2Object obj) { return (getSiege(obj) != null); }", "public boolean checkValue(Object obj) {\n\treturn (obj instanceof Long) || (obj == null) ;\n }", "public static void checkObjectNotNull(Object obj, String name) {\n if (obj == null) {\n throw new IllegalArgumentException(name + \" is null.\");\n }\n }", "public boolean canBeNullObject() { // for future, nobody calls when first\n return _canBeNullObject;\n }", "@Override\n public boolean isMaybeNull() {\n checkNotPolymorphicOrUnknown();\n return (flags & NULL) != 0;\n }", "private static void checkArg(Object paramObject) {\n/* 687 */ if (paramObject == null)\n/* 688 */ throw new NullPointerException(\"Argument must not be null\"); \n/* */ }", "private static void assertObjectInGetInternalStateIsNotNull(Object object) {\n if (object == null) {\n throw new IllegalArgumentException(\"The object containing the field cannot be null\");\n }\n }", "public boolean valid(Object obj) {\n return !validator.valid(obj);\n }", "@Test\n\tvoid testCheckNull3() {\n\t\tassertTrue(DataChecker.checkNull((Object)null));\n\t}", "public static boolean isObjectNull(BasicDBObject dbObject, Enum field) {\n //if (dbObject == null || dbObject.toString() == null) \n return dbObject.get(field.toString()) != null;\n }", "public boolean canProcessNull() {\n return false;\n }", "@Test\n public void testCheckNullForInjectedValue() {\n Helper.checkNullForInjectedValue(\"obj\", \"obj\");\n }", "private void checkNull(T x) throws NullPointerException\n\t{\n\t\tif (x == null)\n\t\t{\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t}", "public static <T> void checkNull(T[] obj){\n if(obj == null || obj.length == 0){\n throw new IllegalArgumentException(\"Object is null\");\n }\n for(T val:obj){\n checkNull(val);\n }\n }", "public static <T> void checkNull(Collection<T> obj){\n if(obj == null || obj.size() == 0){\n throw new IllegalArgumentException(\"Object is null\");\n }\n obj.forEach(AssertUtil::checkNull);\n }", "@Override\n\tpublic Boolean validate(Object obj) throws BusinessException {\n\t\treturn null;\n\t}", "public boolean hasObject(){\n return _object != null;\n }", "protected boolean isEmpty(Object obj) {\r\n return (obj == null || obj instanceof String\r\n && ((String) obj).trim().length() == 0);\r\n }", "boolean isNilValue();", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "private static boolean m4280b(Object obj, Object obj2) {\n if (obj != obj2) {\n if (obj == null || obj.equals(obj2) == null) {\n return null;\n }\n }\n return true;\n }", "boolean isNullable();", "boolean isNullable();", "boolean isNullable();", "public boolean anyNull () ;", "@SuppressWarnings(\"UnusedDeclaration\")\n public IsNull() {\n super();\n }", "public static boolean naoExiste(Object o){\n\t\tboolean naoExiste = o==null;\n\t\tif (o instanceof String) {\n\t\t\tString texto = (String) o;\n\t\t\tnaoExiste = texto.equals(\"null\");\n\t\t}\n\t\treturn naoExiste;\n\t}", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "@SuppressWarnings(\"unchecked\")\n public boolean stillExists(Object obj) {\n \treturn true;\n }", "public void testObjEqual()\n {\n assertEquals( true, Util.objEqual(null,null) );\n assertEquals( false,Util.objEqual(this,null) );\n assertEquals( false,Util.objEqual(null,this) );\n assertEquals( true, Util.objEqual(this,this) );\n assertEquals( true, Util.objEqual(\"12\",\"12\") );\n }", "@Test\n\tvoid testCheckNull1() {\n\t\tassertFalse(DataChecker.checkNull(new Integer(42)));\n\t}", "protected <T> T emptyToNull(T obj) {\r\n if (isEmpty(obj)) {\r\n return null;\r\n } else {\r\n return obj;\r\n }\r\n }", "public static boolean checkMandatoryFields(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean hasObjUser() {\n return objUser_ != null;\n }", "boolean isNull();", "default boolean checkDbObj(Object object) {\n return false;\n }", "private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }", "private boolean isPresent(JSONObject object, String key) {\n\n\t\treturn !(object.isNull(key));\n\n\t}", "public boolean isEmpty( Object object ){\n if( object == null ){\n return true;\n }\n return false;\n }", "public static boolean isNullOrEmptyString(Object obj) {\r\n\t\treturn (obj instanceof String) ? ((String)obj).trim().equals(\"\") : obj==null;\r\n\t}", "@Test\n\tvoid testCheckNulls1() {\n\t\tassertTrue(DataChecker.checkNulls(null));\n\t}", "boolean supportsNotNullable();", "@Test\n\tvoid testCheckNulls3() {\n\t\tObject[] o = {null,null,null,null,null};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "public static boolean isBlank(Object bean) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException {\r\n\t\treturn isBlank(bean, false);\r\n\t}", "protected synchronized boolean isObjectPresent() { return objPresent; }", "public void checkIsE(@NullableDecl Object obj) {\n Preconditions.checkNotNull(obj);\n if (!isActuallyE(obj)) {\n throw new ClassCastException(\"Expected an \" + this.type + \" but got \" + obj);\n }\n }", "public boolean isNull(){\n return false;\n }", "static void checkNull(final Object param, final String paramName) {\r\n if (param == null) {\r\n throw new IllegalArgumentException(\"The argument '\" + paramName\r\n + \"' should not be null.\");\r\n }\r\n }", "public void testAssertPropertyReflectionEquals_actualObjectNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"aProperty\", \"aValue\", null);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "@Test(expected = CopilotServiceInitializationException.class)\n public void testCheckNullForInjectedValueFailure() {\n Helper.checkNullForInjectedValue(null, \"obj\");\n }", "private static boolean verifyNullObject(LogManager pLogger, UnmodifiableSMG pSmg) {\n SMGValue null_value = null;\n\n // Find a null value in values\n for (SMGValue value : pSmg.getValues()) {\n if (pSmg.getObjectPointedBy(value) == SMGNullObject.INSTANCE) {\n null_value = value;\n break;\n }\n }\n\n // Verify that one value pointing to NULL object is present in values\n if (null_value == null) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: no value pointing to null object\");\n return false;\n }\n\n // Verify that NULL value returned by getNullValue() points to NULL object\n if (pSmg.getObjectPointedBy(SMGZeroValue.INSTANCE) != SMGNullObject.INSTANCE) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null value not pointing to null object\");\n return false;\n }\n\n // Verify that the value found in values is the one returned by getNullValue()\n if (SMGZeroValue.INSTANCE != null_value) {\n pLogger.log(\n Level.SEVERE,\n \"SMG inconsistent: null value in values set not returned by getNullValue()\");\n return false;\n }\n\n // Verify that NULL object has no value\n SMGEdgeHasValueFilterByObject filter =\n SMGEdgeHasValueFilter.objectFilter(SMGNullObject.INSTANCE);\n\n if (!pSmg.getHVEdges(filter).isEmpty()) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object has some value\");\n return false;\n }\n\n // Verify that the NULL object is invalid\n if (pSmg.isObjectValid(SMGNullObject.INSTANCE)) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object is not invalid\");\n return false;\n }\n\n // Verify that the size of the NULL object is zero\n if (SMGNullObject.INSTANCE.getSize() != 0) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object does not have zero size\");\n return false;\n }\n\n return true;\n }", "private static void checkNull(Object value, String name) throws LateDeliverablesProcessingException {\r\n if (value == null) {\r\n throw new LateDeliverablesProcessingException(\"The \" + name + \" should not be null.\");\r\n }\r\n }", "public static String checkNullObject(Object val) {\n\n if (val != null) {\n if (\"\".equals(val.toString().trim())) {\n return \"\";\n }\n return val.toString();\n } else {\n return \"\";\n }\n }", "public void assertNotEmpty(Object[] objArr) {\n if (objArr == null || objArr.length == 0) {\n throw new IllegalArgumentException(\"Arguments is null or its length is empty\");\n }\n }", "private boolean testNulls(Fact req, ArrayList<Fact> facts) {\n boolean isNull = req.valueIsNotNull();\n for (Fact fact: facts) if (fact.getName().equals(req.getName())) {\n return isNull;\n }\n return !isNull;\n }", "public void testGetMessage_NullObj() {\r\n try {\r\n validator.getMessage(null);\r\n fail(\"testGetMessage_NullObj is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testGetMessage_NullObj.\");\r\n }\r\n }", "public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }", "@Test\n\tvoid testCheckNulls2() {\n\t\tObject[] o = {2,5f,\"Test\",null,\"Test2\"};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "private boolean checkForNull(IfStmt ifStmt) {\n boolean isNull = false;\n BinaryExpr ifAsBinary = ifStmt.getCondition().asBinaryExpr();\n isNull |= ifAsBinary.getLeft().isNullLiteralExpr();\n isNull |= ifAsBinary.getRight().isNullLiteralExpr();\n return isNull;\n }", "boolean containsValue(Object value) throws NullPointerException;", "static public void assertNotNull(Object object) {\n assertNotNull(null, object);\n }", "public boolean validate(Object o){\r\n\t\treturn false;\r\n\t}", "private void assertNullHandling(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLMessageArgument)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((Object)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLSymbol)null));\r\n\t}", "public boolean isNullOrUndef() {\n checkNotPolymorphicOrUnknown();\n return (flags & (NULL | UNDEF)) != 0\n && (flags & (NUM | STR | BOOL)) == 0 && num == null && str == null && object_labels == null && getters == null && setters == null;\n }", "public static boolean checkMandatoryFieldsRegistration(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n\tvoid testCheckNull2() {\n\t\tassertTrue(DataChecker.checkNull(null));\n\t}", "public void testAssertPropertyReflectionEquals_leftNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "public boolean isUnsaved(Object obj) {\n return null;\r\n }", "static <T> boolean isNullOrEmpty(T t){\n if(t == null){\n return true;\n }\n String str = t.toString();\n if(str.isEmpty()){\n return true;\n }\n if(str.length() == 0){\n return true;\n }\n return false;\n }", "protected abstract Object convertNonNull(Object o);", "public static <T> void notNull(T object) {\n notNull(object, DEFAULT_IS_NULL_MESSAGE);\n }", "public static void checkNull(Object value, String name) {\r\n if (value == null) {\r\n throw new IllegalArgumentException(\"The \" + name + \" is null.\");\r\n }\r\n }", "public boolean isNonNull() {\n return true;\n }", "@Override\n\tpublic boolean validObject() {\n\t\treturn valid;\n\t}", "public boolean isSetObject() {\n return this.object != null;\n }", "boolean getActiveNull();", "private static boolean nullOk(Schema schema) {\n if (Schema.Type.NULL == schema.getType()) {\n return true;\n } else if (Schema.Type.UNION == schema.getType()) {\n for (Schema possible : schema.getTypes()) {\n if (nullOk(possible)) {\n return true;\n }\n }\n }\n return false;\n }", "static public boolean isNull(Object value) {\r\n\t\treturn value == null || value instanceof JSNull;\r\n\t}", "public boolean hasObject() {\n return objectBuilder_ != null || object_ != null;\n }", "private static boolean empty(Object object) {\n\t\treturn false;\n\t}" ]
[ "0.74929416", "0.74792445", "0.7405809", "0.72891694", "0.70827276", "0.7066216", "0.70415145", "0.6864137", "0.68003595", "0.67883605", "0.67651665", "0.6749931", "0.6737828", "0.6727513", "0.6667715", "0.66343945", "0.6622818", "0.655487", "0.65519047", "0.65378165", "0.6504013", "0.64131564", "0.6406427", "0.6395119", "0.6380161", "0.6353371", "0.63110524", "0.6310435", "0.625196", "0.62381953", "0.6187355", "0.6186727", "0.6153506", "0.6103502", "0.6103502", "0.6103502", "0.6103502", "0.6103502", "0.6103502", "0.6103502", "0.6094173", "0.6087912", "0.6087912", "0.6087912", "0.6087202", "0.60810786", "0.6072287", "0.6065029", "0.6053587", "0.60477173", "0.6019842", "0.5995072", "0.5986577", "0.5970031", "0.59685266", "0.59636694", "0.596022", "0.5953259", "0.5952164", "0.595216", "0.59490705", "0.5948304", "0.5941467", "0.59276134", "0.59218764", "0.59183514", "0.5916345", "0.59156287", "0.5910866", "0.5910262", "0.5909878", "0.58980685", "0.58975697", "0.589668", "0.58950007", "0.5889601", "0.58863956", "0.587187", "0.5871781", "0.58678895", "0.58557487", "0.58531517", "0.5849813", "0.58437794", "0.5842095", "0.5835968", "0.5831779", "0.58281386", "0.5819228", "0.5811907", "0.5804021", "0.57983565", "0.57982206", "0.57948166", "0.5791671", "0.5791076", "0.5789121", "0.5783958", "0.5782216", "0.57778794" ]
0.7313843
3
obj check not null
public static boolean checkObjNull(Object obj) { Optional<Object> optional = Optional.ofNullable(obj); if (!optional.isPresent()) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean m16125a(Object obj) {\n return obj == null || obj.toString().equals(\"\") || obj.toString().trim().equals(\"null\");\n }", "public static <T> void checkNull(T obj){\n if(obj == null){\n throw new IllegalArgumentException(\"Object is null\");\n }\n }", "public static boolean checkObjNotNull(Object obj) {\n Optional<Object> optional = Optional.ofNullable(obj);\n if (optional.isPresent()) {\n return true;\n }\n return false;\n }", "private static boolean isNotNull(Object object) {\n\t\tif (object != null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean checkNull();", "public TestCase notNull( Object obj );", "public TestCase isNull( Object obj );", "public static boolean ensureNoNullField(Class<?> cls, Object obj) {\n\t\tif(AppUtils.isReleaseVersion()) {\n\t\t\treturn true;\n\t\t}\n\t\tif (cls == null || obj == null || !cls.isInstance(obj)) {\n\t\t\tthrow new IllegalArgumentException(\"Class: \" + cls + \",object: \" + obj);\n\t\t}\n\t\tfor (Field field : cls.getDeclaredFields()) {\n\t\t\ttry {\n\t\t\t\ttry {\n\t\t\t\t\tObject fieldvalue = field.get(obj);\n\t\t\t\t\tif (fieldvalue == null) {\n\t\t\t\t\t\tthrow new NullFieldException();\n\t\t\t\t\t}\n\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new IllegalArgumentException(\"Class: \" + cls + \" Field: \" + field + \" Object: \" + obj + \" doesn't match.\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean isNull(Object anObject) {\n\t\tif(anObject == null) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean isValid(AccessUser obj)\n {\n return obj != null && obj.username != null && !getMembers().contains(obj);\n }", "boolean isIsNotNull();", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "default boolean isNil(final SObjectWithoutFields obj) {\n return obj == Nil.nilObject;\n }", "public final boolean checkIfInZone(L2Object obj) { return (getSiege(obj) != null); }", "public boolean checkValue(Object obj) {\n\treturn (obj instanceof Long) || (obj == null) ;\n }", "public static void checkObjectNotNull(Object obj, String name) {\n if (obj == null) {\n throw new IllegalArgumentException(name + \" is null.\");\n }\n }", "public boolean canBeNullObject() { // for future, nobody calls when first\n return _canBeNullObject;\n }", "@Override\n public boolean isMaybeNull() {\n checkNotPolymorphicOrUnknown();\n return (flags & NULL) != 0;\n }", "private static void checkArg(Object paramObject) {\n/* 687 */ if (paramObject == null)\n/* 688 */ throw new NullPointerException(\"Argument must not be null\"); \n/* */ }", "private static void assertObjectInGetInternalStateIsNotNull(Object object) {\n if (object == null) {\n throw new IllegalArgumentException(\"The object containing the field cannot be null\");\n }\n }", "public boolean valid(Object obj) {\n return !validator.valid(obj);\n }", "@Test\n\tvoid testCheckNull3() {\n\t\tassertTrue(DataChecker.checkNull((Object)null));\n\t}", "public static boolean isObjectNull(BasicDBObject dbObject, Enum field) {\n //if (dbObject == null || dbObject.toString() == null) \n return dbObject.get(field.toString()) != null;\n }", "public boolean canProcessNull() {\n return false;\n }", "@Test\n public void testCheckNullForInjectedValue() {\n Helper.checkNullForInjectedValue(\"obj\", \"obj\");\n }", "private void checkNull(T x) throws NullPointerException\n\t{\n\t\tif (x == null)\n\t\t{\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t}", "public static <T> void checkNull(T[] obj){\n if(obj == null || obj.length == 0){\n throw new IllegalArgumentException(\"Object is null\");\n }\n for(T val:obj){\n checkNull(val);\n }\n }", "public static <T> void checkNull(Collection<T> obj){\n if(obj == null || obj.size() == 0){\n throw new IllegalArgumentException(\"Object is null\");\n }\n obj.forEach(AssertUtil::checkNull);\n }", "@Override\n\tpublic Boolean validate(Object obj) throws BusinessException {\n\t\treturn null;\n\t}", "public boolean hasObject(){\n return _object != null;\n }", "protected boolean isEmpty(Object obj) {\r\n return (obj == null || obj instanceof String\r\n && ((String) obj).trim().length() == 0);\r\n }", "boolean isNilValue();", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "private static boolean m4280b(Object obj, Object obj2) {\n if (obj != obj2) {\n if (obj == null || obj.equals(obj2) == null) {\n return null;\n }\n }\n return true;\n }", "boolean isNullable();", "boolean isNullable();", "boolean isNullable();", "public boolean anyNull () ;", "@SuppressWarnings(\"UnusedDeclaration\")\n public IsNull() {\n super();\n }", "public static boolean naoExiste(Object o){\n\t\tboolean naoExiste = o==null;\n\t\tif (o instanceof String) {\n\t\t\tString texto = (String) o;\n\t\t\tnaoExiste = texto.equals(\"null\");\n\t\t}\n\t\treturn naoExiste;\n\t}", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "@SuppressWarnings(\"unchecked\")\n public boolean stillExists(Object obj) {\n \treturn true;\n }", "public void testObjEqual()\n {\n assertEquals( true, Util.objEqual(null,null) );\n assertEquals( false,Util.objEqual(this,null) );\n assertEquals( false,Util.objEqual(null,this) );\n assertEquals( true, Util.objEqual(this,this) );\n assertEquals( true, Util.objEqual(\"12\",\"12\") );\n }", "@Test\n\tvoid testCheckNull1() {\n\t\tassertFalse(DataChecker.checkNull(new Integer(42)));\n\t}", "protected <T> T emptyToNull(T obj) {\r\n if (isEmpty(obj)) {\r\n return null;\r\n } else {\r\n return obj;\r\n }\r\n }", "public static boolean checkMandatoryFields(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean hasObjUser() {\n return objUser_ != null;\n }", "boolean isNull();", "default boolean checkDbObj(Object object) {\n return false;\n }", "private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }", "public static boolean isNullOrEmptyString(Object obj) {\r\n\t\treturn (obj instanceof String) ? ((String)obj).trim().equals(\"\") : obj==null;\r\n\t}", "private boolean isPresent(JSONObject object, String key) {\n\n\t\treturn !(object.isNull(key));\n\n\t}", "public boolean isEmpty( Object object ){\n if( object == null ){\n return true;\n }\n return false;\n }", "@Test\n\tvoid testCheckNulls1() {\n\t\tassertTrue(DataChecker.checkNulls(null));\n\t}", "boolean supportsNotNullable();", "@Test\n\tvoid testCheckNulls3() {\n\t\tObject[] o = {null,null,null,null,null};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "public static boolean isBlank(Object bean) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, IntrospectionException {\r\n\t\treturn isBlank(bean, false);\r\n\t}", "protected synchronized boolean isObjectPresent() { return objPresent; }", "public void checkIsE(@NullableDecl Object obj) {\n Preconditions.checkNotNull(obj);\n if (!isActuallyE(obj)) {\n throw new ClassCastException(\"Expected an \" + this.type + \" but got \" + obj);\n }\n }", "public boolean isNull(){\n return false;\n }", "static void checkNull(final Object param, final String paramName) {\r\n if (param == null) {\r\n throw new IllegalArgumentException(\"The argument '\" + paramName\r\n + \"' should not be null.\");\r\n }\r\n }", "private static boolean verifyNullObject(LogManager pLogger, UnmodifiableSMG pSmg) {\n SMGValue null_value = null;\n\n // Find a null value in values\n for (SMGValue value : pSmg.getValues()) {\n if (pSmg.getObjectPointedBy(value) == SMGNullObject.INSTANCE) {\n null_value = value;\n break;\n }\n }\n\n // Verify that one value pointing to NULL object is present in values\n if (null_value == null) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: no value pointing to null object\");\n return false;\n }\n\n // Verify that NULL value returned by getNullValue() points to NULL object\n if (pSmg.getObjectPointedBy(SMGZeroValue.INSTANCE) != SMGNullObject.INSTANCE) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null value not pointing to null object\");\n return false;\n }\n\n // Verify that the value found in values is the one returned by getNullValue()\n if (SMGZeroValue.INSTANCE != null_value) {\n pLogger.log(\n Level.SEVERE,\n \"SMG inconsistent: null value in values set not returned by getNullValue()\");\n return false;\n }\n\n // Verify that NULL object has no value\n SMGEdgeHasValueFilterByObject filter =\n SMGEdgeHasValueFilter.objectFilter(SMGNullObject.INSTANCE);\n\n if (!pSmg.getHVEdges(filter).isEmpty()) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object has some value\");\n return false;\n }\n\n // Verify that the NULL object is invalid\n if (pSmg.isObjectValid(SMGNullObject.INSTANCE)) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object is not invalid\");\n return false;\n }\n\n // Verify that the size of the NULL object is zero\n if (SMGNullObject.INSTANCE.getSize() != 0) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object does not have zero size\");\n return false;\n }\n\n return true;\n }", "public void testAssertPropertyReflectionEquals_actualObjectNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"aProperty\", \"aValue\", null);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "@Test(expected = CopilotServiceInitializationException.class)\n public void testCheckNullForInjectedValueFailure() {\n Helper.checkNullForInjectedValue(null, \"obj\");\n }", "public static String checkNullObject(Object val) {\n\n if (val != null) {\n if (\"\".equals(val.toString().trim())) {\n return \"\";\n }\n return val.toString();\n } else {\n return \"\";\n }\n }", "private static void checkNull(Object value, String name) throws LateDeliverablesProcessingException {\r\n if (value == null) {\r\n throw new LateDeliverablesProcessingException(\"The \" + name + \" should not be null.\");\r\n }\r\n }", "public void assertNotEmpty(Object[] objArr) {\n if (objArr == null || objArr.length == 0) {\n throw new IllegalArgumentException(\"Arguments is null or its length is empty\");\n }\n }", "private boolean testNulls(Fact req, ArrayList<Fact> facts) {\n boolean isNull = req.valueIsNotNull();\n for (Fact fact: facts) if (fact.getName().equals(req.getName())) {\n return isNull;\n }\n return !isNull;\n }", "public void testGetMessage_NullObj() {\r\n try {\r\n validator.getMessage(null);\r\n fail(\"testGetMessage_NullObj is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testGetMessage_NullObj.\");\r\n }\r\n }", "public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }", "private boolean checkForNull(IfStmt ifStmt) {\n boolean isNull = false;\n BinaryExpr ifAsBinary = ifStmt.getCondition().asBinaryExpr();\n isNull |= ifAsBinary.getLeft().isNullLiteralExpr();\n isNull |= ifAsBinary.getRight().isNullLiteralExpr();\n return isNull;\n }", "@Test\n\tvoid testCheckNulls2() {\n\t\tObject[] o = {2,5f,\"Test\",null,\"Test2\"};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "boolean containsValue(Object value) throws NullPointerException;", "static public void assertNotNull(Object object) {\n assertNotNull(null, object);\n }", "public boolean validate(Object o){\r\n\t\treturn false;\r\n\t}", "private void assertNullHandling(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLMessageArgument)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((Object)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLSymbol)null));\r\n\t}", "public boolean isNullOrUndef() {\n checkNotPolymorphicOrUnknown();\n return (flags & (NULL | UNDEF)) != 0\n && (flags & (NUM | STR | BOOL)) == 0 && num == null && str == null && object_labels == null && getters == null && setters == null;\n }", "public static boolean checkMandatoryFieldsRegistration(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n\tvoid testCheckNull2() {\n\t\tassertTrue(DataChecker.checkNull(null));\n\t}", "public void testAssertPropertyReflectionEquals_leftNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "public boolean isUnsaved(Object obj) {\n return null;\r\n }", "static <T> boolean isNullOrEmpty(T t){\n if(t == null){\n return true;\n }\n String str = t.toString();\n if(str.isEmpty()){\n return true;\n }\n if(str.length() == 0){\n return true;\n }\n return false;\n }", "protected abstract Object convertNonNull(Object o);", "public static <T> void notNull(T object) {\n notNull(object, DEFAULT_IS_NULL_MESSAGE);\n }", "public static void checkNull(Object value, String name) {\r\n if (value == null) {\r\n throw new IllegalArgumentException(\"The \" + name + \" is null.\");\r\n }\r\n }", "public boolean isNonNull() {\n return true;\n }", "@Override\n\tpublic boolean validObject() {\n\t\treturn valid;\n\t}", "boolean getActiveNull();", "private static boolean nullOk(Schema schema) {\n if (Schema.Type.NULL == schema.getType()) {\n return true;\n } else if (Schema.Type.UNION == schema.getType()) {\n for (Schema possible : schema.getTypes()) {\n if (nullOk(possible)) {\n return true;\n }\n }\n }\n return false;\n }", "public boolean isSetObject() {\n return this.object != null;\n }", "static public boolean isNull(Object value) {\r\n\t\treturn value == null || value instanceof JSNull;\r\n\t}", "public boolean hasObject() {\n return objectBuilder_ != null || object_ != null;\n }", "private static boolean empty(Object object) {\n\t\treturn false;\n\t}" ]
[ "0.7493826", "0.74062717", "0.7314597", "0.72895086", "0.7083003", "0.7066163", "0.7041482", "0.6865454", "0.68007374", "0.67887276", "0.6764647", "0.67501056", "0.673827", "0.6728176", "0.66675323", "0.66349065", "0.66223687", "0.6554849", "0.65515167", "0.6537416", "0.65043753", "0.64133084", "0.64075595", "0.6396243", "0.6380229", "0.63534933", "0.6312569", "0.6310983", "0.6252679", "0.62370735", "0.6187826", "0.61860776", "0.6152217", "0.61020863", "0.61020863", "0.61020863", "0.61020863", "0.61020863", "0.61020863", "0.61020863", "0.60943466", "0.6087731", "0.6087731", "0.6087731", "0.60871464", "0.60810196", "0.6073441", "0.6065617", "0.6053347", "0.6046568", "0.60201585", "0.59964657", "0.5987384", "0.5969665", "0.59689397", "0.596384", "0.59597653", "0.59532875", "0.5953225", "0.5951696", "0.5948984", "0.59483564", "0.59418726", "0.5928448", "0.59210473", "0.5918163", "0.5916954", "0.59158427", "0.59108984", "0.5910886", "0.59102434", "0.5898927", "0.58986866", "0.58965105", "0.5895764", "0.5890435", "0.58866453", "0.5873178", "0.5872705", "0.58667034", "0.58552027", "0.5853199", "0.58498967", "0.58440894", "0.5842997", "0.5836128", "0.58319134", "0.58286", "0.5819738", "0.58120054", "0.5804217", "0.5797943", "0.57972944", "0.57943404", "0.57923466", "0.5789845", "0.57897496", "0.5783898", "0.57807845", "0.5777869" ]
0.7480148
1
public static void exit(int status)
public static void main(String[] args) { System.out.println("我们喜欢"); // System.exit(0); System.out.println("我们也喜欢"); System.out.println("-------------"); [] // public static void currentTimeMillis()以毫秒为单位返回当前值 System.out.println(System.currentTimeMillis()); // 单独得到这样的时间目前对我们来说意义不大,那么他有啥意义 long start = System.currentTimeMillis(); for (int i = 0; i < 100000; i++){ System.out.println("hello" + i); } long end = System.currentTimeMillis(); System.out.println("共耗时" + (end - start) + "ms"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void exit (int status);", "public static void exit(int status) {\n\t\tif(status != SUCCESS)\n\t\t\tlogger.error(\"This application was terminated abnormally.\");\n\t\t\n\t\t// TODO deprecated\n\t\tif(dcenter != null) dcenter.close();\n\t\t\n\t\t// Quartz scheduler\n\t\tboolean waitForJobsToComplete = true;\n\t\ttry {\n\t\t\tif(sched != null)\n\t\t\t\tsched.shutdown(waitForJobsToComplete);\n\t\t} catch (SchedulerException e) {\n\t\t\tlogger.fatal(\"Quartz Scheduler shutdowns with an exception\");\n\t\t\tlogger.fatal(e.getStackTrace());\n\t\t}\n\n\t\t// Database\n\t\tif(manager != null) manager.close();\t// VERY IMPORTANT!\n\t\t\n\t\tlogger.fatal(\"All systems have cleanly shutdown.\");\n\t\t\n\t\tSystem.exit(status);\n\t}", "private void systemExit(int status) {\n Utilities.verboseLog(\" Exit status: \" + status);\n try {\n databaseCleaner.closeDatabaseCleaner();\n LOGGER.debug(\"Ending\");\n Thread.sleep(500); // cool off, then exit\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(\"InterProScan analysis failed.\");\n } finally {\n cleanUpWorkingDirectory();\n // Always exit\n if (status != 0) {\n System.err.println(\"InterProScan analysis failed. Exception thrown by StandaloneBlackBoxMaster. Check the log file for details\");\n System.exit(status);\n }\n }\n //let Run do the cleanup\n //System.exit(status);\n }", "public static void exit(int status)\n throws Exception {\n // close anything that might be open for the current process\n for (int i = 0; i < process.openFiles.length; i++)\n if (process.openFiles[i] != null) {\n close(i);\n }\n\n // terminate the process\n process = null;\n processCount--;\n\n // if this is the last process to end, call finalize\n if (processCount <= 0)\n finalize(status);\n }", "@Override\n \tpublic void exit(int code)\n \t{\n \t\tSystem.exit(code);\n \t}", "public void exit();", "@Override\n\tpublic int exit() {\n\t\treturn 0;\n\t}", "void exit();", "protected void exit() {\n\t\tSystem.exit(0);\n\t}", "public void exit() {\n\t\tSystem.exit(0);\n\t}", "public void exit() {\n\t\tSystem.exit(0);\n\t}", "void exit() throws Exception;", "static void exit()\r\n\t {\n\t\t System.exit(0);\r\n\t }", "protected void exit(int code) {\n\t\t//System.exit(code); we need to implement something else here\n\t}", "public void a_exit() {\r\n\t\tSystem.exit(0);\r\n\t}", "int getExitStatus();", "public abstract void exit();", "private static void exit()\n {\n System.out.println(\"Graceful exit\");\n System.exit(0);\n }", "public static void ender()\n{\n\tSystem.exit(0); \n}", "abstract public void exit();", "public void _test_exit() throws Exception {\r\n System.exit(0);\r\n }", "public void _test_exit() throws Exception {\n System.exit(0);\n }", "public void _test_exit() throws Exception {\n System.exit(0);\n }", "public void _test_exit() throws Exception {\n System.exit(0);\n }", "public static void exit(final int status, long maxDelayMillis) {\n try {\n /* Setup a timer, so if nice exit fails, the nasty exit happens */\n Timer timer = new Timer();\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n Runtime.getRuntime().halt(status);\n }\n }, maxDelayMillis);\n /* Try to exit nicely */\n System.exit(status);\n\n } catch (Throwable ex) {\n /* Exit nastily if we have a problem */\n Runtime.getRuntime().halt(status);\n } finally {\n /* Should never get here */\n Runtime.getRuntime().halt(status);\n }\n }", "@Override\r\n\tpublic void exit() {\n\t\t\r\n\t}", "private void exit(String message) {\n System.out.println(message);\n System.exit(-1);\n }", "@Override\n\tpublic void exit() {\n\t\t\n\t}", "@Override\n\tpublic void exit() {\n\t\t\n\t}", "public void exitTheProgram(){\n System.exit(0);\n }", "public void exitServer()\n\t{\n\t\tSystem.exit(1);\n\t}", "private void processQuit() {\n System.exit(0);\n }", "private void runExit() {\n new Thread(new Runnable() {\n public void run() {\n System.exit(0);\n }\n }).start();\n }", "@Override\n\tpublic void exit() {\n\n\t}", "@Override\n public void exit() {\n super.exit();\n }", "private static void exit(int i) {\n\t\t\n\t}", "@Override\n\tpublic void exit() {\n\t\t//do nothing\n\t}", "public void quit(String dummy) {\n System.exit(1);\n }", "@Override\r\n\tpublic void exit() {\n\r\n\t}", "private void shutDownClient(int exitStatus) {\n\t\tthis.close();\n\t\tSystem.exit(exitStatus);\n\t}", "@Override\r\n public int stop(int exitCode) {\r\n IS.stopAll();\r\n return exitCode;\r\n }", "public void quit() {System.exit(0);}", "@Override\n\tpublic void exit() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "void exit( boolean enabled, Object result ) ;", "private void exitApplication()\r\n {\r\n System.exit(0);\r\n }", "private void usage(int exitStatus) {\n System.out.println(USAGE);\n System.exit(exitStatus);\n }", "public void close() {\n System.exit(0);\n }", "public void exit() {\n try {\n processLine(\"exit\");\n } catch (NoSystemException ex) {\n\t\t\tLog.error(\"No System available. Please load a model before executing this command.\");\n }\n }", "public void exit() throws DynamicCallException, ExecutionException{\n call(\"exit\").get();\n }", "public void exit () {\r\n System.out.println(\"Desligando aplicação...\");\r\n this.stub.killStub();\r\n }", "public static int exit() throws Exception {\n\t\tisRunnerActive = false;\n\t\t(new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\tif (webServer != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\twebServer.shutdown();\n\t\t\t\t\t\t} catch (Exception ignore) {\n\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tlog.warning(StringUtils.getStackTrace(e));\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} catch (Throwable t) {\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t\treturn 0;\n\t}", "public static void finalize(int status)\n throws Exception {\n // exit() any remaining processes\n if (process != null)\n exit(0);\n\n // flush file system blocks\n sync();\n\n // close the root file system\n openFileSystems[ROOT_FILE_SYSTEM].close();\n\n // terminate the program\n System.exit(status);\n }", "public void quit(){\n this.println(\"Bad news!!! The library has been cancelled!\");\n System.exit(0);\n\n }", "static public void exit() {\n // We close our printStream ( can be a log so we do things properly )\n out.flush();\n System.exit(0);\n }", "private static void exit(){\n\t\t\n\t\tMain.run=false;\n\t\t\n\t}", "private static void exit(String errMsg, Options options, int exitCode) {\n if (errMsg != null)\n echo(\"ERROR: \" + errMsg);\n\n String runner = System.getProperty(IGNITE_PROG_NAME, \"randignite.{sh|bat}\");\n\n int space = runner.indexOf(' ');\n\n runner = runner.substring(0, space == -1 ? runner.length() : space);\n\n if (options != null) {\n HelpFormatter formatter = new HelpFormatter();\n\n formatter.printHelp(runner, options);\n }\n\n System.exit(exitCode);\n }", "private int handleExit(int exitStatus){\n\t\tSystem.out.print(\"(\"+processId+\")\"+\" EXITING...\");\n\n\t\t//Close all the open files\n\t\t//might not be able to do this\n\t\tfor(OpenFile file : fileDescriptors)\n\t\t\tif(file != null)file.close();\n\t\t//Assign exit status to return to parent\n\t\tthis.exitStatus = exitStatus;\n\t\tSystem.out.println(\" status: \"+exitStatus);\n\n\t\tthis.unloadSections();\n\t\t//Set all child parent processes to null\n\t\t//childProcesses.forEach(x -> x.parentProcess=null);\n\t\t//childProcesses.forEach((x,y) -> y.parentProcess=null);// >:(((((((( they wont let me do it\n\t\t//so much uglier\n\t\tfor(Integer key : childProcesses.keySet())childProcesses.get(key).parentProcess=null;\n\n\t\t//remove all the child\n\t\tchildProcesses.clear();\n\n\t\tif(this.processId == 0)\n\t\t\tKernel.kernel.terminate();\n\t\telse\n\t\t\tUThread.finish();\n\n\t\treturn 0;\n\t}", "private static void exit() {\n dvm.exit();\n stop = true;\n }", "public void quit() {\n\t\tSystem.exit(0);\n\t}", "final private static void abort (final String message) {\n\t\tSystem.out.println(message) ;\n\t\tSystem.exit (1) ;\n }", "private void exit()\n {\n try\n {\n connect.close();\n }\n catch (javax.jms.JMSException jmse)\n {\n jmse.printStackTrace();\n }\n\n System.exit(0);\n }", "public void exit() throws CallError, InterruptedException{\n if (isAsynchronous)\n service.call(\"exit\");\n else\n service.call(\"exit\").get();\n }", "private void exit() {\n\n // Farewell message\n pOutput.println(\"Good Bye!\");\n pOutput.close();\n\n try {\n pClient.close();\n\n } catch (final IOException ex) {\n pShellService.error(\"Shell::exit()\", ex);\n }\n\n // Clean up\n pShellService = null;\n }", "void exit( boolean enabled ) ;", "public static void finishALl() {\n\t\tSystem.exit(-1);\r\n\t}", "public void shutdown() {\r\n System.exit(0);\r\n }", "static void goodbye() {\n printGoodbyeMessage();\n System.exit(0);\n }", "public Future<Void> exit() throws DynamicCallException, ExecutionException{\n return call(\"exit\");\n }", "boolean hasExitStatus();", "@Predicate(\"halt\")\n public static void halt(Environment environment, Term exitCode) {\n throw new PrologHalt(PrologInteger.from(exitCode).toInteger(), \"halt\");\n }", "public void exitPit();", "public int getExitStatus() {\n return exitStatus_;\n }", "void exit(String invocationId, Object returnValue);", "public static String EXIT(){\n\t\tSystem.out.println(\"Shutting down client...\");\n\t\tSystem.exit(0);\n\t\treturn \"\";\n\t\t\n\t}", "@Override\n\tpublic void finish() {\n\t\tsuper.finish();\n\t\tSystem.exit(0);\n\t}", "public void terminate();", "public Builder setExitStatus(int value) {\n bitField0_ |= 0x00000001;\n exitStatus_ = value;\n onChanged();\n return this;\n }", "@Test\r\n\tpublic void testEXIT(){\n\t}", "public static void exitProgram() {\n\r\n System.out.println(\"Thank you for using 'Covid 19 Vaccination Center Program'. \\n Stay safe!\");\r\n System.exit(0);\r\n }", "static public void order66() {\n System.exit(0);\n }", "private void exitGame() {\n System.exit(0);\n }", "public int getExitStatus() {\n return exitStatus_;\n }", "@Override\n\tpublic void execute() {\n\t\tSystem.exit(0);\n\t}", "private static void errorQuit(String message) \n\t{\n\t\tSystem.out.println(message);\n\t\tSystem.exit(1);\n\t}", "int exitValue();", "private void exitApplication() {\n\t\tBPCC_Logger.logInfoMessage(classNameForLogger, logMessage_applicationFrameClosed);\r\n\t\tSystem.exit(0);\r\n\t}", "public static void End()\n\t{\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"End of java application\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void quit();", "public void exitGame() {\n System.out.println(\"Thank you and good bye!\");\n System.exit(0);\n }", "public void exit(int code, String msg, Object... args) {\n if (conn.isConnected()) {\n tellManagers(msg, args);\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n }\n }\n tournamentService.flush();\n userService.flush();\n System.exit(code);\n }", "@Override\n public int getExitCode() {\n return 1;\n }", "public static void exitAll() {\r\n\t\tSystem.exit(0);\r\n\t}", "private void exitRegards()\n {\n System.out.println(\"\\t\\tSystem exit...\");\n System.out.println(\"\\t\\t================Thankyou, have a wonderful day! ===============\");\n System.exit(0);\n }", "void terminate();", "void terminate();", "void terminate();", "void terminate();", "void terminate();", "private void exitProgram() {\n try {\n logic.updateInventory();\n } catch (FileIOException e) {\n view.displayExceptionMessage(\"Error updating inventory file: \" + e.getMessage());\n view.waitOnUser();\n }\n view.showExitMessage();\n }", "protected void handleExit() {\r\n\t\texitRecieved = true;\r\n\t\tterminate();\r\n\t}", "private void exit() {\n this.isRunning = false;\n }" ]
[ "0.91235155", "0.8355717", "0.8337362", "0.7751619", "0.7721719", "0.7658243", "0.75419897", "0.7540272", "0.74423087", "0.74378574", "0.74378574", "0.74367267", "0.7342468", "0.7301032", "0.7240541", "0.71982276", "0.7177544", "0.71473825", "0.7116036", "0.71141714", "0.7098743", "0.7074974", "0.7074974", "0.7074974", "0.6992691", "0.69427925", "0.6939134", "0.6907159", "0.6907159", "0.68669313", "0.68632495", "0.68307966", "0.68264544", "0.68116194", "0.6797226", "0.6781857", "0.6734236", "0.6732638", "0.6702606", "0.6701656", "0.66920173", "0.66665703", "0.6653833", "0.66505104", "0.6628474", "0.65782547", "0.65587634", "0.65578467", "0.6550106", "0.6535081", "0.6513408", "0.6510394", "0.65020454", "0.6501688", "0.6500782", "0.64989865", "0.64947116", "0.64891124", "0.6486821", "0.648141", "0.64685476", "0.64606655", "0.64603907", "0.6449167", "0.6448479", "0.6445831", "0.6432748", "0.6428907", "0.64133793", "0.6392094", "0.63553125", "0.63476604", "0.6345162", "0.6337458", "0.63291717", "0.6324168", "0.6303496", "0.62897027", "0.6278107", "0.6274997", "0.62730575", "0.62716836", "0.6249209", "0.62454545", "0.62279403", "0.62268424", "0.6218691", "0.6203529", "0.61938787", "0.6189971", "0.61619925", "0.6159609", "0.6153229", "0.6149401", "0.6149401", "0.6149401", "0.6149401", "0.6149401", "0.6149257", "0.61485773", "0.6142235" ]
0.0
-1
/ 5. write an int[] return method that can sort an int array in desending order 6. write a double[] return method that can sort a double array in desending order 7. write a char[] return method that can sort a char array in desending order NOTE: MUST apply method overloading
public static void main(String[] args) { int[] arr1 = {4,6,7,2,9}; int[] result1 = descending(arr1); System.out.println(Arrays.toString(result1)); double[] arr2 = {41.3, 5.6, 17,1,2.9}; double[] result2 = descending(arr2); System.out.println(Arrays.toString(result2)); char[] ch={'f','e','i','g','a'}; char[] result3= descending(ch); System.out.println(Arrays.toString(result3)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String...args){\nbyte[] byte_arr = new byte[]{69,66,65,68,67,70};\r\nchar[] char_arr = new char[]{'D','F','C','A','E','B'};\r\ndouble[] double_arr = new double[6];\r\nfloat [] float_arr = new float[]{25F,21F,27F,19F,59F,3F};\r\nint[] int_arr = new int[]{16,7,28,9,13,10};\r\nlong [] long_arr = new long[]{25L,16L,37L,8L,9L,20L};\r\nshort[] short_arr = new short[]{15,66,37,68,69,70};\r\nString[] str_arr = new String[]{\"One\",\"Two\",\"Three\",\"Four\",\"Five\"};//will be used for Objects\r\n//Will use the the car array to work with comparators\r\nCar[] car_arr = new Car[]{new Car(\"Toyota Rav4\",12300),new Car(\"Nissan Almera\",65000),new Car(\"Honda Civic\",132000)};\r\n\r\n\r\n// use of the static sort() method// it returns void\r\nSystem.out.println(\"SORTING AN ARRAY\");\r\nArrays.sort(byte_arr);\r\nSystem.out.print(\"byte_arr sorted: \");\r\nfor(byte b:byte_arr){ System.out.print(b+\" \");}\r\n\r\nSystem.out.println();\r\n\r\nArrays.sort(float_arr);\r\nSystem.out.print(\"float_arr sorted: \");\r\nfor(float f:float_arr){ System.out.print(f+\" \");}\r\n\r\nSystem.out.println();\r\n\r\nArrays.sort(str_arr);\r\nSystem.out.print(\"str_arr sorted: \");\r\nfor(String s:str_arr){ System.out.print(s+\" \");}\r\n\r\nSystem.out.println();\r\n\r\n//Because Car is an Object and does not implement Comparable interface, it's sorted using a comparator\r\n//Our comparator compares based on the millage in descending order\r\nArrays.sort(car_arr,new Car_Comparator());\r\nSystem.out.print(\"car_arr sorted: \");\r\nfor(Car c:car_arr){ System.out.print(c+\" \");}\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nSEARCHING FOR AN ELEMENT IN AN ARRAY WITH binarySearch()\");\r\n\r\n//The binarySearch() search for an element and returns the index\r\n//It is useful when when the array is sorted\r\nSystem.out.println(\"Index of 37L for long_arr unsorted: \"+Arrays.binarySearch(long_arr,37L));\r\nArrays.sort(long_arr);\r\nSystem.out.println(\"Index of 37L for long_arr sorted: \"+Arrays.binarySearch(long_arr,37L));\r\n\r\nSystem.out.println(\"\\nCOPYING AN ARRAY TO ANOTHER\");\r\nshort[] short_arr_copy1 = Arrays.copyOf(short_arr, 6);\r\nSystem.out.print(\"copy of short_arr for length=6: \");\r\nfor(short sh:short_arr_copy1){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\nSystem.out.println(\"\\nIf lenght<short_arr, short_arr is partially copied from the beginning: \");\r\nshort[] short_arr_copy2 = Arrays.copyOf(short_arr, 3);\r\nSystem.out.print(\"copy of short_arr for length=3: \");\r\nfor(short sh:short_arr_copy2){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nIf lenght>short_arr, the copy is populated with zeros: \");\r\nshort[] short_arr_copy3 = Arrays.copyOf(short_arr, 8);\r\nSystem.out.print(\"copy of short_arr for length=8: \");\r\nfor(short sh:short_arr_copy3){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\n \r\nSystem.out.println();\r\nSystem.out.println(\"\\nCOPYING A RANGE OF AN ARRAY TO ANOTHER\");\r\nint[] int_arr_range_copy = Arrays.copyOfRange(int_arr,2,4);\r\nSystem.out.print(\"initial int_arr: \");\r\nfor(int i:int_arr)System.out.print(i+\" \");\r\nSystem.out.print(\"\\ncopy of int_arr from index 2 to 4: \");\r\nfor(int sh:int_arr_range_copy){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nCOMPARE AN ARRAYS USING equals()\");\r\n//retruns true if both arrays have the same content, otherwise, fasle\r\nSystem.out.println(\"Compare int_arr to its duplicate: \"+Arrays.equals(int_arr, new int[]{16,7,28,9,13,10}));\r\nSystem.out.println(\"Compare int_arr to a different one: \"+Arrays.equals(int_arr, new int[6]));\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nFILL AN ARRAY OR PORTION OF ARRAY USING fill(): \");\r\nSystem.out.print(\"char_arr contains: \");\r\nfor(char c : char_arr)System.out.print(c+\" \");\r\n//fill char_arr with a special value\r\nArrays.fill(char_arr,'T');\r\nSystem.out.print(\"\\nchar_arr now contains: \");\r\nfor(char c : char_arr)System.out.print(c+\" \");\r\n//Fill a portion of char_arr\r\nArrays.fill(char_arr,2, 5, 'E');\r\nSystem.out.print(\"\\nchar_arr now contains: \");\r\nfor(char c : char_arr)System.out.print(c+\" \");\r\n\t\r\n\tSystem.out.println();\r\n\tSystem.out.println(\"\\nUSE OF SPLITERATOR WITH ARRAYS: \");\r\n\t//Populate the double_arr\r\n\tfor(int i=0;i<double_arr.length;i++){\r\n\t\tdouble_arr[i] = i*(-1*2.17)+1;}\r\n\t\r\n\t\r\n\t//print double_arr\r\n\tSystem.out.print(\"\\ndouble_arr now contains: \");\r\n\tfor(double d : double_arr)System.out.print(d+\" \");\r\n\t\t\r\n}", "public static void main(String[] args) {\n\t\t\n\t\tint[] arr= {10,89,20,300,10,900,0,1};\n\t\tarr=SortDe(arr);\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tdouble[] arr2 = {10.5,5.5,300,2.0,6.5};\n\t\t// arr2=SortDe(arr2);\n\t\tSystem.out.println(Arrays.toString(SortDe(arr2)));\n\t\t\n\t\t\n\t\t\n\t}", "public abstract void sort(int[] sortMe);", "public String doSort();", "public static void main(String[] args) {\n //10,5\n sum2Num(10,5);\n\n //10,5,5\n sum3Num(10,5,5);\n\n //10,5,5,20\n sum4Num(10,5,5,20);\n\n System.out.println(\"=====================\");\n\n sum(10,5);\n sum(10,5,5);\n sum(10,5,5,20);\n\n int[] arr1 = {3,2,1};\n\n char[] arr2 = {'z', 's', 'a'};\n\n double [] arr3 = {10.5, 55,2, 60.5};\n\n Arrays.sort(arr1);\n Arrays.sort(arr2);\n Arrays.sort(arr3); // same method name, different parameter\n\n/*\nfirst method can find the sum of the int numbers\nsecond method: can find the sum of two double numbers\n */\n\n\n\n\n }", "public static void main1(String[] args) {\n\t\t\r\n\t\t\r\n\t\tint A[]= {1,4,3,2,6,7,21};\r\n\t\tchar s[]= {'e','a','c','d'};\r\n\t\t\r\n\t\t Arrays.sort(A);\r\n\t\t Arrays.sort(s);\r\n\r\n\t System.out.printf(\"Sorted array : %s\", Arrays.toString(A)); \r\n\t System.out.println();\r\n\t System.out.printf(\"Sorted array : %s\", Arrays.toString(s)); \r\n\r\n\t \r\n\t \r\n\t\t \r\n\t\t\r\n\t\t\r\n\r\n\t}", "public interface SortAlgorithm {\n\tpublic int[] sort(int[] numbers);\n}", "void sort();", "void sort();", "@Override\n public <T extends Comparable<T>> T[] sort(T[] arr) {\n for (int i=1 ; i<arr.length ; i++) {\n\n T card = arr[i];\n int j = i - 1;\n \n //Kucuk degeri sola kaydirma\n while (j >= 0 && Sort.less(card, arr[j])) {\n arr[j + 1] = arr[j];\n j--;\n }\n arr[j + 1] = card;\n }\n return arr;\n }", "<T extends Comparable<T>> void sort(T[] unsorted);", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "public static void apply_alg(String name)\n {\n String[] a = {\"hello\", \"how\" , \"are\" , \"you\"};\n Double [] d = {2.13,37.3,45.01,21.3,3.0,1.223,21.213,42.112,5.2};\n Character[] word = { 'S', 'H', 'E', 'L', 'L', 'S', 'O', 'R', 'T', 'E', 'X', 'A', 'M', 'P', 'L', 'E'};\n Date [] col = new Date[6];\n\n //insertion counter\n int c = 0;\n\n //initialize years in descending order\n for (int i = 5; i >= 0; i--)\n {\n //construct date object\n Date whenever = new Date (1,1, Integer.parseInt(\"201\" + i));\n\n //add date to array\n col[c] = whenever;\n\n //increment insertion counter\n c++;\n }\n\n System.out.println(\"Sorting an array using \" + name + \" sort!\\n\");\n\n switch (name)\n {\n case \"selection\":\n\n System.out.println(\"Sorting an array of strings!\");\n sorting.selection_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.selection_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.selection_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n break;\n\n case \"insertion\":\n System.out.println(\"Sorting an array of strings!\");\n sorting.insertion_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.insertion_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.insertion_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n break;\n\n case \"shell\":\n System.out.println(\"Sorting an array of strings!\");\n sorting.insertion_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.insertion_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.insertion_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n System.out.println(\"\\nSorting array of Characters!\");\n sorting.shell_sort(word);\n assert sorting.isSorted(word);\n sorting.print_array(word);\n\n break;\n\n\n default:\n\n System.out.println(\"No valid algorithm inputted!\");\n\n break;\n\n\n\n\n }\n\n\n }", "public abstract void sort(int[] array);", "public interface Sort<E extends Comparable<E>> {\n void sort(E[] e);\n\n default void show(E[] e) {\n StringBuffer res = new StringBuffer(\"[\");\n for (int i = 0; i < e.length; i++) {\n res.append(e[i] + \",\");\n }\n\n res = res.deleteCharAt(res.length() - 1);\n res.append(\"]\");\n System.out.println(res.toString());\n }\n\n default boolean isSorted(E[] e) {\n for (int i = 0; i < e.length - 1; i++) {\n if (e[i].compareTo(e[i + 1]) > 0)\n throw new IllegalArgumentException(\"排序出错, 请检查程序\");\n }\n\n System.out.println(\"排序正常...\");\n return true;\n }\n}", "public static void main(String args[])\n {\n JavaBuiltInSort ob = new JavaBuiltInSort();\n\n /*\n\n Integer arr[] = {64, 34, 25, 12, 22, 90, 11};\n System.out.println(\"The Unsorted array is\");\n ob.printArray(arr);\n\n sort(arr, 3, 7);\n System.out.println(\"The Java Built In Sort of the last 4 elements is\");\n ob.printArray(arr);\n\n sort(arr);\n System.out.println(\"The Java Built In Sorted array is\");\n ob.printArray(arr);\n\n sort(arr, Collections.reverseOrder());\n System.out.println(\"The Java Built in Reverse Sorted array is\");\n ob.printArray(arr);\n\n */\n\n String arr[] = {\n \"Michael\",\n \"Tamara\",\n \"Mackenzie\",\n \"Caius\",\n \"Emilia\",\n \"Katie\",\n \"Michael\",\n \"Maggie\",\n \"Austin\"\n };\n\n System.out.println(\"The Unsorted array is\");\n ob.printArray(arr);\n\n sort(arr);\n System.out.println(\"The Java Built In Sorted array is\");\n ob.printArray(arr);\n\n sort(arr, Collections.reverseOrder());\n System.out.println(\"The Java Built in Reverse Sorted array is\");\n ob.printArray(arr);\n\n sort(arr, arr.length-4, arr.length);\n System.out.println(\"The Java Built in Sort of the last 4 elements is\");\n ob.printArray(arr);\n }", "public static void main(String[] args) {\n int[] array = {5, 35, 75, 25, 95, 55, 45};\n // Arrays.sort(array);\n\n\n int j = array.length-1;\n for (int i = array.length-1; i >= 0; i--){\n array[j] = array[i];\n j--;\n //System.out.println(array[i]);\n }\n\n System.out.println(\"##########################\");\n //int max2 = array[array.length-1];\n\n //System.out.println(max2);\n double[] arr2 = {5.7, 35.0, 75.6, 25.3, 95.15, 55.88, 55.45};\n\n char[] ch = {'A', 'C', 'F', 'G', 'D', 'E', 'H', 'B'};\n\n\n maxNumber(array);\n\n maxNumber(arr2);\n\n System.out.println(\"><><><><><><><><><><><><><><><\");\n\n int[ ] des = Descending(array);\n System.out.println(Arrays.toString(des));\n\n double[] dess = Descending(arr2);\n System.out.println(Arrays.toString(dess));\n\n char[] desss = Descending(ch);\n System.out.println(Arrays.toString(desss));\n\n System.out.println(\"><><><><><><><><><><><><><><><\");\n\n }", "public static void main(String[] args) {\n\n double angle = Math.cos(Math.PI);\n double rad = Math.acos(angle);\n \n double rad2 = Math.acos(1.0/2);\n double angle2 = 180*rad2/Math.PI;\n System.out.println(\"rad2:\"+rad2+\" angle2:\" + angle2);\n\n double tan1 = Math.tan(1);\n double tan2 = Math.atan(1);\n double tan3 = Math.atan2(1,1);\n double tan4 = Math.tanh(1);\n System.out.println(\"angle:\" + angle + \" rad:\" + rad + \" tan1:\" + tan1+\" tan2:\"+tan2+\" tan3:\"+tan3+\" tan4:\"+tan4);\n\n String[] stringArray = getStringArray();\n System.out.println(\"排序前:\" + Arrays.toString(stringArray));\n //[io, collection, generics, array, string, rtti, poly, pattern, interface, internal, exception]\n Arrays.sort(stringArray);\n System.out.println(\"sort 排序后:\" + Arrays.toString(stringArray));\n //[array, collection, exception, generics, interface, internal, io, pattern, poly, rtti, string]\n Arrays.sort(stringArray, String.CASE_INSENSITIVE_ORDER);\n System.out.println(\"sort CASE_INSENSITIVE_ORDER 排序后:\" + Arrays.toString(stringArray));\n //[array, collection, exception, generics, interface, internal, io, pattern, poly, rtti, string]\n\n double d = Math.atan2(2, 5);\n System.out.println(\"data:\" + d);\n }", "public void radixSorting() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\tdouble[] array = new double[1048576];\n\t//http://stackoverflow.com/questions/215271/sort-arrays-of-primitive-types-in-descending-order\n\tArrays.sort(array);\n\t// reverse the array\n\tfor(int i=0;i<array.length/2;i++) {\n\t // swap the elements\n\t double temp = array[i];\n\t array[i] = array[array.length-(i+1)];\n\t array[array.length-(i+1)] = temp;\n\t}\n\t}", "public void sort() {\n if(c==null) {\n int middle;\n\n Comparable[] left, right;\n\n\n if (unsorted.length <= 1) {\n\n sorted = unsorted;\n\n } else {\n\n middle = unsorted.length / 2;\n\n\n left = new Comparable[middle];\n\n right = new Comparable[unsorted.length - middle];\n\n\n System.arraycopy(unsorted, 0, left, 0, middle);\n\n System.arraycopy(unsorted, middle, right, 0, unsorted.length - middle);\n\n\n // Внимание! Опа, рекурсия :)\n\n SimpleMerger leftSort = new SimpleMerger(left, c);\n\n SimpleMerger rightSort = new SimpleMerger(right,c);\n\n\n leftSort.sort();\n\n rightSort.sort();\n\n\n sorted = merge(leftSort.getSorted(), rightSort.getSorted());\n\n }\n }else{\n\n int middle;\n\n Object[] left, right;\n\n\n if (unsorted2.length <= 1) {\n\n sorted2 = unsorted2;\n\n } else {\n\n middle = unsorted2.length / 2;\n\n\n left = new Object[middle];\n\n right = new Object[unsorted2.length - middle];\n System.arraycopy(unsorted2, 0, left, 0, middle);\n\n System.arraycopy(unsorted2, middle, right, 0, unsorted2.length - middle);\n\n\n\n\n SimpleMerger leftSort = new SimpleMerger(left,c);\n\n SimpleMerger rightSort = new SimpleMerger(right,c);\n\n\n leftSort.sort();\n\n rightSort.sort();\n\n\n\n sorted2 = merge2(leftSort.getSorted2(), rightSort.getSorted2());\n\n }\n\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tint a[] = new int[4];//[0,0,0,0]\n\t\ta[0]=14;\n\t\ta[1]=12;\n\t\ta[2]=13;\n\t\ta[3]=11;\n\t\tSystem.out.println(Arrays.toString(a));\n\t\t\n\t\t//How to put elements in ascending order\n\t\tArrays.sort(a);\n\t\tSystem.out.println(Arrays.toString(a));\n\t\t\n\t\t//Type a program to add all elements in the array \"a\"\n\t\tint sum =0;\n\t\tfor(int i =0;i<a.length;i++) {\n\t\t\tsum = sum + a[i];\n\t\t\n\t\t}\n\t\tSystem.out.println(\"Sum : \" + sum);\n\t\t// Create a char array which has 6 elements with second way\n\t\t\n\t\tchar b[] = {'a','d','A','b','c','D'};\n\t\tSystem.out.println(Arrays.toString(b));\n\t\tArrays.sort(b);\n\t\tSystem.out.println(Arrays.toString(b));\n\t\t\n\t\t//Type a program to concatenate the elements in the array \"b\"\n String concat = \"\";\n for(int i = 0;i<b.length;i++) {\n \tconcat = concat + b[i];\n }\n System.out.println(\"Concatenated: \" + concat);//Concatenated: ADabcd\n \n String c[] = {\"Ali\", \"John\", \"ALI\", \"Brad\", \"Mary\", \"Angie\"};//These are stored in heap memory, but inside\n //the array only the references of these elements is stored. When you print the elements,\n //Java take the Strings from the heap memory an then print them on the console.\n //So do not forget that arrays cannot store non-primitive things. But can store only the addresses(references) of them.\n System.out.println(Arrays.toString(c));//[Ali, John, ALI, Brad, Mary, Angie]\n \n Arrays.sort(c);\n System.out.println(Arrays.toString(c));//[ALI, Ali, Angie, Brad, John, Mary]\n \n //Print the elements whose indexes are even on the console.\n for(int i =0;i<c.length;i++) {\n \tif(i%2==0) {\n \t\tSystem.out.print(c[i] + \" \");//ALI Angie John (index 0,2,6)\n \t}}\n //How to check if a specific element exists in the array or not\n \t\t\n //To check if an element exists in an array or not we use \"binarySearch()\"\n //Be Careful!!! ==> Before using \"binarySearch()\" method you HAVE TO use sort()\n //If you use \"binarySearch()\" without using sort(), you will get a result but\n //it will not be meaningful\n \t\t\n int d[] = {3,5,2,12,4,3,6};\n //Check if 12 exists in array \"d\"\n \t\tArrays.sort(d);\n \t\tSystem.out.println(Arrays.toString(d));//[2, 3, 3, 4, 5, 6, 12]\n \t\t//binarySearch() returns NON NEGATIVE values if the element exists.\n \t\t//If the element exists you will get the index of the element from binarySearch() method.\n \t\tSystem.out.println(Arrays.binarySearch(d, 12));//6 (6 is the index of the element which after sorted=>12)\n \t\t\n \t\tSystem.out.println(Arrays.binarySearch(d, 9));//-7 \"-\" means it doesn't exists in the array. 7 means if the number(9) \n \t\t//exists, it would be in the 7th order(not index just number) according to the sorted array.\n \t\t//If the element does not exist, you will get NEGATIVE number. Negative sign displays\n \t\t//non-existance, the number displays the order number IF the element exists\n \t\tSystem.out.println(Arrays.binarySearch(d, 15));//-8\n \t\t//binarySearch() method cannot be used for repeated elements, you can get output but \n \t\t//it is not meaningful.\n \t\tSystem.out.println(Arrays.binarySearch(d, 3));\n \t\t\n \t\t\n \t}", "@Override\n public void sort(int[] input) {\n }", "public int[] sortSpecial(int[] A1, int[] A2) {\n Integer[] intergerArray = toIntegerArray(A1);\n Arrays.sort(intergerArray, new MyComparator(A2));\n toIntArray(intergerArray, A1);\n return A1;\n }", "void sort(int[] sort);", "public interface Sorter {\n int[] sort(int[] sequence);\n}", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(\"Bubble Sort\");\r\n\t\tint[] arr1 = {8,3,2,1,4,6,5,7};\r\n\t\tSystem.out.println(Arrays.toString(arr1));\r\n\t\tBubble.sort(arr1);\r\n\t\tSystem.out.println(Arrays.toString(arr1));\r\n\t\t\r\n\t\tSystem.out.println(\"Select Sort\");\r\n\t\tint[] arr2 = {8,3,2,1,4,6,5,7};\r\n\t\tSystem.out.println(Arrays.toString(arr2));\r\n\t\tSelect.sort(arr2);\r\n\t\tSystem.out.println(Arrays.toString(arr2));\r\n\t\t\r\n\t\tSystem.out.println(\"Insert Sort\");\r\n\t\tint[] arr3 = {8,3,2,1,4,6,5,7};\r\n\t\tSystem.out.println(Arrays.toString(arr3));\r\n\t\tInsert.sort(arr3);\r\n\t\tSystem.out.println(Arrays.toString(arr3));\r\n\t\t\r\n\t\tSystem.out.println(\"Quick Sort\");\r\n\t\tint[] arr4 = {8,3,2,1,4,6,5,7};\r\n\t\tSystem.out.println(Arrays.toString(arr4));\r\n\t\tQuickSort.sort(arr4, 0, arr4.length-1);\r\n\t\tSystem.out.println(Arrays.toString(arr4));\r\n\t\t\r\n\t\tbyte b = -127;\r\n\t\tb = (byte) (b << 1);\r\n\t\tSystem.out.println(b);\r\n\t}", "public interface SortingAlgorithm {\r\n\r\n\t/**\r\n\t * Single method sort.\r\n\t * \r\n\t * @param array\r\n\t * input to be sorted.\r\n\t * @return a sorted representation of the array.\r\n\t */\r\n\tpublic int[] sort(int[] array);\r\n\r\n}", "@Override\n\tpublic int[] sort(int[] numbers) {\n\t\treturn null;\n\t}", "public void sort() {\n }", "public interface Sortable {\n void sort(int[] nums);\n String getSortName();\n default void swap(int[] arr, int i, int j) {\n //不能有相同值,不然会有错,注意和的范围溢出\n if (i != j) {\n arr[i] = arr[i] + arr[j];\n arr[j] = arr[i] - arr[j];\n arr[i] = arr[i] - arr[j];\n }\n }\n}", "@Override\n public void sortIt(final Comparable a[]) {\n }", "public double[] sort(double[] data) {\r\n for (int pass = 1; pass < data.length; pass++) {\r\n for (int element=0;element<data.length-1;element++) {\r\n if (data[element] > data[element + 1]){\r\n double hold = data[element];\r\n this.countOp();\r\n data[element] = data[element + 1];\r\n this.countOp();\r\n data[element + 1] = hold;\r\n this.countOp();\r\n }\r\n }\r\n }\r\n return data;\r\n }", "public interface IArraySort {\n int[] sort(int [] sort);\n}", "@Override\n\tpublic void sort(T[] nums) {\n\t\tsort(nums,0,nums.length - 1);\n\t}", "interface Subsort {\n void sort(int[] arr, int left, int right);\n }", "void sort(int a[]) throws Exception {\n }", "public interface Sorter {\n <T> void sort(final T[] array, final Comparator<T> c);\n}", "public static void main(String[] args) {\n\t\tint[] num = {12,327,9,4,3,2,12,34,21,67,544,32,12,12,23,43,76,11};\n\n\t\tfor(int i = 0; i<num.length; i++) {\n\t\t\tcount++; //18\n\t\t\tfor(int j = 0; j < num.length; j++) {\n\t\t\t\tcount1++; //324\n\t\t\t\tint temp;\n\n\t\t\t\tif(num[i] > num[j]) {\n\t\t\t\t\ttemp = num[j];\n\t\t\t\t\tnum[j] = num[i];\n\t\t\t\t\tnum[i] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"===\"+num.length);\n\t\tfor(int i = 0; i< num.length; i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\n\t\t/** Sorting Array - Method 2 */\n\n\t\tint[] num1 = {12,327,9,4,3,2,12,34,21,67,544,32,12,12,23,43,76,11};\n\n\t\tfor(int i = 0; i< num1.length; i++) {\n\t\t\tSystem.out.print(num1[i]+\",\");\n\t\t}\n\t\tSystem.out.println(\"===\"+num1.length);\n\t\tfor(int i = 1; i< num1.length; i++) {\n\t\t\tcount++; //75\n\n\t\t\tint ch = num1 [i];\n\t\t\twhile (i > 0 && num1[i-1] > ch) {\n\t\t\t\tcount1++; //58\n\t\t\t\tnum1[i] = num1[i-1];\n\t\t\t\ti--;\n\t\t\t}\n\t\t\tnum1[i] = ch;\n\t\t}\n\t\tfor(int i = 0; i< num1.length; i++) {\n\t\t\tSystem.out.print(num1[i]+\",\");\n\t\t}\n\t}", "public static void main(String[] args) {\n int[] arr1 = new int[]{49,123,6,90,5};\n Arrays.sort(arr1);\n System.out.println(Arrays.toString(arr1));\n System.out.println(\"=============================================\");\n\n //non primitive type sorting and reversing\n Integer[] arr = new Integer[]{49,123,6,90,5};\n Arrays.sort(arr, Collections.reverseOrder());\n System.out.println(Arrays.toString(arr));\n System.out.println(\"=============================================\");\n\n // using comparable and compareTo to sort the objects\n Coordinates[] pointers = new Coordinates[]{new Coordinates(1,5)\n ,new Coordinates(98,4)\n ,new Coordinates(0,76)\n ,new Coordinates(2,67)};\n\n Arrays.sort(pointers);\n for(int i=0;i<pointers.length;i++){\n System.out.println(pointers[i].getX()+\" \" + pointers[i].getY());\n }\n\n System.out.println(\"=============================================\");\n // using comparator to sort the objects of non primitive type\n Points[] points = new Points[]{new Points(1,5)\n ,new Points(98,4)\n ,new Points(0,76)\n ,new Points(2,67)};\n Arrays.sort(points,new ComparatorObj());\n for(int i=0;i<pointers.length;i++){\n System.out.println(points[i].getX()+\" \" + points[i].getY());\n }\n\n\n }", "private static void sortHelperMSD(String[] asciis, int start, int end, int index) {\n // Optional MSD helper method for optional MSD radix sort\n return;\n }", "public interface Sorter<T> {\n\n void sort(Comparable<T>[] data);\n}", "@Test\r\n public void confirmNumericalSortTest() {\r\n int[] unsorted = new int[]{2,10,1,3,4,100,20};\r\n int[] expResult = new int[]{1,2,3,4,10,20,100};\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "void sortV();", "@Override\n public void sort(Comparable[] a){\n aux = new Comparable[a.length];\n sort(a, 0, a.length - 1);\n }", "public static void main(String[] args) {\n\n\t\tArraySorting as=new ArraySorting();\n\t\tint arr[]= {0,1,1,0,1,2,1,2,0,0,0,1};\n\t\tint n= arr.length;\n\t\t\n\t\tas.sortArray(arr, n);\n\t}", "public static void main(String[] args) {\n\t\tSortTransformedArray result = new SortTransformedArray();\n\t\tSystem.out.println(Arrays.toString(result.sortTransformedArray(new int[] {-4, -2, 2, 4}, 1, 3, 5)));\n\t\tSystem.out.println(Arrays.toString(result.sortTransformedArray(new int[] {-4, -2, 2, 4}, -1, 3, 5)));\n\t}", "@Test\n public void testSort_intArr() {\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testSort_intArr_IntComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public static interface DataSorting {\n\t\t/**\n\t\t * The method which checks the line and determines whether or not it should be added or removed from the array. \n\t\t * <br />\n\t\t * Note that the <code>sort()</code> method will remove the line upon false, whereas <code>assort()</code> will remove it upon true.\n\t\t * \n\t\t * @param input\n\t\t * One line of the data array\n\t\t */\n\t\tpublic Boolean test(String input);\n\t}", "private T[] sortArray() {\n \n int middleIndex = elements.length / 2;\n\n T[] sArr1 = Arrays.copyOfRange(elements, 0, middleIndex);\n T[] sArr2 = Arrays.copyOfRange(elements, middleIndex, elements.length);\n\n Arrays.sort(sArr1);\n Arrays.sort(sArr2);\n\n return merge(sArr1, sArr2);\n }", "@Override\n\tpublic void sort(int[] array) {\n\n\t}", "public static <T extends Comparable<? super T>> void sort(T[] a) {\n @SuppressWarnings(\"unchecked\")\n T[] aux = (T[]) newInstance(a.getClass().getComponentType(), a.length); \n sort(a, aux, 0, a.length - 1);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Please enter space separated array to sort array with merge sort: \\n\"); \r\n\t\tString[] arrRowItems = scanner.nextLine().split(\" \");\r\n\t\tscanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\r\n\t\tint[] arr = new int[arrRowItems.length];\r\n\t\tfor (int j = 0; j < arrRowItems.length; j++) {\r\n\t\t\tint arrItem = Integer.parseInt(arrRowItems[j]);\r\n\t\t\tarr[j] = arrItem;\r\n\t\t}\r\n\t\tint arrCopy[] = arr;\r\n\t\tmergeSort(arr, 0, arr.length - 1,true); // sort ascending \r\n\t\tSystem.out.println(\"Ascending Array \\n\");\r\n\t\tprintMyarray(arr);\r\n\t\tmergeSort(arrCopy, 0, arrCopy.length - 1,false); // sort descending\r\n\t\tSystem.out.println(\"\\nDescending Array \\n\");\r\n\t\tprintMyarray(arrCopy);\r\n\t\tscanner.close();\r\n\t}", "public int compare(Object o1, Object o2) {\n/* 25 */ Alphabet a1 = (Alphabet)o1;\n/* 26 */ Alphabet a2 = (Alphabet)o2;\n/* */ \n/* 28 */ return a2.order - a1.order;\n/* */ }", "@Test\n public void testSort_intArr_IntegerComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "private static <T> void sort1(char x[], T[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tchar v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}", "public static void main(String[] args) {\n\t\tint [] nums= {1,4,5,2,77,45};\n\t\t\n\t\tSystem.out.println(Arrays.toString(nums));\n\t\t\n\t\t//sort Method from Array class\n\t\t\n\t\t// it take array object and sort it's items in ascending order \n\t\tArrays.sort(nums);\n\t\tSystem.out.println(Arrays.toString(nums));\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tchar arr[] = {'a','J','z','K','g','h','D','d','r','t','a','j','A'};\n\t\t\n\t\t// 정렬 전\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\t// 정렬(오름차순)\n\t\tArrays.sort(arr);\n\t\t\n\t\t// 정렬 후\n\t\tSystem.out.println(Arrays.toString(arr));\n\t}", "public static void sort(Comparable[] a)\n {\n aux= new Comparable[a.length]; //Allocate space just once\n sort(a,0,a.length); //this uses the sort method in the bottom and tells where it should merge sort.\n }", "private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }", "public void sort(Contestant[] arr){\n\t\t/* code goes here */\n\t\t\n\t\t//WHAT IS DIFFERENCE BETWEEN THIS AND sortAllRows???\n\t\t\n\t}", "@Test\n public void testSort_intArr_IntegerComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public void testSortAndDedup() {\n assertDeduped(List.<String>of(), Comparator.naturalOrder(), 0);\n // test no elements in an integer array\n assertDeduped(List.<Integer>of(), Comparator.naturalOrder(), 0);\n // test unsorted array\n assertDeduped(List.of(-1, 0, 2, 1, -1, 19, -1), Comparator.naturalOrder(), 5);\n // test sorted array\n assertDeduped(List.of(-1, 0, 1, 2, 19, 19), Comparator.naturalOrder(), 5);\n // test sorted\n }", "@Test\n public void testSort_intArr_IntComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Override\n\tpublic <T extends Comparable<T>> T[] sort(T[] unsorted) {\n\t\tT[] temporary = (T[]) new Comparable[unsorted.length];\n\t\tdoSort(unsorted, temporary, 0, unsorted.length - 1);\n\t\treturn unsorted;\n\t}", "@Override\n\tpublic T[] sort(T[] input) {\n\t\tfor(int i = 1; i < input.length; i++){\n\t\t\t//compare with the previous one, if smaller, switch with it.\n\t\t\tfor(int j = i; j > 0 && input[j-1].compareTo( input[j]) > 0; j--){\n\t\t\t\t//add the condition input[j-1] > input[j] in the for loop;\n\t\t\t\t//cause if j-1th < jth, j-2th < jth(left part is ordered)\n\t\t\t\tswap(input, j, j-1);\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}", "public static <T> void parallelSort(char[] a, T[] a2) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, 0, a.length);\n\t}", "private static <T> void sort1(char x[], char[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tchar v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}", "private static void sort(String[] a, int lo, int hi, int d) { \n if (hi <= lo + CUTOFF) {\n insertion(a, lo, hi, d);\n return;\n }\n int lt = lo;\n int gt = hi;\n int v = charAt(a[lo], d);\n int i = lo + 1;\n while (i <= gt) {\n int t = charAt(a[i], d);\n if (t < v) {\n \texch(a, lt++, i++);\n }\n else if (t > v) {\n \texch(a, i, gt--);\n }\n else {\n \ti++;\n }\n }\n //a[lo..lt-1] < v = a[lt..gt] < a[gt+1..hi]. \n sort(a, lo, lt-1, d);\n if (v >= 0) sort(a, lt, gt, d+1);\n sort(a, gt+1, hi, d);\n }", "public static void main(String arg[])\n {\n\tScanner sc=new Scanner(System.in);\n\tSystem.out.println(\"How many no you are goinig to enter?\");\n\tint value =sc.nextInt();\n\tString arr[]= new String[value];\n for(int k=0;k<value;k++)\n\t{\n \tarr[k]=sc.next();\n }\n int len=arr.length;\n\n //par2:sort compare\n \tfor(int i=0; i<len;i++)\n\t{\n \tfor(int k=0;k<len-1;k++)\n\t {\t \n\t if(arr[k].compareTo(arr[k+1]) > 0)\n\t {\n\n \t\tString temp=arr[k];\n \t\tarr[k]=arr[k+1];\n \t\tarr[k+1]=temp;\n }\n\t }\n }\n\n//print\n\t for(int l=0;l<len;l++)\n\t {\n\t System.out.println(\" after sort \"+arr[l]+\"\\n\");\n\t }\n\t}", "public static void main(String[] args) {\n\t\t//test arrays\n\t\tInteger[] arr = {1, 4, 3, 2, 64, 3, 2, 4, 5, 5, 2, 12, 14, 5, 3, 0, -1};\n\t\tString[] strarr = {\"hope you find this helpful!\", \"wef\", \"rg\", \"q2rq2r\", \"avs\", \"erhijer0g\", \"ewofij\", \"gwe\", \"q\", \"random\"};\n\t\tarr = insertionsort(arr);\n\t\tstrarr = insertionsort(strarr);\n\t\tSystem.out.println(Arrays.toString(arr));\n\t\tSystem.out.println(Arrays.toString(strarr));\n\n\t}", "public static void main(String[] args) {\r\n int[] numbers = {25, 43, 29, 50, -6, 32, -20, 43, 8, -6};\r\n\t\r\n\tSystem.out.print(\"before sorting: \");\r\n\toutputArray(numbers);\r\n \r\n\tbubbleSort(numbers);\r\n\t\r\n\tSystem.out.print(\"after sorting: \");\r\n\toutputArray(numbers);\r\n }", "static int[] Sort(int array[])\n\t{\n\t\t//Check to see if there is one or more numbers in the array.\n\t\tif(array.length > 1)\n\t\t//If there is more than one number, begin the process of splitting the array in half.\n\t\t{\n\t\t\tint sparray1 = array.length/2;\n\t\t\tint sparray2 = sparray1;\n\t\t\t\tif((array.length % 2) == 1)\n\t\t\t\t\tsparray2 += 1;\n\t\t//Initialize the new split sub-arrays and copy for sorting.\n\t\t\tint split1[] = new int[sparray1];\n\t\t\tint split2[] = new int[sparray2];\n\t\t\tfor(int i = 0; i < sparray1; i++)\n\t\t\t\tsplit1[i] = array[i];\n\t\t\tfor(int i = sparray1; i < sparray1 + sparray2; i++)\n\t\t\t\tsplit2[i - sparray1] = array[i];\n\t\t//Send sub-arrays back through the methods to be sorted.\n\t\t\tsplit1 = Sort(split1);\n\t\t\tsplit2 = Sort(split2);\n\t\t//Compare the numbers in the sub-arrays and sort them from small to large.\n\t\t\tint i = 0, j = 0, k = 0;\n\t\t\twhile(split1.length != j && split2.length != k)\n\t\t\t{\n\t\t\t\tif(split1[j] < split2[k])\n\t\t\t\t{\n\t\t\t\t\tarray[i] = split1[j];\n\t\t\t\t\ti++;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tarray[i] = split2[k];\n\t\t\t\t\ti++;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t//Recombine the sorted sub-arrays and return the completed sorted array. \n\t\t\twhile(split1.length != j)\n\t\t\t{\n\t\t\t\tarray[i] = split1[j];\n\t\t\t\ti++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\twhile(split2.length != k)\n\t\t\t{\n\t\t\t\tarray[i] = split2[k];\n\t\t\t\ti++;\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t\treturn array;\n\t}", "@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }", "public void jsort() {\n\tArrays.sort(data);\n }", "public String sortBy();", "static double [] quickSort (double a[]){\r\n \tif(a==null||a.length==0) {\r\n \t\tSystem.out.print(\"Array empty\");\r\n \t\treturn null;\r\n \t}\r\n \tdoQuickSort(a,0,a.length-1);\r\n \treturn a;\r\n\r\n }", "public void sort(T[] arr, T[] aux, int begin, int end){\n\n if(end-begin < 7){\n insertionSort(arr, begin, end);\n return;\n }\n\n int mid = (begin+end)/2;\n\n sort(arr, aux, begin, mid);\n sort(arr, aux, mid+1, end);\n\n if(arr[mid].compareTo(arr[mid+1]) != 1){\n return;\n }else{\n merge(arr, aux, begin, mid, end);\n }\n }", "public static int[] sort( int[] arr ) \n {\n\tif (arr.length == 1){\n\t return arr;\n\t}\n\telse{\n\t int[] part1 = new int[arr.length/2];\n\t for (int x= 0; x < part1.length; x++){\n\t\tpart1[x] = arr[x];\n\t }\n\t int[] part2 = new int[(arr.length)-part1.length];\n\t int counter = 0;\n\t for (int y = part1.length; y<arr.length; y++){\n\t\tpart2[counter] = arr[y];\n\t\tcounter++;\n\t }\n\t printArray(part1);\n\t System.out.print(\" \");\n\t printArray(part2);\n\t System.out.println();\n\t part1 = sort(part1);\n\t part2 = sort(part2);\n\t return merge(part1,part2);\n\t}\n }", "public static void main(String args[])\r\n {\r\n JavaSort ob = new JavaSort();\r\n \r\n CatalogueItem arr[] = {\r\n new CatalogueItem( 3, \"Life of Pi\",\"Books\"),\r\n new CatalogueItem( 7, \"Deelongie 4 way toaster\",\"Home and Kitchen\"),\r\n new CatalogueItem( 2, \"Glorbarl knife set\",\"Home and Kitchen\"),\r\n new CatalogueItem( 4, \"Diesorn vacuum cleaner\",\"Appliances\"),\r\n new CatalogueItem( 5, \"Jennie Olivier sauce pan\",\"Home and Kitchen\"),\r\n new CatalogueItem( 6, \"This book will save your life\",\"Books\"),\r\n new CatalogueItem( 9, \"Kemwould hand mixer\",\"Appliances\"),\r\n new CatalogueItem( 1, \"Java for Dummies\",\"Books\"),\r\n };\r\n System.out.println(\"The Unsorted array is\");\r\n ob.printArray(arr);\r\n\r\n /*\r\n //apply sort\r\n ob.doOptimisedBubbleSort(arr);\r\n System.out.println(\"The array sorted by category using Java built in sort is\");\r\n ob.printArray(arr);\r\n */\r\n\r\n sort(arr);\r\n System.out.println(\"The array sorted by category using Java built in sort is\");\r\n ob.printArray(arr);\r\n\r\n System.out.println(\"The algorithm that is most efficient is the Java built in sort.\\n\\n\" +\r\n \"It uses Timsort, which has on average is the same level of time complexity\\n\" +\r\n \"as Quicksort - O(n log(n)). But Timsort is better at it's best and worst\\n\" +\r\n \"when compared with Quicksort.\\n\\n\" +\r\n \"Quicksort best = O(n log(n)) worst = O(n^2)\\n\" +\r\n \"Timsort best = O(n) worst = O(n log(n))\\n\" +\r\n \"\\n\" +\r\n \"This means at it's best, Timsort will only have to traverse the array 'n' times, to sort.\\n\" +\r\n \"And Quicksort at it's worst will have to check an array length squared amount of elements.\\n\");\r\n\r\n }", "private static void sort(Comparable[] as, Comparable[] aux, int lo, int hi) {\n if (hi <= lo + CUTOFF - 1) {\n Insertion.sort(as, lo, hi);\n return;\n }\n int mid = lo + (hi - lo) / 2;\n sort (as, aux, lo, mid);\n sort (as, aux, mid + 1, hi);\n // Last element of first array is less than the first of the second --> Stop!\n if (!less(as[mid + 1], as[mid])) return;\n merge (as, aux, lo, mid, hi);\n }", "@Test\n public void testSort_intArr_half() {\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Override\n public void sort(IAlg algorithm, boolean decrescent){}", "@Test\r\n public void testSortedArr() {\r\n System.out.println(\"SortedArr\");\r\n int length = 0;\r\n Class sortClass = null;\r\n int[] expResult = null;\r\n int[] result = GenerateArr.SortedArr(length, sortClass);\r\n assertArrayEquals(expResult, result);\r\n }", "public static double[] doubleArraySort(double[]tab) {\n\t\tdouble[]tabRet=new double[tab.length];\n\t\tArrayList<Double> list=new ArrayList<Double>();\n\t\tfor(double dou : tab)list.add(dou);\n\t\tCollections.sort(list);\n\t\tfor(int i=0;i<list.size();i++)tabRet[i]=list.get(i);\n\t\treturn tabRet;\n\t}", "public static <T extends Comparable<T>> void sort(T[] a) {\r\n\tmergesort(a, 0, a.length-1);\r\n }", "public static void main (String[] args) {\n \n double[] arr = { 3.4, 2.3, 5.7, 6.7, 9.0, 2.2, 2.1, 5.0, 6.5, 3.7, 4.6, 6.0, 7.0, 7.1, 0.3 };\n System.out.println(Arrays.toString(arr));\n Arrays.sort(arr);\n System.out.println(Arrays.toString(arr));\n }", "public static void sortByName(String[] func, int[] venc, int size) {\n String tempFunc;\n int tempVenc;\n\n for(int i = 0; i < size; i++) {\n for(int j = i + 1; j < size; j++) {\n if(func[i].compareTo(func[j]) > 0) {\n tempFunc = func[i];\n tempVenc = venc[i];\n func[i] = func[j];\n venc[i] = venc[j];\n func[j] = tempFunc;\n venc[j] = tempVenc;\n }\n }\n }\n printList(func, venc, size);\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }" ]
[ "0.7130317", "0.6627146", "0.6589652", "0.65124315", "0.64861685", "0.64647543", "0.63670534", "0.6324743", "0.6324743", "0.6318293", "0.6276453", "0.62391204", "0.6224227", "0.620949", "0.61850214", "0.6173734", "0.6165428", "0.61470276", "0.60910976", "0.60300463", "0.60243285", "0.602397", "0.6014389", "0.6005594", "0.59978044", "0.5973598", "0.59717244", "0.59680456", "0.59573686", "0.59351045", "0.59301335", "0.59060633", "0.5886181", "0.5883064", "0.5877057", "0.58724463", "0.5847261", "0.5814199", "0.58114696", "0.5789813", "0.5783883", "0.5771548", "0.5739777", "0.5738804", "0.571852", "0.57173157", "0.57172644", "0.5709388", "0.57033426", "0.56968695", "0.569178", "0.56842256", "0.56838846", "0.5672398", "0.5668732", "0.566598", "0.5663328", "0.5659789", "0.5637047", "0.56349486", "0.5634041", "0.56246436", "0.56056744", "0.56039643", "0.5600353", "0.5591516", "0.5587094", "0.5580627", "0.557655", "0.5573095", "0.5567286", "0.5563509", "0.5561597", "0.5560989", "0.55555373", "0.5550497", "0.55490744", "0.55467904", "0.55458885", "0.5543199", "0.553877", "0.55367756", "0.55352044", "0.55329865", "0.55305606", "0.551992", "0.55197495", "0.5517781", "0.5514344", "0.5504967", "0.5504967", "0.5504967", "0.5504967", "0.5504967", "0.5504967", "0.5504967", "0.5504967", "0.5504967", "0.5504967", "0.5504967" ]
0.7189391
0
TODO Autogenerated method stub
@Override protected void onDestroy() { super.onDestroy(); //取消某个网络请求 NMApplication.getRequestQueue().cancelAll(VOLLEY_POST); }
{ "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
After inorder traversal [1,2,3,4,7,8,9]
public static TreeNode getMockWithSuccessorTreeRoot() { TreeNode<Integer> root = new TreeNode<>(4); TreeNode<Integer> node1 = new TreeNode<>(2); TreeNode<Integer> node2 = new TreeNode<>(8); TreeNode<Integer> node3 = new TreeNode<>(1); TreeNode<Integer> node4 = new TreeNode<>(3); TreeNode<Integer> node5 = new TreeNode<>(7); TreeNode<Integer> node6 = new TreeNode<>(9); root.left = node1; root.right = node2; node1.parent = root; node2.parent = root; node1.left = node3; node1.right = node4; node3.parent = node1; node4.parent = node1; node2.left = node5; node2.right = node6; node5.parent = node2; node6.parent = node2; return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<Integer> inOrderTraversal(Tree tree, List<Integer> arr){\n if(tree==null){\n return null;\n }\n\n if(tree.left!=null){\n inOrderTraversal(tree.left, arr);\n }\n arr.add(tree.data);\n\n if(tree.right!=null){\n inOrderTraversal(tree.right,arr);\n }\n return arr;\n\n}", "public void inOrderTraverseRecursive();", "public void inOrderTraverseIterative();", "int[] inOrderTraversal() {\n \tinOrderTraversalRecursive(this.root);\n \tInteger[] result = (Integer[])inorder.toArray(new Integer[0]);\n \tint[] r = new int[result.length];\n \tfor(int i = 0 ; i < result.length; i++)\n \t{\n \t\tr[i] = result[i];\n \t}\n \treturn r;\n }", "public static void main(String[] args) {\n\t\tList<List<Integer>> res = new ArrayList<List<Integer>>();\n\t\t\n\t\tList<Integer> list = new ArrayList<>();\n\t\tlist.add(2);\n\t\tlist.add(3);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(4);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(5);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(6);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(7);\n\t\tlist.add(8);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(9);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(10);\n\t\tlist.add(11);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tSystem.out.println(res);\n\t\tSystem.out.println(Inorder(res));\n\t\tList<Integer> queries = new ArrayList<>();\n\t\tqueries.add(2);\n\t\tqueries.add(4);\n\t\tswapNodes(res, queries);\n\n\t}", "@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}", "public ArrayList<Integer> inOrderTraversal() {\r\n\t\treturn inOrderTraversal(treeMinimum());\r\n\t}", "public void inorder()\n {\n inorderRec(root);\n }", "public static void main(String[] args) {\n\n\n TreeNode root = new TreeNode(1);\n TreeNode left1 = new TreeNode(2);\n TreeNode left2 = new TreeNode(3);\n TreeNode left3 = new TreeNode(4);\n TreeNode left4 = new TreeNode(5);\n TreeNode right1 = new TreeNode(6);\n TreeNode right2 = new TreeNode(7);\n TreeNode right3 = new TreeNode(8);\n TreeNode right4 = new TreeNode(9);\n TreeNode right5 = new TreeNode(10);\n root.left = left1;\n root.right = right1;\n left1.left = left2;\n left1.right = left3;\n left3.right = left4;\n right1.left = right2;\n right1.right = right3;\n right2.right = right4;\n right3.left = right5;\n //[3, 2, 4, 5, 1, 7, 9, 6, 10, 8]\n List<Integer> list = inorderTraversalN(root);\n System.err.println(list);\n }", "private void inorder() {\n inorder(root);\n }", "public void inorder()\r\n {\r\n inorder(root);\r\n }", "private void inorder() {\r\n\t\t\tinorder(root);\r\n\t\t}", "public void inorder()\n {\n inorder(root);\n }", "public void inorder()\n {\n inorder(root);\n }", "public void inOrder(){\n inOrder(root);\n }", "public List<Integer> inorderTraversal(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n if (root == null) {\n return result;\n }\n inorderRec(root, result);\n return result;\n }", "public List<Integer> inorderTraversal(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n Stack<TreeNode> stack = new Stack<>();\n TreeNode node = root;\n while (node != null || !stack.empty()) {\n // push left nodes into stack\n while (node != null) {\n stack.push(node);\n node = node.left;\n }\n node = stack.pop();\n result.add(node.val);\n // ! key step: invoke recursive call on node's right child\n node = node.right;\n }\n return result;\n }", "public ArrayList<E> inorderNoRecursion()\n {\n ArrayList<E> nonRecursiveInorder= new ArrayList<>();\n\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE IN ORDER TRAVERSAL OF THE TREE WITHOUT USING RECURSION AND RETURN THE RESULT TRAVEL SEQUENCE IN ARRAYLIST nonRecursiveInorder\n */\n\n return nonRecursiveInorder;\n }", "public List<Integer> inorderTraversal2(TreeNode root) {\n List<Integer> result = new ArrayList<>();\n if (root == null) {\n return result;\n }\n TreeNode curr = root; // not necessary\n Deque<TreeNode> stack = new ArrayDeque<>();\n\n while (true) {\n // inorder: left, root, right\n // add all left nodes into stack\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n } // curr == null\n // if stack is empty, then finished\n if (stack.isEmpty()) {\n break;\n }\n // all left nodes in stack\n // if right node empty, pop, else add right\n curr = stack.pop();\n // add left and root\n result.add(curr.val);\n // if right is null, then next round pop stack\n // else next round add right.left first ...\n curr = curr.right;\n }\n // stack is empty\n return result;\n }", "private List<T> inOrder(Node<T> curr, List<T> list) { //Time Complexity: O(n)\n if (curr == null) {\n return list;\n }\n inOrder(curr.left, list);\n list.add(curr.data);\n inOrder(curr.right, list);\n return list;\n }", "public void inOrderTraversal(){\n System.out.println(\"inOrderTraversal\");\n\n Stack<Node> stack = new ArrayStack<Node>();\n\n for(Node node = root; node!= null; node=node.getLeft()){\n stack.push(node);\n }\n while(!stack.isEmpty()){\n Node node = stack.pop();\n System.out.print(node.getData() + \" \");\n\n for(node=node.getRight(); node!= null; node = node.getLeft()){\n stack.push(node);\n }\n }\n\n System.out.println();\n }", "private List<T> inOrderHelper(Node<T> current, List<T> result) {\n\t\tif (current != null) {\n\t\t\tresult = inOrderHelper(current.getLeft(), result);\n\t\t\tresult.add(current.getData());\n\t\t\tresult = inOrderHelper(current.getRight(), result);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public void inOrderTraversal(Node node)\n\t{\n\t\tif(node!=null){\n\t\t\t\n\t\t\tinOrderTraversal(node.leftChild);\n\t\t\tarr.add(node.data);\n\t\t\tinOrderTraversal(node.rightChild);\n\t\t}\n\t}", "public void inOrderTraversal() {\n beginAnimation();\n treeInOrderTraversal(root);\n stopAnimation();\n\n }", "static void inorderTraversal(Node tmp)\n {\n if(tmp!=null) {\n inorderTraversal(tmp.left);\n System.out.print(tmp.val+\" \");\n inorderTraversal(tmp.right);\n }\n \n \n \n }", "private void inOrderTraversal(int index) {\n // go through the graph as long as has values\n if (array[index] == null) {\n return;\n }\n //call recursively the method on left child\n inOrderTraversal(2 * index + 1);\n // print the node\n System.out.print(array[index] + \", \");\n //call recursively the method on right child\n inOrderTraversal(2 * index + 2);\n }", "private void inorderRec(TreeNode root, List<Integer> result) {\n if (root != null) {\n inorderRec(root.left,result);\n result.add(root.val);\n inorderRec(root.right,result);\n }\n }", "public void inOrder() {\n inOrder(root);\n }", "public List < Integer > inorderTraversal(TreeNode root) {\n List < Integer > res = new ArrayList < > ();\n TreeNode curr = root;\n TreeNode pre;\n while (curr != null) {\n if (curr.left == null) {\n res.add(curr.val);\n curr = curr.right; // move to next right node\n } else { // has a left subtree\n pre = curr.left;\n while (pre.right != null) { // find rightmost\n pre = pre.right;\n }\n pre.right = curr; // put cur after the pre node\n TreeNode temp = curr; // store cur node\n curr = curr.left; // move cur to the top of the new tree\n temp.left = null; // original cur left be null, avoid infinite loops\n }\n }\n return res;\n }", "public void postOrderTraversal(){\n System.out.println(\"postOrderTraversal\");\n //TODO: incomplete\n\n }", "@Override\r\n\tpublic List<Node<T>> getPostOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\treturn auxiliarRecorridoPost(raiz, lista);\r\n\t}", "public void inOrder() {\r\n \r\n // call the private inOrder method with the root\r\n inOrder(root);\r\n }", "public void inorderTraversal() {\n inorderThroughRoot(root);\n System.out.println();\n }", "public void inorderTraverse(){\n\t\tinorderHelper(root);\n\t\tSystem.out.println();\n\t}", "public void inOrder(){\n inOrder(root);\n System.out.println();\n }", "private void inorder(TreeNode<E> root) {\n if (root == null) {\n return;\n }\n inorder(root.left);\n list.add(root.element);\n inorder(root.right);\n }", "public void inorder()\r\n\t{\r\n\t\tif(root==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"tree is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// find the leftmost node of the tree\r\n\t\tNode p =root;\r\n\t\twhile(p.leftThread==false)\r\n\t\t\tp=p.left;\r\n\t\twhile(p!=null)//loop until we reach the right most node whose right link(rightThread) is null\r\n\t\t{\r\n\t\t\tSystem.out.print(p.info + \" \");\r\n\t\t\tif(p.rightThread==true) // if 'right' is pointing to the inorder successor\r\n\t\t\t\tp = p.right;\r\n\t\t\telse // find the inorder successor i.e the left most node in the right sub tree\r\n\t\t\t{\r\n\t\t\t\tp = p.right;\r\n\t\t\t\twhile(p.leftThread==false)\r\n\t\t\t\t\tp = p.left;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public List<Integer> inorderTraversalRecursive(TreeNode root) {\n if(root == null){\n return rst;\n }\n inorderTraversalRecursive(root.left);\n rst.add(root.val);\n inorderTraversalRecursive(root.right);\n return rst;\n }", "private E[] geInOrderRightSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}", "public void inorder(Node source) {\n inorderRec(source);\n }", "static void inorder(TreeNode root, List<Integer> output) {\n if (root == null) {\n return;\n }\n inorder(root.left, output);\n output.add(root.val);\n inorder(root.right, output);\n }", "@Override\r\n\tpublic List<Node<T>> getPreOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// La lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\treturn auxiliarRecorridoPre(raiz, lista);\r\n\t}", "private void inorder(TreeNode<E> root) {\r\n\t\t\tif (root == null)\r\n\t\t\t\treturn;\r\n\t\t\tinorder(root.left);\r\n\t\t\tlist.add(root.element);\r\n\t\t\tinorder(root.right);\r\n\t\t}", "void getInorderIteratively(Node node) {\n Stack<Node> stack = new Stack<Tree.Node>();\n if (node == null)\n return;\n Node current = node;\n while (!stack.isEmpty() || current != null) {\n // While the sub tree is not empty keep on adding them\n while (current != null) {\n stack.push(current);\n current = current.left;\n }\n // No more left sub tree\n Node temp = stack.pop();\n System.out.println(temp.data);\n // We now have to move to the right sub tree of the just popped out node\n current = temp.right;\n }\n\n }", "public List<T> inOrder() { //Time Complexity: O(1)\n List<T> list = new ArrayList<>();\n return inOrder(root, list);\n }", "public static void main(String[] args) {\n\t\tBinary_Tree_Inorder_Traversal_94 b=new Binary_Tree_Inorder_Traversal_94();\n\t\tTreeNode root=new TreeNode(1);\n\t\troot.right=new TreeNode(2);\n\t\troot.right.left=new TreeNode(3);\n\t\tList<Integer> list=b.inorderTraversal(root);\n\t\tfor(Integer i:list){\n\t\t\tSystem.out.print(i+\" \");\n\t\t}\n\t}", "List<Integer> traversePostOrder(List<Integer> oList) \n\t{\n\t\tif(this.left != null)\n\t\t{\n\t\t\tthis.left.traversePostOrder(oList);\n\t\t}\n\t\n\t\tif(this.right != null)\n\t\t{\n\t\t\tthis.right.traversePostOrder(oList);\n\t\t}\n\t\t\n\t\toList.add(this.key);\n\t\t\n\t\treturn oList;\n\t}", "public ArrayList<E> postorderNoRecursion()\n {\n ArrayList<E> nonRecursivePostorder= new ArrayList<>();\n\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE POST ORDER TRAVERSAL OF THE TREE WITHOUT USING RECURSION AND RETURN THE RESULT TRAVEL SEQUENCE IN ARRAYLIST nonRecursivePostorder\n */\n\n return nonRecursivePostorder;\n }", "ArrayList<Integer> preOrder(Node root)\n {\n // Code\n ArrayList<Integer> result = new ArrayList<Integer>();\n\n if (root == null) {\n return null;\n }\n Stack<Node> stack = new Stack<Node>();\n stack.push(root);\n // Node newNode = root;\n\n while (stack.empty() == false) {\n Node mynode = stack.peek();\n result.add(mynode.data);\n //System.out.print(mynode.data + \" \");\n stack.pop();\n\n if (mynode.right != null) {\n stack.push(mynode.right);\n }\n if(mynode.left != null){\n stack.push(mynode.left);\n }\n\n }\n return result;\n }", "void inOrderTraversal(Node node){\r\n\t\tif( node == null ) {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tinOrderTraversal( node.left );\r\n\t\tSystem.out.print( node.value + \" \");\r\n\t\tinOrderTraversal( node.right );\r\n\t}", "private void traverseInOrder(BinaryNode<AnyType> curr) {\n\t\tif (curr.left != null) {\n\t\t\ttraverseInOrder(curr.left);\n\t\t}\n\t\tSystem.out.println(curr.element);\n\n\t\t// checking for duplicates\n\n\t\tfor (int i = 0; i < curr.duplicate.size(); i++) {\n\t\t\tSystem.out.println(curr.duplicate.get(i).element);\n\t\t}\n\n\t\tif (curr.right != null) {\n\t\t\ttraverseInOrder(curr.right);\n\t\t}\n\t}", "public static List<Node> inOrderTraversal(BinarySearchTree BST) {\n inorder = new LinkedList<Node>();\n inOrderTraversal(BST.getRoot());\n return inorder;\n }", "public void inOrder() {\r\n\t\tSystem.out.print(\"IN: \");\r\n\t\tinOrder(root);\r\n\t\tSystem.out.println();\r\n\t}", "void inOrderTraversal(OO8BinaryTreeNode node) {\n\t\tif(node==null)\n\t\t\treturn;\n\t\tinOrderTraversal(node.getLeftNode());\n\t\tSystem.out.print(node.getValue() + \" \");\n\t\tinOrderTraversal(node.getRightNode());\n\t}", "private static boolean inOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the left child, then the current node, then finally the right child\n else {\n inOrderTraversal(current.getLeftChild());\n inorder.add(current);\n inOrderTraversal(current.getRightChild());\n }\n return true;\n }", "public static void main(String[] args) {\n\t\tTreeNode root = new TreeNode(1);\n\t\troot.right = new TreeNode(2);\n\t\t//root.left.left = new TreeNode(3);\n\t\t//root.left.right = new TreeNode(3);\n\t\troot.right.left = new TreeNode(3);\n\t\t//root.right.right = new TreeNode(3);\n\t\t\n\t\tSystem.out.println(inorderTraversal(root));\n\t}", "private List<Node<T>> nodeInOrder (Node<T> curr, List<Node<T>> list) {\n if (curr == null) {\n return list;\n }\n nodeInOrder(curr.left, list);\n list.add(curr);\n nodeInOrder(curr.right, list);\n return list;\n }", "public ArrayList<Integer> inOrderTraversal (RBNode x) {\r\n\t\tArrayList<Integer> output = new ArrayList<Integer>(size);\r\n\t\toutput.add(x.key);\r\n\t\tRBNode next = nextNode(x);\r\n\t\twhile (next != nil){\r\n\t\t\toutput.add(next.key);\r\n\t\t\tnext = nextNode(next);\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "static ArrayList<Integer> preorder(Node root)\n {\n ArrayList<Integer> output_arr=new ArrayList<>();\n if(root==null){\n return null;\n }\n Stack<Node> stack=new Stack<>();\n stack.add(root);\n \n while(!stack.isEmpty()){\n Node currentnode=stack.pop();\n output_arr.add(currentnode.data);\n if(currentnode.right!=null){\n stack.add(currentnode.right);\n }\n if(currentnode.left!=null){\n stack.add(currentnode.left);\n }\n \n }\n return output_arr;\n }", "private E[] getPreOrderLeftSubTree(E[] inOrderTraversal,E[] preOrderTraversal) {\n\t\treturn null;\n\t}", "private void recInOrderTraversal(BSTNode<T> node) {\n\t\tif (node != null) {\n\t\t\trecInOrderTraversal(node.getLeft());\n\t\t\ta.add(node.getData());\n\t\t\trecInOrderTraversal(node.getRight());\n\t\t}\n\t}", "public List<Integer> postorderTraversal(TreeNode root) {\n LinkedList<Integer> res = new LinkedList<>();\n Stack<TreeNode> stack = new Stack<>();\n\n while (root != null || !stack.empty()) {\n if (root != null) {\n res.addFirst(root.val);\n stack.push(root);\n root = root.right;\n }\n else {\n root = stack.pop().left;\n }\n }\n return res;\n }", "static void inOrderWithoutRecursion(Node root) {\n if (root == null) {\n return;\n }\n Stack<Node> stack = new Stack<>();\n Node curr = root;\n while (curr != null || !stack.isEmpty()) {\n while (curr != null) {\n stack.push(curr);\n curr = curr.left;\n }\n curr = stack.pop();\n System.out.print(curr.data + \" \");\n curr = curr.right;\n }\n\n }", "private void inOrderTraversal(StringBuilder sb) {\n if (left != null) {\n left.inOrderTraversal(sb);\n }\n\n sb.append(data + \" \");\n\n\n if (right != null) {\n right.inOrderTraversal(sb);\n }\n }", "List<Integer> traverseInOrder(List<Integer> oList) \n\t{\n\t\tif(this.left != null)\n\t\t{\n\t\t\tthis.left.traverseInOrder(oList);\n\t\t}\n\t\n\t\toList.add(this.key);\n\t\n\t\tif(this.right != null)\n\t\t{\n\t\t\tthis.right.traverseInOrder(oList);\n\t\t}\n\t\t\n\t\treturn oList;\n\t}", "private E[] getInOrderLeftSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}", "public void inorderTraversal() \n { \n inorderTraversal(header.rightChild); \n }", "void inorderTraversal(Node node) {\n\t\tif (node != null) {\n\t\t\tinorderTraversal(node.left);\n\t\t\tSystem.out.print(node.data + \" \");\n\t\t\tinorderTraversal(node.right);\n\t\t}\n\t}", "public List<Integer> preorderTraversal(TreeNode root) {\n ArrayList<Integer> returnList = new ArrayList<Integer>();\n LinkedList<TreeNode> stack = new LinkedList<TreeNode>();\n \n while(root !=null || !stack.isEmpty()){\n if(root != null){\n stack.push(root);\n returnList.add(root.val);\n root = root.left;\n }else{\n root = stack.pop();\n root = root.right;\n }\n }\n return returnList;\n }", "public static void main(String[] args) {\n TreeNode n7 = new TreeNode(7);\n TreeNode n6 = new TreeNode(6);\n TreeNode n5 = new TreeNode(5);\n TreeNode n4 = new TreeNode(4);\n TreeNode n3 = new TreeNode(3);\n TreeNode n2 = new TreeNode(2);\n TreeNode n1 = new TreeNode(1);\n\n n4.left = n2;\n n4.right = n6;\n\n n2.left = n1;\n n2.right = n3;\n\n n6.left = n5;\n n6.right = n7;\n\n System.out.println(\"Cay n4\");\n List<Integer> resultPreOrder = preOrderTravel(n4);\n for (Integer integer : resultPreOrder) {\n System.out.println(integer);\n }\n\n System.out.println(\"Cay n2\");\n resultPreOrder = preOrderTravel(n2);\n for (Integer integer : resultPreOrder) {\n System.out.println(integer);\n }\n }", "public Iterator<T> inorderIterator() { return new InorderIterator(root); }", "public static void main(String[] args) {\n\t\ttn=new TreeNode(null,null,null,1);\n\t\tTreeNode tleft=new TreeNode(tn,null,null,2);\n\t\tTreeNode tright=new TreeNode(tn,null,null,3);\n\t\ttn.left=tleft;\n\t\ttn.right=tright;\n\t\t\n\t\tTreeNode tleft1=new TreeNode(tleft,null,null,4);\n\t\tTreeNode tright1=new TreeNode(tleft,null,null,5);\n\t\ttleft.left=tleft1;\n\t\ttleft.right=tright1;\n\t\t\n\t\tTreeNode tleft2=new TreeNode(tright,null,null,6);\n\t\tTreeNode tright2=new TreeNode(tright,null,null,7);\n\t\ttright.left=tleft2;\n\t\ttright.right=tright2;\n\t\t\n\t\tTreeNode tleft3=new TreeNode(tleft1,null,null,8);\n\t\tTreeNode tright3=new TreeNode(tleft1,null,null,9);\n\t\ttleft1.left=tleft3;\n\t\ttleft1.right=tright3;\n\t\t\n\t\tTreeNode tleft4=new TreeNode(tright1,null,null,10);\n\t\tTreeNode tright4=new TreeNode(tright1,null,null,11);\n\t\ttright1.left=tleft4;\n\t\ttright1.right=tright4;\n\t\t\n\t\tSystem.out.println(inorderTraversal2(tn));\n\t}", "public List<Integer> postorderTraversal1(TreeNode root) {\n List<Integer> traversal = new ArrayList<>();\n Deque<TreeNode> stack = new ArrayDeque<>();\n\n TreeNode current = root;\n\n while (current != null || !stack.isEmpty()) {\n\n // visit until the leaf\n while (current != null) {\n stack.push(current);\n\n // visit left right, then right, as in post-order\n if (current.left != null) {\n current = current.left;\n } else {\n current = current.right;\n // check in the end is to sure right is always visited\n }\n }\n\n // node as parent, its left and right child are both null\n TreeNode node = stack.pop();\n traversal.add(node.val); // node is added after both its children are visited\n\n // visit node's right sibling if it exists\n // stack.peek()\n // / \\\n // node to be visited\n if (!stack.isEmpty() && stack.peek().left == node) {\n current = stack.peek().right;\n }\n }\n\n return traversal;\n }", "private E[] getPreOrderRightSubTree(E[] inOrderTraversal,\n\t\t\tE[] preOrderTraversal) {\n\t\treturn null;\n\t}", "public int[] inOrder(Integer currentLine){\r\n\t \t\t\r\n\t\t//Case for exit recursive function. CurrentLine is a leaf of the tree\r\n\t\tif (currentLine == -1){\r\n\t \t return orderedArray; \r\n\t }\r\n\t\t//Search left subtree\r\n\t\tinOrder(getLeft(currentLine));\r\n\t //Add to array the info of current Node\r\n\t orderedArray[oArrayAvail]=getKey(currentLine);\r\n\t oArrayAvail++;\r\n\t //Search right subtree\r\n\t inOrder(getRight(currentLine));\r\n\t return orderedArray;\r\n\t\t\r\n\t}", "public InorderIterator() {\r\n\t\t\tinorder(); // Traverse binary tree and store elements in list\r\n\t\t}", "private void inOrder(Node root) {\r\n\t\t// inOrderCount++;\r\n\t\t// System.out.println(\" Count: \" + inOrderCount);\r\n\t\tif (root == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// System.out.println(\" Count: \" + inOrderCount);\r\n\t\tinOrder(root.getlChild());\r\n\t\tif (inOrderCount < 20) {\r\n\t\t\tSystem.out.print(\"< \" + root.getData() + \" > \");\r\n\t\t\tinOrderCount++;\r\n\t\t\t//System.out.println(\" Count: \" + inOrderCount);\r\n\t\t}\r\n\t\tinOrder(root.getrChild());\r\n\r\n\t}", "private void preOrderTraversal(int index) {\n if (array[index] == null) {\n return;\n }\n // print the node\n System.out.print(array[index] + \", \");\n //call recursively the method on left child\n preOrderTraversal(2 * index + 1);\n //call recursively the method on right child\n preOrderTraversal(2 * index + 2);\n }", "private void postOrderTraversal(int index) {\n if (array[index] == null) {\n return;\n }\n //call recursively the method on left child\n postOrderTraversal(2 * index + 1);\n //call recursively the method on right child\n postOrderTraversal(2 * index + 2);\n // print the node\n System.out.print(array[index] + \", \");\n }", "public void inOrderTraversalRecursive(ArrayList<Integer> o, RBNode x){\r\n\t\tif(x.left != nil) inOrderTraversalRecursive(o,x.left);\r\n\t\to.add(x.key);\r\n\t\tif(x.right != nil) inOrderTraversalRecursive(o,x.right);\r\n\t}", "public myList<T> my_preorder();", "private void inOrder() {\n inOrderTraversal(0);\n System.out.println(); // jump to next line\n }", "private List<T> postOrderHelper(Node<T> current, List<T> result) {\n\t\tif (current != null) {\n\t\t\tresult = postOrderHelper(current.getLeft(), result);\n\t\t\tresult = postOrderHelper(current.getRight(), result);\n\t\t\tresult.add(current.getData());\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Override\n public void backtrack() {\n if (!stack.isEmpty()) {\n int index = (Integer) stack.pop();\n\n if (index > arr.length) {//popping the insert function unneeded push\n insert((Integer) stack.pop());\n stack.pop();\n }\n if (index < arr.length) {//popping the delete function unneeded push\n delete(index);\n stack.pop();\n stack.pop();\n }\n System.out.println(\"backtracking performed\");\n }\n }", "static void inorderTraversal(Node root) {\n if (root == null) {\n return;\n }\n inorderTraversal(root.left);\n System.out.print(root.data + \" \");\n inorderTraversal(root.right);\n }", "public ArrayList<Integer> preorderTraversal(TreeNode a) {\n\n ArrayList<Integer> result = new ArrayList<>();\n\n if (a == null) return result;\n\n Stack<TreeNode> stack = new Stack();\n TreeNode current = a;\n\n // Push the root node onto the stack\n stack.push(current);\n\n while (!stack.isEmpty()) {\n // pop a node off of the stack\n TreeNode node = stack.pop();\n result.add(node.val);\n\n // push the right and left nodes onto the stack\n if (node.right != null) {\n stack.push(node.right);\n }\n\n if (node.left != null) {\n stack.push(node.left);\n }\n }\n\n return result;\n }", "public void printInorder() {\r\n System.out.print(\"inorder:\");\r\n printInorder(overallRoot);\r\n System.out.println();\r\n }", "public static int[] inorder(TreeNode root, int[] a) {\n int res = a[1];\n if (root == null) {\n return a;\n }\n int[] left = inorder(root.left, a);\n if (left[0] != -1) {\n res = Math.min(left[1], root.val - left[0]);\n }\n a[0] = root.val;\n a[1] = res;\n return inorder(root.right, a);\n }", "public List<T> inorder() {\n ArrayList<T> list = new ArrayList<T>();\n if (root != null) {\n inorderHelper(list, root);\n }\n return list;\n }", "static <T> List<T> implementAPostorderTraversalWithoutRecursion(BinaryTreeNode<T> tree) {\n List<T> result = new ArrayList<>();\n Deque<BinaryTreeNode<T>> stack = new ArrayDeque<>();\n BinaryTreeNode<T> previous = tree;\n\n stack.push(tree);\n\n while (!stack.isEmpty()) {\n BinaryTreeNode<T> node = stack.peek();\n\n if ((node.left == null) && (node.right == null)) { // leaf\n result.add(stack.pop().data);\n } else {\n if ((node.right != null) && (previous == node.right)) { // returning from right child\n result.add(stack.pop().data);\n } else if ((node.right == null) && (previous == node.left)) { // returning from left when right is null\n result.add(stack.pop().data);\n } else {\n if (node.right != null) stack.push(node.right);\n if (node.left != null) stack.push(node.left);\n }\n }\n\n previous = node;\n }\n\n return result;\n }", "public ArrayList<Integer> inOrderPrint() {\n\t\tArrayList<Integer> inOrder = new ArrayList<Integer>();\n\t\tinOrderPrint(root, inOrder);\n\t\treturn inOrder;\n\t}", "public InorderIterator() {\n inorder(); // Traverse binary tree and store elements in list\n }", "public void printInorder() {\n System.out.print(\"inorder:\");\n printInorder(overallRoot);\n System.out.println();\n }", "public List<Integer> postOrder(TreeNode root) {\n\n List<Integer> ans = new ArrayList<>();\n\n if(root==null){\n return ans;\n }\n\n Deque<TreeNode> stack = new LinkedList<>();\n stack.push(root);\n TreeNode pre = new TreeNode(0);\n\n while(!stack.isEmpty()) {\n\n if (stack.peek().left != null && stack.peek().left != pre && stack.peek().right != pre) {\n stack.push(stack.peek().left);\n continue;\n }\n\n if (stack.peek().right != null && stack.peek().right != pre) {\n stack.push(stack.peek().right);\n continue;\n }\n pre = stack.poll();\n ans.add(pre.key);\n }\n\n return ans;\n\n }", "public ArrayList<K> inOrdorTraverseBST(){\n BSTNode<K> currentNode = this.rootNode;\n LinkedList<BSTNode<K>> nodeStack = new LinkedList<BSTNode<K>>();\n ArrayList<K> result = new ArrayList<K>();\n \n if (currentNode == null)\n return null;\n \n while (currentNode != null || nodeStack.size() > 0) {\n while (currentNode != null) {\n nodeStack.add(currentNode);\n currentNode = currentNode.getLeftChild();\n }\n currentNode = nodeStack.pollLast();\n result.add(currentNode.getId());\n currentNode = currentNode.getRightChild();\n }\n \n return result;\n }", "List<Integer> traversePreOrder(List<Integer> oList) \n\t{\t\t\n\t\toList.add(this.key);\n\t\t\n\t\tif(this.left != null)\n\t\t{\n\t\t\tthis.left.traversePreOrder(oList);\n\t\t}\n\t\t\n\t\tif(this.right != null)\n\t\t{\n\t\t\tthis.right.traversePreOrder(oList);\n\t\t}\n\t\t\n\t\treturn oList;\t\t\n\t}", "public void inOrder(BSTNode<T> root,ArrayList<T> valueArray)\n\t{\n\t\tif(root == null)\n\t\t\treturn;\n\t\t\n\t\tinOrder(root.right,valueArray);\n\t\tif(valueArray.size() == n)\n\t\t\treturn;\n\t\tvalueArray.add(root.data);\n\t\tinOrder(root.left,valueArray);\n\n\t}", "public ArrayList<Integer> postorderTraversal(TreeNode root) {\n ArrayList<Integer> list = new ArrayList<>();\n Stack<TreeNode> stack = new Stack<>();\n\n if (root == null)\n return list;\n\n stack.push(root);\n while (!stack.empty()) {\n TreeNode current = stack.pop();\n if (current.left != null) {\n stack.push(current.left);\n list.add(current.left.val);\n current.left = null;\n } else if (current.right != null) {\n stack.push(current.right);\n list.add(current.right.val);\n current.right = null;\n } else {\n stack.pop();\n list.add(current.val);\n }\n }\n return list;\n }", "public static void main(String[] args) {\n\n TreeNode<Integer> node = new TreeNode<>(7);\n node.left = new TreeNode<>(2);\n node.left.left = new TreeNode<>(1);\n node.left.right = new TreeNode<>(3);\n node.right = new TreeNode<>(5);\n node.right.left = new TreeNode<>(4);\n node.right.right = new TreeNode<>(8);\n node.right.left.left = new TreeNode<>(0);\n\n List<TreeNode<Integer>> list = TreeNode.linearize_postOrder_1(node);\n for (TreeNode<Integer> n : list) {\n System.out.printf(\"%d, \", n.value);\n }\n System.out.printf(\"\\n\");\n\n list = TreeNode.linearize_postOrder_2(node);\n for (TreeNode<Integer> n : list) {\n System.out.printf(\"%d, \", n.value);\n }\n System.out.printf(\"\\n\");\n\n Map<Integer, Deque<Integer>> adjacencyList = new HashMap<>();\n Deque<Integer> children = new ArrayDeque<>();\n children.add(2); children.add(5);\n adjacencyList.put(7, children);\n children = new ArrayDeque<>();\n children.add(1); children.add(3);\n adjacencyList.put(2, children);\n children = new ArrayDeque<>();\n children.add(4); children.add(8);\n adjacencyList.put(5, children);\n //adjacencyList.put(1, new ArrayDeque<>());\n //adjacencyList.put(3, new ArrayDeque<>());\n children = new ArrayDeque<>();\n children.add(0);\n adjacencyList.put(4, children);\n //adjacencyList.put(0, new ArrayDeque<>());\n //adjacencyList.put(8, new ArrayDeque<>());\n GraphUtils.postOrderTraverse(adjacencyList, new Consumer<Integer>() {\n @Override\n public void accept(Integer integer) {\n System.out.printf(\"%d, \", integer);\n }\n });\n System.out.printf(\"\\n\");\n }", "private void inorder_traversal(Node n, int depth) {\n if (n != null) {\n inorder_traversal(n.left, depth + 1); //add 1 to depth (y coordinate) \n n.xpos = totalNodes++; //x coord is node number in inorder traversal\n n.ypos = depth; // mark y coord as depth\n inorder_traversal(n.right, depth + 1);\n }\n }", "public static void inOrderTraverse(Node root) {\n\t\tStack<Node> stack = new Stack<Node>();\n\t\tNode node = root;\n\t\twhile (node!=null || !stack.empty()) {\n if(node!=null){\n \t stack.push(node);\n \t node = node.lchild;\n }else{\n \t node = stack.pop();\n \t node.visit();\n \t node = node.rchild;\n }\n\t\t}\n\t}" ]
[ "0.7125334", "0.6955005", "0.6882478", "0.6875517", "0.67846006", "0.67781866", "0.6777857", "0.67730325", "0.6765573", "0.6717016", "0.66818947", "0.66384244", "0.65810275", "0.65810275", "0.6528373", "0.64780444", "0.6438296", "0.64328706", "0.64257747", "0.64133424", "0.6411264", "0.634715", "0.63292634", "0.6308292", "0.630493", "0.6292643", "0.6283082", "0.6274443", "0.62500364", "0.62451726", "0.62410545", "0.62335783", "0.6223677", "0.6207583", "0.61884034", "0.6180588", "0.6174795", "0.6146894", "0.613184", "0.61194205", "0.60914093", "0.6087187", "0.6072822", "0.60577214", "0.60342896", "0.6016718", "0.6013728", "0.5984001", "0.5949935", "0.5933181", "0.5928682", "0.5927654", "0.59255135", "0.5922593", "0.5918267", "0.5911133", "0.59082943", "0.5907356", "0.5902155", "0.5895163", "0.5878182", "0.58726704", "0.5861604", "0.5860524", "0.5860501", "0.5859947", "0.5857147", "0.58349156", "0.5826282", "0.5818", "0.5814726", "0.5812795", "0.5803944", "0.57916635", "0.57902116", "0.5777984", "0.5770572", "0.5770447", "0.5768857", "0.57636786", "0.5762115", "0.5757111", "0.5755631", "0.57507676", "0.5746118", "0.57407945", "0.5735961", "0.57282305", "0.5727202", "0.57250786", "0.5714878", "0.57043034", "0.57042164", "0.5698541", "0.5698288", "0.5690173", "0.5670224", "0.56578755", "0.56563944", "0.5652359", "0.5651708" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.list_view, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7249256", "0.72037125", "0.7197713", "0.7180111", "0.71107703", "0.70437056", "0.70412415", "0.7014533", "0.7011124", "0.6983377", "0.69496083", "0.69436663", "0.69371194", "0.69207716", "0.69207716", "0.6893342", "0.6886841", "0.6879545", "0.6877086", "0.68662405", "0.68662405", "0.68662405", "0.68662405", "0.68546635", "0.6850904", "0.68238425", "0.6820094", "0.6817109", "0.6817109", "0.6816499", "0.6809805", "0.68039787", "0.6801761", "0.6795609", "0.6792361", "0.67904586", "0.67863315", "0.67613983", "0.67612505", "0.67518395", "0.6747958", "0.6747958", "0.67444956", "0.674315", "0.672999", "0.67269987", "0.67268807", "0.67268807", "0.67242754", "0.67145765", "0.6708541", "0.6707851", "0.6702594", "0.6702059", "0.6700578", "0.6698895", "0.66905326", "0.6687487", "0.6687487", "0.66857284", "0.66845626", "0.6683136", "0.66816247", "0.66716284", "0.66714823", "0.66655463", "0.6659545", "0.6659545", "0.6659545", "0.6658646", "0.6658646", "0.6658646", "0.6658615", "0.6656098", "0.665457", "0.6653698", "0.66525924", "0.6651066", "0.66510355", "0.6649152", "0.6648921", "0.6648275", "0.6647936", "0.66473657", "0.66471183", "0.6644802", "0.66427094", "0.66391647", "0.66359305", "0.6635502", "0.6635502", "0.6635502", "0.66354305", "0.66325855", "0.66324854", "0.6630521", "0.66282266", "0.66281354", "0.66235965", "0.662218", "0.66216594" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_posts, container, false); bookRecyclerView = view.findViewById(R.id.posts_RView); bookRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); bookRecyclerView.setHasFixedSize(true); firebaseDatabase = FirebaseDatabase.getInstance(); databaseReference = firebaseDatabase.getReference("Posts"); bookRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { if (dy > 0 ) { //hide bottom app bar ((AppCompatActivity) getActivity()).getSupportActionBar().hide(); } else if (dy < 0 ) { //show bottom app bar ((AppCompatActivity) getActivity()).getSupportActionBar().show(); } } }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { WebDriver driver; System.setProperty("webdriver.gecko.driver", "C:\\Users\\dell\\Downloads\\Compressed\\geckodriver-v0.20.1-win64_2\\geckodriver.exe"); driver=new FirefoxDriver(); driver.get("https://www.google.com"); ScreenShot(driver,"c://test.png"); }
{ "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 ScreenShot(WebDriver driver, String Filepath) { TakesScreenshot screen=((TakesScreenshot)driver); File SrcFile=screen.getScreenshotAs(OutputType.FILE); //Move image to new destination File DestFile=new File(Filepath); //Copy file at destination location //FileUtils.copyFile(SrcFile, DestFile); }
{ "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
List all the products in the website containing the keyword
@GetMapping("/list/{name}") public ResponseEntity<List<Product>> getProd(@PathVariable String name, final HttpSession session) { log.info(session.getId() + " : Retrieving products with given keyword"); return ResponseEntity.status(HttpStatus.OK).body(prodService.getProdList(name)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printProductThroughName(String keyword)\n {\n System.out.println(\"List of products with keyword \" + \"[\" + keyword\n + \"]\\n\");\n \n for(Product product : stock)\n {\n if(product.name.contains(keyword))\n {\n System.out.println(product.toString());\n }\n }\n }", "private void search(String product) {\n // ..\n }", "public List<Product> search(String searchString);", "@GetMapping(\"/products/{text}\")\n public List<Product> findProductsContaining(@PathVariable String text){\n return productRepository.findProductByNameContains(text);\n }", "private void get_products_search()\r\n\r\n {\n MakeWebRequest.MakeWebRequest(\"get\", AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n AppConfig.SALES_RETURN_PRODUCT_LIST + \"[\" + Chemist_ID + \",\"+client_id +\"]\", this, true);\r\n\r\n// MakeWebRequest.MakeWebRequest(\"out_array\", AppConfig.SALES_RETURN_PRODUCT_LIST, AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n// null, this, false, j_arr.toString());\r\n //JSONArray jsonArray=new JSONArray();\r\n }", "List<Product> getProductsContainingProductNameOrShortDescription(String productSearchString);", "public List searchProduct(String searchTerms) {\n ResultSet rsType = database.searchProduct(searchTerms);\n List<Product> searchedProducts = new ArrayList<>();\n try {\n while (rsType.next()) {\n searchedProducts.add(loadProductFromId(rsType.getInt(\"productid\")));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n if (searchedProducts.isEmpty()) {\n throw new NoSuchProductException();\n }\n\n return searchedProducts;\n }", "public List<Product> getProductBySearchName(String search) {\r\n List<Product> list = new ArrayList<>();\r\n String query = \"select * from Trungnxhe141261_Product\\n \"\r\n + \"where [name] like ? \";\r\n try {\r\n conn = new DBContext().getConnection();//mo ket noi voi sql\r\n ps = conn.prepareStatement(query);\r\n ps.setString(1, \"%\" + search + \"%\");\r\n rs = ps.executeQuery();\r\n while (rs.next()) {\r\n list.add(new Product(rs.getInt(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getDouble(4),\r\n rs.getString(5),\r\n rs.getString(6)));\r\n }\r\n } catch (Exception e) {\r\n }\r\n return list;\r\n }", "@Override\n\tpublic void searchProduct(HashMap<String, String> searchKeys) {\n\t\tQueryStringFormatter formatter=new QueryStringFormatter(\"http://shopper.cnet.com/1770-5_9-0.html\");\n\t\t\n\t\ttry\n\t\t{\n//\t\t\tformatter.addQuery(\"url\", \"search-alias\");\n\t\t\tif(searchKeys.get(ProductSearch.BRAND_NAME)!=null && searchKeys.get(ProductSearch.PRODUCT_NAME)!=null)\n\t\t\t{\n\t\t\t\tformatter.addQuery(\"query\",(String)searchKeys.get(ProductSearch.BRAND_NAME) +\" \"+ (String)searchKeys.get(ProductSearch.PRODUCT_NAME)+\" \" );\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tString color=(String)searchKeys.get(ProductSearch.COLOR);\n\t\t\tString min=(String)searchKeys.get(ProductSearch.MIN_PRICE);\n\t\t\tString max=(String)searchKeys.get(ProductSearch.MAX_PRICE);\n\t\t\tif(color!=null){\n\t\t\t\tformatter.addQuery(\"color\",color);\n\t\t\t}\n\t\t\tif(min.length()>0&&max.length()>0)\n\t\t\t{\n\t\t\t//formatter.addQuery(\"color\",(String)searchKeys.get(HeadPhonesSearch.COLOR_S)+\" Price between $\"+(String)searchKeys.get(HeadPhonesSearch.MIN_PRICE)+\" to $\"+(String)searchKeys.get(HeadPhonesSearch.MAX_PRICE));\n\t\t\t\t\n\t\t\t\tformatter.addQuery(\" Price between $\",min +\" to $\"+max);\n\t\t\t}\n\t\t\tformatter.addQuery(\"tag\",\"srch\");\n\t\t\t\n\t\t\tString finalQueryString=\"http://shopper.cnet.com/1770-5_9-0.html\"+formatter.getQueryString();\n\t\t\tSystem.out.println(\"query string :\"+formatter.getQueryString());\n\t\t\tSystem.out.println(\"Query:\"+finalQueryString);\n\t\t\tprocessMyNodes(finalQueryString);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\t\t\t\n\t\t\n\t}", "@Given(\"^: search for different products$\")\r\n\tpublic void search_for_different_products() throws Throwable {\n\t\tobj.url(\"chrome\");\r\n\t}", "@GetMapping(path = \"/products/search/{query}\")\n public ResponseEntity<List<Product>> searchProducts(@PathVariable(name=\"query\") String query){\n return ResponseEntity.ok(productService.search(query));\n }", "public List<WebElement> getProductHeaderInWishList()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n List<WebElement> productList = pageFactory.wishListProductList;\r\n return productList;\r\n }", "public void searchProduct(String product){\n driver.findElement(By.id(\"search_query_top\")).sendKeys(product);\n List<WebElement> options = driver.findElements(By.className(\"ac_results\"));\n for(WebElement option:options){\n if(option.getText().equalsIgnoreCase(\"printed dress\")){\n option.click();\n break;\n }\n }\n driver.findElement(By.name(\"submit_search\")).click();\n }", "public void searchProd(){\n\t\t\n\t\t// STEP 4:-\n\t\t// Enter 'mobile' in search bar.\n\t\tWebElement search = driver.findElement(By.name(\"q\"));\n\t\tsearch.sendKeys(\"mobiles\");\n\t\tsearch.sendKeys(Keys.ENTER);\n\t\tSystem.out.println(\"Enter name successfully\");\n\t\t\t\t\t\n\t\t// Click on search icon.\n\t\t//WebElement searchClick = driver.findElement(By.className(\"L0Z3Pu\"));\n\t\t//searchClick.click();\n\t\t//System.out.println(\"clicked search button successfully\");\n\t}", "public List<Product> scrapeProducts() {\n\n // Create empty list for the products that are going to be fetched\n List<Product> foundProducts = new ArrayList<>();\n\n // Open the url\n getDriver().get(getWebStore().getURL());\n\n // Locate the overview of all products\n System.out.println(getWebStore().getURL());\n WebElement productsOverview = getDriver().findElement(By.cssSelector(getWebStore().getProductsOverviewSelector()));\n\n // Get all products per class\n List<WebElement> products = productsOverview.findElements(By.className(getWebStore().getProductSelector().substring(1)));\n\n // Create a new webScraper\n WebScraper productPage = new WebScraper();\n productPage.setDriver(new HtmlUnitDriver());\n\n // Loop thru all found products and scrape information that is needed\n for (WebElement product : products) {\n Product newProduct = new Product();\n\n try {\n // Set up the information that is already visible\n newProduct.setBrand(new Brand(webStore.getBrand()));\n\n // Find the redirect link\n newProduct.setRedirectURL(\n product.findElement(By.cssSelector(webStore.getProductURLSelector())).getAttribute(\"href\")\n );\n\n foundProducts.add(newProduct);\n } catch (Exception e) {\n // Show error message when something goes wrong\n System.out.printf(\"Something went wrong while fetching the products of the brand: %s\\n\", getWebStore().getBrand());\n e.printStackTrace();\n }\n }\n\n // Add additional data to the products by visiting their individual page\n for (Product foundProduct : foundProducts) {\n try {\n scrapeAdditionalDataOfProduct(foundProduct);\n } catch (Exception e) {\n System.out.printf(\"Something went wrong while fetching the products of the brand: %s\\n\", getWebStore().getBrand());\n }\n }\n\n for (int i = 0; i < foundProducts.size(); i++) {\n if (foundProducts.get(i).getName() == null) {\n foundProducts.remove(foundProducts.get(i));\n }\n }\n\n return foundProducts;\n }", "public static void searchProduct() throws InterruptedException {\n browseSetUp(chromeDriver, chromeDriverPath, url);\n//****************************************<step 2- enter keyword in search box>**********************\n Thread.sleep(2000);\n driver.findElement(By.xpath(\"//*[@id=\\\"headerSearch\\\"]\")).sendKeys(\"paint roller\");\n Thread.sleep(3000);\n//*******************************************<step 3- click on the search button>**********************************\n driver.findElement(By.cssSelector(\".SearchBox__buttonIcon\")).click();\n//*******************************************<step 4- select the item>**********************************\n driver.findElement(By.cssSelector(\"#products > div > div.js-pod.js-pod-0.plp-pod.plp-pod--default.pod-item--0 > div > div.plp-pod__info > div.pod-plp__description.js-podclick-analytics > a\")).click();\n Thread.sleep(5000);\n//*******************************************<step 5- click to add the item to the cart>**********************************\n driver.findElement(By.xpath(\"//*[@id=\\\"atc_pickItUp\\\"]/span\")).click();\n Thread.sleep(6000);\n driver.close();\n\n\n }", "public List<Warehouse> search(String keyword) {\n\t\t return warehouseDAO.search(keyword);\r\n\t}", "public List<Recipe> search(String[] keywords, boolean searchLocally, boolean searchFromWeb) {\n \t\treturn model.searchRecipe(keywords);\r\n \t}", "List<Product> getProductsByCategory(String category);", "@RequestMapping(value=\"SearchEngine\")\r\n\tpublic String searchParticularProduct(HttpServletRequest request,ModelMap model){\r\n\t\tString productName=request.getParameter(\"search\");\r\n\t\tProductTO productTO=new ProductTO();\r\n\t\tmodel.addAttribute(\"imageList\", searchService.getProductByName(productName));\r\n\t\treturn \"ProductName\";\r\n\t}", "@Override\n public ArrayList<ItemBean> searchAll(String keyword)\n {\n String query= \"SELECT * FROM SilentAuction.Items WHERE Item_ID =?\";\n //Seacrh by Category Query\n String query1=\"SELECT * FROM SilentAuction.Items WHERE Category LIKE?\";\n //Seaches and finds items if Category is inserted\n ArrayList<ItemBean> resultsCat = searchItemsByCategory(query1,keyword);\n //Searches and finds items if number is inserted \n ArrayList<ItemBean> resultsNum= searchItemsByNumber(query,keyword);\n resultsCat.addAll(resultsNum);\n return resultsCat;\n }", "@Override\n\t\tpublic void searchProduct(HashMap<String, String> searchKeys) {\n\t\t\t \n\t\t\tQueryStringFormatter formatter=new QueryStringFormatter(\"http://www.target.com/s\");\n\t\t\ttry{\n\t\t\t\t//formatter.addQuery1(\"query\", \"ca77b9b4beca91fe414314b86bb581f8en20\");\n\t\t\t\t\n\t\t\t\tString color=(String)searchKeys.get(ProductSearch.COLOR);\n\t\t\t\tString min=(String)searchKeys.get(ProductSearch.MIN_PRICE);\n\t\t\t\tString max=(String)searchKeys.get(ProductSearch.MAX_PRICE);\n\t\t\t\t\n\t\t\t\tif((searchKeys.get(ProductSearch.BRAND_NAME)!=null) && (searchKeys.get(ProductSearch.PRODUCT_NAME)!=null)){\n\t\t\t\t\t\n\t\t\t\tformatter.addQuery1(\"searchTerm\",(String)searchKeys.get(ProductSearch.BRAND_NAME)+\" \"+(String)searchKeys.get(ProductSearch.PRODUCT_NAME));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(color!=null){\n\t\t\t\tformatter.addQuery1(\"\",color);\n\t\t\t\t}\n\t\t\t\tif(min.length()>0&&max.length()>0)\n\t\t\t\t{\n\t\t\t\t//formatter.addQuery(\"color\",(String)searchKeys.get(HeadPhonesSearch.COLOR_S)+\" Price between $\"+(String)searchKeys.get(HeadPhonesSearch.MIN_PRICE)+\" to $\"+(String)searchKeys.get(HeadPhonesSearch.MAX_PRICE));\n\t\t\t\t\t\n\t\t\t\t\tformatter.addQuery1(\" Price between $\",min +\" to $\"+max);\n\t\t\t\t}\n\t\t\t\tString finalQueryString=\"http://www.target.com/s\"+formatter.getQueryString();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Query:\"+finalQueryString);\n\t\t\t\tprocessMyNodes(finalQueryString);\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\r\n\tpublic List<Product> search(String key) {\n\tProductExample example = new ProductExample();\r\n\texample.createCriteria().andNameLike(\"%\"+key+\"%\");\r\n\texample.setOrderByClause(\"id desc\");\r\n\tList<Product> list = productMapper.selectByExample(example);\r\n\tsetAll(list);\r\n\treturn list;\r\n\t\t}", "public List<Product> findProducts(String searchString) {\n\t\treturn searchHelper.search(searchString);\n\t}", "SearchProductsResult searchProducts(SearchProductsRequest searchProductsRequest);", "@Override\n\tpublic List<Product> findByName(String term) {\n\t\treturn productDAO.findByNameLikeIgnoreCase(\"%\" + term + \"%\");\n\t}", "public List<List<String>> suggestedProducts(String[] products, String searchWord) {\n List<List<String>> result = new ArrayList<>();\n \n Trie trie = new Trie();\n \n for(String product : products){\n trie.addToTrie(product);\n }\n int n = searchWord.length();\n for(int i =1;i<=n;i++){\n String word = searchWord.substring(0,i);\n List<String> list = new ArrayList<String>();\n \n trie.getSearchList(word,list,3);\n \n if(list.size()>3){\n List<String> temp = list.subList(0,3);\n result.add( temp);\n }else{\n result.add( list);\n }\n \n }\n \n return result;\n }", "public List<List<String>> suggestedProducts(String[] products, String searchWord) {\n Trie trie = new Trie();\n for(String product : products){\n trie.insert(product);\n }\n List<List<String>> res = new ArrayList<>();\n\n for(int i = 1; i <= searchWord.length(); i++){\n String str = searchWord.substring(0, i);\n List<String> inner = trie.suggest(str);\n res.add(inner);\n\n\n }\n return res;\n\n\n\n }", "@RequestMapping(value=\"/search\",method=RequestMethod.GET)\r\n\tpublic List<ProductBean> searchByProductName(String name)throws SearchException {\r\n\t\treturn service.searchProductByName(name); \r\n\t}", "public List<products> search(String text) {\n\t\t \n\t // get the full text entity manager\n\t FullTextEntityManager fullTextEntityManager =\n\t org.hibernate.search.jpa.Search.\n\t getFullTextEntityManager(entityManager);\n\t \n\t // create the query using Hibernate Search query DSL\n\t QueryBuilder queryBuilder = \n\t fullTextEntityManager.getSearchFactory()\n\t .buildQueryBuilder().forEntity(products.class).get();\n\t \n\t // a very basic query by keywords\n\t org.apache.lucene.search.Query query =\n\t queryBuilder\n\t .keyword()\n\t .onFields(\"title\")\n\t .matching(text)\n\t .createQuery();\n\t \n\t //System.out.println(\"query \"+query.toString());\n\t // wrap Lucene query in an Hibernate Query object\n\t org.hibernate.search.jpa.FullTextQuery jpaQuery =\n\t fullTextEntityManager.createFullTextQuery(query, products.class);\n\t jpaQuery.setMaxResults(10);\n\t //System.out.println(\"query \"+jpaQuery.toString());\n\t // execute search and return results (sorted by relevance as default)\n\t @SuppressWarnings(\"unchecked\")\n\t List<products> results = jpaQuery.getResultList();\n\t \n\t return results;\n\t }", "@Override\r\n\tpublic List<Product> searchProduct(String name,List<Product> prodlist) {\n\t\tList<Product> n=new ArrayList<Product>();\r\n\t\t{\r\n\t\t\tfor (Product x:prodlist)\r\n\t\t\t{\r\n\t\t\t\tif(name.equals(x.getName()))\r\n\t\t\t\t{\r\n\t\t\t\t\tn.add(x);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn n;\t\r\n\t\t\r\n\t}", "@Transactional(readOnly = true) \n public List<Product> search(String query) {\n \n log.debug(\"REST request to search Products for query {}\", query);\n return StreamSupport\n .stream(productSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "public List<mx.tec.web.lab.entity.Product> getProducts(final String pattern) {\n\t\t\n\t\treturn productRepository.findByNameLike(pattern);\n\t}", "@Override\r\n\tpublic List<Product> searchProductByName(String productName) {\n\t\treturn dao.searchProductByName(productName);\r\n\t}", "SearchResultCompany search(String keywords);", "@RequestMapping(\"/search\")\n public String searchItemList(String keyword, @RequestParam(defaultValue = \"1\") Integer page, Model model) throws IOException, SolrServerException {\n SearchResult result = searchService.search(keyword, page, SEARCH_RESULT_ROWS);\n model.addAttribute(\"query\", keyword);\n model.addAttribute(\"totalPages\", result.getTotalPages());\n model.addAttribute(\"page\", page);\n model.addAttribute(\"recourdCount\", result.getRecordCount());\n model.addAttribute(\"itemList\", result.getItemList());\n return \"search\";\n }", "@Override\n\tpublic List<Product> searchByName(String productName) {\n\t\treturn productDAO.findByProductName(productName);\n\t\t\n\t}", "@Override\n\tpublic List<ttu.rakarh1.backend.model.data.Product> searchProducts(\n\t\t\tfinal ProductSearchCriteria ProductSearchCriteria, final HttpServletRequest request)\n\t{\n\t\tList<ttu.rakarh1.backend.model.data.Product> ProductList = null;\n\t\ttry\n\t\t{\n\t\t\tProduct Product;\n\t\t\tProductList = new ArrayList<ttu.rakarh1.backend.model.data.Product>();\n\t\t\tdb = dbconnection.getConnection();\n\t\t\tst = this.db.createStatement();\n\t\t\tString sql_and = \"\";\n\t\t\tString sql_where = \"\";\n\t\t\tString sql_all_together = \"\";\n\t\t\tString sql_criteria = \"\";\n\t\t\tString sql_end = \" ORDER BY name\";\n\t\t\tString sql_additional_attr = \"\";\n\t\t\tString genSql = \"\";\n\t\t\tList<ttu.rakarh1.backend.model.data.FormAttribute> formAttributes = null;\n\t\t\tMyLogger.LogMessage(\"FORMATTRIBUTES1\");\n\t\t\tformAttributes = (List<FormAttribute>) request.getAttribute(\"formAttributes\");\n\n\t\t\tif (formAttributes != null)\n\t\t\t{\n\t\t\t\tMyLogger.LogMessage(\"FORMATTRIBUTES2\");\n\t\t\t\tsql_additional_attr = getAdditionalSqlAttr(formAttributes);\n\t\t\t}\n\n\t\t\tString sql_from = \" FROM item i \"; /* ,unit_type, item_type \"; */\n\t\t\tString sql_start = \"SELECT distinct i.item, i.unit_type_fk, i.supplier_enterprise_fk, i.item_type_fk,name, i.store_price, i.sale_price, i.producer, i.description, i.producer_code, i.created \";\n\t\t\t// MyLogger.LogMessage(\"SEARCH CRITERIA PRODUCT CODE\" +\n\t\t\t// ProductSearchCriteria.getProduct_code());\n\t\t\tif (ProductSearchCriteria.getGenAttrList() != null)\n\t\t\t{\n\t\t\t\tgenSql = getGeneralSqlAttr(ProductSearchCriteria);\n\t\t\t}\n\n\t\t\tif (!(ProductSearchCriteria.getProduct_code().equals(\"\")))\n\t\t\t{\n\t\t\t\tsql_criteria = \"UPPER(i.producer_code) LIKE UPPER('\"\n\t\t\t\t\t\t+ ProductSearchCriteria.getProduct_code() + \"%')\";\n\t\t\t}\n\n\t\t\tif (!(ProductSearchCriteria.getName().equals(\"\")))\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tString search_string = ProductSearchCriteria.getName().replace(\" \", \" & \");\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" (to_tsvector(name) @@ to_tsquery('\"\n\t\t\t\t\t\t+ search_string + \"'))\";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getMin_price() != -1)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.store_price >= \"\n\t\t\t\t\t\t+ Float.toString(ProductSearchCriteria.getMin_price()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getMax_price() != -1)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.store_price <= \"\n\t\t\t\t\t\t+ Float.toString(ProductSearchCriteria.getMax_price()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getSupplier_enterprise_fk() != 0)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.supplier_enterprise_fk = \"\n\t\t\t\t\t\t+ Integer.toString(ProductSearchCriteria.getSupplier_enterprise_fk()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getUnit_type_fk() != 0)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.unit_type_fk = \"\n\t\t\t\t\t\t+ Integer.toString(ProductSearchCriteria.getUnit_type_fk()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getItem_type_fk() != 0)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria\n\t\t\t\t\t\t+ sql_and\n\t\t\t\t\t\t+ \" i.item_type_fk in (with recursive sumthis(item_type, super_type_fk) as (\"\n\t\t\t\t\t\t+ \"select item_type, super_type_fk \" + \"from item_type \"\n\t\t\t\t\t\t+ \"where item_type =\"\n\t\t\t\t\t\t+ Integer.toString(ProductSearchCriteria.getItem_type_fk()) + \" \"\n\t\t\t\t\t\t+ \"union all \" + \"select C.item_type, C.super_type_fk \" + \"from sumthis P \"\n\t\t\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk \" + \") \"\n\t\t\t\t\t\t+ \"select item_type from sumthis\" + \") \";\n\t\t\t}\n\n\t\t\tif (!(sql_criteria.equals(\"\")))\n\t\t\t{\n\t\t\t\tsql_where = \" WHERE \";\n\t\t\t}\n\t\t\tif (!genSql.equals(\"\"))\n\t\t\t{\n\t\t\t\tsql_from += \"inner join item_type it on it.item_type = i.item_type_fk inner join type_attribute ta on ta.item_type_fk = it.item_type inner join item_attribute_type iat on iat.item_attribute_type = ta.item_attribute_type_fk inner join item_attribute ia on ia.item_attribute_type_fk = iat.item_attribute_type\";\n\t\t\t\tsql_criteria += \" and (\" + genSql + \")\";\n\t\t\t\t// sql_all_together = \" inner join ( \" + sql_additional_attr +\n\t\t\t\t// \") q2 on q2.item_fk = item\";\n\t\t\t}\n\t\t\tsql_all_together = sql_start + sql_from;\n\t\t\tif (sql_additional_attr != \"\")\n\t\t\t{\n\t\t\t\tsql_all_together += \" inner join ( \" + sql_additional_attr\n\t\t\t\t\t\t+ \") q2 on q2.item_fk = i.item\";\n\n\t\t\t}\n\n\t\t\tsql_all_together += sql_where + sql_criteria + sql_end;\n\n\t\t\tMyLogger.LogMessage(\"ProductDAOImpl -> fdfdf \" + sql_all_together);\n\t\t\tSystem.out.println(sql_all_together);\n\t\t\tResultSet rs = this.st.executeQuery(sql_all_together);\n\t\t\tint cnt = 0;\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tProduct = new Product();\n\t\t\t\tProduct.setProduct(rs.getInt(\"item\"));\n\t\t\t\tProduct.setName(rs.getString(\"name\"));\n\t\t\t\tProduct.setDescription(rs.getString(\"description\"));\n\t\t\t\tProduct.setProduct_code(rs.getString(\"producer_code\"));\n\t\t\t\tProduct.setStore_price(rs.getFloat(\"store_price\"));\n\t\t\t\tProduct.setSale_price(rs.getInt(\"sale_price\"));\n\t\t\t\tProduct.setProduct_catalog(rs.getInt(\"item_type_fk\"));\n\t\t\t\tProductList.add(Product);\n\t\t\t\tcnt = cnt + 1;\n\t\t\t}\n\n\t\t}\n\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tMyLogger.Log(\"searchProducts():\", ex.getMessage());\n\n\t\t}\n\n\t\treturn ProductList;\n\t}", "public List<productmodel> getproductbyname(String name);", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String productSetDisplayName = request.getParameter(\"productSetDisplayName\");\n String productCategory = request.getParameter(\"productCategory\");\n String businessId = request.getParameter(\"businessId\");\n String sortOrder = request.getParameter(\"sortOrder\");\n String searchId = request.getParameter(\"searchId\");\n\n // Set parameters to apprpriate defaults, if necessary.\n if (businessId.equals(\"getFromDatabase\")) {\n businessId = userService.getCurrentUser().getUserId();\n }\n if (productCategory.equals(\"none\")) {\n productCategory = null;\n }\n String productSetId = null;\n ProductSetEntity productSet = null;\n if (!productSetDisplayName.equals(\"none\")) {\n // true indicates we are searching with the displayname instead of the id.\n productSet = ServletLibrary.retrieveProductSetInfo(datastore, productSetDisplayName, true);\n }\n if (productSet != null) {\n productSetId = productSet.getProductSetId();\n }\n\n // Search database based on the filters. \n List<ProductEntity> products = \n ServletLibrary.findProducts(datastore, \n businessId,\n productSetId, \n productCategory, \n sortOrder);\n\n if (searchId != null) {\n SearchInfo searchInfo = ServletLibrary.retrieveSearchInfo(datastore, searchId);\n\n if (searchInfo.getGcsUrl() != null) {\n \n String generalProductSetId = \"cloudberryAllProducts\";\n List <String> productSearchIds = ProductSearchLibrary.getSimilarProductsGcs(generalProductSetId, \n searchInfo.getProductCategory(), changeGcsFormat(searchInfo.getGcsUrl()));\n List<ProductEntity> imageSearchProducts = new ArrayList<>();\n productSearchIds.forEach(productId->imageSearchProducts.add(ServletLibrary.retrieveProductInfo(datastore, productId)));\n\n Set<ProductEntity> uniqueProducts = new HashSet<>(products);\n List<ProductEntity> productsDisplayed = new ArrayList<>();\n for (ProductEntity product : imageSearchProducts) {\n if (uniqueProducts.contains(product)) productsDisplayed.add(product);\n }\n products = productsDisplayed;\n }\n\n // Text query if it is specified, will take in this list and output a new\n // list that satisfies the query.\n if (searchInfo.getTextSearch() != null) {\n products = TextSearchLibrary.textSearch(datastore, products, \n searchInfo.getTextSearch());\n }\n }\n\n // Send the response.\n String json = gson.toJson(products);\n response.setContentType(\"application/json;\");\n response.getWriter().println(json);\n }", "@Override\n\tpublic Page<Product> findKeyWordPage(Integer pageint, String searchContent) {\n\t\tPageRequest pageable = PageRequest.of(pageint, 9);\n//\t\tPage<Product> page = productRepository.findBydescriptionLike(pageable, searchContent);\n\t\tPage<Product> page = productRepository.searchAll(pageable, searchContent);\n\t\t\n\t\tSystem.out.println(\"page->\"+page.getContent());\n\t\treturn page;\n\t}", "@Override\n public HandlerResult portalList(Integer categoryId, String keyword,\n String orderBy, Integer pageNum, Integer pageSize) {\n List categoryIdList = null;\n // 1.Set the paging.\n PageHelper.startPage(pageNum, pageSize);\n // 2.Judgment categoryId and keyword whether is empty, if both are null representation parameter error.\n if (StringUtils.isBlank(keyword) && HandlerCheck.NumIsEmpty(categoryId)) {\n return HandlerResult.error(HandlerEnum.ILLEGAL_ARGUMENT.getCode(),\n HandlerEnum.ILLEGAL_ARGUMENT.getMessage());\n }\n // 3.Separate judgment categoryId whether is empty, if not is empty, query for it and all its child nodes.\n if (!HandlerCheck.NumIsEmpty(categoryId)) {\n Category category = categoryMapper.selectByPrimaryKey(categoryId);\n // If is empty returns an empty result set, but no an error\n if (HandlerCheck.ObjectIsEmpty(category) && StringUtils.isBlank(keyword)) {\n PageInfo pageInfo = new PageInfo(Lists.newArrayList());\n return HandlerResult.success(pageInfo);\n }\n categoryIdList = categoryService.selectCategoryAndDeepChildrenCategory(categoryId).getData();\n }\n // 5.Separate judgment keyword whether is empty, if not empty for processing.\n boolean isEmpty = HandlerCheck.ObjectIsEmpty(keyword);\n if (!isEmpty) {\n keyword = new StringBuilder().append(\"%\").append(keyword).append(\"%\").toString();\n }\n // Judgment orderBy whether is empty, if not empty set the sort conditions for paging plug-ins.\n if (StringUtils.isNotBlank(orderBy)) {\n if (Constants.ProductListOrderBy.PRICE_ASC_DESC.contains(orderBy)) {\n String[] split = orderBy.split(\"_\");\n PageHelper.orderBy(split[0] + \" \" + split[1]);\n }\n }\n // 7.Select product\n List<Product> list = productMapper.selectByNameAndCategoryIds(isEmpty ? null : keyword, categoryIdList);\n List<ProductListVo> productListVoList = list.stream()\n .map(product -> {\n ProductListVo productListVo = HandlerConverter.productToProductListVo(product);\n productListVo.setImageHost(null);\n return productListVo;\n })\n .collect(Collectors.toList());\n PageInfo pageInfo = new PageInfo(productListVoList);\n return HandlerResult.success(pageInfo);\n }", "void searchForProducts(String searchQuery) {\n if (searchQuery.isEmpty()) {\n searchQuery = \"%\";\n } else {\n searchQuery = \"%\" + searchQuery + \"%\";\n }\n filter.postValue(searchQuery);\n }", "@Override\r\n\tpublic List prodAllseach() {\n\t\treturn adminDAO.seachProdAll();\r\n\t}", "public void searchForProduct(String productName) {\n setTextOnSearchBar(productName);\n clickOnSearchButton();\n }", "public void searchProduct(String url){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n\n if(intent.resolveActivity(getContext().getPackageManager()) != null) {\n getContext().startActivity(intent);\n }\n }", "public static void main(String[] args) {\n // give chrome driver path\n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\ABHISHEK\\\\Downloads\\\\driver\\\\chromedriver.exe\");\n WebDriver driver = new ChromeDriver();\n // give url to be scrapped\n String baseUrl = \"https://www.swiggy.com/restaurants/wah-ji-wah-gurdev-nagar-model-town-ludhiana-66575\";\n String actualTitle = \"\";\n driver.get(baseUrl);\n actualTitle = driver.getTitle();\n List<Product> productList = new ArrayList<>();\n Product product;\n\n // print all\n WebDriverWait wait = new WebDriverWait(driver, 35);\n WebElement catName = wait.until(ExpectedConditions.visibilityOfElementLocated(By.className(\"_1J_la\")));\n List<WebElement> list = (List<WebElement>) catName.findElements(By.className(\"_2dS-v\"));\n\n System.out.println(\"Test Passed! = \"+ actualTitle);\n System.out.println(\"outter\"+list.size());\n for(WebElement section :list) {\n try {\n WebElement cat = section.findElement(By.className(\"M_o7R\"));\n String catname = \"\";\n if(StringUtils.isNotBlank(cat.getText())){\n catname = cat.getText();\n }\n\n System.out.println(\"====================================\"+cat.getText());\n\n List<WebElement> innerDiv = (List<WebElement>) section.findElements(By.className(\"styles_item__Hw5Oy\"));\n for(WebElement div : innerDiv){\n try {\n product = new Product();\n String name = \"\";\n String price = \"\";\n String url = \"\";\n Boolean urlFlag = true;\n\n WebElement divChid1 = div.findElement(By.className(\"styles_itemNameText__3bcKX\"));\n\n WebElement divChid2 = div.findElement(By.xpath(\".//span[@class='rupee']\"));\n\n WebElement divChid3 = null;\n try {\n divChid3 = div.findElement(By.className(\"Image_loaded__3B-UP\"));\n }catch (Exception e){\n urlFlag = false;\n System.out.println(\"IMG TAG NOT PRESENT\"+e);\n }\n\n if(StringUtils.isNotBlank(divChid1.getText())){\n name = divChid1.getText();\n }\n if(StringUtils.isNotBlank(divChid2.getText())){\n price = divChid2.getText();\n }\n if(urlFlag){\n if(StringUtils.isNotBlank(divChid3.getAttribute(\"src\"))){\n url = divChid3.getAttribute(\"src\");\n }\n }\n\n product.setCatName(catname);\n product.setName(name);\n product.setPrice(price);\n product.setUrl(url);\n\n if(product!=null){\n productList.add(product);\n }\n\n }catch (Exception e){\n System.out.println(\"Inner loop Error\"+e);\n }\n }\n } catch (Exception e) {\n System.out.println(\"Outter loop Error\"+e);\n }\n }\n\n // use product list according to need\n System.out.println(\"Number Of Products In Menu \"+productList.size());\n for(int i=0 ; i<productList.size();i++){\n System.out.println(\"cat = \"+productList.get(i).getCatName());\n System.out.println(\"name = \"+productList.get(i).getName());\n System.out.println(\"price = \"+productList.get(i).getPrice());\n System.out.println(\"url = \"+productList.get(i).getUrl());\n }\n\n driver.close();\n }", "@Test\n public void searchingItem() throws InterruptedException {\n ChromeDriver driver = openChromeDriver();\n driver.get(\"https://www.knjizare-vulkan.rs/\");\n WebElement cookieConsent = driver.findElement(By.xpath(\"//button[@class='cookie-agree 3'][.//span[contains(text(), 'Slažem se')]]\"));\n WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(3));\n\n wait.until(ExpectedConditions.visibilityOf(cookieConsent));\n cookieConsent.click();\n\n WebElement searchLocator = driver.findElement(By.xpath(\"//div[@data-content='Pretraži sajt']\"));\n searchLocator.click();\n\n\n WebElement searchField = driver.findElement(By.id(\"search-text\"));\n Thread.sleep(2000);\n\n\n searchField.click();\n searchField.clear();\n searchField.sendKeys(\"Prokleta avlija\");\n searchField.sendKeys(Keys.ENTER);\n\n WebElement numberOfProducts = driver.findElement(By.xpath(\"//div[@class='products-found']\"));\n if (numberOfProducts != null) {\n System.out.println(\"The book with title Prokleta avlija is found. \");\n } else{\n System.out.println(\"Product is not found. \");\n }\n\n\n\n\n\n\n }", "public List<Product> search(String word, String codigo) {\n\t\tSession session = getSessionFactory().openSession();\n\t\treturn null;\n\t}", "public boolean search(String prodName)\n\t{\n\t WebDriverWait wait = new WebDriverWait(driver, 20);\n wait.until(ExpectedConditions.visibilityOf(driver.findElement(searchbox))).sendKeys(prodName);\n \n //Tap on search after entering prod name\n wait.until(ExpectedConditions.visibilityOf(driver.findElement(searchBTN))).click();\n\t\n // When the page is loaded, verify whether the loaded result contains the name of product or not \n String k = driver.findElement(By.xpath(\"//*[@id=\\\"LST1\\\"]/div/div[1]/div[2]\")).getText();\n boolean p = k.contains(prodName);\n return p;\n \n\t}", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }", "protected static void searchById(String Id)\n {\n for (Product element : productList)\n {\n if (element.productIdMatch(Id)) {\n System.out.println(\"\");\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n\n }\n }\n }", "@Override\n\tpublic List<Literature> searchKeywords() {\n\t\treturn null;\n\t}", "public void searchProduct() throws InterruptedException {\n\n Thread.sleep(2000);\n\n if(isDisplayed(popup_suscriber)){\n click(popup_suscriber_btn);\n }\n\n if(isDisplayed(search_box) && isDisplayed(search_btn)){\n type(\"Remera\", search_box);\n click(search_btn);\n Thread.sleep(2000);\n click(first_product_gallery);\n Thread.sleep(2000);\n }else{\n System.out.println(\"Search box was not found!\");\n }\n\n }", "private void getAllProducts() {\n }", "public static Result getDataFromNet(String keywords,int page){\n String json = HttpUtils.get(\"http://www.zhaoapi.cn/product/searchProducts?keywords=\" + keywords + \"&page=\" + page);\n Gson gson = new Gson();\n Type type = new TypeToken<Result<List<Goods>>>() {\n }.getType();\n Result result=gson.fromJson(json,type);\n return result;\n\n }", "private static void searchForItem() {\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println(\" Please type your search queries\");\r\n\t\tSystem.out.println();\r\n\t\tString choice = \"\";\r\n\t\tif (scanner.hasNextLine()) {\r\n\t\t\tchoice = scanner.nextLine();\r\n\t\t}\r\n\t\t//Currently only supports filtering by name\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" All products that matches your search are as listed\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Id|Name |Brand |Price |Total Sales\");\r\n\t\tint productId = 0;\r\n\t\tfor (Shop shop : shops) {\r\n\t\t\tint l = shop.getAllSales().length;\r\n\t\t\tfor (int j = 0; j < l; j++) {\r\n\t\t\t\tif (shop.getAllSales()[j].getName().contains(choice)) {\r\n\t\t\t\t\tprintProduct(productId, shop.getAllSales()[j]);\r\n\t\t\t\t}\r\n\t\t\t\tproductId++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n void searchProduct() {\n List<DummyProduct> L1= store.SearchProduct(\"computer\",null,-1,-1);\n assertTrue(L1.get(0).getProductName().equals(\"computer\"));\n\n List<DummyProduct> L2= store.SearchProduct(null,\"Technology\",-1,-1);\n assertTrue(L2.get(0).getCategory().equals(\"Technology\")&&L2.get(1).getCategory().equals(\"Technology\"));\n\n List<DummyProduct> L3= store.SearchProduct(null,null,0,50);\n assertTrue(L3.get(0).getProductName().equals(\"MakeUp\"));\n\n List<DummyProduct> L4= store.SearchProduct(null,\"Fun\",0,50);\n assertTrue(L4.isEmpty());\n }", "public static void main(String[] args) throws InterruptedException {\n\t\tWebDriver driver;\n\nSystem.setProperty(\"webdriver.gecko.driver\", \"C:\\\\Selenium_Class\\\\geckodriver-v0.18.0-win32\\\\geckodriver.exe\");\ndriver=new FirefoxDriver();\ndriver.get(\"https://www.ebay.in/\");\n\ndriver.findElement(By.id(\"gh-ac\")).sendKeys(\"Apple Watches\");\ndriver.findElement(By.id(\"gh-btn\")).click();\ndriver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);\n//get all the products--\n\nList<WebElement> list= driver.findElements(By.xpath(\"//*[@id='ListViewInner')/li/h3/a]\"));\n/*\n Iterator<WebElement> itr= list.iterator();\nwhile(itr.hasNext()){\n\tSystem.out.println(itr.next().getText());\n}\n\t*/\n\t\n\t}", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "public void checkProductflipkart(WebDriver driver){\r\n\t\t\r\n\t\tdriver.get(\"flipkart.com\");\r\n\t\tif(driver.getTitle().toString().equalsIgnoreCase(\"Flipkart\")){\r\n\t\t\t\r\n\t\t\tWebElement search=driver.findElement(By.xpath(\"xpath for search bar/element\"));\r\n\t \tsearch.sendKeys(\"iphone7\");\r\n\t \tdriver.findElement(By.id(\"searchbutton\")).click();\r\n\t \r\n\t \t// check results found or not, if found we can see text like - showing 1 of 24 results else it will\r\n\t \t// show No results found etc;\r\n\t \tWebElement resultsText=driver.findElement(By.xpath(\"xpath for below string element\"); \t\r\n\t \t\r\n\t \tif(resultsText.toString().contains(\"Showing 1 – 24 of 93 results for iphone\")){\r\n\t \t\t//print in the console\r\n\t \t\tSystem.out.println(\"results found for iphone\");\r\n\t // or use testng asssert statement to validate\r\n\t \t\t\r\n\t \t}else{\r\n\t \t\tSystem.out.println(\"No results found \");\r\n\t \t}\r\n\t \t// copy paste same logic for any other website\r\n\t // using webtable to read the iphone price, write separately for filpkart and snapdeal\r\n\t \t//used later\r\n\t \tList<String> savepricelist= new ArrayList<String>();\r\n\t // target table\t\r\n\t \tWebElement table=driver.findElement(\"//*td[@id='iphone']/tbody\");\r\n\t \t//find no of rows\r\n\t \tList<WebElement>rows=table.findElements(By.tagName(\"tr\"));\r\n\t \t// iterate no.of rows\r\n\t \tfor (WebElement eachrow: rows){\r\n\t \t// find out how many cols available in the table\r\n\t \t\tList<WebElement>cols=eachrow.findElements(By.tagName(\"td\"));\r\n\t \t\t// iterate each col in each row\r\n\t \t\tfor (WebElement eachcell: cols){\r\n\t \t\t\t\r\n\t \t\t\t if(eachcell.getText().contains(\"iphone7\".trim()){\r\n\t \t\t\t\t// just tell them \r\n\t \t\t\t\tWebElement modelname=//xpath for modelname\r\n\t \t\t\t WebElement linktoproduct=//write xpath for share button link\r\n\t \t\t\t\t \t\t\t \r\n\t \t\t\t WebElement price=driver.findElement(\"price xpath\");\r\n\t \t\t\t savepricelist.add(price.getText().toString());\r\n\t \t\t\t // adding all elements into array list\r\n\t \t\t\t break;\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t\t// by default sorts in asending order\r\n\t \t\tCollections.sort(savepricelist);\r\n\t \t\tSystem.out.println(savepricelit);\r\n\t \t\t// it prints the elements in ascending order \r\n\t // similarly we can write for 2nd site & print in ascending order\r\n\t \t\t\r\n\t \t\t\r\n\t \t}\r\n\t \t\r\n\t\t}\r\n\t\t\r\n\t}", "public ArrayList<Product> searchProduct(String s) throws ProductException{\r\n\tArrayList<Product> products=new ArrayList<Product>();\r\n\t\r\n\tif(ProductRepository.productsList.isEmpty()) {\r\n\t\tthrow new ProductException(\"there are no products in the store\");\r\n\t\t\r\n\t}else {\r\n\t\tproducts.addAll(pDoa.searchProducts(s));\r\n\t\t\r\n\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn products;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "Set<Keyword> listKeywords();", "public List<Product> searchProducts(ProductDTO product) {\n String SQL_SEARCH_QUERY=prepareSql(product);\n List<Product> productList=new ArrayList<>();\n Product p;\n List<Object[]> objList=entityManager.createNativeQuery(SQL_SEARCH_QUERY).getResultList();\n for(Object[] o: objList) {\n p=new Product();\n p.setCategory(new Category());\n p.setId(((BigInteger)o[0]).longValue());\n p.setName(o[1].toString());\n p.setPrice(((BigInteger) o[2]).longValue());\n p.setQuantity((Integer) o[3]);\n p.setVolume(((BigInteger) o[4]).longValue());\n p.setWeight(((BigInteger) o[5]).longValue());\n p.getCategory().setId(((BigInteger) o[6]).longValue());\n productList.add(p);\n }\n return productList;\n }", "public String searchResult(){\n return getText(first_product_title);\n }", "public List<Recipe> searchWithIngredients(String[] keywords, boolean searchLocally, \r\n \t\t\t\t\t\t\t\t\t boolean searchFromWeb) {\n \t\treturn model.searchRecipe(keywords);\r\n \t}", "public List<Movie> search() {\n keyword = URLEncoder.encode(keyword);\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=yedukp76ffytfuy24zsqk7f5&q=\"\n + keyword + \"&page_limit=20\";\n apicall(url);\n System.out.println(url);\n System.out.println(data);\n GsonBuilder builder = new GsonBuilder();\n Gson gson = builder.create();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n return movieData;\n }", "@When(\"User searchs for {string}\")\r\n\tpublic void user_searchs_for(String product) \r\n\t{\n\t driver.findElement(By.name(\"products\")).sendKeys(product);\r\n\t}", "public ObservableList<Product> lookupProduct(String productName) {\n ObservableList<Product> namedProducts = FXCollections.observableArrayList();\n for ( Product product : allProducts ) {\n if(product.getName().toLowerCase().contains(productName.toLowerCase())) {\n namedProducts.add(product);\n }\n }\n return namedProducts;\n }", "List<Product> getProductsList();", "@Override\r\n\tpublic List<PayedProduct> getAllInfoProduct(String pname) {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct WHERE payedproduct_name LIKE CONCAT('%',?,'%')\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class),pname);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "@GetMapping(\"/getproduct\")\n\t\tpublic List<Product> getAllProduct() {\n\t\t\tlogger.info(\"products displayed\");\n\t\t\treturn productService.getAllProduct();\n\t\t}", "private void getBySearch(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\tString search = request.getParameter(\"search\");\n\t\tList<Article> list = new ArrayList<Article>();\n\t\tlist = artService.getAll(\"atitle\", search);\n\t\trequest.setAttribute(\"list\", list);\n\t\ttry {\n\t\t\trequest.getRequestDispatcher(\"/essay/other_essay.jsp\").forward(request, response);\n\t\t} catch (ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic List<ServiceInfo> search(String keywords) {\n\t\treturn null;\n\t}", "public List<Product> findByDescription(String description);", "private void searchProductUsingtag(int tag) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == tag) {\r\n\t\t\t\tSystem.out.println(products[i].toString());\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 tag는 없습니다.\");\r\n\t}", "@Test\n public void searchCatalogItemsTest() throws ApiException {\n List<String> keywords = null;\n List<String> marketplaceIds = null;\n List<String> includedData = null;\n List<String> brandNames = null;\n List<String> classificationIds = null;\n Integer pageSize = null;\n String pageToken = null;\n String keywordsLocale = null;\n String locale = null;\n ItemSearchResults response = api.searchCatalogItems(keywords, marketplaceIds, includedData, brandNames, classificationIds, pageSize, pageToken, keywordsLocale, locale);\n // TODO: test validations\n }", "@Override\n\tpublic List<Product> getAllProductByName(String name) {\n\t\treturn productRepository.findByName(name);\n\t}", "public void performSearch() {\n final String url = String.format(BING_SEARCH_URL, Words.getRandomWord(), Words.getRandomWord());\n\n //open page with custom data\n openWebPage(url, \"Search url: \" + url);\n }", "public void ClickAtDesireProduct(String product){ //clicarNoProdutoDesejado\n driver.findElement(By.xpath(\"//h3[contains(text(),'\" + product + \"')]\")).click();\n\n }", "public ArrayList<String> search(String url) {\n Pattern msnPattern = Pattern.compile(\".*msn.com.*\");\n Pattern foolPattern = Pattern.compile(\".*fool.com.*\");\n Matcher foolMatcher = foolPattern.matcher(url);\n Matcher msnMatcher = msnPattern.matcher(url);\n\n ArrayList<String> stockArticles = new ArrayList<String>();\n if (foolMatcher.matches()) {\n Connection connection = Jsoup.connect(\"https://www.fool.com/market-movers/\");\n try {\n Document htmlDocument = connection.get();\n Elements linksOnPage = htmlDocument.select(\"h4\");\n for (Element link : linksOnPage) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else if (msnMatcher.matches()) {\n Connection connection2 = Jsoup.connect(\"http://www.msn.com/en-us/money/investing\");\n try {\n Document htmlDocument2 = connection2.get();\n Elements linksOnPage2 = htmlDocument2.select(\"h3\");\n for (Element link : linksOnPage2) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n } else {\n Connection connection3 = Jsoup.connect(\"https://www.nytimes.com/topic/organization/new-york-stock-exchange\");\n try {\n Document htmlDocument3 = connection3.get();\n Elements linksOnPage3 = htmlDocument3.select(\"h2\");\n for (Element link : linksOnPage3) {\n stockArticles.add(link.text());\n }\n }\n catch (IOException e) {\n System.out.println(e);\n }\n }\n return stockArticles;\n }", "List<Product> getProductByCategory(String category) throws DataBaseException;", "public List<Product> getProducts(String key, String value) throws IOException {\n ProductRequest productRequest = new ProductRequest();\n productRequest.addParam(key,value);\n return parseResults(executeRequest(productRequest), Product.class);\n }", "@RequestMapping(value=\"/searchcategory\",method=RequestMethod.GET)\r\n\tpublic List<ProductBean> searchByProductCategory(String category) throws SearchException {\r\n\t\treturn service.searchProductByCategory(category);\r\n\t\t\r\n\t}", "List<Product> retrieveProducts();", "public List<Product> getProducts();", "public List<Product> getProducts();", "@Override\r\n\tpublic List<Mobile> searchProduct(int prodId) {\n\t\tQuery queryOne=entitymanager.createQuery(\"FROM Mobile where mobileId=:mobile_id\");\r\n\t\tqueryOne.setParameter(\"mobile_id\", prodId);\r\n\t\tList<Mobile> myProd=queryOne.getResultList();\r\n\t\treturn myProd;\r\n\t}", "public static void searchJobs(String searchTerm) {\n\n for (int i = 0; i > PostJob.allJobs.size(); i++) {\n\n\n if (PostJob.allJobs.contains(searchTerm)) {\n int itemIndx = PostJob.allJobs.indexOf(searchTerm);\n String output = PostJob.allJobs.get(itemIndx);\n System.out.print(\"Available jobs within your search terms\" + output);\n\n }\n }\n }", "public List<Product> getProducts(ProductRequest request) throws IOException {\n if (request.isSingle()){\n List<Product> products = new ArrayList<>();\n products.add(parseResult(executeRequest(request),Product.class));\n return products;\n } else {\n return parseResults(executeRequest(request), Product.class);\n }\n }", "List<ProductPurchaseItem> getAllSupplierProductPurchaseItems(long suppId, String searchStr);", "@Override\n\tpublic List<Product> queryByCId(int pageNumber, int size, String searchWord, int companyId) throws SQLException {\n\t\treturn productDao.queryByCId(pageNumber, size, searchWord, companyId);\n\t}", "public void searchKeyword() throws Exception {\n\t\t\n\t\tString keyword = dataHelper.getData(DataColumn.Keyword);\n\n\t\twh.sendKeys(CommonElements.searchTxtBox, keyword);\n\t\twh.clickElement(CommonElements.searchBtn);\n\n\t\tif (wh.isElementPresent(PLPUI.VerifyPLPPage, 4)\n\t\t\t\t&& wh.getText(CommonElements.breadCumb).contains(\n\t\t\t\t\t\tkeyword)) {\n\n\t\t\treport.addReportStep(\"Type '\" + keyword\n\t\t\t\t\t+ \"' in search text box and click on search button\",\n\t\t\t\t\t\"User navigated to search plp page.\", StepResult.PASS);\n\t\t} else {\n\n\t\t\treport.addReportStep(\"Type '\" + keyword\n\t\t\t\t\t+ \"' in search text box and click on search button\",\n\t\t\t\t\t\"User is not navigated to search plp page.\",\n\t\t\t\t\tStepResult.FAIL);\n\n\t\t\tterminateTestCase(\"search plp page\");\n\t\t}\n\t\t\n\t}", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "@RequestMapping(\"items/search/itemtag\")\n public String searchByItemTags(HttpServletRequest request, Model model)\n {\n String searchString = request.getParameter(\"search\");\n model.addAttribute(\"search\", searchString);\n model.addAttribute(\"items\",\n items.findAllByItemTagsContainingIgnoreCase(searchString));\n return \"allitems\";\n }", "public static Product[] process(String html){\r\n\t\tProduct[] items = new Product[100];\r\n\t\tint i = 0;\r\n\t\t//trim\r\n\t\tint temp = html.indexOf(\"/<![CDATA[var ServerDataProducts=\");\r\n\t\thtml = html.substring(temp,html.length());\r\n\t\t//find products\r\n\t\ttemp = html.indexOf(\"\\\"Description\\\":\\\"\");\r\n\t\twhile(temp>0){\r\n\t\t\thtml = html.substring(temp+15,html.length());\r\n\t\t\titems[i] = new Product();\r\n\t\t\ttemp = html.indexOf(\"\\\"\");\r\n\t\t\titems[i].name = html.substring(0, temp);//System.out.println(items[i].name);\r\n\t\t\thtml = html.substring(temp,html.length());\r\n\t\t\ttemp = html.indexOf(\"\\\"Precio\\\":\\\"\");\r\n\t\t\thtml = html.substring(temp+10,html.length());\r\n\t\t\ttemp = html.indexOf(\"\\\"\");\r\n\t\t\titems[i].price = html.substring(0,temp);//System.out.println(items[i].price);\r\n\t\t\thtml = html.substring(temp,html.length());\r\n\t\t\titems[i].store = \"Walmart\";\r\n\t\t\t//find product url\r\n\t\t\ttemp = html.indexOf(\"\\\"upc\\\":\\\"\");\r\n\t\t\thtml = html.substring(temp+7,html.length());\r\n\t\t\titems[i].productlink = \"http://www.walmart.com.mx/Detalle-del-articulo/\"+html.substring(0,html.indexOf(\"\\\"\"))+\"/a\";\r\n\t\t\t//find next item\r\n\t\t\ti++;\r\n\t\t\ttemp = html.indexOf(\"\\\"Description\\\":\\\"\");\r\n\t\t}\r\n\t\tProduct[] result = new Product[i];\r\n\t\tfor(int j=0; j<i; j++){\r\n\t\t\tresult[j] = items[j];\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public void enterProduct(String product) {\n\n\t\tdriver.findElement(amazonSearchTextBox).sendKeys(product);\n\t}", "public static ObservableList<Product> lookupProduct(String productName) {\n ObservableList<Product> productsContainingSubstring = FXCollections.observableArrayList();\n\n // The for loop variable to the left of the colon is a temporary variable containing a single element from the collection on the right\n // With each iteration through the loop, Java pulls the next element from the collection and assigns it to the temp variable.\n for (Product currentProduct : Inventory.getAllProducts()) {\n if (currentProduct.getName().toLowerCase().contains(productName.toLowerCase())) {\n productsContainingSubstring.add(currentProduct);\n }\n }\n return productsContainingSubstring;\n }" ]
[ "0.6917237", "0.68623614", "0.6646246", "0.6534466", "0.65184695", "0.642844", "0.6383309", "0.6303107", "0.62726796", "0.6238936", "0.621272", "0.6211624", "0.6194036", "0.6188458", "0.615789", "0.6139403", "0.6130325", "0.61299074", "0.6129244", "0.61207724", "0.61197066", "0.6118775", "0.61160684", "0.6089667", "0.60822743", "0.60766447", "0.60613805", "0.6029331", "0.6029017", "0.6013981", "0.6007016", "0.599766", "0.5974776", "0.5952186", "0.5951537", "0.5942006", "0.5935122", "0.5934849", "0.5911591", "0.58766204", "0.58756113", "0.58727914", "0.58626586", "0.583447", "0.5830143", "0.58222616", "0.5818626", "0.58167803", "0.58160686", "0.581317", "0.578421", "0.57805616", "0.57676727", "0.5752478", "0.5732744", "0.5724764", "0.570866", "0.56983507", "0.5688356", "0.56829995", "0.56829995", "0.56829995", "0.56807315", "0.5677091", "0.5674125", "0.56534106", "0.5650799", "0.55893433", "0.55770403", "0.55742496", "0.5569098", "0.55678403", "0.5562758", "0.55621785", "0.5562152", "0.55613494", "0.5558594", "0.55577075", "0.5547491", "0.5544549", "0.5538693", "0.55270386", "0.55251265", "0.5524737", "0.5513441", "0.5494444", "0.54937893", "0.5484019", "0.5484019", "0.5479217", "0.547702", "0.5472931", "0.54702896", "0.5469021", "0.54575706", "0.5452586", "0.5448625", "0.54470843", "0.54301155", "0.54297405" ]
0.6208843
12
Retrieve all the products in the market
@GetMapping("/retrieve") public ResponseEntity<List<Product>> getProdAll(final HttpSession session) { log.info(session.getId() + " : Retrieving all products"); return ResponseEntity.status(HttpStatus.OK).body(prodService.getAll()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> getAllProducts();", "List<Product> retrieveProducts();", "public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }", "@GetMapping(\"/getproduct\")\n\t\tpublic List<Product> getAllProduct() {\n\t\t\tlogger.info(\"products displayed\");\n\t\t\treturn productService.getAllProduct();\n\t\t}", "List<Product> getAllProducts() throws PersistenceException;", "public List<Product> getProducts();", "public List<Product> getProducts();", "public List<Product> getAll() {\n\t\treturn productRepository.findAll();\n\n\t}", "private void getAllProducts() {\n }", "List<Product> getAllProducts() throws DataBaseException;", "@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}", "@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}", "List<Product> getProductsList();", "public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }", "@NonNull\n public List<Product> findAll() {\n return productRepository.findAll();\n }", "@Override\n\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}", "public List<Product> getAll() {\n List<Product> list = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + PRODUCT_TABLE;\n SQLiteDatabase database = this.getReadableDatabase();\n try (Cursor cursor = database.rawQuery(selectQuery, null)) {\n if (cursor.moveToFirst()) {\n do {\n int id = cursor.getInt(0);\n String name = cursor.getString(1);\n String url = cursor.getString(2);\n double current = cursor.getDouble(3);\n double change = cursor.getDouble(4);\n String date = cursor.getString(5);\n double initial = cursor.getDouble(6);\n Product item = new Product(name, url, current, change, date, initial, id);\n list.add(item);\n }\n while (cursor.moveToNext());\n }\n }\n return list;\n }", "@Override\r\n\tpublic List<Product> showAll() throws Exception {\n\t\treturn this.dao.showAll();\r\n\t}", "@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }", "public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}", "@Override\r\n public List<Product> findAll() {\r\n return productRepository.findAll();\r\n }", "@Override\r\n\tpublic List<Product> getallProducts() {\n\t\treturn dao.getallProducts();\r\n\t}", "@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}", "@GetMapping(\"/findAllProduct\")\n @ResponseBody\n public ResponseEntity<List<ProductEntity>> findAllProduct() {\n List<ProductEntity> productResponse = productService.viewProduct();\n return new ResponseEntity<>(productResponse, HttpStatus.OK);\n }", "Product getPProducts();", "public List<ProductDto> getProducts() {\n return tradingSystemFacade.getProducts();\n }", "@CrossOrigin()\r\n @GetMapping(\"/products/all\")\r\n List<ProductEntity> getAllProducts() {\r\n // TODO add error if there are not enough products\r\n return productRepository.findAll();\r\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Product> getProductFindAll() {\n return em.createNamedQuery(\"Product.findAll\", Product.class).getResultList();\n }", "public List<Product> findAll();", "@Override\r\n\tpublic List<Product> findAllProducts() {\n\t\treturn productRepository.findAllProducts();\r\n\t}", "public List<Product> getProducts(ProductRequest request) throws IOException {\n if (request.isSingle()){\n List<Product> products = new ArrayList<>();\n products.add(parseResult(executeRequest(request),Product.class));\n return products;\n } else {\n return parseResults(executeRequest(request), Product.class);\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}", "public List<Product> getProducts() {\n\t\treturn productRepository.findAll();\n\t}", "List<Product> findAll();", "List<Product> findAll();", "public List<Product> get() {\r\n return sessionFactory.getCurrentSession()\r\n .createCriteria(Product.class)\r\n .addOrder(Order.asc(\"name\"))\r\n .list();\r\n }", "@GetMapping(path =\"/products\")\n public ResponseEntity<List<Product>> getProducts() {\n return ResponseEntity.ok(productService.getAll());\n }", "@GetMapping(\"/allProduct\")\n\tpublic ResponseEntity<Response> getAllProduct(){\n\t\treturn ResponseEntity.status(HttpStatus.OK)\n\t\t\t\t.body(new Response(productService.getProduct(), new Date()));\n\t}", "@GetMapping(\"/view-all\")\r\n\tpublic List<ProductDetails> viewAllProducts() {\r\n\r\n\t\treturn productUtil.toProductDetailsList(productService.viewAllProducts());\r\n\t}", "@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}", "public List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\n\t}", "public List<ProductWithSupplierTO> getAllProducts(long storeID) throws NotInDatabaseException;", "@Override\r\n\tpublic List<Producto> getAll() throws Exception {\n\t\treturn productRepository.buscar();\r\n\t}", "@Override\n\tpublic List<Product> getAllProductByName(String name) {\n\t\treturn productRepository.findByName(name);\n\t}", "public List<Product> returnProducts() throws FlooringMasteryDaoException {\n\n List<Product> products = dao.loadProductInfo();\n return products;\n\n }", "public static ObservableList<Product> getAllProducts() {\n return allProducts;\n }", "@Override\n\tpublic List<Product> getAll() {\n\t\tQuery query = session.createQuery(\"from Product \");\n\t\t\n\t\treturn query.getResultList();\n\t}", "List<SpotPrice> getAll();", "@Override\r\n\tpublic List prodAllseach() {\n\t\treturn adminDAO.seachProdAll();\r\n\t}", "@Override\n\t@Transactional\n\tpublic List<Product> getAllProducts() {\n\t\treturn (List<Product>)productDAO.findAll();\n\t\t\n\t}", "public List<Product> readAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Product> getAll() throws SQLException {\n\t\treturn null;\n\t}", "public ArrayList<Product> viewAllProduct() throws ProductException{\r\n\t\t\tArrayList<Product> products=new ArrayList<Product>();\r\n\t\t\tif(ProductRepository.productsList.isEmpty()) {\r\n\t\t\t\tthrow new ProductException(\"there are no products in the store\");\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\r\n\t\t\tproducts.addAll(pDoa.viewProductsDoa());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn products;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public List<Product> getAllProducts() {\n return new ArrayList<Product>(this.products.values());\n }", "List<Product> getProducts(Order order);", "List<Product> getProductPage(int pageNumber, int pageSize);", "public List<Product> getProductList(){\n List<Product> productList = mongoDbConnector.getProducts();\n return productList;\n }", "@Override\n\tpublic List<Product> getProducts() {\n\t\treturn productDao.getProducts();\n\t}", "@Override\r\n\tpublic List<ProductMaster> getAllProducts() {\n\t\treturn this.repository.findAll();\r\n\t}", "@Override\n\tpublic List<Products> getProducts() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Products> theQuery = currentSession.createQuery(\"from Products order by id\", Products.class);\n\n\t\t// execute query and get result list\n\t\tList<Products> products = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn products;\n\n\t}", "List<CheckoutProduct> findAll();", "public List<productmodel> getproductbyname(String name);", "public ObservableList<Product> getAllProducts() {\n return allProducts;\n }", "List<Product> list();", "public ObservableList<Product> getAllProducts() { return allProducts; }", "@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \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}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn list;\n\t}", "@Override\n\tpublic List<ProductDTO> viewAllProducts() throws ProductException {\n\t\tCollection<Product> products = ProductStore.map.values();\n\t\tList<ProductDTO> list = new ArrayList();\n\n\t\tfor (Product product : products) {\n\t\t\tProductDTO product1 = ProductUtil.convertToProductDto(product);\n\t\t\tlist.add(product1);\n\t\t}\n\n\t\treturn list;\n\t}", "public List<Product> getProducts() {\n return products;\n }", "@CrossOrigin()\r\n @GetMapping(\"/products/discover\")\r\n Stream<ProductEntity> getDiscoveryProducts() {\n return productRepository\r\n .findAll(PageRequest.of(0, 3, Sort.by(\"numberOfPurchases\").descending()))\r\n .get();\r\n }", "public List<ProductDto> getProducts() {\n\t\tString url = URL_BASE + \"/list\";\n\n\t\tResponseEntity<List<ProductDto>> responseEntity = restTemplate.exchange(url, HttpMethod.GET, HttpEntity.EMPTY,\n\t\t\t\tnew ParameterizedTypeReference<List<ProductDto>>() {\n\t\t\t\t});\n\t\tList<ProductDto> playerList = responseEntity.getBody();\n\t\treturn playerList;\n\t}", "private List<ProductView> fetchProducts(String developerId) {\n LOG.debug(\"Enter. developerId: {}.\", developerId);\n\n List<Product> products = productService.getByDeveloperId(developerId);\n\n List<ProductView> result = ProductMapper.toView(products);\n\n List<String> productIds = products.stream().map(Product::getId).collect(Collectors.toList());\n\n Map<String, List<ProductDataView>> productDataViews =\n restClient.getProductData(developerId, productIds);\n\n mergeProductData(result, productDataViews);\n\n cacheApplication.cacheProducts(developerId, result);\n\n LOG.trace(\"Product: {}.\", result);\n LOG.debug(\"Exit. product size: {}.\", result.size());\n\n return result;\n }", "public List<Product> findAll() {\n\t\treturn repository.findAll();\n\t}", "public List<Buy> getAll() throws PersistException;", "@Override\r\n\tpublic List prodStockseach() {\n\t\treturn adminDAO.seachProdStock();\r\n\t}", "@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}", "@GetMapping(\"/products\")\n\t@HystrixCommand(fallbackMethod = \"getFallBackAllProducts\")\n\tpublic Products getAllProducts(){\n\t\tList<Product> pList=restTemplate.getForObject(\"http://product-service/products\", List.class);\n\t\tProducts p=new Products();\n\t\tp.setProductList(pList);\n\t\treturn p;\n\t}", "void getMarketOrders();", "@Override\n public List getAllSharingProduct() {\n \n List sharingProducts = new ArrayList();\n SharingProduct sharingProduct = null;\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n ResultSet result = null;\n try {\n connection = MySQLDAOFactory.createConnection();\n preparedStatement = connection.prepareStatement(Read_All_Query);\n preparedStatement.execute();\n result = preparedStatement.getResultSet();\n \n while (result.next()) {\n sharingProduct = new SharingProduct(result.getString(1), result.getInt(2) );\n sharingProducts.add(sharingProduct);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n result.close();\n } catch (Exception rse) {\n rse.printStackTrace();\n }\n try {\n preparedStatement.close();\n } catch (Exception sse) {\n sse.printStackTrace();\n }\n try {\n connection.close();\n } catch (Exception cse) {\n cse.printStackTrace();\n }\n }\n \n return sharingProducts;\n }", "private void get_products_search()\r\n\r\n {\n MakeWebRequest.MakeWebRequest(\"get\", AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n AppConfig.SALES_RETURN_PRODUCT_LIST + \"[\" + Chemist_ID + \",\"+client_id +\"]\", this, true);\r\n\r\n// MakeWebRequest.MakeWebRequest(\"out_array\", AppConfig.SALES_RETURN_PRODUCT_LIST, AppConfig.SALES_RETURN_PRODUCT_LIST,\r\n// null, this, false, j_arr.toString());\r\n //JSONArray jsonArray=new JSONArray();\r\n }", "List<ProductDto> getProducts();", "public ArrayList<Product> getAllProducts(){\r\n\t\tArrayList<Product> prods = new ArrayList<Product>();\r\n\t\tIterator<Integer> productCodes = inventory.keySet().iterator();\r\n\t\twhile(productCodes.hasNext()) {\r\n\t\t\tint code = productCodes.next();\r\n\t\t\tfor(Product currProduct : Data.productArr) {\r\n\t\t\t\tif(currProduct.getID() == code) {\r\n\t\t\t\t\tprods.add(currProduct);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prods;\r\n\t}", "public List<Product> getAllProducts()\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n // Creates a comma-separated string of all columns in the shopping list table\n String values = TextUtils.join(\", \", ShoppingListTable.COLUMNS);\n\n // Constructs the SQL query\n String sql = String.format(\"SELECT %s FROM %s\", values, ShoppingListTable.TABLE_NAME);\n\n Cursor query = db.rawQuery(sql, null);\n\n Product product = null;\n List<Product> products = new ArrayList<>();\n\n // Check whether there are any products\n if (query.moveToFirst())\n {\n do\n {\n int tpnb = Integer.parseInt(query.getString(0));\n String name = query.getString(1);\n String description = query.getString(2);\n float cost = Float.parseFloat(query.getString(3));\n float quantity = Float.parseFloat(query.getString(4));\n String superDepartment = query.getString(5);\n String department = query.getString(6);\n String imageURL = query.getString(7);\n Boolean isChecked = query.getString(8).equals(\"1\");\n int amount = Integer.parseInt(query.getString(9));\n int position = Integer.parseInt(query.getString(10));\n\n product = new Product(tpnb, name, description, cost, quantity, superDepartment, department, imageURL);\n\n product.setChecked(isChecked);\n product.setAmount(amount);\n product.setPosition(position);\n\n products.add(product);\n }\n while (query.moveToNext());\n }\n\n return products;\n }", "public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}", "public List<Products> getProducts() {\n\t\treturn pdao.getProducts();\r\n\t}", "@Override\r\n\tpublic List<MarketDto> readMarketAll() {\n\t\treturn session.selectList(\"kdc.market.readMarketAll\");\r\n\t}", "@ServiceMethod(name = \"FetchStoreProduct\")\r\n\tpublic IResponseHandler fetchStoreProduct()\r\n\t{\t\r\n\t\tStoreProductOutDTO outDTO = new StoreProductOutDTO();\r\n\t\t\r\n\t\tList<StoreProduct> sps= StoreProductDAO.getInstance(getSession()).readStoresProduct();\r\n\t\t\r\n\t\tfor(StoreProduct sp : sps)\r\n\t\t{\r\n\t\t\tStoreProductDTO dto = new StoreProductDTO();\r\n\t\t\t\r\n\t\t\toutDTO.getStoreProducts().add(dto.assemble(sp));\r\n\t\t}\r\n\t\t\r\n\t\tStoreService storeService = (StoreService)newInstance(new StoreService());\r\n\t\toutDTO.setStores((StoreOutDTO)storeService.fetchStore());\r\n\t\t\r\n\t\tProductService productService = (ProductService)newInstance(new ProductService());\r\n\t\toutDTO.setProducts((ProductOutDTO)productService.fetchProduct());\r\n\t\t\r\n\t\treturn outDTO;\r\n\t}", "@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }", "@CrossOrigin(origins = \"http://localhost:5000\")\r\n @GetMapping(\"/allproducts/{page}\")\r\n public Iterable<product> allproducts(@PathVariable(\"page\") int pagenum) {\r\n int pageSize = 2;\r\n \r\n Pageable pageable = PageRequest.of(pagenum,pageSize);\r\n Page<product> allproducts = productrepo.findAll(pageable);\r\n \r\n return productrepo.findAll(pageable);\r\n }", "@GetMapping(\"/productos\")\n @Timed\n public List<Producto> getAllProductos() {\n log.debug(\"REST request to get all Productos\");\n List<Producto> productos = productoRepository.findAll();\n return productos;\n }", "List<ProductView> getAllByPage(int pageNumber, int itemsPerPage) throws ProductException;", "private void printAllProducts()\n {\n manager.printAllProducts();\n }", "@Override\n\tpublic List<ProductInfo> getProducts() {\n\t\treturn shoppercnetproducts;\n\t}", "private List<Product> extractProducts() {\r\n\t\t//load products from hidden fields\r\n\t\tif (this.getListProduct() != null){\r\n\t\t\tfor(String p : this.getListProduct()){\r\n\t\t\t\tProduct product = new Product();\r\n\t\t\t\tproduct.setId(Long.valueOf(p));\r\n\t\t\t\tthis.products.add(product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.products;\r\n\t}", "public List<Product> getProductList(Catalog catalog) throws BackendException;", "@Override\n\tpublic String toString() {\n\t\treturn \"Market [products=\" + products + \"]\";\n\t}", "public ArrayList<Product> getProducts(int warehouseNumber) { return db.retrieve_warehouse(warehouseNumber); }", "private void fetchProducts() {\n\t\t// Showing progress dialog before making request\n\n\t\tpDialog.setMessage(\"Fetching products...\");\n\n\t\tshowpDialog();\n\n\t\t// Making json object request\n\t\tJsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.GET,\n\t\t\t\tConfig.URL_PRODUCTS, null, new Response.Listener<JSONObject>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResponse(JSONObject response) {\n\t\t\t\t\t\tLog.d(TAG, response.toString());\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONArray products = response\n\t\t\t\t\t\t\t\t\t.getJSONArray(\"products\");\n\n\t\t\t\t\t\t\t// looping through all product nodes and storing\n\t\t\t\t\t\t\t// them in array list\n\t\t\t\t\t\t\tfor (int i = 0; i < products.length(); i++) {\n\n\t\t\t\t\t\t\t\tJSONObject product = (JSONObject) products\n\t\t\t\t\t\t\t\t\t\t.get(i);\n\n\t\t\t\t\t\t\t\tString id = product.getString(\"id\");\n\t\t\t\t\t\t\t\tString name = product.getString(\"name\");\n\t\t\t\t\t\t\t\tString description = product\n\t\t\t\t\t\t\t\t\t\t.getString(\"description\");\n\t\t\t\t\t\t\t\tString image = product.getString(\"image\");\n\t\t\t\t\t\t\t\tBigDecimal price = new BigDecimal(product\n\t\t\t\t\t\t\t\t\t\t.getString(\"price\"));\n\t\t\t\t\t\t\t\tString sku = product.getString(\"sku\");\n\n\t\t\t\t\t\t\t\tProduct p = new Product(id, name, description,\n\t\t\t\t\t\t\t\t\t\timage, price, sku);\n\n\t\t\t\t\t\t\t\tproductsList.add(p);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// notifying adapter about data changes, so that the\n\t\t\t\t\t\t\t// list renders with new data\n\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\"Error: \" + e.getMessage(),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// hiding the progress dialog\n\t\t\t\t\t\thidepDialog();\n\t\t\t\t\t}\n\t\t\t\t}, new Response.ErrorListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\t\t\tVolleyLog.d(TAG, \"Error: \" + error.getMessage());\n\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\terror.getMessage(), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t// hide the progress dialog\n\t\t\t\t\t\thidepDialog();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t// Adding request to request queue\n\t\tAppController.getInstance().addToRequestQueue(jsonObjReq);\n\t}", "private void viewProducts(){\n Database manager = new Database(this, \"Market\", null, 1);\n\n SQLiteDatabase market = manager.getWritableDatabase();\n\n Cursor row = market.rawQuery(\"select * from products\", null);\n\n if (row.getCount()>0){\n while(row.moveToNext()){\n listItem.add(row.getString(1));\n listItem.add(row.getString(2));\n listItem.add(row.getString(3));\n listItem.add(row.getString(4));\n }\n adapter = new ArrayAdapter(\n this, android.R.layout.simple_list_item_1, listItem\n );\n productList.setAdapter(adapter);\n } else {\n Toast.makeText(this, \"No hay productos\", Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.77771086", "0.77771086", "0.77771086", "0.7702293", "0.7607474", "0.7422748", "0.7404341", "0.73987293", "0.73987293", "0.73776704", "0.7360006", "0.7328789", "0.7303137", "0.7303137", "0.7272853", "0.7243286", "0.7216202", "0.7156576", "0.71548533", "0.71525484", "0.714683", "0.7109843", "0.71097404", "0.71084327", "0.71042293", "0.71014684", "0.70484084", "0.70255595", "0.70136523", "0.69919086", "0.698878", "0.6981875", "0.69569796", "0.69445825", "0.6943966", "0.6935278", "0.6935278", "0.6932166", "0.69290835", "0.6920648", "0.69169927", "0.6910281", "0.69022477", "0.6901625", "0.68888813", "0.6886509", "0.6884384", "0.6883281", "0.6882226", "0.68687266", "0.6848353", "0.6834969", "0.68293303", "0.68208766", "0.68109024", "0.6807871", "0.6804901", "0.6804044", "0.6790055", "0.6782789", "0.6775795", "0.6773429", "0.6770749", "0.67547256", "0.67373556", "0.67370474", "0.67320377", "0.6727456", "0.6726106", "0.67126906", "0.6692597", "0.6691339", "0.66691", "0.66657645", "0.66604334", "0.6657228", "0.6654599", "0.6649442", "0.66442627", "0.66213596", "0.6620037", "0.66181016", "0.65847397", "0.65836626", "0.65824646", "0.65797347", "0.6577884", "0.6576047", "0.65739864", "0.6569726", "0.6560076", "0.6552355", "0.65214014", "0.6502954", "0.6498934", "0.6493619", "0.64753723", "0.64649403", "0.6452265", "0.645141" ]
0.7136126
21
Place the order from your cart
@PostMapping("/order") public ResponseEntity<OrderConfirmation> placeOrder(final HttpSession session) throws Exception { Map<String, CartProduct> initialCart = (Map<String, CartProduct>) session.getAttribute(CART_SESSION_CONSTANT); log.info(session.getId() + " : Reviewing the order"); //check if the cart is empty ControllerUtils.checkEmptyCart(initialCart, session.getId()); //check if items are still available during confirmation of order List<OrderProduct> orderProducts = new ArrayList<>(); for (String key : initialCart.keySet()) orderProducts.add(ControllerUtils.parse(initialCart.get(key))); List<String> chckQuantity = prodService.checkQuantityList(orderProducts); if (chckQuantity != null) { log.error(session.getId() + " : Error submitting order for products unavailable"); throw new AvailabilityException(chckQuantity); } //Confirm order and update tables log.info(session.getId() + " : confirming the order and killing the session"); OrderConfirmation orderConfirmation = prodService.confirmOrder(initialCart); session.invalidate(); return ResponseEntity.status(HttpStatus.OK).body(orderConfirmation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }", "public void placeOrder(TradeOrder order)\r\n {\r\n brokerage.placeOrder(order);\r\n }", "public void placeOrder(TradeOrder order) {\r\n\t\tString msg = \"New order: \";\r\n\t\tif (order.isBuy()) {\r\n\t\t\tbuy.add(order);\r\n\t\t\tmsg += \"Buy \";\r\n\r\n\t\t}\r\n\r\n\t\tif (order.isSell()) {\r\n\t\t\tsell.add(order);\r\n\t\t\tmsg += \"Sell \";\r\n\t\t}\r\n\r\n\t\tmsg += this.getSymbol() + \" (\" + this.getName() + \")\";\r\n\t\tmsg += \"\\n\" + order.getShares() + \" shares at \";\r\n\r\n\t\tif (order.isLimit())\r\n\t\t\tmsg += money.format(order.getPrice());\r\n\t\telse\r\n\t\t\tmsg += \"market\";\r\n\t\tdayVolume += order.getShares();\r\n\t\torder.getTrader().receiveMessage(msg);\r\n\t\t\r\n\t}", "public APIResponse placeOrder(@NotNull Order order){\n try {\n validateOrder(order);\n \n order.getItems().addAll(\n orderItemRepository.saveAll(order.getItems())\n );\n orderRepository.save( order );\n return APIResponse.builder()\n .success( true)\n .data( true )\n .error( null )\n .build();\n }catch (Exception exception){\n\n log.error(exception.getMessage());\n return APIResponse.builder()\n .success( true)\n .data( false )\n .error( exception.getMessage() )\n .build();\n }\n }", "@Test\n public void placeOrderTest() {\n Order body = new Order().id(10L)\n .petId(10L)\n .complete(false)\n .status(Order.StatusEnum.PLACED)\n .quantity(1);\n Order response = api.placeOrder(body);\n\n Assert.assertEquals(10L, response.getId().longValue());\n Assert.assertEquals(10L, response.getPetId().longValue());\n Assert.assertEquals(1, response.getQuantity().intValue());\n Assert.assertEquals(true, response.isComplete());\n Assert.assertEquals(Order.StatusEnum.APPROVED, response.getStatus());\n\n verify(exactly(1), postRequestedFor(urlEqualTo(\"/store/order\")));\n }", "public void orderPlace() {\n Log.d(\"Method\", \"orderPlaced()\");\n\n if (coffeeCount < getResources().getInteger(R.integer.min_coffee)) {\n Log.e(\"\", \"coffeeCount < minimum coffee order\");\n displayMessage(String.format(Locale.getDefault(), getString(R.string.min_order_message), getResources().getInteger(R.integer.min_coffee)));\n } else if (coffeeCount > getResources().getInteger(R.integer.max_coffee)) {\n Log.e(\"\", \"coffeeCount > maximum coffee order\");\n displayMessage(String.format(Locale.getDefault(), getString(R.string.max_order_message), getResources().getInteger(R.integer.max_coffee)));\n } else {\n Log.i(\"\", \"Order placed: \" + coffeeCount + \" coffee.\");\n displayMessage(String.format(Locale.getDefault(), getString(R.string.order_thanks), 176));\n }\n resetQuantity();\n }", "public void placeRushOrder() throws SQLException {\n\t\tCart.getCart().checkAvailabilityOfProduct();\n\t}", "public void createOrderInSession(HttpServletRequest request, HttpServletResponse response) {\n\t\tOrder order = new Order();\n\t\tSet<CartItem> orderLines = new HashSet<>();\n\t\tShoppingCart cart = new ShoppingCart();\n\t\tcart.setOrder(order);\n\t\tcart.setOrderLines(orderLines);\n\t\trequest.getSession().setAttribute(\"shoppingCart\", cart);\n\t}", "Order placeNewOrder(Order order, Project project, User user);", "public void Cart() {\r\n\t\tthis.cart.click();\r\n\t}", "@Override\n\tpublic boolean placeOrder(ArrayList<CartItems> cart_items) {\n\t\tboolean b = false;\n\t\tif(checkStock.isAvailable(cart_items)) {\n\t\t\tb=true;\n\t\t}\n\t\treturn b;\n\t}", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "@RequestMapping(value =\"/customer/place_order\", method = RequestMethod.POST)\n public String placeOrder(ModelMap model, Order order, @RequestParam(\"code\") String code) {\n logger.info(\"*** OrderController - placeOrder ***\");\n Product product = productService.getProduct(code);\n order.setProduct(product);\n order.setStatus(\"completed\");\n order.setOrderDate(new Date());\n Order completedOrder = orderService.placeOrder(order);\n if(!completedOrder.equals(null)){\n productService.updateInventory(product,order.getQuantity());\n }\n model.addAttribute(\"completedOrder\", completedOrder);\n return \"success\";\n }", "public void commitOrderInSession(HttpServletRequest request){\n\t\tShoppingCart cart = (ShoppingCart) request.getSession().getAttribute(\"shoppingCart\");\n\t\t\n\t\t\n\t\t//persisting the Order object changes the id of the referenced order.\n\t\t//The empty order id will have a value\n\t\t\n\t\tOrder order = cart.getOrder();\n\t\torder.setStatus(statusDAO.getStatusFromName(\"Received\"));\n\t\torder.setType(typeDAO.getTypeFromName(\"Delivery\"));\n\t\torder.setSubmitted(Calendar.getInstance());\n\t\torder.setUser((GDFUser) request.getSession().getAttribute(\"user\"));\n\t\tdao.createOrder(order);\n\t\tSet<CartItem> orderLines = cart.getOrderLines();\n\t\tfor(CartItem item: orderLines){\n\t\t\tOrderLine newOrderLine = new OrderLine();\n\t\t\tnewOrderLine.setDish(item.getDish());\n\t\t\tnewOrderLine.setOrder(order);\n\t\t\tnewOrderLine.setQuantity(item.getQuantity());\n\t\t\tdao.addOrderLineToOrder(newOrderLine);\n\t\t}\n\t\trequest.getSession().removeAttribute(\"shoppingCart\");\n\t}", "@RequestMapping(\"/order/{cartId}\")\r\n public String createOrder(@PathVariable(\"cartId\") int cartId) {\r\n \tSystem.out.println(\"in order\");\r\n \tUserOrder userOrder = new UserOrder();\r\n Cart cart=cartService.getCartById(cartId);\r\n userOrder.setCart(cart);\r\n\r\n UsersDetail usersDetail = cart.getUsersDetail();\r\n userOrder.setUsersDetail(usersDetail);\r\n userOrder.setBillingAddress(usersDetail.getBillingAddress());\r\n //userOrder.setShippingAddress(usersDetail.getShippingAddress());\r\n\r\n orderService.addOrder(userOrder);\r\n\r\n return \"redirect:/checkout?cartId=\"+cartId;\r\n }", "public void placeSingleTaskOrder(User user, SingleTaskOrder order);", "void placeOrder(Cashier cashier){\n }", "public void submitOrder() {\n int price = quantity*5;\n displayPrice(price);\n }", "void order(Pizza pizza) {\n order.add(pizza);\n }", "@Override\n @Transactional\n public PurchaseResponse placeOrder(Purchase purchase) {\n Order order = purchase.getOrder();\n\n //genrate traking number\n String orderTrakingNumber = genrateOrderTrakingnumber();\n order.setOrderTrackingNumber(orderTrakingNumber);\n\n //populate order with order item\n Set<OrderItem> orderItems = purchase.getOrderItems();\n orderItems.forEach(item-> order.add(item));\n\n //populate order with billingAddress and shipplingAddress\n order.setBillingAddress(purchase.getBillingAddress());\n order.setShippingAddress(purchase.getShippingAddress());\n\n //populate customer with order\n Customer customer = purchase.getCustomer();\n\n // checck if the existing customer\n String theEmail = customer.getEmail();\n Customer customerFromDB = customerRepository.findByEmail(theEmail);\n\n if(customerFromDB != null){\n // we found it let assign them\n customer = customerFromDB;\n }\n\n customer.add(order);\n\n //sqve to the db\n customerRepository.save(customer);\n\n\n\n // return the response\n return new PurchaseResponse(orderTrakingNumber);\n }", "public void orderClicked(View view) {\n Log.d(\"Method\", \"orderClicked()\");\n orderPlace();\n }", "public static void addToCart() {\n List<WebElement> buttonsAddItem = Browser.driver.findElements(ADD_TO_CART_BUTTON);\n buttonsAddItem.get(0).click();\n Browser.driver.navigate().refresh();\n }", "@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }", "public static void goToCart() {\n click(SHOPPING_CART_UPPER_MENU);\n }", "@Override\n\tpublic boolean PlaceOrder(Order order) {\n\t\treturn false;\n\t}", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n finalList = adapter.getMenu();\n Order newOrder = new Order();\n newOrder.setVendor(Id);\n newOrder.setCustomer(userID);\n newOrder.setCustomerLocation(latitude+\",\"+longitude);\n newOrder.setVendorName(curr.getName());\n newOrder.setDate(new SimpleDateFormat(\"dd/MM/yyyy\", Locale.getDefault()).format(new Date()));\n HashMap<String, CartItem> newCart = new HashMap<>();\n float amount = 0;\n for (MenuItem item : finalList) {\n if (!item.getQuantity().equals(\"0\")) {\n amount += Integer.parseInt(item.getQuantity()) * Integer.parseInt(item.getPrice());\n newCart.put(item.getName(), new CartItem(item.getPrice(), item.getQuantity()));\n }\n }\n if(newCart.size()==0)\n {\n Toast.makeText(restrauntPage.this, \"Please add atleast 1 item\", Toast.LENGTH_SHORT).show();\n return;\n }\n amount = amount * 1.14f;\n newOrder.setTotalAmount(String.valueOf(amount));\n newOrder.setItemsOrdered(newCart);\n Log.d(\"checkout\", newOrder.toString());\n Intent mainIntent = new Intent(restrauntPage.this, paymentOrder.class);\n mainIntent.putExtra(\"order\",newOrder);\n mainIntent.putExtra(\"userId\",userID);\n mainIntent.putExtra(\"userInfo\",currUser);\n startActivity(mainIntent);\n finish();\n }\n }", "public void purchaseCart (View view) {\n Utility.showMyToast(\"Purchasing now!\", this);\n\n // Also send an Analytics hit\n sendPurchaseHit();\n }", "public PlaceOrder() {\n initComponents();\n this.setSize(1090, 750);\n \n System.out.println(\"new Order().getAllOrders() = \" + new Order().getAllOrders());\n \n this.products = new ArrayList<>();\n \n this.productsList = new ItemList(ProductOrderPanel.WIDTH);\n this.getAllCustomers();\n \n pnlAddProducts.add(productsList, new org.netbeans.lib.awtextra.AbsoluteConstraints(55, 260, ProductOrderPanel.WIDTH, 250));\n \n UIUtils.setIcon(this.jbPlaceOrder, \"save\");\n UIUtils.setIcon(this.jbAdd, \"add\");\n \n \n \n }", "public void submitOrder(int quantity) {\n display(quantity);\n displayPrice(quantity * pintPrice);\n }", "private static void placeOrder() {\n System.out.println();\n System.out.println(\"Menu : \");\n for (int i = 0; i < menuItems.length; i++) {\n System.out.printf(\"%2d. %-30s Price: %8.2f Baht%n\", i + 1, menuItems[i], menuPrices[i]);\n }\n System.out.println();\n\n int orderNo = getIntReply(\"What would you like to menuOrder (by menu number)\");\n if (orderNo > menuOrder.length || orderNo == -1) {\n System.out.println(\"Invalid menu number\");\n return;\n }\n\n int amount = getIntReply(\"How many of them\");\n if (amount == -1) return;\n menuOrder[orderNo - 1] += amount;\n\n System.out.printf(\"You've ordered %s for %d piece(s)%n%n\", menuItems[orderNo - 1], menuOrder[orderNo - 1]);\n }", "public void ViewCart() {\r\n\t\tthis.ViewCart.click();\r\n\t}", "public void initialAddToCart() {\n JavascriptExecutor js = (JavascriptExecutor) webDriver;\n js.executeScript(\"arguments[0].scrollIntoView();\", productImage);\n Actions action = new Actions(webDriver);\n action.moveToElement(productImage).perform();\n\n Controllers.button.click(addtoCartInitial);\n }", "public void submitOrder(BeverageOrder order);", "@Test\n\tpublic void testOrder() {\n\t\t\n\t\tDateFormat df1 = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = df1 .parse(\"2021-10-15\");\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tshoppingCart = new ShoppingCart();\n\t\tshoppingCart.setExpiry(date);\n\t\tshoppingCart.setUserId(11491);\n\t\tshoppingCart.setItems(shoppingCartSet);\n\t\t\n\t\torder.setId(1);\n\t\torder.setShoppingCart(shoppingCart);\n\t\t\n\t\ttry {\n\t\t\tassertEquals(orderService.order(order), 1);\n\t\t\t\n\t\t} catch (OrderException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean placeOrder(int pId) {\n\t\tboolean orderFulfilled = false;\n\n\t\tProduct product = new Product();\n\t\t//checks if product is available\n\t\tif (InventoryService.isAvailable(product)) {\n\t\t\tlogger.info(\"Product with ID: {} is available.\", product.getId());\n\t\t\t//paying service\n\t\t\tboolean paymentConfirmed = PaymentService.makePayment();\n\n\t\t\tif (paymentConfirmed) {\n\t\t\t\tlogger.info(\"Payment confirmed...\");\n\t\t\t\t//shipping service\n\t\t\t\tShippingService.shipProduct(product);\n\t\t\t\tlogger.info(\"Product shipped...\");\n\t\t\t\torderFulfilled = true;\n\t\t\t}\n\n\t\t}\n\t\treturn orderFulfilled;\n\t}", "@Override\n public void onClick(View v) {\n\n String order = sendOrder(parcelCart);\n\n String orderPost = \"http://project-order-food.appspot.com/send_order\";\n final PostTask sendOrderTask = new PostTask(); // need to make a new httptask for each request\n try {\n // try the getTask with actual location from gps\n sendOrderTask.execute(orderPost, order).get(30, TimeUnit.SECONDS);\n Log.d(\"httppost\", order);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n Log.d(\"Button\", \"clicked\");\n Log.d(\"sendorder\", sendOrder(parcelCart));\n Toast toast = Toast.makeText(getApplication().getBaseContext(), \"Order Placed!\", Toast.LENGTH_LONG);\n toast.show();\n }", "public void add(final ItemOrder theOrder) {\r\n Objects.requireNonNull(theOrder, \"theOrder can't be null!\");\r\n myShoppingCart.put(theOrder.getItem(), theOrder.calculateOrderTotal());\r\n }", "public void makeOrder(Order order) {\n for(Order_Item x : order.getOrdered()){\n TableRow item_row = build_row(x.getItem().getName(), String.valueOf(x.getQuantity()), (x.getPrice()*x.getQuantity()) + \"€\");\n orderLayout.addView(item_row);\n }\n\n refreshPriceView();\n }", "public static void viewCart() {\n click(CART_BUTTON);\n click(VIEW_CART_BUTTON);\n }", "public int placeOrder(int custID, int prodID, int quantity, int sessionID) {\r\n\t\tfor (int i=0;i<sessions.size();i++) {\r\n\t\t\tSession s = sessions.get(i);\r\n\t\t\tif (s.getID() == sessionID && s.getUser() instanceof Shopper) {\r\n\t\t\t\tShopper sh = (Shopper)(s.getUser());\r\n\t\t\t\tif (sh.cust != null && sh.cust.custID == custID)\r\n\t\t\t\t\treturn sh.placeOrder(prodID, quantity);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "private static String placeOrderResource() {\n return \"/store/order\";\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "private void submitOrder(HttpServletRequest request, HttpServletResponse response) {\n User authUser = (User) request.getSession().getAttribute(REQUEST_USER.toString());\n OrderDAO orderDao = (OrderDAO) DAOFactory.getFactory(DB_MYSQL).createOrderDAO();\n Order myOrder = new Order(0, authUser.getId(), order, 0, 0);\n Integer orderNumber = orderDao.insert(myOrder);\n orderDishList = orderDao.fillOrderDishList(order);\n request.getSession().setAttribute(REQUEST_ORDER_NUMBER.toString(), orderNumber);\n request.setAttribute(REQUEST_DISH_LIST.toString(), orderDishList);\n\n }", "public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}", "public Long placeOrderInCart(Business business, CheckIn checkIn, OrderDTO orderData) {\n\t\tcheckNotNull(business, \"business was null\");\n\t\tcheckNotNull(checkIn, \"checkIn was null\");\n\t\t\n\t\tif(business.isBasic()) {\n\t\t\tlogger.error(\"Unable to place order at business with basic subscription.\");\n\t\t\tthrow new IllegalAccessException(\"Unable to place Orders at Business with basic subscription\");\n\t\t}\n\t\t\n\t\tif(checkIn.getStatus() != CheckInStatus.CHECKEDIN && checkIn.getStatus() != CheckInStatus.ORDER_PLACED) {\n\t\t\tthrow new OrderFailureException(\"Order cannot be placed, payment already requested or not checked in\");\n\t\t}\n\t\t\n\t\tif( orderData.getStatus() != OrderStatus.CART ) {\n\t\t\tthrow new OrderFailureException(\"Order cannot be placed, unexpected order status: \"+orderData.getStatus());\n\t\t}\n\n\t\t// Check that the order will be placed at the correct business.\n\t\tif(business.getId() != checkIn.getBusiness().getId()) {\n\t\t\tthrow new ValidationException(\"Order cannot be placed, checkin is not at the same business to which the order was sent: id=\"+checkIn.getBusiness().getId());\n\t\t}\n\t\t\n\t\tArea area = areaRepo.getByKey(checkIn.getArea());\n\t\tif(area.isWelcome()) {\n\t\t\tlogger.error(\"Unable to place order at welcome area.\");\n\t\t\tthrow new IllegalAccessException(\"Unable to place Orders at welcome area.\");\n\t\t}\n\t\t\n\t\t// Check if the product to be ordered exists\t\n\t\tProduct product;\n\t\ttry {\n\t\t\tproduct = productRepo.getById(checkIn.getBusiness(), orderData.getProductId());\n\t\t} catch (com.googlecode.objectify.NotFoundException e) {\n\t\t\tlogger.error(\"Unable to place order: Unknown productId={}\", orderData.getProductId());\n\t\t\tthrow new ValidationException(\"Order cannot be placed, productId unknown\",e);\n\t\t}\n\t\t\n\t\tif(product.isNoOrder()) {\n\t\t\tlogger.error(\"Unable to place order for Product, noOrder=true. id={}\", product.getId());\n\t\t\tthrow new ValidationException(\"Order cannot be placed, product can't be ordered.\");\n\t\t}\n\t\t\n\t\tboolean isProductAssignedToArea = false;\n\t\t\n\t\t// Check if the Menu of the ordered Product is assigned to this Area.\n\t\tfor (Key<Menu> menuKey : area.getMenus()) {\n\t\t\tif(menuKey.equals(product.getMenu())) {\n\t\t\t\tisProductAssignedToArea = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!isProductAssignedToArea) {\n\t\t\tlogger.error(ERROR_PRODUCT_NOT_FROM_AREA);\n\t\t\tthrow new ValidationException(ERROR_PRODUCT_NOT_FROM_AREA);\n\t\t}\n\t\t\n\t\tLong orderId = null;\n\t\tList<OrderChoice> choices = null;\n\t\tif(orderData.getChoices() != null\n\t\t\t\t&& !orderData.getChoices().isEmpty()) {\n\t\t\t\n\t\t\tif(product.getChoices() == null || product.getChoices().isEmpty()) {\n\t\t\t\t// The product did not contain any choices any more, but the client sent some.\n\t\t\t\t// That can only mean the choice was removed from the product by the business and a checkin was added.\n\t\t\t\tthrow new DataConflictException(\"Conflict while placing order, refresh resource.\");\n\t\t\t}\n\t\t\t\n\t\t\tchoices = new ArrayList<OrderChoice>();\n\t\t\tMap<Key<Choice>, Choice> originalChoiceMap = choiceRepo.getByKeysAsMap(product.getChoices());\n\t\t\t\n\t\t\tfor (ChoiceDTO choiceDto : orderData.getChoices()) {\n\t\t\t\tint selected = 0;\n\t\t\t\t\n\t\t\t\tOrderChoice choice = new OrderChoice();\n\t\t\t\t\n\t\t\t\tChoice originalChoice = originalChoiceMap.get(Choice.getKey(business.getKey(), choiceDto.getOriginalChoiceId()));\n\t\t\t\tif(originalChoice == null)\n\t\t\t\t\tthrow new DataConflictException(\"Conflict while placing order, unknown originalChoiceId \" + choiceDto.getOriginalChoiceId() + \". Reload product resource.\");\n\t\t\t\t\n\t\t\t\tif(choiceDto.getOptions() != null ) {\n\t\t\t\t\tselected = checkOptions(choiceDto, originalChoice);\n\t\t\t\t\t\n\t\t\t\t\toriginalChoice.setOptions(new ArrayList<ProductOption>(choiceDto.getOptions()));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tchoice.setChoice(originalChoice);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tchoices.add(choice);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\n\t\tKey<Order> orderKey = createAndSaveOrder(business.getKey(), checkIn.getKey(), product, orderData.getAmount(), choices, orderData.getComment());\n\t\tif(orderKey != null) {\n\t\t\t// order successfully saved\n\t\t\torderId = orderKey.getId();\n\t\t}\n\t\t\n\t\teventBus.post(new CheckInActivityEvent(checkIn, true));\n\t\t\n\t\treturn orderId;\n\t}", "public void AddToFinalOrder(Order_Detail_Object order_detail_object) {\n\n g = (Globals) getApplication();\n // get product id of particular product from product hashmap\n String ProductId = g.getProductsHashMap().get(order_detail_object.getItem()).getID();\n if(addToCart_flag) {\n // check condition that contains ProductId\n if (g.getFinal_order().containsKey(ProductId)) {\n\n // get quantity from g.getFinal_order() into int variable\n int qty = Integer.parseInt(g.getFinal_order().get(ProductId).getQuantity());\n // increment qty\n qty = qty + 1;\n // set quantity into final_order of hashmap\n g.getFinal_order().get(ProductId).setQuantity(String.valueOf(qty));\n } else {\n // put id and order_detail_object from globals\n g.getFinal_order().put(ProductId, order_detail_object);\n }\n } else{\n product_ids_for_list.add(ProductId);\n }\n }", "@Test\n\tpublic void testAddProductToCart() {\n\t\tdouble startBalance = cart.getBalance();\n\t\tassertEquals(0,startBalance,0.01);\n\t\t\n\t\t\n\t\t\t // 4. CHECK NUM ITEMS IN CART BEFORE ADDING PRODUCT\n\t\t\t // \t\t - PREV NUM ITEMS\n\t\t\n\t\tint StartingNumItems = cart.getItemCount();\n\t\tassertEquals(0,StartingNumItems);\n\t\t\n\t\t\t // 5. ADD THE PRODUCT TO THE CART \n\t\tcart.addItem(phone);\n\t\t\n\t\t\t // 6. CHECK THE UPDATED NUMBER OF ITEMS IN CART \n\t\t\t // \t\t-- EO: NUM ITEMS + 1\n\t\tassertEquals(StartingNumItems + 1, cart.getItemCount());\n\t\t\t // -----------------------\n\t\t\t // 7. CHECK THE UPDATED BALANCE OF THE CART\n\t\t\t // \t\t-- EO: PREVIOUS BALANCE + PRICE OF PRODUCT\n\t\t\n\t\tdouble expectedBalance = startBalance + phone.getPrice();\n\t\t\n\t\tassertEquals(expectedBalance,cart.getBalance(),0.01);\n\t\t\n\t\t\n\t\t\n\t}", "private void checkout() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter your Name :\");\n\t\t\tscan.nextLine();\n\t\t\tCartController.getInstance().generateBill(scan.nextLine());\n\t\t} else {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"\\n--------------No Product Available in Cart for Checkout-----------------\\n\");\n\t\t}\n\t}", "void order() {\n\n\t\tSystem.out.println(\"In Zomato order method\");\n\t\tclass Hotels {\n\t\t\tString name;\n\t\t\tHotels(String name ) {\n\t\t\t\tthis.name = name;\n\t\t\t}\n\n\t\t\tvoid orderPlaced() {\n\t\t\t\tSystem.out.println(\"Order placd at hotel \"+ name);\n\t\t\t}\n\t\t}\n\t}", "@Then(\"Order is placed successfully confirmed by screenshot\")\r\n public void successfulOrder() throws InterruptedException {\n ProductPage prodPage = new ProductPage(driver);\r\n prodPage.goToCartAfterProductAdding();\r\n //Finishing an order form cart\r\n CartAndOrderProcess cartAndOrderProcess = new CartAndOrderProcess(driver);\r\n cartAndOrderProcess.proceedToChekout();\r\n cartAndOrderProcess.addressContinue();\r\n cartAndOrderProcess.shippingContinue();\r\n cartAndOrderProcess.payByCheckAndOrder();\r\n // Taking screenshot of successfully placed order\r\n // Also checking order history to make sure that amount is the same in order history\r\n cartAndOrderProcess.takeScreenshot(driver);\r\n cartAndOrderProcess.checkOfTotalCostAndPaymentStatus();\r\n }", "public void addToOrder()\n {\n\n if ( donutTypeComboBox.getSelectionModel().isEmpty() || flavorComboBox.getSelectionModel().isEmpty() )\n {\n Popup.DisplayError(\"Must select donut type AND donut flavor.\");\n return;\n } else\n {\n int quantity = Integer.parseInt(quantityTextField.getText());\n if ( quantity == 0 )\n {\n Popup.DisplayError(\"Quantity must be greater than 0.\");\n return;\n } else\n {\n for ( int i = 0; i < quantity; i++ )\n {\n Donut donut = new Donut(donutTypeComboBox.getSelectionModel().getSelectedIndex(), flavorComboBox.getSelectionModel().getSelectedIndex());\n mainMenuController.getCurrentOrder().add(donut);\n }\n if ( quantity == 1 )\n {\n Popup.Display(\"Donuts\", \"Donut has been added to the current order.\");\n } else\n {\n Popup.Display(\"Donuts\", \"Donuts have been added to the current order.\");\n }\n\n\n donutTypeComboBox.getSelectionModel().clearSelection();\n flavorComboBox.getSelectionModel().clearSelection();\n quantityTextField.setText(\"0\");\n subtotalTextField.setText(\"$0.00\");\n }\n }\n\n\n }", "@Override\n\tpublic void placeOrder(Map<String, Integer> orderDetails, Buyer buyer) {\n\t\tif (successor != null) {\n\t\t\tsuccessor.placeOrder(orderDetails, buyer);\n\t\t} else {\n\t\t\tSystem.out.println(\"Did not set successor of SupplierProxy\");\n\t\t}\n\t\t\n\t}", "public void startOrder() {\r\n this.o= new Order();\r\n }", "public void clickOnAddToCartButton()\n \t{\n \t\tproductRequirementsPageLocators.clickAddToCartButton.click();\n\n \t}", "@Override\n\tpublic void addOrder(Order order) {\n\t\t\n\t em.getTransaction().begin();\n\t\t\tem.persist(order);\n\t\t\tem.getTransaction().commit();\n\t\t\tem.close();\n\t\t\temf.close();\n\t \n\t}", "@GetMapping(\"/placeOrder\")\n public String placeOrder(HttpServletRequest request, Model model){\n Map<String, String[]> requestParam = request.getParameterMap();\n String customerName[] = requestParam.get(\"customerName\");\n String orderQuantity[] = requestParam.get(\"orderQty\");\n String productTypes[] = requestParam.get(\"productType\");\n OrderDetails orderDetails = new OrderDetails();\n orderDetails.setCustomerName(customerName[0]);\n orderDetails.setOrderQty(orderQuantity[0]);\n orderDetails.setOrderProduct(productTypes[0]);\n String orderConfirmation = sportyShoesService.saveCustomerOrder(orderDetails);\n\n model.addAttribute(\"appName\", appName);\n model.addAttribute(\"orderConfirmation\", orderConfirmation);\n\n return \"orderPlaceSuccess\";\n }", "@Override\n\tpublic void execute(final CheckoutActionContext context) throws EpSystemException {\n\t\tcheckoutEventHandler.preCheckoutOrderPersist(context.getShoppingCart(),\n\t\t\t\tcontext.getOrderPaymentList(), context.getOrder());\n\n\t\t//process and update order - should limit our updates to once\n\t\tfinal Order updatedOrder = orderService.processOrderOnCheckout(context.getOrder(),\n\t\t\t\tcontext.getShoppingCart().isExchangeOrderShoppingCart());\n\t\tcontext.setOrder(updatedOrder);\n\t\tcontext.setOrderPaymentList(updatedOrder.getOrderPayments());\n\t}", "@Override\n public void onAddToCart(Product product) {\n }", "Cart addToCart(String productCode, Long quantity, String userId);", "private void startGoToCartAct() {\n Intent intent = new Intent(this, EcomCartActivity.class);\n startActivity(intent);\n }", "public void addChildToShoppingCart() {\n System.out.println(this.offerTable.getSelectionModel().getSelectedItem());\n // TODO [assignment_final] pridani aktualniho vyberu do kosiku\n // - pri pridani prvku do kosiku aktualizuji hodnotu \"budgetu\" v UI\n }", "@Override\n public void onClick(View view) {\n String location = \"\";\n boolean met = false;\n if(method == 0){\n location = spTableChoice.getSelectedItem().toString();\n met = true;\n }else if(method == 1 && !etPickupName.getText().toString().isEmpty()){\n met = true;\n location = etPickupName.getText().toString();\n }else{\n Toast.makeText(getApplicationContext(), \"Please enter a pickup name!\", Toast.LENGTH_SHORT).show();\n }\n\n if(met){\n // Finalise the order as an order object\n order.setDestination(location);\n order.setOrderItems(orderHeld);\n order.setTotalPrice(totalPrice);\n\n addOrderDB();\n Toast.makeText(getApplicationContext(), \"Placed!\", Toast.LENGTH_SHORT).show();\n\n // Move to payment now\n //PayPalPay(totalPrice);\n }\n\n }", "private void takeOrder(MyCustomer customer) {\n\tDo(\"Taking \" + customer.cmr +\"'s order.\");\n\tPosition tablePos = new Position(tables[customer.tableNum].getX()-1,\n\t\t\t\t\t tables[customer.tableNum].getY()+1);\n\tguiMoveFromCurrentPostionTo(tablePos);\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcustomer.cmr.msgWhatWouldYouLike();\n\tstateChanged();\n }", "public void submitOrder(View view) {\n\n displayQuantity(myQuantity);\n int total = calculatePrice(myPrice,myQuantity);\n String orderMessage = displayOrder(total);\n Context context = getApplicationContext();\n Toast myToast = Toast.makeText(context,\"Thanks:\" + myName,Toast.LENGTH_SHORT);\n myToast.show();\n // intent to maps\n //Intent myIntent = new Intent(Intent.ACTION_VIEW);\n //myIntent.setData(Uri.parse(\"geo:47.6, -122.3\"));\n Intent myIntent = new Intent(Intent.ACTION_SENDTO);\n myIntent.setData(Uri.parse(\"mailto:\"));\n myIntent.putExtra(Intent.EXTRA_EMAIL, \"[email protected]\");\n myIntent.putExtra(Intent.EXTRA_SUBJECT,\"Java Order\");\n myIntent.putExtra(Intent.EXTRA_TEXT,orderMessage);\n if(myIntent.resolveActivity(getPackageManager())!= null) {startActivity(myIntent);}\n\n }", "static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }", "public void saveOrder(Order order) {\n Client client = clientService.findBySecurityNumber(order.getClient().getSecurityNumber());\n Product product = productService.findByBarcode(order.getProduct().getBarcode());\n order.setClient(client);\n order.setProduct(product);\n if (isClientPresent(order) && isProductPresent(order)) {\n do {\n currencies = parseCurrencies();\n } while (currencies.isEmpty());\n\n generateTransactionDate(order);\n\n// Client client = ClientServiceImpl.getClientRepresentationMap().get(order.getClient());\n// Product product = ProductServiceImpl.getProductRepresentationMap().get(order.getProduct());\n convertPrice(order);\n orders.add(order);\n orderedClients.add(client);\n orderedProducts.add(product);\n }\n }", "public CartOrder updateOrder(CartOrder order) throws Exception;", "public void addOrderLineToOrderInSession(CartItem item, HttpServletRequest request) {\n\t\tShoppingCart cart = (ShoppingCart) request.getSession().getAttribute(\"shoppingCart\");\n\t\tcart.getOrderLines().add(item);\n\t}", "public void saveOrder() {\n setVisibility();\n Order order = checkInputFromUser();\n if (order == null){return;}\n if(orderToLoad != null) DBSOperations.remove(connection,orderToLoad);\n DBSOperations.add(connection, order);\n }", "public void payForOrder(){\n\t\tcurrentOrder.setDate(new Date()); // setting date to current\n\t\t\n\t\t//Checking if tendered money is enough to pay for the order.\n\t\tfor(;;){\n\t\t\tJOptionPane.showMessageDialog(this.getParent(), new CheckoutPanel(currentOrder), \"\", JOptionPane.PLAIN_MESSAGE);\n\t\t\tif(currentOrder.getTendered().compareTo(currentOrder.getSubtotal())==-1){\n\t\t\t\tJOptionPane.showMessageDialog(this.getParent(), \"Not enough money tendered\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//Setting order number.\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tString str = df.format(currentOrder.getDate());\n\t\tString number = Integer.toString(till.getOrders().size()+1) +\"/\"+str;\n\t\tcurrentOrder.setNumber(number);\n\t\t\n\t\t//Setting customer name.\n\t\tcurrentOrder.setCustomerName(custNameField.getText());\n\t\t\n\t\t//Adding current order to orders list.\n\t\ttill.getOrders().add(currentOrder); \n\t\t\n\t\t//Displays the receipt.\n\t\tJOptionPane.showMessageDialog(this.getParent(), new ReceiptPanel(currentOrder), \"Receipt\", \n\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\n\t\t//Resets OrderPanel.\n\t\tthis.resetOrder();\n\t}", "@Then(\"the product is added to my cart\")\n\t\tpublic void the_product_is_added_to_my_cart() throws Exception {\n\n\t\t\t//Waits for the cart page to load\n\t\t\tdriver.manage().timeouts().implicitlyWait(120, TimeUnit.SECONDS);\n\t\t\tcartElement = driver.findElement(By.xpath(itemSacola)).getText();\n\t\t\t\n\t\t\t//Verify that the product on the shopping cart is the correct one\n\t\t\tAssert.assertEquals(cartElement, TituloFinal);\n\n\t\t\t// Take snapshot as evidence\n\t\t\tFunctions.takeSnapShot(driver, null);\n\t\t}", "public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n AddingToCartList();\n }", "public void myorders() {\r\n\t\t\tdriver.findElement(orders).click();\r\n\t\t\t\r\n\t\t\t}", "@Before\n\tpublic void setup() {\n\t\torder = new Order();\n\t\torder.setOrderdate(java.util.Calendar.getInstance().getTime());\n\t\torder.setTotalPrice(Double.valueOf(\"1500.99\"));\n\t\t\n\t\tshoppingCartdetails = new ShoppingCartDetails();\n\t\tshoppingCartdetails.setProductId(12345);\n\t\tshoppingCartdetails.setPrice(Double.valueOf(\"153.50\"));\n\t\tshoppingCartdetails.setQuantity(3);\n\t\tshoppingCartdetails.setShoppingCart(shoppingCart);\n\t\t\n\t\tshoppingCartSet.add(shoppingCartdetails);\n\t\t\n\t\tshoppingCartdetails = new ShoppingCartDetails();\n\t\tshoppingCartdetails.setProductId(45738);\n\t\tshoppingCartdetails.setPrice(Double.valueOf(\"553.01\"));\n\t\tshoppingCartdetails.setQuantity(1);\n\t\tshoppingCartdetails.setShoppingCart(shoppingCart);\n\t\t\n\t\tshoppingCartSet.add(shoppingCartdetails);\n\t}", "Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);", "@Override\n public void onClick(View v)\n {\n Card.addtoCard(new CardItem(content.get(position).getName(),\n content.get(position).getDescription(),\n content.get(position).getPrice(),(long) 1,\"None\",\n content.get(position).getPrice()));\n Toast.makeText(RecycleViewAdapter.this.mContext,\"Added to Cart\",Toast.LENGTH_LONG).show();\n }", "@Override\n public TicketDTO buyCart() throws InvalidQuantityException, IOException, ProductNotFoundException {\n\n return catalogueRepository.buyCart();\n }", "public void EditOrderTest() {\n wait.until(ExpectedConditions.visibilityOfElementLocated(editOrderQuantityLocator));\n WebElement editOrderQuantity = driver.findElement(editOrderQuantityLocator);\n editOrderQuantity.click();\n // Click on the checkout button\n By goToCheckOutBtnLocator = By.xpath(\"//div[@class='Basket-bf28b64c20927ec7']//button[contains(@class,'ccl-d0484b0360a2b432')]\");\n wait.until(ExpectedConditions.visibilityOfElementLocated(goToCheckOutBtnLocator));\n WebElement goToCheckOutBtn = driver.findElement(goToCheckOutBtnLocator);\n goToCheckOutBtn.click();\n // Check that the order added to the basket\n By basketSectionSummaryLocator = By.className(\"ccl-9aab795066526b4d ccl-24c197eb36c1c3d3\");\n wait.until(ExpectedConditions.visibilityOfElementLocated(basketSectionSummaryLocator));\n\n }", "void createOrder(List<Product> products, Customer customer);", "public void submitOrder(View view) {\n\n String order = gatherOrder(view);\n\n Uri uri = Uri.parse(\"mailto:\" + \"[email protected]\")\n .buildUpon()\n .appendQueryParameter(\"to\", \"[email protected]\")\n .appendQueryParameter(\"subject\", \"Your pizza order\")\n .appendQueryParameter(\"body\", order)\n .build();\n\n sendEmail(uri, \"Select Email\");\n }", "public void addDinnerToCart (View view) {\n Utility.showMyToast(\"I will add the dinner \" +\n thisDinner + \"to the cart\", this);\n\n // Also send an Analytics hit\n sendAddToCartHit();\n\n // Show the start checkout button\n Button button = (Button) findViewById(R.id.start_checkout_btn);\n button.setVisibility(View.VISIBLE);\n\n // Hide this add to cart button\n button = (Button) findViewById(R.id.add_to_cart_btn);\n button.setVisibility(View.INVISIBLE);\n }", "public static Future<IOrder> placeOrder(OrderTicket ticket) \r\n\t{\t\t\r\n\t\tOrderTask task = INSTANCE.new OrderTask(ticket);\r\n\t\treturn JForexContext.getContext().executeTask(task);\t\r\n\t}", "@Transactional\n public OrderEntity placeOrder(OrderEntity order) {\n order.setStatus(\"draft\");\n return em.merge(order);\n }", "public static Order buildCart(Cart cart) {\n\n cart.getAddress().saveInBackground();\n\n final Order order = new Order();\n order.setSchedule(cart.getSchedule());\n order.setAddress(cart.getAddress());\n order.setPickUp(cart.getPickup());\n order.setEvent(cart.getEvent());\n order.setProductGroup(cart.getProducts());\n try {\n order.save();\n System.out.println(order.getObjectId());\n } catch (ParseException e) {\n Log.e(Order.DEFAULT_PIN, \"CartHelper unable to save Order \", e);\n }\n for (Promotion promotion : cart.promotions) {\n promotion.promotionUtilized();\n if (promotion instanceof InvitationPromotion) {\n cart.getUser().setNewUserPromotionUsed();\n }\n }\n\n\n for (ProductPriceRow productPriceRow : cart.productPrice) {\n\n addVendorPayment(productPriceRow.getProduct().getGyftyProduct(), order.getObjectId(), productPriceRow);\n addVendorNotes(productPriceRow.getProduct(), order);\n\n }\n\n/* try {\n cart.delete();\n } catch (ParseException e) {\n Log.e(\"CartHelper\", \"CartHelper unable to delete cart\", e);\n }*/\n return order;\n\n }", "public void adding() {\n\t\t By cr=By.xpath(\"//a[@href=\\\"/cart?add&itemId=EST-2\\\"]\"); \r\n\t\tWebElement we_cr=wt.ElementToBeClickable(cr, 20);\r\n\t\twe_cr.click();\r\n\t}", "void newOrder();", "public void place(Position position) { this.position = position; }", "public void addToOrder() {\n OrderLine orderLine = new OrderLine(order.lineNumber++, sandwhich, sandwhich.price());\n order.add(orderLine);\n ObservableList<Extra> selected = extraSelected.getItems();\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 pickSandwhich();\n\n\n\n }", "@Override\r\n\tpublic void PassOrder(Order order) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tem.persist(order);\r\n\t\t\r\n\t}", "private void putToTop()\r\n {\r\n OrderManager manager = myOrderManagerRegistry.getOrderManager(ourKey);\r\n manager.activateParticipant(ourKey);\r\n manager.moveToTop(ourKey);\r\n }", "@Override\n public void run() {\n OrderBook.getInstance().addOfferMarketQuote(order);\n }", "private void cart() {\n\t\tboolean back = false;\n\t\twhile (!back) {\n\t\t\tSystem.out.println(\"1.Display Cart\");\n\t\t\tSystem.out.println(\"2.Remove Product From Cart\");\n\t\t\tSystem.out.println(\"3.Edit Product in Cart\");\n\t\t\tSystem.out.println(\"4.Checkout\");\n\t\t\tSystem.out.println(\"5.Back\");\n\t\t\tSystem.out.println(\"Enter Your Choice:-\");\n\t\t\tchoice = getValidInteger(\"Enter Your Choice :-\");\n\t\t\tswitch (choice) {\n\t\t\tcase 1:\n\t\t\t\tCartController.getInstance().displayCart();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tremoveProduct();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\teditProduct();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tcheckout();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tback = true;\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tSystem.out.println(\"Enter Correct Choice :-\");\n\t\t\t}\n\t\t}\n\t}", "public void createOrderItem() {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tRestaurantApp.globalMenuManager.printMenu(); //create a globalmenuManager so that other classes can access the menu\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Which item would you like to order?\");\r\n\t\t\tint menuIndex = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tif (menuIndex <= 0 || menuIndex > RestaurantApp.globalMenuManager.getSizeOfMenu()){\r\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Please input a valid index from 1 to \"+RestaurantApp.globalMenuManager.getSizeOfMenu());\r\n\t\t\t}\r\n\t\t\tthis.menuItem = RestaurantApp.globalMenuManager.getMenuItem(menuIndex-1);\r\n\t\t\tSystem.out.println(\"How many of this are you ordering?\");\r\n\t\t\tthis.quantity = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tSystem.out.println(\"Order item added. printing details...\");\r\n\t\t\tthis.printOrderItem();\r\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\r\n\t\t\tSystem.out.println(e.getMessage()); \r\n\t\t\tSystem.out.println(\"program exiting ...\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "private void addProductToCart(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String productID = request.getParameter(\"ProductID\");\n\n HttpSession session = request.getSession();\n\n List<Product> cartProducts = (List<Product>) session.getAttribute(\"cartProducts\");\n\n if (productID != null) {\n\n int id = Integer.parseInt(productID);\n\n if (cartProducts != null) {\n\n if (getCartSize(cartProducts) < Constants.CART_LIMIT) {\n\n if (!productIsAlreadyInCart(id, cartProducts))\n cartProducts.add(productDAO.getProduct(id));\n else\n increaseProductCountInCart(id, cartProducts);\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n response.sendRedirect(Constants.PATH_CATALOG);\n } else\n response.getWriter().write(notifyCartIsFull());\n\n } else {\n cartProducts = new ArrayList<>();\n cartProducts.add(productDAO.getProduct(Integer.parseInt(productID)));\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n session.setAttribute(\"cartProducts\", cartProducts);\n response.sendRedirect(Constants.PATH_CATALOG);\n }\n }\n }", "@Test\n\tpublic void addProductToCartAndEmailIt() {\n\t}", "@When(\"^user is on My Store click on T-Shirts Menu and Order a T-Shirt$\")\r\n\tpublic void orderTShirt() throws Exception {\n\t new ProductCheckout(driver).clickTshirts();\r\n\t new ProductCheckout(driver).addTShirtToCart();\r\n\t}", "public void addItemsToCart() throws InterruptedException {\n\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver; // using JavascriptExecutor class to scroll down to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// page\n\t\tWebElement TopDeals = driver.findElement(By.xpath(\"/html/body/div[4]/div/div/div[3]/div/h1/span\")); // TopDeals\n\t\t// To avoid staleElementException\n\t\tfor (int i = 0; i <= 2; i++) {\n\t\t\ttry {\n\t\t\t\tjs.executeScript(\"arguments[0].scrollIntoView();\", TopDeals); // scrolling till TopDeals element visible\n\t\t\t\tbreak;\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t}\n\t\t// Adding 1st element to the cart\n\t\tWebElement crownbrocli = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-26487-homepage-collection\\\"]\"));\n\t\tcrownbrocli.click();\n\n\t\tActions actions = new Actions(driver); // now use action class to move cursor to another element so that we can\n\t\t\t\t\t\t\t\t\t\t\t\t// add another element\n\t\t // Adding 2nd Element to the cart\n\t\tWebElement apples = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-25982-homepage-collection\\\"]\"));\n\t\tactions.moveToElement(apples);\n\t\tapples.click();\n\n\t\t// Adding 3rd element to the cart\n\t\tWebElement tomatoes = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-254884-homepage-collection\\\"]\"));\n\t\tactions.moveToElement(tomatoes).click(); // Adding 3rd element to the cart\n\n\n\t\t// Adding 4rd element to the cart\n\t\tWebElement salmonFillet= driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-select-item-weight-22454-homepage-collection\\\"]\"));\n\t\tactions.moveToElement(salmonFillet).click(); \n Select salmonWeight = new Select(salmonFillet); //to choose particular weight use Select Class\n\t\tsalmonWeight.selectByVisibleText(\"0.75 lbs\"); \n\n\t\t/*WebElement ChickenBreast = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-265709-homepage-collection\\\"]\"));\n//(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-265709-homepage-collection\\\"]\n\t\tactions.moveToElement(ChickenBreast).click(); // Adding 4th element to the cart\n*/\n\t}", "@When(\"user clicks on add to cart button\")\r\n\tpublic void user_clicks_on_add_to_cart_button() {\n\t\tdriver.findElement(By.xpath(\"/html/body/section/div/div/div[2]/div/div/div/div[2]/center/a\")).click();\r\n\t}", "public void onClickDelivery(View view) {\n savePreferences();\n Intent intent = new Intent(this, ActDelivery.class);\n\n // Passing order information using Intent.putString();\n intent.putExtra(\"items\", new String[]{(String) spEntree.getSelectedItem(),\n (String) spDrink.getSelectedItem(), (String) spDessert.getSelectedItem()});\n intent.putExtra(\"subtotal\", subtotal);\n\n startActivity(intent);\n }" ]
[ "0.7668923", "0.74642473", "0.6984423", "0.6792965", "0.67289156", "0.6695371", "0.6675998", "0.6635571", "0.6625487", "0.66122377", "0.65631396", "0.65364176", "0.6527442", "0.6517904", "0.6369132", "0.63634694", "0.6361355", "0.6346567", "0.62973094", "0.627734", "0.6262297", "0.6244665", "0.62178856", "0.62068045", "0.62026733", "0.61790895", "0.61615735", "0.6147853", "0.6142224", "0.61300206", "0.61248136", "0.6119295", "0.6096793", "0.608937", "0.60857445", "0.607859", "0.60737634", "0.60432595", "0.6042398", "0.6041776", "0.60280496", "0.6023664", "0.6012415", "0.60024905", "0.5976967", "0.59768623", "0.5975164", "0.59726083", "0.5971105", "0.59629166", "0.59553933", "0.59373254", "0.59154606", "0.5911093", "0.59064996", "0.5892282", "0.58918446", "0.58831036", "0.58831024", "0.586604", "0.58411694", "0.58363104", "0.5821513", "0.5821054", "0.5814016", "0.5808414", "0.5808253", "0.58013934", "0.57972866", "0.579389", "0.579261", "0.5790582", "0.5785226", "0.5781352", "0.5778052", "0.57707906", "0.5768394", "0.57651913", "0.5764353", "0.5762801", "0.5759334", "0.57561606", "0.57445234", "0.57433355", "0.5739978", "0.57391864", "0.5737141", "0.5726683", "0.5721788", "0.5718436", "0.57123107", "0.57087606", "0.56959814", "0.5694186", "0.5691372", "0.5689748", "0.56891584", "0.56815135", "0.5678886", "0.5677918" ]
0.66103446
10
Add an item to your cart
@PostMapping(value = "/addcart") public ResponseEntity<String> addCart(@RequestBody @Valid OrderProduct orderProduct, final HttpSession session) throws Exception { //Get the initial cart log.info(session.getId() + " : Reviewing the initial cart"); Map<String, CartProduct> initialCart = (Map<String, CartProduct>) session.getAttribute(CART_SESSION_CONSTANT); Integer quantity = orderProduct.getQuantity(); //Check if cart is empty and instantiate it, if product is already there in the cart, update them if (CollectionUtils.isEmpty(initialCart)) { log.info("No Items added yet"); initialCart = new HashMap<>(); } else { if (initialCart.containsKey(orderProduct.getProductName())) quantity = quantity + initialCart.get(orderProduct.getProductName()).getQuantity(); } //check if the store has the available quantity and update the cart log.info(session.getId() + " : Processing the addition of product to the cart"); Product product = prodService.getProd(orderProduct.getProductName()); if (product.getQuantity() >= quantity) { CartProduct cartProduct = ControllerUtils.buildCartProduct(product, quantity); initialCart.put(orderProduct.getProductName(), cartProduct); session.setAttribute(CART_SESSION_CONSTANT, initialCart); return ResponseEntity.status(HttpStatus.OK).body("Product " + orderProduct.getProductName() + " added to the cart"); } else { log.error(session.getId() + " : Error updating cart for products unavailable"); throw new AvailabilityException(orderProduct.getProductName()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "Cart addToCart(String productCode, Long quantity, String userId);", "public static void addItem(int id,int quantity){\n\t\tif(userCart.containsKey(id)){\n\t\t\tint newQuantity = userCart.get(id).getQuantity() + quantity;\n\t\t\tuserCart.get(id).setQuantity(newQuantity);\n\t\t\tSystem.out.println(CartMessage.ALREADY_ADDED + newQuantity);\n\t\t}\n\t\telse{\n\t\t\tproducts.get(id).setQuantity(quantity);\n\t\t\tuserCart.put(id,products.get(id));\n\t\t\tSystem.out.println(CartMessage.ITEM_ADDED);\n\t\t}\n\t}", "public void addItemToCart(Item item) {\n itemList.add(item);\n this.totalTaxes = totalTaxes.add(item.getTaxes());\n this.totalPrices = totalPrices.add(item.getTtcPrice());\n }", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "@Override\n public void addCart(Items cartItem) {\n cartItem.setItemQuantity(cartItem.getItemQuantity() + 1);\n Items menuItem = cartItem.getItemOriginalReference();\n menuItem.setItemQuantity(menuItem.getItemQuantity() + 1);\n updateCartMenu();\n }", "public void addItem(Carryable g) {\r\n if (numItems < MAX_CART_ITEMS)\r\n cart[numItems++] = g;\r\n }", "public void addToShoppingCart(BarcodedItem item, int quantity) {\n\t\t\n\t\tBarcodedProduct prod = ProductDatabases.BARCODED_PRODUCT_DATABASE.get(item.getBarcode());\n\t\ttry {\n\t\t\t\n\t\t\tSHOPPING_CART_ARRAY[i][0] = prod.getDescription();\n\t\t\tSHOPPING_CART_ARRAY[i][1] = Integer.toString(quantity);\n\t\t\tBARCODEDITEM_ARRAY[i] = item;\n\t\t\tBARCODE_ARRAY[i] = prod.getBarcode();\n\t\t\tupdateTotalPayment(item, quantity);\n\t\t\t\n\t\t\ttotalNumOfItems += quantity;\n\t\t\t\n\t\t} catch (NullPointerException e) {\n\t\t\tthrow new SimulationException(e);\n\t\t}\n\t\t\n\t\ti++;\n\n\t}", "public void addToSale(ItemDTO item, int quantity){\n this.saleInfo.addItem(item, quantity);\n }", "public void addItemInCart(Item anItem, Integer aQuantity,boolean fromServer){\n if(!fromServer){\n postItemOnServer(new Pair<Item, Integer>(anItem,aQuantity));\n }\n boolean alreadyInCart = false;\n for(Pair<Item,Integer> itemInCart : itemsInCart){\n if(itemInCart.first.getId()== anItem.getId()){\n alreadyInCart = true;\n }\n }\n if(alreadyInCart){\n updateItemInCart(anItem,aQuantity,fromServer);\n }\n else{\n itemsInCart.add(Pair.create(anItem, aQuantity));\n }\n }", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "public synchronized void addItem(Product product){\n \n ShoppingCartItem item = carrito.get(product.getId());\n int new_quantity;\n \n if(item==null){\n carrito.set(product.getId(), new ShoppingCartItem(product));\n new_quantity = 1;\n }else{\n new_quantity = item.getQuantity()+1;\n }\n //even if it's added or not, we call update method to update the quantity of the product\n this.update(product,Integer.toString(new_quantity));\n }", "void add(Item item);", "public static void addToCart() {\n List<WebElement> buttonsAddItem = Browser.driver.findElements(ADD_TO_CART_BUTTON);\n buttonsAddItem.get(0).click();\n Browser.driver.navigate().refresh();\n }", "public Item add(Item item) {\n Item existing = getItem(item.getItemId());\n if (existing != null) {\n return existing.incrementQuantity(item.getQuantity());\n }\n else {\n items.add(item.setCart(this));\n return item;\n }\n }", "public void addToCart(String userId ,ShoppingCartItem item) {\n\t\t PersistenceManager pm = PMF.get().getPersistenceManager();\r\n\t\t Transaction tx = pm.currentTransaction();\r\n\t\t try{\r\n\t\t\ttx.begin();\r\n\t\t\tShoppingCart cartdb = (ShoppingCart)pm.getObjectById(ShoppingCart.class, userId);\r\n\t\t\tcartdb.addItem(item);\r\n\t\t\ttx.commit();\r\n\r\n\t\t }\r\n\t\t catch (JDOCanRetryException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\tlogger.warning(\"Error updating cart \"+ item);\r\n\t\t\t\tthrow ex;\r\n\t\t\t}\r\n\t\t\tcatch(JDOFatalException fx){\r\n\t\t\tlogger.severe(\"Error updating cart :\"+ item);\r\n\t\t\tthrow fx;\r\n\t\t\t}\r\n\t\t finally{\r\n\t\t\t if (tx.isActive()){\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t }\r\n\t\t\t pm.close();\r\n\t\t }\r\n\t}", "public void adding() {\n\t\t By cr=By.xpath(\"//a[@href=\\\"/cart?add&itemId=EST-2\\\"]\"); \r\n\t\tWebElement we_cr=wt.ElementToBeClickable(cr, 20);\r\n\t\twe_cr.click();\r\n\t}", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}", "void addToCart(String user, long id) throws MovieNotFoundException;", "private void addProductToCart(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String productID = request.getParameter(\"ProductID\");\n\n HttpSession session = request.getSession();\n\n List<Product> cartProducts = (List<Product>) session.getAttribute(\"cartProducts\");\n\n if (productID != null) {\n\n int id = Integer.parseInt(productID);\n\n if (cartProducts != null) {\n\n if (getCartSize(cartProducts) < Constants.CART_LIMIT) {\n\n if (!productIsAlreadyInCart(id, cartProducts))\n cartProducts.add(productDAO.getProduct(id));\n else\n increaseProductCountInCart(id, cartProducts);\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n response.sendRedirect(Constants.PATH_CATALOG);\n } else\n response.getWriter().write(notifyCartIsFull());\n\n } else {\n cartProducts = new ArrayList<>();\n cartProducts.add(productDAO.getProduct(Integer.parseInt(productID)));\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n session.setAttribute(\"cartProducts\", cartProducts);\n response.sendRedirect(Constants.PATH_CATALOG);\n }\n }\n }", "public void addItemToSale(String productId, int quantity) {\r\n if (productId.isEmpty()) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id is missing - enter valid product id\");\r\n System.exit(1);\r\n }\r\n if (quantity <= 0) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"quantity is less than or equal to 0 - enter valid quantity\");\r\n System.exit(1);\r\n }\r\n FakeDatabase db = new FakeDatabase();\r\n Product product = db.findProduct(productId);\r\n\r\n if (product != null) { //product found in database\r\n receipt.addLineItem(product, quantity);\r\n } else {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id not found in database - enter valid product id\");\r\n System.exit(1);\r\n }\r\n }", "@Override\n\tpublic void addProductToCart(ShoppingCartItem cart_items) {\n\t\tthis.shoppingCartList.add(cart_items);\n\t}", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "@Override\n public void onClick(View v)\n {\n Card.addtoCard(new CardItem(content.get(position).getName(),\n content.get(position).getDescription(),\n content.get(position).getPrice(),(long) 1,\"None\",\n content.get(position).getPrice()));\n Toast.makeText(RecycleViewAdapter.this.mContext,\"Added to Cart\",Toast.LENGTH_LONG).show();\n }", "@POST(\"V1/carts/mine/items\")\n Observable<CartProductItem> addItemToCart(@Body CartItemRequest CartItemRequest);", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "public static String handleAddToCart(Request req, Response res) {\n\n int quantity = Integer.parseInt(req.queryParams(\"quantity\"));\n int productId = Integer.parseInt(req.queryParams(\"product_id\"));\n int userId = req.session().attribute(\"user_id\");\n\n Order order = DaoFactory.getOrderDao().findOpenByUserId(userId);\n if (order == null) {\n order = DaoFactory.getOrderDao().createNewOrder(userId);\n }\n\n Product product = DaoFactory.getProductDao().find(productId);\n if (product == null || quantity < 1 || quantity > 99) {\n return \"invalid_params\";\n }\n\n LineItem lineItemToAdd = DaoFactory.getOrderDao().findLineItemInCart(productId, order);\n if (lineItemToAdd == null) {\n\n lineItemToAdd = new LineItem(\n order.getId(),\n productId,\n product.getName(),\n product.getImageFileName(),\n quantity,\n product.getDefaultPrice(),\n product.getDefaultCurrency()\n );\n\n DaoFactory.getOrderDao().addLineItemToCart(lineItemToAdd, order);\n return \"new_item\";\n }\n\n DaoFactory.getOrderDao().increaseLineItemQuantity(order, lineItemToAdd, quantity);\n return \"quantity_change\";\n }", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "CatalogItem addCatalogItem(CatalogItem catalogItem);", "public void addToShoppingCart(PLUCodedItem pluCodedItem, int quantity) {\n\t\tPLUCodedProduct pluProd = ProductDatabases.PLU_PRODUCT_DATABASE.get(pluCodedItem.getPLUCode());\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tSHOPPING_CART_ARRAY[i][0] = pluProd.getDescription();\n\t\t\tSHOPPING_CART_ARRAY[i][1] = Integer.toString(quantity);\n\t\t\tPLUCODEDITEM_ARRAY[i] = pluCodedItem;\n\t\t\tupdateTotalPayment(pluCodedItem, quantity);\n\t\t\t\n\t\t\ttotalNumOfItems += quantity;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new SimulationException(e);\n\t\t}\n\t\t\n\t\ti++;\n\t}", "public void onClick(View v)\n {\n // Add to cart model\n for (int i = 0; i < productQuantity; i++)\n {\n dbManager.addToCart(activeProduct.getID());\n }\n }", "public void add(CartItem cartItem){\n\t\tString book_id = cartItem.getBook().getBook_id();\n\t\tint count = cartItem.getCount();\n\t\t// if book exist in cart , change count\n\t\tif(map.containsKey(book_id)){ \n\t\t\tmap.get(book_id).setCount( map.get(book_id).getCount() + count); \n\t\t\t\t\t\n\t\t}else{\n\t\t\t// book not exist in cart, put it to map\n\t\t\tmap.put(cartItem.getBook().getBook_id(), cartItem);\n\t\t}\n\t\t\n\t}", "public void adicionar(ItemProduto item) {\n\t\titens.add(item);\n\t}", "@When(\"^: Add them to the cart$\")\r\n\tpublic void add_them_to_the_cart() throws Throwable {\n\t\tobj.search();\r\n\t}", "ResponseEntity<Cart> addCartItem(CartFormData formData);", "@Override\n public String addToCart(TicketDTO buy) throws InvalidQuantityException, ProductNotFoundException {\n\n return catalogueRepository.addToCart(buy);\n }", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testAddProductToCart() {\n\t\tdouble startBalance = cart.getBalance();\n\t\tassertEquals(0,startBalance,0.01);\n\t\t\n\t\t\n\t\t\t // 4. CHECK NUM ITEMS IN CART BEFORE ADDING PRODUCT\n\t\t\t // \t\t - PREV NUM ITEMS\n\t\t\n\t\tint StartingNumItems = cart.getItemCount();\n\t\tassertEquals(0,StartingNumItems);\n\t\t\n\t\t\t // 5. ADD THE PRODUCT TO THE CART \n\t\tcart.addItem(phone);\n\t\t\n\t\t\t // 6. CHECK THE UPDATED NUMBER OF ITEMS IN CART \n\t\t\t // \t\t-- EO: NUM ITEMS + 1\n\t\tassertEquals(StartingNumItems + 1, cart.getItemCount());\n\t\t\t // -----------------------\n\t\t\t // 7. CHECK THE UPDATED BALANCE OF THE CART\n\t\t\t // \t\t-- EO: PREVIOUS BALANCE + PRICE OF PRODUCT\n\t\t\n\t\tdouble expectedBalance = startBalance + phone.getPrice();\n\t\t\n\t\tassertEquals(expectedBalance,cart.getBalance(),0.01);\n\t\t\n\t\t\n\t\t\n\t}", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "public void addOrderLineToOrderInSession(CartItem item, HttpServletRequest request) {\n\t\tShoppingCart cart = (ShoppingCart) request.getSession().getAttribute(\"shoppingCart\");\n\t\tcart.getOrderLines().add(item);\n\t}", "public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }", "void addProduct(Product product);", "@PostMapping(\"/addToCart\")\n @PermissionStoreItemRead\n public String addToCart(@RequestParam long id,\n @RequestParam(required = false) int numberOfItems,\n HttpSession session,\n HttpServletRequest request,\n Model model,\n RedirectAttributes redirectAttributes,\n HttpServletRequest httpServletRequest) {\n String previousPage = PageUtilities.getPreviousPageByRequest(httpServletRequest).orElseThrow(() -> new RuntimeException(\"Previous page not found\"));\n ShoppingCart cart = (ShoppingCart) session.getAttribute(\"cart\");\n var item = itemService.findById(id).orElseThrow(() -> new RuntimeException(\"Item not found\"));\n if ( item.getStock() < numberOfItems ||\n item.getStock() < cart.getItemQuantity(item) + numberOfItems) {\n redirectAttributes.addFlashAttribute(\"error\", \"Not enough items\");\n return previousPage;\n //return \"redirect:/item/\" + id + \"/show\";\n }\n cart.addItem(item, numberOfItems);\n redirectAttributes.addFlashAttribute(\"success\", \"Item added to cart successfully\");\n log.debug(\"Total size of cart : \" + cart.numberOfItems());\n //return \"redirect:/item/\" + id + \"/show\";\n return previousPage;\n\n }", "public void addProduct(Product product);", "@RequestMapping(\"/addOrderItem\")\n public OrderItem addOrderItem(@RequestParam(\"order_id\")int order_id,\n @RequestParam(\"cart_id\")int cart_id){\n System.out.println(\"addOrderItem\");\n System.out.println(\"cart_id = \" + cart_id);\n return orderService.addOrderItem(order_id, cart_id);\n }", "public void addItem(Product p) throws IOException, ClassNotFoundException {\n SortByName sortByName = new SortByName();\n Collections.sort(cartContents, sortByName.productSearch());\n\n int m = this.getQuantity(p);\n //check if in cart will exceed available amount\n if (p.getAvailableQuantity() > m)\n {\n cartContents.add(p);\n }\n saveCart();\n }", "@PostMapping(\"/add\")\n public String addToCart(@RequestHeader(\"Authorization\") String authorizationToken,@RequestParam Integer userId,@RequestParam Integer productId,@RequestParam Integer quantity){\n \tProductDTO pDTO = productMS.getProductById(authorizationToken,productId);\n \t CartDTO cartDTO = new CartDTO();\n \tBeanUtils.copyProperties(pDTO,cartDTO);\n \tcartDTO.setUserId(userId);\n \tcartDTO.setQuantity(quantity);\n return cartService.addToCart(cartDTO);\n }", "@RequestMapping(path=\"/shoppingCart/addToCart\", method=RequestMethod.POST)\n\tpublic String addToCart(@RequestParam(\"id\") Long id, @RequestParam(\"quantity\") Integer quantity, HttpSession session) {\n\t\tProduct selectedProduct = productDao.getProductById(id);\n\t\t\n\t\tMap<Product, Integer> shoppingCart = new HashMap<>();\n\t\t\n\t\tif(session.getAttribute(\"shoppingCart\") != null) {\n\t\t\tshoppingCart = (Map<Product, Integer>)session.getAttribute(\"shoppingCart\");\n\t\t} else {\n\t\t\tshoppingCart = new HashMap<>();\n\t\t}\n\t\t\n\t\tif(shoppingCart.containsKey(selectedProduct)) {\n\t\t\tint cartQuantity = shoppingCart.get(selectedProduct);\n\t\t\tcartQuantity += quantity;\n\t\t\tshoppingCart.put(selectedProduct, cartQuantity);\n\t\t} else {\n\t\t\tshoppingCart.put(selectedProduct, quantity);\n\t\t}\n\t\t\n\t\tsession.setAttribute(\"shoppingCart\", shoppingCart);\n\t\t\n\t\treturn \"redirect:/shoppingCart/view\";\n\t}", "private void add(GroceryItem itemObj, String itemName) {\n\t\tbag.add(itemObj);\n\t\tSystem.out.println(itemName + \" added to the bag.\");\n\t}", "public void addCostItem(CostItem item) throws CostManagerException;", "@Override\n public boolean addItemInCart(final String authToken,\n final CartDto cartDto) throws Exception {\n boolean notPreset = false;\n validate(cartDto);\n String userId = getUserIdByToken(authToken);\n Cart cart = new Cart();\n cart.setUserId(userId);\n\n ProductResponse productResponse =\n getProductDetails(cartDto, authToken);\n setPrices(productResponse, cartDto);\n\n CartItem item = transformCartItem(cartDto);\n item.setCart(cart);\n cart.getCartItems().add(item);\n LOG.info(\"[CART] event prepared to be queued on messaging server.\");\n notPreset = true;\n\n try {\n LOG.info(\"[CART] about to save the event in database.\");\n Cart persistCart = cartRepository.save(cart);\n LOG.info(\"Publishing event to Queue [cartQueue].\");\n rabbitTemplate.convertAndSend(RabbitmqCartConfig.EXCHANGE_NAME_CART,\n RabbitmqCartConfig.ROUTING_KEY_CART,\n cart);\n if (persistCart != null) {\n LOG.info(\"Item persisted successfully into the database.\");\n return true;\n } else {\n LOG.info(\"Item could not be saved into the database.\");\n return false;\n }\n } catch (RuntimeException ex) {\n LOG.error(\"Item cannot be added into the cart. \", ex.getMessage());\n throw new RuntimeException(ex.getMessage());\n }\n\n }", "public void addCart(String shopName, String productName, String Price,String user_ID) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_SHOPNAME,shopName ); // Name\n values.put(KEY_PRODUCTNAME, productName); // Email\n values.put(KEY_PRICE, Price); // Email\n values.put(KEY_USERID, user_ID);\n\n\n // Inserting Row\n long id = db.insert(TABLE_CART, null, values);\n db.close(); // Closing database connection\n\n Log.d(TAG, \"New cart inserted into sqlite: \" + id);\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic boolean addItemToCart(CartDTO cartItem) throws RetailerException, ConnectException {\n\t\t// function variables\n\t\tboolean itemAddedToCart = false;\n\t\tString retailerId = cartItem.getRetailerId();\n\t\tString productId = cartItem.getProductId();\n\t\tint quantity = cartItem.getQuantity();\n\t\t\n\t\t// hibernate access variables\n\t\tSession session = null;\n\t\tSessionFactory sessionFactory = null;\n\t\tTransaction transaction = null;\n\t\t\n\t\ttry {\n\t\t\t// IOException possible\n\t\t\texceptionProps = PropertiesLoader.loadProperties(EXCEPTION_PROPERTIES_FILE);\n\t\t\t\n\t\t\tsessionFactory = HibernateUtil.getSessionFactory();\n\t\t\tsession = sessionFactory.getCurrentSession();\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t\n\t\t\tQuery query = session.createQuery(HQLQuerryMapper.CART_ITEM_QTY_FOR_PRODUCT_ID);\n\t\t\tquery.setParameter(\"product_id\", productId);\n\t\t List<CartItemEntity> quant = (List<CartItemEntity>) query.list();\n\t\t \n\t\t Query query1 = session.createQuery(HQLQuerryMapper.GET_PRODUCT_QTY_FROM_DB);\n\t\t query1.setParameter(\"product_id\", productId);\n\t\t List<ProductEntity> availableQuants = (List<ProductEntity>) query1.list();\n\t\t \n\t\t if (quant.size() == 0) {\n\t\t \t// the user is adding this product to the cart for the first time\n\t\t\t if (quantity < availableQuants.get(0).getQuantity()) {\n\t\t\t \t// add this item to cart and reduce the quantity in PRODUCT table by quantity amount\n\t\t\t \tCartItemEntity obj = new CartItemEntity (retailerId, productId, quantity);\n\t\t\t \tsession.save(obj);\n\t\t\t \t\n\t\t\t \tQuery query3 = session.createQuery(HQLQuerryMapper. UPDATE_QTY_IN_PRODUCT);\n\t\t\t \tint availableQuantity = availableQuants.get(0).getQuantity();\n\t\t\t \tquery3.setParameter(\"quantity\", availableQuantity );\n\t\t\t \tquery3.setParameter(\"product_id\", productId);\n\t\t\t \tquery3.executeUpdate();\n\t\t\t \tavailableQuantity -= quantity;\n\t\t\t \titemAddedToCart = true;\n\t\t\t } else {\n\t\t\t \t// the requested number of items is not available\n\t\t\t \titemAddedToCart = false;\n\t\t\t \tGoLog.logger.error(exceptionProps.getProperty(\"prod_not_available\"));\n\t\t\t\t\tthrow new RetailerException(exceptionProps.getProperty(\"prod_not_available\"));\n\t\t\t }\n\t\t } else {\n\t\t \t// the user has previously added this item to his cart and is trying to increase quantity\n\t\t \tif (quantity < availableQuants.get(0).getQuantity()) {\n\t\t \t\t// add quantity to that already present in the cart and reduce the quantity in PRODUCT table by quantity amount\n\t\t \t\tQuery query4 = session.createQuery(HQLQuerryMapper.UPDATE_CART);\n\t\t \t\tint quantityPresent = quant.get(0).getQuantity();\n\t\t \t\tquery4.setParameter(\"product_id\", productId);\n\t\t \t\tquery4.executeUpdate();\n\t\t \t\tquantityPresent += quantity;\n\t\t \t\t\t \t\t\n\t\t\t \tQuery query3 = session.createQuery(HQLQuerryMapper. UPDATE_QTY_IN_PRODUCT);\n\t\t\t \tint availableQuantity = availableQuants.get(0).getQuantity();\n\t\t\t \tquery3.setParameter(\"quantity\", availableQuantity );\n\t\t\t \tquery3.setParameter(\"product_id\", productId);\n\t\t\t \tquery3.executeUpdate();\n\t\t\t \tavailableQuantity -= quantity;\n\t\t \t\titemAddedToCart = true;\n\t\t \t\t\n\t\t \t} else {\n\t\t \t\t// the requested quantity of items is not available \t\n\t\t \t\titemAddedToCart = false;\n\t\t \t\tGoLog.logger.error(exceptionProps.getProperty(\"prod_not_available\"));\n\t\t\t\t\tthrow new RetailerException(exceptionProps.getProperty(\"prod_not_available\"));\n\t\t \t}\n\t\t }\t\t \n\t\t} catch (IOException e) {\n\t\t\tGoLog.logger.error(e.getMessage());\n\t\t\tthrow new RetailerException (\"Could not open Error Properties File\");\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t}\n\t\treturn itemAddedToCart;\n\t}", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void onAddToCart(Product product) {\n }", "public void addEntry(String itemName, double itemPrice, boolean addToCart, double itemQuantity) {\n ItemEntry entry = new ItemEntry(itemName, itemPrice, addToCart, itemQuantity);\n itemList.add(entry);\n }", "public void add(final ItemOrder theOrder) {\r\n Objects.requireNonNull(theOrder, \"theOrder can't be null!\");\r\n myShoppingCart.put(theOrder.getItem(), theOrder.calculateOrderTotal());\r\n }", "public void addItem(String nameMeal, String quantity, String idOrder) {\n\n\t\ttry {\n\n\t\t\torderDetails.insertNewOrderDetail(idOrder, quantity, nameMeal);\n\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\t}", "public void addBasketItem(BasketItem newItem) {\n \n // If the sku already exists in the basket then update the quantity\n for(BasketItem item : basketItems) {\n if(item.getVariant().getSku().equals(newItem.getVariant().getSku())) {\n item.setQuantity(newItem.getQuantity() + item.getQuantity());\n return;\n }\n }\n \n // If the sku wasn't found above then add it to the basket\n basketItems.add(newItem);\n }", "public void addItem(Product product, int quantity) {\n\t\t// search the Cartline list for the product\n\t\tfor (CartLine cartLine : getCartLineList()) {\n\t\t\t// check if product in cartline matches the product that we looking for\n\t\t\tif (cartLine.getProduct().equals(product)) {\n\t\t\t\tcartLine.setQuantity(quantity + cartLine.getQuantity());\n\t\t\t\treturn;\t//we found the product, exit the loop and the method\n\t\t\t}\n\t\t}\n\t\t//no cartline is found with the product so add new cart line \n\t\tcartLineList.add(new CartLine(product, quantity));\n\t}", "public void AddtoCart(int id){\n \n itemdb= getBooksById(id);\n int ids = id;\n \n for(Books k:itemdb){ \n System.out.println(\"Quantity :\"+k.quantity); \n if (k.quantity>0){\n newcart.add(ids);\n System.out.println(\"Added to cartitem list with bookid\"+ ids);\n setAfterBuy(ids);\n System.out.println(\"Quantity Updated\");\n setCartitem(newcart);\n System.out.println(\"setCartitem :\"+getCartitem().size());\n System.out.println(\"New cart :\"+newcart.size());\n test.add(k);\n }\n else{\n System.out.println(\"Quantity is not enough !\");\n }\n }\n setBookcart(test);\n }", "public abstract void addItem(AbstractItemAPI item);", "@RequestMapping(\"/addcart\")\n\tpublic String doAddCart(@RequestParam(\"id\") int id, HttpSession session) {\n\t\tPrice ip = menuService.fetchPrice(id);\n\t\t// add it into a list in session.\n\t\tList<Price> cart = (List<Price>) session.getAttribute(\"cart\");\n\t\tif(cart == null) {\n\t\t\tcart = new ArrayList<>();\n\t\t\tsession.setAttribute(\"cart\", cart);\n\t\t}\n\t\tcart.add(ip);\n\t\tSystem.out.println(cart);\n\t\treturn \"redirect:menu\";\n\t}", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "public void addItemQty(int itemQty) {\n this.itemQty += itemQty;\n }", "@RequestMapping(method=RequestMethod.POST, value = \"/item/{id}\", produces = \"application/json\")\n public void addItem(@RequestBody Item itemToAdd)\n {\n this.itemRepository.addItem(itemToAdd);\n }", "public static int addToBasket(Basket basket, String item, int quantity) {\n StockItem stockItem = stockList.get(item);\n if(stockItem == null) {\n System.out.println(\"We don't sell \" + item);\n return 0;\n }\n if(stockList.reserveStock(item, quantity) != 0) {\n basket.addToBasket(stockItem, quantity);\n return quantity;\n }\n return 0;\n }", "void addGroceryItem(String item) {\n\n\t}", "@Override\n\tpublic void addItems(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"+++++++++++Add items here+++++++++++\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id, name, price and quantity\n\t\t\tSystem.out.print(\"Enter Item Id: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\tSystem.out.print(\"Enter Item Name without space: \");\n\t\t\tString itemName = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Type without space: \");\n\t\t\tString itemType = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Price: \");\n\t\t\tString itemPrice = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Quantity: \");\n\t\t\tint itemQuantity = scanner.nextInt();\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.addItems(session,itemId,itemName,itemType,itemPrice,itemQuantity);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void sendItemToCart(int itemId, int amount) {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tString result=\"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\tresult = server.addToCart(clientId, itemId, amount);\n\t\t\t} else {\n\t\t\t\tWebResource addToCartService = service.path(URI_ADDTOCART).path(clientId+\"/\"+itemId+\"/\"+amount);\n\t\t\t\tresult = addToCartService.accept(MediaType.TEXT_XML).get(String.class);\n\t\t\t}\n\t\t\t//retrieves the status code\n\t\t\tStatusMessageObject status = XMLParser.parseStatusMessage(result);\n\t\t\tgui.setStatus(status.getMessage());\n\t\t\t\n\t\t\t//successful status code > 0, get shopping cart from server\n\t\t\tif (status.getStatusCode() > 0){\n\t\t\t\tsendCartRequest();\n\t\t\t}\n\t\t\t//update item list\n\t\t\tsendItemListRequest();\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClientHandlerException ex){ \n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!!\");\n\t\t} catch (WebServiceException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!!\");\n\t\t}\n\t\t\n\t}", "void addCpItem(ICpItem item);", "public void addCartItem(long userId, long menuItemId)\n\t{\n\t\tcartDTORepository.addItemToCart(userId,menuItemId);\n\t\t\n\t}", "public void add(WebSite website, int nProductID, int nQuantity) {\r\n\t\tfor (int i = 0; i < orderedItems.size(); i++) {\r\n\t\t\tOrderedItem oi = (OrderedItem) orderedItems.elementAt(i);\r\n\t\t\tif (oi.nProductID == nProductID) {\r\n\t\t\t\toi.nQuantity += nQuantity;\r\n\t\t\t\tcalculate(website);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tOrderedItem oi = new OrderedItem();\r\n\t\toi.nProductID = nProductID;\r\n\t\toi.nQuantity = nQuantity;\r\n\t\tProduct product = website.products.get(nProductID);\r\n\t\toi.dblPrice = product.dblPrice;\r\n\t\toi.dblCost = product.dblCost;\r\n\t\torderedItems.addElement(oi);\r\n\r\n\t\tcalculateCart(website);\r\n\t}", "@Then(\"the product is added to my cart\")\n\t\tpublic void the_product_is_added_to_my_cart() throws Exception {\n\n\t\t\t//Waits for the cart page to load\n\t\t\tdriver.manage().timeouts().implicitlyWait(120, TimeUnit.SECONDS);\n\t\t\tcartElement = driver.findElement(By.xpath(itemSacola)).getText();\n\t\t\t\n\t\t\t//Verify that the product on the shopping cart is the correct one\n\t\t\tAssert.assertEquals(cartElement, TituloFinal);\n\n\t\t\t// Take snapshot as evidence\n\t\t\tFunctions.takeSnapShot(driver, null);\n\t\t}", "public void addItem(Product p) {\n\t\t_items.add(p);\n\t}", "public int addItem(Item i);", "public void addItem(Item item) {\n _items.add(item);\n }", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "@Override\n public void onClick(View v) {\n Context context = getContext();\n SharedPreferences mSharedPreference1 = PreferenceManager.getDefaultSharedPreferences(context);\n float fTotal = mSharedPreference1.getFloat(\"CartTotal\", 0);\n fTotal += (float)Integer.parseInt(product.getPrice());\n\n //throwback in\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor mEdit1 = sp.edit();\n mEdit1.putFloat(\"CartTotal\", fTotal);\n mEdit1.commit();\n\n //add to my cart array if item doesn't exist.\n String prodID = Integer.toString(product.getP_id());\n if(!Arrays.asList(myCartArray).contains(prodID)){\n myCartArray.add(prodID);\n saveArray();\n //display dialog saying added to cart successful\n\n Toast.makeText(getActivity(), \"Succesfully added to your cart!\",\n Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getActivity(), \"This lot was already in your cart!\",\n Toast.LENGTH_LONG).show();\n }\n\n }", "public boolean add(Product product) {\n return cartRepository.add(product);\n }", "@RequestMapping(path = \"/carta/add\", method = RequestMethod.POST)\n public ModelAndView addCarta(@ModelAttribute(\"carta\") CartaViewModel model) {\n\n Restaurant restaurant = restaurantServicio.get(model.getRestaurantId());\n TipoProducto tipoProducto = tipoProductoServicio.get(model.getTipoProductoId());\n\n cartaServicio.create(model.toCarta(new Carta(), tipoProducto, restaurant));\n\n return new ModelAndView(\"redirect:/carta/\" + model.getRestaurantId());\n }", "public void addProduct(String product, int quantity) {\n if (shoppingBasket.containsKey(product) != true) {\n shoppingBasket.put(product, quantity);\n } else {\n shoppingBasket.put(product, shoppingBasket.get(product) + quantity);\n }\n }", "public void AddToCartListPage(String Item){\r\n\t\tString Addtocartlistitem = getValue(Item);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Addtocartlist should be Added\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"BylnkFavListAddToCart\"));\r\n\t\t\tclickObjectByMatchingPropertyValue(locator_split(\"BylnkFavListAddToCart\"),propId,Addtocartlistitem);\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"Addtocartlist is Added.\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Addtocartlist is Added\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Addtocartlist is not Added\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"BylnkFavListAddToCart\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "public void addToCart(String name, Double price , String image , int quantity)\n {\n if(addToCart==1)\n {\n return;\n }\n addToCart = 1;\n noOfItemQuantities = Integer.parseInt(textQuantity.getText().toString());\n\n if(noOfItemQuantities>quantity ) {\n addToCart=2;\n outOfStockText.setText(\"Out of Stock\");\n return;\n }\n double totalPrice = price * noOfItemQuantities;\n\n\n\n\n\n\n final Cart cart= new Cart(name,totalPrice,image,noOfItemQuantities,currentUri.toString());\n\n\n addToFirebase(cart,ItemEntry.TABLE_NAME_CART);\n dataSnapShot(ItemEntry.TABLE_NAME_CART);\n\n ispresent[0]=0;\n\n\n\n\n\n\n\n }", "@Test(groups = \"suite2-2\")\n\tpublic void addItemToCart() {\n\t\tdriver = new FirefoxDriver();\n\n\t\tdriver.get(CART_URL);\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\n\t\ttry {\n\t\t\twait.until(ExpectedConditions.presenceOfElementLocated(By\n\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"newempty\\\"]/DIV\")));\n\t\t} catch (NoSuchElementException e) {\n\t\t\tfail(\"Cart should be empty\");\n\t\t}\n\n\t\t// Find the button to do the search inside treasury objects\n\t\tWebElement searchButton = wait\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"header\\\"]/DIV[@id=\\\"navigation-group\\\"]/FORM[@id=\\\"search-bar\\\"]/DIV/BUTTON[@id=\\\"search_submit\\\"]\")));\n\n\t\t// Find the text input field to do the search\n\t\tWebElement searchField = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"header\\\"]/DIV[@id=\\\"navigation-group\\\"]/FORM[@id=\\\"search-bar\\\"]/DIV/INPUT[@id=\\\"search-query\\\"]\"));\n\t\t// Search key\n\t\tsearchField.sendKeys(\"hat\");\n\n\t\tsearchButton.click();\n\n\t\tWebElement itemToBuy = wait\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV/DIV/DIV/DIV[@id=\\\"primary\\\"]/UL/LI[1]/A\")));\n\n\t\titemToBuy.click();\n\n\t\tWebElement addToCartButton = wait\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV/DIV/DIV/DIV[2]/DIV[1]/DIV[2]/DIV[3]/DIV[1]/FORM/SPAN/SPAN/INPUT\")));\n\n\t\taddToCartButton.click();\n\n\t\tWebElement itemInCartMessage = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"checkout-header\\\"]/H1\"));\n\n\t\tassertEquals(itemInCartMessage.getText().trim().substring(0, 1), \"1\",\n\t\t\t\t\"1 item expected in cart\");\n\t}", "public void addItem( Item anItem) {\n currentItems.add(anItem);\n }", "public void addItem(Item i) {\n this.items.add(i);\n }", "public void addItem(Item e) {\n\t\tItem o = new Item(e);\n\t\titems.add(o);\n\t}", "public void addGroceryItem(String item){\n groceryList.add(item);\n }", "public void add(int index){\n int i = 0;\n boolean isFound = false;\n for (Product product:inventory.getProducts().keySet())\n {\n i++;\n if (i == index && inventory.getProducts().get(product) > 0)\n {\n if (myBasket.containsKey(product))\n {\n System.out.println(\"One more of this product added.\");\n myBasket.replace(product , myBasket.get(product) + 1);\n }\n else {\n System.out.println(\"Product added to your basket.\");\n myBasket.put(product , 1);\n }\n totalCost = totalCost + product.getPrice();\n isFound = true;\n inventory.updateStock(product , '-');\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index or not enough product in stock!\");\n }", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "@Override\n public void addMenu(Items cartItemToBeAdded) {\n Items menuItem = cartItemToBeAdded.getItemOriginalReference();\n menuItem.setItemQuantity(menuItem.getItemQuantity() + 1);\n mCartAdapter.addToCart(cartItemToBeAdded);\n updateCartMenu();\n }", "void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}", "public void clickAddTopping(int itemIndex, ItemCart item);", "public final void addItemToSale(String prodId, int qty) {\n // Validation needed\n if(prodId == null || prodId.length() == 0 || qty < 1) {\n receipt.outputMessage(ITEM_ERR_MSG);\n return; // premature exit\n }\n receipt.addLineItem(prodId, qty);\n }", "@RequestMapping(value = \"/cartItems/add/{userId}\", method = RequestMethod.POST)\n //@PostMapping(path = \"/cartItems/add/{userId}\", consumes = \"application/json\")\n public void addCartItem(@RequestBody Cart cartItem,@PathVariable(\"userId\") int userId) {\n \n cartService.addCartItem(cartItem,userId);\n\n \n }", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }" ]
[ "0.8619967", "0.76432824", "0.7492064", "0.7454246", "0.74109656", "0.74044496", "0.73724437", "0.73696876", "0.731515", "0.72940654", "0.72529286", "0.7251111", "0.7250049", "0.72171134", "0.7208884", "0.71525383", "0.7128583", "0.7110952", "0.70687425", "0.7025819", "0.7013066", "0.70113724", "0.7000496", "0.6980977", "0.69682413", "0.6958846", "0.6947745", "0.6944843", "0.6938339", "0.693399", "0.69164467", "0.6890816", "0.68882775", "0.68682724", "0.6858742", "0.6853657", "0.6850354", "0.68458897", "0.68396455", "0.6829166", "0.68288636", "0.6826051", "0.68191516", "0.68177736", "0.68046725", "0.6804383", "0.67880267", "0.67757064", "0.67596656", "0.6746701", "0.67441475", "0.6728761", "0.67233795", "0.6722586", "0.67224014", "0.6695256", "0.6695256", "0.669338", "0.6677002", "0.66725326", "0.66717046", "0.6664237", "0.6662111", "0.6656299", "0.6650808", "0.6648635", "0.66394514", "0.663646", "0.6631678", "0.6622187", "0.66142696", "0.6607164", "0.66042984", "0.6603925", "0.65952206", "0.6595182", "0.6582649", "0.6573202", "0.6568002", "0.6567412", "0.65593386", "0.6554831", "0.65509117", "0.6548262", "0.6539371", "0.6533768", "0.65259564", "0.65222955", "0.6515441", "0.6510962", "0.65048116", "0.64980966", "0.64922863", "0.6490683", "0.6486183", "0.6473064", "0.64700437", "0.64688814", "0.6451955", "0.6450594", "0.64494807" ]
0.0
-1
View your current cart
@GetMapping(value = "/viewcart") public ResponseEntity<List<CartProduct>> viewCart(final HttpSession session) { log.info(session.getId() + " : Retrieving the cart to view"); Map<String, CartProduct> initialCart = (Map<String, CartProduct>) session.getAttribute(CART_SESSION_CONSTANT); ControllerUtils.checkEmptyCart(initialCart, session.getId()); List<CartProduct> result = new ArrayList(); for (String key : initialCart.keySet()) { result.add(initialCart.get(key)); } return ResponseEntity.status(HttpStatus.OK).body(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ViewCart() {\r\n\t\tthis.ViewCart.click();\r\n\t}", "public static void viewCart() {\n click(CART_BUTTON);\n click(VIEW_CART_BUTTON);\n }", "private static void viewCart() {\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" The items in your cart\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Name |Price |Count\");\r\n\t\tfor (Map.Entry<Product, Integer> productCountPair: cart.getCartProductsEntries()) {\r\n\t\t\tStringBuilder productName = generatePaddings(productCountPair.getKey().getName(), PRODUCT_NAME_LENGTH);\r\n\t\t\tStringBuilder price = generatePaddings(convertCentToDollar(productCountPair.getKey().getPriceInCent()), PRICE_LENGTH);\r\n\t\t\tSystem.out.println(\" \" + productName + \"|\" + price + \"|\" + productCountPair.getValue());\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Total price: \" + convertCentToDollar(cart.totalPriceInCent()));\r\n\t\tSystem.out.println();\r\n\t\tdisplayCartMenu();\r\n\t}", "public void displayCart() {\n\t\tSystem.out.println(cart.toString());\n\t}", "public void Cart() {\r\n\t\tthis.cart.click();\r\n\t}", "public static void goToCart() {\n click(SHOPPING_CART_UPPER_MENU);\n }", "public void printCart() {\n\t\tSystem.out.println(\"Items currently in the cart: \\n\");\n\t\tfor (int i =0; i < currentSize; i ++) {\n\t\t\tSystem.out.println(\"Item \" + i + \":\\n\" + Cart[i]);\n\t\t}\n\t}", "@GetMapping(\"/show-cart\")\r\n\tpublic List<Cart> showCart() throws CartEmptyException {\r\n\t\tlog.info(\"showCart -Start\");\r\n\t\t//Cart cart = null;\r\n\t\tList<Cart> cart;\r\n\t\tcart = service.getAllCartItems(1);\r\n\t\tint total=0;\r\n\t\tif(cart.size()==0)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor(Cart carts:cart)\r\n\t\t{\r\n\t\t\ttotal+=carts.getMenuItem().getPrice();\r\n\t\t}\r\n\t System.out.println(\"*************************************************\"+total);\r\n\t\tlog.info(\"showCart -End\");\r\n\t\treturn cart;\r\n\r\n\t}", "public void display() {\r\n System.out.println(\" Cart Information \" + System.lineSeparator() +\r\n \"=========================\" + System.lineSeparator() +\r\n \"Customer ID: \" + getCustID() + System.lineSeparator() + \r\n \"Cart Total: \" + getTotal()+ System.lineSeparator());\r\n items.display();\r\n }", "private static void checkoutCart() {\r\n\t\tint totalPrice = cart.totalPriceInCent();\r\n\t\tcart.checkoutCartProducts();\r\n\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" The items in your cart is all cleared\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Total price to pay: \" + convertCentToDollar(totalPrice));\r\n\t\tSystem.out.println();\r\n\t}", "@Override\n\tpublic List<Cart> viewMyCart() throws BusinessException {\n\t\treturn null;\n\t}", "public void cart() {\n\t\tString s=dr.findElement(By.xpath(\"//*[@id=\\\"Cart\\\"]/form\")).getText();\r\n\t\tSystem.out.println(s);\r\n\t}", "private void cart() {\n\t\tboolean back = false;\n\t\twhile (!back) {\n\t\t\tSystem.out.println(\"1.Display Cart\");\n\t\t\tSystem.out.println(\"2.Remove Product From Cart\");\n\t\t\tSystem.out.println(\"3.Edit Product in Cart\");\n\t\t\tSystem.out.println(\"4.Checkout\");\n\t\t\tSystem.out.println(\"5.Back\");\n\t\t\tSystem.out.println(\"Enter Your Choice:-\");\n\t\t\tchoice = getValidInteger(\"Enter Your Choice :-\");\n\t\t\tswitch (choice) {\n\t\t\tcase 1:\n\t\t\t\tCartController.getInstance().displayCart();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tremoveProduct();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\teditProduct();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tcheckout();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tback = true;\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tSystem.out.println(\"Enter Correct Choice :-\");\n\t\t\t}\n\t\t}\n\t}", "@GetMapping(value = { \"\", \"/cart\" })\n\tpublic @NotNull ShoppingCartDto getShoppingCartDetail() {\n\t\tLOGGER.info(\"ShoppingCartRestController.getCartDetail() invocation started\");\n\t\treturn theShoppingCartService.getItemDetailFromCart();\n\t}", "public void clickOnViewCartButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnViewCartButton.click();\n\n \t}", "public void purchaseCart (View view) {\n Utility.showMyToast(\"Purchasing now!\", this);\n\n // Also send an Analytics hit\n sendPurchaseHit();\n }", "public void showCart(int userId) {\n try {\n List<Cart> carts = cartService.getUserCarts(userId);\n System.out.println(\"\\n\"+Constants.DECOR+\"YOUR CART\"+Constants.DECOR_END);\n System.out.println(Constants.CART_HEADER);\n for(Cart cart : carts) {\n System.out.println(String.valueOf(userId)\n +\"\\t\\t\"+String.valueOf(cart.getCartId())+(\"\\t\\t\"+String.valueOf(cart.getProduct().getId())\n +\"\\t\\t\"+String.valueOf(cart.getQuantity())+\"\\t\\t\"+cart.getCreated()+\"\\t\\t\"+cart.getModified()));\n }\n } catch (CartException ex) {\n System.out.println(ex);\n } \n }", "private void checkout() {\n System.out.printf(\n \"Total + Tax %12s%n\", getTotal(cart)\n );\n }", "public void goToCart() throws IOException {\n logic.switchScene(\"fxml/CartFxml.fxml\", cartBtn, fxmlLoader);\n ((CartController) fxmlLoader.getController()).init();\n }", "public interface CartView {\n\tvoid showState(int state);\n\n\tLifecycleTransformer<List<StoreInfoBean>> bindLife();\n\n\tvoid showCart(List<StoreInfoBean> groups);\n\n\tvoid showGood(RecomGoodModel goodModel);\n\n\tvoid deteleGood(boolean result);\n\n void postOrder();\n}", "@FXML\r\n\tpublic void goToShoppingCart() {\r\n\t\tViewNavigator.loadScene(\"Your Shopping Cart\", ViewNavigator.SHOPPING_CART_SCENE);\r\n\t}", "@Override\n\tpublic void printCart() {\n\n\t\tint nSize = cartList.size();\n\t\tint intSum = 0;\n\n\t\tSystem.out.println(\"===================================================\");\n\t\tSystem.out.println(\"구매자\\t 상품명 수량\\t 단가\\t 합계\");\n\t\tSystem.out.println(\"---------------------------------------------------\");\n\n\t\tint i = 0;\n\t\tfor (i = 0; i < nSize; i++) {\n\t\t\tSystem.out.print(cartList.get(i).getUserName() + \"\\t \");\n\t\t\tSystem.out.print(cartList.get(i).getProductName() + \"\\t \");\n\t\t\tSystem.out.print(cartList.get(i).getQty() + \"\\t \");\n\t\t\tSystem.out.print(cartList.get(i).getPrice() + \"\\t \");\n\t\t\tSystem.out.println(cartList.get(i).getTotal() + \"\\t\");\n\n\t\t\tintSum += cartList.get(i).getTotal();\n\t\t}\n\n\t\tSystem.out.println(\"---------------------------------------------------\");\n\t\tSystem.out.printf(\"합계\\t%d가지\\t\\t\\t%d\\n\", i, intSum);\n\n\t}", "private void startGoToCartAct() {\n Intent intent = new Intent(this, EcomCartActivity.class);\n startActivity(intent);\n }", "public String getCartItem() {\n\t\tMobileElement el = driver.findElement(By.xpath(\"//android.view.View[@resource-id='\" + cart + \"']\"));\n\t\tList<MobileElement> els = el.findElements(By.className(\"android.view.View\"));\n\t\treturn els.get(3).getText();\n\t}", "@RequestMapping(\"/pizza/cart.html\")\r\n public ModelAndView cart(String op, String id,\r\n @CookieValue(value = \"v\", defaultValue = \"\") String visitorId,\r\n HttpServletResponse response) throws Exception {\n visitorManager.setCookieValue(visitorId);\r\n\r\n // Is there an operation specified?\r\n if (\"add\".equals(op) && id != null && id.length() > 0) {\r\n shoppingCart.addProduct(Integer.parseInt(id), new int[0]);\r\n }\r\n else if (\"inc\".equals(op) && id != null && id.length() > 0) {\r\n shoppingCart.incrementLine(Integer.parseInt(id));\r\n }\r\n else if (\"dec\".equals(op) && id != null && id.length() > 0) {\r\n shoppingCart.decrementLine(Integer.parseInt(id));\r\n }\r\n else if (\"cancel\".equals(op)){\r\n shoppingCart.cancelOrder();\r\n }\r\n\r\n // Get the current order\r\n Order order = shoppingCart.getOrder();\r\n ModelAndView result = new ModelAndView(\"/pizza/cart\");\r\n result.addObject(\"order\", order);\r\n\r\n // Remember the visitor\r\n response.addCookie(new Cookie(\"v\", visitorManager.getCookieValue()));\r\n return result;\r\n }", "@GetMapping\n ResponseEntity<Cart> retrieve() {\n return ResponseEntity.ok(unwrapProxy(cart));\n }", "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "public static void printCart(User currentUser) {\r\n\t\tSystem.out.println(\"\\n Cart\\n\");\r\n\t\tMap<Long, Integer> userCart = currentUser.getCart();\r\n\t\tif (userCart.size() == 0) {\r\n\t\t\tSystem.out.println(\"Your cart is empty...\");\r\n\t\t} else {\r\n\t\t\tSystem.out.format(\"%5s\\t%10s\\t%10s\\t%5s\\n\", \"Id\", \"Name\", \"Quantity\", \"Price\");\r\n\t\t\tfor (Long id : userCart.keySet()) {\r\n\t\t\t\tFruit fruit = fruits.get(id);\r\n\t\t\t\tdouble price = fruit.getPrice() * userCart.get(id);\r\n\t\t\t\tSystem.out.format(\"%5s\\t%10s\\t%10s\\t%5s\\n\", id, fruit.getName(), userCart.get(id), price);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Cart getCart() {\n return this.cart;\n }", "public void ClickShoppingcart(View view){\n redirectActivity(this,SummaryActivity.class);\n }", "private void checkout() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter your Name :\");\n\t\t\tscan.nextLine();\n\t\t\tCartController.getInstance().generateBill(scan.nextLine());\n\t\t} else {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"\\n--------------No Product Available in Cart for Checkout-----------------\\n\");\n\t\t}\n\t}", "public ViewProducts(Customer loggedInCustomer) {\n currentCustomer = loggedInCustomer;\n \n DBManager db = new DBManager();\n products = db.loadProducts();\n \n initComponents();\n \n //check if current customer is logged in or just browsing\n if(currentCustomer.getIsRegistered()){\n //if they are let them place an order\n currentOrder = currentCustomer.findLatestOrder();\n }\n else{\n //if they are not registered disable viewbasket\n view_btn.setVisible(false);\n } \n }", "@GetMapping(\"/auth/result\")\n public String result(Model model) {\n model.addAttribute(\"cart\", cartService.getMyCart());\n // clear the actual cart content\n cartService.clear(null);\n\n return \"result\";\n }", "public List<CartItem> getAllcartitem();", "@RequestMapping\n public String getCartItems(Principal activeUser){\n \tSystem.out.println(\"Hello User Cart Controller\");\n \tSystem.out.println(activeUser.getName());\n \tUsersDetail usersDetail = usersDetailService.getUserByUsername (activeUser.getName());\n int cartId = usersDetail.getCart().getCartId();\n System.out.println(\"cart Id===\"+cartId);\n return \"redirect:/user/cart/\"+cartId;\n }", "@RequestMapping(value = \"/admin/account/renew/individual\", method = RequestMethod.GET)\n public String getCurrentIndividualProductInfoView() {\n return \"getCurrentIndividualProductInfo\";\n }", "public void displayCartContents() {\r\n for (int i = 0; i < numItems; i++) { // Checks all objects in the cart\r\n if ((cart[i].getContents() != \"\")) { // If not item\r\n System.out.println(cart[i].getDescription()); // Display bag description\r\n System.out.println(cart[i].getContents()); // Display contents of bag\r\n } else { // Else it must be item\r\n System.out.println(cart[i].getDescription()); // Display item description\r\n }\r\n }\r\n }", "List<Cart> getAllCarts();", "@RequestMapping(method = RequestMethod.GET,value = \"/\")\n public String HomePage(Model model, HttpSession session){\n model.addAttribute(\"listBook\",bookService.books());\n\n ShoppingCart shoppingCart = (ShoppingCart) session.getAttribute(\"list-order\");\n\n if (shoppingCart != null){\n\n Set<CartItem> listCartItem = new HashSet<>();\n for (Long hashMapKey:shoppingCart.getItems().keySet()\n ) {\n CartItem cartItem = shoppingCart.getItems().get(hashMapKey);\n listCartItem.add(cartItem);\n System.out.println(\"quantity : \" + cartItem.getQuantity());\n System.out.println(\"size list cart : \" + listCartItem.size());\n }\n model.addAttribute(\"listCartItem\",listCartItem);\n }\n\n\n return \"homePage\";\n }", "public static void addToCart() {\n List<WebElement> buttonsAddItem = Browser.driver.findElements(ADD_TO_CART_BUTTON);\n buttonsAddItem.get(0).click();\n Browser.driver.navigate().refresh();\n }", "public void ClickShoppingcart(View view){\n MainActivity.redirectActivity(this,Shopping_cart_MainActivity.class);\n }", "protected void updateCartInfoUI() {\n SharedPref.putCartitesmQty(getContext(), mCartInfo.getSummaryQty());\n this.updateCartTotal();\n// updateMenu();\n }", "public void clickProductDetailsViewInCartBtn(){\n clickElement(productDetailsViewInCart);\n }", "@Override\n public void onClick(View v) {\n PageType pageType = PageType.HOME_PAGE;\n CustomerCart customerCart = new CustomerCart();\n boolean wasIncentiveDisplayed = false;\n customerCart.setCartId(Config.CART_ID);\n String wizCartCouponCode = null;\n wizCartClientWrapper.sendTrackingPageView(pageType, customerCart,wasIncentiveDisplayed, wizCartCouponCode);\n }", "@Override\n public void onClick(View v) {\n AddingToCartList();\n }", "public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}", "private static void displayCartMenu() {\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please make your choice, by entering the assigned number\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" 1: Remove an item from the cart\");\r\n\t\tSystem.out.println(\" 2: Modify the number of a certain item in the cart\");\r\n\t\tSystem.out.println(\" 3: Checkout cart\");\r\n\t\tSystem.out.println(\" 0: Quit to main manu\");\r\n\t\tint value = getValidUserInput(scanner, 4);\r\n\t\tswitch (value) {\r\n\t\tcase 0:\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\" Going back to main menu\");\r\n\t\t\tSystem.out.println();\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tremoveItemFromCart();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tmodifyItemNumberInCart();\r\n\t\t\tbreak; \r\n\t\tcase 3:\r\n\t\t\tcheckoutCart();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\t\r\n\t}", "public void Cart_icon() {\r\n\t\tthis.Cart_icon.click();\r\n\t}", "@Then(\"^view basket$\")\r\n\tpublic void view_basket() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.viewbasket());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "public void clickViewCart(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- ViewCart button should be clicked\");\r\n\t\ttry{\r\n\t\t\twaitForPageToLoad(25);\r\n\t\t\twaitForElement(locator_split(\"BybtnSkuViewCart\"));\r\n\t\t\tclick(locator_split(\"BybtnSkuViewCart\"));\r\n\t\t\twaitForPageToLoad(25);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- ViewCart button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- ViewCart button is not clicked \"+elementProperties.getProperty(\"BybtnSkuViewCart\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"BybtnSkuViewCart\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t} \r\n\t}", "public final List<Item> getCart() {\n return cart;\n }", "public String getCartDetailonProductDetailPage()\n\t{\n\t\twaitForVisibility(cartDetailonProductDetailPage);\n\t\treturn cartDetailonProductDetailPage.getText();\n\t}", "public void onClick(View v)\n {\n // Add to cart model\n for (int i = 0; i < productQuantity; i++)\n {\n dbManager.addToCart(activeProduct.getID());\n }\n }", "public void perform(HttpServletRequest req, HttpServletResponse resp) {\n HttpSession session = req.getSession(true);\r\n\r\n //information needed to proccess the updatecart action\r\n ShoppingCart carrito = (ShoppingCart) session.getAttribute(\"carrito\");\r\n Product product = productModel.retrieve(Integer.parseInt(req.getParameter(\"productid\")));\r\n int newQuantity = Integer.parseInt(req.getParameter(\"itemQuantity\"));\r\n\r\n //if the quantity is set to zero we need to delete the product from the cart\r\n if (newQuantity == 0) {\r\n carrito.deleteItem(product);\r\n } else {//if not, we just update the quantity\r\n carrito.update(product, Integer.toString(newQuantity));\r\n }\r\n\r\n \r\n //in case we have deleted the last item of the cart, we need to remove the cart from the session because there isn't any product in it.\r\n if (carrito.isEmpty() == true) {\r\n session.removeAttribute(\"carrito\");\r\n \r\n //if the cart is empty we will forward the request to category page\r\n req.setAttribute(\"productsById\", productModel.retrieveByCategory(product.getCategoryid()));\r\n req.setAttribute(\"categorySelected\", categoryModel.retrieve(product.getCategoryid()));\r\n req.setAttribute(\"categories\", categoryModel.retrieveAll());\r\n\r\n ViewManager.nextView(req, resp, \"/view/category.jsp\");\r\n } else {\r\n //otherwise we will show the cart updated\r\n req.setAttribute(\"carrito\", session.getAttribute(\"carrito\"));\r\n ViewManager.nextView(req, resp, \"/view/viewcart.jsp\");\r\n }\r\n }", "public List<CartLine> listAvailable(int cartId);", "@GetMapping(\"/{id}/shoppingcart\")\n public ShoppingCart getCustomerShoppingCart(@PathVariable long id){\n Customer b = customerRepository.findById(id);\n return b.getShoppingCart();\n }", "public void cartpage() throws InterruptedException {\n\t\tAssert.assertTrue(driver.findElement(By.xpath(props.getProperty(\"verify_added_item\"))).isDisplayed(),\n\t\t\t\t\"Item has added into the cart\");\n\n\t\tdriver.findElement(By.xpath(props.getProperty(\"pay_with_card_tab\"))).click();\n\t\tThread.sleep(2000);\n\n\t}", "public String viewDetailShop() throws Exception {\n\t\t\n\t\treturn SUCCESS;\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n request.setAttribute(\"p\", new CartViewModel(request));\n String userPath = \"/cart\";\n forwardToJsp(request, response, userPath);\n }", "@Override\n\tpublic void browseItems(Session session){\n\t\t//exception handling block\n\t\ttry{\n\t\t\tbrowseItem=mvc.browseItems(session);\n\t\t\t//displaying items from database\n\t\t\tSystem.out.println(\"<---+++---Your shopping items list here----+++--->\");\n\t\t\tSystem.out.println(\"ItemId\"+\" \"+\"ItemName\"+\" \"+\"ItemType\"+\" \"+\"ItemPrice\"+\" \"+\"ItemQuantity\");\n\t\t\tfor(int i = 0; i < browseItem.size(); i++) {\n\t System.out.println(browseItem.get(i)+\"\\t\"+\"\\t\");\n\t }\n\t System.out.println(\"<------------------------------------------------>\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App Exception- Browse Items: \" +e.getMessage());\n\t\t}\n\t}", "Cart getCartForUser(String userId);", "void viewProductById(long id);", "public HashMap<String, String> viewCart(int cusId) {\n if (orderList.hasCart(cusId))\n return orderList.getCart(cusId).toHashMap();\n\n return null;\n }", "public void setCart(Cart cart){\n\t\tthis.cart = cart;\n\t}", "public ArrayList viewBook(int cart_id) {\n\t\tviewDAO dao = new viewDAO();\n\t\tLOG.info(\"ViewBO : Recieves cart id and passes it to DAO for retreiving values corresponding to that id\");\n\t\treturn dao.viewBook(cart_id);\n\t}", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "@Override\n\tpublic void sendCartRequest() {\n\t\ttry {\n\t\t\tString result=\"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\tresult = server.getClientCart(clientId);\n\t\t\t} else {\n\t\t\t\tWebResource getCartService = service.path(URI_GETCART).path(String.valueOf(clientId));\n\t\t\t\tresult = getCartService.accept(MediaType.TEXT_XML).get(String.class);\n\t\t\t}\n\t\t\n\t\t\tArrayList<ItemObject> cart = XMLParser.parseToListItemObject(result);\n\t\t\tgui.setupCart(cart);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClientHandlerException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!!\");\n\t\t} catch (WebServiceException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!!\");\n\t\t}\n\t}", "@Override\n\tpublic List<Cart> findAllCart() {\n\t\treturn cartRepository.findAll();\n\t}", "public int getCartId() {\n return cartId;\n }", "@FXML\r\n\tpublic void addToShoppingCart() {\r\n\t\t\r\n\t\tWatch w = listView.getSelectionModel().getSelectedItem();\r\n\t\tboolean add = controller.addWatchToShoppingCart(w);\r\n\t\tcontroller.deleteWishlistItem(w.getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t\tcheckSelected();\r\n\t}", "public void displayProduct() {\n\t\tDisplayOutput.getInstance()\n\t\t\t\t.displayOutput(StoreFacade.getInstance());\n\t}", "public void show() {\r\n\t\tfor (Carta carta: baraja) {\r\n\t\t\tSystem.out.println(carta);\r\n\t\t}\r\n\t}", "@GetMapping(\"/cartItems/{customerId}\")\n List<Cart> getAllCartProducts(@PathVariable(\"customerId\") int customerId) {\n\n Customer customer = cartService.getAllCartItems(customerId);\n List<Cart> cartItems = new ArrayList<>();\n\n Set<Cart> cart = customer.getCartItems();\n\n for (Cart cartItem : cart) {\n \n if(!(cartItem.isSavedForLater())){\n Double price = cartService.getNewPrice(cartItem);\n cartItem.setPrice(price);\n cartItems.add(cartItem);\n }\n \n }\n\n return cartItems;\n\n }", "public final void setCart(final List<Item> cartNew) {\n this.cart = cartNew;\n }", "private void checkout(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws IOException {\n\t\tHttpSession hs = request.getSession();\n\t\t\n\t\tString quantity[] = request.getParameterValues(\"qty_name\");\n\t\ths.setAttribute(\"quantity\", quantity);\n\t\tList lqty = new ArrayList();\n\t\tfor(int i=0;i<quantity.length;i++)\n\t\t{\n\t\t\tSystem.out.println(quantity[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\tint loginId=Integer.parseInt(hs.getAttribute(\"userID\").toString());\n\t\tloginVO logVo=new loginVO();\n\t\tlogVo.setLogin_id(loginId);\n\t\t\n\t\tcityDAO cityDao=new cityDAO();\n\t\tList country=cityDao.search_country();\n\t\t\n\t\tUaddToCartDAO cartDao=new UaddToCartDAO();\n\t\tList user_data=cartDao.search_user_id(logVo);\n\t\t\n\t\ths.setAttribute(\"udata\", user_data);\n\t\ths.setAttribute(\"country\", country);\n\t\tresponse.sendRedirect(\"user/checkout.jsp\");\n\t\t\n\t\t\n\t\t\n\t}", "DetailedCart generateDetailedCart(Cart cart);", "@Override\n public TicketDTO buyCart() throws InvalidQuantityException, IOException, ProductNotFoundException {\n\n return catalogueRepository.buyCart();\n }", "@GlobalCommand\n\t@NotifyChange({\"cartItems\", \"shoppingCart\"})\n\tpublic void updateShoppingCart() {\n\t}", "public String getCartId()\n\t{\n\t\treturn getCartId( getSession().getSessionContext() );\n\t}", "public void checkout() {\n\t\t// checkout and reset the quantity in global product list\n\t\tfor (CartProduct product : Admin.products) {\n\t\t\ttry {\n\t\t\t\tfor (CartProduct cartProduct : cart.getProducts()) {\n\t\t\t\t\tif (product.getDescription().equals(cartProduct.getDescription())) {\n\t\t\t\t\t\tif(product.getQuantity() >= 1) {\n\t\t\t\t\t\t\tproduct.setQuantity(product.getQuantity() - 1); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tcart.deleteCart();\n\t}", "@Override\n public void loadCartProductsData() {\n mCartPresenter.loadCartProductsData();\n }", "private void printCurrentOrderMenu(Shop shop) {\n System.out.println(shop.orderListToString());\n }", "public void update(Object cart) {\n wrapper.clear();\r\n wrapper.add(createPanel(cart));\r\n }", "public void retrieveCardInventoryList() {\n try {\n systemResultViewUtil.setCardInventoryDataBeansList(cardInventoryTransformerBean.retrieveAllCardInventory());\n System.out.println(\"Retrive CardInventory Successfully\");\n } catch (Exception e) {\n System.out.println(e);\n System.out.println(\"Error in Retrive CardInventory\");\n }\n }", "public void clickCartPopupViewCart(){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- To Click the View cart button in the Shopping Cart popup \");\r\n\t\ttry{\r\n\t\t\tclick(locator_split(\"btnCartViewCart\"));\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Clicked on the View Cart Button in the shopping cart popup\");\r\n\t\t\tSystem.out.println(\"Clicked on the View Cart Button in the shopping cart popup\");\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- View Cart Button is not clicked in the shopping cart popup\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnCartViewCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void showPanel(String carta) {\n Application.saveData(Application.getApplication());\n Application.getApplication().checkFinance();\n Application.getApplication().checkExpired();\n\t\tCardLayout layout = (CardLayout)contentPane.getLayout();\n\t\tlayout.show(contentPane, carta);\n }", "private void viewProducts(){\n Database manager = new Database(this, \"Market\", null, 1);\n\n SQLiteDatabase market = manager.getWritableDatabase();\n\n Cursor row = market.rawQuery(\"select * from products\", null);\n\n if (row.getCount()>0){\n while(row.moveToNext()){\n listItem.add(row.getString(1));\n listItem.add(row.getString(2));\n listItem.add(row.getString(3));\n listItem.add(row.getString(4));\n }\n adapter = new ArrayAdapter(\n this, android.R.layout.simple_list_item_1, listItem\n );\n productList.setAdapter(adapter);\n } else {\n Toast.makeText(this, \"No hay productos\", Toast.LENGTH_SHORT).show();\n }\n }", "private void viewBackpack() {\n Item[] inventory = GameControl.getSortedInventoryList();\r\n \r\n System.out.println(\"\\n List of inventory Items\");\r\n System.out.println(\"Description\" + \"\\t\" + \r\n \"Required\" + \"\\t\" +\r\n \"In Stock\");\r\n \r\n // For each inventory item\r\n for (Item inventoryItem : inventory){\r\n // Display the description, the required amount and amount in stock\r\n System.out.println(InventoryItem.getType + \"\\t \" +\r\n InventoryItem.requiredAmount + \"\\t \" +\r\n InventoryItem.getQuantity);\r\n }\r\n \r\n }", "@RequestMapping(\"/queryMyCart\")\n public String queryMyCart(HttpSession httpSession, Model model) {\n if(httpSession.getAttribute(\"customer\")!=null){\n Integer customerId = ((Customer) httpSession.getAttribute(\"customer\")).getCustomerId();\n List<Contact> contactList = contactService.queryAllContact(customerId);\n System.out.println(contactList);\n //model.addAttribute(\"customer\", customer);\n model.addAttribute(\"contactList\", contactList);\n }\n\n return \"myCart\";\n }", "@RequestMapping(\"/emptycart\")\n public String emptycart(Model model, Principal principal){\n model.addAttribute(\"categories\", categoryRepository.findAll());\n model.addAttribute(\"user_id\", userRepository.findByUsername(principal.getName()).getId());\n\n\n return \"emptycart\";\n }", "@Override\n public void onClick(View v)\n {\n Card.addtoCard(new CardItem(content.get(position).getName(),\n content.get(position).getDescription(),\n content.get(position).getPrice(),(long) 1,\"None\",\n content.get(position).getPrice()));\n Toast.makeText(RecycleViewAdapter.this.mContext,\"Added to Cart\",Toast.LENGTH_LONG).show();\n }", "@RequestMapping(value=\"/pizza/customCart.html\")\r\n public ModelAndView customCart(\r\n String id,\r\n @CookieValue(value = \"v\", defaultValue = \"\") String visitorId,\r\n HttpServletRequest request,\r\n HttpServletResponse response) throws Exception {\n visitorManager.setCookieValue(visitorId);\r\n \r\n // Process the customisations\r\n List<Integer> customisations = new ArrayList<Integer>();\r\n for(Enumeration<String> i = request.getParameterNames(); i.hasMoreElements(); ){\r\n String key = i.nextElement();\r\n if (key.startsWith(\"cust\"))\r\n {\r\n int cust = Integer.parseInt(key.substring(4));\r\n customisations.add(cust);\r\n }\r\n }\r\n \r\n // Add the custom product to the order\r\n int[] ids = new int[customisations.size()];\r\n for(int i = 0; i < ids.length; i++)\r\n ids[i] = customisations.get(i).intValue();\r\n shoppingCart.addProduct(Integer.parseInt(id), ids);\r\n \r\n // Get the current order\r\n Order order = shoppingCart.getOrder();\r\n ModelAndView result = new ModelAndView(\"/pizza/cart\");\r\n result.addObject(\"order\", order);\r\n\r\n // Remember the visitor\r\n response.addCookie(new Cookie(\"v\", visitorManager.getCookieValue()));\r\n return result;\r\n }", "public ArrayList<PurchaseVO> showPurchase() {\n\t\treturn purchase.show();\r\n\t}", "public void showPurchase(Client c1) {\n\t\tfor(Book book: c1.getBuyBookList()) {\n\t\t\tSystem.out.println(\"Liste des livres acheté : \\nTitre : \" \n\t\t+ book.getTitle() + \"\\nAuteur : \" + book.getAuthor() + \"\\n\");\n\t\t}\n\t}", "@Override\n\t@Transactional\n\tpublic List<ShoppingCart> getListShoppingCart() {\n\t\treturn shoppingCartDao.getListShoppingCart();\n\t}", "@GetMapping(\"/basket\")\n public String getBasket(HttpServletRequest request, Model model) {\n Map<Product, Integer> productsInBasket = basketService.getProductsInBasket(request);\n model.addAttribute(\"items\", productsInBasket);\n try {\n Client clientForView = clientService.getClientForView();\n model.addAttribute(\"addresses\", clientForView.getAddressList());\n model.addAttribute(\"client\", clientForView);\n model.addAttribute(\"addressesSelf\", orderService.getAllShops());\n } catch (ClassCastException ex) {\n logger.info(\"Not authorized attempt to go to the basket page\");\n }\n logger.info(\"Go to basket page\");\n return \"basket\";\n }", "@RequestMapping(\"mall/cart_list.do\")\n\tpublic String cart_list(\n\t\t\tHttpServletRequest request,\n\t\t\tModel model\n\t\t\t) throws UnknownHostException {\n\t\tMap<String, Object> map = topInfo(request);\n\t\tint pageNumber = (int) map.get(\"pageNumber\");\n\t\tint no = (int) map.get(\"no\");\n\t\tString search_option = (String) map.get(\"search_option\");\n\t\tString search_data = (String) map.get(\"search_data\");\n\t\t\n\t\tint pageSize = 10;\n\t\tint blockSize = 10;\n\t\tint totalRecord = cartDao.getTotalRecord();\n\t\tint[] pagerArray = util.pager(pageSize, blockSize, totalRecord, pageNumber);\n\t\tint jj = pagerArray[0];\n\t\tint startRecord = pagerArray[1];\n\t\tint lastRecord = pagerArray[2];\n\t\tint totalPage = pagerArray[3];\n\t\tint startPage = pagerArray[4];\n\t\tint lastPage = pagerArray[5];\n\t\t\n\t\tList<CartDTO> list = cartDao.getList(startRecord, lastRecord);\n\t\t\n\t\tmodel.addAttribute(\"menu_gubun\", \"cart_list\");\n\t\tmodel.addAttribute(\"list\", list);\n//\t\tmodel.addAttribute(\"pageNumber\", pageNumber);\n\t\tmodel.addAttribute(\"pageSize\", pageSize);\n\t\tmodel.addAttribute(\"blockSize\", blockSize);\n\t\tmodel.addAttribute(\"totalRecord\", totalRecord);\n\t\tmodel.addAttribute(\"jj\", jj);\n\t\tmodel.addAttribute(\"startRecord\", startRecord);\n\t\tmodel.addAttribute(\"lastRecord\", lastRecord);\n\t\tmodel.addAttribute(\"totalPage\", totalPage);\n\t\tmodel.addAttribute(\"startPage\", startPage);\n\t\tmodel.addAttribute(\"lastPage\", lastPage);\n\t\t\n\t\treturn \"shop/mall/cart_list\";\n\t}", "private void viewSavedCourseList() {\n boolean detailed = yesNoQuestion(\"Would you like to look at the detailed version? (just names if no)\");\n\n System.out.println(\"The current active courses are:\\n \");\n for (int i = 0; i < courseList.getCourseList().size(); i++) {\n if (detailed) {\n System.out.println((i + 1) + \":\");\n detailedCoursePrint(courseList.getCourseList().get(i));\n } else {\n System.out.println((i + 1) + \": \" + courseList.getCourseList().get(i).getName());\n }\n }\n }", "public List<Publication> getShoppingCart() {\n return Collections.unmodifiableList(shoppingCart);\n }", "public interface ICartView {\r\n void loadViewCart(List<Product> cart,List<String> list);\r\n void loadFailView();\r\n\r\n void removeItemCart(int position);\r\n\r\n void reloadView(int quantity, int position);\r\n\r\n}" ]
[ "0.83849317", "0.8279616", "0.7972255", "0.7551765", "0.7239961", "0.72003335", "0.71291995", "0.69074184", "0.68898916", "0.68806607", "0.68702716", "0.6834814", "0.66766393", "0.66004646", "0.6534031", "0.6475991", "0.6473123", "0.6416568", "0.638857", "0.638214", "0.6370115", "0.63414264", "0.6302961", "0.6298183", "0.6265839", "0.6248496", "0.6179003", "0.61607957", "0.6139811", "0.6136771", "0.6114858", "0.6106025", "0.6085678", "0.60599434", "0.6052543", "0.60316974", "0.60186493", "0.60101163", "0.6004236", "0.5973967", "0.59625787", "0.5950678", "0.5947272", "0.59465986", "0.5935911", "0.5913669", "0.5894594", "0.5878257", "0.5858744", "0.58391833", "0.5832017", "0.5823688", "0.58170253", "0.58135897", "0.57967865", "0.5785622", "0.5767695", "0.5752853", "0.573666", "0.5727019", "0.57228595", "0.57126266", "0.57096034", "0.570289", "0.57027024", "0.5691444", "0.56812584", "0.56794286", "0.56705546", "0.5653643", "0.5647278", "0.5640617", "0.563156", "0.5615155", "0.56082606", "0.5600947", "0.5597858", "0.55803806", "0.5577797", "0.557562", "0.55703884", "0.5569935", "0.55625856", "0.55605567", "0.55597776", "0.55382395", "0.55309033", "0.5530605", "0.55297285", "0.5519055", "0.5518749", "0.55123276", "0.5505257", "0.5504329", "0.54866445", "0.5478452", "0.5477834", "0.5474354", "0.5472965", "0.54725045" ]
0.6688758
12
Remove a product from the cart
@DeleteMapping(value = "/deleteproduct") public ResponseEntity<String> deleteProduct(@RequestBody String productName, final HttpSession session) { log.info(session.getId() + " : Reviewing the initial cart"); Map<String, CartProduct> initialCart = (Map<String, CartProduct>) session.getAttribute(CART_SESSION_CONSTANT); //check if the cart is empty ControllerUtils.checkEmptyCart(initialCart, session.getId()); if (!initialCart.containsKey(productName)) { log.error(session.getId() + " : Error removing product not present in the cart"); throw new ProductNotFoundException(productName); } log.info(session.getId() + " : Remove the product from the cart"); initialCart.remove(productName); session.setAttribute(CART_SESSION_CONSTANT, initialCart); return ResponseEntity.status(HttpStatus.OK).body("Product " + productName + " removed"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeProduct(Product product);", "private void removeProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id - \");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id - \");\n\t\t\t}\n\t\t\tCartController.getInstance().removeProductFromCart(productId);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}", "public void RemoveproductCartSaucedemo() {\n\t\t\t\t\tdriver.findElement(RemoveProduct).click();\n\t\t\n\t\t\t\t}", "ShoppingBasket removeProductItem(Long shoppingBasketId, Long productItemId);", "public void removeItem(Product p) throws IOException {\n for(Product l: this.cartContents)\n System.out.println(l.getProductName());\n this.cartContents.remove(p);\n this.saveCart();\n }", "void removeCartItem(int cartItemId);", "void removeProduct(int position) throws ProductNotFoundException;", "private void removeProduct(int id)\n {\n manager.removeProduct(id);\n }", "public void removeProduct(Product item) {\n inventory.remove(item);\n }", "public void removeTopProductFromCart() {\n\t\tWebElement result=null;\n\t\tString xpath=buildXPathToRemove(1);\n\t\tresult = selenium.findElement(By.xpath(xpath));\n\t\tresult.click();\n\t}", "public void deleteProduct(CartProduct p) {\n\t\tcart.deleteFromCart(p);\n\t}", "Cart deleteFromCart(String code, Long quantity, String userId);", "private static void removeItemFromCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t it.remove();\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item removed from the cart successfully\");\r\n\t\tSystem.out.println();\r\n\t}", "public static void removeProductInCart(Cart cart, CartGyftyProduct cartProduct) {\n\n GyftyProductsGroup productGrp = cart.getProducts();\n if (productGrp.getGyftyProductGroup().size() > 0) {\n productGrp.removeGyftyProductsFromGrp(cartProduct.getGyftyProduct());\n try {\n productGrp.save();\n } catch (ParseException e) {\n Log.e(\"CartHelper\", \"CartHelper unable to remove product from productGrp\", e);\n }\n }\n int indexToRemove = 0;\n for(ProductPriceRow pprow : cart.productPrice) {\n if (pprow.getProduct().getGyftyProduct().equals(cartProduct.getGyftyProduct())\n && pprow.getProduct().getSellerNotes().equals(cartProduct.getSellerNotes())) {\n break;\n }\n indexToRemove++;\n }\n cart.productPrice.remove(indexToRemove);\n calculateTotal(cart);\n }", "ResponseEntity<Cart> removeCartItem(CartFormData formData);", "public static void removeProduct(Scanner input) {\n\n\t\tif (basket.isEmpty()) {\n\t\t\tSystem.out.println(\"No products in you basket yet.\");\n\t\t\treturn;\n\t\t} else {\n\n\t\t\tSystem.out.println(\"In your basket you have:\");\n\n\t\t\tshowBasket();\n\n\t\t\tSystem.out.println(\"Enter the ID of the product you don't want.\");\n\n\t\t\tint productId = productValidation(input, basket);\n\n\t\t\tint productQuantity = 0;\n\n\t\t\tif (basket.get(productId).getQuantity() > 1) {\n\n\t\t\t\tSystem.out.printf(\"You have more than one %s.%n\", basket.get(productId).getName());\n\t\t\t\tSystem.out.println(\"Press 1 to remove all or 2 to remove some.\");\n\n\t\t\t\tif (TwoOptiosValidation.check(input) == 1) {\n\t\t\t\t\tbasket.remove(productId);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"How many would you like to remove?\");\n\t\t\t\t\tproductQuantity = quantityValidation(input, productId, basket);\n\t\t\t\t\tif (productQuantity == basket.get(productId).getQuantity()) {\n\t\t\t\t\t\tbasket.remove(productId);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbasket.get(productId).setQuantity(basket.get(productId).getQuantity() - productQuantity);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbasket.remove(productId);\n\t\t\t}\n\n\t\t\tProductsList.cancelOrder(productId, productQuantity);\n\n\t\t\tSystem.out.println(\"Done\");\n\n\t\t}\n\n\t\tSystem.out.println();\n\n\t}", "public void removeProduct(SiteProduct product) {\n dataProvider.delete(product);\n }", "private void removeAllWeightBasedProduct(Product product){\n total-= cartItems.get(product.name).cost();\n noOfItems--;\n cartItems.remove(product.name);\n }", "public void removeProduct(int id)\n {\n Product product = findProduct(id);\n \n System.out.println(\"Removing product \" + product.getName() +\n \" from the stock list\");\n \n if(product != null)\n {\n stock.remove(product);\n }\n }", "@Override\r\n public void removeProduct(ProductBarcode code) throws NoSuchElementException\r\n {\r\n \tif (products.contains(code))\r\n {\r\n products.remove(code);\r\n }\r\n else\r\n {\r\n throw new NoSuchElementException(\"Product not in this container!\");\r\n }\r\n }", "public void remove(int index){\n if (myBasket.size() == 0)\n System.out.println(\"List is empty.\");\n int i = 0 ;\n boolean isFound = false;\n Product toRemove = null;\n for (Product product: myBasket.keySet())\n {\n i++;\n if (i == index && myBasket.get(product) > 0)\n {\n isFound = true;\n toRemove = product;\n break;\n\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index!\");\n\n // now , checking how many of this product is in the basket\n\n else if (myBasket.get(toRemove) > 1){\n System.out.println(\"How many of this product do you want to give back?\");\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n if (num < myBasket.get(toRemove)) {\n totalCost -= toRemove.getPrice() * num;\n myBasket.replace(toRemove,myBasket.get(toRemove) - num);\n for (int j = 0 ; j < num ; j++)\n inventory.updateStock(toRemove , '+');\n }\n else {\n totalCost -= toRemove.getPrice() * myBasket.get(toRemove);\n myBasket.remove(toRemove);\n for (int j = 0 ; j < myBasket.get(toRemove) ; j++)\n inventory.updateStock(toRemove,'+');\n }\n System.out.println(\"Product removed.\");\n }\n\n // there is just one of this product in basket\n\n else {\n totalCost -= toRemove.getPrice();\n myBasket.remove(toRemove);\n System.out.println(\"Product removed.\");\n inventory.updateStock(toRemove , '+');\n }\n }", "public void removeItem(Product p) throws ProductNotFoundException {\n\t\tif (!_items.remove(p)) {\n\t\t\tthrow new ProductNotFoundException(\"No existeix producte\");\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}", "public void removeAllVariantBasedProduct(Product product){\n /*\n Using for loop because we want to delete all the variants of that particular product\n */\n for(Variant variant : product.variants){\n String key = product.name + \" \" + variant.name;\n if(cartItems.containsKey(key)){\n total-= cartItems.get(key).cost();\n noOfItems--;\n cartItems.remove(key);\n }\n }\n }", "@Test(groups = \"suite2-2\", dependsOnMethods = \"addItemToCart\")\n\tpublic void removeItemFromCart() {\n\n\t\tdriver.get(CART_URL);\n\n\t\tWebElement itemInCartMessage = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"checkout-header\\\"]/H1\"));\n\n\t\tassertEquals(itemInCartMessage.getText().trim().substring(0, 1), \"1\",\n\t\t\t\t\"1 item expected in cart\");\n\n\t\tWebElement clearButton = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/FORM[1]/H2/SPAN[2]/A\"));\n\n\t\tclearButton.click();\n\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\n\t\ttry {\n\t\t\twait.until(ExpectedConditions.presenceOfElementLocated(By\n\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"newempty\\\"]/DIV\")));\n\t\t} catch (NoSuchElementException e) {\n\t\t\tfail(\"Cart should be empty\");\n\t\t}\n\t}", "@RequestMapping(\n method = RequestMethod.DELETE,\n path = \"{productId}\"\n )\n public void deleteProductFromShoppingCartById(@PathVariable(\"productId\") UUID productId){\n shoppingCartService.deleteProductFromShoppingCartById(productId);\n }", "public void deleteProduct(Product product) {\n allProducts.remove(product);\n }", "public synchronized void deleteItem(Product product){\n carrito.set(product.getId(), null);\n }", "public void deleteFromCart(int product_code) {\n\t\tif(validateItem(product_code, 1) ||\n\t\t user_cart.deleteFromCart(product_code) ){\n\t\t\tdisplayMessage(\"Product deleted from cart. View Cart?\");\n\t\t}else {\n\t\t\tdisplayMessage();\n\t\t}\n\t}", "public void removeItem() {\r\n\t\tlog.info(\"Remove item\");\r\n\t\tsu.waitElementClickableAndClick(LocatorType.Xpath, CartSplitViewField.Remove.getName());\r\n\t}", "@Override\r\n\tpublic int deleteProduct(Product product) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void remove(Long id) {\n\t\tproductRepository.delete(id);\n\t}", "public void Deleteproduct(Product objproduct) {\n\t\t\n\t}", "public void removeFromCart(final Item item) {\n for (Item f : cart) {\n if (f.getName().equals(item.getName())) {\n if (\n f.getQuantity() == item.getQuantity()) {\n cart.remove(f);\n return;\n }\n f.setQuantity(f.getQuantity() - item.getQuantity());\n return;\n }\n }\n }", "void deleteProduct(Product product) throws ServiceException;", "public boolean delete(Product product) {\n return cartRepository.delete(product);\n }", "void deleteProduct(Integer productId);", "public boolean removeAndCheck(String product) {\n\t\tif(this.product.contains(product)) {\n\t\t\tthis.product.remove(product);\n\t\t\tif(!this.product.isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"This item is not in the cart.\");\n\t\t\treturn false;\n\t\t}\n\t\t//TODO Create a new method that will check for it.\n\t}", "public boolean removeProductFromWishlist(String productId) {\n\t\t// TODO Auto-generated method stub\n\t\tboolean result=false;\n\t\tif(WishlistDaoImpl.wlist.get(productId) != null)\n\t\t{\n\t\t\n\t\t\tresult=WishlistDaoImplObj.removeProductFromWishlist(productId);\n\t\t\treturn result;\n\t\t}\n\t\telse\n\t\t{ \n\t\t\tint x=3;\n\t\t\tint y=0;\n\t\t\tint z=x/y;\n\t\t\treturn false;\n\t\t\n\t\t\t//throw new WishListException(\"Product ID not found in Wishlist to REMOVE\");\n\t\t}\n\t\n}", "public void deleteProduct(Product product) throws BackendException;", "public String removeItem() {\n userFacade.printUsersCart(user);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n //user.getCart().remove(selectedItem);\n userFacade.removeFromCart(user, selectedItem);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n userFacade.printUsersCart(user);\n return \"\";\n }", "public void decrement(Product product, Variant variant) {\n String key = product.name + \" \" + variant.amount;\n\n //Update cart quantity\n cartItems.get(key).quantity--;\n\n //Update cart Summary\n total -= variant.price;\n noOfItems--;\n\n //Remove a function when if quantity = 0\n if (cartItems.get(key).quantity == 0)\n cartItems.remove(key);\n }", "@GetMapping(\"/remove-cart/{id}\")\r\n\tpublic String removeCart(@PathVariable(\"id\") long id) {\r\n\t\tlog.info(\"removeCart -Start\");\r\n\t\tservice.removeCartItem( id);\r\n\t\tlog.info(\"removeCart -End\");\r\n\t\treturn \"Succesfully removed\";\r\n\t}", "public boolean removeProduct(int productToRemove_id) \n\t{\n\t\treturn false;\n\t}", "public void removeProduct(ProductBarcode code) throws NoSuchElementException;", "void deleteProduct(Long id);", "private void eliminarProducto(HttpServletRequest request, HttpServletResponse response) {\n\t\tString codArticulo = request.getParameter(\"cArticulo\");\n\t\t// Borrar producto de la BBDD\n\t\ttry {\n\t\t\tmodeloProductos.borrarProducto(codArticulo);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Volver al listado con la info actualizada\n\t\tobtenerProductos(request, response);\n\n\t}", "private void removeProducto(int position) {\n losproductos.remove(position);\n // Notificamos de un item borrado en nuestro array\n eladaptador.notifyItemRemoved(position);\n }", "@Override\n public void removeCart(Items cartItem) {\n cartItem.setItemQuantity(cartItem.getItemQuantity() - 1);\n if (cartItem.getItemQuantity() == 0) {\n mCartAdapter.getmCartItemsList().remove(cartItem);\n }\n Items menuItem = cartItem.getItemOriginalReference();\n menuItem.setItemQuantity(menuItem.getItemQuantity() - 1);\n updateCartMenu();\n }", "public void decrement(Product product, Variant variant) {\n String key = product.name + \" \" + variant.name;\n cartItems.get(key).qty--;\n total -= variant.price;\n if (cartItems.get(key).qty == 0) {\n cartItems.remove(key);\n noOfItems--;\n }\n }", "public void removeItemCart(int code) {\n\t\tfor (ItemCart itemCart : listItemcart) {\n\t\t\tif (itemCart.getP().getId() == code) {\n\t\t\t\tlistItemcart.remove(itemCart);\n\t\t\t}\n\t\t}\n\t}", "public boolean removeProduct(Product p) {\n\tsynchronized (this.productList) {\n\t boolean returned = this.productList.remove(p);\n\t this.setChanged();\n\t this.notifyObservers();\n\t return returned;\n\t}\n }", "@Test\r\n\tvoid testdeleteProductFromCart() throws Exception\r\n\t{\r\n\t\tCart cart=new Cart();\r\n\t\tcart.setProductId(1001);\r\n\t\tcartdao.addProductToCart(cart);\r\n\t\tList<Cart> l=cartdao.findAllProductsInCart();\r\n\t\tcart=cartdao.deleteProductByIdInCart(1001);\r\n\t\tassertEquals(1,l.size());\r\n\t}", "public void deleteProduct(Product product_1) {\n\r\n\t}", "@Transactional\n public void deleteProduct(Integer productId) {\n ProductEntity productEntity = productRepository\n .findById(productId)\n .orElseThrow(() -> new NotFoundException(getNotFoundMessage(productId)));\n productEntity.setRemoved(true);\n productRepository.save(productEntity);\n cartRepository.deleteRemovedFromCart(productId);\n }", "@Test\n public void testRemoveItem() throws Exception {\n \n System.out.println(\"RemoveItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n fail(\"No existe\");\n \n }*/\n \n /*---------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n assertTrue(instance.isEmpty());\n \n }\n \n }", "@Override\n\tpublic void deleteProduct(int product_id) {\n\n\t}", "public void eliminar(Producto producto) throws BusinessErrorHelper;", "@SuppressWarnings(\"unused\")\n\tpublic void removeFromShoppingCart(BarcodedItem item, int quantity) {\n\t\t\n\t\tBarcodedProduct prod = ProductDatabases.BARCODED_PRODUCT_DATABASE.get(item.getBarcode());\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tfor (int j = 0; j < SHOPPING_CART_ARRAY.length; j++) {\n\t\t\t\tif (prod.getDescription().equals(SHOPPING_CART_ARRAY[j][0]) && \n\t\t\t\t\t\tInteger.toString(quantity).equals(SHOPPING_CART_ARRAY[j][1])) {\n\t\t\t\t\tSHOPPING_CART_ARRAY[j][0] = null;\n\t\t\t\t\tSHOPPING_CART_ARRAY[j][1] = null;\n\t\t\t\t\ttotalNumOfItems = totalNumOfItems - quantity;\n\t\t\t\t\tdecreaseTotalPayment(item, quantity);\n\t\t\t\t\tBARCODE_ARRAY[j] = null;\n\t\t\t\t\tBARCODEDITEM_ARRAY[j] = null;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} \n\t\t} catch (NullPointerException e) {\n\t\t\tthrow new SimulationException(e);\n\t\t}\n\n\n\t}", "public void delete(Product product) {\n\t\tif (playerMap.containsKey(product.getOwner())) {\n\t\t\tplayerMap.get(product.getOwner())[product.getSlot()] = null;\n\t\t}\n\t\tMap<Integer, Set<Product>> itemMap = typeMap.get(product.getType()).get(product.getState());\n\t\tif (itemMap.containsKey(product.getItemId())) {\n\t\t\titemMap.get(product.getItemId()).remove(product);\n\t\t}\n\t}", "void deleteProduct(int productId) throws ProductException;", "public void deletesingleCart(ProductDetail productDetail) {\n SQLiteDatabase db = helper.getWritableDatabase();\n db.delete(DatabaseConstant.TABLE_NAME_CART, DatabaseConstant.TABLE_CART_ID + \" = ?\",\n new String[]{String.valueOf(productDetail.getId())});\n db.close();\n }", "private void deleteProduct() {\n // Only perform the delete if this is an existing Product.\n if (mCurrentProductUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentProductUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentProductUri, 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_product_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_product_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "@Override\n public void removeMenu(Items item) {\n int index = getCartIndex(item);\n if (index >= 0) {\n Items cartItem = mCartAdapter.getmCartItemsList().get(index);\n cartItem.setItemQuantity(cartItem.getItemQuantity() - 1);\n if (cartItem.getItemQuantity() == 0) {\n mCartAdapter.getmCartItemsList().remove(index);\n }\n// else {\n// mCartAdapter.getmCartItemsList().set(index, cartItem);\n// }\n item.setItemQuantity(item.getItemQuantity() - 1);\n updateCartMenu();\n } else { // Duplicate item available in cart\n Toast.makeText(OrderOnlineActivity.this, getResources().getString(R.string.multiple_customisation_error), Toast.LENGTH_LONG).show();\n }\n }", "@Test\r\n\tpublic void remove_items() {\r\n//Go to http://www.automationpractice.com\r\n//Mouse hover on product one\r\n//Click 'Add to Cart'\r\n//Click 'Continue shopping' button\r\n//Verify Cart has text '1 Product'\r\n//Mouse hover over 'Cart 1 product' button\r\n//Verify product listed\r\n//Now mouse hover on another product\r\n//click 'Add to cart' button\r\n//Click on Porceed to checkout\r\n//Mouse hover over 'Cart 2 product' button\r\n//Verify 2 product listed now\r\n//click 'X'button for first product\r\n//Verify 1 product deleted and other remain\r\n\r\n\t}", "@Override\n public void removeFromCart(Publication book) {\n if(shoppingCart.contains(book)){\n shoppingCart.remove(book);\n } else throw new NoSuchPublicationException();\n }", "public void removeItem(int position) {\n cartList.remove(position);\n notifyItemRemoved(position);\n }", "@Override\n\tpublic boolean deleteShopCartItem(int cart) {\n\t\treturn false;\n\t}", "public void removeCart(int userId) {\n try {\n int cartId = InputUtil.getInt(\"Enter cart Id : \");\n Cart cart = cartService.getCart(cartId);\n cartService.checkUserCart(cart,userId);\n cartService.removeCart(cartId);\n System.out.println(Constants.DECOR+\"CART REMOVED : \"+String.valueOf(cartId)+Constants.DECOR_END);\n } catch (CartException ex) {\n System.out.println(ex);\n } \n }", "public void removeFromCart(String code, float price) {\n if(itemExists(code)) {\n int currentQuantity = cart.get(code);\n if(currentQuantity == 1) {\n cart.remove(code);\n } else {\n cart.put(code, cart.get(code) - 1);\n }\n }\n total -= price;\n }", "private void deleteProduct() {\n // Only perform the delete if this is an existing product.\n if (currentProductUri != null) {\n // Call the ContentResolver to delete the product at the given content URI.\n // Pass in null for the selection and selection args because the currentProductUri\n // content URI already identifies the product that we want.\n int rowsDeleted = getContentResolver().delete(currentProductUri, null, null);\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.no_deleted_products),\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_product_successful), Toast.LENGTH_SHORT).show();\n }\n }\n finish();\n }", "public static void removeItem(int id){\n\t\tif(!userCart.containsKey(id)){\n\t\t\tSystem.out.println(CartMessage.INVALID_ID);\n\t\t}\n\t\telse{\n\t\t\tuserCart.remove(id);\n\t\t\tSystem.out.println(CartMessage.ITEM_REMOVED);\n\t\t}\n\t}", "public void deleteCartRow() {\n CarComponent selectedRow = cartTable.getSelectionModel().getSelectedItem();\n cartTable.getItems().remove(selectedRow);\n componentsCart.remove(selectedRow);\n\n updateTotal();\n }", "public RemoveProductCart(WebDriver driver) {\n\t\tthis.driver=driver;\n\t}", "public void deleteProduct(Product product){\n\t\tdao.deleteProduct(product);\n\t}", "@Override\r\n public boolean removeProductQuantity(Product product, int quantity) {\r\n int stock;\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n stock = this.productQuantity.get(i);\r\n\r\n //checks if quantity value is invalid or if not enough stocks\r\n if (quantity <= 0 || stock < quantity) {\r\n this.productQuantity.set(i, 0);\r\n return true;\r\n }\r\n this.productQuantity.set(i, stock - quantity);\r\n return true;\r\n }\r\n i++;\r\n }\r\n return false;\r\n }", "@DeleteMapping(\"/products/{id}\")\n\tpublic List<Product> removeOneProduct(@PathVariable(\"id\") int id){\n\t\t//counter for loop \n\t\tfor (int i=0; i < products.size(); i++) {\n\t\t\tif (products.get(i).getId() == id) {\n\t\t\t\tproducts.remove(i);\n\t\t\t\treturn products;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new ProductNotFoundException();\n\t\t\n\t}", "public void deleteProduct() {\n deleteButton.click();\n testClass.waitTillElementIsVisible(emptyShoppingCart);\n Assert.assertEquals(\n \"Message is not the same as expected\",\n MESSAGE_EMPTY_SHOPPING_CART,\n emptyShoppingCart.getText());\n }", "public void removeProductFromWishlist(ProductItem product, User user) {\n this.removeProductFromWishlist(product, this.getWishlistByUser(user));\r\n }", "@Test\n void deleteTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes two apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 2);\n //then basket contains two apples\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertTrue(result);\n assertEquals(2, appleNb);\n }", "public boolean removeProduct(Product toRemove) {\n\t\tboolean success = this.products\n\t\t\t\t.remove(toRemove);\n\n\t\treturn success;\n\t}", "public void deleteProduct(Product product)\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n // Sets up the WHERE condition of the SQL statement\n String condition = String.format(\" %s = ?\", ShoppingListTable.KEY_TPNB);\n\n // Stores the values of the WHERE condition\n String[] conditionArgs = { String.valueOf(product.getTPNB()) };\n\n db.delete(ShoppingListTable.TABLE_NAME, condition, conditionArgs);\n }", "@Override\n\tpublic void removeOrderLine(int cartIndex) {\n\t\t\n\t}", "void delete(Product product) throws IllegalArgumentException;", "public void removeOrderItem(int prodID)\r\n\t{\r\n\t\t//create temporary variables\r\n\t\tOrderItem temp;\r\n\t\tint test = 0;\r\n\r\n\t\t//iterate through list and compare product ID of each item against the \r\n\t\t//parameter, then remove any items that match\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++) \r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttest = temp.getProductID();\r\n\t\t\tif (test == prodID) \r\n\t\t\t{\r\n\t\t\t\torderItemList.remove(x);\r\n\t\t\t} //end if\r\n\t\t} //end for\t\t\r\n\t}", "public int removeProduct(String product) {\n Collection<String> collection = shoppingBasket.keySet();\n\n for (String key : collection) {\n if (key != null) {\n if (product.equals(key) == true) {\n // нашли наше значение равное ключу\n shoppingBasket.remove(product);\n return 1;\n } else {\n return 0;\n }\n }\n }\n return 0;\n }", "public void deleteProduct()\n {\n ObservableList<Product> productRowSelected;\n productRowSelected = productTableView.getSelectionModel().getSelectedItems();\n int index = productTableView.getSelectionModel().getFocusedIndex();\n Product product = productTableView.getItems().get(index);\n if(productRowSelected.isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please select the Product you want to delete.\");\n alert.show();\n } else if (!product.getAllAssociatedParts().isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"This Product still has a Part associated with it. \\n\" +\n \"Please modify the Product and remove the Part.\");\n alert.show();\n } else {\n alert.setAlertType(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete this Product?\");\n alert.showAndWait();\n ButtonType result = alert.getResult();\n if(result == ButtonType.OK)\n {\n Inventory.deleteProduct(product);\n }\n }\n }", "public void clearCart() {\n this.items.clear();\n }", "public void eliminar(Producto producto) throws IWDaoException;", "public SimpleProductWithSpecialPriceDetailPage removeProductGalleryFromSimpleProducttWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new SimpleProductWithSpecialPriceDetailPage();\n }", "public JavaproductModel deleteproduct(JavaproductModel oJavaproductModel){\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 product from the database*/\n oJavaproductModel = (JavaproductModel) hibernateSession.get(JavaproductModel.class, oJavaproductModel.getproductId());\n\n /* Delete any collection related with the existing product from the database.\n Note: this is needed because some hibernate versions do not handle correctly cascade delete on collections.*/\n oJavaproductModel.deleteAllCollections(hibernateSession);\n\n /* Delete the existing product from the database*/\n hibernateSession.delete(oJavaproductModel);\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }", "public void removeItem(int position) {\r\n productList.remove(position);\r\n notifyItemRemoved(position);\r\n }", "@Override\n\tpublic int deleteProduct(String productNo) {\n\t\treturn 0;\n\t}", "public void removeAllCartItems(Cart cart) {\n\t\t\t\r\n\t\t}", "public void clickRemoveButton_SPOItem(int noitemremove) {\n for (int i = 1; i <= noitemremove; i++) {\n WebElement clickremove = getDriver().findElement(By.xpath(\"//*[@id='productGroup_2']/li[\" + i + \"]//a[text()='Remove']\"));\n String nameofproduct = getDriver().findElement(By.xpath(\"//*[@id='productGroup_2']/li[\" + i + \"]//*[@class='product_name']/span\")).getText();\n clickremove.click();\n System.out.println(\"=== Name of the product Removed: \" + nameofproduct);\n listOfDeletedItemNameShoppingCart.add(nameofproduct);\n }\n }", "public void removeProductFromWishlist(Product product, long accountId) {\n wishlistService.removeProduct(product, accountId);\n }", "public SimpleProduct3WithSpecialPriceDetailPage removeProductGalleryFromSimpleProduct3tWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new SimpleProduct3WithSpecialPriceDetailPage();\n }", "@Override\n\tpublic boolean deleteShopCart(int cart) {\n\t\treturn false;\n\t}", "private void deleteProduct(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException {\n\t\tString theProduct=request.getParameter(\"deleteProduct\");\n\t\tdaoPageAdmin.DeleteProduct(theProduct);\n\t\tloadProduct(request, response);\n\t}", "private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed\n if(tblOrders.getSelectedRow() == -1)\n {\n lblMessage.setText(\"Select Product First\");\n }\n else\n {\n DefaultTableModel model = (DefaultTableModel)tblOrders.getModel();\n int productId = \n Integer.parseInt(String.valueOf(model.getValueAt(tblOrders.getSelectedRow(), 0)));\n \n loggedInCustomer.findLatestOrder().removeOrderLine(productId);\n \n model.removeRow(tblOrders.getSelectedRow());\n \n lblMessage.setText(\"Product Has Been Removed\");\n lblTotalCost.setText(\"£\" + String.format(\"%.02f\",loggedInCustomer.findLatestOrder().getOrderTotal()));\n }\n }" ]
[ "0.8261058", "0.80081296", "0.7754476", "0.76727986", "0.75819707", "0.75423974", "0.7534745", "0.74525464", "0.73434323", "0.72808635", "0.72352403", "0.7141418", "0.71259403", "0.7094623", "0.69780266", "0.6972037", "0.696461", "0.6938921", "0.69327086", "0.69302046", "0.6916336", "0.6903253", "0.68918914", "0.6891868", "0.6871188", "0.6805521", "0.67897624", "0.67872846", "0.67860335", "0.6783861", "0.674436", "0.6741195", "0.6726447", "0.6722392", "0.6720032", "0.6719091", "0.670513", "0.66745955", "0.66721034", "0.6644926", "0.66429496", "0.66332877", "0.6617569", "0.6610225", "0.660578", "0.659852", "0.65970594", "0.65951234", "0.6584147", "0.6558935", "0.65561306", "0.65555096", "0.6554077", "0.6549544", "0.65492874", "0.6545534", "0.65214413", "0.6506563", "0.6498337", "0.64769673", "0.64738715", "0.6468135", "0.64592624", "0.64470804", "0.64458734", "0.64162934", "0.64096576", "0.6403823", "0.6399773", "0.6369523", "0.63663375", "0.6365668", "0.63653153", "0.6360525", "0.63484055", "0.63391495", "0.6332152", "0.63295656", "0.63166803", "0.6312854", "0.6281254", "0.6267832", "0.62629193", "0.6259904", "0.624591", "0.6229233", "0.622673", "0.62266946", "0.6226537", "0.62251073", "0.6214065", "0.6198051", "0.6194974", "0.6191599", "0.6189709", "0.61877614", "0.61798877", "0.6169003", "0.6167083", "0.61612713" ]
0.66976064
37
the subfolders Construct root folder.
public TaskFolder(TaskFolder parent, String name, String description) { super(parent, name, description, null); this.tasks = new ArrayList<Task>(); this.folders = new ArrayList<TaskFolder>(); if (parent != null) parent.addFolder(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String[] getBaseFolders();", "@Override\n\tpublic Iterable<Path> getRootDirectories() {\n\t\treturn null;\n\t}", "@Override\n protected void createRootDir() {\n }", "protected abstract String childFolderPath();", "public static String getRootFolderName() {\n\n return rootFolderName;\n }", "public static void setRootDir() {\n for(int i = 0; i < rootDir.length; i++){\n Character temp = (char) (65 + i);\n Search.rootDir[i] = temp.toString() + \":\\\\\\\\\";\n }\n }", "public folderize() {\n }", "public String getRootFolder() {\n return m_RootFolder;\n }", "private TreeItem<FilePath> createTreeRoot() {\n TreeItem<FilePath> root = new TreeItem<>(new FilePath(Paths.get(ROOT_FOLDER)));\n root.setExpanded(true);\n return root;\n }", "String folderPath();", "public ArrayList<FolderDTO> templateGetFoldersByParent(Long idParent)\n\t{\n\t\tArrayList<FolderDTO> returnList = new ArrayList<>();\n\t\tFolderDAO dao = new FolderDAO();\n\t\tCollection<Folder> folderSub = dao.getByParent(idParent);\n\t\t\n\t\tfor(Folder folder:folderSub){\n\t\t\tFolderDTO folderDto = new FolderDTO();\n\t\t\tfolderDto.setId(folder.getId());\n\t\t\tfolderDto.setTitle(folder.getTitle());\n\t\t\treturnList.add(folderDto);\n\t\t}\n\t\t\n\t\treturn returnList;\n\t}", "public void setRootFolder(String folder) {\n m_RootFolder = folder;\n }", "Folder createFolder();", "public String getFolders()\r\n\t{\r\n\t\tIrUser user = userService.getUser(userId, false);\r\n\t\tif( !item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) && \r\n\t\t\t\t!institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId))\r\n\t\t{\r\n\t\t return \"accessDenied\";\r\n\t\t}\r\n\t\tif(parentFolderId != null && parentFolderId > 0)\r\n\t\t{\r\n\t\t folderPath = userFileSystemService.getPersonalFolderPath(parentFolderId);\r\n\t\t}\r\n\t\t\r\n\t\tCollection<PersonalFolder> myPersonalFolders = userFileSystemService.getPersonalFoldersForUser(userId, parentFolderId);\r\n\t\t\r\n\t\tCollection<PersonalFile> myPersonalFiles = userFileSystemService.getPersonalFilesInFolder(userId, parentFolderId);\r\n\t\t\r\n\t fileSystem = new LinkedList<FileSystem>();\r\n\t \r\n\t for(PersonalFolder o : myPersonalFolders)\r\n\t {\r\n\t \tfileSystem.add(o);\r\n\t }\r\n\t \r\n\t for(PersonalFile o: myPersonalFiles)\r\n\t {\r\n\t \tfileSystem.add(o);\r\n\t }\r\n\t \r\n\t FileSystemSortHelper sortHelper = new FileSystemSortHelper();\r\n\t sortHelper.sort(fileSystem, FileSystemSortHelper.TYPE_DESC);\r\n\t return SUCCESS;\r\n\t \r\n\t}", "public void setRootDir(String rootDir);", "Path getRootPath();", "private Path initFolder(String folder) throws IOException {\n return Files.createDirectory(Paths.get(uploadFolder + \"/\" + folder));\n }", "public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}", "public static String rootDir()\n {\n read_if_needed_();\n \n return _root;\n }", "@Override\r\n\tpublic String getRootDir() {\t\t\r\n\t\treturn Global.USERROOTDIR;\r\n\t}", "protected void setRootPath(String root) {\n this.root = new File(root);\n this.appsDir = new File(this.root, APPS_ROOT);\n this.m2Dir = new File(M2_ROOT);\n }", "public String getSubDirs() {\n return subDirs;\n }", "private IFolder createFolder(IFolder topFolder) throws CoreException {\n \t\ttopFolder.create(IResource.NONE, true, getMonitor());\n \n \t\t//tree depth is log of total resource count with the width as the log base\n \t\tint depth = (int) (Math.log(TOTAL_RESOURCES) / Math.log(TREE_WIDTH));\n \t\trecursiveCreateChildren(topFolder, depth - 1);\n \t\treturn topFolder;\n \t}", "private void addFolder(){\n }", "private String setFolderPath(int selection) {\n\t\tString directory = \"\";\n\t\tswitch (selection) {\n\t\tcase 1:\n\t\t\tdirectory = \"\\\\art\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tdirectory = \"\\\\mikons_1\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tdirectory = \"\\\\mikons_2\";\n\t\t\tbreak;\n\t\t}\n\t\treturn directory;\n\t}", "private void checkRootFolder() throws TBException {\r\n\t\tFile f = new File(rootTBFolder);\r\n\t\tif(!f.exists()) {\r\n\t\t\tf.mkdir();\r\n\t\t\tf = new File(AppUtil.createFilePath(new String[]{rootTBFolder, COMPUTED_FILES_FOLDER_NM}));\r\n\t\t\tf.mkdir();\r\n\t\t}\t\r\n\t}", "private Folder convertListToTree(List<Folder> list, Folder rootFolder) throws BizfwServiceException {\n List<Folder> childList = new ArrayList<>();\n for (Folder folder : list) {\n if (rootFolder.getIdBfFolder().equals(folder.getParentId())) {\n Folder childFolder = convertListToTree(list, folder);\n childList.add(childFolder);\n }\n }\n rootFolder.setChildFolderList(childList);\n return rootFolder;\n }", "public void setSubfolders(boolean subfolders) {\n this.subfolders = subfolders;\n }", "private void setUpDirectories() {\r\n\t\tFile creation = new File(\"Creations\");\r\n\t\tFile audio = new File(\"Audio\");\r\n\t\tFile quiz = new File(\"Quiz\");\r\n\t\tFile temp = new File(\"Temp\");\r\n\r\n\t\tif (!creation.isDirectory()) {\r\n\t\t\tcreation.mkdir();\r\n\t\t}\r\n\t\tif (!audio.isDirectory()) {\r\n\t\t\taudio.mkdir();\r\n\t\t}\r\n\t\tif (!quiz.isDirectory()) {\r\n\t\t\tquiz.mkdir();\r\n\t\t}\r\n\t\tif (!temp.isDirectory()) {\r\n\t\t\ttemp.mkdir();\r\n\t\t}\r\n\r\n\t}", "FileObject getBaseFolder();", "String rootPath();", "public void init(){\n\t\tm_Folders = new ArrayList<Folder>();\n\t\n\t\tm_Folders.add(new Folder(\"Inbox\"));\n\t\tm_Folders.add(new Folder(\"Today\"));\n\t\tm_Folders.add(new Folder(\"Next\"));\n\t\tm_Folders.add(new Folder(\"Someday/Maybe\"));\t\t\n\t}", "private void createFolders() {\n File f = new File(System.getProperty(\"user.dir\") + \"/chatimages/\");\n if (!f.exists()){\n f.mkdir();\n }\n }", "private void processFolders(List<File> folderList, java.io.File parentFolder) {\n // process each folder to see if it needs to be updated;\n for (File f : folderList) {\n String folderName = f.getTitle();\n java.io.File localFolder = new java.io.File(parentFolder, folderName);\n Log.e(\"folder\",localFolder.getAbsolutePath());\n if (!localFolder.exists())\n localFolder.mkdirs();\n getFolderContents(f, localFolder);\n }\n }", "private void addDefaultDirectories(IProject project, String parentFolder, String[] folders\n \t\t, IProgressMonitor monitor) throws CoreException {\n for (String name : folders) {\n if (name.length() > 0) {\n IFolder folder = project.getFolder(parentFolder + name);\n if (!folder.exists()) {\n folder.create(true /* force */, true /* local */,\n new SubProgressMonitor(monitor, 10));\n }\n }\n }\n }", "@RequestMapping(\"/web/**\")\n\tpublic String allFolders() {\n\t System.out.println(\"In /web/**\");\n\t return \"success\";\n\t}", "protected static DefaultMutableTreeNode getDefaultTreeModel()\n {\n // New root node\n DefaultMutableTreeNode root =\n new DefaultMutableTreeNode(\"Root\");\n \n // First level\n for (int i = 1; i <= 5; i++)\n {\n // New node\n DefaultMutableTreeNode folder =\n new DefaultMutableTreeNode(\"Folder-\" + i);\n \n // Add node to root\n root.add(folder);\n \n // Second level\n for (int j = 1; j <= 3; j++)\n {\n // New node\n DefaultMutableTreeNode subfolder =\n new DefaultMutableTreeNode(\"Subfolder-\" + j);\n \n // Add node to parent node\n folder.add(subfolder);\n \n // Third level\n for (int k = 1; k <= 3; k++)\n {\n // New anchor\n A a = new A(\"http://jakarta.apache.org\");\n a.setTarget(\"target\").addElement(\"Document-\" + k);\n \n // New node (leaf)\n DefaultMutableTreeNode document =\n new DefaultMutableTreeNode(a.toString());\n \n // Add node to parent node\n subfolder.add(document);\n }\n }\n }\n \n // Return root node\n return root;\n }", "protected abstract void calculateUiRootPath(StringBuilder... sbUrls);", "protected abstract void calculateUiRootPath(StringBuilder... sbUrls);", "@Override\n\tpublic void generateDirectories() {\n\t\tFile file = new File(\"Data/My Contacts/\");\n\n\t\tif (!file.exists()) {\n\t\t\tfile.mkdirs();\n\t\t}\n\t}", "@Override\r\n public List<Folder> getAllFolder() {\n return folderRepository.findAll();\r\n }", "public String getLocalRepositoryRootFolder() {\n\t\tString userFolder = IdatrixPropertyUtil.getProperty(\"idatrix.local.reposity.root\",getRepositoryRootFolder() );\n\t\tint index = userFolder.indexOf(\"://\");\n\t\tif(index > -1 ) {\n\t\t\tuserFolder = userFolder.substring(index+3);\n\t\t}\n\t\treturn userFolder;\n\t}", "public File getRootDir() {\r\n\t\treturn rootDir;\r\n\t}", "VirtualDirectory getRootContents();", "private void updateAllFoldersTreeSet() throws MessagingException {\n\n Folder[] allFoldersArray = this.store.getDefaultFolder().list(\"*\");\n TreeSet<Folder> allFoldersTreeSet =\n new TreeSet<Folder>(new FolderByFullNameComparator());\n\n for(int ii = 0; ii < allFoldersArray.length; ii++) {\n\n allFoldersTreeSet.add(allFoldersArray[ii]);\n }\n\n this.allFolders = allFoldersTreeSet;\n }", "void initializeBath( File destinationFolderFile );", "public File getRootDir() {\n return rootDir;\n }", "protected void recursiveInitialize(List<JoinPath> joinPaths, Object rootObj) throws OgnlException\n {\n\n Map<String, Object> joinPathMap = new HashMap<String, Object>();\n Map<String, Object> flatIndex = new HashMap<String, Object>();\n HashMap parentMap = new HashMap();\n parentMap.put(\"alias\",\"this\");\n parentMap.put(\"joinType\", JoinType.LEFT_JOIN);\n joinPathMap.put(\"this\", parentMap);\n flatIndex.put(\"this\", parentMap);\n\n for (JoinPath joinPath : joinPaths)\n {\n if(StringUtils.isBlank(joinPath.alias))\n {\n //kalo kosong lewati\n/*\n String[] pathArray = joinPath.path.split(\"[.]\");\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = pathArray[pathArray.length - 1];\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n*/\n }\n else\n {\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = joinPath.alias;\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n }\n }\n for (JoinPath joinPath : joinPaths)\n {\n String[] pathArray = joinPath.path.split(\"[.]\");\n if(pathArray.length>1)\n {\n //gabung alias ke pathnya\n //cari parent\n Map mapParent = (Map) flatIndex.get(pathArray[0]);\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[1]);\n }\n mapParent.put(pathArray[1], mapChild);\n }\n else\n {\n //gabung alias ke pathnya\n //cari parent -- this\n Map mapParent = (Map) flatIndex.get(\"this\");\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[0]);\n }\n mapParent.put(pathArray[0], mapChild);\n }\n }\n if(cleanUp((Map<String, Object>) joinPathMap.get(\"this\")))\n {\n if (Collection.class.isAssignableFrom(rootObj.getClass()))\n {\n for (Object rootObjIter : ((Collection) rootObj))\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObjIter, true);\n }\n }\n else\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObj, false);\n }\n }\n }", "private static void createProjectsFolders() throws IOException {\n /*\n * .sagrada/\n * logs/\n */\n File logFolder = new File(Constants.Paths.LOG_FOLDER.getAbsolutePath());\n\n if (!logFolder.isDirectory() && !logFolder.mkdirs()) {\n throw new IOException(\"Could not directory structure: \" + (Constants.Paths.LOG_FOLDER.getAbsolutePath()));\n }\n }", "private Folder getRootFolder() {\n if(!MigrationProperties.get(MigrationProperties.PROP_MIGRATION_PROFILE).equalsIgnoreCase(\"DELTA\")) {\n String folderPath = MigrationProperties.get(MigrationProperties.PROP_SOURCE_LOCATION);\n\n if (folderPath != null && folderPath.contains(\"/\")) {\n Folder rootFolder = CmisHelper.getFolder(jobParameters.getSessionSource(), folderPath);\n return rootFolder;\n\n } else\n return null;\n } else\n return null;\n }", "private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}", "ILitePackCollection getRoot();", "protected String getRootName() {\r\n\t\treturn ROOT_NAME;\r\n\t}", "public List<Folder> getAllFolders() {\r\n\t\ttry {\r\n\t\t\t// Init our list of folders and start off with the default folder\r\n\t\t\tList<Folder> folders = new LinkedList<Folder>();\r\n\t\t\tfolders.addAll(Arrays.asList(store.getDefaultFolder().list()));\r\n\t\t\t\r\n\t\t\t// The following loop is repeated as long as there are subfolders in\r\n\t\t\t// our current folder. This is done by checking if the folders list\r\n\t\t\t// size has been increased since the last loop run, i.e. if new folders\r\n\t\t\t// have been added. Each run adds a new sub-layer of folders.\r\n\t\t\tint currentListSize = 0;\r\n\t\t\tint currentNewIndex = 0;\r\n\t\t\tdo {\r\n\t\t\t\tcurrentNewIndex = currentListSize;\r\n\t\t\t\tcurrentListSize = folders.size();\r\n\t\t\t\t\r\n\t\t\t\t// First save the new found folders and then add them to our folders\r\n\t\t\t\t// list. This can't be done at the same time as it leads to a \r\n\t\t\t\t// ConcurrentModificationException.\r\n\t\t\t\tList<Folder> foldersToAdd = new LinkedList<Folder>();\r\n\t\t\t\tfor (int index = currentNewIndex; index < folders.size(); index++) {\r\n\t\t\t\t\t// If folder cannot hold folders don't look for\r\n\t\t\t\t\tif ((folders.get(index).getType() & Folder.HOLDS_FOLDERS) != 0) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tfoldersToAdd.addAll(Arrays.asList(folders.get(index).list()));\r\n\t\t\t\t}\r\n\t\t\t\tfolders.addAll(foldersToAdd);\r\n\t\t\t} while (currentListSize < folders.size());\r\n\t\t\t\r\n\t\t\t// Take only folders that can contain mails\r\n\t\t\tfolders = Lists.newLinkedList(Iterables.filter(folders, new Predicate<Folder>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic boolean apply(Folder folder) {\r\n\t\t\t\t\tboolean containsMessages = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tcontainsMessages = (folder.getType() & Folder.HOLDS_MESSAGES) != 0;\r\n\t\t\t\t\t} catch (MessagingException e) {\r\n\t\t\t\t\t\tLog.error(e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn containsMessages;\r\n\t\t\t\t}\r\n\t\t\t}));\r\n\t\t\t\r\n\t\t\treturn folders;\r\n\t\t} catch (MessagingException e) {\r\n\t\t\t// Imposible to reach\r\n\t\t\tLog.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null; // Imposible\r\n\t}", "public static List<String> getRootDirectories(String... varargs) {\n\t\t// setting the default value when argument's value is omitted\n\t\tString sessionID = varargs.length > 0 ? varargs[0] : null;\n\t\t// Return a list of root-directories available to sessionID\n\t\tsessionID = sessionId(sessionID);\n\t\ttry {\n\t\t\tString url = apiUrl(sessionID, false) + \"GetRootDirectories?sessionID=\" + PMA.pmaQ(sessionID);\n\t\t\tString jsonString = PMA.httpGet(url, \"application/json\");\n\t\t\tList<String> rootDirs;\n\t\t\tif (PMA.isJSONArray(jsonString)) {\n\t\t\t\tJSONArray jsonResponse = PMA.getJSONArrayResponse(jsonString);\n\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\trootDirs = new ArrayList<>();\n\t\t\t\tfor (int i = 0; i < jsonResponse.length(); i++) {\n\t\t\t\t\trootDirs.add(jsonResponse.optString(i));\n\t\t\t\t}\n\t\t\t\t// return dirs;\n\t\t\t} else {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\tif (jsonResponse.has(\"Code\")) {\n\t\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\t\tPMA.logger.severe(\"getrootdirectories() failed with error \" + jsonResponse.get(\"Message\"));\n\t\t\t\t\t}\n\t\t\t\t\t// throw new Exception(\"getrootdirectories() failed with error \" +\n\t\t\t\t\t// jsonResponse.get(\"Message\"));\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn rootDirs;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "IStorageService subFolder(String path);", "private Directories() {\n\n\t}", "public static void checkRootDirectory() {\n File root = new File(transferITModel.getProperty(\"net.server.rootpath\"));\n JFileChooser jFileChooser = new JFileChooser();\n jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n while (true) {\n try {\n if (root.isDirectory()) {\n transferITModel.setProperty(\"net.server.rootpath\", root.getPath());\n break;\n }\n int returnVal = jFileChooser.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n root = jFileChooser.getSelectedFile();\n }\n } catch (SecurityException se) {\n }\n\n }\n }", "public DirectoryTree() {\r\n Directory root = new Directory(\"/\", null);\r\n rootDir = root;\r\n }", "public String getRootPath() {\n return root.getPath();\n }", "protected abstract String[] getFolderList() throws IOException;", "@Override\n\t\tpublic List<? extends IObject> getChildren() {\n\t\t\tif (!this.hasChildren()) {\n\t\t\t\treturn new ArrayList<>();\n\t\t\t}\n\t\t\tIterator<IFolder> subfolders = this.folder.subfolder();\n\t\t\treturn Lists.transform(ImmutableList.copyOf(subfolders), new Function<IFolder, FolderTreeObject>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic FolderTreeObject apply(IFolder input) {\n\t\t\t\t\treturn new FolderTreeObject(input, FolderTreeObject.this.rootFolder);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "@BeforeClass(groups ={\"All\"})\n\tpublic void createFolder() {\n\t\tdciFunctions = new DCIFunctions();\n\t\ttry {\n\t\t\tif(suiteData.getSaasApp().equalsIgnoreCase(\"Salesforce\")){\n\t\t\t\tLogger.info(\"No need to create folder for salesforce\");\n\t\t\t}else{\n\t\t\t\tUserAccount account = dciFunctions.getUserAccount(suiteData);\n\t\t\t\tUniversalApi universalApi = dciFunctions.getUniversalApi(suiteData, account);\n\t\t\t\tfolderInfo = dciFunctions.createFolder(universalApi, suiteData, \n\t\t\t\t\t\tDCIConstants.DCI_FOLDER+uniqueId);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLogger.info(\"Issue with Create Folder Operation \" + ex.getLocalizedMessage());\n\t\t}\n\t}", "protected Folder(){\n\t super(\"Folder\");\n\t }", "public String getRoot();", "protected File getRootDir() {\r\n\t\tif (rootDir == null) {\r\n\t\t\trootDir = new File(getProperties().getString(\"rootDir\"));\r\n\t\t\tif (! rootDir.exists())\r\n\t\t\t\tif (! rootDir.mkdirs())\r\n\t\t\t\t\tthrow new RuntimeException(\"Could not create root dir\");\r\n\t\t}\r\n\t\treturn rootDir;\r\n\t}", "public static void set_root_child_name(String name) {\n\t\tDefaultMutableTreeNode cdir=new DefaultMutableTreeNode(name);\r\n\t\t\r\n\t\troot.add(cdir);\r\n\t\t\r\n//\t\tcurrent_node.add(cdir);\r\n\t\t//JTree ftp_dir_tree = new JTree(root);\r\n\t\t\r\n\t}", "public Object generatePathToRoot(EmitLang emitter, String stem)\n\t{\n\t Object result;\n\t \n\t if ( this.factoredPath != null ) {\n\t result = this.factoredPath;\n \n } else {\n\n // Build the path iteratively.\n result = stem;\n\n for ( PathElement idx: generateAccessPath() ) {\n\t result = emitter.genCallMethod(\n\t result, \n\t \"getNthChild\", \n Integer.toString(idx.index));\n }\n\t }\n\t \n\t return result;\n\t}", "@Override\r\n\tpublic String[] listFolders() throws FileSystemUtilException {\r\n\t\t// getting all the files and folders in the given file path\r\n\t\tString[] files = listFiles();\r\n\t\tList foldersList = new ArrayList();\r\n\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\t// all the folder are ends with '/'\r\n\t\t\tif (files[i].endsWith(\"/\") && isValidString(files[i])) {\r\n\t\t\t\tfoldersList.add(files[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] folders = new String[foldersList.size()];\r\n\t\t// getting only folders from returned array of files and folders\r\n\t\tfor (int i = 0; i < foldersList.size(); i++) {\r\n\t\t\tfolders[i] = foldersList.get(i).toString();\r\n\t\t}\r\n\t\treturn folders;\r\n\r\n\t}", "@Test\n public void testGetSubDirectories() {\n System.out.println(\"getSubDirectories from a folder containing 2 subdirectories\");\n String path = System.getProperty(\"user.dir\")+fSeparator+\"MyDiaryBook\"+fSeparator+\"Users\"+fSeparator+\"Panagiwtis Georgiadis\"\n +fSeparator+\"Entries\";\n \n FilesDao instance = new FilesDao();\n File entriesFile = new File(path);\n File subFolder;\n String[] children = entriesFile.list();\n File[] expResult = new File[entriesFile.list().length];\n \n for(int i=0;i<entriesFile.list().length;i++)\n {\n subFolder = new File(path+fSeparator+children[i]);\n if(subFolder.isDirectory())\n expResult[i] = subFolder; \n }\n \n File[] result = instance.getSubDirectories(path);\n \n assertArrayEquals(expResult, result);\n }", "public static File getRootDirectory() {\n\t\treturn ROOT_DIRECTORY;\n\t}", "private String preferredSubFolder(final String path) {\n final File file = new File(path);\n if (file.isDirectory()) {\n for (final String subdir : SUBDIRS) {\n final File sd = new File(file, subdir);\n if (sd.isDirectory()) {\n return path + File.separator + subdir;\n }\n }\n }\n return path;\n }", "private void prepareFolder(String name, String newFolderName) {\n }", "private void createJavaWebStartPath() {\n String[] onlyFolderNames = new String[] {\n mInstance.getJavaWebStartPath(),\n mModuleName\n };\n\n mJavaWebStartPath = StringUtils.makeFilePath (onlyFolderNames, false);\n }", "public String getRootPath() {\r\n return rootPath;\r\n }", "private void createRootPanel() {\n\t\tString clearTooltip =\n\t\t\tI18n.getHierarchyTreeConstants().clearListFilterTooltip();\n\t\tcreateAnchor(I18n.getHierarchyTreeConstants().listFilterRootText(),\n\t\t\tnull, clearHandler, clearTooltip);\n\t\tcreateImage(HierarchyResources.INSTANCE.clear(), clearHandler,\n\t\t\tclearTooltip);\n\t\taddGeneralInnerImages();\n\t}", "private ObservableList<TreeItem<Path>> buildChildren() {\r\n if (Files.isDirectory(getValue())) {\r\n try {\r\n\r\n return Files.list(getValue())\r\n .map(FileTreeItem::new)\r\n .collect(Collectors.toCollection(() -> FXCollections.observableArrayList()));\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return FXCollections.emptyObservableList();\r\n } \r\n }\r\n\r\n return FXCollections.emptyObservableList();\r\n }", "@Override\r\n\tpublic List<List<Node<T>>> getPathsFromRootToAnyLeaf() {\r\n\t\tList<Node<T>> listaHojas = new LinkedList<Node<T>>();// Lista con todas\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// las hojas\r\n\t\t// del arbol\r\n\t\tlistaHojas = listaHojas(raiz, listaHojas);// Hojas\r\n\t\tList<List<Node<T>>> listaFinal = new LinkedList<List<Node<T>>>();// Lista\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// con\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// todos\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// los\r\n\t\t// caminos de la\r\n\t\t// raiz a las hojas\r\n\t\tfor (int i = 1; i <= listaHojas.size(); i++) {\r\n\t\t\tList<Node<T>> lista = new LinkedList<Node<T>>();\r\n\t\t\tlistaFinal.add(completaCamino(listaHojas.get(i), lista));// Crea\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// los\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// caminos\r\n\t\t}\r\n\t\treturn listaFinal;\r\n\t}", "private String getOutputFolder(String path){\n\n //Remove the portion of the path which is prior to our repositories file path\n path = StringUtils.removeStart(FilenameUtils.getFullPath(path), REPOSITORY_LOCATION);\n //Return the path without leading and ending / and ensures the file path uses forward slashes instead of backslashes\n return StringUtils.strip(StringUtils.strip(path,\"/\"),\"\\\\\").replace(\"\\\\\", \"/\");\n }", "public static void initializeOutputFolder() {\n\t\tString default_folder = PropertiesFile.getInstance().getProperty(\"default_folder\");\n\t\t\n\t\t// The file has to exist and is a directory (Not just a child file)\n\t\tString fullQualifiedFolderName = getFullyQualifiedFileName(default_folder);\n\t\tFile defaultDir = new File(fullQualifiedFolderName);\n\t\tif (!checkFolder(fullQualifiedFolderName)) {\n\t\t\tboolean dirCreated = defaultDir.mkdir();\n\t\t\tif(dirCreated == false) {\n\t\t\t\tlog.error(\"Could not create generation folder\");\n\t\t\t}\n\t\t} else\n\t\t\tdeleteFolderRecursively(defaultDir);\n\t}", "@GetMapping(\"/api\")\r\n public RepresentationModel<?> root() {\r\n RepresentationModel<?> rootResource = new RepresentationModel<>();\r\n rootResource.add(\r\n linkTo(methodOn(BandController.class).getAllBands()).withRel(\"bands\"),\r\n linkTo(methodOn(MusicianController.class).getAllMusicians()).withRel(\"musicians\"),\r\n linkTo(methodOn(RootController.class).root()).withSelfRel());\r\n return rootResource;\r\n }", "DiscDirectoryInfo getRoot();", "private DocumentFileArrayAdapter buildFolderRootsAdapter() {\n Map<String, DocumentFile> roots = null;\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n roots = buildDocFilesRootsMap();\n } else {\n roots = buildDocFilesRootsMapPreKitKat();\n }\n\n DocumentFileArrayAdapter adapter = new DocumentFileArrayAdapter(requireContext(), android.R.layout.simple_spinner_item, roots);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n return adapter;\n }", "void setAppRootDirectory(String rootDir);", "private String formatRootPathForDisplay(File root) {\n\t\t\tString s = root.getPath();\n\t\t\treturn s.length() > 1 && s.endsWith(\"\\\\\") ? s.substring(0, s.length() - 1) : s;\n\t\t}", "private void buildRoot() {\n this.root = new GPRootTreeNode(this.tree);\n }", "private Pane createSubTree(int level, File directory) {\n\t\tVBox dirNameBox = new VBox();\n\t\t\n\t\tdouble maxPaneHeight = 0;\n\t\tdouble totalArea = 0;\n\t\tdouble totalPanesHeight = 0;\n\t\tdouble totalPanesWidth = 0;\n\n\t\tArrayList<Pane> panes = new ArrayList<Pane>();\n\t\t\n\t\t// Add label\n\t\tLabel newLabel = new Label(directory.getName());\n\t\tnewLabel.setFont(Font.font(\"System\", FontWeight.BOLD, 8.0f));\n\t\t//newLabel.setBackground(new Background(new BackgroundFill(Color.CORNFLOWERBLUE, CornerRadii.EMPTY, Insets.EMPTY)));\n\n\t\t//nodes.add(newLabel);\t\t\n\t\tdirNameBox.getChildren().add(newLabel);\n\t\t\n\t\t\n\t\tPane dirPane;\n\t\tif (level % 2 == 0) {\n\t\t\tdirPane = new VBox();\n\t\t\t// Setting the spacing between the nodes\n\t\t\t((VBox)dirPane).setSpacing(gap);\n\t\t\t((VBox)dirPane).setAlignment(Pos.TOP_LEFT); \t\t\n\t\t} else {\n\t\t\tdirPane = new HBox();\n\t\t\t// Setting the spacing between the nodes\n\t\t\t((HBox)dirPane).setSpacing(gap);\n\t\t\t((HBox)dirPane).setAlignment(Pos.TOP_LEFT); \t\t\n\t\t}\n\t\tdirNameBox.getChildren().add(dirPane);\n\t\t\n\t\t\t\t\n\t\tint numSubDirs = 0;\n\t\tString[] subFilesAndDirectories = directory.list(new FilenameFilter() {\n\t\t public boolean accept(File dir, String name) {\n\t\t \tif (fileExtensionFilter == null || fileExtensionFilter.length == 0 ) {\n\t\t \t\t// No Filter defined\n\t\t \t\treturn true;\n\t\t \t} else {\n\t\t\t \t// check if file extension is in the list of allowed extensions\n\t\t\t return Arrays.stream(fileExtensionFilter).anyMatch(FilenameUtils.getExtension(name.toLowerCase())::equals);\n\t\t \t}\n\t\t };\n\t\t});\t\n\n\t\tfor (String fileOrDirectoryName : subFilesAndDirectories) {\n\t\t\t\n\t\t\tFile fileOrDirectory = new File(directory, fileOrDirectoryName);\n\t\t\t\n\t\t\tif (fileOrDirectory.isDirectory()) {\n\t\t\t\tpanes.add(createSubTree(level++, fileOrDirectory));\n\t\t\t\tnumSubDirs++;\n\t\t\t} else {\n\t\t\t\tif (showFiles) {\n\t\t\t\t\tpanes.add(createFilePane(fileOrDirectory));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tdirNameBox.setSpacing(0);\n\t\t\n\t\tif (usePadding) {dirPane.setPadding(new Insets(gap,gap,gap,gap));}\n\t\t\n\t\tdirNameBox.setPadding(new Insets(1,1,1,1));\n\n\t\t//flowPane.autosize();\n\t\t\n\t\t// Alignments\n\t\tdirNameBox.setAlignment(Pos.TOP_LEFT); \n\n\t\tif (showRandomDirectoryBackgroundColor) {\n\t\t\tdirNameBox.setStyle(\"-fx-background-color: rgba(\" + (randomizer.nextInt(155) + 100) +\n\t\t\t\t\t\", \" + (randomizer.nextInt(155) + 100) + \", \" + (randomizer.nextInt(155) + 100) + \", \" +\n\t\t\t\t\t1 + \"); -fx-background-radius: 10;\");\n\t\t} else {\n//\t\t\tvBox.setStyle(\"-fx-background-color: rgba(\" + 255 + \", \" + 255 + \", \" + 255 + \", \" + 0\n//\t\t\t\t\t+ \"); -fx-background-radius: 10; \" + (showBorder ? \"-fx-border-color: gray\" : \"\")\n//\t\t\t);\n\t\t\tdirNameBox.setStyle(\"-fx-background-color: rgba(\" + 240 + \", \" + 240 + \", \" + 240 + \", \" + 1\n\t\t\t\t\t+ \"); -fx-background-radius: 10; \" + (showBorder ? \"-fx-border-color: gray\" : \"\")\n\t\t\t);\n\n\t\t}\n\n\t\tdirPane.setStyle(\"-fx-background-color: rgba(\" + 255 + \", \" + 255 + \", \" + 255 + \", \" + 0.5f\n\t\t\t\t+ \"); -fx-background-radius: 10; \" // + (showBorder ? \"-fx-border-color: blue; -fx-border-style: dotted;\" : \"\")\n\t\t);\n\n\t\t\n\t\t// Retrieving the childrens list of the parent pane\n\t\tObservableList<Node> list = dirPane.getChildren();\n\t\t\n\t\t// Adding all the nodes to the parent pane\n\t\tfor (Pane pane : panes) {\n\n\t\t\tlist.add(pane);\n\t\t\t\n\t\t\tdouble currentHeight = \n\t\t\t\t\t(pane instanceof VBox ? ((VBox)pane).getPrefHeight() + \n\t\t\t\t\t\t\t\t\t\t\t\t(showBorder ? 2 : 0) /*top + bottom border*/ + \n\t\t\t\t\t\t\t\t\t\t\t\t(usePadding ? 2 * gap : 0) /*padding*/ \n\t\t\t\t\t: (pane instanceof Pane ? ((Pane)pane).getPrefHeight() : 12 /*label*/)\n\t\t\t);\n\t\t\tdouble currentWidth = \n\t\t\t\t\t(pane instanceof HBox ? ((HBox)pane).getPrefHeight() + \n\t\t\t\t\t\t\t\t\t\t\t\t(showBorder ? 2 : 0) /*top + bottom border*/ + \n\t\t\t\t\t\t\t\t\t\t\t\t(usePadding ? 2 * gap : 0) /*padding*/ \n\t\t\t\t\t: (pane instanceof Pane ? ((Pane)pane).getPrefWidth() : 12 /*label*/)\n\t\t\t);\n\t\t\tmaxPaneHeight = Math.max(maxPaneHeight, currentHeight);\n\t\t\ttotalPanesHeight += currentHeight;\n\t\t\ttotalPanesWidth += currentWidth;\n\t\t\ttotalArea += pane.getPrefHeight() * pane.getPrefWidth();\n//\t\t\tSystem.out.println((p instanceof FlowPane ? \"Folder\" : \"File\") + \": \" + ((Label)p.getChildren().get(0)).getText() + \n//\t\t\t\t\t\" p.PrefHeight: \" + p.getPrefHeight() + \" p.PrefWidth: \" + p.getPrefWidth() + \n//\t\t\t\t\t\" p.Height: \" + p.getHeight() + \" p.Width: \" + p.getWidth() +\n//\t\t\t\t\t(p instanceof FlowPane ? \" p.PrefWrap: \" + ((FlowPane)p).getPrefWrapLength() : \"\") +\n//\t\t\t\t\t\" totalHeight: \" + totalPanesHeight);\n\t\t}\n\t\t\t\n\t\t// height of squared total area\n\t\tdouble areaHeight = Math.sqrt(totalArea) * transformFactor;\n\t\tdouble prefHeight = Math.max(areaHeight, maxPaneHeight);\n\t\t\n\t\tprefHeight = Math.min(totalPanesHeight, areaHeight);\n\t\t\n//\t\t// Setting preferred heights\n//\t\t((VBox)dirPane).setPrefHeight(\n//\t\t\t\ttotalPanesHeight\n//\t\t\t\t+ (panes.size() - 1) * gap /*gaps*/\n//\t\t\t\t// + 2 /*border*/\n//\t\t); \t\n\t\t\n//\t\tvBox.setPrefWrapLength(flowPane.getPrefWrapLength() + \n//\t\t\t\t12 /*label height*/ + \n//\t\t\t\t(showBorder ? 2 : 0) /*border around childFlowPane*/ +\n//\t\t\t\t(usePadding ? 2 * gap : 0) /*padding*/\n//\t\t\t\t);\n\n\t\t\t\n\t\tbindTooltip(dirNameBox, tooltip);\n\t\tbindTooltip(dirPane,tooltip);\n\t\tbindTooltip(newLabel, tooltip);\n\n\t\treturn dirNameBox;\n\t}", "public String getRepositoryRootFolder() {\n\t\tString userFolder = UnixPathUtil.unixPath(IdatrixPropertyUtil.getProperty(\"idatrix.metadata.reposity.root\",\"/data/ETL/reposity/\"));\n\t\tif (CloudApp.getInstance().getRepository() instanceof KettleFileRepository) {\n\t\t\tKettleFileRepository fileRepo = (KettleFileRepository) CloudApp.getInstance().getRepository();\n\t\t\tuserFolder = fileRepo.getRepositoryMeta().getBaseDirectory();\n\t\t}\n\t\treturn userFolder;\n\t}", "public LinkedList<ApfsDirectory> getSubDirectories() {\n LinkedList<ApfsDirectory> subDirectories = new LinkedList<ApfsDirectory>();\n for(ApfsElement apfse: children) {\n if(apfse.isDirectory())\n subDirectories.add((ApfsDirectory) apfse);\n }\n return subDirectories;\n }", "public static List<String> getDrives(){\n root = new ArrayList<>();\n for(String temp : rootDir){\n File file = new File(temp);\n if(file.isDirectory()){\n root.add(temp);\n }\n }\n return root;\n }", "public void createSubfolder(\n String caseFolderPath,\n String subfolderName,\n String TOS) throws Exception {\n UserContext old = UserContext.get();\n CaseMgmtContext oldCmc = null;\n Subject sub = Subject.getSubject(AccessController.getContext());\n String ceURI = null;\n\n try {\n ceURI = filenet.vw.server.Configuration.GetCEURI(null, null);\n Connection connection = Factory.Connection.getConnection(ceURI);\n\n // setting up user context\n UserContext uc = new UserContext();\n uc.pushSubject(sub);\n UserContext.set(uc);\n\n EntireNetwork entireNetwork = Factory.EntireNetwork.fetchInstance(connection, null);\n\n if (entireNetwork == null) {\n Exception e = new Exception(\"Cannot log in to \" + ceURI);\n logException(e);\n }\n\n // retrieve target object store\n Domain domain = entireNetwork.get_LocalDomain();\n ObjectStore targetOS = (ObjectStore) domain.fetchObject(\n ClassNames.OBJECT_STORE,\n TOS,\n null);\n\n // setting up CaseMmgtContext for Case API\n SimpleVWSessionCache vwSessCache = new SimpleVWSessionCache();\n CaseMgmtContext cmc = new CaseMgmtContext(vwSessCache, new SimpleP8ConnectionCache());\n oldCmc = CaseMgmtContext.set(cmc);\n\n ObjectStoreReference targetOsRef = new ObjectStoreReference(targetOS);\n\n\t\t\t/* get case folder */\n Folder folder = Factory.Folder.fetchInstance(targetOsRef.getFetchlessCEObject(),\n caseFolderPath,\n null);\n\n // create a subfolder under case folder\n Folder newSubFolder = Factory.Folder.createInstance(targetOS, \"CmAcmCaseSubfolder\");\n newSubFolder.set_Parent(folder);\n newSubFolder.set_FolderName(subfolderName);\n newSubFolder.getProperties().putValue(\"CmAcmParentCase\", folder);\n newSubFolder.save(RefreshMode.REFRESH);\n } catch (Exception e) {\n logException(e);\n } finally {\n if (oldCmc != null) {\n CaseMgmtContext.set(oldCmc);\n }\n\n if (old != null) {\n UserContext.set(old);\n }\n }\n }", "public void testFolder_1()\n\t\tthrows Exception {\n\n\t\tFolder result = new Folder();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getFullName());\n\t\tassertEquals(null, result.getName());\n\t\tassertEquals(null, result.getParent());\n\t\tassertEquals(null, result.getAccount());\n\t\tassertEquals(null, result.getParentFolderId());\n\t}", "public static void createImageDirs(File base) {\n String dirs[] = new String[]{\n \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\",\n \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"};\n for (String dir : dirs) {\n File subdir = new File(base, dir);\n if (!subdir.exists()) {\n subdir.mkdir();\n }\n }\n }", "private void compactFolder(RestTreeNode child) {\n\n FolderNode folder = (FolderNode) child;\n StringBuilder nameBuilder = new StringBuilder(folder.getText());\n FolderNode next = folder.fetchNextChild();\n // look for empty folders\n while (next != null){\n folder.setCompacted(true);\n folder.setFolderInfo(next.fetchFolderInfo());\n folder.setRepoPath(next.getRepoPath());\n // update compact name\n nameBuilder.append('/').append(next.getText());\n next = next.fetchNextChild();\n }\n folder.setText(nameBuilder.toString());\n }", "public boolean getSubfolders() {\n return this.subfolders;\n }", "public void setRootPath(String rootPath) {\r\n this.rootPath = rootPath;\r\n }", "protected String getRootPath() {\n\t\treturn \"/WEB-INF\";\n\t}", "public void customRootDir() {\n //Be careful with case when res is false which means dir is not valid.\n boolean res = KOOM.getInstance().setRootDir(this.getCacheDir().getAbsolutePath());\n }", "public IDirectory getRootDirectory() {\r\n return rootDir;\r\n }", "@Override\r\n public FileName getRoot() {\r\n FileName root = this;\r\n while (root.getParent() != null) {\r\n root = root.getParent();\r\n }\r\n\r\n return root;\r\n }", "private static void zipSubFolder(ZipOutputStream out, File folder,\n\t\t\tint basePathLength) throws IOException {\n\n\t\tFile[] fileList = folder.listFiles();\n\t\tBufferedInputStream origin = null;\n\t\tfor (File file : fileList) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tzipSubFolder(out, file, basePathLength);\n\t\t\t} else {\n\t\t\t\tbyte data[] = new byte[BUFFER_SIZE];\n\t\t\t\tString unmodifiedFilePath = file.getPath();\n\t\t\t\tString relativePath = unmodifiedFilePath\n\t\t\t\t\t\t.substring(basePathLength);\n\t\t\t\tLog.i(\"ZIP SUBFOLDER\", \"Relative Path : \" + relativePath);\n\t\t\t\tFileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\t\t\t\torigin = new BufferedInputStream(fi, BUFFER_SIZE);\n\t\t\t\tZipEntry entry = new ZipEntry(relativePath);\n\t\t\t\tout.putNextEntry(entry);\n\t\t\t\tint count;\n\t\t\t\twhile ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {\n\t\t\t\t\tout.write(data, 0, count);\n\t\t\t\t}\n\t\t\t\torigin.close();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6319689", "0.61413026", "0.6135961", "0.60947675", "0.6063466", "0.60189086", "0.587666", "0.5867669", "0.5763626", "0.5677522", "0.56484824", "0.5644552", "0.5610977", "0.5603095", "0.5585873", "0.55716705", "0.55639756", "0.5561641", "0.55562055", "0.5529059", "0.5521323", "0.5489106", "0.54825175", "0.5479248", "0.5446711", "0.54256475", "0.5416233", "0.5410459", "0.54096407", "0.5406106", "0.5388844", "0.53506786", "0.53496885", "0.5341478", "0.5341142", "0.53222436", "0.5316285", "0.5309129", "0.5309129", "0.528358", "0.52742517", "0.52609974", "0.52465045", "0.52244014", "0.52091205", "0.5207368", "0.5202552", "0.52002376", "0.51840484", "0.5168839", "0.51517457", "0.5148373", "0.5139132", "0.5124423", "0.51123637", "0.51085573", "0.51007164", "0.5093695", "0.50903", "0.5087755", "0.5062417", "0.50606984", "0.5060657", "0.5055785", "0.50406843", "0.5039231", "0.5036691", "0.50363594", "0.50290585", "0.50234175", "0.50223505", "0.50216746", "0.50165826", "0.5005295", "0.49995923", "0.49976534", "0.49951327", "0.49924845", "0.49920836", "0.49862564", "0.49790233", "0.49752498", "0.49677527", "0.49638596", "0.4962141", "0.49618503", "0.49579057", "0.49556187", "0.49555653", "0.49554315", "0.49441645", "0.4940719", "0.49378452", "0.49372816", "0.49348313", "0.49166748", "0.49093726", "0.4907115", "0.4897563", "0.48940143", "0.48920503" ]
0.0
-1
Set new parent folder
public void setParent(TaskFolder parent) { super.setParent(parent); if (parent != null) parent.addFolder(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testSetParent_fixture28_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture28();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "protected void setParentFolder(Folder f) {\n\t\tparentFolder = f;\n\t\tif(f!= null) {\n\t\t\tparentFolderID = f.getMyID();\n\t\t} else {\n\t\t\tparentFolderID = 0;\n\t\t}\n\t}", "public void setParent(FileNode parent) {\r\n this.parent = parent;\r\n }", "public void testSetParent_fixture27_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture27();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture16_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture16();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture13_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture13();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture24_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture24();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture18_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture18();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void setParentFolder(com.vmware.converter.ManagedObjectReference parentFolder) {\r\n this.parentFolder = parentFolder;\r\n }", "public void testSetParent_fixture11_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture11();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture14_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture14();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void setWorkingParent(String path) throws IllegalArgumentException\n {\n ServerSettings.getInstance().setProperty(\n ServerSettings.WORKING_PARENT,\n \"\"+validatePath(path)\n );\n }", "public void testSetParent_fixture12_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture12();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture8_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture8();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture26_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture26();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture20_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture20();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture23_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture23();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture7_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture7();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture22_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture22();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture4_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture4();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture15_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture15();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture17_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture17();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture10_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture10();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void setParent(Node newParent) {\r\n\t\t\tparent = newParent;\r\n\t\t}", "public void testSetParent_fixture21_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture21();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture9_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture9();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture1_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture1();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture19_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture19();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "private void setParent(Node<T> parent) {\n this.parent = parent;\n }", "final void setParent(ShapeParent newParent)\n {\n this.parent = newParent;\n }", "public void testSetParent_fixture25_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture25();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture6_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture6();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void setParent(Node parent){\n this.parent = parent;\n }", "void setParent(Resource parent)\n {\n this.parent = new ResourceRef(parent, coral);\n if(parent != null)\n {\n \tparentId = parent.getId();\n }\n else\n {\n \tparentId = -1;\n }\n }", "public void setParent(String parent) {\r\n this.parent = parent;\r\n }", "void setAddParentFolder(DriveRequest<?> request, String addParentFolder);", "public void setParent(String aParent) {\n _theParent = aParent;\n }", "@Test\r\n public void moveToDirWithSameName() {\r\n Dir sameName = new Dir(\"child\", \"/\");\r\n currentDirectory.addNewDirectory(sameName);\r\n command.executeCommand(\"/parent/child/\", \"/\", root, currentDirectory);\r\n currentDirectory = currentDirectory.getSubDirectoryByName(\"child\");\r\n // check child directory with file is in root\r\n assertTrue(currentDirectory.getFileByName(\"file\") != null);\r\n }", "public void setParentCalendarPath(final String val) {\n parentCalendarPath = val;\n }", "public void setParent(int id);", "public void setParent(String parent) {\n _parent = parent;\n }", "void setParent(TreeNode<T> parent);", "public void setParent(String parent) {\n this.parent = parent;\n }", "public void setParent(MenuTree parent){\n this.parentMenuTree = parent;\n }", "public void testSetParent_fixture5_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture5();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void testSetParent_fixture3_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture3();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void newFolderButtonClicked() {\n TreePath[] paths = _fileSystemTree.getSelectionPaths();\r\n List selection = getSelectedFolders(paths);\r\n if (selection.size() > 1 || selection.size() == 0)\r\n return; // should never happen\r\n \r\n File parent = (File) selection.get(0);\r\n \r\n final ResourceBundle resourceBundle = FolderChooserResource.getResourceBundle(Locale.getDefault());\r\n String folderName = JOptionPane.showInputDialog(_folderChooser, resourceBundle.getString(\"FolderChooser.new.folderName\"),\r\n resourceBundle.getString(\"FolderChooser.new.title\"), JOptionPane.OK_CANCEL_OPTION | JOptionPane.QUESTION_MESSAGE);\r\n \r\n if (folderName != null) {\r\n File newFolder = new File(parent, folderName);\r\n boolean success = newFolder.mkdir();\r\n \r\n TreePath parentPath = paths[0];\r\n boolean isExpanded = _fileSystemTree.isExpanded(parentPath);\r\n if (!isExpanded) { // expand it first\r\n _fileSystemTree.expandPath(parentPath);\r\n }\r\n \r\n LazyMutableTreeNode parentTreeNode = (LazyMutableTreeNode) parentPath.getLastPathComponent();\r\n BasicFileSystemTreeNode child = BasicFileSystemTreeNode.createFileSystemTreeNode(newFolder, _folderChooser);\r\n // child.setParent(parentTreeNode);\r\n if (success) {\r\n parentTreeNode.clear();\r\n int insertIndex = _fileSystemTree.getModel().getIndexOfChild(parentTreeNode, child);\r\n if (insertIndex != -1) {\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).insertNodeInto(child, parentTreeNode, insertIndex);\r\n ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).nodeStructureChanged(parentTreeNode);\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).addPath(parentPath, insertIndex, child);\r\n }\r\n }\r\n TreePath newPath = parentPath.pathByAddingChild(child);\r\n _fileSystemTree.setSelectionPath(newPath);\r\n _fileSystemTree.scrollPathToVisible(newPath);\r\n }\r\n }", "public void setParent(Node parent) {\n this.parent = parent;\n }", "public void gotoParentDir() {\n boolean z;\n if (!isRootDir() && this.mCurrentDir != null && this.mBox.hasAuthenticated()) {\n String sb = new StringBuilder(getCurrentDirPath()).toString();\n if (sb.endsWith(File.separator)) {\n sb = sb.substring(0, sb.lastIndexOf(File.separator));\n }\n String substring = sb.substring(0, sb.lastIndexOf(File.separator) + 1);\n if (!substring.equals(getCurrentDirName())) {\n if (!substring.equals(File.separator) && substring.endsWith(File.separator)) {\n substring = substring.substring(0, substring.length() - 1);\n }\n BoxFileObject boxFileObject = null;\n if (this.mDirCached.containsKey(substring)) {\n boxFileObject = (BoxFileObject) this.mDirCached.get(substring);\n }\n if (boxFileObject == null) {\n z = this.mBox.asyncLoadDir(substring, this.mLoadFolderListener);\n } else {\n z = this.mBox.asyncLoadDir(boxFileObject, this.mLoadFolderListener);\n }\n if (z) {\n showWaitingDialog(this.mActivity.getString(C4538R.string.zm_msg_loading), this.mWaitingDialogCancelListener);\n }\n }\n }\n }", "public void setParent(Node node) {\n parent = node;\n }", "public void setParent(ASTNeoNode parent) {\r\n \t\tassertTrue(parent != null);\r\n \t\tassertTrue(this.parent == null); // Can only set parent once\r\n \t\tthis.parent = parent;\r\n \t}", "protected void setParent(CodeItem codeItem) {\n this.parent = codeItem;\n }", "public void testSetParent_fixture2_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture2();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "public void setParentOne(int parent)\n\t{\n\t\tparentSetOne = parent;\n\t}", "public void setParent(LeafTreeNode parent) {\n this.parent = parent;\n }", "public void setParent(Node<T> parent) {\n this.parent = parent;\n }", "@Override\n\tpublic void setParent(TreeNode parent) {\n\t\tthis.parent = parent ;\n\t}", "@Override\n\tpublic void setParent(TreeNode parent) {\n\t\tthis.parent = parent ;\n\t}", "public void setParent(AbstractConfigNode parent) {\n this.parent = parent;\n }", "public void setParent(State aParent);", "abstract public void setParent(Command cmd);", "public final synchronized void setParent(final ICache<K, V, D> parent) {\n ICache<K, V, D> current = parent;\n while (current != null) {\n if (current == this)\n throw new IllegalArgumentException(\"Cycle detected, cannot set parent to \" + parent);\n current = current.getParent();\n }\n this.parent = parent;\n }", "void setParent(TestResultTable.TreeNode p) {\n parent = p;\n }", "public void setParent(String value) {\r\n setAttributeInternal(PARENT, value);\r\n }", "@Test\r\n public void moveChildToParent() {\r\n command.executeCommand(\"/parent/child/\", \"/\", root, currentDirectory);\r\n assertTrue(root.getDirectoryByAbsolutePath(\"/child\") != null);\r\n }", "public void setParent(TreeNode parent)\r\n\t{\r\n\t\tm_parent = parent;\r\n\t}", "public void setParent(IAVLNode node) {\n\t\t\tthis.parent = node; // to be replaced by student code\n\t\t}", "public void setParent(IAVLNode node);", "public void setParent(IAVLNode node);", "public void setParent (TreeNode parent)\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"setParent parent=\" + parent + \" for \" + this);\r\n }\r\n\r\n this.parent = parent;\r\n }", "@Override\n\tpublic void setParent(WhereNode parent) {\n\t\tthis.parent = parent;\n\t}", "public void testSetParentFolderId_fixture13_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture13();\n\t\tInteger parentFolderId = new Integer(1);\n\n\t\tfixture.setParentFolderId(parentFolderId);\n\n\t\t// add additional test code here\n\t}", "@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameDirToSelf() throws Throwable {\n assumeRenameSupported();\n Path parentdir = path(\"/test/parentdir\");\n fs.mkdirs(parentdir);\n Path child = new Path(parentdir, \"child\");\n createFile(child);\n\n rename(parentdir, parentdir, false, true, true);\n //verify the child is still there\n assertIsFile(child);\n }", "public void setParentController(HomeController parent) {\n\t\tthis.parent = parent;\n\t}", "void setParent(IGLProperty parent);", "public void testSetParentFolderId_fixture28_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture28();\n\t\tInteger parentFolderId = new Integer(1);\n\n\t\tfixture.setParentFolderId(parentFolderId);\n\n\t\t// add additional test code here\n\t}", "@Override\n\tpublic void setParent(ASTNode node) {\n\t\tthis.parent = node;\n\t\t\n\t}", "public static void updateParent( int nIdUnitToMove, int nIdNewParent )\n {\n _dao.updateParent( nIdUnitToMove, nIdNewParent, _plugin );\n }", "public void testSetParentFolderId_fixture27_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture27();\n\t\tInteger parentFolderId = new Integer(1);\n\n\t\tfixture.setParentFolderId(parentFolderId);\n\n\t\t// add additional test code here\n\t}", "protected Directory getParent() {\n return parent;\n }", "public void setParent(AsNode parent) {\n\t\tthis.state.setG(parent.getState().getG() + parent.childCost.get(this));\n\t\tthis.parent = parent;\n\t}", "public void setParentModule(final ProjectModule parentModule) {\n if (parentModule.getPom() != null) {\n Parent thisParent = new Parent();\n thisParent.setGroupId(parentModule.getPom().getGroupId());\n thisParent.setArtifactId(parentModule.getPom().getArtifactId());\n thisParent.setVersion(parentModule.getPom().getVersion());\n this.pom.setParent(thisParent);\n parentModule.getPom().getModules().add(projectFolder);\n }\n }", "public void testSetParentFolderId_fixture16_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture16();\n\t\tInteger parentFolderId = new Integer(1);\n\n\t\tfixture.setParentFolderId(parentFolderId);\n\n\t\t// add additional test code here\n\t}", "public void setParent(PaletteContainer newParent) {\n if (parent != newParent) {\n PaletteContainer oldParent = parent;\n parent = newParent;\n listeners.firePropertyChange(PROPERTY_PARENT, oldParent, parent);\n }\n }", "protected abstract String childFolderPath();", "public static void setParent(java.awt.Frame newParent) {\n parent = newParent;\n}", "public void setParent(Kit parentKit) {\n this.parent = parentKit;\n }", "public void setParentModule(EObject newValue);", "private void populateNewChildDirectory(DirectoryEntry newEntry) {\n try (ClusterStream stream = new ClusterStream(fileSystem,\n FileAccess.Write,\n newEntry.getFirstCluster(),\n 0xffffffff)) {\n // First is the self-referencing entry...\n DirectoryEntry selfEntry = new DirectoryEntry(newEntry);\n selfEntry.setName(FileName.SelfEntryName);\n selfEntry.writeTo(stream);\n // Second is a clone of our self entry (i.e. parent) - though dates\n // are odd...\n DirectoryEntry parentEntry = new DirectoryEntry(getSelfEntry());\n parentEntry.setName(FileName.ParentEntryName);\n parentEntry.setCreationTime(newEntry.getCreationTime());\n parentEntry.setLastWriteTime(newEntry.getLastWriteTime());\n parentEntry.writeTo(stream);\n } catch (IOException e) {\n throw new dotnet4j.io.IOException(e);\n }\n }", "@Test\r\n public void testSetParent_getParent() {\r\n System.out.println(\"setParent\");\r\n ConfigNode configNode = new ConfigNode(testLine);\r\n ConfigNode childNode1 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode1);\r\n assertEquals(configNode, childNode1.getParent());\r\n }", "public void setParent(Concept _parent) { parent = _parent; }", "public void setParent(View parent) {\n throw new Error(\"Can't set parent on root view\");\n }", "public void setParent(final ParseTreeNode parent) {\r\n _parent = parent;\r\n }", "<E extends CtElement> E setParent(E parent);", "public void setParent(RBNode<T> node, RBNode<T> parent) {\n if(node != null)\r\n node.parent = parent;\r\n }", "private void prepareFolder(String name, String newFolderName) {\n }", "public void setParentLabel(String parentLabel){\n\t\tthis.parentLabel = parentLabel;\n\t}", "public void setParent(Instance parent) {\r\n \t\tthis.parent = parent;\r\n \t}", "public void testSetParentFolderId_fixture23_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture23();\n\t\tInteger parentFolderId = new Integer(1);\n\n\t\tfixture.setParentFolderId(parentFolderId);\n\n\t\t// add additional test code here\n\t}", "public void setParent(PsUpdateIf parent) {\n\t\tsuper.setParent(parent);\n\t\tm_pjRoot = (PjRootFinder)parent;\n\t\tm_pFunction.add(m_pjRoot.m_fx.getInfoPanel());\n\t\tm_pBounds.add(m_pjRoot.m_xMin.getInfoPanel());\n\t\tm_pBounds.add(m_pjRoot.m_xMax.getInfoPanel());\n\t\tm_pBounds.add(m_pjRoot.m_discr.getInfoPanel());\n\t}" ]
[ "0.67498446", "0.6737316", "0.6676586", "0.6674751", "0.6657037", "0.6635675", "0.6631445", "0.6618154", "0.66101557", "0.6600802", "0.65965664", "0.65772766", "0.6572936", "0.6557566", "0.65554816", "0.65554553", "0.6553628", "0.6535793", "0.653195", "0.65270287", "0.6526951", "0.6526738", "0.65252686", "0.6498868", "0.64698017", "0.64211595", "0.64058197", "0.6404723", "0.64041895", "0.6392001", "0.63913286", "0.63781327", "0.6361257", "0.6360954", "0.6354852", "0.632561", "0.63206017", "0.6319245", "0.63106084", "0.63101715", "0.6310072", "0.6279082", "0.6265351", "0.62486017", "0.6240336", "0.6221776", "0.62095016", "0.61932653", "0.6163444", "0.6156627", "0.6137463", "0.6107905", "0.6096327", "0.60835004", "0.6071939", "0.6052416", "0.6050095", "0.6050095", "0.60335535", "0.60267603", "0.60177845", "0.6005331", "0.60040236", "0.6001712", "0.59951985", "0.5988118", "0.5986428", "0.59826255", "0.59826255", "0.59664625", "0.596579", "0.59547764", "0.59482086", "0.59473485", "0.59473443", "0.5939594", "0.59262884", "0.59174013", "0.5908406", "0.5903957", "0.5894995", "0.58919924", "0.58919233", "0.5889809", "0.58879733", "0.58869636", "0.58819383", "0.5877411", "0.5875458", "0.5863612", "0.58530664", "0.5844655", "0.58431447", "0.5835351", "0.5828212", "0.5824299", "0.5822413", "0.5821127", "0.581537", "0.5814487" ]
0.7203541
0
Get tasks as array.
public Task[] getTasks() { return tasks.toArray(new Task[tasks.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Task[][] getTasks() {\n\t\tList<Server> servers = this.scheduler.getServers();\n\t\tTask[][] tasks = new Task[servers.size()][];\n\t\tfor (int i = 0; i < servers.size(); i++) {\n\t\t\ttasks[i] = servers.get(i).getTasks();\n\t\t}\n\t\treturn tasks;\n\t}", "public ArrayList<Task> getAllTasks() {\n \treturn this.taskBuffer.getAllContents();\n }", "public String[] getTaskList() {\n String[] tasks = {\"export\"};\n\n return tasks;\n }", "public ArrayList<Task> getList() {\n return tasks;\n }", "public ArrayList<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "@RequestMapping(method = RequestMethod.GET, value = \"/get-tasks\")\r\n\tpublic List<Task> getTasks() {\r\n\t\tList<Task> dummyTasks = new ArrayList<Task>();\r\n\t\treturn dummyTasks;\r\n\t}", "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "public ArrayList<Task> list() {\r\n return tasks;\r\n }", "public List<Task> getTasks() {\n return this.tasks;\n }", "List<Task> getAllTasks();", "@Access(AccessType.PUBLIC)\r\n \tpublic Set<String> getTasks();", "List<Task> getTaskdetails();", "public ArrayList<Task> getTaskList() {\n return tasks;\n }", "public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }", "TaskList getList();", "LinkedList<double[]> getTasks() {\r\n return tasks;\r\n }", "public List<File> getTasks() {\n return tasks;\n }", "java.util.List<String>\n getTaskIdList();", "public String[] getStringArr() {\n String[] tasks = new String[USER_TASKS.size() + 1];\n for (int i = 0; i < USER_TASKS.size(); i++) {\n int tempNum = i + 1;\n tasks[tempNum] = tempNum + \". \" + USER_TASKS.get(i);\n }\n return tasks;\n }", "public ArrayList<Task> getTaskList() {\n\t\treturn tasks;\n\t}", "public List<TaskDescription> getActiveTasks();", "@Override\r\n\tpublic ArrayList<Task> getAllTasks() {\n\t\treturn null;\r\n\t}", "private TaskListItem[] getListArray() {\n return allLists.toArray(new TaskListItem[allLists.size()]);\n }", "public Task[] getTasks() throws ProcessManagerException {\r\n try {\r\n return Workflow.getTaskManager().getTasks(currentUser, currentRole,\r\n currentProcessInstance);\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_GET_TASKS_FAILED\", e);\r\n }\r\n }", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "public List<Task> listTasks(String extra);", "public int getTasks() {\r\n return tasks;\r\n }", "org.oasis_open.docs.ns.bpel4people.ws_humantask.types._200803.TTaskAbstract[] getTaskAbstractArray();", "public String getTasks() {\n StringJoiner result = new StringJoiner(\"\\n\");\n for (int i = 0; i < tasks.size(); i++) {\n Task t = tasks.get(i);\n result.add(String.format(\"%d.%s\", i + 1, t));\n }\n\n return result.toString();\n }", "private static Task[] createTaskList() {\n\t\t\n\t Task evalTask = new EvaluationTask();\n\t Task tamperTask = new TamperTask();\n\t Task newDocTask = new NewDocumentTask();\n\t Task reportTask = new AssignmentReportTask();\n\n\t Task[] taskList = {evalTask, tamperTask, newDocTask, reportTask};\n\n\t return taskList;\n\t}", "Set<Task> getAllTasks();", "public ArrayList<Task> allTasks() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Role role : this.roles) {\n if (role instanceof Worker) {\n tasks.add(((Worker) role).getTask());\n } else if (role instanceof Supervisor) {\n tasks.add(((Worker) role).getTask());\n }\n }\n return tasks;\n }", "public ArrayList<Task> getTaskList() {\n return taskList;\n }", "public ArrayList<Task> getVisibleTasks() {\n return this.mTaskStackContainers.getVisibleTasks();\n }", "public List<Task> getTasksClones() {\n return (List<Task>) CloneService.clone(tasks);\n }", "public ArrayList<Task> getTasks() {\n // List of workouts to return\n ArrayList<Task> tasks = new ArrayList<>();\n\n // Cursor is what moves throughout the entire database\n Cursor cursor = database.query(SQLiteHelper.TABLE_TASKS,\n allColumns, null, null, null, null,\n SQLiteHelper.COLUMN_ID + \" ASC\");\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Task task = cursorToTask(cursor);\n\n tasks.add(task);\n\n cursor.moveToNext();\n }\n cursor.close();\n\n return tasks;\n }", "ObservableList<Task> getTaskList();", "public ArrayList<Task> getVisibleTasks() {\n ArrayList<Task> visibleTasks = new ArrayList<>();\n forAllTasks(new Consumer(visibleTasks) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$TaskStackContainers$rQnI0Y8R9ptQ09cGHwbCHDiG2FY */\n private final /* synthetic */ ArrayList f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.TaskStackContainers.lambda$getVisibleTasks$0(this.f$0, (Task) obj);\n }\n });\n return visibleTasks;\n }", "@Override\n\tpublic Object[] splitTasks() {\n\t\tif (tasks == null) {\n\t\t\tSystem.out.println(\"There are \"+taskNum +\" tasks, and handled by \"+clientsNum+\" clients\");\n\t\t}\t\t\n\t\ttasks = new SimpleTask[clientsNum];\n\t\ttq = taskNum / clientsNum;\n//\t\tbatchSize = tq;\n\t\tint left = taskNum - tq * clientsNum;\n\t\t\n\t\tfor (int i = 0; i < tasks.length; i++) {\n\t\t\tint l = 0;\n\t\t\tif (left >= i+1) {\n\t\t\t\tl = 1;\n\t\t\t}\n\t\t\tif (i == 0) {\n\t\t\t\ttasks[i] = new SimpleTask(1, tq + l, batchSize);\n\t\t\t} else {\n\t\t\t\ttasks[i] = new SimpleTask(\n\t\t\t\t\t\ttasks[i - 1].getEnd()+ 1, tasks[i - 1].getEnd() + tq + l, batchSize);\n\t\t\t}\t\t\t\n\t\t}\n//\t\tSystem.out.println(\"done .\"+clientsNum);\n\t\tthis.srvQ2QLSTM.getCfg().getQlSTMConfigurator().setMBSize(batchSize);\n\t\tthis.srvQ2QLSTM.getCfg().getAlSTMConfigurator().setMBSize(batchSize);\t\t\n\t\treturn tasks;\n\t}", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "@Transactional\r\n\tpublic List<String> getTasks(String assignee) {\r\n\t\tString assign = ORDER_ASSIGNEE;\r\n\t\tlogger.info(\"Received order to getTasks, assignee : \" + assign);\r\n\t\tList<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(assign).list();\r\n\r\n\t\tList<String> orders = tasks.stream().map(task -> {\r\n\t\t\tMap<String, Object> variables = taskService.getVariables(task.getId());\r\n\t\t\treturn (String) variables.get(\"orderid\");\r\n\t\t}).collect(Collectors.toList());\r\n\r\n\t\tlogger.info(\"orderid(s) : \" + orders.toString());\r\n\t\treturn orders;\r\n\t}", "public List<Task> getAllTasks() {\n List<Task> taskList = new ArrayList<Task>();\n String queryCommand = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(queryCommand, null);\n if (cursor.moveToFirst()) {\n do {\n Task task = new Task();\n task.setId(cursor.getString(0));\n task.setLabel(cursor.getString(1));\n task.setTime(cursor.getString(2));\n taskList.add(task);\n } while (cursor.moveToNext());\n }\n return taskList;\n }", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();", "public String[] copyTasksIntoArray(ResultSet rset) throws SQLException {\n\n\t\tString tasks[] = new String[5];\n\t\tint i = 0;\n\n\t\twhile (rset.next()) {\n\n\t\t\t// Variables to hold task informations\n\n\t\t\tDate date = rset.getDate(\"dateCreated\");\n\t\t\tString description = rset.getString(\"description\");\n\t\t\tString task = rset.getString(\"task\");\n\n\t\t\tTask t = new Task();\n\t\t\tt.setDateCreated(date);\n\t\t\tt.setDescription(description);\n\t\t\tt.setTask(task);\n\n\t\t\ttasks[i] = t.writeTask();\n\t\t\ti++;\n\t\t}\n\t\treturn tasks;\n\t}", "public List<Task> load(){\n try {\n List<Task> tasks = getTasksFromFile();\n return tasks;\n }catch (FileNotFoundException e) {\n System.out.println(\"☹ OOPS!!! There is no file in the path: \"+e.getMessage());\n List<Task> tasks = new ArrayList();\n return tasks;\n }\n }", "public LiveData<List<Task>> getAllTasks(){\n allTasks = dao.getAll();\n return allTasks;\n }", "public ArrayList<Task> list() {\n return this.list;\n }", "public synchronized List<MonitoredTask> getTasks()\n {\n purgeExpiredTasks();\n ArrayList<MonitoredTask> ret = Lists.newArrayListWithCapacity(tasks.size());\n for (@SuppressWarnings(\"unchecked\") Iterator<TaskAndWeakRefPair> it = tasks.iterator(); it.hasNext(); )\n {\n TaskAndWeakRefPair pair = it.next();\n MonitoredTask t = pair.get();\n ret.add(t.clone());\n }\n return ret;\n }", "public static List<Task> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "public Collection<Node> getTasks(Processor p) {\n return p.getScheduledTasks();\n }", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "public ArrayList<Task> getFinishedTasks(){\r\n return finished;\r\n }", "long[] getServiceNameTasks(java.lang.String serviceName) throws java.io.IOException;", "java.util.List<com.google.cloud.aiplatform.v1.PipelineTaskDetail> \n getTaskDetailsList();", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\n \t\tfor (String member : smembers) {\n \t\t\tString string = jedisConn.get(PENDING_TASK(member));\n \t\t\tScheduledTask task = gson.fromJson(string, ScheduledTask.class);\n \t\t\talltasks.add(task);\n \t\t}\n \t\treturn alltasks;\n \t}", "@OneToMany(mappedBy=\"project\", fetch=FetchType.EAGER)\n\t@Fetch(FetchMode.SUBSELECT)\n\t@JsonIgnore\n\tpublic List<Task> getTasks() {\n\t\treturn this.tasks;\n\t}", "public String listOfTasks() {\n String listOfTasks = Messages.LIST_TASKS_MESSAGE;\n for (int i = 0; i < Parser.getOrderAdded(); i++) {\n listOfTasks += recordedTask.get(i).getTaskNum() + DOT_OPEN_SQUARE_BRACKET\n + recordedTask.get(i).getCurrentTaskType() + CLOSE_SQUARE_BRACKET + OPEN_SQUARE_BRACKET\n + recordedTask.get(i).taskStatus() + CLOSE_SQUARE_BRACKET + Messages.BLANK_SPACE\n + recordedTask.get(i).getTaskName()\n + ((i == Parser.getOrderAdded() - 1) ? Messages.EMPTY_STRING : Messages.NEW_LINE);\n }\n return listOfTasks;\n }", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "@SuppressWarnings(\"unchecked\")\n public List<Item> getListOfTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item\").list();\n session.close();\n return list;\n }", "public List<Task> getAllTask() {\n\t\treturn taskRepo.findAll();\n\t}", "@RequestMapping(value=\"/tasks\", method = RequestMethod.GET)\npublic @ResponseBody List<Task> tasks(){\n\treturn (List<Task>) taskrepository.findAll();\n}", "public ArrayTaskList() {\n\t\tcount = 0;\n\t\tmassTask = new Task[10];\n\t}", "public com.google.protobuf.ProtocolStringList\n getTaskIdList() {\n return taskId_.getUnmodifiableView();\n }", "public ArrayList getTaskListeners(){\n initListener();\n return listeners;\n }", "public String[] getJobsWaiting();", "public List<TaskItem> zGetTasks() throws HarnessException {\n\n\t\tList<TaskItem> items = new ArrayList<TaskItem>();\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']/div\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\n\t\t\tString itemLocator = rowLocator + \"[\" + i + \"]\";\n\n\t\t\tString id;\n\t\t\ttry {\n\t\t\t\tid = this.sGetAttribute(\"xpath=(\" + itemLocator + \")@id\");\n\t\t\t} catch (SeleniumException e) {\n\t\t\t\t// Make sure there is an ID\n\t\t\t\tlogger.warn(\"Task row didn't have ID. Probably normal if message is 'Could not find element attribute' => \"+ e.getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString locator = null;\n\t\t\tString attr = null;\n\n\t\t\t// Skip any invalid IDs\n\t\t\tif ((id == null) || (id.trim().length() == 0))\n\t\t\t\tcontinue;\n\n\t\t\t// Look for zli__TKL__258\n\t\t\tif (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\tlogger.info(\"TASK: \" + id);\n\n\t\t\t\t// Is it checked?\n\t\t\t\t// <div id=\"zlif__TKL__258__se\" style=\"\"\n\t\t\t\t// class=\"ImgCheckboxUnchecked\"></div>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//div[contains(@class, 'ImgCheckboxUnchecked')]\";\n\t\t\t\titem.gIsChecked = this.sIsElementPresent(locator);\n\n\t\t\t\t// Is it tagged?\n\t\t\t\t// <div id=\"zlif__TKL__258__tg\" style=\"\"\n\t\t\t\t// class=\"ImgBlank_16\"></div>\n\t\t\t\tlocator = itemLocator + \"//div[contains(@id, '__tg')]\";\n\t\t\t\t// TODO: handle tags\n\n\t\t\t\t// What's the priority?\n\t\t\t\t// <td width=\"19\" id=\"zlif__TKL__258__pr\"><center><div style=\"\"\n\t\t\t\t// class=\"ImgTaskHigh\"></div></center></td>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div\";\n\t\t\t\tif (!this.sIsElementPresent(locator)) {\n\t\t\t\t\titem.gPriority = \"normal\";\n\t\t\t\t} else {\n\t\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div)@class\";\n\t\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\t\tif (attr.equals(\"ImgTaskHigh\")) {\n\t\t\t\t\t\titem.gPriority = \"high\";\n\t\t\t\t\t} else if (attr.equals(\"ImgTaskLow\")) {\n\t\t\t\t\t\titem.gPriority = \"low\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Is there an attachment?\n\t\t\t\t// <td width=\"19\" class=\"Attach\"><div id=\"zlif__TKL__258__at\"\n\t\t\t\t// style=\"\" class=\"ImgBlank_16\"></div></td>\n\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t+ \"//div[contains(@id, '__at')])@class\";\n\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\tif (attr.equals(\"ImgBlank_16\")) {\n\t\t\t\t\titem.gHasAttachments = false;\n\t\t\t\t} else {\n\t\t\t\t\t// TODO - handle other attachment types\n\t\t\t\t}\n\n\t\t\t\t// See http://bugzilla.zmail.com/show_bug.cgi?id=56452\n\n\t\t\t\t// Get the subject\n\t\t\t\tlocator = itemLocator + \"//td[5]\";\n\t\t\t\titem.gSubject = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the status\n\t\t\t\tlocator = itemLocator + \"//td[6]\";\n\t\t\t\titem.gStatus = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the % complete\n\t\t\t\tlocator = itemLocator + \"//td[7]\";\n\t\t\t\titem.gPercentComplete = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the due date\n\t\t\t\tlocator = itemLocator + \"//td[8]\";\n\t\t\t\titem.gDueDate = this.sGetText(locator).trim();\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}", "@ApiModelProperty(required = true, value = \"List of active tasks generated by the connector\")\n public List<ConnectorTaskId> getTasks() {\n return tasks;\n }", "public static Task[][] read(boolean print) {\n\t\t\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(Config.getFilePath());\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tString line;\n\t\t\tArrayList<String> lines = new ArrayList<>();\n\t\t\tArrayList<String> completedLines = new ArrayList<>();\n\t\t\t\n\t\t\t// We need to keep track of whether we are reading the active or completed tasks\n\t\t\tboolean readingCompleted = false;\n\t\t\tboolean readingActive = false;\n\t\t\t\n\t\t\t// Iterate through every line\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t// Since there will be an indicator before and after the todos, this should toggle properly\n\t\t\t\tif (line.equals(COMPLETED_INDICATOR)) {\n\t\t\t\t\treadingCompleted = !readingCompleted;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (line.equals(ACTIVE_INDICATOR)) {\n\t\t\t\t\treadingActive = !readingActive;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (line.length() > 0) {\n\t\t\t\t\t// This will ignore comments (#) and config properties (:)\n\t\t\t\t\tif (!line.trim().substring(0, 1).equals(\"#\") && !line.trim().substring(0, 1).equals(\":\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Make sure we properly sort whether a task is completed or not\n\t\t\t\t\t\tif (readingCompleted)\n\t\t\t\t\t\t\tcompletedLines.add(line);\n\t\t\t\t\t\tif (readingActive)\n\t\t\t\t\t\t\tlines.add(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tTask[] arr = new Task[lines.size()];\n\t\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\t\tarr[i] = new Task(lines.get(i));\n\t\t\t}\n\n\t\t\t// Now sort the list by recency, so that way this order will be carried\n\t\t\t// into the various printing tasks (for more info, see the implementation of\n\t\t\t// compareTo in the Task class\n\t\t\tArrays.sort(arr);\n\t\t\t\t\t\t\n\t\t\tTask[] completedArr = new Task[completedLines.size()];\n\t\t\tfor (int i = 0; i < completedArr.length; i++) {\n\t\t\t\tcompletedArr[i] = new Task(completedLines.get(i));\n\t\t\t}\n\t\t\t\n\t\t\t// Also sort this one\n\t\t\tArrays.sort(completedArr);\n\t\t\t\n\t\t\tbr.close();\n\t\t\t\n\t\t\treturn new Task[][] {arr, completedArr};\n\t\t\t\n\t\t} catch (IOException ex) {\n\t\t\tif (print) {\n\t\t\t\tif (Config.isColorEnabled())\n\t\t\t\t\tSystem.out.println(Color.errorColor() + \"Error reading file! \\nFile \\\"\" + Color.reset() + Color.ANSI_WHITE + Config.getFilePath() + Color.reset() + Color.errorColor() + \"\\\" not found!\");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"Error reading file! \\nFile \\\"\" + Config.getFilePath() + \"\\\" not found!\");\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@GetMapping(value=\"/all\",produces= { MediaType.APPLICATION_JSON_VALUE })\n\tpublic List<TaskDTO> getAllTasks()\n\t{ \t\n\t\treturn taskService.getAllTasks();\n\t}", "public List<TaskDefinition> getTasksDefinition() throws DaoRepositoryException;", "noNamespace.TaskmonitorrecordDocument.Taskmonitorrecord[] getTaskmonitorrecordArray();", "public TaskList getTasks() {\n\t\t//Creates a copy of the state.\n\t\t//This is needed in order to make it impossible to change state from the outside by manipulating the returned object\n\t\tTaskList temp = new TaskList();\n\t\tsynchronized(taskListState) {\n\t\t\tfor(Task t : taskListState.getList())\n\t\t\t\ttemp.getList().add(t);\n\t\t}\n\t\treturn temp;\n\t}", "public abstract String[] formatTask();", "public ArrayList<Task> getTasks(Calendar cal) \n\t{\n ArrayList<Task> tasks = new ArrayList<Task>();\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tResultSet results = statement.executeQuery(\"SELECT * FROM tasks\");\n\n\t\twhile(results.next())\n\t\t{\n\t\t\tint id = result.getInt(1);\n\t\t\tint year = result.getInt(2);\n\t\t\tint month = result.getInt(3);\n\t\t\tint day = result.getInt(4);\n\t\t\tint hour = result.getInt(5);\n\t\t\tint minute = result.getInt(6);\n\t\t\tString descrip = result.getString(7);\n\t\t\tboolean recurs = result.getBoolean(8);\n\t\t\tint recursDay = result.getInt(9);\n\t\t\t\n\t\t\tCalendar cal = new Calendar();\n\t\t\tcal.set(year, month, day, hour, minute);\n\t\t\t\n\t\t\tTask task;\n\t\t\t\n\t\t\tif(recurs)\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip, recursDay));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttask = new Task(cal, descrip));\n\t\t\t}\n\t\t\t\n\t\t\ttask.setID(id);\n\t\t}\n\t\tstatement.close();\n\t\tresults.close();\n return tasks;\n }", "List<ExtDagTask> taskList(ExtDagTask extDagTask);", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "public String[] getAllJobs();", "@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}", "public static ArrayList<Task> getToDoList() {\n\t\treturn toDoList;\n\t}", "public Vector<String> getTaskTypes() {\r\n\t\tVector<String> v = new Vector<String>();\r\n\r\n\t\tfor (TaskType tt : taskTypes) {\r\n\t\t\tv.add(tt.name);\r\n\t\t}\r\n\r\n\t\treturn v;\r\n\t}", "public List<Task> getAllTasksForUser(long userId);", "long[] getServiceNameTasks(java.lang.String serviceName, java.lang.String status, java.lang.String action) throws java.io.IOException;", "public List<TempWTask> getTaskList(){return taskList;}", "Set<Task> getDependentTasks();", "@Override\n\tpublic List<ScheduleTask> getScheduleTaskList() {\n\t\treturn (List<ScheduleTask>) find(\"from ScheduleTask\");\n\t}", "public static List<Task> findAllRunningTasks() {\r\n List<Task> outTasks = new ArrayList<Task>();\r\n List<ITask> iTasks = findAllTasks(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n\r\n for (ITask iTask : iTasks) {\r\n outTasks.add(convertITaskToTask(iTask));\r\n }\r\n return outTasks;\r\n }", "public interface TaskManager {\n\t/**\n\t * @return all the tasks that have to be executed\n\t */\n\tvoid getTasks();\n}", "private List<SubTask> getSubTasks(TaskDTO taskDTO) {\n List<SubTask> subTasks = new ArrayList<>();\n if (taskDTO.getSubTasksDto() == null) return subTasks;\n for (SubTaskDTO s: taskDTO.getSubTasksDto()) {\n SubTask subTask = new SubTask();\n subTask.setId(s.getId());\n subTask.setSubTitle(s.getSubTitle());\n subTask.setSubDescription(s.getSubDescription());\n subTasks.add(subTask);\n }\n return subTasks;\n }", "public List<Task> getpublishTask(Integer uid);", "public static Collection<Task> collectTasksFromJsonArray(JSONArray tasksArray) {\n Collection<Task> tasks = new ArrayList<Task>();\n for (Object object : tasksArray) {\n if (object instanceof JSONObject) {\n JSONObject taskJsonObject = (JSONObject) object;\n String name = taskJsonObject.getString(\"name\");\n String description = taskJsonObject.getString(\"description\");\n long durationMinutes = taskJsonObject.getLong(\"duration\");\n Duration duration = Duration.ofMinutes(durationMinutes);\n int priorityInt = taskJsonObject.getInt(\"taskPriority\");\n TaskPriority priority = new TaskPriority(priorityInt);\n Task newTask = new Task(name, description, duration, priority);\n tasks.add(newTask);\n }\n }\n return tasks;\n }", "public List<String> getRunningESBTaskList() throws Exception {\n return ntaskManager.getRunningTaskList();\n }", "public ArrayList<Task> getCombinedTaskList() {\n return combinedTaskList;\n }", "@GetMapping(\"/getall\")\n public List<Task> getAll() {\n return taskService.allTasks();\n\n }" ]
[ "0.75937533", "0.7369134", "0.7210738", "0.7111246", "0.7071655", "0.7038894", "0.7038894", "0.7038894", "0.69979", "0.69979", "0.69600356", "0.6948311", "0.69330865", "0.6909587", "0.690759", "0.68943936", "0.6892427", "0.6885126", "0.6843163", "0.6825516", "0.6742419", "0.6741807", "0.6739885", "0.67320555", "0.67155653", "0.6699724", "0.66853637", "0.66800743", "0.66642654", "0.6639778", "0.6619768", "0.66089785", "0.65808463", "0.65723485", "0.655307", "0.6542134", "0.6528195", "0.6467695", "0.6464389", "0.6454693", "0.6409888", "0.6407341", "0.6397244", "0.6392262", "0.6359729", "0.6351806", "0.6342114", "0.63344485", "0.63315684", "0.63276076", "0.63269126", "0.6309908", "0.63020957", "0.62740624", "0.6252692", "0.6234826", "0.6220814", "0.6210757", "0.6197167", "0.6176175", "0.61719954", "0.61691505", "0.615866", "0.6146829", "0.61122996", "0.6112252", "0.60974246", "0.6034162", "0.6034156", "0.6029316", "0.5964447", "0.5936721", "0.5930126", "0.59274256", "0.59057117", "0.59018", "0.5894342", "0.587495", "0.5865175", "0.58619183", "0.5852777", "0.5849774", "0.58494765", "0.584482", "0.58447677", "0.5820211", "0.5808655", "0.5807924", "0.58073705", "0.5805263", "0.5797758", "0.5783869", "0.57787263", "0.5773437", "0.5764091", "0.5763363", "0.57565105", "0.57509184", "0.5750432", "0.57461214" ]
0.8103638
0
Get subfolders as array.
public TaskFolder[] getFolders() { return folders.toArray(new TaskFolder[folders.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String[] getBaseFolders();", "protected abstract String[] getFolderList() throws IOException;", "@Override\r\n\tpublic String[] listFolders() throws FileSystemUtilException {\r\n\t\t// getting all the files and folders in the given file path\r\n\t\tString[] files = listFiles();\r\n\t\tList foldersList = new ArrayList();\r\n\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\t// all the folder are ends with '/'\r\n\t\t\tif (files[i].endsWith(\"/\") && isValidString(files[i])) {\r\n\t\t\t\tfoldersList.add(files[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] folders = new String[foldersList.size()];\r\n\t\t// getting only folders from returned array of files and folders\r\n\t\tfor (int i = 0; i < foldersList.size(); i++) {\r\n\t\t\tfolders[i] = foldersList.get(i).toString();\r\n\t\t}\r\n\t\treturn folders;\r\n\r\n\t}", "public String[] getFolders() throws FileSystemUtilException\r\n\t{\r\n\t\t//getting all the files and folders in the given file path\r\n\t\tString[] files = listFiles();\r\n\t\tList<String> foldersList = new ArrayList<String>();\r\n\t\tfor(int i=0;i<files.length;i++){\r\n\t\t\t//all the folder are ends with '/'\r\n\t\t\tif(files[i].endsWith(\"/\") && isValidString(files[i])){\r\n\t\t\t\tfoldersList.add(files[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] folders = new String[foldersList.size()];\r\n\t\t//getting only folders from returned array of files and folders\r\n\t\tfor(int i=0;i<foldersList.size();i++){\r\n\t\t\tfolders[i] = foldersList.get(i).toString();\r\n\t\t}\r\n\t\treturn folders;\r\n\t}", "public abstract List<String> getDirs( );", "@NonNull\n Single<List<String>> getFolderNames();", "public String getSubDirs() {\n return subDirs;\n }", "public LinkedList<ApfsDirectory> getSubDirectories() {\n LinkedList<ApfsDirectory> subDirectories = new LinkedList<ApfsDirectory>();\n for(ApfsElement apfse: children) {\n if(apfse.isDirectory())\n subDirectories.add((ApfsDirectory) apfse);\n }\n return subDirectories;\n }", "public ArrayOfTMetaDataPathDetail getArrayOfSubPaths() {\n\n\t\treturn arrayOfSubPaths;\n\t}", "List<String> getListPaths();", "@Test\n public void testGetSubDirectories() {\n System.out.println(\"getSubDirectories from a folder containing 2 subdirectories\");\n String path = System.getProperty(\"user.dir\")+fSeparator+\"MyDiaryBook\"+fSeparator+\"Users\"+fSeparator+\"Panagiwtis Georgiadis\"\n +fSeparator+\"Entries\";\n \n FilesDao instance = new FilesDao();\n File entriesFile = new File(path);\n File subFolder;\n String[] children = entriesFile.list();\n File[] expResult = new File[entriesFile.list().length];\n \n for(int i=0;i<entriesFile.list().length;i++)\n {\n subFolder = new File(path+fSeparator+children[i]);\n if(subFolder.isDirectory())\n expResult[i] = subFolder; \n }\n \n File[] result = instance.getSubDirectories(path);\n \n assertArrayEquals(expResult, result);\n }", "public List<Path> getAllPaths();", "public abstract ScaledPathArray getPathList();", "File[] getFilesInFolder(String path) {\n return new File(path).listFiles();\n }", "public boolean getSubfolders() {\n return this.subfolders;\n }", "public List<String> _getSavingDirectories() throws CallError, InterruptedException {\n return (List<String>)service.call(\"_getSavingDirectories\").get();\n }", "@Override\n public List<Directory> get()\n {\n return getAllDirectories();\n }", "List<String> getDirectories(String path) throws IOException;", "public List<Folder> getFolders() {\n return folders;\n }", "public String[] getFoldersNames(){\n\t\tCollection<String> listNames = new ArrayList<String>();\n\t\tfor( Folder folder : m_Folders){\n\t\t\tlistNames.add(folder.m_Name);\n\t\t}\n\t\t\n\t\tString[] names = new String[listNames.size()]; \n\t\tnames = listNames.toArray(names);\n\t\treturn names;\t\t\n\t}", "java.util.List<java.lang.String>\n getPathsList();", "public String[] getSubDirs(String dirPath) throws IOException {\n\t\tmasterSock.write((GET_DIR_INFO + \" \" + dirPath).getBytes());\n\t\tmasterSock.write(\"\\r\\n\".getBytes());\n\t\tmasterSock.flush();\n\t\t\n\t\tString line = masterSock.readLine();\n\t\tString[] subdirs = null;\n\t\t\n\t\tswitch (line) {\n\t\tcase STR_OK:\n\t\t\tline = masterSock.readLine();\t// reversed line for number of subdirs and number of sub files\n\t\t\tint numdirs = Integer.parseInt(line.split(\" \")[0]);\n\t\t\tif (numdirs == 0)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tline = masterSock.readLine();\t// line for listing sub dirs\n\t\t\tsubdirs = line.split(\" \");\n\t\t\tbreak;\n\t\tcase STR_NOT_FOUND:\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\t\n\t\t}\n\t\t\n\t\treturn subdirs;\n\t}", "@Override\n\t\tpublic List<? extends IObject> getChildren() {\n\t\t\tif (!this.hasChildren()) {\n\t\t\t\treturn new ArrayList<>();\n\t\t\t}\n\t\t\tIterator<IFolder> subfolders = this.folder.subfolder();\n\t\t\treturn Lists.transform(ImmutableList.copyOf(subfolders), new Function<IFolder, FolderTreeObject>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic FolderTreeObject apply(IFolder input) {\n\t\t\t\t\treturn new FolderTreeObject(input, FolderTreeObject.this.rootFolder);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public final FileSystem[] toArray() {\n synchronized (getClass()) {\n FileSystem[] fss = new FileSystem[fileSystems.size()];\n fileSystems.toArray(fss);\n return fss;\n }\n }", "public com.walgreens.rxit.ch.cda.StrucDocSub[] getSubArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(SUB$2, targetList);\n com.walgreens.rxit.ch.cda.StrucDocSub[] result = new com.walgreens.rxit.ch.cda.StrucDocSub[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "public static List<String> getDrives(){\n root = new ArrayList<>();\n for(String temp : rootDir){\n File file = new File(temp);\n if(file.isDirectory()){\n root.add(temp);\n }\n }\n return root;\n }", "public static String[] getFolders() throws IOException {\n\t\tString[] paths = new String[2];\n\t\tif ((new File(PATHS)).exists()) {\n\t\t\tpaths = readPaths();\n\t\t} else {\n\t\t\tpaths[0] = checkSaveGameFolder();\n\t\t\tpaths[1] = checkInstallFolder();\n\t\t}\n\t\treturn paths;\n\t}", "public ArrayList<String> getDirectories() {\n\n\t\t//\n\t\t// construct array list\n\t\t//\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\tif (m_db == null)\n\t\t\treturn list;\n\n\t\t//\n\t\t// read directories\n\t\t//\n\t\tCursor cursor = m_db.query(DIRECTORY_TABLE_NAME,\n\t\t\t\tnew String[] { DIRECTORY_FIELD_PATH }, null, null, null, null,\n\t\t\t\tnull);\n\n\t\t//\n\t\t// collect result\n\t\t//\n\t\tcollectResultSet(cursor, list);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// return result list\n\t\t//\n\t\treturn list;\n\t}", "public String[] list() {\n String[] list = _file.list();\n if (list == null) {\n return null;\n }\n for (int i = list.length; i-- > 0; ) {\n if (new File(_file, list[i]).isDirectory() && !list[i].endsWith(\"/\")) {\n list[i] += \"/\";\n }\n }\n return list;\n }", "public List<Folder> getFolders() {\n return client.get(FOLDERS_PATH, Folder.class).getEntries();\n }", "public List<IDirectory> getAllChildDir() {\n return this.children;\n }", "List<Path> getFiles();", "public ArrayList<path> getPaths(){\r\n return paths;\r\n }", "public String[] getComboBoxList(String path) {\r\n\t\t// We setup the path to search.\r\n\t\tFile file = new File(path);\r\n\t\tFile[] files = file.listFiles(File::isDirectory);\r\n\r\n\t\t// We initialise the length of String[] to the length of all the files.\r\n\t\t// This way, we prevent any OutOfBounds exceptions as the maximum length is the\r\n\t\t// length of all the files.\r\n\t\tString[] directories = new String[files.length];\r\n\r\n\t\t// We add the directories to the String[].\r\n\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\tdirectories[i] = files[i].getName().toString();\r\n\t\t}\r\n\r\n\t\treturn directories;\r\n\t}", "public SubMenuItem[] getArray() {\n return this.toArray(new SubMenuItem[this.size()]);\n }", "public static List<String> getRootDirectories(String... varargs) {\n\t\t// setting the default value when argument's value is omitted\n\t\tString sessionID = varargs.length > 0 ? varargs[0] : null;\n\t\t// Return a list of root-directories available to sessionID\n\t\tsessionID = sessionId(sessionID);\n\t\ttry {\n\t\t\tString url = apiUrl(sessionID, false) + \"GetRootDirectories?sessionID=\" + PMA.pmaQ(sessionID);\n\t\t\tString jsonString = PMA.httpGet(url, \"application/json\");\n\t\t\tList<String> rootDirs;\n\t\t\tif (PMA.isJSONArray(jsonString)) {\n\t\t\t\tJSONArray jsonResponse = PMA.getJSONArrayResponse(jsonString);\n\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\trootDirs = new ArrayList<>();\n\t\t\t\tfor (int i = 0; i < jsonResponse.length(); i++) {\n\t\t\t\t\trootDirs.add(jsonResponse.optString(i));\n\t\t\t\t}\n\t\t\t\t// return dirs;\n\t\t\t} else {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID,\n\t\t\t\t\t\tpmaAmountOfDataDownloaded.get(sessionID) + jsonResponse.length());\n\t\t\t\tif (jsonResponse.has(\"Code\")) {\n\t\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\t\tPMA.logger.severe(\"getrootdirectories() failed with error \" + jsonResponse.get(\"Message\"));\n\t\t\t\t\t}\n\t\t\t\t\t// throw new Exception(\"getrootdirectories() failed with error \" +\n\t\t\t\t\t// jsonResponse.get(\"Message\"));\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn rootDirs;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "public Path[] getPaths()\r\n\t{\r\n\t return paths;\r\n\t}", "public File[] elements() {\n File plik = new File(katalog);\n katalog = plik.getAbsolutePath();\n if (katalog.endsWith(\".\")) {\n katalog = katalog.substring(0, katalog.length() - 1);\n }\n return plik.listFiles();\n }", "public String[] getSubFiles(String dirPath) throws IOException {\n\t\tmasterSock.write((GET_DIR_INFO + \" \" + dirPath).getBytes());\n\t\tmasterSock.write(\"\\r\\n\".getBytes());\n\t\tmasterSock.flush();\n\t\t\n\t\tString line = masterSock.readLine();\n\t\tString[] subfiles = null;\n\t\t\n\t\tswitch (line) {\n\t\tcase STR_OK:\n\t\t\tline = masterSock.readLine();\t// reversed line for number of subdirs and number of sub files\n\t\t\tint numfiles = Integer.parseInt(line.split(\" \")[1]);\n\t\t\tif (numfiles == 0)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tline = masterSock.readLine();\t// line for listing sub dirs\n\t\t\tsubfiles = line.split(\" \");\n\t\t\tbreak;\n\t\tcase STR_NOT_FOUND:\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\t\n\t\t}\n\t\t\n\t\treturn subfiles;\n\t}", "public String getFolders()\r\n\t{\r\n\t\tIrUser user = userService.getUser(userId, false);\r\n\t\tif( !item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) && \r\n\t\t\t\t!institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId))\r\n\t\t{\r\n\t\t return \"accessDenied\";\r\n\t\t}\r\n\t\tif(parentFolderId != null && parentFolderId > 0)\r\n\t\t{\r\n\t\t folderPath = userFileSystemService.getPersonalFolderPath(parentFolderId);\r\n\t\t}\r\n\t\t\r\n\t\tCollection<PersonalFolder> myPersonalFolders = userFileSystemService.getPersonalFoldersForUser(userId, parentFolderId);\r\n\t\t\r\n\t\tCollection<PersonalFile> myPersonalFiles = userFileSystemService.getPersonalFilesInFolder(userId, parentFolderId);\r\n\t\t\r\n\t fileSystem = new LinkedList<FileSystem>();\r\n\t \r\n\t for(PersonalFolder o : myPersonalFolders)\r\n\t {\r\n\t \tfileSystem.add(o);\r\n\t }\r\n\t \r\n\t for(PersonalFile o: myPersonalFiles)\r\n\t {\r\n\t \tfileSystem.add(o);\r\n\t }\r\n\t \r\n\t FileSystemSortHelper sortHelper = new FileSystemSortHelper();\r\n\t sortHelper.sort(fileSystem, FileSystemSortHelper.TYPE_DESC);\r\n\t return SUCCESS;\r\n\t \r\n\t}", "private static ArrayList<File> buildFilesArray() {\n ArrayList<File> result = new ArrayList<>();\n rAddFilesToArray(workingDirectory, result);\n return result;\n }", "@Test\n public void testGetDirectoryList() {\n System.out.println(\"getDirectoryList for existing folder with subfolders\");\n String entriesPath = folder.toString();\n FilesDao instance = new FilesDao();\n String[] expResult = new String[4];\n expResult[0]=\"EmptyFolder\";\n expResult[1]=\"Images\";\n expResult[2]=\"Texts\";\n expResult[3]=\"Videos\";\n Arrays.sort(expResult);\n String[] result;\n try{\n result = instance.getDirectoryList(entriesPath);\n Arrays.sort(result);\n }catch(EntryException ex){\n result = null;\n }\n \n assertArrayEquals(expResult, result);\n }", "public List<Folder> getAllFolders() {\r\n\t\ttry {\r\n\t\t\t// Init our list of folders and start off with the default folder\r\n\t\t\tList<Folder> folders = new LinkedList<Folder>();\r\n\t\t\tfolders.addAll(Arrays.asList(store.getDefaultFolder().list()));\r\n\t\t\t\r\n\t\t\t// The following loop is repeated as long as there are subfolders in\r\n\t\t\t// our current folder. This is done by checking if the folders list\r\n\t\t\t// size has been increased since the last loop run, i.e. if new folders\r\n\t\t\t// have been added. Each run adds a new sub-layer of folders.\r\n\t\t\tint currentListSize = 0;\r\n\t\t\tint currentNewIndex = 0;\r\n\t\t\tdo {\r\n\t\t\t\tcurrentNewIndex = currentListSize;\r\n\t\t\t\tcurrentListSize = folders.size();\r\n\t\t\t\t\r\n\t\t\t\t// First save the new found folders and then add them to our folders\r\n\t\t\t\t// list. This can't be done at the same time as it leads to a \r\n\t\t\t\t// ConcurrentModificationException.\r\n\t\t\t\tList<Folder> foldersToAdd = new LinkedList<Folder>();\r\n\t\t\t\tfor (int index = currentNewIndex; index < folders.size(); index++) {\r\n\t\t\t\t\t// If folder cannot hold folders don't look for\r\n\t\t\t\t\tif ((folders.get(index).getType() & Folder.HOLDS_FOLDERS) != 0) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tfoldersToAdd.addAll(Arrays.asList(folders.get(index).list()));\r\n\t\t\t\t}\r\n\t\t\t\tfolders.addAll(foldersToAdd);\r\n\t\t\t} while (currentListSize < folders.size());\r\n\t\t\t\r\n\t\t\t// Take only folders that can contain mails\r\n\t\t\tfolders = Lists.newLinkedList(Iterables.filter(folders, new Predicate<Folder>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic boolean apply(Folder folder) {\r\n\t\t\t\t\tboolean containsMessages = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tcontainsMessages = (folder.getType() & Folder.HOLDS_MESSAGES) != 0;\r\n\t\t\t\t\t} catch (MessagingException e) {\r\n\t\t\t\t\t\tLog.error(e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn containsMessages;\r\n\t\t\t\t}\r\n\t\t\t}));\r\n\t\t\t\r\n\t\t\treturn folders;\r\n\t\t} catch (MessagingException e) {\r\n\t\t\t// Imposible to reach\r\n\t\t\tLog.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null; // Imposible\r\n\t}", "public List<Folder> getFolders (Long userId) throws BookMarkException;", "public File[] getAllFiles(String sFolderPath) {\n\n File[] files = null;\n ArrayList<File> altemp = new ArrayList<File>();\n try {\n File folder = new File(sFolderPath);\n files = folder.listFiles();\n\n for (int i = 0; i < files.length; i++) {\n if (files[i].isFile()) {\n altemp.add(files[i]);\n }\n }\n\n files = null;\n files = altemp.toArray(new File[altemp.size()]);\n\n } catch (Exception e) {\n files = null;\n } finally {\n return files;\n }\n }", "@Override\r\n public List<Folder> getAllFolder() {\n return folderRepository.findAll();\r\n }", "public String[] getRoots() {\n return roots;\n }", "public List<String> getPaths() {\n List<String> result;\n synchronized (this.paths) {\n result = this.paths;\n }\n return result;\n }", "protected File[] getFiles() {\r\n DirectoryScanner scanner = new DirectoryScanner(rootDir,true,\"*.xml\");\r\n List<File> files = scanner.list();\r\n return files.toArray(new File[files.size()]);\r\n }", "abstract public List<S> getPath();", "private File[] getResourceFolderFiles(String folder) {\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader();\n\t\tURL url = loader.getResource(folder);\n\t\tString path = url.getPath();\n\n\t\treturn new File(path).listFiles();\n\n\t}", "public String[] getDirectories(String path) {\r\n\t\t// We initialise the String[].\r\n\t\tString[] directories = { \"No Directories Found\" };\r\n\r\n\t\t// We setup the path to search.\r\n\t\tFile file = new File(path);\r\n\t\tFile[] files = file.listFiles(File::isDirectory);\r\n\r\n\t\t// We check if there are any directories at all.\r\n\t\t// If there are no directories, we just return the initialised string.\r\n\t\tif (files.length != 0) {\r\n\t\t\tdirectories = new String[files.length];\r\n\r\n\t\t\t// We add the directories to the String[].\r\n\t\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\t\tdirectories[i] = files[i].getName().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn directories;\r\n\t}", "public abstract List<String> path();", "IStorageService subFolder(String path);", "public Tile[] getPath() {\n\t\tTile[] path = new Tile[tilePath.size()];\n\t\treturn tilePath.toArray(path);\n\t}", "public String[] listDirectory( String directory, FileType type );", "private List<File> getFileList(File root){\n\t List<File> returnable = new ArrayList<File>();\n\t if(root.exists()){\n\t\t for(File currentSubFile : root.listFiles()){\n\t\t\t if(currentSubFile.isDirectory()){\n\t\t\t\t returnable.addAll(getFileList(currentSubFile));\n\t\t\t } else {\n\t\t\t\t returnable.add(currentSubFile);\n\t\t\t }\n\t\t }\n\t }\n\t return returnable;\n }", "public String[] allDocs() {\r\n\t\t\r\n\t\tFile folderNames = new File(folderName);\r\n int i=0;\r\n File[] files = folderNames.listFiles();\r\n String[] documents = new String[files.length];\r\n for (File file: files)\r\n {\r\n \tdocuments[i] = file.getName();\r\n i++;\r\n }\r\n return documents;\t\r\n\t}", "synchronized List<File> getRoots() {\n\t\t\treturn new ArrayList<>(roots);\n\t\t}", "Object[] getChildArray();", "private File[] getFilesInDirectory() {\n\t\t//Show Directory Dialog\n\t\tDirectoryChooser dc = new DirectoryChooser();\n\t\tdc.setTitle(\"Select Menu File Directory\");\n\t\tString folderPath = dc.showDialog(menuItemImport.getParentPopup().getScene().getWindow()).toString();\n\t\t\n\t\t//Update Folder location text\n\t\ttxtFolderLocation.setText(\"Import Folder: \" + folderPath);\n\t\t//Now return a list of all the files in the directory\n\t\tFile targetFolder = new File(folderPath);\n\t\t\n\t\treturn targetFolder.listFiles(); //TODO: This returns the names of ALL files in a dir, including subfolders\n\t}", "public List<PartialPath> getAllStorageGroupPaths() {\n List<PartialPath> res = new ArrayList<>();\n Deque<IMNode> nodeStack = new ArrayDeque<>();\n nodeStack.add(root);\n while (!nodeStack.isEmpty()) {\n IMNode current = nodeStack.pop();\n if (current.isStorageGroup()) {\n res.add(current.getPartialPath());\n } else {\n nodeStack.addAll(current.getChildren().values());\n }\n }\n return res;\n }", "public List<SessionFile> getRoots() {\n List<SessionFile> result = Factory.newArrayList();\n for (SharedFile shared : fileSystem.getRoots())\n result.add(getOrCreateFile(shared));\n return result;\n }", "public List<Path> getPaths() {\n return _thePaths;\n }", "public File[] getFiles(File folder) {\n\t\treturn folder.listFiles();\n\t}", "public Object[] getParentInfo(String path);", "protected abstract int[] getPathElements();", "public static List<CMSFile> getFolderChildren(String path){\n return CMSFile.find(\"name NOT LIKE '\" + path + \"%/%' and name like '\" + path + \"%'\").fetch();\n }", "public List<File> listCacheDirs() {\n List<File> cacheDirs = new ArrayList<File>();\n File file = new File(parent);\n if(file.exists()) {\n File[] files = file.listFiles(new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n // TODO Auto-generated method stub\n return pathname.isDirectory() && \n pathname.getName().startsWith(CacheDirectory.cacheDirNamePrefix(identity));\n }\n \n });\n cacheDirs = Arrays.asList(files);\n }\n return cacheDirs;\n }", "public List<String> getFiles();", "public String[] getIncludedDirectories()\n {\n int count = dirsIncluded.size();\n String[] directories = new String[ count ];\n for( int i = 0; i < count; i++ )\n {\n directories[ i ] = (String)dirsIncluded.get( i );\n }\n return directories;\n }", "public String[] getListOfFileInArray() {\n String[] items = new String[this.listOfFile.size()];\n for(int x=0;x<this.listOfFile.size();x++) {\n items[x]=this.listOfFile.get(x).getName();\n }\n return items;\n }", "public ArrayList<Integer> getPaths() {\n\t\treturn paths;\n\t}", "private File[] arrayDosArquivos() {\r\n\t\tFile file = new File(CAMINHO);\r\n\t\tfile.mkdirs();\r\n\t\treturn file.listFiles();\r\n\t}", "public ArrayList<OfflineSong> getPlayList() {\n System.out.println(MEDIA_PATH);\n if (MEDIA_PATH != null) {\n File home = new File(MEDIA_PATH);\n File[] listFiles = home.listFiles();\n if (listFiles != null && listFiles.length > 0) {\n for (File file : listFiles) {\n System.out.println(file.getAbsolutePath());\n if (file.isDirectory()) {\n scanDirectory(file);\n } else {\n addSongToList(file);\n }\n }\n }\n }\n // return songs list array\n return songsList;\n }", "private ArrayList<String> getTrackPathList() {\n String MEDIA_TRACKS_PATH = \"CuraContents/tracks\";\n File fileTracks = new File(Environment.getExternalStorageDirectory(), MEDIA_TRACKS_PATH);\n if (fileTracks.isDirectory()) {\n File[] listTracksFile = fileTracks.listFiles();\n ArrayList<String> trackFilesPathList = new ArrayList<>();\n for (File file1 : listTracksFile) {\n trackFilesPathList.add(file1.getAbsolutePath());\n }\n return trackFilesPathList;\n }\n return null;\n }", "protected String[] doListChildren()\n {\n return (String[])m_children.toArray( new String[ m_children.size() ] );\n }", "public File[] getFiles(String mkey) {\n\t\tFile last;\n\t\tint i = 0;\n\t\tArrayList<File> v = new ArrayList<>();\n\t\twhile (true) {\n\t\t\tlast = getFile(mkey + i);\n\t\t\ti++;\n\t\t\tif (last == null)\n\t\t\t\tbreak;\n\t\t\tv.add(last);\n\t\t}\n\t\tif (v.size() != 0) {\n\t\t\tFile[] path = new File[v.size()];\n\t\t\treturn v.toArray(path);\n\t\t} else {\n\t\t\treturn (File[]) getDefault(mkey);\n\t\t}\n\t}", "private List<Folder> getParentFolders(Folder childFolder) throws BizfwServiceException {\n List<Folder> parentFolderList = new ArrayList<>();\n while (StringUtils.isNotEmpty(childFolder.getParentId())) {\n Folder parentFolder = queryById(childFolder.getParentId());\n parentFolderList.add(parentFolder);\n childFolder = parentFolder;\n }\n return parentFolderList;\n }", "public List <WebFile> getChildFiles()\n{\n if(_type==FileType.SOURCE_DIR) return getSourceDirChildFiles();\n return _file.getFiles();\n}", "public List<IFile> getAllChildFiles() {\n return this.childFiles;\n }", "public static String[] listFilesAsArray() {\n\t\t// Recursively find all .java files\n\t\tFile path = new File(Project.pathWorkspace());\n\t\tFilenameFilter filter = new FilenameFilter() {\n\n\t\t\tpublic boolean accept(File directory, String fileName) {\n\t\t\t\treturn fileName.endsWith(\".java\");\n\t\t\t}\n\t\t};\n\t\tCollection<File> files = listFiles(path, filter, true);\n\n\t\tArrayList<File> t = new ArrayList<File>(files);\n\t\tfor (int i = 0; i < t.size(); i++) {\n\t\t\tString s = t.get(i).getAbsolutePath();\n\t\t\tif (s.contains(\"XX\") || s.contains(\"testingpackage\") || s.contains(\"datageneration\")) {\n\t\t\t\tt.remove(t.get(i));\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tfiles = t;\n\n\t\t// Convert the Collection into an array\n\t\tFile[] allJavaFiles = new File[files.size()];\n\t\tfiles.toArray(allJavaFiles);\n\n\t\tString[] allTestClasses = new String[allJavaFiles.length];\n\t\tString temp = \"\";\n\n\t\t// convert file path to full package declaration for the class\n\t\tfor (int i = 0; i < allJavaFiles.length; i++) {\n\t\t\ttemp = allJavaFiles[i].toString();\n\t\t\ttemp = temp.replace(\".java\", \"\").replace(\"\\\\\", \".\"); // remove .java convert backslash\n\t\t\tif (temp.indexOf(\"com.textura\") < 0) {\n\t\t\t\tallTestClasses[i] = \"null\";\n\t\t\t} else {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"com.textura\"));\n\t\t\t\ttemp = temp.replace(\"com.\", \"\");\n\t\t\t\tallTestClasses[i] = temp;\n\t\t\t}\n\t\t}\n\t\treturn allTestClasses;\n\t}", "public ArrayList<String> getChildrenDirs(MasterMgrClient mclient, String start)\n\tthrows PipelineException\n\t{\n\t\tArrayList<String> toReturn = new ArrayList<String>();\n\t\tTreeMap<String, Boolean> comps = new TreeMap<String, Boolean>();\n\t\tcomps.put(start, false);\n\t\tNodeTreeComp treeComps = mclient.updatePaths(pUser, pView, comps);\n\t\tPath p = new Path(start);\n\t\tArrayList<String> parts = p.getComponents();\n\t\tfor (String comp : parts)\n\t\t{\n\t\t\tif ( treeComps == null )\n\t\t\t\tbreak;\n\t\t\ttreeComps = treeComps.get(comp);\n\t\t}\n\t\tif ( treeComps != null )\n\t\t{\n\t\t\tfor (String s : treeComps.keySet())\n\t\t\t{\n\t\t\t\tNodeTreeComp comp = treeComps.get(s);\n\t\t\t\tif ( comp.getState() == NodeTreeComp.State.Branch )\n\t\t\t\t\ttoReturn.add(s);\n\t\t\t}\n\t\t}\n\t\treturn toReturn;\n\t}", "public ArrayList<ArrayList<String>> getPathList() {\r\n\t\treturn pathList;\r\n\t}", "@Override\n\tpublic Iterable<Path> getRootDirectories() {\n\t\treturn null;\n\t}", "private ArrayList<String> listFilesForFolder(File folder, TaskListener listener) {\n \tArrayList<String> lista = new ArrayList<String>();\n \tif(folder.exists()){\n\t \tFile[] listOfFiles = folder.listFiles();\n\t\t\t if(listOfFiles != null){\t\n\t\t\t\tfor (File file : listOfFiles) {\n\t\t\t\t\t if (file.isDirectory()) {\t\n\t\t\t\t \tlista.add(file.getName());\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t }\n\t\t}\n\t\treturn lista;\n\t}", "public abstract List<String> getFiles( );", "public ArrayList<String> getPath() {\n return list;\n }", "public List<DocumentFile> listFolders(@NonNull Context context, @NonNull DocumentFile parent) {\n return listDocumentFiles(context, parent, null, true, false, false);\n }", "List<String> getDirectories(String path, String searchPattern) throws IOException;", "org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D[] getPathArray();", "public List<String> ls(String path) {\n\t\treturn getDirectory(path, directory).stringy();\n\t}", "public List<File> getFiles();", "public ArrayList<FolderDTO> templateGetFoldersByParent(Long idParent)\n\t{\n\t\tArrayList<FolderDTO> returnList = new ArrayList<>();\n\t\tFolderDAO dao = new FolderDAO();\n\t\tCollection<Folder> folderSub = dao.getByParent(idParent);\n\t\t\n\t\tfor(Folder folder:folderSub){\n\t\t\tFolderDTO folderDto = new FolderDTO();\n\t\t\tfolderDto.setId(folder.getId());\n\t\t\tfolderDto.setTitle(folder.getTitle());\n\t\t\treturnList.add(folderDto);\n\t\t}\n\t\t\n\t\treturn returnList;\n\t}", "public List<String> paths(TreeNode root){\r\n List<String> result = new ArrayList<>();\r\n if(root!=null){\r\n binaryTreePath(root, \"\", result);\r\n }\r\n for(String s: result){\r\n System.out.println(s);\r\n }\r\n return result;\r\n }", "@Override\r\n public void dirToPath(String[] arr) {\n\r\n }", "ArrayList<String> getRoots() {\n return mRoots;\n }", "public static File[] getFilesInDirectory(String path) {\n File f = new File(path);\n File[] file = f.listFiles();\n return file;\n }", "private File[] getFiles() {\n\n if (mPPTFilePath == null) {\n mPPTFilePath = getArguments().getString(PPTPathString);\n }\n\n String Path = mPPTFilePath;\n File mFile = new File(Path);\n if (mFile.exists() && mFile.isDirectory() && mFile.listFiles()!=null) {\n\n return mFile.listFiles();\n } else {\n Log.d(TAG, \"File==null\");\n return null;\n }\n }", "public void setSubfolders(boolean subfolders) {\n this.subfolders = subfolders;\n }" ]
[ "0.709551", "0.6899344", "0.662543", "0.6394365", "0.6266431", "0.6242996", "0.62356687", "0.62049687", "0.6166231", "0.61420125", "0.6113502", "0.61034304", "0.60688883", "0.6068049", "0.60574967", "0.60433424", "0.6013885", "0.6008967", "0.59690803", "0.59369105", "0.58438295", "0.58293694", "0.58118224", "0.5801275", "0.57998824", "0.5793195", "0.5765844", "0.57647514", "0.57464623", "0.5738354", "0.57105863", "0.57066554", "0.5692977", "0.5668343", "0.5667699", "0.56668556", "0.5663543", "0.5651247", "0.5645696", "0.56323206", "0.56174123", "0.5599552", "0.5575877", "0.5574069", "0.5558523", "0.55344486", "0.5531714", "0.5528263", "0.5515263", "0.54840577", "0.54801416", "0.547163", "0.5470457", "0.54586744", "0.54340273", "0.54005", "0.5391867", "0.53828424", "0.535827", "0.5354951", "0.5327363", "0.53263366", "0.5320078", "0.52978367", "0.5295048", "0.52907014", "0.5287735", "0.52862805", "0.52812445", "0.5276745", "0.5275597", "0.52743745", "0.52553385", "0.5229236", "0.52253777", "0.52121323", "0.52098954", "0.52089834", "0.5206165", "0.52028984", "0.5195509", "0.5190711", "0.51796496", "0.517307", "0.5164092", "0.51615167", "0.515714", "0.5155474", "0.514823", "0.5141674", "0.51336664", "0.51334584", "0.5120719", "0.5114134", "0.5113417", "0.5108687", "0.51071775", "0.5103305", "0.510233", "0.5089787" ]
0.6918355
1
Add task to folder.
public void addTask(Task task) { tasks.add(task); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addTask(Task task);", "@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}", "public void add(Task task){ this.tasks.add(task);}", "@Override\n public CommandResult execute() {\n tasks.add(taskToAdd);\n try {\n storage.appendToFile(taskToAdd);\n return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));\n } catch (IOException e) {\n return new CommandResult(e.getMessage());\n }\n }", "void add(final Task task);", "public void add(Task task)\n {\n this.tasks.add(task);\n }", "String addTask(Task task);", "public void add(final Task task) {\n }", "public void addTask(Task task) {\n tasks.add(task);\n }", "public void addTask(Task task) {\n tasks.add(task);\n }", "public void addTask(Task task) {\n tasks.add(task);\n }", "public void add(Task task) {\r\n tasks.add(task);\r\n }", "public void addTask(Task task) {\n this.tasks.add(task);\n }", "public void addTask(Task task) {\n list.add(task);\n }", "void addTask(Task<?> task) {\n tasks.addFirst(task);\n }", "public void addTask(Task task) {\n\t\tSystem.out.println(\"Inside createTask()\");\n\t\t\n\t\ttoDoList.add(task);\n\t\tdisplay();\n\t}", "public void addTask(Task newTask) {\n recordedTask.add(newTask);\n updateTaskToFile();\n }", "public synchronized void addTask(AnimatorTask task) {\r\n\r\n\t\tif (!running) {\r\n\t\t\ttasks.add(task);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void addTask(Teatask ta)\n\t{\n\t\tteataskMapper.addTask(ta);\n\t}", "public void addFolder(TaskFolder folder)\n {\n folders.add(folder);\n }", "void addDoneTask(Task task);", "void addToList(Task task) throws InvalidCommandException;", "boolean addTask(Task newTask);", "public void addTask(Task task) {\n\t\tMessage msg=new Message(null, null, task);\n\t\ttry {\n\t\t\tchannel.send(msg);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\t//Runtime exception with info for use in debugging\n\t\t\tthrow new RuntimeException(ex.getMessage());\n\t\t}\n\t}", "public void add(Task newTask) {\n tasks.add(newTask);\n }", "public void add(Task var) {\n\t\tif (tasks.size() < numOfTasks) {\n\t\t\ttasks.add(var);\n\t\t}\n\t}", "public void addTask(Task t){\n\t\ttry {\n\t\t\taction.put(t);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void addTask(ISimpleTask task) {\n\t\ttry {\n\t\t\tqueue.put(task);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic Task addTask(Task task) {\n\t\treturn taskRepository.save(task);\r\n\t}", "public void addElement(DemoTask task) {\n\t\tdata.add(task);\n\t}", "public void add(Task t)\n {\n\ttoDo.add(t);\n }", "public void addTask(String task, String... args) {\r\n\t\ttasks.add(new String[][]{new String[]{task}, args});\r\n\t}", "public void addTask(Task task) {\n tasks.add(task);\n cachedTasks.push(new CachedTask(task, \"add\", getTasksSize() - 1));\n }", "public void addTask(Task task) {\n tasks.add(task);\n notifyObservers();\n }", "public void addToTaskList(Task task) {\n taskList.add(task);\n }", "void addSubTask(AuctionTask task);", "@Override\n public boolean add(Task task) {\n return tasks.add(task);\n }", "void addTask(Task person) throws UniqueTaskList.DuplicateTaskException;", "public void addTask(Task task){\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID, task.getId());\n values.put(KEY_LABEL, task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.insert(TABLE_NAME, null, values);\n db.close();\n }", "public static void addTask(Task taskToAdd)\n\t{\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tCalendar cal = taskToAdd.getCal();\n\t\tint year = cal.get(YEAR);\n\t\tint month = cal.get(MONTH);\n\t\tint day = cal.get(DAY_OF_MONTH);\n\t\tint hour = cal.get(HOUR_OF_DAY);\n\t\tint minute = cal.get(MINUTE);\n\t\t\n\t\tString descrip = taskToAdd.getDescription();\n\t\tboolean recur = taskToAdd.getRecurs();\n\t\tint recurI;\n\t\tif(recur) recurI = 1;\n\t\telse recurI = 0;\n\t\tint recursDays = taskToAdd.getRecurIntervalDays();\n\t\t\n\t\tstatement.executeUpdate(\"INSERT INTO tasks (Year, Month, Date, Hour, Minute, Description, Recursion, RecursionDays) VALUES(\" +year+\", \"+month+\", \"+day+\", \"+hour+\", \"+minute+\", '\"+descrip+\"', \"+recurI+\", \"+recursDays+\")\");\n\t\tstatement.close();\n\t\treturn;\n\t}", "public static void add(Tasks currentTask) {\n tasks.add(currentTask);\n tasksCount++;\n }", "public void addNewTask(String taskName) {\n\t\tCommand cmdAdd = new CmdAdd();\n\t\tcmdAdd.setParameter(CmdParameters.PARAM_NAME_TASK_NAME, taskName);\n\t\tcmdAdd.execute();\n\t}", "private void addFolder(){\n }", "org.oasis_open.docs.ns.bpel4people.ws_humantask.types._200803.TTaskAbstract addNewTaskAbstract();", "private static void addTask() {\n Task task = new Task();\n System.out.println(\"Podaj tytuł zadania\");\n task.setTitle(scanner.nextLine());\n System.out.println(\"Podaj datę wykonania zadania (yyyy-mm-dd)\");\n\n while (true) {\n try {\n LocalDate parse = LocalDate.parse(scanner.nextLine(), DateTimeFormatter.ISO_LOCAL_DATE);\n task.setExecuteDate(parse);\n break;\n } catch (DateTimeParseException e) {\n System.out.println(\"Nieprawidłowy format daty. Spróbuj YYYY-MM-DD\");\n }\n }\n\n task.setCreationDate(LocalDate.now());\n\n queue.offer(task);\n System.out.println(\"tutuaj\");\n }", "public void addTask(final BTask t) {\n\t\tbloc.addLast(t);\n\t}", "public static void addTask(@NonNull final AsyncTask<Void, Integer, Boolean> task) {\n tasksList.add(task);\n }", "public String addTask(Task t) {\n tasks.add(t);\n return tasks.get(tasks.size() - 1).toString();\n }", "int insertTask(TaskInfo taskInfo);", "public void addTask(View v) {\n int taskId = Integer.parseInt(txtId.getText().toString());\n String tskName = txtTaskName.getText().toString();\n String taskDesc = txtTaskDescription.getText().toString();\n ContentValues values = new ContentValues();\n values.put(\"taskId\", taskId);\n values.put(\"taskName\", tskName);\n values.put(\"taskDescription\", taskDesc);\n try {\n taskManager.addTask(values);\n Toast.makeText(this, \"Data Inserted\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "void addDoneTasks(List<Task> task);", "private void addTask(JPanel panel,Tasks task){\n Task taskPane = new Task(task, this.agenda.getConnector());\n this.setUpSize(taskPane,1920,50,AgendaConstants.ALL);\n panel.add(taskPane);\n if(add) {\n agenda.getConnector().addTask(task);\n }\n this.updateComponent(panel);\n }", "public void createTask(Task task) {\n ContentValues values = new ContentValues();\n values.put(SQLiteHelper.COLUMN_NAME, task.getName());\n database.insert(SQLiteHelper.TABLE_TASKS, null, values);\n }", "public void addTask(String type, String name) {\n Task taskToAdd = new Task(type, name);\n storage.add(taskToAdd);\n if (taskToAdd.hasDate()) {\n if (!dateStorage.containsKey(taskToAdd.getDate())) {\n dateStorage.put(taskToAdd.getDate(), new ArrayList<>());\n }\n dateStorage.get(taskToAdd.getDate()).add(taskToAdd);\n }\n taskAdded(taskToAdd, storage);\n }", "private void doAddTask() {\n System.out.println(\n \"Kindly enter the time, description and date of the task you would like to add on separate lines.\");\n String time = input.nextLine();\n String description = input.nextLine();\n String date = input.nextLine();\n todoList.addTask(new Task(time,description,date));\n System.out.println(time + \" \" + description + \" \" + date + \" \" + \"has been added.\");\n }", "public void addTasks(TaskManager taskManager) throws IOException {\n FileWriter fileWriter = new FileWriter(filePath);\n List<Task> listOfTasks = taskManager.getListOfTasks();\n for (int i = 0; i < listOfTasks.size(); i++) {\n String line = listOfTasks.get(i).formatLine();\n fileWriter.write(line);\n }\n fileWriter.close();\n }", "public void addCommandMutable(ListItem task) {\n this.listItems.add(task);\n }", "public void addTaskDefinition(String taskName, Class taskClass)\n throws BuildException {\n ComponentHelper.getComponentHelper(this).addTaskDefinition(taskName,\n taskClass);\n }", "void addTasks(List<Task> tasks);", "public void addDiskJob(DiskJob task) {\n\t\tioManager.addTask(task);\n\t}", "public void createTask()\n {\n boolean copy = false;\n if(check.checkTask(taskName.getText()))\n {\n // Go through list and make sure task isnt already there\n // If there is one already in list, then tell user there it is on list\n if(!(Item.getToDoList().isEmpty()))\n {\n for(Item task : Item.getToDoList())\n {\n if(task.getTask().equals(taskName.getText()))\n {\n status.setText(\"Task is already on the list. \");\n copy = true;\n }\n }\n\n if(!copy)\n {\n // If not copy, add the task to the list by calling method\n addTaskAndDisplay(taskName.getText(), completionDate.getText(), taskCompletedCheckBox.isSelected());\n }\n }\n\n // If list is empty, then no need to check if task is copy\n else\n {\n addTaskAndDisplay(taskName.getText(), completionDate.getText(), taskCompletedCheckBox.isSelected());\n }\n\n }\n\n // If task is invalid, alert user\n else\n {\n status.setText(\"Task invalid. Try again. \");\n }\n\n }", "public synchronized void enqueue(Task task) {\n tasks.add(task);\n }", "@FXML\n void addTaskClicked(ActionEvent event)\n {\n createTask();\n }", "@Override\n\t\tprotected String doInBackground(Task... arg0) {\n\t\t\tString taskID = TfTaskRepository.addTask(arg0[0], \n\t\t\t getApplicationContext());\n\t\t\t\n\t\t\ttaskID = taskID + \"\\n\";\n\t\t\t\n\t\t\t//saving the ID local\n\t\t\tlt.saveTaskId(taskID, getApplicationContext());\n\t\t\t\n\t\t\treturn null;\n\t\t}", "public void addItemsToTask(Task task) {\n\n \tString n, t, description;\n\t\tItemType type;\n \t\n \tfor(int i = 0;i<currentTaskItems.size();i++) {\n \t\t\n \t\tString temp[] = currentTaskItems.get(i);\n \t\t\n \t\t//map for item\n \t\t//0 -> number of item\n \t\t//1 -> item type\n \t\t//2 -> description\n \t\tn = temp[0];\n \t\tt = temp[1];\n \t\tdescription = temp[2];\n \t\t\n \t\tInteger num = Integer.valueOf(n);\n \t\t\n \t\tif(t.equals(\"Photo\")) {\n \t\t\ttype = ItemType.PHOTO;\n \t\t}else if(t.equals(\"Audio\")) {\n \t\t\ttype = ItemType.AUDIO;\n \t\t}else if(t.equals(\"Video\")) {\n \t\t\ttype = ItemType.VIDEO;\n \t\t}else{\n \t\t\ttype = ItemType.TEXT;\n \t\t}\n \t\t\n \t\t//create the item\n \t\tTaskItem item = new TfTaskItem(type, num, description);\n \t\ttask.addItem(item); \t\t\n \t}\n }", "public void populateTaskList(String _task){\n\t\ttaskList.getItems().add(_task);\n\t}", "@Override\n public void execute(TaskListHandler handler, Storage storage, String input) throws DukeException {\n ArrayList<Task> taskList = handler.getTasks();\n handler.addToList(newTask);\n Ui.printSuccess(\"add\", newTask, taskList);\n handler.saveCurrentTaskList(input);\n storage.saveToFile(taskList);\n }", "public static void testAddTask(final Todoist todo, final String[] tokens) {\n try {\n todo.addTask(createTask(tokens));\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public static void testAddTask(final Todoist todo, final String[] tokens) {\n try {\n todo.addTask(createTask(tokens));\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public void add(Runnable task) {\n synchronized (mComIOQueue) {\n mComIOQueue.add(task);\n mComIOQueue.notify();\n }\n }", "public void addTask(View v) {\n EditText field = (EditText) findViewById(R.id.list_edittext);\n String task = field.getText().toString().trim();\n\n // Do not add empty tasks\n if(!task.equals(\"\")) {\n database.addTask(task);\n field.setText(\"\");\n Toast.makeText(this, String.format(getResources().getString(R.string.list_add_toast),\n task), Toast.LENGTH_LONG).show();\n }\n }", "public void addTask(String wholeLine) {\n String type;\n boolean completionStatus;\n String name;\n String date = null;\n try {\n Scanner currentLine = new Scanner(wholeLine);\n // something like [T][✓]\n if (currentLine.hasNext()) {\n String typeCompletion = currentLine.next();\n switch (typeCompletion.charAt(1)) {\n case ('T'):\n type = \"todo\";\n break;\n case ('E'):\n type = \"event\";\n break;\n case ('D'):\n type = \"deadline\";\n break;\n default:\n // this shouldn't happen\n type = null;\n }\n completionStatus = typeCompletion.charAt(4) != 'X';\n } else {\n throw Ui.DukeException.fileError();\n }\n\n if (currentLine.hasNext()) {\n name = currentLine.nextLine().trim();\n } else {\n throw Ui.DukeException.fileError();\n }\n assert type != null;\n int dateLocation = containsDate(name);\n if (dateLocation >= 0) {\n date = name.substring(dateLocation);\n name = name.substring(0, dateLocation - 5);\n }\n Task taskToAdd = new Task(type, name, completionStatus, date);\n storage.add(taskToAdd);\n if (taskToAdd.hasDate()) {\n if (!dateStorage.containsKey(taskToAdd.getDate())) {\n dateStorage.put(taskToAdd.getDate(), new ArrayList<>());\n }\n dateStorage.get(taskToAdd.getDate()).add(taskToAdd);\n }\n taskAdded(taskToAdd, storage);\n } catch (Ui.DukeException e) {\n echo(e.getMessage());\n }\n }", "public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }", "public void add(MiningTask mt) {\n miningTasks.add(mt);\n }", "public void addTaskdef(Taskdef taskdef)\n {\n if (!localTaskdefs.contains(taskdef))\n {\n localTaskdefs.add(taskdef);\n }\n }", "@Override\n public CompletableFuture<Void> addTask(String queueName, GarbageCollector.TaskInfo task) {\n Preconditions.checkNotNull(queueName, \"queueName\");\n Preconditions.checkNotNull(task, \"task\");\n try {\n val processor = eventProcessorMap.get(queueName);\n Preconditions.checkArgument(null != processor, \"Attempt to add to non existent queue (%s).\", queueName);\n return Futures.toVoid(processor.add(SERIALIZER.serialize(task), Duration.ofMillis(1000)));\n } catch (Throwable e) {\n return CompletableFuture.failedFuture(e);\n }\n }", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "public void addTaskListener(TaskListener task){\n initListener();\n listeners.add(task);\n }", "@Override\n\tpublic void addScheduleTask(ScheduleTask st) {\n\t\tscheduleTaskDAO.add(st);\n\t}", "@Override\n\tpublic void add(ScheduleTask st) {\n\t\tsave(st);\n\n\t}", "public TaskList addCommand(ListItem task) {\n List<ListItem> tempList = new ArrayList<>(this.listItems);\n tempList.add(task);\n return new TaskList(tempList);\n }", "public void taskexecution(Task task) {\n synchronized (list) {\n list.add(task);\n list.notify();\n }\n }", "public AddCommand(Task task){\r\n this.task = task;\r\n }", "public void createNewTask(View view) {\n try{\n newTaskLayout.checkTaskLayoutIsValid();\n ImageView taskImage = (ImageView) findViewById(R.id.imageViewBoard);\n String layoutImagePath = takeScreenshot(taskImage);\n newTaskLayout.setImagePath(layoutImagePath);\n\n // save new task\n HashMap<String, Integer> instructions = convertSpinnersToHashMap();\n Task newTask = new Task(newTaskLayout, instructions);\n Task.saveTask(getApplicationContext(), newTask);\n\n // alert user task created and return to task menu.\n Toast.makeText(this, \"new task created\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(), TaskOptionsActivity.class));\n } catch (TaskLayoutException | InstructionsRequiredException e) {\n // layout was not valid on insufficient instructions set.\n makeMessageDialogue(e.getMessage());\n }\n }", "private void addProjectTask(ActionEvent e) {\n Calendar dueDate = dueDateModel.getValue();\n String title = titleEntry.getText();\n String description = descriptionEntry.getText();\n Project parent = (Project) parentEntry.getSelectedItem();\n addProjectTask(title, description, parent, dueDate);\n }", "protected abstract void createTasks();", "@Override\n public void addTasksToRun() {\n //gets the tasks that are ready for execution from the list with new tasks\n List<Task> collect = tasks.stream().filter((task) -> (task.getDate() == TIME))\n .collect(Collectors.toList());\n //sort the tasks inserted. The sort is based in \"priority\" value for all the tasks.\n collect.sort(new Comparator<Task>() {\n @Override\n public int compare(Task o1, Task o2) {\n return o1.getPriority() - o2.getPriority();\n }\n });\n //Change the status of tasks for READY\n collect.stream().forEach((task) -> {\n task.setStatus(Task.STATUS_READY);\n });\n //Adds the tasks to the queue of execution\n tasksScheduler.addAll(collect);\n\n //Removes it from list of new tasks\n tasks.removeAll(collect);\n }", "private void saveNewTask(int taskId, int catId) {\n Task task = new Task();\n task.setCategoryId(catId);\n task.setTaskId(taskId);\n task.setTaskContent(mTaskContent.getText().toString());\n task.setDueDate(dueDate);\n if (setReminder)\n task.setReminder(1);\n else\n task.setReminder(0);\n task.setStatus(0);\n task.setTaskTitle(mTaskTile.getText().toString());\n task.save();\n if (setReminder)\n setAlarm(task);\n }", "public void addNewTask() {\n Intent i = new Intent(this, StartNewActivity.class);\n startActivityForResult(i, REQUEST_CODE);\n }", "@RequestMapping(method = RequestMethod.POST, value = \"/add-task\",consumes = MediaType.APPLICATION_JSON_VALUE,headers = {\r\n \"content-type=application/json\" })\r\n\tpublic Task addTask(@RequestBody Task task) {\r\n\t\tinvokeNotification();\r\n\t\treturn task;\r\n\r\n\t}", "synchronized public void registerTask(final Addon addon, final BukkitTask task){\n\t\ttry {\n\t\t\tfinal ReloadableAddon reloadable = this.getByAddon(addon);\n\t\t\tif(reloadable == null)\n\t\t\t\tthrow new InvalidAddonException(\"No corresponding ReloadableAddon found for \"+addon.getName());\n\t\t\treloadable.addTask(task);\n\t\t} catch (final InvalidAddonException e) {\n\t\t\tthis.getLogger().severe(\"Failed to register task for addon \"+addon.getName()+\".\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void queueTask(Version theTask) {\n\tsynchronized(_taskQueue) {\n\t _taskQueue.add(theTask);\n\t}\n }", "public void addedTask(ArrayList<Task> tasks) {\n System.out.println(\"Got it. I've added this task:\\n \"\n + tasks.get(tasks.size()-1).printTask()\n + \"\\nNow you have \"\n + tasks.size()\n + \" tasks in the list\");\n }", "public Task getTaskToAdd() {\n return taskToAdd;\n }", "public void AddTaskToDB(View view){\n\t\tif (TASK_CREATED == true){\n\t\t\tString name = taskName.getText().toString();\n\t\t\tString desc = taskDescription.getText().toString();\n//\t\t\tlong millisecondsToReminder = 0;\n\t\t\tlong millisecondsToCreated = 0;\n//\t\t\tyear = taskDatePicker.getYear();\n//\t\t\tmonth = taskDatePicker.getMonth() + 1;\n//\t\t\tday = taskDatePicker.getDayOfMonth();\n//\t\t\thour = taskTimePicker.getCurrentHour();\n//\t\t\tminute = taskTimePicker.getCurrentMinute();\n\t\t\ttry {\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tDate dateCreated = cal.getTime();\n\t\t\t\tmillisecondsToCreated = dateCreated.getTime();\n//\t\t\t\tString dateToParse = day + \"-\" + month + \"-\" + year + \" \" + hour + \":\" + minute;\n//\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"d-M-yyyy hh:mm\");\n//\t\t\t\tDate date = dateFormatter.parse(dateToParse);\n//\t\t\t\tmillisecondsToReminder = date.getTime();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} // You will need try/catch around this\n\n\t\t\tBujoDbHandler taskHandler = new BujoDbHandler(view.getContext());\n\t\t\tcurrentTask = new Task(name, desc, millisecondsToCreated);\n\t\t\ttaskHandler.addTask(currentTask);\n\t\t}\n\t}", "public long addTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TASKNAME, task.getTaskName()); // task name\n // status of task- can be 0 for not done and 1 for done\n values.put(KEY_STATUS, task.getStatus());\n values.put(KEY_DATE,task.getDateAt());\n\n // Inserting Row\n long task_id= db.insert(TABLE_TASKS, null, values);\n // insert row\n\n return task_id;\n\n }", "@Test\n void addTask() {\n }", "public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);", "@Test\n public void confirmTaskAdded() {\n TaskList tasks = new TaskList(\"./test/junit.txt\");\n LocalDateTime date = LocalDateTime.parse(\"2015-10-20 1800\");\n String taskDescription = \"read a book\";\n tasks.addDeadline(taskDescription, date);\n Task addedTask = tasks.get(0);\n assertEquals(\"[D][ ] read a book by: 2015-10-20 18:00\", addedTask.toString());\n }", "void executeTask(org.apache.ant.common.antlib.Task task) throws org.apache.ant.common.util.ExecutionException;" ]
[ "0.7507139", "0.7393556", "0.73470765", "0.7320471", "0.7282133", "0.72149825", "0.71976054", "0.71799254", "0.71753514", "0.71753514", "0.71753514", "0.7171873", "0.7145094", "0.704088", "0.70150787", "0.69614214", "0.6955382", "0.69433904", "0.69420785", "0.6833621", "0.68307734", "0.67651916", "0.6762207", "0.6743503", "0.67389446", "0.6728488", "0.6720197", "0.6694173", "0.66269094", "0.66182756", "0.65941054", "0.6570259", "0.6539562", "0.65268564", "0.64918363", "0.6482761", "0.64572215", "0.6456332", "0.64521897", "0.64456826", "0.64279264", "0.6420137", "0.6325631", "0.6276076", "0.6271798", "0.62659985", "0.6251777", "0.6251462", "0.6249738", "0.62128913", "0.62085336", "0.6180252", "0.6153453", "0.6152967", "0.61405545", "0.6135825", "0.61274433", "0.6073304", "0.6066192", "0.6056018", "0.6049286", "0.60461414", "0.60444325", "0.60300434", "0.599186", "0.5986544", "0.59818745", "0.5977771", "0.5977771", "0.5975646", "0.5956164", "0.5933505", "0.59322065", "0.5924442", "0.59225076", "0.5914996", "0.58951837", "0.58730114", "0.5872045", "0.5868572", "0.5865449", "0.5825351", "0.58239824", "0.58151555", "0.58090127", "0.5774438", "0.5755659", "0.57543343", "0.57527983", "0.5740538", "0.57392687", "0.57215106", "0.5721121", "0.5717844", "0.5705721", "0.569999", "0.5688283", "0.5670098", "0.56648046", "0.5659782" ]
0.72571695
5
Add subfolder to folder.
public void addFolder(TaskFolder folder) { folders.add(folder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addFolder(){\n }", "public void addFolder(Folder f) {\n folders.add(f);\n }", "public void add(Directory subDir) {\n\t\tthis.content.add(subDir);\n\t\tif(subDir.getParent() != null) {\n\t\t\tsubDir.getParent().content.remove(subDir);\n\t\t}\n\t\tsubDir.setParent(this);\n\t}", "public void addSubdirectory(Directory newdir) {\n\t\tgetSubdirectories().add(newdir);\n\t}", "public BookmarkId addFolder(BookmarkId parent, int index, String title) {\n return nativeAddFolder(mNativeEnhancedBookmarksBridge, parent, index, title);\n }", "private void actionAddFolder ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tJFileChooser folderChooser = new JFileChooser();\r\n\t\t\tfolderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n\r\n\t\t\tint isFolderSelected = folderChooser.showOpenDialog(folderChooser);\r\n\r\n\t\t\tif (isFolderSelected == JFileChooser.APPROVE_OPTION)\r\n\t\t\t{\r\n\t\t\t\tString folderPath = folderChooser.getSelectedFile().getPath();\r\n\r\n\t\t\t\tFile folderFileDescriptor = new File(folderPath);\r\n\t\t\t\tFile[] listFolderFiles = folderFileDescriptor.listFiles();\r\n\r\n\t\t\t\tString[] fileList = new String[listFolderFiles.length];\r\n\r\n\t\t\t\tfor (int i = 0; i < listFolderFiles.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfileList[i] = listFolderFiles[i].getPath();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tDataController.scenarioOpenFolder(fileList);\r\n\r\n\t\t\t\thelperDisplayProjectFiles();\r\n\t\t\t\thelperDisplayInputImage();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "void setAddParentFolder(DriveRequest<?> request, String addParentFolder);", "public void addFolder(String name, int index) {\n\t\tDefaultTreeModel model = (DefaultTreeModel) getModel();\n\t\tTreeNode root = (TreeNode) model.getRoot();\n\t\tif (index > root.getChildCount() || index < 0){\n\t\t\tindex = root.getChildCount();\n\t\t}\n\t\tmodel.insertNodeInto(new TreeNode(name, root.getNodeOption(), index, true), root, index);\n\t\tsetCellRenderer(new TreeRenderer());\n\t\tmodel.reload();\n\n\t\tscrollRowToVisible(index + 1);\n\t}", "IStorageService subFolder(String path);", "Folder createFolder();", "public void createFolder (String folderName, long parentFolderId, Long userId) throws BookMarkException;", "Update withFolderPath(String folderPath);", "@Override\n\tpublic boolean createFolder(String pathfolder) {\n\t\treturn eDao.createFolder(pathfolder);\n\t}", "public void addJARFolder() {\n btAddJARFolder().push();\n }", "public static URI addPath(URI uri, Path subpath) {\r\n final String scheme = uri.getScheme();\r\n final String userInfo = uri.getUserInfo();\r\n final String host = uri.getHost();\r\n final int port = uri.getPort();\r\n final String path = getPath(uri).append(subpath).getPathname();\r\n final String query = uri.getQuery();\r\n final String fragment = uri.getFragment();\r\n try {\r\n return new URI(scheme, userInfo, host, port, path, query, fragment);\r\n } catch (URISyntaxException e) {\r\n throw new IllegalArgumentException(e);\r\n }\r\n }", "public void newFolderButtonClicked() {\n TreePath[] paths = _fileSystemTree.getSelectionPaths();\r\n List selection = getSelectedFolders(paths);\r\n if (selection.size() > 1 || selection.size() == 0)\r\n return; // should never happen\r\n \r\n File parent = (File) selection.get(0);\r\n \r\n final ResourceBundle resourceBundle = FolderChooserResource.getResourceBundle(Locale.getDefault());\r\n String folderName = JOptionPane.showInputDialog(_folderChooser, resourceBundle.getString(\"FolderChooser.new.folderName\"),\r\n resourceBundle.getString(\"FolderChooser.new.title\"), JOptionPane.OK_CANCEL_OPTION | JOptionPane.QUESTION_MESSAGE);\r\n \r\n if (folderName != null) {\r\n File newFolder = new File(parent, folderName);\r\n boolean success = newFolder.mkdir();\r\n \r\n TreePath parentPath = paths[0];\r\n boolean isExpanded = _fileSystemTree.isExpanded(parentPath);\r\n if (!isExpanded) { // expand it first\r\n _fileSystemTree.expandPath(parentPath);\r\n }\r\n \r\n LazyMutableTreeNode parentTreeNode = (LazyMutableTreeNode) parentPath.getLastPathComponent();\r\n BasicFileSystemTreeNode child = BasicFileSystemTreeNode.createFileSystemTreeNode(newFolder, _folderChooser);\r\n // child.setParent(parentTreeNode);\r\n if (success) {\r\n parentTreeNode.clear();\r\n int insertIndex = _fileSystemTree.getModel().getIndexOfChild(parentTreeNode, child);\r\n if (insertIndex != -1) {\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).insertNodeInto(child, parentTreeNode, insertIndex);\r\n ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).nodeStructureChanged(parentTreeNode);\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).addPath(parentPath, insertIndex, child);\r\n }\r\n }\r\n TreePath newPath = parentPath.pathByAddingChild(child);\r\n _fileSystemTree.setSelectionPath(newPath);\r\n _fileSystemTree.scrollPathToVisible(newPath);\r\n }\r\n }", "public void addDirectories( File base ) {\n if( base.isDirectory() ) {\n repository.add( base );\n File[] files = base.listFiles();\n\n for( int i = 0; i < files.length; i++ ) {\n addDirectories( files[i] );\n }\n }\n }", "private void createFolder(String name, String path, Long id) {\n VMDirectory newDir = new VMDirectory();\n newDir.setName(name);\n editResourceService.createDir(id, name, new AsyncCallback<Long>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.say(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Long result) {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, id), newDir, result, true);\n folderPath_idMap.put(path, result);\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n });\n }", "private void prepareFolder(String name, String newFolderName) {\n }", "private Path initFolder(String folder) throws IOException {\n return Files.createDirectory(Paths.get(uploadFolder + \"/\" + folder));\n }", "public void addDirectory(String name, IDirectory parent) {\r\n Directory newDir = new Directory(name, (Directory) parent);\r\n ((Directory) parent).addItem(newDir);\r\n }", "public void addInRemoteFolder(ItemId remoteFolderId, String subfolderPath,\n boolean includeSubfolders, boolean bool) {\n allResultsQuery = false;\n if (queryTarget != QueryTarget.UNSPECIFIED && !queryTarget.toString().equals(remoteFolderId.getAccountId())) {\n throw new IllegalArgumentException(\n \"Cannot addInClause b/c DBQueryOperation already has an incompatible remote target\");\n }\n queryTarget = new QueryTarget(remoteFolderId.getAccountId());\n getTopLeafConstraint().addInRemoteFolder(remoteFolderId, subfolderPath, includeSubfolders, bool);\n }", "public File subFolder(String subFolder) {\n try {\n return getBrokerInstance().toPath().resolve(subFolder).toFile();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public void addChild(IDirectory child) {\n children.add(child);\n }", "public void appendSubPackage(DsByteString subPackage) {\n if (subPackage != null) {\n if (m_subPackages == null) {\n m_subPackages = new LinkedList();\n }\n m_subPackages.addLast(subPackage);\n }\n }", "public void createSubfolder(\n String caseFolderPath,\n String subfolderName,\n String TOS) throws Exception {\n UserContext old = UserContext.get();\n CaseMgmtContext oldCmc = null;\n Subject sub = Subject.getSubject(AccessController.getContext());\n String ceURI = null;\n\n try {\n ceURI = filenet.vw.server.Configuration.GetCEURI(null, null);\n Connection connection = Factory.Connection.getConnection(ceURI);\n\n // setting up user context\n UserContext uc = new UserContext();\n uc.pushSubject(sub);\n UserContext.set(uc);\n\n EntireNetwork entireNetwork = Factory.EntireNetwork.fetchInstance(connection, null);\n\n if (entireNetwork == null) {\n Exception e = new Exception(\"Cannot log in to \" + ceURI);\n logException(e);\n }\n\n // retrieve target object store\n Domain domain = entireNetwork.get_LocalDomain();\n ObjectStore targetOS = (ObjectStore) domain.fetchObject(\n ClassNames.OBJECT_STORE,\n TOS,\n null);\n\n // setting up CaseMmgtContext for Case API\n SimpleVWSessionCache vwSessCache = new SimpleVWSessionCache();\n CaseMgmtContext cmc = new CaseMgmtContext(vwSessCache, new SimpleP8ConnectionCache());\n oldCmc = CaseMgmtContext.set(cmc);\n\n ObjectStoreReference targetOsRef = new ObjectStoreReference(targetOS);\n\n\t\t\t/* get case folder */\n Folder folder = Factory.Folder.fetchInstance(targetOsRef.getFetchlessCEObject(),\n caseFolderPath,\n null);\n\n // create a subfolder under case folder\n Folder newSubFolder = Factory.Folder.createInstance(targetOS, \"CmAcmCaseSubfolder\");\n newSubFolder.set_Parent(folder);\n newSubFolder.set_FolderName(subfolderName);\n newSubFolder.getProperties().putValue(\"CmAcmParentCase\", folder);\n newSubFolder.save(RefreshMode.REFRESH);\n } catch (Exception e) {\n logException(e);\n } finally {\n if (oldCmc != null) {\n CaseMgmtContext.set(oldCmc);\n }\n\n if (old != null) {\n UserContext.set(old);\n }\n }\n }", "public void addPath(File path) throws IllegalArgumentException {\r\n File[] PathFiles;\r\n if (path.isDirectory() == true) {\r\n \tPathFiles = path.listFiles();\r\n for (int i=0; i<PathFiles.length; i++) {\r\n \tFile currentfile = PathFiles[i];\r\n if (currentfile.isDirectory()) {\r\n \tdirectory_queue.enqueue(currentfile);\r\n \taddPath(currentfile);\r\n }\r\n }\r\n } else {\r\n throw new IllegalArgumentException(\"Can't resolve the directory path \" + path);\r\n }\r\n }", "void folderCreated(String remoteFolder);", "WithCreate withFolderPath(String folderPath);", "public void addDir(File dirObj, ZipOutputStream out) throws IOException {\n\t\t File[] files = dirObj.listFiles();\n\t\t byte[] tmpBuf = new byte[1024];\n\t\t for (int i = 0; i < files.length; i++) {\n\t\t if (files[i].isDirectory()) {\n\t\t addDir(files[i], out);\n\t\t continue;\n\t\t }\n\t \t FileInputStream in = new FileInputStream(files[i].getAbsolutePath());\n\t\t System.out.println(\" Adding: \" + files[i].getAbsolutePath());\n\t\t out.putNextEntry(new ZipEntry(files[i].getAbsolutePath()));\n\t\t int len;\n\t\t while ((len = in.read(tmpBuf)) > 0) { out.write(tmpBuf, 0, len); }\n\t\t out.closeEntry();\n\t\t in.close();\n\t\t }\n\t\t }", "private void createFolderHelper(final IFolder folder,final IProgressMonitor monitor)\n throws CoreException\n {\n if(!folder.exists())\n {\n IContainer parent = folder.getParent();\n if(parent instanceof IFolder\n && (!((IFolder)parent).exists())) {\n createFolderHelper((IFolder)parent,monitor);\n }\n folder.create(false,true,monitor);\n }\n }", "public boolean createFolder(String path){\n\t\tValueCollection payload = new ValueCollection();\n\t\tpayload.put(\"path\", new StringPrimitive(path));\n\t\ttry {\t\n\t\t\tclient.invokeService(ThingworxEntityTypes.Things, FileThingName, \"CreateFolder\", payload, 5000);\n\t\t\tLOG.info(\"Folder {} created.\",path);\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Folder already exists. Error: {}\",e);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public void createFolder(String remotepath){\n String path = rootremotepath+remotepath;\n try {\n sardine.createDirectory(path);\n } catch (IOException e) {\n throw new NextcloudApiException(e);\n }\n }", "private TreeItem<String> addNewItem(Path path) {\n TreeItem<String> mostCorrespondingParent = findMostCorrespondingParentFor(path);\n TreeItem<String> newChildTreeItem;\n if (buildPathForNode(mostCorrespondingParent) != null) {\n Path newChildPath;\n if (mostCorrespondingParent != rootNode) {\n Path mostCorrespondingParentPath = getNodeAbsolutePath(mostCorrespondingParent);\n newChildPath = extractChildPath(path, mostCorrespondingParentPath);\n } else {\n newChildPath = path;\n }\n newChildTreeItem = new TreeItem<>(newChildPath.toString(), new ImageView(FileTreeItem.FileType.FILE.getImage()));\n } else {\n newChildTreeItem = new TreeItem<>(path.toString(), new ImageView(FileTreeItem.FileType.FILE.getImage()));\n }\n mostCorrespondingParent.getChildren().add(newChildTreeItem);\n sortChildren(mostCorrespondingParent);\n return extractFileNameToLeaf(newChildTreeItem);\n }", "public final void addDirectory(String dir) {\n addDirectory(Paths.get(dir));\n }", "@Override\n\tpublic boolean addModuleDirectory(String path)\n\t{\n\t\tpath = path.replace(\"~\", System.getProperty(\"user.home\"));\n\t\tSystem.out.println(\"Path: \" + path);\n\t\tFile newDir = new File(path);\n\n\t\tif (newDir.exists() && newDir.isDirectory()) {\n\t\t\tmoduleDirectories.add(newDir);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base) throws IOException {\n File f = new File(path);\n String entryName = base + f.getName();\n TarArchiveEntry tarEntry = new TarArchiveEntry(f, entryName);\n tOut.putArchiveEntry(tarEntry);\n Platform.runLater(() -> fileLabel.setText(\"Processing \" + f.getPath()));\n\n if (f.isFile()) {\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, tOut);\n fin.close();\n tOut.closeArchiveEntry();\n } else {\n tOut.closeArchiveEntry();\n File[] children = f.listFiles();\n if (children != null) {\n for (File child : children) {\n addFileToTarGz(tOut, child.getAbsolutePath(), entryName + \"/\");\n }\n }\n }\n }", "public static void addSubCommand(String root,String sub) {\n\t\tcommands.get(root).add(sub);\n\t\tlast[0] = root;\n\t\tlast[1] = sub;\n\t}", "private static LinkedList<String> addAllSubDirs(File dir, LinkedList<String> list) {\n\t\tString [] dirListing = dir.list();\n\t\tfor (String subDirName : dirListing) {\n\t\t\tFile subdir = new File(dir.getPath() + System.getProperty(\"file.separator\") + subDirName);\n\t\t\tif (subdir.isDirectory()) {\n\t\t\t\tif (containsJavaFiles(subdir))\n\t\t\t\t\tlist.add(subdir.getPath());\n\t\t\t\tlist = addAllSubDirs(subdir, list);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public void addNode(Node node){subNodes.add(node);}", "private void appendBreadcrumb(Context context, ExternalFileInfo newFolder) {\n int currentCrumb = -1;\n if (mBreadcrumbBarLayout.getChildCount() > 0) {\n // Find the current folder's crumb in the bar\n if (mCurrentFolder != null && mCurrentRoot != null) {\n currentCrumb = findBreadcrumb(mCurrentFolder);\n } else {\n // In the root folder, so current crumb is the first child\n currentCrumb = 0;\n }\n // Check if the next crumb (right) corresponds to the new folder\n if (currentCrumb >= 0) {\n if (currentCrumb + 1 < mBreadcrumbBarLayout.getChildCount()) {\n boolean clearToRight = true;\n LinearLayout crumb = (LinearLayout) mBreadcrumbBarLayout.getChildAt(currentCrumb + 1);\n Object tag = crumb.getTag();\n if (tag != null && tag instanceof ExternalFileInfo) {\n ExternalFileInfo file = (ExternalFileInfo) tag;\n if (file.getUri().equals(newFolder.getUri())) {\n // New folder is already in breadcrumb bar\n clearToRight = false;\n }\n }\n if (clearToRight) {\n // let's rebuild bread crumb bar from scratch, since it can be a\n // non-immediate child\n rebuildBreadcrumbBar(getContext(), newFolder);\n }\n } else {\n // let's rebuild bread crumb bar from scratch, since it can be a\n // non-immediate child\n rebuildBreadcrumbBar(getContext(), newFolder);\n }\n setCurrentBreadcrumb(currentCrumb + 1);\n }\n }\n if (currentCrumb < 0) {\n // Current crumb could not be found or bar is not built, try (re)building the bar\n rebuildBreadcrumbBar(context, null);\n // Create a new crumb and add to end of bar\n createBreadcrumb(context, newFolder, -1);\n\n setCurrentBreadcrumb(-1);\n }\n }", "private void createLocalFolder(File newFolder) {\n\n if (!newFolder.exists()) {\n newFolder.mkdirs();\n //TODO: what if the folder can't be created?\n PieLogger.trace(this.getClass(), \"Folder created!\");\n } else {\n PieLogger.debug(this.getClass(), \"Folder exits already?!\");\n }\n }", "public void createFolder(View view) {\n if (mDriveServiceHelper != null) {\n\n // check folder present or not\n mDriveServiceHelper.isFolderPresent()\n .addOnSuccessListener(new OnSuccessListener<String>() {\n @Override\n public void onSuccess(String id) {\n if (id.isEmpty()){\n mDriveServiceHelper.createFolder()\n .addOnSuccessListener(new OnSuccessListener<String>() {\n @Override\n public void onSuccess(String fileId) {\n Log.e(TAG, \"folder id: \"+fileId );\n folderId=fileId;\n showMessage(\"Folder Created with id: \"+fileId);\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n showMessage(\"Couldn't create file.\");\n Log.e(TAG, \"Couldn't create file.\", exception);\n }\n });\n }else {\n folderId=id;\n showMessage(\"Folder already present\");\n }\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n showMessage(\"Couldn't create file..\");\n Log.e(TAG, \"Couldn't create file..\", exception);\n }\n });\n }\n }", "public void addNodeToSelectedNode(Node node) throws NoSelectedNodeException {\n\t\tif (!(this.selectedNode instanceof Folder)){\n\t\t\tesv.showPopupError(\"Can only add a folder to another folder\");\n\t\t\treturn;\n\t\t}\n\n\t\t//Update the swing view first because it will send the needed exceptions\n\t\tesv.addNodeToSelectedNode(node);\n\n\t\t//Update internal representation of tree\n\t\tFolder parent = (Folder)this.selectedNode;\n\t\tparent.addChild(node);\n\t\tnode.setParent(parent);\n\n\t\t//Update lastInserted HashMap\n\t\tthis.lastInsertedNodes.clear();\n\t\tthis.lastInsertedNodes.put(0, node);\n\t}", "@Test\n public void testNewFolder() {\n boolean result = instance.newFolder(mailboxID + File.separator + \"newFolder\");\n assertEquals(true, result);\n }", "public void addFile(String name, IDirectory parent) {\r\n // Create a new file\r\n File newFile = new File(name, (Directory) parent);\r\n ((Directory) parent).addItem(newFile);\r\n }", "private static void zipSubFolder(ZipOutputStream out, File folder,\n\t\t\tint basePathLength) throws IOException {\n\n\t\tFile[] fileList = folder.listFiles();\n\t\tBufferedInputStream origin = null;\n\t\tfor (File file : fileList) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tzipSubFolder(out, file, basePathLength);\n\t\t\t} else {\n\t\t\t\tbyte data[] = new byte[BUFFER_SIZE];\n\t\t\t\tString unmodifiedFilePath = file.getPath();\n\t\t\t\tString relativePath = unmodifiedFilePath\n\t\t\t\t\t\t.substring(basePathLength);\n\t\t\t\tLog.i(\"ZIP SUBFOLDER\", \"Relative Path : \" + relativePath);\n\t\t\t\tFileInputStream fi = new FileInputStream(unmodifiedFilePath);\n\t\t\t\torigin = new BufferedInputStream(fi, BUFFER_SIZE);\n\t\t\t\tZipEntry entry = new ZipEntry(relativePath);\n\t\t\t\tout.putNextEntry(entry);\n\t\t\t\tint count;\n\t\t\t\twhile ((count = origin.read(data, 0, BUFFER_SIZE)) != -1) {\n\t\t\t\t\tout.write(data, 0, count);\n\t\t\t\t}\n\t\t\t\torigin.close();\n\t\t\t}\n\t\t}\n\t}", "public void setSubfolders(boolean subfolders) {\n this.subfolders = subfolders;\n }", "@Override\r\n public void saveFolder(Folder folder) {\n this.folderRepository.save(folder);\r\n }", "public folderize() {\n }", "@Test\n public void testNewFolderInMailbox() {\n String newFolderPath = \"Inbox\" + File.separator + \"junit\";\n boolean result = instance.newFolderInMailbox(newFolderPath);\n assertEquals(true, result);\n }", "@Override\n\tpublic void createFolder(String bucketName, String folderName) {\n\t\t\n\t}", "private static MenuItem createAddNewFolderMenuItem(SongManager model, Item selectedItem) {\n MenuItem createNewFolder = new MenuItem(CREATE_NEW_FOLDER);\n\n createNewFolder.setOnAction((event) -> {\n if (selectedItem != null) {\n File folderSelected = selectedItem.getFile();\n Path newPath = PromptUI.createNewFolder(folderSelected);\n\n if (newPath != null) {\n try {\n model.addNewFolder(newPath.toFile());\n } catch (IOException ex) {\n PromptUI.customPromptError(\"Create new folder\", null, \"Unable to create new folder \" + newPath);\n }\n }\n }\n });\n\n return createNewFolder;\n }", "private String preferredSubFolder(final String path) {\n final File file = new File(path);\n if (file.isDirectory()) {\n for (final String subdir : SUBDIRS) {\n final File sd = new File(file, subdir);\n if (sd.isDirectory()) {\n return path + File.separator + subdir;\n }\n }\n }\n return path;\n }", "public static void createFolder(IResource res) {\r\n \t\tif (res instanceof IFolder) {\r\n \t\t\tIFolder folder=(IFolder)res;\r\n \t\t\t\r\n \t\t\tif (folder.exists() == false) {\r\n \t\t\t\tcreateFolder(folder.getParent());\r\n \r\n \t\t\t\ttry {\r\n \t\t\t\t\tfolder.create(true, true,\r\n \t\t\t\t\t\t\tnew org.eclipse.core.runtime.NullProgressMonitor());\r\n \t\t\t\t} catch(Exception e) {\r\n \t\t\t\t\te.printStackTrace();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t} else if (res.getParent() != null) {\r\n \t\t\tcreateFolder(res.getParent());\r\n \t\t}\r\n \t}", "void uploadingFolder(String remoteFolder);", "public void make_folder(String folder) throws Exception{\n\t\tFile file = new File(folder);\n\t\tfile.mkdirs();\n\t}", "public static String addToPath(String path, String path2) { return path + \"/\" + path2; }", "public void addChild(DirectoryNode node) throws FullDirectoryException, NotADirectoryException {\n if(isFile)\n throw new NotADirectoryException(\"Error: This node is a file\");\n if(left != null && middle != null && right != null)\n throw new FullDirectoryException(\"This directory is full\");\n if(left == null)\n left = node;\n else if(middle == null)\n middle = node;\n else if(right == null)\n right = node;\n }", "@Test\n public void addItemSubCategoryFileByURLTest() throws ApiException {\n RecordFile body = null;\n Integer itemSubCategoryId = null;\n api.addItemSubCategoryFileByURL(body, itemSubCategoryId);\n\n // TODO: test validations\n }", "public void addDirectory2(View view){\n\t\tcontrol(2);\n\t}", "private void compactFolder(RestTreeNode child) {\n\n FolderNode folder = (FolderNode) child;\n StringBuilder nameBuilder = new StringBuilder(folder.getText());\n FolderNode next = folder.fetchNextChild();\n // look for empty folders\n while (next != null){\n folder.setCompacted(true);\n folder.setFolderInfo(next.fetchFolderInfo());\n folder.setRepoPath(next.getRepoPath());\n // update compact name\n nameBuilder.append('/').append(next.getText());\n next = next.fetchNextChild();\n }\n folder.setText(nameBuilder.toString());\n }", "public void addSubRole(Role role) {\n\t\t// pruefe ob eine Schleife entsteht\n\t\tRole current = role.parentRole;\n\t\twhile (current != null) {\n\t\t\tif (current.name.equals(name))\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t \"Zirkulaere Zuordnungen zwischen Rollen sind nicht erlaubt.\");\n\t\t\tcurrent = current.parentRole;\n\t\t}\n\t\t// Umhaengen\n\t\tif (role.parentRole != null)\n\t\t\trole.parentRole.subRoles.remove(role);\n\t\tsubRoles.add(role);\n\t\trole.parentRole = this;\n\t}", "public void addSubproject(final Task subproject) {\n\t\t// remove sentinels \n\t\tTaskReference startSentinel = (TaskReference) list.removeFirst();\n\t\tTaskReference endSentinel = (TaskReference) list.removeLast();\n\n\t\t// mark tasks to be added as not yet treated\n\t\tboolean m = !getMarkerStatus();\n\t\tsubproject.setMarkerStatus(m);\n\t\tsubproject.markTaskAsNeedingRecalculation();\n\t\tIterator j = ((SubProj)subproject).getSubproject().getTasks().iterator();\n\t\twhile (j.hasNext()) {\n\t\t\tTask task = (Task)j.next();\n\t\t\ttask.setMarkerStatus(m);\n\t\t\ttask.markTaskAsNeedingRecalculation();\n\n\t\t}\n\t\t\n\t\tremoveTask(subproject); // remove existing one\n\t\tarrangeSingleTask(subproject); // add it back - it will become a parent\n\t\t// add child tasks\n\t\tIterator i = ((SubProj)subproject).getSubproject().getTasks().iterator();\n\t\twhile (i.hasNext())\n\t\t\tarrangeSingleTask((Task)i.next());\n\t\t\n\t\t// put back sentinels\n\t\tlist.addFirst(startSentinel);\n\t\tlist.addLast(endSentinel);\n\t}", "public void setParent(TaskFolder parent)\n {\n super.setParent(parent);\n if (parent != null) parent.addFolder(this);\n }", "private static void createTree(TreeItem<FilePath> rootItem) throws IOException {\n\n try (DirectoryStream<Path> directoryStream = Files\n .newDirectoryStream(rootItem.getValue().getPath())) {\n\n for (Path path : directoryStream) {\n TreeItem<FilePath> newItem = new TreeItem<FilePath>(new FilePath(path));\n newItem.setExpanded(true);\n\n rootItem.getChildren().add(newItem);\n\n if (Files.isDirectory(path)) {\n createTree(newItem);\n }\n }\n } catch (AccessDeniedException ignored) {\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "private static void addDirectory(ZipOutputStream zout, File fileSource, File sourceDir) {\n\n\t\t// get sub-folder/files list\n\t\tFile[] files = fileSource.listFiles();\n\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\ttry {\n\t\t\t\tString name = files[i].getAbsolutePath();\n\t\t\t\tname = name.substring((int) sourceDir.getAbsolutePath().length());\n\t\t\t\t// if the file is directory, call the function recursively\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\taddDirectory(zout, files[i], sourceDir);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * we are here means, its file and not directory, so\n\t\t\t\t * add it to the zip file\n\t\t\t\t */\n\n\n\t\t\t\t// create object of FileInputStream\n\t\t\t\tFileInputStream fin = new FileInputStream(files[i]);\n\n\t\t\t\tzout.putNextEntry(new ZipEntry(name));\n\n\t\t\t\tIOUtils.copy(fin, zout);\n\t\t\t\t\n\t\t\t\tzout.closeEntry();\n\n\t\t\t\t// close the InputStream\n\t\t\t\tfin.close();\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tioe.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}", "private void addFileToNode(DefaultMutableTreeNode node, FileInfo givenFile){\r\n\t\t//check that there are files in this folder\r\n\t\t// replace existing file if one is present with the same name\r\n\t\tif(!node.isLeaf()){\r\n\t\t\tFileInfo index = (FileInfo) node.getFirstChild();\r\n\t\t\t//look through all the files\r\n\t\t\twhile(index != null){\r\n\t\t\t\t//if it's already there\r\n\t\t\t\tif((index.toString()).equals(givenFile.toString())){\r\n\t\t\t\t\t//FileInfo temp = (FileInfo)index.getPreviousSibling();\r\n\t\t\t\t\t//remove the old file\t\r\n\t\t\t\t\tindex.removeFromParent();\r\n\t\t\t\t\t//index = temp;\r\n\t\t\t\t}\r\n\t\t\t\t//move on to the next index\r\n\t\t\t\tindex = (FileInfo) index.getNextSibling();\r\n\t\t\t}\r\n\t\t}\r\n\t\t//add it to the node\r\n\t\tnode.add(givenFile);\r\n\t\tif(parentTree != null)\r\n\t\t\tparentTree.nodeStructureChanged(node);\r\n\t}", "private static void addLibraryPath(String pathToAdd) throws Exception{\n\t\tfinal Field usrPathsField = ClassLoader.class.getDeclaredField(\"usr_paths\");\n\t\tusrPathsField.setAccessible(true);\n\t \n\t\t//get array of paths\n\t\tfinal String[] paths = (String[])usrPathsField.get(null);\n\t \n\t\t//check if the path to add is already present\n\t\tfor(String path : paths) {\n\t\t\tif(path.equals(pathToAdd)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t \n\t\t//add the new path\n\t\tfinal String[] newPaths = Arrays.copyOf(paths, paths.length + 1);\n\t\tnewPaths[newPaths.length-1] = pathToAdd;\n\t\tusrPathsField.set(null, newPaths);\n\t}", "@Override\n\tpublic void addSubComponent(Component component) {\n\n\t\tassert (component != null);\n\n\t\t// Check component is not already a subComponent\n\t\tif (subComponents.contains(component)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsubComponents.add(component);\n\t\tcomponent.setSuperComponent(this);\n\t\tnotifySubComponentsChangedListeners();\n\t}", "public void addDirectory(FileDiffDirectory directory) {\n \t\tthis.directories.add(directory);\n \t}", "protected void createDirectory(Path path, Path destPath) {\n String rootLocation = destPath.toString();\n int index;\n if(firstTime) {\n firstTime = false;\n index = path.toFile().getPath().lastIndexOf(\"\\\\\")+1;//index where cur directory name starts\n rootFolder = path.toFile().getPath().substring(index);\n }\n else {\n index = path.toFile().getPath().indexOf(rootFolder);\n }\n\n String folderName= path.toFile().getPath().substring(index);\n Path newDirPath = Paths.get(rootLocation + DOUBLE_BKW_SLASH +folderName);\n try {\n Path newDir = Files.createDirectory(newDirPath);\n } catch(FileAlreadyExistsException e){\n // the directory already exists.\n e.printStackTrace();\n } catch (IOException e) {\n //something else went wrong\n e.printStackTrace();\n }\n }", "public void newFolder ()\n {\n newNode(null);\n }", "public DocumentListEntry createFolder(String folderName) throws MalformedURLException, IOException, ServiceException;", "public void add(String directoryName) {\n this.add(new SubMenuItem(directoryName));\n }", "private static void addDirectoryToLibraryPath(String dir) throws IOException {\n try {\n Field field = ClassLoader.class.getDeclaredField(\"usr_paths\");\n field.setAccessible(true);\n String[] paths = (String[]) field.get(null);\n for (String path: paths) {\n if (dir.equals(path)) {\n return;\n }\n }\n String[] tmp = new String[paths.length + 1];\n System.arraycopy(paths, 0, tmp, 0, paths.length);\n tmp[paths.length] = dir;\n field.set(null, tmp);\n } catch (IllegalAccessException e) {\n throw new IOException(\"Failed to get permissions to set library path.\");\n } catch (NoSuchFieldException e) {\n throw new IOException(\"Failed to get field handle to set library path.\");\n }\n }", "public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}", "interface WithFolderPath {\n /**\n * Specifies the folderPath property: The folder path of the source control. Path must be relative..\n *\n * @param folderPath The folder path of the source control. Path must be relative.\n * @return the next definition stage.\n */\n Update withFolderPath(String folderPath);\n }", "private void addDirContents( ZipOutputStream output, File dir, String prefix, boolean compress ) throws IOException {\n String[] contents = dir .list();\n for ( int i = 0; i < contents .length; ++i ) {\n String name = contents[i];\n File file = new File( dir, name );\n if ( file .isDirectory() ) {\n addDirContents( output, file, prefix + name + '/', compress );\n }\n else {\n addFile( output, file, prefix, compress );\n }\n }\n }", "public void updateFolder(Folder folder) {\n Validate.notNull(folder.getId(), \"id cannot be null\");\n String path = StringUtils.replaceOnce(FOLDERS_ITEM_PATH, PLACEHOLDER, folder.getId().toString());\n client.post(path, String.class, folder);\n }", "@JsonProperty(\"subpath\")\n public void setSubpath(String subpath) {\n this.subpath = subpath;\n }", "void addFile(RebaseJavaFile jf)\n{\n if (file_nodes.contains(jf)) return;\n\n file_nodes.add(jf);\n jf.setRoot(this);\n}", "Paths addPathItem(String name, PathItem item);", "public void createFolder(String path, String folderName) throws GRIDAClientException {\n\n try {\n Communication communication = getCommunication();\n communication.sendMessage(\n ExecutorConstants.COM_CREATE_FOLDER + Constants.MSG_SEP_1\n + proxyPath + Constants.MSG_SEP_1\n + Util.removeLfnFromPath(path + \"/\" + folderName));\n communication.sendEndOfMessage();\n\n communication.getMessage();\n communication.close();\n\n } catch (IOException ex) {\n throw new GRIDAClientException(ex);\n }\n }", "private void addChild(final INode node, final int insertionPoint) {\r\n if (children == null) {\r\n children = new ArrayList<INode>(DEFAULT_FILES_PER_DIRECTORY);\r\n }\r\n node.setParent(this);\r\n children.add(-insertionPoint - 1, node);\r\n\r\n if (node.getGroupName() == null) {\r\n node.setGroup(getGroupName());\r\n }\r\n }", "void folderUploaded(String remoteFolder);", "@Test\n public void addItemSubCategoryFileTest() throws ApiException {\n Integer itemSubCategoryId = null;\n String fileName = null;\n api.addItemSubCategoryFile(itemSubCategoryId, fileName);\n\n // TODO: test validations\n }", "@Override\n\t\tpublic void add(File explodedAar) {\n if (!isShared(explodedAar))\n files.addAll(getJars(explodedAar));\n\t\t}", "public void addCTabFolder2Listener( final CTabFolder2Listener listener ) {\n CTabFolderEvent.addListener( this, listener );\n }", "private void addDirToList(File dir, List<File> list) {\n\t\tif(dir.exists() && dir.isDirectory()) {\n\t\t\tlist.add(dir);\n\t\t}\n\t}", "void addElement(String newSubResourceName, ResourceBase newSubResource);", "private void addPackageDirFiles(WebFile aDir, List aList)\n{\n boolean hasNonPkgFile = false;\n for(WebFile child : aDir.getFiles())\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, aList);\n else hasNonPkgFile = true;\n if(hasNonPkgFile || aDir.getFileCount()==0) aList.add(aDir);\n}", "abstract void addNewSourceDirectory(final File targetDirectory);", "public native void addSubItem(MenuItem item);", "private void createFolder(String myFilesystemDirectory) {\n\r\n File file = new File(myFilesystemDirectory);\r\n try {\r\n if (!file.exists()) {\r\n //modified \r\n file.mkdirs();\r\n }\r\n } catch (SecurityException e) {\r\n Utilidades.escribeLog(\"Error al crear carpeta: \" + e.getMessage());\r\n }\r\n }", "@Override\n protected NodeInfo createDirectoryEntry(NodeInfo parentEntry, Path dir) throws IOException {\n return drive.createFolder(parentEntry.getId(), toFilenameString(dir));\n }", "public void addFeedIntoFolder(String feedURL, String name);", "@Test\n\tpublic void createFolderAsAuditorTest() {\n\t\tauthenticate(\"agent2\");\n\t\tint principalId = actorService.findByPrincipal().getId();\n\t\tint numFoldersNow = folderService.findFoldersOfActor(principalId).size();\n\t\tFolderForm folderFormAux = new FolderForm();\n\t\tfolderFormAux.setName(\"New Agent2 Folder for testing its creation\");\n\t\tFolder folder = folderService.reconstruct(folderFormAux,0);\n\t\tfolderService.save(folder);\n\t\tint numFoldersExpected = folderService.findFoldersOfActor(principalId).size();\n\t\tunauthenticate();\t\n\t\t\n\t\tAssert.isTrue(numFoldersNow + 1 == numFoldersExpected);\n\t}", "public static void addCodeFolder(IProject project, Path path) throws CoreException {\n boolean projDescNeedsSaving = false;\n CoreModel coreModel = CoreModel.getDefault();\n ICProjectDescription projectDescription = coreModel.getProjectDescription(project);\n\n List<IPath> includeFolders = Helpers.addCodeFolder(project, path, path.lastSegment(), false);\n for (ICConfigurationDescription curConfig : projectDescription.getConfigurations()) {\n if (Helpers.addIncludeFolder(curConfig, includeFolders, true)) {\n projDescNeedsSaving = true;\n }\n }\n if (projDescNeedsSaving) {\n coreModel.getProjectDescriptionManager().setProjectDescription(project, projectDescription, true, null);\n }\n }", "public final void addDirectory(Path dir) {\n\t\t// enable trace for registration\n this.trace = true;\n register(dir);\n }" ]
[ "0.7668136", "0.68847084", "0.68211544", "0.6423417", "0.61827177", "0.61390615", "0.59592754", "0.5882618", "0.5786594", "0.5771318", "0.57609856", "0.5749575", "0.57429636", "0.573822", "0.57317126", "0.57073563", "0.56495315", "0.56183106", "0.5574427", "0.5571329", "0.5561123", "0.54781955", "0.54658324", "0.546105", "0.5446314", "0.54283035", "0.5425248", "0.5420154", "0.5417976", "0.53986156", "0.5382789", "0.53705996", "0.5365977", "0.5350591", "0.53382814", "0.53306586", "0.53285027", "0.5326184", "0.5316276", "0.5299339", "0.528346", "0.52812403", "0.5275574", "0.52741635", "0.52535725", "0.5230408", "0.52281755", "0.52108735", "0.52061003", "0.5199596", "0.51973575", "0.5184377", "0.5143788", "0.5143418", "0.5141898", "0.5138784", "0.51094735", "0.51033294", "0.5102682", "0.51005733", "0.5100067", "0.5079629", "0.50638205", "0.5062048", "0.5059513", "0.50562394", "0.50466996", "0.5026004", "0.5020591", "0.5013568", "0.5009689", "0.5008381", "0.49907157", "0.49858326", "0.49848756", "0.49824888", "0.49811387", "0.49734044", "0.49669614", "0.49620187", "0.49606183", "0.49450922", "0.49446782", "0.49421138", "0.4940708", "0.49394476", "0.49376237", "0.4934886", "0.49314433", "0.49282935", "0.4925468", "0.4922295", "0.49204022", "0.4918226", "0.4913124", "0.49104244", "0.49005103", "0.48968336", "0.48929426", "0.48875502" ]
0.6726287
3
Centra elementos de la tabla > solo 'Body'
public void Centrar_Tabla(JTable tabla) { DefaultTableCellRenderer modelocentrar = new DefaultTableCellRenderer(); modelocentrar.setHorizontalAlignment(SwingConstants.CENTER); int columnas = tabla.getColumnCount(), i = 0; while (i < columnas) { tabla.getColumnModel().getColumn(i).setCellRenderer(modelocentrar); i++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createBody() {\n\t\tTableView<Debiteur> table = new TableView<>();\n\t\tTableColumn<Debiteur, String> naam = new TableColumn<>(\"Gast\");\n\t\tTableColumn<Debiteur, CheckBox> checkbox = new TableColumn<>(\" \");\n\t\ttable.getColumns().addAll(naam, checkbox);\n\t\tnaam.setCellValueFactory(new PropertyValueFactory<Debiteur, String>(\"naam\"));\n\t\tcheckbox.setCellValueFactory(e -> {\n\t\t\tCheckBox checkBox = new CheckBox();\n\t\t\tBindings.bindBidirectional(checkBox.selectedProperty(), e.getValue().activeProperty());\n\t\t\treturn new SimpleObjectProperty<>(checkBox);\n\t\t});\n\t\ttable.setItems(debiteuren);\n\t\tsetCenter(table);\n\t}", "@Override\n\tprotected void body() {\n\t\t\n\t\ttotalGeral = new BigDecimal(0.00);\n\t\ttotalVendivel = new BigDecimal(0.00);\n\t\tgastosCount = 0;\n\t\t\n\t\topenEl(\"table\", null, true);\n\t\t\n\t\taddHeader();\n\t\t\n\t\topenEl(\"tbody\", null, true);\n\t\t\n\t\tCursor cursor = new GastoDatabaseHandler().\n\t\t\t\tcreateCursorRelatorio(db, dataInicial, dataFinal, plataforma, apenasVendiveis, apenasPlataformasAtivas);\n\t\tif (cursor != null) {\n\t\t\ttry {\n\t\t\t\tif (cursor.moveToFirst()) {\n\t\t\t\t\t\n\t\t\t\t\taddGastos(cursor);\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\topenEl(\"tr\");\n\t\t\t\t\t\n\t\t\t\t\tMap<String, String> attrs = new HashMap<>();\n\t\t\t\t\tattrs.put(\"class\", \"center\");\n\t\t\t\t\tattrs.put(\"colspan\", \"6\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tappendEl(\"td\", getString(R.string.info_nenhum_gasto_encontrado), attrs);\n\t\t\t\t\t\n\t\t\t\t\tcloseEl(\"tr\", true);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (gastosCount > 0) {\n\t\t\taddTotais();\n\t\t}\n\t\t\n\t\tcloseEl(\"tbody\", true);\n\t\t\t\t\n\t\tcloseEl(\"table\", true);\n\t}", "private void createTableArea() {\n\t\tthis.tableModel = new MessagesTableModel();\n\t\tthis.conversation = new JTable(this.tableModel);\n\t\tthis.conversation.setRowSelectionAllowed(false);\n\t\tthis.conversation.getColumn(\"Pseudo\").setMaxWidth(150);\n\t\tthis.conversation.getColumn(\"Message\").setWidth(200);\n\t\tthis.conversation.getColumn(\"Heure\").setMaxWidth(50);\n\t\tthis.conversation.getColumn(\"Message\").setCellRenderer(new WrapTableCellRenderer());\n\t\tthis.conversation.getColumn(\"Pseudo\").setCellRenderer(new ColorTableCellRenderer());\n\t\tthis.scrollPane = new JScrollPane(conversation);\n\t}", "private void createTable() {\n table = new Table();\n table.bottom();\n table.setFillParent(true);\n }", "BODY createBODY();", "private void buildTables(){\r\n\t\tarticleTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\tarticleTable.setPageLength(5);\r\n\t\tlabel = new Label(\"No article found\");\r\n\t\tlabel2 = new Label(\"No image found\");\r\n\t\timageTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\timageTable.setPageLength(5);\r\n\t}", "private static void buildTableBody(ArrayList<ArrayList<Node>> nodeGraph,\n ArrayList<ArrayList<PACell>> table) {\n int ctr = 1;\n for (ArrayList<Node> nodes : nodeGraph) {\n for (Node node : nodes) {\n table.get(ctr).add(new PACell(TableCellType.CELL_WHITE, node.getName()));\n }\n ctr++;\n }\n }", "private void createMainTable(Section subCatPart)\r\n throws BadElementException, MalformedURLException, IOException {\r\n \r\n \r\n PdfPTable table = new PdfPTable(model.getColumnCount());\r\n table.setWidthPercentage(100.0f);\r\n \r\n PdfPCell c1;\r\n for(int i = 0; i < model.getColumnCount(); i++){\r\n c1 = new PdfPCell(new Phrase(model.getColumnName(i)));\r\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n table.addCell(c1);\r\n }\r\n table.setHeaderRows(1);\r\n\r\n for(int row = 0; row < model.getRowCount(); row++){\r\n for (int col = 0; col < model.getColumnCount(); col++) {\r\n String input = model.getValueAt(row, col).toString();\r\n if(input.equals(\"true\"))\r\n input = \"X\";\r\n if(input.equals(\"false\"))\r\n input = \"\";\r\n PdfPCell cell = new PdfPCell(new Phrase(input));\r\n cell.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n table.addCell(cell);\r\n \r\n }\r\n }\r\n subCatPart.add(table);\r\n }", "@Override\n protected String elaboraBody() {\n String text = CostBio.VUOTO;\n int numCognomi = mappaCognomi.size();\n int numVoci = Bio.count();\n int taglioVoci = Pref.getInt(CostBio.TAGLIO_NOMI_ELENCO);\n\n text += A_CAPO;\n text += \"==Cognomi==\";\n text += A_CAPO;\n text += \"Elenco dei \";\n text += LibWiki.setBold(LibNum.format(numCognomi));\n text += \" cognomi '''differenti''' utilizzati nelle \";\n text += LibWiki.setBold(LibNum.format(numVoci));\n text += \" voci biografiche con occorrenze maggiori di \";\n text += LibWiki.setBold(taglioVoci);\n text += A_CAPO;\n text += creaElenco();\n text += A_CAPO;\n\n return text;\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 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 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 tablesice() {\n //Modificamos los tamaños de las columnas.\n tablastock.getColumnModel().getColumn(0).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(1).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(2).setMinWidth(100);\n tablastock.getColumnModel().getColumn(3).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(4).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(5).setMaxWidth(70);\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 }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "void resizeBodyTableRowHeight(){\n\n int tableC_ChildCount = this.tableC.getChildCount();\n\n for(int x=0; x<tableC_ChildCount; x++){\n\n TableRow productNameHeaderTableRow = (TableRow) this.tableC.getChildAt(x);\n TableRow productInfoTableRow = (TableRow) this.tableD.getChildAt(x);\n\n int rowAHeight = this.viewHeight(productNameHeaderTableRow);\n int rowBHeight = this.viewHeight(productInfoTableRow);\n\n TableRow tableRow = rowAHeight < rowBHeight ? productNameHeaderTableRow : productInfoTableRow;\n int finalHeight = rowAHeight > rowBHeight ? rowAHeight : rowBHeight;\n\n this.matchLayoutHeight(tableRow, finalHeight);\n }\n\n }", "@Override\r\n\tpublic void initializeTableContents() {\n\t\t\r\n\t}", "public Table(ElementStructure structure) {\n\t\tsuper(structure);\n\t\tfields = structure.data.fieldArray(vis.positionFields());\n\t\tpadding = ModelUtil.getPadding(vis, StyleTarget.makeElementTarget(null), 2);\n\t\tpadding.top += 15; // For the titles\n\t\tfraction = divideColumnSpace(fields);\n\t\tStyleTarget styleTarget = StyleTarget.makeElementTarget(\"text\");\n\t\tfontSize = ModelUtil.getFontSize(vis, styleTarget, 12);\n\t}", "private void displayAllTable() {\n\n nhacungcap = new NhaCungCap();\n nhacungcap.setVisible(true);\n jDestopTable.add(nhacungcap);\n\n thuoc = new SanPham();\n thuoc.setVisible(true);\n jDestopTable.add(thuoc);\n\n khachHang = new KhachHang();\n khachHang.setVisible(true);\n jDestopTable.add(khachHang);\n\n hoaDon = new HoaDon();\n hoaDon.setVisible(true);\n jDestopTable.add(hoaDon);\n\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 String getBody()\n throws SQLException\n {\n DBMetaData md = MetaData.getDbMetaData( datasource );\n// String[] types = {\"TABLE\", \"VIEW\"};\n ArrayList tableList = new ArrayList();\n tableList = ( ArrayList ) md.getAllTableMetaData();\n /*\n * Produce the table names with the appropriately labeled checkboxs\n */\n StringBuffer buffer = new StringBuffer();\n String tableName;\n String inputType = \"hidden\";\n if ( displayTables.equals( \"true\" ) )\n {\n buffer.append( \"\\n<tr><td colspan=\\\"3\\\">\" );\n buffer.append( \"<b>Select Tables to be Used:</b></td></tr>\" );\n inputType = \"checkbox\";\n }\n\n for ( int i = 0; i < tableList.size(); i++ )\n {\n TableMetaData table = ( TableMetaData ) tableList.get( i );\n tableName = table.getName();\n\n if ( displayTables.equals( \"true\" ) )\n {\n buffer.append( \"\\n<tr>\" );\n buffer.append( \"<td width=7 align='center'>\" );\n }\n buffer.append( \"<input type='\" + inputType + \"' name='\" + FormTags.TABLE_TAG + \"' value='\" + tableName + \"'></td>\" );\n if ( displayTables.equals( \"true\" ) )\n {\n buffer.append( \"<td>\" + tableName + \"</td>\" );\n buffer.append( \"<td>\" + table.getComments() + \"</td>\" );\n buffer.append( \"</tr>\" );\n }\n }\n\n return buffer.toString();\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 }", "@Override\n\tpublic void placementcell() {\n\t\t\n\t}", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "private void positionTableInScene() {\n setIdentityM(modelMatrix, 0);\n rotateM(modelMatrix, 0, -90f, 1f, 0f, 0f);\n multiplyMM(modelViewProjectionMatrix, 0, viewProjectionMatrix,\n 0, modelMatrix, 0);\n }", "private void renderArticleTable(){\r\n\t\tarticleTable.setContainerDataSource(loadLatestArticles());\r\n\t\tif(articleDto.isEmpty()){\r\n\t\t\tlabel.setVisible(true);\r\n\t\t\tarticleTable.setVisible(false);\r\n\t\t}else {\r\n\t\t\tlabel.setVisible(false);\r\n\t\t\tarticleTable.setVisible(true);\r\n\t\t}\r\n\t}", "private void addBody()\n throws PaginatedResultSetXmlGenerationException\n {\n addPreamble();\n addRecords();\n addPostamble();\n }", "@Test\n public void test137() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, (String) null);\n TableBlock tableBlock0 = table0.thead();\n WordLemmaTag wordLemmaTag0 = new WordLemmaTag();\n Block block0 = (Block)table0.label();\n Tag tag0 = new Tag((edu.stanford.nlp.ling.Label) wordLemmaTag0);\n Label label0 = (Label)tableBlock0.h6((Object) tag0);\n // Undeclared exception!\n try {\n Component component0 = block0.thead();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Thead component can be added only to a Table.\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}", "private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.print(\"\\t\" + i + \"\\t|\");\n }\n System.out.println();\n // print body\n for(int i = 0; i < parseTable.size(); i++) {\n System.out.print(i + \"\\t|\");\n for(int j = 0; j < parseTable.get(i).size(); j++) {\n System.out.print(\"\\t\" + parseTable.get(i).get(j) + \"\\t|\");\n }\n System.out.println();\n }\n System.out.println();\n System.out.println(\"END OF SLR PARSE TABLE\");\n System.out.println();\n }", "public List<String> getBodyTables() {\r\n\t\tList<String> tableNames = new ArrayList<String>();\r\n\t\tfor (Atom a: getBody()) {\r\n\t\t\tif(!a.isNeg() && !a.isSkolem())\r\n\t\t\t\ttableNames.add(a.toString3());\r\n\t\t}\r\n\t\treturn tableNames;\r\n\t}", "private String TableContentDefinition(SimpleNode treeRoot) {\n String statement = \"\";\n SimpleNode node;\n String nodeType;\n String tmp;\n\n /*\n\t\t * Table content consists of column definitions.\n */\n for (int i = 0; i < treeRoot.jjtGetNumChildren(); i++) {\n node = ((SimpleNode) treeRoot.jjtGetChild(i));\n nodeType = node.toString();\n if (\"ColumnDefinition\".equals(nodeType)) {\n statement += ColumnDefinition(node) + \",\\n\";\n } else if (\"OutOfLineConstraint\".equals(nodeType)) {\n /*\n\t\t\t\t * Constraint can result in empty statement \n\t\t\t\t * - PRIMARY KEY (###) just adds columns to keys array and has empty result\n */\n tmp = OutOfLineConstraint(node);\n if (tmp.length() != 0) {\n statement += tmp + \",\\n\";\n }\n }\n }\n return statement;\n }", "TableFull createTableFull();", "private void sendTableHeader(CommandType type) {\n switch (type) {\n case LECTURER:\n sendMsgToClient(\"@|bold,cyan \" + String.format(\"%-25s %s\", \"Name\", \"Subject\" + \"|@\"));\n sendMsgToClient(\"@|cyan -------------------------------- |@\");\n break;\n case SUBJECT:\n sendMsgToClient(\"@|bold,cyan \" +\n String.format(\"%-30s %-10s %-10s %s\", \"Subject\", \"Code\", \"Enrolled\", \"Lecturer(s)|@\"));\n sendMsgToClient(\"@|cyan ----------------------------------------------------------------------------- |@\");\n break;\n }\n }", "private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }", "public void addHeaders() {\n TableLayout tl = findViewById(R.id.table);\n TableRow tr = new TableRow(this);\n tr.setLayoutParams(getLayoutParams());\n if (!haverford) {\n tr.addView(getTextView(0, \"Leave Bryn Mawr\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n tr.addView(getTextView(0, \"Arrive Haverford\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n } else {\n tr.addView(getTextView(0, \"Leave Haverford\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n tr.addView(getTextView(0, \"Arrive Bryn Mawr\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n }\n tl.addView(tr, getTblLayoutParams());\n }", "private void positionTableInScene()\n\t{\n\t\tMatrix.setIdentityM(mModelMatrix, 0);\n\t\tMatrix.rotateM(mModelMatrix, 0, -90f, 1f, 0f, 0f);\n\t\tMatrix.multiplyMM(mModelViewProjectionMatrix, 0, mViewProjectionMatrix, 0, mModelMatrix, 0);\n\t}", "private void renderTitle() {\n this.row = sheet.createRow(INT_ROW_START);\n //se crea titulos de la tabla\n this.addCell(column_++, \"CODIGO DE BARRAS\", this.cellStyleTitle());\n this.addCell(column_++, \"FECHA\", this.cellStyleTitle());\n this.addCell(column_++, \"HORA\", this.cellStyleTitle());\n this.addCell(column_++, \"MARBETE\", this.cellStyleTitle());\n this.addCell(column_++, \"PRODUCTO\", this.cellStyleTitle());\n this.addCell(column_++, \"DESCRIPCIÓN\", this.cellStyleTitle());\n this.addCell(column_++, \"LOTE\", this.cellStyleTitle());\n this.addCell(column_++, \"PESO\", this.cellStyleTitle());\n this.addCell(column_++, \"RESPONSABLE\", this.cellStyleTitle());\n }", "@SuppressWarnings(\"unchecked\")\n private void createTable(ArrayList<Object> objects){\n log.setText(\"\");\n if(!objects.isEmpty()) {\n ArrayList<String> list = new ArrayList<String>();\n int index = 0, row = 0, column = 0;\n for (Field field : objects.get(0).getClass().getDeclaredFields()) {\n list.add(field.getName());\n }\n String[] columnName = new String[list.size()];\n for(String s:list) {\n columnName[index] = s;\n index++;\n }\n Object data[][] = getData(objects, index);\n if(data.length != 0) {\n tableMode = new DefaultTableModel(data, columnName);\n }\n else {\n tableMode = null;\n }\n }\n else {\n tableMode = null;\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 }", "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 addEmptyRow()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n TableRow row = new TableRow(this);\n\n TextView emptyView1 = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(emptyView1, \"\", R.drawable.emptyborder);\n TextView emptyView2 = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(emptyView2, \"\", R.drawable.emptyborder);\n TextView emptyView3 = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(emptyView3, \"\", R.drawable.emptyborder);\n TextView emptyView4 = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).initializeTableCell(emptyView4, \"\", R.drawable.emptyborder);\n\n row.addView(emptyView1);\n row.addView(emptyView2);\n row.addView(emptyView3);\n row.addView(emptyView4);\n\n table.addView(row);\n }", "public void paramTable() {\n jTable2.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);\n mode = (DefaultTableModel) jTable2.getModel();\n dtcm = (DefaultTableColumnModel) jTable2.getColumnModel();\n\n jTable2.setRowHeight(40);\n largeurColoneMax(dtcm, 0, 70);\n largeurColoneMax(dtcm, 3, 50);\n largeurColoneMax(dtcm, 4, 100);\n largeurColoneMax(dtcm, 6, 90);\n largeurColoneMax(dtcm, 9, 70);\n\n TableCellRenderer tbcProjet = getTableCellRenderer();\n TableCellRenderer tbcProjet2 = getTableHeaderRenderer();\n for (int i = 0; i < jTable2.getColumnCount(); i++) {\n TableColumn tc = jTable2.getColumnModel().getColumn(i);\n tc.setCellRenderer(tbcProjet);\n tc.setHeaderRenderer(tbcProjet2);\n\n }\n\n }", "private void addColumnBody(ColumnProfile p_cp, int p_index)\n {\n String content = m_proxy.valueAt(p_index);\n addColumnElement(LABEL, p_cp.getLabel());\n addColumnElement(CONTENT, (content == null ? EMPTY_STRING : content));\n }", "private static void drawTableCompenents() {\n\t\ttopColumn = new JLabel(\"location\");\r\n\t\ttopColumn.setLocation(200, 0);\r\n\t\tExtension.instance.add(topColumn);\r\n\t}", "private boolean crearColumnas(Table t)\n\t{\n\t\ttry {\n\t\t TableColumn tc1 = new TableColumn(t, SWT.CENTER);\n\t\t TableColumn tc2 = new TableColumn(t, SWT.CENTER);\n\t\t TableColumn tc3 = new TableColumn(t, SWT.CENTER);\n\t\t TableColumn tc4 = new TableColumn(t, SWT.CENTER);\n\t\t TableColumn tc5 = new TableColumn(t, SWT.CENTER);\n\t\t tc1.setText(\"Fecha - Hora\");\n\t\t tc2.setText(\"Tipo Doc.\");\n\t\t tc3.setText(\"Serie - nro.\");\n\t\t tc4.setText(\"Remitente\");\n\t\t tc5.setText(\"Ya impreso\");\n\n\t\t tc1.setWidth(100);\n\t\t tc2.setWidth(100);\n\t\t tc3.setWidth(120);\n\t\t tc4.setWidth(200);\n\t\t tc5.setWidth(80);\n\t\t t.setHeaderVisible(true);\n\t \treturn true;\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t}", "public void displayTable() {\n\t\tcontent.addComponent(tableDisplay.getGrid());\n\t\tthis.removeStyleName(\"fr_map_component_no_table\");\n\t}", "public org.chartacaeli.model.Body[] getBody() {\n org.chartacaeli.model.Body[] array = new org.chartacaeli.model.Body[0];\n return this.bodyList.toArray(array);\n }", "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 show() {\n if(heading.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in heading, nothing to show\");\r\n return;\r\n }\r\n if(rows.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in rows, nothing to show\");\r\n return;\r\n }\r\n for(String h : heading) {\r\n System.out.print(h + \" | \");\r\n }\r\n System.out.println(\"\");\r\n Set<String> keys = rows.keySet();\r\n for(String k : keys) {\r\n rows.get(k).show();\r\n System.out.println(\"\");\r\n }\r\n System.out.println(\"\");\r\n }", "private void createCoverTable(Document document, Image img) throws IOException, DocumentException {\n\n //PEI NAME IN BLUE\n Table table = new Table(1);\n table.setBorder(Table.NO_BORDER);\n table.setWidth(100);\n Font font = getFontBig();\n font.setColor(Color.BLUE);\n font.setStyle(Font.BOLD);\n font.setSize(34);\n Cell cell = new Cell(new Paragraph(peiName, font));\n cell.setHorizontalAlignment(Cell.ALIGN_CENTER);\n cell.setVerticalAlignment(Cell.ALIGN_TOP);\n cell.setBorder(Cell.NO_BORDER);\n table.addCell(cell);\n document.add(table);\n\n //PEI ATTRS\n table = new Table(2);\n table.setCellsFitPage(true);\n table.setBorder(Table.NO_BORDER);\n table.setAlignment(Table.ALIGN_LEFT);\n table.setWidth(100);\n table.setWidths(new float[]{150, 300});\n\n font = getFontSmall();\n font.setStyle(Font.BOLD);\n Paragraph p1 = new Paragraph(getMessage(\"pei.version\") + \":\", font);\n p1.setAlignment(Paragraph.ALIGN_LEFT);\n cell = new Cell(p1);\n Paragraph p2 = new Paragraph(version != null ? version : \"\", getFontSmall());\n p2.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p2);\n Paragraph p3 = new Paragraph(getMessage(\"pei.versionDate\") + \":\", font);\n p3.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p3);\n Paragraph p4 = new Paragraph(versionDate != null ? dateFormat.format(versionDate) : \"\", getFontSmall());\n p4.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p4);\n Paragraph p5 = new Paragraph(simulationDate != null ? getMessage(\"pei.simulationDate\") + \":\" : \"\", font);\n p5.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p5);\n Paragraph p6 = new Paragraph(simulationDate != null ? dateFormat.format(simulationDate) : \"\", getFontSmall());\n p6.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p6);\n Paragraph p7 = new Paragraph(getMessage(\"pei.authorName\") + \":\", font);\n p7.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p7);\n Paragraph p8 = new Paragraph(authorName != null ? authorName : \"\", getFontSmall());\n p8.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p8);\n\n cell.setBackgroundColor(Color.LIGHT_GRAY);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT);\n cell.setVerticalAlignment(Element.ALIGN_BOTTOM);\n table.addCell(cell);\n\n if (img != null) {\n if (img.getWidth() > 295) {\n img.scaleAbsoluteWidth(295);\n img.scaleAbsoluteHeight(img.getHeight() / img.getWidth() * 295);\n }\n img.setAlignment(Image.ALIGN_RIGHT);\n Paragraph p = new Paragraph(\" \");\n p.setAlignment(Paragraph.ALIGN_RIGHT);\n cell = new Cell(p);\n cell.setHorizontalAlignment(Cell.ALIGN_RIGHT);\n cell.addElement(img);\n } else {\n cell = new Cell(\" \");\n }\n cell.setBorder(Cell.NO_BORDER);\n\n table.addCell(cell);\n\n document.add(table);\n }", "public PdfPTable createTable() {\n\t\tPdfPTable t = new PdfPTable(2);\n\t\tt.setWidthPercentage(100);\n\t\tt.setHorizontalAlignment(Element.ALIGN_LEFT);\n\t\tt.getDefaultCell().setBorder(Rectangle.NO_BORDER);\n\t\t// set up the table headers for albums\n\t\tif (state.equals(\"a\")) {\n\t\t\tFont bold = new Font(Font.FontFamily.HELVETICA, 13, Font.BOLD);\n\t\t\t\n\t\t\tPdfPCell nameCell = new PdfPCell();\n\t\t\tnameCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase name = new Phrase(\"Name\", bold);\n\t\t\tnameCell.addElement(name);\n\t\t\t\n\t\t\tPdfPCell artistCell = new PdfPCell();\n\t\t\tartistCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase artist = new Phrase(\"Artist\", bold);\n\t\t\tartistCell.addElement(artist);\n\t\t\t\n\t\t\tt.addCell(nameCell);\n\t\t\tt.addCell(artistCell);\n\t\t}\n\t\t// set up the table headers for publications\n\t\telse if (state.equals(\"p\")) {\n\t\t\tFont bold = new Font(Font.FontFamily.HELVETICA, 13, Font.BOLD);\n\t\t\t\n\t\t\tPdfPCell nameCell = new PdfPCell();\n\t\t\tnameCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase name = new Phrase(\"Name\", bold);\n\t\t\tnameCell.addElement(name);\n\t\t\t\n\t\t\tPdfPCell devisorCell = new PdfPCell();\n\t\t\tdevisorCell.setBorder(Rectangle.NO_BORDER);\n\t\t\tPhrase devisor = new Phrase(\"Devisor\", bold);\n\t\t\tdevisorCell.addElement(devisor);\n\t\t\t\n\t\t\tt.addCell(nameCell);\n\t\t\tt.addCell(devisorCell);\n\t\t}\n\t\ttry {\n\t\t\tResultSet results = db.searchTableByName(table, \"\", true);\n\t\t\twhile(results.next()) {\n\t\t\t\t// add album info to table\n\t\t\t\tif (state.equals(\"a\")) {\n\t\t\t\t\tt.addCell(results.getString(\"name\"));\n\t\t\t\t\tt.addCell(results.getString(\"artist\"));\n\t\t\t\t}\n\t\t\t\t// add publication info to table\n\t\t\t\telse if (state.equals(\"p\")) {\n\t\t\t\t\tt.addCell(results.getString(\"name\"));\n\t\t\t\t\tt.addCell(results.getString(\"devisor\"));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn t;\n\t}", "private ConfigurationHTMLPrinter startTable() {\n return println(\"<table border='0' cellspacing='0' cellpadding='0'>\").incrementIndent();\n }", "public void assertOnTableElements()\n {\n\t open();\n\t inTable(table).shouldHaveRowElementsWhere(the(\"First name\" , equalTo(\"Frank\")));\n }", "GridPane body();", "public BuscarCentro() {\n initComponents();\n model= (DefaultTableModel)jTable1.getModel();\n centros = Modelo.Centro.listarCentros();\n for(Modelo.Centro c: centros){\n model.insertRow(model.getRowCount(), new Object[]{c.getId_centro(),c.getNombre(),c.getLoc()});\n }\n }", "void piede() {\n try {\n\n Cell c;\n c = new Cell();\n set2(c);\n c.setColspan(4);\n datatable.addCell(c);\n c = new Cell(new Phrase(\"Totale \\u20ac \" + Db.formatValuta(totale), new Font(Font.HELVETICA, 8, Font.BOLD)));\n set2(c);\n c.setColspan(2);\n c.setHorizontalAlignment(c.ALIGN_RIGHT);\n datatable.addCell(c);\n document.add(datatable);\n } catch (Exception err) {\n err.printStackTrace();\n javax.swing.JOptionPane.showMessageDialog(null, err.toString());\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 void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }", "public Table buildAssetDetailsTable(ManufacturingOrder dto) {\n\n\t\tTable table = new Table();\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 610px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\tif (dto.getAssetConfig() != null && dto.getAssetConfig().size() > 0) {\n\n\t\t\tint count = 0;\n\n\t\t\tfor (AssetConfig asset : dto.getAssetConfig()) {\n\n\t\t\t\tTableRow row = new TableRow();\n\n\t\t\t\tTableData facility = new TableData(new SimpleText(\n\t\t\t\t\t\tvalidateDisplayField(asset.getFacility())));\n\t\t\t\tfacility.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\n\t\t\t\tTableData workCenterCode = new TableData(new SimpleText(\n\t\t\t\t\t\tvalidateDisplayField(asset.getWorkCenterCode())));\n\t\t\t\tworkCenterCode.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 15% ; vertical-align: middle\");\n\n\t\t\t\tTableData description = new TableData(new SimpleText(\n\t\t\t\t\t\tvalidateDisplayField(asset.getDescription())));\n\t\t\t\tdescription.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 35% ; vertical-align: middle\");\n\n\t\t\t\tTableData assetNumber = new TableData(new SimpleText(\n\t\t\t\t\t\tvalidateDisplayField(/*asset.getAssetNumber()*/\"123456789123456\")));\n\t\t\t\tassetNumber.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 20% ; vertical-align: middle\");\n\n\t\t\t\tString statusFlag = asset.getStatus();\n\n\t\t\t\tTableData status;\n\t\t\t\tif (!\"A\".equalsIgnoreCase(statusFlag)) {\n\t\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chkbox\\\" value=\\\"A\\\" />\"));\n\t\t\t\t} else {\n\t\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chkbox\\\" value=\\\"A\\\" checked=\\\"checked\\\"/>\"));\n\t\t\t\t}\n\t\t\t\tstatus.addAttribute(\"style\",\n\t\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\t\t\t\tstatus.addAttribute(\"disabled\", \"disabled\");\n\n\t\t\t\tTableData editImage = new TableData(new Image(\n\t\t\t\t\t\t\"static/images/edit.jpg\", \"Edit\"));\n\t\t\t\teditImage.addAttribute(\"style\", \"width: 10%\");\n\t\t\t\teditImage.addAttribute(\"onClick\", \"javascript:edit('\" + count\n\t\t\t\t\t\t+ \"','\"\n\t\t\t\t\t\t+ validateDisplayField(asset.getWorkCenterCode())\n\t\t\t\t\t\t+ \"','\" + asset.getFacility() + \"','\"\n\t\t\t\t\t\t+ validateDisplayField(asset.getDescription()) + \"','\"\n\t\t\t\t\t\t+ asset.getAssetNumber() + \"','\" + asset.getStatus()\n\t\t\t\t\t\t+ \"');\");\n\t\t\t\teditImage.addAttribute(\"style\", \"cursor: pointer;\");\n\n\t\t\t\trow.addTableData(facility);\n\t\t\t\trow.addTableData(workCenterCode);\n\t\t\t\trow.addTableData(assetNumber);\n\t\t\t\trow.addTableData(description);\n\t\t\t\trow.addTableData(status);\n\t\t\t\trow.addTableData(editImage);\n\n\t\t\t\tif (count % 2 == 0) {\n\t\t\t\t\trow.addAttribute(\"class\", \"normalRow\");\n\t\t\t\t} else {\n\t\t\t\t\trow.addAttribute(\"class\", \"alternateRow\");\n\t\t\t\t}\n\t\t\t\ttable.addTableRow(row);\n\t\t\t\tcount++;\n\n\t\t\t}\n\t\t}\n\n\t\treturn table;\n\t}", "private static void tableObjAutofit() {\n\t\ttableObj.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);\r\n\t\tfor (int column = 0; column < tableObj.getColumnCount(); column++) {\r\n\t\t\tfinal TableColumn tableObjColumn = tableObj.getColumnModel().getColumn(column);\r\n\r\n\t\t\tint preferredWidth = tableObjColumn.getMinWidth();\r\n\t\t\tfinal int maxWidth = tableObjColumn.getMaxWidth();\r\n\r\n\t\t\tfor (int row = 0; row < tableObj.getRowCount(); row++) {\r\n\t\t\t\tfinal TableCellRenderer cellRenderer = tableObj.getCellRenderer(row, column);\r\n\t\t\t\tfinal Component c = tableObj.prepareRenderer(cellRenderer, row, column);\r\n\t\t\t\tfinal int width = c.getPreferredSize().width + tableObj.getIntercellSpacing().width;\r\n\t\t\t\tpreferredWidth = Math.max(preferredWidth, width);\r\n\r\n\t\t\t\t// We've exceeded the maximum width, no need to check other rows\r\n\t\t\t\tif (preferredWidth >= maxWidth) {\r\n\t\t\t\t\tpreferredWidth = maxWidth;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ttableObjColumn.setPreferredWidth(preferredWidth);\r\n\t\t}\r\n\t}", "Body getBody();", "public void printTable() {\r\n \tif (table.size() == 0)\r\n Logger.error(\"Table \" + table.getType() + \" is empty!\");\r\n else {\r\n table.forEachRow(new EachRowListenerPrint());\r\n }\r\n }", "TableRow componentBTableRow(){\n\n TableRow componentBTableRow = new TableRow(this.context);\n int headerFieldCount = this.headerObjects.size();\n\n TableRow.LayoutParams params = new TableRow.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.MATCH_PARENT);\n// params.setMargins(-1, 0, 0, 0);\n\n for(int x=0; x<(headerFieldCount-1); x++){\n View view = headerObjects.get(x+1);\n\n componentBTableRow.addView(view, params);\n }\n\n\n return componentBTableRow;\n }", "public static void displayTableTitle()\r\n {\n }", "public Complementos() {\n initComponents();\n String cabecera []={\"Producto\",\"Precio\"};\nString datos[][]={};\nboolean t=true;\nboolean f=false;\nmodelo = new Tablachida(datos,cabecera);\ntabla.setModel(modelo);\nTableColumnModel columnModel = tabla.getColumnModel();\ncolumnModel.getColumn(0).setPreferredWidth(250);\ntabla.setRowHeight(40);\n\n }", "SmilBody getBody();", "private EstabelecimentoTable() {\n\t\t\t}", "private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }", "private void createTable(int columns, int rows, String[] column_name,\n\t\t\tObject[] row_data) {\n\t\ttblStationary = new Table(canvas2, SWT.MULTI | SWT.BORDER\n\t\t\t\t| SWT.FULL_SELECTION);\n\t\ttblStationary.setLinesVisible(true);\n\t\ttblStationary.setHeaderVisible(true);\n\n\t\tfor (int i = 0; i < columns; i++) {\n\t\t\tcolumn = new TableColumn(tblStationary, SWT.NONE);\n\n\t\t\tif (i == 0) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(50);\n\t\t\t} else if (i == 1) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(230);\n\t\t\t} else {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(100);\n\t\t\t}\n\t\t}\n\n\t\teditor1 = new TableEditor[rows];\n\t\ttxtTopay = new Text[rows];\n\n\t\teditor2 = new TableEditor[rows];\n\t\ttxtPaid = new Text[rows];\n\n\t\teditor3 = new TableEditor[rows];\n\t\ttxtBilling = new Text[rows];\n\n\t\teditor4 = new TableEditor[rows];\n\t\ttxtCr = new Text[rows];\n\n\t\t// Drawing initial table items\n\t\tfor (int rowId = 0; rowId < rows; rowId++) {\n\n\t\t\titem = new TableItem(tblStationary, SWT.NONE);\n\n\t\t\titem.setText(0, Integer.toString((rowId + 1)));\n\n\t\t\t// First Column station\n\t\t\titem.setText(1, (((StationsDTO) (row_data[rowId])).getName()\n\t\t\t\t\t+ \" - \" + ((StationsDTO) row_data[rowId]).getId()));\n\n\t\t\t// Draw Text Field\n\t\t\teditor1[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtTopay[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtTopay[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor1[rowId].grabHorizontal = true;\n\t\t\teditor1[rowId].setEditor(txtTopay[rowId], item, 2);\n\n\t\t\t// Draw Text Field\n\t\t\teditor2[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtPaid[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtPaid[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor2[rowId].grabHorizontal = true;\n\t\t\teditor2[rowId].setEditor(txtPaid[rowId], item, 3);\n\n\t\t\t// Draw Text Field\n\t\t\teditor3[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtBilling[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtBilling[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor3[rowId].grabHorizontal = true;\n\t\t\teditor3[rowId].setEditor(txtBilling[rowId], item, 4);\n\n\t\t\t// Draw Text Field\n\t\t\teditor4[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtCr[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtCr[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor4[rowId].grabHorizontal = true;\n\t\t\teditor4[rowId].setEditor(txtCr[rowId], item, 5);\n\n\t\t}\n\t\ttblStationary.setBounds(32, 43, 750, 380);\n\n\t}", "private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }", "public Table buildNewAssetTable(ManufacturingOrder dto) {\n\n\t\tTable table = new Table();\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 500px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\tTableRow row = new TableRow();\n\n\t\tInputField assetNumberText = new InputField(\"assetNumber\", \"\",\n\t\t\t\tInputType.TEXT);\n\t\tassetNumberText.addAttribute(\"maxlength\", \"6\");\n\t\tassetNumberText.addAttribute(\"size\", \"10\");\n\t\tTableData asset = null;\n\t\tif (dto.getEditFlag()) {\n\t\t\tasset = new TableData(new SimpleText(dto.getAssetNumber()));\n\t\t\tasset.addAttribute(\"style\", \"width: 10% ; vertical-align: middle\");\n\n\t\t} else {\n\t\t\tasset = new TableData(assetNumberText);\n\t\t\tasset.addAttribute(\"style\", \"width: 30%\");\n\t\t}\n\t\tString desc = \"\";\n\n\t\tif (dto.getEditFlag()) {\n\t\t\tdesc = dto.getDescription();\n\t\t}\n\n\t\tInputField description = new InputField(\"descrip\", desc, InputType.TEXT);\n\t\tdescription.addAttribute(\"maxlength\", \"100\");\n\t\tdescription.addAttribute(\"size\", \"30\");\n\t\tTableData descriptionText = new TableData(description);\n\t\tdescriptionText.addAttribute(\"style\", \"width: 40%\");\n\n\t\tTableData status = null;\n\t\tif (dto.getEditFlag()) {\n\n\t\t\tif (dto.getStatus() == null || !(\"A\".equals(dto.getStatus()))) {\n\n\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chk\\\" value=\\\"A\\\"/>\"));\n\t\t\t} else {\n\t\t\t\tstatus = new TableData(\n\t\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chk\\\" value=\\\"A\\\" checked=\\\"checked\\\"/>\"));\n\t\t\t}\n\n\t\t\tTableData facility = new TableData(new SimpleText(dto\n\t\t\t\t\t.getSelectedFacility()));\n\t\t\tfacility.addAttribute(\"style\",\n\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\n\t\t\tTableData workCenter = new TableData(new SimpleText(dto\n\t\t\t\t\t.getWorkCenterCode()));\n\t\t\tworkCenter.addAttribute(\"style\",\n\t\t\t\t\t\"width: 10% ; vertical-align: middle\");\n\t\t\trow.addTableData(facility);\n\t\t\trow.addTableData(workCenter);\n\t\t\tstatus.addAttribute(\"style\", \"width: 10%\");\n\t\t\tdescriptionText.addAttribute(\"style\", \"width: 30%\");\n\n\t\t} else {\n\t\t\tstatus = new TableData(\n\t\t\t\t\tnew SimpleText(\n\t\t\t\t\t\t\t\"<input type=\\\"checkbox\\\" name=\\\"statusFlag_Chk\\\" value=\\\"A\\\" checked=\\\"checked\\\"/>\"));\n\t\t\tstatus.addAttribute(\"style\", \"width: 20%\");\n\t\t}\n\t\trow.addTableData(asset);\n\t\trow.addTableData(descriptionText);\n\t\trow.addTableData(status);\n\n\t\trow.addAttribute(\"class\", \"normalRow\");\n\n\t\ttable.addTableRow(row);\n\n\t\treturn table;\n\t}", "public int getCellBody() {\n\t\treturn cellBody;\n\t}", "Table getTable();", "private void initDOM() {\n for (int rowIndex = 0; rowIndex < minefield.getRows(); rowIndex++) {\n Element tr = new Element(\"tr\");\n table.appendChild(tr);\n for (int colIndex = 0; colIndex < minefield.getCols(); colIndex++) {\n Element td = new Element(\"td\");\n\n final int thisRow = rowIndex;\n final int thisCol = colIndex;\n\n // Left click reveals cells\n td.addEventListener(\"click\", e -> cellClick(thisRow, thisCol));\n\n // Right-click/ctrl-click marks a mine\n // Here we abuse the event details feature which runs javascript\n // as part of the event handler, to prevent the default\n // behavior, i.e. showing the browser context menu\n td.addEventListener(\"contextmenu\",\n e -> markMine(thisRow, thisCol),\n \"event.preventDefault()\");\n tr.appendChild(td);\n }\n }\n }", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "private void addViewBody() {\n\t\tJButton medicosButton = new JButton(\"Médicos\");\n\t\tmedicosButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new MedicosView());\n\t\t});\n\t\tthis.add(medicosButton);\n\n\t\tJButton clientesButton = new JButton(\"Clientes\");\n\t\tclientesButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new ClientesView());\n\t\t});\n\t\tthis.add(clientesButton);\n\n\t\tJButton novaConsultaButton = new JButton(\"Nova Consulta\");\n\t\tnovaConsultaButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new CadastroConsultaView());\n\t\t});\n\t\tthis.add(novaConsultaButton);\n\n\t\tJButton novoTesteButton = new JButton(\"Novo Teste [EM BREVE]\");\n\t\tnovoTesteButton.setEnabled(false);\n\t\tthis.add(novoTesteButton);\n\t}", "private String renderBody() {\n return \"\";\n }", "public String getBodySql(String table)\r\n \t{\r\n \t\treturn \"select BODY from \" + table + \" where ( RESOURCE_ID = ? )\";\r\n \t}", "@SuppressWarnings(\"serial\")\n\tprivate void tableFiller(Container container,Table table)\n\t{\n\t\ttable.setWidth(\"100%\");\n\t\ttable.setHeight(\"100%\");\n\t\t\n\t\ttable.setColumnWidth(\"Description\", 140);\n\t\ttable.setColumnWidth(\"View\", 60);\n\t\ttable.setColumnWidth(\"Edit\", 60);\n\t\ttable.setColumnWidth(\"Delete\", 65);\n\t\ttable.setPageLength(table.size());\n\t\t \n\t\ttable.setContainerDataSource(container);\n\t\ttable.setConverter(\"Start Date\", new StringToDateConverter()\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic DateFormat getFormat(Locale locale)\n\t\t\t{\n\t\t\t\treturn new SimpleDateFormat(\"d/M/y\");\n\t\t\t}\n\t\t\t\n\t\t});\n\t\ttable.setConverter(\"End Date\", new StringToDateConverter()\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic DateFormat getFormat(Locale locale)\n\t\t\t{\n\t\t\t\treturn new SimpleDateFormat(\"d/M/y\");\n\t\t\t}\n\t\t\t\n\t\t});\n\t\ttable.setConverter(\"Deadline\", new StringToDateConverter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic DateFormat getFormat(Locale locale)\n\t\t\t{\n\t\t\t\t\n\t\t\t\treturn new SimpleDateFormat(\"d/M/y\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "@Override\n\tpublic void writeBodyResultSet(ResultSet rs) throws ParseException {\n\t\tHSSFRow rw ;\n\t\tHSSFCell cl;\n\t\tint j = 1;\n\t\ttry {\t\t\t\n\t\t\tResultSetMetaData rmdt = rs.getMetaData();\n\t\t\t//System.out.println(\"A quantidade de colunas �: \" + rmdt.getColumnCount());\n\t\t\trs.first();\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\trw = sheet.createRow(j);\n\t\t\t\t\n\t\t\t\tfor(int i = 1; i<= rmdt.getColumnCount();i++ ) {\n\t\t\t\t\tcl = rw.createCell(i-1);\n\t\t\t\t\tif(rs.getObject(i) != null) {\n\t\t\t\t\t\twriteCellContent(cl,rs.getObject(i).getClass().toString(),rs.getObject(i).toString());\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tcl.setCellStyle(cstyle.BodyStyle());\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "public static ContenidoHTML tabla(Iterable<String[]> datos) {\n if (datos == null)\n throw new IllegalArgumentException(\"No se permiten parámetros null.\");\n EtiquetaEmparejada tabla = UtilHTML.tabla();\n Iterator<String[]> iteradorDatos = datos.iterator();\n // Si el iterador no tiene elementos termina.\n if (!iteradorDatos.hasNext())\n return tabla;\n // Agrega los encabezados a la tabla.\n String[] encabezados = iteradorDatos.next();\n EtiquetaEmparejada filaEncabezados = UtilHTML.filaTabla();\n for (int i = 0; i < encabezados.length; i++) {\n EtiquetaEmparejada encabezado = UtilHTML.encabezadoTabla();\n encabezado.agregarContenido(UtilHTML.textoPlano(encabezados[i]));\n filaEncabezados.agregarContenido(encabezado);\n }\n tabla.agregarContenido(filaEncabezados);\n // agrega los demás datos a la tabla\n while (iteradorDatos.hasNext()) {\n String[] filaDatos = iteradorDatos.next();\n EtiquetaEmparejada fila = UtilHTML.filaTabla();\n for (int i = 0; i < filaDatos.length; i++) {\n EtiquetaEmparejada entrada = UtilHTML.entradaTabla();\n entrada.agregarContenido(UtilHTML.textoPlano(filaDatos[i]));\n fila.agregarContenido(entrada);\n }\n tabla.agregarContenido(fila);\n }\n return tabla;\n }", "public void fill_table()\n {\n Secante secante = new Secante(GraficaSecanteController.a, GraficaSecanteController.b, GraficaSecanteController.ep, FuncionController.e);\n list = secante.algoritmo();\n }", "public AllTablesHaveColumnsRule() {\n super();\n\n this.countOp = this.addProperty(new ChoiceProperty<>(\n \"count_op\",\n ComparisonOperator.class, ComparisonOperator.GTE, ComparisonOperator.getChoices(),\n \"Počet sloupců\", \"Operátor pro ověření počtu řádků v tabulkách\", this.getGenericLabel()\n ));\n this.count = this.addProperty(new Property<>(\n \"count\",\n Integer.class, 1,\n \"...\", \"Všechny tabulky v databázi musí obsahovat zadaný počet sloupců\", this.getGenericLabel()\n ));\n\n this.columnType = this.addProperty(new ChoiceProperty<>(\n \"column_type\",\n ColumnType.class, ColumnType._ANY, ColumnType.getChoices(),\n \"Typ sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnName = this.addProperty(new Property<>(\n \"column_name\",\n String.class, \"\",\n \"Název sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnIsPrimary = this.addProperty(new ChoiceProperty<>(\n \"column_primary\",\n YesNoType.class, YesNoType._ANY, YesNoType.getChoices(),\n \"Primární klíč\", \"Ověří, zda je sloupec součástí primárního klíče\", this.getGenericLabel()\n ));\n }", "public void initTable() {\n this.table.setSelectable(true);\n this.table.setImmediate(true);\n this.table.setWidth(\"100%\");\n this.table.addListener(this);\n this.table.setDropHandler(this);\n this.table.addActionHandler(this);\n this.table.setDragMode(TableDragMode.ROW);\n this.table.setSizeFull();\n\n this.table.setColumnCollapsingAllowed(true);\n // table.setColumnReorderingAllowed(true);\n\n // BReiten definieren\n this.table.setColumnExpandRatio(LABEL_ICON, 1);\n this.table.setColumnExpandRatio(LABEL_DATEINAME, 3);\n this.table.setColumnExpandRatio(LABEL_DATUM, 2);\n this.table.setColumnExpandRatio(LABEL_GROESSE, 1);\n this.table.setColumnExpandRatio(LABEL_ACCESS_MODES, 1);\n this.table.setColumnHeader(LABEL_ICON, \"\");\n }", "private Table getHeaderForAssetDetailTable() {\n\n\t\tTableHeaderData facilityHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Facility\"));\n\t\tfacilityHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\tTableHeaderData workCenterHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Work Center\"));\n\t\tworkCenterHeaderData.addAttribute(\"style\", \"width: 15%\");\n\n\t\tTableHeaderData assetNumberHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Asset\"));\n\t\tassetNumberHeaderData.addAttribute(\"style\", \"width: 20%\");\n\n\t\tTableHeaderData descriptionHeaderData = new TableHeaderData(\n\t\t\t\tnew SimpleText(\"Description\"));\n\t\tdescriptionHeaderData.addAttribute(\"style\", \"width: 35%\");\n\n\t\tTableHeaderData statusHeaderData = new TableHeaderData(new SimpleText(\n\t\t\t\t\"Active\"));\n\t\tstatusHeaderData.addAttribute(\"style\", \"width: 10%\");\n\n\t\tTableHeaderData editHeaderData = new TableHeaderData(new SimpleText(\n\t\t\t\t\"Edit\"));\n\t\teditHeaderData.addAttribute(\"style\", \"width: 16%\");\n\n\t\tArrayList<TableHeaderData> headers = new ArrayList<TableHeaderData>();\n\t\theaders.add(facilityHeaderData);\n\t\theaders.add(workCenterHeaderData);\n\t\theaders.add(assetNumberHeaderData);\n\t\theaders.add(descriptionHeaderData);\n\t\theaders.add(statusHeaderData);\n\t\theaders.add(editHeaderData);\n\n\t\tTableHeader tableHeader = new TableHeader(headers);\n\t\ttableHeader.addAttribute(\"style\", \"text-align: center;\");\n\t\tTable table = new Table();\n\t\ttable.setTableHeader(tableHeader);\n\t\ttable.addAttribute(\"id\", \"normalTableNostripe\");\n\t\ttable.addAttribute(\"align\", \"center\");\n\t\ttable.addAttribute(\"cellSpacing\", \"0\");\n\t\ttable.addAttribute(\"cellPadding\", \"0\");\n\t\ttable.addAttribute(\"border\", \"1\");\n\t\ttable.addAttribute(\"class\", \"classContentTable\");\n\t\ttable.addAttribute(\"style\",\n\t\t\t\t\"white-space: nowrap; word-spacing: normal; width: 610px\");\n\t\ttable.addTableHeaderAttribute(\"class\", \"fixedHeader\");\n\t\ttable.addTableBodyAttribute(\"class\", \"scrollContent\");\n\n\t\treturn table;\n\n\t}", "Table createTable();", "private void setPOSHeadersToTable() {\r\n\t\tthis.selectedRow = -1;\r\n\t\tif(FileData.getFileModel(FileType.POS) != null) {\r\n\t\t\tColumnData.setPOSHeadersToTableData(FileData.getFileModel(FileType.POS).getFileContents().getHeaderNames());\r\n\t\t}else {\r\n\t\t\tColumnData.getTableData().setRowCount(0);\r\n\t\t}\r\n\t}", "private void setUpTable()\n {\n //Setting the outlook of the table\n bookTable.setColumnReorderingAllowed(true);\n bookTable.setColumnCollapsingAllowed(true);\n \n \n bookTable.setContainerDataSource(allBooksBean);\n \n \n //Setting up the table data row and column\n /*bookTable.addContainerProperty(\"id\", Integer.class, null);\n bookTable.addContainerProperty(\"book name\",String.class, null);\n bookTable.addContainerProperty(\"author name\", String.class, null);\n bookTable.addContainerProperty(\"description\", String.class, null);\n bookTable.addContainerProperty(\"book genres\", String.class, null);\n */\n //The initial values in the table \n db.connectDB();\n try{\n allBooks = db.getAllBooks();\n }catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n db.closeDB();\n allBooksBean.addAll(allBooks);\n \n //Set Visible columns (show certain columnes)\n bookTable.setVisibleColumns(new Object[]{\"id\",\"bookName\", \"authorName\", \"description\" ,\"bookGenreString\"});\n \n //Set height and width\n bookTable.setHeight(\"370px\");\n bookTable.setWidth(\"1000px\");\n \n //Allow the data in the table to be selected\n bookTable.setSelectable(true);\n \n //Save the selected row by saving the change Immediately\n bookTable.setImmediate(true);\n //Set the table on listener for value change\n bookTable.addValueChangeListener(new Property.ValueChangeListener()\n {\n public void valueChange(ValueChangeEvent event) {\n \n }\n\n });\n }", "public void defineBody()\n {\n if(B2body != null){\n PlayScreen.world.destroyBody(B2body);}\n\n BodyDef bdef = new BodyDef();\n bdef.type = BodyDef.BodyType.KinematicBody;\n B2body = PlayScreen.world.createBody(bdef);\n\n\n calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());\n }", "public String build() {\n Assert.notNull(headers, \"The table header can not be null.\");\n Assert.notNull(content, \"The table content can not be null.\");\n\n StringBuilder stringBuilder = new StringBuilder();\n\n int rowHeight = rowPadding > 0 ? rowPadding : 1;\n Map<Integer, Integer> columnMaxWidthMapping = getMaximumWidthOfTable(headers, content);\n\n stringBuilder.append(newLineCharacter);\n stringBuilder.append(newLineCharacter);\n createRowLine(stringBuilder, headers.size(), columnMaxWidthMapping);\n stringBuilder.append(newLineCharacter);\n\n for (int headerIndex = 0; headerIndex < headers.size(); headerIndex++) {\n fillCell(stringBuilder, headers.get(headerIndex), headerIndex, columnMaxWidthMapping);\n }\n\n stringBuilder.append(newLineCharacter);\n createRowLine(stringBuilder, headers.size(), columnMaxWidthMapping);\n\n for (List<String> row : content) {\n for (int i = 0; i < rowHeight; i++) {\n stringBuilder.append(newLineCharacter);\n }\n\n for (int cellIndex = 0; cellIndex < row.size(); cellIndex++) {\n fillCell(stringBuilder, row.get(cellIndex), cellIndex, columnMaxWidthMapping);\n }\n\n }\n\n stringBuilder.append(newLineCharacter);\n createRowLine(stringBuilder, headers.size(), columnMaxWidthMapping);\n stringBuilder.append(newLineCharacter);\n stringBuilder.append(newLineCharacter);\n\n return stringBuilder.toString();\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 displayTable() {\n System.out.print(\"\\nSpreadsheet Table Details :\\nRows : \" + rowHeaders + \"\\nColumns:\" + colHeaders);\n new SheetParser(tableData).displaySheet();\n }", "private void initBackGround() {\n Entity walls = Entities.makeScreenBounds(100);\n walls.setType(PinballTypes.WALL);\n walls.addComponent(new CollidableComponent(true));\n getGameWorld().addEntity(walls);\n\n Entities.builder()\n .viewFromTexture(\"piñi.jpg\")\n .buildAndAttach();\n\n// adds bottom part of table, shared with all tables\n// getGameWorld().addEntity(factory.bottomLeft());\n// getGameWorld().addEntity(factory.bottomRight());\n }", "private void buildElements() {\n JPanel mainPanel = new JPanel(new BorderLayout());\n\n String[] columnNames = {\n \"Id\",\n \"Number of transaction\",\n \"Transaction price\",\n \"Paid type\",\n \"Buyer\",\n \"Amazon SKU\",\n \"Action\",\n };\n\n Object[][] emptyData = {};\n\n providerTableModel = new DefaultTableModel(emptyData, columnNames);\n\n providerTable = new JTable(providerTableModel) {\n public TableCellRenderer getCellRenderer(int row, int column) {\n return new ProviderTableCellRenderer();\n }\n };\n\n providerTable.addMouseListener(new ProviderTableMouseListener());\n\n providerTable.getTableHeader().setReorderingAllowed(false);\n\n /*providerTable.getColumnModel().getColumn(6).setMinWidth(100);\n providerTable.getColumnModel().getColumn(6).setMaxWidth(100);\n providerTable.getColumnModel().getColumn(6).setPreferredWidth(100);*/\n\n // Set rows height for providerTable (for all rows).\n providerTable.setRowHeight(40);\n\n // Set 'Actions' column width. All buttons normally see.\n //TableColumnModel columnModel = providerTable.getColumnModel();\n //columnModel.getColumn(5).setPreferredWidth(120);\n\n JScrollPane tableScrollPane = new JScrollPane(providerTable);\n\n mainPanel.add(tableScrollPane, BorderLayout.CENTER);\n\n this.add(mainPanel);\n }", "public void setBody(Body body) {\n this.body = body;\n }", "@Override\n\tprotected void initArrayBody() {\n\t\tthis.arrayBody.add(\"div[id=CmAdContent]\");\n\t\tthis.arrayBody.add(\"td[id=articleBody] > div[id=CmAdContent]\");\n\t\tthis.arrayBody.add(\"html\");\n\t}", "void setBody (DBody body);", "public void setCellBody(int cellBody) {\n\t\tthis.cellBody = cellBody;\n\t}", "private void addHeaders(){\n\n /** Create a TableRow dynamically **/\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n TextView item = new TextView(this);\n item.setText(\"Recipe\");\n item.setWidth(320);\n item.setBackgroundColor(getResources().getColor(R.color.colorPrimary));\n item.setTextColor(Color.WHITE);\n item.setTypeface(Typeface.DEFAULT, Typeface.BOLD);\n item.setPadding(5, 5, 5, 0);\n tr.addView(item); // Adding textView to tablerow.\n\n\n // Add the TableRow to the TableLayout\n tl.addView(tr, new TableLayout.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n\n }" ]
[ "0.6887031", "0.6854006", "0.6358507", "0.60561824", "0.59842557", "0.5940625", "0.5760206", "0.57063663", "0.5677545", "0.56514937", "0.56220454", "0.561165", "0.56058943", "0.55497193", "0.5542085", "0.55169874", "0.5509294", "0.54999024", "0.54571474", "0.5453296", "0.5391363", "0.53550625", "0.5349849", "0.53342515", "0.5332966", "0.5325082", "0.53050077", "0.53014964", "0.5300678", "0.5281696", "0.5265988", "0.52654505", "0.5254613", "0.5250374", "0.5249763", "0.5247774", "0.5234361", "0.52337164", "0.52283454", "0.52198607", "0.5201891", "0.519688", "0.5178132", "0.5174592", "0.5172119", "0.51674706", "0.5165622", "0.51583", "0.51538646", "0.51525164", "0.5149599", "0.51465315", "0.5133008", "0.513277", "0.51310956", "0.51309866", "0.51303875", "0.51294106", "0.5124311", "0.5118908", "0.51181316", "0.5114237", "0.5111351", "0.5101122", "0.50830895", "0.50789905", "0.50695646", "0.506955", "0.5067367", "0.50666267", "0.5052394", "0.5050831", "0.50482875", "0.5047684", "0.5031677", "0.50308025", "0.5023229", "0.50147647", "0.5009287", "0.5005219", "0.50049233", "0.5003503", "0.49995336", "0.49957713", "0.49914226", "0.49817732", "0.49780166", "0.49743596", "0.49735177", "0.49728632", "0.49609524", "0.4958374", "0.49554187", "0.4954466", "0.49527824", "0.49509436", "0.49410295", "0.49391675", "0.4938489", "0.4928878" ]
0.55562836
13
/ 3.SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.BusinessBlackSteelSkin"); 8.SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.CremeSkin "); 13.SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.MagmaSkin"); 15.SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.MistAquaSkin"); 21.SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.OfficeSilver2007Skin"); JFrame.setDefaultLookAndFeelDecorated(true); SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.MagmaSkin");
public void Skin() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupLookAndFeel() {\n SwingUtilities.invokeLater(() -> {\n model.getUserPreferences().getThemeSubject().subscribe((skin) -> {\n try {\n UIManager.setLookAndFeel(new SubstanceLookAndFeel(\n (SubstanceSkin) skin.getTheme().newInstance()\n ) {\n });\n if (frame != null) {\n frame.repaint();\n }\n } catch (UnsupportedLookAndFeelException | InstantiationException | IllegalAccessException e) {\n ExceptionHandler.get().handle(e);\n }\n });\n });\n }", "public void lookandfeel(){\n \n try{\n UIManager.setLookAndFeel(seta_look);\n SwingUtilities.updateComponentTreeUI(this);\n }\n catch(Exception erro){\n JOptionPane.showMessageDialog(null, erro);\n \n }\n}", "private void LookAndFeel() {\n try {\n // Set System L&F\n BasicLookAndFeel darcula = new DarculaLaf();\n UIManager.setLookAndFeel(darcula);\n } catch (UnsupportedLookAndFeelException e) {\n // handle exception\n }\n }", "private static void initLookAndFeel()\n {\n try \n {\n UIManager.setLookAndFeel(\"de.javasoft.plaf.synthetica.SyntheticaAluOxideLookAndFeel\");\n }\n \n catch(ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e)\n {\n JOptionPane.showMessageDialog(null, \"Failed to load resource package\");\n }\n }", "public static void setLookAndFeel(){\n\t\t\n\t\tUIManager.put(\"nimbusBase\", new Color(0,68,102));\n\t\tUIManager.put(\"nimbusBlueGrey\", new Color(60,145,144));\n\t\tUIManager.put(\"control\", new Color(43,82,102));\n\t\tUIManager.put(\"text\", new Color(255,255,255));\n\t\tUIManager.put(\"Table.alternateRowColor\", new Color(0,68,102));\n\t\tUIManager.put(\"TextField.font\", new Font(\"Font\", Font.BOLD, 12));\n\t\tUIManager.put(\"TextField.textForeground\", new Color(0,0,0));\n\t\tUIManager.put(\"PasswordField.foreground\", new Color(0,0,0));\n\t\tUIManager.put(\"TextArea.foreground\", new Color(0,0,0));\n\t\tUIManager.put(\"FormattedTextField.foreground\", new Color(0,0,0));\n\t\t\n\t\tUIManager.put(\"ComboBox:\\\"ComboBox.listRenderer\\\".background\", new Color(0,68,102));\n\t\tUIManager.put(\"ComboBox:\\\"ComboBox.listRenderer\\\"[Selected].background\", new Color(0,0,0));\n\t\t\n\t\t//TODO nie chca dzialac tooltipy na mapie\n\t\tBorder border = BorderFactory.createLineBorder(new Color(0,0,0)); //#4c4f53\n\t\tUIManager.put(\"ToolTip.border\", border);\n\n\t\t//UIManager.put(\"ToolTip.foregroundInactive\", new Color(0,0,0));\n\t\t//UIManager.put(\"ToolTip.backgroundInactive\", new Color(0,0,0));\n\t\t//UIManager.put(\"ToolTip.background\", new Color(0,0,0)); //#fff7c8\n\t\t//UIManager.put(\"ToolTip.foreground\", new Color(0,0,0));\n\t\t Painter<Component> p = new Painter<Component>() {\n\t\t public void paint(Graphics2D g, Component c, int width, int height) {\n\t\t g.setColor(new Color(20,36,122));\n\t\t //and so forth\n\t\t }\n\t\t };\n\t\t \n\t\tUIManager.put(\"ToolTip[Enabled].backgroundPainter\", p);\n\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foregroundInactive\", new Color(255, 255, 255));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"backgroundInactive\", new Color(255, 255, 255));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.background\", new Color(255, 255, 255)); //#fff7c8\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foreground\", new Color(255, 255, 255));\n//\t\t\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foregroundInactive\",new ColorUIResource(new Color(255, 255, 255)));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"backgroundInactive\", new ColorUIResource((new Color(255, 255, 255))));\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.background\", new ColorUIResource(new Color(255, 255, 255))); //#fff7c8\n//\t\tUIManager.getLookAndFeelDefaults().put(\"ToolTip.foreground\", new ColorUIResource(new Color(255, 255, 255)));\n\t\t\n\t \n\t\ttry {\n\t\t for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n\t\t if (\"Nimbus\".equals(info.getName())) {\n\t\t UIManager.setLookAndFeel(info.getClassName());\n\t\t break;\n\t\t }\n\t\t }\n\t\t} catch (Exception e) {\n\t\t // If Nimbus is not available, you can set the GUI to another look and feel.\n\t\t}\n\n\t\tUIManager.getLookAndFeelDefaults().put(\"Table:\\\"Table.cellRenderer\\\".background\", new ColorUIResource(new Color(74,144,178)));\n\t\tUIManager.getLookAndFeelDefaults().put(\"Table.background\", new ColorUIResource(new Color(74,144,178)));\n\t\t\n\n\t}", "private static void setLook() {\r\n try {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n } catch (IllegalAccessException ex) {\r\n ex.printStackTrace();\r\n } catch (UnsupportedLookAndFeelException ex) {\r\n ex.printStackTrace();\r\n } catch (ClassNotFoundException ex) {\r\n ex.printStackTrace();\r\n } catch (InstantiationException ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "public static void LookAndFeel() {\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); // uniformed\n\t\t} catch (Exception exc) {\n\t\t}\n\t}", "public static void main(String[] args) {\n JFrame.setDefaultLookAndFeelDecorated(true);\n SwingUtilities.invokeLater(() -> {\n SubstanceCortex.GlobalScope.setSkin(new ModerateSkin());\n new CheckWatermarks().setVisible(true);\n });\n }", "public void applyLookAndFeel() {\n\r\n\t\tLookAndFeelInfo[] infos = UIManager.getInstalledLookAndFeels();\r\n\r\n\t\tif (look < 0) {\r\n\t\t\tfor (int i = 0; i < infos.length; i++) {\r\n\t\t\t\tif (infos[i].getName().toUpperCase().contains(\"NIMBUS\")) {\r\n\t\t\t\t\tlook = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (look < 0) {\r\n\t\t\tfor (int i = 0; i < infos.length; i++) {\r\n\t\t\t\tif (infos[i].getName().toUpperCase().contains(\"WINDOW\")) {\r\n\t\t\t\t\tlook = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlook = (Math.abs(look) % infos.length);\r\n\r\n\t\tString lookName = infos[look].getName();\r\n\r\n\t\ttry {\r\n \t\tUIManager.setLookAndFeel(infos[look].getClassName());\r\n \t\tsetTitle(JMTKResizer.ABOUT + \" - \" + lookName);\r\n \tSwingUtilities.updateComponentTreeUI(this);\r\n \t\t//pack();\r\n\r\n \t} catch (Exception e) {\r\n \t\te.printStackTrace();\r\n \t}\r\n\t}", "private static void setLookAndFeel() { \r\n try {\r\n UIManager.setLookAndFeel(\"javax.swing.plaf.metal.MetalLookAndFeel\"); \r\n } catch (final UnsupportedLookAndFeelException e) {\r\n System.out.println(\"UnsupportedLookAndFeelException\");\r\n } catch (final ClassNotFoundException e) {\r\n System.out.println(\"ClassNotFoundException\");\r\n } catch (final InstantiationException e) {\r\n System.out.println(\"InstantiationException\");\r\n } catch (final IllegalAccessException e) {\r\n System.out.println(\"IllegalAccessException\");\r\n } \r\n }", "private void configuraInterface() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\t\ttry\t{\n\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tSystem.out.println(\"Falhou o carregamento do L&F: \");\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}", "private static void setLookAndFeel() {\n\tSystem.setProperty(\"apple.laf.useScreenMenuBar\", \"true\");\n\n\ttry {\n\t UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\n\t //copy progress bar of System LAF\n\t HashMap<Object, Object> progressDefaults = new HashMap<Object, Object>();\n\t for (Map.Entry<Object, Object> entry : UIManager.getDefaults()\n\t\t .entrySet()) {\n\t\tif (entry.getKey().getClass() == String.class\n\t\t\t&& ((String) entry.getKey()).startsWith(\"ProgressBar\")) {\n\t\t progressDefaults.put(entry.getKey(), entry.getValue());\n\t\t}\n\t }\n\n\t prepareLayout();\n\n\t UIManager\n\t\t .setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\n\t // copy back progress bar of metal Look and Feel\n\t for (Map.Entry<Object, Object> entry : progressDefaults.entrySet()) {\n\t\tUIManager.getDefaults().put(entry.getKey(), entry.getValue());\n\t }\n\t} catch (ClassNotFoundException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (InstantiationException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (IllegalAccessException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (UnsupportedLookAndFeelException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t}\n\n }", "public static void windowLookAndFeel(){\r\n\t try{\r\n\t UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t }catch (Exception e) {\r\n\t System.out.println(\"Look and Feel error: \" + e);\r\n\t }\r\n\t}", "public static void main(String[] args) {\r\n SageLife sagelife = new SageLife();\r\n\r\n try {\r\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\r\n if (\"Nimbus\".equals(info.getName())) {\r\n UIManager.setLookAndFeel(info.getClassName());\r\n break;\r\n }\r\n }\r\n } catch (Exception e) {\r\n // If Nimbus is not available, you can set the GUI to another look and feel.\r\n }\r\n\r\n sagelife.createLayout();\r\n }", "private void nativeLookAndFeel() {\n\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (UnsupportedLookAndFeelException | ClassNotFoundException | InstantiationException | IllegalAccessException e) {\n e.printStackTrace();\n }\n }", "public JFind2() {\n try {\n String metal = \"javax.swing.plaf.metal.MetalLookAndFeel\";\n String synth = \"javax.swing.plaf.synth.SynthLookAndFeel\"; // --> since JDK-1.5\n\n String gtk = \"com.sun.java.swing.plaf.gtk.GTKLookAndFeel\"; // -> since JDK-1.4\n\n String motif = \"com.sun.java.swing.plaf.motif.MotifLookAndFeel\";\n String windows = \"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\";\n\n String os = System.getProperty(\"os.name\");\n if (os.startsWith(\"Linux\")) {\n try // Install client system look and feel.\n {\n UIManager.setLookAndFeel(metal);\n } catch (Exception e) {\n }\n } else {\n try // Install client system look and feel.\n {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n }\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n preInit();\n initComponents();\n postInit();\n\n }", "@Test\n\tpublic void changeSkinTest() throws IllegalArgumentException, IllegalAccessException {\tConfiguration.featureamp=true;\n//\t\tConfiguration.playengine=true;\n//\t\tConfiguration.choosefile=true;\n//\t\t\n//\t\tConfiguration.gui=true;\n//\t\tConfiguration.skins=true;\n//\t\tConfiguration.dark=true;\n//\t\tConfiguration.light=false;\n//\t\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.dark &&\n\t\t\t\t!Configuration.light\n\t\t\t\t) {\n\t\t\tstart();\n\t\t\tgui.changeSkin();\n\t\t\t\n\t\t\tJFrame frmAsd = (JFrame) MemberModifier.field(Application.class, \"frmAsd\").get(gui);\n\t\t\tassertTrue(frmAsd.getBackground().getRed()==238);\n\t\t\tassertTrue(frmAsd.getBackground().getGreen()==238);\n\t\t\tassertTrue(frmAsd.getBackground().getBlue()==238);\n\t\t}\n\t\t\n\t}", "public void setSkin(Skin skin);", "public examreports() {\n dblogincred();\n initComponents();\n try {\n for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n} catch (Exception e) {\n // If Nimbus is not available, you can set the GUI to another look and feel.\n}\n }", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry {\r\n\t\t\tString className = UIManager.getCrossPlatformLookAndFeelClassName();\r\n\t\t\tUIManager.setLookAndFeel(className);\r\n\t\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\t\r\n\t\t}\r\n\t\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\tGUIMemoryCards vista = new GUIMemoryCards();\r\n\t\t\t\t}\r\n\t\t\t});\t\r\n\t}", "public MainFrame() throws Exception {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n //SynthLookAndFeel laf = new SynthLookAndFeel();\r\n //UIManager.setLookAndFeel(laf);\r\n initComponents();\r\n }", "public final static void setDesign() {\n\t\t\ttry{\n\t\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.out.println(\"Prob with setDesign()\");\n\t\t\t}\n\t\t\t\n\t\t}", "public Mainwindow(){\n \n try \n {\n //LookAndFeel asd = new SyntheticaAluOxideLookAndFeel();\n //UIManager.setLookAndFeel(asd);\n } \n catch (Exception e) \n {\n e.printStackTrace();\n }\n initComponents();\n \n \n userinitComponents();\n \n \n }", "private void setAppearance(String className) {\n DweezilUIManager.setLookAndFeel(className, new Component[]{MainFrame.getInstance(), StatusWindow.getInstance(),\n PrefsSettingsPanel.this.getParent().getParent()});\n\n }", "private void setNativeLAndF() {\r\n\t\ttry {\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (Exception e) {\r\n\t\t\t//do nothing. It will default to normal\r\n\t\t}\r\n\t}", "public static void main(String args[]) {\n try {\n UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n }\n });\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n \n new MainFrame().setVisible(true);\n \n }\n });\n }", "public static void setLookAndFeel() {\n try {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n\n // TODO: Configure theming colors. UIManager.put(property, new Color(...));\n // {@see http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html}\n\n\t\t\tfinal NimbusLookAndFeel laf = new NimbusLookAndFeel();\n UIManager.setLookAndFeel(laf);\n UIDefaults defaults = laf.getDefaults();\n defaults.put(\"List[Selected].textForeground\",\n laf.getDerivedColor(\"nimbusLightBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List[Selected].textBackground\",\n laf.getDerivedColor(\"nimbusSelectionBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List[Disabled+Selected].textBackground\",\n laf.getDerivedColor(\"nimbusSelectionBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List[Disabled].textForeground\",\n laf.getDerivedColor(\"nimbusDisabledText\", 0.0f, 0.0f, 0.0f, 0, false));\n defaults.put(\"List:\\\"List.cellRenderer\\\"[Disabled].background\",\n laf.getDerivedColor(\"nimbusSelectionBackground\", 0.0f, 0.0f, 0.0f, 0, false));\n\n } catch (Exception e) {}\n }", "private LookAndFeelManager() {}", "public void loadSkin()\n {\n if(versionLabel.getUI() instanceof Skinnable)\n ((Skinnable)versionLabel.getUI()).loadSkin();\n }", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (Exception ex) {\r\n\t\t}\r\n\t}", "public SkinTest() {\r\n initComponents();\r\n }", "public PumpkinFrame() {\r\n setLook(\"Pumpkin Maker\",100,100,800,480);\r\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n }", "public static void main(String args[]) {\r\n\t\ttry {\r\n\t\t\tUIManager\r\n\t\t\t\t\t.setLookAndFeel(\"com.seaglasslookandfeel.SeaGlassLookAndFeel\");\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t\t(new ClientLoader()).makeGUI();\r\n\t}", "public static void setSkinSelected() {\r\n\t\tif (Main.skinIsIowaState) {\r\n\t\t\tFrameUtils.setISUColors();\r\n\t\t}\r\n\t\tif (Main.skinIsIowa) {\r\n\t\t\tFrameUtils.setIowaColors();\r\n\t\t}\r\n\t\tif (Main.skinIsNorthernIowa) {\r\n\t\t\tFrameUtils.setUNIColors();\r\n\t\t}\r\n\t}", "public String _buildtheme() throws Exception{\n_theme.Initialize(\"pagetheme\");\r\n //BA.debugLineNum = 91;BA.debugLine=\"theme.AddABMTheme(ABMShared.MyTheme)\";\r\n_theme.AddABMTheme(_abmshared._mytheme);\r\n //BA.debugLineNum = 94;BA.debugLine=\"theme.AddLabelTheme(\\\"lightblue\\\")\";\r\n_theme.AddLabelTheme(\"lightblue\");\r\n //BA.debugLineNum = 95;BA.debugLine=\"theme.Label(\\\"lightblue\\\").ForeColor = ABM.COLOR_LI\";\r\n_theme.Label(\"lightblue\").ForeColor = _abm.COLOR_LIGHTBLUE;\r\n //BA.debugLineNum = 96;BA.debugLine=\"End Sub\";\r\nreturn \"\";\r\n}", "private void menuClassicActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuClassicActionPerformed\n try {\n UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel\");\n SwingUtilities.updateComponentTreeUI(this);\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t try {\n\t\t\t\t\tUIManager.setLookAndFeel(\"com.seaglasslookandfeel.SeaGlassLookAndFeel\");\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (InstantiationException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IllegalAccessException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (UnsupportedLookAndFeelException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tsetupLibVLC();\n\t\t\t\t} catch (LibraryNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tNative.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);\n\t\t\t\t\n\t\t\t\tExtendedFrame frame = new ExtendedFrame();\n\t\t\t\tframe.setResizable(true);\n\t\t\t\tframe.setSize(800, 600);\n\t\t\t\tframe.setMinimumSize(new Dimension(500, 400));\n\t\t\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\t\tframe.setLocationRelativeTo(null);\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Welcome to Vamix!\\n\\nHope you enjoy using vamix!\\nFor help, please click in the Help menu.\\nRefer to user manual for detailed help.\\n\");\n\t\t\t}", "public void setTheme(String name) {\n\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (name.equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(UserInterface.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\ttry{\n\t\t\t\tUIManager.setLookAndFeel(className);\n\t\t\t\tSwingUtilities.updateComponentTreeUI(PlatFrame.this);\n\t\t\t\tpack();\n\t\t\t}catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "private void configureUI() {\r\n // UIManager.put(\"ToolTip.hideAccelerator\", Boolean.FALSE);\r\n\r\n Options.setDefaultIconSize(new Dimension(18, 18));\r\n\r\n Options.setUseNarrowButtons(settings.isUseNarrowButtons());\r\n\r\n // Global options\r\n Options.setTabIconsEnabled(settings.isTabIconsEnabled());\r\n UIManager.put(Options.POPUP_DROP_SHADOW_ENABLED_KEY,\r\n settings.isPopupDropShadowEnabled());\r\n\r\n // Swing Settings\r\n LookAndFeel selectedLaf = settings.getSelectedLookAndFeel();\r\n if (selectedLaf instanceof PlasticLookAndFeel) {\r\n PlasticLookAndFeel.setPlasticTheme(settings.getSelectedTheme());\r\n PlasticLookAndFeel.setTabStyle(settings.getPlasticTabStyle());\r\n PlasticLookAndFeel.setHighContrastFocusColorsEnabled(\r\n settings.isPlasticHighContrastFocusEnabled());\r\n } else if (selectedLaf.getClass() == MetalLookAndFeel.class) {\r\n MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());\r\n }\r\n\r\n // Work around caching in MetalRadioButtonUI\r\n JRadioButton radio = new JRadioButton();\r\n radio.getUI().uninstallUI(radio);\r\n JCheckBox checkBox = new JCheckBox();\r\n checkBox.getUI().uninstallUI(checkBox);\r\n\r\n try {\r\n UIManager.setLookAndFeel(selectedLaf);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't change L&F: \" + e);\r\n }\r\n\r\n }", "public void Themes21()\n {\n theme2= new Label(\"Theme\");\n theme2.setPrefWidth(150);\n theme2.setFont(new Font(13));\n theme2.setPrefHeight(40);\n theme2.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n dikoma2 = new Label(\"Dikoma\");\n dikoma2.setFont(new Font(13));\n dikoma2.setPrefWidth(150);\n dikoma2.setPrefHeight(40);\n dikoma2.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n diagelo2 = new Label(\"Diagelo\");\n diagelo2.setFont(new Font(13));\n diagelo2.setPrefWidth(150);\n diagelo2.setPrefHeight(40);\n diagelo2.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n abuse2 = new Label(\"Woman & children abuse\");\n abuse2.setPrefWidth(150);\n abuse2.setFont(new Font(13));\n abuse2.setPrefHeight(40);\n abuse2.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n trafficking2 = new Label(\"Human trafficking\");\n trafficking2.setFont(new Font(13));\n trafficking2.setPrefWidth(150);\n trafficking2.setPrefHeight(40);\n trafficking2.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n }", "public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException,\n\t\t\tUnsupportedLookAndFeelException {\n\t\tdetermineOS();\n\t\tif (currentOs == MAC_OS) {\n\t\t\tSystem.setProperty(\"com.apple.mrj.application.apple.menu.about.name\", \"UP-Admin\");\n\t\t\tSystem.setProperty(\"apple.laf.useScreenMenuBar\", \"true\");\n\t\t\tSystem.setProperty(\"com.apple.mrj.application.live-resize\", \"true\");\n\n\t\t\ttry {\n\t\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (UnsupportedLookAndFeelException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else if ((currentOs == WIN_OS) || (currentOs == null)) {\n\n\t\t\tUIManager.put(\"nimbusBase\", new Color(0x525252));\n\t\t\tUIManager.put(\"control\", new Color(0x949494));\n\t\t\tUIManager.put(\"nimbusSelectionBackground\", new Color(0x171717));\n\t\t\tUIManager.put(\"Menu.background\", new Color(0x2B2B2B));\n\t\t\tUIManager.put(\"background\", new Color(0x171717));\n\t\t\tUIManager.put(\"DesktopIcon.background\", new Color(0x171717));\n\t\t\tUIManager.put(\"nimbusLightBackground\", new Color(0xE3E3E3));\n\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\t\t\t\n\t\t}\n\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tFrame frame = new Frame();\n\t\t\t\t\tframe.setVisible(true);\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void Themes31()\n {\n theme3= new Label(\"Theme\");\n theme3.setPrefWidth(150);\n theme3.setFont(new Font(13));\n theme3.setPrefHeight(40);\n theme3.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n dikoma3 = new Label(\"Dikoma\");\n dikoma3.setFont(new Font(13));\n dikoma3.setPrefWidth(150);\n dikoma3.setPrefHeight(40);\n dikoma3.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n diagelo3 = new Label(\"Diagelo\");\n diagelo3.setFont(new Font(13));\n diagelo3.setPrefWidth(150);\n diagelo3.setPrefHeight(40);\n diagelo3.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n abuse3 = new Label(\"Woman & children abuse\");\n abuse3.setPrefWidth(150);\n abuse3.setFont(new Font(13));\n abuse3.setPrefHeight(40);\n abuse3.setBackground(new Background(new BackgroundFill(Color.GREEN,CornerRadii.EMPTY,Insets.EMPTY)));\n \n \n trafficking3 = new Label(\"Human trafficking\");\n trafficking3.setFont(new Font(13));\n trafficking3.setPrefWidth(150);\n trafficking3.setPrefHeight(40);\n trafficking3.setBackground(new Background(new BackgroundFill(Color.YELLOW,CornerRadii.EMPTY,Insets.EMPTY)));\n }", "public void setLAF(String lookAndFeelStr) {\n String exceptionNotice = \"\";\n try {\n // Set the font for Metal LAF to non-bold, in case Metal is used\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n if (lookAndFeelStr == null || lookAndFeelStr.equalsIgnoreCase(\"Metal\")) {\n UIManager.setLookAndFeel(new MetalLookAndFeel());\n } else\n if (lookAndFeelStr.equalsIgnoreCase(\"Nimbus\")) {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (info.getName().equals(\"Nimbus\")) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } else {\n UIManager.setLookAndFeel(lookAndFeelStr);\n }\n } catch (UnsupportedLookAndFeelException e) {\n exceptionNotice = \"UnsupportedLookAndFeelException\";\n } catch (ClassNotFoundException e) {\n exceptionNotice = \"ClassNotFoundException\";\n } catch (InstantiationException e) {\n exceptionNotice = \"InstantiationException\";\n } catch (IllegalAccessException e) {\n exceptionNotice = \"IllegalAccessException\";\n } finally {\n if (! exceptionNotice.isEmpty()) {\n try {\n // The desired LAF was not created, so try to use the Metal LAF as a default.\n UIManager.setLookAndFeel(new MetalLookAndFeel());\n } catch (UnsupportedLookAndFeelException e) {\n logger.error(\"Could not initialize the Swing Look and Feel settings, MCT is closing.\");\n System.exit(1);\n }\n }\n }\n // Look and Feel has been successfully created, now set colors\n initializeColors(UIManager.getLookAndFeel());\n Properties props = new Properties();\n String filename = System.getProperty(viewColor,\"resources/properties/viewColor.properties\");\n FileReader reader = null;\n try {\n \treader = new FileReader(filename);\n \tprops.load(reader);\n BASE_PROPERTIES = new ColorScheme(props);\n BASE_PROPERTIES.applyColorScheme(); // Apply top-level color bindings\n } catch (Exception e) {\n logger.warn(\"Using default color and font properties because could not open viewColor properties file :\"+filename);\n BASE_PROPERTIES = new ColorScheme();\n } finally {\n \ttry {\n if (reader != null) reader.close();\n } catch(IOException ioe1){ }\n }\n }", "public static void main(String[] args) {\n try {\n //UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n UIManager.setLookAndFeel(\"javax.swing.plaf.metal.MetalLookAndFeel\");\n } catch (UnsupportedLookAndFeelException ex) {\n ex.printStackTrace();\n } catch (IllegalAccessException ex) {\n ex.printStackTrace();\n } catch (InstantiationException ex) {\n ex.printStackTrace();\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n }\n /* Turn off metal's use of bold fonts */\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n \n //Schedule a job for the event dispatch thread:\n //creating and showing this application's GUI.\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n \n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n \n \n /* Create and display the form */ \n \n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new home().setVisible(true);\n }\n });\n }", "public MainWindowAlt() {\n initComponents();\n //this.getContentPane().setBackground(Color.CYAN);\n }", "public void change(String subtheme) throws Exception\n {\n Properties props = SmartGraphicalTheme.setOptions(subtheme);\n\n // set your theme\n AcrylLookAndFeel.setTheme(subtheme);\n BaseTheme.setProperties(props);\n\n // select the Look and Feel\n UIManager.setLookAndFeel(AcrylLookAndFeel.class.getName());\n }", "private static void createAndShowGUI() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\n\t\tLevelEditor le = new LevelEditor();\n\t}", "abstract public Skin getSkin();", "private void applyInitialLook() {\r\n\t\tthis.control.setFont(this.initialFont);\r\n\t\tthis.control.setBackground(this.initialBackgroundColor);\r\n\t\tthis.control.setForeground(this.initialForegroundColor);\r\n\t}", "public static void main(String args[]) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(ExtensionPicker.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(ExtensionPicker.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(ExtensionPicker.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(ExtensionPicker.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ExtensionPicker.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n Logger.getLogger(ExtensionPicker.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n Logger.getLogger(ExtensionPicker.class.getName()).log(Level.SEVERE, null, ex);\n } catch (UnsupportedLookAndFeelException ex) {\n Logger.getLogger(ExtensionPicker.class.getName()).log(Level.SEVERE, null, ex);\n }\n new ExtensionPicker();\n }\n });\n\n }", "public void initialize() throws BackingStoreException {\n\t\t /*try {\n\t\t UIManager.setLookAndFeel( UIManager.getCrossPlatformLookAndFeelClassName() );\n\t\t } catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t }*/\n\t \n\t\tgetChordManager();\n\t\tservoSettings = ServoSettings.loadCorrectionsFrom(new File(preferences.getCorrectionsFile()), ROBOTAR_FOLDER);\n\t\tmessages = ResourceBundle.getBundle(\"com.robotar.util.RoboTarBundle\", preferences.getLocale());\n\t\t\n\t\tfrmBlueAhuizote = new JFrame();\n\t\t\n\t\tJPanel frmBlueAhuizotePC = new JPanel() {\n\n\t\t\t@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t \n\t\t GradientPaint gp = new GradientPaint(0, 0,\n\t\t Const.BACKGROUND_COLOR.brighter(), 0, getHeight(),\n\t\t Color.BLUE);\n\t\t \n\t\t g2d.setPaint(gp);\n\t\t g2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t}\n\t\t};\n\t\tfrmBlueAhuizotePC.setOpaque(false);\n\t\tfrmBlueAhuizote.setContentPane(frmBlueAhuizotePC);\n\t\t//frmBlueAhuizote.setBackground(new Color(0, 0, 255));\n\t\t//frmBlueAhuizote.setBounds(100, 100, 800, 600);\n\t\t//frmBlueAhuizote.getContentPane().setBackground(Color.BLUE); //Const.BACKGROUND_COLOR);\n\t\tfrmBlueAhuizote.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n\t\tfrmBlueAhuizote.getContentPane().setLayout(new BorderLayout(0, 0));\n\t\tfrmBlueAhuizotePC.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tjava.net.URL res = RoboTarPC.class.getResource(\"/data/BlueAhuizoteIcon.png\");\n\t\tlblNewLabel.setIcon(new ImageIcon(res));\n\t\t//lblNewLabel.setIcon(new ImageIcon(RoboTarStartPage.class.getResource(\"/data/BlueAhuizoteIcon.png\")));\n\t\tlblNewLabel.setBorder(null);\n\t\tfrmBlueAhuizote.getContentPane().add(lblNewLabel, BorderLayout.WEST);\n\t\t\n\t\tAction startChordsAction = new StartChordsPageAction(messages.getString(\"robotar.menu.chords\"), KeyEvent.VK_C);\n\t\tbtnChords = new JButton(\"\");\n\t\tbtnChords.addActionListener(startChordsAction);\n\t\tbtnChords.setBorderPainted(false);\n\t\tbtnChords.setMargin(new Insets(0, 0, 0, 0));\n\t\tbtnChords.setToolTipText(\"Create or Browse Chords\");\n\t\tbtnChords.setIcon(new ImageIcon(RoboTarPC.class.getResource(\"/data/chords.png\")));\n\t\tfrmBlueAhuizote.getContentPane().add(btnChords, BorderLayout.CENTER);\n\t\t\n\t\tAction startSongsAction = new StartSongsPageAction(messages.getString(\"robotar.menu.songs\"), KeyEvent.VK_S);\n\t\tbtnSongs = new JButton(\"\");\n\t\tbtnSongs.addActionListener(startSongsAction);\n\t\tbtnSongs.setBorderPainted(false);\n\t\tbtnSongs.setMargin(new Insets(0, 0, 0, 0));\n\t\tbtnSongs.setToolTipText(\"Select or Create Songs\");\n\t\tbtnSongs.setIcon(new ImageIcon(RoboTarPC.class.getResource(\"/data/SheetMusic.png\")));\n\t\tfrmBlueAhuizote.getContentPane().add(btnSongs, BorderLayout.EAST);\n\t\t\n\t\tioioReconnectAction = new IOIOReconnectAction(messages.getString(\"robotar.menu.reconnect\"), KeyEvent.VK_R);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"\");\n\t\tlblNewLabel_1.setForeground(new Color(30, 144, 255));\n\t\tlblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblNewLabel_1.setIcon(new ImageIcon(RoboTarPC.class.getResource(\"/data/RoboTarLogoFont3.png\")));\n\t\tlblNewLabel_1.setBackground(Color.GRAY);\n\t\tfrmBlueAhuizote.getContentPane().add(lblNewLabel_1, BorderLayout.NORTH);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"\");\n\t\tlblNewLabel_2.setIcon(new ImageIcon(RoboTarPC.class.getResource(\"/data/junglespeakermountainsmall.png\")));\n\t\tlblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tfrmBlueAhuizote.getContentPane().add(lblNewLabel_2, BorderLayout.SOUTH);\n\t\t\n frmBlueAhuizote.addWindowListener(new ExitAdapter());\n \n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tfrmBlueAhuizote.setJMenuBar(menuBar);\n\t\t\n\t\tJMenu mnFileMenu = new JMenu(messages.getString(\"robotar.menu.file\"));\n\t\tmenuBar.add(mnFileMenu);\n\t\t\n\t\tJMenuItem mntmAbout = new JMenuItem(new AboutAction(messages.getString(\"robotar.menu.about\")));\n\t\tmnFileMenu.add(mntmAbout);\n\t\t\n\t\tJMenuItem mntmExit = new JMenuItem(messages.getString(\"robotar.menu.exit\"));\n\t\tmntmExit.addActionListener(new ExitListener());\n\t\tmntmExit.setMnemonic(KeyEvent.VK_X);\n\t\tmnFileMenu.add(mntmExit);\n\t\t\n\t\tJMenu mnLauncher = new JMenu(messages.getString(\"robotar.menu.launcher\"));\n\t\tmenuBar.add(mnLauncher);\n\t\t\n\t\tJMenuItem mntmChords = new JMenuItem(startChordsAction);\n\t\tmnLauncher.add(mntmChords);\n\t\t\n\t\tJMenuItem mntmSongs = new JMenuItem(startSongsAction);\n\t\tmnLauncher.add(mntmSongs);\n\t\t\n\t\tJMenu mnIOIO = new JMenu(messages.getString(\"robotar.menu.ioio\"));\n\t\tmenuBar.add(mnIOIO);\n\t\t\n\t\tJMenuItem mntmReconnect = new JMenuItem(ioioReconnectAction);\n\t\tioioReconnectAction.setEnabled(false); // until it will be implemented...\n\t\tmnIOIO.add(mntmReconnect);\n\t\t\n\t\tJMenu mnUtilities = new JMenu(messages.getString(\"robotar.menu.utilities\"));\n\t\tmenuBar.add(mnUtilities);\n\t\t\n\t\tJMenuItem corr = new JMenuItem(new CorrectionsAction(messages.getString(\"robotar.menu.servo_corrections\"), KeyEvent.VK_E));\n\t\tmnUtilities.add(corr);\n\t\t\n\t\tJMenuItem mntmSettings = new JMenuItem(new StartSettingsPageAction(messages.getString(\"robotar.menu.settings\"), KeyEvent.VK_T));\n\t\tmnUtilities.add(mntmSettings);\n\t\t\n\t\tJMenuItem mntmTuner = new JMenuItem(messages.getString(\"robotar.menu.tuner\"));\n\t\tmntmTuner.setEnabled(false);\n\t\tmnUtilities.add(mntmTuner);\n\t\t\n\t\tJMenuItem mntmMetronome = new JMenuItem(messages.getString(\"robotar.menu.metronome\"));\n\t\tmntmMetronome.setEnabled(false);\n\t\tmnUtilities.add(mntmMetronome);\n\t\t\n\t\tJMenuItem mntmSongDownloads = new JMenuItem(messages.getString(\"robotar.menu.song_downloads\"));\n\t\tmntmSongDownloads.setEnabled(false);\n\t\tmnUtilities.add(mntmSongDownloads);\n\t\t\n\t\tfinal JCheckBoxMenuItem mntmShow = new JCheckBoxMenuItem(messages.getString(\"robotar.menu.show\"));\n\t\tmnUtilities.add(mntmShow);\n\t\tmntmShow.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tshowChecked = !showChecked;\n\t\t\t\tmntmShow.setSelected(showChecked);\n\t\t\t\tif (patterns != null && !showChecked) {\n\t\t\t\t\tpatterns.quit();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJMenu mnLang = new JMenu(messages.getString(\"robotar.menu.lang_sel\"));\n\t\tmenuBar.add(mnLang);\n\t\t\n\t\tJMenuItem mntmEnglish = new JMenuItem(messages.getString(\"robotar.menu.english\"));\n\t\tmnLang.add(mntmEnglish);\n\t\tmntmEnglish.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdateLocale(Locale.ENGLISH);\n\t\t\t}\n\t\t});\n\t\tJMenuItem mntmSpanish = new JMenuItem(messages.getString(\"robotar.menu.spanish\"));\n\t\t//mntmSpanish.setEnabled(false);\n\t\tmnLang.add(mntmSpanish);\n\t\tmntmSpanish.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdateLocale(new Locale(\"es\", \"ES\"));\n\t\t\t}\n\t\t});\n\t\tJMenuItem mntmCzech = new JMenuItem(messages.getString(\"robotar.menu.czech\"));\n\t\tmnLang.add(mntmCzech);\n\t\tmntmCzech.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdateLocale(new Locale(\"cs\", \"CZ\"));\n\t\t\t}\n\t\t});\n\t\tJMenuItem mntmGerman = new JMenuItem(messages.getString(\"robotar.menu.german\"));\n\t\tmnLang.add(mntmGerman);\n\t\tmntmGerman.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdateLocale(new Locale(\"de\", \"DE\"));\n\t\t\t}\n\t\t});\n\t\t\n\t\tJMenu mnHelp = new JMenu(messages.getString(\"robotar.menu.help\"));\n\t\tmenuBar.add(mnHelp);\n\t\t\n\t\tAction startHelpAction = new StartHelpPageAction(messages.getString(\"robotar.menu.help\"), KeyEvent.VK_H);\n\t\tJMenuItem mntmHelp = new JMenuItem(messages.getString(\"robotar.menu.robotar_help\"));\n\t\tmnHelp.add(mntmHelp);\n\t\tmntmHelp.addActionListener(startHelpAction);\n\t\t\n\t\t\n\t\tfrmBlueAhuizote.setSize(818, 560);\n\t\tfrmBlueAhuizote.setPreferredSize(new Dimension(818, 560));\n\t\tfrmBlueAhuizote.pack();\n\t\tfrmBlueAhuizote.setLocationByPlatform(true);\n\t\tfrmBlueAhuizote.setVisible(true);\n\t\tfrmBlueAhuizote.setTitle(messages.getString(\"robotar.name\"));\n\t\t\n\t\t// display warning if device not yet configured!\n\t\tif (!servoSettings.isAnyCorrectionSet()) {\n\t\t\t// this is crucial, therefore it is modal dialog box (connection to ioio is stopped)\n\t\t\tJOptionPane.showMessageDialog(frmBlueAhuizote, \n\t\t\t\t\tmessages.getString(\"robotar.corrections.notset\"), \n\t\t\t\t\t\"RoboTar WARNING\", JOptionPane.WARNING_MESSAGE);\n\t\t}\n\t\t\n\t\t// check for newer versions\n\t\tif (displayVersionNotification() && isNewerVersionAvailable()) {\n\t\t\t// this is informational only, therefore it is modeless, connection to ioio continues\n\t\t\tJDialog dialog3 = new JDialog(frmBlueAhuizote, messages.getString(\"robotar.version.title\"));\n\t\t dialog3.setBounds(200, 300, 500, 120);\n\t\t dialog3.setBackground(Const.BACKGROUND_COLOR);\n\t\t\t\n\t\t JLabel label = new JLabel(MessageFormat.format(messages.getString(\"robotar.version.available\"), remoteVersion));\n\t\t JLabel labelYours = new JLabel(MessageFormat.format(messages.getString(\"robotar.version.yours\"), localVersion));\n\t\t JTextField textUrl = new JTextField(\"https://github.com/kleekru/RoboTarPC/releases/latest\");\n\t\t textUrl.setEditable(false);\n\t\t JLabel labelDesc = new JLabel(messages.getString(\"robotar.version.desc\"));\n\t\t dialog3.getContentPane().setLayout(new BoxLayout(dialog3.getContentPane(), BoxLayout.Y_AXIS));\n\t\t dialog3.getContentPane().add(label);\n\t\t dialog3.getContentPane().add(labelYours);\n\t\t dialog3.getContentPane().add(labelDesc);\n\t\t dialog3.getContentPane().add(textUrl);\n\t\t //dialog3.pack();\n\t\t dialog3.setVisible(true);\n\t\t dialog3.repaint();\n\t\t}\n\t}", "int getSkin();", "static void customizeNimbus()\r\n\t\tthrows Exception\r\n\t{\n\t\tUIManager.put(\"control\", BACKGROUND);\r\n\r\n\t\t// TODO: imilne 04/SEP/2009 - No longer working since JRE 1.6.0_u13\r\n\t\tif (SystemUtils.isWindows())\r\n\t\t{\r\n\t\t\tUIManager.put(\"defaultFont\", FONT);\r\n\t\t\tUIManager.put(\"Label[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"Table[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"TableHeader[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"TabbedPane[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"ComboBox[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"Button[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"ToggleButton[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"TextField[Enabled].font\", FONT);\r\n\t\t\tUIManager.put(\"CheckBox[Enabled].font\", FONT);\r\n\t\t}\r\n\r\n\t\tfor (UIManager.LookAndFeelInfo laf : UIManager.getInstalledLookAndFeels())\r\n\t\t\tif (laf.getName().equals(\"Nimbus\"))\r\n\t\t\t\tUIManager.setLookAndFeel(laf.getClassName());\r\n\r\n\r\n\t\tUIManager.put(\"SplitPane[Enabled].size\", 8);\r\n\r\n\t\tUIManager.put(\"nimbusOrange\", new Color(51, 98, 140));\r\n//\t\tUIManager.put(\"nimbusOrange\", new Color(57, 105, 138));\r\n//\t\tUIManager.put(\"nimbusOrange\", new Color(115, 164, 209));\r\n\r\n\r\n\t\t// Reset non-Aqua look and feels to use CMD+C/X/V rather than CTRL for copy/paste stuff\r\n\t\tif (SystemUtils.isMacOS())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Setting OS X keyboard shortcuts\");\r\n\r\n\t\t\tInputMap textField = (InputMap) UIManager.get(\"TextField.focusInputMap\");\r\n\t\t\ttextField.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.META_DOWN_MASK), DefaultEditorKit.copyAction);\r\n\t\t\ttextField.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.META_DOWN_MASK), DefaultEditorKit.pasteAction);\r\n\t\t\ttextField.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.META_DOWN_MASK), DefaultEditorKit.cutAction);\r\n\t\t\ttextField.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK), DefaultEditorKit.selectAllAction);\r\n\r\n\t\t\tInputMap textArea = (InputMap) UIManager.get(\"TextArea.focusInputMap\");\r\n\t\t\ttextArea.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.META_DOWN_MASK), DefaultEditorKit.copyAction);\r\n\t\t\ttextArea.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.META_DOWN_MASK), DefaultEditorKit.pasteAction);\r\n\t\t\ttextArea.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.META_DOWN_MASK), DefaultEditorKit.cutAction);\r\n\t\t\ttextArea.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.META_DOWN_MASK), DefaultEditorKit.selectAllAction);\r\n\t\t}\r\n\t}", "private String getLookAndFeelClassName(String nimbus) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n public void init() {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(TugasB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(TugasB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(TugasB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(TugasB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the applet */\n try {\n java.awt.EventQueue.invokeAndWait(new Runnable() {\n public void run() {\n initComponents();\n }\n });\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@Override\n public void init() {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Registration.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Registration.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Registration.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Registration.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n getContentPane().setBackground(Color.BLUE);\n this.setSize(450, 350);\n\n /* Create and display the applet */\n /*try {\n java.awt.EventQueue.invokeAndWait(new Runnable() {\n public void run() {\n initComponents();\n }\n });\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n */\n run();\n }", "public static String setLookAndFeel(String look) {\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE); //$NON-NLS-1$\n // Display slider value is set to false (already in all LAF by the panel title), used by GTK LAF\n UIManager.put(\"Slider.paintValue\", Boolean.FALSE); //$NON-NLS-1$\n\n String laf = getAvailableLookAndFeel(look);\n try {\n UIManager.setLookAndFeel(laf);\n } catch (Exception e) {\n laf = UIManager.getSystemLookAndFeelClassName();\n LOGGER.error(\"Unable to set the Look&Feel\", e); //$NON-NLS-1$\n }\n // Fix font issue for displaying some Asiatic characters. Some L&F have special fonts.\n setUIFont(new javax.swing.plaf.FontUIResource(\"SansSerif\", Font.PLAIN, 12)); //$NON-NLS-1$\n return laf;\n }", "@SuppressWarnings(\"unused\")\n private static void activateNimbus() //just for testing reasons\n {\n try {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (Exception e) {\n log.warn(\"error in nimbus activation?\", e);\n }\n }", "public Q4() {\n initComponents();\n looks=UIManager.getInstalledLookAndFeels();\n }", "protected static void initLnF() {\r\n try {\r\n if (!\"com.sun.java.swing.plaf.motif.MotifLookAndFeel\".equals(UIManager.getSystemLookAndFeelClassName())\r\n && !\"com.sun.java.swing.plaf.gtk.GTKLookAndFeel\".equals(UIManager.getSystemLookAndFeelClassName())\r\n && !UIManager.getSystemLookAndFeelClassName().equals(UIManager.getLookAndFeel().getClass().getName())) {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public MuestraColores() {\n\t\tenableEvents(64L);\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tinitialize();\n\t}", "public static void main(String[] args) {\n try {\n //UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\");\n UIManager.setLookAndFeel(\"javax.swing.plaf.metal.MetalLookAndFeel\");\n } catch (UnsupportedLookAndFeelException ex) {\n ex.printStackTrace();\n } catch (IllegalAccessException ex) {\n ex.printStackTrace();\n } catch (InstantiationException ex) {\n ex.printStackTrace();\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n }\n /* Turn off metal's use of bold fonts */\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n \n //Schedule a job for the event dispatch thread:\n //creating and showing this application's GUI.\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n abrir();\n }\n });\n }", "@Override\r\n\tpublic void run() {\n\t\ttry {\r\n\t\t\tLookAndFeelInfo look[] = UIManager.getInstalledLookAndFeels();\r\n\t\t\tfor (LookAndFeelInfo lookAndFeelInfo : look) {\r\n\r\n\t\t\t\tSystem.out.println(lookAndFeelInfo.getClassName());\r\n\t\t\t}\r\n\t\t\tUIManager.setLookAndFeel(this.config.getLookAndFeel());\r\n\t\t} catch (ClassNotFoundException | InstantiationException\r\n\t\t\t\t| IllegalAccessException | UnsupportedLookAndFeelException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tsetVisible(true);\r\n\t}", "public void setDefaultAttributes() {\n\t\t// sets window information and basic graphical attributes\n\t\tthis.setBounds(50, 50, 1000, 700);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setVisible(true);\n\t\tthis.setTitle(\"Siemens Intuitive Interface\");\n\t\tthis.setBackground(Color.WHITE);\n\t\tthis.setForeground(Color.BLACK);\n\t\tgetContentPane().setLayout(null);\n\t\tthis.setFont(new Font(\"Tahoma\", Font.PLAIN, 24));\n\n\t\t// adds menu items\n\t\tsetJMenuBar(menuBar);\n\n\t\tJMenu fileMenu = new JMenu(\"File\");\n\t\tsubMenuFrameDock = new JMenu(\"Frames Dock/UnDock\");\n\t\tsubMenuGenFrame = new JMenu(\"Show Frames\");\n\n\t\tmItemNew = fileMenu.add(\"New\");\n\t\tmItemNew.addActionListener(this);\n\t\tmItemNew.setActionCommand(\"new\");\n\n\t\tmItemLoad = fileMenu.add(\"Open\");\n\t\tmItemLoad.addActionListener(this);\n\t\tmItemLoad.setActionCommand(\"open\");\n\n\t\tmItemSave = fileMenu.add(\"Save\");\n\t\tmItemSave.addActionListener(this);\n\t\tmItemSave.setActionCommand(\"save\");\n\n\t\tmItemRun = fileMenu.add(\"Run\");\n\t\tmItemRun.addActionListener(this);\n\t\tmItemRun.setActionCommand(\"run\");\n\n\t\t\n\t\tmItemGenCode = new JMenuItem(\"Generate Code\");\n\t\tmItemGenCode.addActionListener(this);\n\t\tmItemGenCode.setActionCommand(\"genCode\");\n\t\t\n\t\tmItemPreferences = fileMenu.add(\"Preferences\");\n\t\tmItemPreferences.addActionListener(this);\n\t\tmItemPreferences.setActionCommand(\"settings\");\n\n\t\t// ------------------------------------------------------------------------------------------------------------------------------\n\t\ti_console_DockFrame = new JMenuItem(\"i_console Dock/Undock\");\n\t\tsubMenuFrameDock.add(i_console_DockFrame);\n\t\ti_console_DockFrame.addActionListener(this);\n\t\ti_console_DockFrame.setActionCommand(\"i_console_Dock/Undock\");\n\n\t\ti_palette_DockFrame = new JMenuItem(\"i_palette Dock/Undock\");\n\t\tsubMenuFrameDock.add(i_palette_DockFrame);\n\t\ti_palette_DockFrame.addActionListener(this);\n\t\ti_palette_DockFrame.setActionCommand(\"i_palette_Dock/Undock\");\n\n\t\t// --------------------------------------------------------------------------------------------------------------------------------\n\n\t\tshow_i_console = new JMenuItem(\"show i_console\");\n\t\tsubMenuGenFrame.add(show_i_console);\n\t\tshow_i_console.addActionListener(this);\n\t\tshow_i_console.setActionCommand(\"show i_console\");\n\n\t\tshow_i_palette = new JMenuItem(\"show i_palette\");\n\t\tsubMenuGenFrame.add(show_i_palette);\n\t\tshow_i_palette.addActionListener(this);\n\t\tshow_i_palette.setActionCommand(\"show i_palette\");\n\n\t\tfileMenu.add(subMenuFrameDock);\n\t\tfileMenu.add(subMenuGenFrame);\n\n\t\tfileMenu.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\trightMenuClick = true;\n\t\t\t}\n\t\t});\n\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(mItemGenCode);\n\t\t\t\n\t}", "public Libreta() {\n\n this.setUndecorated(true);\n initComponents();\n this.setLocationRelativeTo(null);\n transparenciButton();\n }", "private void setupGUI() {\r\n\t\tPaperToolkit.initializeLookAndFeel();\r\n\t\tgetMainFrame();\r\n\t}", "@Override\n\tpublic void setSkinStyleName(String paramString)\n\t{\n\n\t}", "public static void main(String[] args) {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n //Turn off metal's use of bold fonts\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n createAndShowGUI();\n }\n });\n }", "@Override\n\tpublic String getSkinStyleName()\n\t{\n\t\treturn null;\n\t}", "public GUI() {\n initComponents();\n this.jComboBox1.setEnabled(false);\n this.jButton2.setEnabled(false);\n this.jButton3.setEnabled(false);\n this.jTextArea1.setEnabled(false);\n getContentPane().setBackground(java.awt.Color.getHSBColor((float) 0.62, (float) 0.55, (float) 0.55));\n }", "public static void main(String[] args) {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n //Turn off metal's use of bold fonts\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n\n createAndShowGUI();\n }\n });\n }", "public Egresos() {\n this.setUndecorated(true);\n initComponents();\n }", "private void setupSwing() {\r\n SwingUtilities.invokeLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n \r\n try {\r\n for (LookAndFeelInfo info: UIManager.getInstalledLookAndFeels()) {\r\n if (info.getName().equals(\"Windows\")) {\r\n UIManager.setLookAndFeel(info.getClassName());\r\n }\r\n }\r\n } catch (ClassNotFoundException \r\n | InstantiationException\r\n | IllegalAccessException \r\n | UnsupportedLookAndFeelException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n \r\n window = new ManagerWindow(MetagridManager.this);\r\n window.pack();\r\n window.setVisible(true);\r\n }\r\n });\r\n }", "public static void main(String[] args) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n// * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n// */\n// try {\n// for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n// if (\"Nimbus\".equals(info.getName())) {\n// javax.swing.UIManager.setLookAndFeel(info.getClassName());\n// break;\n// }\n// }\n// } catch (ClassNotFoundException ex) {\n// java.util.logging.Logger.getLogger(CatcTitles.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n// } catch (InstantiationException ex) {\n// java.util.logging.Logger.getLogger(CatcTitles.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n// } catch (IllegalAccessException ex) {\n// java.util.logging.Logger.getLogger(CatcTitles.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n// } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n// java.util.logging.Logger.getLogger(CatcTitles.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n// }\n //</editor-fold>\n\n /* Create and display the form */\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n JFrame frame = new JFrame();\n frame.setContentPane(new CatcTitles());\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.pack();\n frame.setVisible(true);\n }\n });\n }", "public Main() throws FileNotFoundException, IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {\n\n setIconImage(new javax.swing.ImageIcon(getClass().getResource(\"/images/receiptsList.png\")).getImage());\n createDirs();\n // if (Options.toBoolean(Options.DEBUG)) {\n createLogger();\n // }\n Options.getOptions();\n Fonts f = new Fonts();\n f.setDefaultFont(\"Arial\");\n LookAndFeels laf = new LookAndFeels();\n try {\n laf.setLookAndFeel(Options.toString(Options.LOOK_FEEL));\n } catch (Exception ex) {\n try {\n laf.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());\n } catch (Exception ex1) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex1);\n }\n }\n SwingUtilities.updateComponentTreeUI(this);\n\n \n //Skin skin = new Skin(Color.yellow);\n //Skin.applySkin();\n\n logger.log(Level.INFO, \"Initializing components\");\n initComponents();\n\n glassPane = new MyDisabledGlassPane();\n JRootPane root = SwingUtilities.getRootPane(this);\n root.setGlassPane(glassPane);\n logger.log(Level.FINE, \"Components initialized\");\n logger.log(Level.INFO, \"Creating connection to database\");\n Database.createConnection(false);\n if (Options.toBoolean(Options.START_UP_BACKUP)) {\n backUpDb();\n }\n logger.log(Level.FINE, \"Connected to database: {0}\", Options.toString(Options.DATABASE));\n logger.log(Level.INFO, \"Setting the year\");\n setYear();\n logger.log(Level.FINE, \"Year set to : {0}\", Options.YEAR);\n setAppTitle();\n logger.log(Level.INFO, \"Updating panels\");\n updateReceiptPanel();\n updateTotalsPanel();\n logger.log(Level.FINE, \"Panels updated\");\n setLocationRelativeTo(null);\n if (Options.toBoolean(Options.AUTO_UPDATE)) {\n CheckUpdate c = new CheckUpdate(true);\n }\n setVisible(true);\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tBasicComponentJFrame frame = new BasicComponentJFrame();\n\t\tframe.setSize(800, 600);\n\t\t\n\t\tframe.setComponents();\n\t\tGuiUtil.setLookNFeel(frame, GuiUtil.THEME_SWING);\n\t\tframe.setMenus();\n\t\tframe.eventReigst();\n\t\t\n\t\tframe.setVisible(true);\n\n\t}", "public void loadSkin()\n {\n try\n {\n bgImage = ImageIO.read(BrandingActivator.getResources().\n getImageURL(\"plugin.branding.ABOUT_WINDOW_BACKGROUND\"));\n\n this.setPreferredSize(new Dimension(bgImage.getWidth(this),\n bgImage.getHeight(this)));\n }\n catch (IOException e)\n {\n logger.error(\"Error cannot obtain background image\", e);\n bgImage = null;\n }\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(AnalystCompanyEdit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(AnalystCompanyEdit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(AnalystCompanyEdit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(AnalystCompanyEdit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new AnalystCompanyEdit().setVisible(true);\n }\n });\n }", "private static void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n //Create and set up the window.\r\n frame = new JFrame(\"ATC simulator\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n atcscreen = new AtcScreen();\r\n atcscreen.setOpaque(true);\r\n frame.setContentPane(atcscreen);\r\n \r\n //Display the window.\r\n frame.setSize(1000,1000);\r\n //atcscreen.setSize(300,300);\r\n //frame.pack();\r\n frame.setVisible(true);\r\n }", "private void setAttributes() {\n this.setVisible(true);\n this.setSize(500, 500);\n this.setTitle(\"cuttco.com\");\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(cylinder.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(cylinder.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(cylinder.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(cylinder.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the dialog */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n cylinder dialog = new cylinder(new javax.swing.JFrame(), true);\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n System.exit(0);\n }\n });\n dialog.setVisible(true);\n }\n });\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n \n\n}\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(NewJFrame1.class\n.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n \n\n} catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(NewJFrame1.class\n.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n \n\n} catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(NewJFrame1.class\n.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n \n\n} catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(NewJFrame1.class\n.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new NewJFrame1().setVisible(true);\n }\n });\n }", "public static void main(String[] args) {\n\t\t/* setting up a frame, station and controller */\n JTutorialFrame frame = new JTutorialFrame(ColorExample.class);\n DockController controller = new DockController();\n controller.setRootWindow(frame);\n frame.destroyOnClose(controller);\n\n SplitDockStation station = new SplitDockStation();\n controller.add(station);\n frame.add(station);\n\t\t\n\t\t/* get the ColorManager... */\n ColorManager colors = controller.getColors();\n\t\t/* ... and tell the framework to use red for painting drag and drop gestures. */\n colors.put(Priority.CLIENT, \"paint.divider\", Color.RED);\n colors.put(Priority.CLIENT, \"paint.line\", Color.RED);\n colors.put(Priority.CLIENT, \"paint.insertion\", Color.RED);\n\t\t\n\t\t/* And this is how a more complex rule is installed */\n colors.publish(Priority.CLIENT, TitleColor.KIND_TITLE_COLOR, new CustomColorBridge());\n\t\t\n\t\t/* setting up some dockables to demonstrate the effects */\n SplitDockGrid grid = new SplitDockGrid();\n grid.addDockable(0, 0, 1, 1, new ColorDockable(\"Red\", Color.RED.brighter()));\n grid.addDockable(0, 1, 1, 1, new ColorDockable(\"Green\", Color.GREEN.brighter()));\n grid.addDockable(1, 0, 1, 1, new ColorDockable(\"Blue\", Color.BLUE.brighter()));\n grid.addDockable(1, 1, 1, 1, new ColorDockable(\"Yellow\", Color.YELLOW.brighter()));\n\n station.dropTree(grid.toTree());\n\n frame.setVisible(true);\n }", "private void customizeFrame(JFrame frame) {\r\n frame.setTitle(getTitle());\r\n frame.setResizable(false);\r\n frame.setPreferredSize(new Dimension(width + 15, height + 36));\r\n frame.setVisible(true);\r\n\r\n frame.setLayout(new BorderLayout());\r\n frame.add(panel, BorderLayout.CENTER);\r\n frame.setLocationRelativeTo(null);\r\n\r\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n frame.pack();\r\n }", "public void loadSkin()\n {\n this.setIcon(new ImageIcon(\n ImageLoader.getImage(ImageLoader.CALL_16x16_ICON)));\n }", "public static void main(String[] args) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// Turn off metal's use of bold fonts\r\n\t\t\t\tUIManager.put(\"swing.boldMetal\", Boolean.FALSE);\r\n\t\t\t\tcreateAndShowGUI();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void initComponents() {\n\n setBackground(java.awt.Color.lightGray);\n setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 394, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 294, Short.MAX_VALUE)\n );\n }", "public static void main(String args[]) {\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(InicioSesion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(InicioSesion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(InicioSesion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(InicioSesion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new InicioSesion().setVisible(true);\n }\n });\n }", "public static void main(String[] args) {\r\n /* Set the Nimbus look and feel */\r\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\r\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\r\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html\r\n */\r\n try {\r\n javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());\r\n } catch (ClassNotFoundException ex) {\r\n java.util.logging.Logger.getLogger(FrameCuentasContablesAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (InstantiationException ex) {\r\n java.util.logging.Logger.getLogger(FrameCuentasContablesAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (IllegalAccessException ex) {\r\n java.util.logging.Logger.getLogger(FrameCuentasContablesAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\r\n java.util.logging.Logger.getLogger(FrameCuentasContablesAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n }\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n //</editor-fold>\r\n\r\n /* Create and display the form */\r\n EventQueue.invokeLater(new Runnable() {\r\n public void run() {\r\n JFrame frame = new JFrame();\r\n frame.setContentPane(new FrameCuentasContablesAdmin());\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.pack();\r\n frame.setVisible(true);\r\n }\r\n });\r\n }", "public ShiBai1() {\n initComponents();\n this.getContentPane().setBackground(new Color(95,158,160)); \n this.getContentPane().setVisible(true);//如果改为true那么就变成了红色。 \n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n Center.setCenter(this);\n this.setVisible(true);\n }", "private void colorSetup(){\n Color color2 = Color.GRAY;\n Color color = Color.LIGHT_GRAY;\n this.setBackground(color);\n this.mainPanel.setBackground(color);\n this.leftPanel.setBackground(color);\n this.rightPanel.setBackground(color);\n this.rightCenPanel.setBackground(color);\n this.rightLowPanel.setBackground(color);\n this.rightTopPanel.setBackground(color);\n this.inputPanel.setBackground(color);\n this.controlPanel.setBackground(color);\n this.setupPanel.setBackground(color);\n this.cameraPanel.setBackground(color);\n this.jPanel4.setBackground(color);\n this.sensSlider.setBackground(color); \n }", "private void menuNimbusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuNimbusActionPerformed\n try {\n UIManager.setLookAndFeel(\"com.sun.java.swing.plaf.motif.MotifLookAndFeel\");\n SwingUtilities.updateComponentTreeUI(this);\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Windows\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Frame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Frame().setVisible(true);\n }\n });\n }", "public static void main(String[] args) throws Exception{\n\t\tUIManager.setLookAndFeel(new NimbusLookAndFeel());\n\t\t\n\t\t\n\t\tMyWindow myWindow = new MyWindow();\n\t\tmyWindow.setVisible(true);\n\n\t}", "public CalculatorGUI() {\n initComponents();\n setTitle(\"Calculator\");\n //setLookAndFeel(\"Windows\");\n }", "public void initGui() {\n setOpaque(true);\n // Setter utgangsfargen til ruten\n if (this.farge.equals(\"hvit\")) setBackground(GUISettings.Hvit());\n if (this.farge.equals(\"sort\")) setBackground(GUISettings.Sort());\n if (this.farge.equals(\"roed\")) setBackground(GUISettings.Roed());\n if (this.farge.equals(\"blaa\")) setBackground(GUISettings.Blaa());\n }", "public HoloJFrame() {\n Java2.setSystemLookAndFeel();\n initComponents();\n initFileList(holoCB);\n initFileList(refCB);\n\t\t\n }", "public Lent() {\n\t\tinitComponents();\n\t\tthis.setBounds(150, 50, 1050, 650);\n\t\t//设置背景\n\t\tsetBackgroudImage();\n\t\t//窗体大小不可变\n\t\tthis.setResizable(false);\n\t\t//设置窗体图标\n\t\tToolkit tool = this.getToolkit(); //得到一个Toolkit对象\n\t\tImage myimage = tool.getImage(\"img/4.png\"); //由tool获取图像\n\t\tthis.setIconImage(myimage);\n\t}" ]
[ "0.7476397", "0.71138513", "0.6953357", "0.6857919", "0.6632993", "0.661241", "0.66028357", "0.65616596", "0.6535818", "0.65231395", "0.6477454", "0.646058", "0.6456272", "0.63558096", "0.63337916", "0.6322381", "0.62977475", "0.6290675", "0.62292904", "0.6221355", "0.6205944", "0.62015367", "0.6161997", "0.6069677", "0.60467005", "0.59919095", "0.59907424", "0.5979807", "0.5957865", "0.59446317", "0.59381586", "0.5930961", "0.5929884", "0.59286237", "0.5904165", "0.58976334", "0.589316", "0.5879676", "0.5821624", "0.5812561", "0.5808854", "0.57994664", "0.57720125", "0.57619107", "0.57481563", "0.57284665", "0.5721238", "0.57206964", "0.56890845", "0.56760824", "0.5670808", "0.56489253", "0.5647818", "0.56394374", "0.5637285", "0.56221056", "0.5615995", "0.5601543", "0.55994904", "0.5591092", "0.55677474", "0.5557017", "0.5548042", "0.55465025", "0.55375266", "0.5530181", "0.5517276", "0.5516466", "0.55117667", "0.5509579", "0.5509473", "0.5481757", "0.54698545", "0.54665136", "0.54625344", "0.5461938", "0.54524326", "0.54519075", "0.54451185", "0.5443625", "0.5424231", "0.5416036", "0.5413741", "0.5409345", "0.5406121", "0.54037505", "0.53964263", "0.5388966", "0.53812337", "0.5379688", "0.5378659", "0.5373995", "0.53715706", "0.53594613", "0.53589827", "0.5351079", "0.5341043", "0.53408474", "0.5338902", "0.5322371" ]
0.63335896
15
Load all configurations from files.
public static void loadConfig() throws Exception { unloadConfig(); ConfigManager cm = ConfigManager.getInstance(); cm.add(new File("test_files/stresstest/" + CONFIG_FILE).getAbsolutePath()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadConfigs() {\n\t configYML = new ConfigYML();\n\t configYML.setup();\n }", "public static void loadFromFile() {\n\t\tloadFromFile(Main.getConfigFile(), Main.instance.getServer());\n\t}", "public void loadConfigurations(Dictionary configurations) {\n\t}", "public void setConfigFiles(final Set<String> configFiles) {\n final Properties properties = new Properties();\n\n try {\n configFiles.forEach(x -> {\n final Resource resource = new ClassPathResource(x);\n logger.info(this.getClass().getName() + \" loading properties from \" + resource.getFilename());\n\n try {\n try (InputStream inputStream = resource.getInputStream()) {\n final Properties prop = new Properties();\n prop.load(inputStream);\n if (prop != null) {\n properties.putAll(prop);\n }\n }\n }\n catch (final Exception e) {\n System.out.println(\"Error occurs, message: \" + e.getMessage());\n }\n });\n }\n catch (final Exception e) {\n System.out.println(\"Error occurs, message: \" + e.getMessage());\n }\n\n /*System.out.print(\"All properties resolved.\\n \");\n final Enumeration<?> propertySet = properties.propertyNames();\n \n while (propertySet.hasMoreElements()) {\n final String candidate = (String) propertySet.nextElement();\n System.out.print(candidate + \" = \" + properties.getProperty(candidate) + \"\\n \");\n }\n System.out.println();\n */\n\n this.setProperties(properties);\n }", "public void loadConfig() {\n\t}", "@Test\n public final void testConfigurationParser() {\n URL resourceUrl = this.getClass().getResource(configPath);\n File folder = new File(resourceUrl.getFile());\n for (File configFile : folder.listFiles()) {\n try {\n System.setProperty(\"loadbalancer.conf.file\", configFile.getAbsolutePath());\n LoadBalancerConfiguration.getInstance();\n } finally {\n LoadBalancerConfiguration.clear();\n }\n }\n }", "public void load() throws FileNotFoundException {\n loadConfig();\n initRepos();\n }", "public static void load() {\n try {\n File confFile = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION);\n UtilSystem.recoverFileIfRequired(confFile);\n // Conf file doesn't exist at first launch\n if (confFile.exists()) {\n // Now read the conf file\n InputStream str = new FileInputStream(confFile);\n try {\n properties.load(str);\n } finally {\n str.close();\n }\n }\n } catch (Exception e) {\n Log.error(e);\n Messages.showErrorMessage(114);\n }\n }", "public static void loadGameConfiguration() {\n File configFile = new File(FileUtils.getRootFile(), Constant.CONFIG_FILE_NAME);\n manageGameConfigFile(configFile);\n }", "public FileConfiguration loadConfiguration(File file);", "private static void loadConfigs(String[] args) {\n String chosenConfigFile, chosenSensorsFile;\n\n // select config files (allow for specifying)\n if(args.length >= 2) {\n chosenConfigFile = args[0];\n chosenSensorsFile = args[1];\n }\n else {\n chosenConfigFile = DEFAULT_CONFIG_FILE;\n chosenSensorsFile = DEFAULT_SENSORS_FILE;\n }\n // filenames starting with \"/\" and \"./\" are later interpreted as being outside JAR\n if(chosenConfigFile.charAt(0) == '/' || chosenConfigFile.substring(0, 2).equals(\"./\"))\n System.out.println(\"retreiving \" + chosenConfigFile + \" from this filesystem (not the JAR)\");\n if(chosenSensorsFile.charAt(0) == '/' || chosenSensorsFile.substring(0, 2).equals(\"./\"))\n System.out.println(\"retreiving \" + chosenSensorsFile + \" from this filesystem (not the JAR)\");\n\n // load general configuration\n Properties props = new Properties();\n try {\n if(chosenConfigFile.charAt(0) == '/' || chosenConfigFile.substring(0, 2).equals(\"./\"))\n // get the config file from the user's filesystem\n props.load(new FileInputStream(new File(chosenConfigFile)));\n else\n // get the config file saved in this JAR\n props.load(Main.class.getResourceAsStream(\"/\" + chosenConfigFile));\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n // load sensors\n if(chosenSensorsFile.charAt(0) == '/' || chosenSensorsFile.substring(0, 2).equals(\"./\"))\n // get the sensors file from the user's filesystem\n sensors = ConfigLoader.getSensorsFromFile(chosenSensorsFile);\n else\n // get the sensors file saved in this JAR\n sensors = ConfigLoader.getSensorsFromFile(Main.class.getResourceAsStream(\"/\" + chosenSensorsFile));\n }", "public void loadConfig(){\n \t\tFile configDir = this.getDataFolder();\n \t\tif (!configDir.exists())\n \t\t\tconfigDir.mkdir();\n \n \t\t// Check for existance of config file\n \t\tFile configFile = new File(this.getDataFolder().toString() + \"/config.yml\");\n \t\tconfig = YamlConfiguration.loadConfiguration(configFile);\n \t\t\n \t\t// Adding Variables\n \t\tif(!config.contains(\"Debug\"))\n \t\t{\n \t\t\tconfig.addDefault(\"Debug\", false);\n \t \n \t config.addDefault(\"Worlds\", \"ExampleWorld1, ExampleWorld2\");\n \t\n\t config.addDefault(\"Regions.Residence\", \"ExampleWorld.ExampleResRegion1, ExampleWorld.ExampleResRegion2\");\n \t \n\t config.addDefault(\"Regions.WorldGuard\", \"ExampleWorld.ExampleWGRegion1, ExampleWorld.ExampleWGRegion2\"); \n \t\t}\n \n // Loading the variables from config\n \tdebug = (Boolean) config.get(\"Debug\");\n \tpchestWorlds = (String) config.get(\"Worlds\");\n \tpchestResRegions = (String) config.get(\"Regions.Residence\");\n \tpchestWGRegions = (String) config.get(\"Regions.WorldGuard\");\n \n if(pchestWorlds != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Chests Worlds: \" + pchestWorlds);\n }\n \n if(pchestResRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Residence Regions: \" + pchestResRegions);\n }\n \n if(pchestWGRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All World Guard Regions: \" + pchestWGRegions);\n }\n \n config.options().copyDefaults(true);\n try {\n config.save(configFile);\n } catch (IOException ex) {\n Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, \"Could not save config to \" + configFile, ex);\n }\n }", "private void initFiles() {\r\n\t\ttry {\r\n\t\t\tFile file = getConfigFile();\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tXmlFile.write(file, new SystemSettings());\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to initialize settings file\", ex);\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void loadFiles(){\n\n\t\t/* Remove all names from the combo boxes to begin with */\n\t\tpath1.removeAllItems();\n\t\tpath2.removeAllItems();\n\n\t\t/* List all files in the current working directory */\n\t\tFile file = new File(\"./\");\n\t\tFile[] configs =file.listFiles();\n\n\t\t/* For every file */\n\t\tfor (int i=0;i<configs.length;i++){\n\n\t\t\t/* Retrieve the name and if it ends with .con extension then add it\n\t\t\t * to the two combo boxes */\n\t\t\tString name = configs[i].getName();\n\t\t\tif((!(name.length()<4)) && name.substring(name.length()-4).equals(\".con\")){\n\t\t\t\tpath1.addItem(name.substring(0,name.length()-4));\n\t\t\t\tpath2.addItem(name.substring(0,name.length()-4));\n\t\t\t}\n\t\t}\n\t}", "public static void load() {\n for (DataSourceSwapper each : ServiceLoader.load(DataSourceSwapper.class)) {\n loadOneSwapper(each);\n }\n }", "private void ReadConfig()\n {\n try\n {\n Yaml yaml = new Yaml();\n\n BufferedReader reader = new BufferedReader(new FileReader(confFileName));\n\n yamlConfig = yaml.loadAll(reader);\n\n for (Object confEntry : yamlConfig)\n {\n //System.out.println(\"Configuration object type: \" + confEntry.getClass());\n\n Map<String, Object> confMap = (Map<String, Object>) confEntry;\n //System.out.println(\"conf contents: \" + confMap);\n\n\n for (String keyName : confMap.keySet())\n {\n //System.out.println(keyName + \" = \" + confMap.get(keyName).toString());\n\n switch (keyName)\n {\n case \"lineInclude\":\n\n for ( String key : ((Map<String, String>) confMap.get(keyName)).keySet())\n {\n lineFindReplace.put(key, ((Map<String, String>) confMap.get(keyName)).get(key).toString());\n }\n\n lineIncludePattern = ConvertToPattern(lineFindReplace.keySet().toString());\n\n break;\n case \"lineExclude\":\n lineExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileExclude\":\n fileExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileInclude\":\n fileIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirExclude\":\n dirExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirInclude\":\n dirIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"urlPattern\":\n urlPattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n }\n }\n }\n\n } catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to read '%s'.\", confFileName);\n e.printStackTrace();\n }\n }", "public void loadSavedConfigsMap() {\n\t\tfinal File folder = new File(serializePath);\n\t\tlistFilesForFolder(folder);\n\t}", "protected final void reloadAllConfigs() {\r\n reloadNonIngameConfigs();\r\n reloadIngameConfigs();\r\n }", "public void loadConfigFiles(JSAPResult parserConfig) throws SimulatorException {\n\t\t// load in the simulator config file\n\t\tString configFile = parserConfig.getString(\"configPath\") + parserConfig.getString(\"simulatorConfigFile\");\n\n\t\tXStream xstream = new XStream();\n\t\txstream.alias(\"SpaceSettlersConfig\", SpaceSettlersConfig.class);\n\t\txstream.alias(\"HighLevelTeamConfig\", HighLevelTeamConfig.class);\n\t\txstream.alias(\"BaseConfig\", BaseConfig.class);\n\t\txstream.alias(\"AsteroidConfig\", RandomAsteroidConfig.class);\n\t\txstream.alias(\"FixedAsteroidConfig\", FixedAsteroidConfig.class);\n\t\txstream.alias(\"FlagConfig\", FlagConfig.class);\n\t\txstream.allowTypesByRegExp(new String[] { \".*\" });\n\n\t\ttry { \n\t\t\tsimConfig = (SpaceSettlersConfig) xstream.fromXML(new File(configFile));\n\t\t} catch (Exception e) {\n\t\t\tthrow new SimulatorException(\"Error parsing config file at string \" + e.getMessage());\n\t\t}\n\n\t\t// load in the ladder config file\n\t\tconfigFile = parserConfig.getString(\"configPath\") + parserConfig.getString(\"ladderConfigFile\");\n\n\t\txstream = new XStream();\n\t\txstream.alias(\"LadderConfig\", LadderConfig.class);\n\t\txstream.alias(\"HighLevelTeamConfig\", HighLevelTeamConfig.class);\n\t\txstream.allowTypesByRegExp(new String[] { \".*\" });\n\n\t\ttry { \n\t\t\tladderConfig = (LadderConfig) xstream.fromXML(new File(configFile));\n\n\t\t\tladderConfig.makePlayerNamesUnique();\n\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new SimulatorException(\"Error parsing config file at string \" + e.getMessage());\n\t\t}\n\n\n\t}", "public T loadConfig(File file) throws IOException;", "public void loadGuilds(Collection<Server> guilds) {\n\t\tfor (var guild : guilds) {\n\t\t\tvar file = dir.resolve(guild.getId() + \".json\");\n\t\t\tvar config = GuildConfig.loadOrCreate(guild, file);\n\t\t\tthis.guilds.put(guild.getId(), config);\n\t\t\tlog.info(\"Loaded guild config for guild {} ({}).\", guild.getName(), guild.getId());\n\t\t}\n\t}", "private void loadSettings() {\r\n \tString fname = baseDir + \"/\" + configFile;\r\n\t\tString line = null;\r\n\r\n\t\t// Load the settings hash with defaults\r\n\t\tsettings.put(\"db_url\", \"\");\r\n\t\tsettings.put(\"db_user\", \"\");\r\n\t\tsettings.put(\"db_pass\", \"\");\r\n\t\tsettings.put(\"db_min\", \"2\");\r\n\t\tsettings.put(\"db_max\", \"10\");\r\n\t\tsettings.put(\"db_query\", \"UPDATE members SET is_activated=1 WHERE memberName=? AND is_activated=3\");\r\n\t\t// Read the current file (if it exists)\r\n\t\ttry {\r\n \t\tBufferedReader input = new BufferedReader(new FileReader(fname));\r\n \t\twhile (( line = input.readLine()) != null) {\r\n \t\t\tline = line.trim();\r\n \t\t\tif (!line.startsWith(\"#\") && line.contains(\"=\")) {\r\n \t\t\t\tString[] pair = line.split(\"=\", 2);\r\n \t\t\t\tsettings.put(pair[0], pair[1]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \tcatch (FileNotFoundException e) {\r\n\t\t\tlogger.warning( \"[SMF] Error reading \" + e.getLocalizedMessage() + \", using defaults\" );\r\n \t}\r\n \tcatch (Exception e) {\r\n \t\te.printStackTrace();\r\n \t}\r\n }", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "private static void loadProperties(final String[] filenames, final Properties props,\n final Properties logProps) {\n\n for(String filename : filenames) {\n\n File f = new File(filename);\n\n if(!f.exists()) {\n System.err.println(\"Start-up error: The configuration file, '\" + f.getAbsolutePath() + \" does not exist\");\n System.exit(1);\n }\n\n if(!f.canRead()) {\n System.err.println(\"Start-up error: The configuration file, '\" + f.getAbsolutePath() + \" is not readable\");\n System.exit(1);\n }\n\n FileInputStream fis = null;\n Properties currProps = new Properties();\n\n try {\n fis = new FileInputStream(f);\n currProps.load(fis);\n if(f.getName().startsWith(\"log.\")) {\n logProps.putAll(resolveLogFiles(currProps));\n } else {\n props.putAll(currProps);\n }\n } catch(IOException ioe) {\n System.err.println(\"Start-up error: Problem reading configuration file, '\" + f.getAbsolutePath() + \"'\");\n Util.closeQuietly(fis);\n fis = null;\n System.exit(1);\n } finally {\n Util.closeQuietly(fis);\n }\n }\n }", "void loadPropertiesFile()\n\t{\n\t\tlogger.info(\"Fetching the properties files\");\n\t\t\n\t\tconfigProp=new Properties(); \n\t\ttry{\tconfigProp.load(loadFile(\"Config.properties\"));\t\t} \n\t\tcatch (IOException e){\tAssert.assertTrue(\"Cannot initialise the Config properties file, Check if the file is corrupted\", false);\t}\t\t\t\n\t}", "static void loadConfiguration() throws Exception {\n cleanConfiguration();\n\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"test_conf/stress/logging.xml\");\n cm.add(\"test_conf/stress/dbconnectionfactory.xml\");\n cm.add(\"test_conf/stress/simplecache.xml\");\n cm.add(\"test_conf/stress/profiletypes.xml\");\n cm.add(\"test_conf/stress/daofactory.xml\");\n cm.add(\"test_conf/stress/dao.xml\");\n }", "private void loadLocalConfig()\n {\n try\n {\n // Load the system config file.\n URL fUrl = Config.class.getClassLoader().getResource( PROP_FILE );\n config.setDelimiterParsingDisabled( true );\n if ( fUrl == null )\n {\n String error = \"static init: Error, null cfg file: \" + PROP_FILE;\n LOG.warn( error );\n }\n else\n {\n LOG.info( \"static init: found from: {} path: {}\", PROP_FILE, fUrl.getPath() );\n config.load( fUrl );\n LOG.info( \"static init: loading from: {}\", PROP_FILE );\n }\n\n URL fUserUrl = Config.class.getClassLoader().getResource( USER_PROP_FILE );\n if ( fUserUrl != null )\n {\n LOG.info( \"static init: found user properties from: {} path: {}\", USER_PROP_FILE, fUserUrl.getPath() );\n config.load( fUserUrl );\n }\n }\n catch ( org.apache.commons.configuration.ConfigurationException ex )\n {\n String error = \"static init: Error loading from cfg file: [\" + PROP_FILE\n + \"] ConfigurationException=\" + ex;\n LOG.error( error );\n throw new CfgRuntimeException( GlobalErrIds.FT_CONFIG_BOOTSTRAP_FAILED, error, ex );\n }\n }", "private void LoadConfigFromClasspath() throws IOException \n {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(\"lrs.properties\");\n config.load(is);\n is.close();\n\t}", "private void loadProperties() {\n\t\t\n\t\tString fldr = env.getProperty(\"response.folder\");\n\t\tthis.repo.setRootFolder( new File(fldr));;\n\t\t\n\t\tint nthConfigItem = 1;\n\t\twhile(true) {\n\t\t\tString seq = (\"\"+nthConfigItem++).trim();\n\t\t\t\n\t\t\tString xpathPropName = \"request.\" + seq + \".xpath\";\n\t\t\tString responseTextFilePropName = \"request.\" + seq + \".response.file\";\n\t\t\tString xpath = env.getProperty(xpathPropName);\n\t\t\tString responseTextFileName = env.getProperty(responseTextFilePropName);\n\t\t\tif (xpath!=null && !\"\".equals(xpath.trim())\n\t\t\t\t&& responseTextFileName!=null & !\"\".equals(responseTextFileName.trim())\t) {\n\t\t\t\t\n\t\t\t\trepo.addFile(xpath, responseTextFileName);\n\t\t\t\tController.logAlways(\"Loading config item [\" + seq + \"] xpath: [\" + rpad(xpath, 60) + \"] data file: [\" + rpad(responseTextFileName,25) + \"]\" );\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tController.logAlways(\"End of littleMock initialization. No more properties from application.properties will be loaded because either [\" + xpathPropName + \"] or [\" + responseTextFilePropName + \"] was not found in application.properties.\");\n\t\t\t\t//parameters in application.properties must be\n\t\t\t\t//in sequential order, starting at 1.\n\t\t\t\t//When we discover the first missing one, stop looking for more.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\thumanReadableConfig = PlaybackRepository.SINGLETON.humanReadable();\n\t}", "public static void LoadIntoConfigFiles()\n {\n \tProperties prop = new Properties();\n ///*\n \ttry {\n \t\t//set the properties value\n \n prop.setProperty(\"comp_name\", \"Teledom International Ltd\");\n prop.setProperty(\"com_city\", \"Lagos\");\n \t\tprop.setProperty(\"State\", \"Lagos\");\n \t\tprop.setProperty(\"logo_con\", \"logo.png\");\n \t\tprop.setProperty(\"front_frame\", \"front.png\");\n prop.setProperty(\"back_frame\", \"back.png\");\n \n \n \n \n \t\t//save properties to project root folder\n \t\tprop.store(new FileOutputStream(setupFileName), null);\n \n \t} catch (IOException ex) {\n \t\tex.printStackTrace();\n }\n // */\n \n \n \n }", "public static void loadConfigurationFile() throws IOException {\n\t\tFileInputStream fis= new FileInputStream(\"config.properties\");\n\t\tprop.load(fis);\n\t}", "public void importConfigs ()\n {\n if (_chooser.showOpenDialog(ConfigEditor.this) == JFileChooser.APPROVE_OPTION) {\n group.load(_chooser.getSelectedFile(), true);\n }\n _prefs.put(\"config_dir\", _chooser.getCurrentDirectory().toString());\n }", "private static void processIncludedConfig() {\n String configName = \"config.\" + getRunMode() + \".properties\";\n\n //relative path cannot be recognized and not figure out the reason, so here use absolute path instead\n InputStream configStream = Configuration.class.getResourceAsStream(\"/\" + configName);\n if (configStream == null) {\n log.log(Level.WARNING, \"configuration resource {0} is missing\", configName);\n return;\n }\n\n try (InputStreamReader reader = new InputStreamReader(configStream, StandardCharsets.UTF_8)) {\n Properties props = new Properties();\n props.load(reader);\n CONFIG_VALUES.putAll(props);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Unable to process configuration {0}\", configName);\n }\n\n }", "private void load() {\n if (loaded) {\n return;\n }\n loaded = true;\n\n if(useDefault){\n ConfigFileLoader.setSource(\n new MhttpdBaseConfigurationSource(\n Bootstrap.getMhttpdBaseFile(), \"server-embed.xml\"));\n }else {\n ConfigFileLoader.setSource(\n new MhttpdBaseConfigurationSource(\n Bootstrap.getMhttpdBaseFile(), getConfigFile()));\n }\n Digester digester = createStartDigester();\n try (ConfigurationSource.Resource resource = ConfigFileLoader.getSource().getServerXml()) {\n InputStream inputStream = resource.getInputStream();\n InputSource inputSource = new InputSource(resource.getUri().toURL().toString());\n inputSource.setByteStream(inputStream);\n digester.push(this);\n digester.parse(inputSource);\n } catch (Exception e) {\n return;\n }\n\n }", "static void loadConfigFile(String fileName) throws Exception {\r\n releaseConfigFiles();\r\n ConfigManager configManager = ConfigManager.getInstance();\r\n configManager.add(\"failure_tests\" + File.separator + fileName);\r\n }", "private Config()\n {\n try\n {\n // Load settings from file\n load();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "public void loadTemplates()\n {\n for (PageTemplate template : templates.values())\n {\n template.load(pageDirectory);\n }\n }", "private void readProperties() {\n // reading config files\n if (driver == null) {\n try {\n fis = new FileInputStream(userDir + \"\\\\src\\\\main\\\\resources\\\\properties\\\\Config.properties\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n config.load(fis);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void load() throws Exception {\n LocalizationContext[] searchContext = pm\n .getLocalSearchHierarchy(LocalizationType.COMMON_STATIC);\n Map<String, LocalizationFile> statConfs = new HashMap<String, LocalizationFile>();\n String[] extensions = new String[] { \".xml\" };\n\n // grab all stats from contexts, allowing overwrite by name\n for (LocalizationContext ctx : searchContext) {\n LocalizationFile[] localizationFiles = pm.listFiles(ctx, STATS_DIR,\n extensions, false, true);\n for (LocalizationFile lf : localizationFiles) {\n String name = lf.getName();\n if (!statConfs.containsKey(name)) {\n statConfs.put(name, lf);\n }\n }\n }\n\n if (!statConfs.isEmpty()) {\n List<StatisticsConfig> myConfigurations = new ArrayList<StatisticsConfig>(\n statConfs.size());\n Map<String, StatisticsEventConfig> myEvents = new HashMap<String, StatisticsEventConfig>();\n\n for (LocalizationFile lf : statConfs.values()) {\n try {\n StatisticsConfig config = lf.jaxbUnmarshal(\n StatisticsConfig.class, jaxbManager);\n if (config != null) {\n validate(myEvents, config);\n if (!config.getEvents().isEmpty()) {\n myConfigurations.add(config);\n }\n }\n } catch (LocalizationException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to open file [\" + lf.getName() + \"]\", e);\n }\n }\n\n configurations = myConfigurations;\n classToEventMap = myEvents;\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 final void load(String... paths){\n\t\tload(null,paths);\n\t}", "public void reload() {\n\t\tfileConfiguration = YamlConfiguration.loadConfiguration(configFile);\n\t\tfinal InputStream defaultConfigStream = plugin.getResource(fileName);\n\t\tif (defaultConfigStream != null) {\n\t\t\tfinal Reader defConfigStream = new InputStreamReader(defaultConfigStream, StandardCharsets.UTF_8);\n\t\t\tfinal YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);\n\t\t\tfileConfiguration.setDefaults(defConfig);\n\t\t}\n\t}", "public void read() {\n\t\tconfigfic = new Properties();\n\t\tInputStream input = ConfigReader.class.getClassLoader().getResourceAsStream(\"source/config.properties\");\n\t\t// on peut remplacer ConfigReader.class par getClass()\n\t\ttry {\n\t\t\tconfigfic.load(input);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public PropertiesFileConfigurationLoader() {\r\n\r\n Method[] declaredMethods = Builder.class.getDeclaredMethods();\r\n\r\n for (Method method : declaredMethods) {\r\n\r\n this.methods.put(method.getName(), method);\r\n }\r\n }", "public void loadConfigurationFromDisk() {\r\n try {\r\n FileReader fr = new FileReader(CONFIG_FILE);\r\n BufferedReader rd = new BufferedReader(fr);\r\n\r\n String line;\r\n while ((line = rd.readLine()) != null) {\r\n if (line.startsWith(\"#\")) continue;\r\n if (line.equalsIgnoreCase(\"\")) continue;\r\n\r\n StringTokenizer str = new StringTokenizer(line, \"=\");\r\n if (str.countTokens() > 1) {\r\n String aux;\r\n switch (str.nextToken().trim()) {\r\n case \"system.voidchain.protocol_version\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.protocolVersion = aux;\r\n continue;\r\n case \"system.voidchain.transaction.max_size\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.transactionMaxSize = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.block.num_transaction\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.numTransactionsInBlock = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.storage.data_file_extension\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.dataFileExtension = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.walletFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.data_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.dataDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.blockFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.walletFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.memory.block_megabytes\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.memoryUsedForBlocks = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.sync.block_sync_port\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockSyncPort = Integer.parseInt(aux);\r\n }\r\n continue;\r\n case \"system.voidchain.crypto.ec_param\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.ecParam = aux;\r\n continue;\r\n case \"system.voidchain.core.block_proposal_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockProposalTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n case \"system.voidchain.blockchain.chain_valid_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockchainValidTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n }\r\n }\r\n }\r\n\r\n fr.close();\r\n rd.close();\r\n\r\n if (this.firstRun)\r\n this.firstRun = false;\r\n } catch (IOException e) {\r\n logger.error(\"Could not load configuration\", e);\r\n }\r\n }", "public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "public static void loadConfig(){\n String filename = ConfigManager.getConfig().getString(LANG_FILE_KEY);\n String langFileName = Language.LANG_FOLDER_NAME + '/' + filename;\n config.setConfigFile(langFileName);\n\n File file = config.getConfigFile();\n if(file.exists()){\n config.loadConfig();\n }else{\n Logger.warn(\"Lang file \\\"\" + filename + \"\\\" doesn't exist\", false);\n Logger.warn(\"Using English language to avoid errors\", false);\n config.clearConfig();\n try{\n config.getBukkitConfig().load(plugin.getResource(Language.EN.getLangFileName()));\n }catch(Exception ex){\n Logger.err(\"An error occurred while loading English language:\", false);\n Logger.err(ex, false);\n }\n }\n//</editor-fold>\n }", "Collection<String> readConfigs();", "@PostConstruct\n private void loadFiles() {\n \n\n File dir = new File(Constants.DIR_PATH);\n File[] files = dir.listFiles(); //stores list of files in given paths\n String line=\"\";\n\n for(File file : files){\n try {\n br = new BufferedReader(new FileReader(file));\n br.readLine();\n while((line=br.readLine())!=null){\n\n String []token=line.split(Constants.DELIMETER);\n String fileName=file.getName().toUpperCase();\n\n FlightData newflight = new FlightData(fileName.substring(0,fileName.lastIndexOf(\".\")),token[0],token[1],token[2],token[3],token[4],token[5],Double.parseDouble(token[6]),token[7],token[8]);\n flightDataDao.insertFlightData(newflight);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "public abstract void loaded() throws ConfigurationException;", "public static ArrayList load(String filePath) throws IOException\n\t{\n\t\tString line;\n\t\tArrayList gameConfigs = new ArrayList();\n\t\tBufferedReader textReader = new BufferedReader(new FileReader(filePath));\n\t\t\n\t\twhile((line = textReader.readLine()) != null)\n\t\t{\n\t\t\tgameConfigs.add(line);\n\t\t}\n\t\t\n\t\ttextReader.close();\n\t\treturn gameConfigs;\n\t}", "public void reloadConfig () {\n if (config == null) {\n if (datafolder == null)\n throw new IllegalStateException();\n config = new File(datafolder, configName);\n }\n this.fileConfiguration = YamlConfiguration.loadConfiguration(config);\n }", "public void loadConfiguration(){\n\t\t\n\t\tString jarLoc = this.getJarLocation();\n\t\tTicklerVars.jarPath = jarLoc;\n\t\tTicklerVars.configPath=TicklerVars.jarPath+TicklerConst.configFileName;\n\t\t\n\t\t//Read configs from conf file\n\t\tif (new File(TicklerVars.configPath).exists()){\n\t\t\ttry {\n\t\t\t\tString line;\n\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(TicklerVars.configPath));\n\t\t\t\twhile ((line =reader.readLine())!= null) {\n\t\t\t\t\tif (line.contains(\"Tickler_local_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.ticklerDir = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Tickler_sdcard_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length()-1);\n\t\t\t\t\t\tTicklerVars.sdCardPath = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Frida_server_path\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.fridaServerLoc = loc;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//Config path does not exist\n\t\t\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"WARNING...... Configuration file does not exist!!!!\\nThe following default configurations are set:\\n\");\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n\t\t\tSystem.out.println(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t\tSystem.out.println(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\n\t\tString x = TicklerVars.ticklerDir;\n\t\tif (TicklerVars.ticklerDir == null || TicklerVars.ticklerDir.matches(\"\\\\s*/\") ){\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler_local_directory. Workspace is set at \"+ TicklerVars.ticklerDir);\n\t\t\tOutBut.printStep(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t}\n\t\t\n\t\tif (TicklerVars.sdCardPath == null || TicklerVars.sdCardPath.matches(\"\\\\s*/\")) {\n\t\t\tTicklerVars.sdCardPath = TicklerConst.sdCardPathDefault;\t\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler's temp directory on the device. It is set to \"+ TicklerVars.sdCardPath);\n\t\t\tOutBut.printStep(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\t\n\t}", "public default void reloadAll() {\n\t\tBukkit.getConsoleSender().sendMessage(\"Reloading \" + getClass().getSimpleName() + \"'s Configs!\");\n\t\treload();\n\t\tBukkit.getConsoleSender().sendMessage(\"Finished \" + getClass().getSimpleName() + \"'s Configs!\");\n\t}", "public void loadArenas() {\n\t\tLogger logger = getLogger();\n\t\tFile arenaFolder = getArenaFolder();\n\t\tif (!arenaFolder.exists()) {\n\t\t\tarenaFolder.mkdirs();\n\t\t}\n\n\t\tCollection<File> arenas = FileUtils.listFiles(arenaFolder, null, false);\n\n\t\tif (arenas.isEmpty()) {\n\t\t\tlogger.info(\"No arenas loaded for \" + getName());\n\t\t\treturn;\n\t\t}\n\n\t\tfor (File file : arenas) {\n\t\t\ttry {\n\t\t\t\tArena arena = new Arena(file);\n\t\t\t\tarena.load();\n\t\t\t\tarenaManager.addArena(arena);\n\t\t\t\tlogger.info((\"Loaded arena \" + arena.toString()));\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tlogger.info(\"Unable to load arena from file: \" + file.getName());\n\t\t\t}\n\t\t}\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate static LinkedHashSet<TestRerunConfiguration> readAllConfigs(File file) {\n\t\tLinkedHashSet<TestRerunConfiguration> configs = new LinkedHashSet<>();\n\t\ttry {\n\t\t\tObjectInputStream stream = new ObjectInputStream(new BufferedInputStream(new FileInputStream(file)));\n\t\t\tfor(;;) {\n\t\t\t\tconfigs.addAll((Collection<TestRerunConfiguration>)stream.readObject());\n\t\t\t}\n\t\t} catch(EOFException e) {\n\t\t\t// Exhausted input\n\t\t} catch(IOException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(\"Failed to read configurations from \" + file);\n\t\t}\n\t\treturn configs;\n\t}", "@Test\n public void testLoadConfigurationFromFile() throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE);\n checkConfiguration();\n }", "@Override\n public void configure() throws Exception {\n BankAccountManagementService bankAccountManagementService = services.get(BankAccountManagementService.class);\n UserManagementService userManagementService = services.get(UserManagementService.class);\n ObjectMapper mapper = JsonMapperFactory.getObjectMapper();\n if (this.filePathAString == null) {\n throw new Exception(\"No config file provided, please set the cashmanager.config.localfile property\");\n }\n LocalFileDTO fileConfig = mapper.readValue(new File(filePathAString), LocalFileDTO.class);\n this.preferences = new HashMap<String, String>(fileConfig.preferences);\n fileConfig.accounts.forEach((account) ->\n bankAccountManagementService.registerNewAcount(account.getId(), account.getBalance())\n );\n fileConfig.users.forEach((user) ->\n userManagementService.registerUser(user.getId(), user.getPassword())\n );\n }", "public void refresh() {\n List<ConfigPath> configPaths = getConfigFiles();\n\n // Delete configs from cache which don't exist on disk anymore\n Iterator<String> currentEntriesIt = confs.keySet().iterator();\n while (currentEntriesIt.hasNext()) {\n String path = currentEntriesIt.next();\n boolean found = false;\n for (ConfigPath configPath : configPaths) {\n if (configPath.path.equals(path)) {\n found = true;\n break;\n }\n }\n if (!found) {\n currentEntriesIt.remove();\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected removed config \" + path + \" in \" + location);\n }\n }\n }\n\n // Add/update configs\n for (ConfigPath configPath : configPaths) {\n CachedConfig cachedConfig = confs.get(configPath.path);\n if (cachedConfig == null || cachedConfig.lastModified != configPath.file.lastModified()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected updated or added config \" + configPath.path + \" in \" + location);\n }\n long lastModified = configPath.file.lastModified();\n ConfImpl conf = parseConfiguration(configPath.file);\n cachedConfig = new CachedConfig();\n cachedConfig.lastModified = lastModified;\n cachedConfig.conf = conf;\n cachedConfig.state = conf == null ? ConfigState.ERROR : ConfigState.OK;\n confs.put(configPath.path, cachedConfig);\n }\n }\n }", "@Override\n public SmarterMap fetchConf() {\n SmarterMap result = new SmarterMap();\n\n List<File> files = new LinkedList<>();\n File conf = new File(path);\n if (conf.isDirectory()) {\n for (File f : conf.listFiles()) {\n if (f.getName().endsWith(\".json\") || f.getName().endsWith(\".yaml\") || f.getName().endsWith(\".yml\")) {\n files.add(f);\n }\n }\n } else {\n files.add(conf);\n }\n\n for (File f : files) {\n if (f.isFile()) {\n String confFileName = f.getName().replaceAll(\"\\\\.[^.]*$\", \"\");\n SmarterMap c = Fwissr.parseConfFile(f);\n mergeConf(result, c, confFileName.split(\"\\\\.\"), TOP_LEVEL_CONF_FILES.contains(confFileName));\n }\n }\n\n return result;\n }", "@Test\n public void testLoadConfigurationFromFileName()\n throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE.getAbsolutePath());\n checkConfiguration();\n }", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "public void reload() {\n reloadConfig();\n loadConfiguration();\n }", "public void initialize() {\n if (!BungeeBan.getInstance().getDataFolder().exists()) {\n BungeeBan.getInstance().getDataFolder().mkdirs();\n }\n File file = this.getConfigurationFile();\n if (!file.exists()) {\n try {\n file.createNewFile();\n if (this.defaultConfig != null) {\n try (InputStream is = BungeeBan.getInstance().getResourceAsStream(this.defaultConfig);\n OutputStream os = new FileOutputStream(file)) {\n ByteStreams.copy(is, os);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.reload();\n }", "private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }", "private static void loadConfig()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal Properties props = ManagerServer.loadProperties(ManagerServer.class, \"/resources/conf.properties\");\n\t\t\tasteriskIP = props.getProperty(\"asteriskIP\");\n\t\t\tloginName = props.getProperty(\"userName\");\n\t\t\tloginPwd = props.getProperty(\"password\");\n\t\t\toutboundproxy = props.getProperty(\"outBoundProxy\");\n\t\t\tasteriskPort = Integer.parseInt(props.getProperty(\"asteriskPort\"));\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tLOG.error(\"IO Exception while reading the configuration file.\", ex);\n\t\t}\n\t}", "@Override\n\tpublic void loadExtraConfigs(Configuration config)\n\t{\n\n\t}", "@Test\n public void testLoadConfiguration() throws ConfigurationException\n {\n factory.setFile(TEST_FILE);\n checkConfiguration();\n }", "@PostConstruct\n\tpublic void init() {\n\t\tif (!Files.isDirectory(Paths.get(configFilePath))) {\n\t\t\ttry {\n\t\t\t\tFiles.createDirectory(Paths.get(configFilePath));\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\"can't create the folder for the configuration\", e);\n\t\t\t}\n\t\t}\n\t\t// schedule the watch service in repeating loop to look for modification\n\t\t// at the jambel configuration files\n\t\tconfigFilesWatchServiceExecutor.scheduleAtFixedRate(\n\t\t\t\tnew ConfigPathWatchService(configFilePath), 0L, 1L,\n\t\t\t\tTimeUnit.MILLISECONDS);\n\t}", "private void loadDefaultConfig() {\r\n ResourceBundle bundle = ResourceLoader.getProperties(DEFAULT_CONFIG_NAME);\r\n if (bundle != null) {\r\n putAll(bundle);\r\n } else {\r\n LOG.error(\"Can't load default Scope config from: \" + DEFAULT_CONFIG_NAME);\r\n }\r\n }", "private void setConfiguration() throws IOException{\n\t\tString confPath = \"mapreduce.conf\";\n\t\tFileInputStream fis = new FileInputStream(confPath);\n\t\tthis.load(fis);\n\t\tfis.close();\n\t}", "public static void loadConfig() throws IOException {\n\t\t// initialize hash map\n\t\tserverOptions = new HashMap<>();\n\t\t// Get config from file system\n\t\tClass<ConfigurationHandler> configurationHandler = ConfigurationHandler.class;\n\t\tInputStream inputStream = configurationHandler.getResourceAsStream(\"/Config/app.properties\");\n\t\tInputStreamReader isReader = new InputStreamReader(inputStream);\n\t //Creating a BufferedReader object\n\t BufferedReader reader = new BufferedReader(isReader);\n\t String str;\n\t while((str = reader.readLine())!= null){\n\t \t if (str.contains(\"=\")) {\n\t \t\t String[] config = str.split(\" = \", 2);\n\t \t serverOptions.put(config[0], config[1]);\n\t \t }\n\t }\n\t}", "public void reloadFile() {\n if (configuration == null) {\n file = new File(plugin.getDataFolder(), fileName);\n }\n configuration = YamlConfiguration.loadConfiguration(file);\n\n // Look for defaults in the jar\n Reader defConfigStream = null;\n try {\n defConfigStream = new InputStreamReader(plugin.getResource(fileName), \"UTF8\");\n } catch (UnsupportedEncodingException ex) {}\n\n if (defConfigStream != null) {\n YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);\n configuration.setDefaults(defConfig);\n }\n }", "private static void readConfigFile() {\n\n BufferedReader input = null;\n try {\n input = new BufferedReader(new FileReader(getConfigFile()));\n String sLine = null;\n while ((sLine = input.readLine()) != null) {\n final String[] sTokens = sLine.split(\"=\");\n if (sTokens.length == 2) {\n m_Settings.put(sTokens[0], sTokens[1]);\n }\n }\n }\n catch (final FileNotFoundException e) {\n }\n catch (final IOException e) {\n }\n finally {\n try {\n if (input != null) {\n input.close();\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n\n }", "public static void processConfig() {\r\n\t\tLOG.info(\"Loading Properties from {} \", propertiesPath);\r\n\t\tLOG.info(\"Opening configuration file ({})\", propertiesPath);\r\n\t\ttry {\r\n\t\t\treadPropertiesFile();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOG.error(\r\n\t\t\t\t\t\"Monitoring system encountered an error while processing config file, Exiting\",\r\n\t\t\t\t\te);\r\n\t\t}\r\n\t}", "public void initFromClasspath() throws IOException {\n \t\tcontactNames = loadFromClassPath(\"contactNames\");\n \t\tgroupNames = loadFromClassPath(\"groupNames\");\n \t\tmessageWords = loadFromClassPath(\"messageWords\");\n \t}", "public void initConfigurations() {\r\n for (int configId = 0; configId < savedConfigurations.length; configId++) {\r\n if (configId == InterfaceConfiguration.HD_TEXTURES.getId()) {\r\n continue;\r\n }\r\n int value = savedConfigurations[configId];\r\n if (value != 0) {\r\n set(configId, value, false);\r\n }\r\n }\r\n }", "private void loadConfig() throws IOException {\n File bStatsFolder = new File(plugin.getDataFolder().getParentFile(), \"bStats\");\n File configFile = new File(bStatsFolder, \"config.yml\");\n Config config = new Config(configFile);\n \n // Check if the config file exists\n if (!config.exists(\"serverUuid\")) {\n // Add default values\n config.set(\"enabled\", true);\n // Every server gets it's unique random id.\n config.set(\"serverUuid\", UUID.randomUUID().toString());\n // Should failed request be logged?\n config.set(\"logFailedRequests\", false);\n // Should the sent data be logged?\n config.set(\"logSentData\", false);\n // Should the response text be logged?\n config.set(\"logResponseStatusText\", false);\n \n DumperOptions dumperOptions = new DumperOptions();\n dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);\n writeFile(configFile,\n \"# bStats collects some data for plugin authors like how many servers are using their plugins.\",\n \"# To honor their work, you should not disable it.\",\n \"# This has nearly no effect on the server performance!\",\n \"# Check out https://bStats.org/ to learn more :)\",\n new Yaml(dumperOptions).dump(config.getRootSection()));\n }\n \n // Load the data\n enabled = config.getBoolean(\"enabled\", true);\n serverUUID = config.getString(\"serverUuid\");\n logFailedRequests = config.getBoolean(\"logFailedRequests\", false);\n logSentData = config.getBoolean(\"logSentData\", false);\n logResponseStatusText = config.getBoolean(\"logResponseStatusText\", false);\n }", "public static void readFiles () throws FileNotFoundException{\n try {\n data.setFeatures(data.readFeatures(\"features.txt\"));\n data.setUnknown(data.readFeatures(\"unknown.txt\"));\n data.setTargets(data.readTargets(\"targets.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"Document not found\");\n }\n }", "private void loadParameters() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new BufferedInputStream(Files.newInputStream(path))));\n\n\t\tdo {\n\t\t\tString line = reader.readLine();\n\t\t\tif (line == null || line.equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (line.startsWith(\"--\") || line.startsWith(\" \")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString[] tokens = line.trim().split(\"\\\\s+\");\n\t\t\tparameters.put(Parameter.valueOf(tokens[0]), tokens[1]);\n\t\t} while (true);\n\n\t}", "public void testFiles(AugeasProxy augeas){\n \t System.out.print(\"Test if all included configuration files was discovered and loaded.\");\n \t AugeasConfigurationApache config = (AugeasConfigurationApache)augeas.getConfiguration();\n \t List<File> configFiles = config.getAllConfigurationFiles();\n \t \n \t /*\n \t * There are three files one main file one which is included from main file and one which is included from \n \t * included file and which is declared in IfModule. All of them must be discovered.\n \t */\n\t boolean found=false;\n \t for (File confFile : configFiles){\n\t found = false;\n \t for (String fileName : ApacheTestConstants.CONFIG_FILE_NAMES){\n \t if (!confFile.getName().equals(fileName))\n\t found= true;\n \t }\n \t assert found;\n \t }\n System.out.println(\" [success!]\");\n \t }", "protected static void loadConfig(String confPath) {\r\n\t\tInputStream in = getRelativeFileStream(confPath);\r\n\t\t\r\n\t\tif(in != null) {\r\n\t\t\ttry {\r\n\t\t\t\tprop.load(in);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlog.error(\"error while load prop dataa from conf: \" + confPath);\r\n\t\t\t}\r\n\t\t} else if(log.isDebugEnabled()) {\r\n\t\t\tlog.debug(\"no corresponding conf file, skip to setup configuraiton for file path: \" + confPath);\r\n\t\t}\r\n\t}", "private void loadConfig()\n {\n File config = new File(\"config.ini\");\n\n if (config.exists())\n {\n try\n {\n BufferedReader in = new BufferedReader(new FileReader(config));\n\n configLine = Integer.parseInt(in.readLine());\n configString = in.readLine();\n socketSelect = (in.readLine()).split(\",\");\n in.close();\n }\n catch (Exception e)\n {\n System.exit(1);\n }\n }\n else\n {\n System.exit(1);\n }\n }", "private void initList() {\n long now = System.nanoTime();\n loadConfig();\n SlogEx.d(TAG, \"load config use:\" + (System.nanoTime() - now));\n }", "private static HisPatientInfoConfiguration loadConfiguration(String filePath) throws HisServiceException{\n File file = new File(filePath);\n if(file != null && file.exists() && file.isFile() ) {\n try {\n configuration = new Yaml().loadAs(new FileInputStream(file), HisPatientInfoConfiguration.class);\n } catch(FileNotFoundException e) {\n log.error(e.getMessage());\n isOK = false;\n throw new HisServiceException(HisServerStatusEnum.NO_CONFIGURATION);\n }\n }\n else {\n isOK = false;\n }\n return configuration;\n }", "public static void load(String filename, Supervisor k) throws FileNotFoundException{\n String source = \"\";\n try {\n Scanner in = new Scanner(new FileReader(filename));\n while(in.hasNext()){\n source = source + in.next();\n }\n } catch (FileNotFoundException ex) {\n //throw ex;\n System.out.println(\"Could not read config file: \" + ex);\n System.out.println(\"trying to create a new one...\");\n String stsa = \"Done!\\n\";\n try (\n Writer writer = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(filename), \"utf-8\"))) {\n writer.write(\"\");\n writer.close();\n }\n \n catch (IOException ex1) {\n stsa = \"\";\n System.out.println(\"FAILED, SKIPPING CONFIG READ BECOUSE:\");\n Logger.getGlobal().warning(ex1.toString());\n System.out.println(\"Console version: \" + ex1.toString());\n }\n System.out.print(stsa);\n }\n LinkedList<String[]> raw = fetch(source);\n \n if(k.Logic == null){\n Logger.getGlobal().warning(\"ENGINE NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n if(k.Logic.Vrenderer == null){\n Logger.getGlobal().warning(\"ENGINE RENDERER NOT INITIALIZED PROPERLY, ABORTING APPLYING CONFIG\");\n return;\n }\n \n for(String[] x: raw){\n String value = x[1];\n if(!k.features_overrideAllStandard)\n switch(x[0]){\n case \"nausea\":\n int numValue = 0;\n try{\n numValue = Integer.parseInt(value);\n }\n catch(Exception e){\n quickTools.alert(\"configReader\", \"invalid nausea value\");\n break;\n }\n if(numValue > 0){\n k.Logic.Vrenderer.dispEffectsEnabled = true;\n }\n //k.Logic.Vrenderer.di\n break;\n default:\n\n break;\n }\n customFeatures(x[0], x[1], k);\n }\n }", "public static void initLoad() throws Exception {\n\n String configPath = System.getProperty(\"config.dir\") + File.separatorChar + \"config.cfg\";\n System.out.println(System.getProperty(\"config.dir\"));\n \n Utils.LoadConfig(configPath); \n /*\n \n // log init load \n String dataPath = System.getProperty(\"logsDir\");\n if(!dataPath.endsWith(String.valueOf(File.separatorChar))){\n dataPath = dataPath + File.separatorChar;\n }\n String logDir = dataPath + \"logs\" + File.separatorChar;\n System.out.println(\"logdir:\" + logDir);\n System.setProperty(\"log.dir\", logDir);\n System.setProperty(\"log.info.file\", \"info_sync.log\");\n System.setProperty(\"log.debug.file\", \"error_sync.log\");\n PropertyConfigurator.configure(System.getProperty(\"config.dir\") + File.separatorChar + \"log4j.properties\");\n */\n }", "public static void loadConfig(String path) throws IOException {\n \tInputStream stream = null;\n \t\n \t// Load the config\n \ttry {\n \t\t// Get the stream\n \t\ttry {\n \t\t\tstream = new FileInputStream(new File(path));\n \t\t} catch(FileNotFoundException e) {\n \t\t\tstream = NotaQL.class.getClassLoader().getResourceAsStream(path);\n \t\t}\n\n \t\tif(stream == null) {\n \t\t\tthrow new FileNotFoundException(\"Unable to find \" + path + \" in classpath.\");\n \t\t}\n\n \t\t\n \t\t// load the properties\n \t\tloadConfig(stream);\n\n \t} finally {\n \t\t// Always close the stream if any\n \t\tif (stream != null)\n \t\t\tstream.close();\n\t\t}\n }", "private static void loadFiles(String[] files) throws IOException {\n\t\tfor(String file : files){\n\n\t\t\t//Create reader for the file\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\n\t\t\t//Create HashMap to store words and counts\n\t\t\tHashMap<String,WordCount> fileWordCounts = new HashMap<String,WordCount>();\n\t\t\tArrayList<String> sentences = new ArrayList<String>();\n\n\t\t\t//While the file still has more lines to be read from\n\t\t\twhile(fileReader.ready()){\n\n\t\t\t\t//Read a line from the file\n\t\t\t\tString fileLine = fileReader.readLine();\n\t\t\t\t//Add the line to file sentences\n\t\t\t\tsentences.add(fileLine);\n\t\t\t\t//Split the file and remove punctuation from words\n\t\t\t\tString[] fileWords = fileLine.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase().split(\"\\\\s+\");\n\n\t\t\t\t//iterate through all words in each line\n\t\t\t\tfor (String word : fileWords)\n\t\t\t\t{\n\t\t\t\t\tWordCount count = fileWordCounts.get(word);\n\t\t\t\t\t//If word is not in file, add it \n\t\t\t\t\tif (count == null) {\n\t\t\t\t\t\tfileWordCounts.put(word,new WordCount(word));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount.inc(); //If not, increment it\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\n\t\t\t//Add file to fileDatabase \n\t\t\tfileDatabase.map.put(file, new FileObject(file, fileWordCounts, sentences));\n\n\t\t\tfileReader.close(); // Close File\n\n\t\t}//End of For Loop reading from all files\n\t}", "private void loadExtensionResources() {\n\n for (String extensionType : ExtensionMgtUtils.getExtensionTypes()) {\n Path path = ExtensionMgtUtils.getExtensionPath(extensionType);\n if (log.isDebugEnabled()) {\n log.debug(\"Loading default templates from: \" + path);\n }\n\n // Check whether the given extension type directory exists.\n if (!Files.exists(path) || !Files.isDirectory(path)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Default templates directory does not exist: \" + path);\n }\n continue;\n }\n\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addExtensionType(extensionType);\n\n // Load extensions from the given extension type directory.\n try (Stream<Path> directories = Files.list(path).filter(Files::isDirectory)) {\n directories.forEach(extensionDirectory -> {\n try {\n // Load extension info.\n ExtensionInfo extensionInfo = loadExtensionInfo(extensionDirectory);\n if (extensionInfo == null) {\n throw new ExtensionManagementException(\"Error while loading extension info from: \"\n + extensionDirectory);\n }\n extensionInfo.setType(extensionType);\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addExtension(extensionType,\n extensionInfo.getId(), extensionInfo);\n // Load templates.\n JSONObject template = loadTemplate(extensionDirectory);\n if (template != null) {\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addTemplate(extensionType,\n extensionInfo.getId(), template);\n }\n // Load metadata.\n JSONObject metadata = loadMetadata(extensionDirectory);\n if (metadata != null) {\n ExtensionManagerDataHolder.getInstance().getExtensionStore().addMetadata(extensionType,\n extensionInfo.getId(), metadata);\n }\n } catch (ExtensionManagementException e) {\n log.error(\"Error while loading resource files in: \" + extensionDirectory, e);\n }\n });\n } catch (IOException e) {\n log.error(\"Error while loading resource files in: \" + path, e);\n }\n }\n }", "public void loadStorageConfiguration() throws IOException {\n String loadedConfigurationFile;\n if (this.configFile != null) {\n loadedConfigurationFile = this.configFile;\n this.configuration = StorageConfiguration.load(new FileInputStream(new File(this.configFile)));\n } else {\n // We load configuration file either from app home folder or from the JAR\n Path path = Paths.get(appHome + \"/conf/storage-configuration.yml\");\n if (appHome != null && Files.exists(path)) {\n loadedConfigurationFile = path.toString();\n this.configuration = StorageConfiguration.load(new FileInputStream(path.toFile()));\n } else {\n loadedConfigurationFile = StorageConfiguration.class.getClassLoader().getResourceAsStream(\"storage-configuration.yml\")\n .toString();\n this.configuration = StorageConfiguration\n .load(StorageConfiguration.class.getClassLoader().getResourceAsStream(\"storage-configuration.yml\"));\n }\n }\n\n // logLevel parameter has preference in CLI over configuration file\n if (this.logLevel == null || this.logLevel.isEmpty()) {\n this.logLevel = \"info\";\n }\n configureDefaultLog(this.logLevel);\n\n // logFile parameter has preference in CLI over configuration file, we first set the logFile passed\n// if (this.logFile != null && !this.logFile.isEmpty()) {\n// this.configuration.setLogFile(logFile);\n// }\n\n // If user has set up a logFile we redirect logs to it\n// if (this.logFile != null && !this.logFile.isEmpty()) {\n// org.apache.log4j.Logger rootLogger = LogManager.getRootLogger();\n//\n// // If a log file is used then console log is removed\n// rootLogger.removeAppender(\"stderr\");\n//\n// // Creating a RollingFileAppender to output the log\n// RollingFileAppender rollingFileAppender = new RollingFileAppender(new PatternLayout(\"%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - \"\n// + \"%m%n\"), this.logFile, true);\n// rollingFileAppender.setThreshold(Level.toLevel(this.logLevel));\n// rootLogger.addAppender(rollingFileAppender);\n// }\n\n logger.debug(\"Loading configuration from '{}'\", loadedConfigurationFile);\n }", "private static synchronized void init() {\n if (CONFIG_VALUES != null) {\n return;\n }\n\n CONFIG_VALUES = new Properties();\n processLocalConfig();\n processIncludedConfig();\n }", "public final void loadPropertiesFromFile(final String fileName)\n {\n\n Properties tempProp = PropertyLoader.loadProperties(fileName);\n fProp.putAll(tempProp);\n\n }", "public ConfigsUtils() {\r\n mConfig = new Properties();\r\n try {\r\n mConfig.load(new FileInputStream(CONFIG_FILE_PATH));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public ConfiguredMethods(String configureFilePath) {\n\t\ttry {\n\t\t\tupdateConfiguration(configureFilePath);\n\t\t\tLog.i(\"load configuration file successfully\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tLog.e(\"load configuration file fail!!!\");\n\t\t}\n\t}", "private static void loadSettings() {\n try {\n File settings = new File(\"settings.txt\");\n //Options\n BufferedReader reader = new BufferedReader(new FileReader(settings));\n defaultSliderPosition = Double.parseDouble(reader.readLine());\n isVerticalSplitterPane = Boolean.parseBoolean(reader.readLine());\n verboseCompiling = Boolean.parseBoolean(reader.readLine());\n warningsEnabled = Boolean.parseBoolean(reader.readLine());\n clearOnMethod = Boolean.parseBoolean(reader.readLine());\n compileOptions = reader.readLine();\n runOptions = reader.readLine();\n //Colors\n for(int i = 0; i < colorScheme.length; i++) \n colorScheme[i] = new Color(Integer.parseInt(reader.readLine()));\n\n for(int i = 0; i < attributeScheme.length; i++) {\n attributeScheme[i] = new SimpleAttributeSet();\n attributeScheme[i].addAttribute(StyleConstants.Foreground, colorScheme[i]);\n }\n\n theme = reader.readLine();\n\n reader.close(); \n } catch (FileNotFoundException f) {\n println(\"Couldn't find the settings. How the hell.\", progErr);\n } catch (IOException i) {\n println(\"General IO exception when loading settings.\", progErr);\n } catch (Exception e) {\n println(\"Catastrophic failure when loading settings.\", progErr);\n println(\"Don't mess with the settings file, man!\", progErr);\n }\n }", "public void loadAllConnections(String filename) throws Exception {\r\n BufferedReader br = new BufferedReader(new FileReader(filename));\r\n String connection;\r\n while ((connection = br.readLine()) != null) {\r\n String name1 = connection.substring(0, connection.indexOf(\",\"));\r\n String name2 = connection.substring(connection.indexOf(\",\") + 2);\r\n addConnection(name1, name2);\r\n }\r\n }", "public void processFiles(){\n\t\tfor(String fileName : files) {\n\t\t\ttry {\n\t\t\t\tloadDataFromFile(fileName);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"Can't open file: \" + fileName);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tprintInOrder();\n\t\t\tstudents.clear();\n\t\t}\n\t}", "public void reload(){\n\t\tplugin_configuration.load();\n\t\tflarf_configuration.load();\n\t\tmessages_configuration.load();\n\t\tstadiumlisting.load();\n\t}" ]
[ "0.71509385", "0.68861043", "0.68239623", "0.66869605", "0.6636681", "0.662102", "0.6613157", "0.63995886", "0.6375427", "0.6348021", "0.6265025", "0.62435544", "0.6204592", "0.6202941", "0.6130943", "0.60744804", "0.6063121", "0.6062016", "0.60345966", "0.6034291", "0.60189724", "0.59870225", "0.5986666", "0.5973425", "0.5946043", "0.5934317", "0.5918955", "0.589096", "0.5879324", "0.5861006", "0.5855791", "0.5819487", "0.5816054", "0.5780839", "0.5760606", "0.57445997", "0.5738945", "0.5705117", "0.57049376", "0.57018584", "0.57000905", "0.5698627", "0.5696547", "0.569315", "0.56666124", "0.56645626", "0.56440425", "0.56418663", "0.5623878", "0.5622064", "0.56186515", "0.5613119", "0.56130695", "0.56014097", "0.55896634", "0.55813515", "0.5580714", "0.55741787", "0.5571437", "0.55671906", "0.5560193", "0.5559287", "0.5558156", "0.5535768", "0.5515858", "0.55144006", "0.5503554", "0.5496736", "0.54955137", "0.54937595", "0.5486672", "0.5486117", "0.54579103", "0.54514873", "0.5445869", "0.5432249", "0.5429283", "0.54289144", "0.5423093", "0.5418257", "0.5413893", "0.54124075", "0.54094106", "0.54070854", "0.5403182", "0.54024917", "0.53891164", "0.5388775", "0.53875333", "0.5377148", "0.5371692", "0.5359931", "0.5356215", "0.53547764", "0.535231", "0.5346859", "0.5338432", "0.533582", "0.5329596", "0.532344" ]
0.5761654
34
unload all configurations from files.
public static void unloadConfig() throws Exception { ConfigManager cm = ConfigManager.getInstance(); for (Iterator it = cm.getAllNamespaces(); it.hasNext();) { cm.removeNamespace((String) it.next()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@After\n public void cleanUp() {\n mApConfigFile.delete();\n }", "static void releaseConfigFiles() throws Exception {\r\n ConfigManager configManager = ConfigManager.getInstance();\r\n for (Iterator iterator = configManager.getAllNamespaces(); iterator.hasNext();) {\r\n configManager.removeNamespace((String) iterator.next());\r\n }\r\n }", "public void clean(){\n preprocessorActionsPerFile.clear();\n }", "protected final void reloadAllConfigs() {\r\n reloadNonIngameConfigs();\r\n reloadIngameConfigs();\r\n }", "public void close() {\n saveConfigurationSettings();\n removeAllLogHandlers();\n try {\n Constants.PREFS.flush();\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n }", "private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }", "protected void tearDown() throws Exception {\r\n super.tearDown();\r\n clearFiles();\r\n StressTestHelper.clearConfig();\r\n }", "void closeFiles() {\n try {\n inputFile.close();\n debugFile.close();\n reportFile.close();\n workFile.close();\n stnFile.close();\n } catch(Exception e) {}\n }", "public void dispose() {\n Collection<File> values = compareFiles.values();\n for (File file : values) {\n file.delete();\n }\n\n compareFiles.clear();\n }", "private void unregisterConfigs() throws JMException {\n unregisterMBeans(configmap);\n }", "static void cleanConfiguration() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n\n List namespaces = new ArrayList();\n\n // iterate through all the namespaces and delete them.\n for (Iterator it = cm.getAllNamespaces(); it.hasNext();) {\n namespaces.add(it.next());\n }\n\n for (Iterator it = namespaces.iterator(); it.hasNext();) {\n cm.removeNamespace((String) it.next());\n }\n }", "public void close() {\n\t\tconfigurationReloader.shutdown();\n\t}", "static void clean(Configuration conf) throws IOException {\n if (!debug(conf)) {\n int iteration = getCurrentIteration(conf);\n for (int i = 0; i <= iteration; i++) {\n deleteIfExists(conf, OUTPUT_BASE + i);\n deleteIfExists(conf, OUTPUT_BASE + i + TEMP_SUFFIX);\n deleteIfExists(conf, SCHEMA_BASE + i);\n }\n deleteIfExists(conf, \"input\");\n }\n }", "public static synchronized void cleanup() {\n if (defaultDataSourceInitialized) {\n // try to deregister bundled H2 driver\n try {\n final Enumeration<Driver> drivers = DriverManager.getDrivers();\n while (drivers.hasMoreElements()) {\n final Driver driver = drivers.nextElement();\n if (\"org.h2.Driver\".equals(driver.getClass().getCanonicalName())) {\n // deregister our bundled H2 driver\n LOG.info(\"Uninstalling bundled H2 driver\");\n DriverManager.deregisterDriver(driver);\n }\n }\n } catch (Exception e) {\n LOG.warn(\"Failed to deregister H2 driver\", e);\n }\n }\n \n dataSourcesByName.clear();\n for (int i = 0; i < dataSources.length; i++) {\n dataSources[i] = null;\n }\n for (int i = 0; i < dataSourcesNoTX.length; i++) {\n dataSourcesNoTX[i] = null;\n }\n globalDataSource = null;\n testDataSource = null;\n testDataSourceNoTX = null;\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n if (!isChangingConfigurations()) {\n pickiT.deleteTemporaryFile(this);\n }\n }", "protected void tearDown() {\n config = null;\n }", "@AfterClass\r\n\tpublic static void testCleanup() {\r\n\t\tConfig.teardown();\r\n\t}", "protected void tearDown() throws Exception {\r\n super.tearDown();\r\n FailureTestHelper.unloadConfig();\r\n }", "protected void tearDown()\n {\n super.tearDown();\n ClassLoader classLoader = getClass().getClassLoader();\n File folder = null;\n try\n {\n folder = new File(classLoader.getResource(\"levels\").toURI().getPath());\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n File[] listOfFiles = folder.listFiles();\n\n for (File f : listOfFiles)\n {\n if (!f.getPath().contains(\"level1.txt\") && !f.getPath().contains(\"level2.txt\") &&\n !f.getPath().contains(\"level3.txt\"))\n {\n try\n {\n Files.delete(f.toPath());\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n }", "static void clearConfig() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n Iterator it = cm.getAllNamespaces();\n List nameSpaces = new ArrayList();\n\n while (it.hasNext()) {\n nameSpaces.add(it.next());\n }\n\n for (int i = 0; i < nameSpaces.size(); i++) {\n cm.removeNamespace((String) nameSpaces.get(i));\n }\n }", "protected void unloadSections() {\n\t\tsuper.unloadSections();\n\t}", "public void reload() {\n reloadConfig();\n loadConfiguration();\n }", "@AfterClass\n public static void cleanup() throws Exception {\n fs.delete(new Path(baseDir), true);\n }", "public void unload() {\n plugin.getEngine().getWorldProvider().getHeartbeat().unsubscribe(WIND);\n plugin.getRootConfig().unsubscribe(TEMPERATURES);\n }", "public void reload(){\n\t\tplugin_configuration.load();\n\t\tflarf_configuration.load();\n\t\tmessages_configuration.load();\n\t\tstadiumlisting.load();\n\t}", "public default void reloadAll() {\n\t\tBukkit.getConsoleSender().sendMessage(\"Reloading \" + getClass().getSimpleName() + \"'s Configs!\");\n\t\treload();\n\t\tBukkit.getConsoleSender().sendMessage(\"Finished \" + getClass().getSimpleName() + \"'s Configs!\");\n\t}", "public void reload() {\n\t\tfileConfiguration = YamlConfiguration.loadConfiguration(configFile);\n\t\tfinal InputStream defaultConfigStream = plugin.getResource(fileName);\n\t\tif (defaultConfigStream != null) {\n\t\t\tfinal Reader defConfigStream = new InputStreamReader(defaultConfigStream, StandardCharsets.UTF_8);\n\t\t\tfinal YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);\n\t\t\tfileConfiguration.setDefaults(defConfig);\n\t\t}\n\t}", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }", "@Override\n\tpublic void deconfigure() throws CoreException {\n\t\tPTJavaFileBuilder.removeBuilderFromProject(fProject);\n\t\t// TO DO: delete markers here\n\t}", "@AfterClass\n\tpublic static void cleanup() {\n\t\ttestDir.delete();\n\t\tfile.delete();\n\t}", "protected void unloadSections() \n\t{\n\t\tsuper.unloadSections();\n\t}", "protected void unloadSections() {\n\t\tcoff.close();//make sure to close the file\n\t\tfor(int i=0; i < numPages; i++){\n\t\t\tUserKernel.addPhysicalPage(pageTable[i].ppn);\n\t\t\tpageTable[i] = null;\n\t\t}\n\t\tpageTable = null;\n\t}", "public static void resetConfiguration() {\n\t\t// Ignore\n\t}", "private void closeConfiguration() {\n checkSave();\n frame.getContentPane().removeAll();\n frame.repaint();\n configClose.setEnabled(false);\n }", "public static void clear() {\r\n for (ConfigurationOption<?> opt : OPTIONS.values()) {\r\n opt.clear();\r\n }\r\n }", "public void clear()\n {\n normalImports.clear();\n wildcardImports.clear();\n }", "@After\n\tpublic void cleanUp() {\n\t\tsuper.unload();\n\n\t\t// shutdown the database\n\t\tif (db != null) {\n\t\t\tdb.shutDownDb();\n\t\t}\n\t\tassertTrue(Files.deleteDir(tmpDir));\n\t}", "@After\n public void pslBaseCleanup() {\n AbstractRule.unregisterAllRulesForTesting();\n\n // Close any known open models.\n TestModel.ModelInformation.closeAll();\n\n // Clear all options.\n Options.clearAll();\n\n disableLogger();\n }", "public synchronized void unRegisterAll()\r\n {\r\n clearNameObjectMaps();\r\n }", "public static void reload() {\n\t\tif (getConfigManager() != null) {\n\t\t\tgetConfigManager().reload();\n\t\t}\n\t\tfor (Iterator i = getInstance().configGroups.keySet().iterator(); i.hasNext(); ) {\n\t\t\tString group = (String) i.next();\n\t\t\tif (getConfigManager(group) != null) {\n\t\t\t\tgetConfigManager(group).reload();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "protected void tearDown() throws Exception {\n panel = null;\n propertiesPanel = null;\n\n TestHelper.clearConfigFile(TestHelper.NAMESPACE);\n }", "public void unloadRounds ()\n {\n log.info(\"Unloading Rounds\");\n\n Scheduler scheduler = Scheduler.getScheduler();\n scheduler.unloadRounds(true);\n }", "public static void reset() {\n Set<Map.Entry<Class<?>, DatabaseDefinition>> entrySet = globalDatabaseHolder.databaseClassLookupMap.entrySet();\n for (Map.Entry<Class<?>, DatabaseDefinition> value : entrySet) {\n value.getValue().reset(getContext());\n }\n globalDatabaseHolder.reset();\n loadedModules.clear();\n }", "static void dispose() {\n for (final Writer w : logFiles.values()) {\n try {\n w.close();\n } catch (IOException ioe) {\n // don't care\n }\n }\n logFiles.clear();\n }", "public void unload() throws IOException;", "private void exitConfiguration() {\n checkSave();\n System.exit(0);\n }", "public void shutdown() {\n\t\tint i = 0;\n\t\twhile (i < openFiles.size()) {\n\t\t\tPhile phile = openFiles.get(i);\n\t\t\ttry {\n\t\t\t\tclose(phile);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\ti++;\n\t\t}\n }", "@AfterClass\n public static void tearDown() throws IOException {\n // delete testing-specific application.conf\n appConf.delete();\n\n // if there already was an application.conf present, rename and move it back.\n if(tempAppConf.exists()) {\n Files.move(\n tempAppConf.toPath(),\n appConf.toPath()\n );\n }\n }", "public void resetConfiguration() {\n\t\tthis.hierarchy.resetConfiguration();\n\t}", "@VisibleForTesting\n void clear() {\n try {\n configStore.delete(NamespaceId.SYSTEM.getNamespace(), TYPE, NAME);\n } catch (ConfigNotFoundException e) {\n // does not matter, ignore it\n }\n }", "public static void ResetPreferences() throws Exception{\n File root = InstrumentationRegistry.getTargetContext().getFilesDir().getParentFile();\n String[] sharedPreferencesFileNames = new File(root, \"shared_prefs\").list();\n try{\n for (String fileName : sharedPreferencesFileNames) {\n InstrumentationRegistry.getTargetContext().getSharedPreferences(fileName.replace(\".xml\", \"\"), Context.MODE_PRIVATE).edit().clear().commit();\n }\n }\n catch (NullPointerException exp){}\n\n }", "public void unloaded(){\n\t\tloaded=false;\n\t}", "public void exit(String config_file) {\n\t\tif (config_file != null) {\n\t\t\tstoreConfiguration(config_file);\n\t\t}\n\t}", "public void cleanup() {\r\n\t\tsuper.cleanup();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).cleanup();\t\r\n\t\t}\r\n\t}", "public void reloadConfig () {\n if (config == null) {\n if (datafolder == null)\n throw new IllegalStateException();\n config = new File(datafolder, configName);\n }\n this.fileConfiguration = YamlConfiguration.loadConfiguration(config);\n }", "void exit() {\n\t\tfor (ScopedProvider<?> e : scopedProviders.keySet()) {\n\t\t\tsynchronized(e) {\n\t\t\t\te.values.clear();\n\t\t\t}\n\t\t}\n\t}", "public void cleanUp() {\n if (penv != null) {\n penv.cleanup();\n }\n List<ONDEXGraph> indexed = new LinkedList<ONDEXGraph>();\n Set<String> graphFolders = new HashSet<String>();\n for (Entry<ONDEXGraph, String> ent : indexedGraphs.entrySet()) {\n if (!indeciesToRetain.contains(ent.getValue())) graphFolders.add(new File(ent.getValue()).getParent());\n indexed.add(ent.getKey());\n }\n for (ONDEXGraph graph : indexed) removeIndex(graph, null);\n for (String graphDir : graphFolders) {\n try {\n DirUtils.deleteTree(graphDir);\n } catch (IOException e) {\n }\n }\n }", "protected void cleanup() {\n // if the java runtime is holding onto any files in the build dir, we\n // won't be able to delete them, so we need to force a gc here\n System.gc();\n\n if (deleteFilesOnNextBuild) {\n // delete the entire directory and all contents\n // when we know something changed and all objects\n // need to be recompiled, or if the board does not\n // use setting build.dependency\n //Base.removeDir(tempBuildFolder);\n \n // note that we can't remove the builddir itself, otherwise\n // the next time we start up, internal runs using Runner won't\n // work because the build dir won't exist at startup, so the classloader\n // will ignore the fact that that dir is in the CLASSPATH in run.sh\n Base.removeDescendants(tempBuildFolder);\n \n deleteFilesOnNextBuild = false;\n } else {\n // delete only stale source files, from the previously\n // compiled sketch. This allows multiple windows to be\n // used. Keep everything else, which might be reusable\n if (tempBuildFolder.exists()) {\n String files[] = tempBuildFolder.list();\n for (String file : files) {\n if (file.endsWith(\".c\") || file.endsWith(\".cpp\") || file.endsWith(\".s\")) {\n File deleteMe = new File(tempBuildFolder, file);\n if (!deleteMe.delete()) {\n System.err.println(\"Could not delete \" + deleteMe);\n }\n }\n }\n }\n }\n \n // Create a fresh applet folder (needed before preproc is run below)\n //tempBuildFolder.mkdirs();\n }", "public synchronized void shutdown()\n {\n Log.info( \"Shutting down. Unloading all loaded plugins...\" );\n\n // Stop the plugin monitoring service.\n pluginMonitor.stop();\n\n // Shutdown all loaded plugins.\n for ( Map.Entry<String, Plugin> plugin : pluginsLoaded.entrySet() )\n {\n try\n {\n plugin.getValue().destroyPlugin();\n Log.info( \"Unloaded plugin '{}'.\", plugin.getKey() );\n }\n catch ( Exception e )\n {\n Log.error( \"An exception occurred while trying to unload plugin '{}':\", plugin.getKey(), e );\n }\n }\n pluginsLoaded.clear();\n pluginDirs.clear();\n pluginMetadata.clear();\n classloaders.clear();\n childPluginMap.clear();\n failureToLoadCount.clear();\n }", "static void clearCache() {\n CONFIG_VALUES = null;\n RUN_MODE = null;\n }", "@AfterSuite\n\tpublic void tearDown() {\n\t\tremoveSingleFileOrAllFilesInDirectory(\"file\", \"./Logs/Log4j.log\");\n\n\t\t// Flushing extent report after completing all test cases\n\t\treports.endTest(extent);\n\t\treports.flush();\n\t}", "public void destroyForAll() {\n super.destroyForAll();\n }", "static synchronized void closeAll() {\n List<BlackLabEngine> copy = new ArrayList<>(engines);\n engines.clear();\n for (BlackLabEngine engine : copy) {\n engine.close();\n }\n }", "public void unload(){ \n load.unloadFirst(); \n }", "public void close() {\n this.fileName = \"\";\n System.out.println(\"Closing the settings file\");\n }", "public void unloadContent(AssetManager manager) {\n for (String asset : assets) {\n if (manager.isLoaded(asset)) {\n manager.unload(asset);\n }\n }\n }", "private void unloadProject()\n {\n if (projectBuilder != null) {\n projectBuilder.database.close();\n projectBuilder = null;\n }\n\n if (projectSettingsPanel != null) {\n Container container = projectSettingsPanel.getParent();\n if (container != null)\n container.remove(projectSettingsPanel);\n projectSettingsPanel = null;\n }\n\n projectSettingsContainer.removeAll();\n generateButton.setEnabled(false);\n\n project = null;\n }", "public void flush() {\n\t\tGson gson = new GsonBuilder().serializeNulls().setPrettyPrinting().create();\n\t\tPath systemsFile = this.dir.resolve(SYSTEMS_FILE);\n\t\ttry (var writer = Files.newBufferedWriter(systemsFile)) {\n\t\t\tgson.toJson(this.systemsConfig, writer);\n\t\t\twriter.flush();\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"Could not save systems config.\", e);\n\t\t}\n\t\tfor (var config : this.guilds.values()) {\n\t\t\tconfig.flush();\n\t\t}\n\t}", "protected void tearDown() throws Exception {\n ConfigManager manager = ConfigManager.getInstance();\n for (Iterator iter = manager.getAllNamespaces(); iter.hasNext();) {\n manager.removeNamespace((String) iter.next());\n }\n }", "public void reload() {\n try {\n this.configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(this.getConfigurationFile());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private UnloadTestModelLoader() {\n registerProject(\"a\");\n registerProject(\"e\");\n registerProject(\"b\", \"e\");\n registerProject(\"c\");\n registerProject(\"d\");\n registerProject(\"f\");\n registerProject(\"p1\", \"a\", \"b\");\n registerProject(\"p2\", \"b\", \"c\");\n registerProject(\"p3\", \"b\", \"d\");\n registerProject(\"p4\", \"d\");\n }", "protected void tearDown() throws Exception {\n TestHelper.clearConfig();\n super.tearDown();\n }", "public void unloadContent(AssetManager manager) {\n\t\tfor(String s : assets) {\n\t\t\tif (manager.isLoaded(s)) {\n\t\t\t\tmanager.unload(s);\n\t\t\t}\n\t\t}\n\t}", "public void loadSavedConfigsMap() {\n\t\tfinal File folder = new File(serializePath);\n\t\tlistFilesForFolder(folder);\n\t}", "protected void tearDown() throws Exception {\n super.tearDown();\n FailureTestHelper.unloadData();\n FailureTestHelper.unloadConfig();\n }", "public void clearStages() {\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n List<String> deletingStage = Utils.plainFilenamesIn(REMOVAL);\n for (String fileName: addingStage) {\n File currFile = new File(INDEX, fileName);\n currFile.delete();\n }\n for (String fileName: deletingStage) {\n File currFile = new File(REMOVAL, fileName);\n currFile.delete();\n }\n }", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "@After\n public void removeEverything() {\n\n ds.delete(uri1);\n ds.delete(uri2);\n ds.delete(uri3);\n\n System.out.println(\"\");\n }", "public void clearFramework() {\r\n\t\tList<Configuration> tests = testCache.getAllTests();\r\n\t\tlog.info(\"Clearing all tests.\\n\");\r\n\t\tfor (Configuration test : tests) {\r\n\t\t\tkillTest(test.getUniqueId());\r\n\t\t}\r\n\t\tworkQueue.clear();\r\n\t\ttestCache.clear();\r\n\t}", "public static void clearRegistry() {\n \t\tLIBRARIES.clear();\n \t}", "protected void tearDown() throws Exception {\n super.tearDown();\n\n ConfigManager cm = ConfigManager.getInstance();\n Iterator allNamespaces = cm.getAllNamespaces();\n while (allNamespaces.hasNext()) {\n cm.removeNamespace((String) allNamespaces.next());\n }\n }", "protected void reload() {\n runnables.values().stream()\n .filter(Objects::nonNull) //idk how it can be null, but better be prepared\n .map(BungeeF3Runnable::getTask)\n .filter(Objects::nonNull) //fix for NullPointer\n .forEach(ScheduledTask::cancel);\n\n runnables.clear();\n players.clear();\n hookedServers.clear();\n\n checkServers();\n\n try {\n parser = new BungeeConfigParser(this);\n } catch (IOException ex) {\n logger.error(\"Failed to load config file!\", ex);\n return;\n }\n if (!parser.isOnlyAPI()) {\n startRunnables();\n }\n\n if (isHooked(\"LP\")) {\n lpHook = new LuckPermsHook(parser.getF3GroupList());\n }\n }", "public synchronized void removeAll() {\r\n\t\tif (trackedResources == null)\r\n\t\t\treturn;\r\n\t\tPair<IPath, IResourceChangeHandler>[] entries = (Pair<IPath, IResourceChangeHandler>[]) trackedResources.toArray(new Pair[trackedResources.size()]);\r\n\t\tfor (Pair<IPath, IResourceChangeHandler> entry : entries) {\r\n\t\t\tremoveResource(entry.first, entry.second);\r\n\t\t}\r\n\t}", "private void tearDown() {\n if (tempDir != null) {\n OS.deleteDirectory(tempDir);\n tempFiles.clear();\n tempDir = null;\n }\n }", "public void teardown() {\n for (App app : applications) {\n app.icon.setCallback(null);\n }\n\t}", "private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}", "void deinit() {\n\t\tsafeLocationTask.cancel();\n\t\t//Deinit all remaining worlds\n\t\tworlds.values().forEach(WorldHandler::deinit);\n\t\t//Clear members\n\t\tworlds.clear();\n\t\toptions = null;\n\t}", "protected void tearDown() throws Exception {\n ConfigManager cm = ConfigManager.getInstance();\n for (Iterator iter = cm.getAllNamespaces(); iter.hasNext();) {\n cm.removeNamespace((String) iter.next());\n }\n }", "protected void tearDown() throws Exception {\r\n validator = null;\r\n bundle = null;\r\n TestHelper.clearConfiguration();\r\n }", "public void refresh() {\n List<ConfigPath> configPaths = getConfigFiles();\n\n // Delete configs from cache which don't exist on disk anymore\n Iterator<String> currentEntriesIt = confs.keySet().iterator();\n while (currentEntriesIt.hasNext()) {\n String path = currentEntriesIt.next();\n boolean found = false;\n for (ConfigPath configPath : configPaths) {\n if (configPath.path.equals(path)) {\n found = true;\n break;\n }\n }\n if (!found) {\n currentEntriesIt.remove();\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected removed config \" + path + \" in \" + location);\n }\n }\n }\n\n // Add/update configs\n for (ConfigPath configPath : configPaths) {\n CachedConfig cachedConfig = confs.get(configPath.path);\n if (cachedConfig == null || cachedConfig.lastModified != configPath.file.lastModified()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected updated or added config \" + configPath.path + \" in \" + location);\n }\n long lastModified = configPath.file.lastModified();\n ConfImpl conf = parseConfiguration(configPath.file);\n cachedConfig = new CachedConfig();\n cachedConfig.lastModified = lastModified;\n cachedConfig.conf = conf;\n cachedConfig.state = conf == null ? ConfigState.ERROR : ConfigState.OK;\n confs.put(configPath.path, cachedConfig);\n }\n }\n }", "@After\n public void tearDown() throws Exception {\n File dbFile = new File(\"./data/clinicmate.h2.db\");\n dbFile.delete();\n dbFile = new File(\"./data/clinicmate.trace.db\");\n dbFile.delete();\n }", "void unregisterAll();", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "public void resetAll() {\n triggered = false;\n classBlacklist.clear();\n policies.clear();\n protectedFiles.clear();\n System.setSecurityManager(defaultSecurityManager);\n }", "@Override\n public void clearAllRegistrations()\n {\n writeRegistryStoreProperties(null);\n }", "public void excludeAllFiles(){\n for(Map.Entry<String,File> entry : dataSourcesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //For each directory created for each service\n for(Map.Entry<String,File> entry : servicesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //Finally, delete sessionDirectory\n if(sessionDirectory != null)\n sessionDirectory.delete();\n \n }", "public void destory()\n\t{\n\t\tif( !isConfigInitalized() ){\n\t\t\treturn;\n\t\t}\n\t\tif( isRedisClusterMode() ){\n\t\t\ttry {\n\t\t\t\t((JedisCluster) commands).close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}else{\n\t\t\t((Jedis) commands).close();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void unloadResources() {\n\t\ttextureManager.unLoadTextures();\n\t}", "@After\n\tpublic void setupClean() {\n\n\t\tString server = serverRequirement.getConfig().getName();\n\t\tif (FuseServerManipulator.isServerStarted(server)) {\n\t\t\tFuseServerManipulator.stopServer(server);\n\t\t}\n\t\tnew ProjectExplorer().deleteAllProjects();\n\t}", "public void reloadFiles()\n {\n for (Reloadable rel : reloadables)\n {\n rel.reload();\n }\n }" ]
[ "0.6377725", "0.6313848", "0.6292915", "0.6145872", "0.612287", "0.60811704", "0.6018563", "0.6009026", "0.5994829", "0.5969016", "0.5915307", "0.58696634", "0.58396614", "0.58351237", "0.58322436", "0.5798663", "0.5788874", "0.57663924", "0.5759672", "0.57524633", "0.574819", "0.5726781", "0.5684388", "0.5679894", "0.56739515", "0.5664656", "0.56582254", "0.5656398", "0.56412065", "0.5639793", "0.5637399", "0.563669", "0.5633723", "0.56028813", "0.55945104", "0.55767494", "0.5574366", "0.5573243", "0.55693847", "0.5569005", "0.55687433", "0.55625165", "0.5555426", "0.5546746", "0.55318666", "0.55314237", "0.55229366", "0.55031115", "0.5496007", "0.5482444", "0.5480616", "0.5469", "0.54670346", "0.5450118", "0.5448392", "0.5448207", "0.5444412", "0.54438335", "0.5439665", "0.5439137", "0.54351974", "0.54295015", "0.54256433", "0.5424095", "0.54020846", "0.53831184", "0.5382913", "0.5381164", "0.5380146", "0.5373039", "0.5359268", "0.53578764", "0.5357421", "0.53486466", "0.5334237", "0.5326206", "0.5320776", "0.53050375", "0.5301293", "0.5293512", "0.5293022", "0.52907276", "0.529009", "0.52890813", "0.5283223", "0.52809715", "0.5279473", "0.5273824", "0.52737164", "0.52727956", "0.52555823", "0.5244249", "0.5241468", "0.5241347", "0.52396375", "0.5231549", "0.5227081", "0.52266157", "0.52259153", "0.5223588" ]
0.63291043
1
public int updateVorlageAuktions_texte(int auktion_texteId, int templateId);
public List<Map<String, Object>> getAuktionPath(int objectId, int templateId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateOneWord(Pojo.OneWord e){ \n template.update(e); \n}", "@Test\n public void updateTemplateTest() throws IdfyException, Exception {\n UUID id = UUID.randomUUID();\n UpdatePdfTemplate model = new UpdatePdfTemplate.Builder().build();\n PdfTemplate response = api.updateTemplate(id, model);\n assertNotNull(response);\n }", "public static void updateTorre(int id, int idEst, int idTipoT, double altura, int idEstado, int idUbica) {\n Connection conn = Menu_Principal.conn;\n PreparedStatement pstmt = null;\n\n String q_UpTorre = \"UPDATE tor_torre\\n\"\n + \"SET id_estacion = ?,\\n\"\n + \" id_tipo_torre = ?,\\n\"\n + \" altura = ?,\\n\"\n + \" id_estado = ?,\\n\"\n + \" id_tipo_ubica = ?\\n\"\n + \"WHERE\\n\"\n + \"\tid_torre = ?;\";\n try {\n pstmt = conn.prepareStatement(q_UpTorre);\n pstmt.setInt(1, idEst);\n pstmt.setInt(2, idTipoT);\n pstmt.setDouble(3, altura);\n pstmt.setInt(4, idEstado);\n pstmt.setInt(5, idUbica);\n pstmt.setInt(6, id);\n pstmt.executeUpdate();\n conn.commit();\n JOptionPane.showMessageDialog(null, \"El registro se actualizo correctamente\", \"Información\", JOptionPane.INFORMATION_MESSAGE);\n } catch (SQLException e) {\n JOptionPane.showMessageDialog(null, \"No se pudo completar la operación.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n// System.err.println(\"Fallo UPDATE Modelo Radio: \" + e.getClass().getName() + \": \" + e.getMessage());\n } // Fin de try...catch\n }", "public void updateQuestion(int id_question, String texteQuestion) {\n ContentValues data=new ContentValues();\n data.put(\"texteQuestion\", texteQuestion);\n db.update(\"question\", data, \"id_question=\" + id_question, null);\n }", "void update(int id, int teacherid, int noteid );", "public void editar(String update){\n try {\n Statement stm = Conexion.getInstancia().createStatement();\n stm.executeUpdate(update);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "public void actualizaAntNoPato(String id_antNP, String religion_antNP, String lugarNaci_antNP, String estaCivil_antNP, \n String escolaridad_antNP, String higiene_antNP, String actividadFisica_antNP, int frecuencia_antNP, \n String sexualidad_antNP, int numParejas_antNP, String sangre_antNP, String alimentacion_antNP, String id_paciente,\n boolean escoCompInco_antNP, String frecVeces_antNP, Connection conex){\n String sqlst = \" UPDATE `antnopato`\\n\" +\n \"SET\\n\" +\n \"`id_antNP` = ?,\\n\" +\n \"`religion_antNP` = ?,\\n\" +\n \"`lugarNaci_antNP` = ?,\\n\" +\n \"`estaCivil_antNP` = ?,\\n\" +\n \"`escolaridad_antNP` = ?,\\n\" +\n \"`higiene_antNP` = ?,\\n\" +\n \"`actividadFisica_antNP` = ?,\\n\" +\n \"`frecuencia_antNP` = ?,\\n\" +\n \"`sexualidad_antNP` = ?,\\n\" +\n \"`numParejas_antNP` = ?,\\n\" +\n \"`sangre_antNP` = ?,\\n\" +\n \"`alimentacion_antNP` = ?,\\n\" +\n \"`id_paciente` = ?,\\n\" +\n \"`escoCompInco_antNP` = ?,\\n\" +\n \"`frecVeces_antNP` = ?\\n\" +\n \"WHERE `id_antNP` = ?;\";\n try(PreparedStatement sttm = conex.prepareStatement(sqlst)) {\n conex.setAutoCommit(false);\n sttm.setString (1, id_antNP);\n sttm.setString (2, religion_antNP);\n sttm.setString (3, lugarNaci_antNP);\n sttm.setString (4, estaCivil_antNP);\n sttm.setString (5, escolaridad_antNP);\n sttm.setString (6, higiene_antNP);\n sttm.setString (7, actividadFisica_antNP);\n sttm.setInt (8, frecuencia_antNP);\n sttm.setString (9, sexualidad_antNP);\n sttm.setInt (10, numParejas_antNP);\n sttm.setString (11, sangre_antNP);\n sttm.setString (12, alimentacion_antNP);\n sttm.setString (13, id_paciente);\n sttm.setBoolean (14, escoCompInco_antNP);\n sttm.setString (15, frecVeces_antNP);\n sttm.setString (16, id_antNP);\n sttm.addBatch();\n sttm.executeBatch();\n conex.commit();\n aux.informacionUs(\"Antecedentes personales no patológicos modificados\", \n \"Antecedentes personales no patológicos modificados\", \n \"Antecedentes personales no patológicos han sido modificados exitosamente en la base de datos\");\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public Boolean updateTemplate(Template template)\n\t{\n\t\tTemplateDAO dao = new TemplateDAO();\n\t\tdao.save(template);\t\t\n\t\treturn true;\n\t}", "public Ausschreibung update(Ausschreibung as) {\r\n\r\n\t\t// DB-Verbindung herstellen\r\n\t\tConnection con = DBConnection.connection();\r\n\r\n\t\ttry {\r\n\t\t\t// Leeres SQL-Statement (JDBC) anlegen\r\n\t\t\tStatement stmt = con.createStatement();\r\n\r\n\r\n\t\t\tif (as.getPartnerprofilId() == 0) {\r\n\t\t\t\t// Jetzt erst erfolgt die tatsaechliche Einfuegeoperation\r\n\t\t\t\tstmt.executeUpdate(\"UPDATE ausschreibung \" + \"SET Bezeichnung=\\\"\" + as.getBezeichnung() + \"\\\", \"\r\n\t\t\t\t\t\t+ \"Ausschreibungstext=\\\"\" + as.getAusschreibungstext() + \"\\\", \" + \"Bewerbungsfrist=\\\"\"\r\n\t\t\t\t\t\t+ DBConnection.convertToSQLDateString(as.getBewerbungsfrist()) + \"\\\", \" + \"Projekt_ID=\"\r\n\t\t\t\t\t\t+ as.getProjektId() + \", Partnerprofil_ID=NULL \" + \"WHERE ID=\"\t+ as.getId());\r\n\t\t\t} else {\r\n\t\t\t\t// Jetzt erst erfolgt die tatsaechliche Einfuegeoperation\r\n\t\t\t\tstmt.executeUpdate(\"UPDATE ausschreibung \" + \"SET Bezeichnung=\\\"\" + as.getBezeichnung() + \"\\\", \"\r\n\t\t\t\t\t\t+ \"Ausschreibungstext=\\\"\" + as.getAusschreibungstext() + \"\\\", \" + \"Bewerbungsfrist=\\\"\"\r\n\t\t\t\t\t\t+ DBConnection.convertToSQLDateString(as.getBewerbungsfrist()) + \"\\\", \" + \"Projekt_ID=\"\r\n\t\t\t\t\t\t+ as.getProjektId() + \", \" + \"Partnerprofil_ID=\" + as.getPartnerprofilId() + \" \" + \"WHERE ID=\"\r\n\t\t\t\t\t\t+ as.getId());\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\r\n\t\tcatch (SQLException e2) {\r\n\t\t\te2.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// Um Analogie zu insert(Ausschreibung as) zu wahren, geben wir as\r\n\t\t// zurueck\r\n\t\treturn as;\r\n\t}", "void editTariff(int idTariff, String title, String description, String price) throws ServiceException;", "@Override\n\tpublic int editNotifyTemplate(int notifytemplateid, String name,\n\t\t\tString description,String templateXML, int editBizUnitID, int editSystemID, int editRecepientID, int editChannelID, int editEventID, int editSignatureID,Boolean isdnd,Boolean isdesc,int userID) {\n\t\tint result = 0; \n\t\tresult = jdbcTemplate.queryForObject(FiinfraConstants.SP_EDIT_NOTIFYTEMPLATE, new Object[]{notifytemplateid,name,description,templateXML,editBizUnitID,editSystemID,editRecepientID,editChannelID,editEventID,editSignatureID, isdnd, isdesc, userID},Integer.class);\n\t\treturn result; \n\t}", "@Override\n\tpublic void update(Feedback feedback) throws SQLException {\n\n\t\tPreparedStatement ps=conn.prepareStatement(\"UPDATE feedback\"\n\t\t\t\t+ \" SET descrizione=?, voto=? where id_feedback=?\");\n\t\tps.setString(1, feedback.getDescrizione());\n\t\tps.setInt(2, feedback.getVoto());\n\t\tps.setInt(3, feedback.getIdFeedback());\n\t\tint n = ps.executeUpdate();\n\t\tif(n==0)\n\t\t\tthrow new SQLException(\"feedback: \" + feedback.getIdFeedback()+ \" non presente\");\n\n\t}", "@Override\r\n\tpublic void modifierPrenom(int idUtilisateur, String nouveauPrenom) {\n\r\n\t}", "public void modifier(){\r\n try {\r\n //affectation des valeur \r\n echeance_etudiant.setIdEcheanceEtu(getViewEtudiantInscripEcheance().getIdEcheanceEtu()); \r\n \r\n echeance_etudiant.setAnneeaca(getViewEtudiantInscripEcheance().getAnneeaca());\r\n echeance_etudiant.setNumetu(getViewEtudiantInscripEcheance().getNumetu());\r\n echeance_etudiant.setMatricule(getViewEtudiantInscripEcheance().getMatricule());\r\n echeance_etudiant.setCodeCycle(getViewEtudiantInscripEcheance().getCodeCycle());\r\n echeance_etudiant.setCodeNiveau(getViewEtudiantInscripEcheance().getCodeNiveau());\r\n echeance_etudiant.setCodeClasse(getViewEtudiantInscripEcheance().getCodeClasse());\r\n echeance_etudiant.setCodeRegime(getViewEtudiantInscripEcheance().getCodeRegime());\r\n echeance_etudiant.setDrtinscri(getViewEtudiantInscripEcheance().getInscriptionAPaye());\r\n echeance_etudiant.setDrtforma(getViewEtudiantInscripEcheance().getFormationAPaye()); \r\n \r\n echeance_etudiant.setVers1(getViewEtudiantInscripEcheance().getVers1());\r\n echeance_etudiant.setVers2(getViewEtudiantInscripEcheance().getVers2());\r\n echeance_etudiant.setVers3(getViewEtudiantInscripEcheance().getVers3());\r\n echeance_etudiant.setVers4(getViewEtudiantInscripEcheance().getVers4());\r\n echeance_etudiant.setVers5(getViewEtudiantInscripEcheance().getVers5());\r\n echeance_etudiant.setVers6(getViewEtudiantInscripEcheance().getVers6()); \r\n \r\n //modification de l'utilisateur\r\n echeance_etudiantFacadeL.edit(echeance_etudiant); \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur de modification capturée : \"+e);\r\n } \r\n }", "int updateByPrimaryKey(TbFreightTemplate record);", "@Override\r\n\tpublic void update(SimpleJdbcTemplate template) throws Exception {\n\t}", "int updateByPrimaryKey(AccountAccountTemplateEntity record);", "public void editPrioritaet(int prioID, String bezeichnung) throws Exception;", "public String updateStudent(int id, String ime, String prezime, String adresa, int kredit, String lozinka)throws Exception{\n\t\ttry{\n\t\t\tDatabase database= new Database();\n\t\t Connection connection = database.Get_Connection();\n\t\t\tProject project= new Project();\n\t\t\t//System.out.println(\"hey\");\n\t\t//ArrayList<Student> tmp = new ArrayList();\n\t\t\n\t\t\treturn project.updateStudent(connection, id, ime, prezime, adresa, kredit, lozinka);\n\t\t\t\n\t\t\t\n\t\t\n\t\t}catch(Exception e){\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n\tpublic int edit(Zongjie zongjie) {\n\t\treturn zongjieDao.edit(zongjie);\n\t}", "public void actualizar(Especialiadad espe,JTextField txtcodigo){\r\n\t\r\n\t\t\tConnection con = null;\r\n\t\t\tStatement stmt=null;\r\n\t\t\tint result=0;\r\n\t\t\t//stmt=con.prepareStatement(\"UPDATE Especialiadad \"\r\n\t\t\t//\t\t+ \"SET Nombre =? )\"\r\n\t\t\t\t//\t+ \"WHERE Codigo = \r\n\t\t\t\r\n try\r\n {\r\n \tcon = ConexionBD.getConnection();\r\n \t stmt = con.createStatement();\r\n \t\t // result = stmt.executeUpdate();\r\n\r\n } catch (Exception e) {\r\n \t\t e.printStackTrace();\r\n \t\t} finally {\r\n \t\t\tConexionBD.close(con);\r\n \t\t}\r\n\t\r\n\t}", "private void edit() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null)) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.update(Integer.parseInt(idField.getText().toString().trim()),nama_pasien2,nama_dokter2, tgl_pengobatanField.getText().toString().trim(),waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "public void update(Activity e){ \n\t template.update(e); \n\t}", "@Override\n public void update(Etiqueta etiqueta) {\n String updateSql = \"UPDATE etiqueta SET etiqueta = :etiqueta\" +\n \"where id = :id;\";\n try (Connection con = sql2o.open()) {\n con.createQuery(updateSql)\n .addParameter(\"etiqueta\", etiqueta.getEtiqueta())\n .addParameter(\"id\", etiqueta.getId())\n .executeUpdate();\n }\n }", "int updateEstancia(final Long srvcId);", "void update(Reservierung reservierung, int id) throws ReservierungException;", "public void updateExempleDirect(ExempleDirect exempleDirect) throws DaoException;", "@Override\r\npublic int update(Detalle_pedido d) {\n\treturn detalle_pedidoDao.update(d);\r\n}", "public int modificarPresidente(int idpresi,int idcam,int idequipo, String nombre, String paterno,String materno,String dni,String fecNac,String fechaDirect,String telefono){\n sql=\"UPDATE presidente set idCampeonato='\"+idcam+\"', idEquipo='\"+idequipo+\"',Nombre_pres='\"+nombre+\"',Ap_presidente='\"+paterno+\"',Am_presidente='\"+materno+\"',Dni='\"+dni+\"',Fec_Nac='\"+fecNac+\"',Fecha_presidente='\"+fechaDirect+\"',Telefono='\"+telefono+\"' WHERE idPresidente='\"+idpresi+\"'\";\r\n \r\n try {\r\n cx = Conexion.coneccion();\r\n st = cx.createStatement();\r\n res = st.executeUpdate(sql);\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"Error: \"+e);\r\n }\r\n return res;\r\n }", "public abstract void setTemplId(Integer templId);", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "public boolean modifierCompte(int id, String nom, String prenom, String mdp, String email, String numrue, String codeP, String ville);", "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public void modifyComment(String text){\n if (activeEmployee.hasLicence(202)){\n DB.modifyComment(getData().id_comment, getData().id_task, text);\n update();\n } //consideramos que solo se puede modificar el texto no las id\n }", "public void updateJoueurs();", "boolean updateContent();", "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 64: */ }\r\n/* 65: 79 */ return \"\";\r\n/* 66: */ }", "public Boek updateTitel (int id, String name) {\n try {\n em.getTransaction().begin();\n Boek boek = zoek(id);\n boek.setTitel(name);\n em.merge(boek);\n em.getTransaction().commit();\n log.info(String.format(\"%s is opgeslagen\", boek.getTitel()));\n return boek;\n } catch (Exception e) {\n log.warn(e.getClass().getSimpleName() + \" : \" + e.getMessage());\n em.getTransaction().rollback();\n return null;\n }\n }", "void editAdvert(String aid, Advert advert);", "public void editarAlimento(int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas ,float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "public void countSpelers() {\n if (typeField.getText().equals(\"Toernooi\")) {\n try {\n Connection con = Main.getConnection();\n PreparedStatement st = con.prepareStatement(\"SELECT COUNT (*) as geteld FROM Inschrijvingen where toernooi = ?\");\n st.setInt(1, Integer.parseInt(codeField.getText()));\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n int geteld = rs.getInt(\"geteld\");\n try {\n Connection con2 = Main.getConnection();\n PreparedStatement update = con2.prepareStatement(\"UPDATE Toernooi SET aantal_spelers = ? where TC = ?\");\n update.setInt(1, geteld);\n update.setInt(1, Integer.valueOf(codeField.getText()));\n update.executeUpdate();\n } catch (Exception e) {\n System.out.println(e);\n System.out.println(\"ERROR: er ging iets mis met de database(updateAantalSpelers)\");\n }\n }\n } catch (Exception e) {\n System.out.println(e);\n System.out.println(\"ERROR: er ging iets mis met de database(updateAantalSpelers)\");\n }\n } else if (typeField.getText().equals(\"Masterclass\")) {\n try {\n Connection con = Main.getConnection();\n PreparedStatement st = con.prepareStatement(\"SELECT COUNT (*) as geteld FROM Inschrijvingen where toernooi = ?\");\n st.setInt(1, Integer.parseInt(codeField.getText()));\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n int geteld = rs.getInt(\"geteld\");\n try {\n Connection con2 = Main.getConnection();\n PreparedStatement update = con2.prepareStatement(\"UPDATE Masterclass SET aantal_spelers = ? where MasterclassCode = ?\");\n update.setInt(1, geteld);\n update.setInt(2, Integer.parseInt(codeField.getText()));\n update.executeUpdate();\n } catch (Exception e) {\n System.out.println(e);\n System.out.println(\"ERROR: er ging iets mis met de database(updateAantalSpelers)\");\n }\n }\n } catch (Exception e) {\n System.out.println(e);\n System.out.println(\"ERROR: er is een probleem met de database (countSpelers)\");\n }\n }\n }", "@Override\n\tpublic void updateTmly(Tmly tmly) {\n\t\tString sql = \"update tmly set title=?,content=? where id_=?\";\n\t\tthis.jdbcTemplate\n\t\t\t\t.update(sql, new Object[] { tmly.getTitle(), tmly.getContent(),\n\t\t\t\t\t\ttmly.getId() });\n\t}", "@Override\n public boolean update(Transaksi transaksi) {\n try {\n String query = \"UPDATE transaksi SET tgl_transaksi=? WHERE id=?\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, transaksi.getTglTransaksi());\n ps.setString(2, transaksi.getId());\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "@Test\n public void modifierArticleKO(){\n String nomArticle = \"short\";\n Article articleBD = daoArticle.findByNom(nomArticle); //peut renvoyer null si l'article \"Chaussons\" n'existe pas en BD \n \n Double prixHT = 6.55;\n Integer delaisAppros = 4;\n Integer delaisDeLivraisonArt =6; \n Integer quantiteStock = 25;\n Article articleAvecModifications = new Article(nomArticle, prixHT, delaisAppros, delaisDeLivraisonArt, quantiteStock); //attributs d'instance ayant @Column(nullable = false)\n articleAvecModifications.setDescription(\"très bonne qualitée\");\n articleS.modifierArticle(articleBD, articleAvecModifications);\n \n if(articleBD == null){\n System.out.println();System.out.println();System.out.println();System.out.println(\"=============================================================\");\n System.out.println(\"ARTICLE \" + nomArticle + \" N'EXISTE PAS EN BD : \" + articleBD);\n System.out.println();System.out.println();System.out.println();System.out.println(\"=============================================================\"); \n }\n }", "public void updateIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENT);\r\n\t\t\t\r\n\t\t\tArray sql = con.createArrayOf(\"boolean\", i.getDisponibilita());\r\n\t\t\t\r\n\t\t\tpstmt.setArray(1, sql);\r\n\t\t\tpstmt.setString(2, i.getGiocatore());\r\n\t\t\tpstmt.setInt(3, i.getTorneo());\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tpstmt.execute();\r\n\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t}\r\n\r\n\t\t\tcon.close();\r\n\t\t}\r\n\r\n\t}", "abstract void trataAltera();", "@Override\n\tpublic int updateContentId(String paramString1, String paramString2)\n\t{\n\t\treturn 0;\n\t}", "@Override\n\tpublic void update(BatimentoCardiaco t, String[] params) {\n\t\t\n\t}", "@Override\n public void updateReason(int id, String descripcion) {\n // Let's validate all the fields\n if (Utils.textIsNullOrEmpty(descripcion)) {\n getView().onError(\"La descripción no puede estar vacía.\");\n return;\n }\n\n // Create the request data\n HashMap<String, Object> request = new HashMap<>(2);\n request.put(\"reasonId\", id);\n request.put(\"descripcion\", descripcion.trim());\n\n Api.getInstance().getReasonService().updateReason(request)\n .subscribeOn(Schedulers.io())\n .observeOn(Schedulers.single())\n .subscribe(() -> {\n // Request executed successfully\n getView().onSuccess(\"Se modifico el motivo\");\n }, throwable -> {\n // Let's manage errors\n StatusResponse response\n = Utils.parseStatusResponse(throwable);\n if (response != null) {\n if (response.getStatusCode() == 1) {\n getView().onError(\"El motivo ya no existe.\");\n } else if (response.getStatusCode() == 2) {\n getView().onError(\"Ya existe un motivo con esos \"\n + \"datos.\");\n }\n } else {\n getView().onError(\"Error de conexión.\"\n + \"\\nIntente de nuevo\");\n }\n });\n }", "public String update()\n {\n this.conversation.end();\n\n try\n {\n if (this.id == null)\n {\n this.entityManager.persist(this.paramIntervento);\n return \"search?faces-redirect=true\";\n }\n else\n {\n this.entityManager.merge(this.paramIntervento);\n return \"view?faces-redirect=true&id=\" + this.paramIntervento.getNome();\n }\n }\n catch (Exception e)\n {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\n return null;\n }\n }", "public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "public void actualizar();", "public boolean updVeh() {\n\t\ttry\n\t\t{\n\t\t\n\t\t\tString filename=\"src/FilesTXT/vehicule.txt\";\n\t\t\tFileInputStream is = new FileInputStream(filename);\n\t\t InputStreamReader isr = new InputStreamReader(is);\n\t\t BufferedReader buffer = new BufferedReader(isr);\n\t\t \n\t\t String line = buffer.readLine();\n\t \tString[] split;\n\t \tString Contenu=\"\";\n\n\t\t while(line != null){\n\t\t \tsplit = line.split(\" \");\n\t\t\t if(this.getId_vehi()==Integer.parseInt(split[0])) {\n\t\t\t \tContenu+=this.getId_vehi()+\" \"+this.getDate_achat()+\" \"+this.getNb_places()+\" \"+this.getStatut()+\" \"+this.getPrix()+\" \"+this.getImage()+\" \"+this.getCouleur()+\" \"+this.getModele()+\" \"+this.getMarque()+\" \"+this.getDate_fabrication()+\"\\n\";\n\t\t\t \tSystem.out.println(this.getId_vehi()+\" \"+this.getId_vehi()+\" \"+this.getDate_fabrication());\n\t\t\t }else {\n\t\t\t \t Contenu+=line+\"\\n\";\n\t\t\t }\n\t\t \tline = buffer.readLine();\n\t\t }\n\t\t \n\t\t buffer.close();\n\t\t \n\t\t filename=\"src/FilesTXT/vehicule.txt\";\n\t\t\t FileWriter fw = new FileWriter(filename);\n\t\t\t fw.write(Contenu);\n\t\t\t fw.close();\n\t\t \n\t\t return true;\n\t\t}\n\t\tcatch(IOException ioe)\n\t\t{\n\t\t System.err.println(\"IOException: \"+ ioe.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public void ajouterTexteAide(String texte) {\r\n\t\tif (bulleAide != null)\r\n\t\t\tbulleAide.setText(\"<HTML><BODY>\" + texte + \"</HTML></BODY>\");\r\n\t}", "public AdminUpdate(Goods goods,DefaultTableModel dtm,JTable table) {\n\t\tthis.au=this;\n\t\tsetTitle(\"修改商品\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 450, 405);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\ttextField = new JTextField();\n\t\tJLabel label = new JLabel(\"商品名称:\");\n\t\ttextField.setText(goods.getGName());\n\t\tlabel.setBounds(23, 57, 66, 15);\n\t\tcontentPane.add(label);\n\t\t\n\t\ttextField.setBounds(99, 54, 269, 21);\n\t\tcontentPane.add(textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\tJLabel label_1 = new JLabel(\"单价:\");\n\t\ttextField_1.setText(goods.getGPrice());\n\t\tlabel_1.setBounds(35, 100, 54, 15);\n\t\tcontentPane.add(label_1);\n\t\t\n\t\t\n\t\ttextField_1.setBounds(99, 97, 212, 21);\n\t\tcontentPane.add(textField_1);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\tJLabel label_2 = new JLabel(\"单位:元\");\n\t\tlabel_2.setBounds(321, 100, 54, 15);\n\t\tcontentPane.add(label_2);\n\t\t\n\t\ttextField_2 = new JTextField();\n\t\tJLabel label_3 = new JLabel(\"数量:\");\n\t\ttextField_2.setText(goods.getGCount());\n\t\tlabel_3.setBounds(35, 143, 54, 15);\n\t\tcontentPane.add(label_3);\n\t\t\n\t\t\n\t\ttextField_2.setBounds(99, 140, 212, 21);\n\t\tcontentPane.add(textField_2);\n\t\ttextField_2.setColumns(10);\n\t\t\n\t\tJLabel label_4 = new JLabel(\"简介:\");\n\t\tlabel_4.setBounds(35, 188, 54, 15);\n\t\tcontentPane.add(label_4);\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setText(goods.getGIntroduce());\n\t\ttextArea.setBounds(99, 184, 269, 103);\n\t\tcontentPane.add(textArea);\n\t\t\n\t\tJButton button = new JButton(\"确定修改\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif( textField.getText().equals(\"\") ){\n\t\t\t\t\tJOptionPane joption = new JOptionPane();\n\t\t\t\t\tjoption.showMessageDialog(null, \"商品名称不能为空\");\n\t\t\t\t}else if( textField_1.getText().equals(\"\")){\n\t\t\t\t\tJOptionPane joption = new JOptionPane();\n\t\t\t\t\tjoption.showMessageDialog(null, \"单价不能为空\");\n\t\t\t\t}else if( textField_2.getText().equals(\"\") ){\n\t\t\t\t\tJOptionPane joption = new JOptionPane();\n\t\t\t\t\tjoption.showMessageDialog(null, \"数量不能为空\");\n\t\t\t\t}else{\n\t\t\t\t\tList list1=new ArrayList();\n\t\t\t\t\tGoods goods1=new Goods(goods.getGId(),textField.getText(),textField_1.getText(),textField_2.getText(),textArea.getText());\n\t\t\t\t\t//应先删除原来文件,再把新文件进行序列化(写入操作)\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"修改商品信息成功!\");\n\t\t\t\t\tFile file = new File(\"d:/store/goods/\" +goods.getGName()+\".txt\");\n\t\t\t\t\tfile.delete();\n\t\t\t\t\t//清除表格数据\n\t\t\t\t\tdtm.getDataVector().clear(); //清除表格数据\n\t\t\t\t\tdtm.fireTableDataChanged();//通知模型更新\n\t\t\t\t\ttable.updateUI();\n\t\t\t\t\tObjectStream.write(\"/goods/\"+textField.getText()+\".txt\", goods1);\n\t\t\t\t\t//遍历并显示删除更新后的内容\n\t\t\t\t\tFile f=new File(\"d:/store/goods/\");\n\t\t\t\t\tString[] s=f.list();\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tGoods goods=ObjectStream.read(Goods.class,\"/goods/\"+s[i] );\n\t\t\t\t\t\tdtm.addRow(new String[]{Integer.toString(goods.getGId()),goods.getGName(),goods.getGPrice(),goods.getGCount()});\n\t\t\t\t\t}\n\t\t\t\t\tlist1.add(new String(new String(getGoodsPath2(textField.getText()))));\n\t\t\t\t\t/*for(Iterator i=list1.iterator();i.hasNext();){\n\t\t\t\t\t\tString s1=(String)i.next();\n\t\t\t\t\t\tGoods goods2=ObjectStream.read(Goods.class, s1);\n\t\t\t\t\t\tdtm.addRow(new String[]{Integer.toString(goods2.getGId()),goods2.getGName(),goods2.getGPrice(),goods2.getGCount()});\n\t\t\t\t\t\tAdminStore as = new AdminStore(au);\n\t\t\t\t\t\tas.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n\t\t\t\t\t\tas.setVisible(false);\n\t\t\t\t\t}*/\n\t\t\t\t\tAdminStore as = new AdminStore(au);\n\t\t\t\t\tas.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n\t\t\t\t\tas.setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbutton.setBounds(275, 310, 93, 23);\n\t\tcontentPane.add(button);\n\t\t\n\t\tJLabel label_5 = new JLabel(\">=0\");\n\t\tlabel_5.setBounds(321, 143, 43, 15);\n\t\tcontentPane.add(label_5);\n\t\t\n\t\tthis.addWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t((AdminUpdate)e.getSource()).setVisible(false);\n\t\t\t}\n\t\t});\n\t}", "public String editar()\r\n/* 86: */ {\r\n/* 87:112 */ if (getDimensionContable().getId() != 0)\r\n/* 88: */ {\r\n/* 89:113 */ this.dimensionContable = this.servicioDimensionContable.cargarDetalle(this.dimensionContable.getId());\r\n/* 90:114 */ String[] filtro = { \"indicadorValidarDimension\" + getDimension(), \"true\" };\r\n/* 91:115 */ this.listaCuentaContableBean.agregarFiltro(filtro);\r\n/* 92:116 */ this.listaCuentaContableBean.setIndicadorSeleccionarTodo(true);\r\n/* 93:117 */ verificaDimension();\r\n/* 94:118 */ setEditado(true);\r\n/* 95: */ }\r\n/* 96: */ else\r\n/* 97: */ {\r\n/* 98:120 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 99: */ }\r\n/* 100:123 */ return \"\";\r\n/* 101: */ }", "@Override\r\n public String vratiVrednostiZaUpdate() {\n \r\n return String.format(\"naziv='%s', trener='%s', menadzer='%s', sponzor='%s', igre='%s', zaradjenNovac=%f, idRegiona=%d, idLokacije=%d\", \r\n this.getNaziv(), this.getTrener(), this.getMenadzer(), this.getSponzor(), this.getIgre(), this.getZaradjenNovac(), this.getRegion().getIdRegiona(),this.getLokacije().getIdLokacije() );\r\n }", "@Override\r\n\tpublic void updateNewsById(News aNews) {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString sql = \"update news set title=?, content=?, fk_topic_id=? where id = ?\";\r\n\t\t\tconn = SimpleDBUtil.getConnection();\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\tpstmt.setString(1, aNews.getTitle());\r\n\t\t\tpstmt.setString(2, aNews.getContent());\r\n\t\t\tpstmt.setInt(3, aNews.getFk_topic_id());\r\n\t\t\tpstmt.setInt(4, aNews.getId());\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t\t\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tSimpleDBUtil.closeAll(null, pstmt, conn);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void editTea(Teacher teacher) {\n\r\n\t}", "public static void atualizar(int id, String nome){\n System.out.println(\"Dados atualizados!\");\n }", "public static int update(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database untuk merubah data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement( \n \"update periode set tahun=?, awal=?, akhir=?, status=? where id=?\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n ps.setString(4,p.getStatus()); \n ps.setInt(5,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n return status; \n }", "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }", "public void update(Ejemplar ej);", "int updateTipoIva(final Long srvcId);", "public int saveHeadControl(int idTramite, int empresa_id, int almacen_id, String serie, int folio, String serieBoleto, int folioBoleto, \r\n\t\t\t int cliente_id, String identificacion,String cveIdentificacion,int numitems, String fecha, String hora, int usuario_id, String timecreate ,double tiempoMinimo ,String obs ) {\r\n\t\tString sql = \"UPDATE `cabcontrol` SET `EMPRESA_ID`='\"+empresa_id+\"',`ALMACEN_ID`='\"+almacen_id+\"',`SERIE`='\"+serie+\"',`FOLIO`='\"+folio+\"',\"\r\n\t\t\t\t+ \"`SERIEBOLETO`='\"+serieBoleto+\"',`FOLIOBOLETO`='\"+folioBoleto+\"',`CLIENTE_ID`='\"+cliente_id+\"',`CLIENTECOD`='\"+identificacion+\"', `IDENTIFICACION`='\"+cveIdentificacion+\"',`NUMITEMS`='\"+numitems+\"',\"\r\n\t\t\t + \"`FECHAIN`='\"+fecha+\"',`HORAIN`='\"+hora+\"',`USUARIO_IDIN`='\"+usuario_id+\"',`TIMECREATE`='\"+timecreate+\"', TIEMPOTOTALOUT='\"+tiempoMinimo+\"' ,`OBSERVACION`='\"+obs+\"' WHERE `IDTRAMITE` ='\"+idTramite+\"' \";\r\n\t\treturn template.update(sql);\r\n\t}", "private void modifyActionPerformed(ActionEvent evt) throws Exception {\n String teaID = this.teaIDText.getText();\n String teaCollege = this.teaCollegeText.getText();\n String teaDepartment = this.teaDepartmentText.getText();\n String teaType = this.teaTypeText.getText();\n String teaPhone = this.teaPhoneText.getText();\n String teaRemark = this.teaRemarkText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null, \"请先选择一条老师信息!\");\n return;\n }\n if(StringUtil.isEmpty(teaCollege)){\n JOptionPane.showMessageDialog(null, \"学院不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaDepartment)){\n JOptionPane.showMessageDialog(null, \"系不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaType)){\n JOptionPane.showMessageDialog(null, \"类型不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaPhone)){\n JOptionPane.showMessageDialog(null, \"手机不能为空!\");\n return;\n }\n if(!StringUtil.isAllNumber(teaPhone)){\n JOptionPane.showMessageDialog(null, \"请输入合法的手机号!\");\n return;\n }\n if(teaPhone.length() != 11){\n JOptionPane.showMessageDialog(null, \"请输入11位的手机号!\");\n return;\n }\n int confirm = JOptionPane.showConfirmDialog(null, \"确认修改?\");\n if(confirm == 0){//确认修改\n Teacher tea = new Teacher(teaID,teaCollege,teaDepartment,teaType,teaPhone,teaRemark);\n Connection con = dbUtil.getConnection();\n int modify = teacherInfo.updateInfo(con, tea);\n if(modify == 1){\n JOptionPane.showMessageDialog(null, \"修改成功!\");\n resetValues();\n }\n else{\n JOptionPane.showMessageDialog(null, \"修改失败!\");\n return;\n }\n initTable(new Teacher());//初始化表格\n }\n }", "public static void update(Transcription t) throws IOException, SQLException\r\n {\r\n IndexWriter writer = null;\r\n Analyzer analyser;\r\n Directory directory;\r\n /**@TODO parameterize this location*/\r\n String dest = \"/usr/indexTranscriptions\";\r\n\r\n directory = FSDirectory.getDirectory(dest, true);\r\n analyser = new StandardAnalyzer();\r\n writer = new IndexWriter(directory, analyser, true);\r\n Term j=new Term(\"id\",\"\"+t.getLineID());\r\n writer.deleteDocuments(j);\r\n Document doc=new Document();\r\n Field field;\r\n field = new Field(\"text\", t.getText(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"comment\", t.getComment(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"creator\", \"\" + t.UID, Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"security\", \"\" + \"private\", Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"line\", \"\" + t.getLine(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"page\", \"\" + t.getFolio(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"id\", \"\" + t.getLineID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"manuscript\", \"\" + new Manuscript(t.getFolio()).getID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"projectID\", \"\" + t.getProjectID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n writer.addDocument(doc);\r\n writer.commit();\r\n \twriter.close();\r\n\r\n }", "@Override\r\n\tpublic int update(Estado_Civil estado) {\n\t\treturn jdbcTemplate.update(\"call PKG_ESTADO_CIVIL.PR_UPD_ESTADO_CIVIL(?,?)\", estado.getIdestado_civil(), estado.getNombre());\r\n\t}", "public void updateTourById(Map<String, Object> parameters, String filePath, String userName) {\n String asCatetoryIndex = MapUtil.getStringFromMap(parameters, \"as_index\");\r\n if (asCatetoryIndex.equalsIgnoreCase(\"Y\")) {\r\n String cid = MapUtil.getStringFromMap(parameters, \"cid\");\r\n jt.update(SQL_RESET_TOUR_INDEX, cid);\r\n\r\n }\r\n\r\n Object[] params = MapUtil.getObjectArrayFromMap(parameters,\r\n \"cid,title,description,content,show_in_table,as_index,id\");\r\n jt.update(SQL_UPDATE_TOUR_BY_ID, params[0], params[1], filePath, params[2], params[3],\r\n userName, params[4], params[5], params[6]);\r\n }", "public void modifierVie(int modificationVie);", "@Override\n public void actualizar(DycpCompensacionDTO compensacion) throws SIATException {\n try {\n List<Object> params = new ArrayList<Object>();\n boolean comma = false;\n StringBuilder valoresSettear = new StringBuilder();\n\n if (compensacion.getDyccEstadoCompDTO() != null) {\n valoresSettear.append(\" IDESTADOCOMP = ?\");\n params.add(compensacion.getDyccEstadoCompDTO().getIdEstadoComp());\n comma = Boolean.TRUE;\n }\n\n if (compensacion.getDyccAprobadorDTO() != null) {\n if (comma) {\n valoresSettear.append(\",\");\n }\n valoresSettear.append(\" NUMEMPLEADOAPROB = ?\");\n params.add(compensacion.getDyccAprobadorDTO().getNumEmpleado());\n }\n\n String sentencia = \" UPDATE DYCP_COMPENSACION SET \" + valoresSettear.toString() + \" WHERE NUMCONTROL = ?\";\n log.info(\"sentencia ->\" + sentencia);\n\n params.add(compensacion.getNumControl());\n\n Object[] p = new Object[params.size()];\n int i = ConstantesDyCNumerico.VALOR_0;\n\n for (Object o : params) {\n p[i] = o;\n log.info(\"parametro en update compensacion ->\" + o + \"<-\");\n i++;\n }\n\n jdbcTemplateDYC.update(sentencia, p);\n } catch (Exception dae) {\n log.error(ConstantesDyC1.TEXTO_1_ERROR_DAO + dae.getMessage() + ConstantesDyC1.TEXTO_3_ERROR_DAO +\n ExtractorUtil.ejecutar(compensacion) + ConstantesDyC1.TEXTO_8_CAUSAS + dae);\n throw new SIATException(dae);\n }\n }", "protected int update(Connection db, boolean override) throws SQLException {\n int resultCount = 0;\n\n if (this.getId() == -1) {\n throw new SQLException(\"Message ID was not specified\");\n }\n\n PreparedStatement pst = null;\n StringBuffer sql = new StringBuffer();\n\n sql.append(\n \"UPDATE \" + DatabaseUtils.addQuotes(db, \"message\") + \" \" +\n \"SET name=?, description = ?, template_id = ?, subject = ?, \" +\n \"body = ?, url = ?, img = ?, access_type = ?, \" +\n \"enabled = ?, \");\n\n if (!\"\".equals(replyTo)){\n sql.append(\"reply_addr = ?, \");\n }\n\n if (override == false) {\n sql.append(\"modified = \" + DatabaseUtils.getCurrentTimestamp(db) + \", \");\n }\n\n sql.append(\n \"modifiedby = ? \" +\n \"WHERE id = ? \");\n if (!override) {\n sql.append(\"AND modified \" + ((this.getModified() == null) ? \"IS NULL \" : \"= ? \"));\n }\n\n int i = 0;\n pst = db.prepareStatement(sql.toString());\n pst.setString(++i, this.getName());\n pst.setString(++i, this.getDescription());\n pst.setInt(++i, this.getTemplateId());\n pst.setString(++i, this.getMessageSubject());\n pst.setString(++i, this.getMessageText());\n pst.setString(++i, this.getUrl());\n pst.setString(++i, this.getImage());\n pst.setInt(++i, this.getAccessType());\n pst.setBoolean(++i, this.getEnabled());\n if (!\"\".equals(replyTo)){\n pst.setString(++i, this.getReplyTo());\n }\n pst.setInt(++i, this.getModifiedBy());\n pst.setInt(++i, this.getId());\n\n if (!override && this.getModified() != null) {\n pst.setTimestamp(++i, modified);\n }\n \n resultCount = pst.executeUpdate();\n pst.close();\n MessageAttachmentList oldAttachmentList= new MessageAttachmentList();\n oldAttachmentList.delete(db, Constants.MESSAGE_FILE_ATTACHMENTS,this.getId());\n \n Iterator ma = messageAttachments.iterator();\n while (ma.hasNext()) {\n MessageAttachment thisAttachment = (MessageAttachment) ma.next();\n thisAttachment.setLinkModuleId(Constants.MESSAGE_FILE_ATTACHMENTS);\n thisAttachment.setLinkItemId(this.getId());\n thisAttachment.buildFileItems(db,true);\n thisAttachment.insert(db);\n }\n return resultCount;\n }", "@Override\n public void updateAlumno(String contenido) {\n txtRecibido.setText(contenido);\n clienteServer.enviar(buscarKardex(contenido));\n }", "int updateByPrimaryKey(TempletLink record);", "public void funcFinalizaAtd(){ \n \n \n AtendimentosDAO atd = new AtendimentosDAO();\n int codAtd = Integer.parseInt(txtCodAtd.getText());\n Atendimentos at = atd.PesquisaAtd(codAtd);\n at.setDescricao(txtDescricao.getText());\n atd.AlterarAtendimentoMtData(at);\n atd.AlterarStatus(codAtd, atd.retornaStatusID(\"Finalizado\"));\n inicializacao(1);\n }", "public void updateText(String s){\n TextView articleText = (TextView) findViewById(R.id.article_text);\n articleText.setText(s);\n }", "public static void editarEstudiante(Estudiante estudiante) {\r\n //metimos este método a la base de datos\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion establecida!\");\r\n Statement sentencia = conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"update docente set \"\r\n + \"Nro_de_ID='\" + estudiante.getNro_de_ID()\r\n + \"',Nombres='\" + estudiante.getNombres()\r\n + \"',Apellidos='\" + estudiante.getApellidos()\r\n + \"',Laboratorio='\" + estudiante.getLaboratorio()\r\n + \"',Carrera='\" + estudiante.getCarrera()\r\n + \"',Modulo='\" + estudiante.getModulo()\r\n + \"',Materia='\" + estudiante.getMateria()\r\n + \"',Fecha='\" + estudiante.getFecha()\r\n + \"',Hora_Ingreso='\" + estudiante.getHora_Ingreso()\r\n + \"',Hora_salida='\" + estudiante.getHora_Salida()\r\n + \"'where Nro_de_ID='\" + estudiante.getNro_de_ID() + \"';\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n }", "public Result viaje_edit(Long id){\n \n Viaje viaje=Viaje.find.byId(id);\n List<Cabezal> cabezales = Cabezal.find.where().eq(\"activo\",true).findList();\n List<Cliente> clientes = Cliente.find.where().eq(\"activo\",true).findList();\n List<Motorista> motoristas = Motorista.find.where().eq(\"activo\",true).findList();\n \n if(viaje==null){\n return redirect(routes.LogisticaController.viajes());\n }\n\n return ok(viaje_edit.render(viaje,cabezales,motoristas,clientes));\n\n }", "public static Boolean editReview(String reviewContent, Integer yearUpload,Integer id) {\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\tString edit = \"UPDATE Review\\n\" + \"SET \\n\" + \"reviewContent = ?,\\n\" + \n\t\t\t\t\"yearUpload = ?\\n\" + \"WHERE\\n\" + \" id = ?;\";\n\t\ttry (Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tCallableStatement st= conn.prepareCall(edit);){\n\t\t\t\t\tst.setString(1,reviewContent);\n\t\t\t\t\tst.setInt(2,yearUpload);\n\t\t\t\t\tst.setInt(3,id);\n\t\t\t\t\tint success = st.executeUpdate();\n\t\t\t\t\tif(success>0) {\n\t\t\t\t\t\tSystem.out.println(\"Success\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tSystem.out.println(\"Fail\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\tcatch (SQLException ex)\n\t\t\t\t{System.out.println(\"SQLException: \" + ex.getMessage());\n\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\n\t}", "public void updateCita(int id, Citas cita) {\n try {\n PreparedStatement preparedStatement = con.prepareStatement(\"UPDATE paciente SET name=?,doctor=?,fecha=?,hora=?,tel=?,correo=?,genero=?,motivo=?,sintomas=? WHERE id_paciente=?;\");\n preparedStatement.setString(1,cita.getName());\n preparedStatement.setString(2,cita.getDoctor());\n preparedStatement.setString(3, cita.getFecha());\n preparedStatement.setString(4,cita.getHora());\n preparedStatement.setString(5,cita.getTel());\n preparedStatement.setString(6,cita.getCorreo());\n preparedStatement.setString(7,cita.getGenero());\n preparedStatement.setString(8,cita.getMotivo());\n preparedStatement.setString(9,cita.getSintomas());\n preparedStatement.setInt(10,id);\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void update2()\n {\n int zzz = getJdbcTemplate().update(\"UPDATE account SET NAME =?,money=money-? WHERE id =?\", \"ros\", \"100\", 2);\n System.out.println(zzz);\n }", "public int updateCourse(int idCourse, String courseName, String courseDescription, int nbHourTotal, String idTeacher, int promoId){\n Connection connection = getConnection();\n int result = 0;\n if(connection!= null){\n try{\n PreparedStatement preparedStatement = connection.prepareStatement(\"UPDATE Courses SET courseName = ?, courseDescription = ?, nbHourTotal = ?, idTeacher = ?, idPromo = ? WHERE idCourse = ?\");\n preparedStatement.setInt(6, idCourse);\n preparedStatement.setString(1, courseName);\n preparedStatement.setString(2, courseDescription);\n preparedStatement.setInt(3, nbHourTotal);\n preparedStatement.setString(4, idTeacher);\n preparedStatement.setInt(5, promoId);\n result = preparedStatement.executeUpdate();\n } catch(SQLException e){\n e.printStackTrace();\n } finally {\n closeConnection(connection);\n }\n }\n return result;\n }", "public void tapis (int position, int valeur) {\r\n\t\t((JJoueur)joueurs.get(position)).miser(valeur);\r\n\t\tthis.ajouterPot(valeur);\r\n\t\t//TODO Faire tapis pour un joueur\r\n\t\t//TODO Créer un nouveau pot de table\r\n\t}", "public static void updatetea(String teaid2, String teaname2, Date teabirth2, String protitle2, String cno2) {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"update teacher set Tname = ?,Tbirth = ?,Tprotitle = ?,Cno = ? where ID = ? \");\n\t\t\tps.setString(1, teaname2);\n\t\t\tps.setDate(2, teabirth2);\n\t\t\tps.setString(3, protitle2);\n\t\t\tps.setString(4, cno2);\n\t\t\tps.setString(5, teaid2);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录修改成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据修改失败!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static int update(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database untuk merubah data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement( \n \"update t_user set user_name=?,nama_lengkap=?,password=?,hak_akses=? where id=?\"); \n ps.setString(1,u.getUserName()); \n ps.setString(2,u.getNamaLengkap()); \n ps.setString(3,u.getPassword()); \n ps.setString(4,u.getHakAkses()); \n ps.setInt(5,u.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n return status; \n }", "public void envoyerEtatUniteProduction(EtatUniteProduction etat) throws Exception;", "public static void updateMission(String gamecode, String title){\n try{\n DBHandler.completedMission(gamecode,title,c);\n } catch (SQLException e){\n e.printStackTrace();\n }\n\n }", "public void setTemplateid(Integer templateid) {\n this.templateid = templateid;\n }", "@Test\n\tpublic void editTest() throws ParseException {\n\t\n\t\t\n\t\tSystem.out.println(\"-----Edit announcement test. Positive 0 to 4, Negative 5 to 9.\");\n\t\t\n\t\tObject testingData[][]= {\n\t\t\t\t//Positive cases\n\t\t\t\t{\"announcement1-1\", \"user1\", \"Seguro de citas online\", \"Descripción del anuncio 1\", null},\n\t\t\t\t{\"announcement1-2\", \"user1\", \"Anuncio 2\", \"Descripción del anuncio 1\", null},\n\t\t\t\t{\"announcement2-1\", \"user2\", \"Ya a la venta\", \"Esta es una nueva descripción\", null},\n\t\t\t\t{\"announcement1-1\", \"user1\", \"Anuncio 4\", \"Descripción del anuncio 1\", null},\n\t\t\t\t{\"announcement1-2\", \"user1\", \"Llega a tu cita en perfecto estado\", \"Descripción del anuncio 1\", null},\n\t\t\t\t\n\t\t\t\t//Negative cases\n\t\t\t\t//Without announcement\n\t\t\t\t{null, \"user1\", \"Anuncio 6\", \"Descripción del anuncio 1\", NullPointerException.class},\n\t\t\t\t//Without user\n\t\t\t\t{\"announcement1-1\", null, \"Anuncio 7\", \"Descripción del anuncio 1\", IllegalArgumentException.class},\n\t\t\t\t//Without title\n\t\t\t\t{\"announcement1-1\", \"user1\", null, \"No se que hago aqui, como he llegado?\", ConstraintViolationException.class},\n\t\t\t\t//Without description\n\t\t\t\t{\"announcement2-1\", \"user2\", \"Anuncio 9\", null, ConstraintViolationException.class},\n\t\t\t\t//With rendezvous not from the user\n\t\t\t\t{\"announcement1-1\", \"user2\", \"Anuncio 11\", \"Descripción del anuncio 1\", IllegalArgumentException.class},\n\t\t\t\t};\n\t\t\n\t\t\n\t\tfor (int i = 0; i< testingData.length; i++) {\n\t\t\ttemplateEditTest(\n\t\t\t\t\ti,\n\t\t\t\t\t(Integer) this.getEntityIdNullable((String) testingData[i][0]),\n\t\t\t\t\t(String) testingData[i][1],\n\t\t\t\t\t(String) testingData[i][2],\n\t\t\t\t\t(String) testingData[i][3],\n\t\t\t\t\t(Class<?>) testingData[i][4]\n\t\t\t\t\t);\n\t\t}\n\t}", "public void saveOneWord(Pojo.OneWord e){ \n template.save(e); \n}", "@Override\n public void update(Beheerder beheerder) {\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"UPDATE gebruiker SET voornaam = ?, achternaam = ?, adres =\" +\n \" ?, postcode = ?, woonplaats = ?, telefoon = ?,email = ?, wachtwoord = ?,rechten_id =? , isactief = ? WHERE id = ?\");\n preparedStatement.setString(1,beheerder.getVoornaam());\n preparedStatement.setString(2,beheerder.getAchternaam());\n preparedStatement.setString(3,beheerder.getAdres());\n preparedStatement.setString(4,beheerder.getPostcode());\n preparedStatement.setString(5,beheerder.getWoonplaats());\n preparedStatement.setString(6,beheerder.getTelefoon());\n preparedStatement.setString(7,beheerder.getEmail());\n preparedStatement.setString(8,beheerder.getWachtwoord());\n preparedStatement.setInt(9, beheerder.getRechten_id());\n preparedStatement.setBoolean(10,beheerder.isActief());\n preparedStatement.setInt(11, beheerder.getId());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n }", "public RespuestaBD modificarRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismomismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioModificacion) {\n/* 437 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 440 */ String s = \"update wkf_detalle set servicio_inicio=\" + servicioInicio + \",\" + \" accion=\" + accion + \",\" + \" codigo_estado=\" + codigoEstado + \",\" + \" servicio_destino=\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \" nombre_procedimiento='\" + nombreProcedimiento + \"',\" + \" correo_destino='\" + correoDestino + \"',\" + \" enviar_solicitud='\" + enviar + \"',\" + \" ind_mismo_proveedor='\" + mismoProveedor + \"',\" + \" ind_mismo_cliente='\" + mismomismoCliente + \"',\" + \" estado='\" + estado + \"',\" + \" caracteristica=\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + \" valor_caracteristica=\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + \" caracteristica_correo=\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + \" metodo_seleccion_proveedor=\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + \" ind_correo_clientes=\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + \" enviar_hermana=\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + \" enviar_si_hermana_cerrada=\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + \" ind_cliente_inicial=\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \"\" + \" where\" + \" codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 465 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 467 */ catch (Exception e) {\n/* 468 */ e.printStackTrace();\n/* 469 */ Utilidades.writeError(\"FlujoDetalleDAO:modificarRegistro \", e);\n/* 470 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 472 */ return rta;\n/* */ }", "public String updateNoteUjian(String idJadwal,String comment) {\n \tboolean setNull = false;\n \tif(Checker.isStringNullOrEmpty(comment)) {\n \t\tsetNull = true;\n \t}\n \tString tmp = null;\n \tboolean pass = true;\n \tint id = 0;\n \ttry {\n \t\tid = Integer.valueOf(idJadwal).intValue();\n \t}\n \tcatch(NumberFormatException nfe) {\n \t\tpass = false;\n \t}\n \tif(pass) {\n \t\ttry {\n \t\t\tContext initContext = new InitialContext();\n \t\t\tContext envContext = (Context)initContext.lookup(\"java:/comp/env\");\n \t\t\tds = (DataSource)envContext.lookup(\"jdbc\"+beans.setting.Constants.getDbschema());\n \t\t\tcon = ds.getConnection();\n \t\t\tstmt = con.prepareStatement(\"update JADWAL_TEST set NOTE_PENGAWAS=? where ID=?\");\n \t\t\tif(setNull) {\n \t\t\t\tstmt.setNull(1, java.sql.Types.VARCHAR);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tstmt.setString(1, comment);\n \t\t\t}\t\n \t\t\tstmt.setInt(2, id);\n \t\t\tint i = stmt.executeUpdate();\n \t\t\tif(i>0) {\n \t\t\t\ttmp = \"\"+comment;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tstmt = con.prepareStatement(\"select NOTE_PENGAWAS from JADWAL_TEST where ID=?\");\n \t\t\tstmt.setInt(1, id);\n \t\t\trs = stmt.executeQuery();\n \t\t\ttmp = \"\"+rs.getString(\"NOTE_PENGAWAS\");\n \t\t\t}\n \t\t}\n \t\tcatch (NamingException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tcatch (SQLException ex) {\n \t\t\tex.printStackTrace();\n \t\t} \n \t\tfinally {\n \t\tif (rs!=null) try { rs.close(); } catch (Exception ignore){}\n \t\t if (stmt!=null) try { stmt.close(); } catch (Exception ignore){}\n \t\t if (con!=null) try { con.close();} catch (Exception ignore){}\n \t}\n \t}\n \treturn tmp;\n }", "boolean editInvitation(Invitation invitation);", "public void ajouterChambreDeCommerce(){\n }", "public void modificarPrograma() {\r\n // Abro y obtengo la conexion\r\n this.conection.abrirConexion();\r\n Connection con = this.conection.getConexion();\r\n\r\n // Preparo la consulta\r\n String sql = \"UPDATE programa SET \\n\"\r\n + \"nombre = ?,\\n\"\r\n + \"version = ?,\\n\"\r\n + \"edicion = ?,\\n\"\r\n + \"tipo_programa = ?,\\n\"\r\n + \"fecha_aprobacion = ?,\\n\"\r\n + \"WHERE programa.codigo = ?\";\r\n System.out.println(sql);\r\n\r\n try {\r\n // La ejecuto\r\n PreparedStatement ps = con.prepareStatement(sql);\r\n ps.setString(1, this.nombre);\r\n ps.setString(2, this.version);\r\n ps.setString(3, this.edicion);\r\n ps.setString(4, this.tipo_programa);\r\n ps.setString(5, this.fecha_aprobacion);\r\n ps.setInt(6, this.codigo);\r\n int rows = ps.executeUpdate();\r\n System.out.println(rows);\r\n // Cierro la conexion\r\n this.conection.cerrarConexion();\r\n } catch (SQLException ex) {\r\n System.out.println(ex.getMessage());\r\n }\r\n }", "@Override\n\tpublic void editar(Cliente cliente) throws ExceptionUtil {\n\t\t\n\t}", "int updateByPrimaryKey(FctWorkguide record);", "public static void updateequipo(Integer id ,String nombre,String ciudad,String pais) {\r\n\r\n\t\tConnection c = ConnectionDB.conectarMySQL();\r\n\t\ttry {\r\n\t\t\tPreparedStatement stmt = c\r\n\t\t\t\t\t.prepareStatement(\"UPDATE equipo SET nombre='\"+ nombre + \"', ciudad='\"+ciudad+\"', pais='\"+ pais+\"' WHERE id=\"+id);\r\n\t\t\tstmt.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void setTemplate(Template template)\n/* */ {\n/* 62 */ this.template = template;\n/* */ }", "public String update() {\n\t\tif (getElement().getIdTipo() == null) {\n\t\t\tFacesContext.getCurrentInstance()\n\t\t\t\t\t.addMessage(\n\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\tnew FacesMessage(\"Tipo non valido\",\n\t\t\t\t\t\t\t\t\t\"Selezionare il tipo.\"));\n\t\t\treturn null;\n\t\t}\n\t\tModulo t = getSession().update(element);\n\t\t// refresh locale\n\t\telement = t;\n\t\trefreshModel();\n\t\t// vista di destinzione\n\t\toperazioniLogHandler.save(OperazioniLog.MODIFY, JSFUtils.getUserName(),\n\t\t\t\t\"modifica moduli: \" + this.element.getNome());\n\t\treturn viewPage();\n\t}" ]
[ "0.58228695", "0.5813584", "0.58018947", "0.57084256", "0.5603835", "0.5550859", "0.55459183", "0.5515439", "0.5506558", "0.5496149", "0.5468511", "0.54237986", "0.53736967", "0.5357217", "0.5325004", "0.5293543", "0.5280248", "0.527236", "0.52330464", "0.5224916", "0.52202934", "0.52195597", "0.5199691", "0.5199035", "0.5193163", "0.51930505", "0.5166531", "0.51473147", "0.5143841", "0.513773", "0.51173824", "0.5111448", "0.5108954", "0.5107284", "0.51053107", "0.5102242", "0.5096362", "0.50913876", "0.5091216", "0.5089681", "0.5089183", "0.5081165", "0.506943", "0.50642884", "0.5051973", "0.5047526", "0.50462234", "0.5040271", "0.50397855", "0.5039022", "0.50380874", "0.5037387", "0.5035443", "0.50313497", "0.5027706", "0.5027125", "0.50242984", "0.50218743", "0.50135237", "0.5009013", "0.50066704", "0.4997991", "0.49925894", "0.49852824", "0.49846146", "0.49825308", "0.4970604", "0.4970144", "0.49634197", "0.4963018", "0.49481434", "0.49471962", "0.49401438", "0.4933519", "0.49324855", "0.49303663", "0.4927491", "0.49270737", "0.49263257", "0.49244094", "0.4924226", "0.49198204", "0.49190465", "0.49175027", "0.49110794", "0.49092728", "0.49092424", "0.49077713", "0.49068952", "0.49045944", "0.49014112", "0.4900858", "0.49001676", "0.48977387", "0.48936635", "0.48906666", "0.48848325", "0.48847255", "0.48808107", "0.48807517", "0.4877668" ]
0.0
-1
public int saveAuktion_zusatz(int offerId, int auktion_texte_id);
public int getVorlageShopObjectID(int templateId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int inserir(OfertaDisciplina offer){\n\t\tint id = 0;\n\t\tString sql = \"INSERT INTO deinfo.oferta_disciplina(ano, semetrstre, disciplina_oferta, localizalicao, ID_CURSO_DISPONIVEL) \"\n\t\t\t\t+ \"values(?,?,?,?)\";\n\t\ttry{\n\n\t\t\tPreparedStatement smt = (PreparedStatement) bancoConnect.retornoStatement(sql);\n\t\t\tsmt.setInt(1, offer.getAno());\n\t\t\tsmt.setInt(2, offer.getSemestre());\n\t\t\tsmt.setString(3, offer.getDisciplina().getCodigo());\n\t\t\tsmt.setInt(4, offer.getLocal().getCodigo());\n\t\t\tsmt.setInt(5, offer.getCurso().getCodigo());\n\t\t\tsmt.execute();\n\n\t\t\tResultSet st = smt.getGeneratedKeys();\n\t\t\tst.next();\n\n\t\t\tid = st.getInt(1);\n\t\t}catch(Exception e){\n\t\t\tJOptionPane.showConfirmDialog(null, e.getMessage(), \"Erro\", -1);\n\t\t}\n\t\treturn id;\n\t}", "@Override\n\tpublic int save(CursoAsignatura ca) {\n\t\treturn 0;\n\t}", "public void ajouterChambreDeCommerce(){\n }", "public void insertarAlimento (int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas, float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "public void addAnzeige(Anzeige anzeigeToAdd) throws StoreException {\n \r\n \t try {\r\n PreparedStatement preparedStatement = connection\r\n .prepareStatement(\"insert into Dbp71.Anzeige (titel, text, preis, ersteller, status) values (?,?,?,?,?)\");\r\n \t\t\r\n //preparedStatement.setInt(1, anzeigeToAdd.getId_Anzeige());\r\n preparedStatement.setString(1, anzeigeToAdd.getTitel());\r\n preparedStatement.setString(2, anzeigeToAdd.getText());\r\n preparedStatement.setBigDecimal(3, BigDecimal.valueOf(anzeigeToAdd.getPreis()));\r\n // preparedStatement.setString(5, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(4, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(5, anzeigeToAdd.getStatus());\r\n System.out.println(anzeigeToAdd.getTitel()+ anzeigeToAdd.getText()+ BigDecimal.valueOf(anzeigeToAdd.getPreis())\r\n + anzeigeToAdd.getErsteller()+ anzeigeToAdd.getErsteller()+ anzeigeToAdd.getStatus());\r\n preparedStatement.executeUpdate();\r\n \r\n \r\n }\r\n catch (SQLException e) {\r\n throw new StoreException(e);\r\n }\r\n }", "public static int save(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database\n PreparedStatement ps=con.prepareStatement( \n \"insert into periode(tahun, awal, akhir) values(?,?,?)\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n status=ps.executeUpdate(); \n }catch(Exception e){\n System.out.println(e);\n } \n return status; \n }", "public boolean Create(OfferModel offer)\n\t{\n\t\toffer.setId(850);\n\t\t\n\t\ttry {\t\n\t\t\t\n\t\t\tClassLoader classLoader = getClass().getClassLoader();\n\t\t\tFile file = new File(classLoader.getResource(\"offer.txt\").getFile());\n\t\t\tFileOutputStream f = new FileOutputStream(file);\n\t\t\tObjectOutputStream o = new ObjectOutputStream(f);\n\t\t\t\n\t\t\to.writeObject(offer);\t\n\n\t\t\to.close();\n\t\t\tf.close();\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\t\t\t\n\t\t\treturn false;\n\t\t}\n\t}", "public void savePrioritaet(String bezeichnung) throws Exception;", "void save(Exam exam);", "private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to save data...\";\n if (flag){\n message = \"Success to save data...\";\n }\n JOptionPane.showMessageDialog(this, message, \"Allert / Notification\", \n JOptionPane.INFORMATION_MESSAGE);\n \n bindingTable();\n reset();\n }", "public void save();", "public void save();", "public void save();", "public void save();", "public boolean save(Clientes clientes){\n \n String sql = \"INSERT INTO clientes (fantasia, cep, uf, logradouro, nr, cidade, bairro, contato, email, fixo, celular, obs) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)\";\n PreparedStatement pst = null;\n \n try {\n pst = con.prepareStatement(sql);\n pst.setString(1, clientes.getFantasia());\n pst.setString(2, clientes.getCep());\n pst.setString(3, clientes.getUf());\n pst.setString(4, clientes.getLogradouro());\n pst.setString(5, clientes.getNr());\n pst.setString(6, clientes.getCidade());\n pst.setString(7, clientes.getBairro());\n pst.setString(8, clientes.getContato());\n pst.setString(9, clientes.getEmail());\n pst.setString(10, clientes.getFixo());\n pst.setString(11, clientes.getCelular());\n pst.setString(12, clientes.getObs());\n pst.executeUpdate();\n return true;\n\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Erro ao Salvar!\"+ex);\n return false;\n }finally{\n ConectionFactory.closeConnection(con, pst);\n }\n }", "public boolean insertAdministrador(int id,int idEscuela,String nombre){\n boolean retorno = false;\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"IDADMIN\",id);\n contentValues.put(\"IDESCUELA\",idEscuela);\n contentValues.put(\"NOMADMIN\",nombre);\n long resul = db.insert(\"ADMINISTRADOR\",null,contentValues);\n db.close();\n if (resul ==-1){\n retorno=false;\n }else{\n retorno=true;\n }\n return retorno;\n }", "public void insertOffer(Offer o);", "Lembretes persistir(Lembretes lembretes);", "public void salvarNoBanco() {\n\n try {\n ofertaDisciplinaFacade.save(oferta);\n// JsfUtil.addSuccessMessage(\"Pessoa \" + pessoa.getNome() + \" criado com sucesso!\");\n oferta= null;\n// recriarModelo();\n } catch (Exception e) {\n JsfUtil.addErrorMessage(e, \"Ocorreu um erro de persistência\");\n }\n }", "public String enregistrerAuteur(Auteur a) {\n auteurDao.creerAuteur(a);\n return \"SUCCESS\";\n }", "boolean saveExpense(Expenses exp);", "public void saveProduit(Produit theProduit);", "@Override\r\n\tpublic void save(PembayaranObat pembayaranObat) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(pembayaranObat);\r\n\t\tsession.flush();\r\n\t}", "public long save(Registro r) {\n\n long id = r.getCodigo();\n SQLiteDatabase db = banco.getWritableDatabase();\n try {\n\n\n ContentValues values = new ContentValues();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-M-d\");\n String dateString = sdf.format(r.getData());\n values.put(\"data\", dateString);\n values.put(\"distancia\", r.getDistancia());\n values.put(\"consumo\", r.getConsumo());\n values.put(\"mediaAceleracao\", r.getMediaAberturaBorboleta());\n values.put(\"mediaConsumo\", r.getMediaConsumo());\n values.put(\"codTipoCombustivel\", r.getTipoCombustivel().getCodigo());\n values.put(\"codCarro\", r.getCarro().getCodigo());\n values.put(\"codUsuario\", r.getUsuario().getCodigo());\n\n if (id != 0) {//SE O ID É DIFERENTE DE 0 ATUALIZA,\n\n System.out.println(\"Entrou !!\");\n String _id = String.valueOf(r.getCodigo());\n String[] whereArgs = new String[]{_id};\n\n // update registro set values = ... where _id=?\n int count = db.update(TABELA, values, \"codigo=?\", whereArgs);\n\n return count;\n } else {\n\n id = db.insert(TABELA, \"\", values);\n System.out.println(\"Deu certo !! \\n \" + values);\n return id;\n }\n } finally {\n db.close();\n }\n }", "void adicionaComentario(Comentario comentario);", "Long save(ArticleForm articleForm) throws ServiceException;", "private void save() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null) ) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.insert(nama_pasien2,\n nama_dokter2,\n tgl_pengobatanField.getText().toString().trim(),\n waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),\n hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "public void save(Veranstaltung veranstaltung) throws RuntimeException;", "void save();", "void save();", "void save();", "public void ajouterFiche(Fiche fiche) ;", "public long createOffer (OfferModel offerModel) {\n SQLiteDatabase db = getWritableDatabase() ;\n\n ContentValues values = new ContentValues() ;\n values.put(KEY_OFFERS_PRODUCT_ID, offerModel.getProductId());\n values.put(KEY_OFFERS_NAME, offerModel.getName());\n values.put(KEY_OFFERS_PRICE, offerModel.getPrice());\n values.put(KEY_OFFERS_IMAGE_URL, offerModel.getImageUrl()) ;\n values.put(KEY_OFFERS_IN_STOCK_STATUS, offerModel.getImageUrl());\n values.put(KEY_OFFERS_DISCOUNT, offerModel.getDiscount());\n values.put(KEY_OFFERS_BEACON_ID, offerModel.getBeaconId());\n\n long offer_id = db.insert(TABLE_OFFERS, null, values) ;\n return offer_id ;\n }", "public Article save(Article article);", "@Override\n\tpublic void save(Religiao obj) throws Exception {\n\t\t\n\t}", "public void saveUser(Integer id, Boolean Alert, Integer NbMax,Integer nbactuel,\n\t\t\tCommunicationWithServer client) throws IOException {\n\n\t\t\n\t\tinfotraffic bollard = new infotraffic();\n\t\tRequest req = new Request();\n\t\tConvertJSON converter = new ConvertJSON();\n\t\tbollard.setId(id);\n\t\tbollard.setAlert(Alert);\n\t\tbollard.setNbmaxcar(NbMax);\n\t\tbollard.setNbactuel(nbactuel);\n\t\t\n\t\treq.setOperation_type(\"insert\");\n\t\treq.setTarget(\"infotraffic\");\n\t\treq.setSource(\"\");\n\t\treq.setObj(converter.infotrafficToJson(bollard));\n\n\t\t//client.startConnection(SERVER_ADDRESS, SERVER_PORT);\n\n\t\tclient.sendMessage(req);\n\t\t//client.stopConnection();\n\t\tSystem.out.println(\"ok\");\n\t}", "public boolean save(ApplyInvite model);", "public void insertEstadisticas(String IdPregunta, Integer validacicion, String co_nivel, String co_categoria){\n //Creamos el conector de bases de datos\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n\n ContentValues registro = new ContentValues(); // Instanciamos el objeto contenedor de valores.\n registro.put(\"co_estudios\", consultarEstudioUltimaId() );\n registro.put(\"co_pregunta\", IdPregunta);\n registro.put(\"co_nivel\", co_nivel);\n registro.put(\"co_categoria\", co_categoria);\n registro.put(\"validacion\", validacicion);\n\n System.out.println( \" ------------- Insert RESPUESTA ------------------\");\n System.out.println( \" IdEstudio \" + validacicion );\n\n\n //Conectamos con la base datos insertamos.\n BasesDeDatos.insert(\"t_estadisticas\", null, registro);\n BasesDeDatos.close();\n\n }", "public String save() throws SQLException {\r\n\t\taktieDao = new AktieDAO();\r\n\t\tAktie aktie = new Aktie();\r\n\t\tMeldungFormBean m = new MeldungFormBean();\r\n\t\taktie.setName(name);\r\n\t\taktie.setKuerzel(kuerzel);\r\n\t\taktie.setNominalwert(nominalpreis);\r\n\t\taktie.setDividende(dividende);\r\n\t\taktie = aktieDao.insertAktie(aktie);\r\n\r\n\t\tVerkaufDAO verkaufDao = new VerkaufDAO();\r\n\t\t// insert in DB\r\n\t\tverkaufDao.insertAuftragAdmin(nominalpreis, aktie.getId());\r\n\t\t// Meldung\r\n\t\tm.setAktuelleMeldung(m.getMeldung1() + name);\r\n\t\tm.putMeldungToSession(m);\r\n\t\treturn \"/private/admin/Admin?faces-redirect=true\";\r\n\r\n\t}", "public void save(PtJJdwcy entity);", "public interface DeskBackMessService {\n\n public int save(DeskBackMess deskBackMess);\n}", "void save(Cartera entity);", "public String saveText() {\n\n return \"!Základ!\\n\\n\" + \"Hrubá mzda : \" + wage + \"Kč\\n\" + \"Sleva poplatníka : \" + saveTextChoose + \"\\nSuperhrubá mzda : \" + calc.superGrossWage(wage) + \" Kč\\n\" + \"\\n!Zaměstnavatel odvody z mzdy!\\n\\n\" + \"Socialní pojištění : \" + calc.socialInsuranceEmployer(wage) + \" Kč\\n\" + \"Zdravotní pojištění: \" + calc.healthInsuranceEmployer(wage) + \" Kč\\n\" +\n \"\\n!Zaměstnanec odvody z mzdy!\\n\" + \"\\nSocialní pojištění : \" + calc.socialInsuranceEmployee(wage) + \" Kč\\n\" + \"Zdravotní pojištění : \" + calc.healthInsuranceEmployee(wage) + \" Kč\\n\" +\n \"\\n!Daň ze závislé činnosti!\\n\" + \"\\nZáklad daní :\" + calc.round(wage) + \" Kč\\n\" + \"Daň : \" + calc.tax(wage) + \" Kč \\n\" + \"Daň po odpoču slevy : \" + calc.afterDeductionOfDiscounts(wage, choose) + \" Kč\\n\" +\n \"\\nČistá mzda : \" + calc.netWage(wage, choose) + \" Kč\";\n }", "@Action(value=\"save\",results={@Result(name=\"save\",location=\"/zjwqueryMange.jsp\")})\n\tpublic String save()\n\t{\n\t\tkehuDAO.save(kehu);\n\t\t//保存 kehu\n\t\tkehuList = (ArrayList) kehuDAO.findAll();\n\t\treturn \"save\";\n\t}", "Hotel saveHotel(Hotel hotel);", "public void saveMedicine(Medicine medicine);", "public void saveAnswer(Answer answer) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n dbb.saveAnswer(answer);\n dbb.commit();\n dbb.closeConnection();\n }", "@RequestMapping(value = \"g_entrega\")\r\n public String guardarEntrega(Model model, HttpSession session,@RequestParam Integer idAvances) {\n PersonaDTO personaDTO = (PersonaDTO) session.getAttribute(\"personaDTO\");\r\n AlumnoDTO p = alumnoDAO.get(personaDTO.getCodigo());\r\n AvanceDTO avances = alumnoDAO.obtenerAvance(idAvances);\r\n avanceDAO.actualizar(avances);\r\n model.addAttribute(\"avance\", avances);\r\n model.addAttribute(\"personaDTO\", p);\r\n return \"redirect: /alumno/r_entrega\";\r\n }", "@RequestMapping(value = \"/cabaretier/save\", method = RequestMethod.POST)\n public String saveCabaretier(@RequestParam(\"cabaretier_voornaam\") String cabaretier_voornaam,\n @RequestParam(\"cabaretier_achternaam\") String cabaretier_achternaam,\n @RequestParam(\"geboortedatum\") String geboortedatum,\n @RequestParam(\"geslacht\") String geslacht) {\n \tCabaretier cabaretier = new Cabaretier(cabaretier_voornaam, cabaretier_achternaam, geboortedatum, geslacht, 0);\n \tcabaretierService.save(cabaretier);\n\n \treturn \"redirect:/\";\n }", "public void save() {\n }", "public abstract Banner saveBanner(Banner banner);", "public static void inserir(String nome, int id){\n System.out.println(\"Dados inseridos!\");\n }", "int insert(CmsVoteTitle record);", "public void saveArticlesList();", "private void saveConsentimientoZika(String estado) {\n int c = mConsentimientosZika.size();\n for (ConsentimientoZika cons : mConsentimientosZika) {\n cons.getMovilInfo().setEstado(estado);\n estudioAdapter.updateConsZikaSent(cons);\n publishProgress(\"Actualizando ConsentimientoZika\", Integer.valueOf(mConsentimientosZika.indexOf(cons)).toString(), Integer\n .valueOf(c).toString());\n }\n //actualizar.close();\n }", "void save(Athletes athletes);", "@Override\n\tpublic int save(JSONObject param) {\n\t\tMap<String, Object> data = new HashMap<String, Object>();\n\t\tString movieId = StringUtil.ToString(param.getString(\"movieId\"));\n\t\tSystem.out.println(movieId);\n\t\tString recommand = StringUtil.ToString(param.getString(\"recommand\"));\n\t\tString tip = StringUtil.ToString(param.getString(\"tip\"));\n\t\tString str = uuid.toString();\n String id = str.substring(0, 8) + str.substring(9, 13) + str.substring(14, 18) + str.substring(19, 23) + str.substring(24);\n\t\tdata.put(\"id\", id);\n\t\tdata.put(\"movieId\", movieId);\n\t\tdata.put(\"recommand\", recommand);\n\t\tdata.put(\"tip\", tip);\n\t\tint number = this.insert(\"MovieRecommand.insert\", data);\n\t\treturn number;\n\t}", "public interface ViewTambahTeman {\n void saveData(Teman teman);\n}", "@Override\n\tpublic Opcion save(Opcion t) throws Exception {\n\t\treturn opcionRepository.save(t);\n\t}", "void entrerAuGarage();", "public void editarAlimento(int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas ,float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "@Override\n\tpublic void saveAnnounce(Announcement a) {\n\t\t\n\t}", "protected void saveDatos() {\r\n\r\n myNombre = (TextView) findViewById(R.id.spinNombre);\r\n myPrecio = (TextView) findViewById(R.id.spinPrecio);\r\n myMarca = (TextView) findViewById(R.id.spinMarca);\r\n myId_juego = (TextView) findViewById(R.id.spinID);\r\n\r\n String id = myId_juego.getText().toString();\r\n String precio = myPrecio.getText().toString();\r\n String marca = myMarca.getText().toString();\r\n String nombre = myNombre.getText().toString();\r\n\r\n try {\r\n MainActivity.myDbHelper.open();\r\n MainActivity.myDbHelper.insertJuegos(nombre, precio, marca, id);\r\n MainActivity.myDbHelper.close();\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void peleaEn(int idPeleador,int idEmpresa){\n\t\t\n\t}", "public abstract void leerPersistencia();", "@Test\n public void WertZuweisung (){\n String bez = \"Test\";\n String matGr = \"Test\";\n String zeichNr = \"Test\";\n float preis = 3;\n int ve = 1;\n try {\n Teilebestand teil = new Teilebestand();\n teil.setBezeichnung(bez);\n teil.setMaterialgruppe(matGr);\n teil.setPreis(preis);\n teil.setTyp(Teilebestand.Typ.kaufteile);\n teil.setZeichnungsnummer(zeichNr);\n teil.setVe(ve);\n \n teil.save();\n \n assertEquals(teil.getBezeichnung(), bez);\n assertEquals(teil.getMaterialgruppe(), matGr);\n assertEquals(teil.getPreis(), preis, 0.1);\n assertNotNull(preis);\n assertEquals(teil.getTyp(), Teilebestand.Typ.kaufteile);\n assertEquals(teil.getVe(), ve);\n assertNotNull(ve);\n assertEquals(teil.getZeichnungsnummer(), zeichNr);\n \n } catch (SQLException ex) {\n fail(ex.getSQLState());\n }\n \n \n \n \n }", "private void save(){\n\n this.title = mAssessmentTitle.getText().toString();\n String assessmentDueDate = dueDate != null ? dueDate.toString():\"\";\n Intent intent = new Intent();\n if (update){\n assessment.setTitle(this.title);\n assessment.setDueDate(assessmentDueDate);\n assessment.setType(mAssessmentType);\n intent.putExtra(MOD_ASSESSMENT,assessment);\n } else {\n intent.putExtra(NEW_ASSESSMENT, new Assessment(course.getId(),this.title,mAssessmentType,assessmentDueDate));\n }\n setResult(RESULT_OK,intent);\n finish();\n }", "public void saveInwDepartCompetence(InwDepartCompetence inwDepartCompetence);", "public synchronized int doSave(String idUtente, String idItem) throws SQLException {\r\n\t\tint i = 0;\r\n\t\tConnection connection = null;\r\n\t\tPreparedStatement preparedStatement = null;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString insertSQL = \"INSERT INTO \" + InventarioModel.TABLE_NAME + \" (id_utente, id_item) VALUES (?,?)\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection = DriverManagerConnectionPool.getDbConnection();\r\n\t\t\tpreparedStatement = connection.prepareStatement(insertSQL);\r\n\t\t\tpreparedStatement.setString(1, idUtente);\r\n\t\t\tpreparedStatement.setString(2, idItem);\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\tSystem.out.println(preparedStatement.executeUpdate());\r\n\r\n\t\t\tconnection.commit();\r\n\t\t\ti=1;\r\n\t\t}\r\n\t\tcatch(SQLException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (preparedStatement != null)\r\n\t\t\t\t\tpreparedStatement.close();\r\n\t\t\t} finally {\r\n\t\t\t\tDriverManagerConnectionPool.releaseConnection(connection);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn i;\r\n\t\t\t\r\n\t}", "AdPartner insertAdPartner(AdPartner adPartner);", "public String addProduct(Context pActividad,int pId, String pDescripcion,float pPrecio)\n {\n AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(pActividad, \"administracion\", null, 1);\n\n // con el objeto de la clase creado habrimos la conexion\n SQLiteDatabase db = admin.getWritableDatabase();\n try\n {\n // Comprobamos si el id ya existe\n Cursor filas = db.rawQuery(\"Select codigo from Articulos where codigo = \" + pId, null);\n if(filas.getCount()<=0)\n {\n //ingresamos los valores mediante, key-value asocioados a nuestra base de datos (tecnica muñeca rusa admin <- db <- registro)\n ContentValues registro = new ContentValues();\n registro.put(\"codigo\",pId);\n registro.put(\"descripcion\",pDescripcion);\n registro.put(\"precio\", pPrecio);\n\n //ahora insertamos este registro en la base de datos\n db.insert(\"Articulos\", null, registro);\n }\n else\n return \"El ID insertado ya existe\";\n }\n catch (Exception e)\n {\n return \"Error Añadiendo producto\";\n }\n finally\n {\n db.close();\n }\n return \"Producto Añadido Correctamente\";\n }", "public static void aggiungiRecensione(String recensioneText, int idGioco) throws SQLException {\n\t\t\tConnection con = connectToDB();\n\t\t\tString query = \"INSERT INTO recensione\"\n\t\t\t\t\t+ \" (id, testo, approvata, id_gioco) \"\n\t\t\t\t\t+ \" VALUES (null, ?, false, ?) ;\";\n\t\t\t\n\t\t\tPreparedStatement cmd = con.prepareStatement(query);\n\t\t\tcmd.setString(1, recensioneText);\n\t\t\tcmd.setInt(2, idGioco);\n\t\t\t//System.out.println(query);\t\t\n\t\t\tcmd.executeUpdate();\n\t\t}", "public String guardarComentario(){\r\n\t\tcomDao.save(com);\r\n\t\tinit();\r\n\t\treturn null;\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n long result = apodDataSource.saveApod(modelApod);\n if(result != -1) {\n Toast.makeText(getActivity(), getString(R.string.fragments_msgSuccessfullyAdded),\n Toast.LENGTH_SHORT).show();\n }\n }", "public int enregistrerArticleService (Articles article);", "public String insertEscuela(Escuela escuela){\n String regInsertado = \"Registro Escuela #\";\n long contador = 0;\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"IDESCUELA\",escuela.getIdentificadorEscuela());\n contentValues.put(\"NOMESCUELA\", escuela.getNombreEscuela());\n contador = db.insert(\"ESCUELA\",null,contentValues);\n db.close();\n\n if(contador == -1 || contador == 0){\n regInsertado = \"Error al insertar Escuela. Registro duplicado.\";\n }else{\n regInsertado = regInsertado + contador;\n }\n return regInsertado;\n }", "private void guardarAposta(Aposta a) {\r\n\t\ttry {\r\n\t\t\tApostesSQL apostaHelper = new ApostesSQL(this, \"F1Bet.db\", null, 2);\r\n\t\t\tApostesConversor apostesConversor = new ApostesConversor(\r\n\t\t\t\t\tapostaHelper);\r\n\t\t\t// obtenir l'objecte BD\r\n\t\t\tSQLiteDatabase db = apostaHelper.getWritableDatabase();\r\n\t\t\t// Si s'ha obert correctament la BD4\r\n\t\t\tif (db != null) {\r\n\t\t\t\t// guardar a la base de dades\r\n\t\t\t\tapostesConversor.save(a);\r\n\t\t\t\tsetResult(RESULT_OK);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tsetResult(RESULT_CANCELED);\r\n\t\t} finally {\r\n\t\t\tfinish();\r\n\t\t}\r\n\t}", "@Override\n public CerereDePrietenie save(CerereDePrietenie entity) {\n\n String SQL = \"INSERT INTO cereredeprietenie(id, id_1,id_2,status,datac) VALUES(?,?,?,?,?)\";\n\n long id = 0;\n\n\n try (Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(SQL,\n Statement.RETURN_GENERATED_KEYS)) {\n\n\n pstmt.setInt(1, Math.toIntExact(entity.getId()));\n pstmt.setInt(2, Math.toIntExact(entity.getTrimite().getId()));\n pstmt.setInt(3, Math.toIntExact(entity.getPrimeste().getId()));\n pstmt.setString(4, entity.getStatus());\n pstmt.setObject(5, entity.getData());\n\n\n int affectedRows = pstmt.executeUpdate();\n // check the affected rows\n if (affectedRows > 0) {\n // get the ID back\n try (ResultSet rs = pstmt.getGeneratedKeys()) {\n if (rs.next()) {\n id = rs.getLong(1);\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n\n\n return entity;\n\n }", "public void insertaMensaje(InfoMensaje m) throws Exception;", "public Integer save(Expence expence, User user)\r\n/* 51: */ {\r\n/* 52: 48 */ Integer id = (Integer)this.expenceDao.save(expence);\r\n/* 53: 49 */ expence.setId(id);\r\n/* 54: 50 */ ExpenceFlow expenceFlow = new ExpenceFlow();\r\n/* 55: 51 */ expenceFlow.setGxsj(new Date());\r\n/* 56: 52 */ expenceFlow.setExpence(expence);\r\n/* 57: 53 */ expenceFlow.setUser(user);\r\n/* 58: 54 */ expenceFlow.setOptContent(\"新增\");\r\n/* 59: 55 */ expenceFlow.setYwlc(Integer.valueOf(1));\r\n/* 60: 56 */ this.expenceFlowDao.save(expenceFlow);\r\n/* 61: 57 */ return id;\r\n/* 62: */ }", "@Override\n public int save( Mention obj ) {\n return 0;\n }", "public interface DBService {\n\n Offer save(Offer offer);\n\n}", "public boolean save();", "String addEdible(Edible edible);", "public void agregaAntNoPato(String id_antNP, String religion_antNP, String lugarNaci_antNP, String estaCivil_antNP, \n String escolaridad_antNP, String higiene_antNP, String actividadFisica_antNP, int frecuencia_antNP, \n String sexualidad_antNP, int numParejas_antNP, String sangre_antNP, String alimentacion_antNP, String id_paciente,\n boolean escoCompInco_antNP, String frecVeces_antNP, Connection conex){\n String sqlst = \"INSERT INTO antnopato\\n \"+\n \"(`id_antNP`,\\n\" +\n \"`religion_antNP`,\\n\" +\n \"`lugarNaci_antNP`,\\n\" +\n \"`estaCivil_antNP`,\\n\" +\n \"`escolaridad_antNP`,\\n\" +\n \"`higiene_antNP`,\\n\" +\n \"`actividadFisica_antNP`,\\n\" +\n \"`frecuencia_antNP`,\\n\" +\n \"`sexualidad_antNP`,\\n\" +\n \"`numParejas_antNP`,\\n\" +\n \"`sangre_antNP`,\\n\" +\n \"`alimentacion_antNP`,\\n\" +\n \"`id_paciente`,\\n\"+\n \"`escoCompInco_antNP`,\\n\"+\n \"`frecVeces_antNP`)\\n\"+\n \"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n try(PreparedStatement sttm = conex.prepareStatement(sqlst)) {\n conex.setAutoCommit(false);\n sttm.setString (1, id_antNP);\n sttm.setString (2, religion_antNP);\n sttm.setString (3, lugarNaci_antNP);\n sttm.setString (4, estaCivil_antNP);\n sttm.setString (5, escolaridad_antNP);\n sttm.setString (6, higiene_antNP);\n sttm.setString (7, actividadFisica_antNP);\n sttm.setInt (8, frecuencia_antNP);\n sttm.setString (9, sexualidad_antNP);\n sttm.setInt (10, numParejas_antNP);\n sttm.setString (11, sangre_antNP);\n sttm.setString (12, alimentacion_antNP);\n sttm.setString (13, id_paciente);\n sttm.setBoolean (14, escoCompInco_antNP);\n sttm.setString (15, frecVeces_antNP);\n sttm.addBatch();\n sttm.executeBatch();\n conex.commit();\n aux.informacionUs(\"Antecedentes personales no patológicos guardados\", \n \"Antecedentes personales no patológicos guardados\", \n \"Antecedentes personales no patológicos han sido guardados exitosamente en la base de datos\");\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public int getId_anneeScolaire() {return id_anneeScolaire;}", "public void salvarDadosUsuario(String idUsuario){\n editor.putString(CHAVE_ID, idUsuario);\n editor.commit();\n }", "public void salvaCliente() {\n \n \n \n \n String nome = view.getjTextNome().getText(); //Tive que criar getter e setter pra poder acessar os campos da view\n String telefone = view.getjTextTelefone().getText();\n String cpf = view.getjTextCpf().getText();\n String endereco = view.getjTextEndereco().getText();\n\n \n Cliente client = new Cliente( nome, telefone, cpf, endereco);\n \n \n \n try {\n Connection conexao = new Conexao().getConnection();\n ClienteDAO clientedao = new ClienteDAO(conexao);\n clientedao.insert(client);\n \n JOptionPane.showMessageDialog(null, \"Cliente Cadastrado!\");\n \n } catch (SQLException ex) {\n //Logger.getLogger(CadCliente.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Erro ao cadastrar!\"+ex);\n }\n }", "private void saveReceNave(Integer idVehi, Long idRecoNave, Double lat, Double lont, Long epoch) {\n\t\tclient.saveReceNave(idVehi, idRecoNave, lat, lont, epoch);\n\t}", "public int save() {\n\t\tint result = 0;\n\n\t\ttry {\n\t\t\tmanager = Connection.connectToMysql();\n\n\t\t\tif (this.id > 0) {\n\t\t\t\t// UPDATE\n\t\t\t\tmanager.getTransaction().begin();\n\t\t\t\tresult=manager.createNativeQuery(\"UPDATE Cancion SET nombre = ?, duracion = ?, id_disco = ? WHERE id = ?\")\n\t\t\t\t\t\t.setParameter(1, this.nombre)\n\t\t\t\t\t\t.setParameter(2, this.duracion)\n\t\t\t\t\t\t.setParameter(3, this.disco_contenedor.id)\n\t\t\t\t\t\t.setParameter(4, this.id)\n\t\t\t\t\t\t.executeUpdate();\n\t\t\t\tmanager.getTransaction().commit();\n\t\t\t} else {\n\t\t\t\t// INSERT\n\t\t\t\tmanager.getTransaction().begin();\n\t\t\t\tresult=manager.createNativeQuery(\"INSERT INTO Cancion (nombre,duracion,id_disco) VALUES (?,?,?)\")\n\t\t\t\t\t\t.setParameter(1, this.nombre)\n\t\t\t\t\t\t.setParameter(2, this.duracion)\n\t\t\t\t\t\t.setParameter(3, this.disco_contenedor.id)\n\t\t\t\t\t\t.executeUpdate();\n\t\t\t\tmanager.getTransaction().commit();\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\n\t\treturn result;\n\t}", "public void save(AcarsMessage message) throws SQLException {\n final String insertSQL = \"INSERT INTO ACARS(date, time, frequency, registration, \"\n + \"flight, mode, label, blockId, msgId, text) VALUES (\"\n + \"?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\n final PreparedStatement stmt = connection.prepareStatement(insertSQL);\n stmt.setDate(1, new Date(message.getDateTime().getTime()));\n stmt.setTime(2, new Time(message.getDateTime().getTime()));\n stmt.setString(3, message.getFrequency());\n stmt.setString(4, message.getRegistration());\n stmt.setString(5, message.getFlightId());\n stmt.setString(6, String.valueOf(message.getMode()));\n stmt.setString(7, message.getLabel());\n stmt.setString(8, String.valueOf(message.getBlockId()));\n stmt.setString(9, message.getMsgId());\n stmt.setString(10, message.getText());\n stmt.executeUpdate();\n }", "public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }", "public void asetaTeksti(){\n }", "public void save(View view)\n {\n TextView tv_name = (TextView) findViewById(R.id.etInfopointName);\n TextView tv_file = (TextView) findViewById(R.id.etInfopointFile);\n TextView tv_qr = (TextView) findViewById(R.id.etInfopointQR);\n //Llamamos a la función de insercción en base de datos\n if(dataSource.InsertInfopoint(tv_name.getText().toString(), tv_file.getText().toString(), tv_qr.getText().toString()))\n {\n Intent resultado = new Intent();\n setResult(RESULT_OK, resultado);\n finish();\n }\n else\n {\n Intent resultado = new Intent();\n setResult(RESULT_CANCELED, resultado);\n finish();\n }\n\n }", "@Override\r\n\tpublic int save() throws NotesApiException {\n\t\treturn 0;\r\n\t}", "private void saveAT() \n {\n // get DatabaseConnector to interact with the SQLite database\n\t AnimalDatabase db = new AnimalDatabase(this);\n\t AnimalList al = new AnimalList (db);\n\t \n // insert the contact information into the database\n al.Update(id, amount, comments);\n\n }", "public int MasalarmasaEkle(String masa_adi) {\n baglanti vb = new baglanti();\r\n vb.baglan();\r\n try {\r\n int masa_no = 0;\r\n // masalar tablosundaki en son id ye gore masa_no yu getirir\r\n String sorgu = \"select masa_no from masalar where idmasalar= (select idmasalar from masalar order by idmasalar desc limit 0, 1)\";\r\n ps = vb.con.prepareStatement(sorgu);\r\n rs = ps.executeQuery(sorgu);\r\n while (rs.next()) {\r\n masa_no = rs.getInt(1);\r\n }\r\n masa_no = masa_no + 1;\r\n String sorgu2 = \"insert into masalar (masa_no, masa_adi) values (\" + masa_no + \", '\" + masa_adi + \"')\";\r\n ps = vb.con.prepareStatement(sorgu2);\r\n ps.executeUpdate();\r\n String sorgu3 = \"insert into masa_durum (masa_no, durum) values (\" + masa_no + \", 0)\";\r\n ps = vb.con.prepareStatement(sorgu3);\r\n ps.executeUpdate();\r\n return masa_no;\r\n } catch (Exception e) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, e);\r\n return 0;\r\n }\r\n finally{\r\n try {\r\n vb.con.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to edit data\";\n if (flag){\n message = \"Success to edit data\";\n }\n JOptionPane.showMessageDialog(this, message, \"Notification\", JOptionPane.INFORMATION_MESSAGE);\n bindingTable();\n reset();\n }", "public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }", "public abstract void commitMiembrosDeEquipo();", "private long enregistrerSport(String libelle, boolean duree, boolean distance) {\n long res;\n try {\n Sport s = new Sport();\n s.libelle = libelle;\n s.duree = duree;\n s.distance = distance;\n res = appDb().sportDao().insert(s);\n } catch (Exception e) {\n res = 0;\n }\n return res;\n }" ]
[ "0.62533903", "0.61326265", "0.58489436", "0.58014435", "0.5791349", "0.57506406", "0.57365876", "0.57346576", "0.5682598", "0.56441593", "0.5614985", "0.5614985", "0.5614985", "0.5614985", "0.56020325", "0.56010216", "0.55980295", "0.558691", "0.55826986", "0.5575029", "0.5568726", "0.5563744", "0.55409163", "0.55147153", "0.55123633", "0.54956913", "0.5480763", "0.5467405", "0.5458991", "0.5458991", "0.5458991", "0.5452218", "0.5431811", "0.54298556", "0.5424203", "0.54230326", "0.5418567", "0.5403477", "0.53982794", "0.53937435", "0.53743863", "0.53722584", "0.5371319", "0.5367609", "0.5355664", "0.535437", "0.5349123", "0.5343695", "0.5331949", "0.5318883", "0.5313904", "0.5307465", "0.5302616", "0.529649", "0.52929497", "0.52922004", "0.5289708", "0.5289398", "0.5289162", "0.52833104", "0.5277549", "0.52694213", "0.5260272", "0.5256852", "0.52529985", "0.52520555", "0.5251175", "0.5249318", "0.5248532", "0.5244035", "0.5236104", "0.52287716", "0.52282727", "0.5219538", "0.5216196", "0.5213819", "0.5213671", "0.5212161", "0.52073765", "0.5204565", "0.5202765", "0.52027524", "0.52027494", "0.51991314", "0.51970565", "0.51858634", "0.51836556", "0.5182721", "0.51806873", "0.5168026", "0.51597476", "0.5150836", "0.5136502", "0.51313543", "0.5131051", "0.51304454", "0.5128042", "0.5117871", "0.51145875", "0.51085186", "0.51067626" ]
0.0
-1
public int saveAuktion_texte(int templateId, int offerId);
public List<Map<String,Object>> getOffersData(int objectid,Integer templateid);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveOneWord(Pojo.OneWord e){ \n template.save(e); \n}", "public void save(Activity e){ \n\t template.save(e); \n\t}", "public void saveTemplate(String toastText) {\n SimpleDateFormat simpleDateFormatY = new SimpleDateFormat(\"yyyy\");\n SimpleDateFormat simpleDateFormatM = new SimpleDateFormat(\"MM\");\n SimpleDateFormat simpleDateFormatD = new SimpleDateFormat(\"dd\");\n SimpleDateFormat simpleDateFormatH = new SimpleDateFormat(\"HH\");\n SimpleDateFormat simpleDateFormatMin = new SimpleDateFormat(\"mm\");\n SimpleDateFormat simpleDateFormatS = new SimpleDateFormat(\"ss\");\n String year = simpleDateFormatY.format(System.currentTimeMillis());\n String month = simpleDateFormatM.format(System.currentTimeMillis());\n String day = simpleDateFormatD.format(System.currentTimeMillis());\n String hour = simpleDateFormatH.format(System.currentTimeMillis());\n String minute = simpleDateFormatMin.format(System.currentTimeMillis());\n String second = simpleDateFormatS.format(System.currentTimeMillis());\n mDatabaseManager.addDataInTemplateTable(\n new TemplateEntity(mTemplateId, mOrganizationId, mCurrencyShortForm,\n mStartValue, mDirection, mAction, year + \"-\" + month + \"-\" + day + \" \" + hour + \":\" + minute + \";\" + second)\n );\n mBaseActivity.showToast(toastText);\n isSaved = true;\n switch (mRootParameter) {\n case ConstantsManager.CONVERTER_OPEN_FROM_TEMPLATES:\n case ConstantsManager.CONVERTER_OPEN_FROM_CURRENCY:\n case ConstantsManager.CONVERTER_OPEN_FROM_ORGANIZATION:\n getActivity().setResult(ConstantsManager.CONVERTER_ACTIVITY_RESULT_CODE_CHANGED);\n if (isFinish) {\n getActivity().finish();\n }\n break;\n }\n }", "public void saveSupplier(Supplier e){ \n\t template.save(e); \n\t}", "public PSTemplate save(PSTemplate template, String siteId) throws PSDataServiceException;", "public PSTemplate save(PSTemplate template, String siteId, String pageId) throws PSDataServiceException;", "int insert(CmsVoteTitle record);", "public void onSave(View view){\n saveTemplate(filename);\n Toast.makeText(this, \"Saved\", Toast.LENGTH_LONG).show();\n }", "public Long saveTemplate(Template template)\n\t{\n\t\tTemplateDAO dao = new TemplateDAO();\n\t\tdao.saveNew(template);\t\t\n\t\treturn template.getId();\n\t}", "public static int save(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database\n PreparedStatement ps=con.prepareStatement( \n \"insert into periode(tahun, awal, akhir) values(?,?,?)\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n status=ps.executeUpdate(); \n }catch(Exception e){\n System.out.println(e);\n } \n return status; \n }", "public void crear(Tarea t) {\n t.saveIt();\n }", "public interface ViewTambahTeman {\n void saveData(Teman teman);\n}", "public boolean save(ApplyInvite model);", "int insert(SmsSendAndCheckPo record);", "public boolean Create(OfferModel offer)\n\t{\n\t\toffer.setId(850);\n\t\t\n\t\ttry {\t\n\t\t\t\n\t\t\tClassLoader classLoader = getClass().getClassLoader();\n\t\t\tFile file = new File(classLoader.getResource(\"offer.txt\").getFile());\n\t\t\tFileOutputStream f = new FileOutputStream(file);\n\t\t\tObjectOutputStream o = new ObjectOutputStream(f);\n\t\t\t\n\t\t\to.writeObject(offer);\t\n\n\t\t\to.close();\n\t\t\tf.close();\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\t\t\t\n\t\t\treturn false;\n\t\t}\n\t}", "int insert(PrefecturesMt record);", "void save(Exam exam);", "public void save();", "public void save();", "public void save();", "public void save();", "int insert(TempletLink record);", "private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to save data...\";\n if (flag){\n message = \"Success to save data...\";\n }\n JOptionPane.showMessageDialog(this, message, \"Allert / Notification\", \n JOptionPane.INFORMATION_MESSAGE);\n \n bindingTable();\n reset();\n }", "public void saveTemplate(ArticleTemplate article, ArticleListTemplate article_list, String website_url) throws StorageException, WebsiteNotFoundException, MalformedURLException, ContextAlreadyExistsException, DataOmittedException {\n\t\t\n\t\t// Validazione url\n\t\tURL.validate(website_url); // throws MalformedURLException\n\t\t\n\t\t\n\t\tWebsite website = this.getWebsite(website_url); // throws StorageException, WebsiteNotFoundException\n\t\t\n\t\t// Controlla se il contesto è già stato inserito\n\t\tSet<ArticleListTemplate> list_templates = website.getArticleListTemplates();\n\t\tfor(ArticleListTemplate list_template: list_templates){\n\t\t\tif(list_template.getContext().equals(article_list.getContext())) throw new ContextAlreadyExistsException();\n\t\t\t\n\t\t}\n\t\t\n\t\t// Se non vengono inseriti il selettore dell'heading o del testo\n\t\tif(article.getHeadingSelector().equals(\"\") || article.getTextSelector().equals(\"\") || article.getHeadingSelector() == null || article.getTextSelector() == null) \n\t\t\t// Solleva eccezione\n\t\t\tthrow new DataOmittedException();\n\t\t\n\t\t// Se non viene inserito il selettore per i link degli articoli\n\t\tif(article_list.getLinkSelector().equals(\"\") || article_list.getLinkSelector() == null)\n\t\t\t// Solleva eccezione\n\t\t\tthrow new DataOmittedException();\n\t\t\t\n\t\t// Inserimento del template list\n\t\tMap<String, Object> data_list = article_list.toMap();\n\t\tdata_list.put(\"fk_website\", website.getId());\n\t\tstorage.save(\"list_templates\", data_list); // throws StorageException\n\t\t\n\t\t// Inserimento del template dell'articolo\n\t\tMap<String, Object> data_article = article.toMap();\n\t\tdata_article.put(\"fk_website\", website.getId());\n\t\tstorage.save(\"article_templates\", data_article); // throws StorageException\n\t\t\n\t\twebsite.addTemplate(article);\n\t\twebsite.addTemplate(article_list);\n\t}", "@Action(value=\"save\",results={@Result(name=\"save\",location=\"/zjwqueryMange.jsp\")})\n\tpublic String save()\n\t{\n\t\tkehuDAO.save(kehu);\n\t\t//保存 kehu\n\t\tkehuList = (ArrayList) kehuDAO.findAll();\n\t\treturn \"save\";\n\t}", "public void save(PtJJdwcy entity);", "public void ajouterChambreDeCommerce(){\n }", "public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }", "int insert(TbFreightTemplate record);", "void save();", "void save();", "void save();", "int insert(TbComEqpModel record);", "int insert(GoodsPo record);", "public int inserir(OfertaDisciplina offer){\n\t\tint id = 0;\n\t\tString sql = \"INSERT INTO deinfo.oferta_disciplina(ano, semetrstre, disciplina_oferta, localizalicao, ID_CURSO_DISPONIVEL) \"\n\t\t\t\t+ \"values(?,?,?,?)\";\n\t\ttry{\n\n\t\t\tPreparedStatement smt = (PreparedStatement) bancoConnect.retornoStatement(sql);\n\t\t\tsmt.setInt(1, offer.getAno());\n\t\t\tsmt.setInt(2, offer.getSemestre());\n\t\t\tsmt.setString(3, offer.getDisciplina().getCodigo());\n\t\t\tsmt.setInt(4, offer.getLocal().getCodigo());\n\t\t\tsmt.setInt(5, offer.getCurso().getCodigo());\n\t\t\tsmt.execute();\n\n\t\t\tResultSet st = smt.getGeneratedKeys();\n\t\t\tst.next();\n\n\t\t\tid = st.getInt(1);\n\t\t}catch(Exception e){\n\t\t\tJOptionPane.showConfirmDialog(null, e.getMessage(), \"Erro\", -1);\n\t\t}\n\t\treturn id;\n\t}", "public int saveHeadControl(int idTramite, int empresa_id, int almacen_id, String serie, int folio, String serieBoleto, int folioBoleto, \r\n\t\t\t int cliente_id, String identificacion,String cveIdentificacion,int numitems, String fecha, String hora, int usuario_id, String timecreate ,double tiempoMinimo ,String obs ) {\r\n\t\tString sql = \"UPDATE `cabcontrol` SET `EMPRESA_ID`='\"+empresa_id+\"',`ALMACEN_ID`='\"+almacen_id+\"',`SERIE`='\"+serie+\"',`FOLIO`='\"+folio+\"',\"\r\n\t\t\t\t+ \"`SERIEBOLETO`='\"+serieBoleto+\"',`FOLIOBOLETO`='\"+folioBoleto+\"',`CLIENTE_ID`='\"+cliente_id+\"',`CLIENTECOD`='\"+identificacion+\"', `IDENTIFICACION`='\"+cveIdentificacion+\"',`NUMITEMS`='\"+numitems+\"',\"\r\n\t\t\t + \"`FECHAIN`='\"+fecha+\"',`HORAIN`='\"+hora+\"',`USUARIO_IDIN`='\"+usuario_id+\"',`TIMECREATE`='\"+timecreate+\"', TIEMPOTOTALOUT='\"+tiempoMinimo+\"' ,`OBSERVACION`='\"+obs+\"' WHERE `IDTRAMITE` ='\"+idTramite+\"' \";\r\n\t\treturn template.update(sql);\r\n\t}", "int insert(ArticleDo record);", "public boolean addNewsletter(String newsletterSubject,\n String sendersName,\n String emailAddress,\n String template,\n String textContent) {\n sleep(Integer.parseInt(testData.sleep));\n boolean testResult = false;\n WebElement newsletterbutton = wait(driver.findElement(By.xpath(\"//a[contains(text(),'Newsletters')]\")));\n newsletterbutton.click();\n sleep(5);\n WebElement createNewsletterButton = wait(driver.findElement(By.xpath(\"/html[1]/body[1]/div[2]/div[3]/div[1]/div[2]\")));\n // xpath = //a[contains(text(),'Create Newsletter')]\n // css = div:nth-child(2) div:nth-child(3) div:nth-child(1) div.tab:nth-child(2) > a:nth-child(1)\n // linkText = Create Newsletter\n // PlinkText = Create Newslett\n createNewsletterButton.click();\n WebElement newslettersubject = wait(driver.findElement(By.id(\"email_subject\")));\n newslettersubject.sendKeys(newsletterSubject);\n WebElement senderName = wait(driver.findElement(By.id(\"sender_name\")));\n senderName.sendKeys(sendersName);\n WebElement senderemail = wait(driver.findElement(By.id(\"sender_email\")));\n senderemail.sendKeys(emailAddress);\n WebElement sedToDouble = wait(driver.findElement(By.xpath(\"//img[@class='checkbox']\")));\n sedToDouble.click();\n WebElement templatedrplst = wait(driver.findElement(By.id(\"template_id\")));\n Select conditionSelect= new Select(templatedrplst);\n conditionSelect.selectByVisibleText(template);\n// WebElement templatedropdown = wait(driver.findElement(By.xpath(\"//select[@id='template_id']\")));\n// templatedropdown.getAttribute(template);\n WebElement plainText = wait(driver.findElement(By.xpath(\"/html[1]/body[1]/div[2]/div[3]/div[1]/div[3]/a[1]\")));\n plainText.click();\n WebElement textArea = wait(driver.findElement(By.id(\"content_text\")));\n textArea.sendKeys(textContent);\n WebElement saveButton = wait(driver.findElement(By.xpath(\"//div[@id='content']//input[3]\")));\n saveButton.click();\n WebElement saved = wait(driver.findElement(By.xpath(\"//div[@class='success']\")));\n if (saved.isDisplayed()) {\n testResult=true;\n }\n if (testResult)\n {\n System.out.println(\"\\u001B[34m==================\\nTest passed.\\t✓\\n==================\");\n } else\n {\n System.out.println(\"\\u001B[31m==================\\nTest failed.\\t✖\\n==================\");\n }\n return testResult;\n }", "int insert(CmsRoomBook record);", "int insert(WxNews record);", "int insert(AbiFormsForm record);", "public void insertOffer(Offer o);", "public long createOffer (OfferModel offerModel) {\n SQLiteDatabase db = getWritableDatabase() ;\n\n ContentValues values = new ContentValues() ;\n values.put(KEY_OFFERS_PRODUCT_ID, offerModel.getProductId());\n values.put(KEY_OFFERS_NAME, offerModel.getName());\n values.put(KEY_OFFERS_PRICE, offerModel.getPrice());\n values.put(KEY_OFFERS_IMAGE_URL, offerModel.getImageUrl()) ;\n values.put(KEY_OFFERS_IN_STOCK_STATUS, offerModel.getImageUrl());\n values.put(KEY_OFFERS_DISCOUNT, offerModel.getDiscount());\n values.put(KEY_OFFERS_BEACON_ID, offerModel.getBeaconId());\n\n long offer_id = db.insert(TABLE_OFFERS, null, values) ;\n return offer_id ;\n }", "public static void inserttea() {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"insert into teacher values ('\"+teaid+\"','\"+teaname+\"','\"+teabirth+\"','\"+protitle+\"','\"+cno+\"')\");\n\t\t\tSystem.out.println(\"cno:\"+cno);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch (Exception e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据添加异常!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "int insert(WechatDemo record);", "@Override\r\n public void save(BuyTicketModel value) {\n String sql = \"insert into buyticket values(?,?,?,?,?,?,?,?,?,?,?,?) \";\r\n \r\n try {\r\n PreparedStatement pstm = database.getCon().prepareStatement(sql);\r\n pstm.setString(1, value.getSlno());\r\n pstm.setString(2, value.getCustomername());\r\n pstm.setString(10,value.getContact());\r\n pstm.setString(3, value.getDestination());\r\n pstm.setString(4, value.getTime());\r\n pstm.setString(5, value.getFare());\r\n pstm.setString(6, value.getComment());\r\n pstm.setString(7, value.getDate());\r\n pstm.setString(8, value.getPayment());\r\n pstm.setString(9, value.getSeat());\r\n pstm.setString(11, value.getType());\r\n pstm.setString(12, value.getBusname());\r\n \r\n \r\n pstm.executeUpdate();\r\n pstm.close();\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(BuyTicketImpl.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n }", "int insert( FormSubmit formResponse, Plugin plugin );", "int insert(FeiWenComment record);", "int insert(Question14 record);", "int insert(ExamineApproveResult record);", "int insert(FctWorkguide record);", "int insert(Kaiwa record);", "private void saveTemplate()\r\n {\r\n\t String template = keyField.getText();\r\n\r\n\t int lenI = values.length, lenJ, lenK;\r\n\t String[][][] newValues = new String[lenI][][];\r\n\t for (int i=0; i<lenI; i++)\r\n\t {\r\n\t\t lenJ = values[i].length;\r\n\t\t newValues[i] = new String[lenJ][];\r\n\t\t for (int j=0; j<lenJ; j++)\r\n\t\t {\r\n\t\t\t lenK = values[i][j].length;\r\n\t\t\t newValues[i][j] = new String[lenK];\r\n\t\t\t for (int k=0; k<lenK; k++)\r\n\t\t\t\t values[i][j][k] = values[i][j][k];\r\n\t\t }\r\n\t }\r\n\t \r\n\t if (template.length()==0)\r\n\t {\r\n\t\t label.setText(\"Please enter a valid template name\");\r\n\t\t return;\r\n\t }\r\n\t \r\n\t // Update or store to the list of templates.\r\n for (int i=0; i<newValues.length; i++)\r\n \t for (int j=0; j<newValues[i].length; j++)\r\n\t\t\t newValues[i][j] = getComponentArray(components[i][j]);\r\n \r\n \t if (!definitionBox.isSelected())\r\n \t {\r\n \t\t newValues[FormatData.t.D_HDR.ordinal()] \r\n \t\t\t\t = newValues[FormatData.t.D_FLD.ordinal()] \r\n \t\t\t\t\t\t = new String[0][0];\r\n \t }\r\n \t if (!categoryBox.isSelected())\r\n \t {\r\n \t\t newValues[FormatData.t.C_HDR.ordinal()] \r\n \t\t\t\t = newValues[FormatData.t.C_FLD.ordinal()] \r\n \t\t\t\t\t\t = new String[0][0];\r\n \t }\r\n \t if (!exampleBox.isSelected())\r\n \t {\r\n \t\t newValues[FormatData.t.E_HDR.ordinal()] \r\n \t\t\t\t = newValues[FormatData.t.E_FLD.ordinal()] \r\n \t\t\t\t\t\t = new String[0][0];\r\n \t }\r\n\r\n templates.setTemplate(template, newValues);\r\n\r\n if (!model.contains(template))\r\n\t {\r\n\t int size = templateKeys.length;\r\n\t String[] newTemplates = new String[templateKeys.length + 1];\r\n\t if (templateKeys.length != 0)\r\n\t \t System.arraycopy(templateKeys, 0, newTemplates, 0, size);\r\n\t \r\n\t newTemplates[size] = template;\r\n\t templateKeys = newTemplates;\r\n\t model.add(size, templateKeys[size]);\r\n\t list.setSelectedIndex(size);\r\n\t }\r\n label.setText(\"Display format \" + template + \" saved\");\r\n }", "int insert(NewsInfo record);", "public void save(View view)\n {\n TextView tv_name = (TextView) findViewById(R.id.etInfopointName);\n TextView tv_file = (TextView) findViewById(R.id.etInfopointFile);\n TextView tv_qr = (TextView) findViewById(R.id.etInfopointQR);\n //Llamamos a la función de insercción en base de datos\n if(dataSource.InsertInfopoint(tv_name.getText().toString(), tv_file.getText().toString(), tv_qr.getText().toString()))\n {\n Intent resultado = new Intent();\n setResult(RESULT_OK, resultado);\n finish();\n }\n else\n {\n Intent resultado = new Intent();\n setResult(RESULT_CANCELED, resultado);\n finish();\n }\n\n }", "void save(T entity, boolean editMode) throws PersistenceException;", "public void saveData(){\n\n if(addFieldstoLift()) {\n Intent intent = new Intent(SetsPage.this, LiftsPage.class);\n intent.putExtra(\"lift\", lift);\n setResult(Activity.RESULT_OK, intent);\n finish();\n }else{\n AlertDialog.Builder builder = new AlertDialog.Builder(SetsPage.this);\n builder.setCancelable(true);\n builder.setTitle(\"Invalid Entry\");\n builder.setMessage(\"Entry is invalid. If you continue your changes will not be saved\");\n builder.setPositiveButton(\"Continue\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n }", "public int save(SaveQuery saveQuery, EntityDetails entityDetails, ObjectWrapper<Object> idGenerated);", "int insertSelective(CmsVoteTitle record);", "public void save() {\n }", "int insert(News record);", "int insert(Question11 record);", "int insert(PmPost record);", "public interface DeskBackMessService {\n\n public int save(DeskBackMess deskBackMess);\n}", "protected void saveEmailInfo(Map pPreparedParams, String pTemplateUrl) {\n \n // Get the current system time.\n CurrentDate cd = getCurrentDate();\n Date currentDate = cd.getTimeAsDate();\n \n // get current timestamp\n SimpleDateFormat sdf = new SimpleDateFormat(RecentlySentList.SENT_DATE_FORMAT);\n String timestamp = sdf.format(currentDate.getTime());\n \n getSentList().addItem(getSentList().getTemplateName(pTemplateUrl),\n pPreparedParams, timestamp);\n }", "int insert(countrylanguage record);", "int insert(QuestionOne record);", "public String saveText() {\n\n return \"!Základ!\\n\\n\" + \"Hrubá mzda : \" + wage + \"Kč\\n\" + \"Sleva poplatníka : \" + saveTextChoose + \"\\nSuperhrubá mzda : \" + calc.superGrossWage(wage) + \" Kč\\n\" + \"\\n!Zaměstnavatel odvody z mzdy!\\n\\n\" + \"Socialní pojištění : \" + calc.socialInsuranceEmployer(wage) + \" Kč\\n\" + \"Zdravotní pojištění: \" + calc.healthInsuranceEmployer(wage) + \" Kč\\n\" +\n \"\\n!Zaměstnanec odvody z mzdy!\\n\" + \"\\nSocialní pojištění : \" + calc.socialInsuranceEmployee(wage) + \" Kč\\n\" + \"Zdravotní pojištění : \" + calc.healthInsuranceEmployee(wage) + \" Kč\\n\" +\n \"\\n!Daň ze závislé činnosti!\\n\" + \"\\nZáklad daní :\" + calc.round(wage) + \" Kč\\n\" + \"Daň : \" + calc.tax(wage) + \" Kč \\n\" + \"Daň po odpoču slevy : \" + calc.afterDeductionOfDiscounts(wage, choose) + \" Kč\\n\" +\n \"\\nČistá mzda : \" + calc.netWage(wage, choose) + \" Kč\";\n }", "int insert(Prueba record);", "public int Create(Objet obj) {\n\t\tPreparedStatement smt=null; \n\t\t\n\t\tString chaineSQL=\"\";\n int rep=0;\n \t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tchaineSQL=\"insert into objet_vente (Designation,Prix,Categories,Lieu,Date,Email) values(?,?,?,?,?,?)\";\t\t\t\n\t\t\tsmt=this.getCnn().prepareStatement(chaineSQL, Statement.RETURN_GENERATED_KEYS); //retourne le Id auto incrementé lors de l'envoie de la chaine sql\n\t\t\t\n\t\t\tsmt.setString(1, obj.getDesignation());\n\t\t\tsmt.setInt(2, Integer.parseInt(obj.getPrix()));\n\t\t\tsmt.setString(3, obj.getCategorie());\n\t\t\tsmt.setString(4, obj.getLieu());\n\t\t\tsmt.setDate(5, obj.getDate());\n\t\t\tsmt.setString(6, obj.getEmail());\n\t\t\t\n\t\t\t\t\t\n\t\t\trep=smt.executeUpdate();\n\t\t\t// rep contient le nbre d'enreigistrement effectué/ligne\n\t\t\tResultSet generatedKey = smt.getGeneratedKeys(); //getGeneratedKeys retourne le *id auto incrementé\n\t\t\tgeneratedKey.next();\n\t\t\t//on sait que y a q'une ligne ou on insere donc 1 seule .next()\n\t\t\tobj.setId(generatedKey.getInt(1));\n\t\t\t// lit dans la 1ere colonne avec la ligne correspondante a celle crée et retourne ici l'ID objet\n\t\t\t\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\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 rep;\n\t}", "int insert(MsgContent record);", "int insert(DashboardGoods record);", "int insert(ActivityHongbaoPrize record);", "int insert(NewsFile record);", "public void saveProduit(Produit theProduit);", "private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to edit data\";\n if (flag){\n message = \"Success to edit data\";\n }\n JOptionPane.showMessageDialog(this, message, \"Notification\", JOptionPane.INFORMATION_MESSAGE);\n bindingTable();\n reset();\n }", "int insert(UserTips record);", "int insert(ExamRoom record);", "void save(JournalPage page);", "public boolean save(Clientes clientes){\n \n String sql = \"INSERT INTO clientes (fantasia, cep, uf, logradouro, nr, cidade, bairro, contato, email, fixo, celular, obs) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)\";\n PreparedStatement pst = null;\n \n try {\n pst = con.prepareStatement(sql);\n pst.setString(1, clientes.getFantasia());\n pst.setString(2, clientes.getCep());\n pst.setString(3, clientes.getUf());\n pst.setString(4, clientes.getLogradouro());\n pst.setString(5, clientes.getNr());\n pst.setString(6, clientes.getCidade());\n pst.setString(7, clientes.getBairro());\n pst.setString(8, clientes.getContato());\n pst.setString(9, clientes.getEmail());\n pst.setString(10, clientes.getFixo());\n pst.setString(11, clientes.getCelular());\n pst.setString(12, clientes.getObs());\n pst.executeUpdate();\n return true;\n\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Erro ao Salvar!\"+ex);\n return false;\n }finally{\n ConectionFactory.closeConnection(con, pst);\n }\n }", "public String insertOrUpdateImportantNews() {\n try {\n if (important.getImportantNewsId() == null) {\n Map session = ActionContext.getContext().getSession();\n EmployeesVO oEmp = (EmployeesVO) session.get(\"EMPLOYEE_OBJECT\");\n important.setCreated(DateUtils.getCurrentDateTime());\n important.setEmpIdObj(oEmp);\n important.setCreatedBy(oEmp);\n important.setUpdatedBy(oEmp);\n important.setIsActive(1);\n impService.insertImportantNews(important);\n addActionMessage(getText(\"Added Successfully\"));\n } else {\n Map session = ActionContext.getContext().getSession();\n EmployeesVO oEmp = (EmployeesVO) session.get(\"EMPLOYEE_OBJECT\");\n important.setUpdatedBy(oEmp);\n important.setEmpIdObj(oEmp);\n impService.updateImportantNews(important);\n addActionMessage(getText(\"Updated Successfully\"));\n }\n } catch (RuntimeException e) {\n ErrorsAction errAction = new ErrorsAction();\n String sError = errAction.getError(e);\n addActionError(sError);\n throw e;\n }\n return SUCCESS;\n }", "private void save() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null) ) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.insert(nama_pasien2,\n nama_dokter2,\n tgl_pengobatanField.getText().toString().trim(),\n waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),\n hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "int insertSelective(PrefecturesMt record);", "@Override\n\tpublic int storeRow(java.sql.Connection conn, com.vaadin.data.Item row) throws UnsupportedOperationException, java.sql.SQLException { \n\t String newid = null;\n\t int retval = 0;\n\t try ( java.sql.CallableStatement call = conn.prepareCall(\"{ ? = call EMAIL.EMAILTEMPLATE (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }\")) {\n\n\t int i = 1;\n\t call.registerOutParameter(i++, java.sql.Types.VARCHAR); \n\t \n\t \t\t\n\t setString(call, i++, getString(row,\"ID\"));\n\t setString(call, i++, getString(row,\"ROWSTAMP\"));\n\n\t setString(call, i++, getString(row, \"EMAILNAME\"));\n\t setString(call, i++, getString(row, \"EMAILSUBJECT\"));\n\t setString(call, i++, getString(row, \"CONTENT\"));\n\t setString(call, i++, getString(row, \"HELPTEXT\"));\n\t setBoolean(call, i++, getOracleBoolean(row, \"ISACTIVE\"));\n\t setString(call, i++, getString(row, \"CREATEDBY\"));\n\t setTimestamp(call, i++, getOracleTimestamp(row, \"CREATED\"));\n\t setString(call, i++, User.getUser().getUserId());\n\t setTimestamp(call, i++, OracleTimestamp.now());\n\t \n\t retval = call.executeUpdate();\n\t newid = call.getString(1);\n\t if(logger.isDebugEnabled()) {\n\t logger.debug(\"newid = {} retval = {}\",newid, retval);\n\t }\n\t }\n\t setLastId(newid);\n\t return retval;\n\t}", "String saveNote(NoteModel noteModel) throws ManagerException ;", "public void updateOneWord(Pojo.OneWord e){ \n template.update(e); \n}", "public void createSurvey(int tid);", "public void addAnzeige(Anzeige anzeigeToAdd) throws StoreException {\n \r\n \t try {\r\n PreparedStatement preparedStatement = connection\r\n .prepareStatement(\"insert into Dbp71.Anzeige (titel, text, preis, ersteller, status) values (?,?,?,?,?)\");\r\n \t\t\r\n //preparedStatement.setInt(1, anzeigeToAdd.getId_Anzeige());\r\n preparedStatement.setString(1, anzeigeToAdd.getTitel());\r\n preparedStatement.setString(2, anzeigeToAdd.getText());\r\n preparedStatement.setBigDecimal(3, BigDecimal.valueOf(anzeigeToAdd.getPreis()));\r\n // preparedStatement.setString(5, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(4, anzeigeToAdd.getErsteller());\r\n preparedStatement.setString(5, anzeigeToAdd.getStatus());\r\n System.out.println(anzeigeToAdd.getTitel()+ anzeigeToAdd.getText()+ BigDecimal.valueOf(anzeigeToAdd.getPreis())\r\n + anzeigeToAdd.getErsteller()+ anzeigeToAdd.getErsteller()+ anzeigeToAdd.getStatus());\r\n preparedStatement.executeUpdate();\r\n \r\n \r\n }\r\n catch (SQLException e) {\r\n throw new StoreException(e);\r\n }\r\n }", "int insert(AccountAccountTemplateEntityWithBLOBs record);", "int insertSelective(WechatDemo record);", "int insert(HotelType record);", "protected void saveWithParameters(JasperTemplate jasperTemplate) {\n jasperTemplateRepository.save(jasperTemplate);\n }", "public String save() throws SQLException {\r\n\t\taktieDao = new AktieDAO();\r\n\t\tAktie aktie = new Aktie();\r\n\t\tMeldungFormBean m = new MeldungFormBean();\r\n\t\taktie.setName(name);\r\n\t\taktie.setKuerzel(kuerzel);\r\n\t\taktie.setNominalwert(nominalpreis);\r\n\t\taktie.setDividende(dividende);\r\n\t\taktie = aktieDao.insertAktie(aktie);\r\n\r\n\t\tVerkaufDAO verkaufDao = new VerkaufDAO();\r\n\t\t// insert in DB\r\n\t\tverkaufDao.insertAuftragAdmin(nominalpreis, aktie.getId());\r\n\t\t// Meldung\r\n\t\tm.setAktuelleMeldung(m.getMeldung1() + name);\r\n\t\tm.putMeldungToSession(m);\r\n\t\treturn \"/private/admin/Admin?faces-redirect=true\";\r\n\r\n\t}", "public void savePrioritaet(String bezeichnung) throws Exception;", "Long save(ArticleForm articleForm) throws ServiceException;", "int insert(CraftAdvReq record);", "public String saveGame(SaveGameRequestParams saveGameRequest){return \"\";}", "public final void saveAction(){\r\n\t\ttestReqmtService.saveAction(uiTestReqEditModel);\r\n\t\tgeteditDetails(uiTestReqEditModel.getObjId());\r\n\t\taddInfoMessage(SAVETR, \"save.TRsuccess\"); \r\n\t\tfor (UITestReqModel reqmnt : uiTestReqModel.getResultList()) {\r\n\t\t\tif(reqmnt.isTrLink()){\r\n\t\t\t\treqmnt.setTrLink(false);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean save(Data model);", "AdPartner insertAdPartner(AdPartner adPartner);", "@Override\n\tpublic int editNotifyTemplate(int notifytemplateid, String name,\n\t\t\tString description,String templateXML, int editBizUnitID, int editSystemID, int editRecepientID, int editChannelID, int editEventID, int editSignatureID,Boolean isdnd,Boolean isdesc,int userID) {\n\t\tint result = 0; \n\t\tresult = jdbcTemplate.queryForObject(FiinfraConstants.SP_EDIT_NOTIFYTEMPLATE, new Object[]{notifytemplateid,name,description,templateXML,editBizUnitID,editSystemID,editRecepientID,editChannelID,editEventID,editSignatureID, isdnd, isdesc, userID},Integer.class);\n\t\treturn result; \n\t}" ]
[ "0.6483644", "0.6241744", "0.61914843", "0.58475494", "0.5656186", "0.56431526", "0.55757785", "0.5555959", "0.5532806", "0.55040956", "0.54536235", "0.54436475", "0.5432536", "0.5427682", "0.54165864", "0.5408154", "0.54074556", "0.5403948", "0.5403948", "0.5403948", "0.5403948", "0.53783804", "0.53767824", "0.537334", "0.5348487", "0.53438586", "0.5341744", "0.5319188", "0.5290932", "0.5288436", "0.5288436", "0.5288436", "0.5269391", "0.5251419", "0.5245566", "0.5237285", "0.52343535", "0.5214897", "0.5207259", "0.51922643", "0.51896304", "0.5186384", "0.5181904", "0.51744145", "0.51732093", "0.5166809", "0.5166066", "0.51658905", "0.5164572", "0.51620275", "0.51590544", "0.5158789", "0.51580304", "0.5155876", "0.5150452", "0.5126515", "0.51189166", "0.5117251", "0.5116175", "0.51157737", "0.5113431", "0.511236", "0.51091045", "0.5107701", "0.51075447", "0.5105558", "0.51051605", "0.5098632", "0.50950664", "0.5094818", "0.50928587", "0.50914145", "0.5081267", "0.50808394", "0.5078586", "0.5076105", "0.5074479", "0.5070574", "0.5068181", "0.50680774", "0.5067114", "0.50638103", "0.5057815", "0.50548387", "0.5046171", "0.5045798", "0.5044613", "0.5041399", "0.50412244", "0.50398916", "0.50306064", "0.5024331", "0.5024098", "0.5011472", "0.50106037", "0.50089556", "0.5007934", "0.50067556", "0.50058615", "0.5002456", "0.49978212" ]
0.0
-1
creation of the whole structure
@SuppressWarnings("deprecation") public static void main(String[] args) throws InterruptedException { Logic logic = new Logic(); Interface interfac = new Interface(logic); Graphic graphic = new Graphic(logic); //start of the graphic graphic.start(); //start of the listener interfac.listen(); //terminate lib graphic.stop(); GLFW.glfwTerminate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Structure createStructure();", "CreationData creationData();", "public void create() {\n\t\t\n\t}", "@Override\n\tpublic void generate() {\n\t\tJavaObject object = new JavaObject(objectType);\n\n\t\t// Fields\n\t\taddFields(object);\n\n\t\t// Empty constructor\n\t\taddEmptyConstructor(object);\n\n\t\t// Types constructor\n\t\taddTypesConstructor(object);\n\n\t\t// Clone constructor\n\t\taddCloneConstructor(object);\n\n\t\t// Setters\n\t\taddSetters(object);\n\n\t\t// Build!\n\t\taddBuild(object);\n\n\t\t// Done!\n\t\twrite(object);\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "public void create(){}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "public Struct(String a, int b){\r\n\tid=a;\r\n\tsize=b;\t\r\n\tform=0;\r\n }", "public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tbaseElementEClass = createEClass(BASE_ELEMENT);\n\t\tcreateEReference(baseElementEClass, BASE_ELEMENT__KEY_VALUE_MAPS);\n\t\tcreateEAttribute(baseElementEClass, BASE_ELEMENT__ID);\n\t\tcreateEAttribute(baseElementEClass, BASE_ELEMENT__NAME);\n\t\tcreateEAttribute(baseElementEClass, BASE_ELEMENT__DESCRIPTION);\n\n\t\tkeyValueMapEClass = createEClass(KEY_VALUE_MAP);\n\t\tcreateEAttribute(keyValueMapEClass, KEY_VALUE_MAP__KEY);\n\t\tcreateEReference(keyValueMapEClass, KEY_VALUE_MAP__VALUES);\n\n\t\tvalueEClass = createEClass(VALUE);\n\t\tcreateEAttribute(valueEClass, VALUE__TAG);\n\t\tcreateEAttribute(valueEClass, VALUE__VALUE);\n\n\t\t// Create enums\n\t\ttimeUnitEEnum = createEEnum(TIME_UNIT);\n\t}", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "public void createPackageContents() {\r\n\t\tif (isCreated) return;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tbankEClass = createEClass(BANK);\r\n\t\tcreateEReference(bankEClass, BANK__MANAGERS);\r\n\t\tcreateEReference(bankEClass, BANK__ACCOUNTS);\r\n\t\tcreateEReference(bankEClass, BANK__CLIENTS);\r\n\r\n\t\tclientEClass = createEClass(CLIENT);\r\n\t\tcreateEReference(clientEClass, CLIENT__MANAGER);\r\n\t\tcreateEReference(clientEClass, CLIENT__ACCOUNTS);\r\n\t\tcreateEAttribute(clientEClass, CLIENT__NAME);\r\n\t\tcreateEReference(clientEClass, CLIENT__SPONSORSHIPS);\r\n\t\tcreateEAttribute(clientEClass, CLIENT__CAPACITY);\r\n\r\n\t\tmanagerEClass = createEClass(MANAGER);\r\n\t\tcreateEReference(managerEClass, MANAGER__CLIENTS);\r\n\t\tcreateEAttribute(managerEClass, MANAGER__NAME);\r\n\r\n\t\taccountEClass = createEClass(ACCOUNT);\r\n\t\tcreateEReference(accountEClass, ACCOUNT__OWNERS);\r\n\t\tcreateEAttribute(accountEClass, ACCOUNT__CREDIT);\r\n\t\tcreateEAttribute(accountEClass, ACCOUNT__OVERDRAFT);\r\n\t\tcreateEReference(accountEClass, ACCOUNT__CARDS);\r\n\r\n\t\tcardEClass = createEClass(CARD);\r\n\t\tcreateEAttribute(cardEClass, CARD__NUMBER);\r\n\t\tcreateEAttribute(cardEClass, CARD__TYPE);\r\n\r\n\t\t// Create enums\r\n\t\tcardTypeEEnum = createEEnum(CARD_TYPE);\r\n\t}", "public Struct(String b){\r\n\tid=b;\r\n\tsize=0;\r\n\tform=0;\r\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tmealyMachineEClass = createEClass(MEALY_MACHINE);\n\t\tcreateEReference(mealyMachineEClass, MEALY_MACHINE__INITIAL_STATE);\n\t\tcreateEReference(mealyMachineEClass, MEALY_MACHINE__STATES);\n\t\tcreateEReference(mealyMachineEClass, MEALY_MACHINE__INPUT_ALPHABET);\n\t\tcreateEReference(mealyMachineEClass, MEALY_MACHINE__OUTPUT_ALPHABET);\n\t\tcreateEReference(mealyMachineEClass, MEALY_MACHINE__TRANSITIONS);\n\n\t\tstateEClass = createEClass(STATE);\n\t\tcreateEAttribute(stateEClass, STATE__NAME);\n\n\t\talphabetEClass = createEClass(ALPHABET);\n\t\tcreateEAttribute(alphabetEClass, ALPHABET__CHARACTERS);\n\n\t\ttransitionEClass = createEClass(TRANSITION);\n\t\tcreateEReference(transitionEClass, TRANSITION__SOURCE_STATE);\n\t\tcreateEReference(transitionEClass, TRANSITION__TARGET_STATE);\n\t\tcreateEAttribute(transitionEClass, TRANSITION__INPUT);\n\t\tcreateEAttribute(transitionEClass, TRANSITION__OUTPUT);\n\t}", "void create(Node node) {\n if (node.table.negatives() == 0) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n if (node.table.positives() == 0) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n\r\n //If no test split the data, make it a leaf with the majoriti of the target atribute\r\n int atr;\r\n //Choose the best atribute\r\n atr = this.chooseBestAtrib(node);\r\n node.atribute = atr;\r\n\r\n //No atribute split the data, so make the node a leaf with the majoriti of the class (either positive or negative)\r\n if (node.atribute == -1) {\r\n //System.out.println(\"Atribute is -1 in TeeBuidler.create\");\r\n if (node.table.negatives() > node.table.positives()) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n if (node.table.positives() >= node.table.negatives()) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n }\r\n\r\n Table table_left = new Table(), table_right = new Table();\r\n node.table.splitByAtrib(node.atribute, table_left, table_right);\r\n\r\n //Create two children for the current node //parameters: identifier,parent_result,atribute of split,id_child1, id_child2, table\r\n node.child_left = new Node(node.id + node.id, \"1\", -1, -1, -1, table_left);\r\n node.child_right = new Node(node.id + node.id+1, \"0\", -1, -1, -1, table_right);\r\n node.id_child_left = node.id + node.id;\r\n node.id_child_right = node.id + node.id+1;\r\n\r\n\r\n TreeBuilder builder = new TreeBuilder();\r\n builder.create(node.child_left);\r\n builder.create(node.child_right);\r\n\r\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttableEClass = createEClass(TABLE);\n\t\tcreateEReference(tableEClass, TABLE__DATABASE);\n\t\tcreateEReference(tableEClass, TABLE__COLUMNS);\n\t\tcreateEReference(tableEClass, TABLE__CONSTRAINTS);\n\n\t\ttableConstraintEClass = createEClass(TABLE_CONSTRAINT);\n\t\tcreateEAttribute(tableConstraintEClass, TABLE_CONSTRAINT__NAME);\n\t\tcreateEReference(tableConstraintEClass, TABLE_CONSTRAINT__TABLE);\n\n\t\tprimaryKeyTableConstraintEClass = createEClass(PRIMARY_KEY_TABLE_CONSTRAINT);\n\t\tcreateEReference(primaryKeyTableConstraintEClass, PRIMARY_KEY_TABLE_CONSTRAINT__COLUMNS);\n\n\t\tuniqueTableConstraintEClass = createEClass(UNIQUE_TABLE_CONSTRAINT);\n\t\tcreateEReference(uniqueTableConstraintEClass, UNIQUE_TABLE_CONSTRAINT__COLUMNS);\n\n\t\tcheckTableConstraintEClass = createEClass(CHECK_TABLE_CONSTRAINT);\n\t\tcreateEReference(checkTableConstraintEClass, CHECK_TABLE_CONSTRAINT__EXPRESSION);\n\n\t\tforeignKeyTableConstraintEClass = createEClass(FOREIGN_KEY_TABLE_CONSTRAINT);\n\t\tcreateEReference(foreignKeyTableConstraintEClass, FOREIGN_KEY_TABLE_CONSTRAINT__COLUMNS);\n\t\tcreateEReference(foreignKeyTableConstraintEClass, FOREIGN_KEY_TABLE_CONSTRAINT__FOREIGN_TABLE);\n\t\tcreateEReference(foreignKeyTableConstraintEClass, FOREIGN_KEY_TABLE_CONSTRAINT__FOREIGN_COLUMNS);\n\t}", "protected void createContents() {\n\n\t}", "Information createInformation();", "StructureType createStructureType();", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tldprojectEClass = createEClass(LDPROJECT);\n\t\tcreateEAttribute(ldprojectEClass, LDPROJECT__NAME);\n\t\tcreateEAttribute(ldprojectEClass, LDPROJECT__LIFECYCLE);\n\t\tcreateEAttribute(ldprojectEClass, LDPROJECT__ROBUSTNESS);\n\t\tcreateEOperation(ldprojectEClass, LDPROJECT___PUBLISH);\n\t\tcreateEOperation(ldprojectEClass, LDPROJECT___UNPUBLISH);\n\t\tcreateEOperation(ldprojectEClass, LDPROJECT___UPDATE);\n\n\t\tlddatabaselinkEClass = createEClass(LDDATABASELINK);\n\t\tcreateEAttribute(lddatabaselinkEClass, LDDATABASELINK__DATABASE);\n\t\tcreateEAttribute(lddatabaselinkEClass, LDDATABASELINK__PORT);\n\n\t\tldprojectlinkEClass = createEClass(LDPROJECTLINK);\n\n\t\tldnodeEClass = createEClass(LDNODE);\n\t\tcreateEAttribute(ldnodeEClass, LDNODE__NAME);\n\t\tcreateEAttribute(ldnodeEClass, LDNODE__MONGO_HOSTS);\n\t\tcreateEAttribute(ldnodeEClass, LDNODE__MAIN_PROJECT);\n\t\tcreateEAttribute(ldnodeEClass, LDNODE__ANALYTICS_READ_PREFERENCE);\n\n\t\t// Create enums\n\t\tlifecycleEEnum = createEEnum(LIFECYCLE);\n\t\trobustnessEEnum = createEEnum(ROBUSTNESS);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tstateEClass = createEClass(STATE);\n\t\tcreateEAttribute(stateEClass, STATE__NAME);\n\t\tcreateEAttribute(stateEClass, STATE__INVARIANT);\n\t\tcreateEAttribute(stateEClass, STATE__INITIAL);\n\t\tcreateEAttribute(stateEClass, STATE__URGENT);\n\t\tcreateEAttribute(stateEClass, STATE__COMMITTED);\n\n\t\tconnectorEClass = createEClass(CONNECTOR);\n\t\tcreateEAttribute(connectorEClass, CONNECTOR__NAME);\n\t\tcreateEReference(connectorEClass, CONNECTOR__DIAGRAM);\n\n\t\tdiagramEClass = createEClass(DIAGRAM);\n\t\tcreateEAttribute(diagramEClass, DIAGRAM__NAME);\n\t\tcreateEReference(diagramEClass, DIAGRAM__CONNECTORS);\n\t\tcreateEReference(diagramEClass, DIAGRAM__STATES);\n\t\tcreateEReference(diagramEClass, DIAGRAM__SUBDIAGRAMS);\n\t\tcreateEReference(diagramEClass, DIAGRAM__EDGES);\n\t\tcreateEAttribute(diagramEClass, DIAGRAM__IS_PARALLEL);\n\n\t\tedgeEClass = createEClass(EDGE);\n\t\tcreateEReference(edgeEClass, EDGE__START);\n\t\tcreateEReference(edgeEClass, EDGE__END);\n\t\tcreateEReference(edgeEClass, EDGE__EREFERENCE0);\n\t\tcreateEAttribute(edgeEClass, EDGE__SELECT);\n\t\tcreateEAttribute(edgeEClass, EDGE__GUARD);\n\t\tcreateEAttribute(edgeEClass, EDGE__SYNC);\n\t\tcreateEAttribute(edgeEClass, EDGE__UPDATE);\n\t\tcreateEAttribute(edgeEClass, EDGE__COMMENTS);\n\n\t\tendPointEClass = createEClass(END_POINT);\n\t\tcreateEReference(endPointEClass, END_POINT__OUTGOING_EDGES);\n\t}", "public void createPackageContents()\n {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tclarityAbstractObjectEClass = createEClass(CLARITY_ABSTRACT_OBJECT);\n\t\tcreateEAttribute(clarityAbstractObjectEClass, CLARITY_ABSTRACT_OBJECT__CLARITY_CONNECTION);\n\n\t\tclarityAddFilesEClass = createEClass(CLARITY_ADD_FILES);\n\n\t\tclarityGetBatchResultEClass = createEClass(CLARITY_GET_BATCH_RESULT);\n\n\t\tclarityGetKeyEClass = createEClass(CLARITY_GET_KEY);\n\n\t\tclarityQueryBatchEClass = createEClass(CLARITY_QUERY_BATCH);\n\n\t\tclarityReloadFileEClass = createEClass(CLARITY_RELOAD_FILE);\n\n\t\tclarityRemoveFilesEClass = createEClass(CLARITY_REMOVE_FILES);\n\n\t\tstartBatchEClass = createEClass(START_BATCH);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\troleEClass = createEClass(ROLE);\n\t\tcreateEReference(roleEClass, ROLE__SOCIETY);\n\t\tcreateEReference(roleEClass, ROLE__IS_REALIZED_BY_INDIVIDUAL);\n\t\tcreateEReference(roleEClass, ROLE__PARENT);\n\t\tcreateEReference(roleEClass, ROLE__CHILDREN);\n\t\tcreateEAttribute(roleEClass, ROLE__ID);\n\t\tcreateEAttribute(roleEClass, ROLE__NAME);\n\n\t\tindividualRealizationEClass = createEClass(INDIVIDUAL_REALIZATION);\n\t\tcreateEReference(individualRealizationEClass, INDIVIDUAL_REALIZATION__TARGET);\n\t\tcreateEReference(individualRealizationEClass, INDIVIDUAL_REALIZATION__SOURCE);\n\t\tcreateEReference(individualRealizationEClass, INDIVIDUAL_REALIZATION__SOCIETY);\n\t\tcreateEAttribute(individualRealizationEClass, INDIVIDUAL_REALIZATION__ID);\n\n\t\tsocietyEClass = createEClass(SOCIETY);\n\t\tcreateEReference(societyEClass, SOCIETY__GENERALIZATIONS);\n\t\tcreateEReference(societyEClass, SOCIETY__RELAIZATIONS);\n\t\tcreateEReference(societyEClass, SOCIETY__INDIVIDUALS);\n\t\tcreateEAttribute(societyEClass, SOCIETY__NAME);\n\t\tcreateEReference(societyEClass, SOCIETY__ROLES);\n\n\t\tspecializationEClass = createEClass(SPECIALIZATION);\n\t\tcreateEReference(specializationEClass, SPECIALIZATION__TARGET);\n\t\tcreateEReference(specializationEClass, SPECIALIZATION__SOURCE);\n\t\tcreateEReference(specializationEClass, SPECIALIZATION__SOCIETY);\n\t\tcreateEAttribute(specializationEClass, SPECIALIZATION__ID);\n\n\t\tindividualInstanceEClass = createEClass(INDIVIDUAL_INSTANCE);\n\t\tcreateEReference(individualInstanceEClass, INDIVIDUAL_INSTANCE__REALIZES);\n\t\tcreateEAttribute(individualInstanceEClass, INDIVIDUAL_INSTANCE__ID);\n\t\tcreateEAttribute(individualInstanceEClass, INDIVIDUAL_INSTANCE__NAME);\n\t\tcreateEReference(individualInstanceEClass, INDIVIDUAL_INSTANCE__SOCIETY);\n\n\t\tsocialInstanceEClass = createEClass(SOCIAL_INSTANCE);\n\t\tcreateEOperation(socialInstanceEClass, SOCIAL_INSTANCE___GET_ID);\n\t\tcreateEOperation(socialInstanceEClass, SOCIAL_INSTANCE___GET_NAME);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated)\n\t\t\treturn;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tuserEClass = createEClass(USER);\n\t\tcreateEAttribute(userEClass, USER__NAME);\n\t\tcreateEReference(userEClass, USER__UR);\n\n\t\troleEClass = createEClass(ROLE);\n\t\tcreateEAttribute(roleEClass, ROLE__NAME);\n\t\tcreateEReference(roleEClass, ROLE__RD);\n\t\tcreateEReference(roleEClass, ROLE__SENIORS);\n\t\tcreateEReference(roleEClass, ROLE__JUNIORS);\n\t\tcreateEReference(roleEClass, ROLE__RU);\n\n\t\tpermissionEClass = createEClass(PERMISSION);\n\t\tcreateEAttribute(permissionEClass, PERMISSION__NAME);\n\t\tcreateEReference(permissionEClass, PERMISSION__PD);\n\n\t\tpolicyEClass = createEClass(POLICY);\n\t\tcreateEReference(policyEClass, POLICY__USERS);\n\t\tcreateEReference(policyEClass, POLICY__ROLES);\n\t\tcreateEReference(policyEClass, POLICY__PERMISSIONS);\n\t\tcreateEAttribute(policyEClass, POLICY__NAME);\n\t\tcreateEReference(policyEClass, POLICY__DEMARCATIONS);\n\n\t\tdemarcationEClass = createEClass(DEMARCATION);\n\t\tcreateEAttribute(demarcationEClass, DEMARCATION__NAME);\n\t\tcreateEReference(demarcationEClass, DEMARCATION__DP);\n\t\tcreateEReference(demarcationEClass, DEMARCATION__SUBS);\n\t\tcreateEReference(demarcationEClass, DEMARCATION__SUPS);\n\t\tcreateEReference(demarcationEClass, DEMARCATION__DR);\n\t}", "public void createPackageContents() {\r\n\t\tif (isCreated) return;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\trunnableEClass = createEClass(RUNNABLE);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__COMPONENT_INSTANCE);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__PORT_INSTANCE);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__PERIOD);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__LABEL_ACCESSES);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__DEADLINE);\r\n\r\n\t\tlabelEClass = createEClass(LABEL);\r\n\t\tcreateEReference(labelEClass, LABEL__COMPONENT_INSTANCE);\r\n\t\tcreateEReference(labelEClass, LABEL__COMPONENT_STATECHART);\r\n\t\tcreateEAttribute(labelEClass, LABEL__IS_CONSTANT);\r\n\r\n\t\tlabelAccessEClass = createEClass(LABEL_ACCESS);\r\n\t\tcreateEAttribute(labelAccessEClass, LABEL_ACCESS__ACCESS_KIND);\r\n\t\tcreateEReference(labelAccessEClass, LABEL_ACCESS__ACCESS_LABEL);\r\n\t\tcreateEReference(labelAccessEClass, LABEL_ACCESS__ACCESSING_RUNNABLE);\r\n\r\n\t\t// Create enums\r\n\t\tlabelAccessKindEEnum = createEEnum(LABEL_ACCESS_KIND);\r\n\t}", "public void createPackageContents() {\n\t\tif (isCreated)\n\t\t\treturn;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tbagTypeEClass = createEClass(BAG_TYPE);\n\n\t\ttupleTypeEClass = createEClass(TUPLE_TYPE);\n\t\tcreateEReference(tupleTypeEClass, TUPLE_TYPE__OCL_LIBRARY);\n\n\t\tcollectionTypeEClass = createEClass(COLLECTION_TYPE);\n\t\tcreateEReference(collectionTypeEClass, COLLECTION_TYPE__ELEMENT_TYPE);\n\t\tcreateEReference(collectionTypeEClass, COLLECTION_TYPE__OCL_LIBRARY);\n\t\tcreateEAttribute(collectionTypeEClass, COLLECTION_TYPE__KIND);\n\n\t\tinvalidTypeEClass = createEClass(INVALID_TYPE);\n\t\tcreateEReference(invalidTypeEClass, INVALID_TYPE__OCL_LIBRARY);\n\n\t\torderedSetTypeEClass = createEClass(ORDERED_SET_TYPE);\n\n\t\tsequenceTypeEClass = createEClass(SEQUENCE_TYPE);\n\n\t\tsetTypeEClass = createEClass(SET_TYPE);\n\n\t\tvoidTypeEClass = createEClass(VOID_TYPE);\n\t\tcreateEReference(voidTypeEClass, VOID_TYPE__OCL_LIBRARY);\n\n\t\ttypeTypeEClass = createEClass(TYPE_TYPE);\n\t\tcreateEReference(typeTypeEClass, TYPE_TYPE__REPRESENTED_TYPE);\n\n\t\toclLibraryEClass = createEClass(OCL_LIBRARY);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_BOOLEAN);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_STRING);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_INTEGER);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_REAL);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_ANY);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_VOID);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_INVALID);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_TYPE);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_COLLECTION);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_SEQUENCE);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_BAG);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_SET);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_ORDERED_SET);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_TUPLE);\n\n\t\tanyTypeEClass = createEClass(ANY_TYPE);\n\t}", "void initStructure(int totalNumBonds, int totalNumAtoms, int totalNumGroups, int totalNumChains, \n\t\t\tint totalNumModels, String structureId);", "protected abstract D createData();", "public void createPackageContents() {\r\n\t\tif (isCreated)\r\n\t\t\treturn;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tnamedElementEClass = createEClass(NAMED_ELEMENT);\r\n\t\tcreateEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\r\n\r\n\t\tcomDiagEClass = createEClass(COM_DIAG);\r\n\t\tcreateEReference(comDiagEClass, COM_DIAG__ELEMENTS);\r\n\t\tcreateEAttribute(comDiagEClass, COM_DIAG__LEVEL);\r\n\r\n\t\tcomDiagElementEClass = createEClass(COM_DIAG_ELEMENT);\r\n\t\tcreateEReference(comDiagElementEClass, COM_DIAG_ELEMENT__GRAPH);\r\n\r\n\t\tlifelineEClass = createEClass(LIFELINE);\r\n\t\tcreateEAttribute(lifelineEClass, LIFELINE__NUMBER);\r\n\r\n\t\tmessageEClass = createEClass(MESSAGE);\r\n\t\tcreateEAttribute(messageEClass, MESSAGE__OCCURENCE);\r\n\t\tcreateEReference(messageEClass, MESSAGE__SOURCE);\r\n\t\tcreateEReference(messageEClass, MESSAGE__TARGET);\r\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinvoiceEClass = createEClass(INVOICE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_ID);\n\t\tcreateEReference(invoiceEClass, INVOICE__BILLING_ACCOUNT);\n\t\tcreateEReference(invoiceEClass, INVOICE__CONTACT_MECH);\n\t\tcreateEReference(invoiceEClass, INVOICE__CURRENCY_UOM);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__DUE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_ITEMS);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__INVOICE_MESSAGE);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_NOTES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_STATUSES);\n\t\tcreateEReference(invoiceEClass, INVOICE__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__PAID_DATE);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY);\n\t\tcreateEReference(invoiceEClass, INVOICE__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceEClass, INVOICE__RECURRENCE_INFO);\n\t\tcreateEAttribute(invoiceEClass, INVOICE__REFERENCE_NUMBER);\n\t\tcreateEReference(invoiceEClass, INVOICE__ROLE_TYPE);\n\t\tcreateEReference(invoiceEClass, INVOICE__STATUS);\n\n\t\tinvoiceAttributeEClass = createEClass(INVOICE_ATTRIBUTE);\n\t\tcreateEReference(invoiceAttributeEClass, INVOICE_ATTRIBUTE__INVOICE);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceAttributeEClass, INVOICE_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceContactMechEClass = createEClass(INVOICE_CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__INVOICE);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH);\n\t\tcreateEReference(invoiceContactMechEClass, INVOICE_CONTACT_MECH__CONTACT_MECH_PURPOSE_TYPE);\n\n\t\tinvoiceContentEClass = createEClass(INVOICE_CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__CONTENT);\n\t\tcreateEReference(invoiceContentEClass, INVOICE_CONTENT__INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__FROM_DATE);\n\t\tcreateEAttribute(invoiceContentEClass, INVOICE_CONTENT__THRU_DATE);\n\n\t\tinvoiceContentTypeEClass = createEClass(INVOICE_CONTENT_TYPE);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__INVOICE_CONTENT_TYPE_ID);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceContentTypeEClass, INVOICE_CONTENT_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemEClass = createEClass(INVOICE_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__AMOUNT);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__DESCRIPTION);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVENTORY_ITEM);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__OVERRIDE_ORG_PARTY);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__PARENT_INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__PRODUCT_FEATURE);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__QUANTITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__SALES_OPPORTUNITY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_GEO);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTH_PARTY);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__TAX_AUTHORITY_RATE_SEQ);\n\t\tcreateEAttribute(invoiceItemEClass, INVOICE_ITEM__TAXABLE_FLAG);\n\t\tcreateEReference(invoiceItemEClass, INVOICE_ITEM__UOM);\n\n\t\tinvoiceItemAssocEClass = createEClass(INVOICE_ITEM_ASSOC);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__FROM_DATE);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_FROM);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__INVOICE_ITEM_SEQ_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__AMOUNT);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_FROM);\n\t\tcreateEReference(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__PARTY_ID_TO);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__QUANTITY);\n\t\tcreateEAttribute(invoiceItemAssocEClass, INVOICE_ITEM_ASSOC__THRU_DATE);\n\n\t\tinvoiceItemAssocTypeEClass = createEClass(INVOICE_ITEM_ASSOC_TYPE);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__INVOICE_ITEM_ASSOC_TYPE_ID);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemAssocTypeEClass, INVOICE_ITEM_ASSOC_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemAttributeEClass = createEClass(INVOICE_ITEM_ATTRIBUTE);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemAttributeEClass, INVOICE_ITEM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceItemTypeEClass = createEClass(INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ID);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DEFAULT_GL_ACCOUNT);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_ATTRS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__INVOICE_ITEM_TYPE_GL_ACCOUNTS);\n\t\tcreateEReference(invoiceItemTypeEClass, INVOICE_ITEM_TYPE__PARENT_TYPE);\n\n\t\tinvoiceItemTypeAttrEClass = createEClass(INVOICE_ITEM_TYPE_ATTR);\n\t\tcreateEReference(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__INVOICE_ITEM_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceItemTypeAttrEClass, INVOICE_ITEM_TYPE_ATTR__DESCRIPTION);\n\n\t\tinvoiceItemTypeGlAccountEClass = createEClass(INVOICE_ITEM_TYPE_GL_ACCOUNT);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__INVOICE_ITEM_TYPE);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__ORGANIZATION_PARTY);\n\t\tcreateEReference(invoiceItemTypeGlAccountEClass, INVOICE_ITEM_TYPE_GL_ACCOUNT__GL_ACCOUNT);\n\n\t\tinvoiceItemTypeMapEClass = createEClass(INVOICE_ITEM_TYPE_MAP);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_MAP_KEY);\n\t\tcreateEReference(invoiceItemTypeMapEClass, INVOICE_ITEM_TYPE_MAP__INVOICE_ITEM_TYPE);\n\n\t\tinvoiceNoteEClass = createEClass(INVOICE_NOTE);\n\t\tcreateEReference(invoiceNoteEClass, INVOICE_NOTE__INVOICE);\n\n\t\tinvoiceRoleEClass = createEClass(INVOICE_ROLE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__INVOICE);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__PARTY);\n\t\tcreateEReference(invoiceRoleEClass, INVOICE_ROLE__ROLE_TYPE);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__DATETIME_PERFORMED);\n\t\tcreateEAttribute(invoiceRoleEClass, INVOICE_ROLE__PERCENTAGE);\n\n\t\tinvoiceStatusEClass = createEClass(INVOICE_STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__STATUS);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__INVOICE);\n\t\tcreateEAttribute(invoiceStatusEClass, INVOICE_STATUS__STATUS_DATE);\n\t\tcreateEReference(invoiceStatusEClass, INVOICE_STATUS__CHANGE_BY_USER_LOGIN);\n\n\t\tinvoiceTermEClass = createEClass(INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ID);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__DESCRIPTION);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__INVOICE_ITEM_SEQ_ID);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__INVOICE_TERM_ATTRIBUTES);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_DAYS);\n\t\tcreateEReference(invoiceTermEClass, INVOICE_TERM__TERM_TYPE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TERM_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__TEXT_VALUE);\n\t\tcreateEAttribute(invoiceTermEClass, INVOICE_TERM__UOM_ID);\n\n\t\tinvoiceTermAttributeEClass = createEClass(INVOICE_TERM_ATTRIBUTE);\n\t\tcreateEReference(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__INVOICE_TERM);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_DESCRIPTION);\n\t\tcreateEAttribute(invoiceTermAttributeEClass, INVOICE_TERM_ATTRIBUTE__ATTR_VALUE);\n\n\t\tinvoiceTypeEClass = createEClass(INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ID);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(invoiceTypeEClass, INVOICE_TYPE__HAS_TABLE);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__INVOICE_TYPE_ATTRS);\n\t\tcreateEReference(invoiceTypeEClass, INVOICE_TYPE__PARENT_TYPE);\n\n\t\tinvoiceTypeAttrEClass = createEClass(INVOICE_TYPE_ATTR);\n\t\tcreateEReference(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__INVOICE_TYPE);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__ATTR_NAME);\n\t\tcreateEAttribute(invoiceTypeAttrEClass, INVOICE_TYPE_ATTR__DESCRIPTION);\n\t}", "@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tcharacteristicComponentEClass = createEClass(CHARACTERISTIC_COMPONENT);\n\t\tcreateEAttribute(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__NAME);\n\t\tcreateEAttribute(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__MODULE);\n\t\tcreateEAttribute(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__PREFIX);\n\t\tcreateEAttribute(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__CONTAINER);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__ACTIONS);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__ATTRIBUTES);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__PROPERTIES);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__USED_BACI_TYPES);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__USED_DEV_IOS);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__COMPONENT_INSTANCES);\n\n\t\tactionEClass = createEClass(ACTION);\n\t\tcreateEAttribute(actionEClass, ACTION__NAME);\n\t\tcreateEAttribute(actionEClass, ACTION__TYPE);\n\t\tcreateEReference(actionEClass, ACTION__PARAMETERS);\n\n\t\tparameterEClass = createEClass(PARAMETER);\n\t\tcreateEAttribute(parameterEClass, PARAMETER__NAME);\n\t\tcreateEAttribute(parameterEClass, PARAMETER__TYPE);\n\n\t\tattributeEClass = createEClass(ATTRIBUTE);\n\t\tcreateEAttribute(attributeEClass, ATTRIBUTE__NAME);\n\t\tcreateEAttribute(attributeEClass, ATTRIBUTE__TYPE);\n\t\tcreateEAttribute(attributeEClass, ATTRIBUTE__REQUIRED);\n\t\tcreateEAttribute(attributeEClass, ATTRIBUTE__DEFAULT_VALUE);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\t\tcreateEAttribute(propertyEClass, PROPERTY__NAME);\n\t\tcreateEReference(propertyEClass, PROPERTY__BACI_TYPE);\n\t\tcreateEReference(propertyEClass, PROPERTY__DEV_IO);\n\n\t\tusedDevIOsEClass = createEClass(USED_DEV_IOS);\n\t\tcreateEReference(usedDevIOsEClass, USED_DEV_IOS__DEV_IOS);\n\n\t\tdevIOEClass = createEClass(DEV_IO);\n\t\tcreateEAttribute(devIOEClass, DEV_IO__NAME);\n\t\tcreateEAttribute(devIOEClass, DEV_IO__REQUIRED_LIBRARIES);\n\t\tcreateEReference(devIOEClass, DEV_IO__DEV_IO_VARIABLES);\n\n\t\tdevIOVariableEClass = createEClass(DEV_IO_VARIABLE);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__NAME);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__TYPE);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__IS_READ);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__IS_WRITE);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__IS_PROPERTY_SPECIFIC);\n\n\t\tusedBaciTypesEClass = createEClass(USED_BACI_TYPES);\n\t\tcreateEReference(usedBaciTypesEClass, USED_BACI_TYPES__BACI_TYPES);\n\n\t\tbaciTypeEClass = createEClass(BACI_TYPE);\n\t\tcreateEAttribute(baciTypeEClass, BACI_TYPE__NAME);\n\t\tcreateEAttribute(baciTypeEClass, BACI_TYPE__ACCESS_TYPE);\n\t\tcreateEAttribute(baciTypeEClass, BACI_TYPE__BASIC_TYPE);\n\t\tcreateEAttribute(baciTypeEClass, BACI_TYPE__SEQ_TYPE);\n\n\t\tcomponentInstancesEClass = createEClass(COMPONENT_INSTANCES);\n\t\tcreateEReference(componentInstancesEClass, COMPONENT_INSTANCES__INSTANCES);\n\t\tcreateEReference(componentInstancesEClass, COMPONENT_INSTANCES__CONTAINING_CARACTERISTIC_COMPONENT);\n\n\t\tinstanceEClass = createEClass(INSTANCE);\n\t\tcreateEAttribute(instanceEClass, INSTANCE__NAME);\n\t\tcreateEReference(instanceEClass, INSTANCE__CONTAINING_COMPONENT_INSTANCES);\n\t\tcreateEReference(instanceEClass, INSTANCE__ATTRIBUTE_VALUES_CONTAINER);\n\t\tcreateEReference(instanceEClass, INSTANCE__CHARACTERISTIC_VALUES_CONTAINER);\n\t\tcreateEAttribute(instanceEClass, INSTANCE__AUTO_START);\n\t\tcreateEAttribute(instanceEClass, INSTANCE__DEFAULT);\n\n\t\tattributeValuesEClass = createEClass(ATTRIBUTE_VALUES);\n\t\tcreateEReference(attributeValuesEClass, ATTRIBUTE_VALUES__INSTANCE_ATTRIBUTES);\n\t\tcreateEReference(attributeValuesEClass, ATTRIBUTE_VALUES__CONTAINING_INSTANCE);\n\n\t\tattributeValueEClass = createEClass(ATTRIBUTE_VALUE);\n\t\tcreateEAttribute(attributeValueEClass, ATTRIBUTE_VALUE__NAME);\n\t\tcreateEAttribute(attributeValueEClass, ATTRIBUTE_VALUE__VALUE);\n\n\t\tcharacteristicValuesEClass = createEClass(CHARACTERISTIC_VALUES);\n\t\tcreateEAttribute(characteristicValuesEClass, CHARACTERISTIC_VALUES__PROPERTY_NAME);\n\t\tcreateEReference(characteristicValuesEClass, CHARACTERISTIC_VALUES__INSTANCE_CHARACTERISTICS);\n\t\tcreateEReference(characteristicValuesEClass, CHARACTERISTIC_VALUES__CONTAINING_INSTANCE);\n\n\t\tcharacteristicValueEClass = createEClass(CHARACTERISTIC_VALUE);\n\t\tcreateEAttribute(characteristicValueEClass, CHARACTERISTIC_VALUE__NAME);\n\t\tcreateEAttribute(characteristicValueEClass, CHARACTERISTIC_VALUE__VALUE);\n\n\t\tpropertyDefinitionEClass = createEClass(PROPERTY_DEFINITION);\n\n\t\t// Create enums\n\t\taccessTypeEEnum = createEEnum(ACCESS_TYPE);\n\t\tbasicTypeEEnum = createEEnum(BASIC_TYPE);\n\t\tseqTypeEEnum = createEEnum(SEQ_TYPE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttreeEClass = createEClass(TREE);\n\t\tcreateEReference(treeEClass, TREE__CHILDREN);\n\n\t\tnodeEClass = createEClass(NODE);\n\t\tcreateEReference(nodeEClass, NODE__CHILDREN);\n\t\tcreateEAttribute(nodeEClass, NODE__NAME);\n\t}", "public void createPackageContents() {\r\n\t\tif (isCreated)\r\n\t\t\treturn;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tissueEClass = createEClass(ISSUE);\r\n\t\tcreateEReference(issueEClass, ISSUE__PROPOSALS);\r\n\t\tcreateEReference(issueEClass, ISSUE__SOLUTION);\r\n\t\tcreateEReference(issueEClass, ISSUE__CRITERIA);\r\n\t\tcreateEAttribute(issueEClass, ISSUE__ACTIVITY);\r\n\t\tcreateEReference(issueEClass, ISSUE__ASSESSMENTS);\r\n\r\n\t\tproposalEClass = createEClass(PROPOSAL);\r\n\t\tcreateEReference(proposalEClass, PROPOSAL__ASSESSMENTS);\r\n\t\tcreateEReference(proposalEClass, PROPOSAL__ISSUE);\r\n\r\n\t\tsolutionEClass = createEClass(SOLUTION);\r\n\t\tcreateEReference(solutionEClass, SOLUTION__UNDERLYING_PROPOSALS);\r\n\t\tcreateEReference(solutionEClass, SOLUTION__ISSUE);\r\n\r\n\t\tcriterionEClass = createEClass(CRITERION);\r\n\t\tcreateEReference(criterionEClass, CRITERION__ASSESSMENTS);\r\n\r\n\t\tassessmentEClass = createEClass(ASSESSMENT);\r\n\t\tcreateEReference(assessmentEClass, ASSESSMENT__PROPOSAL);\r\n\t\tcreateEReference(assessmentEClass, ASSESSMENT__CRITERION);\r\n\t\tcreateEAttribute(assessmentEClass, ASSESSMENT__VALUE);\r\n\r\n\t\tcommentEClass = createEClass(COMMENT);\r\n\t\tcreateEReference(commentEClass, COMMENT__SENDER);\r\n\t\tcreateEReference(commentEClass, COMMENT__RECIPIENTS);\r\n\t\tcreateEReference(commentEClass, COMMENT__COMMENTED_ELEMENT);\r\n\r\n\t\taudioCommentEClass = createEClass(AUDIO_COMMENT);\r\n\t\tcreateEReference(audioCommentEClass, AUDIO_COMMENT__AUDIO_FILE);\r\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\toml2OTIProvenanceEClass = createEClass(OML2OTI_PROVENANCE);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OML_UUID);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OML_IRI);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OTI_ID);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OTI_URL);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__OTI_UUID);\n\t\tcreateEAttribute(oml2OTIProvenanceEClass, OML2OTI_PROVENANCE__EXPLANATION);\n\n\t\t// Create data types\n\t\tuuidEDataType = createEDataType(UUID);\n\t\tomL_IRIEDataType = createEDataType(OML_IRI);\n\t\totI_TOOL_SPECIFIC_IDEDataType = createEDataType(OTI_TOOL_SPECIFIC_ID);\n\t\totI_TOOL_SPECIFIC_UUIDEDataType = createEDataType(OTI_TOOL_SPECIFIC_UUID);\n\t\totI_TOOL_SPECIFIC_URLEDataType = createEDataType(OTI_TOOL_SPECIFIC_URL);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tpartyQualEClass = createEClass(PARTY_QUAL);\n\t\tcreateEReference(partyQualEClass, PARTY_QUAL__PARTY);\n\t\tcreateEReference(partyQualEClass, PARTY_QUAL__PARTY_QUAL_TYPE);\n\t\tcreateEAttribute(partyQualEClass, PARTY_QUAL__FROM_DATE);\n\t\tcreateEAttribute(partyQualEClass, PARTY_QUAL__QUALIFICATION_DESC);\n\t\tcreateEReference(partyQualEClass, PARTY_QUAL__STATUS);\n\t\tcreateEAttribute(partyQualEClass, PARTY_QUAL__THRU_DATE);\n\t\tcreateEAttribute(partyQualEClass, PARTY_QUAL__TITLE);\n\t\tcreateEReference(partyQualEClass, PARTY_QUAL__VERIF_STATUS);\n\n\t\tpartyQualTypeEClass = createEClass(PARTY_QUAL_TYPE);\n\t\tcreateEAttribute(partyQualTypeEClass, PARTY_QUAL_TYPE__PARTY_QUAL_TYPE_ID);\n\t\tcreateEAttribute(partyQualTypeEClass, PARTY_QUAL_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(partyQualTypeEClass, PARTY_QUAL_TYPE__HAS_TABLE);\n\t\tcreateEReference(partyQualTypeEClass, PARTY_QUAL_TYPE__PARENT_TYPE);\n\n\t\tpartyResumeEClass = createEClass(PARTY_RESUME);\n\t\tcreateEAttribute(partyResumeEClass, PARTY_RESUME__RESUME_ID);\n\t\tcreateEReference(partyResumeEClass, PARTY_RESUME__CONTENT);\n\t\tcreateEReference(partyResumeEClass, PARTY_RESUME__PARTY);\n\t\tcreateEAttribute(partyResumeEClass, PARTY_RESUME__RESUME_DATE);\n\t\tcreateEAttribute(partyResumeEClass, PARTY_RESUME__RESUME_TEXT);\n\n\t\tpartySkillEClass = createEClass(PARTY_SKILL);\n\t\tcreateEReference(partySkillEClass, PARTY_SKILL__PARTY);\n\t\tcreateEReference(partySkillEClass, PARTY_SKILL__SKILL_TYPE);\n\t\tcreateEAttribute(partySkillEClass, PARTY_SKILL__RATING);\n\t\tcreateEAttribute(partySkillEClass, PARTY_SKILL__SKILL_LEVEL);\n\t\tcreateEAttribute(partySkillEClass, PARTY_SKILL__STARTED_USING_DATE);\n\t\tcreateEAttribute(partySkillEClass, PARTY_SKILL__YEARS_EXPERIENCE);\n\n\t\tperfRatingTypeEClass = createEClass(PERF_RATING_TYPE);\n\t\tcreateEAttribute(perfRatingTypeEClass, PERF_RATING_TYPE__PERF_RATING_TYPE_ID);\n\t\tcreateEAttribute(perfRatingTypeEClass, PERF_RATING_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(perfRatingTypeEClass, PERF_RATING_TYPE__HAS_TABLE);\n\t\tcreateEReference(perfRatingTypeEClass, PERF_RATING_TYPE__PARENT_TYPE);\n\n\t\tperfReviewEClass = createEClass(PERF_REVIEW);\n\t\tcreateEReference(perfReviewEClass, PERF_REVIEW__EMPLOYEE_PARTY);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__EMPLOYEE_ROLE_TYPE_ID);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__PERF_REVIEW_ID);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__COMMENTS);\n\t\tcreateEReference(perfReviewEClass, PERF_REVIEW__EMPL_POSITION);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__FROM_DATE);\n\t\tcreateEReference(perfReviewEClass, PERF_REVIEW__MANAGER_PARTY);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__MANAGER_ROLE_TYPE_ID);\n\t\tcreateEReference(perfReviewEClass, PERF_REVIEW__PAYMENT);\n\t\tcreateEAttribute(perfReviewEClass, PERF_REVIEW__THRU_DATE);\n\n\t\tperfReviewItemEClass = createEClass(PERF_REVIEW_ITEM);\n\t\tcreateEReference(perfReviewItemEClass, PERF_REVIEW_ITEM__EMPLOYEE_PARTY);\n\t\tcreateEAttribute(perfReviewItemEClass, PERF_REVIEW_ITEM__EMPLOYEE_ROLE_TYPE_ID);\n\t\tcreateEAttribute(perfReviewItemEClass, PERF_REVIEW_ITEM__PERF_REVIEW_ID);\n\t\tcreateEAttribute(perfReviewItemEClass, PERF_REVIEW_ITEM__PERF_REVIEW_ITEM_SEQ_ID);\n\t\tcreateEAttribute(perfReviewItemEClass, PERF_REVIEW_ITEM__COMMENTS);\n\t\tcreateEReference(perfReviewItemEClass, PERF_REVIEW_ITEM__PERF_RATING_TYPE);\n\t\tcreateEReference(perfReviewItemEClass, PERF_REVIEW_ITEM__PERF_REVIEW_ITEM_TYPE);\n\n\t\tperfReviewItemTypeEClass = createEClass(PERF_REVIEW_ITEM_TYPE);\n\t\tcreateEAttribute(perfReviewItemTypeEClass, PERF_REVIEW_ITEM_TYPE__PERF_REVIEW_ITEM_TYPE_ID);\n\t\tcreateEAttribute(perfReviewItemTypeEClass, PERF_REVIEW_ITEM_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(perfReviewItemTypeEClass, PERF_REVIEW_ITEM_TYPE__HAS_TABLE);\n\t\tcreateEReference(perfReviewItemTypeEClass, PERF_REVIEW_ITEM_TYPE__PARENT_TYPE);\n\n\t\tperformanceNoteEClass = createEClass(PERFORMANCE_NOTE);\n\t\tcreateEReference(performanceNoteEClass, PERFORMANCE_NOTE__PARTY);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__FROM_DATE);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__ROLE_TYPE_ID);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__COMMENTS);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__COMMUNICATION_DATE);\n\t\tcreateEAttribute(performanceNoteEClass, PERFORMANCE_NOTE__THRU_DATE);\n\n\t\tpersonTrainingEClass = createEClass(PERSON_TRAINING);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__PARTY);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__TRAINING_CLASS_TYPE);\n\t\tcreateEAttribute(personTrainingEClass, PERSON_TRAINING__FROM_DATE);\n\t\tcreateEAttribute(personTrainingEClass, PERSON_TRAINING__APPROVAL_STATUS);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__APPROVER);\n\t\tcreateEAttribute(personTrainingEClass, PERSON_TRAINING__REASON);\n\t\tcreateEAttribute(personTrainingEClass, PERSON_TRAINING__THRU_DATE);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__TRAINING_REQUEST);\n\t\tcreateEReference(personTrainingEClass, PERSON_TRAINING__WORK_EFFORT);\n\n\t\tresponsibilityTypeEClass = createEClass(RESPONSIBILITY_TYPE);\n\t\tcreateEAttribute(responsibilityTypeEClass, RESPONSIBILITY_TYPE__RESPONSIBILITY_TYPE_ID);\n\t\tcreateEAttribute(responsibilityTypeEClass, RESPONSIBILITY_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(responsibilityTypeEClass, RESPONSIBILITY_TYPE__HAS_TABLE);\n\t\tcreateEReference(responsibilityTypeEClass, RESPONSIBILITY_TYPE__PARENT_TYPE);\n\n\t\tskillTypeEClass = createEClass(SKILL_TYPE);\n\t\tcreateEAttribute(skillTypeEClass, SKILL_TYPE__SKILL_TYPE_ID);\n\t\tcreateEAttribute(skillTypeEClass, SKILL_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(skillTypeEClass, SKILL_TYPE__HAS_TABLE);\n\t\tcreateEReference(skillTypeEClass, SKILL_TYPE__PARENT_TYPE);\n\n\t\ttrainingClassTypeEClass = createEClass(TRAINING_CLASS_TYPE);\n\t\tcreateEAttribute(trainingClassTypeEClass, TRAINING_CLASS_TYPE__TRAINING_CLASS_TYPE_ID);\n\t\tcreateEAttribute(trainingClassTypeEClass, TRAINING_CLASS_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(trainingClassTypeEClass, TRAINING_CLASS_TYPE__HAS_TABLE);\n\t\tcreateEReference(trainingClassTypeEClass, TRAINING_CLASS_TYPE__PARENT_TYPE);\n\t}", "public void createPackageContents()\n\t{\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create data types\n\t\tfeatureNotFoundExceptionEDataType = createEDataType(FEATURE_NOT_FOUND_EXCEPTION);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tblockArchitecturePkgEClass = createEClass(BLOCK_ARCHITECTURE_PKG);\n\n\t\tblockArchitectureEClass = createEClass(BLOCK_ARCHITECTURE);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_REQUIREMENT_PKGS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_ABSTRACT_CAPABILITY_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_INTERFACE_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_DATA_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__PROVISIONED_ARCHITECTURE_ALLOCATIONS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__PROVISIONING_ARCHITECTURE_ALLOCATIONS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__ALLOCATED_ARCHITECTURES);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__ALLOCATING_ARCHITECTURES);\n\n\t\tblockEClass = createEClass(BLOCK);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_ABSTRACT_CAPABILITY_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_INTERFACE_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_DATA_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_STATE_MACHINES);\n\n\t\tcomponentArchitectureEClass = createEClass(COMPONENT_ARCHITECTURE);\n\n\t\tcomponentEClass = createEClass(COMPONENT);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_INTERFACE_USES);\n\t\tcreateEReference(componentEClass, COMPONENT__USED_INTERFACE_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__USED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_INTERFACE_IMPLEMENTATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__IMPLEMENTED_INTERFACE_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__IMPLEMENTED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVISIONED_COMPONENT_ALLOCATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVISIONING_COMPONENT_ALLOCATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__ALLOCATED_COMPONENTS);\n\t\tcreateEReference(componentEClass, COMPONENT__ALLOCATING_COMPONENTS);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVIDED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__REQUIRED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_COMPONENT_PORTS);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_PARTS);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_PHYSICAL_PORTS);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_PATH);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_LINK_CATEGORIES);\n\n\t\tabstractActorEClass = createEClass(ABSTRACT_ACTOR);\n\n\t\tpartEClass = createEClass(PART);\n\t\tcreateEReference(partEClass, PART__PROVIDED_INTERFACES);\n\t\tcreateEReference(partEClass, PART__REQUIRED_INTERFACES);\n\t\tcreateEReference(partEClass, PART__OWNED_DEPLOYMENT_LINKS);\n\t\tcreateEReference(partEClass, PART__DEPLOYED_PARTS);\n\t\tcreateEReference(partEClass, PART__DEPLOYING_PARTS);\n\t\tcreateEReference(partEClass, PART__OWNED_ABSTRACT_TYPE);\n\t\tcreateEAttribute(partEClass, PART__VALUE);\n\t\tcreateEAttribute(partEClass, PART__MAX_VALUE);\n\t\tcreateEAttribute(partEClass, PART__MIN_VALUE);\n\t\tcreateEAttribute(partEClass, PART__CURRENT_MASS);\n\n\t\tarchitectureAllocationEClass = createEClass(ARCHITECTURE_ALLOCATION);\n\t\tcreateEReference(architectureAllocationEClass, ARCHITECTURE_ALLOCATION__ALLOCATED_ARCHITECTURE);\n\t\tcreateEReference(architectureAllocationEClass, ARCHITECTURE_ALLOCATION__ALLOCATING_ARCHITECTURE);\n\n\t\tcomponentAllocationEClass = createEClass(COMPONENT_ALLOCATION);\n\t\tcreateEReference(componentAllocationEClass, COMPONENT_ALLOCATION__ALLOCATED_COMPONENT);\n\t\tcreateEReference(componentAllocationEClass, COMPONENT_ALLOCATION__ALLOCATING_COMPONENT);\n\n\t\tsystemComponentEClass = createEClass(SYSTEM_COMPONENT);\n\t\tcreateEAttribute(systemComponentEClass, SYSTEM_COMPONENT__DATA_COMPONENT);\n\t\tcreateEReference(systemComponentEClass, SYSTEM_COMPONENT__DATA_TYPE);\n\t\tcreateEReference(systemComponentEClass, SYSTEM_COMPONENT__PARTICIPATIONS_IN_CAPABILITY_REALIZATIONS);\n\n\t\tinterfacePkgEClass = createEClass(INTERFACE_PKG);\n\t\tcreateEReference(interfacePkgEClass, INTERFACE_PKG__OWNED_INTERFACES);\n\t\tcreateEReference(interfacePkgEClass, INTERFACE_PKG__OWNED_INTERFACE_PKGS);\n\n\t\tinterfaceEClass = createEClass(INTERFACE);\n\t\tcreateEAttribute(interfaceEClass, INTERFACE__MECHANISM);\n\t\tcreateEAttribute(interfaceEClass, INTERFACE__STRUCTURAL);\n\t\tcreateEReference(interfaceEClass, INTERFACE__IMPLEMENTOR_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__USER_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__INTERFACE_IMPLEMENTATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__INTERFACE_USES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVISIONING_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__ALLOCATING_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__ALLOCATING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__EXCHANGE_ITEMS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__OWNED_EXCHANGE_ITEM_ALLOCATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REQUIRING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REQUIRING_COMPONENT_PORTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVIDING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVIDING_COMPONENT_PORTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZING_LOGICAL_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZED_CONTEXT_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZING_PHYSICAL_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZED_LOGICAL_INTERFACES);\n\n\t\tinterfaceImplementationEClass = createEClass(INTERFACE_IMPLEMENTATION);\n\t\tcreateEReference(interfaceImplementationEClass, INTERFACE_IMPLEMENTATION__INTERFACE_IMPLEMENTOR);\n\t\tcreateEReference(interfaceImplementationEClass, INTERFACE_IMPLEMENTATION__IMPLEMENTED_INTERFACE);\n\n\t\tinterfaceUseEClass = createEClass(INTERFACE_USE);\n\t\tcreateEReference(interfaceUseEClass, INTERFACE_USE__INTERFACE_USER);\n\t\tcreateEReference(interfaceUseEClass, INTERFACE_USE__USED_INTERFACE);\n\n\t\tprovidedInterfaceLinkEClass = createEClass(PROVIDED_INTERFACE_LINK);\n\t\tcreateEReference(providedInterfaceLinkEClass, PROVIDED_INTERFACE_LINK__INTERFACE);\n\n\t\trequiredInterfaceLinkEClass = createEClass(REQUIRED_INTERFACE_LINK);\n\t\tcreateEReference(requiredInterfaceLinkEClass, REQUIRED_INTERFACE_LINK__INTERFACE);\n\n\t\tinterfaceAllocationEClass = createEClass(INTERFACE_ALLOCATION);\n\t\tcreateEReference(interfaceAllocationEClass, INTERFACE_ALLOCATION__ALLOCATED_INTERFACE);\n\t\tcreateEReference(interfaceAllocationEClass, INTERFACE_ALLOCATION__ALLOCATING_INTERFACE_ALLOCATOR);\n\n\t\tinterfaceAllocatorEClass = createEClass(INTERFACE_ALLOCATOR);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__OWNED_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__PROVISIONED_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__ALLOCATED_INTERFACES);\n\n\t\tactorCapabilityRealizationInvolvementEClass = createEClass(ACTOR_CAPABILITY_REALIZATION_INVOLVEMENT);\n\n\t\tsystemComponentCapabilityRealizationInvolvementEClass = createEClass(SYSTEM_COMPONENT_CAPABILITY_REALIZATION_INVOLVEMENT);\n\n\t\tcomponentContextEClass = createEClass(COMPONENT_CONTEXT);\n\n\t\texchangeItemAllocationEClass = createEClass(EXCHANGE_ITEM_ALLOCATION);\n\t\tcreateEAttribute(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__SEND_PROTOCOL);\n\t\tcreateEAttribute(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__RECEIVE_PROTOCOL);\n\t\tcreateEReference(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__ALLOCATED_ITEM);\n\t\tcreateEReference(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__ALLOCATING_INTERFACE);\n\n\t\tdeployableElementEClass = createEClass(DEPLOYABLE_ELEMENT);\n\t\tcreateEReference(deployableElementEClass, DEPLOYABLE_ELEMENT__DEPLOYING_LINKS);\n\n\t\tdeploymentTargetEClass = createEClass(DEPLOYMENT_TARGET);\n\t\tcreateEReference(deploymentTargetEClass, DEPLOYMENT_TARGET__DEPLOYMENT_LINKS);\n\n\t\tabstractDeploymentLinkEClass = createEClass(ABSTRACT_DEPLOYMENT_LINK);\n\t\tcreateEReference(abstractDeploymentLinkEClass, ABSTRACT_DEPLOYMENT_LINK__DEPLOYED_ELEMENT);\n\t\tcreateEReference(abstractDeploymentLinkEClass, ABSTRACT_DEPLOYMENT_LINK__LOCATION);\n\n\t\tabstractPathInvolvedElementEClass = createEClass(ABSTRACT_PATH_INVOLVED_ELEMENT);\n\n\t\tabstractPhysicalArtifactEClass = createEClass(ABSTRACT_PHYSICAL_ARTIFACT);\n\t\tcreateEReference(abstractPhysicalArtifactEClass, ABSTRACT_PHYSICAL_ARTIFACT__ALLOCATOR_CONFIGURATION_ITEMS);\n\n\t\tabstractPhysicalLinkEndEClass = createEClass(ABSTRACT_PHYSICAL_LINK_END);\n\t\tcreateEReference(abstractPhysicalLinkEndEClass, ABSTRACT_PHYSICAL_LINK_END__INVOLVED_LINKS);\n\n\t\tabstractPhysicalPathLinkEClass = createEClass(ABSTRACT_PHYSICAL_PATH_LINK);\n\n\t\tphysicalLinkEClass = createEClass(PHYSICAL_LINK);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__LINK_ENDS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_COMPONENT_EXCHANGE_FUNCTIONAL_EXCHANGE_ALLOCATIONS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_PHYSICAL_LINK_ENDS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_PHYSICAL_LINK_REALIZATIONS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__CATEGORIES);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__SOURCE_PHYSICAL_PORT);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__TARGET_PHYSICAL_PORT);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__REALIZED_PHYSICAL_LINKS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__REALIZING_PHYSICAL_LINKS);\n\n\t\tphysicalLinkCategoryEClass = createEClass(PHYSICAL_LINK_CATEGORY);\n\t\tcreateEReference(physicalLinkCategoryEClass, PHYSICAL_LINK_CATEGORY__LINKS);\n\n\t\tphysicalLinkEndEClass = createEClass(PHYSICAL_LINK_END);\n\t\tcreateEReference(physicalLinkEndEClass, PHYSICAL_LINK_END__PORT);\n\t\tcreateEReference(physicalLinkEndEClass, PHYSICAL_LINK_END__PART);\n\n\t\tphysicalLinkRealizationEClass = createEClass(PHYSICAL_LINK_REALIZATION);\n\n\t\tphysicalPathEClass = createEClass(PHYSICAL_PATH);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__INVOLVED_LINKS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__OWNED_PHYSICAL_PATH_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__FIRST_PHYSICAL_PATH_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__OWNED_PHYSICAL_PATH_REALIZATIONS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__REALIZED_PHYSICAL_PATHS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__REALIZING_PHYSICAL_PATHS);\n\n\t\tphysicalPathInvolvementEClass = createEClass(PHYSICAL_PATH_INVOLVEMENT);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__NEXT_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__PREVIOUS_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__INVOLVED_ELEMENT);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__INVOLVED_COMPONENT);\n\n\t\tphysicalPathReferenceEClass = createEClass(PHYSICAL_PATH_REFERENCE);\n\t\tcreateEReference(physicalPathReferenceEClass, PHYSICAL_PATH_REFERENCE__REFERENCED_PHYSICAL_PATH);\n\n\t\tphysicalPathRealizationEClass = createEClass(PHYSICAL_PATH_REALIZATION);\n\n\t\tphysicalPortEClass = createEClass(PHYSICAL_PORT);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__OWNED_COMPONENT_PORT_ALLOCATIONS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__OWNED_PHYSICAL_PORT_REALIZATIONS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__ALLOCATED_COMPONENT_PORTS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__REALIZED_PHYSICAL_PORTS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__REALIZING_PHYSICAL_PORTS);\n\n\t\tphysicalPortRealizationEClass = createEClass(PHYSICAL_PORT_REALIZATION);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tcontrolEClass = createEClass(CONTROL);\n\t\tcreateEReference(controlEClass, CONTROL__MIDI);\n\t\tcreateEAttribute(controlEClass, CONTROL__BACKGROUND);\n\t\tcreateEAttribute(controlEClass, CONTROL__CENTERED);\n\t\tcreateEAttribute(controlEClass, CONTROL__COLOR);\n\t\tcreateEAttribute(controlEClass, CONTROL__H);\n\t\tcreateEAttribute(controlEClass, CONTROL__INVERTED);\n\t\tcreateEAttribute(controlEClass, CONTROL__INVERTED_X);\n\t\tcreateEAttribute(controlEClass, CONTROL__INVERTED_Y);\n\t\tcreateEAttribute(controlEClass, CONTROL__LOCAL_OFF);\n\t\tcreateEAttribute(controlEClass, CONTROL__NAME);\n\t\tcreateEAttribute(controlEClass, CONTROL__NUMBER);\n\t\tcreateEAttribute(controlEClass, CONTROL__NUMBER_X);\n\t\tcreateEAttribute(controlEClass, CONTROL__NUMBER_Y);\n\t\tcreateEAttribute(controlEClass, CONTROL__OSC_CS);\n\t\tcreateEAttribute(controlEClass, CONTROL__OUTLINE);\n\t\tcreateEAttribute(controlEClass, CONTROL__RESPONSE);\n\t\tcreateEAttribute(controlEClass, CONTROL__SCALEF);\n\t\tcreateEAttribute(controlEClass, CONTROL__SCALET);\n\t\tcreateEAttribute(controlEClass, CONTROL__SECONDS);\n\t\tcreateEAttribute(controlEClass, CONTROL__SIZE);\n\t\tcreateEAttribute(controlEClass, CONTROL__TEXT);\n\t\tcreateEAttribute(controlEClass, CONTROL__TYPE);\n\t\tcreateEAttribute(controlEClass, CONTROL__W);\n\t\tcreateEAttribute(controlEClass, CONTROL__X);\n\t\tcreateEAttribute(controlEClass, CONTROL__Y);\n\n\t\tlayoutEClass = createEClass(LAYOUT);\n\t\tcreateEReference(layoutEClass, LAYOUT__TABPAGE);\n\t\tcreateEAttribute(layoutEClass, LAYOUT__MODE);\n\t\tcreateEAttribute(layoutEClass, LAYOUT__ORIENTATION);\n\t\tcreateEAttribute(layoutEClass, LAYOUT__VERSION);\n\n\t\tmidiEClass = createEClass(MIDI);\n\t\tcreateEAttribute(midiEClass, MIDI__CHANNEL);\n\t\tcreateEAttribute(midiEClass, MIDI__DATA1);\n\t\tcreateEAttribute(midiEClass, MIDI__DATA2F);\n\t\tcreateEAttribute(midiEClass, MIDI__DATA2T);\n\t\tcreateEAttribute(midiEClass, MIDI__TYPE);\n\t\tcreateEAttribute(midiEClass, MIDI__VAR);\n\n\t\ttabpageEClass = createEClass(TABPAGE);\n\t\tcreateEReference(tabpageEClass, TABPAGE__CONTROL);\n\t\tcreateEAttribute(tabpageEClass, TABPAGE__NAME);\n\n\t\ttopEClass = createEClass(TOP);\n\t\tcreateEReference(topEClass, TOP__LAYOUT);\n\t}", "For createFor();", "public void createPackageContents() {\r\n\t\tif (isCreated)\r\n\t\t\treturn;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tdataChannelEClass = createEClass(DATA_CHANNEL);\r\n\t\tcreateEAttribute(dataChannelEClass, DATA_CHANNEL__CAPACITY);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__SOURCE_EVENT_GROUP);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__SINK_EVENT_GROUP);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__DATA_CHANNEL_SOURCE_CONNECTOR);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__DATA_CHANNEL_SINK_CONNECTOR);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__PARTITIONING);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__TIME_GROUPING);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__JOINS);\r\n\t\tcreateEAttribute(dataChannelEClass, DATA_CHANNEL__OUTGOING_DISTRIBUTION);\r\n\t\tcreateEAttribute(dataChannelEClass, DATA_CHANNEL__SCHEDULING);\r\n\t\tcreateEAttribute(dataChannelEClass, DATA_CHANNEL__PUT_POLICY);\r\n\t}", "private void prepare()\n {\n AmbulanceToLeft ambulanceToLeft = new AmbulanceToLeft();\n addObject(ambulanceToLeft,717,579);\n Car2ToLeft car2ToLeft = new Car2ToLeft();\n addObject(car2ToLeft,291,579);\n Car3 car3 = new Car3();\n addObject(car3,45,502);\n CarToLeft carToLeft = new CarToLeft();\n addObject(carToLeft,710,262);\n Car car = new Car();\n addObject(car,37,190);\n AmbulanceToLeft ambulanceToLeft2 = new AmbulanceToLeft();\n addObject(ambulanceToLeft2,161,264);\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tannotationEClass = createEClass(ANNOTATION);\n\t\tcreateEReference(annotationEClass, ANNOTATION__IMPLEMENTATIONS);\n\n\t\timplementationEClass = createEClass(IMPLEMENTATION);\n\t\tcreateEAttribute(implementationEClass, IMPLEMENTATION__CODE);\n\t\tcreateEReference(implementationEClass, IMPLEMENTATION__TECHNOLOGY);\n\t\tcreateEReference(implementationEClass, IMPLEMENTATION__LANGUAGE);\n\n\t\tsemanticsEClass = createEClass(SEMANTICS);\n\t\tcreateEReference(semanticsEClass, SEMANTICS__ANNOTATIONS);\n\t\tcreateEReference(semanticsEClass, SEMANTICS__LANGUAGES);\n\t\tcreateEReference(semanticsEClass, SEMANTICS__TECHNOLOGIES);\n\n\t\ttargetLanguageEClass = createEClass(TARGET_LANGUAGE);\n\n\t\ttechnologyEClass = createEClass(TECHNOLOGY);\n\n\t\tnamedElementEClass = createEClass(NAMED_ELEMENT);\n\t\tcreateEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\n\t}", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n ledsCodeDSLEClass = createEClass(LEDS_CODE_DSL);\n createEReference(ledsCodeDSLEClass, LEDS_CODE_DSL__PROJECT);\n\n projectEClass = createEClass(PROJECT);\n createEAttribute(projectEClass, PROJECT__NAME);\n createEReference(projectEClass, PROJECT__INFRASTRUCTURE_BLOCK);\n createEReference(projectEClass, PROJECT__INTERFACE_BLOCK);\n createEReference(projectEClass, PROJECT__APPLICATION_BLOCK);\n createEReference(projectEClass, PROJECT__DOMAIN_BLOCK);\n\n interfaceBlockEClass = createEClass(INTERFACE_BLOCK);\n createEAttribute(interfaceBlockEClass, INTERFACE_BLOCK__NAME);\n createEReference(interfaceBlockEClass, INTERFACE_BLOCK__INTERFACE_APPLICATION);\n\n interfaceApplicationEClass = createEClass(INTERFACE_APPLICATION);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__TYPE);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME_APP);\n\n infrastructureBlockEClass = createEClass(INFRASTRUCTURE_BLOCK);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__BASE_PACKAGE);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__PROJECT_VERSION);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__LANGUAGE);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__FRAMEWORK);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__ORM);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__DATABASE);\n\n databaseEClass = createEClass(DATABASE);\n createEAttribute(databaseEClass, DATABASE__VERSION_VALUE);\n createEAttribute(databaseEClass, DATABASE__NAME_VALUE);\n createEAttribute(databaseEClass, DATABASE__USER_VALUE);\n createEAttribute(databaseEClass, DATABASE__PASS_VALUE);\n createEAttribute(databaseEClass, DATABASE__HOST_VALUE);\n createEAttribute(databaseEClass, DATABASE__ENV_VALUE);\n\n nameVersionEClass = createEClass(NAME_VERSION);\n createEAttribute(nameVersionEClass, NAME_VERSION__NAME_VALUE);\n createEAttribute(nameVersionEClass, NAME_VERSION__VERSION_VALUE);\n\n applicationBlockEClass = createEClass(APPLICATION_BLOCK);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__NAME);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__APPLICATION_DOMAIN);\n\n domainBlockEClass = createEClass(DOMAIN_BLOCK);\n createEAttribute(domainBlockEClass, DOMAIN_BLOCK__NAME);\n createEReference(domainBlockEClass, DOMAIN_BLOCK__MODULE);\n\n moduleBlockEClass = createEClass(MODULE_BLOCK);\n createEAttribute(moduleBlockEClass, MODULE_BLOCK__NAME);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENUM_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENTITY_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__SERVICE_BLOCK);\n\n serviceBlockEClass = createEClass(SERVICE_BLOCK);\n createEAttribute(serviceBlockEClass, SERVICE_BLOCK__NAME);\n createEReference(serviceBlockEClass, SERVICE_BLOCK__SERVICE_FIELDS);\n\n serviceMethodEClass = createEClass(SERVICE_METHOD);\n createEAttribute(serviceMethodEClass, SERVICE_METHOD__NAME);\n createEReference(serviceMethodEClass, SERVICE_METHOD__METHOD_ACESS);\n\n entityBlockEClass = createEClass(ENTITY_BLOCK);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__ACESS_MODIFIER);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__IS_ABSTRACT);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__NAME);\n createEReference(entityBlockEClass, ENTITY_BLOCK__CLASS_EXTENDS);\n createEReference(entityBlockEClass, ENTITY_BLOCK__ATTRIBUTES);\n createEReference(entityBlockEClass, ENTITY_BLOCK__REPOSITORY);\n\n attributeEClass = createEClass(ATTRIBUTE);\n createEAttribute(attributeEClass, ATTRIBUTE__ACESS_MODIFIER);\n createEAttribute(attributeEClass, ATTRIBUTE__TYPE);\n createEAttribute(attributeEClass, ATTRIBUTE__NAME);\n createEAttribute(attributeEClass, ATTRIBUTE__PK);\n createEAttribute(attributeEClass, ATTRIBUTE__UNIQUE);\n createEAttribute(attributeEClass, ATTRIBUTE__NULLABLE);\n createEAttribute(attributeEClass, ATTRIBUTE__MIN);\n createEAttribute(attributeEClass, ATTRIBUTE__MAX);\n\n repositoryEClass = createEClass(REPOSITORY);\n createEAttribute(repositoryEClass, REPOSITORY__NAME);\n createEReference(repositoryEClass, REPOSITORY__METHODS);\n\n repositoryFieldsEClass = createEClass(REPOSITORY_FIELDS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__NAME);\n createEReference(repositoryFieldsEClass, REPOSITORY_FIELDS__METHODS_PARAMETERS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__RETURN_TYPE);\n\n enumBlockEClass = createEClass(ENUM_BLOCK);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__NAME);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__VALUES);\n\n methodParameterEClass = createEClass(METHOD_PARAMETER);\n createEReference(methodParameterEClass, METHOD_PARAMETER__TYPE_AND_ATTR);\n\n typeAndAttributeEClass = createEClass(TYPE_AND_ATTRIBUTE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__TYPE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__NAME);\n\n extendBlockEClass = createEClass(EXTEND_BLOCK);\n createEReference(extendBlockEClass, EXTEND_BLOCK__VALUES);\n }", "public Commande_structureSerializationTest(){\n }", "public Hashtable createStructure(Context context, String[] args) throws Exception\n\t{\n\t\tHashMap argumentsMap = (HashMap) JPO.unpackArgs(args);\n\t\t\n\t\tMCADGlobalConfigObject inputGCO = (MCADGlobalConfigObject) argumentsMap.get(\"GCO\");\n\t\tMCADLocalConfigObject inputLCO = (MCADLocalConfigObject) argumentsMap.get(\"LCO\");\n\n String languageName\t\t\t= (String) argumentsMap.get(\"language\");\n String partID\t\t\t\t= (String) argumentsMap.get(\"partID\");\n\t\tString integrationName\t\t= (String) argumentsMap.get(\"integrationName\");\n\t\tString assemblyTemplateID\t= (String) argumentsMap.get(\"assemblyTemplateID\");\n\t\tString componentTemplateID\t= (String) argumentsMap.get(\"componentTemplateID\");\n\t\tString folderId\t\t\t\t= (String) argumentsMap.get(\"folderId\");\n\t\tthis.source = integrationName;\t\t\n\n\t\ttry\n\t\t{\n\t\t\tinitialize(context, inputGCO, inputLCO, languageName);\n\n\t\t\tassemblyTemplateObject\t= new BusinessObject(assemblyTemplateID);\n\t\t\tcomponentTemplateObject\t= new BusinessObject(componentTemplateID);\n\n\t\t\tassemblyTemplateObject.open(context);\n\t\t\tcomponentTemplateObject.open(context);\n\n\t\t\tboolean isStructureCreated = traversePartStructure(context, partID, null, null, args,folderId);\n\n\t\t\tassemblyTemplateObject.close(context);\n\t\t\tcomponentTemplateObject.close(context);\n\n\t\t\tif(isStructureCreated)\n\t\t\t\tdesignObjIDTemplateObjIDMap.put(\"OPERATION_STATUS\", \"true\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tdesignObjIDTemplateObjIDMap.put(\"OPERATION_STATUS\", \"false\");\n\t\t\t\tdesignObjIDTemplateObjIDMap.put(\"ERROR_MESSAGE\", resourceBundle.getString(\"mcadIntegration.Server.Message.CADStructureAlreadyCreated\"));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tString errorMessage = e.getMessage();\n\t\t\tdesignObjIDTemplateObjIDMap.put(\"OPERATION_STATUS\", \"false\");\n\t\t\tdesignObjIDTemplateObjIDMap.put(\"ERROR_MESSAGE\", errorMessage);\n\t\t}\n\n\t\treturn designObjIDTemplateObjIDMap;\n\t}", "private void prepare()\n {\n Victoria victoria = new Victoria();\n addObject(victoria,190,146);\n Salir salir = new Salir();\n addObject(salir,200,533);\n Volver volver = new Volver();\n addObject(volver,198,401);\n }", "public void createPackageContents()\r\n {\r\n if (isCreated) return;\r\n isCreated = true;\r\n\r\n // Create classes and their features\r\n productEClass = createEClass(PRODUCT);\r\n createEAttribute(productEClass, PRODUCT__PRICE);\r\n createEAttribute(productEClass, PRODUCT__NAME);\r\n createEAttribute(productEClass, PRODUCT__ID);\r\n createEReference(productEClass, PRODUCT__PRODUCER);\r\n createEReference(productEClass, PRODUCT__WISHLISTS);\r\n createEReference(productEClass, PRODUCT__OFFERED_BY);\r\n\r\n customerEClass = createEClass(CUSTOMER);\r\n createEReference(customerEClass, CUSTOMER__ALL_BOUGHT_PRODUCTS);\r\n createEAttribute(customerEClass, CUSTOMER__NAME);\r\n createEAttribute(customerEClass, CUSTOMER__AGE);\r\n createEAttribute(customerEClass, CUSTOMER__ID);\r\n createEReference(customerEClass, CUSTOMER__WISHLISTS);\r\n createEAttribute(customerEClass, CUSTOMER__USERNAME);\r\n\r\n producerEClass = createEClass(PRODUCER);\r\n createEAttribute(producerEClass, PRODUCER__ID);\r\n createEAttribute(producerEClass, PRODUCER__NAME);\r\n createEReference(producerEClass, PRODUCER__PRODUCTS);\r\n\r\n storeEClass = createEClass(STORE);\r\n createEReference(storeEClass, STORE__CUSTOMERS);\r\n createEReference(storeEClass, STORE__PRODUCTS);\r\n createEReference(storeEClass, STORE__PRODUCERS);\r\n createEReference(storeEClass, STORE__SELLERS);\r\n\r\n bookEClass = createEClass(BOOK);\r\n createEAttribute(bookEClass, BOOK__AUTHOR);\r\n\r\n dvdEClass = createEClass(DVD);\r\n createEAttribute(dvdEClass, DVD__INTERPRET);\r\n\r\n wishlistEClass = createEClass(WISHLIST);\r\n createEReference(wishlistEClass, WISHLIST__PRODUCTS);\r\n\r\n sellerEClass = createEClass(SELLER);\r\n createEAttribute(sellerEClass, SELLER__NAME);\r\n createEAttribute(sellerEClass, SELLER__ID);\r\n createEAttribute(sellerEClass, SELLER__USERNAME);\r\n createEReference(sellerEClass, SELLER__ALL_PRODUCTS_TO_SELL);\r\n createEReference(sellerEClass, SELLER__EREFERENCE0);\r\n createEReference(sellerEClass, SELLER__SOLD_PRODUCTS);\r\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\taudioEClass = createEClass(AUDIO);\n\t\tcreateEAttribute(audioEClass, AUDIO__CONTENT);\n\t\tcreateEAttribute(audioEClass, AUDIO__NAME);\n\t\tcreateEAttribute(audioEClass, AUDIO__TEXT);\n\n\t\taudioManagerEClass = createEClass(AUDIO_MANAGER);\n\n\t\taudioRecorderEClass = createEClass(AUDIO_RECORDER);\n\n\t\taudioPlayerEClass = createEClass(AUDIO_PLAYER);\n\n\t\t// Create enums\n\t\taudioStyleEEnum = createEEnum(AUDIO_STYLE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinstructionEClass = createEClass(INSTRUCTION);\n\n\t\tnamedElementEClass = createEClass(NAMED_ELEMENT);\n\t\tcreateEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\n\n\t\tgoForwardEClass = createEClass(GO_FORWARD);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__CM);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__INFINITE);\n\n\t\tgoBackwardEClass = createEClass(GO_BACKWARD);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__CM);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__INFINITE);\n\n\t\tbeginEClass = createEClass(BEGIN);\n\n\t\trotateEClass = createEClass(ROTATE);\n\t\tcreateEAttribute(rotateEClass, ROTATE__DEGREES);\n\t\tcreateEAttribute(rotateEClass, ROTATE__RANDOM);\n\n\t\treleaseEClass = createEClass(RELEASE);\n\n\t\tactionEClass = createEClass(ACTION);\n\n\t\tblockEClass = createEClass(BLOCK);\n\n\t\tendEClass = createEClass(END);\n\n\t\tchoreographyEClass = createEClass(CHOREOGRAPHY);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__INSTRUCTIONS);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__EDGE_INSTRUCTIONS);\n\n\t\tedgeInstructionEClass = createEClass(EDGE_INSTRUCTION);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__SOURCE);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__TARGET);\n\n\t\tgrabEClass = createEClass(GRAB);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tmetadataEClass = createEClass(METADATA);\n\t\tcreateEAttribute(metadataEClass, METADATA__GAMENAME);\n\t\tcreateEAttribute(metadataEClass, METADATA__SHORTNAME);\n\t\tcreateEAttribute(metadataEClass, METADATA__TIMING);\n\t\tcreateEAttribute(metadataEClass, METADATA__ADRESSING);\n\t\tcreateEAttribute(metadataEClass, METADATA__CARTRIDGE_TYPE);\n\t\tcreateEAttribute(metadataEClass, METADATA__ROM_SIZE);\n\t\tcreateEAttribute(metadataEClass, METADATA__RAM_SIZE);\n\t\tcreateEAttribute(metadataEClass, METADATA__LICENSEE);\n\t\tcreateEAttribute(metadataEClass, METADATA__COUNTRY);\n\t\tcreateEAttribute(metadataEClass, METADATA__VIDEOFORMAT);\n\t\tcreateEAttribute(metadataEClass, METADATA__VERSION);\n\t\tcreateEAttribute(metadataEClass, METADATA__IDE_VERSION);\n\t}", "public void createPackageContents() {\n if(isCreated) {\n return;\n }\n isCreated = true;\n\n // Create classes and their features\n namedElementEClass = createEClass(NAMED_ELEMENT);\n createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\n\n modularizationModelEClass = createEClass(MODULARIZATION_MODEL);\n createEReference(modularizationModelEClass, MODULARIZATION_MODEL__MODULES);\n createEReference(modularizationModelEClass, MODULARIZATION_MODEL__CLASSES);\n\n moduleEClass = createEClass(MODULE);\n createEReference(moduleEClass, MODULE__CLASSES);\n\n classEClass = createEClass(CLASS);\n createEReference(classEClass, CLASS__MODULE);\n createEReference(classEClass, CLASS__DEPENDS_ON);\n createEReference(classEClass, CLASS__DEPENDED_ON_BY);\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tcmdEClass = createEClass(CMD);\n\t\tcreateEAttribute(cmdEClass, CMD__PRIORITY);\n\t\tcreateEAttribute(cmdEClass, CMD__STAMP);\n\n\t\tcompoundCmdEClass = createEClass(COMPOUND_CMD);\n\t\tcreateEReference(compoundCmdEClass, COMPOUND_CMD__CHILDREN);\n\n\t\txCmdEClass = createEClass(XCMD);\n\t\tcreateEAttribute(xCmdEClass, XCMD__OBJ);\n\n\t\tbyteCmdEClass = createEClass(BYTE_CMD);\n\t\tcreateEAttribute(byteCmdEClass, BYTE_CMD__MESSAGE);\n\n\t\t// Create enums\n\t\tpriorityEEnum = createEEnum(PRIORITY);\n\t}", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public abstract void create();", "public void createPackageContents() {\r\n\t\tif (isCreated) return;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tgemmaEClass = createEClass(GEMMA);\r\n\t\tcreateEReference(gemmaEClass, GEMMA__MACRO_OMS);\r\n\t\tcreateEReference(gemmaEClass, GEMMA__TRANSICIONES);\r\n\t\tcreateEReference(gemmaEClass, GEMMA__VARIABLES_GEMMA);\r\n\r\n\t\tmacroOmEClass = createEClass(MACRO_OM);\r\n\t\tcreateEAttribute(macroOmEClass, MACRO_OM__NAME);\r\n\t\tcreateEAttribute(macroOmEClass, MACRO_OM__TIPO);\r\n\t\tcreateEReference(macroOmEClass, MACRO_OM__OMS);\r\n\r\n\t\tomEClass = createEClass(OM);\r\n\t\tcreateEAttribute(omEClass, OM__NAME);\r\n\t\tcreateEAttribute(omEClass, OM__TIPO);\r\n\t\tcreateEAttribute(omEClass, OM__ES_OM_RAIZ);\r\n\t\tcreateEReference(omEClass, OM__VARIABLES_OM);\r\n\t\tcreateEAttribute(omEClass, OM__ES_VISIBLE);\r\n\r\n\t\ttrasicionEntreOmOmEClass = createEClass(TRASICION_ENTRE_OM_OM);\r\n\t\tcreateEReference(trasicionEntreOmOmEClass, TRASICION_ENTRE_OM_OM__ORIGEN);\r\n\t\tcreateEReference(trasicionEntreOmOmEClass, TRASICION_ENTRE_OM_OM__DESTINO);\r\n\r\n\t\ttransicionEntreMacroOmOmEClass = createEClass(TRANSICION_ENTRE_MACRO_OM_OM);\r\n\t\tcreateEReference(transicionEntreMacroOmOmEClass, TRANSICION_ENTRE_MACRO_OM_OM__ORIGEN);\r\n\t\tcreateEReference(transicionEntreMacroOmOmEClass, TRANSICION_ENTRE_MACRO_OM_OM__DESTINO);\r\n\r\n\t\texpresionBinariaEClass = createEClass(EXPRESION_BINARIA);\r\n\t\tcreateEReference(expresionBinariaEClass, EXPRESION_BINARIA__EXPRESION_IZQUIERDA);\r\n\t\tcreateEReference(expresionBinariaEClass, EXPRESION_BINARIA__EXPRESION_DERECHA);\r\n\t\tcreateEAttribute(expresionBinariaEClass, EXPRESION_BINARIA__OPERADOR);\r\n\r\n\t\telementoExpresionEClass = createEClass(ELEMENTO_EXPRESION);\r\n\r\n\t\tvariableOmEClass = createEClass(VARIABLE_OM);\r\n\t\tcreateEAttribute(variableOmEClass, VARIABLE_OM__NAME);\r\n\r\n\t\ttransicionEClass = createEClass(TRANSICION);\r\n\t\tcreateEAttribute(transicionEClass, TRANSICION__NAME);\r\n\t\tcreateEReference(transicionEClass, TRANSICION__ELEMENTO_EXPRESION);\r\n\r\n\t\tvariableGemmaEClass = createEClass(VARIABLE_GEMMA);\r\n\t\tcreateEAttribute(variableGemmaEClass, VARIABLE_GEMMA__NAME);\r\n\r\n\t\trefVariableGemmaEClass = createEClass(REF_VARIABLE_GEMMA);\r\n\t\tcreateEReference(refVariableGemmaEClass, REF_VARIABLE_GEMMA__VARIABLE_GEMMA);\r\n\t\tcreateEAttribute(refVariableGemmaEClass, REF_VARIABLE_GEMMA__NIVEL_DE_ESCRITURA);\r\n\r\n\t\texpresionNotEClass = createEClass(EXPRESION_NOT);\r\n\t\tcreateEReference(expresionNotEClass, EXPRESION_NOT__ELEMENTO_EXPRESION);\r\n\r\n\t\trefVariableOmEClass = createEClass(REF_VARIABLE_OM);\r\n\t\tcreateEReference(refVariableOmEClass, REF_VARIABLE_OM__VARIABLE_OM);\r\n\r\n\t\texpresionConjuntaEClass = createEClass(EXPRESION_CONJUNTA);\r\n\t\tcreateEReference(expresionConjuntaEClass, EXPRESION_CONJUNTA__ELEMENTO_EXPRESION);\r\n\r\n\t\t// Create enums\r\n\t\ttipoOmEEnum = createEEnum(TIPO_OM);\r\n\t\ttipoMacroOmEEnum = createEEnum(TIPO_MACRO_OM);\r\n\t\ttipoOperadorEEnum = createEEnum(TIPO_OPERADOR);\r\n\t\tnivelDeEscrituraEEnum = createEEnum(NIVEL_DE_ESCRITURA);\r\n\t}", "BElementStructure createBElementStructure();", "private void instantiate(){\n inputAddressList = new LinkedList<Address>();\n inputGroupList = new LinkedList<Group>();\n root = new Group(\"root\", 0);\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tblockEClass = createEClass(BLOCK);\n\t\tcreateEReference(blockEClass, BLOCK__STMTS);\n\n\t\tstmtEClass = createEClass(STMT);\n\n\t\tarithEClass = createEClass(ARITH);\n\n\t\talVarRefEClass = createEClass(AL_VAR_REF);\n\t\tcreateEAttribute(alVarRefEClass, AL_VAR_REF__NAME);\n\n\t\tarithLitEClass = createEClass(ARITH_LIT);\n\t\tcreateEAttribute(arithLitEClass, ARITH_LIT__VAL);\n\n\t\tarithOpEClass = createEClass(ARITH_OP);\n\t\tcreateEReference(arithOpEClass, ARITH_OP__LHS);\n\t\tcreateEReference(arithOpEClass, ARITH_OP__RHS);\n\n\t\tarithPlusEClass = createEClass(ARITH_PLUS);\n\n\t\tarithMinusEClass = createEClass(ARITH_MINUS);\n\n\t\tprintEClass = createEClass(PRINT);\n\t\tcreateEAttribute(printEClass, PRINT__NAME);\n\n\t\tassignEClass = createEClass(ASSIGN);\n\t\tcreateEAttribute(assignEClass, ASSIGN__NAME);\n\t\tcreateEReference(assignEClass, ASSIGN__VAL);\n\n\t\tifStmtEClass = createEClass(IF_STMT);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__IF_BRANCH);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__ELSE_BRANCH);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__TEST);\n\n\t\trandRangeEClass = createEClass(RAND_RANGE);\n\t\tcreateEAttribute(randRangeEClass, RAND_RANGE__MIN);\n\t\tcreateEAttribute(randRangeEClass, RAND_RANGE__MAX);\n\n\t\tequalityTestEClass = createEClass(EQUALITY_TEST);\n\t\tcreateEReference(equalityTestEClass, EQUALITY_TEST__LHS);\n\t\tcreateEReference(equalityTestEClass, EQUALITY_TEST__RHS);\n\t}", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"[email protected]\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}", "public DesignADataStructure() {\n arr = new ArrayList<>();\n map = new HashMap<>();\n }", "Compleja createCompleja();", "public void createPackageContents() {\r\n if (isCreated) return;\r\n isCreated = true;\r\n\r\n // Create classes and their features\r\n kShapeLayoutEClass = createEClass(KSHAPE_LAYOUT);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__XPOS);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__YPOS);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__WIDTH);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__HEIGHT);\r\n createEReference(kShapeLayoutEClass, KSHAPE_LAYOUT__INSETS);\r\n\r\n kEdgeLayoutEClass = createEClass(KEDGE_LAYOUT);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__BEND_POINTS);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__SOURCE_POINT);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__TARGET_POINT);\r\n\r\n kLayoutDataEClass = createEClass(KLAYOUT_DATA);\r\n\r\n kPointEClass = createEClass(KPOINT);\r\n createEAttribute(kPointEClass, KPOINT__X);\r\n createEAttribute(kPointEClass, KPOINT__Y);\r\n\r\n kInsetsEClass = createEClass(KINSETS);\r\n createEAttribute(kInsetsEClass, KINSETS__TOP);\r\n createEAttribute(kInsetsEClass, KINSETS__BOTTOM);\r\n createEAttribute(kInsetsEClass, KINSETS__LEFT);\r\n createEAttribute(kInsetsEClass, KINSETS__RIGHT);\r\n\r\n kIdentifierEClass = createEClass(KIDENTIFIER);\r\n createEAttribute(kIdentifierEClass, KIDENTIFIER__ID);\r\n\r\n kVectorEClass = createEClass(KVECTOR);\r\n createEAttribute(kVectorEClass, KVECTOR__X);\r\n createEAttribute(kVectorEClass, KVECTOR__Y);\r\n\r\n kVectorChainEClass = createEClass(KVECTOR_CHAIN);\r\n }", "public void createPackageContents() {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n calcEClass = createEClass(CALC);\n createEReference(calcEClass, CALC__EXPR);\n\n exprEClass = createEClass(EXPR);\n\n bitShiftExprEClass = createEClass(BIT_SHIFT_EXPR);\n createEReference(bitShiftExprEClass, BIT_SHIFT_EXPR__CHILDREN);\n createEAttribute(bitShiftExprEClass, BIT_SHIFT_EXPR__OPERATORS);\n\n bitShiftExprChildEClass = createEClass(BIT_SHIFT_EXPR_CHILD);\n\n additiveExprEClass = createEClass(ADDITIVE_EXPR);\n createEReference(additiveExprEClass, ADDITIVE_EXPR__CHILDREN);\n createEAttribute(additiveExprEClass, ADDITIVE_EXPR__OPERATORS);\n\n additiveExprChildEClass = createEClass(ADDITIVE_EXPR_CHILD);\n\n multiplicativeExprEClass = createEClass(MULTIPLICATIVE_EXPR);\n createEReference(multiplicativeExprEClass, MULTIPLICATIVE_EXPR__CHILDREN);\n createEAttribute(multiplicativeExprEClass, MULTIPLICATIVE_EXPR__OPERATORS);\n\n multiplicativeExprChildEClass = createEClass(MULTIPLICATIVE_EXPR_CHILD);\n\n numberEClass = createEClass(NUMBER);\n createEAttribute(numberEClass, NUMBER__VALUE);\n\n // Create enums\n bitShiftOpEEnum = createEEnum(BIT_SHIFT_OP);\n additiveOpEEnum = createEEnum(ADDITIVE_OP);\n multiplicativeOpEEnum = createEEnum(MULTIPLICATIVE_OP);\n }", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__ELEMENTS);\n\n elementEClass = createEClass(ELEMENT);\n createEReference(elementEClass, ELEMENT__STATE);\n createEReference(elementEClass, ELEMENT__TRANSITION);\n\n stateEClass = createEClass(STATE);\n createEAttribute(stateEClass, STATE__NAME);\n createEReference(stateEClass, STATE__STATES_PROPERTIES);\n\n statesPropertiesEClass = createEClass(STATES_PROPERTIES);\n createEAttribute(statesPropertiesEClass, STATES_PROPERTIES__COLOR);\n createEAttribute(statesPropertiesEClass, STATES_PROPERTIES__THICKNESS);\n createEAttribute(statesPropertiesEClass, STATES_PROPERTIES__POSITION);\n\n transitionEClass = createEClass(TRANSITION);\n createEReference(transitionEClass, TRANSITION__START);\n createEReference(transitionEClass, TRANSITION__END);\n createEReference(transitionEClass, TRANSITION__TRANSITION_PROPERTIES);\n createEReference(transitionEClass, TRANSITION__LABEL);\n createEAttribute(transitionEClass, TRANSITION__INIT);\n\n labelEClass = createEClass(LABEL);\n createEAttribute(labelEClass, LABEL__TEXT);\n createEAttribute(labelEClass, LABEL__POSITION);\n\n coordinatesStatesTransitionEClass = createEClass(COORDINATES_STATES_TRANSITION);\n createEAttribute(coordinatesStatesTransitionEClass, COORDINATES_STATES_TRANSITION__STATE_TRANSITION);\n\n transitionPropertiesEClass = createEClass(TRANSITION_PROPERTIES);\n createEAttribute(transitionPropertiesEClass, TRANSITION_PROPERTIES__COLOR);\n createEAttribute(transitionPropertiesEClass, TRANSITION_PROPERTIES__THICKNESS);\n createEAttribute(transitionPropertiesEClass, TRANSITION_PROPERTIES__CURVE);\n }", "public void recreateStructures(int p_82695_1_, int p_82695_2_)\n\t{\n\t}", "public void initForAddNew() {\r\n\r\n\t}", "void create(Section section);", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tsutEClass = createEClass(SUT);\n\t\tcreateEAttribute(sutEClass, SUT__HOSTNAME);\n\t\tcreateEAttribute(sutEClass, SUT__IP);\n\t\tcreateEAttribute(sutEClass, SUT__HARDWARE);\n\t\tcreateEReference(sutEClass, SUT__SUT);\n\t\tcreateEReference(sutEClass, SUT__METRICMODEL);\n\t\tcreateEAttribute(sutEClass, SUT__TYPE);\n\n\t\tloadGeneratorEClass = createEClass(LOAD_GENERATOR);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__HOSTNAME);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__IP);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__IS_MONITOR);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__SUT);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__METRICMODEL);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__HARDWARE);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__MONITOR);\n\n\t\tmonitorEClass = createEClass(MONITOR);\n\t\tcreateEAttribute(monitorEClass, MONITOR__HOSTNAME);\n\t\tcreateEAttribute(monitorEClass, MONITOR__IP);\n\t\tcreateEReference(monitorEClass, MONITOR__SUT);\n\t\tcreateEAttribute(monitorEClass, MONITOR__HARDWARE);\n\t\tcreateEAttribute(monitorEClass, MONITOR__DESCRIPTION);\n\n\t\tmetricModelEClass = createEClass(METRIC_MODEL);\n\t\tcreateEAttribute(metricModelEClass, METRIC_MODEL__NAME);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__MEMORY);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__TRANSACTION);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__DISK);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__CRITERIA);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__THRESHOLD);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__ASSOCIATIONCOUNTERCRITERIATHRESHOLD);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__DISK_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__TRANSACTION_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__MEMORY_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__METRIC);\n\n\t\t// Create enums\n\t\tsuT_TYPEEEnum = createEEnum(SUT_TYPE);\n\t\thardwareEEnum = createEEnum(HARDWARE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tliveScoreEClass = createEClass(LIVE_SCORE);\n\t\tcreateEReference(liveScoreEClass, LIVE_SCORE__PREFEREDPLAYER);\n\t\tcreateEAttribute(liveScoreEClass, LIVE_SCORE__SALONNAME);\n\n\t\tpreferedPlayerEClass = createEClass(PREFERED_PLAYER);\n\t\tcreateEAttribute(preferedPlayerEClass, PREFERED_PLAYER__NAME);\n\t\tcreateEAttribute(preferedPlayerEClass, PREFERED_PLAYER__WON);\n\t\tcreateEAttribute(preferedPlayerEClass, PREFERED_PLAYER__PLAYINGS);\n\t}", "private void newGroup()\n\t{\n\t\t// There is no need anymore to take care of the meta-data.\n\t\t// That is done once in DenormaliserMeta.getFields()\n\t\t//\n data.targetResult = new Object[meta.getDenormaliserTargetFields().length];\n \n for (int i=0;i<meta.getDenormaliserTargetFields().length;i++)\n {\n data.targetResult[i] = null;\n\n data.counters[i]=0L; // set to 0\n data.sum[i]=null;\n }\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\theuristicStrategyEClass = createEClass(HEURISTIC_STRATEGY);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__GRAPHIC_REPRESENTATION);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__NEMF);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__ECORE_CONTAINMENT);\n\t\tcreateEAttribute(heuristicStrategyEClass, HEURISTIC_STRATEGY__CURRENT_REPRESENTATION);\n\t\tcreateEAttribute(heuristicStrategyEClass, HEURISTIC_STRATEGY__CURRENT_MMGR);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__LIST_REPRESENTATION);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_HEURISTICS);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_ROOT_ELEMENT);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_GRAPHICAL_ELEMENTS);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___GET_FEATURE_NAME__ECLASS_ECLASS);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___GET_ELIST_ECLASSFROM_EREFERENCE__EREFERENCE);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_DIRECT_PATH_MATRIX);\n\n\t\tconcreteStrategyLinkEClass = createEClass(CONCRETE_STRATEGY_LINK);\n\n\t\tstrategyLabelEClass = createEClass(STRATEGY_LABEL);\n\t\tcreateEOperation(strategyLabelEClass, STRATEGY_LABEL___GET_LABEL__ECLASS);\n\n\t\tconcreteStrategyLabelFirstStringEClass = createEClass(CONCRETE_STRATEGY_LABEL_FIRST_STRING);\n\n\t\tconcreteStrategyLabelIdentifierEClass = createEClass(CONCRETE_STRATEGY_LABEL_IDENTIFIER);\n\n\t\tconcreteStrategyLabelParameterEClass = createEClass(CONCRETE_STRATEGY_LABEL_PARAMETER);\n\t\tcreateEReference(concreteStrategyLabelParameterEClass, CONCRETE_STRATEGY_LABEL_PARAMETER__LABEL_PARAMETER);\n\n\t\tlabelParameterEClass = createEClass(LABEL_PARAMETER);\n\t\tcreateEAttribute(labelParameterEClass, LABEL_PARAMETER__LIST_LABEL);\n\t\tcreateEOperation(labelParameterEClass, LABEL_PARAMETER___TO_COMMA_SEPARATED_STRING_LABEL);\n\t\tcreateEOperation(labelParameterEClass, LABEL_PARAMETER___DEFAULT_PARAMETERS);\n\n\t\tstrategyRootSelectionEClass = createEClass(STRATEGY_ROOT_SELECTION);\n\t\tcreateEOperation(strategyRootSelectionEClass, STRATEGY_ROOT_SELECTION___GET_ROOT__ELIST_ELIST);\n\t\tcreateEOperation(strategyRootSelectionEClass, STRATEGY_ROOT_SELECTION___LIST_ROOT__ELIST_ELIST);\n\n\t\tconcreteStrategyMaxContainmentEClass = createEClass(CONCRETE_STRATEGY_MAX_CONTAINMENT);\n\n\t\tconcreteStrategyNoParentEClass = createEClass(CONCRETE_STRATEGY_NO_PARENT);\n\n\t\tstrategyPaletteEClass = createEClass(STRATEGY_PALETTE);\n\t\tcreateEOperation(strategyPaletteEClass, STRATEGY_PALETTE___GET_PALETTE__EOBJECT);\n\n\t\tconcreteStrategyPaletteEClass = createEClass(CONCRETE_STRATEGY_PALETTE);\n\n\t\tstrategyArcSelectionEClass = createEClass(STRATEGY_ARC_SELECTION);\n\t\tcreateEReference(strategyArcSelectionEClass, STRATEGY_ARC_SELECTION__ARC_DIRECTION);\n\t\tcreateEOperation(strategyArcSelectionEClass, STRATEGY_ARC_SELECTION___IS_ARC__ECLASS);\n\n\t\tconcreteStrategyArcSelectionEClass = createEClass(CONCRETE_STRATEGY_ARC_SELECTION);\n\n\t\tstrategyArcDirectionEClass = createEClass(STRATEGY_ARC_DIRECTION);\n\t\tcreateEOperation(strategyArcDirectionEClass, STRATEGY_ARC_DIRECTION___GET_DIRECTION__ECLASS);\n\n\t\tarcParameterEClass = createEClass(ARC_PARAMETER);\n\t\tcreateEAttribute(arcParameterEClass, ARC_PARAMETER__SOURCE);\n\t\tcreateEAttribute(arcParameterEClass, ARC_PARAMETER__TARGET);\n\t\tcreateEOperation(arcParameterEClass, ARC_PARAMETER___DEFAULT_PARAM);\n\n\t\tdefaultArcParameterEClass = createEClass(DEFAULT_ARC_PARAMETER);\n\t\tcreateEOperation(defaultArcParameterEClass, DEFAULT_ARC_PARAMETER___TO_COMMA_SEPARATED_STRING_SOURCE);\n\t\tcreateEOperation(defaultArcParameterEClass, DEFAULT_ARC_PARAMETER___TO_COMMA_SEPARATED_STRING_TARGET);\n\n\t\tconcreteStrategyArcDirectionEClass = createEClass(CONCRETE_STRATEGY_ARC_DIRECTION);\n\t\tcreateEReference(concreteStrategyArcDirectionEClass, CONCRETE_STRATEGY_ARC_DIRECTION__PARAM);\n\t\tcreateEOperation(concreteStrategyArcDirectionEClass, CONCRETE_STRATEGY_ARC_DIRECTION___CONTAINS_STRING_EREFERENCE_NAME__ELIST_STRING);\n\n\t\tconcreteStrategyDefaultDirectionEClass = createEClass(CONCRETE_STRATEGY_DEFAULT_DIRECTION);\n\n\t\tstrategyNodeSelectionEClass = createEClass(STRATEGY_NODE_SELECTION);\n\t\tcreateEOperation(strategyNodeSelectionEClass, STRATEGY_NODE_SELECTION___IS_NODE__ECLASS);\n\n\t\tconcreteStrategyDefaultNodeSelectionEClass = createEClass(CONCRETE_STRATEGY_DEFAULT_NODE_SELECTION);\n\n\t\tstrategyPossibleElementsEClass = createEClass(STRATEGY_POSSIBLE_ELEMENTS);\n\t\tcreateEReference(strategyPossibleElementsEClass, STRATEGY_POSSIBLE_ELEMENTS__ECLASS_NO_ELEMENTS);\n\t\tcreateEOperation(strategyPossibleElementsEClass, STRATEGY_POSSIBLE_ELEMENTS___POSSIBLE_ELEMENTS__ECLASS_ELIST_ELIST);\n\n\t\tconcreteStrategyContainmentDiagramElementEClass = createEClass(CONCRETE_STRATEGY_CONTAINMENT_DIAGRAM_ELEMENT);\n\n\t\tecoreMatrixContainmentEClass = createEClass(ECORE_MATRIX_CONTAINMENT);\n\t\tcreateEAttribute(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT__DIRECT_MATRIX_CONTAINMENT);\n\t\tcreateEAttribute(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT__PATH_MATRIX);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_PARENT__INTEGER);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_DIRECT_MATRIX_CONTAINMENT__ELIST);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_PATH_MATRIX);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___COPY_MATRIX);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___PRINT_DIRECT_MATRIX_CONTAINMENT__ELIST);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_EALL_CHILDS__ECLASS_ELIST);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_ALL_PARENTS__INTEGER);\n\n\t\theuristicStrategySettingsEClass = createEClass(HEURISTIC_STRATEGY_SETTINGS);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_LABEL);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_ROOT);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_PALETTE);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_ARC_SELECTION);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_NODE_SELECTION);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_POSSIBLE_ELEMENTS);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_LINKCOMPARTMENT);\n\n\t\tstrategyLinkCompartmentEClass = createEClass(STRATEGY_LINK_COMPARTMENT);\n\t\tcreateEReference(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT__LIST_LINKS);\n\t\tcreateEReference(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT__LIST_COMPARTMENT);\n\t\tcreateEReference(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT__LIST_AFFIXED);\n\t\tcreateEOperation(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT___EXECUTE_LINK_COMPARTMENTS_HEURISTICS__ECLASS);\n\n\t\tconcreteContainmentasAffixedEClass = createEClass(CONCRETE_CONTAINMENTAS_AFFIXED);\n\n\t\tconcreteContainmentasLinksEClass = createEClass(CONCRETE_CONTAINMENTAS_LINKS);\n\n\t\tconcreteContainmentasCompartmentsEClass = createEClass(CONCRETE_CONTAINMENTAS_COMPARTMENTS);\n\n\t\trepreHeurSSEClass = createEClass(REPRE_HEUR_SS);\n\t\tcreateEReference(repreHeurSSEClass, REPRE_HEUR_SS__HEURISTIC_STRATEGY_SETTINGS);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tbluetoothPortEClass = createEClass(BLUETOOTH_PORT);\n\n\t\tl2CAPInJobEClass = createEClass(L2CAP_IN_JOB);\n\n\t\tl2CAPoutJobEClass = createEClass(L2CA_POUT_JOB);\n\t}", "public Structure() {\n this.universeSize = universeSize;\n this.E = GraphFactory.emptyGraph();\n this.relations = new HashMap<>();\n this.arity = new HashMap<>();\n this.universeSize = -1;\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\txActivityDiagramArbiterEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER);\n\n\t\txActivityDiagramArbiterStateEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER_STATE);\n\n\t\txActivityDiagramArbiterTransitionEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER_TRANSITION);\n\t}", "public AllOOneDataStructure() {\n\t\thead=new Node(\"\", 0);\n\t\ttail=new Node(\"\", 0);\n\t\thead.next=tail;\n\t\ttail.prev=head;\n\t\tmap=new HashMap<>();\n\t}", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__PARAMS);\n createEReference(modelEClass, MODEL__STATES);\n createEReference(modelEClass, MODEL__POPULATION);\n\n paramEClass = createEClass(PARAM);\n createEAttribute(paramEClass, PARAM__NAME);\n createEAttribute(paramEClass, PARAM__VALUE);\n\n agentStateEClass = createEClass(AGENT_STATE);\n createEAttribute(agentStateEClass, AGENT_STATE__NAME);\n createEReference(agentStateEClass, AGENT_STATE__PREFIXS);\n\n prefixEClass = createEClass(PREFIX);\n createEReference(prefixEClass, PREFIX__ACTION);\n createEAttribute(prefixEClass, PREFIX__CONTINUE);\n\n actionEClass = createEClass(ACTION);\n createEAttribute(actionEClass, ACTION__NAME);\n createEReference(actionEClass, ACTION__RATE);\n\n acT_SpNoMsgEClass = createEClass(ACT_SP_NO_MSG);\n\n acT_SpBrEClass = createEClass(ACT_SP_BR);\n createEReference(acT_SpBrEClass, ACT_SP_BR__RANGE);\n\n acT_SpUniEClass = createEClass(ACT_SP_UNI);\n createEReference(acT_SpUniEClass, ACT_SP_UNI__RANGE);\n\n acT_InBrEClass = createEClass(ACT_IN_BR);\n createEReference(acT_InBrEClass, ACT_IN_BR__VALUE);\n\n acT_InUniEClass = createEClass(ACT_IN_UNI);\n createEReference(acT_InUniEClass, ACT_IN_UNI__VALUE);\n\n iRangeEClass = createEClass(IRANGE);\n\n pR_ExprEClass = createEClass(PR_EXPR);\n createEReference(pR_ExprEClass, PR_EXPR__PR_E);\n\n terminal_PR_ExprEClass = createEClass(TERMINAL_PR_EXPR);\n createEAttribute(terminal_PR_ExprEClass, TERMINAL_PR_EXPR__LINKED_PARAM);\n\n ratE_ExprEClass = createEClass(RATE_EXPR);\n createEReference(ratE_ExprEClass, RATE_EXPR__RT);\n\n terminal_RATE_ExprEClass = createEClass(TERMINAL_RATE_EXPR);\n createEAttribute(terminal_RATE_ExprEClass, TERMINAL_RATE_EXPR__LINKED_PARAM);\n\n agenT_NUMEClass = createEClass(AGENT_NUM);\n createEAttribute(agenT_NUMEClass, AGENT_NUM__TYPE);\n\n populationEClass = createEClass(POPULATION);\n createEReference(populationEClass, POPULATION__POPU);\n\n agentsEClass = createEClass(AGENTS);\n createEAttribute(agentsEClass, AGENTS__TYPE);\n }", "public Creator_4_tables() {\n// this.sourceUnits = sourceUnits;\n sourceUnits = new HashMap<String, PojoSourceCreatorUnit>();\n sourceTemplatePool.logEnvOnSrcCreate = app.cfg.getCfgBean().logEnvOnSrcCreate;\n env.setLogLeading(\"--cfenv--\");\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\teDomainSchemaEClass = createEClass(EDOMAIN_SCHEMA);\n\t\tcreateEReference(eDomainSchemaEClass, EDOMAIN_SCHEMA__CS);\n\t\tcreateEReference(eDomainSchemaEClass, EDOMAIN_SCHEMA__DS);\n\n\t\teControlSchemaEClass = createEClass(ECONTROL_SCHEMA);\n\t\tcreateEReference(eControlSchemaEClass, ECONTROL_SCHEMA__ACTOR);\n\n\t\teDataSchemaEClass = createEClass(EDATA_SCHEMA);\n\t\tcreateEReference(eDataSchemaEClass, EDATA_SCHEMA__CS);\n\t\tcreateEReference(eDataSchemaEClass, EDATA_SCHEMA__ITEM);\n\n\t\teDomainSpecificEntityEClass = createEClass(EDOMAIN_SPECIFIC_ENTITY);\n\t\tcreateEAttribute(eDomainSpecificEntityEClass, EDOMAIN_SPECIFIC_ENTITY__COMMAND_PRIORITY);\n\t\tcreateEReference(eDomainSpecificEntityEClass, EDOMAIN_SPECIFIC_ENTITY__CMD);\n\n\t\teDomainSpecificCommandEClass = createEClass(EDOMAIN_SPECIFIC_COMMAND);\n\t\tcreateEAttribute(eDomainSpecificCommandEClass, EDOMAIN_SPECIFIC_COMMAND__CMD_ID);\n\n\t\teActorEClass = createEClass(EACTOR);\n\t\tcreateEAttribute(eActorEClass, EACTOR__KIND_INTERACTION);\n\t\tcreateEReference(eActorEClass, EACTOR__TYPES_CONTROLLED);\n\n\t\teItemEClass = createEClass(EITEM);\n\t\tcreateEAttribute(eItemEClass, EITEM__ARISING_BEHAVIOR);\n\t\tcreateEReference(eItemEClass, EITEM__TYPE);\n\n\t\teDomainSpecificTypeEClass = createEClass(EDOMAIN_SPECIFIC_TYPE);\n\t\tcreateEAttribute(eDomainSpecificTypeEClass, EDOMAIN_SPECIFIC_TYPE__INTERACTION_BEHAVIOR);\n\t\tcreateEAttribute(eDomainSpecificTypeEClass, EDOMAIN_SPECIFIC_TYPE__CARDINALITY);\n\n\t\t// Create enums\n\t\teArisingEEnum = createEEnum(EARISING);\n\t\teCardinalityEEnum = createEEnum(ECARDINALITY);\n\t\teInteractionBehaviorEEnum = createEEnum(EINTERACTION_BEHAVIOR);\n\t\teCoordinationBehaviorEEnum = createEEnum(ECOORDINATION_BEHAVIOR);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\trepositoryEClass = createEClass(REPOSITORY);\n\t\tcreateEAttribute(repositoryEClass, REPOSITORY__NAME);\n\t\tcreateEAttribute(repositoryEClass, REPOSITORY__LOCATION);\n\n\t\trepositoryManagerEClass = createEClass(REPOSITORY_MANAGER);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttextualRepresentationEClass = createEClass(TEXTUAL_REPRESENTATION);\n\t\tcreateEReference(textualRepresentationEClass, TEXTUAL_REPRESENTATION__BASE_COMMENT);\n\t\tcreateEAttribute(textualRepresentationEClass, TEXTUAL_REPRESENTATION__LANGUAGE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tontologicalStructureEClass = createEClass(ONTOLOGICAL_STRUCTURE);\n\t\tcreateEReference(ontologicalStructureEClass, ONTOLOGICAL_STRUCTURE__ONTOLOGICAL_CONCEPTS);\n\t\tcreateEReference(ontologicalStructureEClass, ONTOLOGICAL_STRUCTURE__CONDITIONS);\n\t\tcreateEReference(ontologicalStructureEClass, ONTOLOGICAL_STRUCTURE__PROPERTIES);\n\n\t\tontologicalConceptEClass = createEClass(ONTOLOGICAL_CONCEPT);\n\t\tcreateEAttribute(ontologicalConceptEClass, ONTOLOGICAL_CONCEPT__LABEL);\n\t\tcreateEAttribute(ontologicalConceptEClass, ONTOLOGICAL_CONCEPT__URI);\n\n\t\tconditionEClass = createEClass(CONDITION);\n\t\tcreateEAttribute(conditionEClass, CONDITION__LABEL);\n\n\t\tlogicalConditionEClass = createEClass(LOGICAL_CONDITION);\n\n\t\tnaturalLangConditionEClass = createEClass(NATURAL_LANG_CONDITION);\n\t\tcreateEAttribute(naturalLangConditionEClass, NATURAL_LANG_CONDITION__STATEMENT);\n\n\t\tmathConditionEClass = createEClass(MATH_CONDITION);\n\n\t\tnegformulaEClass = createEClass(NEGFORMULA);\n\t\tcreateEReference(negformulaEClass, NEGFORMULA__CONDITION_STATEMENT);\n\n\t\toRformulaEClass = createEClass(ORFORMULA);\n\t\tcreateEReference(oRformulaEClass, ORFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(oRformulaEClass, ORFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tanDformulaEClass = createEClass(AN_DFORMULA);\n\t\tcreateEReference(anDformulaEClass, AN_DFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(anDformulaEClass, AN_DFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tequalFormulaEClass = createEClass(EQUAL_FORMULA);\n\t\tcreateEReference(equalFormulaEClass, EQUAL_FORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(equalFormulaEClass, EQUAL_FORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tmoreEqformulaEClass = createEClass(MORE_EQFORMULA);\n\t\tcreateEReference(moreEqformulaEClass, MORE_EQFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(moreEqformulaEClass, MORE_EQFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tlessformulaEClass = createEClass(LESSFORMULA);\n\t\tcreateEReference(lessformulaEClass, LESSFORMULA__LEFT_CONDITION_STATEMENT);\n\t\tcreateEReference(lessformulaEClass, LESSFORMULA__RIGHT_CONDITION_STATEMENT);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\t\tcreateEAttribute(propertyEClass, PROPERTY__LABEL);\n\n\t\tnumberPropertyEClass = createEClass(NUMBER_PROPERTY);\n\t\tcreateEAttribute(numberPropertyEClass, NUMBER_PROPERTY__VALUE);\n\n\t\tbooleanPropertyEClass = createEClass(BOOLEAN_PROPERTY);\n\t\tcreateEAttribute(booleanPropertyEClass, BOOLEAN_PROPERTY__VALUE);\n\n\t\tstringPropertyEClass = createEClass(STRING_PROPERTY);\n\t\tcreateEAttribute(stringPropertyEClass, STRING_PROPERTY__VALUE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\topenStackRequestEClass = createEClass(OPEN_STACK_REQUEST);\n\t\tcreateEAttribute(openStackRequestEClass, OPEN_STACK_REQUEST__PROJECT_NAME);\n\n\t\topenstackRequestDeleteEClass = createEClass(OPENSTACK_REQUEST_DELETE);\n\t\tcreateEAttribute(openstackRequestDeleteEClass, OPENSTACK_REQUEST_DELETE__OBJECT_TYPE);\n\t\tcreateEAttribute(openstackRequestDeleteEClass, OPENSTACK_REQUEST_DELETE__OBJECT_NAME);\n\n\t\topenstackRequestPollEClass = createEClass(OPENSTACK_REQUEST_POLL);\n\n\t\tvirtualMachineTypeEClass = createEClass(VIRTUAL_MACHINE_TYPE);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__DESCRIPTION);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__NUMBER_OF_CORES);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__MEMORY_SIZE_MB);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__ROOT_DISK_SIZE_GB);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__DISK_SIZE_GB);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__VOLUME_SIZE_GB);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__IMAGE_NAME);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__FLAVOR_NAME);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__NEED_PUBLIC_IP);\n\t\tcreateEAttribute(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__DEPLOYMENT_STATUS);\n\t\tcreateEReference(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__INCOMING_SECURITY_RULES);\n\t\tcreateEReference(virtualMachineTypeEClass, VIRTUAL_MACHINE_TYPE__OUTBOUND_SECURITY_RULES);\n\n\t\tsecurityRuleEClass = createEClass(SECURITY_RULE);\n\t\tcreateEAttribute(securityRuleEClass, SECURITY_RULE__PORT_RANGE_START);\n\t\tcreateEAttribute(securityRuleEClass, SECURITY_RULE__PORT_RANGE_END);\n\t\tcreateEAttribute(securityRuleEClass, SECURITY_RULE__PREFIX);\n\t\tcreateEAttribute(securityRuleEClass, SECURITY_RULE__IP_PROTOCOL);\n\n\t\t// Create enums\n\t\tsecurityRuleProtocolEEnum = createEEnum(SECURITY_RULE_PROTOCOL);\n\t}", "abstract Object build();", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tfticBaseEClass = createEClass(FTIC_BASE);\n\n\t\titemEClass = createEClass(ITEM);\n\n\t\thypertextEClass = createEClass(HYPERTEXT);\n\t\tcreateEReference(hypertextEClass, HYPERTEXT__CONTENT);\n\n\t\ttextElementEClass = createEClass(TEXT_ELEMENT);\n\t\tcreateEAttribute(textElementEClass, TEXT_ELEMENT__VISIBLE_CONTENT);\n\n\t\tlinkEClass = createEClass(LINK);\n\t\tcreateEReference(linkEClass, LINK__TARGET);\n\n\t\ttermEClass = createEClass(TERM);\n\n\t\tfactorTableEClass = createEClass(FACTOR_TABLE);\n\t\tcreateEAttribute(factorTableEClass, FACTOR_TABLE__TYPE);\n\t\tcreateEReference(factorTableEClass, FACTOR_TABLE__ENTRIES);\n\n\t\tftEntryEClass = createEClass(FT_ENTRY);\n\t\tcreateEAttribute(ftEntryEClass, FT_ENTRY__NUMBERING);\n\t\tcreateEAttribute(ftEntryEClass, FT_ENTRY__NAME);\n\t\tcreateEReference(ftEntryEClass, FT_ENTRY__CHILDREN);\n\n\t\tfactorCategoryEClass = createEClass(FACTOR_CATEGORY);\n\n\t\tfactorEClass = createEClass(FACTOR);\n\t\tcreateEReference(factorEClass, FACTOR__DESCRIPTION);\n\t\tcreateEReference(factorEClass, FACTOR__FLEXIBILITY);\n\t\tcreateEReference(factorEClass, FACTOR__CHANGEABILITY);\n\t\tcreateEReference(factorEClass, FACTOR__INFLUENCE);\n\t\tcreateEAttribute(factorEClass, FACTOR__PRIORITY);\n\n\t\tissueCardEClass = createEClass(ISSUE_CARD);\n\t\tcreateEAttribute(issueCardEClass, ISSUE_CARD__NAME);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__DESCRIPTION);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__SOLUTION);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__STRATEGIES);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__INFLUENCING_FACTORS);\n\t\tcreateEReference(issueCardEClass, ISSUE_CARD__RELATED_ISSUES);\n\n\t\tstrategyEClass = createEClass(STRATEGY);\n\t\tcreateEAttribute(strategyEClass, STRATEGY__NAME);\n\t\tcreateEReference(strategyEClass, STRATEGY__DESCRIPTION);\n\n\t\tinfluencingFactorEClass = createEClass(INFLUENCING_FACTOR);\n\t\tcreateEReference(influencingFactorEClass, INFLUENCING_FACTOR__DESCRIPTION);\n\t\tcreateEReference(influencingFactorEClass, INFLUENCING_FACTOR__FACTOR);\n\n\t\trelatedIssueEClass = createEClass(RELATED_ISSUE);\n\t\tcreateEReference(relatedIssueEClass, RELATED_ISSUE__ISSUE);\n\t\tcreateEReference(relatedIssueEClass, RELATED_ISSUE__DESCRIPTION);\n\n\t\tfticPackageEClass = createEClass(FTIC_PACKAGE);\n\t\tcreateEReference(fticPackageEClass, FTIC_PACKAGE__TABLES);\n\t\tcreateEReference(fticPackageEClass, FTIC_PACKAGE__ISSUE_CARDS);\n\t\tcreateEAttribute(fticPackageEClass, FTIC_PACKAGE__NAME);\n\n\t\t// Create enums\n\t\tcategoryTypeEEnum = createEEnum(CATEGORY_TYPE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttaskModelEClass = createEClass(TASK_MODEL);\n\t\tcreateEReference(taskModelEClass, TASK_MODEL__ROOT);\n\t\tcreateEReference(taskModelEClass, TASK_MODEL__TASKS);\n\t\tcreateEAttribute(taskModelEClass, TASK_MODEL__NAME);\n\n\t\ttaskEClass = createEClass(TASK);\n\t\tcreateEAttribute(taskEClass, TASK__ID);\n\t\tcreateEAttribute(taskEClass, TASK__NAME);\n\t\tcreateEReference(taskEClass, TASK__OPERATOR);\n\t\tcreateEReference(taskEClass, TASK__SUBTASKS);\n\t\tcreateEReference(taskEClass, TASK__PARENT);\n\t\tcreateEAttribute(taskEClass, TASK__MIN);\n\t\tcreateEAttribute(taskEClass, TASK__MAX);\n\t\tcreateEAttribute(taskEClass, TASK__ITERATIVE);\n\n\t\tuserTaskEClass = createEClass(USER_TASK);\n\n\t\tapplicationTaskEClass = createEClass(APPLICATION_TASK);\n\n\t\tinteractionTaskEClass = createEClass(INTERACTION_TASK);\n\n\t\tabstractionTaskEClass = createEClass(ABSTRACTION_TASK);\n\n\t\tnullTaskEClass = createEClass(NULL_TASK);\n\n\t\ttemporalOperatorEClass = createEClass(TEMPORAL_OPERATOR);\n\n\t\tchoiceOperatorEClass = createEClass(CHOICE_OPERATOR);\n\n\t\torderIndependenceOperatorEClass = createEClass(ORDER_INDEPENDENCE_OPERATOR);\n\n\t\tinterleavingOperatorEClass = createEClass(INTERLEAVING_OPERATOR);\n\n\t\tsynchronizationOperatorEClass = createEClass(SYNCHRONIZATION_OPERATOR);\n\n\t\tparallelOperatorEClass = createEClass(PARALLEL_OPERATOR);\n\n\t\tdisablingOperatorEClass = createEClass(DISABLING_OPERATOR);\n\n\t\tsequentialEnablingInfoOperatorEClass = createEClass(SEQUENTIAL_ENABLING_INFO_OPERATOR);\n\n\t\tsequentialEnablingOperatorEClass = createEClass(SEQUENTIAL_ENABLING_OPERATOR);\n\n\t\tsuspendResumeOperatorEClass = createEClass(SUSPEND_RESUME_OPERATOR);\n\t}", "protected abstract void createAttributes();", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "private void initialize() {\n\t\t\ttry {\n\t\t\t\tFMAOBO fmaobo = new FMAOBO();\n\t\t\t\tTA ta = new TA (fmaobo);\n\t\t\t\tBp3d bp3d = new Bp3d();\n\t\t\t\t\t\t\t\t\n\t\t\t\tMap<String, TreeParent> treeParents = \n\t\t\t\t\tnew TreeMap<String, TreeParent>();\n\t\t\t\tMap<String, TreeObject> treeObjects = \n\t\t\t\t\tnew TreeMap<String, TreeObject>();\n\t\t\t\t\t\t\t\t\n\t\t\t\t/** TreeParent/TreeObject作成**/\n\t\t\t\tfor(String id : bp3d.getAllIds()){\t\t\t\t\n\t\t\t\t\tString label = \"\";\n\n\t\t\t\t\tif(ta.contains(id)){\n\t\t\t\t\t\tSet<String> taIds = new TreeSet<String>();\n\t\t\t\t\t\tSet<String> taKanjis = new TreeSet<String>();\n\t\t\t\t\t\tfor(TAEntry taEnt : ta.getTAByFmaId(id)){\n\t\t\t\t\t\t\ttaIds.add(taEnt.getTaId());\n\t\t\t\t\t\t\ttaKanjis.add(taEnt.getTaKanji());\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\tlabel = Bp3dUtility.join(taIds, \"/\") + \":\" + bp3d.getEntry(id).getEn() \n\t\t\t\t\t\t\t+ \":\" + Bp3dUtility.join(taKanjis, \"/\");\n\t\t\t\t\t}else{\t\t\t\t\t\t\n\t\t\t\t\t\tlabel = id + \":\" + bp3d.getEntry(id).getEn();\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif(bp3d.hasChild(id)){\n\t\t\t\t\t\ttreeParents.put(id, new TreeParent(label));\n\t\t\t\t\t}else{\n\t\t\t\t\t\ttreeObjects.put(id, new TreeObject(label));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/** addChild **/\n\t\t\t\tfor(String pid : bp3d.getReverseMemberOfs().keySet()){\n\t\t\t\t\tTreeParent parent = treeParents.get(pid);\n\t\t\t\t\tfor(String cid : bp3d.getChildren(pid)){\n\t\t\t\t\t\tif(bp3d.hasChild(cid)){\n\t\t\t\t\t\t\tparent.addChild(treeParents.get(cid));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(parent == null){\n\t\t\t\t\t\t\t\tSystem.out.println(\"parent pid=null:\" + pid + \":\" + bp3d.getEntry(pid).getEn());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tparent.addChild(treeObjects.get(cid));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/** parentのないノードをrootにぶら下げる**/\n\t\t\t\tinvisibleRoot = new TreeParent(\"\");\n\t\t\t\t\n\t\t\t\tfor(String id : bp3d.getAllIds()){\n\t\t\t\t\tif(!bp3d.hasParent(id)){\n//\t\t\t\t\t\tSystem.out.println(id + \" has no parent.\");\n\t\t\t\t\t\tif(bp3d.hasChild(id)){\n\t\t\t\t\t\t\tinvisibleRoot.addChild((TreeParent)(treeParents.get(id)));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tinvisibleRoot.addChild((TreeObject)(treeObjects.get(id)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\t\n\t\t}", "Klassenstufe createKlassenstufe();", "private final void createAndAddNode(String name) {\n\t}", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}" ]
[ "0.76049453", "0.7071772", "0.6878263", "0.67076916", "0.65467346", "0.6500537", "0.6460891", "0.6458463", "0.64334697", "0.6403476", "0.6352528", "0.6349483", "0.63348484", "0.62962985", "0.628511", "0.6278673", "0.6253897", "0.62342566", "0.61941963", "0.61729234", "0.6154435", "0.6153045", "0.6152796", "0.6119206", "0.6116492", "0.6106813", "0.6104328", "0.60893935", "0.60817105", "0.6072963", "0.60609347", "0.6060155", "0.606001", "0.604758", "0.60470253", "0.6035318", "0.6031378", "0.60174686", "0.60024333", "0.6000902", "0.5990202", "0.5986817", "0.59850687", "0.59783936", "0.5965531", "0.5958238", "0.59567887", "0.59508455", "0.59476864", "0.594623", "0.5944083", "0.5943713", "0.5942979", "0.59340394", "0.5933614", "0.59290427", "0.59279805", "0.5922339", "0.59146804", "0.59114945", "0.5909768", "0.59069043", "0.5901589", "0.5900314", "0.5894497", "0.5894193", "0.588788", "0.5886053", "0.58808", "0.5880756", "0.58802843", "0.58793473", "0.58719665", "0.5866678", "0.58636314", "0.5855439", "0.5833626", "0.5828291", "0.5817522", "0.581603", "0.58118755", "0.58107835", "0.58100045", "0.5805356", "0.5802849", "0.5783903", "0.5783268", "0.5783155", "0.577789", "0.5777595", "0.57761407", "0.57662", "0.57588214", "0.57586706", "0.5749294", "0.574895", "0.5745339", "0.5728544", "0.5718607", "0.5717465", "0.5706407" ]
0.0
-1
Retourne le nombre de colonnes
public int getColumnCount() { return this.title.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int nbColonnes();", "public int obtenirColonne() {\n return this.colonne;\n }", "int getNombreColonnesPlateau();", "@Override\n\tpublic int getColumnCount()\n\t{\n\t\treturn nomColonnes.length;\n\t}", "public void displayColonies() {\r\n\t\tchar[][] temp;\r\n\t\tint count;\r\n\r\n\t\tfor (int row = 0; row < slideData.length; row++) {\r\n \t\t\tfor (int col = 0; col < slideData[0].length; col++) {\r\n \t\t\tif (slideData[row][col] == COLONY) {\r\n \t\t \t\tcount = collectCells(row, col);\r\n \t\t\tSystem.out.println(\"Colony at (\" + row + \",\" + col + \") with size \" + count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int getKeyspacesCount();", "public int getNumEspacios() {\r\n\t\treturn numEspacios;\r\n\t}", "public int getNombreLiaison()\t{\r\n \treturn this.routes.size();\r\n }", "public int getColspan() \n {\n return 1;\n }", "public int getNcol(){\r\n \treturn this.ncol;\r\n \t}", "public boolean colonne(int c){\n\tint l=0;\n\tboolean trouve=false;\n\tObject tmp='@';\n\twhile(l<5 && !trouve){\n\t\tif(gc[l][c]==tmp)\n\t\t\ttrouve=true;\n\t\telse\n\t\t\tl++;\n\t}\n\treturn trouve;\n}", "public abstract int getNumColumns();", "private int numberOfColumns(String[] arr) {\n int count = 0;\n for (int i = 0; i < arr.length; i++) {\n if (arr[i].equals(\":\")) {\n break;\n }\n count++;\n }\n return count;\n }", "int getNumSegments();", "public int get_nr_of_segments() {\n return nr_of_segments;\n }", "int number() {\r\n\t\treturn delimiters.size();\r\n\t}", "private int getEthIdx() {\n return this.colStartOffset + 3;\n }", "int getColumns();", "int getColumns();", "int colCount();", "int getColumnsCount();", "int getColumnsCount();", "public int getNumLines ();", "public int columns() {\n\treturn columns;\n}", "public int getCount(){\r\n\t\tif(_serverinfo != null){\r\n\t\t\treturn _serverinfo.length / 6;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "int getPortPairGroupCount();", "public int getNumCol() {\n\t\treturn dc.size();\n\t}", "protected abstract String getPortPropertyName();", "String canonHr(String s) {\n List<String> l = StringUtil.breakAt(s, \":\");\n if (l.size() == 2) {\n return l.get(0) + \":\" + l.get(1).toUpperCase();\n }\n return s.toUpperCase();\n }", "private int getNIdx() {\n return this.colStartOffset + 7;\n }", "public int entries(){\n\t\treturn routeTable.size();\n\t}", "private static int labelEnd(String s) {\n\t\tint colonIndex = s.indexOf(\":\");\n\t\tint semicolonIndex = s.indexOf(\";\");\n\t\tif ((semicolonIndex == -1) || (colonIndex < semicolonIndex)) {\n\t\t\treturn colonIndex;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public int getDisplayCharacterCount() {\r\n return _displaySize;\r\n }", "public int columns( )\n {\n int col = 0;\n\n if( table != null )\n {\n col = table[0].length;\n } //end\n return (col);\n }", "public final void mCOLON() throws RecognitionException {\n try {\n int _type = COLON;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2805:3: ( ':' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2806:3: ':'\n {\n match(':'); if (state.failed) return ;\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "static int displayN(Node node)\r\n {\r\n return node.neighbors.size();\r\n }", "public int length() {\n \t\tif (-1 == n_points) setupForDisplay();\n \t\treturn n_points;\n \t}", "public String getEndPointEndingStyle() {\n/* 776 */ COSBase base = getCOSObject().getDictionaryObject(COSName.LE);\n/* 777 */ if (base instanceof COSArray && ((COSArray)base).size() >= 2)\n/* */ {\n/* 779 */ return ((COSArray)base).getName(1, \"None\");\n/* */ }\n/* 781 */ return \"None\";\n/* */ }", "public int getnCols() {\n return nCols;\n }", "public Integer getiDisplayLength() {\r\n\t\treturn iDisplayLength;\r\n\t}", "public int getProtocolDelimitedLength();", "public final void mCOLON() throws RecognitionException {\n try {\n int _type = COLON;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:45:7: ( ':' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:45:9: ':'\n {\n match(':'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public int numberOfSegments() {\n return lineSegments.size();\n }", "public int numberOfSegments() {\n return lineSegments.size();\n }", "public final void mCOLON() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = COLON;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:436:6: ( ':' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:436:16: ':'\n\t\t\t{\n\t\t\tmatch(':'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "int getNumberOfStonesOnBoard();", "int getSentenceSegmentCount();", "public int nHeaderFields() {\n return nHeaderFields;\n }", "public Integer getN_COLS() {\n return n_COLS;\n }", "public int headerLength();", "@Override\n\tpublic String getColumnName(int col)\n\t{\n\t\treturn nomColonnes[col];\n\t}", "public int lines( )\n {\n int lin = 0;\n\n if( table != null )\n {\n lin = table.length;\n } //end\n return(lin);\n }", "public int getCols() {\n\t\treturn g[0].length;\n\t}", "public int getNumberOfNames() {\n\t\treturn 0;\n\t}", "public int numberOfSegments() { \n\t\treturn numOfSeg;\n\t}", "public int numberOfSegments() {\n return lineSegs.length;\n }", "public int printLength() { return printLength; }", "public List<EntitaConsultabileDataWrapper> getElencoIntestazioniColonne(TipoEntitaConsultabile tipoEntitaConsultabile){\n\t\tfinal String methodName = \"getElencoIntestazioniColonne\";\n\t\tif(tipoEntitaConsultabile == null){\n\t\t\tlog.debug(methodName, \"TipoEntitaConsultabile non presente\");\n\t\t\treturn new ArrayList<EntitaConsultabileDataWrapper>();\t\n\t\t}\n\t\tEntitaConsultabileDataAdapter columnAdapter = dataAdapterFactory.init(tipoEntitaConsultabile);\n\t\treturn columnAdapter.getListaIntestazioneColonneTabella();\n\t}", "public int getHeadTails() \n {\n return numHeadTails; \n }", "int getLinesCount();", "public int getNumColumns() { return columns.length; }", "private static int numLines() {\n\t\tif(subway != null)\n\t\t\treturn subway[0].length;\n\t\treturn 0;\n\t}", "private int numberOfRows(String[] arr) {\n int number = 1;\n for (int i = 0; i < arr.length; i++) {\n if (arr[i].equals(\":\")) {\n number++;\n }\n }\n\n return number;\n }", "public int numberOfSegments() {\n return lineSegments.length;\n }", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "public int getDimension() {\n\treturn id2label.size();\n }", "public int getTabCount() {\n\t\treturn tabMap.size();\n\t}", "public int getBoardWidth(){\n return Cols;\n }", "int sizeOfGeneralNameArray();", "public int getNumStones() {\n return this.numStones;\n }", "int getPivotDimensionHeadersCount();", "int getColumnCount();", "int getColumnCount();", "public int getPortCount() {\n return 4;\n }", "public String getLineEndingStyle() {\n/* 412 */ return getCOSObject().getNameAsString(COSName.LE, \"None\");\n/* */ }", "public static String getParsedColonValue(String input){\n\t\tif (input == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn input.split(\":\")[1];\n\t}", "public int getLines() {\n\t\treturn this.linhas;\n\t}", "@Override\n public String toString()\n {\n return String.format(\"%-20s\\t\\t%-30s%-30s\",number, name, party);\n}", "public int length(){\n\t\treturn this.tamanho;\n\t}", "public String toString(){\n\t\tString maChaineRetour=\"\";\n\t\t\n\t\tfor(Cristal[] ligne: tabCristaux){\n\t\t\tfor(Cristal colonne: ligne){\n\t\t\t\tif(colonne == null)\n\t\t\t\t\tmaChaineRetour = maChaineRetour + \"0\" ;\n\t\t\t\telse\n\t\t\t\t\tmaChaineRetour = maChaineRetour + colonne.toString();\n\t\t\t}\n\t\t\tmaChaineRetour = maChaineRetour + \"\\n\";\n\t\t}\n\t\treturn maChaineRetour;\n\t}", "public int getClumns() {\n return this.matrix[0].length;\n }", "public int getNumCols() { return numCols; }", "public int numberOfSegments() {\n return this.lineSegments.length;\n }", "public final String dimension() {\n\t\tStringBuffer b = new StringBuffer(16);\n\t\tthis.editDimension(b);\n\t\treturn(b.toString());\n\t}", "public int getCols();", "int sizeOfLanesArray();", "public int getNumberOfColumns(){\n\t\treturn number_columns;\n\t}", "public int numberOfSegments() {\n return p;\n }", "public int getNumeroColis() {\r\n\t\treturn numeroColis;\r\n\t}", "int getNumKeys();", "public int size() {\r\n\t\treturn names.size();\r\n\t}", "public int getHauteur() {\n\t\treturn DIM_CASE;\n\t}", "public int col() {\r\n return col;\r\n }", "public int numberOfSegments() {\n return segments.size();\n }", "private int numCols(){\n return attrTable.getModel().getColumnCount();\n }", "public int getCount() {\n return arName.size();\n }", "public int getCountCol() {\n\treturn countCol;\n}", "public int getColumnsCalendarName() {\n return (getMaximumLengthCalendarName() + 1);\n }", "int getNumColors();" ]
[ "0.8160502", "0.80282825", "0.7286599", "0.6924315", "0.6276242", "0.5839355", "0.56989104", "0.5638027", "0.55965585", "0.55934244", "0.55425406", "0.5533613", "0.5460152", "0.5436126", "0.54177815", "0.53936243", "0.5374076", "0.5343103", "0.5343103", "0.53411216", "0.5323643", "0.5323643", "0.5323059", "0.5316518", "0.5309124", "0.5295916", "0.52954835", "0.52902913", "0.52762383", "0.52726334", "0.5255451", "0.5254693", "0.5251252", "0.52501", "0.5242029", "0.5212344", "0.5205374", "0.5202413", "0.520068", "0.51968735", "0.51853263", "0.51736546", "0.51703817", "0.51703817", "0.5163883", "0.51501995", "0.5140159", "0.5137669", "0.51357776", "0.51347685", "0.51222795", "0.51197666", "0.51165354", "0.5105079", "0.50942814", "0.5085704", "0.5085106", "0.50728244", "0.5070343", "0.5067664", "0.50607115", "0.5050379", "0.5050236", "0.5045947", "0.50395817", "0.50395817", "0.50395817", "0.50333256", "0.50317836", "0.50305563", "0.50229824", "0.50120896", "0.50080884", "0.50078225", "0.50078225", "0.5006842", "0.5001975", "0.5000427", "0.49993294", "0.49949718", "0.49943173", "0.4993338", "0.49868792", "0.4983795", "0.4983248", "0.49797168", "0.49775502", "0.49743176", "0.49712172", "0.49711117", "0.496555", "0.49647307", "0.4962194", "0.49597004", "0.4952221", "0.4951623", "0.49513027", "0.4949609", "0.49444014", "0.49428585", "0.49366134" ]
0.0
-1
Retourne le nombre de lignes
public int getRowCount() { return this.data.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNombreLiaison()\t{\r\n \treturn this.routes.size();\r\n }", "public Integer getNumLoteLanc() {\n\t\treturn numLoteLanc;\n\t}", "int nbLignes();", "Integer getNLNDreu();", "public int lireCount() {\n\t\treturn cpt;\n\t}", "public int getNunFigli() {\n\t\tint numFigli = 0;\n\t\tfor (Nodo_m_ario figlio : figli) {\n\t\t\tif (figlio != null) {\n\t\t\t\tnumFigli += 1;\n\t\t\t}\n\t\t}\n\t\treturn numFigli;\n\t}", "public String getLnt() {\n return lnt;\n }", "public int obtenirLigne() {\n return this.ligne;\n }", "public int getNumOfLegs() {\n return numOfLegs;\n }", "public int getNrLoja() {\n return nrLoja;\n }", "long getLaenge() {\n long leange = 0;\n for (Song song : songlist) {\n if (song != null)\n leange += song.getLeange();\n }\n return leange;\n }", "Integer getNLNDsp();", "public int getLoonie () {\n return NLoonie;\n }", "public int getLegs() {\n return legs;\n }", "int getNombreLignesPlateau();", "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "int getLabelsCount();", "Integer getLNDFlgs();", "public int ListLength(){\n int j = 0;\n // Get index of the first element with value\n int i = StaticLinkList[MAXSIZE-1].cur;\n while (i!=0)\n {\n i = StaticLinkList[i].cur;\n j++;\n }\n return j;\n }", "int getLength() {\n return levels.length;\n }", "public int getLattine() {\n\t\treturn nLattine;\n\t}", "public int getNumLanes() {\n\t\treturn numLanes;\n\t}", "public int getNumeroLave() {\n\t\treturn numeroLave;\n\t}", "int getLegs();", "int getPartitionLagsCount();", "public int getNumGruppoPacchetti();", "long getNombreElements();", "public int getNickel () {\n return NNickel;\n }", "java.lang.String getN();", "public int nbLibres() {\n\t\tint libre = 0;\n\t\tfor(Borne b : bornes) {\n\t\t\tlibre += b.getEtatBorne();\n\t\t}\n\t\treturn libre;\n\t}", "public int LISS(Node node){\n return Math.max(dp(node,0),dp(node,1)); \n }", "public int getCount() {\n return listName.length;\n }", "static int displayN(Node node)\r\n {\r\n return node.neighbors.size();\r\n }", "int getGroupCount();", "public int lancia() {\r\n\t\tlancio = dado.tiraDado();\r\n\t\tthis.numLanci++;\r\n\t\treturn lancio;\r\n\t}", "public String getName() {\n\t\treturn \"lorann\";\r\n\t}", "public int getNumLeaves() {\n return numLeaves;\n }", "public int maxL()\r\n {\r\n return metro.numberOfLines - 1;\r\n }", "public int getNumeroAgnelli() {\n\t\treturn numeroAgelli;\n\t}", "public int getNN() {\n\t\treturn NN;\n\t}", "public int getSubstanceLotNumberReps() {\r\n \treturn this.getReps(15);\r\n }", "public int size(){\n return n_nodi;\n }", "java.lang.String getNume();", "java.lang.String getNume();", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "public Integer get_ldcount()\r\n\t{\r\n\t\treturn this.ldcount;\r\n\t}", "@Override\n \tpublic String getSliceLabel(int n) {\n \t\tif (n < 1 || n > layers.size()) return null;\n \t\treturn layers.get(n-1).getTitle();\n \t}", "public int getNickels()\n {\n\treturn nickels;\n }", "public int getNombreAllumettes() {\n\t\treturn this.nbAllumettes;\n\t\t}", "@MapName(\"lnfid\")\n \tString getLnfId();", "int getListSnIdCount();", "public int numNodi() {\n\t\treturn this.nodi.size();\n\t}", "public static int getLifes(int x) {\r\n\t\tif (x == 1)\r\n\t\t\t--lifes;\r\n\t\t\t\r\n\t\treturn lifes;\r\n\t}", "public int my_leaf_count();", "public int NbreObjets(){\n\t\treturn this.nombre_objets;\n\t}", "public int level () {\r\n int iLevel;\r\n\r\n if (isNull(\"id_term1\"))\r\n iLevel = 1;\r\n else if (isNull(\"id_term2\"))\r\n iLevel = 2;\r\n else if (isNull(\"id_term3\"))\r\n iLevel = 3;\r\n else if (isNull(\"id_term4\"))\r\n iLevel = 4;\r\n else if (isNull(\"id_term5\"))\r\n iLevel = 5;\r\n else if (isNull(\"id_term6\"))\r\n iLevel = 6;\r\n else if (isNull(\"id_term7\"))\r\n iLevel = 7;\r\n else if (isNull(\"id_term8\"))\r\n iLevel = 8;\r\n else if (isNull(\"id_term9\"))\r\n iLevel = 9;\r\n else\r\n iLevel = 10;\r\n\r\n return iLevel;\r\n }", "public int getCount() {\n\t\treturn lstPara.size();\n\t}", "public int getLevelNo() {\n return levelNo;\n }", "public int getTaillePoule (){\n\t\treturn 3;\n\t}", "public int numberOfOccorrence();", "int getLevelTableListCount();", "int sizeOfLanesArray();", "static int size_of_lhld(String passed){\n\t\treturn 3;\n\t}", "public int getCount() {\n return arName.size();\n }", "public int calculerKgsNourritureParJour(){\r\n\t\treturn noms.size() * 10;\r\n\t}", "public int getLanseringsår() {\n\t\treturn lanseringsår;\n\t}", "public int getLenghtPop () {\r\n return long_poblacion;\r\n }", "private static int numLines() {\n\t\tif(subway != null)\n\t\t\treturn subway[0].length;\n\t\treturn 0;\n\t}", "public int getDL()\r\n\t{\r\n\t\treturn gl.glGenLists(1);\r\n\t}", "public String getLName() {\n return LName;\n }", "public int length(){\r\n int counter = 0;\r\n ListNode c = head;\r\n while(c != null){\r\n c = c.getLink();\r\n counter++;\r\n }\r\n return counter;\r\n }", "public int getNumberOfNames() {\n\t\treturn 0;\n\t}", "public int getNumOrdine() {\n\t\t\treturn numOrdine;\n\t\t}", "int getBlockNumbersCount();", "public Integer getNestingLevel(Loop lp){\n\t\tint i=0; \n\t\twhile(!lp.equals(getRoot())){\n\t\t\tlp=getFather(lp);\n\t\t\ti++;\n\t\t}\n\t\treturn i;\n\t}", "public String getPhnLoclNbr()\n\t{\n\t\treturn mPhnLoclNbr;\n\t}", "public int length() {\n\t\treturn this.n;\n\t}", "public int getLabelRecordCount() {\n\t\treturn front_label_size / record_length;\n\t}", "public String getlName() {\n return lName;\n }", "public int getN() {\r\n\t\treturn n;\r\n\t}", "public int getN() {\n\t\treturn n;\n\t}", "int getNombreColonnesPlateau();", "static int size_of_lxi(String passed){\n\t\treturn 3;\n\t}", "public int getLines() {\n\t\treturn this.linhas;\n\t}", "public int getN() {\n return n_;\n }", "public int getTailleGrille() {\n\t\treturn this.tailleGrille;\r\n\t}", "public static int getNos() {\n\t\treturn numberOfStudents;\n\t}", "public int getCantidadRobots();", "int getNumberOfInfantry();", "public int getNumberofNonLeaves() {\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE NUMBER OF NON_LEAF NODES IN THE TREE AND RETURN\n */\n return nonleaves;\n }", "public int getLevel() {\n\t\treturn 1 + this.iter / this.levelfk;\n\t}", "public int getN() {\n return n_;\n }", "public StringWithCustomFacts getNumChildren() {\n return numChildren;\n }", "public int getListSnIdCount() {\n return listSnId_.size();\n }", "public int howManyLevels()\r\n\t{\r\n\t\t// Formula is the ceiling of the log base 2 of (the current number of nodes + 1)\r\n\t\treturn (int) Math.ceil(Math.log(getCounter() + 1) / Math.log(2));\r\n\t}", "String levelName();" ]
[ "0.68001187", "0.6649068", "0.64486533", "0.6353754", "0.6197806", "0.6173627", "0.6167821", "0.61526895", "0.6148767", "0.61460453", "0.6069791", "0.60680115", "0.6043863", "0.60343945", "0.59884644", "0.59749204", "0.59749204", "0.59749204", "0.59749204", "0.5923247", "0.5914037", "0.58636206", "0.58595234", "0.5858697", "0.58487034", "0.5785371", "0.57803684", "0.5776803", "0.57718", "0.5767934", "0.57489157", "0.5747715", "0.57393694", "0.57303566", "0.5719231", "0.5696376", "0.56782454", "0.5676239", "0.5672739", "0.5667777", "0.566533", "0.5661243", "0.56594574", "0.5658809", "0.5653879", "0.5653879", "0.5653752", "0.5640454", "0.5640454", "0.5640454", "0.56339127", "0.5624605", "0.56187314", "0.56085277", "0.560639", "0.55912936", "0.55862254", "0.5583099", "0.5574815", "0.55731845", "0.5571516", "0.55567646", "0.5547521", "0.5545563", "0.55406576", "0.55328155", "0.55289197", "0.5527319", "0.5523771", "0.55088985", "0.54890007", "0.5486377", "0.5484611", "0.5470138", "0.5462573", "0.54566205", "0.5456093", "0.5455767", "0.54555064", "0.5452603", "0.5452312", "0.5451296", "0.54508245", "0.5445997", "0.5443519", "0.544315", "0.5440089", "0.5437622", "0.5435961", "0.5432227", "0.54302526", "0.5422902", "0.5415231", "0.54128706", "0.54107845", "0.54102707", "0.5402942", "0.5400686", "0.539518", "0.5390554", "0.5387342" ]
0.0
-1
Test method for 'com.elasticpath.service.ProductServiceImpl.setProductCategoryFeatured(long, long)'.
@Test public void testSetProductCategoryFeatured() { // set up product and category final long productUid = 123L; final long categoryUid = 234L; final Product product = new ProductImpl(); product.setUidPk(productUid); product.setGuid("productGuid"); Category category = new CategoryImpl(); category.setUidPk(categoryUid); category.setGuid("categoryGuid"); category.setCatalog(new CatalogImpl()); product.addCategory(category); // mock methods ArrayList<Integer> returnList = new ArrayList<Integer>(); returnList.add(Integer.valueOf(2)); context.checking(new Expectations() { { oneOf(mockProductDao).getWithCategories(with(any(long.class))); will(returnValue(product)); oneOf(mockProductDao).getMaxFeaturedProductOrder(with(any(long.class))); will(returnValue(2)); oneOf(mockProductDao).saveOrUpdate(with(same(product))); } }); // run the service int newOrder = this.productServiceImpl.setProductCategoryFeatured(product.getUidPk(), category.getUidPk()); // check result assertEquals(newOrder, 2 + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic final void testResetProductCategoryFeatured() {\n\t\tfinal Product mockProduct = context.mock(Product.class);\n\t\tfinal Category mockCategory = context.mock(Category.class);\n\n\t\tProductServiceImpl service = new ProductServiceImpl() {\n\t\t\t@Override\n\t\t\tpublic Category getCategoryFromProductByUid(final Product product, final long categoryUid) {\n\t\t\t\treturn mockCategory;\n\t\t\t}\n\t\t};\n\t\t\n\t\tservice.setProductDao(mockProductDao);\n\t\tfinal long productUid = 123L;\n\t\tfinal long categoryUid = 234L;\n\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\t//make sure it's set to 0\n\t\t\t\toneOf(mockProduct).setFeaturedRank(mockCategory, 0);\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(with(any(long.class)));\n\t\t\t\twill(returnValue(mockProduct));\n\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(any(Product.class)));\n\t\t\t\twill(returnValue(mockProduct));\n\t\t\t}\n\t\t});\n\t\tservice.resetProductCategoryFeatured(productUid, categoryUid);\n\t}", "@Test\n\tpublic void testUpdateFeaturedProductOrder() {\n\t\t// set up product and category\n\t\tfinal long productUid = 123L;\n\t\tfinal long categoryUid = 234L;\n\t\tfinal Product firstProduct = new ProductImpl();\n\t\tfirstProduct.setUidPk(productUid);\n\t\tfirstProduct.setGuid(String.valueOf(productUid));\n\n\t\tCategory category = new CategoryImpl();\n\t\tcategory.setUidPk(categoryUid);\n\t\tcategory.setGuid(\"categoryGuid\");\n\t\tcategory.setCatalog(new CatalogImpl());\n\t\t//Add the\n\t\tfirstProduct.addCategory(category);\n\t\tfirstProduct.setFeaturedRank(category, 1);\n\t\t\n\t\tfinal long productUid2 = 12345L;\n\t\tfinal Product secondProduct = new ProductImpl();\n\t\tsecondProduct.setUidPk(productUid2);\n\t\tsecondProduct.setGuid(String.valueOf(productUid2));\n\n\t\tsecondProduct.addCategory(category);\n\t\tsecondProduct.setFeaturedRank(category, 2);\n\n\t\t// mock methods\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(productUid);\n\t\t\t\twill(returnValue(firstProduct));\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(productUid2);\n\t\t\t\twill(returnValue(secondProduct));\n\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(same(firstProduct)));\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(same(secondProduct)));\n\t\t\t}\n\t\t});\n\n\n\t\t// run the service\n\t\tthis.productServiceImpl.updateFeaturedProductOrder(firstProduct.getUidPk(), category.getUidPk(), secondProduct.getUidPk());\n\t\t\n\t\t// check result\n\t\tassertEquals(\"firstProduct should now have a preferred featuring order of 2\",\n\t\t\t\t2, firstProduct.getFeaturedRank(category));\n\t\tassertEquals(\"secondProduct should now have a preferred featuring order of 1\",\n\t\t\t\t1, secondProduct.getFeaturedRank(category));\n\t}", "@Test\n public void testSave() throws Exception {\n ProductCategory productCategory = categoryServiceImpl.findOne(1);\n productCategory.setCategoryName(\"Lego\");\n ProductCategory category = categoryServiceImpl.save(productCategory);\n System.out.println(\"category:\" + category);\n }", "@Test\n\tpublic void addProductToCartFromCategoryDrop() {\n\t}", "@Test\n\tpublic void updateProductTest2() throws Exception {\n Attribute attr1 = ProductAttributeGenerator.generate(Generator.randomString(6, Generator.AlphaChars), \"Date\", \"AdminEntered\", \"Datetime\", false, false, true);\n Attribute createdAttr = AttributeFactory.addAttribute(apiContext, attr1, HttpStatus.SC_CREATED);\n \n\t\t\n\t //update product type\n ProductType myPT = ProductTypeGenerator.generate(createdAttr, Generator.randomString(5, Generator.AlphaChars));\n ProductType createdPT = ProductTypeFactory.addProductType(apiContext, DataViewMode.Live, myPT, HttpStatus.SC_CREATED);\n \n Product myProduct = ProductGenerator.generate(createdPT);\n List<ProductPropertyValue> salePriceDateValue = new ArrayList<ProductPropertyValue>();\n ProductPropertyValue salePriceValue = new ProductPropertyValue();\n DateTime date = DateTime.now();\n salePriceValue.setValue(date);\n salePriceDateValue.add(salePriceValue);\n myProduct.getProperties().get(myProduct.getProperties().size()-1).setValues(salePriceDateValue);\n Product createdProduct = ProductFactory.addProduct(apiContext, DataViewMode.Live, myProduct, HttpStatus.SC_CREATED);\n\t}", "@Test\n public void putAlterarCategoriaProdutoTest() throws ApiException {\n Integer productCategoryCode = null;\n String product = null;\n api.putAlterarCategoriaProduto(productCategoryCode, product);\n\n // TODO: test validations\n }", "@Test\n\tpublic final void testGetCategoryFromProductByUid() {\n\t\tfinal long categoryUid = 234L;\n\t\tfinal Category mockCategory = context.mock(Category.class);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(mockCategory).getUidPk();\n\t\t\t\twill(returnValue(categoryUid));\n\t\t\t}\n\t\t});\n\t\tfinal Set<Category> categories = new HashSet<Category>();\n\t\tcategories.add(mockCategory);\n\t\tfinal long productUid = 123L;\n\t\tfinal Product mockProduct = context.mock(Product.class);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(mockProduct).getUidPk();\n\t\t\t\twill(returnValue(productUid));\n\n\t\t\t\tallowing(mockProduct).getCategories();\n\t\t\t\twill(returnValue(categories));\n\t\t\t}\n\t\t});\n\t\tfinal Product product = mockProduct;\n\t\t\n\t\tassertSame(\"Returned category should be the one the product belongs to\", mockCategory,\n\t\t\t\tproductServiceImpl.getCategoryFromProductByUid(product, categoryUid));\n\t\t\n\t\tassertNull(\"non-existent category should return a null result\", productServiceImpl.getCategoryFromProductByUid(product, 0L));\n\t\t\n\t}", "@Test\n public void test() {\n categoryService.addCategory(new Category(null, \"c\", 5423));\n\n //categoryService.removeCategory(1001);\n\n }", "public void setCategoryId(long categoryId);", "@Test\r\n public void testCategory() {\n Category createdCategory1 = createCategory(getRootCategory());\r\n\r\n // verify if created\r\n Category newRoot = getBuilder(\"/category/1\").get(Category.class);\r\n Assert.assertTrue(newRoot.contains(createdCategory1.getId()));\r\n\r\n // create a new category\r\n Category createdCategory2 = createCategory(getRootCategory());\r\n\r\n // verify if created\r\n Category newRoot2 = getBuilder(\"/category/1\").get(Category.class);\r\n Assert.assertTrue(newRoot2.contains(createdCategory1.getId()));\r\n Assert.assertTrue(newRoot2.contains(createdCategory2.getId()));\r\n\r\n Category actualCat2 = getBuilder(\"/category/\" + createdCategory2.getId()).get(Category.class);\r\n\r\n Dimension saved1 = createDimension();\r\n Category catHasDim = getBuilder(\"/category/add-dimension/\" + createdCategory1.getId() + \"/\" + saved1.getId()).post(Category.class, \" \");\r\n Assert.assertTrue(catHasDim.hasDimension(saved1.getId()));\r\n\r\n Dimension saved2 = createDimension();\r\n Category cat3 = getBuilder(\"/category/add-dimension/\" + createdCategory1.getId() + \"/\" + saved2.getId()).post(Category.class, \" \");\r\n Assert.assertTrue(cat3.hasDimension(saved1.getId()));\r\n Assert.assertTrue(cat3.hasDimension(saved2.getId()));\r\n\r\n // remove dim1\r\n getBuilder(\"/dimension/remove/\" + saved1.getId()).post(\" \");\r\n\r\n try {\r\n getBuilder(\"/dimension/\" + saved1.getId()).get(String.class);\r\n Assert.assertTrue(false);\r\n } catch (UniformInterfaceException e) {\r\n Assert.assertEquals(ServiceError.NotFound.getErrorCode(), e.getResponse().getStatus());\r\n }\r\n\r\n Category cat4 = getBuilder(\"/category/\" + createdCategory1.getId()).get(Category.class);\r\n Assert.assertFalse(cat4.hasDimension(saved1.getId()));\r\n }", "public void setProduct(entity.APDProduct value);", "Boolean updateCategory(DvdCategory category) throws DvdStoreException;", "@Test\n public void testSetCategoryDescription() {\n System.out.println(\"setCategoryDescription\");\n String CategoryDescription = \"testDescription\";\n Category instance = new Category();\n instance.setCategoryDescription(CategoryDescription);\n assertEquals(CategoryDescription, instance.getCategoryDescription());\n }", "@Override\n\tpublic void setCategory_id(long category_id) {\n\t\t_buySellProducts.setCategory_id(category_id);\n\t}", "public void setFeatured(boolean flag) {\n\t\tthis.featured=flag;\n\t}", "@Test\r\n public void createFoodCategory() {\r\n repo = ctx.getBean(FoodCategoryRepository.class);\r\n// MainMeal meal= new MainMeal.Builder(\"Pap and Vors\")\r\n// .Amountprice(79000)\r\n// .build();\r\n FoodCategory cat= new FoodCategory.Builder(\"Gatsby\")\r\n .build();\r\n repo.save(cat);\r\n id = cat.getId(); \r\n Assert.assertNotNull(cat);\r\n \r\n \r\n }", "@Test\n public void addToCategory() throws Exception {\n withProductAndUnconnectedCategory(client(), (final Product product, final Category category) -> {\n assertThat(product.getMasterData().getStaged().getCategories()).isEmpty();\n\n final String orderHint = \"0.123\";\n final Product productWithCategory = client()\n .executeBlocking(ProductUpdateCommand.of(product, AddToCategory.of(category, orderHint)));\n\n final Reference<Category> categoryReference = productWithCategory.getMasterData().getStaged().getCategories().stream().findAny().get();\n assertThat(categoryReference.referencesSameResource(category)).isTrue();\n assertThat(productWithCategory.getMasterData().getStaged().getCategoryOrderHints().get(category.getId())).isEqualTo(orderHint);\n\n final Product productWithoutCategory = client()\n .executeBlocking(ProductUpdateCommand.of(productWithCategory, RemoveFromCategory.of(category)));\n\n assertThat(productWithoutCategory.getMasterData().getStaged().getCategories()).isEmpty();\n });\n }", "@Override\n\tpublic boolean update(ProductCategory procate) {\n\t\treturn false;\n\t}", "Product saveProduct (Long categoryId, Long productId);", "@Test\n public void deletarProductCategoryTest() throws ApiException {\n Integer productCategoryCode = null;\n api.deletarProductCategory(productCategoryCode);\n\n // TODO: test validations\n }", "@Before\n\tpublic void mockData (){\n\t\tcategoryRequest.setCategoryName(\"Yoga\");\n\t\t\n\t}", "public void setProductCategory(java.lang.String productCategory) {\r\n this.productCategory = productCategory;\r\n }", "@Test\n public void addCategory_DatabaseUpdates(){\n int returned = testDatabase.addCategory(category);\n Category retrieved = testDatabase.getCategory(returned);\n assertEquals(\"addCategory - Correct Category Name\", \"Lunch\", retrieved.getName());\n assertEquals(\"addCategory - Set Category ID\", returned, retrieved.getKeyID());\n }", "@Test\n public void testSetCategoryParentId() {\n System.out.println(\"setCategoryParentId\");\n int CategoryParentId = 0;\n Category instance = new Category();\n instance.setCategoryParentId(CategoryParentId);\n assertEquals(CategoryParentId, instance.getCategoryId());\n }", "@Test\r\n\tpublic void testProductSuccess() {\r\n\r\n\t\tProductBean product = new ProductBean();\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tApplicationContext ctx = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\tHomeService service = (HomeService) ctx.getBean(\"homeservice\");\r\n\t\tproduct = service.getProductDesc(2);\r\n\t\tSystem.out.println(product.getProductBrand());\r\n\t\tSystem.out.println(product.getProductName());\r\n\r\n\t}", "@Before\n public void getTestCategory() {\n if (sessionId == null) {\n getTestSession();\n }\n\n if (testCategoryId == null) {\n testCategoryId = Util.createTestCategory(TEST_CATEGORY_NAME, sessionId);\n }\n }", "public void updateProductDetails(Integer ProductID, String ProductCategory ) {\r\n\t\t\tSystem.out.println(\" *************from inside updateProductDetails()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// update logic\r\n\r\n\t\t\t\tProduct product = (Product) sessionObj.get(Product.class, ProductID);\r\n\r\n\t\t\t\tproduct.setProductCategory(ProductCategory);\r\n\t\t\t\t\r\n\r\n\t\t\t\tsessionObj.update(product);// hibernate will form update query automatically\r\n\r\n\t\t\t\tSystem.out.println(\"update sucessfully...\"+product.getProductId()+\" \"+product.getProductName());\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\r\n\t\t}", "@Test\n public void setProductCount() throws NegativeValueException {\n cartItem.setProductCount(56);\n int expected = 56;\n int actual = cartItem.getProductCount();\n assertEquals(expected, actual);\n }", "@Test\r\n public void testSetFakturaId() {\r\n System.out.println(\"setFakturaId\");\r\n Short fakturaId = null;\r\n Faktura instance = new Faktura();\r\n instance.setFakturaId(fakturaId);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void setProduct() throws NullReferenceException {\n cartItem.setProduct(product1);\n assertSame(product1, cartItem.getProduct());\n }", "@Test\n public void testSetPrice() {\n System.out.println(\"setPrice\");\n int price = 0;\n Menu instance = MenuFactory.createMenu(MenuType.FOOD, name, 14000);\n instance.setPrice(price);\n assertTrue(instance.getPrice() != 14000);\n assertTrue(instance.getPrice() == price);\n }", "public void setProductId(String productId) ;", "public void testUpdateProduct() {\n\t\tProduct product=productDao.selectProducts(33);\n\t\tproduct.setPrice(100.0);\n\t\tproduct.setQuantity(1);\n\t\tproductDao.updateProduct(product);//product has updated price and update quantity\n\t\tassertTrue(product.getPrice()==100.0);\n\t\tassertTrue(product.getQuantity()==1);\n\t}", "@Test\n\tpublic void testUpdateCategory() throws Exception {\n\n\t\tCategoryResponse categoryResponse = new CategoryResponse();\n\t\tList<Category> categories = new ArrayList<>();\n\t\tCategory category = new Category();\n\t\tcategory.setTenantId(\"default\");\n\t\tcategory.setParentId(Long.valueOf(1));\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\t\tcategory.setName(\"Flammables\");\n\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.updateCategoryMaster(any(CategoryRequest.class),any(String.class))).thenReturn(categoryResponse);\n\t\t\tmockMvc.perform(post(\"/category/v1/_update\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.content(getFileContents(\"categoryUpdateRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryUpdateResponse.json\")));\n\n\t\t} catch (Exception e) {\n\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}", "boolean isProductCategoryConfigurable(int productCategoryId);", "void updateCatFood(Long catId, Long foodId, Long newFoodId);", "@Override\n public void onChanged(@Nullable final ProductCategory productCategoryFromDb) {\n productCategory = productCategoryFromDb;\n notifyProductCategoryChanged();\n }", "@Test\n public void getCategory_CorrectInformation(){\n int returned = testDatabase.addCategory(category);\n Category retrieved = testDatabase.getCategory(returned);\n assertEquals(\"getCategory - Correct Name\", \"Lunch\", retrieved.getName());\n assertEquals(\"getCategory - Correct ID\", returned, retrieved.getKeyID());\n }", "void add(ProductCategory category);", "public boolean setTicketCategory(Category category) {\n\t\tif (getGuild() == null || category == null || !category.getGuild().equals(getGuild())) { return false; }\n\t\tticketCategory = category;\n\t\tconfig.save();\n\t\tif (!config.isLoading()) { TMEventManager.departmentChange(this, ChangeType.Dept.CATEGORY); }\n\t\treturn true;\n\t}", "@Test\n\tpublic void testGetCategoryService() {\n\t\tassertSame(categoryService, this.importGuidHelper.getCategoryService());\n\t}", "public void setCategory(String newCategory) {\n category = newCategory;\n }", "@Test\n @WithMockUser(\"[email protected]\")\n public void testNewExpenseCategoryData () throws Exception {\n mvc.perform(post(\"/api/newExpenseCategory\")\n .contentType(MediaType.APPLICATION_JSON)\n .param(\"name\",\"Test expense category\")\n .param(\"color\", \"#111111\")\n .param(\"note\", \"Test expense category note\")\n ).andExpect(matchAll(\n status().isOk()\n ));\n\n mvc.perform(get(\"/api/getExpenseCategory\"))\n .andExpect(matchAll(\n status().isOk(),\n jsonPath(\"$.category\", hasSize(1))\n ));\n }", "public void setProductDescription(String productDescription) {\r\n/* 438 */ this._productDescription = productDescription;\r\n/* */ }", "public void setProduct(final ProductReference product);", "@Test\n public void productTest() {\n // TODO: test product\n }", "public void setCategory_id(int category_id) {\n this.category_id = category_id;\n }", "@Test\n public void deleteCategory_ReturnsTrue(){\n int returned = testDatabase.addCategory(category);\n assertEquals(\"deleteCategory - Returns True\", true, testDatabase.deleteCategory(returned));\n }", "void setProductDescription(java.lang.String productDescription);", "@Test\n public void testAddProduct() {\n }", "@Test\n\tpublic void testUpdateCategoryDetails() throws Exception {\n\n\t\tCategoryResponse categoryResponse = new CategoryResponse();\n\t\tList<Category> categories = new ArrayList<>();\n\t\tCategory category = new Category();\n\t\tcategory.setTenantId(\"default\");\n\t\tcategory.setParentId(Long.valueOf(1));\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\t\tcategory.setName(\"Flammables\");\n\n\t\tCategoryDetail details = new CategoryDetail();\n\t\tdetails.setId(Long.valueOf(5));\n\t\tdetails.setCategoryId(Long.valueOf(10));\n\t\tdetails.setFeeType(FeeTypeEnum.fromValue(\"License\"));\n\t\tdetails.setRateType(RateTypeEnum.fromValue(\"Flat_By_Percentage\"));\n\t\tdetails.setUomId(Long.valueOf(1));\n\n\t\tList<CategoryDetail> catDetails = new ArrayList<CategoryDetail>();\n\t\tcatDetails.add(details);\n\n\t\tcategory.setDetails(catDetails);\n\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.updateCategoryMaster(any(CategoryRequest.class),any(String.class))).thenReturn(categoryResponse);\n\t\t\tmockMvc.perform(post(\"/category/v1/_update\").param(\"tenantId\", \"default\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON).content(getFileContents(\"categoryUpdateRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryUpdateResponse.json\")));\n\n\t\t} catch (Exception e) {\n\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}", "public void setProductCategoryId(long productCategoryId) {\n\t\tthis.productCategoryId = productCategoryId;\n\t}", "public void setCategoryId(Long categoryId) {\n this.categoryId = categoryId;\n }", "void updateCategory(Category category);", "void updateCategory(Category category);", "public void setM_Product_ID (int M_Product_ID);", "public void setM_Product_ID (int M_Product_ID);", "@Test\n public void findCategoryById() {\n\n Long categoryId = (long) 1;\n CategoryEto category = this.dishmanagement.findCategory(categoryId);\n assertThat(category).isNotNull();\n }", "public void setCategory(String category);", "@Test\n public void categoryTest() {\n // TODO: test category\n }", "@Test\n public void productOfferingTermTest() {\n // TODO: test productOfferingTerm\n }", "@Test\n public void getCategory_ReturnsCategory(){\n int returned = testDatabase.addCategory(category);\n assertNotEquals(\"getCategory - Return Non-Null Category\",null, testDatabase.getCategory(returned));\n }", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "@Test\n @IfProfileValue(name=\"dept-test-group\", values = {\"all\",\"dept-update\"})\n public void _2_4_2__addBCtoDept() throws Exception {\n Department d = d_1;\n d.addBusinessCategory(bc_1);\n this.mockMvc.perform(put(\"/api/v1.0/companies/\"+\n d.getCompany()+\n \"/departments/\"+\n d.getId())\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(d)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.id\",is(d.getId().toString())))\n .andExpect(jsonPath(\"$.description\",is(d.getDescription())))\n .andExpect(jsonPath(\"$.businessCategories\",hasSize(1)))\n .andExpect(jsonPath(\"$.businessCategories[0].product\",is(bc_1.getProduct())))\n .andExpect(jsonPath(\"$.businessCategories[0].locality\",is(bc_1.getLocality())));\n }", "@Test\n public void addRecipeCategory_DatabaseUpdates(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n RecipeCategory retrieved = new RecipeCategory();\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getKeyID() == returnedCategory){\n retrieved = allCategories.get(i);\n }\n }\n }\n assertEquals(\"addRecipeDirection - Correct RecipeID\", returnedRecipe, retrieved.getRecipeID());\n assertEquals(\"addRecipeDirection - Correct CategoryID\", categoryID, retrieved.getCategoryID());\n }", "void setProduct(x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product product);", "void setProductGroup(java.lang.String productGroup);", "@Test\n public void postCadastrarCategoriaTest() throws ApiException {\n Integer productCategoryCode = null;\n String product = null;\n api.postCadastrarCategoria(productCategoryCode, product);\n\n // TODO: test validations\n }", "@Test\n\tpublic void update() throws Exception {\n\t\tMockito.when(productService.updateProductPriceInfo(Mockito.anyLong(), Mockito.anyFloat())).thenReturn(true);\n\t\tRequestBuilder requestBuilder = MockMvcRequestBuilders.put(\"/products/13860428\")\n\t\t\t\t.accept(MediaType.APPLICATION_JSON).content(expected).contentType(MediaType.APPLICATION_JSON);\n\t\tMvcResult result = mockMvc.perform(requestBuilder).andReturn();\n\n\t\tMockHttpServletResponse response = result.getResponse();\n\n\t\tassertEquals(HttpStatus.OK.value(), response.getStatus());\n\n\t}", "@Override\n\tpublic boolean deleteProductByCategoryId(int categoryId) {\n\t\treturn false;\n\t}", "public void setR_Category_ID (int R_Category_ID);", "@Test\n public void setProductPrice() throws NegativeValueException {\n cartItem.setProductPrice(536);\n double expected = 536;\n double actual = cartItem.getProductPrice();\n assertEquals(expected, actual, 0.0);\n }", "void setFeature(int index, Feature feature);", "@Test\n public void testGetCategoryDescription() {\n System.out.println(\"getCategoryDescription\");\n Category instance = new Category();\n instance.setCategoryDescription(\"kuvaus testi kategorialle\");\n String expResult = \"kuvaus testi kategorialle\";\n String result = instance.getCategoryDescription();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void tc_StoreEvolutionPosternonleafCategory() throws InterruptedException {\n\t\tVodFeatures vod = new VodFeatures(driver);\n\t\tvod.storeEvolutionPosternonleafCategory();\n\t}", "@SuppressWarnings(\"unchecked\")\n@Test\n public void testProductSelection() {\n\t \n\t\tRestAssured.baseURI = baseURL;\n\t\tRequestSpecification request = RestAssured.given();\n\t\t\n\t\t\n\t\trequest.header(\"Content-Type\", \"application/json\");\n\t\t\n\n\t\tJSONObject jobj = new JSONObject();\n\t\t\n\t\tjobj.put(\"product_id\",\"56c815cc56685df2014df1fb\"); //Fetching the product ID from the Login API response\n\t\t\n\t\trequest.body(jobj.toJSONString());\n\n\t\tResponse resp = request.post(\"/product_selection\");\n\t\t\n\t\t\n\t\tint statusCode = resp.getStatusCode();\n\t\tAssert.assertEquals(statusCode,200, \"Status Code is not 200\");\n }", "Boolean insertCategory(DvdCategory category) throws DvdStoreException;", "@Test\n public void deleteRecipeCategory_ReturnsFalse(){\n assertEquals(\"deleteRecipeCategory - Returns False\",false, testDatabase.deleteRecipeCategory(Integer.MAX_VALUE));\n }", "@Test\n\tpublic void testAddCategory() {\n\t\tcategory = new Category();\n\t\tcategory.setName(CATEGORY_NAME);\n\t\tcategory.setDescription(\"A wonderful addition to your home. 80 inches\");\n\t\tcategory.setImageURL(\"CAT_1.png\");\n\n\t\tassertEquals(\"Successfully added a category to the database table\", true, categoryDAO.add(category));\n\t}", "@Test\n public void deleteRecipeCategory_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeCategory - Returns True\",true, testDatabase.deleteRecipeCategory(returned));\n }", "@Test\n @IfProfileValue(name=\"dept-test-group\", values = {\"all\",\"dept-update\"})\n public void _2_4_3_removeBCfromDept() throws Exception {\n Department d = d_1_1;\n d.removeBusinessCategory(bc_2);\n this.mockMvc.perform(put(\"/api/v1.0/companies/\"+\n d.getCompany()+\n \"/departments/\"+\n d.getId())\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(d)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.id\",is(d.getId().toString())))\n .andExpect(jsonPath(\"$.description\",is(d.getDescription())))\n .andExpect(jsonPath(\"$.businessCategories\").doesNotExist());\n }", "@Override\n\tpublic void update(Category entity) {\n\n\t}", "void deleteCategoryProducts(long id);", "public void setCategoryId(Integer categoryId) {\n this.categoryId = categoryId;\n }", "@Test\r\n public void testSetSatFatPerHundredGrams()\r\n {\r\n System.out.println(\"setSatFatPerHundredGrams\");\r\n double satFatPerHundredGrams = 3.2;\r\n FoodBean instance = new FoodBean(5, \"Beans on toast\", \r\n Date.valueOf(\"2014-04-01\"), Time.valueOf(\"10:00:00\"), \r\n 100, 120, 5, 7, 500, 0, 3);\r\n instance.setSatFatPerHundredGrams(satFatPerHundredGrams);\r\n assertEquals(satFatPerHundredGrams, instance.getSatFatPerHundredGrams(), 0.0);\r\n }", "@Test\n public void deleteCategory_ReturnsFalse(){\n assertEquals(\"deleteCategory - Returns False\", false, testDatabase.deleteCategory(Integer.MAX_VALUE));\n }", "@Test\n public void testCreateProductShouldCorrect() throws Exception {\n when(productRepository.existsByName(productRequest.getName())).thenReturn(false);\n when(productRepository.save(any(Product.class))).thenReturn(product);\n\n testResponseData(RequestInfo.builder()\n .request(post(PRODUCT_ENDPOINT))\n .token(adminToken)\n .body(productRequest)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "public void setProduct(Product product) {\n this.product = product;\n }", "public void setProduct_id(int product_id) {\r\n\t\tthis.product_id = product_id;\r\n\t}", "@Test\n public void productOfferingPriceTest() {\n // TODO: test productOfferingPrice\n }", "@Test\n\tpublic void getCategoryTest() {\n\t\tList<Map<String, String>> list = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"category\", \"Placement\");\n\t\tlist.add(map);\n\t\twhen(TicketDao.getCategory()).thenReturn(list);\n\t\tString category = \"<option value='\" + \"Placement\" + \"'>\" + \"Placement\" + \"</option>\";\n\t\tassertEquals(category, Service.getCategory());\n\t}", "@Test\n\tpublic void testAddQuestionToCategory() {\n\t\t// Invalid user id\n\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\ttry {\n\t\t\tquestionLogic.addQuestionToCategory( tdp.question1_location1.getId() , tdp.category1_location1.getId(), LOCATION1_ID);\n\t\t\tAssert.fail(\"Should throw SecurityException\");\n\t\t} catch (SecurityException se) {\n\t\t\tAssert.assertNotNull(se);\n\t\t} \n\t\t\n\t\t// Valid user id\n\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\ttry {\n\t\t\tquestionLogic.addQuestionToCategory(tdp.question1_location1.getId() , tdp.category1_location1.getId(), LOCATION1_ID);\n\t\t} catch (Exception se) {\n\t\t\tAssert.fail(\"Should not throw Exception\");\n\t\t}\n\t\tAssert.assertTrue(tdp.question1_location1.getCategory().getId().equals(tdp.category1_location1.getId()));\n\t}", "@Test\n public void testProductOfferingCreate() {\n // TODO: test ProductOfferingCreate\n }", "@Test\n public void test3_updateProductToOrder() {\n ProductDTO productDTO= new ProductDTO();\n productDTO.setSKU(UUID.randomUUID().toString());\n productDTO.setName(\"TOMATOES\");\n productDTO.setPrice(new BigDecimal(30));\n productService.saveProduct(productDTO,\"test\");\n\n //get id from product and order\n long productId = productService.getIdForTest();\n long orderId = orderService.getIdForTest();\n long orderDetailId = orderService.getIdForTestOrderDetail();\n\n OrderDetailDTO orderDetailDTO = new OrderDetailDTO();\n orderDetailDTO.setId(orderDetailId);\n orderDetailDTO.setOrderId(orderId);\n orderDetailDTO.setProductId(productId);\n String res = orderService.updateProductToOrder(orderDetailDTO,\"test\");\n assertEquals(null,res);\n }", "@Test(expected = IndexOutOfBoundsException.class)\r\n\tpublic void testProductFailure() {\r\n\r\n\t\tProductBean product = new ProductBean();\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tApplicationContext ctx = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\tHomeService service = (HomeService) ctx.getBean(\"homeservice\");\r\n\t\tproduct = service.getProductDesc(3);\r\n\t\tSystem.out.println(product.getProductBrand());\r\n\t\tSystem.out.println(product.getProductName());\r\n\r\n\t}", "public void setProductId(int productId) {\n this.productId = productId;\n }", "public void setProductId(int productId) {\n this.productId = productId;\n }", "public void testMarkAllItemsSelectedInCategory()\n\t{\n\t\t// Arrange\n\t\taddListWith6Items(\"testlist\");\n\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, true);\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tCategoryBean newCategory1 = newList.getCategory(\"cat1\");\n\t\tCategoryBean newCategory2 = newList.getCategory(\"cat2\");\n\t\tassertTrue(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t\t\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, false);\n\t\tallLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tnewList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tnewCategory1 = newList.getCategory(\"cat1\");\n\t\tnewCategory2 = newList.getCategory(\"cat2\");\n\t\tassertFalse(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t}", "@Test\n void updateSuccess() {\n RunCategory categoryToUpdate = (RunCategory) dao.getById(2);\n categoryToUpdate.setCategoryName(\"New Name\");\n dao.saveOrUpdate(categoryToUpdate);\n RunCategory categoryAfterUpdate = (RunCategory) dao.getById(2);\n assertEquals(categoryToUpdate, categoryAfterUpdate);\n }", "@PutMapping(\"/update/{id}\")\n public ResponseEntity<ProductCategory> updateTutorial(@PathVariable(\"id\") int id, @RequestBody ProductCategory category) {\n Optional<ProductCategory> data = productCategoryRepository.findById(id);\n\n // if present, update the category\n if (data.isPresent()) {\n ProductCategory _category = data.get();\n _category.setCategoryName(category.getCategoryName());\n return new ResponseEntity<>(productCategoryRepository.save(_category), HttpStatus.OK);\n } else {\n return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n }\n }" ]
[ "0.8029201", "0.6885217", "0.58937895", "0.58133006", "0.5778207", "0.57653", "0.5698052", "0.563435", "0.5626581", "0.5579202", "0.55509216", "0.55376565", "0.5517951", "0.5517258", "0.5448059", "0.5410232", "0.53945124", "0.53808874", "0.53607315", "0.5322413", "0.5320038", "0.5292396", "0.52467227", "0.5240173", "0.5223932", "0.5202487", "0.5200228", "0.5186598", "0.5185612", "0.5172251", "0.515327", "0.5150288", "0.5133314", "0.5127803", "0.51200545", "0.5114921", "0.51093936", "0.5094252", "0.50898564", "0.5082717", "0.5082146", "0.5077889", "0.50707656", "0.50705", "0.50680107", "0.5067484", "0.5042565", "0.502099", "0.50162286", "0.5012866", "0.5006401", "0.49795118", "0.49758604", "0.49702868", "0.49702868", "0.49692184", "0.49692184", "0.49672514", "0.4966259", "0.4959809", "0.49555767", "0.49527296", "0.4947358", "0.4943217", "0.49280596", "0.49167305", "0.49128318", "0.49118686", "0.48916316", "0.48903736", "0.48858124", "0.4881666", "0.48792493", "0.4877356", "0.48713794", "0.4867469", "0.48574468", "0.4854467", "0.48499992", "0.48493123", "0.48477086", "0.48470598", "0.4846297", "0.48403317", "0.48390934", "0.48386008", "0.48373964", "0.48321915", "0.4824584", "0.48131448", "0.4810113", "0.48066202", "0.48049363", "0.48039138", "0.4797956", "0.4791224", "0.4791224", "0.47794813", "0.47787225", "0.47751027" ]
0.88283044
0
Test that given one category and two products, the ProductServiceImpl.updateFeaturedProductOrder method will swap the preferred featured index of the two products in that category. e.g. product1 is the first featured item in the category and product2 is the second featured item in the category. After calling the method, product1 should be the second featured item, and product2 should be the first featured item.
@Test public void testUpdateFeaturedProductOrder() { // set up product and category final long productUid = 123L; final long categoryUid = 234L; final Product firstProduct = new ProductImpl(); firstProduct.setUidPk(productUid); firstProduct.setGuid(String.valueOf(productUid)); Category category = new CategoryImpl(); category.setUidPk(categoryUid); category.setGuid("categoryGuid"); category.setCatalog(new CatalogImpl()); //Add the firstProduct.addCategory(category); firstProduct.setFeaturedRank(category, 1); final long productUid2 = 12345L; final Product secondProduct = new ProductImpl(); secondProduct.setUidPk(productUid2); secondProduct.setGuid(String.valueOf(productUid2)); secondProduct.addCategory(category); secondProduct.setFeaturedRank(category, 2); // mock methods context.checking(new Expectations() { { oneOf(mockProductDao).getWithCategories(productUid); will(returnValue(firstProduct)); oneOf(mockProductDao).getWithCategories(productUid2); will(returnValue(secondProduct)); oneOf(mockProductDao).saveOrUpdate(with(same(firstProduct))); oneOf(mockProductDao).saveOrUpdate(with(same(secondProduct))); } }); // run the service this.productServiceImpl.updateFeaturedProductOrder(firstProduct.getUidPk(), category.getUidPk(), secondProduct.getUidPk()); // check result assertEquals("firstProduct should now have a preferred featuring order of 2", 2, firstProduct.getFeaturedRank(category)); assertEquals("secondProduct should now have a preferred featuring order of 1", 1, secondProduct.getFeaturedRank(category)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testSetProductCategoryFeatured() {\n\t\t// set up product and category\n\t\tfinal long productUid = 123L;\n\t\tfinal long categoryUid = 234L;\n\t\tfinal Product product = new ProductImpl();\n\t\tproduct.setUidPk(productUid);\n\t\tproduct.setGuid(\"productGuid\");\n\n\t\tCategory category = new CategoryImpl();\n\t\tcategory.setUidPk(categoryUid);\n\t\tcategory.setGuid(\"categoryGuid\");\n\t\tcategory.setCatalog(new CatalogImpl());\n\t\tproduct.addCategory(category);\n\n\t\t// mock methods\n\t\t\n\t\tArrayList<Integer> returnList = new ArrayList<Integer>();\n\t\treturnList.add(Integer.valueOf(2));\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(with(any(long.class)));\n\t\t\t\twill(returnValue(product));\n\n\t\t\t\toneOf(mockProductDao).getMaxFeaturedProductOrder(with(any(long.class)));\n\t\t\t\twill(returnValue(2));\n\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(same(product)));\n\t\t\t}\n\t\t});\n\n\t\t// run the service\n\t\tint newOrder = this.productServiceImpl.setProductCategoryFeatured(product.getUidPk(), category.getUidPk());\n\n\t\t// check result\n\t\tassertEquals(newOrder, 2 + 1);\n\t}", "@Test\n\tpublic final void testResetProductCategoryFeatured() {\n\t\tfinal Product mockProduct = context.mock(Product.class);\n\t\tfinal Category mockCategory = context.mock(Category.class);\n\n\t\tProductServiceImpl service = new ProductServiceImpl() {\n\t\t\t@Override\n\t\t\tpublic Category getCategoryFromProductByUid(final Product product, final long categoryUid) {\n\t\t\t\treturn mockCategory;\n\t\t\t}\n\t\t};\n\t\t\n\t\tservice.setProductDao(mockProductDao);\n\t\tfinal long productUid = 123L;\n\t\tfinal long categoryUid = 234L;\n\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\t//make sure it's set to 0\n\t\t\t\toneOf(mockProduct).setFeaturedRank(mockCategory, 0);\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(with(any(long.class)));\n\t\t\t\twill(returnValue(mockProduct));\n\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(any(Product.class)));\n\t\t\t\twill(returnValue(mockProduct));\n\t\t\t}\n\t\t});\n\t\tservice.resetProductCategoryFeatured(productUid, categoryUid);\n\t}", "public void testUpdateUserDefinedSortWithOnlyTwoElementsInList()\n\t{\n\t\t// arrange\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tlong listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\n\t\tlong[] categoryIds = new long[5];\n\t\tUri categoryUri = helper.insertNewCategory(listId, \"dudus\", 1);\n\t\tcategoryIds[0] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\tcategoryUri = helper.insertNewCategory(listId, \"dudus\", 2);\n\t\tcategoryIds[1] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\n\t\t// Act & Assert\n\t\t// This test updates the sort order of category from 2 to 1 (0-based)\n\t\tservice.updateUserDefinedSort(listId, categoryIds[1], 1, 0);\n\n\t\tlong[] expectedCategoryIds = new long[2];\n\t\texpectedCategoryIds[0] = categoryIds[1];\n\t\texpectedCategoryIds[1] = categoryIds[0];\n\n\t\t// now get all categories for activity\n\t\tCursor categoriesToBeUpdatedCursor = dataProvider.query(CategoryColumns.CONTENT_URI,\n\t\t\t\tCATEGORY_PROJECTION, CategoryColumns.ACTIVITY_ID + \" = \" + listId, null,\n\t\t\t\tCategoryColumns.SORT_POSITION);\n\n\t\tcategoriesToBeUpdatedCursor.moveToFirst();\n\t\twhile (!categoriesToBeUpdatedCursor.isAfterLast())\n\t\t{\n\t\t\tlong catId = categoriesToBeUpdatedCursor.getLong(categoriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(CategoryColumns._ID));\n\n\t\t\tint position = categoriesToBeUpdatedCursor.getInt(categoriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(CategoryColumns.SORT_POSITION));\n\n\t\t\tassertEquals(expectedCategoryIds[position - 1], catId);\n\t\t\tcategoriesToBeUpdatedCursor.moveToNext();\n\t\t}\n\t}", "@Test\n\tpublic void updateProductTest2() throws Exception {\n Attribute attr1 = ProductAttributeGenerator.generate(Generator.randomString(6, Generator.AlphaChars), \"Date\", \"AdminEntered\", \"Datetime\", false, false, true);\n Attribute createdAttr = AttributeFactory.addAttribute(apiContext, attr1, HttpStatus.SC_CREATED);\n \n\t\t\n\t //update product type\n ProductType myPT = ProductTypeGenerator.generate(createdAttr, Generator.randomString(5, Generator.AlphaChars));\n ProductType createdPT = ProductTypeFactory.addProductType(apiContext, DataViewMode.Live, myPT, HttpStatus.SC_CREATED);\n \n Product myProduct = ProductGenerator.generate(createdPT);\n List<ProductPropertyValue> salePriceDateValue = new ArrayList<ProductPropertyValue>();\n ProductPropertyValue salePriceValue = new ProductPropertyValue();\n DateTime date = DateTime.now();\n salePriceValue.setValue(date);\n salePriceDateValue.add(salePriceValue);\n myProduct.getProperties().get(myProduct.getProperties().size()-1).setValues(salePriceDateValue);\n Product createdProduct = ProductFactory.addProduct(apiContext, DataViewMode.Live, myProduct, HttpStatus.SC_CREATED);\n\t}", "@Test\n public void testEditProduct() throws Exception {\n System.out.println(\"editProduct\");\n Product p;\n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n p = prs.get(0);\n String nameNew = \"newName\", nameOld = p.getName();\n p.setName(nameNew);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.isEmpty());\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.contains(p));\n assertTrue(prs.size() == 1);\n p.setName(nameOld);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.isEmpty());\n }", "public void testUpdateUserDefinedSortWithMultipleElementsInList()\n\t{\n\t\t// arrange\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tlong listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\n\t\tlong[] categoryIds = new long[5];\n\t\tUri categoryUri = helper.insertNewCategory(listId, \"dudus\", 1);\n\t\tcategoryIds[0] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\tcategoryUri = helper.insertNewCategory(listId, \"dudus\", 2);\n\t\tcategoryIds[1] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\tcategoryUri = helper.insertNewCategory(listId, \"dudus\", 3);\n\t\tcategoryIds[2] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\tcategoryUri = helper.insertNewCategory(listId, \"dudus\", 4);\n\t\tcategoryIds[3] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\tcategoryUri = helper.insertNewCategory(listId, \"dudus\", 5);\n\t\tcategoryIds[4] = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\n\t\t// Act\n\t\t// This test updates the sort order of category from 3 to 1 (0-based)\n\t\tservice.updateUserDefinedSort(listId, categoryIds[3], 3, 1);\n\n\t\tlong[] expectedCategoryIds = new long[5];\n\t\texpectedCategoryIds[0] = categoryIds[0];\n\t\texpectedCategoryIds[1] = categoryIds[3];\n\t\texpectedCategoryIds[2] = categoryIds[1];\n\t\texpectedCategoryIds[3] = categoryIds[2];\n\t\texpectedCategoryIds[4] = categoryIds[4];\n\n\t\t// now get all categories for activity\n\t\tCursor categoriesToBeUpdatedCursor = dataProvider.query(CategoryColumns.CONTENT_URI,\n\t\t\t\tCATEGORY_PROJECTION, CategoryColumns.ACTIVITY_ID + \" = \" + listId, null,\n\t\t\t\tCategoryColumns.SORT_POSITION);\n\n\t\tlong[] updatedCategoryIds = new long[5];\n\t\tcategoriesToBeUpdatedCursor.moveToFirst();\n\t\twhile (!categoriesToBeUpdatedCursor.isAfterLast())\n\t\t{\n\t\t\tlong catId = categoriesToBeUpdatedCursor.getLong(categoriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(CategoryColumns._ID));\n\n\t\t\tint position = categoriesToBeUpdatedCursor.getInt(categoriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(CategoryColumns.SORT_POSITION));\n\n\t\t\tupdatedCategoryIds[position - 1] = catId;\n\t\t\tcategoriesToBeUpdatedCursor.moveToNext();\n\t\t}\n\n\t\t// Assert\n\t\tfor (int i = 0; i < 5; i++)\n\t\t\tassertEquals(expectedCategoryIds[i], updatedCategoryIds[i]);\n\t}", "@Test(priority =1)\n\tpublic void userAddProductsToCompareList() {\n\t\tsearch = new SearchPage(driver);\n\t\tproductDetails = new ProductDetailsPage(driver);\n\t\tcompare = new AddToCompareListPage(driver);\n\n\t\tsearch.searchUsingAutoCompleteList(\"niko\");\n\t\tassertTrue(productDetails.productNameInBreadCrumb.getText().equalsIgnoreCase(firstProductName));\n\t\tproductDetails.addToCompareList();\n\t\t\n\t\tsearch.searchUsingAutoCompleteList(\"leic\");\n\t\tproductDetails = new ProductDetailsPage(driver);\n\t\tassertTrue(productDetails.productNameInBreadCrumb.getText().equalsIgnoreCase(secondProductName));\n\t\tproductDetails.addToCompareList();\n\t\tproductDetails.openProductComparisonPage();\n\t\tcompare.compareProducts();\n\n\t}", "public void testUpdateUserDefinedSortForEntryWithOnlyTwoElementsInList()\n\t{\n\t\t// arrange\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tlong listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\t\tUri categoryUri = helper.insertNewCategory(listId, \"dudus\", 1);\n\t\tlong categoryId = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\n\t\tlong[] entryIds = new long[2];\n\t\tUri entryUri = helper.insertNewItem(categoryId, \"dudus\", true, 1);\n\t\tentryIds[0] = Integer.parseInt(entryUri.getPathSegments().get(1));\n\t\tentryUri = helper.insertNewItem(categoryId, \"dudus2\", true, 2);\n\t\tentryIds[1] = Integer.parseInt(entryUri.getPathSegments().get(1));\n\n\t\t// Act & Assert\n\t\t// This test updates the sort order of entry from 2 to 1 (0-based)\n\t\tservice.updateUserDefinedSortForEntry(categoryId, entryIds[1], 1, 0);\n\n\t\tlong[] expectedEntryIds = new long[2];\n\t\texpectedEntryIds[0] = entryIds[1];\n\t\texpectedEntryIds[1] = entryIds[0];\n\n\t\t// now get all entries for category\n\t\tCursor entriesToBeUpdatedCursor = dataProvider.query(EntryColumns.CONTENT_URI,\n\t\t\t\tENTRY_PROJECTION, EntryColumns.CATEGORY_ID + \" = \" + categoryId, null,\n\t\t\t\tEntryColumns.SORT_POSITION);\n\n\t\tlong[] updatedEntryIds = new long[2];\n\t\tentriesToBeUpdatedCursor.moveToFirst();\n\t\twhile (!entriesToBeUpdatedCursor.isAfterLast())\n\t\t{\n\t\t\tlong entId = entriesToBeUpdatedCursor.getLong(entriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(EntryColumns._ID));\n\n\t\t\tint position = entriesToBeUpdatedCursor.getInt(entriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(EntryColumns.SORT_POSITION));\n\n\t\t\tupdatedEntryIds[position - 1] = entId;\n\t\t\tentriesToBeUpdatedCursor.moveToNext();\n\t\t}\n\t\t// Assert\n\t\tfor (int i = 0; i < 2; i++)\n\t\t\tassertEquals(expectedEntryIds[i], updatedEntryIds[i]);\n\t}", "@Test\n public void test3_updateProductToOrder() {\n ProductDTO productDTO= new ProductDTO();\n productDTO.setSKU(UUID.randomUUID().toString());\n productDTO.setName(\"TOMATOES\");\n productDTO.setPrice(new BigDecimal(30));\n productService.saveProduct(productDTO,\"test\");\n\n //get id from product and order\n long productId = productService.getIdForTest();\n long orderId = orderService.getIdForTest();\n long orderDetailId = orderService.getIdForTestOrderDetail();\n\n OrderDetailDTO orderDetailDTO = new OrderDetailDTO();\n orderDetailDTO.setId(orderDetailId);\n orderDetailDTO.setOrderId(orderId);\n orderDetailDTO.setProductId(productId);\n String res = orderService.updateProductToOrder(orderDetailDTO,\"test\");\n assertEquals(null,res);\n }", "@Test\n public void testUpdateWithDifferentExistingNameShouldFail() {\n when(repository().queryByPredicates(any(Predicate.class))).thenAnswer(env -> productMockSecond);\n\n // when\n org.jboss.pnc.dto.Product productUpdate = org.jboss.pnc.dto.Product.builder()\n .id(productMock.getId().toString())\n .name(productMockSecond.getName())\n .abbreviation(productMock.getAbbreviation())\n .description(productMock.getDescription())\n .build();\n\n assertThatThrownBy(() -> provider.update(productMock.getId().toString(), productUpdate))\n .isInstanceOf(ConflictedEntryException.class);\n\n }", "public synchronized void elementSwapped(Object newParam, int index1,\n\t\t\tint index2) {\n\n\t\tif (index1 < index2) {\n\t\t\tswapElements(newParam, index1, index2);\n\t\t} else {\n\t\t\tswapElements(newParam, index2, index1);\n\t\t}\n\n\t}", "void update(Product product) throws IllegalArgumentException;", "public boolean update(Product product);", "public void testUpdateProduct() {\n\t\tProduct product=productDao.selectProducts(33);\n\t\tproduct.setPrice(100.0);\n\t\tproduct.setQuantity(1);\n\t\tproductDao.updateProduct(product);//product has updated price and update quantity\n\t\tassertTrue(product.getPrice()==100.0);\n\t\tassertTrue(product.getQuantity()==1);\n\t}", "public void swap (int index1, int index2)\n {\n if(index1 >= 0 && index2 >= 0\n && index1 < (stocks.size())\n && index2 < (stocks.size()))\n {\n Stock temp = stocks.get(index1);\n Stock second = stocks.set(index1, stocks.get(index2));\n stocks.set(index2, temp);\n }\n }", "void createOrUpdateProducts(List<PsdProduct> psdProducts);", "Product updateProductInStore(Product product);", "private void swap(int index1, int index2) {\n E element1 = getElement(index1);\n E element2 = getElement(index2);\n setElement(index2, element1);\n setElement(index1, element2);\n }", "@PutMapping(\"replace\")\n @PreAuthorize(\"hasRole('admin')\")\n @ApiOperation(value = \"Replace existing product by name (Admin only)\")\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Product replaced.\"),\n @ApiResponse(code = 400, message = \"Request body malformed.\"),\n @ApiResponse(code = 401, message = \"The user does not have valid authentication credentials for the target resource.\"),\n @ApiResponse(code = 403, message = \"User does not have permission (Authorized but not enough privileges)\"),\n @ApiResponse(code = 404, message = \"The requested resource could not be found.\"),\n @ApiResponse(code = 500, message = \"Server Internal Error at executing request.\")\n })\n @ApiImplicitParam(name = \"body\", dataTypeClass = ProductReplaceRequestBody.class)\n public ResponseEntity<String> replaceProduct(@RequestBody LinkedHashMap body) {\n SecurityContextHolder.getContext().setAuthentication(null);\n\n if(body.get(\"product\") == null) {\n Exception missingProductName = new Exception(\"Product name is missing.\");\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, missingProductName.getMessage(), missingProductName);\n }\n String name = body.get(\"product\").toString();\n // Query database using Data Access Object classes.\n DbResult dbResult = new Select().findProduct(name.toUpperCase());\n if(dbResult.isEmpty()) return new ResponseEntity(\"Product not found.\", HttpStatus.NOT_FOUND);\n Product product = dbResult.getResult(Product.class);\n // Each database successful response will be wrapped in a ResponseEntity object.\n // In case of exception, the response will be wrapped in a ResponseStatusException object.\n try{\n dbResult = new Update().replaceProduct(product, body);\n if(dbResult.isEmpty()) return new ResponseEntity(\"Product could not be updated.\", HttpStatus.CONFLICT);\n Set<ArrayList<HashMap>> results = dbResult.getResult(HashSet.class);\n return new ResponseEntity(results.toString(), HttpStatus.OK);\n }\n catch (Exception exc) {\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, exc.getMessage(), exc);\n }\n }", "public void swap(int index1, int index2) {\n \n }", "@Override\r\n\tpublic int updateProduct(Product product) {\n\t\treturn 0;\r\n\t}", "private void swap(int firstIdx, int secondIdx) {\r\n // TODO\r\n }", "private void swapElement ( int p1, int p2 )\n\t{\n\t}", "@Test\n public void testEditOrder() throws Exception {\n String stringDate1 = \"10012017\";\n LocalDate date = LocalDate.parse(stringDate1, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n String stringDate2 = \"11052020\";\n LocalDate date2 = LocalDate.parse(stringDate2, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n Orders edittedOrder = new Orders(1);\n edittedOrder.setOrderNumber(1);\n edittedOrder.setDate(date2);\n edittedOrder.setCustomerName(\"Jenna\");\n edittedOrder.setArea(new BigDecimal(\"30\"));\n Tax tax = new Tax(\"PA\");\n tax.setState(\"PA\");\n edittedOrder.setTax(tax);\n Product product = new Product(\"Tile\");\n product.setProductType(\"Tile\");\n edittedOrder.setProduct(product);\n service.addOrder(edittedOrder);\n\n Orders oldOrder = service.getOrder(date, 1);\n service.editOrder(oldOrder, edittedOrder);\n\n// Testing order date and product change \n assertEquals(new BigDecimal(\"4.15\"), service.getOrder(edittedOrder.getDate(), edittedOrder.getOrderNumber()).getProduct().getLaborCostPerSqFt());\n assertEquals(new BigDecimal(\"6.75\"), service.getOrder(edittedOrder.getDate(), edittedOrder.getOrderNumber()).getTax().getTaxRate());\n\n try {\n// Testing if order was removed from previous the date after the edit method\n service.getOrder(date, 1).getProduct().getProductType();\n fail(\"Exception was expected\");\n } catch (Exception e) {\n return;\n }\n\n }", "private synchronized void swapElements(Object newParam, int index1,\n\t\t\tint index2) {\n\n\t\t// the two elements to be swapped\n\t\tLinearElement firstElement = root.getVector().get(index1);\n\t\tLinearElement secondElement = root.getVector().get(index2);\n\n\t\t// the two elements after each of the elements to be swapped\n\t\tLinearElement secondElementNext;\n\t\tLinearElement firstElementNext;\n\t\t/*\n\t\t * There is a corner case where secondElement.previousChild is\n\t\t * firstElement\n\t\t */\n\n\t\t// the first element's previous child before it is reassigned\n\t\tLinearElement tempPrevChild = firstElement.getPreviousChild();\n\n\t\tif (index2 != index1 + 1) {// the elements are not adjacent\n\n\t\t\t// set previous elements for the two nodes\n\t\t\tfirstElement.setPreviousChild(secondElement.getPreviousChild());\n\t\t\tsecondElement.setPreviousChild(tempPrevChild);\n\n\t\t\t// set previous elements for the nodes referencing the swapped nodes\n\t\t\tif (index1 + 1 < root.getVector().size()) {\n\t\t\t\tfirstElementNext = root.getVector().get(index1 + 1);\n\t\t\t\tfirstElementNext.setPreviousChild(secondElement);\n\t\t\t}\n\t\t\tif (index2 + 1 < root.getVector().size()) {\n\t\t\t\tsecondElementNext = root.getVector().get(index2 + 1);\n\t\t\t\tsecondElementNext.setPreviousChild(firstElement);\n\t\t\t}\n\n\t\t} else { // the elements are adjacent\n\t\t\tfirstElement.setPreviousChild(secondElement);\n\t\t\tsecondElement.setPreviousChild(tempPrevChild);\n\n\t\t\t// set previous elements for the nodes referencing the second node\n\t\t\tif (index2 + 1 < root.getVector().size()) {\n\t\t\t\tsecondElementNext = root.getVector().get(index2 + 1);\n\t\t\t\tsecondElementNext.setPreviousChild(firstElement);\n\t\t\t}\n\t\t}\n\n\t\t// swap the elements in root\n\t\troot.getVector().swap(index1, index2);\n\n\t\troot.focusPosition();\n\t}", "public static void updateProduct(Product productUpdate){\r\n for(int i: productInvMap.keySet()){\r\n Product p = productInvMap.get(i);\r\n if(p.getProductID() == productUpdate.getProductID()){\r\n productInvMap.put(i,productUpdate);\r\n }\r\n }\r\n \r\n }", "@Override\n\tpublic boolean update(ProductCategory procate) {\n\t\treturn false;\n\t}", "public void update(Product product) {\n\n\t}", "private void swap(int index1, int index2){\r\n ListNode c = head;\r\n ListNode swapNode = head;\r\n \r\n E tmp = null, tmp1 = null;\r\n \r\n for(int i = 0; i < index1; i++) c = c.getLink();\r\n tmp = (E) c.getData();\r\n \r\n for(int i = 0; i < index2; i++) swapNode = swapNode.getLink();\r\n tmp1 = (E) swapNode.getData();\r\n c.setData(tmp1);\r\n swapNode.setData(tmp);\r\n }", "public synchronized void elementSwapped(Object source, int index1,\n\t\t\tObject other, int index2) {\n\n\t}", "@Test\n void updateSuccess() {\n RunCategory categoryToUpdate = (RunCategory) dao.getById(2);\n categoryToUpdate.setCategoryName(\"New Name\");\n dao.saveOrUpdate(categoryToUpdate);\n RunCategory categoryAfterUpdate = (RunCategory) dao.getById(2);\n assertEquals(categoryToUpdate, categoryAfterUpdate);\n }", "public void testUpdateUserDefinedSortForEntriesWithMultipleElementsInList()\n\t{\n\t\t// arrange\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tlong listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\t\tUri categoryUri = helper.insertNewCategory(listId, \"dudus\", 1);\n\t\tlong categoryId = Integer.parseInt(categoryUri.getPathSegments().get(1));\n\t\t\n\t\tlong[] entryIds = new long[5];\n\t\tUri entryUri = helper.insertNewItem(categoryId, \"dudus\", false, 1);\n\t\tentryIds[0] = Integer.parseInt(entryUri.getPathSegments().get(1));\n\t\tentryUri = helper.insertNewItem(categoryId, \"dudus\", false, 2);\n\t\tentryIds[1] = Integer.parseInt(entryUri.getPathSegments().get(1));\n\t\tentryUri = helper.insertNewItem(categoryId, \"dudus\", false, 3);\n\t\tentryIds[2] = Integer.parseInt(entryUri.getPathSegments().get(1));\n\t\tentryUri = helper.insertNewItem(categoryId, \"dudus\", false, 4);\n\t\tentryIds[3] = Integer.parseInt(entryUri.getPathSegments().get(1));\n\t\tentryUri = helper.insertNewItem(categoryId, \"dudus\", false, 5);\n\t\tentryIds[4] = Integer.parseInt(entryUri.getPathSegments().get(1));\n\n\t\t// Act\n\t\t// This test updates the sort order of entry from 3 to 1 (0-based)\n\t\tservice.updateUserDefinedSortForEntry(categoryId, entryIds[3], 3, 1);\n\n\t\tlong[] expectedEntryIds = new long[5];\n\t\texpectedEntryIds[0] = entryIds[0];\n\t\texpectedEntryIds[1] = entryIds[3];\n\t\texpectedEntryIds[2] = entryIds[1];\n\t\texpectedEntryIds[3] = entryIds[2];\n\t\texpectedEntryIds[4] = entryIds[4];\n\n\t\t// now get all entries for category\n\t\tCursor entriesToBeUpdatedCursor = dataProvider.query(EntryColumns.CONTENT_URI,\n\t\t\t\tENTRY_PROJECTION, EntryColumns.CATEGORY_ID + \" = \" + categoryId, null,\n\t\t\t\tEntryColumns.SORT_POSITION);\n\n\t\tlong[] updatedEntryIds = new long[5];\n\t\tentriesToBeUpdatedCursor.moveToFirst();\n\t\twhile (!entriesToBeUpdatedCursor.isAfterLast())\n\t\t{\n\t\t\tlong entId = entriesToBeUpdatedCursor.getLong(entriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(EntryColumns._ID));\n\n\t\t\tint position = entriesToBeUpdatedCursor.getInt(entriesToBeUpdatedCursor\n\t\t\t\t\t.getColumnIndex(EntryColumns.SORT_POSITION));\n\n\t\t\tupdatedEntryIds[position - 1] = entId;\n\t\t\tentriesToBeUpdatedCursor.moveToNext();\n\t\t}\n\n\t\t// Assert\n\t\tfor (int i = 0; i < 5; i++)\n\t\t\tassertEquals(expectedEntryIds[i], updatedEntryIds[i]);\n\t}", "@Test\n public void testSwapFirstTwo() {\n setUpCorrect();\n assertEquals(1, ((Board) boardManager.getBoard()).getTile(0, 0).getId());\n assertEquals(2, ((Board) boardManager.getBoard()).getTile(0, 1).getId());\n ((Board) boardManager.getBoard()).swapTiles(0, 0, 0, 1);\n assertEquals(2, ((Board) boardManager.getBoard()).getTile(0, 0).getId());\n assertEquals(1, ((Board) boardManager.getBoard()).getTile(0, 1).getId());\n }", "@Test\n public void saveProduct_should_update_product_with_new_product_fields() {\n final Product product = productStorage.saveProduct(new Product(1, \"Oranges\", 150, 3));\n\n //get product with id = 1\n final Product updatedProduct = productStorage.getProduct(1);\n\n assertThat(product, sameInstance(updatedProduct));\n }", "@Test\n public void addProductsToCompareListTest() {\n YandexMarketHomePage homePage = new YandexMarketHomePage(driver);\n homePage.open();\n\n // 2. Select category of products\n homePage.selectCategory(\"Электроника\");\n\n // 3. Select subcategory of products\n new YandexMarketCategoryPage(driver).selectCatalogItemPage(\"Смартфоны\");\n\n // 4. Add products to compare list\n YandexMarketCatalogItemPage catalogItemPage = new YandexMarketCatalogItemPage(driver);\n String product1 = catalogItemPage.addProductToCompare(1);\n String product2 = catalogItemPage.addProductToCompare(2);\n\n List<String> expectedProductTitleList = new ArrayList<>();\n expectedProductTitleList.add(product1);\n expectedProductTitleList.add(product2);\n\n // 5. Click compare button\n catalogItemPage.clickCompareButton();\n\n // 6. Check that only added product names displayed on the page\n List<String> actualProductTitleList = new YandexMarketCompareProductPage(driver)\n .getProductNames();\n\n assertThat(actualProductTitleList)\n .as(\"Incorrect products was added to compare\")\n .containsExactlyInAnyOrderElementsOf(expectedProductTitleList);\n }", "@Test\n void updateSuccess() {\n String newDescription = \"December X-Large T-Shirt\";\n Order orderToUpdate = dao.getById(3);\n orderToUpdate.setDescription(newDescription);\n dao.saveOrUpdate(orderToUpdate);\n Order retrievedOrder = dao.getById(3);\n assertEquals(newDescription, retrievedOrder.getDescription());\n\n String resetDescription = \"February Small Long-Sleeve\";\n Order orderToReset = dao.getById(3);\n orderToUpdate.setDescription(resetDescription);\n dao.saveOrUpdate(orderToReset);\n }", "public void updateProduct(Product catalog) throws BackendException;", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "public boolean update(Product p){\n ContentValues contvalu= new ContentValues();\n //contvalu.put(\"date_created\", \"datetime('now')\");\n contvalu.put(\"name\",p.getName());\n contvalu.put(\"feature\",p.getFeature());\n contvalu.put(\"price\",p.getPrice());\n return (cx.update(\"Product\",contvalu,\"id=\"+p.getId(),null))>0;\n//-/-update2-////\n\n\n }", "@Test\n public void test2_saveProductToOrder() {\n ProductDTO productDTO= new ProductDTO();\n productDTO.setSKU(UUID.randomUUID().toString());\n productDTO.setName(\"ORANGES\");\n productDTO.setPrice(new BigDecimal(40));\n productService.saveProduct(productDTO,\"test\");\n\n //get id from product and order\n long productId = productService.getIdForTest();\n long orderId = orderService.getIdForTest();\n\n OrderDetailDTO orderDetailDTO = new OrderDetailDTO();\n orderDetailDTO.setOrderId(orderId);\n orderDetailDTO.setProductId(productId);\n String res = orderService.saveProductToOrder(orderDetailDTO,\"test\");\n assertEquals(null,res);\n }", "boolean edit(DishCategory oldDishCategory, DishCategory newDishCategory);", "private void updateProductQnt(List<Product> productList) {\n if (productList != null) {\n productList.forEach(product -> {\n Product productToSave = productService.findOne(product.getId());\n productToSave.setQuantity(productToSave.getQuantity() - product.getQuantity());\n productService.save(productToSave);\n });\n }\n }", "@Test\n public void testUpdateProductShouldSuccessWhenProductNotUpdateName() throws Exception {\n product.setName(productRequest.getName());\n when(productRepository.findOne(product.getId())).thenReturn(product);\n when(productRepository.save(product)).thenReturn(product);\n\n Map<String, Object> jsonMap = new HashMap<>();\n jsonMap.put(\"$.url\", productRequest.getUrl());\n testResponseData(RequestInfo.builder()\n .request(put(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(adminToken)\n .body(productRequest)\n .httpStatus(HttpStatus.OK)\n .jsonMap(jsonMap)\n .build());\n }", "public void updateProduct(int index, Product newProduct) {\n Product product = allProducts.get(index);\n product.setId(newProduct.getId());\n product.setName(newProduct.getName());\n product.setMin(newProduct.getMin());\n product.setMax(newProduct.getMax());\n product.setPrice(newProduct.getPrice());\n product.setStock(newProduct.getStock());\n }", "void swap(int index_1,int index_2){\n int temp=arr[index_1];\n arr[index_1]=arr[index_2];\n arr[index_2]=temp;\n }", "@Test\n\tpublic void addProductToCartFromCategoryDrop() {\n\t}", "@Override\r\n\tpublic int updateProductById(HashMap<String, Object> map) {\n\t\tProduct product = (Product) map.get(\"product\");\r\n\t\tdao.updateProductById(product);\r\n\t\tList<ProductOption> oldList = (List<ProductOption>) map.get(\"oldList\");\r\n\t\tfor(int idx=0; idx<oldList.size(); idx++){\r\n\t\t\toldList.get(idx).setProductId(product.getProductId());\r\n\t\t\tdao.updateProductOptionById(oldList.get(idx));\r\n\t\t}\r\n\t\tList<ProductOption> newList = (List<ProductOption>) map.get(\"newList\");\r\n\t\tif(map.get(\"newList\")!=null){\r\n\t\t\tfor(int idx=0; idx<newList.size(); idx++){\r\n\t\t\t\tnewList.get(idx).setProductId(product.getProductId());\r\n\t\t\t\toptionDao.insertOption(newList.get(idx));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif( map.get(\"image\")!=null){\r\n\t\t\tProductDetailImage image = ((ProductDetailImage) map.get(\"image\"));\r\n\t\t\tdao.updateDetailImageById(image);\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "@Test\r\n public void testSwapFirstTwo() {\r\n int id1 = boardManager4.getBoard().getTile(0,0).getId();\r\n int id2 = boardManager4.getBoard().getTile(0,1).getId();\r\n boardManager4.getBoard().swapTiles(0,0,0,1);\r\n assertEquals(id1, boardManager4.getBoard().getTile(0,1).getId());\r\n assertEquals(id2,boardManager4.getBoard().getTile(0,0).getId());\r\n }", "@Override\n public int updateProduct(Product product) throws Exception\n {\n if(product == null)\n return 0;\n\n if(getProductById(product.getId(), true) == null)\n return 0;\n\n PreparedStatement query = _da.getCon().prepareStatement(\"UPDATE Products SET contactsKey = ?, categoryKey = ?, name = ?, purchasePrice = ?, salesPrice = ?, rentPrice = ?, countryOfOrigin = ?, minimumStock = ? \" +\n \"WHERE productId = ?\");\n\n query.setLong(1, product.getSupplier().getPhoneNo());\n query.setLong(2, product.getCategory().getCategoryId());\n query.setString(3, product.getName());\n query.setDouble(4, product.getPurchasePrice().doubleValue());\n query.setDouble(5, product.getSalesPrice().doubleValue());\n query.setDouble(6, product.getRentPrice().doubleValue());\n query.setString(7, product.getCountryOfOrigin());\n query.setLong(8, product.getMinimumStock());\n query.setLong(9, product.getId());\n _da.setSqlCommandText(query);\n int rowsAffected = _da.callCommand();\n\n DBProductData dbProductData = new DBProductData();\n dbProductData.deleteProductData(product.getId());\n for(ProductData data : product.getProductData())\n rowsAffected += dbProductData.insertProductData(product.getId(), data);\n\n return rowsAffected;\n }", "Product update(Product product, long id);", "public boolean updateData(String Product_Name, String Product_Category, String Product_Description, String Product_Price) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(Database_Helper.COLUMN_2, Product_Name);\n contentValues.put(Database_Helper.COLUMN_3, Product_Category);\n contentValues.put(Database_Helper.COLUMN_4, Product_Description);\n contentValues.put(Database_Helper.COLUMN_5, Product_Price);\n String position = productID.getText().toString().trim();\n return db.update(Database_Helper.TABLE_NAME, contentValues, Database_Helper.COLUMN_1 + \"=?\", new String[]{position}) > 0;\n }", "void updateOfProductById(long id);", "@Test\n public void addToCategory() throws Exception {\n withProductAndUnconnectedCategory(client(), (final Product product, final Category category) -> {\n assertThat(product.getMasterData().getStaged().getCategories()).isEmpty();\n\n final String orderHint = \"0.123\";\n final Product productWithCategory = client()\n .executeBlocking(ProductUpdateCommand.of(product, AddToCategory.of(category, orderHint)));\n\n final Reference<Category> categoryReference = productWithCategory.getMasterData().getStaged().getCategories().stream().findAny().get();\n assertThat(categoryReference.referencesSameResource(category)).isTrue();\n assertThat(productWithCategory.getMasterData().getStaged().getCategoryOrderHints().get(category.getId())).isEqualTo(orderHint);\n\n final Product productWithoutCategory = client()\n .executeBlocking(ProductUpdateCommand.of(productWithCategory, RemoveFromCategory.of(category)));\n\n assertThat(productWithoutCategory.getMasterData().getStaged().getCategories()).isEmpty();\n });\n }", "public static void swap(int a1, int b1) {\t\t\n\t\tint temp = algorithmThree[a1];\n\t\talgorithmThree[a1] = algorithmThree[b1];\n\t\talgorithmThree[b1] = temp;\n\t}", "@Test\n\tpublic void update01() throws SQLException {\n\t\tjdbcLink.update(Product.class)\n\t\t\t.set()\n\t\t\t\t.param(Product.NAME, \"xxxxx\").param(Product.NAME, \"xxxxx\")\n\t\t\t.where()\n\t\t\t\t.and().eq(Product.UID, 77L)\n\t\t\t.execute();\n\t\t\n\t\t\t\t\n\t}", "@Test\n public void putAlterarCategoriaProdutoTest() throws ApiException {\n Integer productCategoryCode = null;\n String product = null;\n api.putAlterarCategoriaProduto(productCategoryCode, product);\n\n // TODO: test validations\n }", "private void switchElements(int a, int b) {\r\n\t\tE temp = c[a];\r\n\t\tc[a] = c[b];\r\n\t\tc[b] = temp;\r\n\t}", "public void editProduct(int index, String description, String category, int quantity, int weight, int price, int stocknumber) {\t\t\n\t}", "public void swap(int index1, int index2)\n\t{\n\t\tthis.grid.swap(index1, index2);\n\t}", "protected abstract Product modifyProduct(ProductApi api,\n Product modifyReq) throws RestApiException;", "public void deleteProduct(Product product_1) {\n\r\n\t}", "@Override\n public void updateProductCounter() {\n\n }", "@Test\n\tvoid testSwapPair()\n\t{\n\t\tSystem.out.println(\"test SwapPair\");\n\t\tString[] exp = {\"suruchi\", \"kunal\"};\n\t\toperate.swapPair(p);\n\t\t\n\t\t//act = {\"suruchi\",\"kunal\"}\n\t\tString[] act = {p.getFirst(),p.getSecond()};\n\n\t\t//if equal the pass then test\n\t\tassertArrayEquals(exp, act);\n\t\n\t}", "@Override\r\n\tpublic void updateProduct(String name,int cost,List<Product> custlist) {\n\t\tfor(Product p:custlist) {\r\n\t\tif(name.equals(p.getName())) {\r\n\t\t\t\tp.setCost(cost);\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t}", "@Test\n\tpublic void testUpdateCategory() throws Exception {\n\n\t\tCategoryResponse categoryResponse = new CategoryResponse();\n\t\tList<Category> categories = new ArrayList<>();\n\t\tCategory category = new Category();\n\t\tcategory.setTenantId(\"default\");\n\t\tcategory.setParentId(Long.valueOf(1));\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\t\tcategory.setName(\"Flammables\");\n\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.updateCategoryMaster(any(CategoryRequest.class),any(String.class))).thenReturn(categoryResponse);\n\t\t\tmockMvc.perform(post(\"/category/v1/_update\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t\t.content(getFileContents(\"categoryUpdateRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryUpdateResponse.json\")));\n\n\t\t} catch (Exception e) {\n\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}", "public boolean verifyProductByOrderLowToHighFilter(WebDriver driver) {\n\n\t\tString order = \"Sort by price: low to high\";\n\t\tList<String> productPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"original list :\"+productPriceList);\n\n\t\tshoppage.selectOrderOfProduct(driver, order);\n\n\t\tList<String> actualSortedPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"actual sorted high to low :\"+actualSortedPriceList);\n\t\tList<String> expectedSortedPriceList = productPriceList;\n\t\tCollections.sort(expectedSortedPriceList);\n\t\tSystem.out.println(\"expected sorted high to low :\"+expectedSortedPriceList);\n\n\t\treturn expectedSortedPriceList.equals(actualSortedPriceList);\n\t}", "@Override\n\tpublic int compare(Product p1, Product p2) {\n\t\t\n\t\treturn p2.getReviewCount()*p2.getSaleCount()-p1.getReviewCount()*p1.getSaleCount();\n\t}", "public void update() throws SQLException {\n int check = BusinessFacade.getInstance().checkIDinDB(this.productRelation.getID(),\n this.post.getID(), \"goods\", \"product_type_id\", \"post_id\");\n int safeCheck = BusinessFacade.getInstance().checkChildsIDinDB(this.goodID,\n this.order.getID(), \"orders\", \"goods_id\", \"orders_id\");\n\n if (check != -1 && safeCheck == -1) {\n if (check != this.goodID) {\n int oldGoodID = this.goodID;\n this.goodID = check;\n this.order.update();\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n oldGoodID + \" LIMIT 1;\");\n }\n } else if (check != -1 && safeCheck != -1) {\n this.goodID = check;\n } else if (check == -1 && safeCheck == -1) {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n stmtIn.executeUpdate(\"UPDATE ngaccount.goods SET product_type_id = \" +\n this.productRelation.getID() + \", post_id = \" + this.post.getID() +\n \" WHERE goods.goods_id = \" + this.goodID);\n } else {\n this.goodID = BusinessFacade.getInstance().lastIDInDB(\"product_type\") + 1;\n this.insert();\n }\n }", "@Test\r\n\tpublic void updateProductDetails() {\r\n\r\n\t\tRestAssured.baseURI = \"http://localhost:9000/products\";\r\n\t\tRequestSpecification request = RestAssured.given();\r\n\t\tJSONObject requestParams = new JSONObject();\r\n\t\trequestParams.put(\"name\", \"Banana\");\r\n\t\trequest.header(\"Content-Type\", \"application/json\");\r\n\t\trequest.body(requestParams.toString());\r\n\t\tResponse response = request.put(\"/5\");\r\n\t\tSystem.out.println(\"Update Responce Body ----->\" + response.asString());\r\n\t\tint statusCode = response.getStatusCode();\r\n\t\tAssert.assertEquals(statusCode, 200);\r\n\r\n\t}", "public void shuffleItems() {\n LoadProducts(idCategory);\n }", "@Test\n public void testUpdateProductShouldCorrectWhenNewNameNotExist() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n when(productRepository.existsByName(productRequest.getName())).thenReturn(false);\n when(productRepository.save(product)).thenReturn(product);\n\n Map<String, Object> jsonMap = new HashMap<>();\n jsonMap.put(\"$.name\", productRequest.getName());\n jsonMap.put(\"$.url\", productRequest.getUrl());\n testResponseData(RequestInfo.builder()\n .request(put(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(adminToken)\n .body(productRequest)\n .httpStatus(HttpStatus.OK)\n .jsonMap(jsonMap)\n .build());\n }", "@Test\n\tpublic void update() throws Exception {\n\t\tMockito.when(productService.updateProductPriceInfo(Mockito.anyLong(), Mockito.anyFloat())).thenReturn(true);\n\t\tRequestBuilder requestBuilder = MockMvcRequestBuilders.put(\"/products/13860428\")\n\t\t\t\t.accept(MediaType.APPLICATION_JSON).content(expected).contentType(MediaType.APPLICATION_JSON);\n\t\tMvcResult result = mockMvc.perform(requestBuilder).andReturn();\n\n\t\tMockHttpServletResponse response = result.getResponse();\n\n\t\tassertEquals(HttpStatus.OK.value(), response.getStatus());\n\n\t}", "@Override\n\tpublic boolean updateProduct(Product p) {\n\t\treturn false;\n\t}", "private void swapMethod(int f1, int f2)\n\t {\n\t\tSystem.out.println(\"BEFORE SWAPPING F1 Value :\"+f1+\"F2 VALUE IS:\"+f2);\n\t\tint f3=f1;\n\t\tf1=f2;\n\t\tf2=f3;\n\t\tSystem.out.println(\"AFTER SWAPPING F1 Value :\"+f1+\"F2 VALUE IS:\"+f2);\n\t }", "private void updateProduct(String productId, double reviewRating) {\n\t\tMap<String, Double> details = products.containsKey(productId)? products.get(productId): new HashMap<String, Double>();\n\t\tDouble numberOfReviews = details.containsKey(NUMBEROFREVIEWS)? details.get(NUMBEROFREVIEWS): 0.0;\n\t\tDouble totalRatings = details.containsKey(TOTALRATINGS)? details.get(TOTALRATINGS): 0.0;\n\n\t\tdetails.put(NUMBEROFREVIEWS, numberOfReviews + 1);\n\t\tdetails.put(TOTALRATINGS, totalRatings + reviewRating);\n\t\t\n\t\tList<Double> list = productRatings.containsKey(productId)? productRatings.get(productId): new ArrayList<Double>();\n\t\tlist.add(reviewRating);\n\t\t\n\t\tproducts.put(productId, details);\n\t\tproductRatings.put(productId, list);\n\t}", "public void changeSortOrder();", "public boolean verifyProductByOrderHighToLowFilter(WebDriver driver) {\n\n\t\tString order = \"Sort by price: high to low\";\n\t\tList<String> productPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"original list :\"+productPriceList);\n\t\tshoppage.selectOrderOfProduct(driver, order);\n\n\t\tList<String> actualSortedPriceList = shoppage.getProductPriceList(driver);\n\t\tSystem.out.println(\"actual sorted high to low :\"+actualSortedPriceList);\n\t\tList<String> expectedSortedPriceList = productPriceList;\n\t\tCollections.sort(expectedSortedPriceList, Collections.reverseOrder());\n\t\tSystem.out.println(\"expected sorted high to low :\"+expectedSortedPriceList);\n\n\t\treturn expectedSortedPriceList.equals(actualSortedPriceList);\n\t}", "@Test\n public void case3SortTwoElements(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2};\n data2.initializeArray(\"2 1\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[1].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[0].key == testArray[1]);\n\n data2.runAlgo(algoUnderTest);\n \n if(algoUnderTest != 0)\n {\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n \n else {\n \t assertFalse(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n\n\n }", "public void updateProduct(int index, Product product) {\n allProducts.set(index, product);\n }", "void saveOrUpdate(Product product);", "@Override\n\tpublic int updateproduct(Product product) {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\t\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"update product set category_id=?, name=?,subtitle=?,main_image=?,sub_images=?, detail=?,price=?,stock=?,status=?,create_time=?,update_time=? where id=? \");\n\t\n\t\t\t pst.setInt(1, product.getCategory_id());\n\t\t\t pst.setString(2, product.getName());\n\t\t\t pst.setString(3, product.getSubtitle());\n\t\t\t pst.setString(4, product.getMain_image());\n\t\t\t pst.setString(5, product.getSub_images());\n\t\t\t pst.setString(6, product.getDetail());\n\t\t\t pst.setBigDecimal(7, product.getPrice());\n\t\t\t pst.setInt(8, product.getStock());\n\t\t\t pst.setInt(9, product.getStatus());\n\t\t\t pst.setDate(10, new Date(product.getCreate_time().getTime()));\n\t\t\t pst.setDate(11, new Date(product.getUpdate_time().getTime()));\n\t\t\t pst.setInt(12, product.getId());\n\t\n\t\t\treturn pst.executeUpdate();\n\t\t\t\n\t\t\t \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}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "@Override\n\tpublic int update(ProductDTO dto) {\n\t\treturn 0;\n\t}", "@Test\n public void updateComponentTag() {\n UpdateTagRequest updateComponentRequest = new UpdateTagRequest();\n // String key = (String) tagToUpdate2.keySet().toArray()[0];\n updateComponentRequest.setTagKey(TAG_2.getName());\n updateComponentRequest.setTagValue(TAG_2.getValue());\n\n componentController.upsertTag(indexedNodeType.getId(), updateComponentRequest);\n tmpIndexedNodeType = dao.findById(NodeType.class, indexedNodeType.getId());\n\n assertEquals(\"Tags map size should'nt change\", tmpIndexedNodeType.getTags().size(), indexedNodeType.getTags().size());\n int index = tmpIndexedNodeType.getTags().indexOf(TAG_2);\n int index2 = indexedNodeType.getTags().indexOf(TAG_2);\n assertNotEquals(\"tag2 tag value has changed\", tmpIndexedNodeType.getTags().get(index).getValue(), indexedNodeType.getTags().get(index2).getValue());\n assertEquals(\"tag2 tag value should be the same as TAG_2\", tmpIndexedNodeType.getTags().get(index).getValue(), TAG_2.getValue());\n\n }", "private void swap(int pos1, int pos2) {\n\t\tE temp = apq.get(pos1);\n\t\tapq.set(pos1, apq.get(pos2));\n\t\tapq.set(pos2, temp);\n\n\t\tlocator.set(apq.get(pos1), pos1);\n\t\tlocator.set(apq.get(pos2), pos2);\n\t}", "Product updateProductById(Long id);", "public void reorderProduct(String productName) throws ProductNotFoundException {\r\n\r\n //Check to see if the customer has ordered this product before\r\n if (doesRecentOrderExist(productName)) {\r\n System.out.println(\"CUSTOMER: Request RE ORDER purchase for - \" + productName);\r\n //Place a RE ORDER request\r\n market.placeNewReorderOrder(findRecentOrder(productName));\r\n } else {\r\n //If no previous order was found to re order, ask if they'd like to place a new order\r\n //This handles throwing an Order/Product not found exception\r\n if (promptNewOrder(productName)) {\r\n buyProduct(productName);\r\n }\r\n }\r\n }", "@Test\n\tpublic void testProcessInventoryUpdateUpdateProductIndex() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproductSku.setProduct(product);\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\n\t\tfinal IndexNotificationService indexNotificationService = context.mock(IndexNotificationService.class);\n\t\tproductInventoryManagementService.setIndexNotificationService(indexNotificationService);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(new InventoryJournalRollupImpl()));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\n\t\t\t\texactly(2).of(indexNotificationService).addNotificationForEntityIndexUpdate(IndexType.PRODUCT, product.getUidPk());\n\t\t\t}\n\t\t});\n\n\t\t//Allocate\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1, InventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_ONHAND, order, null);\n\n\t\tfinal InventoryJournalDao inventoryJournalDao2 = context.mock(InventoryJournalDao.class, INVENTORY_JOURNAL_DAO2);\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao2);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup2 = new InventoryJournalRollupImpl();\n\t\tijRollup2.setAllocatedQuantityDelta(QUANTITY_ONHAND);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tatLeast(1).of(inventoryJournalDao2).getRollup(inventoryKey); will(returnValue(ijRollup2));\n\t\t\t}\n\t\t});\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(0, inventoryDto.getAvailableQuantityInStock());\n\n\t\t//Deallocate\n\t\tfinal Inventory inventory3 = assembler.assembleDomainFromDto(inventoryDto);\n\n\t\tfinal InventoryDao inventoryDao3 = context.mock(InventoryDao.class, \"inventoryDao3\");\n\t\tfinal InventoryJournalDao inventoryJournalDao3 = context.mock(InventoryJournalDao.class, \"inventoryJournalDao3\");\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao3);\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao3);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tfinal InventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao3).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory3));\n\t\t\t\tatLeast(1).of(inventoryJournalDao3).saveOrUpdate(inventoryJournal); will(returnValue(inventoryJournal));\n\t\t\t\tatLeast(1).of(inventoryJournalDao3).getRollup(inventoryKey); will(returnValue(new InventoryJournalRollupImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_DEALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_ONHAND, order, null);\n\n\t\tfinal InventoryJournalDao inventoryJournalDao4 = context.mock(InventoryJournalDao.class, \"inventoryJournalDao4\");\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao4);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup4 = new InventoryJournalRollupImpl();\n\t\tijRollup4.setAllocatedQuantityDelta(-QUANTITY_ONHAND);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tatLeast(1).of(inventoryJournalDao4).getRollup(inventoryKey); will(returnValue(ijRollup4));\n\t\t\t}\n\t\t});\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getAvailableQuantityInStock());\n\t}", "@Override\n public void changePrice(Product product, int position) {\n changeProductPrice(product, -1);\n }", "public void updateProductDetails(Integer ProductID, String ProductCategory ) {\r\n\t\t\tSystem.out.println(\" *************from inside updateProductDetails()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// update logic\r\n\r\n\t\t\t\tProduct product = (Product) sessionObj.get(Product.class, ProductID);\r\n\r\n\t\t\t\tproduct.setProductCategory(ProductCategory);\r\n\t\t\t\t\r\n\r\n\t\t\t\tsessionObj.update(product);// hibernate will form update query automatically\r\n\r\n\t\t\t\tSystem.out.println(\"update sucessfully...\"+product.getProductId()+\" \"+product.getProductName());\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\r\n\t\t}", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "@Given(\"^: search for different products$\")\r\n\tpublic void search_for_different_products() throws Throwable {\n\t\tobj.url(\"chrome\");\r\n\t}", "@Test(priority = 2)\n public void testPurchaseMultipleItemsAndGetTotal() throws Exception {\n URI uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n HttpEntity<String> request = new HttpEntity<>(headersUser2);\n ResponseEntity<String> result = restTemplate.exchange(uri, HttpMethod.GET, request, String.class);\n assertEquals(200, result.getStatusCodeValue());\n setCookie(result, headersUser2);\n\n // doing an API call to get products and select a random product\n List<ProductDTO> products = getProducts(headersUser2);\n Random random = new Random();\n ProductDTO product1 = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n BigDecimal exceptedTotal = new BigDecimal(\"0.0\");\n CartItemDTO item1 = new CartItemDTO();\n item1.setQuantity((long) (random.nextInt(5) + 1));\n item1.setProduct(product1);\n\n BigDecimal price1 = product1.getPrice().add(product1.getTax());\n exceptedTotal = exceptedTotal.add(price1.multiply(new BigDecimal(item1.getQuantity())));\n\n // doing an API call to add the select product into cart.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/items\");\n HttpEntity<CartItemDTO> itemAddRequest = new HttpEntity<>(item1, headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // Select another random product\n ProductDTO product2 = products.stream().skip(random.nextInt(products.size())).findFirst().orElseThrow();\n\n CartItemDTO item2 = new CartItemDTO();\n item2.setQuantity((long) (random.nextInt(5) + 1));\n item2.setProduct(product2);\n\n BigDecimal price2 = product2.getPrice().add(product2.getTax());\n exceptedTotal = exceptedTotal.add(price2.multiply(new BigDecimal(item2.getQuantity())));\n\n // doing an API call to add the select product into cart.\n itemAddRequest = new HttpEntity<>(item2, headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, itemAddRequest, String.class);\n assertEquals(201, result.getStatusCodeValue());\n\n // doing an API call to get the content of the cart\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart\");\n request = new HttpEntity<>(headersUser2);\n ResponseEntity<ShoppingCartDTO> cartResponse = restTemplate.exchange(uri,\n HttpMethod.GET, request, ShoppingCartDTO.class);\n assertEquals(200, cartResponse.getStatusCodeValue());\n assertNotNull(cartResponse.getBody());\n exceptedTotal = exceptedTotal.multiply(new BigDecimal(\"1.15\"));\n assertEquals(exceptedTotal, cartResponse.getBody().getTotalAmount());\n\n // doing an API call to submit the cart to process.\n uri = new URI(LOCALHOST + randomServerPort + \"/api/mycart/submit\");\n request = new HttpEntity<>(headersUser2);\n result = restTemplate.exchange(uri, HttpMethod.POST, request, String.class);\n assertEquals(201, result.getStatusCodeValue());\n }", "@Override\n\tpublic void swap(int pos1, int pos2) {\n\t}", "@Test\n public void testSave() throws Exception {\n ProductCategory productCategory = categoryServiceImpl.findOne(1);\n productCategory.setCategoryName(\"Lego\");\n ProductCategory category = categoryServiceImpl.save(productCategory);\n System.out.println(\"category:\" + category);\n }", "Product editProduct(Product product);", "private void swap(int[] a, int index1, int index2) {\n int temp = a[index1];\n a[index1] = a[index2];\n a[index2] = temp;\n }", "@Test\n\tpublic void testUpdateCategoryDetails() throws Exception {\n\n\t\tCategoryResponse categoryResponse = new CategoryResponse();\n\t\tList<Category> categories = new ArrayList<>();\n\t\tCategory category = new Category();\n\t\tcategory.setTenantId(\"default\");\n\t\tcategory.setParentId(Long.valueOf(1));\n\n\t\tAuditDetails auditDetails = new AuditDetails();\n\t\tcategory.setAuditDetails(auditDetails);\n\t\tcategory.setName(\"Flammables\");\n\n\t\tCategoryDetail details = new CategoryDetail();\n\t\tdetails.setId(Long.valueOf(5));\n\t\tdetails.setCategoryId(Long.valueOf(10));\n\t\tdetails.setFeeType(FeeTypeEnum.fromValue(\"License\"));\n\t\tdetails.setRateType(RateTypeEnum.fromValue(\"Flat_By_Percentage\"));\n\t\tdetails.setUomId(Long.valueOf(1));\n\n\t\tList<CategoryDetail> catDetails = new ArrayList<CategoryDetail>();\n\t\tcatDetails.add(details);\n\n\t\tcategory.setDetails(catDetails);\n\n\t\tcategories.add(category);\n\n\t\tcategoryResponse.setResponseInfo(new ResponseInfo());\n\t\tcategoryResponse.setCategories(categories);\n\n\t\ttry {\n\n\t\t\twhen(categoryService.updateCategoryMaster(any(CategoryRequest.class),any(String.class))).thenReturn(categoryResponse);\n\t\t\tmockMvc.perform(post(\"/category/v1/_update\").param(\"tenantId\", \"default\")\n\t\t\t\t\t.contentType(MediaType.APPLICATION_JSON).content(getFileContents(\"categoryUpdateRequest.json\")))\n\t\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t\t.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n\t\t\t\t\t.andExpect(content().json(getFileContents(\"categoryUpdateResponse.json\")));\n\n\t\t} catch (Exception e) {\n\n\t\t\tassertTrue(Boolean.FALSE);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertTrue(Boolean.TRUE);\n\n\t}", "private static <T> void swap(int x[], double[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tdouble t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "public boolean updateProduct(int prod_id, Product new_product) \n\t{\n\t\treturn false;\n\t}", "public void update(Product prod) {\n\t\tentities.put(prod.getName(), prod);\n\t\tif (prod.quantity==0) {\n\t\t\tavailableProducts.remove(prod.getName());\n\t\t}\n\t}" ]
[ "0.6689348", "0.6006757", "0.58770543", "0.5875618", "0.5646415", "0.5602729", "0.5582713", "0.55456966", "0.55050933", "0.54658353", "0.5435835", "0.5382483", "0.53649586", "0.53351593", "0.53217393", "0.5280963", "0.52474856", "0.52405655", "0.5235042", "0.5208972", "0.5198082", "0.51941675", "0.5116587", "0.51063395", "0.5104244", "0.5101274", "0.50965476", "0.5096009", "0.50889593", "0.50877523", "0.50610554", "0.5046951", "0.5038624", "0.5020771", "0.5018076", "0.50135565", "0.5006988", "0.5003396", "0.4974863", "0.49582732", "0.4934927", "0.49328145", "0.49157512", "0.49145794", "0.4903431", "0.4901771", "0.489684", "0.4895862", "0.48808855", "0.48724422", "0.48640448", "0.4863457", "0.4860567", "0.48510167", "0.48470232", "0.48269832", "0.48214918", "0.481906", "0.48174736", "0.48171178", "0.4816856", "0.48118982", "0.48028257", "0.47963905", "0.47958738", "0.47941837", "0.47820985", "0.47759008", "0.4765564", "0.47646293", "0.4761979", "0.47571832", "0.47537148", "0.47417542", "0.4728289", "0.4726282", "0.47219953", "0.47175598", "0.47174743", "0.47146463", "0.47145107", "0.47130424", "0.47125503", "0.47109872", "0.4707865", "0.46982855", "0.4696749", "0.46934378", "0.4691821", "0.468297", "0.46821705", "0.46808252", "0.46780142", "0.46744916", "0.46735287", "0.4658768", "0.4658546", "0.46564", "0.46542275", "0.46486685" ]
0.7993383
0
Test that resetProductCategoryFeatured removes the "featuredness" of a product in a given category.
@Test public final void testResetProductCategoryFeatured() { final Product mockProduct = context.mock(Product.class); final Category mockCategory = context.mock(Category.class); ProductServiceImpl service = new ProductServiceImpl() { @Override public Category getCategoryFromProductByUid(final Product product, final long categoryUid) { return mockCategory; } }; service.setProductDao(mockProductDao); final long productUid = 123L; final long categoryUid = 234L; context.checking(new Expectations() { { //make sure it's set to 0 oneOf(mockProduct).setFeaturedRank(mockCategory, 0); oneOf(mockProductDao).getWithCategories(with(any(long.class))); will(returnValue(mockProduct)); oneOf(mockProductDao).saveOrUpdate(with(any(Product.class))); will(returnValue(mockProduct)); } }); service.resetProductCategoryFeatured(productUid, categoryUid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testSetProductCategoryFeatured() {\n\t\t// set up product and category\n\t\tfinal long productUid = 123L;\n\t\tfinal long categoryUid = 234L;\n\t\tfinal Product product = new ProductImpl();\n\t\tproduct.setUidPk(productUid);\n\t\tproduct.setGuid(\"productGuid\");\n\n\t\tCategory category = new CategoryImpl();\n\t\tcategory.setUidPk(categoryUid);\n\t\tcategory.setGuid(\"categoryGuid\");\n\t\tcategory.setCatalog(new CatalogImpl());\n\t\tproduct.addCategory(category);\n\n\t\t// mock methods\n\t\t\n\t\tArrayList<Integer> returnList = new ArrayList<Integer>();\n\t\treturnList.add(Integer.valueOf(2));\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(with(any(long.class)));\n\t\t\t\twill(returnValue(product));\n\n\t\t\t\toneOf(mockProductDao).getMaxFeaturedProductOrder(with(any(long.class)));\n\t\t\t\twill(returnValue(2));\n\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(same(product)));\n\t\t\t}\n\t\t});\n\n\t\t// run the service\n\t\tint newOrder = this.productServiceImpl.setProductCategoryFeatured(product.getUidPk(), category.getUidPk());\n\n\t\t// check result\n\t\tassertEquals(newOrder, 2 + 1);\n\t}", "@Test\n\tpublic void testUpdateFeaturedProductOrder() {\n\t\t// set up product and category\n\t\tfinal long productUid = 123L;\n\t\tfinal long categoryUid = 234L;\n\t\tfinal Product firstProduct = new ProductImpl();\n\t\tfirstProduct.setUidPk(productUid);\n\t\tfirstProduct.setGuid(String.valueOf(productUid));\n\n\t\tCategory category = new CategoryImpl();\n\t\tcategory.setUidPk(categoryUid);\n\t\tcategory.setGuid(\"categoryGuid\");\n\t\tcategory.setCatalog(new CatalogImpl());\n\t\t//Add the\n\t\tfirstProduct.addCategory(category);\n\t\tfirstProduct.setFeaturedRank(category, 1);\n\t\t\n\t\tfinal long productUid2 = 12345L;\n\t\tfinal Product secondProduct = new ProductImpl();\n\t\tsecondProduct.setUidPk(productUid2);\n\t\tsecondProduct.setGuid(String.valueOf(productUid2));\n\n\t\tsecondProduct.addCategory(category);\n\t\tsecondProduct.setFeaturedRank(category, 2);\n\n\t\t// mock methods\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(productUid);\n\t\t\t\twill(returnValue(firstProduct));\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(productUid2);\n\t\t\t\twill(returnValue(secondProduct));\n\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(same(firstProduct)));\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(same(secondProduct)));\n\t\t\t}\n\t\t});\n\n\n\t\t// run the service\n\t\tthis.productServiceImpl.updateFeaturedProductOrder(firstProduct.getUidPk(), category.getUidPk(), secondProduct.getUidPk());\n\t\t\n\t\t// check result\n\t\tassertEquals(\"firstProduct should now have a preferred featuring order of 2\",\n\t\t\t\t2, firstProduct.getFeaturedRank(category));\n\t\tassertEquals(\"secondProduct should now have a preferred featuring order of 1\",\n\t\t\t\t1, secondProduct.getFeaturedRank(category));\n\t}", "@Test\n public void deletarProductCategoryTest() throws ApiException {\n Integer productCategoryCode = null;\n api.deletarProductCategory(productCategoryCode);\n\n // TODO: test validations\n }", "void unsetProductGroup();", "@Test\n public void deleteRecipeCategory_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n testDatabase.deleteRecipeCategory(returnedCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n boolean deleted = true;\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getCategoryID() == returnedCategory){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeCategory - Deletes From Database\", true, deleted);\n }", "@Test\n void deletePermanentlyTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes four apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 4);\n //then basket does not contain any apple\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertTrue(result);\n assertEquals(0, appleNb);\n }", "@Test\n public void testRemoveProduct() {\n }", "@Test\n public void test() {\n categoryService.addCategory(new Category(null, \"c\", 5423));\n\n //categoryService.removeCategory(1001);\n\n }", "@Test\r\n\tpublic void remove_items() {\r\n//Go to http://www.automationpractice.com\r\n//Mouse hover on product one\r\n//Click 'Add to Cart'\r\n//Click 'Continue shopping' button\r\n//Verify Cart has text '1 Product'\r\n//Mouse hover over 'Cart 1 product' button\r\n//Verify product listed\r\n//Now mouse hover on another product\r\n//click 'Add to cart' button\r\n//Click on Porceed to checkout\r\n//Mouse hover over 'Cart 2 product' button\r\n//Verify 2 product listed now\r\n//click 'X'button for first product\r\n//Verify 1 product deleted and other remain\r\n\r\n\t}", "@Test\n\tpublic void addProductToCartFromCategoryDrop() {\n\t}", "@Test\n void deleteTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes two apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 2);\n //then basket contains two apples\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertTrue(result);\n assertEquals(2, appleNb);\n }", "@Test\r\n public void testCategory() {\n Category createdCategory1 = createCategory(getRootCategory());\r\n\r\n // verify if created\r\n Category newRoot = getBuilder(\"/category/1\").get(Category.class);\r\n Assert.assertTrue(newRoot.contains(createdCategory1.getId()));\r\n\r\n // create a new category\r\n Category createdCategory2 = createCategory(getRootCategory());\r\n\r\n // verify if created\r\n Category newRoot2 = getBuilder(\"/category/1\").get(Category.class);\r\n Assert.assertTrue(newRoot2.contains(createdCategory1.getId()));\r\n Assert.assertTrue(newRoot2.contains(createdCategory2.getId()));\r\n\r\n Category actualCat2 = getBuilder(\"/category/\" + createdCategory2.getId()).get(Category.class);\r\n\r\n Dimension saved1 = createDimension();\r\n Category catHasDim = getBuilder(\"/category/add-dimension/\" + createdCategory1.getId() + \"/\" + saved1.getId()).post(Category.class, \" \");\r\n Assert.assertTrue(catHasDim.hasDimension(saved1.getId()));\r\n\r\n Dimension saved2 = createDimension();\r\n Category cat3 = getBuilder(\"/category/add-dimension/\" + createdCategory1.getId() + \"/\" + saved2.getId()).post(Category.class, \" \");\r\n Assert.assertTrue(cat3.hasDimension(saved1.getId()));\r\n Assert.assertTrue(cat3.hasDimension(saved2.getId()));\r\n\r\n // remove dim1\r\n getBuilder(\"/dimension/remove/\" + saved1.getId()).post(\" \");\r\n\r\n try {\r\n getBuilder(\"/dimension/\" + saved1.getId()).get(String.class);\r\n Assert.assertTrue(false);\r\n } catch (UniformInterfaceException e) {\r\n Assert.assertEquals(ServiceError.NotFound.getErrorCode(), e.getResponse().getStatus());\r\n }\r\n\r\n Category cat4 = getBuilder(\"/category/\" + createdCategory1.getId()).get(Category.class);\r\n Assert.assertFalse(cat4.hasDimension(saved1.getId()));\r\n }", "@Test\n public void deleteCategory_Deletes(){\n int returned = testDatabase.addCategory(category);\n testDatabase.deleteCategory(returned);\n assertEquals(\"deleteCategory - Deletes From Database\", null, testDatabase.getCategory(returned));\n }", "@Test\n void canNotDeleteTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes five apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 5);\n //then apples are not deleted\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertFalse(result);\n assertEquals(4, appleNb);\n }", "@Test\n public void deleteRecipeCategory_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeCategory - Returns True\",true, testDatabase.deleteRecipeCategory(returned));\n }", "void deleteCategoryProducts(long id);", "@Before\n public void getTestCategory() {\n if (sessionId == null) {\n getTestSession();\n }\n\n if (testCategoryId == null) {\n testCategoryId = Util.createTestCategory(TEST_CATEGORY_NAME, sessionId);\n }\n }", "public void unsetEntityContext() {\n testAllowedOperations(\"unsetEntityContext\");\n }", "@Override\n\tpublic boolean deleteProductByCategoryId(int categoryId) {\n\t\treturn false;\n\t}", "public void setFeatured(boolean flag) {\n\t\tthis.featured=flag;\n\t}", "@Test\n\tpublic void withInvalidCategory() {\n\t\tboolean delete = false;\n\t\ttry {\n\t\t\tdelete = FlowerManager.deleteFlower(\"christina\", \"rose\");\n\t\t} catch (ServiceException e) {\n\n\t\t\te.printStackTrace();\n\t\t\tassertFalse(delete);\n\t\t}\n\t}", "void clearFeatures();", "@Test\r\n public void testDeleteRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(recipe1.getName(), coffeeMaker.deleteRecipe(0));\r\n assertNull(coffeeMaker.deleteRecipe(0)); // Test already delete recipe\r\n }", "public void resetFeatureState()\r\n {\r\n myMetaDataHandler.reset();\r\n myTimeHandler.reset();\r\n myFeatureId = 0;\r\n myFeatureColor = Color.WHITE;\r\n }", "@Test\n public void deleteCategory_ReturnsTrue(){\n int returned = testDatabase.addCategory(category);\n assertEquals(\"deleteCategory - Returns True\", true, testDatabase.deleteCategory(returned));\n }", "@Test\n @IfProfileValue(name=\"dept-test-group\", values = {\"all\",\"dept-update\"})\n public void _2_4_3_removeBCfromDept() throws Exception {\n Department d = d_1_1;\n d.removeBusinessCategory(bc_2);\n this.mockMvc.perform(put(\"/api/v1.0/companies/\"+\n d.getCompany()+\n \"/departments/\"+\n d.getId())\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(d)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.id\",is(d.getId().toString())))\n .andExpect(jsonPath(\"$.description\",is(d.getDescription())))\n .andExpect(jsonPath(\"$.businessCategories\").doesNotExist());\n }", "@Test\r\n\tpublic void TestdeleteFood() {\n\t\tassertNotNull(\"Test if there is valid food list to delete food item\", foodList);\r\n\r\n\t\t// when given an empty food list, after adding two items, the size of the food\r\n\t\t// list is 2. After removing a food item, the size of the food list becomes 1.\r\n\t\tfoodList.add(f1);\r\n\t\tfoodList.add(f2);\r\n\t\tassertEquals(\"Test that food list size is 2\", 2, foodList.size());\r\n\t\tC206_CaseStudy.getAllFoodItem(foodList);\r\n\t\tfoodList.remove(0);\r\n\t\tassertEquals(\"Test that food list size is 1\", 1, foodList.size());\r\n\r\n\t\t// Continue from step 2, test that after removing a food item, the size of the\r\n\t\t// food list becomes empty.\r\n\t\tC206_CaseStudy.getAllFoodItem(foodList);\r\n\t\tfoodList.remove(0);\r\n\t\tassertTrue(\"Test that the food list is empty\", foodList.isEmpty());\r\n\t}", "@Test\n\tpublic void testCategoryRemoved() throws Exception {\n\t\t// Removing a category triggers the disposal of the editor due to the data type being\n\t\t// deleted.\n\t\t//\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tremoveCategory(enummDt);\n\n\t\tclose(waitForInfoDialog());\n\t}", "@Override\r\n\tpublic int deleteProduct(Product product) {\n\t\treturn 0;\r\n\t}", "@Test\n\tpublic final void testGetCategoryFromProductByUid() {\n\t\tfinal long categoryUid = 234L;\n\t\tfinal Category mockCategory = context.mock(Category.class);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(mockCategory).getUidPk();\n\t\t\t\twill(returnValue(categoryUid));\n\t\t\t}\n\t\t});\n\t\tfinal Set<Category> categories = new HashSet<Category>();\n\t\tcategories.add(mockCategory);\n\t\tfinal long productUid = 123L;\n\t\tfinal Product mockProduct = context.mock(Product.class);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(mockProduct).getUidPk();\n\t\t\t\twill(returnValue(productUid));\n\n\t\t\t\tallowing(mockProduct).getCategories();\n\t\t\t\twill(returnValue(categories));\n\t\t\t}\n\t\t});\n\t\tfinal Product product = mockProduct;\n\t\t\n\t\tassertSame(\"Returned category should be the one the product belongs to\", mockCategory,\n\t\t\t\tproductServiceImpl.getCategoryFromProductByUid(product, categoryUid));\n\t\t\n\t\tassertNull(\"non-existent category should return a null result\", productServiceImpl.getCategoryFromProductByUid(product, 0L));\n\t\t\n\t}", "@Test\n\tpublic void updateProductTest2() throws Exception {\n Attribute attr1 = ProductAttributeGenerator.generate(Generator.randomString(6, Generator.AlphaChars), \"Date\", \"AdminEntered\", \"Datetime\", false, false, true);\n Attribute createdAttr = AttributeFactory.addAttribute(apiContext, attr1, HttpStatus.SC_CREATED);\n \n\t\t\n\t //update product type\n ProductType myPT = ProductTypeGenerator.generate(createdAttr, Generator.randomString(5, Generator.AlphaChars));\n ProductType createdPT = ProductTypeFactory.addProductType(apiContext, DataViewMode.Live, myPT, HttpStatus.SC_CREATED);\n \n Product myProduct = ProductGenerator.generate(createdPT);\n List<ProductPropertyValue> salePriceDateValue = new ArrayList<ProductPropertyValue>();\n ProductPropertyValue salePriceValue = new ProductPropertyValue();\n DateTime date = DateTime.now();\n salePriceValue.setValue(date);\n salePriceDateValue.add(salePriceValue);\n myProduct.getProperties().get(myProduct.getProperties().size()-1).setValues(salePriceDateValue);\n Product createdProduct = ProductFactory.addProduct(apiContext, DataViewMode.Live, myProduct, HttpStatus.SC_CREATED);\n\t}", "public void testMarkAllItemsSelectedInCategory()\n\t{\n\t\t// Arrange\n\t\taddListWith6Items(\"testlist\");\n\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, true);\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tCategoryBean newCategory1 = newList.getCategory(\"cat1\");\n\t\tCategoryBean newCategory2 = newList.getCategory(\"cat2\");\n\t\tassertTrue(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t\t\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, false);\n\t\tallLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tnewList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tnewCategory1 = newList.getCategory(\"cat1\");\n\t\tnewCategory2 = newList.getCategory(\"cat2\");\n\t\tassertFalse(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t}", "@Test\r\n\tpublic void delFeedbackTest() {\n\t\tassertNotNull(\"Check if there is valid Feedback arraylist to add to\", feedbackList);\r\n\t\tfeedbackList.add(fb1);\r\n\t\tfeedbackList.add(fb2);\r\n\t\t// Given there are two feedbacks in the Feedback list when one feedback\r\n\t\t// is deleted than the feedback list size should decrease to one\r\n\t\tfeedbackList.remove(fb1);\r\n\t\tassertEquals(\"Check that Feedback arraylist size is 1\", 1, feedbackList.size());\r\n\t\t// Then check if the correct Feedback was deleted\r\n\t\tassertSame(\"Check that Feedback is added\", fb2, feedbackList.get(0));\r\n\t}", "@Test\n public void deleteRecipeCategory_ReturnsFalse(){\n assertEquals(\"deleteRecipeCategory - Returns False\",false, testDatabase.deleteRecipeCategory(Integer.MAX_VALUE));\n }", "@Test(enabled = true)\n\tpublic void test002() {\n\t\tCategoryPOM laptops = new CategoryPOM(driver);\n\t\tlaptops.showAllDesktops();\n\t\tlaptops.clickProduct(\"Apple Cinema 30\\\"\");\n\t\tProductPOM appleCinema = new ProductPOM(driver);\n\t\tappleCinema.clickSpecification();\n\t\tWait.sleep(2);\n\t\tappleCinema.clickReview();\n\t\tWait.sleep(2);\n\t\tappleCinema.addToCart();\n\t\tWait.sleep(2);\n\t\tappleCinema.clickCart();\n\t\tWait.sleep(2);\n\t}", "@Test\n public void deleteProduct_onProductLookup_productNotFound() {\n molecularSampleRepository.delete(testMolecularSample.getUuid());\n assertNull(entityManager.find(Product.class, testMolecularSample.getId()));\n }", "@When(\"^Очистить список просмотренных товаров$\")\n public void clearGoodsInViewedGoods() {\n PersonalPage personalPage = new PersonalPage(driver);\n personalPage.searchAndOpenByProfileList(\"Просмотренные товары\");\n //check Viewed Products\n //push button DeleteAll in Viewed Goods\n if (personalPage.confirmationOpenProfile(\"recent-goods-header\")) {\n personalPage.clearAll();\n personalPage.confirmationOpenProfile(\"recent-goods-header\");\n }\n }", "@Test\n public void testDeleteProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n doNothing().when(productRepository).delete(product);\n\n testResponseData(RequestInfo.builder()\n .request(delete(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(adminToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "@Before\n\tpublic void mockData (){\n\t\tcategoryRequest.setCategoryName(\"Yoga\");\n\t\t\n\t}", "@Test\n public void foodDeletedGoesAway() throws Exception {\n createFood();\n // locate the food item\n\n // delete the food item\n\n // check that food item no longer locatable\n\n }", "@Test\n public void getAllRecipeCategories_ReturnsNull(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipeCategory(returned);\n assertEquals(\"getAllRecipeCategories - Empty List Returned\", null, testDatabase.getAllRecipeCategories(returned));\n }", "public void RemoveproductCartSaucedemo() {\n\t\t\t\t\tdriver.findElement(RemoveProduct).click();\n\t\t\n\t\t\t\t}", "public static void clearTempProdList() {\r\n tempProductList.clear();\r\n }", "public void shuffleItems() {\n LoadProducts(idCategory);\n }", "@After\r\n public void cleanTestObject()\r\n {\r\n testLongTermStorage.resetInventory();\r\n }", "Boolean removeCategoryfromDvd(Integer category_Id, Integer dvdId) \n throws DvdStoreException;", "@Test\n public void testRemoveCategory() {\n\n HashMap<String,Rights> rightsByCat1 = new HashMap<String,Rights>();\n rightsByCat1.put(\"family\", new Rights(true,true,false,false));\n rightsByCat1.put(\"friends\", new Rights(true,true,true,false));\n \n HashMap<String,Rights> rightsByCat2 = new HashMap<String,Rights>();\n rightsByCat2.put(\"judo\", new Rights(true,true,true,true));\n rightsByCat2.put(\"yoga\", new Rights(false,false,false,false));\n \n Song song1 = new Song(\"1\", \"titre1\", \"artiste1\", \"album1\", \"1\", new LinkedList<String>(), rightsByCat1);\n Song song2 = new Song(\"2\", \"titre2\", \"artiste2\", \"album2\", \"2\", new LinkedList<String>(), rightsByCat2);\n ArrayList<Song> songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n SongLibrary library = new SongLibrary(songs);\n \n library.removeCategory(\"family\");\n assertFalse(library.getSong(\"1\").getRightsByCategory().containsKey(\"family\"));\n\n }", "@Override\n\tpublic boolean update(ProductCategory procate) {\n\t\treturn false;\n\t}", "@Test\n public void deleteCategory_ReturnsFalse(){\n assertEquals(\"deleteCategory - Returns False\", false, testDatabase.deleteCategory(Integer.MAX_VALUE));\n }", "@Test\n\tpublic void testGetCategoryService() {\n\t\tassertSame(categoryService, this.importGuidHelper.getCategoryService());\n\t}", "void deleteCategory(Category category);", "void removeProduct(Product product);", "@Test\n public void addToCategory() throws Exception {\n withProductAndUnconnectedCategory(client(), (final Product product, final Category category) -> {\n assertThat(product.getMasterData().getStaged().getCategories()).isEmpty();\n\n final String orderHint = \"0.123\";\n final Product productWithCategory = client()\n .executeBlocking(ProductUpdateCommand.of(product, AddToCategory.of(category, orderHint)));\n\n final Reference<Category> categoryReference = productWithCategory.getMasterData().getStaged().getCategories().stream().findAny().get();\n assertThat(categoryReference.referencesSameResource(category)).isTrue();\n assertThat(productWithCategory.getMasterData().getStaged().getCategoryOrderHints().get(category.getId())).isEqualTo(orderHint);\n\n final Product productWithoutCategory = client()\n .executeBlocking(ProductUpdateCommand.of(productWithCategory, RemoveFromCategory.of(category)));\n\n assertThat(productWithoutCategory.getMasterData().getStaged().getCategories()).isEmpty();\n });\n }", "void removeHasRecommendation(PM_Learning_Material oldHasRecommendation);", "Boolean restoreCategory(Integer category_Id) throws DvdStoreException;", "void deleteCategoryParameterProductDetails(long id);", "@Test\n public void testClear() {\n System.out.println(\"clear\");\n Setting s = Setting.factory();\n Setting s1 = Setting.factory();\n Setting s2 = Setting.factory();\n Setting s3 = Setting.getSetting(\"test1\");\n assertFalse(Setting.isNotUsed(\"test1\"));\n Setting s4 = Setting.getSetting(\"test1\");\n assertEquals(s3, s4);\n Setting.clear();\n assertTrue(Setting.isNotUsed(\"test1\"));\n\n }", "void clearTypedFeatures();", "@Test\n public void removeAlreadyDELETED() throws BusinessException {\n final ProductService productService = new ProductService();\n\n final Long pProductId = 1L;\n\n new Expectations() {\n\n {\n\n Deencapsulation.setField(productService, \"productDAO\", mockProductDAO);\n\n ProductBO productBO = new ProductBO();\n productBO.setStatus(Status.DELETED);\n mockProductDAO.get(1L);\n times = 1;\n returns(productBO);\n }\n };\n\n productService.remove(pProductId);\n }", "@After\n\tpublic void tearDownTest() {\n\t\tDepclipsePlugin.getDefault().getPreferenceStore().setValue(\n\t\t\t\tJDependPreferenceConstants.PREF_ACTIVE_FILTERS_LIST,\n\t\t\t\tDepclipsePlugin.getDefault().getPreferenceStore()\n\t\t\t\t\t\t.getDefaultString(\n\t\t\t\t\t\t\t\tJDependPreferenceConstants.PREF_ACTIVE_FILTERS_LIST));\n\t}", "public ConfigProductWithSpecialPriceDetailPage removeProductGalleryFromConfigProductWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new ConfigProductWithSpecialPriceDetailPage();\n }", "@Test(expected = BusinessException.class)\n public void unblacklistDeleted() throws BusinessException {\n final ProductService productService = new ProductService();\n\n final Long pProductId = 1L;\n\n new Expectations() {\n\n {\n\n Deencapsulation.setField(productService, \"productDAO\", mockProductDAO);\n\n ProductBO productBO = new ProductBO();\n productBO.setStatus(Status.DELETED);\n mockProductDAO.get(1L);\n times = 1;\n returns(productBO);\n }\n };\n\n productService.unblacklist(pProductId);\n }", "@Test\r\n public void testDeleteNonExistRecipe() {\r\n assertNull(coffeeMaker.deleteRecipe(1)); // Test do not exist recipe\r\n }", "@Test\n\tpublic void testDeleteCart() {\n\t}", "public void deleteProduct() {\n deleteButton.click();\n testClass.waitTillElementIsVisible(emptyShoppingCart);\n Assert.assertEquals(\n \"Message is not the same as expected\",\n MESSAGE_EMPTY_SHOPPING_CART,\n emptyShoppingCart.getText());\n }", "@Test\n public void categoryTest() {\n // TODO: test category\n }", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "@Test\n\tpublic void playAndRemoveDevelopmentCardTest()\n\t\t\tthrows CannotAffordException, DoesNotOwnException, BankLimitException, CannotPlayException\n\t{\n\t\tassertTrue(p.getDevelopmentCards().size() == 0);\n\t\tp.grantResources(DevelopmentCardType.getCardCost(), game.getBank());\n\t\tDevelopmentCardType c = buyDevelopmentCard();\n\t\tassertTrue(p.getDevelopmentCards().get(c) == 1);\n\n\t\t// Reset recent dev card for player, so they can play this turn\n\t\tgame.getPlayer(game.getCurrentPlayer()).clearRecentDevCards();\n\n\t\t// Reset recent dev card for player, so they can play this turn\n\t\tgame.getPlayer(game.getCurrentPlayer()).clearRecentDevCards();\n\n\t\t// Play card and test it was removed\n\t\tDevelopmentCardType key = (DevelopmentCardType) p.getDevelopmentCards().keySet().toArray()[0];\n\t\tp.playDevelopmentCard(key, game.getBank());\n\n\t\tassertTrue(p.getDevelopmentCards().get(c) == 0);\n\t}", "@Test\n public void testAdvancedSearchCategoryResult() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Click on Advanced Search link in footer \" );\n WebElement advancedSearchButton = driver.findElement(By.partialLinkText(\"Advanced Search\"));\n advancedSearchButton.click();\n WebElement searchCassette = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"input\"));\n WebElement searchButton = driver.findElement(By.id(\"AdvancedSearchResults\")).findElement(By.tagName(\"button\"));\n searchCassette.click();\n searchCassette.sendKeys(\"sculpture\");\n log.info(\"Click on search Button \" );\n searchButton.click();\n log.info(\"Identify the Category Card list in results\" );\n List<WebElement> productGrid = driver.findElements(By.tagName(\"a\"));\n List<WebElement> categoryItems = new ArrayList<WebElement>();\n for (WebElement prod : productGrid)\n if (prod.getAttribute(\"class\").contains(\"category-item\"))\n categoryItems.add(prod);\n TestCase.assertTrue(categoryItems.size() != 0);\n log.info(\"Click first Category Card in results\" );\n categoryItems.get(0).click();\n log.info(\"Confirm category type page is displayed in browser\" );\n TestCase.assertTrue(driver.getCurrentUrl().contains(\"-c-\"));\n }", "@Test\n public void productTest() {\n // TODO: test product\n }", "@Test(expected = ProductCategoryNotSpecifiedException.class)\r\n\tpublic void testEmptyCategory() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 1, \"\");\r\n\t estimator.estimateFinalCost();\r\n\t}", "private void defaultProductCategoryShouldBeFound(String filter) throws Exception {\n restProductCategoryMockMvc.perform(get(\"/api/product-categories?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(productCategory.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].category\").value(hasItem(DEFAULT_CATEGORY.toString())))\n .andExpect(jsonPath(\"$.[*].description\").value(hasItem(DEFAULT_DESCRIPTION.toString())))\n .andExpect(jsonPath(\"$.[*].imageFullContentType\").value(hasItem(DEFAULT_IMAGE_FULL_CONTENT_TYPE)))\n .andExpect(jsonPath(\"$.[*].imageFull\").value(hasItem(Base64Utils.encodeToString(DEFAULT_IMAGE_FULL))))\n .andExpect(jsonPath(\"$.[*].imageFullUrl\").value(hasItem(DEFAULT_IMAGE_FULL_URL.toString())))\n .andExpect(jsonPath(\"$.[*].imageThumbContentType\").value(hasItem(DEFAULT_IMAGE_THUMB_CONTENT_TYPE)))\n .andExpect(jsonPath(\"$.[*].imageThumb\").value(hasItem(Base64Utils.encodeToString(DEFAULT_IMAGE_THUMB))))\n .andExpect(jsonPath(\"$.[*].imageThumbUrl\").value(hasItem(DEFAULT_IMAGE_THUMB_URL.toString())));\n\n // Check, that the count call also returns 1\n restProductCategoryMockMvc.perform(get(\"/api/product-categories/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }", "@Test\r\n public void testResetInventory2()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Storage should be empty\", new HashMap<>(), testLongTermStorage.getInventory());\r\n }", "@Test \r\n\tpublic void testSacarProductoDelPedidoSinStock(){\n\t\tventaAD.agregarProductoSinStock(pre1, 1);\r\n\t\tventaAD.sacarProductosDelLosPedidosSinStock(pre1, 1);\r\n\t\tassertEquals(ventaAD.getProductosSinStock().size(), 0);\r\n\t\t\r\n\t}", "void loadFeatured();", "@BeforeClass\n public static void beforeStories() throws Exception {\n Thucydides.getCurrentSession().clear();\n }", "@Test\n public void deleteRecipeIngredient_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedIngredient = testDatabase.addRecipeIngredient(recipeIngredient);\n testDatabase.deleteRecipeIngredients(returnedIngredient);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n boolean deleted = true;\n if(allIngredients != null){\n for(int i = 0; i < allIngredients.size(); i++){\n if(allIngredients.get(i).getIngredientID() == returnedIngredient){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeIngredient - Deletes From Database\", true, deleted);\n }", "@Test(expected = NullReferenceException.class)\n public void setProductIsNull() throws NullReferenceException {\n cartItem.setProduct(null);\n }", "Boolean updateCategory(DvdCategory category) throws DvdStoreException;", "@Test\n public void removeByCatTest(){\n // Given\n CatHouse catHouse = new CatHouse();\n Cat tom = new Cat(\"tom\", new Date(), 1);\n\n // When\n catHouse.add(tom);\n catHouse.remove(tom);\n Integer expected = 0;\n Integer actual = catHouse.getNumberOfCats();\n\n // Then\n Assert.assertEquals(expected, actual);\n }", "@Test\n public void setProductCount() throws NegativeValueException {\n cartItem.setProductCount(56);\n int expected = 56;\n int actual = cartItem.getProductCount();\n assertEquals(expected, actual);\n }", "void restoreCategory(Category category);", "@Test\n void testDeleteCity() {\n CityList cityList = mockCityList();\n cityList.delete(mockCity());\n\n assertFalse(cityList.hasCity(mockCity()));\n assertTrue(cityList.countCities() == 0);\n\n }", "@Test\r\n\tpublic void testRemoveAll() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 3, \"iron\"));\r\n\t\tsample.add(new Munitions(new Munitions(3, 4, \"iron\")));\r\n\t\tAssert.assertTrue(list.removeAll(sample));\r\n\t\tAssert.assertFalse(list.removeAll(sample));\r\n\t\tAssert.assertEquals(13, list.size());\r\n\t}", "boolean isProductCategoryConfigurable(int productCategoryId);", "public void deleteProduct(Supplier entity) {\n\t\t\r\n\t}", "@Override\n\tpublic void deleteProduct(int product_id) {\n\n\t}", "@Before\n public void setUp() throws IkatsDaoException {\n Facade.removeAllMacroOp();\n }", "@Test\n public void testPurgeForTemporaryDb() throws Exception {\n try (MockRequestUtils.VerifiedMock ignore = mockRequest.mockQuery(\n \"query_responses/case_claim_response.xml\")) {\n Response<EntityListResponse> response = navigate(new String[]{\"1\", \"action 1\"},\n EntityListResponse.class);\n }\n\n SqlSandboxUtils.purgeTempDb(Instant.now());\n\n // verify the case storage has been cleared\n String cacheKey = \"caseclaimdomain_caseclaimuser_http://localhost:8000/a/test/phone/search\"\n + \"/_case_type=case1=case2=case3_include_closed=False\";\n SQLiteDB caseSearchDb = new CaseSearchDB(\"caseclaimdomain\", \"caseclaimuser\", null);\n String caseSearchTableName = getCaseSearchTableName(cacheKey);\n UserSqlSandbox caseSearchSandbox = new CaseSearchSqlSandbox(caseSearchTableName, caseSearchDb);\n IStorageUtilityIndexed<Case> caseSearchStorage = caseSearchSandbox.getCaseStorage();\n assertFalse(caseSearchStorage.isStorageExists(), \"Case search storage has not been cleared after purge\");\n FormplayerCaseIndexTable caseSearchIndexTable = getCaseIndexTable(caseSearchSandbox, caseSearchTableName);\n assertFalse(caseSearchIndexTable.isStorageExists(), \"Case Indexes have not been cleared after purge\");\n\n }", "public void resetQuantity() {\n Log.d(\"Method\", \"resetQuantity()\");\n CheckBox cb = (CheckBox) findViewById(R.id.whipped_checkbox_view);\n\n coffeeCount = getResources().getInteger(R.integer.min_coffee);\n quantityAlert = false;\n cb.setChecked(false);\n displayQuantity();\n }", "@Test(suiteName = \"NowPlaying\", testName = \"Now Playing - Live - Disallowed - Category\", description = \"Validating Disallowed category\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-236:EVQAAND-229\" })\n\tpublic void verifydisallowedCategory() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"Verifying Disallowed Category MOBANDEVER-236:EVQAAND-229\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickNews();\n\t\t\tcommon.scrollUntilTextExists(\"News/Public Radio\");\n\t\t\tgetPageFactory().getEvehome().clickSubCatNews();\n\t\t\tgetPageFactory().getEvehome().clickNewsChannel1();\n\t\t\tgetPageFactory().getEvehome().validateNPLScreen();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}", "Boolean deleteCategory(Integer category_Id) throws DvdStoreException;", "public void verifyProduct() throws Throwable{\r\n\t\twdlib.waitForElement(getProductText());\r\n\t\t\r\n\t\tif(!getProductText().getText().equals(\"None Included\"))\r\n\t\t{\r\n\t\t\tReporter.log(getProductText().getText()+\" was deleted\",true);\r\n\t\t\tdeleteProduct();\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\r\n\tvoid testdeleteProductFromCart() throws Exception\r\n\t{\r\n\t\tCart cart=new Cart();\r\n\t\tcart.setProductId(1001);\r\n\t\tcartdao.addProductToCart(cart);\r\n\t\tList<Cart> l=cartdao.findAllProductsInCart();\r\n\t\tcart=cartdao.deleteProductByIdInCart(1001);\r\n\t\tassertEquals(1,l.size());\r\n\t}", "boolean hasProductBiddingCategoryConstant();", "public void setProductCategory(java.lang.String productCategory) {\r\n this.productCategory = productCategory;\r\n }", "@Test\n public void testSetCategoryDescription() {\n System.out.println(\"setCategoryDescription\");\n String CategoryDescription = \"testDescription\";\n Category instance = new Category();\n instance.setCategoryDescription(CategoryDescription);\n assertEquals(CategoryDescription, instance.getCategoryDescription());\n }", "@Test\n public void unblacklistAlreadyUnblacklist() throws BusinessException {\n final ProductService productService = new ProductService();\n\n final Long pProductId = 1L;\n\n new Expectations() {\n\n {\n\n Deencapsulation.setField(productService, \"productDAO\", mockProductDAO);\n\n ProductBO productBO = new ProductBO();\n productBO.setStatus(Status.CREATED);\n mockProductDAO.get(1L);\n times = 1;\n returns(productBO);\n }\n };\n\n productService.unblacklist(pProductId);\n }", "@Test\n\tpublic void testLopLCSchemeFlavors() \n\t{\n\t\tString id = \"lcFlavors\";\n\t\tassertLCVolLopped(id);\n\t\tassertNoUnloppedLCVol1(id);\n\t\tassertNoUnloppedLCVol2(id);\n\t}", "public void Case6(){\n System.out.println(\"Testing Case 6\");\n byDescription();\n clear();\n System.out.println(\"Case 6 Done\");\n }" ]
[ "0.7342913", "0.6270855", "0.57907045", "0.57043827", "0.56581146", "0.55652994", "0.5531046", "0.5470135", "0.54143614", "0.53620106", "0.5357685", "0.5332458", "0.5266757", "0.52530223", "0.52300453", "0.52157277", "0.5214855", "0.518571", "0.51597035", "0.5140823", "0.5120917", "0.5120059", "0.5097254", "0.50549436", "0.5048146", "0.5043621", "0.5019158", "0.49855757", "0.49796924", "0.49785888", "0.49724805", "0.49627745", "0.49578747", "0.49538043", "0.49421614", "0.49411938", "0.4940392", "0.49277493", "0.49271378", "0.4921575", "0.4913115", "0.49102762", "0.49100736", "0.49011195", "0.48961675", "0.4888076", "0.4870266", "0.48617533", "0.48576978", "0.48293674", "0.48286453", "0.48244557", "0.48195547", "0.48086712", "0.48051545", "0.47962525", "0.47936618", "0.4792904", "0.47900623", "0.4785511", "0.47825825", "0.47765225", "0.47721574", "0.47707307", "0.47665364", "0.47600666", "0.4755101", "0.47518897", "0.4742547", "0.4734064", "0.47280157", "0.47225446", "0.47189847", "0.47174215", "0.4713798", "0.47108802", "0.47064373", "0.4704354", "0.47040498", "0.46976203", "0.46950138", "0.46879926", "0.46864766", "0.46854675", "0.46800682", "0.46789342", "0.46757284", "0.4674943", "0.4667121", "0.4664586", "0.46596202", "0.46396366", "0.46393588", "0.4632563", "0.46261472", "0.46259183", "0.46240622", "0.46211103", "0.46165937", "0.46162894" ]
0.8514937
0
Test that getCategoryFromProductByUid returns the product's default category, or null if the given category does not exist.
@Test public final void testGetCategoryFromProductByUid() { final long categoryUid = 234L; final Category mockCategory = context.mock(Category.class); context.checking(new Expectations() { { allowing(mockCategory).getUidPk(); will(returnValue(categoryUid)); } }); final Set<Category> categories = new HashSet<Category>(); categories.add(mockCategory); final long productUid = 123L; final Product mockProduct = context.mock(Product.class); context.checking(new Expectations() { { allowing(mockProduct).getUidPk(); will(returnValue(productUid)); allowing(mockProduct).getCategories(); will(returnValue(categories)); } }); final Product product = mockProduct; assertSame("Returned category should be the one the product belongs to", mockCategory, productServiceImpl.getCategoryFromProductByUid(product, categoryUid)); assertNull("non-existent category should return a null result", productServiceImpl.getCategoryFromProductByUid(product, 0L)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ULocale getDefault(Category category) {\n/* 169 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic Category getCategory(String categoryId) throws Exception {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic ProductDAO getByCategory(int categoryId) {\n\t\treturn null;\r\n\t}", "private void defaultProductCategoryShouldBeFound(String filter) throws Exception {\n restProductCategoryMockMvc.perform(get(\"/api/product-categories?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(productCategory.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].category\").value(hasItem(DEFAULT_CATEGORY.toString())))\n .andExpect(jsonPath(\"$.[*].description\").value(hasItem(DEFAULT_DESCRIPTION.toString())))\n .andExpect(jsonPath(\"$.[*].imageFullContentType\").value(hasItem(DEFAULT_IMAGE_FULL_CONTENT_TYPE)))\n .andExpect(jsonPath(\"$.[*].imageFull\").value(hasItem(Base64Utils.encodeToString(DEFAULT_IMAGE_FULL))))\n .andExpect(jsonPath(\"$.[*].imageFullUrl\").value(hasItem(DEFAULT_IMAGE_FULL_URL.toString())))\n .andExpect(jsonPath(\"$.[*].imageThumbContentType\").value(hasItem(DEFAULT_IMAGE_THUMB_CONTENT_TYPE)))\n .andExpect(jsonPath(\"$.[*].imageThumb\").value(hasItem(Base64Utils.encodeToString(DEFAULT_IMAGE_THUMB))))\n .andExpect(jsonPath(\"$.[*].imageThumbUrl\").value(hasItem(DEFAULT_IMAGE_THUMB_URL.toString())));\n\n // Check, that the count call also returns 1\n restProductCategoryMockMvc.perform(get(\"/api/product-categories/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }", "public product_uom getBaseUoM_byCategory(Integer category) {\r\n\t\t// use caching\r\n\t\tif (baseunits.containsKey(category))\r\n\t\t\treturn baseunits.get(category);\r\n\r\n\t\tOpenERPDomain domain = new OpenERPDomain();\r\n\t\tdomain.add(\"category_id\", category);\r\n\t\tdomain.add(\"uom_type\", \"=\", \"reference\");\r\n\t\tObject[] ids = openerp.search(\"product.uom\", domain);\r\n\r\n\t\tif (ids == null)\r\n\t\t\treturn null;\r\n\r\n\t\tInteger id = null;\r\n\t\tif (ids.length > 0)\r\n\t\t\tid = (Integer) ids[0];\r\n\r\n\t\tif (id == null)\r\n\t\t\treturn null;\r\n\r\n\t\tproduct_uom p = new product_uom(openerp, id);\r\n\t\tbaseunits.put(id, p);\r\n\t\treturn p;\r\n\t}", "public ProductCategory findProductCategoryById(long id) {\n\t\tif(existById(id))\n\t\t\treturn adminCategoryRepoIF.findById(id).get();\n\t\telse\n\t\t\treturn null;\n\t}", "private void loadDefaultCategory() {\n CategoryTable category = new CategoryTable();\n String categoryId = category.generateCategoryID(db.getLastCategoryID());\n String categoryName = \"Food\";\n String type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n categoryId = category.generateCategoryID(db.getLastCategoryID());\n categoryName = \"Study\";\n type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n db.close();\n }", "private void defaultProductCategoryShouldNotBeFound(String filter) throws Exception {\n restProductCategoryMockMvc.perform(get(\"/api/product-categories?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restProductCategoryMockMvc.perform(get(\"/api/product-categories/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"0\"));\n }", "@Test\n\tpublic final void testResetProductCategoryFeatured() {\n\t\tfinal Product mockProduct = context.mock(Product.class);\n\t\tfinal Category mockCategory = context.mock(Category.class);\n\n\t\tProductServiceImpl service = new ProductServiceImpl() {\n\t\t\t@Override\n\t\t\tpublic Category getCategoryFromProductByUid(final Product product, final long categoryUid) {\n\t\t\t\treturn mockCategory;\n\t\t\t}\n\t\t};\n\t\t\n\t\tservice.setProductDao(mockProductDao);\n\t\tfinal long productUid = 123L;\n\t\tfinal long categoryUid = 234L;\n\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\t//make sure it's set to 0\n\t\t\t\toneOf(mockProduct).setFeaturedRank(mockCategory, 0);\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(with(any(long.class)));\n\t\t\t\twill(returnValue(mockProduct));\n\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(any(Product.class)));\n\t\t\t\twill(returnValue(mockProduct));\n\t\t\t}\n\t\t});\n\t\tservice.resetProductCategoryFeatured(productUid, categoryUid);\n\t}", "Optional<Category> getCategory(Integer id);", "public static int resolveProductCategory(String category)\n {\n PreparedStatement stmt = null;\n ResultSet myRst;\n\n try\n {\n String pstmt = \"SELECT ID FROM Product_Categories WHERE Product_Category = ?\";\n\n stmt = DBConnectionManager.con.prepareStatement(pstmt);\n stmt.setString(1,category);\n\n myRst = stmt.executeQuery();\n\n myRst.next();\n\n return myRst.getInt(1);\n\n } catch (SQLException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try { if (stmt != null) stmt.close(); } catch (Exception ignored) {}\n }\n\n return -1;\n }", "Category getCategoryById(int categoryId);", "public void setProductCategory(java.lang.String productCategory) {\r\n this.productCategory = productCategory;\r\n }", "@Override\n\tpublic ICategoryView getProductCategoryView() {\n\t\tLog.debug(\"getProductCategoryView is null ......................\");\n\t\treturn null;\n\t}", "Category getCategoryById(Integer categoryId);", "ProductCategory findOneProductCategoryByProductCategoryCode(String categoryCode);", "ProductCategory find(int id)throws IllegalArgumentException;", "Category getCategoryByName(String categoryName);", "@Test\n public void findCategoryById() {\n\n Long categoryId = (long) 1;\n CategoryEto category = this.dishmanagement.findCategory(categoryId);\n assertThat(category).isNotNull();\n }", "@Override\n\tpublic Category fetchByPrimaryKey(long categoryId) {\n\t\treturn fetchByPrimaryKey((Serializable)categoryId);\n\t}", "@Test\n public void getCategory_ReturnsCategory(){\n int returned = testDatabase.addCategory(category);\n assertNotEquals(\"getCategory - Return Non-Null Category\",null, testDatabase.getCategory(returned));\n }", "public Category getCategory() {\n return (category == null) ? new Category() : category;\n }", "public static String autoRelatedCategory(String category){\n if (category.equalsIgnoreCase(SITE_LABEL)){\n return LOCATION_LABEL;\n }\n if (category.equalsIgnoreCase(OBSERVATION_LABEL)){\n return SITE_LABEL;\n }\n return null;\n }", "public void setCategoryId(Long categoryId) {\n this.categoryId = categoryId;\n }", "public String getProductCategory() {\n\t\t// begin\n\t\treturn productCategory;\n\t\t// end\n\t\t// return null;\n\t}", "Optional<Category> getCategory(String title);", "public String getCategory() {\n\t\treturn null;\r\n\t}", "@RequestMapping(value = \"/category/{id}\", method = RequestMethod.GET)\n\tpublic @ResponseBody Optional<Category> findCategoryRest(@PathVariable(\"id\") Long categoryId) {\n\t\treturn CatRepo.findById(categoryId);\n\t}", "private Category getCategory()\n\t{\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Choose category:\");\n\t\tint i = 1;\n\t\tfor(Category category : Category.values())\n\t\t{\n\t\t\tSystem.out.println(i + \": \"+category.getCategoryDescription());\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tString userChoiceStr = scanner.nextLine();\n\t\tint userChoice;\n\t\ttry\n\t\t{\n\t\t\tuserChoice = Integer.parseInt(userChoiceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(userChoice<1 || userChoice>25)\n\t\t{\n//\t\t\tSystem.out.println(\"Invalid category code\");\n\t\t\treturn null;\n\t\t}\n\t\tCategory category;\n\t\tswitch (userChoice) \n\t\t{\n\t\t\tcase 1: category = Category.ARTS; break;\n\t\t\tcase 2: category = Category.AUTOMOTIVE; break;\n\t\t\tcase 3: category = Category.BABY; break;\n\t\t\tcase 4: category = Category.BEAUTY; break;\n\t\t\tcase 5: category = Category.BOOKS; break;\n\t\t\tcase 6: category = Category.COMPUTERS; break;\n\t\t\tcase 7: category = Category.CLOTHING;break;\n\t\t\tcase 8: category = Category.ELECTRONICS; break;\n\t\t\tcase 9: category = Category.FASHION; break;\n\t\t\tcase 10: category = Category.FINANCE; break;\n\t\t\tcase 11: category = Category.FOOD; break;\n\t\t\tcase 12: category = Category.HEALTH; break;\n\t\t\tcase 13: category = Category.HOME; break;\n\t\t\tcase 14: category = Category.LIFESTYLE; break;\n\t\t\tcase 15: category = Category.MOVIES; break;\n\t\t\tcase 16: category = Category.MUSIC; break;\n\t\t\tcase 17: category = Category.OUTDOORS; break;\n\t\t\tcase 18: category = Category.PETS; break;\n\t\t\tcase 19: category = Category.RESTAURANTS; break;\n\t\t\tcase 20: category = Category.SHOES; break;\n\t\t\tcase 21: category = Category.SOFTWARE; break;\n\t\t\tcase 22: category = Category.SPORTS; break;\n\t\t\tcase 23: category = Category.TOOLS; break;\n\t\t\tcase 24: category = Category.TRAVEL; break;\n\t\t\tcase 25: category = Category.VIDEOGAMES; break;\n\t\t\tdefault: category = null;System.out.println(\"No such category\"); break;\n\t\t}\n\t\treturn category;\n\t}", "ConfigCategory getCategoryById(long categoryId);", "public void setCategoryId(long categoryId);", "public String getCategory() {\n\t\treturn null;\n\t}", "public String getCategory() {\n\t\treturn null;\n\t}", "@Override\n public List<Product> getCategory(String category, int userId) {\n\n return openSession().createNamedQuery(Product.GET_CATEGORY, Product.class)\n .setParameter(\"userId\",userId)\n .setParameter(\"category\",category)\n .getResultList();\n }", "private void defaultCategoryShouldBeFound(String filter) throws Exception {\n restCategoryMockMvc.perform(get(\"/api/categories?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(category.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].label\").value(hasItem(DEFAULT_LABEL)))\n .andExpect(jsonPath(\"$.[*].primaryColor\").value(hasItem(DEFAULT_PRIMARY_COLOR)))\n .andExpect(jsonPath(\"$.[*].secondaryColor\").value(hasItem(DEFAULT_SECONDARY_COLOR)));\n\n // Check, that the count call also returns 1\n restCategoryMockMvc.perform(get(\"/api/categories/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }", "@Test\n\tpublic void testGetPrimaryCategory() {\n\t\tString primaryCategory = rmitAnalyticsModel.getPrimaryCategory();\n\t\tAssert.assertNotNull(primaryCategory);\n\t\tAssert.assertEquals(\"rmit\", primaryCategory);\n\t}", "public void setCategoryId(Integer categoryId) {\n this.categoryId = categoryId;\n }", "public String getCategoryId() {\n return categoryId;\n }", "public Long getCategoryId() {\n return categoryId;\n }", "Category getCategoryById(int id);", "@Test\n public void getCategory_ReturnsNull(){\n assertEquals(\"getCategory - Returns Null\", null, testDatabase.getCategory(Integer.MAX_VALUE));\n }", "boolean getPageCategoryIdNull();", "com.google.ads.googleads.v14.services.AudienceInsightsCategory getCategory();", "public java.lang.String getProductCategory() {\r\n return productCategory;\r\n }", "@GetMapping(\"/category\")\n @TokenRequired\n @ApiOperation(value = \"Gets a Category\", httpMethod = \"GET\")\n public ServiceResponse<CategoryDto> getCategory(@RequestParam(value = \"categoryId\", required = false) String categoryId,\n @RequestParam(value = \"slug\", required = false) String slug,\n HttpServletResponse response) {\n ServiceResponse<CategoryDto> serviceResponse = new ServiceResponse<>();\n ServiceRequest<CategoryDto> serviceRequest = new ServiceRequest<>();\n try {\n checkRequiredParameters(categoryId, slug);\n serviceRequest.setParameter(createDto(categoryId, slug));\n Category categoryResult = categoryService.getCategoryByIdOrSlug(convertToEntity(serviceRequest.getParameter()));\n handleResponse(serviceResponse, convertToDto(categoryResult), response, true);\n } catch (Exception e) {\n exceptionHandler.handleControllerException(serviceResponse, serviceRequest, e, getMethodName(), response);\n }\n return serviceResponse;\n }", "@Test\n public void deletarProductCategoryTest() throws ApiException {\n Integer productCategoryCode = null;\n api.deletarProductCategory(productCategoryCode);\n\n // TODO: test validations\n }", "public Integer getCategoryId() {\n return categoryId;\n }", "public Integer getCategoryId() {\n return categoryId;\n }", "@Test\n\tpublic void getCategoryTest() {\n\t\tList<Map<String, String>> list = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"category\", \"Placement\");\n\t\tlist.add(map);\n\t\twhen(TicketDao.getCategory()).thenReturn(list);\n\t\tString category = \"<option value='\" + \"Placement\" + \"'>\" + \"Placement\" + \"</option>\";\n\t\tassertEquals(category, Service.getCategory());\n\t}", "static public Category getCategory(String categoryName){\n switch(categoryName) {\n case \"SPORTS\":\n return SPORTS;\n case \"HISTORY\":\n return HISTORY;\n case \"SCIENCE\":\n return SCIENCE;\n case \"MUSIC\":\n return MUSIC;\n default:\n return null;\n }\n }", "boolean getForumCategoryIdNull();", "public static void checkCategoryExist(String referenceCategory,Categorie categorie) throws GestionResourceException {\n\t\tif(categorie==null){\n\t\t\tthrow new GestionResourceException(\"\", \"La categorie de reference \"+referenceCategory+\" n'existe pas\");\n\t\t}\n\t}", "@Test\n public void addToCategory() throws Exception {\n withProductAndUnconnectedCategory(client(), (final Product product, final Category category) -> {\n assertThat(product.getMasterData().getStaged().getCategories()).isEmpty();\n\n final String orderHint = \"0.123\";\n final Product productWithCategory = client()\n .executeBlocking(ProductUpdateCommand.of(product, AddToCategory.of(category, orderHint)));\n\n final Reference<Category> categoryReference = productWithCategory.getMasterData().getStaged().getCategories().stream().findAny().get();\n assertThat(categoryReference.referencesSameResource(category)).isTrue();\n assertThat(productWithCategory.getMasterData().getStaged().getCategoryOrderHints().get(category.getId())).isEqualTo(orderHint);\n\n final Product productWithoutCategory = client()\n .executeBlocking(ProductUpdateCommand.of(productWithCategory, RemoveFromCategory.of(category)));\n\n assertThat(productWithoutCategory.getMasterData().getStaged().getCategories()).isEmpty();\n });\n }", "private Object getAnomizedCategory() {\r\n\tString categorie = (String) record.get(\"categorie\");\r\n\tif (categorie != null) {\r\n\t switch (categorie) {\r\n\t case \"AD\":\r\n\t case \"CO\":\r\n\t case \"FI\":\r\n\t case \"IBL\":\r\n\t case \"KI\":\r\n\t case \"KL\":\r\n\t case \"VO\":\r\n\t\tbreak;\r\n\t default:\r\n\t\tcategorie = null;\r\n\t\tbreak;\r\n\t }\r\n\t}\r\n\r\n\treturn categorie;\r\n }", "@RequestMapping(value=\"/{categoryId}\",\n\t\t\tmethod=RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Category> getCategoryById(@PathVariable(\"categoryId\") Long categoryId){\n\t\t\n\t\tCategory category = categoryService.findById(categoryId);\n\t\tif (category == null) {\n\t\t\treturn new ResponseEntity<Category>(HttpStatus.NOT_FOUND);\n\t\t}\n\t\t\n\t\treturn new ResponseEntity<Category>(category, HttpStatus.OK);\n\t}", "@Override\n public Category getCategoryById(int categoryId)\n {\n String query = \"SELECT * FROM Categories WHERE CategoryID = \" + categoryId;\n ResultSet rs = DataService.getData(query);\n \n try\n {\n if (rs.next())\n {\n return convertResultSetToCategory(rs);\n }\n }\n catch (SQLException e)\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n return null;\n }", "public product_uom searchUoM(Integer category, String name) {\r\n\t\tOpenERPDomain domain = new OpenERPDomain();\r\n\t\tdomain.add(\"category_id\", category);\r\n\t\tdomain.add(\"name\", \"=\", name);\r\n\r\n\t\tObject[] ids = openerp.search(\"product.uom\", domain);\r\n\t\tif (ids == null)\r\n\t\t\treturn null;\r\n\r\n\t\tInteger id = null;\r\n\t\tif (ids.length > 0)\r\n\t\t\tid = (Integer) ids[0];\r\n\r\n\t\tif (id == null)\r\n\t\t\treturn null;\r\n\r\n\t\treturn getProductUoM(id);\r\n\t}", "public @NotNull Category newCategory();", "default public List<Category> getCategoriesForUserId(long userId){\n\t\tthrow DefaultHandler.notSupported();\n\t}", "public String getCategory() {\r\n return category;\r\n }", "@Before\n public void getTestCategory() {\n if (sessionId == null) {\n getTestSession();\n }\n\n if (testCategoryId == null) {\n testCategoryId = Util.createTestCategory(TEST_CATEGORY_NAME, sessionId);\n }\n }", "private void defaultCategoryShouldNotBeFound(String filter) throws Exception {\n restCategoryMockMvc.perform(get(\"/api/categories?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restCategoryMockMvc.perform(get(\"/api/categories/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "@Test(expected = ProductCategoryNotSpecifiedException.class)\r\n\tpublic void testNullCategory() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 1, null);\r\n\t estimator.estimateFinalCost();\r\n\t}", "public void setProductCategoryId(long productCategoryId) {\n\t\tthis.productCategoryId = productCategoryId;\n\t}", "private Category identifyCategory(Integer hcat) {\n\t\tCategory c = null;\n\t\t\n\t\tif (hcat != null) {\n\t\t\tc = this.categoryMap.get(Long.valueOf(hcat));\n\t\t\tif (c == null) {\n\t\t\t\tc = this.noCategory;\n\t\t\t}\n\t\t\treturn c;\n\t\t}\n\t\telse {\n\t\t\treturn this.noCategory;\n\t\t}\n\t}", "@Override\n\tpublic List<Literature> searchCategory(String category) {\n\t\treturn null;\n\t}", "public Category getSelectedCategory() {\r\n Category selected = getSelectedItem();\r\n\r\n return selected == emptyCategory ? null : selected;\r\n }", "public void setCategory(String category) {\r\n this.category = category;\r\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "@Test\n\tpublic void testSetProductCategoryFeatured() {\n\t\t// set up product and category\n\t\tfinal long productUid = 123L;\n\t\tfinal long categoryUid = 234L;\n\t\tfinal Product product = new ProductImpl();\n\t\tproduct.setUidPk(productUid);\n\t\tproduct.setGuid(\"productGuid\");\n\n\t\tCategory category = new CategoryImpl();\n\t\tcategory.setUidPk(categoryUid);\n\t\tcategory.setGuid(\"categoryGuid\");\n\t\tcategory.setCatalog(new CatalogImpl());\n\t\tproduct.addCategory(category);\n\n\t\t// mock methods\n\t\t\n\t\tArrayList<Integer> returnList = new ArrayList<Integer>();\n\t\treturnList.add(Integer.valueOf(2));\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\n\t\t\t\toneOf(mockProductDao).getWithCategories(with(any(long.class)));\n\t\t\t\twill(returnValue(product));\n\n\t\t\t\toneOf(mockProductDao).getMaxFeaturedProductOrder(with(any(long.class)));\n\t\t\t\twill(returnValue(2));\n\n\t\t\t\toneOf(mockProductDao).saveOrUpdate(with(same(product)));\n\t\t\t}\n\t\t});\n\n\t\t// run the service\n\t\tint newOrder = this.productServiceImpl.setProductCategoryFeatured(product.getUidPk(), category.getUidPk());\n\n\t\t// check result\n\t\tassertEquals(newOrder, 2 + 1);\n\t}", "@Override\n public Forum getForum(String categoryId, String forumId) {\n\t\treturn null;\n\t}", "boolean isProductCategoryConfigurable(int productCategoryId);", "@Override\n\tpublic Category getCategory(String catId) {\n\t\tString cat=\"From Category where catId='\"+catId+\"'\";\n\t\tQuery q=sessionFactory.getCurrentSession().createQuery(cat);\n\t\tList<Category> catlist=(List<Category>) q.list();\n\t\tif(catlist==null||catlist.isEmpty())\n\t\t{\n\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn catlist.get(0);\n\t\t\n\t\t}\n\t}", "@Override\n\tpublic Category findById(String id) {\n\t\treturn null;\n\t}", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategoryId(long catId) {\n\t\tthis.categoryId = catId;\n\t}", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public PortletCategory getPortletCategory(String portletCategoryId);", "Category findCategoryById(Long id);", "public Optional<Produto> cadastroCat(Long idCategoria, @Valid Produto newProduto) {\n\t\treturn null;\n\t}", "public String getCategory()\n {\n return category;\n }", "public String getCategory()\n\t{\n\t\treturn category;\n\t}", "public ItemCategory getCategory();", "public String getCategory() {\n return mCategory;\n }", "@java.lang.Override public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }", "protected ManagedCategoryProfile getCatProfileById(final String categoryId) \r\n\t\tthrows ManagedCategoryProfileNotFoundException {\r\n\t\tif (LOG.isDebugEnabled()) {\r\n\t\t\tLOG.debug(\"id=\" + this.getId() + \" - getCatProfileById(\" + categoryId + \")\");\r\n\t\t}\r\n\t\t\t\r\n\t\tif (refIdManagedCategoryProfilesSet.contains(categoryId)) {\r\n\t\t\tfor (ManagedCategoryProfile m : managedCategoryProfilesSet) {\r\n\t\t\t\tif (m.getId().equals(categoryId)) {\r\n\t\t\t\t\treturn m;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t\tString errorMsg = \"ManagedCategoryProfile \" + categoryId + \" is not found in Context \" + this.id;\r\n\t\tLOG.error(errorMsg);\r\n\t\tthrow new ManagedCategoryProfileNotFoundException(errorMsg);\r\n\t}", "@java.lang.Override\n public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }", "public Category getCategory() {\r\n return category;\r\n }" ]
[ "0.5872045", "0.5639661", "0.5613185", "0.5409056", "0.54080844", "0.537687", "0.5355031", "0.5328784", "0.5325678", "0.532199", "0.53214264", "0.53174835", "0.5289604", "0.52770525", "0.52631956", "0.5257034", "0.524503", "0.52436686", "0.5236736", "0.51915973", "0.5168588", "0.51569283", "0.51569104", "0.51484996", "0.5141283", "0.5133346", "0.5124016", "0.51053745", "0.5098136", "0.50959915", "0.5093501", "0.5087316", "0.5087316", "0.50641114", "0.50621796", "0.5049789", "0.50033796", "0.4998764", "0.4991638", "0.4979108", "0.49562496", "0.49562368", "0.49416175", "0.4929979", "0.4925539", "0.49098417", "0.49021035", "0.49021035", "0.48929784", "0.48894426", "0.48878142", "0.4884584", "0.48845112", "0.48807296", "0.48806295", "0.4876589", "0.48718393", "0.48700485", "0.485083", "0.4835472", "0.48336688", "0.483072", "0.48211122", "0.4820132", "0.48057565", "0.4804582", "0.4802725", "0.47963393", "0.478756", "0.478756", "0.478756", "0.478756", "0.478756", "0.478756", "0.478756", "0.47843024", "0.47779286", "0.4775653", "0.4775366", "0.47688964", "0.47586602", "0.47586602", "0.47586602", "0.47586602", "0.47586602", "0.4750877", "0.47472644", "0.47472644", "0.4743881", "0.47430927", "0.4743011", "0.47382617", "0.47349006", "0.4729033", "0.47232106", "0.47143608", "0.4713713", "0.4706551", "0.47040737", "0.4702199" ]
0.7130992
0
CounterDemo demo = new CounterDemo();
public static void main(String[] args) { SlidingWindowDemo demo = new SlidingWindowDemo(); // LeakyBucketDemo demo = new LeakyBucketDemo(); // TokenBucketDemo demo = new TokenBucketDemo(); for (int i = 0; i < 10000; i++) { try { Thread.sleep(1L); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(demo.grant()); System.out.println(System.currentTimeMillis()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Counter() {\r\n this.count = 0;\r\n }", "public BasicCounter() {\n count = 0;\n }", "public myCounter() {\n\t\tcounter = 1;\n\t}", "public Counter() {\r\n value = 0;\r\n }", "public Counter() {\n //this.max = max;\n }", "public int getCounter() {\nreturn this.counter;\n}", "static void doCount(){\n\t\tStaticDemo st=new StaticDemo();\n\t\t st.count++;\n\t\t System.out.println(\"Count is:\"+st.count);\n\t }", "public static int getCounter() {return counter;}", "public Counter()\n {\n this(0);\n }", "public int getCounter(){\n return counter;\n }", "public BasicCalculator() {\n // Initialization here.\n // this.count = 0;\n\n }", "public void incCounter(){\n counter++;\n }", "public Counter(int init){\n \tvalue = init;\n }", "public Counter(int count)\n {\n this.setCount(count);\n }", "public Counter(int val) {\r\n value = val;\r\n }", "public int getCounter()\n {\n return counter;\n }", "ThreadCounterRunner() {}", "public void incCounter()\n {\n counter++;\n }", "WordCounter(){\r\n }", "private Count() {}", "private Count() {}", "public Counter(Counter count) {\r\n value = count.value;\r\n }", "public Countable(){\n counter++;\n objectName = \"Countable \" + counter;\n// System.out.println(objectName);\n }", "public interface Counter {\n \n \n public int getCount();\n}", "public static void main(String[] args)\r\n\t{\n\t\tCounter objThingies = new Counter();\r\n\r\n\t\t// see what happens when we try to decrease the counter when it is already\r\n\t\t// at zero\r\n\t\tSystem.out.println(\"\\n try to decrease the counter when already at zero: \");\r\n\t\tobjThingies.DecreaseCounter();\r\n\r\n\t\t// increase the counter 3 times\r\n\t\tobjThingies.IncreaseCounter();\r\n\t\tobjThingies.IncreaseCounter();\r\n\t\tobjThingies.IncreaseCounter();\r\n\r\n\t\t// check the value\r\n\t\tSystem.out.println(\"\\n After increasing the counter 3 times: \");\r\n\t\tSystem.out.println(objThingies.toString());\r\n\r\n\t\t// decrease one time\r\n\t\tobjThingies.DecreaseCounter();\r\n\r\n\t\t// check the value\r\n\t\tSystem.out.println(\"\\n After decreasing the counter once: \");\r\n\t\tSystem.out.println(objThingies.toString());\r\n\r\n\t}", "@Override\n public void initialize() {\n counter = 0;\n }", "@Override\n public void initialize() {\n counter = 0;\n }", "public MyCounter()\n {\n counter = 0;\n \n this.setSize(100, 200);\n this.setTitle(\"My Counter\");\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n Container contentPane = getContentPane(); \n contentPane.setLayout(new BorderLayout());\n\n label = new JLabel(\"0\", SwingConstants.CENTER);\n label.setFont(new Font(\"serif\", Font.PLAIN, 24));\n add(label, BorderLayout.CENTER);\n\n button = new JButton(\"Click\");\n contentPane.add(button, BorderLayout.SOUTH);\n button.addActionListener(this);\n }", "Counter getCounter(String counterName);", "private WordCounting() {\r\n }", "public ConnectionCount(int counter) {\nthis.counter = counter;\n}", "public int getCounter() {\r\n return counter;\r\n }", "public void incCount() { }", "public static void main(String[] args) {\n\n\n counter(10);\n }", "public Demo() {\n\t\t\n\t}", "public int getCounter() {\n return counter;\n }", "public Person(){\n instanceCounter++;\n localCounter++;\n }", "private static void setCounter() {++counter;}", "public void increaseCount(){\n myCount++;\n }", "public Counter(int initial, String name, String comment, String date){\n value = initial;\n this.name = name;\n this.comment = comment;\n this.date = date;\n this.inital_value=initial;\n\n }", "public static void main(String[] args) throws Exception {\n\t\tCounter c=new Counter();\n\t\tThread t1=new Thread(new Runnable() \n\t\t\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tfor(int i=1;i<=5;i++)\n\t\t\t\t{\n\t\t\t\t\tc.increment();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tThread t2=new Thread(new Runnable() \n\t\t{\n\tpublic void run()\n\t{\n\t\tfor(int i=1;i<=5;i++)\n\t\t{\n\t\t\tc.increment();\n\t\t}\n\t}\n});\n\t\tt1.start();\n\t\tt2.start();\n\t\tt1.join();\n\t\tt2.join();\n\t\tSystem.out.println(\"count\"+c.count);\n\n\n\t}", "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "public void createCounters() {\n // COUNTERS CREATION //\n //create a new counter for the blocks.\n this.blockCounter = new Counter();\n //create a new counter for the blocks.\n this.ballCounter = new Counter();\n }", "public ClickCounter() {\n System.out.println(\"Click constructor: \" + count);\n \n }", "public static void main(String[] args) \r\n {\n Student.versityName = \"UIU\"; \r\n Student s1 = new Student(\"Alice\", 1); \r\n Student s2 = new Student(\"Bob\", 2); \r\n s1.getStudentInfo(); \r\n s2.getStudentInfo(); \r\n Student s3 = new Student(\"Nice\", 5);\r\n // what is the value of the counter?\r\n \r\n }", "@Test\n\tpublic void testIncrement() {\n\t\tvar counter = new Counter();\n\t\tassertEquals(0, counter.get());\n\t\tcounter.increment();\n\t\tcounter.increment();\n\t\tassertEquals(2, counter.get());\n\t}", "@Override\npublic String toString() {\nreturn \"\" + counter;\n}", "public myCounter(int startValue) {\n\t\tcounter = startValue;\n\t}", "p3(){ \n cnt++; // Increment the static variable by 1 for each object creation. \n }", "public void setCounter(int number){\n this.counter = number;\n }", "public Integer getCounter() {\n return counter;\n }", "public Demo3() {}", "public Counter (int modulus) {\n count = 0;\n this.modulus = modulus;\n }", "@Override\n\tpublic int getCounter() {\n\t\treturn counter;\n\t}", "public HitCounter() {\n q = new ArrayDeque();\n PERIOD = 300;\n }", "int getInstanceCount();", "public CounterListModel() {\n\t\tsuper();\n\t\tlist = new ArrayList<CounterModel>();\n\t}", "public void instatnceMethod() {\n System.out.println(\"instatnMethod\");\n System.out.println(\"count = \" + count);\n displayMessage(\"hello from instance methods\");\n }", "public Tester()\n {\n // initialise instance variables\n x = 0;\n }", "public Short getCounter()\n {\n return counter;\n }", "public void someMethod() {\n\t\tint localInt = ExampleDriver.counter;\n\t\t//int localInt2 = ExampleDriver.nonStaticCounter;\n\t\tExampleDriver exampleDriver = new ExampleDriver();\n\t\tint localInt2 = exampleDriver.nonStaticCounter;\n\t}", "void incrementCount();", "public WordCount()\n {\n //initializes common variables.\n lineNums = new CircularList();\n count = 1;\n }", "public void setCounter(int counter) {\n this.counter = counter;\n }", "public CalculatedPerformanceIndicators()\n {\n super();\n // TODO Auto-generated constructor stub\n }", "private SchedulerThreadCounter()\n\t{\n\t\tii_counter = 100;\n\t}", "studentCounter(){ \n\t\tnumStudentInRoom = 0 ;\n\t}", "public Person(){\n count++;\n System.out.println(\"Creating an object\");\n }", "public WordCount() {\n }", "public TDCounter ()\r\n\t{\r\n\t\tsuper ();\r\n\t\tlastSampleTime = 0;\r\n\t\tfirstSampleTime = 0;\r\n\t\tlastSampleSize = 0;\r\n\t}", "public helptest()\n {\n // initialise instance variables\n x = 0;\n }", "@Test\n public void click() {\n Counter counter = new Counter();\n counter.click(); // should increment by 1\n int expected = 1;\n int actual = counter.getCount();\n assertEquals(expected, actual);\n }", "public void setCounter(int value) { \n\t\tthis.count = value;\n\t}", "public HitCounter() {\n q = new ArrayDeque();\n map = new HashMap();\n PERIOD = 300;\n hits = 0;\n }", "@Test\n // begin method verifyInitialCount\n public void verifyInitialCount() {\n\n // 0. create a new click counter\n // 1. verify that the new counter's initial count is zero\n\n // 0. create a new click counter\n\n ClickCounter clickCounter = new ClickCounter();\n\n // 1. verify that the new counter's initial count is zero\n\n assert clickCounter.getCount() == 0;\n\n }", "public Frequency() {\n\n }", "@Test\n public void construtorTest() {\n ThreadObserveSample person = new ThreadObserveSample(\"test\");\n }", "public void incrementCount(){\n count+=1;\n }", "public Counter create(Type type){\n Counter counter = Counter.builder(CounterPath+\".\"+type.getCounterName()).description(\"\").baseUnit(\"Counter\").register(meterRegistry);\r\n counters.put(type.getName(), counter);\r\n \r\n return counter;\r\n }", "private ScoreCalculator() {}", "public HitCounter() {\n q = new LinkedList<>();\n }", "public static void main(String[] args) {\n\t\tC c = new C(88);\n\t\tSystem.out.println(c.count);\n\t}", "public int getcounter() {\n\t\treturn counter;\r\n\t}", "public HitCounter() {\n map = new HashMap<Integer, Integer>();\n }", "public TestMe()\r\n/* 11: */ {\r\n/* 12:10 */ this.myNumber = (instanceCounter++);\r\n/* 13: */ }", "WordCounter(String inputText){\r\n \r\n wordSource = inputText;\r\n }", "public ScoreIndicator(Counter score) {\r\n this.score = score;\r\n }", "static IterV<String, Integer> counter() {\n return cont(count.f(0));\n }", "@Override\n\tpublic void run() {\n\t\tString key = CounterUtils.getKey(this.name);\n//\t\tif(DemoUtils.isExist(DemoUtils.keyName, key)) {\n//\t\t\tSystem.out.println(\"OK\");\n//\t\t}\n\t\t\n\t\twhile(true) {\n\t\t\tSystem.out.println(name + \" : \" + CounterUtils.get(CounterUtils.getKey(name)));\n\t\t\tCounterUtils.setEntity(key);\n\t\t\tCounterUtils.inc(key);\n\t\t\tcounter ++;\n\t\t\tif(cal.getTimeInMillis() < new Date().getTime()) {\n\t\t\t\tSystem.out.println(name + \" : \" + counter);\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t//CounterUtils.del(CounterUtils.getKey(name));\n\t\t}\n\t\t\n\t\t\n\t}", "public static void thisDemo() {\n\t}", "public Demo()\n {\n machine = new Machine();\n }", "public AllWordsCounter() {\n counters = new SingleWordCounter[MAX_WORDS];\n // TODO: initialize instance variable to hold MAX_WORDS objects\n\n }", "public void addCount()\n {\n \tcount++;\n }", "@Test public void getCountTest() {\n DirectMC f = new DirectMC(\"AdMailing\", 10000.00, 3.00, 2000);\n Assert.assertEquals(f.getCount(), 5.0, 1);\n }", "@Override\n\tpublic Counter counter(String name) {\n\t\tCounter counter = counters.get(name);\n\t\tif (counter == null) {\n\t\t\tcounter = new Counter();\n\t\t\tcounters.put(name, counter);\n\t\t\tregisterGuage(name, counter);\n\t\t}\n\t\treturn counter;\n\t}", "public void publicCountIncrement(){\n synchronized(Sample.monitor){\n publicIncrement++;\n }\n }", "long countByExample(BaseCountractExample example);", "public int counter (){\n return currentID;\n }", "manExp15(){ \r\n\r\n\tcount++; \r\n\r\n\tSystem.out.println(count); \r\n\r\n\t}", "@Override\n\tpublic void count() {\n\t\t\n\t}", "void upCount(){\n count++;\n }" ]
[ "0.7507154", "0.7312432", "0.7274258", "0.7211198", "0.71135736", "0.6974763", "0.6974218", "0.6948884", "0.6928491", "0.6785207", "0.67260873", "0.6664612", "0.66337526", "0.6614072", "0.6600296", "0.6565101", "0.6562679", "0.6548219", "0.6524321", "0.6491644", "0.6491644", "0.64797103", "0.6463886", "0.645225", "0.6444568", "0.6377061", "0.6377061", "0.63641423", "0.63584125", "0.6352866", "0.6350545", "0.62794316", "0.62784725", "0.6265117", "0.62650096", "0.624777", "0.6245814", "0.6245702", "0.62221104", "0.6218771", "0.6218221", "0.62053263", "0.6189031", "0.6188626", "0.61728734", "0.6162385", "0.61441666", "0.61235785", "0.61175823", "0.61086047", "0.6105994", "0.60930246", "0.6071754", "0.6051426", "0.6039048", "0.60339063", "0.6030624", "0.60243267", "0.60166323", "0.60158867", "0.60128564", "0.6002518", "0.5987597", "0.5984017", "0.59519124", "0.5940155", "0.59358466", "0.5919784", "0.59185195", "0.59143037", "0.58944285", "0.5886933", "0.5857332", "0.5852813", "0.5851669", "0.5850795", "0.58462685", "0.58372545", "0.58369297", "0.58340544", "0.5827047", "0.5821602", "0.58211243", "0.58179873", "0.5815564", "0.5804759", "0.5802472", "0.579588", "0.5783029", "0.5777074", "0.57640344", "0.57639074", "0.5743125", "0.5738198", "0.5733712", "0.5730074", "0.57264864", "0.5718032", "0.5715691", "0.5713384", "0.570971" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { from_calendar.set(Calendar.YEAR, year); from_calendar.set(Calendar.MONTH, monthOfYear); from_calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth); updateFromLabel(); }
{ "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 onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { to_calendar.set(Calendar.YEAR, year); to_calendar.set(Calendar.MONTH, monthOfYear); to_calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth); updateToLabel(); }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
Scanner sc = new Scanner(System.in);
public static void main(String[] args) { String[][] example = { //Boston ... Manila {"-" ,"225","575","200","70" ,"85" ,"340","675","975"}, {"225","-" ,"225","50" ,"125","220","120","435","550"}, {"575","225","-" ,"510","650","675","735","225","200"}, {"200","50" ,"510","-" ,"-" ,"-" ,"-" ,"-" ,"-" }, {"70" ,"125","650","-" ,"-" ,"-" ,"-" ,"-" ,"-" }, {"85" ,"220","675","-" ,"-" ,"-" ,"-" ,"-" ,"-" }, {"340","120","735","-" ,"-" ,"-" ,"-" ,"-" ,"-" }, {"675","435","225","-" ,"-" ,"-" ,"-" ,"-" ,"-" }, {"975","550","200","-" ,"-" ,"-" ,"-" ,"-" ,"-" }}; int n = example.length; //n x n grid Node[] nodes = new Node[n]; for (int i = 0; i < n; i++) nodes[i] = new Node(cities[i]); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (!example[i][j].equals("-")) { int cost = Integer.parseInt(example[i][j]); nodes[i].addEdge(new Edge(nodes[i], nodes[j], cost)); } } } int start = cityIndex("Boston"); //start of our trip int end = cityIndex("Beijing"); //end of our trip System.out.println("total cost:"); System.out.println(dijkstra(nodes[start], nodes[end])); System.out.println("optimal path taken:"); tracePath(nodes[end]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t}", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n System.out.println(str);\n }", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t}", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public static void main(String[] args) \n {\n Scanner sc = new Scanner(System.in); \n \n // String input\n System.out.print(\"What's your name? \"); \n String name = sc.nextLine(); \n \n // Print the values to check if input was correctly obtained. \n System.out.println(\"Name: \" + name); \n\n // Close the Scanner\n sc.close();\n }", "public Game() {\n\t\tsc = new Scanner(System.in);\n\t}", "public Menu() {\n scanner = new Scanner(System.in);\n }", "public void inputScanner(){\n\t\t Scanner sc=new Scanner(System.in); \n\t \n\t\t System.out.println(\"Enter your rollno\"); \n\t\t int rollno=sc.nextInt(); \n\t\t System.out.println(\"Enter your name\"); \n\t\t String name=sc.next(); \n\t\t System.out.println(\"Enter your fee\"); \n\t\t double fee=sc.nextDouble(); \n\t\t System.out.println(\"Rollno:\"+rollno+\" name:\"+name+\" fee:\"+fee); \n\t\t sc.close(); \n\t}", "public static void main(String[] args) {\nScanner sc= new Scanner(System.in);\nString name=sc.nextLine();\n\t\tSystem.out.println(\"hello\\n\"+name);\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // String input\n String first = sc.nextLine();\n System.out.println(first);\n\n }", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "String consoleInput();", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public InputReader() {\n reader = new Scanner(System.in);\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "@Test\n\tpublic void one()\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"enter the value of a\");\n\t\tint a = sc.nextInt();\n\t\tSystem.out.println(\"value of a is: \" +a);\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tInputStream input = System.in;\n\t\tScanner scanner = new Scanner(input);\n\t\t// nextLine()을 실행하기 전에 \n\t\t// 무엇을 해야할지 알려주는 메시지를 먼저 출력 하라.\n\t\t// 이를 'prompt(프롬프트)' 라고 한다\n\t\tSystem.out.println(\"문자열을 입력후 Enter....\");\n\t\tString strInput = scanner.nextLine();\n\t\tSystem.out.println(strInput);\n\n\t}", "private ConsoleScanner() {}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextLine()){\n\t\t\tString str=sc.nextLine();\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n String str=sc.next();\n String str1=sc.next();\n String str2=sc.next();\n String str3=sc.next();\n System.out.println(str);\n System.out.println(str1);\n System.out.println(str2);\n System.out.println(str3);\n\n\n }", "public static void main(String[] args) {\n\t\tString s = \"We're learning about Scanner\";\n\t\tSystem.out.println(s);\n\t\tScanner sc = new Scanner(System.in);\n//\t\tint m = sc.nextInt();\n//\t\tint n = sc.nextInt();\n//\t\tSystem.out.println(\"The Value of m is: \"+m);\n//\t\tSystem.out.println(\"The Value of n is: \"+n);\n//\t\tdouble d = sc.nextDouble();\n//\t\tString name = sc.next();//Gives us one Word\n//\t\tSystem.out.println(\"Name is: \" + name);\n\t\t\n//\t\tString fullName = sc.nextLine();\n//\t\tSystem.out.println(\"Full Name is: \" + fullName);\n\t\t\n\t\tString intInput = sc.nextLine();\n\t\tint n = Integer.parseInt(intInput);\n\t\tSystem.out.println(n);\n\t}", "public String weiterSpielen(){\n Scanner keyboard = new Scanner(System.in);\n return keyboard.nextLine();\n }", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "private String getUserInput(Scanner sc) {\n\t\t\n\t\tif (sc == null) {\n\t\t\treturn null;\n\t\t}\n\n\t System.out.print(\"\\nctransfer > \");\n\t return sc.nextLine();\n\t}", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tkeyboard.close();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString hello = sc.nextLine();\n\t\tSystem.out.println(hello);\n\n\n\t}", "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}", "private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}", "public static void main (String[] args) throws java.lang.Exception\r\n\t{\n\t\tScanner sc=new Scanner(System.in);int f=0;\r\n\t\twhile(sc.hasNext()){\r\n\t\tint t=sc.nextInt();\r\n\t\t\r\n\t\tif(t==42) f=1;\r\n\t\tif(f==0) System.out.println(t);\r\n\t\t}\r\n\t}", "public static void main(String...args){\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tString s = scan.nextLine();\r\n//\t\tString str = s.replaceAll(\"\\\\s\", \"\"); // removing white space from string\r\n//\t\tSystem.out.println(str);\r\n\t\tchar[] ch = s.toCharArray();\r\n\t\tSet<Character> charSet = new HashSet<>();\r\n\t\tfor(char c: ch){\r\n\t\t\t\r\n\t\t\tcharSet.add(c);\t\r\n\t\t}\r\n\t\t\r\n//\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor(Character character : charSet){\r\n//\t\t\tsb.append(character);\r\n\t\t\tSystem.out.print(character);\r\n\t\t}\r\n//\t\tSystem.out.println(sb.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString input = sc.nextLine();\n\t\t\tSystem.out.println(input);\n\t\t\tif(input == null || input==\"\") {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public WelcomeGame() {\r\n\t\tthis.input = new Scanner(System.in);\r\n\t}", "public void takeUserInput() {\n\t\t\r\n\t}", "public alphabetize()\n {\n word = new Scanner(System.in);\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tprocess(s);\n\t}", "public static int getInput() {\n Scanner in = new Scanner(System.in);\n\n return in.nextInt();\n }", "public static void main(String args[])throws IOException\n\t{\n\tScanner obj=new Scanner(System.in);\n\n\t//Entering a string\n\tSystem.out.println(\"\\nEnter a string !\");\n\tString s=obj.nextLine();\n\tSystem.out.println(\"you have entered \"+ s);\n\n\t//entering a word\n\tSystem.out.println(\"\\nEnter a word !\");\n\tString w=obj.next();\n\n\t//entering an integer\n\tSystem.out.println(\"\\nEnter an integer !\");\n\tint n=obj.nextInt();\n\n\t//entering a float\n\tSystem.out.println(\"\\nEnter a floating point number !\");\n\tfloat f=obj.nextFloat();\n\n\t//Printing the inputs\n\tSystem.out.println(\"\\nThe inputs are .....\");\n\tSystem.out.println(\"\\nWord : \"+w+\"\\nInteger : \"+n+\"\\nFloat : \"+f);\n\n\n}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSolution s = new Solution();\r\n\t}", "public static void getString()\n\t{\n\t\t\n\t\tScanner s=new Scanner(System.in);\n\t\t\n\t\t//Here Scanner is the class name, a is the name of object, \n\t\t//new keyword is used to allocate the memory and System.in is the input stream. \n\t\t\n\t\tSystem.out.println(\"Entered a string \");\n\t\tString inputString = s.nextLine();\n\t\tSystem.out.println(\"You entered a string \" + inputString );\n\t\tSystem.out.println();\n\t}", "private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }", "public TerminalGame()\n \t{\n \t\tsuper();\n \t\tbuilder = new StringBuilder();\n \t\tscanner = new Scanner(System.in);\n \t}", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\n\t\tprocess(s);\n\n\t}", "public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\r\n System.out.println(\"Introduzca un entero: \");\r\n int a = scn.nextInt();\r\n System.out.println(\"El numero introducido es el: \" + a);\r\n String b = scn.nextLine();\r\n System.out.println(b);\r\n String c = scn.next();\r\n System.out.println(c);\r\n }", "public void intro(){Scanner teclado = new Scanner(System.in);\nSystem.out.println(\"Introduzca la unidad de medida a la que transformar \"\n + \"pies, cm o yardas\");\nSystem.out.println(\"o escriba salir si quiere volver al primer menu\");\nopcion=teclado.nextLine();}", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "public static void main(String[] args) {\n\t\tScanner inpt = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Hello Word!!!\");\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the value of n : \");\r\n\t\tint n = sc.nextInt();\r\n\t\tSystem.out.println(\"Entered input is : \"+ n);\r\n\t}", "String getInput();", "static InputScanner getInputScanner() {\n return inputScanner;\n }", "public static void main(String[] args) {\n\t\t \n\t\tScanner scanner=new Scanner(System.in);\n\t\tUtility utility=new Utility();\n\t\n\t\tdouble c;\n\tSystem.out.println(\"enter the number\");\n\t\tc=scanner.nextInt();\n\n\t\tutility.newt(c);\n\t\tscanner.close();\n\t}", "public static void main(String[] args) {\n\r\n\t\tchar n;\r\n\t\tScanner teclado=new Scanner (System.in);\r\n\t\tSystem.out.println(\"Introduce un valor al caracter\");\r\n\t\t\r\n\t\tn = teclado.nextLine().charAt(0); // Asigno el valor leido por teclado a la variable n\r\n\t\tSystem.out.println(\"El valor de la variable es \" + n);\r\n\t\tteclado.close();\r\n\t}", "@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t//String str = \"Hello World\";\n\t\tScanner scanner = new Scanner(System.in); //create object;\n\t\tSystem.out.println(\"Enter an String input\");\n\t\tString userInput = scanner.nextLine();//iput\n\t\tSystem.out.println(userInput.toString());\n\t\n\t\t\n\t\t//System.out.println(\"First string upper case is \" + userInput.toUpperCase().charAt(0) + \" from \" + userInput);\n\t\t\n\t}", "public static String getString(){\n Scanner in = new Scanner(System.in); //scanner variable to take input\n return in.nextLine().trim();\n }", "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}", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "void Input() {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter name of the book::\");\n Bname = scanner.nextLine();\n System.out.println(\"Enter price of the book::\");\n price = scanner.nextDouble();\n }", "public static void main(String[] args) {\n\n\t\tInputStreamReader rd= new InputStreamReader(System.in);\n\t\ttry {\n\t\t\tSystem.out.println(\"enter a number\");\n\t\t\tint value=rd.read();\n\t\t\tSystem.out.println(\"you entered:-\"+(char)value);\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) {\r\n Scanner sc = new Scanner(System.in);\r\n int count=1;\r\n String op;\r\n while(sc.hasNext()){\r\n\r\n for(int i=1;i<=count;i++){\r\n count++;\r\n op= sc.nextLine();\r\n StdOut.println(i+\" \"+op);\r\n }\r\n }\r\n }", "public static String inputStringFromKeyboard(String input){\n System.out.println(\"Input the String: \");\n //Scanner, save the inputted from keyboard\n Scanner scanner = new Scanner(System.in);\n //The value 'scanner' is assigned to 'input'\n input = scanner.next();\n return input;\n }", "OutputStream getStdin();", "String getUserInput();", "private static String scan(String text)\r\n\t{\r\n\t\tSystem.out.print(text);\r\n\t\treturn input.nextLine();\r\n\t}", "private static Scanner determineInputSource(String[] args) throws FileNotFoundException{\n if (args.length > 0) {\n //Reading from file\n return new Scanner(new File(args[0]));\n }\n else {\n //Reading from standard Input\n return new Scanner(System.in);\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t\n\t\tSystem.out.println(Character.getNumericValue('s'));\n\t\t//10 a\n\t\t//35 z\n\t\t//28 s\n\t\twhile(true) {\n\t\t\tString s = sc.nextLine();\n\t\t\tif(s.equals(\"halt\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchar prev = ' ';\n\t\t\t\tfor(int i = 0; i<s.length(); i++) {\n\t\t\t\t\tchar c = s.charAt(i);\n\t\t\t\t\tint numericValue = Character.getNumericValue(c);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\n\t}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public String userCommand(){\n return scanner.nextLine();\n }", "private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}", "public static String readUserInput() {\n return in.nextLine();\n }", "public static void main(String[] args) {\n\t\t Scanner scan = new Scanner (System.in);\n\t\t \n\t\t System.out.println(\"tam isminizi giriniz\");\n\t String tamisim = scan.nextLine();\n\t \n \n System.out.println(\"Yasinizi giriniz\");\n int yas = scan.nextInt();\n System.out.println(yas);\n \n System.out.println(\"Isminizın ilk harfini girin\");\n char ilkHarf = scan.next().charAt(0);\n System.out.println(ilkHarf);\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tchar a=sc.next().charAt(0);\r\n\t\t\r\n\t\tif(Character.isLowerCase(a))\r\n\t\t{\r\n\t\t\tSystem.out.println(Character.toUpperCase(a));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(Character.toLowerCase(a));\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n Processor proc1 = new Processor();\n proc1.start();\n System.out.println(\"Hit any key to stop.\");\n Scanner scanner = new Scanner(System.in);\n scanner.nextLine();\n proc1.shutdown();\n }", "public static void userName() {\n System.out.println(\"Please enter your name: \");\n String name = sc.nextLine(); \n System.out.println(\"Hello, \" + name);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner s = new Scanner(System.in);\r\n\t String txt = s.next();\r\n\t //your code here\r\n\t System.out.println(txt.substring(0,2));\r\n\r\n\t}", "public static void main(String[]args){//inicio del main\r\n\r\n\tScanner in = new Scanner(System.in);// creacion del scanner\r\n\tSystem.out.println(\"Input Character\");//impresion del mensaje en consola\r\n\tchar C= in.next().charAt(0);//lectura del char\r\n\t\r\n\tSystem.out.println(\"The ASCII value of \" +C+ \" is : \"+(int) C);//casteo del caracter e impresion del resultado\r\n\t}", "public static void main(String[] args) {\n String s1=\"asd\";\r\n String s2=\"bilo\";\r\n //Scanner sc= new Scanner(System.in);\r\n\t\t if (s1==s2)\r\n\t\t\t System.out.println(\"text compared0\");\r\n\t\t else\r\n\t\t\t System.out.println(\"text not compared0\");\r\n\t\t\t \r\n\t}", "@Test\n public void testMain() {\n String simulatedUserInput = \"100AUD\" + System.getProperty(\"line.separator\")\n + \"1\" + System.getProperty(\"line.separator\");\n\n InputStream savedStandardInputStream = System.in;\n System.setIn(new ByteArrayInputStream(simulatedUserInput.getBytes()));\n\n mainFunction mainfunc = new mainFunction();\n\n try {\n mainfunc.start();\n } catch(Exception e) {\n System.out.println(\"Exception!\");\n }\n\n assertEquals(1,1);\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(AlphabetSoup(s.nextLine())); \n }", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tdo{\n\t\t\tSystem.out.println(\"out:\" + scan.nextLine());\n\t\t}while(true);\n\t}", "public Sintactico(java_cup.runtime.Scanner s) {super(s);}", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(TimeConvert(s.nextLine())); \n }", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in); \r\n\t\twhile(sc.hasNext()){\r\n\t\t\tint x=sc.nextInt();\r\n\t\t\tint y=sc.nextInt();\r\n\t\t\tint result=getResult(x,y);\r\n\t\t\tSystem.out.println(result);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private static String getInput(String message, Scanner sc) {\n String result = \"\";\n while (result.equals(\"\")) {\n System.out.println(message);\n result = sc.nextLine();\n }\n return result;\n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\r\n System.out.print(BinaryReversalMethod(s.nextLine()));\r\n s.close();\r\n }", "public static String inputString(String s)\n {\n if (s != null && s.length() > 0)\n {\n System.out.print(s);\n System.out.flush();\n }\n\n StringBuffer sb = new StringBuffer();\n try\n {\n InputStreamReader reader = new InputStreamReader(System.in);\n do\n {\n sb.append(new BufferedReader(reader).readLine());\n }\n while (System.in.available() > 0);\n\n return sb.toString();\n }\n catch (IOException e)\n {\n return null;\n }\n }", "public static void main(String[] args) \n\t{\n\t\tScanner src = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter the number: \");\n\t\tint n = src.nextInt();\n\t\tint temp;\n\t\tsrc.close();\n\t}", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tString str=sc.nextLine();\n\t\tfindDuplicateChars(str);\n\t}", "public static void echoContents(Scanner in) {\n }", "public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}", "public static void main(String[] args) {\n Scanner reader = new Scanner(System.in);\r\n System.out.print(\"Enter a number: \");\r\n\r\n // nextInt() reads the next integer from the keyboard\r\n int number = reader.nextInt();\r\n\r\n // println() prints the following line to the output screen\r\n System.out.println(\"You entered: \" + number);\r\n }" ]
[ "0.8116788", "0.7859288", "0.7456636", "0.7390904", "0.7370572", "0.726009", "0.7220934", "0.7188939", "0.71190596", "0.7016008", "0.6999161", "0.69791657", "0.6916052", "0.6864569", "0.6834009", "0.6791698", "0.6791698", "0.6768515", "0.6752971", "0.67184204", "0.6700116", "0.65829825", "0.6555058", "0.6553874", "0.6551043", "0.65498847", "0.6548082", "0.65361446", "0.6535826", "0.6535826", "0.65253425", "0.650796", "0.64449716", "0.6437405", "0.6432809", "0.642896", "0.6408177", "0.64072996", "0.64058506", "0.6399164", "0.63945127", "0.63922393", "0.6370302", "0.63515437", "0.6347729", "0.63446486", "0.63238317", "0.6319479", "0.62970144", "0.6270386", "0.62682694", "0.6267702", "0.62541574", "0.6195879", "0.61863095", "0.6162363", "0.615476", "0.6152649", "0.6150961", "0.61463344", "0.61223024", "0.6121463", "0.6096281", "0.60921764", "0.608096", "0.6044462", "0.60317606", "0.60316205", "0.60253906", "0.6021175", "0.601883", "0.60092723", "0.59872925", "0.598554", "0.598554", "0.5984968", "0.59776694", "0.59752107", "0.59682125", "0.59632605", "0.5954111", "0.5950918", "0.5946668", "0.5946313", "0.59412134", "0.5939339", "0.593904", "0.59350663", "0.59273505", "0.5926322", "0.5917193", "0.5912088", "0.59112525", "0.59073883", "0.5907037", "0.5906843", "0.5898045", "0.58952606", "0.5889736", "0.5887788", "0.5880382" ]
0.0
-1
METHODS Constructor method for class DateIn which is a gregorian date.
public DateIn(int day, int month, int year){ this.day = day; this.month = month; this.year = year; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyDate(int inYear, int inDay, int inMonth)\n {\n year = inYear;\n day = inDay;\n month = inMonth;\n }", "public Date() {\r\n\t\tGregorianCalendar c = new GregorianCalendar();\r\n\t\tmonth = c.get(Calendar.MONTH) + 1; // our month starts from 1\r\n\t\tday = c.get(Calendar.DAY_OF_MONTH);\r\n\t\tyear = c.get(Calendar.YEAR);\r\n\t}", "public void setInDate(Date inDate) {\r\n this.inDate = inDate;\r\n }", "public Date() {\r\n }", "public DateUtil ()\n {\n\n }", "public Date (final Integer d, final Integer m, final Integer y) throws CGException {\n\n try {\n setSentinel();\n }\n catch (Exception e){\n\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n if (!this.pre_Date(d, m, y).booleanValue()) \n UTIL.RunTime(\"Run-Time Error:Precondition failure in Date\");\n {\n\n day = UTIL.NumberToInt(UTIL.clone(d));\n month = UTIL.NumberToInt(UTIL.clone(m));\n year = UTIL.NumberToInt(UTIL.clone(y));\n }\n }", "public CinemaDate() {\n }", "public MyDate(){\n this.day = 0;\n this.month = 0;\n this.year = 0;\n }", "public Date getInDate() {\r\n return inDate;\r\n }", "private DateUtil() {\n\t}", "private DateUtil() {\n\t}", "public Date(){\n\t\tyear=0;\n\t\tmonth=0;\n\t\tday=0;\n\t}", "public void makeValidDate() {\n\t\tdouble jd = swe_julday(this.year, this.month, this.day, this.hour, SE_GREG_CAL);\n\t\tIDate dt = swe_revjul(jd, SE_GREG_CAL);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}", "private ARXDate() {\r\n this(\"Default\");\r\n }", "private DateUtil(){\n\n }", "public MyDate(){\t\n\t\tthis(\"00/00/0000\");\n\t}", "public Date(int d, int m, int a) {\n\t\tthis.dia = d;\n\t\tthis.mes = m;\n\t\tthis.ano = a;\n\t}", "public DateUtil (int ordinal)\n {\n // save ordinal field and compute Gregorian equivalent\n set(ordinal);\n }", "public FillDate() {\n }", "public MyDate(long inElapsedTime)\n {\n //put in logic here\n elapsedTime = inElapsedTime;\n this.setDate(elapsedTime);\n }", "public SweDate() {\n\t\tCalendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\t\tsetFields(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH),\n\t\t\t\tcal.get(Calendar.HOUR_OF_DAY) + cal.get(Calendar.MINUTE) / 60. + cal.get(Calendar.SECOND) / 3600.\n\t\t\t\t\t\t+ cal.get(Calendar.MILLISECOND) / 3600000.,\n\t\t\t\tSE_GREG_CAL);\n\t}", "public Interval(Interval in){\r\n firstExtreme = in.getFirstExtreme();\r\n secondExtreme = in.getSecondExtreme();\r\n feIncluded = in.getFEincluded();\r\n seIncluded = in.getSEincluded();\r\n }", "public SweDate(double jd) {\n\t\tinitDateFromJD(jd, jdCO <= jd ? SE_GREG_CAL : SE_JUL_CAL);\n\t}", "public Date(int y, int m, int d){\n\t\tif((y<2015 || m<=0 || m>12 || d<=0 || d>31)){\n\t\t\tyear=0;\n\t\t\tmonth=0;\n\t\t\tday=0;\n\t\t}else{\n\t\t\tyear=y;\n\t\t\tmonth=m;\n\t\t\tday=d;\n\t\t}\n\t\t\n\t}", "public Calendar() {\n }", "public CpFldValidDate() { super(10018, 1); }", "public Person(String inName, int inAge, Gender inGender)\n {\n name = inName;\n age = inAge;\n gender = inGender;\n\n Calendar c = Calendar.getInstance();\n c.set(Calendar.YEAR, c.get(Calendar.YEAR) - age);\n birthdate = c.getTime();\n }", "@Override\n\tpublic void initDate() {\n\n\t}", "public Entry(Calendar date){\n this.date = date; \n }", "public DateGraphFormat(){\n }", "public HISDate(Date date) {\r\n DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN);\r\n Calendar cal = df.getCalendar();\r\n cal.setTime(date);\r\n this.year = cal.get(Calendar.YEAR);\r\n //logger.debug(\"year = \" + year);\r\n this.month = cal.get(Calendar.MONTH) + 1;\r\n //logger.debug(\"month = \" + month);\r\n this.day = cal.get(Calendar.DAY_OF_MONTH);\r\n //logger.debug(\"day = \" + day);\r\n this.weekday = cal.get(Calendar.DAY_OF_WEEK);\r\n this.weekOfYear = cal.get(Calendar.WEEK_OF_YEAR);\r\n this.weekOfMonth = cal.get(Calendar.WEEK_OF_MONTH);\r\n }", "public Date(int day, Month month, int year){\n\tif (day > 0 && day <= month.nbJours(year)){\n\t this.day = day;\n\t}\t\n\tthis.month = month;\n\tif (year > 0){\n\t this.year = year;\n\t}\n }", "public DateUtility () {\n dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n }", "public Date(int day, int month, int year) {\r\n this.day = day;\r\n this.month = month;\r\n this.year = year;\r\n\r\n }", "public Date(int month, int day) {\r\n this.month = month;\r\n this.day = day;\r\n }", "public Date(int m, int d, int y) {\n\t\t\n\t\tmonth = m;\n\t\tday = d;\n\t\tyear = y;\n\t\t\n\t}", "public Rates() {\n }", "public DateTime() {\n this((BusinessObject) null);\n }", "public DateUtil (double proplepticJulianDay)\n {\n setOrdinal((int)((long)(proplepticJulianDay\n + 0.5 /* noon adjust, .5 or bigger really part of next day */)\n -2440588L /* i.e. diff in base epochs of calendars */));\n\n }", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "public Date(int month, int day, int year) {\r\n\t\t// check if month in range\r\n\t\tif (month <= 0 || month > 12)\r\n\t\t\tthrow new IllegalArgumentException(\"month (\" + month + \") must be 1-12\");\r\n\r\n\t\t// check if day in range for month\r\n\t\tif (day <= 0 || (day > daysPerMonth[month] && !(month == 2 && day == 29)))\r\n\t\t\tthrow new IllegalArgumentException(\"day (\" + day + \") out-of-range for the specified month and year\");\r\n\r\n\t\t// check for leap year if month is 2 and day is 29\r\n\t\tif (month == 2 && day == 29 && !(year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)))\r\n\t\t\tthrow new IllegalArgumentException(\"day (\" + day + \") out-of-range for the specified month and year\");\r\n\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.year = year;\r\n\r\n\t\tSystem.out.printf(\"Date object constructor for date %s%n\", this);\r\n\t}", "public Date(int year, int month, int day) {\n this.year = year;\n this.day = day;\n this.month = month;\n }", "public Date getFechaInclusion()\r\n/* 150: */ {\r\n/* 151:170 */ return this.fechaInclusion;\r\n/* 152: */ }", "public CheckIn( int CheckInID, int PatientID,\n\t\t\tint WardID, String StartDate, String EndDate, int RegFee ) {\n\t\tthis.CheckInID = CheckInID;\n\t\tthis.PatientID = PatientID;\n\t\tthis.BedNumber = BedNumber;\n\t\tthis.WardID = WardID;\n\t\tthis.StartDate = StartDate;\n\t\tthis.EndDate = EndDate;\n\t\tthis.RegFee = RegFee;\n\t}", "public Person (String inName, String inFirstName, LocalDate inDateOfBirth) {\n super(inName);\n this.dateOfBirth = inDateOfBirth;\n this.firstName = inFirstName;\n }", "private BusinessDateUtility() {\n\t}", "protected final void toGregorian()\n {\n // ordinal must be set at this point.\n\n // handle the null date as a special case\n if ( ordinal == NULL_ORDINAL )\n {\n yyyy = 0;\n mm = 0;\n dd = 0;\n return;\n }\n if ( ordinal > MAX_ORDINAL )\n throw new IllegalArgumentException(\"invalid ordinal date: \"+ ordinal);\n else if ( ordinal >= GC_firstOrdinal )\n {\n yyyy = Leap400RuleYYYY\n + flooredMulDiv(ordinal - Jan_01_Leap400RuleYear,\n 10000,\n 3652425); /* 365 + 0.25 - 0.01 - 0.0025 */\n /* division may be done on a negative number.\n That's ok. We don't need to mess with the\n 100RuleYear. The 400RuleYear handles it all. */\n }\n\n else if ( ordinal >= Jan_01_0001 )\n {\n // Jan_01_0001 to Oct_04_1582\n // year 4 was first AD leap year.\n yyyy = 4 + flooredMulDiv(ordinal - Jan_01_0004, 100, 36525);\n /* 365 + 0.25 */\n }\n\n else if ( ordinal >= MIN_ORDINAL )\n {\n // LowestDate to Dec_31_0001BC\n // -1 was first BC leap year.\n // dividend will be negative\n yyyy = -1 + flooredMulDiv(ordinal - Jan_01_0001BC, 100, 36525);\n /* 365 + 0.25 */\n }\n else throw new IllegalArgumentException(\"invalid ordinal date: \"+ordinal);\n\n int aim = ordinal + 1;\n\n // Oct_15_1582 <= ordinal && ordinal <= Dec_31_1582\n if ( GC_firstOrdinal <= ordinal && ordinal <= GC_firstDec_31 ) aim += missingDays;\n\n // ddd should be 1..366\n int ddd = aim - jan01OfYear(yyyy);\n while ( ddd <= 0 )\n {\n // our approximation was too high\n yyyy--;\n ddd = aim - jan01OfYear(yyyy);\n }\n boolean leap = isLeap(yyyy);\n while ( ddd > (leap ? 366 : 365) )\n {\n // our approximation was too low\n yyyy++;\n ddd = aim - jan01OfYear(yyyy);\n leap = isLeap(yyyy);\n }\n\n mm = dddToMM(ddd, leap);\n dd = ddd - daysInYearPriorToMonth(mm, leap);\n\n // at this point yyyy, mm and dd have been computed.\n }", "public GeometricObject() {\n dateCreated = new java.util.Date();\n }", "public Date(int m, int d, int y) {\r\n\t\tif (!isValid(m, d, y))\r\n\t\t\tthrow new RuntimeException(\"Invalid date\");\r\n\t\tmonth = m;\r\n\t\tday = d;\r\n\t\tyear = y;\r\n\t}", "public DateUtil (int yyyy, int mm, int dd)\n {\n set(yyyy, mm, dd, CHECK);\n }", "public Date(int y) {\r\n\r\n\t\tmonth = LAST_MONTH;\r\n\t\tday = DAYS[LAST_MONTH];\r\n\t\tyear = y;\r\n\t}", "public GregorianCalendar getDate() { return date; }", "public SimpleDateFormat() {\n\t\tthis(getDefaultPattern(), null, null, null, null, true, null);\n\t}", "public Date(int month, int day, int year) {\n if (!isValid(month, day, year)) throw new IllegalArgumentException(\"Invalid date\");\n this.month = month;\n this.day = day;\n this.year = year;\n }", "public DateCheckTag() { }", "public MyDate(String date){\n \t\tStringTokenizer st;\n\n \t\tst = new StringTokenizer(date,\"/\");\t//tokenizer will always result in 3 tokens \n\n\t\tthis.day = Integer.parseInt(st.nextToken());\n\t\tthis.month = Integer.parseInt(st.nextToken());\n\t\tthis.year = Integer.parseInt(st.nextToken());\t\n\t}", "public MyDate(int month, int day, int year) {\n\t\tsetDate(month, day, year);\n\t}", "public DateUtil ( DateUtil b)\n {\n this.ordinal = b.ordinal;\n this.yyyy = b.yyyy;\n this.mm = b.mm;\n this.dd = b.dd;\n }", "public Date getGioBatDau();", "public Date212 (String s){ //initial constructor\n full_Date = s;\n // System.out.println(full_Date + \"jdjdj\");\n if (!isValidDate(full_Date)) throw new IllegalArgumentException(\"Invalid Date Format!\"); \n //If it is not true that the date is valid then throw a error.\n /* \n The substring methods to pull out the Year, Month, and Day.\n */\n Year = Integer.parseInt(full_Date.substring(0,3)); \n Month = Integer.parseInt(full_Date.substring(4,5));\n Day = Integer.parseInt(full_Date.substring(6,7));\n count++; \n addArray(this); //Calling the function \"addArray\" with 'this isntance of date212'\n // System.out.println(myDates[i]);\n\n }", "DateConstant createDateConstant();", "public Date(String icalStr) throws ParseException, BogusDataException\r\n\t{\r\n\t\tsuper(icalStr);\r\n\r\n\t\tyear = month = day = 0;\r\n\t\thour = minute = second = 0;\r\n\r\n\t\tfor (int i = 0; i < attributeList.size(); i++)\r\n\t\t{\r\n\t\t\tAttribute a = attributeAt(i);\r\n\t\t\tString aname = a.name.toUpperCase(Locale.ENGLISH);\r\n\t\t\tString aval = a.value.toUpperCase(Locale.ENGLISH);\r\n\t\t\t// TODO: not sure if any attributes are allowed here...\r\n\t\t\t// Look for VALUE=DATE or VALUE=DATE-TIME\r\n\t\t\t// DATE means untimed for the event\r\n\t\t\tif (aname.equals(\"VALUE\"))\r\n\t\t\t{\r\n\t\t\t\tif (aval.equals(\"DATE\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tdateOnly = true;\r\n\t\t\t\t} else if (aval.equals(\"DATE-TIME\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tdateOnly = false;\r\n\t\t\t\t}\r\n\t\t\t} else if (aname.equals(\"TZID\"))\r\n\t\t\t{\r\n\t\t\t\ttzid = a.value;\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\t// TODO: anything else allowed here?\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString inDate = value;\r\n\r\n\t\tif (inDate.length() < 8)\r\n\t\t{\r\n\t\t\t// Invalid format\r\n\t\t\tthrow new ParseException(\"Invalid date format '\" + inDate + \"'\",\r\n\t\t\t\t\tinDate);\r\n\t\t}\r\n\r\n\t\t// Make sure all parts of the year are numeric.\r\n\t\tfor (int i = 0; i < 8; i++)\r\n\t\t{\r\n\t\t\tchar ch = inDate.charAt(i);\r\n\t\t\tif (ch < '0' || ch > '9')\r\n\t\t\t{\r\n\t\t\t\tthrow new ParseException(\r\n\t\t\t\t\t\t\"Invalid date format '\" + inDate + \"'\", inDate);\r\n\t\t\t}\r\n\t\t}\r\n\t\tyear = Integer.parseInt(inDate.substring(0, 4));\r\n\t\tmonth = Integer.parseInt(inDate.substring(4, 6));\r\n\t\tday = Integer.parseInt(inDate.substring(6, 8));\r\n\t\tif (day < 1 || day > 31 || month < 1 || month > 12)\r\n\t\t\tthrow new BogusDataException(\"Invalid date '\" + inDate + \"'\",\r\n\t\t\t\t\tinDate);\r\n\t\t// Make sure day of month is valid for specified month\r\n\t\tif (year % 4 == 0)\r\n\t\t{\r\n\t\t\t// leap year\r\n\t\t\tif (day > leapMonthDays[month - 1])\r\n\t\t\t{\r\n\t\t\t\tthrow new BogusDataException(\"Invalid day of month '\" + inDate\r\n\t\t\t\t\t\t+ \"'\", inDate);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t{\r\n\t\t\tif (day > monthDays[month - 1])\r\n\t\t\t{\r\n\t\t\t\tthrow new BogusDataException(\"Invalid day of month '\" + inDate\r\n\t\t\t\t\t\t+ \"'\", inDate);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// TODO: parse time, handle localtime, handle timezone\r\n\t\tif (inDate.length() > 8)\r\n\t\t{\r\n\t\t\t// TODO make sure dateOnly == false\r\n\t\t\tif (inDate.charAt(8) == 'T')\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\thour = Integer.parseInt(inDate.substring(9, 11));\r\n\t\t\t\t\tminute = Integer.parseInt(inDate.substring(11, 13));\r\n\t\t\t\t\tsecond = Integer.parseInt(inDate.substring(13, 15));\r\n\t\t\t\t\tif (hour > 23 || minute > 59 || second > 59)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthrow new BogusDataException(\r\n\t\t\t\t\t\t\t\t\"Invalid time in date string '\" + inDate + \"'\",\r\n\t\t\t\t\t\t\t\tinDate);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (inDate.length() > 15)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tisUTC = inDate.charAt(15) == 'Z';\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (NumberFormatException nef)\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new BogusDataException(\r\n\t\t\t\t\t\t\t\"Invalid time in date string '\" + inDate + \"' - \"\r\n\t\t\t\t\t\t\t\t\t+ nef, inDate);\r\n\t\t\t\t}\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\t// Invalid format\r\n\t\t\t\tthrow new ParseException(\r\n\t\t\t\t\t\t\"Invalid date format '\" + inDate + \"'\", inDate);\r\n\t\t\t}\r\n\t\t} else\r\n\t\t{\r\n\t\t\t// Just date, no time\r\n\t\t\tdateOnly = true;\r\n\t\t}\r\n\r\n\t\tif (isUTC && !dateOnly)\r\n\t\t{\r\n\t\t\t// Use Joda Time to convert UTC to localtime\r\n\t\t\tDateTime utcDateTime = new DateTime(DateTimeZone.UTC);\r\n\t\t\tutcDateTime = utcDateTime.withDate(year, month, day).withTime(hour,\r\n\t\t\t\t\tminute, second, 0);\r\n\t\t\tDateTime localDateTime = utcDateTime.withZone(DateTimeZone\r\n\t\t\t\t\t.getDefault());\r\n\t\t\tyear = localDateTime.getYear();\r\n\t\t\tmonth = localDateTime.getMonthOfYear();\r\n\t\t\tday = localDateTime.getDayOfMonth();\r\n\t\t\thour = localDateTime.getHourOfDay();\r\n\t\t\tminute = localDateTime.getMinuteOfHour();\r\n\t\t\tsecond = localDateTime.getSecondOfMinute();\r\n\t\t} else if (tzid != null)\r\n\t\t{\r\n\t\t\tDateTimeZone tz = DateTimeZone.forID(tzid);\r\n\t\t\tif (tz != null)\r\n\t\t\t{\r\n\t\t\t\t// Convert to localtime\r\n\t\t\t\tDateTime utcDateTime = new DateTime(tz);\r\n\t\t\t\tutcDateTime = utcDateTime.withDate(year, month, day).withTime(\r\n\t\t\t\t\t\thour, minute, second, 0);\r\n\t\t\t\tDateTime localDateTime = utcDateTime.withZone(DateTimeZone\r\n\t\t\t\t\t\t.getDefault());\r\n\t\t\t\tyear = localDateTime.getYear();\r\n\t\t\t\tmonth = localDateTime.getMonthOfYear();\r\n\t\t\t\tday = localDateTime.getDayOfMonth();\r\n\t\t\t\thour = localDateTime.getHourOfDay();\r\n\t\t\t\tminute = localDateTime.getMinuteOfHour();\r\n\t\t\t\tsecond = localDateTime.getSecondOfMinute();\r\n\t\t\t\t// Since we have converted to localtime, remove the TZID\r\n\t\t\t\t// attribute\r\n\t\t\t\tthis.removeNamedAttribute(\"TZID\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tisUTC = false;\r\n\r\n\t\t// Add attribute that says date-only or date with time\r\n\t\tif (dateOnly)\r\n\t\t\taddAttribute(\"VALUE\", \"DATE\");\r\n\t\telse\r\n\t\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\r\n\t}", "public DefaultImpl() {\n this(DEFAULT_DATE_FORMAT);\n }", "public DateCustom(int __day, int __month, int __year) {\n this._day = __day;\n this._month = __month;\n this._year = __year;\n }", "public Date(int m, int y) {\r\n\r\n\t\tif (!isValid(m, DAYS[m], y))\r\n\t\t\tthrow new RuntimeException(\"Invalid date; correct input\");\r\n\t\tmonth = m;\r\n\t\tday = DAYS[m];\r\n\t\tyear = y;\r\n\t}", "private void initDateFromJD(double jd, boolean calType) {\n\t\tthis.jd = jd;\n\t\tthis.calType = calType;\n\t\tIDate dt = swe_revjul(jd, calType);\n\t\tthis.year = dt.year;\n\t\tthis.month = dt.month;\n\t\tthis.day = dt.day;\n\t\tthis.hour = dt.hour;\n\t}", "private CreateDateUtils()\r\n\t{\r\n\t}", "public GregorianStartDate(\n final Holiday<GregorianCalendar> holiday,\n final GregorianCalendar start) {\n this.setHoliday(holiday);\n this.setStart(start);\n }", "public void setGioBatDau(Date gioBatDau);", "public ExceptionDate(){\n\t\tsuper();\n\t}", "date initdate(date iDate)\n {\n iDate.updateElementValue(\"date\");\n return iDate;\n }", "private Date init(InputStream ouiData) throws IOException {\n DataInputStream din = new DataInputStream(ouiData);\n Date result = new Date(din.readLong());\n while (din.available() > 0) {\n Oui oui = new Oui(din);\n _byHashCode.put(oui.hashCode(), oui);\n }\n return result;\n }", "public Calendar() {\n initComponents();\n }", "Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}", "public Calendar() {\n dateAndTimeables = new HashMap<>();\n }", "public JCalendar() {\r\n init();\r\n resetToDefaults();\r\n }", "public LocalDateAdapter() {\r\n\t\tsuper();\r\n\t}", "public DayPeriod() {\n\t}", "public Date(String sDate) {\r\n\t\tint m, d, y;\r\n\t\tString[] chopDate = sDate.split(\"-\");\r\n\t\tm = Integer.parseInt(chopDate[ZEROI]);\r\n\t\td = Integer.parseInt(chopDate[ONEI]);\r\n\t\ty = Integer.parseInt(chopDate[TWOI]);\r\n\t\tif (!isValid(m, d, y))\r\n\t\t\tthrow new RuntimeException(\"Invalid date\");\r\n\t\tmonth = m;\r\n\t\tday = d;\r\n\t\tyear = y;\r\n\t}", "public LicenseIssueDateValidator(DriverRegistration registration) {\n super(registration);\n }", "public SimpleDate(final int year, final int month, final int day) {\n\t\tthis.year = year;\n\t\tthis.month = month;\n\t\tthis.day = day;\n\t}", "public ShortDate(final Date date) {\n super(date.getTime());\n }", "public Watch(){ //Watch Constuctor\r\n super(); //Values passed in from the super class\r\n month = 1; //Initialize month to 1\r\n day = 1; //Initialize day to 1\r\n year = 1980; //Initialize year to 1980\r\n}", "public SIPDate() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e6 in method: gov.nist.javax.sip.header.SIPDate.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.<init>():void\");\n }", "public SimpleGeometricObject() {\r\n this.dateCreated = new java.util.Date();\r\n }", "private GuessDate(){\n }", "Date getStartDate();", "Date getStartDate();", "Date getStartDate();", "public PubDateFilter() {\r\n this(System.currentTimeMillis());\r\n }", "public Date(String dateType, int year, int month, int day)\r\n\t\t\tthrows BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = this.minute = this.second = 0;\r\n\t\tthis.dateOnly = true;\r\n\r\n\t\tString yearStr, monthStr, dayStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tvalue = yearStr + monthStr + dayStr;\r\n\r\n\t\t// Add attribute that says date-only\r\n\t\taddAttribute(\"VALUE\", \"DATE\");\r\n\t}", "protected StartOfDay() {\n super();\n\n }", "public CalendarBasi()\n {\n dia = new DisplayDosDigitos(31);\n mes = new DisplayDosDigitos(13);\n anio = new DisplayDosDigitos(100);\n }", "public void setInstdte(Date instdte) {\r\n this.instdte = instdte;\r\n }", "public Date getInstdte() {\r\n return instdte;\r\n }", "private DateTimeAdjusters() {\n\n }", "public Date getDateObject(){\n \n Date date = new Date(this.getAnio(), this.getMes(), this.getDia());\n return date;\n }", "@Override\n\tpublic Calendar getInitialDate() {\n\t\treturn Calendar.getInstance();\n\t}", "public WeekG(Calendar date)\r\n {\r\n endDate = Calendar.getInstance();\r\n endDate.set((date.get(Calendar.YEAR)),(date.get(Calendar.MONTH)),\r\n (date.get(Calendar.DAY_OF_MONTH)));\r\n acceptedDatesRange = new int[2];\r\n dayArray = new ArrayList();\r\n note = \"\";\r\n \r\n setUp();\r\n }", "public Date () throws CGException {\n try {\n setSentinel();\n }\n catch (Exception e){\n\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n }" ]
[ "0.714184", "0.6383858", "0.6302757", "0.6262385", "0.62443435", "0.6230256", "0.62141854", "0.6211856", "0.61001503", "0.6076377", "0.6076377", "0.60745156", "0.60686535", "0.60363346", "0.60100543", "0.6004953", "0.5979122", "0.5910414", "0.5896438", "0.5845586", "0.58311117", "0.57912785", "0.57794344", "0.5775159", "0.57745516", "0.5716155", "0.5697218", "0.5667807", "0.5628654", "0.56274205", "0.5624379", "0.56159693", "0.5615845", "0.5597454", "0.5586255", "0.5580411", "0.55776644", "0.5576014", "0.5572225", "0.5555884", "0.55510885", "0.55367434", "0.55308425", "0.5521379", "0.5512858", "0.549932", "0.5493437", "0.54802334", "0.5477493", "0.54652745", "0.545189", "0.54443645", "0.5443665", "0.54424775", "0.5441341", "0.5440114", "0.5438305", "0.542635", "0.5402558", "0.5395429", "0.53941774", "0.53795576", "0.5373575", "0.5372242", "0.53689295", "0.5365414", "0.5359774", "0.53454113", "0.53252137", "0.5308527", "0.53067154", "0.53047025", "0.53012913", "0.52893645", "0.5272034", "0.52540576", "0.52518076", "0.5248585", "0.52437717", "0.5235163", "0.5228306", "0.52059513", "0.52021134", "0.51981556", "0.51975286", "0.5173708", "0.5161633", "0.5161633", "0.5161633", "0.5148837", "0.51475513", "0.51383823", "0.51347035", "0.5132112", "0.5131949", "0.5128015", "0.5121747", "0.51086706", "0.5106498", "0.5104549" ]
0.7019686
1
Allows to get the number of the day of a date.
public int getDay() { return day; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer getDay();", "public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }", "public static int getDayNumberByDate(Date val) {\n\t\t if (val != null) {\n\t\t SimpleDateFormat format = new SimpleDateFormat(\"dd\");\n\t\t return parseInt(format.format(val));\n\t\t } else {\n\n\t\t return 0;\n\n\t\t }\n\t}", "public static long getDayNumber(long date) {\n TimeZone tz = TimeZone.getDefault();\n long gmtOffset = tz.getOffset(date);\n return (date + gmtOffset) / DAY_IN_MILLIS;\n }", "public int getDay(){\n String[] dateSplit = this.date.split(\"-\");\n calendar.set(Calendar.DAY_OF_MONTH, Integer.valueOf(dateSplit[2]));\n calendar.set(Calendar.MONTH, Integer.valueOf(dateSplit[1])-1);\n calendar.set(Calendar.YEAR, Integer.valueOf(dateSplit[0]));\n return calendar.get(Calendar.DAY_OF_WEEK);\n }", "int getNumberDays();", "public int getDay() {\r\n\t\treturn (this.day);\r\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int GetDay(){\n\t\treturn this.date.get(Calendar.DAY_OF_WEEK);\n\t}", "public int getDay() {\r\n return day;\r\n }", "public int getDay(){\n\t\treturn day;\n\t}", "public int getDay()\n {\n return day;\n }", "public int getDay() {\r\n return FormatUtils.uint8ToInt(mDay);\r\n }", "public int getDay() {\n\t\treturn this.day;\n\t}", "public int getDay() {\n\t\treturn this.day;\n\t}", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public int getDay() {\n\treturn day;\n }", "public int getDay() {\n return day;\n }", "public static int getNumberOfDays() {\n\t\treturn numberOfDays;\n\t}", "private static int getDayNumberNew(LocalDate date) {\n DayOfWeek day = date.getDayOfWeek();\n return day.getValue() % 7;\n }", "public Integer getDay()\n {\n return this.day;\n }", "public Number getDayDate() {\n return (Number) getAttributeInternal(DAYDATE);\n }", "private Date getdDay() {\n\t\treturn this.dDay;\r\n\t}", "public int getDateAsNumber(){\n\t\tSimpleDateFormat f = new SimpleDateFormat(\"yyyyMMdd\");\n\t\treturn Integer.parseInt(f.format(date.get()));\n\t}", "public int getNumberOfDays() {\n return numberOfDays;\n }", "public int getNumDaysForComponent(Record record);", "public java.lang.Integer getNoOfDays () {\n\t\treturn noOfDays;\n\t}", "public java.lang.Integer getNoOfDays () {\n\t\treturn noOfDays;\n\t}", "public int getNumDays() {\n\t\treturn numDays;\n\t}", "public int getNumberOfDays()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1 || mn == 3 || mn == 5 || mn == 7 || mn == 8 || mn == 10 || mn == 12)\r\n {return 31;}\r\n if (mn == 4 || mn == 6 || mn == 9 || mn == 11)\r\n {return 30;}\r\n else\r\n {return 28;}\r\n }", "public java.lang.String getDayNumber() {\n return dayNumber;\n }", "public static int getTodaysDay() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.monthDay;\t\r\n\t\t\r\n\t}", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public static int getDay(long time) {\n return getDay(time, Calendar.DATE, 0);\n }", "@Override\r\n\tpublic int getDayCount(Date date) {\n\t\tString hql = \"select cc.count from cinema_condition cc where cc.date = ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, date);\r\n\t\tif(query.uniqueResult()==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint resutl = (Integer) query.uniqueResult();\r\n\t\treturn resutl;\r\n\t}", "io.dstore.values.TimestampValue getDay();", "public DayCount getDayCount() {\n return dayCount;\n }", "public Date getDay() {\n return day;\n }", "public static int getDaysFromNow(Date date) throws Exception{\n\n if(date != null) {\n Days daysbetween = Days.daysBetween(new DateTime(date.getTime()), new DateTime().now());\n return daysbetween.getDays();\n }\n else\n throw new Exception();\n }", "public static int getDayOfWeek(CalendarDate date) {\n\tlong fixedDate = getFixedDate(date.getYear(),\n\t\t\t\t date.getMonth(),\n\t\t\t\t date.getDate());\n\treturn getDayOfWeekFromFixedDate(fixedDate);\n }", "Integer getStartDay();", "public int getDays(){\r\n\t\treturn days;\r\n\t}", "public int getDay(){\n\t return this.day;\n }", "public long getDays() {\r\n \treturn days;\r\n }", "public static int getCurrentDay()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.DATE);\n\t}", "public int getDays() {\n return this.days;\n }", "public int getDay()\n\t{\n\t\treturn this.dayOfMonth;\n\t}", "public int getDate() {\n\t\treturn date.getDayOfMonth();\n\t}", "public static int getDay(String dueDate){\n if(dueDate.charAt(0) == 0){\n return Integer.parseInt(getSubstring(dueDate, 1, 1));\n }\n else{\n return Integer.parseInt(getSubstring(dueDate, 0, 1));\n }\n }", "public static int getDays(Date t, Date baseDate) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(baseDate);\n long sl = cal.getTimeInMillis();\n long el, delta;\n cal.setTime(t);\n el = cal.getTimeInMillis();\n delta = el - sl;\n int value = (int) (delta / (24 * 60 * 60 * 1000));\n\n return value;\n }", "public String getDay() {\n\n\t\treturn day;\n\t}", "public int getDayOfWeekNr() {\n\t\treturn ((int) (this.jd - 5.5)) % 7;\n\t}", "public String getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getDay();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"day\"));\n }\n }", "public int calcDays() {\n\t\tint days = day-1;\r\n\t\tdays += ((month-1)*30);\r\n\t\tdays += ((year -2000) * (12*30));\r\n\t\treturn days;\r\n\t}", "public int days() {\n if (isInfinite()) {\n return 0;\n }\n Period p = new Period(asInterval(), PeriodType.days());\n return p.getDays();\n }", "protected static int getDay(String dateTime) {\n return Integer.parseInt(dateTime.substring(5, 7));\n }", "@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }", "public int daysBetween(Day day)\n\t{\n\t\tlong millisBetween = Math.abs(this.getDayStart(TimeZoneEx.GMT).getTime() - day.getDayStart(TimeZoneEx.GMT).getTime());\n\t\treturn (int) Math.round((float) millisBetween / (1000F * 60F * 60F * 24F));\n\t}", "public static int getDayOfWeekNr(int year, int month, int day, boolean calType) {\n\t\tint sdow = ((int) (swe_julday(year, month, day, 0.0, calType) - 5.5)) % 7;\n\t\treturn sdow;\n\t}", "@java.lang.Override\n public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }", "public int getIDays() {\n return iDays;\n }", "public static int ConvertDateTimeToReportDay()\n {\n // Create an instance of SimpleDateFormat used for formatting\n // the string representation of date (month/day/year)\n DateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\n // Get the date today using Calendar object.\n Date today = Calendar.getInstance().getTime();\n\n // Using DateFormat format method we can create a string\n // representation of a date with the defined format.\n String reportDate = df.format(today);\n\n return Integer.parseInt(reportDate);\n }", "@Override\n\tpublic int ddayCount(String memberNo) {\n\t\treturn dDao.ddayCount(sqlSession, memberNo);\n\t}", "public static int getDayBetweenDates(Date dBeginn, Date dEnde) {\r\n int iReturn = -1;\r\n\r\n long lngBetween = dEnde.getTime() - dBeginn.getTime();\r\n lngBetween = ((lngBetween / 1000) / 3600) / 24;\r\n\r\n iReturn = (int) lngBetween;\r\n\r\n return (iReturn);\r\n }", "public int getDateDay(String columnName) {\n DateDayVector vector = (DateDayVector) table.getVector(columnName);\n return vector.get(rowNumber);\n }", "public int getDayOfYear() {\n\n return this.get(DAY_OF_YEAR).intValue();\n\n }", "public int getCurrentDay() {\n return daysPassed;\n }", "public final native int getDay() /*-{\n return this.getDay();\n }-*/;", "public int getDateDay(int columnIndex) {\n DateDayVector vector = (DateDayVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }", "public static synchronized int getDayOfWeekNr(double jd) {\n\t\treturn ((int) (jd - 5.5)) % 7;\n\t}", "public static int getDayOfWeekByDate(Date date){\n\t\t\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.setTime(date);\n\t\tint DayOfWeek = c.get(Calendar.DAY_OF_WEEK);\n\t\treturn DayOfWeek;\n\t\t\n\t}", "public byte getDay() {\r\n return day;\r\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public int getDayOfYear(){\n\t\treturn dayOfYear;\n\t}", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public io.dstore.values.StringValue getDay() {\n return day_ == null ? io.dstore.values.StringValue.getDefaultInstance() : day_;\n }", "public static int getDayFromString(String date) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.UK);\r\n\t\t\tDateTime dt = new DateTime((Date) sdf.parse(date));\r\n\t\t\treturn dt.getDayOfMonth();\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn -1;\r\n\t\t}\t\r\n\t\t\r\n\t}", "public int getDayDistance() {\n\t\treturn dayDistance;\n\t}", "public int getDaysSinceStartOfEpoch() {\r\n long millis = new GregorianCalendar(year, month - 1, day).getTimeInMillis();\r\n return (int) (millis / MILLIS_PER_DAY);\r\n\r\n }", "public int getWeekDay()\n\t{\n\t\tif (m_nType == AT_WEEK_DAY)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}", "public io.dstore.values.TimestampValue getDay() {\n return day_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : day_;\n }", "private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}", "public int getEDays() {\n return eDays;\n }", "public static double days_from_date(String date) {\n\n try {\n Date providedDate = dateFormat.parse(date);\n double diff = providedDate.getTime() / (1000 * 60 * 60 * 24);\n return diff > 0 ? Math.ceil(diff) : Math.floor(diff);\n } catch (ParseException e) {\n return Double.NaN;\n }\n }", "private String getStatusDay(LunarDate date) {\n if (Locale.SIMPLIFIED_CHINESE.equals(Locale.getDefault())\n || Locale.TRADITIONAL_CHINESE.equals(Locale.getDefault())) {\n if (date.holidayIdx != -1) {\n return RenderHelper.getStringFromList(R.array.holiday_array,\n date.holidayIdx);\n }\n if (date.termIdx != -1) {\n return RenderHelper.getStringFromList(R.array.term_array, date.termIdx);\n }\n }\n return getDay(date);\n }", "Integer getDaysSpanned();", "public int getDayOrNight() {\n return getStat(dayOrNight);\n }", "public String getDay() {\n return this.day;\n }", "public int determineDayRandomly() {\n\t\treturn 0;\r\n\t}" ]
[ "0.77164567", "0.7704618", "0.7585432", "0.7568434", "0.74916774", "0.74519", "0.7403083", "0.7371118", "0.7371118", "0.7371118", "0.73580086", "0.7347779", "0.7323158", "0.72776735", "0.7266793", "0.7260241", "0.7260241", "0.725481", "0.7237165", "0.7221136", "0.7177551", "0.7047189", "0.69806933", "0.6924159", "0.69066924", "0.68955404", "0.6863229", "0.685357", "0.6851315", "0.68343025", "0.68343025", "0.6820708", "0.68159026", "0.67766255", "0.67747647", "0.6757788", "0.6757788", "0.6757788", "0.6757788", "0.6757788", "0.6719908", "0.67105", "0.6677222", "0.66759306", "0.6673173", "0.6670815", "0.663538", "0.66227", "0.6607201", "0.65994143", "0.6549622", "0.6544514", "0.6528459", "0.65120995", "0.6497957", "0.6487505", "0.6473283", "0.6464374", "0.6455757", "0.6454796", "0.6450827", "0.64444906", "0.6441809", "0.64408445", "0.6440082", "0.6433319", "0.6422844", "0.63893855", "0.63855535", "0.638486", "0.6370392", "0.63685036", "0.6343861", "0.6331766", "0.6325399", "0.6318552", "0.6317139", "0.63102317", "0.6307746", "0.6303213", "0.62873465", "0.62843436", "0.6272299", "0.6267685", "0.6267685", "0.6267685", "0.62563294", "0.6246242", "0.62212723", "0.6211021", "0.6208024", "0.6206973", "0.6200217", "0.61984766", "0.6188592", "0.6187128", "0.61852944", "0.6175291", "0.61720514", "0.6169282" ]
0.7403494
6
Allows to change the number of the day of a date. post: The number of the day of a date is changed.
public void setDay(int day) { this.day = day; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDay(int day) {\r\n this.day = day;\r\n }", "public void setDay(int day)\n {\n this.day = day;\n }", "private static void incrementDate() {\n\t\ttry {\r\n\t\t\tint days = Integer.valueOf(input(\"Enter number of days: \")).intValue();\r\n\t\t\tcalculator.incrementDate(days); // variable name changes CAL to calculator\r\n\t\t\tlibrary.checkCurrentLoans(); // variable name changes LIB to library\r\n\t\t\toutput(sdf.format(cal.date())); // variable name changes SDF to sdf , CAL to cal , method changes Date() to date()\r\n\t\t\t\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t output(\"\\nInvalid number of days\\n\");\r\n\t\t}\r\n\t}", "public void updateDay(int value)\n {\n this.currentCalendar.add(Calendar.DAY_OF_MONTH, value);\n }", "private static int getDayNumberNew(LocalDate date) {\n DayOfWeek day = date.getDayOfWeek();\n return day.getValue() % 7;\n }", "public void setDay(final int day) {\n\t\tthis.day = day;\n\t}", "public boolean setDay(int newDay) {\n\t\tthis.day = newDay;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType);\n\t\treturn true;\n\t}", "public void setDay(int day) {\n if(day < 1 || day > 31) {\n this.day = 1;\n } else {\n this.day = day;\n }\n\n if(month == 2 && this.day > 29) {\n this.day = 29;\n } else if((month==4 || month==6 || month==8 || month==11) && this.day > 30) {\n this.day = 30;\n }\n }", "public void setDay(Day day, int dayNum) {\n\t\tif (dayNum <= days.length) {\n\t\t\tdays[dayNum - 1] = day;\n\t\t}\n\t}", "public void setDays(int n) {\n this.days = n;\n this.total = this.days * this.price;\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\n this.day = day;\n }", "private Day(int value) {\r\n\t\tthis.value = value;\r\n\t}", "public void updateChangedDate(int year, int month, int day);", "public void setDayDate(Number value) {\n setAttributeInternal(DAYDATE, value);\n }", "void updateChangedDate(int year, int month, int day);", "public void increaseDay(){\n leapyear(year); //Call leapyear on year to check for leap year\r\n day++; //Increment day\r\n if(day > days[month-1]){ //If day reaches higher than the month's day\r\n day = 1; //Set day to zero\r\n month++; //Increment month\r\n }\r\n if(month > 12){ //If month reaches greater than 12\r\n year++; //Increment year\r\n month = 1; //Set month to 1\r\n }\r\n}", "public void setDay(int day)\r\n {\n \tif (!(day <= daysInMonth(month) || (day < 1)))\r\n\t\t{\r\n \t\tthrow new IllegalArgumentException(\"Bad day: \" + day);\r\n\t\t}\r\n this.day = day;\r\n }", "public void setDay(int day) {\r\n if ((day >= 1) && (day <= 31)) {\r\n this.day = day; //Validate day if true set else throws an exception\r\n } else {\r\n throw new IllegalArgumentException(\"Invalid Day!\");\r\n }\r\n\r\n }", "public void setMday(int value) {\n this.mday = value;\n }", "private void setDayCountDown() {\n dayCountDown = getMaxHunger();\n }", "public void setDate(int dt) {\n date = dt;\n }", "public Builder setDayValue(int value) {\n \n day_ = value;\n onChanged();\n return this;\n }", "void updateDays(WheelView year, WheelView month, WheelView day) {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.set(Calendar.YEAR,\n\t\t\t\tcalendar.get(Calendar.YEAR) + year.getCurrentItem());\n\t\tcalendar.set(Calendar.MONTH, month.getCurrentItem());\n\n\t\tint maxDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\tday.setViewAdapter(new DateNumericAdapter(getContext(), 1, maxDays,\n\t\t\t\tcureantDate));\n\t\tint curDay = Math.min(maxDays, day.getCurrentItem() + 1);\n\t\tday.setCurrentItem(curDay - 1, true);\n\t}", "private void incrementeDate() {\n dateSimulation++;\n }", "public void setDay(int day) throws InvalidDateException {\r\n\t\tif (day <= 31 & day >= 1) {\r\n\t\t\tthis.day = day;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic day for the date (between 1 and 31) !\");\r\n\t\t}\r\n\t}", "public void decreaseDay(){\n leapyear(year); //Call leapyear on year to check for leap year\r\n day--; //Decrement day\r\n if(day == 0){ //If day reaches lower than the month's day\r\n month--; //Decrement month\r\n\r\n\r\n if(month == 0){ //If month reaches zero\r\n month = 12; //Set month to 12 \r\n year--; //Decrement year\r\n }\r\n day = days[month-1]; //Set day to the previous month's value\r\n\r\n } \r\n\r\n }", "public void setDayNumber(String day) {\r\n this.dayNumber.setText(day);\r\n }", "String updateDay(String userName, Day day);", "public void incrementDay(){\n //Step 1\n this.currentDate.incrementDay();\n //step2\n if (this.getSavingsAccount() != null)\n this.getSavingsAccount().incrementDay();\n if (this.getCheckingAccount() != null)\n this.getCheckingAccount().incrementDay();\n if (this.getMoneyMarketAccount() != null)\n this.getMoneyMarketAccount().incrementDay();\n if (this.getCreditCardAccount() != null)\n this.getCreditCardAccount().incrementDay();\n //step 3\n if (this.getDate().getDay() == 1) {\n \n if (this.getSavingsAccount() != null)\n this.getSavingsAccount().incrementMonth();\n if (this.getCheckingAccount() != null)\n this.getCheckingAccount().incrementMonth();\n if (this.getMoneyMarketAccount() != null)\n this.getMoneyMarketAccount().incrementMonth();\n if (this.getCreditCardAccount() != null)\n this.getCreditCardAccount().incrementMonth();\n }\n \n }", "private void changeNextDay(){\n\t\tplanet.getClimate().nextDay();\n\t}", "public boolean setDay(int newDay, boolean check) {\n\t\tthis.day = newDay;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\tif (check) {\n\t\t\tdouble oldYear = this.year;\n\t\t\tdouble oldMonth = this.month;\n\t\t\tIDate dt = swe_revjul(this.jd, this.calType); // -> erzeugt neues\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Datum\n\t\t\tthis.year = dt.year;\n\t\t\tthis.month = dt.month;\n\t\t\tthis.day = dt.day;\n\t\t\tthis.hour = dt.hour;\n\t\t\treturn (this.year == oldYear && this.month == oldMonth && this.day == newDay);\n\t\t}\n\t\treturn true;\n\t}", "public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public void setCalendarDay(int day)\n {\n this.currentCalendar.set(Calendar.DAY_OF_MONTH, day);\n }", "@Test\r\n public void testSubDays1() {\n Calendar cal = Calendar.getInstance();\r\n cal.add(Calendar.DAY_OF_MONTH, -25);\r\n System.out.println(\"The day after increment is: \" + cal.getTime());\r\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public void updateDate(Date date);", "private void changeDateLabel(final int dayNumber)\n\t{\n\t\tString dayOfWeek = \"\" + dayArray[cModel.findDayOfWeek(dayNumber) - 1];\n\t\tint month = cModel.getCalMonth() + 1;\n\t\t\n\t\tdayDateLabel.setText(dayOfWeek + \" \" + month + \"/\" + dayNumber);\n\t}", "public void setDaysAdded(int value) {\n this.daysAdded = value;\n }", "int getNumberDays();", "void setDayOrNight(int day) {\n setStat(day, dayOrNight);\n }", "public int getDay() {\r\n return day;\r\n }", "public void setDate(int date){\n this.date = date;\n }", "public int getDay(){\n\t\treturn day;\n\t}", "@Override\n\tpublic void proceedNewDay(int p_date) \n\t\t\tthrows RemoteException \n\t{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void setDays(int daysIn){\r\n\t\tdays = daysIn;\r\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay()\n {\n return day;\n }", "public int getDay() {\n return day;\n }", "public void setDay(int r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: null in method: gov.nist.javax.sip.header.SIPDate.setDay(int):void, dex: in method: gov.nist.javax.sip.header.SIPDate.setDay(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setDay(int):void\");\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public int getDay() {\n\treturn day;\n }", "public void setNumberOfDays(int numberOfDays) {\n this.numberOfDays = numberOfDays;\n }", "public void subtractDay(int day) {\n if (day < 0) day = Math.abs(day);\n\n while (day != 0) {\n day--;\n this.subtractSingleDay();\n }\n }", "public void setDay(byte value) {\r\n this.day = value;\r\n }", "public void updateWeekday(){\n Date curDate=new Date(System.currentTimeMillis());\n SimpleDateFormat format=new SimpleDateFormat(\"EEEE\");\n String weekday1=format.format(curDate);\n int numberWeekday1=turnWeekdayToNumber(weekday1);\n updateSpecificDay(numberWeekday1);\n TextView TextWeekday=(TextView)this.findViewById(R.id.tv_weekday);\n TextWeekday.setText(weekday1);\n }", "private void nextDay() {\r\n tmp.setDay(tmp.getDay() + 1);\r\n int nd = tmp.getDayOfWeek();\r\n nd++;\r\n if (nd > daysInWeek) nd -= daysInWeek;\r\n tmp.setDayOfWeek(nd);\r\n upDMYcountDMYcount();\r\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDays(int days) {\n this.days = days;\n }", "public void setEDays(int days){\n \teDays = days;\n }", "public int getDay(){\n\t return this.day;\n }", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public void advanceDay(long day) {\n clock = Clock.offset(clock, Duration.ofDays(day));\n }", "protected void addDay(Date date) throws Exception {\n Calendar cal = DateHelper.newCalendarUTC();\n cal.setTime(date);\n String datecode = cal.get(Calendar.YEAR) + \"-\" + (cal.get(Calendar.MONTH) + 1) + \"-\" + cal.get(Calendar.DAY_OF_MONTH);\n affectedDays.put(datecode, date);\n Date rDate = DateHelper.roundDownLocal(date);\n datesTodo.add(rDate);\n }", "public void increment()\n // Increments this IncDate to represent the next day.\n {\n\t boolean ly = false;\n\t if(((year % 4 == 0) && year % 100 != 0) || year % 400 == 0) {\n\t\t //leap year\n\t\t ly = true;\n\t }\n\t if ((month == 2 && day == 28 && !ly) || (month == 2 && day == 29 && ly)) {\n\t\t month = 3;\n\t\t day = 1;\n\t } else if (month == 2 && day == 28 && !ly) {\n\t\t day ++;\n\t } else if ((month == 4 || month == 6 || month == 9 || month == 11) && day == 30){\n\t\t month ++;\n\t\t day = 1;\n\t } else if ((month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10) && day == 31){\n\t\t System.out.println(\"month is \" + month);\n\t\t month ++;\n\t\t day = 1;\n\t } else if ((month == 12) && day == 31) {\n\t\t year ++;\n\t\t month = 1;\n\t\t day = 1;\n\t } else {\n\t\t day ++;\n\t }\n }", "Integer getDay();", "public void setDate(int month, int day) {\r\n\t\tString dayString = \"\";\r\n\t\tif(day < 10)\r\n\t\t{\r\n\t\t\tfor(int i = 0; i < 10; i++)\r\n\t\t\t{\r\n\t\t\t\tif(day == i)\r\n\t\t\t\t{\r\n\t\t\t\t\tdayString = \"0\" + i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.date = month + \"-\" + dayString;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.date = month + \"-\" + day;\r\n\t\t}\r\n\t}", "public String checkDateDay(Date aDate){\n if (aDate.getDate() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getDate());\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getDate());\r\n \r\n }", "public static Date setToNDaysAgo(Date date, int n) {\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.DATE, -n);\n\t return cal.getTime();\n\t}", "public void updateDate(){\n\t duedate_priority++;\n\t}", "protected static final int date2doy \n (boolean isLeapYear, int month, int day, int number_of_deleted_days)\n {\n return (date2doy (isLeapYear, month, day) - number_of_deleted_days);\n }", "public int getDay() {\n\t\treturn this.day;\n\t}", "public int getDay() {\n\t\treturn this.day;\n\t}", "public int getDay() {\r\n\t\treturn (this.day);\r\n\t}", "public int getNumberOfDays() {\n return numberOfDays;\n }", "public void setDate(int day,int month,int year){\n this.day=day;\n this.month=month;\n this.year=year;\n }", "public void setNoOfDays (java.lang.Integer noOfDays) {\n\t\tthis.noOfDays = noOfDays;\n\t}", "public void setNoOfDays (java.lang.Integer noOfDays) {\n\t\tthis.noOfDays = noOfDays;\n\t}", "public static int microDateDays(long modified) {\n return (int) ((modified / day) % 262144);\r\n }", "private void changePreviousDay(){\n\t\tplanet.getClimate().prevDay();\n\t}", "@Test\r\n public void testAddDays1() {\n Calendar cal = Calendar.getInstance();\r\n cal.add(Calendar.DAY_OF_MONTH, 10);\r\n System.out.println(\"The day after increment is: \" + cal.getTime());\r\n }", "public void setDate(int month, int day) {\r\n this.month = month;\r\n this.day = day;\r\n }", "public static int getDayNumberByDate(Date val) {\n\t\t if (val != null) {\n\t\t SimpleDateFormat format = new SimpleDateFormat(\"dd\");\n\t\t return parseInt(format.format(val));\n\t\t } else {\n\n\t\t return 0;\n\n\t\t }\n\t}", "Date computeDays(Date d, int days){\n d.setTime(d.getTime() + days*1000*60*60*24);\n return d;\n }", "public Date afterNDays(int n) throws IllegalArgumentException{\n\t if (n < 0)\n\t throw new IllegalArgumentException(\"Enter a positive number!\");\n\t Date result = new Date(this.day, this.month, this.year);\n\t for (int i = 0; i < n; i++)\n\t result = result.tomorrow();\n\t return result;\n }", "public void setDate(long value) {\n this.date = value;\n }", "public void setPresentDays(Integer presentDays)\r\n/* 53: */ {\r\n/* 54:55 */ this.presentDays = presentDays;\r\n/* 55: */ }", "public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}", "public static String incrementDateByOneDay() {\n\t\ttry {\n\t\t\tcalendar.setTime(sdf.parse(newDateStr));\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcalendar.add(Calendar.DATE, 1); // number of days to add\n\t\tnewDateForTable = sdf.format(calendar.getTime());\n\t\treturn newDateForTable;\n\t}" ]
[ "0.68618625", "0.68186206", "0.67685777", "0.67335325", "0.6733076", "0.6654667", "0.66353595", "0.66006845", "0.64741284", "0.6428438", "0.6421532", "0.6421532", "0.6421532", "0.6421532", "0.6421532", "0.63713646", "0.63645816", "0.6321471", "0.6299136", "0.6293333", "0.62788904", "0.62686276", "0.6264613", "0.62457305", "0.62342674", "0.6231282", "0.6194586", "0.61778677", "0.6152373", "0.6141699", "0.61132216", "0.61087555", "0.61052203", "0.6095568", "0.60640925", "0.6062912", "0.60579777", "0.60530406", "0.60512346", "0.60097855", "0.6008586", "0.60006005", "0.5969577", "0.59569824", "0.59109527", "0.59063804", "0.5903699", "0.59007263", "0.58907664", "0.5883937", "0.5882661", "0.5873309", "0.5857381", "0.5855431", "0.5851958", "0.5836974", "0.5809066", "0.5809066", "0.5809066", "0.5808946", "0.5805653", "0.57632977", "0.5763065", "0.57603335", "0.57601225", "0.5758361", "0.5742732", "0.57387626", "0.57346684", "0.5726395", "0.5726395", "0.5726395", "0.5724069", "0.57183605", "0.5708549", "0.5703294", "0.56964624", "0.5680316", "0.5665755", "0.5661181", "0.5645375", "0.56345063", "0.56345063", "0.5632986", "0.56313133", "0.56292737", "0.5625", "0.5625", "0.5612016", "0.5607128", "0.5597658", "0.5592359", "0.5588048", "0.5584174", "0.5579654", "0.5576401", "0.55756825", "0.5571498", "0.5562071" ]
0.67061245
5
Allows to get the number of the month of a date.
public int getMonth() { return month; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMonthInteger() \n\t{\n\t\t// 1 will be added here to be able to use this func alone to construct e.g adate\n\t\t// to get the name of the month from getMonth(), 1 must be deducted.\n\t\treturn 1+m_calendar.get(Calendar.MONTH);\n\n\t}", "public int getMonth() {\n\t\treturn date.getMonthValue();\n\t}", "public static int getMonthNumberByDate(Date val) {\n\t\tif (val != null) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"MM\");\n\t\t\treturn parseInt(format.format(val));\n\t\t} else {\n\n\t\t\treturn 0;\n\n\t\t}\n\t}", "public int getMonthDate()\n\t{\n\t\tif (m_nType == AT_MONTH_DATE)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}", "public int getMonthInt() {\n return month;\r\n }", "public int getMonth() {\r\n return FormatUtils.uint8ToInt(mMonth);\r\n }", "public int getNumberOfDaysInTheMonth() {\n YearMonth yearMonthObject = YearMonth.of(year, month);\n return yearMonthObject.lengthOfMonth();\n }", "public int getMonth() {\r\n // ersetzt deprecated Methode Date.getMonth()\r\n return this.month;\r\n }", "public int getMonth() {\n return month;\n }", "public int getMonth()\n {\n return month;\n }", "public int getMonth(){\n\t\treturn month;\n\t}", "private static int monthNum(String month) {\n switch (month) {\n case \"1\": case \"january\": return 1;\n case \"2\": case \"february\": return 2;\n case \"3\": case \"march\": return 3;\n case \"4\": case \"april\": return 4;\n case \"5\": case \"may\": return 5;\n case \"6\": case \"june\": return 6;\n case \"7\": case \"july\": return 7;\n case \"8\": case \"august\": return 8;\n case \"9\": case \"september\": return 9;\n case \"10\": case \"october\": return 10;\n case \"11\": case \"november\": return 11;\n case \"12\": case \"december\": return 12;\n }\n\n return 0; // default\n }", "public int getMonth() {\r\n\t\treturn (this.month);\r\n\t}", "private static long getMonthFromDate (String date) {\n\t\tString[] dateArray = date.split(AnalyticsUDFConstants.SPACE_SEPARATOR);\n\t\ttry {\n\t\t\tDate d = new SimpleDateFormat(AnalyticsUDFConstants.DATE_FORMAT_MONTH).parse(dateArray[1] +\n\t\t\t\t\tAnalyticsUDFConstants.SPACE_SEPARATOR + dateArray[dateArray.length-1]);\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(d);\n\t\t\treturn calendar.getTimeInMillis();\n\t\t} catch (ParseException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public int getMonth() {\n\t\treturn month;\n\t}", "public int getMonth() {\n return this.month;\n }", "public int getMonth() {\n return this.month;\n }", "public Integer getMonth() {\r\n return month;\r\n }", "public Integer getMonth() {\n return month;\n }", "public Integer getMonth() {\n return month;\n }", "public int daysInMonth() {\r\n if (month == 4 || month == 6 || month == 9 || month == 11) {\r\n return 30;\r\n } else if (month == 2) {\r\n return 28;\r\n } else {\r\n return 31;\r\n }\r\n }", "public long getActMonth(String date) {\n\t\treturn AnalyticsUDF.getMonthFromDate(date);\n\t}", "public int getDayOfMonth();", "public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}", "private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}", "public abstract int daysInMonth(DMYcount DMYcount);", "int getExpMonth(String bookingRef);", "public static int getMonthFromString(String date) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.UK);\r\n\t\t\tDateTime dt = new DateTime((Date) sdf.parse(date));\r\n\t\t\treturn dt.getMonthOfYear();\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn -1;\r\n\t\t}\t\r\n\t\t\r\n\t}", "public int getDaysInMonth()\r\n\t{\r\n\t\tif (this.year % 4 == 0)\r\n\t\t\treturn Date.leapMonthDays[this.month - 1];\r\n\t\telse\r\n\t\t\treturn monthDays[this.month - 1];\r\n\t}", "public int getCurrentDayOfMonthAsNum() {\n\t\t\t\tint dayOfMonth = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\t\t\treturn dayOfMonth;\n\t\t\t}", "public int monthOfYear() {\r\n\t\treturn mC.get(Calendar.MONTH);\r\n\t}", "public static int getCurrentMonth()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t}", "public final native int getMonth() /*-{\n return this.getMonth();\n }-*/;", "protected static int getMonth(String dateTime) {\n return Integer.parseInt(dateTime.substring(3, 5)) - 1;\n }", "public int getMonthValue(){\n\t\treturn monthValue;\n\t}", "private int getCalendarMonth(String month){\n month = month.toUpperCase();\n if (month.indexOf(\"JAN\") == 0 ) {\n return Calendar.JANUARY;\n } else if (month.indexOf(\"FEB\") == 0) {\n return Calendar.FEBRUARY;\n } else if (month.indexOf(\"MAR\") == 0) {\n return Calendar.MARCH ;\n } else if (month.indexOf(\"APR\") == 0) {\n return Calendar.APRIL;\n } else if (month.indexOf(\"MAY\") == 0) {\n return Calendar.MAY;\n } else if (month.indexOf(\"JUN\") == 0) {\n return Calendar.JUNE;\n } else if (month.indexOf(\"JUL\") == 0) {\n return Calendar.JULY;\n } else if (month.indexOf(\"AUG\") == 0) {\n return Calendar.AUGUST;\n } else if (month.indexOf(\"SEP\") == 0) {\n return Calendar.SEPTEMBER;\n } else if (month.indexOf(\"OCT\") == 0) {\n return Calendar.OCTOBER;\n } else if (month.indexOf(\"NOV\") == 0) {\n return Calendar.NOVEMBER;\n } else if (month.indexOf(\"DEC\") == 0) {\n return Calendar.DECEMBER;\n } else {\n throw new IllegalArgumentException(\"month must be one of {JAN, \" +\n \"FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV ,DEC)\");\n }\n }", "public int dayOfMonth() {\r\n\t\treturn mC.get(Calendar.DAY_OF_MONTH);\r\n\t}", "public int getDayOfMonth() \n\t{\n\t\tint dayofmonth = m_calendar.get(Calendar.DAY_OF_MONTH);\n\t\treturn dayofmonth;\n\n\t}", "public static int numDaysInMonth(int month){\r\n switch (month) {\r\n case 1:\r\n case 3:\r\n case 5:\r\n case 7:\r\n case 9:\r\n case 11:\r\n return 31;\r\n case 2:\r\n return 29;\r\n\r\n default:\r\n return 30\r\n }\r\n}", "public String getMonth() {\r\n return month;\r\n }", "public String getMonth()\n {\n return Month.get();\n }", "public String asMonth() {\n \treturn new SimpleDateFormat(\"MM\").format(expiredAfter);\n }", "public static int getMonthFromTimestamp(long unixtime){\n \tCalendar c = Calendar.getInstance();\n \tc.setTimeInMillis(unixtime);\n \treturn (1 + c.get(Calendar.MONTH));\n }", "public String getMonth() {\n return month;\n }", "public int lengthOfMonth() {\n\n return CALSYS.getLengthOfMonth(CopticEra.ANNO_MARTYRUM, this.cyear, this.cmonth);\n\n }", "public int getNumberOfDays()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1 || mn == 3 || mn == 5 || mn == 7 || mn == 8 || mn == 10 || mn == 12)\r\n {return 31;}\r\n if (mn == 4 || mn == 6 || mn == 9 || mn == 11)\r\n {return 30;}\r\n else\r\n {return 28;}\r\n }", "public static int getMonthNumber(String monthName) {\r\n switch (monthName) {\r\n case \"Januar\": return 1;\r\n case \"Februar\": return 2;\r\n case \"Mars\": return 3;\r\n case \"April\": return 4;\r\n case \"Mai\": return 5;\r\n case \"Juni\": return 6;\r\n case \"Juli\": return 7;\r\n case \"August\": return 8;\r\n case \"September\": return 9;\r\n case \"Oktober\": return 10;\r\n case \"November\": return 11;\r\n case \"Desember\": return 12;\r\n default: return 0;\r\n }\r\n }", "public int getDayOfMonth() {\n\n return this.cdom;\n\n }", "public byte getMonth() {\r\n return month;\r\n }", "public int getMonths() {\n return this.months;\n }", "public byte getMonth() {\n return month;\n }", "public byte getMonth() {\n return month;\n }", "private static int numMonths(int year) {\n \tint mnths = 1;\n \t\n \tif(year > 0) {\n \t\tmnths = year * 12;\n \t}\n \t\n \treturn mnths;\n }", "public int getMonthOfYear() {\n return _calendar.get(Calendar.MONTH) + 1;\n }", "public byte getMonth() {\n return month;\n }", "public byte getMonth() {\n return month;\n }", "public byte getMonth() {\n return month;\n }", "public int getDayOfMonth() {\n return _calendar.get(Calendar.DAY_OF_MONTH);\n }", "public String numToMonth(int m)\n {\n return monthsArray[m-1];\n }", "public static final int daysInMonth(int mm, int yyyy )\n {\n if ( mm != 2 ) return usual_DaysPerMonthTable[mm-1];\n else return isLeap(yyyy) ? 29 : 28;\n }", "public int intValue()\n {\n return this.month;\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 int monthStringToNum (String month){\n int mese = 0;\n switch (month){\n case \"Gennaio\":\n mese = 0;\n break;\n case \"Febbraio\":\n mese = 1;\n break;\n case \"Marzo\":\n mese = 2;\n break;\n case \"Aprile\":\n mese = 3;\n break;\n case \"Maggio\":\n mese = 4;\n break;\n case \"Giugno\":\n mese = 5;\n break;\n case \"Luglio\":\n mese = 6;\n break;\n case \"Agosto\":\n mese = 7;\n break;\n case \"Settembre\":\n mese = 8;\n break;\n case \"Ottobre\":\n mese = 9;\n break;\n case \"Novembre\":\n mese = 10;\n break;\n case \"Dicembre\":\n mese = 11;\n break;\n }\n return mese;\n }", "public int getDate(String month)\n\t{\n\t\tint a[] = {1,2,3};\n\t\t//17 Feb 2011 00:00:00\n\t\t\n\t\t\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tmap.put(\"Jan\", 1);\n\t\tmap.put(\"Feb\", 2);\n\t\tmap.put(\"Mar\", 3);\n\t\tmap.put(\"Apr\", 4);\n\t\tmap.put(\"May\", 5);\n\t\tmap.put(\"Jun\", 6);\n\t\tmap.put(\"Jul\", 7);\n\t\tmap.put(\"Aug\", 8);\n\t\tmap.put(\"Sep\", 9);\n\t\tmap.put(\"Oct\", 10);\n\t\tmap.put(\"Nov\", 11);\n\t\tmap.put(\"Dec\", 12);\n\t\t\n\t\tint mon = (int) map.get(month);\n\t\treturn mon;\n\t}", "public String getMonth(int month) {\n\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t}", "public String getMonth()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"dd/MM\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "public int getDate() {\n\t\treturn date.getDayOfMonth();\n\t}", "public static int getCurrentMonth(int month) {\n month++;\n return month;\n }", "private int daysInMonth(int month)\r\n {\n \r\n \tif (month == 4 || month == 5 || month == 9 || month == 11)\r\n \t{\r\n \t\treturn 30;\r\n \t}\r\n \tif (month == 2)\r\n \t{\r\n \t\tif (leapYear(year))\r\n \t\t{\r\n \t\t\treturn 29;\r\n \t\t}\r\n \t\telse \r\n \t\t{\r\n \t\t\treturn 28;\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\treturn 31;\r\n \t}\r\n }", "public int getDayOfMonth(){\n\t\treturn dayOfMonth;\n\t}", "public String checkDateMonth(Date aDate){\n if (aDate.getMonth() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getMonth()+1);\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getMonth());\r\n \r\n }", "@Override\n public int getMonth() {\n return this.deadline.getMonth();\n }", "public CopticMonth getMonth() {\n\n return CopticMonth.valueOf(this.cmonth);\n\n }", "protected static final int days_in_month (boolean isLeapYear, int month)\n {\n return (isLeapYear\n ? days_in_month_in_leap_year[month]\n : days_in_month_in_ordinary_year[month]);\n }", "private String getMonthForInt(int number) {\n int num = number - 1;\n String month = \"Wrong number\";\n String[] months = dfs.getMonths();\n if (num >= 0 && num <= 11) {\n month = months[num];\n } else {\n throw new IllegalArgumentException(\"There is no month with number: \" + number);\n }\n return month;\n }", "public String getMonth() {\n return month.getText();\n }", "public String getMonth(int month) {\n\t\t\t\treturn new DateFormatSymbols().getMonths()[month];\n\t\t\t}", "static int getMonth(byte[] bytes) {\n return readBits(bytes, MONTH_POS, MONTH_BITS);\n }", "public int[] GetDateMD(){\n\t\tint[] i = new int[2];\n\t\ti[0] = this.date.get(Calendar.MONTH);\n\t\ti[1] = this.date.get(Calendar.DAY_OF_MONTH);\n\t\treturn i;\n\t}", "int calMonthDay(int m,int y){//calMonthDay(month,year)\n int x=0,c;\n for(c = 1; c < m; c++) {// Jan to less than the month 'm' as 'm' we are not taking the the whole days of that month\n if(c == 2) {//if Feb\n if(y%4 == 0)//checks if year is leap or not\n x += 29;\n else\n x += 28;\n }\n else\n x += mon.get(c-1);\n }\n return(x);\n }", "public int getLastMonthOfYear (int year)\n {\n return 12;\n }", "public final native int getUTCMonth() /*-{\n return this.getUTCMonth();\n }-*/;", "private static int daysInMonth(int month, int year) {\n switch (month) {\n case 2:\n if (isLeapYear(year)) {\n return 29;\n } else {\n return 28;\n }\n case 4:\n case 6:\n case 9:\n case 11:\n return 30;\n default:\n return 31;\n }\n }", "public String getMonthOfYear() {\r\n return monthOfYear;\r\n }", "public static final int daysInMonth(int mm, boolean leap )\n {\n if ( mm != 2 ) return usual_DaysPerMonthTable[mm-1];\n else return leap ? 29 : 28;\n }", "private int daysInMonth (int Month, int Year) {\n int result = 0;\n for (int i = 0; i <=6; i++) {\n if (Month == months31[i]){\n result = 31;\n } else {\n // ergänzen um schaltjahr\n if (Month == 2){\n result = daysFebruary(Year);\n } else {\n result = 30;\n }\n }\n } return result;\n\n }", "public int getNumberOfDays(int the_month) {\n Boolean leapYear = isLeapYear(this.year);\n int num_of_days;\n // If February\n if (the_month == 2) {\n if (leapYear) {\n num_of_days = 29;\n }\n else {\n num_of_days = 28;\n }\n }\n // If April, June, September, or November\n else if (the_month == 4 || the_month == 6 || month == 9 || month == 11) {\n num_of_days = 30;\n }\n\n // If any other month\n else {\n num_of_days = 31;\n }\n\n return num_of_days;\n }", "public static String getMonth(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"January\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"February\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"March\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"April\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"June\";\n break;\n\n case Calendar.JULY:\n dayStr = \"July\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"August\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"September\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"October\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"November\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"December\";\n break;\n }\n\n return dayStr;\n }", "public static int getNumberOfDaysInMonth(int year, int month) {\n if(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12){\n return 31;//the months that have 31 days\n }\n else if(month == 4|| month == 6 || month == 9 || month == 11){\n return 30;//the months that have 30 days\n }\n else if(isLeapYear(year)){\n return 29;//February, leap Year\n }\n else{\n return 28;//Just February with no Leap Year\n } \n }", "public static Calendar monthOfYear(Date referenceDate, int month, TimeZone timeZone) {\t\t\r\n\t\tCalendar c1 = Calendar.getInstance(timeZone);\r\n\t\tc1.setTime(referenceDate);\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(timeZone);\r\n\t\tc2.clear();\r\n\t\t\r\n\t\t// Adjust for Java 0 based months.\r\n\t\tc2.set(c1.get(Calendar.YEAR), month - 1, 1);\r\n\t\t\r\n\t\treturn c2;\r\n\t}", "public Month getMonth(){\n\t return this.month;\n }", "public static int getRndMonthNumber() {\n return ThreadLocalRandom.current().nextInt(1, 12 + 1);\n }", "public static int getDaysInMonth(int month, boolean isLeapYear)\r\n\t{\r\n\t\tswitch(month)\r\n\t\t{\r\n\t\t\tcase 1:\r\n\t\t\tcase 3:\r\n\t\t\tcase 5:\r\n\t\t\tcase 7:\r\n\t\t\tcase 8:\r\n\t\t\tcase 10:\r\n\t\t\tcase 12:\r\n\t\t\t\treturn 31;\r\n\t\t\tcase 2:\r\n\t\t\t\tif(isLeapYear)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn 29;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn 28;\r\n\t\t\t\t}\r\n\t\t\tcase 4:\r\n\t\t\tcase 6:\r\n\t\t\tcase 9:\r\n\t\t\tcase 11:\r\n\t\t\t\treturn 30;\r\n\t\t}\r\n\t\t//shouldnt reach this point\r\n\t\treturn -1;\r\n\t}", "public Month () {\n monthNumber = 1;\n }", "public int getNextMonth()\n\t{\n\t\tm_calendar.set(Calendar.MONTH, getMonthInteger());\n\t\t\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\t\t\n\t\treturn getMonthInteger();\n\t\n\t}", "public final native double setMonth(int month) /*-{\n this.setMonth(month);\n return this.getTime();\n }-*/;", "public static int getDaysInMonth(int year, int month) {\n Calendar cal = Calendar.getInstance();\n cal.set(year, month, 1);\n\n return cal.getActualMaximum(Calendar.DAY_OF_MONTH);\n }", "public int getDay()\n\t{\n\t\treturn this.dayOfMonth;\n\t}", "public Number getDaysPerMonth()\r\n {\r\n return (m_daysPerMonth);\r\n }", "public double getPer_month(){\n\t\tdouble amount=this.num_of_commits/12;\n\t\treturn amount;\n\t}" ]
[ "0.7885915", "0.77433646", "0.7521998", "0.74926144", "0.74742055", "0.72518843", "0.7236595", "0.7218186", "0.719003", "0.71541566", "0.71502596", "0.71474016", "0.71472985", "0.70584387", "0.7055716", "0.703526", "0.703526", "0.7024168", "0.6958424", "0.6958424", "0.69448954", "0.6941913", "0.69404256", "0.69281447", "0.69129854", "0.6860836", "0.68204033", "0.6785055", "0.67618877", "0.67569757", "0.67515117", "0.6740011", "0.67327595", "0.67064106", "0.66730994", "0.6668994", "0.662091", "0.6612328", "0.6600782", "0.65838695", "0.65636206", "0.6554461", "0.6538883", "0.651854", "0.65138364", "0.6497344", "0.6496394", "0.64959997", "0.64950126", "0.6474137", "0.6469235", "0.6464484", "0.6452954", "0.6450951", "0.644701", "0.644701", "0.644701", "0.64398897", "0.6435845", "0.6428091", "0.63821113", "0.63710153", "0.63688517", "0.6367727", "0.63625205", "0.6347446", "0.63123465", "0.63087493", "0.63003796", "0.6284863", "0.6284367", "0.6261104", "0.62581605", "0.6241229", "0.61782587", "0.61728543", "0.6158244", "0.61425555", "0.61394495", "0.61104083", "0.6109759", "0.61040473", "0.60942096", "0.6053883", "0.60447663", "0.60407937", "0.6028951", "0.6027016", "0.60146433", "0.6010841", "0.6007791", "0.6002128", "0.5965518", "0.595665", "0.5945897", "0.5932561", "0.591729", "0.5910506", "0.5894663", "0.5893872" ]
0.7096558
13
Allows to change the number of the month of a date. post: The number of the month of a date is changed.
public void setMonth(int month) { this.month = month; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeMonth(int newMonth) {\n this.month = newMonth;\n }", "public void setMonth(int newMonth) {\n setMonth(newMonth, true);\n }", "@Override\n public void onMonthChanged(Date date) {\n }", "public void updateMonth(int value)\n {\n this.currentCalendar.add(Calendar.MONTH, value);\n }", "@Override\r\n public boolean setMonth(int month) {\r\n try {\r\n GregorianCalendar tempCalendar =(GregorianCalendar) calendar.clone();\r\n tempCalendar.setLenient(false); \r\n tempCalendar.set(Calendar.MONTH, month);\r\n tempCalendar.getTime();\r\n }\r\n catch (Exception e) {\r\n return false;\r\n }\r\n calendar.set(Calendar.MONTH, month); \r\n return true;\r\n }", "public void setMonth(int month)\n {\n this.month = month;\n }", "public boolean setMonth(int newMonth) {\n\t\tthis.month = newMonth;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\treturn true;\n\t}", "public void setMonth(int month) {\n if(month < 1 || month > 12) {\n this.month = 1;\n } else {\n this.month = month;\n }\n }", "public void setMonth(int month) {\n\t\tthis.date.setMonth(month);\n\t}", "public void setMonth(Integer month) {\r\n this.month = month;\r\n }", "public void setMonth(Integer month) {\n this.month = month;\n }", "public void setMonth(Integer month) {\n this.month = month;\n }", "public void setMonth(byte value) {\n this.month = value;\n }", "public final native double setMonth(int month) /*-{\n this.setMonth(month);\n return this.getTime();\n }-*/;", "public void setMonth(byte value) {\n this.month = value;\n }", "public void setMonth(byte value) {\n this.month = value;\n }", "public void setMonth(byte value) {\n this.month = value;\n }", "public void setMonth(byte value) {\r\n this.month = value;\r\n }", "public int getMonth() {\r\n // ersetzt deprecated Methode Date.getMonth()\r\n return this.month;\r\n }", "public void setMonth(byte value) {\n this.month = value;\n }", "public static final Function<Date,Date> setMonth(final int value) {\r\n return new Set(Calendar.MONTH, value);\r\n }", "public void setMonth(final int month) {\n this.month = month;\n }", "public DueDateBuilder setMonth(int month) {\n this.month = month;\n return this;\n }", "public int getMonthInt() {\n return month;\r\n }", "public String checkDateMonth(Date aDate){\n if (aDate.getMonth() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getMonth()+1);\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getMonth());\r\n \r\n }", "public static int getCurrentMonth(int month) {\n month++;\n return month;\n }", "public void setMonth(final int month) {\n\t\tthis.month = month;\n\t}", "private void monthChanged(int oldMonthValue, int oldYearValue) {\r\n updateControlsFromTable();\r\n\r\n // fire property change\r\n firePropertyChange(MONTH_PROPERTY, oldMonthValue, getMonth());\r\n int newYearValue = getYear();\r\n if (oldYearValue != newYearValue) {\r\n firePropertyChange(YEAR_PROPERTY, oldYearValue, newYearValue);\r\n }\r\n\r\n // clear selection when changing the month in view\r\n calendarTable.getSelectionModel().clearSelection();\r\n\r\n calendarTable.repaint();\r\n }", "@Override\n\tpublic int updateMonth(Month11DTO mon) {\n\t\treturn getSqlSession().update(\"monUpdate\", mon);\n\t}", "public boolean setMonth(int newMonth, boolean check) {\n\t\tthis.month = newMonth;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\tif (check) {\n\t\t\tdouble oldYear = this.year;\n\t\t\tdouble oldDay = this.day;\n\t\t\tIDate dt = swe_revjul(this.jd, this.calType); // -> erzeugt neues\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Datum\n\t\t\tthis.year = dt.year;\n\t\t\tthis.month = dt.month;\n\t\t\tthis.day = dt.day;\n\t\t\tthis.hour = dt.hour;\n\t\t\treturn (this.year == oldYear && this.month == newMonth && this.day == oldDay);\n\t\t}\n\t\treturn true;\n\t}", "public int getMonth(){\n\t\treturn month;\n\t}", "public int getMonth() {\n return month;\n }", "public void setMonth(int d)\n\t{\n\t\tm_calendar.set(Calendar.MONTH,d);\n\n\t}", "@JsonSetter(\"exp_month\")\r\n public void setExpMonth (int value) { \r\n this.expMonth = value;\r\n }", "public int getMonth()\n {\n return month;\n }", "public int getMonthInteger() \n\t{\n\t\t// 1 will be added here to be able to use this func alone to construct e.g adate\n\t\t// to get the name of the month from getMonth(), 1 must be deducted.\n\t\treturn 1+m_calendar.get(Calendar.MONTH);\n\n\t}", "public void setMonths(int months) {\n this.months = months;\n }", "public int getMonth() {\n\t\treturn month;\n\t}", "@FXML\n private void changeMonth() throws NoSuchMethodException\n {\n String selected = cmbMonth.getValue();\n for (int i = 0; i < months.size(); i++)\n {\n if (selected.equals(months.get(i)))\n {\n month = i;\n }\n }\n fillCalendar();\n setMonth();\n parentContr.updatePieChart();\n\n }", "public static int getMonthNumberByDate(Date val) {\n\t\tif (val != null) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"MM\");\n\t\t\treturn parseInt(format.format(val));\n\t\t} else {\n\n\t\t\treturn 0;\n\n\t\t}\n\t}", "public int getMonth() {\n return this.month;\n }", "public int getMonth() {\n return this.month;\n }", "public int getMonth() {\n\t\treturn date.getMonthValue();\n\t}", "public Month () {\n monthNumber = 1;\n }", "public int getMonthDate()\n\t{\n\t\tif (m_nType == AT_MONTH_DATE)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}", "public void setMonth(int month) throws InvalidDateException {\r\n\t\tif (month <= 12 & month >= 1) {\r\n\t\t\tthis.month = month;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic month for the date (between 1 and 12) !\");\r\n\t\t}\r\n\t}", "public void addMonth(int amount) {\r\n int oldValue = getMonth();\r\n int oldYearValue = getYear();\r\n calendarTable.getCalendarModel().addMonth(amount);\r\n monthChanged(oldValue, oldYearValue);\r\n }", "public void setMonth(java.lang.String r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: gov.nist.javax.sip.header.SIPDate.setMonth(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setMonth(java.lang.String):void\");\n }", "public int getMonth() {\n\t\treturn month;\n\t}", "private void monthFormat() {\n\t\ttry {\n\t\t\tString currentMonth = monthFormat.format(new Date()); //Get current month\n\t\t\tstartDate = monthFormat.parse(currentMonth); //Parse to first of the month\n\t\t\tString[] splitCurrent = currentMonth.split(\"-\");\n\t\t\tint month = Integer.parseInt(splitCurrent[0]) + 1; //Increase the month\n\t\t\tif (month == 13) { //If moving to next year\n\t\t\t\tint year = Integer.parseInt(splitCurrent[1]) + 1;\n\t\t\t\tendDate = monthFormat.parse(\"01-\" + year);\n\t\t\t} else {\n\t\t\t\tendDate = monthFormat.parse(month + \"-\" + splitCurrent[1]);\n\t\t\t}\n\t\t\t//Create SQL times\n\t\t\tstartDateSQL = new java.sql.Date(startDate.getTime());\n\t\t\tendDateSQL = new java.sql.Date(endDate.getTime());\n\t\t\tmonthString = new SimpleDateFormat(\"MMMM\").format(startDate);\n\t\t} catch (ParseException e) {\n\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to parse dates. Monthly leaderboard disabled.\");\n\t\t}\n\t}", "public final native double setMonth(int month, int dayOfMonth) /*-{\n this.setMonth(month, dayOfMonth);\n return this.getTime();\n }-*/;", "private void adjustDayInMonthIfNeeded(int month, int year) {\n int day = mCurrentDate.get(Calendar.DAY_OF_MONTH);\n int daysInMonth = getDaysInMonth(month, year);\n if (day > daysInMonth) {\n mCurrentDate.set(Calendar.DAY_OF_MONTH, daysInMonth);\n }\n }", "public boolean setMonth(int value) {\r\n if (!FormatUtils.uint8RangeCheck(value)) {\r\n return false;\r\n }\r\n mMonth = FormatUtils.intToUint8(value);\r\n updateGattCharacteristic();\r\n return true;\r\n }", "public Integer getMonth() {\r\n return month;\r\n }", "protected void setMonthDisplayed(MonthAdapter.CalendarDay date) {\n mCurrentMonthDisplayed = date.month;\n }", "public int getMonth() {\r\n\t\treturn (this.month);\r\n\t}", "public void setMonths(String months) {\n this.months = parseMonths(months);\n }", "private int checkMonth(int testMonth) {\n\t\tif (testMonth > 0 && testMonth <= 12) // validate month\n\t\t\treturn testMonth;\n\t\telse // month is invalid\n\t\t\tthrow new IllegalArgumentException(\"month must be 1-12\");\n\t}", "public void increaseDay(){\n leapyear(year); //Call leapyear on year to check for leap year\r\n day++; //Increment day\r\n if(day > days[month-1]){ //If day reaches higher than the month's day\r\n day = 1; //Set day to zero\r\n month++; //Increment month\r\n }\r\n if(month > 12){ //If month reaches greater than 12\r\n year++; //Increment year\r\n month = 1; //Set month to 1\r\n }\r\n}", "public Date addMonths(int m) {\r\n if (m < 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Month should not be the negative value!\");\r\n\t\t}\r\n\r\n\r\n\t\tint newMonth = (month + (m % 12)) > 12 ? ((month + (m % 12)) % 12) : month\r\n\t\t\t\t+ (m % 12);\r\n\t\tint newYear = (month + (m % 12)) > 12 ? year + (m / 12) + 1 : year\r\n\t\t\t\t+ (m / 12);\r\n int newDay = 0;\r\n // IF the new month has less total days in it than the starting month\r\n // and the date being added to is the last day of the month, adjust\r\n // and make newDay correct with its corresponding month.\r\n \r\n // IF not leap year and not Feb. make newDay correct.\r\n if (day > DAYS[newMonth] && (newMonth != 2)) {\r\n newDay = (DAYS[newMonth]);\r\n //System.out.println(\"1\");\r\n } \r\n \r\n // IF not leap year but not Feb. make newDay 28. (This is usually the case for Feb.)\r\n else if ((day > DAYS[newMonth]) && (isLeapYear(newYear) == false) && (newMonth == 2)){\r\n newDay = (DAYS[newMonth] - 1);\r\n }\r\n \r\n // IF leap year and is Feb. make newDay 29.\r\n else if ((day > DAYS[newMonth]) && isLeapMonth(newMonth, newYear) == true){\r\n newDay = DAYS[newMonth];\r\n }\r\n\r\n // if day is not gretaer than the last day of the new month, make no change.\r\n else {\r\n newDay = day;\r\n } \r\n\t\treturn (new Date(newMonth, newDay, newYear));\r\n\t}", "public void setSMonth(int m)\n\t{\n\t\tsmonth = getMonthAdapter().getPosition(Integer.toString(m));\n\t}", "public static Date setToMonthAgo(Date date) {\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.MONTH, -1);\n\t\treturn cal.getTime();\t\t\t\n\t}", "public void setMonth(String month) {\r\n this.month = month;\r\n }", "public abstract void monthlyProcess();", "public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}", "public int getMonthValue(){\n\t\treturn monthValue;\n\t}", "public void updateChangedDate(int year, int month, int day);", "public Integer getMonth() {\n return month;\n }", "public Integer getMonth() {\n return month;\n }", "int getExpMonth(String bookingRef);", "public void decreaseDay(){\n leapyear(year); //Call leapyear on year to check for leap year\r\n day--; //Decrement day\r\n if(day == 0){ //If day reaches lower than the month's day\r\n month--; //Decrement month\r\n\r\n\r\n if(month == 0){ //If month reaches zero\r\n month = 12; //Set month to 12 \r\n year--; //Decrement year\r\n }\r\n day = days[month-1]; //Set day to the previous month's value\r\n\r\n } \r\n\r\n }", "void updateChangedDate(int year, int month, int day);", "public void setMonths(int[] months) {\n if (months == null)\n months = new int[] {};\n this.months = months;\n }", "public void subtractMonth(int month) {\n if (month < 0) month = Math.abs(month);\n\n while (month != 0) {\n month--;\n this.subtractSingleMonth();\n }\n }", "public static int getCurrentMonth()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmView.previousMonth();\n\t\t\t\tc.add(Calendar.MONTH, -1);\n\t\t\t\tmonthlyview_month.setText(DateFormat.format(\"d MMMM yyyy\", c));\n\t\t\t\t\t}", "public int getDayOfMonth();", "public String numToMonth(int m)\n {\n return monthsArray[m-1];\n }", "public static int numDaysInMonth(int month){\r\n switch (month) {\r\n case 1:\r\n case 3:\r\n case 5:\r\n case 7:\r\n case 9:\r\n case 11:\r\n return 31;\r\n case 2:\r\n return 29;\r\n\r\n default:\r\n return 30\r\n }\r\n}", "public void setDate(int month, int day) {\r\n this.month = month;\r\n this.day = day;\r\n }", "public abstract int daysInMonth(DMYcount DMYcount);", "public int getNextMonth()\n\t{\n\t\tm_calendar.set(Calendar.MONTH, getMonthInteger());\n\t\t\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\t\t\n\t\treturn getMonthInteger();\n\t\n\t}", "public String asMonth() {\n \treturn new SimpleDateFormat(\"MM\").format(expiredAfter);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmView.nextMonth();\n\t\t\t\tc.add(Calendar.MONTH, 1);\n\t\t\t\tmonthlyview_month.setText(DateFormat.format(\"d MMMM yyyy\", c));\n\n\t\t\t}", "public Month(int month, Day startDay, boolean isLeapYear) {\n switch (month) {\n case 0:\n case 2:\n case 4:\n case 6:\n case 7:\n case 10:\n case 11:\n this.days = 31;\n break;\n case 3:\n case 5:\n case 8:\n case 9:\n this.days = 30;\n break;\n case 1:\n if (isLeapYear) {\n this.days = 29;\n } else {\n this.days = 28;\n }\n break;\n }\n this.start = startDay.getValue();\n }", "void testDateSetMonth(java.util.Date date, boolean validate) {\n if (date instanceof java.sql.Time) { return; } // java.sql.Time throws IllegalArgumentException in setMonth().\n \n if (validate) {\n assertEqualDate(createDate(\"Apr 20, 2006\"), date);\n } else {\n synchronized (date) {\n date.setMonth(3);\n }\n }\n }", "@Override\n public void onMonthChanged(CalendarDayModel dayModel) {\n }", "public byte getMonth() {\n return month;\n }", "public int getMonth() {\r\n return FormatUtils.uint8ToInt(mMonth);\r\n }", "public final native double setUTCMonth(int month) /*-{\n this.setUTCMonth(month);\n return this.getTime();\n }-*/;", "public static Calendar monthOfYear(Date referenceDate, int month, TimeZone timeZone) {\t\t\r\n\t\tCalendar c1 = Calendar.getInstance(timeZone);\r\n\t\tc1.setTime(referenceDate);\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(timeZone);\r\n\t\tc2.clear();\r\n\t\t\r\n\t\t// Adjust for Java 0 based months.\r\n\t\tc2.set(c1.get(Calendar.YEAR), month - 1, 1);\r\n\t\t\r\n\t\treturn c2;\r\n\t}", "public static void main(String[] args) {\n System.out.println(DateUtils.addMonths(new Date(), 1).getMonth());\n System.out.println(Calendar.getInstance().getDisplayName((Calendar.MONTH)+1, Calendar.LONG, Locale.getDefault()));\n System.out.println(LocalDate.now().plusMonths(1).getMonth());\n\t}", "@Override\n public int getMonth() {\n return this.deadline.getMonth();\n }", "public void setDayOfMonth(int d)\n\t{\n\t\tm_calendar.set(Calendar.DAY_OF_MONTH,d);\n\n\t}", "public void setDate(int month, int day) {\r\n\t\tString dayString = \"\";\r\n\t\tif(day < 10)\r\n\t\t{\r\n\t\t\tfor(int i = 0; i < 10; i++)\r\n\t\t\t{\r\n\t\t\t\tif(day == i)\r\n\t\t\t\t{\r\n\t\t\t\t\tdayString = \"0\" + i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.date = month + \"-\" + dayString;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.date = month + \"-\" + day;\r\n\t\t}\r\n\t}", "public double getPer_month(){\n\t\tdouble amount=this.num_of_commits/12;\n\t\treturn amount;\n\t}", "public void setDate(int year, int month, int dayOfMonth)\n {\n this.date = new GregorianCalendar(year, month-1, dayOfMonth);\n }", "public byte getMonth() {\n return month;\n }", "public byte getMonth() {\n return month;\n }", "public byte getMonth() {\n return month;\n }" ]
[ "0.750042", "0.7158422", "0.6897947", "0.6856341", "0.6637831", "0.6626816", "0.6592572", "0.6584638", "0.6547272", "0.6500699", "0.6450485", "0.6450485", "0.64220786", "0.6390702", "0.6388572", "0.6388572", "0.6388572", "0.63308126", "0.63283104", "0.6324287", "0.63239855", "0.63150567", "0.62860715", "0.6281343", "0.6279037", "0.62546825", "0.6227295", "0.622552", "0.6183701", "0.6161072", "0.6145811", "0.6144925", "0.6144686", "0.6138112", "0.61277336", "0.61116093", "0.60737735", "0.6073239", "0.60512793", "0.6043869", "0.6034822", "0.6034822", "0.60083336", "0.5993435", "0.5989187", "0.5969948", "0.59676254", "0.5962126", "0.5942385", "0.5942324", "0.59384215", "0.593762", "0.59335864", "0.5921074", "0.59207904", "0.5914482", "0.5898646", "0.5894547", "0.58862513", "0.5879463", "0.587164", "0.58629054", "0.5849692", "0.5846283", "0.5845165", "0.58398116", "0.5839793", "0.5834738", "0.5834738", "0.5828857", "0.581595", "0.5806492", "0.58027416", "0.57996345", "0.5785999", "0.5784266", "0.57825404", "0.57804894", "0.57654536", "0.5764832", "0.5755183", "0.57407004", "0.5730196", "0.5715742", "0.57124996", "0.56996685", "0.56900024", "0.56876206", "0.56841797", "0.5681327", "0.5680301", "0.5678759", "0.5676799", "0.5668075", "0.5657075", "0.5654286", "0.56539696", "0.5649804", "0.5649804", "0.5649804" ]
0.6286314
22
Allows to get the number of the year of a date.
public int getYear() { return year; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Integer getYear(Date date){\r\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy\"); //EX 2016,02\r\n return new Integer(df.format(date));\r\n }", "public static int getYearByDate(Date val) {\n\t\tif (val != null) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy\");\n\t\t\treturn parseInt(format.format(val));\n\t\t} else {\n\n\t\t\treturn 0;\n\n\t\t}\n\t}", "private String getYear(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tInteger yearAsInt = localDate.getYear();\n\n\t\treturn String.valueOf(yearAsInt);\n\t}", "int getYear();", "public int getYear() {\n return DateUtil.YearFromString(rel);\n }", "public int getYear() {\r\n return FormatUtils.uint16ToInt(mYear);\r\n }", "private static final int getYear(long fixedDate) {\n\tlong d0;\n\tint d1, d2, d3;\n\tint n400, n100, n4, n1;\n\tint year;\n\n\tif (fixedDate >= 0) {\n\t d0 = fixedDate - 1;\n\t n400 = (int)(d0 / 146097);\n\t d1 = (int)(d0 % 146097);\n\t n100 = d1 / 36524;\n\t d2 = d1 % 36524;\n\t n4 = d2 / 1461;\n\t d3 = d2 % 1461;\n\t n1 = d3 / 365;\n\t} else {\n\t d0 = fixedDate - 1;\n\t n400 = (int)floorDivide(d0, 146097L);\n\t d1 = (int)mod(d0, 146097L);\n\t n100 = floorDivide(d1, 36524);\n\t d2 = mod(d1, 36524);\n\t n4 = floorDivide(d2, 1461);\n\t d3 = mod(d2, 1461);\n\t n1 = floorDivide(d3, 365);\n\t}\n\tyear = 400 * n400 + 100 * n100 + 4 * n4 + n1;\n\tif (!(n100 == 4 || n1 == 4)) {\n\t ++year;\n\t}\n\treturn year;\n }", "public int getYear() {\r\n\t\treturn (this.year);\r\n\t}", "public int getYear() \n\t{\n\t\treturn m_calendar.get(Calendar.YEAR);\n\n\t}", "public int getYear() {\r\n\t\treturn year;\r\n\t}", "Integer getTenYear();", "public int getYear() \n\t{\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year; \n\t}", "public int getYear() {\n return year;\n }", "public int getYear() {\r\n return year;\r\n }", "private int getPublishingYear(String date) {\n String[] splitArray = date.split(\"-\");\n\n return Integer.parseInt(splitArray[splitArray.length - 1]);\n }", "public int getDocumentYear();", "public int getYear() {\r\n return year;\r\n }", "public static int getTodaysYear() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.year;\t\r\n\t\t\r\n\t}", "public int getYear() {\n\t\treturn this.year;\n\t}", "public Integer getYear() {\r\n return year;\r\n }", "public Integer getYear() {\r\n return year;\r\n }", "public int getYear(){\r\n\t\treturn year;\r\n\t}", "public int getYear() {\n\t return year;\n\t}", "public Integer getYear() {\n return year;\n }", "public Integer getYear() {\n return year;\n }", "public Integer getYear() {\n return year;\n }", "public final int getYYYY()\n {\n return yyyy;\n }", "public int getYear() {\n return year;\n }", "public int getYear(){\n\t\treturn year; \n\t}", "public int getCalendarYear() {\r\n\t\treturn calendar.getCalendarYear();\r\n\t}", "public int getYear(){\n\t\treturn year;\n\t}", "int getYears();", "public int getYear() {\n\treturn year;\n }", "public int getYear() {\n return endDate.getYear();\n }", "public int getYear()\n\t{\n\t\treturn m_year;\n\t}", "public int getYear()\n {\n return yr;\n }", "private static int returnsCurrentYear() {\n\t\treturn Calendar.getInstance().get(Calendar.YEAR);\n\t}", "private int getYear(TemporalAccessor partialValue) {\n int year = ISearchObjectConstants.DEFAULT_NOT_FOUND_YEAR;\r\n try {\r\n /*\r\n * It is not entirely clear which of the following fields should be used when extracting the year\r\n * from this TemporalAccessor object: ChronoField.YEAR_OF_ERA or ChronoField.YEAR\r\n * Currently in Java 8 YEAR_OF_ERA works. Previously on java 7 it seemed to be YEAR\r\n * but I'm not entirely sure.\r\n */\r\n year = partialValue.get(ChronoField.YEAR_OF_ERA);\r\n } catch (DateTimeException e) {\r\n // these errors may be common do not print them\r\n }\r\n return year;\r\n }", "public int getYear() {\r\n return this.year;\r\n }", "public int getYear() {\n return year;\n }", "public int getYear()\n {\n return year;\n }", "@Override\n\tpublic int getYear() {\n\t\treturn year;\n\t}", "public final int getYear() {\n return yearMonthProperty().get().getYear();\n }", "public String asYear() {\n \treturn new SimpleDateFormat(\"yyyy\").format(expiredAfter);\n }", "public static int getCurrentYear()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.YEAR);\n\t}", "public int getYear () {\n return year;\n }", "private String getYear(String date) {\n String year = \"N/A\";\n if (date != null && !date.equals(\"\")) {\n SimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date movieDate = null;\n try {\n movieDate = parser.parse(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Calendar cal = Calendar.getInstance();\n cal.setTime(movieDate);\n year = \"\" + cal.get(Calendar.YEAR);\n }\n return year;\n }", "public String getYearNumber() {\n return yearNumber.get();\n }", "public double getYear() {\n return year;\n }", "public int getYear() { return year; }", "public int getYear() { return year; }", "public short getYear() {\n return year;\n }", "public int lengthOfYear() {\n\n return this.isLeapYear() ? 366 : 365;\n\n }", "public int getYear() {\n\n return this.cyear;\n\n }", "public static int getYearFromString(String date) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.UK);\r\n\t\t\tDateTime dt = new DateTime((Date) sdf.parse(date));\r\n\t\t\treturn dt.getYear();\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn -1;\r\n\t\t}\t\r\n\t\t\r\n\t}", "public String getYear() {\n\t\treturn year;\r\n\t}", "private static int getDaysInYear(final int year) {\n return LocalDate.ofYearDay(year, 1).lengthOfYear();\n }", "@Override\n\tpublic int getYear() {\n\t\treturn _esfShooterAffiliationChrono.getYear();\n\t}", "public int getNumberOfYears() {\n return numberOfYears;\n }", "public short getYear() {\r\n return year;\r\n }", "public int getLowerYear()\r\n {\r\n return getInt(LowerYear_, 0);\r\n }", "public int getStartingYear()\n {\n return 2013;\n }", "public String getYear() {\n\t\treturn year;\n\t}", "public String getYear() {\n\t\treturn year;\n\t}", "public int getDocumentYear() {\n\t\treturn _tempNoTiceShipMessage.getDocumentYear();\n\t}", "public int getYear() {\n\treturn year;\n}", "public final int getISOYear()\n {\n\n final int W = getISOWeekNumber();\n\n if ((W > 50) && (getMonth() == 1)) {\n return (getYear() - 1);\n }\n else if ((W < 10) && (getMonth() == 12)) {\n return (getYear() + 1);\n }\n else {\n return getYear();\n }\n }", "protected static int getYear(String dateTime) {\n int year = Integer.parseInt(dateTime.substring(1, 3));\n return year >= 90 && year <= 99 ? 1900 + year : 2000 + year;\n }", "public int getYearPublished() {\r\n int yearPublished = 0;\r\n\r\n yearPublished = datePublished.getYear();\r\n return yearPublished;\r\n }", "Integer getTHunYear();", "public String getYear() {\n return year;\n }", "public String getYear() {\n return year;\n }", "public short getYear() {\n return year;\n }", "public short getYear() {\n return year;\n }", "public short getYear() {\n return year;\n }", "public short getYear() {\n return year;\n }", "private static Date getYearDate(int year) {\n Calendar calendar = Calendar.getInstance();\n calendar.clear();\n calendar.set(Calendar.YEAR, year);\n return calendar.getTime();\n }", "public String getYear()\r\n {\r\n return year;\r\n }", "public IntColumn getYear() {\n return delegate.getColumn(\"year\", DelegatingIntColumn::new);\n }", "public short getYear() {\n return year;\n }", "public static NodeValue dtGetYear(NodeValue nv) {\n if ( nv.isDateTime() || nv.isDate() || nv.isGYear() || nv.isGYearMonth() ) {\n DateTimeStruct dts = parseAnyDT(nv) ;\n if ( dts.neg != null )\n return NodeValue.makeNode(\"-\"+dts.year, XSDDatatype.XSDinteger) ;\n return NodeValue.makeNode(dts.year, XSDDatatype.XSDinteger) ;\n }\n throw new ExprEvalException(\"Not a year datatype\") ;\n }", "public String getYear()\n {\n return year;\n }", "public int getStartYear() {\n\t\treturn startYear;\n\t}", "public int getDayOfYear() {\n\n return this.get(DAY_OF_YEAR).intValue();\n\n }", "public int getStartYear()\n\t{\n\t\treturn this.mStartYear;\n\t}", "public Object getYearInt() {\n\t\treturn null;\n\t}", "public static int getYearFromTimestamp(long unixtime){\n \tCalendar c = Calendar.getInstance();\n \tc.setTimeInMillis(unixtime);\n \treturn c.get(Calendar.YEAR);\n }", "public int getStartYear()\n {\n return indicators[0].getYear();\n }", "public String getOnlyYear(String date, String pattern) {\r\n\t\tString year;\r\n\t\tDateTimeFormatter formatter = DateTimeFormat.forPattern(pattern);\r\n\t\tLocalDate localDate = formatter.parseLocalDate(date);\r\n\t\tyear = localDate.yearOfCentury().getAsText();\r\n\t\tif(year.length()==1) year = \"0\"+year;\r\n\t\treturn year;\r\n\t}", "public int getYears() {\r\n\t\treturn years;\r\n\t}", "@Override\n public int getYear() {\n return this.deadline.getYear();\n }", "Year createYear();", "public static int getDifferenceDateOnlyYear(Long val) {\n\n Long date_current = Calendar.getInstance().getTimeInMillis();\n Long years_difference = date_current - val;\n\n Calendar c = Calendar.getInstance();\n c.setTimeInMillis(years_difference);\n return c.get(Calendar.YEAR) - 1970;\n\n }", "public int getUpperYear()\r\n {\r\n return getInt(UpperYear_, 0);\r\n }", "private static int getDaysSinceNewYear() {\n\t\tGregorianCalendar now = new GregorianCalendar();\n\n\t\treturn now.get(GregorianCalendar.DAY_OF_YEAR);\n\t}", "public static int getYears(Date fechaNacimiento) {\n\n\t\tCalendar fechaActual = Calendar.getInstance();\n\t\tint hoyDia = fechaActual.get(Calendar.DAY_OF_YEAR);\n\n\t\tCalendar nacimiento = Calendar.getInstance();\n\n\t\tnacimiento.setTime(fechaNacimiento);\n\t\tint nacimientoDia = nacimiento.get(Calendar.DAY_OF_YEAR);\n\n\t\t// Todavía no ha cumplido los años\n\t\tif (nacimientoDia - hoyDia < 0)\n\t\t\treturn fechaActual.get(Calendar.YEAR)\n\t\t\t\t\t- nacimiento.get(Calendar.YEAR) - 1;\n\t\telse\n\t\t\t// Ya ha cumplido los años\n\t\t\treturn fechaActual.get(Calendar.YEAR)\n\t\t\t\t\t- nacimiento.get(Calendar.YEAR);\n\n\t}" ]
[ "0.8095071", "0.804312", "0.80366313", "0.7999429", "0.796354", "0.7772162", "0.77547365", "0.7710615", "0.7657734", "0.76456076", "0.763713", "0.7623165", "0.7600327", "0.7600327", "0.7600327", "0.7594946", "0.75658464", "0.75415415", "0.75412536", "0.7530933", "0.7526668", "0.75257236", "0.75229067", "0.7518541", "0.7518541", "0.7515066", "0.75035733", "0.7499892", "0.7499892", "0.7499892", "0.74953616", "0.74897975", "0.74878824", "0.74785876", "0.74762934", "0.74563307", "0.7455545", "0.7442497", "0.74401045", "0.74336064", "0.7417397", "0.7407617", "0.74045116", "0.73971796", "0.7380037", "0.7370655", "0.7368785", "0.7355177", "0.73521876", "0.7301135", "0.72494256", "0.7242515", "0.72369295", "0.72246087", "0.72246087", "0.7223037", "0.7222626", "0.72130865", "0.7208908", "0.7207536", "0.72052264", "0.7183292", "0.7181229", "0.7178395", "0.7170496", "0.71643937", "0.71621263", "0.71621263", "0.7148801", "0.7146084", "0.7144945", "0.71332866", "0.71278286", "0.711389", "0.7111464", "0.7111464", "0.710909", "0.70982075", "0.70982075", "0.70982075", "0.7093171", "0.7069997", "0.70605284", "0.7024757", "0.7024527", "0.7001783", "0.6998988", "0.6998137", "0.69882005", "0.6983358", "0.6982932", "0.6979249", "0.6941299", "0.693729", "0.69140315", "0.6904971", "0.69017684", "0.6901299", "0.689925", "0.68873703" ]
0.75348604
19
Allows to change the number of the year of a date. post: The number of the year of a date is changed.
public void setYear(int year) { this.year = year; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setYear(int value) {\r\n this.year = value;\r\n }", "public void setYear(int value) {\n\tthis.year = value;\n }", "public void setYear(int _year) { year = _year; }", "public void setYear (int yr) {\n year = yr;\n }", "public void addYear(){\n\t\tyearAdd++;\n\t}", "public void setYear(int y){\n\t\tyear = y ; \n\t}", "public void setYear(int year) {\n\t\tthis.date.setYear(year);\n\t}", "public boolean setYear(int newYear) {\n\t\tthis.year = newYear;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\treturn true;\n\t}", "int getYear();", "public void setYear(int year) {\r\n this.year = year;\r\n }", "public void setYear(int year)\n {\n this.year = year;\n }", "public void setDocumentYear(int documentYear);", "public void setYear(int year)\r\n\t{\r\n\t\tthis.year = year;\r\n\t}", "public void setYear(int year) {\n\tthis.year = year;\n}", "@Override\n\tpublic void setYear(int year) {\n\t\t_esfShooterAffiliationChrono.setYear(year);\n\t}", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public void setYear(int year) {\n this.year = year;\n }", "public void setOriginalReleaseYear(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "public void setPrevYear()\n\t{\n\t\tm_calendar.set(Calendar.YEAR,getYear()-1);\n\n\t}", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public boolean setYear(int newYear, boolean check) {\n\t\tthis.year = newYear;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\tif (check) {\n\t\t\tdouble oldMonth = this.month;\n\t\t\tdouble oldDay = this.day;\n\t\t\tIDate dt = swe_revjul(this.jd, this.calType); // -> erzeugt neues\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Datum\n\t\t\tthis.year = dt.year;\n\t\t\tthis.month = dt.month;\n\t\t\tthis.day = dt.day;\n\t\t\tthis.hour = dt.hour;\n\t\t\treturn (this.year == newYear && this.month == oldMonth && this.day == oldDay);\n\t\t}\n\t\treturn true;\n\t}", "public int getYear() {\r\n return year;\r\n }", "public void setYear(int year) \n\t{\n\t\tthis.year = year;\n\t}", "public int getYear(){\r\n\t\treturn year;\r\n\t}", "public void setYear(short value) {\n this.year = value;\n }", "Builder addCopyrightYear(Number value);", "@Override\n\tpublic void oneYearAgo(int year) {\n\n\t}", "public int getYear() {\r\n\t\treturn year;\r\n\t}", "public int getYear() {\n return year;\n }", "public int getYear() {\r\n return year;\r\n }", "public static final Function<Date,Date> setYear(final int value) {\r\n return new Set(Calendar.YEAR, value);\r\n }", "public void setYear(final int year) {\n\t\tthis.year = year;\n\t}", "private void yearChanged(int oldValue) {\r\n updateControlsFromTable();\r\n\r\n // fire property change\r\n firePropertyChange(YEAR_PROPERTY, oldValue, getYear());\r\n\r\n // clear selection when changing the month in view\r\n calendarTable.getSelectionModel().clearSelection();\r\n\r\n if (updateYearsOnChange) {\r\n updateYearMenu();\r\n }\r\n\r\n calendarTable.repaint();\r\n }", "public void setNextYear()\n\t{\n\t\tm_calendar.set(Calendar.YEAR,getYear()+1);\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public void setYear(short value) {\n this.year = value;\n }", "public int getYear() {\n\t return year;\n\t}", "public int getYear(){\n\t\treturn year; \n\t}", "public int getYear() { return year; }", "public int getYear() { return year; }", "public int getYear(){\n\t\treturn year;\n\t}", "public int getYear() {\n return DateUtil.YearFromString(rel);\n }", "public int getYear() {\n\treturn year;\n }", "@Override\n\tpublic int getYear() {\n\t\treturn year;\n\t}", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "Integer getTenYear();", "public int getYear() {\n return year;\n }", "public int getYear() {\n\t\treturn year; \n\t}", "public int getYear() {\n return year;\n }", "public void addYear(int amount) {\r\n int oldValue = getYear();\r\n calendarTable.getCalendarModel().addYear(amount);\r\n yearChanged(oldValue);\r\n }", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "Year createYear();", "public int getYear()\n {\n return year;\n }", "public Integer getYear() {\r\n return year;\r\n }", "public Integer getYear() {\r\n return year;\r\n }", "public int getYear() \n\t{\n\t\treturn year;\n\t}", "public static void moveToDateYear(Date date, int year) {\n final Calendar cal = toCalendar(date);\n moveToCalendarYear(cal, year);\n date.setTime(cal.getTimeInMillis());\n }", "private static Date getYearDate(int year) {\n Calendar calendar = Calendar.getInstance();\n calendar.clear();\n calendar.set(Calendar.YEAR, year);\n return calendar.getTime();\n }", "public void addYear(int year) {\n if (month < 0) {\n subtractYear(year);\n return;\n }\n\n this.year += year;\n }", "public void setYear(short value) {\r\n this.year = value;\r\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void addOriginalReleaseYear(java.lang.Integer value) {\r\n\t\tBase.add(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "public void setYear(int year) throws InvalidDateException {\r\n\t\tif (year <= 2100 & year >= 2000) {\r\n\t\t\tthis.year = year;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic year for the date (between 2000 and 2100) !\");\r\n\t\t}\r\n\t}", "public int getYear () {\n return year;\n }", "public int getYear() {\r\n return this.year;\r\n }", "public YearToCentury(int year) // defining method YearToCentury with int value year\r\n\t{\r\n\t\tthis.year = year; // value of year = this.year\r\n\t}", "public int getYear()\n {\n return yr;\n }", "public Integer getYear() {\n return year;\n }", "public Integer getYear() {\n return year;\n }", "public Integer getYear() {\n return year;\n }", "public void setYear(int Year) {\n\t this.year= Year;\n\t}", "public int getYear() {\r\n\t\treturn (this.year);\r\n\t}", "int getYears();", "public int getDocumentYear();", "public void setYear(int year){\r\n\t\ttry{\r\n\t\t\tif(year>=1900)\r\n\t\t\tthis.year = year;\r\n\t\t\telse\r\n\t\t\t\tthrow new cardYearException();\r\n\t\t}catch(cardYearException ex){\r\n\t\t\tSystem.out.println(\"Baseball Cards weren't invented \"\r\n\t\t\t\t\t+ \"before 1900!\");\r\n\t\t\tSystem.out.print(\"Please enter a valid year: \");\r\n\t\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\tint retry = input.nextInt();\r\n\t\t\t\tsetYear(retry);\r\n\t\t}\r\n\t}", "public int getYear() {\n\t\treturn this.year;\n\t}", "@Override\n\tpublic void setYear(int year) throws RARException {\n\t\tthis.year = year;\n\t}", "public short getYear() {\n return year;\n }", "public void setYear(String year)\r\n {\r\n this.year = year; \r\n }", "public void setYear(int r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: null in method: gov.nist.javax.sip.header.SIPDate.setYear(int):void, dex: in method: gov.nist.javax.sip.header.SIPDate.setYear(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setYear(int):void\");\n }", "public static int getYearByDate(Date val) {\n\t\tif (val != null) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy\");\n\t\t\treturn parseInt(format.format(val));\n\t\t} else {\n\n\t\t\treturn 0;\n\n\t\t}\n\t}", "public short getYear() {\n return year;\n }", "public void increaseYearsWorked() {\n ++yearsWorked;\n }", "public double getYear() {\n return year;\n }", "public void setRecordingYear(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), RECORDINGYEAR, value);\r\n\t}", "public int getYear() {\n\treturn year;\n}", "public short getYear() {\n return year;\n }", "public short getYear() {\n return year;\n }", "public short getYear() {\n return year;\n }", "@Override\n public int getYear() {\n return this.deadline.getYear();\n }", "private static String getNewYearAsString() {\n\t\t// calculate the number of days since new years\n\t\tGregorianCalendar now = new GregorianCalendar();\n\t\t\n\t\t// create a date and string representing the new year\n\t\tGregorianCalendar newYearsDay = new GregorianCalendar( now.get(GregorianCalendar.YEAR), 0, 1);\n\t\tDateFormat fmt = new SimpleDateFormat(\"MMM dd, yyyy \");\n\t\n\t\treturn fmt.format( newYearsDay.getTime() );\n\t}", "public int getStartingYear()\n {\n return 2013;\n }" ]
[ "0.75621736", "0.75581765", "0.754759", "0.7385298", "0.7283381", "0.72722745", "0.7236689", "0.7193484", "0.71896255", "0.70948637", "0.7078723", "0.70619386", "0.7058398", "0.7047256", "0.70384294", "0.7036741", "0.7036741", "0.70273536", "0.7019502", "0.6987176", "0.6979516", "0.6979516", "0.6979516", "0.69775105", "0.69627076", "0.69549155", "0.69529015", "0.69411933", "0.6938585", "0.6934932", "0.69220734", "0.69184124", "0.6917909", "0.69164455", "0.69132644", "0.6901086", "0.6892339", "0.68813455", "0.6880359", "0.6876528", "0.6874676", "0.68706876", "0.68706876", "0.6866404", "0.68623745", "0.6854525", "0.6853297", "0.68523544", "0.68523544", "0.68523544", "0.6846057", "0.68391687", "0.6837953", "0.68329895", "0.6831369", "0.682639", "0.682639", "0.682639", "0.6819061", "0.68014294", "0.67981476", "0.67981476", "0.6798058", "0.67968565", "0.67944205", "0.67870677", "0.6785747", "0.6784132", "0.6776511", "0.6773495", "0.67651665", "0.67459464", "0.67456603", "0.674037", "0.67380404", "0.67380404", "0.67380404", "0.6722817", "0.6717782", "0.67169106", "0.6684701", "0.6684196", "0.66818565", "0.6669876", "0.6661559", "0.6659569", "0.6655382", "0.6654916", "0.66518724", "0.6634", "0.6633435", "0.66315544", "0.66213375", "0.6620242", "0.6620242", "0.6620242", "0.6613972", "0.6608124", "0.6595513" ]
0.69087857
35
Allows to get a date as a String in the format: DD/MM/YY.
public String convertDateToString(){ String aDate = ""; aDate += Integer.toString(day); aDate += "/"; aDate += Integer.toString(month); aDate += "/"; aDate += Integer.toString(year); return aDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String dateToString(Date date){\r\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n return df.format(date);\r\n }", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }", "public String dateToString() {\n\t\treturn new String(year + \"/\"\n\t\t\t\t+ month + \"/\"\n\t\t\t\t+ day);\n }", "public String getDateString() {\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH); // month is stored from 0-11 so adjust +1 for final display\n int day_of_month = date.get(Calendar.DAY_OF_MONTH);\n return String.valueOf(month + 1) + '/' + String.valueOf(day_of_month) + '/' + year;\n }", "public static String getDate() {\n\t\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"ddMMYYYY\");\n\t\tString strDate = formatter.format(date);\n\t\treturn strDate;\n\t}", "public String getUserDateString() {\n\t\tString[] tmpArr = this.getUserDate();\n\t\tString year = tmpArr[0];\n\t\tString month = tmpArr[1];\n\t\tString day = tmpArr[2];\n\t\tString out = year + \"/\" + month + \"/\" + day;\n\t\treturn out;\n\t}", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\t\tDate date = formatter.parse(month + \"/\" + day + \"/\" + year);\n\n\t\t\treturn formatter.format(date);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public String getFormatedDate(Date date) {\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/mm/yyyy\");\r\n\t\treturn sdf.format(date);\r\n\t}", "public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }", "java.lang.String getDate();", "public String toString() {\n\treturn String.format(\"%d/%d/%d\", year, month, day);\t\r\n\t}", "public String toStringDateOfBirth() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\treturn dateofbirth.format(format);\n\t}", "java.lang.String getToDate();", "private String formatDate(Date date) {\n String resultDate;\n SimpleDateFormat dateFormat;\n dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n resultDate = dateFormat.format(date);\n return resultDate;\n }", "public static String dateToString(Date date){\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MMddyy\");\n\t\treturn formatter.format(date);\n\t}", "public String retornaData(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn df.format(calendar.getTime());\n\t}", "public static String getDate()\n {\n Date date = new Date();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n return dateFormat.format(date);\n }", "String getDate();", "String getDate();", "protected String getRentDateString() { return \"\" + dateFormat.format(this.rentDate); }", "public String getDateString(Date date) {\n Calendar cal = Calendar.getInstance();\n\n cal.setTime(date);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n return year + month + day;\n }", "public String getDateAsString(){\n\t\t//\tGet Date\n Date date = getDate();\n if(date != null)\n \treturn backFormat.format(date);\n\t\treturn null;\n\t}", "public String toString() {\n\t\treturn String.format(\"%d/%d/%d\", year, month, day);\n\t}", "private String getDate(int year, int month, int day) {\n return new StringBuilder().append(month).append(\"/\")\n .append(day).append(\"/\").append(year).toString();\n }", "public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n\r\n\t String date = simpleDateFormat.format(new Date());\r\n//\t System.out.println(date);\r\n\t \r\n//\t String s = df.format(date);\r\n//\t String result = s;\r\n//\t try {\r\n//\t date=df.parse(result);\r\n//\t } catch (ParseException e) {\r\n//\t // TODO Auto-generated catch block\r\n//\t e.printStackTrace();\r\n//\t }\r\n\t return date;\r\n\t }", "public String getDateString() {\n DateFormat format = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault());\n return format.format(mDate);\n }", "private static String convertToDDMMYYYY(Date date) {\n\t\tString returnStr = \"\";\n\t\ttry {\n\t\tDateFormat format1 = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\treturnStr = format1.format(date);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn returnStr;\n\t}", "public static String dateOnly() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "private String dateToString(Date datum)\r\n\t{\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd.MM.yyyy\");\r\n\t\tString dat = df.format(datum);\r\n\t\treturn dat;\r\n\t}", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "public static String getStrUtilDate(java.util.Date date){\n\t\tif(date==null)\n\t\t\treturn fechaNula();\n\t\tString strDate=\"\";\n\t\t\n\t\tif(getDia(date)<10)\n\t\t\tstrDate+=\"0\"+getDia(date);\n\t\telse\n\t\t\tstrDate+=getDia(date);\n\t\tif(getMes(date)<10)\n\t\t\tstrDate+=\"/\"+\"0\"+getMes(date);\n\t\telse\n\t\t\tstrDate+=\"/\"+getMes(date);\n\t\tstrDate+=\"/\"+getAnio(date);\n\t\treturn strDate;\n\t}", "private String dateToString(Date d){\r\n\t\tSimpleDateFormat fmt = new SimpleDateFormat(DATE_FORMAT);\r\n\t\treturn fmt.format(d);\r\n\t}", "private String stringifyDate(Date date){\n\t\tDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\treturn dateFormatter.format(date);\n\t}", "public static String getDate() {\n return getDate(DateUtils.BASE_DATE_FORMAT);\n }", "public String toString() {\r\n\t\treturn String.format(\"%02d/%02d/%02d\", month, day, year);\r\n\r\n\t}", "public static String getDateAsString(Date date) {\r\n\t\tSimpleDateFormat dateform = new SimpleDateFormat(_dateFormat);\r\n\r\n\t\treturn dateform.format(date);\r\n\t}", "public String toString() {\r\n String date = month + \"/\" + day;\r\n return date;\r\n }", "public String getStringDate(){\n String finalDate = \"\";\n Locale usersLocale = Locale.getDefault();\n DateFormatSymbols dfs = new DateFormatSymbols(usersLocale);\n String weekdays[] = dfs.getWeekdays();\n int day = date.get(Calendar.DAY_OF_WEEK);\n String nameOfDay = weekdays[day];\n\n finalDate += nameOfDay + \" \" + date.get(Calendar.DAY_OF_MONTH) + \", \";\n\n String months[] = dfs.getMonths();\n int month = date.get(Calendar.MONTH);\n String nameOfMonth = months[month];\n\n finalDate += nameOfMonth + \", \" + date.get(Calendar.YEAR);\n\n return finalDate;\n }", "protected String getDateString() {\n String result = null;\n if (!suppressDate) {\n result = currentDateStr;\n }\n return result;\n }", "public static String getDate(Date date)\n\t{\n\t\treturn getFormatString(date, getDateFormat());\n\t}", "java.lang.String getFromDate();", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public String convertDateToString(Date date) {\n\t\tString dateTime = SDF.format(date);\n\t\treturn dateTime;\t\n\t}", "public String getCurrentDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "private String formatDate(final Date date) {\r\n\t\tfinal Calendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(date);\r\n\r\n\t\tfinal String dayOfMonth = formatDayOfMonth(calendar);\r\n\t\tfinal String month = formatMonth(calendar);\r\n\t\tfinal String year = String.valueOf(calendar.get(Calendar.YEAR));\r\n\r\n\t\treturn String.format(\"%s/%s/%s\", year, month, dayOfMonth);\r\n\t}", "public static String getDateTime(){\n String pattern = \"MM/dd/yyyy HH:mm:ss\";\n DateFormat df = new SimpleDateFormat(pattern);\n Date today = Calendar.getInstance().getTime();\n String todayAsString = df.format(today);\n return todayAsString;\n }", "private String toDate(Date appDate) throws ParseException {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(appDate);\n\t\tString formatedDate = cal.get(Calendar.DATE) + \"/\" + (cal.get(Calendar.MONTH) + 1) + \"/\" + cal.get(Calendar.YEAR);\n\t\tSystem.out.println(\"formatedDate : \" + formatedDate); \n\t\treturn formatedDate;\n\t}", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public String Get_date() \n {\n \n return date;\n }", "public String getDataNastereString(){\n\t\tDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tString sd = df.format(new Date(data_nastere.getTime()));\n\t\treturn sd;\n\t\t\n\t}", "public static String dateToString(Date date)\r\n/* 19: */ {\r\n/* 20: 23 */ return sdfDate.format(date);\r\n/* 21: */ }", "public String getFechaSistema() {\n Date date = new Date();\n DateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n //Aplicamos el formato al objeto Date y el resultado se\n //lo pasamos a la variable String\n fechaSistema = formato.format(date);\n \n return fechaSistema;\n }", "public String toDate(Date date) {\n DateFormat df = DateFormat.getDateInstance();\r\n String fecha = df.format(date);\r\n return fecha;\r\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public static String getDateString(Calendar cal) {\n\t\tString month = Integer.toString(cal.get(Calendar.MONTH)+1);\n\t\tString day = Integer.toString(cal.get(Calendar.DAY_OF_MONTH));\n\t\tString year = Integer.toString(cal.get(Calendar.YEAR));\n\t\treturn month + \"/\" + day + \"/\" + year;\n\t}", "public static String currentdate() {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tDate date = new Date();\n\t\treturn dateFormat.format(date);\n\n\t}", "public static String currentDate1() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public String getDate() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn sdf.format(txtDate.getDate());\n\t}", "public Date printDate(String date){\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/mm/yyyy\");\r\n\t\ttry{\r\n\t\t\treturn sdf.parse(date);\r\n\t\t}\r\n\t\tcatch(ParseException pe){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "static String getReadableDate(LocalDate date){\r\n\t\tString readableDate = null;\r\n\t\t//convert only if non-null\r\n\t\tif(null != date){\r\n\t\t\t//convert date to readable form\r\n\t\t\treadableDate = date.toString(\"MM/dd/yyyy\");\r\n\t\t}\r\n\t\t\r\n\t\treturn readableDate;\r\n\t}", "public static String convert( Date date )\r\n {\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat( \"yyyy-MM-dd\" );\r\n\r\n return simpleDateFormat.format( date );\r\n }", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "java.lang.String getStartDateYYYYMMDD();", "public static String getLegibleDate(Date date) {\n\n\t\tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yy\"); // \"d MMM yyyy hh:mm aaa\"\n\t\tString dateInit = simpleDateFormat.format(date);\n\n\t\n\n\t\treturn dateInit;\n\t}", "public static String getStrDate(Date date) {\n //TODO get date\n SimpleDateFormat formatter;\n if (DateUtils.isToday(date.getTime())) {\n formatter = new SimpleDateFormat(\"HH:mm\");\n return formatter.format(date);\n }\n formatter = new SimpleDateFormat(\"MMM dd\");\n return formatter.format(date);\n }", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "public String getDateCreatedAsString() {\n return dateCreated.toString(\"MM/dd/yyyy\");\n }", "protected String getReturnDateString() { return \"\" + dateFormat.format(this.returnDate); }", "private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }", "public static String getDbDateString(Date date){\n SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);\n return sdf.format(date);\n }", "public static String formatterDate(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = dfr.format(date);\n\t\t}\n\t\treturn retour;\n\t}", "private String getDateTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "static String localDate(String date){\n Date d = changeDateFormat(date, \"dd/MM/yyyy\");\n DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault());\n return dateFormat.format(d);\n }", "public static String getDbDateString(Date date){\n SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);\n return sdf.format(date);\n }", "public static String formartDate(String mDate) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\t\n\t\t\tSimpleDateFormat inSDF = new SimpleDateFormat(\"mm/dd/yyyy\");\n\t\t\t SimpleDateFormat outSDF = new SimpleDateFormat(\"yyyy-mm-dd\");\n\n\t\t\t \n\t\t\t String outDate = \"\";\n\t\t\t \n\t\t\t if (mDate != null) {\n\t\t\t try {\n\t\t\t Date date = inSDF.parse(mDate);\n\t\t\t outDate = outSDF.format(date);\n\t\t\t \n\t\t\t \n\t\t\t } catch (Exception ex){ \n\t\t\t \tex.printStackTrace();\n\t\t\t }\n\t\t\t }\n\t\t\t return outDate;\n\t\t}", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "public String formatDate(Date date) {\n\t\tString formattedDate;\n\t\tif (date != null) {\n\t\t\tformattedDate = simpleDateFormat.format(date);\n\t\t\tformattedDate = formattedDate.substring(0,\n\t\t\t\t\tformattedDate.length() - 5);\n\t\t} else {\n\t\t\tformattedDate = Constants.EMPTY_STRING;\n\t\t}\n\t\treturn formattedDate;\n\t}", "public static String formatDate(java.util.Date uDate) {\n\t\tif (uDate == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\treturn dateFormat.format(uDate);\n\t\t}\n\t}", "public String getDataNascimentoString() {\r\n\r\n\t\tSimpleDateFormat data = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t\treturn data.format(this.dataNascimento.getTime());\r\n\r\n\t}", "public static String dateToString(final Date d, final boolean noTime) {\n\t\tString dateFormat;\n\t\tString s = \"\";\n\t\tif (noTime) {\n\t\t\tdateFormat = DD_MM_YYYY;\n\t\t} else {\n\t\t\tdateFormat = \"dd/MM/yyyy HH:mm\";\n\t\t}\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(dateFormat);\n\t\tif (d != null) {\n\t\t\ts = sdf.format(d);\n\t\t}\n\t\treturn s;\n\t}", "public static String currentDate() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public String getFileFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd\"));\n }", "public static String formatDate(Date d) {\n\t\tint month = d.getMonth() + 1;\n\t\tint dayOfMonth = d.getDate();\n\t\tint year = d.getYear() + 1900;\n\t\tString y = \"\" + year;\n\t\tString m = \"\" + month;\n\t\tString dom = \"\" + dayOfMonth;\n\t\tif (month < 10) {\n\t\t\tm = \"0\" + m;\n\t\t}\n\t\tif (dayOfMonth < 10) {\n\t\t\tdom = \"0\" + dom;\n\t\t}\n\t\treturn m + \"/\" + dom + \"/\" + y.substring(2);\n\t}", "public static String formatDateToString(Date dateObj) {\n return formatDateToString(dateObj, DATE_FORMAT.DEFAULT);\n }", "private static Date dateToString(Date start) {\n\t\treturn start;\n\t}", "public static String getDate(Date aDate) {\n\t\tSimpleDateFormat df;\n\t\tString returnValue = \"\";\n\n\t\tif (aDate != null) {\n\t\t\tdf = new SimpleDateFormat(getDatePattern());\n\t\t\treturnValue = df.format(aDate);\n\t\t}\n\n\t\treturn (returnValue);\n\t}", "public String getEntryDateString() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy MMM dd\");\n return sdf.format(entryDate.getTime());\n }", "public String getDate()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"EE d MMM yyyy\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "public String retrieveDate() {\n // Check if there's a valid event date.\n String date = _dateET.getText().toString();\n if (date == null || date.equals(\"\")) {\n Toast.makeText(AddActivity.this, \"Please enter a valid date.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n Pattern p = Pattern.compile(\"^(0[1-9]|1[012])/(0[1-9]|[12][0-9]|3[01])/(19|20)\\\\d\\\\d$\");\n Matcher m = p.matcher(date);\n if (!m.find()) {\n Toast.makeText(AddActivity.this, \"Please input a valid date in mm/dd/yyyy format.\", Toast.LENGTH_LONG).show();\n return \"\";\n }\n return date;\n }", "public static String getDate() {\n return getDate(System.currentTimeMillis());\n }", "public static String dateToString(Date date) {\n\t\tDateTime dt = new DateTime(date.getTime());\n\t\tDateTimeFormatter fmt = DateTimeFormat.forPattern(SmartMoneyConstants.DATE_FORMAT);\n\t\tString dtStr = fmt.print(dt);\n\n\t\treturn dtStr;\n\t}", "private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}", "public String date() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "java.lang.String getFoundingDate();", "public static String convertDateToString(Date aDate) {\n\t\treturn getDateTime(getDatePattern(), aDate);\n\t}", "java.lang.String getOrderDate();", "public static String dateTran(String dateOri){\n\t\tDateFormat formatter1 ; \n\t\tDate date ; \n\t\tString newDate=null;\n\t\tformatter1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\ttry {\n\t\t\tdate=formatter1.parse(dateOri);\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat ( \"M/d/yy\" );\n\t\t\tnewDate = formatter.format(date);\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newDate;\n\t}" ]
[ "0.78790665", "0.77892613", "0.7751528", "0.7746233", "0.76780075", "0.7614406", "0.75804216", "0.7539404", "0.75294477", "0.74909085", "0.7456167", "0.7339441", "0.73107195", "0.72967976", "0.7264198", "0.7258059", "0.7252787", "0.7243775", "0.72186244", "0.71994686", "0.71994686", "0.7179422", "0.7140725", "0.71099967", "0.71043235", "0.710381", "0.70913273", "0.70883685", "0.7080469", "0.7069055", "0.70638067", "0.70289904", "0.69875973", "0.69870615", "0.6978455", "0.6952996", "0.6952595", "0.6935109", "0.6910995", "0.6908775", "0.6876208", "0.68012506", "0.6789839", "0.6781114", "0.6776811", "0.67702687", "0.6764174", "0.6749661", "0.67470473", "0.6729433", "0.6725959", "0.67191285", "0.6714975", "0.67018366", "0.6699946", "0.66973484", "0.66973484", "0.6697293", "0.6687958", "0.6687499", "0.6687397", "0.6677175", "0.6673116", "0.66527295", "0.66506565", "0.6644636", "0.6638425", "0.6632879", "0.6619552", "0.66115534", "0.65931445", "0.6585984", "0.65726495", "0.65687245", "0.65664893", "0.65652144", "0.65555805", "0.65419155", "0.6539784", "0.65237653", "0.651991", "0.6516817", "0.6514148", "0.6513864", "0.65094167", "0.6505926", "0.6487315", "0.64858025", "0.6479356", "0.64784867", "0.64763534", "0.647012", "0.64673257", "0.6464597", "0.645382", "0.64491576", "0.6444988", "0.64354205", "0.6428744", "0.640064" ]
0.79619485
0
TextView testRepairID = (TextView)findViewById(R.id.testRepairID); testRepairID.setText(repairIDText);
@Override public void onClick(View v) { AsyncDataClass asyncRequestObject = new LoginActivity.AsyncDataClass(); asyncRequestObject.execute(serverUrlCancel, LoginText); //Intent returnIntent = new Intent(); //setResult(Activity.RESULT_OK,returnIntent); finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setText(@StringRes int resId) {\n setText(getContext().getText(resId));\n }", "private void display() {\n TextView textview = (TextView) findViewById(R.id.textView);\n EditText editText = (EditText) findViewById(R.id.editNumber) ;\n textview.setText(\"TEXT\");\n editText.setText(\"\");\n\n }", "public boolean setTextView(int textViewID, String text){\n try {\n TextView textview = (TextView) findViewById(textViewID);\n textview.setText(text);\n Log.i(\"MenuAndDatabase\",\"setTextView: \" + textViewID + \", message: \" + text);\n return false;\n }\n catch(Exception e){\n Log.e(\"MenuAndDatabase\", \"error setting textview: \" + e.toString());\n return true;\n }\n }", "private void setText(View view, String text) {\n\t\t((TextView) view.findViewById(android.R.id.text1)).setText(text);\n\t}", "public void button0OnClick(View view){ display.setText(display.getText()+ \"0\");}", "@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setText(\"Android is AWESOME!!\");\n }", "public void onClick(View view){ // that executes the following code.\n // Take the text input to the EditText field...\n String changeText = editV.getText().toString();\n // and set the TextView to that input.\n textV.setText(changeText);\n }", "private void setInfo(String info) {\n// TextView textView = (TextView) findViewById(R.id.info);\n// textView.setText(info);\n }", "private void updateCountTV()\n {\n TextView countTextview = (TextView) findViewById(R.id.countTV);\n countTextview.setText(\"Counting Jelly Beans gives me \" + countJB);\n }", "@Override\r\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n String adderssOutput = resultData.getString(Constants.RESULT_DATA_KEY);\r\n\r\n if (resultCode == Constants.SUCCESS_RESULT) {\r\n mTextView.setText(adderssOutput);\r\n }\r\n }", "private void displayquintity(int numberOFCoffee){\n TextView quintityText= findViewById(R.id.quantity_text_view);\n quintityText.setText(\"\"+numberOFCoffee);\n\n }", "public void updateText(String s){\n TextView articleText = (TextView) findViewById(R.id.article_text);\n articleText.setText(s);\n }", "@Override\n public void onCancelled(DatabaseError error) {\n setContentView(R.layout.activity_needs);\n TextView textView = (TextView) findViewById(R.id.textView1);\n textView.setText(\"Failed to read value\");\n\n }", "private void updateText(int nr, View v) {\n if (v.equals(teamAScoreButton)) {\n teamAScoreTextView.setText(String.valueOf(nr));\n } else if (v.equals(teamBScoreButton)) {\n teamBScoreTextView.setText(String.valueOf(nr));\n } else if (v.equals(teamAFaultButton)) {\n teamAFaultTextView.setText(String.valueOf(nr));\n } else if (v.equals(teamBFaultButton)) {\n teamBFaultTextView.setText(String.valueOf(nr));\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n // TODO Auto-generated method stub\n if ((requestCode == request_code) && (resultCode == RESULT_OK)) {\n\n // Toast.makeText(this, intent.getStringExtra(\"resultado\"), Toast.LENGTH_LONG).show();\n inEquipo.setText(intent.getStringExtra(\"resultado\"));\n }\n }", "public void fillText(View view){\n if(running==true){\n\n\n latestOp=false;\n for(int i = 0; i<9; i++)\n if(i==win&&idOfViews[i]==view.getId()) {\n score++;\n sec=sec+3;\n latestOp=true;\n }\n\n //Defining the score\n total++;\n scoret.setText(\" \"+score+\" /\"+total);\n\n //Setting the message about the latest one.\n resultT.setText(\"Missed\");\n if(latestOp==true)\n resultT.setText(\"Correct!\");\n\n\n //Calling a new screen\n newScreen();\n }\n\n\n }", "public void setText(int str) { this.editText.setText(str); }", "@Test\r\n public void passConText() {\r\n onView(withId(R.id.edPassConReg)).perform(typeText(\"hey\"));\r\n }", "public void updateViews() {\n textView.setText(contactName);\n\n }", "public boolean setEditView(int editViewID, String text){\n try {\n EditText editview = (EditText) findViewById(editViewID);\n editview.setText(text);\n Log.i(\"MenuAndDatabase\",\"setEditText: \" + editViewID + \", message: \" + text);\n return false;\n }\n catch(Exception e){\n Log.e(\"MenuAndDatabase\", \"error setting editText: \" + e.toString());\n return true;\n }\n }", "public void setView4Text(String text){\n view4Text.set(text);\n }", "@Override\n public void onClick(View view) {\n\n mConditionRef.setValue(mCustomText.getText().toString());\n\n// mConditionRef.setValue(\"Test Text\");\n }", "@Test\r\n public void regButton(){\r\n onView(withId(R.id.edUserReg)).perform(typeText(\"Jade\"));\r\n onView(withId(R.id.Stud_id)).perform(typeText(\"Jade\"));\r\n onView(withId(R.id.edPassReg)).perform(typeText(\"hey\"));\r\n onView(withId(R.id.edPassConReg)).perform(typeText(\"hey\"));\r\n onView(withId(R.id.btnReg)).perform(click());\r\n }", "public void setTitleFromActivityLabel (int textViewId)\n{\n TextView tv = (TextView) findViewById (textViewId);\n if (tv != null) tv.setText (getTitle ());\n}", "@Override\n public void onClick(View v) {\n String textoDigitado = caixaTexto.getText().toString();\n\n if (textoDigitado.isEmpty()) {\n // String vazia\n AlertDialog.Builder dialogo = new AlertDialog.Builder(MainActivity.this);\n dialogo.setMessage(\"Digite a idade do Cachorro!\");\n dialogo.setNeutralButton(\"Ok\", null);\n dialogo.show();\n\n } else {\n\n int valorDigitado = Integer.parseInt(textoDigitado);\n int resultadoFinal = valorDigitado * 7;\n\n resultadoIdade.setText(\"A idade do cachorro em anos humanos é \" + resultadoFinal + \" ano(s)\");\n\n }\n }", "@Test\r\n public void passText() {\r\n onView(withId(R.id.edPassReg)).perform(typeText(\"hey\"));\r\n }", "@Override\n public void onClick(View v) {\n\n //edittext object of the item entered\n EditText text = (EditText) findViewById(R.id.item_text);\n\n //create new intent to put the item in\n Intent data = new Intent();\n data.putExtra(\"text\", text.getText().toString());\n\n //attach data to return call and go back to main view\n setResult(RESULT_OK, data);\n finish();\n }", "void displayScore(){\n\t\tTextView yourScore = (TextView) findViewById (R.id.yourscore); \n String currentScoreText;\n currentScoreText = Integer.toString(currentScore);\n\t\tyourScore.setText(currentScoreText);\n\t\t\n\t}", "public void setText(int id, String text) {\n\t\tView view = findViewById(id);\n\t\tif (view instanceof TextView) {\n\t\t\t((TextView) view).setText(text);\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n TextView activityText = getActivity().findViewById(R.id.text_view_activity);\n if (activityText == null) {\n Log.i(MainActivity.TAG, \"TextView in activity not found\");\n } else {\n activityText.setText(\"got from down fragment\");\n Log.i(MainActivity.TAG, \"TextView in activity edited successfully\");\n }\n }", "@Override\n public void choiced(String result) {\n target.setText(result);\n target.setTextColor(getResources().getColor(R.color.app_color));\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\ttx.setText(editText.getText().toString());\r\n\t\t\t\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_myo_control);\n textRcvData = (TextView) findViewById(R.id.textReceiveData);\n isTextRcvData = true;\n }", "public void setIndice(){\n txtIndice.setText(String.valueOf(indice));\n }", "private void updateTextButtons() {\n CrewMember crewMember = department.getCrewMember();\n repair.setText(\"Click to repair your ship for \"+getHealCost()+ \" gold!\");\n upgrade.setText(\"Click to upgrade \" + crewMember.getName() + \" for \"+crewMember.getUpgradeCost()+\" gold!\");\n }", "public void buttonCE (View view){\n resultView.setText(\"0\");\n result = 0;\n }", "private void setValueOfField(View root, int reference, String value){\n Object obj = root.findViewById(reference);\n System.out.println(obj.toString());\n if (obj instanceof EditText)\n ((EditText) obj).setText(value);\n else if (obj instanceof Button)\n ((Button) obj).setText(value);\n }", "@Override\n\tpublic void SuccessText(String text) {\n\t\tLog.i(TAG, \"==-->text:=\"+text);\n\t\tmain_one.setText(text);\n\t}", "public void clickFunction(View view){\n Toast.makeText(MainActivity.this, \"Hi there!\", Toast.LENGTH_LONG).show();\n\n // here we've created a variable \"myTextField\" of type \"EditText\" which collect the data from the ID i.e \"myTextField\" and convert the view ID into EditText type and stores into the variable.\n EditText myTextField = (EditText) findViewById(R.id.myTextField);\n\n // here the Log.i function is used to show the info to the logcat terminal which required two fields i.e Tag & the data to show (here the data is taken from the myTextField variable created above.\n Log.i(\"Info\",myTextField.getText().toString());\n }", "@Override\n public void run() {\n TextInputEditText itemName = activityTestRule.getActivity().findViewById(R.id.sell_item_name),\n itemDesc = activityTestRule.getActivity().findViewById(R.id.sell_item_desc),\n itemPrice = activityTestRule.getActivity().findViewById(R.id.sell_item_price);\n\n itemName.setText(\"sddfg\");\n itemDesc.setText(\"dsfdsf\");\n itemPrice.setText(\"12.5\");\n\n activityTestRule.getActivity().findViewById(R.id.sell_button).performClick();\n }", "private void setText(View rowView, Truck truck) {\n\t\tTextView truckNameText = (TextView) rowView.findViewById(R.id.truckNameText);\n\t\tTextView truckCuisineText = (TextView) rowView.findViewById(R.id.truckCuisineText);\n\t\t\n\t\tif (truckNameText != null) {\n\t\t\ttruckNameText.setText(truck.getName());\n\t\t}\n\n\t\tif (truckCuisineText != null) {\n\t\t\ttruckCuisineText.setText(truck.getCuisine());\n\t\t}\n\t}", "public void setarText() {\n txdata2 = (TextView) findViewById(R.id.txdata2);\n txdata1 = (TextView) findViewById(R.id.txdata3);\n txCpf = (TextView) findViewById(R.id.cpf1);\n txRenda = (TextView) findViewById(R.id.renda1);\n txCpf.setText(cpf3);\n txRenda.setText(renda.toString());\n txdata1.setText(data);\n txdata2.setText(data2);\n\n\n }", "@Override\n public void onClick(View view) {\n test.setContent(\"234444500.36\");\n }", "public void setText(String str) { this.editText.setText(str); }", "@Override\n public void onClick(View v) {\n Integer amount_tries = (Integer.parseInt(tries_tv.getText().toString()) + 1);\n // putting it back as a String\n String new_tries = amount_tries.toString();\n // updating the tries textview to incremented value\n tries_tv.setText(new_tries);\n\n }", "@Override\n\t\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\ttextView_setpsd_info.setText(str);\n\t\t\t\t}", "private void updateCounterView(String text) {\n final String txt = text;\n main.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if(txt!=null) {\n pointsLeftView.setText(txt);\n } else {\n pointsLeftView.setText(Integer.toString(counter));\n }\n }\n });\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n setText();\n }", "@Override\n public void onClick(View v) {\n TextView tries_tv;\n tries_tv = findViewById(R.id.notries_Textview);\n // set this back to 1\n tries_tv.setText(R.string.default_tries);\n // set the RelativeLayout invisible again\n tries.setVisibility(View.GONE);\n // reset the \"Press to top out text\"\n completeBoulder.setText(getResources().getString(R.string.topout));\n }", "@Test\r\n public void changeText_FailedTest() {\n onView(withId(R.id.inputField)).perform(typeText(\"NewText\"),\r\n closeSoftKeyboard());\r\n reportHelper.label(\"myTestStepLabel_3_1\");\r\n onView(withId(R.id.switchActivity)).perform(click());\r\n\r\n reportHelper.label(\"myTestStepLabel_3_2\");\r\n // This view is in a different Activity, no need to tell Espresso.\r\n onView(withId(R.id.resultView)).check(matches(withText(\"errrrrrr\")));\r\n }", "public void setDetails(){\n\n TextView moviename = (TextView) findViewById(R.id.moviename);\n TextView moviedate = (TextView) findViewById(R.id.moviedate);\n TextView theatre = (TextView) findViewById(R.id.theatre);\n\n TextView seats = (TextView) findViewById(R.id.seats);\n\n moviename.setText(ticket.movieName);\n moviedate.setText(ticket.getMovieDate());\n theatre.setText(ticket.theatreDetails);\n\n seats.setText(ticket.seats);\n }", "private void display(int number){\n TextView quantTV = (TextView) findViewById(R.id.quant_tv);\n quantTV.setText(\"\"+ number);\n }", "@Test\r\n public void studNoText() {\r\n onView(withId(R.id.Stud_id)).perform(typeText(\"123456\"));\r\n }", "public void displayQuestionNumber(int questionNumber) {\n\n TextView questionView = (TextView) findViewById(R.id.question_number);\n questionView.setText(String.valueOf(questionNumber));\n\n\n }", "public void onClick(View view){\n\n String name = mNameField.getText().toString();\n Toast.makeText(this,\"Hello There\"+name, Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onClick(View v) {\n if (tvHello.getText().equals(getText(R.string.helloWorld)))\n {\n tvHello.setText(R.string.agur);\n }\n\n else\n {\n tvHello.setText(R.string.helloWorld);\n }\n }", "public void inputText(View v) {\n EditText textIn = (EditText) findViewById(R.id.waitingTime);\n\n TextView textOut = (TextView) findViewById(R.id.question);\n textOut.setText(textIn.getText());\n }", "private void setQuestion(int resID){\n questionView.setText(resID);\n ecaFragment.sendToECAToSpeak(getResources().getString(resID));\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}", "private void setEditTextView(person selected_person) {\n\n textView_name = (EditText) findViewById(R.id.edit_name);\n textView_date = (EditText) findViewById(R.id.edit_date);\n textView_neck = (EditText) findViewById(R.id.edit_neck);\n textView_bust = (EditText) findViewById(R.id.edit_bust);\n textView_chest = (EditText) findViewById(R.id.edit_chest);\n textView_waist = (EditText) findViewById(R.id.edit_waist);\n textView_hip = (EditText) findViewById(R.id.edit_hip);\n textView_inseam = (EditText) findViewById(R.id.edit_inseam);\n textView_comment = (EditText) findViewById(R.id.edit_comment);\n\n String neck = selected_person.getNeck() == 0.0 ? \"\" : String.valueOf(selected_person.getNeck());\n String bust = selected_person.getBust() == 0.0 ? \"\" : String.valueOf(selected_person.getBust());\n String chest = selected_person.getChest() == 0.0 ? \"\" : String.valueOf(selected_person.getChest());\n String waist = selected_person.getWaist() == 0.0 ? \"\" : String.valueOf(selected_person.getWaist());\n String hip = selected_person.getHip() == 0.0 ? \"\" : String.valueOf(selected_person.getHip());\n String inseam = selected_person.getInseam() == 0.0 ? \"\" : String.valueOf(selected_person.getInseam());\n\n textView_name.setText(selected_person.getName());\n textView_date.setText(selected_person.getDate());\n textView_neck.setText(String.valueOf(neck));\n textView_bust.setText(String.valueOf(bust));\n textView_chest.setText(String.valueOf(chest));\n textView_waist.setText(String.valueOf(waist));\n textView_hip.setText(String.valueOf(hip));\n textView_inseam.setText(String.valueOf(inseam));\n textView_comment.setText(selected_person.getComment());\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n\r\n mOutputTextView.setText(intent.getExtras().getString(Intent.EXTRA_TEXT));\r\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\"+ number);\n }", "protected TextView setText( final int childViewIndex, final int resourceId )\n {\n return updater.setText( childViewIndex, resourceId );\n }", "private void displayQuantity(int numOfCoffeee) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + numOfCoffeee);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n\n }", "@Override\n public void onClick(View v) {\n String curStr = resultDisplay.getText().toString();\n\n // If there is only one char in string\n if (curStr.length() == 1) {\n resultDisplay.setText(String.valueOf(0));\n } else {\n // Remove the last char in string\n int lastIndex = curStr.length() - 1;\n String newStr = curStr.substring(0,lastIndex);\n\n // Set the newStr to ResultDisplay\n resultDisplay.setText(newStr);\n }\n }", "@Test\n public void textViewIndicatingTheTopic_isCorrectlyFilled() {\n // When perform a click on an item\n onView(withId(R.id.recyclerview))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n // Then : MeetingDetailsActivity is launched\n onView(withId(R.id.activity_meeting_details));\n //The TextView is correctly filled\n onView(withId(R.id.detail_topic))\n .check(matches(withText(\"Mareu_0\")));\n }", "public void showText(View view) {\n EditText editText = findViewById(R.id.editText_main);\n TextView textView = findViewById(R.id.text_phonelabel);\n if (editText != null) {\n // Assign to showString both the entered string and mSpinnerLabel.\n String showString = (editText.getText().toString() +\n \" - \" + mSpinnerLabel);\n // Display a Toast message with showString\n Toast.makeText(this, showString, Toast.LENGTH_SHORT).show();\n // Set the TextView to showString.\n textView.setText(showString);\n }\n }", "private void setTextViews() {\n TextView textToggleFilters = (TextView) findViewById(R.id.text_totalExpenditure);\n textToggleFilters.setPaintFlags(textToggleFilters.getPaintFlags() | Paint.FAKE_BOLD_TEXT_FLAG);\n }", "private void display(int number)\n {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void populateTextViews() {\n full_name_tv.setText(contact.getFullName());\n school_tv.setText(contact.getSchool());\n department_tv.setText(getDepartmentString());\n email.setText(contact.getEmail());\n number_tv.setText(contact.getNumber());\n }", "public void Limpiar(View view)\r\n {\n\r\n etCaja1.setText(\"\");\r\n etCaja2.setText(\"\");\r\n tvCaja3.setText(\"\");\r\n }", "private void display(int number) {\r\n TextView quantity_txt = (TextView) findViewById(R.id.quantity_textview);\r\n quantity_txt.setText(\"\" + number);\r\n }", "public void buttonMod (View view){ expressionView.setText(expressionView.getText() + \"Mod\");}", "@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.demo1);\n TextView text = (TextView)findViewById(R.id.lib_head_title);\n text.setText(\"Demo3\");\n }", "private void setupTextView() {\n painterTextViewMoves = findViewById(R.id.painterTextView1);\n painterTextViewTime = findViewById(R.id.painterTextView2);\n painterTextViewPoints = findViewById(R.id.painterTextView3);\n painterTextViewInstructions = findViewById(R.id.painterInstructionsView);\n }", "@Override\n\n public void onClick(View v) {\n String test;\n// test = Webcon.execute(\"/searchid?id=\"+\"1\").toString();\n String content = \"id=\"+searchSectionEdit.getText();\n test = postURL(content,\"http://172.20.10.5:5000/searchid\");\n\n personDataText.setText(\"your section is \"+test);\n }", "public void onEditItem(View view) {\n Intent data = new Intent(EditItemActivity.this, MainActivity.class);\n data.putExtra(\"position\", elementId);\n data.putExtra(\"text\", etText.getText().toString());\n setResult(RESULT_OK, data);\n finish();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main); // Carga los componentes definidos en el xml activity_main\n\n TextView texto = (TextView) findViewById(R.id.idTexto); // Instanciamos el componente de tipo TextView buscandolo por el id definido en el xml activity_main\n // texto.setText(\"Hola!\");\n }", "@Override\r\n\t\tpublic void updateUI() {\n\t\t\tif(deparments != null){\r\n\r\n\t\t\t\ttv.setText(deparments.toString());\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"deparments \"+deparments.toString());\r\n\t\t\t}\r\n\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n b1 = (Button) findViewById(R.id.button);\n b1.setOnClickListener(this);\n t = (TextView) findViewById(R.id.textView);\n\n\n\n\n}", "public void onClick(View view) {\n Log.d(\"Edit1\",\"EDITED1\");\n\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(String.valueOf(number));\n //quantityTextView.setText(new Integer(number).toString());\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n init();\n updateUI();\n/*\n mButton = findViewById(R.id.button);\n mTextView = findViewById(R.id.textview);\n cursor = getContentResolver().query(CONTENT_URI,null,null, null,null);\n cursor.moveToFirst();\n mTextView.setText(cursor.getString(cursor.getColumnIndex(\"name\")));\n //mTextView.setText(note.getName());\n mButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (cursor.moveToNext()){\n mTextView.setText(cursor.getString(cursor.getColumnIndex(\"name\")));\n }\n }\n });*/\n }", "private void displayNewChallenge() {\n mTextView.setText(getChallenge());\n }", "@Override\n \tpublic void onCreate(Bundle savedInstanceState)\n \t{\n \t\tsuper.onCreate(savedInstanceState);\n \t\tsetContentView(R.layout.main);\n \n \t\tmainLayout = findViewById (R.id.mainLayout);\n \t\tresistor = (Resistor)findViewById (R.id.resistor);\n \t\tresistanceView = (TextView)findViewById (R.id.resistanceView);\n \n \t\tmainLayout.setBackgroundDrawable (resistor.getBackground ());\n \t\tresistanceView.setBackgroundDrawable (resistor.getBackground ());\n \t\tresistanceView.setText (resistor.getResistance ().toString ());\n \t}", "public void onClick(View arg0) {\n // change the text to state that radio button one was clicked\n tv_display.setText(R.string.tv_display_rb1);\n }", "public void onClick(View v) {\n dbHandler.addEntry(\"credit\",creditamount.getText().toString(),creditreason.getText().toString());\n creditamount.setText(\"\");\n creditreason.setText(\"\");\n }", "public void initTextViewDebug( View view, int id ) {\n\t\tmTextViewDebug = (TextView) view.findViewById( id );\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View myView = inflater.inflate(R.layout.fragment_challenges_screen, container, false);\n testView = (TextView) myView.findViewById(R.id.testtext);\n\n\n return inflater.inflate(R.layout.fragment_challenges_screen, container, false);\n }", "public void resetText(View view) {\n display();\n }", "public void buttonClearViewOnClick(View view){\n display.setText(\"\");\n operation= \"\";\n result = 0;\n}", "private void displayTeamAScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamAScore);\n scoreTextView.setText(num +\"\");\n }", "public void updateView(String message)\n {\n Log.w(\"MainActivity\",\"In updateview: \" + message);\n\n TextView messageTV = findViewById(R.id.messageTextView);\n\n messageTV.setText(message);\n\n }", "public void updateTextViews() {\n // Set the inputs according to the initial input from the entry.\n //TextView dateTextView = (TextView) findViewById(R.id.date_textview);\n //dateTextView.setText(DateUtils.formatDateTime(getApplicationContext(), mEntry.getStart(), DateUtils.FORMAT_SHOW_DATE));\n\n EditText dateEdit = (EditText) findViewById(R.id.date_text_edit);\n dateEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_ABBREV_ALL));\n\n EditText startTimeEdit = (EditText) findViewById(R.id.start_time_text_edit);\n startTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_SHOW_TIME));\n\n EditText endTimeEdit = (EditText) findViewById(R.id.end_time_text_edit);\n endTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getEnd(), DateUtils.FORMAT_SHOW_TIME));\n\n\n TextView descriptionView = (TextView) findViewById(R.id.description);\n descriptionView.setText(mEntry.getDescription());\n\n\n enableSendButtonIfPossible();\n }", "private void display(int number) {\n TextView quantityTextView = (TextView)\n findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n\n }", "@Test\n public void testEditTextHasCorrectID(){\n ViewInteraction appCompatEditTextView = onView(withId(R.id.input));\n appCompatEditTextView.perform(replaceText(\"testEditTextHasCorrectID\"), closeSoftKeyboard());\n onView(withId(R.id.fab)).perform(click());\n EditText input = messagesActivity.input;\n int ID = input.getId();\n int expectedID = R.id.input;\n assertEquals(ID, expectedID);\n }", "public void onClick(View view) {\n // this is from the activity main\n TextView tv = (TextView) findViewById(R.id.tv1);\n EditText et = (EditText) findViewById(R.id.et1);\n\n }", "@SuppressWarnings(\"unused\")\n public void setInfoText(int resourceId) {\n\n mInfoText.setText(resourceId);\n mInfoText.setVisibility(View.VISIBLE);\n }", "public void onClick(View v) {\n\t\t\t\t((EditText) findViewById(R.id.d4et1)).setText(\"\");\r\n\t\t\t\t((EditText) findViewById(R.id.d4et2)).setText(\"\");\r\n\t\t\t\t((Button) findViewById(R.id.d4date1)).setText(\"DD/MM/YY\");\r\n\t\t\t\t((Button) findViewById(R.id.d4date2)).setText(\"DD/MM/YY\");\r\n\t\t\t\t((EditText) findViewById(R.id.d4et4)).setText(\"\");\r\n\t\t\t\t\r\n\t\t\t\tSharedPreferences.Editor editor = getPreferences(0).edit();\r\n\t\t\t\tString s=extractedsample.getText().toString();\r\n\t\t\t\teditor.putString(\"Name\", s);\r\n\t\t\t\tString s1=primerpair.getText().toString();\r\n\t\t\t\teditor.putString(\"Name1\", s1);\r\n\t\t\t\tString s2=date1.getText().toString();\r\n\t\t\t\teditor.putString(\"Name2\", s2);\r\n\t\t\t\tString s3=successfull.getText().toString();\r\n\t\t\t\teditor.putString(\"Name3\", s3);\r\n\t\t\t\tString s4=date2.getText().toString();\r\n\t\t\t\teditor.putString(\"Name4\", s4);\r\n\t\t\t\tString s5=tbtn.getText().toString();\r\n\t\t\t\teditor.putString(\"Name5\", s5);\r\n\t\t\t\teditor.commit();\r\n\t\t\t}" ]
[ "0.6352057", "0.62632716", "0.6213397", "0.62025315", "0.6157191", "0.61571264", "0.6136717", "0.6030252", "0.60274136", "0.60164416", "0.6008825", "0.5991974", "0.59844655", "0.5981383", "0.59382397", "0.58917046", "0.5838577", "0.5835744", "0.5833197", "0.5827438", "0.5811689", "0.58063185", "0.57979167", "0.57916504", "0.57603437", "0.5759438", "0.5758808", "0.5745583", "0.57388073", "0.5731082", "0.57120275", "0.57117647", "0.5703804", "0.56887907", "0.56711656", "0.56612974", "0.5651855", "0.56478524", "0.564431", "0.5640768", "0.5635561", "0.5629527", "0.56053936", "0.55985165", "0.5594966", "0.5586495", "0.55774593", "0.55664104", "0.556505", "0.5564609", "0.55554336", "0.5551004", "0.5538831", "0.55281", "0.5526731", "0.552619", "0.552565", "0.5522576", "0.5509607", "0.5503785", "0.5501015", "0.5498098", "0.5494589", "0.54902554", "0.5489688", "0.54749846", "0.5469796", "0.5463779", "0.5451082", "0.5451057", "0.5450097", "0.54436946", "0.5431652", "0.54296374", "0.5425979", "0.5418823", "0.54176486", "0.5416263", "0.5416149", "0.54160166", "0.5410376", "0.54090744", "0.54077417", "0.54033333", "0.54032105", "0.53983057", "0.5387198", "0.53852224", "0.5381524", "0.53790545", "0.53743774", "0.5371026", "0.536955", "0.53666496", "0.53657633", "0.53653103", "0.5362303", "0.53621256", "0.5358838", "0.5355093", "0.5345815" ]
0.0
-1
Intent intent = new Intent(LoginActivity.this, MainActivity.class); startActivity(intent);
@Override public void onClick(View v) { Intent returnIntent = new Intent(); setResult(Activity.RESULT_OK, returnIntent); finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void goLogin(){\n Intent intent = new Intent(Menu.this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent loginIntent = new Intent(MainActivity.this, LoginActivity.class);\n startActivity(loginIntent);\n }", "public void goLoginActivity()\n {\n Intent intent = new Intent(this, LoginActivity.class);\n this.startActivity(intent);\n }", "private void goToLoginScreen()\n {\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n }", "public void loginUser(){\n Intent intent=new Intent(MainActivity.this,SnapsActivity.class);\n startActivity(intent);\n }", "public void login(){\n Intent intent=new Intent(getApplicationContext(),UserActivity.class);\n startActivity(intent);\n }", "public void onLoginClick(View view) {\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n startActivity(intent);\n }", "private void goToMain(){\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "private void goToMain(){\n Intent intent = new Intent(getBaseContext(), MainActivity.class);\n startActivity(intent);\n }", "public void onClick(View v) {\n Intent myIntent = new Intent(Start.this, Login.class);\n Start.this.startActivity(myIntent);\n }", "public void openActivity(){\n Intent intent = new Intent();\n if(bopenLogin)\n {\n intent = new Intent(Splashscreen.this, Login.class);\n }\n else\n {\n intent = new Intent(Splashscreen.this, MainActivity.class);\n }\n startActivity(intent);\n finish();\n }", "@Override\n public void run() {\n Intent intent = new Intent(MainActivity.this,login.class);\n startActivity(intent);\n\n }", "public void signInUser(){\n Intent intent = new Intent(this, AuthUiActivity.class);\n startActivity(intent);\n }", "public void onClickSignIn(View v){\n //Crear un nuevo intent\n Intent myIntent = new Intent(v.getContext(), SignIn.class);\n //Iniciar actividad\n startActivity(myIntent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, FacebookLoginActivity.class);\n startActivity(intent);\n }", "private void toLoginActivity(){\n\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tMApplication app = (MApplication) getApplication();\n\t\tapp.addLoginAcitivity(this);\n\t}", "public void moveActivityToLogin() {\n Intent intent = new Intent(MainActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }", "private void goToLogin()\n {\n Intent intent = new Intent(getActivity(), Login_Page.class);\n getActivity().startActivity(intent);\n }", "private void goToLoginPage() {\n\n startActivity(new Intent(this,LoginActivity.class));\n finish();\n }", "public void onLoginActivityLinkClick(View view){\n //creates a new object of the Intent class\n Intent intentLogin = new Intent(RegistrationActivity.this, LoginActivity.class);\n startActivity(intentLogin); //starts the intent\n }", "private void goMainActivity() {\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(Login.this, register.class);\n Login.this.startActivity(i);\n }", "private void startMainActivity() {\n Intent intent = new Intent(this, MyActivity.class);\n startActivity(intent);\n }", "public void loginPressed(View view) {\n startActivity(new Intent(this, Login.class));\n }", "@Override\n public void run(){\n Intent homeIntent = new Intent(MainActivity.this,login_page.class);//splashes to the login page.\n startActivity(homeIntent);\n finish();\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(LaunchActivity.this, MainActivity.class);\n startActivity(intent);\n }", "public void onLoginClickedListener(View view) {\n startActivity(new Intent(this, LoginActivity.class));\n }", "@Override\r\n public void onClick(View v) {\n Intent nxt = new Intent(Login.this,Register.class);\r\n startActivity(nxt);\r\n }", "private void SignIn() {\n startActivity(new Intent(MainActivity.this, HomeScreenActivityFragments.class));\n finish();\n }", "public void onClick(View v){\n Intent signIn = new Intent(RegDetailsPersonal.this, MainActivity.class);\n RegDetailsPersonal.this.startActivity(signIn);\n\n }", "public void goToLoginActivity(View view) {\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, UserRegister.class);\n startActivity(intent);\n }", "protected void startMainActivity() {\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n finish();\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }", "private void goMainActivity() {\n Intent i = new Intent(this, ProfileActivity.class);\n startActivity(i);\n\n //prevents user going back to this screen after signing up\n finish();\n }", "@Override\n public void onClick(View view) {\n startActivity(new Intent(StartActivity.this, MainActivity.class));\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, SecondActivity.class);\n startActivity(intent);\n\n }", "public void backtoMain()\n {\n Intent i=new Intent(this,MainActivity.class);\n startActivity(i);\n }", "private void goToMainActivity(){\n Log.d(TAG, \"goToMainActivity: called\");\n saveUserLogin(login);\n\n Intent intent = new Intent(\"android.intent.action.MapActivity\");\n view.getContext().startActivity(intent);\n }", "private void Login()\n {\n Intent loginIntent = new Intent (LoginActivity.this, VVPActivity.class);\n startActivity(loginIntent);\n finish();\n }", "private void returnToLoginActivity() {\n Intent returnToLogin = new Intent(this, Login.class);\n startActivity(returnToLogin);\n finish();\n }", "public void Inicio (View view){\n Intent inicio = new Intent(this, MainActivity.class);\n startActivity(inicio);\n }", "public void loginToMain(View v){\n SharedPreferences.Editor editor = login.edit();\n editor.putString(\"LOGIN\", m_loginText.getText().toString());\n editor.commit();\n \n \n \tIntent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void onClick(View v) {\n Intent account = new Intent(Welcome.this, MyAccount.class);\n startActivity(account);\n\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent i=new Intent(getApplicationContext(),MainActivity.class);\r\n\t\t\t\t\tstartActivity(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_login_screen);\n loginbtn = (Button)findViewById(R.id.loginAccount);\n registerbtn = (Button) findViewById(R.id.registerAccount);\n loginbtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(LoginScreen.this, Main.class));\n finish();\n }\n });\n\n registerbtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(LoginScreen.this, RegisterScreen.class));\n }\n });\n }", "@Override\n public void onClick(View view) {\n Intent registerIntent = new Intent(MainActivity.this, RegisterActivity.class);\n startActivity(registerIntent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBaseActivityUtil.startActivity(MainActivity.this, LoginActivity.class, false);\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\r\n startActivityForResult(intent, REQUEST_LOGIN);\r\n }", "@Override\n public void navigateToLogin() {\n startActivity(new Intent(this, LoginActivity.class));\n finish();\n }", "@Override\n public void run() {\n Intent i = new Intent(activity_splash.this, login_activity.class);\n startActivity(i);\n finish();\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent (v.getContext(), Login.class);\n startActivityForResult(intent, 0);\n }", "@Override\n public void onClick(View v) {\n startActivity(new Intent(StartPage.this,MainActivity.class));\n }", "@Override\r\n public void onClick(View v) {\n Intent i = new Intent(LoginActivty.this, SignupActivity.class);\r\n startActivity(i);\r\n finish();\r\n\r\n\r\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getActivity(), JdMainActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent HomeScreen = new Intent(v.getContext(), MainActivity.class);\n startActivity(HomeScreen);\n }", "public void newGame(View v){\n\n startActivity(new Intent(getApplicationContext(),MainActivity.class)); // same as startActivity(new Intent (this, Main2Activity.class));\n\n }", "public void onClick(View v) {\n Intent nextScreen = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(nextScreen);\n }", "@Override\n public void run() {\n\n Intent intent = new Intent(Launcher.this, Login.class);\n startActivity(intent);\n finish();\n }", "void gotoMainIntent() {\r\n // Intenting to start the activity \"main\".\r\n Intent mainIntent = new Intent(this, Main.class);\r\n this.startActivity(mainIntent);\r\n this.finish(); // Splash screen is done now... Needed, otherwise when closing the main activity will result\r\n // in coming back to the splashscreen.\r\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tIntent intent=new Intent();\n\t\t\tintent.setClass(RegisterActivity.this,LoginActivity.class );\n\t\t\tstartActivity(intent);\n\t\t}", "@Override\n public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, LoginActivity.class);\n startActivity(mainIntent);\n finish();\n\n }", "private void returnToMain() {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "protected void launchSignIn()\r\n {\r\n \tIntent i = new Intent(this, LoginActivity.class);\r\n \tstartActivity(i);\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_login1);\n EditText pass1et=findViewById(R.id.pass1);\n EditText email=findViewById(R.id.name1);\n Button btn=findViewById(R.id.btn1);\n TextView t=findViewById(R.id.login1);\n t.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(Login1.this,\n MainActivity.class);\n startActivity(intent);\n\n }\n });\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n loginCheck(email,pass1et);\n }\n\n\n });\n }", "public void login(View view) {\n\n validateLogin(email.getText().toString(), pw.getText().toString());\n\n/*\n Intent i = new Intent(LoginActivity.this, MainActivity.class);\n startActivity(i);\n finish();\n\n */\n\n }", "@Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, InputActivity.class));\n }", "private void ConfirmToken() {\n Intent i = new Intent(RegisterMe.this, ConfirmToken.class);\n startActivity(i);\n}", "@Override\n public void onClick(View view) {\n\n Intent intent = new Intent(LoginActivity.this, ProfileSetupActivity.class);\n startActivity(intent);\n }", "@Override\r\n public void onClick(View view) {\n Intent intent = new Intent(GuidePage.this, LoginOrRegister.class);\r\n startActivity(intent);\r\n }", "private void goLoginSignupActivity() {\n Intent intent = new Intent(this, LoginSignupActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }", "private void returnLogin(){\n Intent intent = new Intent(getContext(), MainActivity.class);\n startActivity(intent);\n getFragmentManager().beginTransaction().remove(this).commit();\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(UserProfile.this, SignInActivity.class);\n startActivity(i);\n }", "private void openMainActivity()\n {\n // Create the required intent, i.e. a description of MainActivity.\n Intent intent = new Intent(this, MainActivity.class);\n\n // Start the intent.\n startActivity(intent);\n\n // Call this Activity's finish() method.\n finish();\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tIntent i = new Intent(this,MainActivity.class);\n\t\tstartActivity(i);\n\t}", "public void BackToLogin(View v){\n\t\tIntent intent = new Intent(this, MainActivity.class);\n\t\tstartActivity(intent);\n\t}", "public void r_onClick(View view) {\n Intent intent = new Intent(MainActivity.this, RegisterActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent=new Intent(Login.this,studentLogin.class);\n startActivity(intent , ActivityOptions.makeSceneTransitionAnimation(Login.this).toBundle());\n }", "public void login(View view) {\n Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent in = new Intent(getApplicationContext(),MainActivity.class);\n\t\t\t\tstartActivity(in);\n\t\t\t}", "@Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, ViewActivity.class));\n }", "public void onClick(View v) {\n finish();\n Intent i=new Intent(getApplicationContext(), MainActivity.class);\n startActivity(i);\n\n }", "private void goToRegisterActivity() {\n Intent intent = new Intent(LoginActivity.this, RegisterAccountActivity.class);\n startActivityForResult(intent, 0);\n }", "public void onClick(View view) {\n Intent intent = new Intent(loginActivity.this, resetPasswordActivity.class);\r\n //now make it happen\r\n startActivity(intent);\r\n }", "@Override\n public void onClick(View v) {\n Intent intent=new Intent(Login.this,teacherLogin.class);\n startActivity(intent , ActivityOptions.makeSceneTransitionAnimation(Login.this).toBundle());\n }", "public void Login_screen_to_Registration() {\n register_ = findViewById(R.id.register_);\n register_.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(Login_screen.this, Registration.class);\n startActivity(intent);\n }\n });\n }", "public void go_to_setting(){\n Intent i=new Intent(LoginSelection.this, Configuration.class);\n startActivity(i);\n }", "@Override\n public void onClick(View view) {\n Intent gotoLogin = new Intent(IggOfficesActivity.this,AdminLogInActivity.class);\n startActivity(gotoLogin);\n\n }", "public void onClick(View v) {\n\n\n\n startActivity(myIntent);\n }", "@Override\n public void jumpActivity() {\n startActivity(new Intent(MainActivity.this, MainActivity.class));\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplication(), RegisterActivity.class);\n startActivity(intent);\n }", "private void register() {\n Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);\n startActivity(intent);\n }", "public void nextIntent(){\n \t\n \tIntent y=new Intent();\n \ty.setClass(MainActivity.this, Dashboard.class);\n \t\n \tstartActivity(y);\n \t\n \t\n}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(getApplicationContext(),Login_Profile.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent i = new Intent(Login_page.this,registration_page.class);\n startActivity(i);\n finish();\n }", "private void openHome(){\n Intent intent2 = new Intent(AddExercises.this, MainActivity.class);\n startActivity(intent2);\n }", "public void run() {\n Intent mInHome = new Intent(MainActivity.this,GoogleLoginActivity.class);\n MainActivity.this.startActivity(mInHome);\n MainActivity.this.finish();\n }", "@Override\r\n public void onClick(View view) {\n Intent intent=new Intent(MainActivity.this, CameraActivity.class);\r\n startActivity(intent);\r\n }", "@Override\n public void onClick(View v) {\n Intent intent=new Intent(Login.this,parentLogin.class);\n startActivity(intent , ActivityOptions.makeSceneTransitionAnimation(Login.this).toBundle());\n }", "public void run() {\n Intent intent = new Intent(IndexActivity.this, LoginActivity.class);\n startActivity(intent);\n finish();\n }", "private void goToAuthScreen(){\n this.finish();\n\n Intent intent = new Intent(this, AuthStartActivity.class);\n startActivity(intent);\n }" ]
[ "0.88879496", "0.86671394", "0.8518129", "0.8482547", "0.8311792", "0.83075523", "0.82577217", "0.8249876", "0.82399726", "0.8231952", "0.8084301", "0.80293876", "0.7967507", "0.7964355", "0.79336137", "0.7864394", "0.78543425", "0.78421116", "0.77645135", "0.77423954", "0.77187586", "0.76931953", "0.76925814", "0.76853096", "0.7637763", "0.7634368", "0.7632323", "0.7625032", "0.7615024", "0.7612676", "0.75800645", "0.75762916", "0.7567226", "0.75594395", "0.75511444", "0.75504565", "0.7545892", "0.75294495", "0.7510699", "0.75058997", "0.7494069", "0.74882877", "0.74857116", "0.7475601", "0.7475029", "0.7474348", "0.7465836", "0.7439756", "0.7418995", "0.74040467", "0.7397693", "0.73887867", "0.73814887", "0.73807716", "0.7380696", "0.73724675", "0.73662204", "0.73533094", "0.734935", "0.73233736", "0.7319825", "0.72979456", "0.7297897", "0.7294506", "0.72906226", "0.72708094", "0.726873", "0.72646075", "0.72607005", "0.72575486", "0.7250628", "0.7249619", "0.7247967", "0.7220837", "0.72205067", "0.72204924", "0.7217713", "0.72159076", "0.72148", "0.72100997", "0.7197138", "0.7191898", "0.718266", "0.7171823", "0.7171143", "0.7158444", "0.71581167", "0.7156241", "0.71535707", "0.71496373", "0.71490204", "0.71275395", "0.71261483", "0.7124404", "0.7123222", "0.7119155", "0.71171546", "0.71096045", "0.71063244", "0.7102432", "0.7096164" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_login, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7249256", "0.72037125", "0.7197713", "0.7180111", "0.71107703", "0.70437056", "0.70412415", "0.7014533", "0.7011124", "0.6983377", "0.69496083", "0.69436663", "0.69371194", "0.69207716", "0.69207716", "0.6893342", "0.6886841", "0.6879545", "0.6877086", "0.68662405", "0.68662405", "0.68662405", "0.68662405", "0.68546635", "0.6850904", "0.68238425", "0.6820094", "0.6817109", "0.6817109", "0.6816499", "0.6809805", "0.68039787", "0.6801761", "0.6795609", "0.6792361", "0.67904586", "0.67863315", "0.67613983", "0.67612505", "0.67518395", "0.6747958", "0.6747958", "0.67444956", "0.674315", "0.672999", "0.67269987", "0.67268807", "0.67268807", "0.67242754", "0.67145765", "0.6708541", "0.6707851", "0.6702594", "0.6702059", "0.6700578", "0.6698895", "0.66905326", "0.6687487", "0.6687487", "0.66857284", "0.66845626", "0.6683136", "0.66816247", "0.66716284", "0.66714823", "0.66655463", "0.6659545", "0.6659545", "0.6659545", "0.6658646", "0.6658646", "0.6658646", "0.6658615", "0.6656098", "0.665457", "0.6653698", "0.66525924", "0.6651066", "0.66510355", "0.6649152", "0.6648921", "0.6648275", "0.6647936", "0.66473657", "0.66471183", "0.6644802", "0.66427094", "0.66391647", "0.66359305", "0.6635502", "0.6635502", "0.6635502", "0.66354305", "0.66325855", "0.66324854", "0.6630521", "0.66282266", "0.66281354", "0.66235965", "0.662218", "0.66216594" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79039484", "0.78061193", "0.7765948", "0.772676", "0.76312095", "0.76217103", "0.75842994", "0.7530533", "0.748778", "0.7458179", "0.7458179", "0.7438179", "0.74213266", "0.7402824", "0.7391232", "0.73864055", "0.7378979", "0.73700106", "0.7362941", "0.73555434", "0.73453045", "0.7341418", "0.7330557", "0.7327555", "0.7326009", "0.7318337", "0.73160654", "0.73132724", "0.73037714", "0.73037714", "0.73011225", "0.7297909", "0.7293188", "0.72863173", "0.7282876", "0.72807044", "0.72783154", "0.72595924", "0.72595924", "0.72595924", "0.7259591", "0.72591716", "0.7249715", "0.72243243", "0.7219297", "0.7216771", "0.72042644", "0.72012293", "0.7199543", "0.7193037", "0.7184855", "0.7177254", "0.7168334", "0.7167477", "0.71536905", "0.7153523", "0.7135821", "0.7134834", "0.7134834", "0.7128953", "0.7128911", "0.71241933", "0.7123363", "0.71228945", "0.71219414", "0.7117495", "0.71173275", "0.71169853", "0.7116851", "0.7116851", "0.7116851", "0.7116851", "0.71148705", "0.7112308", "0.7109725", "0.71084905", "0.71055764", "0.70995593", "0.7098301", "0.7096311", "0.70935965", "0.70935965", "0.7086441", "0.7082852", "0.70806813", "0.70801675", "0.7073609", "0.70681775", "0.7061872", "0.7060011", "0.7059868", "0.70513153", "0.7037599", "0.7037599", "0.7036033", "0.70353055", "0.70353055", "0.70322436", "0.70304227", "0.70294935", "0.70187974" ]
0.0
-1
instanciar objetos modelo y vista
public static void main(String[] args) { ClienteView vista = new ClienteView(); Cliente modelo = llenarDatosCliente(); // se crea un objeto controlados y se le pasa // un model y un view ClienteControlador controller = new ClienteControlador(modelo, vista); // se muestra los datos del cliente controller.actualizaVista(); // actualizamos un cliente y mostramos los datos de nuevo controller.SetNombre("Felipe mistico"); controller.SetApellido("Magia"); controller.setId(6543); controller.actualizaVista(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "private static void generModeloDePrueba() {\n\t\tCSharpArchIdPackageImpl.init();\n // Retrieve the default factory singleton\n\t\tCSharpArchIdFactory factory = CSharpArchIdFactory.eINSTANCE;\n // create an instance of myWeb\n\t\tModel modelo = factory.createModel();\n\t\tmodelo.setName(\"Prueba\"); \n // create a page\n\t\tCompileUnit cu = factory.createCompileUnit();\n\t\tcu.setName(\"archivo.cs\");\n\t\tClassDeclaration clase = factory.createClassDeclaration();\n\t\t//clase.setName(\"Sumar\");\n\t\t//cu.getTypeDeclaration().add(clase);\n modelo.getCompileUnits().add(cu);\n \n Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;\n Map<String, Object> m = reg.getExtensionToFactoryMap();\n m.put(\"model\", new XMIResourceFactoryImpl());\n\n // Obtain a new resource set\n ResourceSet resSet = new ResourceSetImpl();\n\n // create a resource\n Resource resource = resSet.createResource(URI\n .createURI(\"CSharpArchId.model\"));\n // Get the first model element and cast it to the right type, in my\n // example everything is hierarchical included in this first node\n resource.getContents().add(modelo);\n\n // now save the content.\n try {\n resource.save(Collections.EMPTY_MAP);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\t\t\n // and so on, and so on\n // as you can see the EMF model can be (more or less) used as standard Java\n\t}", "public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}", "public void crearModelo() {\r\n\t\tmodelo = new DefaultComboBoxModel<>();\r\n\t\tmodelo.addElement(\"Rojo\");\r\n\t\tmodelo.addElement(\"Verde\");\r\n\t\tmodelo.addElement(\"Azul\");\r\n\t\tmodelo.addElement(\"Morado\");\r\n\t}", "public MVCModelo()\n\t{\n\t\ttablaChaining=new HashSeparateChaining<String, TravelTime>(20000000);\n\t\ttablaLineal = new TablaHashLineal<String, TravelTime>(20000000);\n\t}", "private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}", "public void crearModelo() {\n modeloagr = new DefaultTableModel(null, columnasAgr) {\n public boolean isCellEditable(int fila, int columna) {\n return false;\n }\n };\n tbl.llenarTabla(AgendarA.tblAgricultor, modeloagr, columnasAgr.length, \"SELECT idPersonalExterno,cedula,CONCAT(nombres,' ',apellidos),municipios.nombre,telefono,telefono2,telefono3 FROM personalexterno,municipios WHERE tipo='agricultor' AND personalexterno.idMunicipio=municipios.idMunicipio\");\n tbl.alinearHeaderTable(AgendarA.tblAgricultor, headerColumnas);\n tbl.alinearCamposTable(AgendarA.tblAgricultor, camposColumnas);\n tbl.rowNumberTabel(AgendarA.tblAgricultor);\n }", "public AfiliadoVista() {\r\n }", "public static void main(String[] args) {\n ArrayList<String> tab = new ArrayList<>();\n tab.add(\"First\");\n tab.add(\"Hello\");\n tab.add(\"Last\");\n //Creation du modele\n LeModele leModele = new LeModele(tab);\n\n //Creation du controleur\n LeControleur leControleur = new LeControleur(leModele);\n\n //Creation de la vue\n LaVue laVue = new LaVue(leControleur);\n\n\n //Test\n\n\n }", "public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}", "CsticModel createInstanceOfCsticModel();", "public TabellaModel() {\r\n lista = new Lista();\r\n elenco = new Vector<Persona>();\r\n elenco =lista.getElenco();\r\n values = new String[elenco.size()][3];\r\n Iterator<Persona> iterator = elenco.iterator();\r\n while (iterator.hasNext()) {\r\n\t\t\tfor (int i = 0; i < elenco.size(); i++) {\r\n\t\t\t\tpersona = new Persona();\r\n\t\t\t\tpersona = (Persona) iterator.next();\r\n\t\t\t\tvalues[i][0] = persona.getNome();\r\n\t\t\t\tvalues[i][1] = persona.getCognome();\r\n\t\t\t\tvalues[i][2] = persona.getTelefono();\t\r\n\t\t\t}\r\n\t\t}\r\n setDataVector(values, columnNames);\t\r\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "DataModel createDataModel();", "public CrearQuedadaVista() {\n }", "Foco createFoco();", "public ControladorVentanaDatosOperador(Modelo modelo) throws SQLException {\n this.modelo = modelo;\n ventanaAgregarOperador = new VentanaDatosOperador();\n ventanaEditarOperador = new VentanaDatosOperador();\n registrarListeners();\n }", "public Vista() {\n initComponents();\n modelo = new DefaultTableModel();\n listamascota = new ArrayList<>();\n\n }", "Klassenstufe createKlassenstufe();", "InstanceModel createInstanceOfInstanceModel();", "public void cargarModelo() {\n\t}", "public Vehiculo() {\r\n }", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}", "public Alojamiento() {\r\n\t}", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "EisModel createEisModel();", "public LocalResidenciaColaborador() {\n //ORM\n }", "public Prova() {}", "public void inicializar();", "public MVCModelo()\n\t{\n\t\tqueueMonthly = new Queue();\n\t\tqueueHourly = new Queue();\n\t\tstackWeekly = new Stack();\n\t}", "public Model() {\r\n\t\t\tsuper();\r\n\t\t\tdao=new SerieADAO();\r\n\t\t\tthis.mapSeason=new HashMap<>();\r\n\t\t\tthis.mapTeam=new HashMap<>();\r\n\t\t\tthis.mapTeamBySeason=new HashMap<>();\r\n\t\t\tthis.mapMatch=new HashMap<>();\r\n\t\t\tthis.mapMatchBySeason=new HashMap<>();\r\n\r\n\t\r\n\t\t}", "public Kullanici() {}", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public Venda() {\n }", "private void cargarModelo() {\n dlmLibros = new DefaultListModel<>();\n listaLibros.setModel(dlmLibros);\n }", "public void init() {\r\n\t\tlog.info(\"init()\");\r\n\t\tobjIncidencia = new IncidenciaSie();\r\n\t\tobjObsIncidencia = new ObservacionIncidenciaSie();\r\n\t\tobjCliente = new ClienteSie();\r\n\t\tobjTelefono = new TelefonoPersonaSie();\r\n\t}", "public PersonaFisica() {}", "public vistaAlojamientos() {\n initComponents();\n \n try {\n miConn = new Conexion(\"jdbc:mysql://localhost/turismo\", \"root\", \"\");\n ad = new alojamientoData(miConn);\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(vistaAlojamientos.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "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 }", "private void prepare()\n {\n Victoria victoria = new Victoria();\n addObject(victoria,190,146);\n Salir salir = new Salir();\n addObject(salir,200,533);\n Volver volver = new Volver();\n addObject(volver,198,401);\n }", "public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponedor1 = new Reponedor(\"Juan\", 3);\n empleados.put(reponedor1.getID(), reponedor1);\n Producto producto1 = new Producto(\"Platano\", 10, 8);\n productos.add(producto1);\n Perecedero perecedero1 = new Perecedero(LocalDateTime.now(), \"Yogurt\", 10, 8);\n }", "public static Modelo insertModelo(String NOMB_MODELO){\n Modelo miModelo = new Modelo(NOMB_MODELO);\n miModelo.registrarModelo();\n return miModelo;\n }", "public MorteSubita() {\n }", "private void init() {\n\t\tthis.model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);\n\t\tthis.model.setNsPrefixes(INamespace.NAMSESPACE_MAP);\n\n\t\t// create classes and properties\n\t\tcreateClasses();\n\t\tcreateDatatypeProperties();\n\t\tcreateObjectProperties();\n\t\t// createFraktionResources();\n\t}", "Compuesta createCompuesta();", "Operacion createOperacion();", "public Persona(){\n \n }", "public Persona(){\n \n }", "public Oveja() {\r\n this.nombreOveja = \"Oveja\";\r\n }", "public Exercicio(){\n \n }", "public ModeloMenuBase() {\n\t\tinicializar();\n\t}", "public Modello() {\r\n super();\r\n initComponents();\r\n setModalita(APPEND_QUERY);\r\n setFrameTable(tabModello);\r\n setNomeTabella(\"vmodello\");\r\n tMarcaDescrizione.setEnabled(false);\r\n }", "public Pila () {\n raiz=null; //Instanciar un objeto tipo nodo;\n }", "Objet getObjetAlloue();", "public void createProbleem() throws InstantiationException,\n\t\t\tIllegalAccessException {\n\n\t\tMapViewer viewer = getViewer();\n\t\tMapContext context = viewer.getConfiguration().getContext();\n\n\t\tif (getMelding().getProbleem() != null) {\n\t\t\tmodelRepository.evictObject(getMelding().getProbleem());\n\t\t}\n\t\tprobleem = null;\n\t\tif (\"bord\".equals(probleemType)) {\n\n\t\t\tif (trajectType.endsWith(\"Route\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"RouteBordProbleem\", null);\n\n\t\t\t} else if (trajectType.contains(\"Netwerk\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"NetwerkBordProbleem\", null);\n\n\t\t\t}\n\n\t\t\t// Itereren over de lagen en de correcte lagen selecteerbaar zetten\n\t\t\tfor (FeatureMapLayer layer : context.getFeatureLayers()) {\n\t\t\t\tlayer.set(\"selectable\", false);\n\n\t\t\t\tif (layer.getLayerId().equalsIgnoreCase(trajectType + \"Bord\")) {\n\t\t\t\t\tlayer.set(\"selectable\", true);\n\t\t\t\t\tlayer.set(\"selectionMode\", FeatureSelectionMode.SINGLE);\n\t\t\t\t\tlayer.setSelection(new ArrayList<String>(1));\n\n\t\t\t\t} else if (layer.getLayerId().equalsIgnoreCase(\n\t\t\t\t\t\ttrajectType.replace(\"Segment\", \"\") + \"Bord\")) {\n\t\t\t\t\tlayer.set(\"selectable\", true);\n\t\t\t\t\tlayer.set(\"selectionMode\", FeatureSelectionMode.SINGLE);\n\t\t\t\t\tlayer.setSelection(new ArrayList<String>(1));\n\n\t\t\t\t} else if (layer.getLayerId().contains(\"Knooppunt\")) {\n\t\t\t\t\tlayer.set(\"selectable\", false);\n\t\t\t\t\tlayer.setSelection(Collections.EMPTY_LIST);\n\t\t\t\t}\n\n\t\t\t\telse if (layer.getLayerId().equalsIgnoreCase(\n\t\t\t\t\t\tGEOMETRY_LAYER_NAME)) {\n\t\t\t\t\tlayer.setHidden(true);\n\t\t\t\t\t((GeometryListFeatureMapLayer) layer)\n\t\t\t\t\t\t\t.setGeometries(Collections.EMPTY_LIST);\n\t\t\t\t} else {\n\t\t\t\t\tlayer.set(\"selectable\", false);\n\t\t\t\t\tlayer.setSelection(Collections.EMPTY_LIST);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (\"ander\".equals(probleemType)) {\n\n\t\t\tif (trajectType.endsWith(\"Route\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"RouteAnderProbleem\", null);\n\n\t\t\t} else if (trajectType.contains(\"Netwerk\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"NetwerkAnderProbleem\", null);\n\t\t\t}\n\n\t\t\tfor (FeatureMapLayer layer : context.getFeatureLayers()) {\n\n\t\t\t\t// Geometrie laag\n\t\t\t\tif (layer.getLayerId().equalsIgnoreCase(GEOMETRY_LAYER_NAME)) {\n\t\t\t\t\tlayer.setHidden(false);\n\t\t\t\t\tlayer.set(\"selectable\", true);\n\t\t\t\t\tlayer.set(\"editable\", true);\n\t\t\t\t\t((GeometryListFeatureMapLayer) layer)\n\t\t\t\t\t\t\t.setGeometries(new ArrayList<Geometry>(1));\n\t\t\t\t}\n\n\t\t\t\t// Indien NetwerkSegment laag laag op selecteerbaar zetten\n\t\t\t\telse if (layer.getLayerId().equalsIgnoreCase(trajectType)) {\n\t\t\t\t\tlayer.set(\"selectable\", true);\n\t\t\t\t\tlayer.set(\"selectionMode\", FeatureSelectionMode.SINGLE);\n\t\t\t\t\tlayer.setSelection(new ArrayList<String>(1));\n\n\t\t\t\t} else {\n\t\t\t\t\tlayer.set(\"selectable\", false);\n\t\t\t\t\tlayer.setSelection(Collections.EMPTY_LIST);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tgetMelding().setProbleem(probleem);\n\t\tviewer.updateContext(null);\n\t}", "public void crearVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n modeloCarro.crearCarro( (clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n }", "public Veiculo() {\r\n\r\n }", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "public TipoDocumentoMB() {\n tipoDoc = new TipoDocPersona();\n }", "public Producto (){\n\n }", "Motivo create(Motivo motivo);", "public Nodo(datos libro)\n {\n this.libro=libro;//LA VARIABLE LIBRO TENDRA LOS DATOS DE LA CLASE LIBRO\n }", "public VistaInicial crearventanaInicial(){\n if(vistaInicial==null){\n vistaInicial = new VistaInicial();\n }\n return vistaInicial;\n }", "Oracion createOracion();", "public Producto() {\r\n }", "private void crearObjetos() {\n // crea los botones\n this.btnOK = new CCButton(this.OK);\n this.btnOK.setActionCommand(\"ok\");\n this.btnOK.setToolTipText(\"Confirmar la Operación\");\n \n this.btnCancel = new CCButton(this.CANCEL);\n this.btnCancel.setActionCommand(\"cancel\");\n this.btnCancel.setToolTipText(\"Cancelar la Operación\");\n \n // Agregar los eventos a los botones\n this.btnOK.addActionListener(this);\n this.btnCancel.addActionListener(this);\n }", "public PersonaVO() {\n }", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n modelo = new Modelo();\r\n }", "Obligacion createObligacion();", "public Persona() {\n\t}", "private Parser() {\n objetos = new ListaEnlazada();\n }", "public Caso_de_uso () {\n }", "Compleja createCompleja();", "private void inicializarVista() {\n this.vista.jtfNombreRol.setText(this.modelo.getRol().getDescripcion());\n this.vista.jbAgregar.setEnabled(false);\n this.vista.jbQuitar.setEnabled(false);\n this.vista.jtPermisosDisponibles.setModel(modelo.obtenerAccesosDispon());\n this.vista.jtPermisosSeleccionados.setModel(modelo.obtenerAccesoSelecc());\n Utilities.c_packColumn.packColumns(this.vista.jtPermisosDisponibles, 1);\n Utilities.c_packColumn.packColumns(this.vista.jtPermisosSeleccionados, 1);\n }", "public Transportista() {\n }", "public GestorDeConseptos() {\n initComponents();\n service=new InformeService(); \n m=new ConseptoTableModel();\n this.jTable1.setModel(m);\n cuentas=new Vector<ConseptoEnCuenta>();\n }", "public CadastrarMarcasModelos() {\n initComponents();\n }", "public ControllerProtagonista() {\n\t}", "public Laboratorio() {}", "public Corso() {\n\n }", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "public Persona() {\n \t\n }", "public prueba()\r\n {\r\n }", "public Persona() {\n }", "public Candidatura (){\n \n }", "public FiltroMicrorregiao() {\r\n }", "public Test(){\n calcula = new Calculadora();\n estaBien = \"ERROR\";\n funciona = \"SI\";\n lista = new ArrayList<String>();\n }", "public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedia();\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public ABMServicio(ControladoraVisual unaControladora) {\n initComponents();\n unaControladoraVisual = unaControladora;\n modelo.addColumn(\"ID\");\n modelo.addColumn(\"Nombre\");\n modelo.addColumn(\"Descripcion\");\n modelo.addColumn(\"Precio\");\n cargarTabla();\n }" ]
[ "0.7099208", "0.67760843", "0.6723387", "0.66961485", "0.6647664", "0.66123736", "0.6511574", "0.65050715", "0.64063436", "0.6399991", "0.6351632", "0.63340294", "0.63189244", "0.63186884", "0.63175243", "0.6291254", "0.6243146", "0.62420154", "0.6241474", "0.6218133", "0.6208492", "0.6201655", "0.6201188", "0.61876553", "0.6184997", "0.6154364", "0.61543214", "0.61543214", "0.61543214", "0.61543214", "0.61543214", "0.61543214", "0.61543214", "0.61535966", "0.6149744", "0.6147867", "0.6127926", "0.6122051", "0.61120284", "0.6106832", "0.61062336", "0.60905236", "0.6086148", "0.6074357", "0.6073285", "0.6069874", "0.6068102", "0.60587645", "0.6055379", "0.60543597", "0.60525644", "0.60489535", "0.6042017", "0.60400295", "0.60333747", "0.60317254", "0.60317254", "0.60258853", "0.6017258", "0.60151106", "0.6012148", "0.6011365", "0.6010199", "0.6008659", "0.60085046", "0.60077345", "0.60076225", "0.60038114", "0.5998947", "0.59959203", "0.59918433", "0.598946", "0.59816086", "0.5979483", "0.5976089", "0.5964003", "0.595495", "0.5952823", "0.5941679", "0.59348285", "0.59341615", "0.59263307", "0.59259987", "0.5924959", "0.5919034", "0.59182376", "0.59126735", "0.59103614", "0.59094644", "0.58949137", "0.5887996", "0.58850986", "0.58831346", "0.5875236", "0.5866593", "0.58662736", "0.5865423", "0.58621085", "0.5855045", "0.585278", "0.5846711" ]
0.0
-1
metodo estatico que retorna el cliente con todos sus datos
private static Cliente llenarDatosCliente() { Cliente cliente1 = new Cliente(); cliente1.setApellido("De Assis"); cliente1.setDni(368638373); cliente1.setNombre("alexia"); cliente1.setId(100001); return cliente1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Cliente> consultarClientes();", "public ArrayList<Cliente> listarClientes(){\n ArrayList<Cliente> ls = new ArrayList<Cliente>();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, idioma, categoria FROM clientes\";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial.\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n Cliente cl = new Cliente();\n cl.setCodigo(rs.getInt(\"codigo\"));\n cl.setNit(rs.getString(\"nit\"));\n cl.setRazonSocial(rs.getString(\"razonsocial\"));\n cl.setCategoria(rs.getString(\"categoria\"));\n cl.setEmail(rs.getString(\"email\"));\n Calendar cal = new GregorianCalendar();\n cal.setTime(rs.getDate(\"fecharegistro\")); \n cl.setFechaRegistro(cal.getTime());\n cl.setIdioma(rs.getString(\"idioma\"));\n cl.setPais(rs.getString(\"pais\"));\n\t\t\tls.add(cl);\n\t\t}\n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n } \n return ls;\n\t}", "public List<Clientes> read(){\n Connection con = ConectionFactory.getConnection();\n PreparedStatement pst = null;\n ResultSet rs = null;\n \n List<Clientes> cliente = new ArrayList<>();\n \n try {\n pst = con.prepareStatement(\"SELECT * from clientes ORDER BY fantasia\");\n rs = pst.executeQuery();\n \n while (rs.next()) { \n Clientes clientes = new Clientes();\n clientes.setCodigo(rs.getInt(\"codigo\"));\n clientes.setFantasia(rs.getString(\"fantasia\"));\n clientes.setCep(rs.getString(\"cep\"));\n clientes.setUf(rs.getString(\"uf\"));\n clientes.setLogradouro(rs.getString(\"logradouro\"));\n clientes.setNr(rs.getString(\"nr\"));\n clientes.setCidade(rs.getString(\"cidade\"));\n clientes.setBairro(rs.getString(\"bairro\"));\n clientes.setContato(rs.getString(\"contato\"));\n clientes.setEmail(rs.getString(\"email\"));\n clientes.setFixo(rs.getString(\"fixo\"));\n clientes.setCelular(rs.getString(\"celular\"));\n clientes.setObs(rs.getString(\"obs\"));\n cliente.add(clientes); \n }\n } catch (SQLException ex) {\n \n }finally{\n ConectionFactory.closeConnection(con, pst, rs);\n }\n return cliente;\n}", "public ArrayList<DataCliente> listarClientes();", "public ArrayList<Cliente> obtClientes(){\n return (ArrayList<Cliente>) clienteRepositori.findAll();\n }", "public List<Cliente> getClientes() {\n List<Cliente> cli = new ArrayList<>();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"src/Archivo/archivo.txt\"));\n String record;\n\n while ((record = br.readLine()) != null) {\n\n StringTokenizer st = new StringTokenizer(record, \",\");\n \n String id = st.nextToken();\n String nombreCliente = st.nextToken();\n String nombreEmpresa = st.nextToken();\n String ciudad = st.nextToken();\n String deuda = st.nextToken();\n String precioVentaSaco = st.nextToken();\n\n Cliente cliente = new Cliente(\n Integer.parseInt(id),\n nombreCliente,\n nombreEmpresa,\n ciudad,\n Float.parseFloat(deuda),\n Float.parseFloat(precioVentaSaco)\n );\n\n cli.add(cliente);\n }\n\n br.close();\n } catch (Exception e) {\n System.err.println(e);\n }\n\n return cli;\n }", "public Client buscarClientePorId(String id){\n Client client = new Client();\n \n // Faltaaaa\n \n \n \n \n \n return client;\n }", "public static ArrayList<Cliente> getClientes()\n {\n return SimulaDB.getInstance().getClientes();\n }", "public ArrayList<Cliente> listaDeClientes() {\n\t\t\t ArrayList<Cliente> misClientes = new ArrayList<Cliente>();\n\t\t\t Conexion conex= new Conexion();\n\t\t\t \n\t\t\t try {\n\t\t\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM clientes\");\n\t\t\t ResultSet res = consulta.executeQuery();\n\t\t\t while(res.next()){\n\t\t\t \n\t\t\t int cedula_cliente = Integer.parseInt(res.getString(\"cedula_cliente\"));\n\t\t\t String nombre= res.getString(\"nombre_cliente\");\n\t\t\t String direccion = res.getString(\"direccion_cliente\");\n\t\t\t String email = res.getString(\"email_cliente\");\n\t\t\t String telefono = res.getString(\"telefono_cliente\");\n\t\t\t Cliente persona= new Cliente(cedula_cliente, nombre, direccion, email, telefono);\n\t\t\t misClientes.add(persona);\n\t\t\t }\n\t\t\t res.close();\n\t\t\t consulta.close();\n\t\t\t conex.desconectar();\n\t\t\t \n\t\t\t } catch (Exception e) {\n\t\t\t //JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\n\t\t\t\t System.out.println(\"No se pudo consultar la persona\\n\"+e);\t\n\t\t\t }\n\t\t\t return misClientes; \n\t\t\t }", "private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}", "public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}", "@Override\n\tpublic List<Cliente> readAll() {\n\t\treturn clientedao.readAll();\n\t}", "private Cliente obtenerCliente(Long oidCliente, Solicitud solicitud)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerCliente(Long oidCliente,\"\n +\"Solicitud solicitud):Entrada\");\n\n /*Descripcion: este metodo retorna un objeto de la clase Cliente\n con todos sus datos recuperados.\n\n Implementacion:\n\n 1- Invocar al metodo obtenerDatosGeneralesCliente pasandole por\n parametro el oidCliente. Este metodo retornara un objeto de la clase\n Cliente el cual debe ser asignado a la propiedad cliente de la \n Solicitud.\n 2- Invocar al metodo obtenerTipificacionesCliente pasandole por\n parametro el objeto cliente. Este metodo creara un array de objetos\n de la clase TipificacionCliente el cual asignara al atributo\n tipificacionCliente del cliente pasado por parametro.\n 3- Invocar al metodo obtenerHistoricoEstatusCliente pasandole por\n parametro el objeto cliente. Este metodo asignara un array de objetos\n de la clase HistoricoEstatusCliente al atributo \n historicoEstatusCliente\n del cliente pasado por parametro.\n 4- Invocar al metodo obtenerPeriodosConPedidosCliente pasandole por\n parametro el objeto cliente. Este metodo asignara un array de objetos\n de la clase Periodo al atributo periodosConPedidos del cliente pasado\n por parametro.\n 5- Invocar al metodo obtenerClienteRecomendante pasandole por\n parametro el objeto cliente. Este metodo asignara un objeto de la\n calse ClienteRecomendante al atributo clienteRecomendante del cliente\n recibido por parametro.\n 6- Invocar al metodo obtenerDatosGerentes pasandole por parametro el\n objeto cliente.\n */\n\n //1\n Cliente cliente = this.obtenerDatosGeneralesCliente(oidCliente, \n solicitud.getPeriodo());\n solicitud.setCliente(cliente);\n\n //2\n UtilidadesLog.debug(\"****obtenerCliente 1****\");\n this.obtenerTipificacionesCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 2****\");\n\n //3\n this.obtenerHistoricoEstatusCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 3****\");\n\n //4\n this.obtenerPeriodosConPedidosCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 4****\");\n\n //5\n //jrivas 4/7/2005\n //Inc 16978 \n this.obtenerClienteRecomendante(cliente, solicitud.getOidPais());\n\n // 5.1\n // JVM - sicc 20070237, calling obtenerClienteRecomendado\n this.obtenerClienteRecomendado(cliente, solicitud.getOidPais());\n\n //6\n this.obtenerDatosGerentes(cliente, solicitud.getPeriodo());\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Salio de obtenerCliente - DAOSolicitudes\");\n \n // vbongiov 22/9/2005 inc 20940\n cliente.setIndRecomendante(this.esClienteRecomendante(cliente.getOidCliente(), solicitud.getPeriodo()));\n\n // jrivas 30/8//2006 inc DBLG5000839\n cliente.setIndRecomendado(this.esClienteRecomendado(cliente.getOidCliente(), solicitud.getPeriodo()));\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerCliente(Long oidCliente, \"\n +\"Solicitud solicitud):Salida\");\n return cliente;\n }", "@Override\n\tpublic List<Cliente> listarClientes() {\n\t\treturn clienteDao.findAll();\n\t}", "public List<ClienteDto> recuperaTodos(){\n\t\tList<ClienteDto> clientes = new ArrayList<ClienteDto>();\n\t\tclienteRepository.findAll().forEach(cliente -> clientes.add(ClienteDto.creaDto(cliente)));\n\t\treturn clientes;\n\t}", "private Cliente obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Entrada\");\n \n StringBuffer nombreCli = new StringBuffer();\n\n // crear cliente\n Cliente cliente = new Cliente();\n cliente.setOidCliente(oidCliente);\n\n // completar oidEstatus\n BigDecimal oidEstatus = null;\n\n {\n BelcorpService bs1;\n RecordSet respuesta1;\n String codigoError1;\n StringBuffer query1 = new StringBuffer();\n\n try {\n bs1 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n try {\n query1.append(\" SELECT CLIE_OID_CLIE, \");\n query1.append(\" ESTA_OID_ESTA_CLIE \");\n query1.append(\" FROM MAE_CLIEN_DATOS_ADICI \");\n query1.append(\" WHERE CLIE_OID_CLIE = \" + oidCliente);\n respuesta1 = bs1.dbService.executeStaticQuery(query1.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta1 \" + respuesta1);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n if (respuesta1.esVacio()) {\n cliente.setOidEstatus(null);\n } else {\n oidEstatus = (BigDecimal) respuesta1\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatus((oidEstatus != null) ? new Long(\n oidEstatus.longValue()) : null);\n }\n }\n // completar oidEstatusFuturo\n {\n BelcorpService bs2;\n RecordSet respuesta2;\n String codigoError2;\n StringBuffer query2 = new StringBuffer();\n\n try {\n bs2 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n try {\n query2.append(\" SELECT OID_ESTA_CLIE, \");\n query2.append(\" ESTA_OID_ESTA_CLIE \");\n query2.append(\" FROM MAE_ESTAT_CLIEN \");\n query2.append(\" WHERE OID_ESTA_CLIE = \" + oidEstatus);\n respuesta2 = bs2.dbService.executeStaticQuery(query2.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta2 \" + respuesta2); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n if (respuesta2.esVacio()) {\n cliente.setOidEstatusFuturo(null);\n } else {\n {\n BigDecimal oidEstatusFuturo = (BigDecimal) respuesta2\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatusFuturo((oidEstatusFuturo != null) \n ? new Long(oidEstatusFuturo.longValue()) : null);\n }\n }\n }\n // completar periodoPrimerContacto \n {\n BelcorpService bs3;\n RecordSet respuesta3;\n String codigoError3;\n StringBuffer query3 = new StringBuffer();\n\n try {\n bs3 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n try {\n query3.append(\" SELECT A.CLIE_OID_CLIE, \");\n query3.append(\" A.PERD_OID_PERI, \");\n query3.append(\" B.PAIS_OID_PAIS, \");\n query3.append(\" B.CANA_OID_CANA, \");\n query3.append(\" B.MARC_OID_MARC, \");\n query3.append(\" B.FEC_INIC, \");\n query3.append(\" B.FEC_FINA, \");\n query3.append(\" C.COD_PERI \");\n query3.append(\" FROM MAE_CLIEN_PRIME_CONTA A, \");\n query3.append(\" CRA_PERIO B, \");\n query3.append(\" SEG_PERIO_CORPO C \");\n query3.append(\" WHERE A.CLIE_OID_CLIE = \" + oidCliente);\n query3.append(\" AND A.PERD_OID_PERI = B.OID_PERI \");\n query3.append(\" AND B.PERI_OID_PERI = C.OID_PERI \");\n respuesta3 = bs3.dbService.executeStaticQuery(query3.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta3 \" + respuesta3); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n if (respuesta3.esVacio()) {\n cliente.setPeriodoPrimerContacto(null);\n } else {\n Periodo periodo = new Periodo();\n\n {\n BigDecimal oidPeriodo = (BigDecimal) respuesta3\n .getValueAt(0, \"PERD_OID_PERI\");\n periodo.setOidPeriodo((oidPeriodo != null) \n ? new Long(oidPeriodo.longValue()) : null);\n }\n\n periodo.setCodperiodo((String) respuesta3\n .getValueAt(0, \"COD_PERI\"));\n periodo.setFechaDesde((Date) respuesta3\n .getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuesta3\n .getValueAt(0, \"FEC_FINA\"));\n periodo.setOidPais(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"PAIS_OID_PAIS\")).longValue()));\n periodo.setOidCanal(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"CANA_OID_CANA\")).longValue()));\n periodo.setOidMarca(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"MARC_OID_MARC\")).longValue()));\n cliente.setPeriodoPrimerContacto(periodo);\n }\n }\n // completar AmbitoGeografico\n {\n BelcorpService bs4;\n RecordSet respuesta4;\n String codigoError4;\n StringBuffer query4 = new StringBuffer();\n\n try {\n bs4 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n try {\n //jrivas 29/6/2005\n //Modificado INC. 19479\n SimpleDateFormat sdfFormato = new SimpleDateFormat(\"dd/MM/yyyy\");\n String fechaDesde = sdfFormato.format(peri.getFechaDesde());\n String fechaHasta = sdfFormato.format(peri.getFechaHasta());\n\n query4.append(\" SELECT sub.oid_subg_vent, reg.oid_regi, \");\n query4.append(\" zon.oid_zona, sec.oid_secc, \");\n query4.append(\" terr.terr_oid_terr, \");\n query4.append(\" sec.clie_oid_clie oid_lider, \");\n query4.append(\" zon.clie_oid_clie oid_gerente_zona, \");\n query4.append(\" reg.clie_oid_clie oid_gerente_region, \");\n query4.append(\" sub.clie_oid_clie oid_subgerente \");\n query4.append(\" FROM mae_clien_unida_admin una, \");\n query4.append(\" zon_terri_admin terr, \");\n query4.append(\" zon_secci sec, \");\n query4.append(\" zon_zona zon, \");\n query4.append(\" zon_regio reg, \");\n query4.append(\" zon_sub_geren_venta sub \");\n //jrivas 27/04/2006 INC DBLG50000361\n //query4.append(\" , cra_perio per1, \");\n //query4.append(\" cra_perio per2 \");\n query4.append(\" WHERE una.clie_oid_clie = \" + oidCliente);\n query4.append(\" AND una.ztad_oid_terr_admi = \");\n query4.append(\" terr.oid_terr_admi \");\n query4.append(\" AND terr.zscc_oid_secc = sec.oid_secc \");\n query4.append(\" AND sec.zzon_oid_zona = zon.oid_zona \");\n query4.append(\" AND zon.zorg_oid_regi = reg.oid_regi \");\n query4.append(\" AND reg.zsgv_oid_subg_vent = \");\n query4.append(\" sub.oid_subg_vent \");\n //jrivas 27/04/2006 INC DBLG50000361\n query4.append(\" AND una.perd_oid_peri_fin IS NULL \");\n \n // sapaza -- PER-SiCC-2013-0960 -- 03/09/2013\n //query4.append(\" AND una.ind_acti = 1 \");\n \n /*query4.append(\" AND una.perd_oid_peri_fin = \");\n query4.append(\" AND una.perd_oid_peri_ini = per1.oid_peri \");\n query4.append(\" per2.oid_peri(+) \");\n query4.append(\" AND per1.fec_inic <= TO_DATE ('\" + \n fechaDesde + \"', 'dd/MM/yyyy') \");\n query4.append(\" AND ( per2.fec_fina IS NULL OR \");\n query4.append(\" per2.fec_fina >= TO_DATE ('\" + fechaHasta \n + \"', 'dd/MM/yyyy') ) \");*/\n\n respuesta4 = bs4.dbService.executeStaticQuery(query4.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"respuesta4: \" + respuesta4);\n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n Gerente lider = new Gerente();\n Gerente gerenteZona = new Gerente();\n Gerente gerenteRegion = new Gerente();\n Gerente subGerente = new Gerente();\n\n if (respuesta4.esVacio()) {\n cliente.setAmbitoGeografico(null);\n } else {\n AmbitoGeografico ambito = new AmbitoGeografico();\n ambito.setOidSubgerencia(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBG_VENT\")).longValue()));\n ambito.setOidRegion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_REGI\")).longValue()));\n ambito.setOidZona(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_ZONA\")).longValue()));\n ambito.setOidSeccion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SECC\")).longValue()));\n\n //jrivas 29/6/2005\n //Modificado INC. 19479\n ambito.setOidTerritorio(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"TERR_OID_TERR\")).longValue()));\n\n if (respuesta4.getValueAt(0, \"OID_LIDER\") != null) {\n lider.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_LIDER\")).longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_ZONA\") != null) {\n gerenteZona.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_GERENTE_ZONA\")).longValue()));\n ;\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_REGION\") != null) {\n gerenteRegion.setOidCliente(new Long(((BigDecimal) \n respuesta4.getValueAt(0, \"OID_GERENTE_REGION\"))\n .longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_SUBGERENTE\") != null) {\n subGerente.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBGERENTE\")).longValue()));\n }\n\n ambito.setLider(lider);\n ambito.setGerenteZona(gerenteZona);\n ambito.setGerenteRegion(gerenteRegion);\n ambito.setSubgerente(subGerente);\n\n cliente.setAmbitoGeografico(ambito);\n }\n }\n // completar nombre\n {\n BelcorpService bs5;\n RecordSet respuesta5;\n String codigoError5;\n StringBuffer query5 = new StringBuffer();\n\n try {\n bs5 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n try {\n query5.append(\" SELECT OID_CLIE, \");\n query5.append(\" VAL_APE1, \");\n query5.append(\" VAL_APE2, \");\n query5.append(\" VAL_NOM1, \");\n query5.append(\" VAL_NOM2 \");\n query5.append(\" FROM MAE_CLIEN \");\n query5.append(\" WHERE OID_CLIE = \" + oidCliente.longValue());\n respuesta5 = bs5.dbService.executeStaticQuery(query5.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta5 \" + respuesta5);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n if (respuesta5.esVacio()) {\n cliente.setNombre(null);\n } else {\n \n if(respuesta5.getValueAt(0, \"VAL_NOM1\")!=null) {\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_NOM2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM2\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE1\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE2\"));\n }\n \n cliente.setNombre(nombreCli.toString());\n }\n }\n\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Salida\");\n return cliente;\n }", "@Override\r\n public List<Cliente> listarClientes() throws Exception {\r\n Query consulta = entity.createNamedQuery(Cliente.CONSULTA_TODOS_CLIENTES);\r\n List<Cliente> listaClientes = consulta.getResultList();//retorna una lista\r\n return listaClientes;\r\n }", "@Override\n\tpublic ArrayList<ClienteBean> listarClientes() throws Exception {\n\t\treturn null;\n\t}", "public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}", "public List<Cliente> getClientes() {\n\t\ttry {\n\t\t\t\n\t\t\tList<Cliente> clientes = (List<Cliente>) db.findAll();\n\t\t\t\t\t\n\t\t\treturn clientes;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ArrayList<Cliente>();\n\n\t\t}\n\t}", "@Override\n\tpublic List<Cliente> getAll() throws ExceptionUtil {\n\t\treturn null;\n\t}", "public ObservableList<Cliente> getClienteData() {\r\n return clienteData;\r\n }", "public ArrayList<Cliente> getClientes() {\r\n return clientes;\r\n }", "@Override\n\tpublic List<Cliente> getAll() {\n\t\treturn null;\n\t}", "public List<Usuario> obtenerTodosLosClientes() {\n return this.usuarioFacade.obtenerTodosLosClientes();\n }", "public static List<ClientesVO> listarClientes() throws Exception {\r\n\r\n List<ClientesVO> vetorClientes = new ArrayList<ClientesVO>();\r\n\r\n try {\r\n ConexaoDAO.abreConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n try {\r\n\r\n //Construçao do objeto Statement e ligaçao com a variavel de conexao\r\n stClientes = ConexaoDAO.connSistema.createStatement();\r\n\r\n //SELECT NO BANCO\r\n String sqlLista = \"Select * from clientes\";\r\n\r\n //Executando select e armazenando dados no ResultSet\r\n rsClientes = stClientes.executeQuery(sqlLista);\r\n\r\n while (rsClientes.next()) {//enquanto houver clientes\r\n ClientesVO tmpCliente = new ClientesVO();\r\n\r\n tmpCliente.setIdCliente(rsClientes.getInt(\"id_cliente\"));\r\n tmpCliente.setCodigo(rsClientes.getInt(\"cod_cliente\"));\r\n tmpCliente.setNome(rsClientes.getString(\"nome_cliente\"));\r\n tmpCliente.setCidade(rsClientes.getString(\"cid_cliente\"));\r\n tmpCliente.setTelefone(rsClientes.getString(\"tel_cliente\"));\r\n\r\n vetorClientes.add(tmpCliente);\r\n\r\n }\r\n\r\n } catch (Exception erro) {\r\n throw new Exception(\"Falha na listagem de dados. Verifique a sintaxe da instruçao SQL\\nErro Original:\" + erro.getMessage());\r\n }\r\n\r\n try {\r\n ConexaoDAO.fechaConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n return vetorClientes;\r\n }", "@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}", "public ListaCliente() {\n\t\tClienteRepositorio repositorio = FabricaPersistencia.fabricarCliente();\n\t\tList<Cliente> clientes = null;\n\t\ttry {\n\t\t\tclientes = repositorio.getClientes();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tclientes = new ArrayList<Cliente>();\n\t\t}\n\t\tObject[][] grid = new Object[clientes.size()][3];\n\t\tfor (int ct = 0; ct < clientes.size(); ct++) {\n\t\t\tgrid[ct] = new Object[] {clientes.get(ct).getNome(),\n\t\t\t\t\tclientes.get(ct).getEmail()};\n\t\t}\n\t\tJTable table= new JTable(grid, new String[] {\"NOME\", \"EMAIL\"});\n\t\tJScrollPane scroll = new JScrollPane(table);\n\t\tgetContentPane().add(scroll, BorderLayout.CENTER);\n\t\tsetTitle(\"Clientes Cadastrados\");\n\t\tsetSize(600,400);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t}", "public ClienteConsultas() {\n listadeClientes = new ArrayList<>();\n clienteSeleccionado = new ArrayList<>();\n }", "public DTOCliente obtenerCliente(DTOOID oid) throws MareException {\n UtilidadesLog.info(\" DAOMAEMaestroClientes.obtenerCliente(DTOOID): Entrada\");\n\n Boolean bUsaGEOREFERENCIADOR = Boolean.FALSE;\n MONMantenimientoSEG mms;\n DTOCliente dtosalida = new DTOCliente();\n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n RecordSet resultado = new RecordSet();\n RecordSet rTipoSubtipo = null;\n RecordSet rIdentificacion = null;\n RecordSet rClienteMarca = null;\n RecordSet rClasificacion = null;\n RecordSet rVinculo = null;\n RecordSet rPreferencias = null;\n RecordSet rObservacion = null;\n RecordSet rComunicaciones = null;\n RecordSet rTarjetas = null;\n RecordSet rProblemaSolucion = null;\n RecordSet rPsicografia = null;\n StringBuffer query = new StringBuffer();\n \n\n try {\n\n DTOCrearClienteBasico dto = new DTOCrearClienteBasico();\n \n query.append(\" SELECT oid_clie_tipo_subt, vtipo.val_i18n, vsubtipo.val_i18n, \");\n query.append(\" ticl_oid_tipo_clie, sbti_oid_subt_clie, ind_ppal \");\n query.append(\" FROM mae_clien_tipo_subti t, \");\n query.append(\" v_gen_i18n_sicc vtipo, \");\n query.append(\" v_gen_i18n_sicc vsubtipo \");\n query.append(\" WHERE t.clie_oid_clie = \" + oid.getOid());\n query.append(\" AND vtipo.attr_enti = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND vtipo.idio_oid_idio = \" + oid.getOidIdioma());\n query.append(\" AND vtipo.attr_num_atri = 1 \");\n query.append(\" AND vtipo.val_oid = t.ticl_oid_tipo_clie \");\n query.append(\" AND vsubtipo.attr_enti = 'MAE_SUBTI_CLIEN' \");\n query.append(\" AND vsubtipo.idio_oid_idio = \" + oid.getOidIdioma());\n query.append(\" AND vsubtipo.attr_num_atri = 1 \");\n query.append(\" AND vsubtipo.val_oid = t.sbti_oid_subt_clie \");\n query.append(\" ORDER BY t.ind_ppal DESC \");\n rTipoSubtipo = bs.dbService.executeStaticQuery(query.toString());\n\n dto.setRTipoSubtipoCliente(rTipoSubtipo);\n\n //DTOIdentificacion[]\n query = new StringBuffer();\n\n query.append(\" SELECT oid_clie_iden, tdoc_oid_tipo_docu, \");\n query.append(\" num_docu_iden, num_docu_iden, \");\n query.append(\" decode (val_iden_docu_prin, 1, 'S', 'N'), val_iden_pers_empr \");\n query.append(\" FROM mae_clien_ident i \");\n query.append(\" WHERE i.clie_oid_clie = \" + oid.getOid()); \n\n rIdentificacion = bs.dbService.executeStaticQuery(query.toString());\n\n dto.setRIdentificacionCliente(rIdentificacion);\n\n query = new StringBuffer();\n query.append(\" select COD_CLIE, COD_DIGI_CTRL, VAL_APE1, VAL_APE2, VAL_APEL_CASA, VAL_NOM1, \");\n query.append(\" VAL_NOM2, VAL_TRAT, COD_SEXO, FEC_INGR, FOPA_OID_FORM_PAGO \");\n query.append(\" from MAE_CLIEN \");\n query.append(\" where OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (resultado.getRowCount() > 0) {\n dto.setCodigoCliente((String) resultado.getValueAt(0, 0));\n dto.setDigitoControl((String) resultado.getValueAt(0, 1));\n dto.setApellido1((String) resultado.getValueAt(0, 2));\n dto.setApellido2((String) resultado.getValueAt(0, 3));\n dto.setApellidoCasada((String) resultado.getValueAt(0, 4));\n dto.setNombre1((String) resultado.getValueAt(0, 5));\n dto.setNombre2((String) resultado.getValueAt(0, 6));\n dto.setTratamiento((String) resultado.getValueAt(0, 7));\n dto.setSexo((String) resultado.getValueAt(0, 8));\n dto.setFechaIngreso((Date) resultado.getValueAt(0, 9));\n\n BigDecimal formPago = (BigDecimal) resultado.getValueAt(0, 10);\n\n if (formPago != null) {\n dto.setFormaPago(new Long(formPago.longValue()));\n }\n }\n\n //DTOClienteMarca[]\n query = new StringBuffer();\n query.append(\" select OID_CLIE_MARC, MARC_OID_MARC, IND_PPAL \");\n query.append(\" from MAE_CLIEN_MARCA \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n /* rClienteMarca = bs.dbService.executeStaticQuery(query.toString()); */\n resultado = bs.dbService.executeStaticQuery(query.toString()); \n\n DTOClienteMarca[] dtots2 = new DTOClienteMarca[resultado.getRowCount()];\n DTOClienteMarca dtos2;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos2 = new DTOClienteMarca();\n dtos2.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos2.setMarca(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n dtos2.setPrincipal((((BigDecimal) resultado.getValueAt(i, 2)).toString()).equals(\"1\") ? Boolean.TRUE : Boolean.FALSE);\n dtots2[i] = dtos2;\n }\n\n dto.setMarcas(dtots2);\n /* dto.setRClienteMarca(rClienteMarca); */\n \n\n //DTOClasificacionCliente[]\n query = new StringBuffer();\n\n query.append(\" SELECT c.oid_clie_clas, marca.des_marc, v3.val_i18n, v1.val_i18n, \");\n query.append(\" v2.val_i18n, v4.val_i18n, v5.val_i18n, p.marc_oid_marc, \");\n query.append(\" p.cana_oid_cana, ticl_oid_tipo_clie, t.sbti_oid_subt_clie, \");\n query.append(\" c.tccl_oid_tipo_clasi, c.clas_oid_clas, c.ind_ppal \");\n query.append(\" FROM mae_clien_clasi c, \");\n query.append(\" cra_perio p, \");\n query.append(\" mae_clien_tipo_subti t, \");\n query.append(\" v_gen_i18n_sicc v1, \");\n query.append(\" v_gen_i18n_sicc v2, \");\n query.append(\" seg_marca marca, \");\n query.append(\" v_gen_i18n_sicc v3, \");\n query.append(\" v_gen_i18n_sicc v4, \");\n query.append(\" v_gen_i18n_sicc v5 \");\n query.append(\" WHERE c.perd_oid_peri = p.oid_peri \");\n query.append(\" AND t.oid_clie_tipo_subt = c.ctsu_oid_clie_tipo_subt \");\n query.append(\" AND t.clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND t.ticl_oid_tipo_clie = v1.val_oid \");\n query.append(\" AND p.marc_oid_marc = marca.oid_marc \");\n query.append(\" AND p.cana_oid_cana = v3.val_oid \");\n query.append(\" AND v3.attr_num_atri = 1 \");\n query.append(\" AND v3.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v3.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND t.ticl_oid_tipo_clie = v1.val_oid \");\n query.append(\" AND v1.attr_num_atri = 1 \");\n query.append(\" AND v1.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v1.attr_enti = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND t.sbti_oid_subt_clie = v2.val_oid \");\n query.append(\" AND v2.attr_num_atri = 1 \");\n query.append(\" AND v2.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v2.attr_enti = 'MAE_SUBTI_CLIEN' \");\n query.append(\" AND c.tccl_oid_tipo_clasi = v4.val_oid \");\n query.append(\" AND v4.attr_num_atri = 1 \");\n query.append(\" AND v4.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v4.attr_enti = 'MAE_TIPO_CLASI_CLIEN' \");\n query.append(\" AND c.clas_oid_clas = v5.val_oid \");\n query.append(\" AND v5.attr_num_atri = 1 \");\n query.append(\" AND v5.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v5.attr_enti = 'MAE_CLASI' \");\n query.append(\" ORDER BY c.ind_ppal DESC \");\n\n /* rClasificacion = bs.dbService.executeStaticQuery(query.toString());*/\n resultado = bs.dbService.executeStaticQuery(query.toString());\n int cantClasi = resultado.getRowCount();\n UtilidadesLog.debug(\"cantidad de Clasificaciones_\" + cantClasi);\n DTOClasificacionCliente[] dtots3 = new DTOClasificacionCliente[0];\n DTOClasificacionCliente dtos3;\n \n if (!resultado.esVacio()) {\n dtots3 = new DTOClasificacionCliente[cantClasi];\n for (int i = 0; i < cantClasi; i++) {\n dtos3 = new DTOClasificacionCliente();\n dtos3.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos3.setMarcaDesc((String) resultado.getValueAt(i, 1));\n dtos3.setCanalDesc((String) resultado.getValueAt(i, 2));\n dtos3.setTipoDesc((String) resultado.getValueAt(i, 3));\n dtos3.setSubtipoDesc((String) resultado.getValueAt(i, 4));\n dtos3.setTipoClasificacionDesc((String) resultado.getValueAt(i, 5));\n dtos3.setClasificacionDesc((String) resultado.getValueAt(i, 6));\n\n dtos3.setMarca(new Long(((BigDecimal) resultado.getValueAt(i, 7)).longValue()));\n dtos3.setCanal(new Long(((BigDecimal) resultado.getValueAt(i, 8)).longValue()));\n dtos3.setTipo(new Long(((BigDecimal) resultado.getValueAt(i, 9)).longValue()));\n dtos3.setSubtipo(new Long(((BigDecimal) resultado.getValueAt(i, 10)).longValue()));\n dtos3.setTipoClasificacion(new Long(((BigDecimal) resultado.getValueAt(i, 11)).longValue()));\n dtos3.setClasificacion(new Long(((BigDecimal) resultado.getValueAt(i, 12)).longValue()));\n dtos3.setPrincipal((((BigDecimal) resultado.getValueAt(i, 13)).toString()).equals(\"1\") ? Boolean.TRUE : Boolean.FALSE);\n dtots3[i] = dtos3;\n }\n } else {\n UtilidadesLog.debug(\"sin clasificaciones\");\n // BELC300023061 - 04/07/2006\n // Si no se obtuvo ninguna clasificacion para el cliente en la consulta anterior, \n // insertar una fila en el atributo clasificaciones, con el indicador principal activo, \n // sólo con la marca y el canal\n query = new StringBuffer();\n \n query.append(\" SELECT null OID_CLIE_CLAS, mar.DES_MARC, iCa.VAL_I18N, \");\n query.append(\" null VAL_I18N, null VAL_I18N, null VAL_I18N, null VAL_I18N,\t\");\n query.append(\" per.MARC_OID_MARC, per.CANA_OID_CANA, \");\n query.append(\" null TICL_OID_TIPO_CLIE, null SBTI_OID_SUBT_CLIE, null TCCL_OID_TIPO_CLASI, null CLAS_OID_CLAS, null IND_PPAL \");\n query.append(\" FROM MAE_CLIEN_UNIDA_ADMIN uA, \");\n query.append(\" CRA_PERIO per, \t\");\n query.append(\" SEG_MARCA mar, \");\n query.append(\" V_GEN_I18N_SICC iCa \");\n query.append(\" WHERE uA.CLIE_OID_CLIE = \" + oid.getOid().toString());\n query.append(\" AND uA.IND_ACTI = 1 \");\n query.append(\" AND uA.PERD_OID_PERI_INI = per.OID_PERI \");\n query.append(\" AND per.MARC_OID_MARC = mar.OID_MARC \");\n query.append(\" AND per.CANA_OID_CANA = iCa.VAL_OID \");\n query.append(\" AND iCa.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND iCa.ATTR_ENTI = 'SEG_CANAL' \");\n query.append(\" AND iCa.IDIO_OID_IDIO = \" + oid.getOidIdioma().toString());\n query.append(\" ORDER BY uA.OID_CLIE_UNID_ADMI ASC \");\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n \n if (!resultado.esVacio()) {\n dtos3 = new DTOClasificacionCliente();\n dtos3.setMarcaDesc((String) resultado.getValueAt(0, 1));\n dtos3.setCanalDesc((String) resultado.getValueAt(0, 2));\n dtos3.setMarca(new Long(((BigDecimal) resultado.getValueAt(0, 7)).longValue()));\n dtos3.setCanal(new Long(((BigDecimal) resultado.getValueAt(0, 8)).longValue()));\n dtos3.setPrincipal(Boolean.TRUE);\n \n dtots3 = new DTOClasificacionCliente[1];\n dtots3[0] = dtos3; \n }\n }\n \n dto.setClasificaciones(dtots3);\n \n /*dto.setRClasificacionCliente(rClasificacion);*/\n\n MONMantenimientoSEGHome mmsHome = SEGEjbLocators.getMONMantenimientoSEGHome();\n mms = mmsHome.create();\n bUsaGEOREFERENCIADOR = mms.usaGeoreferenciador(oid.getOidPais());\n dto.setUsaGeoreferenciador(bUsaGEOREFERENCIADOR);\n\n dtosalida.setBase(dto);\n\n //criterioBusqueda 1 y 2 queda a null\n dtosalida.setCriterioBusqueda1(null);\n dtosalida.setCriterioBusqueda2(null);\n\n //oid: dto.oid \n dtosalida.setOid(oid.getOid());\n\n //-fechaNacimiento, codigoEmpleado, nacionalidad, estadoCivil, \n //ocupacion, profesion, centroTrabajo, cargo, nivelEstudios, centroEstudios, \n //numeroHijos, personasDependientes, NSEP, cicloVida, deseaCorrespondencia, \n //cicloVida, deseaCorrespondencia, importeIngresos \n query = new StringBuffer();\n query.append(\" select FEC_NACI, COD_EMPL, IND_ACTI,SNON_OID_NACI, ESCV_OID_ESTA_CIVI, VAL_OCUP, VAL_PROF, \");\n query.append(\" VAL_CENT_TRAB, VAL_CARG_DESE, NIED_OID_NIVE_ESTU, VAL_CENT_ESTU, \");\n query.append(\" NUM_HIJO, NUM_PERS_DEPE, NSEP_OID_NSEP, TCLV_OID_CICL_VIDA, IND_CORR, IMP_INGR_FAMI \");\n query.append(\" from MAE_CLIEN_DATOS_ADICI \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (resultado.getRowCount() > 0) {\n dtosalida.setFechaNacimiento((Date) resultado.getValueAt(0, 0));\n dtosalida.setCodigoEmpleado((String) resultado.getValueAt(0, 1));\n //SICC-DMCO-MAE-GCC-006 - Cleal\n dtosalida.setIndicadorActivo((resultado.getValueAt(0, 2) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 2)).longValue()) : null);\n \n \n dtosalida.setNacionalidad((resultado.getValueAt(0, 3) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 3)).longValue()) : null);\n dtosalida.setEstadoCivil((resultado.getValueAt(0, 4) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 4)).longValue()) : null);\n \n dtosalida.setOcupacion((String) resultado.getValueAt(0, 5));\n\n dtosalida.setProfesion((String) resultado.getValueAt(0, 6));\n dtosalida.setCentroTrabajo((String) resultado.getValueAt(0, 7));\n dtosalida.setCargo((String) resultado.getValueAt(0, 8));\n dtosalida.setNivelEstudios((resultado.getValueAt(0, 9) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 9)).longValue()) : null);\n dtosalida.setCentroEstudios((String) resultado.getValueAt(0, 10));\n dtosalida.setNumeroHijos((resultado.getValueAt(0, 11) != null) ? new Byte(((BigDecimal) resultado.getValueAt(0, 11)).byteValue()) : null);\n dtosalida.setPersonasDependientes((resultado.getValueAt(0, 12) != null) ? new Byte(((BigDecimal) resultado.getValueAt(0, 12)).byteValue()) : null);\n dtosalida.setNSEP((resultado.getValueAt(0, 13) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 13)).longValue()) : null);\n dtosalida.setCicloVida((resultado.getValueAt(0, 14) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 14)).longValue()) : null);\n\n BigDecimal corres = (BigDecimal) resultado.getValueAt(0, 15);\n Boolean correspondencia = null;\n\n if (corres != null) {\n if (corres.toString().equals(\"1\")) {\n correspondencia = Boolean.TRUE;\n } else {\n correspondencia = Boolean.FALSE;\n }\n }\n\n dtosalida.setDeseaCorrespondencia(correspondencia);\n dtosalida.setImporteIngresos((resultado.getValueAt(0, 16) != null) ? new Double(((BigDecimal) resultado.getValueAt(0, 16)).doubleValue()) : null);\n \n }\n\n //DTOVinculo[]\n query = new StringBuffer();\n\n\n /* \n * Cambios a restriccion por xxx_vnte y vndo hechas por ssantana, \n * 07/04/2006, porque no tenian mucho sentido como estaban antes \n */ \n query.append(\" SELECT oid_clie_vinc, c.cod_clie, \");\n query.append(\" tivc_oid_tipo_vinc, fec_desd, fec_hast, \");\n query.append(\" ind_vinc_ppal \");\n query.append(\" FROM mae_clien_vincu, mae_tipo_vincu tv, seg_pais p, mae_clien c \");\n /*inicio modificado ciglesias 17/11/2006 incidencia 24377*/\n query.append(\" WHERE clie_oid_clie_vndo = \" + oid.getOid());\n query.append(\" AND mae_clien_vincu.tivc_oid_tipo_vinc = tv.oid_tipo_vinc \");\n query.append(\" AND mae_clien_vincu.clie_oid_clie_vnte = c.oid_clie \");\n /*fin modificado ciglesias 17/11/2006 incidencia 24377*/\n query.append(\" AND tv.pais_oid_pais = p.oid_pais \");\n query.append(\" ORDER BY ind_vinc_ppal DESC \");\n\n rVinculo = bs.dbService.executeStaticQuery(query.toString());\n\n\n \n dtosalida.setRVinculo(rVinculo);\n\n //DTOPreferencia[]\t\t\t\n query = new StringBuffer();\n query.append(\" select OID_CLIE_PREF, TIPF_OID_TIPO_PREF, DES_CLIE_PREF \");\n query.append(\" from MAE_CLIEN_PREFE \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n rPreferencias = bs.dbService.executeStaticQuery(query.toString());\n\n dtosalida.setRPreferencia(rPreferencias);\n\n //DTOObservacion[]\t\t\t\n query = new StringBuffer();\n query.append(\" select OID_OBSE, MARC_OID_MARC, NUM_OBSE, VAL_TEXT \");\n query.append(\" from MAE_CLIEN_OBSER \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n rObservacion = bs.dbService.executeStaticQuery(query.toString());\n\n dtosalida.setRObservaciones(rObservacion);\n\n //paisContactado, clienteContactado, oidClienteContactado, tipoClienteContactado, \n //tipoContacto, fechaPrimerContacto, fechaSiguienteContacto, fechaPrimerPedidoContacto\n query = new StringBuffer();\n\n // Nueva query by ssantana\n query.append(\" SELECT c.pais_oid_pais, c.cod_clie, t.clie_oid_clie, t.ticl_oid_tipo_clie, \");\n query.append(\" p.cod_tipo_cont, p.fec_cont, p.fec_sigu_cont, canal.oid_cana, \");\n query.append(\" marca.oid_marc, perio.oid_peri \");\n query.append(\" FROM mae_clien c, \");\n query.append(\" mae_clien_tipo_subti t, \");\n query.append(\" mae_clien_prime_conta p, \");\n query.append(\" seg_canal canal, \");\n query.append(\" seg_marca marca, \");\n query.append(\" cra_perio perio \");\n query.append(\" WHERE p.ctsu_clie_cont = t.oid_clie_tipo_subt \");\n query.append(\" AND t.clie_oid_clie = c.oid_clie \");\n query.append(\" AND p.clie_oid_clie = \" + oid.getOid().toString());\n \n // modif. - splatas - 25/10/2006 - DBLG700000168\n // query.append(\" AND t.ind_ppal = 1 \");\n \n query.append(\" AND p.cana_oid_cana = canal.oid_cana(+) \");\n query.append(\" AND p.marc_oid_marc = marca.oid_marc(+) \");\n query.append(\" AND p.perd_oid_peri = perio.oid_peri(+) \");\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (resultado.getRowCount() > 0) {\n BigDecimal buffer = null;\n dtosalida.setPaisContactado(new Long(((BigDecimal) resultado.getValueAt(0, 0)).longValue()));\n dtosalida.setClienteContactado((String) resultado.getValueAt(0, 1));\n dtosalida.setOidClienteContactado(new Long(((BigDecimal) resultado.getValueAt(0, 2)).longValue()));\n dtosalida.setTipoClienteContactado(new Long(((BigDecimal) resultado.getValueAt(0, 3)).longValue()));\n dtosalida.setTipoContacto((String) (resultado.getValueAt(0, 4)));\n dtosalida.setFechaPrimerContacto((Date) resultado.getValueAt(0, 5));\n dtosalida.setFechaSiguienteContacto((Date) resultado.getValueAt(0, 6));\n\n buffer = (BigDecimal) resultado.getValueAt(0, 7); // Canal Contacto\n\n if (buffer != null) {\n dtosalida.setCanalContacto(Long.valueOf(buffer.toString()));\n } else {\n dtosalida.setCanalContacto(null);\n }\n\n buffer = (BigDecimal) resultado.getValueAt(0, 8); // Marca Contacto\n\n if (buffer != null) {\n dtosalida.setMarcaContacto(new Long(buffer.longValue()));\n } else {\n dtosalida.setMarcaContacto(null);\n }\n\n buffer = (BigDecimal) resultado.getValueAt(0, 9); // Periodo Contacto\n\n if (buffer != null) {\n dtosalida.setPeriodoContacto(new Long(buffer.longValue()));\n } else {\n dtosalida.setPais(null);\n }\n }\n\n //tipoClienteContacto\n query = new StringBuffer();\n query.append(\" SELECT TICL_OID_TIPO_CLIE \");\n query.append(\" FROM MAE_CLIEN_TIPO_SUBTI \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" AND IND_PPAL = 1 \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (resultado.getRowCount() > 0) {\n dtosalida.setTipoClienteContacto(new Long(((BigDecimal) resultado.getValueAt(0, 0)).longValue()));\n }\n\n // DTODirecciones\n resultado = new RecordSet();\n UtilidadesLog.debug(\" Direcciones \");\n /*\n query = new StringBuffer();\n query.append(\" SELECT dir.OID_CLIE_DIRE, dir.TIDC_OID_TIPO_DIRE, dir.TIVI_OID_TIPO_VIA, \");\n query.append(\" val.OID_VALO_ESTR_GEOP, dir.ZVIA_OID_VIA, dir.NUM_PPAL, dir.VAL_COD_POST, \");\n query.append(\" dir.VAL_OBSE, dir.IND_DIRE_PPAL, dir.VAL_NOMB_VIA, val.DES_GEOG \");\n query.append(\" FROM MAE_CLIEN_DIREC dir, ZON_VALOR_ESTRU_GEOPO val, ZON_TERRI terr \");\n query.append(\" WHERE dir.CLIE_OID_CLIE = \" + oid.getOid() + \" AND \");\n query.append(\" dir.TERR_OID_TERR = terr.OID_TERR AND \");\n query.append(\" terr.VEPO_OID_VALO_ESTR_GEOP = val.OID_VALO_ESTR_GEOP \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n UtilidadesLog.info(\"resulado Dir: \" + resultado.toString());\n */\n if(Boolean.FALSE.equals(bUsaGEOREFERENCIADOR)){\n UtilidadesLog.debug(\"*** No usa GEO\");\n resultado = obtieneDireccionSinGEOModificar(oid);\n } else{\n UtilidadesLog.debug(\"*** Usa GEO\");\n resultado = obtieneDireccionConGEOModificar(oid);\n }\n if (resultado.getRowCount() == 0) {\n dto.setDirecciones(null);\n } else {\n int cantFilas = resultado.getRowCount();\n DTODireccion[] arrayDirecciones = new DTODireccion[cantFilas];\n DTODireccion dir = null;\n\n for (int i = 0; i < cantFilas; i++) {\n dir = new DTODireccion();\n\n if (resultado.getValueAt(i, 0) == null) {\n dir.setOid(null);\n } else {\n dir.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n }\n\n if (resultado.getValueAt(i, 1) == null) {\n dir.setTipoDireccion(null);\n } else {\n dir.setTipoDireccion(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n }\n\n if (resultado.getValueAt(i, 2) == null) {\n dir.setTipoVia(null);\n } else {\n dir.setTipoVia(new Long(((BigDecimal) resultado.getValueAt(i, 2)).longValue()));\n }\n\n if (resultado.getValueAt(i, 3) == null) {\n dir.setUnidadGeografica(null);\n } else {\n dir.setUnidadGeografica(new Long(((BigDecimal) resultado.getValueAt(i, 3)).longValue()));\n }\n\n if (resultado.getValueAt(i, 4) == null) {\n dir.setVia(null);\n } else {\n dir.setVia(new Long(((BigDecimal) resultado.getValueAt(i, 4)).longValue()));\n }\n\n if (resultado.getValueAt(i, 5) == null) {\n dir.setNumeroPrincipal(null);\n } else {\n /*\n * V-PED001 - dmorello, 06/10/2006\n * Cambio el tipo de numeroPrincipal de Integer a String\n */\n //dir.setNumeroPrincipal(new Integer(resultado.getValueAt(i, 5).toString()));\n dir.setNumeroPrincipal(resultado.getValueAt(i, 5).toString());\n }\n\n if (resultado.getValueAt(i, 6) == null) {\n dir.setCodigoPostal(null);\n } else {\n dir.setCodigoPostal(resultado.getValueAt(i, 6).toString());\n }\n\n if (resultado.getValueAt(i, 7) == null) {\n dir.setObservaciones(null);\n } else {\n dir.setObservaciones(resultado.getValueAt(i, 7).toString());\n }\n\n if (resultado.getValueAt(i, 8) == null) {\n dir.setEsDireccionPrincipal(null);\n } else {\n if (((BigDecimal) resultado.getValueAt(i, 8)).longValue() == 1) {\n dir.setEsDireccionPrincipal(new Boolean(true));\n } else {\n dir.setEsDireccionPrincipal(new Boolean(false));\n }\n }\n\n if (resultado.getValueAt(i, 9) == null) {\n dir.setNombreVia(null);\n } else {\n dir.setNombreVia(resultado.getValueAt(i, 9).toString());\n }\n\n if (resultado.getValueAt(i, 10) == null) {\n dir.setNombreUnidadGeografica(null);\n } else {\n dir.setNombreUnidadGeografica(resultado.getValueAt(i, 10).toString());\n }\n\n //UtilidadesLog.debug(\"bucle \" + i + \": \" + dir.toString());\n arrayDirecciones[i] = dir;\n }\n\n dto.setDirecciones(arrayDirecciones);\n }\n\n //DTOCliente\n //base: metemos el DTOCrearClienteBasico creado anteriormente \n dtosalida.setBase(dto);\n\n //DTOComunicacion[]\t\t\t\n query = new StringBuffer();\n /*query.append(\" SELECT OID_CLIE_COMU, TICM_OID_TIPO_COMU, VAL_DIA_COMU, VAL_TEXT_COMU, \");\n query.append(\" to_char(FEC_HORA_DESD, 'HH24:MI'), to_char(FEC_HORA_HAST, 'HH24:MI'), VAL_INTE_COMU, IND_COMU_PPAL \");\n query.append(\" FROM MAE_CLIEN_COMUN \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");*/\n \n query.append(\" SELECT oid_clie_comu, ticm_oid_tipo_comu, val_dia_comu, val_text_comu, \");\n query.append(\" ind_comu_ppal, TO_CHAR (fec_hora_desd, 'HH24:MI'), \");\n query.append(\" TO_CHAR (fec_hora_hast, 'HH24:MI'), val_inte_comu \");\n query.append(\" FROM mae_clien_comun \");\n query.append(\" WHERE clie_oid_clie = \" + oid.getOid()); \n query.append(\" order by ind_comu_ppal desc \");\n rComunicaciones = bs.dbService.executeStaticQuery(query.toString());\n /*resultado = bs.dbService.executeStaticQuery(query.toString());\n\n DTOComunicacion[] dtots7 = new DTOComunicacion[resultado.getRowCount()];\n DTOComunicacion dtos7;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos7 = new DTOComunicacion();\n dtos7.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos7.setTipoComunicacion(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n\n String diaComu = (String) resultado.getValueAt(i, 2);\n\n if ((diaComu != null) && !(diaComu.equals(\"\"))) {\n dtos7.setDiaComunicacion(new Character(diaComu.toCharArray()[0]));\n }\n\n dtos7.setTextoComunicacion((String) resultado.getValueAt(i, 3));\n\n String sHoraDesde = (String) resultado.getValueAt(i, 4);\n String sHoraHasta = (String) resultado.getValueAt(i, 5);\n\n UtilidadesLog.debug(\"HoraDesde: \" + sHoraDesde);\n UtilidadesLog.debug(\"HoraHasta: \" + sHoraHasta);\n\n SimpleDateFormat simpleDateHora = new SimpleDateFormat(\"HH:mm\");\n\n if ((sHoraDesde != null) && !sHoraDesde.equals(\"\")) {\n java.util.Date dateHoraDesde = simpleDateHora.parse(sHoraDesde);\n UtilidadesLog.debug(\"dateHoraDesde: \" + dateHoraDesde.toString());\n UtilidadesLog.debug(\"dateHoraDesde Long: \" + dateHoraDesde.getTime());\n\n Long longHoraDesde = new Long(dateHoraDesde.getTime());\n dtos7.setHoraDesde(longHoraDesde);\n }\n\n if ((sHoraHasta != null) && !sHoraHasta.equals(\"\")) {\n java.util.Date dateHoraHasta = simpleDateHora.parse(sHoraHasta);\n UtilidadesLog.debug(\"dateHoraHasta: \" + dateHoraHasta.toString());\n UtilidadesLog.debug(\"dateHoraHasta Long: \" + dateHoraHasta.getTime());\n\n Long longHoraHasta = new Long(dateHoraHasta.getTime());\n dtos7.setHoraHasta(longHoraHasta);\n }\n\n BigDecimal interva = (BigDecimal) resultado.getValueAt(i, 6);\n Boolean intervaloComuni = null;\n\n if (interva != null) {\n if (interva.toString().equals(\"1\")) {\n intervaloComuni = Boolean.TRUE;\n } else {\n intervaloComuni = Boolean.FALSE;\n }\n }\n\n dtos7.setIntervaloComunicacion(intervaloComuni);\n\n BigDecimal pric = (BigDecimal) resultado.getValueAt(i, 7);\n Boolean principal = null;\n\n if (pric != null) {\n if (pric.toString().equals(\"1\")) {\n principal = Boolean.TRUE;\n } else {\n principal = Boolean.FALSE;\n }\n }\n\n dtos7.setPrincipal(principal);\n dtots7[i] = dtos7;\n }\n \n dtosalida.setComunicaciones(dtots7); */\n dtosalida.setRComunicaciones(rComunicaciones);\n\n //DTOTarjeta[]\t\t\t\n query = new StringBuffer();\n query.append(\" SELECT OID_CLIE_TARJ, TITR_OID_TIPO_TARJ, CLTA_OID_CLAS_TARJ, CBAN_OID_BANC \");\n query.append(\" FROM MAE_CLIEN_TARJE \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n /* rTarjetas = bs.dbService.executeStaticQuery(query.toString()); */\n\n resultado= bs.dbService.executeStaticQuery(query.toString());\n DTOTarjeta[] dtots8 = new DTOTarjeta[resultado.getRowCount()];\n DTOTarjeta dtos8;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos8 = new DTOTarjeta();\n dtos8.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos8.setTipo(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n dtos8.setClase((resultado.getValueAt(i, 2) != null) ? new Long(((BigDecimal) resultado.getValueAt(i, 2)).longValue()) : null);\n dtos8.setBanco((resultado.getValueAt(i, 3) != null) ? new Long(((BigDecimal) resultado.getValueAt(i, 3)).longValue()) : null);\n dtots8[i] = dtos8;\n }\n\n dtosalida.setTarjetas(dtots8);\n /*dtosalida.setRTarjeta(rTarjetas);*/\n\n //DTOProblemaSolucion\n query = new StringBuffer();\n query.append(\" SELECT OID_CLIE_PROB, DES_PROB, IND_SOLU, \");\n query.append(\" VAL_NEGO_PROD, TIPB_OID_TIPO_PROB, DES_SOLU, TSOC_OID_TIPO_SOLU \");\n query.append(\" FROM MAE_CLIEN_PROBL \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n\n /* rProblemaSolucion = bs.dbService.executeStaticQuery(query.toString()); */\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n DTOProblemaSolucion[] dtots9 = new DTOProblemaSolucion[resultado.getRowCount()];\n DTOProblemaSolucion dtos9;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos9 = new DTOProblemaSolucion();\n dtos9.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos9.setDescripcionProblema((String) resultado.getValueAt(i, 1));\n\n // dtos9.setSolucion(new Boolean((String) (resultado.getValueAt(i, 2))));\n if (resultado.getValueAt(i, 2) != null) {\n \n Long ind = null;\n ind = new Long(((BigDecimal) resultado.getValueAt(i, 2)).longValue());\n\n if (ind.intValue() == 1) {\n dtos9.setSolucion(new Boolean(true));\n } else {\n dtos9.setSolucion(new Boolean(false));\n }\n\n //Boolean valor = new Boolean( ((String)resultado.getValueAt(i, 2)).equals(\"1\") );\n }\n\n \n dtos9.setNegocio((String) resultado.getValueAt(i, 3));\n dtos9.setTipoProblema((resultado.getValueAt(i, 4) != null) ? new Long(((BigDecimal) resultado.getValueAt(i, 4)).longValue()) : null);\n dtos9.setDescripcionSolucion((String) resultado.getValueAt(i, 5));\n dtos9.setTipoSolucion((resultado.getValueAt(i, 6) != null) ? new Long(((BigDecimal) resultado.getValueAt(i, 6)).longValue()) : null);\n\n dtots9[i] = dtos9;\n }\n\n dtosalida.setProblemasSoluciones(dtots9);\n /* dtosalida.setRProblemaSolucion(rProblemaSolucion);*/\n\n //DTOPsicografia\n query = new StringBuffer();\n query.append(\" SELECT OID_PSIC, MARC_OID_MARC, TPOID_TIPO_PERF_PSIC, COD_TEST, FEC_PSIC \");\n query.append(\" FROM MAE_PSICO \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n /* rPsicografia = bs.dbService.executeStaticQuery(query.toString());*/\n \n resultado = bs.dbService.executeStaticQuery(query.toString());\n DTOPsicografia[] dtots10 = new DTOPsicografia[resultado.getRowCount()];\n DTOPsicografia dtos10;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos10 = new DTOPsicografia();\n dtos10.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos10.setMarca(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n dtos10.setTipoPerfil(new Long(((BigDecimal) resultado.getValueAt(i, 2)).longValue()));\n dtos10.setCodigoTest((String) (resultado.getValueAt(i, 3)));\n dtos10.setFecha((Date) (resultado.getValueAt(i, 4)));\n dtots10[i] = dtos10;\n }\n\n dtosalida.setPsicografias(dtots10);\n /* dtosalida.setRPsicografia(rPsicografia);*/\n } catch (CreateException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (RemoteException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (Exception e) {\n e.printStackTrace();\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n UtilidadesLog.debug(\"dtoSalida ObtenerCliente: \" + dtosalida);\n UtilidadesLog.info(\" DAOMAEMaestroClientes.obtenerCliente(DTOOID): Salida\");\n\n return dtosalida;\n }", "@Override\n\tpublic List<Cliente> getByIdCliente(long id) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> clients =getCurrentSession().createQuery(\"from Cliente c join fetch c.grupos grupos join fetch grupos.clientes where c.id='\"+id+\"' and c.activo=1\" ).list();\n return clients;\n\t}", "public List<ClienteEmpresa> obtenerTodosLosClientes() {\n return this.clienteEmpresaFacade.findAll();\n }", "@Override\n\t@Transactional\n\tpublic List<Cliente> getAll(Long idCliente) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> client =getCurrentSession().createQuery(\"from Cliente where activo=true and id='\"+idCliente+\"'\").list();\n \treturn client;\n\t}", "private void obtenerClienteRecomendado(Cliente clienteParametro, Long oidPais) throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Entrada\");\n\n BelcorpService bsInc = null;\n RecordSet respuestaInc = null;\n StringBuffer queryInc = new StringBuffer();\n ArrayList lstRecomendados;\n\n if ( clienteParametro.getClienteRecomendante() != null){\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"oidClienteRecomendante=\"+clienteParametro.getClienteRecomendante().getRecomendante());\n }\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n try {\n queryInc.append(\" SELECT \");\n queryInc.append(\" CLIE_OID_CLIE_VNDO CLIE_OID_CLIE, \");\n queryInc.append(\" FEC_DESD FEC_INIC, \");\n queryInc.append(\" FEC_HAST FEC_FINA \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n queryInc.append(\" AND CLIE_OID_CLIE_VNDO NOT IN ( \");\n \n // queryInc.append(\" SELECT RDO.CLIE_OID_CLIE, FEC_INIC, FEC_FINA \");\n queryInc.append(\" SELECT DISTINCT RDO.CLIE_OID_CLIE \");\n queryInc.append(\" FROM INC_CLIEN_RECDO RDO, CRA_PERIO, \");\n queryInc.append(\" INC_CLIEN_RECTE RECT \");\n queryInc.append(\" WHERE PERD_OID_PERI = OID_PERI \");\n queryInc.append(\" AND RECT.CLIE_OID_CLIE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND CLR3_OID_CLIE_RETE = OID_CLIE_RETE \");\n \n queryInc.append(\" ) \");\n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n //BelcorpService bsMae = null;\n RecordSet respuestaMae = null;\n //StringBuffer queryMae = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n \n boolean hayRecomendado = false;\n Cliente clienteLocal = new Cliente();\n lstRecomendados = clienteParametro.getClienteRecomendado();\n\n if (!respuestaInc.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnINC(true);\n \n /* vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n * no lleno lstRecomendados con estos valores solo mantengo el indicador IndRecomendadosEnINC \n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaInc.getRowCount();i++){ \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente()); \n \n BigDecimal recomendado = (BigDecimal) respuestaInc.getValueAt(i, \"CLIE_OID_CLIE\");\n clienteRecomendado.setRecomendado((recomendado != null) ? new Long(recomendado.longValue()) : null);\n \n clienteRecomendado.setFechaInicio((Date) respuestaInc.getValueAt(i, \"FEC_INIC\"));\n Date fechaFin = (Date) respuestaInc.getValueAt(i, \"FEC_FINA\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n\n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n }*/\n } \n \n // vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n // \n \n try {\n queryInc = new StringBuffer(); \n queryInc.append(\" SELECT CLIE_OID_CLIE_VNDO, FEC_DESD, FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n\n respuestaMae = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMae \" + respuestaMae); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if (!respuestaMae.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnMAE(true);\n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaMae.getRowCount();i++){ \n \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente());\n\n clienteRecomendado.setRecomendado(new Long(((BigDecimal) \n respuestaMae.getValueAt(i, \"CLIE_OID_CLIE_VNDO\")).longValue()));\n {\n Date fechaInicio = (Date) respuestaMae.getValueAt(i, \"FEC_DESD\");\n clienteRecomendado.setFechaInicio((fechaInicio != null) ? fechaInicio : null);\n }\n\n {\n Date fechaFin = (Date) respuestaMae.getValueAt(i, \"FEC_HAST\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n }\n \n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n \n }\n \n clienteParametro.setClienteRecomendado(lstRecomendados);\n \n } else {\n hayRecomendado = false;\n }\n\n if (!hayRecomendado) {\n clienteParametro.setClienteRecomendado(null);\n }\n \n // JVM, sicc 20070381, if, manejo del Recomendador, bloque de recuparacion de periodo\n if (lstRecomendados.size() > 0)\n { \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n RecordSet respuestaMaeRdr = null;\n\n try { \n queryInc = new StringBuffer();\n queryInc.append(\" SELECT DISTINCT CLIE_OID_CLIE_VNTE , FEC_DESD , FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n respuestaMaeRdr = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMaeRdr \" + respuestaMaeRdr); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n ClienteRecomendante clienteRecomendador = new ClienteRecomendante();\n \n if (!respuestaMaeRdr.esVacio()) {\n \n {\n BigDecimal recomendador = (BigDecimal) respuestaMaeRdr.getValueAt(0, \"CLIE_OID_CLIE_VNTE\");\n clienteRecomendador.setRecomendante((recomendador != null) ? new Long(recomendador.longValue()) : null);\n }\n \n clienteRecomendador.setFechaInicio((Date) respuestaMaeRdr.getValueAt(0, \"FEC_DESD\"));\n // fecha fin de INC\n {\n Date fechaFin = (Date) respuestaMaeRdr.getValueAt(0, \"FEC_HAST\");\n clienteRecomendador.setFechaFin((fechaFin != null)? fechaFin : null);\n }\n \n clienteParametro.setClienteRecomendador(clienteRecomendador);\n }\n \n for (int i=0; i<lstRecomendados.size(); i++){\n\n ClienteRecomendado clienteRecomendados = new ClienteRecomendado(); \n \n clienteRecomendados = (ClienteRecomendado) lstRecomendados.get(i);\n \n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n\n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteRecomendados.getRecomendado()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n\n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n BigDecimal bd;\n \n if (!respuestaInc.esVacio()) {\n\n Periodo periodo = new Periodo();\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n \n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n \n clienteRecomendados.setPeriodo(periodo);\n } \n }\n }\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"lstRecomendados(\"+lstRecomendados.size() + \n \") getIndRecomendadosEnMAE(\"+clienteParametro.getIndRecomendadosEnMAE() +\n \") getIndRecomendadosEnINC(\"+clienteParametro.getIndRecomendadosEnINC() +\")\"); \n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Salida\"); \n \n }", "public List<Client> getAllClient();", "public ArrayList<ModelCliente> getListaClienteDAO() {\n ArrayList<ModelCliente> listamodelCliente = new ArrayList();\n ModelCliente modelCliente = new ModelCliente();\n try {\n this.conectar();\n this.executarSQL(\n \"SELECT \"\n + \"id_cli,\"\n + \"nome_cli,\"\n + \"fone_cli,\"\n + \"celular_cli,\"\n + \"email_cli,\"\n + \"end_cli,\"\n + \"complemento,\"\n + \"bairro,\"\n + \"cidade,\"\n + \"estado,\"\n + \"RG_cli,\"\n + \"cpf_cli\"\n + \" FROM\"\n + \" tbclientes\"\n + \";\"\n );\n while (this.getResultSet().next()) {\n modelCliente = new ModelCliente();\n modelCliente.setId_cli(this.getResultSet().getInt(1));\n modelCliente.setNome_cli(this.getResultSet().getString(2));\n modelCliente.setFone_cli(this.getResultSet().getString(3));\n modelCliente.setCelular_cli(this.getResultSet().getString(4));\n modelCliente.setEmail_cli(this.getResultSet().getString(5));\n modelCliente.setEnd_cli(this.getResultSet().getString(6));\n modelCliente.setComplemento(this.getResultSet().getString(7));\n modelCliente.setBairro(this.getResultSet().getString(8));\n modelCliente.setCidade(this.getResultSet().getString(9));\n modelCliente.setEstado(this.getResultSet().getString(10));\n modelCliente.setRG_cli(this.getResultSet().getString(11));\n modelCliente.setCpf_cli(this.getResultSet().getString(12));\n listamodelCliente.add(modelCliente);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n this.fecharConexao();\n }\n return listamodelCliente;\n }", "public ArrayList<Cliente> getClientes() throws SQLException, Exception {\n\t\tArrayList<Cliente> clientes = new ArrayList<Cliente>();\n\n\t\tString sql = String.format(\"SELECT * FROM %1$s.CLIENTE\", USUARIO);\n\n\t\tPreparedStatement prepStmt = conn.prepareStatement(sql);\n\t\trecursos.add(prepStmt);\n\t\tResultSet rs = prepStmt.executeQuery();\n\n\t\twhile (rs.next()) {\n\t\t\tclientes.add(convertResultSetToCliente(rs));\n\t\t}\n\t\treturn clientes;\n\t}", "@Override\n\tpublic List<Clientes> findAllClientes() throws Exception {\n\t\treturn clienteLogic.findAll();\n\t}", "@GetMapping(\"/clientes\")\r\n\tpublic List<Cliente> listar(){\r\n\t\treturn iClienteServicio.findAll();\r\n\t\t\r\n\t}", "public List<Cliente> mostrarClientes()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\t\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\t//Collections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(method=RequestMethod.GET)\n\tpublic ResponseEntity<List<ClienteDTO>> findAll() {\n\t\tList<Cliente> list = servico.findAll();\n\t\t//Converter essa lista de categorias, para ClienteDTO.\n\t\t//A melhor forma é ir no DTO e criar um construtor que receba o objeto correspondete\n\t\t//Lá das entidades de domínio.\n\t\t//Utilizar o Strem para pecorrer a lista de categorias\n\t\t//O map efetuar uma operação para cada elemento da lista\n\t\t//Vou chamar ela de obj e para cada elemento da minha lista\n\t\t// -> aeroFunction = FUNÇÃO anonima\n\t\t//instaciar a minha categoriaDTO passando o obj como parametro\n\t\t//E depois converter para lista de novo com o collect.\n\t\t\n\t\tList<ClienteDTO> listDto = list.stream().map(obj -> new ClienteDTO(obj)).collect(Collectors.toList());\n\t\t\n\t\treturn ResponseEntity.ok().body(listDto);\n\t}", "public List<Clients> getallClients();", "@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(method=RequestMethod.GET) \n\tpublic ResponseEntity<List<ClienteDTO>> findAll() {\n\t\t\n\t\tList<Cliente> list = service.findAll();\n\t\t\n\t\t//veja que o stream eh para percorrer a lista, o map eh para dizer uma funcao q vai manipular cada elemento da lista\n\t\t//nesse caso, para elemento na lista ele sera passado para a categoriadto \n\t\t//e no fim eh convertida novamente para uma lista\n\t\tList<ClienteDTO> listDTO = list.stream().map(obj->new ClienteDTO(obj)).collect(Collectors.toList());\n\t\t\n\t\t//o ok eh p/ operacao feita com sucesso e o corpo vai ser o obj\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}", "public Cliente getCliente() {\n return objCliente;\n }", "void grabarCliente(){\n RequestParams params = new RequestParams();\n params.put(\"nombre\",edtNombre.getText().toString().trim());\n params.put(\"apellido\",edtApellido.getText().toString().trim());\n params.put(\"correo\", edtCorreo.getText().toString().trim());\n String claveMD5 = edtClave.getText().toString().trim();\n try {\n params.put(\"clave\", ws.getMD5(claveMD5));\n } catch (Exception e) {\n e.printStackTrace();\n }\n params.put(\"id_cargo\",idCargo);\n params.put(\"autoriza\",validarCheckBoxAutoriza());\n crearUsuarioWS(params);\n }", "public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}", "public RepositorioClientesArray() {\n\t\tclientes = new Cliente[TAMANHO_CACHE];\n\t\tindice = 0;\n\t}", "public static MeuResultSet getClientes() throws Exception\n {\n MeuResultSet resultado = null;\n\n try\n {\n String sql;\n\n sql = \"SELECT * \" +\n \"FROM PpCliente\";\n\n BDSQLServer.COMANDO.prepareStatement (sql); //Guarda os comandos\n\n resultado = (MeuResultSet)BDSQLServer.COMANDO.executeQuery (); //Guarda os resultados em uma variável\n }\n catch (SQLException erro)\n {\n throw new Exception (\"Erro ao recuperar clientes\");\n }\n\n return resultado;\n }", "public DAOCliente() {\n\t\trecursos = new ArrayList<Object>();\n\t}", "@Override\r\n\tpublic void buscarCliente(String dato) {\n\t\tList<Cliente> listaEncontrados = clienteDao.buscarContrato(dato);\r\n\t\tvistaCliente.mostrarClientes(listaEncontrados);\r\n\t}", "public List<PedidoIndividual> obtenerCuentaCliente(Long idCliente,String claveMesa) throws QRocksException;", "public Clientes() {\n\t\tclientes = new Cliente[MAX_CLIENTES];\n\t}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<Cliente> buscarId(Integer idcliente) {\n\t\treturn clienteDao.buscarId(idcliente);\n\t}", "public Cliente getCliente() {\n return cliente;\n }", "public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }", "@Override\n\tpublic List<EntidadeDominio> PegarCartoesCliente(EntidadeDominio entidade) throws SQLException {\n\t\treturn null;\n\t}", "public Lista obtenerListaClientesAdicionales(int codigoCuenta)throws SQLException{\r\n\t\tLista listadoCliente=null;\r\n\t\tICuenta daoCliente = new DCuenta();\r\n\t\t\r\n\t\tlistadoCliente = daoCliente.obtenerListadoCuentaAdicional(codigoCuenta);\r\n\t\t\r\n\t\treturn listadoCliente;\r\n\t}", "@Override\n\tpublic List<CLIENTE> listarTodos() {\n\t\t\n\t\tString sql = \"SELECT * FROM CLIENTE\";\n\t\t\n\t\tList<CLIENTE> listaCliente = new ArrayList<CLIENTE>();\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\t\n\t\t\twhile(res.next()){\n\t\t\t\t\n\t\t\t\tcliente = new CLIENTE();\n\t\t\t\tcliente.setNomeCliente(res.getString(\"NOME_CLIENTE\"));\n\t\t\t\t\n\t\t\t\tlistaCliente.add(cliente);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn listaCliente;\n\t}", "private static Cliente generarDatosCliente(boolean nuevo) throws ClienteException, DireccionException {\n String codigoCliente = null;\n\n if (!nuevo) {\n System.out.print(\"Introduzca el valor de el codigo de cliente: \");\n codigoCliente = teclado.nextLine();\n }\n\n System.out.print(\"Introduzca el valor de dni: \");\n String dni = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de nombre: \");\n String nombre = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de apellidos: \");\n String apellidos = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de fechaNacimiento: \");\n String fechaNacimiento = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de telefono: \");\n String telefono = teclado.nextLine();\n\n Cliente cliente = new Cliente(codigoCliente, nombre, apellidos, dni, fechaNacimiento, telefono, generarDatosDireccion(dni));\n clienteController.validarCliente(cliente);\n\n return cliente;\n }", "public Lista obtenerListadoClientes(boolean soloActivos, int filtro,String valorAux,String valorAux2,String valorAux3)throws SQLException{\r\n\t\tLista listadoCliente=null;\r\n\t\tICliente daoCliente = new DCliente();\r\n\t\t\r\n\t\tlistadoCliente = daoCliente.obtenerListadoClientes(soloActivos, filtro, valorAux, valorAux2, valorAux3);\r\n\t\t\r\n\t\treturn listadoCliente;\r\n\t}", "public List<Cliente> buscarTodos(String nomeBusca) {\n\t\treturn clienteDAO.buscarTodos(nomeBusca);\n\t}", "public void obtenerTipificacionesCliente(Participante cliente)\n throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Entrada\");\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n if (cliente.getOidCliente() == null) {\n cliente.setTipificacionCliente(null);\n if(log.isDebugEnabled()) {//sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- NULO : \");\n UtilidadesLog.debug(\"---- cliente : \" + cliente.getOidCliente());\n } \n } else {\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n query.append(\" SELECT CLIE_OID_CLIE, \");\n query.append(\" CLAS_OID_CLAS, \");\n query.append(\" SBTI_OID_SUBT_CLIE, \");\n query.append(\" TCCL_OID_TIPO_CLASI, \");\n query.append(\" TICL_OID_TIPO_CLIE \");\n query.append(\" FROM V_MAE_TIPIF_CLIEN \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + cliente\n .getOidCliente());\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- TIPIF : \" + respuesta);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n cliente.setTipificacionCliente(null);\n } else {\n TipificacionCliente[] tipificaciones = new TipificacionCliente[\n respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n tipificaciones[i] = new TipificacionCliente();\n\n {\n BigDecimal oidClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"CLAS_OID_CLAS\");\n tipificaciones[i].setOidClasificacionCliente((\n oidClasificacionCliente != null) ? new Long(\n oidClasificacionCliente.longValue()) : null);\n }\n\n tipificaciones[i].setOidSubTipoCliente(new Long((\n (BigDecimal) respuesta\n .getValueAt(i, \"SBTI_OID_SUBT_CLIE\")).longValue()));\n\n {\n BigDecimal oidTipoClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"TCCL_OID_TIPO_CLASI\");\n tipificaciones[i].setOidTipoClasificacionCliente(\n (oidTipoClasificacionCliente != null)? new Long(\n oidTipoClasificacionCliente.longValue()) \n : null);\n }\n\n tipificaciones[i].setOidTipoCliente(new Long(((BigDecimal)\n respuesta.getValueAt(i, \"TICL_OID_TIPO_CLIE\"))\n .longValue()));\n }\n\n cliente.setTipificacionCliente(tipificaciones);\n }\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Salida\");\n }", "public List<Client> displayClient ()\r\n {\r\n List<Client> clientListe = new ArrayList<Client>();\r\n String sqlrequest = \"SELECT idCLient,nom,prenom,email,nbrSignalisation FROM pi_dev.client ;\";\r\n try {\r\n PreparedStatement ps = MySQLConnection.getInstance().prepareStatement(sqlrequest);\r\n ResultSet resultat = ps.executeQuery(sqlrequest);\r\n while (resultat.next()){\r\n Client client = new Client();\r\n \r\n \r\n client.setEmail(resultat.getString(\"email\"));\r\n client.setIdClient(resultat.getInt(\"idClient\"));\r\n client.setNom(resultat.getString(\"nom\"));\r\n client.setPrenom(resultat.getString(\"prenom\"));\r\n client.setNbrSignalisation(resultat.getInt(\"nbrSignalisation\"));\r\n \r\n clientListe.add(client);\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ClientDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return clientListe;\r\n }", "@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }", "public List<Persona> getAllClientes() throws Exception {\n\t\tDAOPersona dao = new DAOPersona();\n\t\tList<Persona> clientes;\n\t\ttry \n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn(conn);\n\n\t\t\tclientes = dao.getClientes();\n\t\t}\n\t\tcatch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tthrow sqlException;\n\t\t} \n\t\tcatch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t\treturn clientes;\n\t}", "public void AfficherListClient() throws Exception{\n laListeClient = Client_Db_Connect.tousLesClients();\n laListeClient.forEach((c) -> {\n modelClient.addRow(new Object[]{ c.getIdent(),\n c.getRaison(),\n c.getTypeSo(),\n c.getDomaine(),\n c.getAdresse(),\n c.getTel(),\n c.getCa(),\n c.getComment(),\n c.getNbrEmp(),\n c.getDateContrat(),\n c.getAdresseMail()});\n });\n }", "public ArrayList<Client> clientList() {\n\t\tint counter = 1; // 일딴 보류\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString query = \"select * from client\";\n\t\tArrayList<Client> client = new ArrayList<Client>();\n\t\tClient object = null;\n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(query);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobject = new Client();\n\t\t\t\tString cId = rs.getString(\"cId\");\n\t\t\t\tString cPhone = rs.getString(\"cPhone\");\n\t\t\t\tString cName = rs.getString(\"cName\");\n\t\t\t\tint point = rs.getInt(\"cPoint\");\n\t\t\t\tint totalPoint = rs.getInt(\"totalPoint\");\n\n\t\t\t\tobject.setcId(cId);\n\t\t\t\tobject.setcPhone(cPhone);\n\t\t\t\tobject.setcName(cName);\n\t\t\t\tobject.setcPoint(point);\n\t\t\t\tobject.setTotalPoint(totalPoint);\n\n\t\t\t\tclient.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t\tif (pstmt != null) {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn client;\n\t}", "@Override\n\tpublic List<Cliente> getbyidAndGrupo(long id, Long idGrupo) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> clients =getCurrentSession().createQuery(\"from Cliente c join fetch c.grupos grupos where grupos.id='\"+idGrupo+\"' and c.id=\"+id+\" and c.activo=1\" ).list();\n \tif(clients != null){\n \treturn clients;}\n \telse {return null;}\n\t}", "@Generated\n public List<Clientes> getClientes() {\n if (clientes == null) {\n __throwIfDetached();\n ClientesDao targetDao = daoSession.getClientesDao();\n List<Clientes> clientesNew = targetDao._queryUsuarios_Clientes(id);\n synchronized (this) {\n if(clientes == null) {\n clientes = clientesNew;\n }\n }\n }\n return clientes;\n }", "public void verificarDatosConsola(Cliente cliente, List<Cuenta> listaCuentas) {\n\n int codigoCliente = cliente.getCodigo();\n\n System.out.println(\"Codigo: \"+cliente.getCodigo());\n System.out.println(\"Nombre: \"+cliente.getNombre());\n System.out.println(\"DPI: \"+cliente.getDPI());\n System.out.println(\"Direccion: \"+cliente.getDireccion());\n System.out.println(\"Sexo: \"+cliente.getSexo());\n System.out.println(\"Password: \"+cliente.getPassword());\n System.out.println(\"Tipo de Usuario: \"+ 3);\n\n System.out.println(\"Nacimiento: \"+cliente.getNacimiento());\n System.out.println(\"ArchivoDPI: \"+cliente.getDPIEscaneado());\n System.out.println(\"Estado: \"+cliente.isEstado());\n \n \n for (Cuenta cuenta : listaCuentas) {\n System.out.println(\"CUENTAS DEL CLIENTE\");\n System.out.println(\"Numero de Cuenta: \"+cuenta.getNoCuenta());\n System.out.println(\"Fecha de Creacion: \"+cuenta.getFechaCreacion());\n System.out.println(\"Saldo: \"+cuenta.getSaldo());\n System.out.println(\"Codigo del Dueño: \"+codigoCliente);\n \n }\n \n\n\n }", "public List<Cliente> getClienteList () {\n\t\t\n\t\tCriteria crit = HibernateUtil.getSession().createCriteria(Cliente.class);\n\t\tList<Cliente> clienteList = crit.list();\n\t\t\n\t\treturn clienteList;\n\t}", "private void getRecepcionSeros(){\n mRecepcionSeros = estudioAdapter.getListaRecepcionSeroSinEnviar();\n //ca.close();\n }", "@Override\r\n\tpublic List<Client> selectclient() {\n\t\tList<Client> list=this.getSqlSessionTemplate().selectList(changToNameSpace(\"selectclient\"));\r\n\t\treturn list;\r\n\t}", "public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }", "private ArrayList<String[]> getTodasOS() {\n ArrayList <OrdemServico> os = new OS_Controller(this).buscarTodasOrdemServicos();\n\n ArrayList<String[]> rows = new ArrayList<>();\n ArrayList<OrdemServico> ordemServicos=new ArrayList<>();\n\n for (OrdemServico ordemServico :os){\n String id = String.valueOf(ordemServico.getId());\n String numero = ordemServico.getNumero_ordem_servico();\n String cliente = ordemServico.getCliente().getNome();\n SimpleDateFormat formato = new SimpleDateFormat(\"dd-MM-yyyy\");\n String dataEntrada = formato.format(ordemServico.getData_entrada());\n String status = ordemServico.getStatus_celular();\n String tecnico = ordemServico.getTecnico_responsavel();\n String precoFinal = ordemServico.getValor_final();\n String marca = ordemServico.getMarca();\n String modelo = ordemServico.getModelo();\n\n rows.add(new String[]{id,numero,dataEntrada, marca, modelo,cliente,status,tecnico, precoFinal});\n ordemServicos.add(ordemServico);\n }\n //String cliente = String.valueOf(os.getCliente());\n return rows;\n\n }", "@Override\n\tpublic void cadastrar(Cliente o) {\n\t\t\n\t}", "@Override\n\tpublic String listarClientes() throws MalformedURLException, RemoteException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tString lista = datos.listaClientes();\n \treturn lista;\n \t\n\t}", "public List<Client> getClientsByConseillerId(long idConseiller) throws SQLException {\r\n\t\tPreparedStatement st = null;\r\n\t\tResultSet rs =null;\r\n\t\tClient client = new Client();\r\n\t\tList<Client> clients = new ArrayList<Client>();\r\n\t\tConnection connection = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection = getConnection();\r\n\t\t\tString selectSQL = \"select surname, name, email , adress from client where idConseiller = ?\";\r\n\t\t\tst = connection.prepareStatement(selectSQL);\r\n\t\t\tst.setLong(1, idConseiller);\r\n\t\t\t\r\n\t\t\trs = st.executeQuery();\r\n\t\t\t\r\n\t\t\t\r\n\t\twhile (rs.next()) {\r\n\t\t\t\r\n\t\t\tclient = new Client();\r\n\t\t\tclient.setSurname(rs.getString(\"surname\"));\r\n\t\t\tclient.setName(rs.getString(\"name\"));\r\n\t\t\tclient.setEmail(rs.getString(\"email\"));\r\n\t\t\tclient.setAdress(rs.getString(\"adress\"));\r\n\t\t\t\r\n\t\t\tclients.add(client);\r\n\t\t }\r\n\t\t\treturn clients;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (st != null)\r\n\t\t\t\t\tst.close();\r\n\t\t\t\tif (connection != null)\r\n\t\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=0; i<clients.size();i++) {\r\n\t\t\t\tSystem.out.println(\"la donnée associée à l'indice \"+ i + \" est \" + clients.get(i));\r\n\t\t\t}\r\n\t\t\treturn clients;\t\t\r\n\t\t\r\n\t}", "@GetMapping(\"/listarClientes\")\r\n public ResponseEntity<List<Cliente>> getListarClientes(\r\n @RequestParam(value = \"filtro\", required = false) String filtro) {\r\n\r\n if (filtro == null || filtro.equals(\"\")) {\r\n return new ResponseEntity<List<Cliente>>(clienteRepository.findAllCliente(usuario().getId()), HttpStatus.OK);\r\n } else {\r\n return new ResponseEntity<List<Cliente>>(clienteRepository.findFiltroCliente(filtro, usuario().getId()), HttpStatus.OK);\r\n }\r\n }", "@Override\n\tpublic ArrayList<ClienteFisico> listar() throws SQLException {\n\t\t\n\t\tArrayList<ClienteFisico> listar = new ArrayList<ClienteFisico>();\n\t\t\n\t\t\n\t\tfor(ClienteFisico c : this.set){\n\t\t\t\n\t\t\tlistar.add(c);\n\t\t}\n\t\n\t\t\n\t\treturn listar;\n\t}", "public String RespuestaCliente()\n{\tString Muestra=\"\";\n\t\n\tMuestra+=\"DATOS DEL CLIENTE\\n\"\n\t\t\t+ \"Nombre: \"+getNombre()+\"\\n\"\n\t\t\t+ \"DNI: \"+getDni()+\"\\n\"\n\t\t\t+ \"Salario: �\"+String.format(\"%.1f\",getSalario())+\"\\n\\n\";\n\t\n\treturn Muestra;\n\t\n\t}", "public Cliente carregarPorId(int id) throws Exception {\n \n Cliente c = new Cliente();\n String sql = \"SELECT * FROM cliente WHERE idCliente = ?\";\n PreparedStatement pst = conn.prepareStatement(sql);\n pst.setInt(1, id);\n ResultSet rs = pst.executeQuery();\n if (rs.next()) {\n c.setIdCliente(rs.getInt(\"idCliente\"));\n c.setEndereco(rs.getString(\"endereco\"));\n c.setCidade(rs.getString(\"cidade\"));\n c.setDdd(rs.getInt(\"ddd\"));\n c.setNome(rs.getString(\"nome\"));\n c.setUf(rs.getString(\"uf\"));\n c.setTelefone(rs.getString(\"telefone\"));\n Empresa e = new Empresa();\n EmpresaDAO ePB = new EmpresaDAO();\n ePB.conectar();\n e = ePB.carregarPorCnpj(rs.getString(\"Empresa_cnpj\"));\n ePB.desconectar();\n Usuario p = new Usuario();\n UsuarioDAO pPB = new UsuarioDAO();\n pPB.conectar();\n p = pPB.carregarPorId(rs.getInt(\"Usuario_idUsuario\"));\n pPB.desconectar();\n c.setEmpresa(e);\n c.setUsuario(p);\n }\n return c;\n }", "@Override\n public List<Client> getAllClients(){\n log.trace(\"getAllClients --- method entered\");\n List<Client> result = clientRepository.findAll();\n log.trace(\"getAllClients: result={}\", result);\n return result;\n }", "public Interfaz_RegistroClientes() {\n initComponents();\n limpiar();\n }", "@Override\n\t\tpublic Cliente buscarPorId(int id) throws ExceptionUtil {\n\t\t\treturn daoCliente.buscarPorId(id);\n\t\t}", "private Client lireClientServ(int idClient) {\n\t\tClient client = daoclient.readClientDaoById(idClient);\n\t\treturn client;\n\t}", "public List<Compte> getComptesClient(int numeroClient);", "public List<Client> listerTousClients() throws DaoException {\n\t\ttry {\n\t\t\treturn daoClient.findAll();\n\t\t} catch (Exception e) {\n\t\t\tthrow new DaoException(\"ConseillerService.listerTousClients\" + e);\n\t\t}\n\t}", "public DTOConsultaCliente consultarCliente(DTOOID oid) throws MareException {\n UtilidadesLog.info(\" DAOMAEMaestroClientes.consultarCliente(DTOOID): Entrada\");\n\n Boolean bUsaGEOREFERENCIADOR = Boolean.FALSE;\n MONMantenimientoSEG mms;\n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n RecordSet resultado = new RecordSet();\n StringBuffer query = new StringBuffer();\n DTOConsultaCliente dtos = new DTOConsultaCliente();\n\n try {\n query.append(\" select TICL_OID_TIPO_CLIE, SBTI_OID_SUBT_CLIE, I1.VAL_I18N DESC_TIPO_CLIENTE, \");\n query.append(\" I2.VAL_I18N DESC_SUB_TIPO_CLIENTE\");\n query.append(\" from MAE_CLIEN_TIPO_SUBTI T, V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TICL_OID_TIPO_CLIE \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_SUBTI_CLIEN' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = SBTI_OID_SUBT_CLIE \");\n query.append(\" and T.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" ORDER BY DESC_TIPO_CLIENTE ASC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setTiposSubtipos(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" select TDOC_OID_TIPO_DOCU, NUM_DOCU_IDEN, VAL_IDEN_DOCU_PRIN, VAL_IDEN_PERS_EMPR, \");\n query.append(\" I1.VAL_I18N DESC_TIPO_DOCUM from MAE_CLIEN_IDENT I, V_GEN_I18N_SICC I1 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_DOCUM' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TDOC_OID_TIPO_DOCU \");\n query.append(\" and I.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setIdentificaciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n // Se agrega campo \"cod_clie\" a la query.\n query.append(\" SELECT val_ape1, val_ape2, val_apel_casa, val_nom1, val_nom2, val_trat, \");\n query.append(\" cod_sexo, fec_ingr, fopa_oid_form_pago, i1.val_i18n desc_forma_pago, \");\n query.append(\" cod_clie \");\n query.append(\" FROM mae_clien m, v_gen_i18n_sicc i1 \");\n query.append(\" WHERE i1.val_oid(+) = fopa_oid_form_pago \");\n query.append(\" AND i1.attr_enti(+) = 'BEL_FORMA_PAGO' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma());\n query.append(\" AND m.oid_clie = \" + oid.getOid()); \n \n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (!resultado.esVacio()) {\n dtos.setApellido1((String) resultado.getValueAt(0, 0));\n dtos.setApellido2((String) resultado.getValueAt(0, 1));\n dtos.setApellidoCasada((String) resultado.getValueAt(0, 2));\n dtos.setNombre1((String) resultado.getValueAt(0, 3));\n dtos.setNombre2((String) resultado.getValueAt(0, 4));\n\n String tratamiento = (String) resultado.getValueAt(0, 5);\n\n if ((tratamiento != null) && !(tratamiento.equals(\"\"))) {\n dtos.setTratamiento(new Byte(tratamiento));\n }\n\n String sexo = (String) resultado.getValueAt(0, 6);\n\n if ((sexo != null) && !(sexo.equals(\"\"))) {\n dtos.setSexo(new Character(sexo.toCharArray()[0]));\n }\n\n dtos.setFechaIngreso((Date) resultado.getValueAt(0, 7));\n dtos.setFormaPago((String) resultado.getValueAt(0, 9));\n \n // Agregado by ssantana, inc. BELC300021214\n // Se agrega asignacion de parametro CodigoCliente\n dtos.setCodigoCliente((String) resultado.getValueAt(0, 10) );\n }\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT FEC_NACI, COD_EMPL, SNON_OID_NACI, VAL_EDAD, ESCV_OID_ESTA_CIVI, VAL_OCUP, \");\n query.append(\" VAL_PROF, VAL_CENT_TRAB, VAL_CARG_DESE, VAL_CENT_ESTU, NUM_HIJO, NUM_PERS_DEPE, \");\n query.append(\" NSEP_OID_NSEP, TCLV_OID_CICL_VIDA, IND_CORR, IMP_INGR_FAMI, I1.VAL_I18N DESC_NACION, \");\n query.append(\" I2.VAL_I18N DESC_EDO_CIVIL, I3.VAL_I18N DESC_NESP, I4.VAL_I18N DESC_CICLO_VIDA, \");\n query.append(\" NIED_OID_NIVE_ESTU, i5.VAL_I18N desc_nivel_estu, IND_ACTI \");\n query.append(\" FROM MAE_CLIEN_DATOS_ADICI , V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2, V_GEN_I18N_SICC I3, V_GEN_I18N_SICC I4, v_gen_i18n_sicc i5 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'SEG_NACIO' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = SNON_OID_NACI \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_ESTAD_CIVIL' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = ESCV_OID_ESTA_CIVI \");\n query.append(\" and I3.ATTR_ENTI(+) = 'MAE_TIPO_NIVEL_SOCEC_PERSO' \");\n query.append(\" and I3.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I3.VAL_OID(+) = NSEP_OID_NSEP \");\n query.append(\" and I4.ATTR_ENTI(+) = 'MAE_CICLO_VIDA' \");\n query.append(\" and I4.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I4.VAL_OID(+) = TCLV_OID_CICL_VIDA \");\n query.append(\" and i5.ATTR_ENTI(+) = 'MAE_NIVEL_ESTUD' \");\n query.append(\" AND i5.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" AND i5.VAL_OID(+) = NIED_OID_NIVE_ESTU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (!resultado.esVacio()) {\n UtilidadesLog.debug(\"resultado: \" + resultado);\n\n dtos.setFechaNacimiento((Date) resultado.getValueAt(0, 0));\n dtos.setCodigoEmpleado((String) resultado.getValueAt(0, 1));\n /*cleal incidencia 21311 fecha 28/10/2005*/\n // Modificado por ssantana, 8/11/2005\n // dtos.setNacionalidad((resultado.getValueAt(0, 2))!=null ? new String(((BigDecimal) resultado.getValueAt(0, 2)).toString()) : \"\");\n dtos.setNacionalidad((resultado.getValueAt(0, 16)) != null ? (String) resultado.getValueAt(0, 16) : \"\"); \n //(resultado.getValueAt(0, 10) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 10)).toString()) : null\n\n // dtos.setEdad((String)resultado.getValueAt(0, 3));\n dtos.setEdad((resultado.getValueAt(0, 3) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 3)).toString()) : \"\");\n dtos.setEstadoCivil((String) resultado.getValueAt(0, 17));\n dtos.setOcupacion((String) resultado.getValueAt(0, 5));\n dtos.setProfesion((String) resultado.getValueAt(0, 6));\n dtos.setCentroTrabajo((String) resultado.getValueAt(0, 7));\n dtos.setCargo((String) resultado.getValueAt(0, 8));\n dtos.setCentro((String) resultado.getValueAt(0, 9));\n\n //dtos.setNumeroHijos((BigDecimal)resultado.getValueAt(0, 10));\n /* dtos.setNumeroHijos((resultado.getValueAt(0, 10) != null)\n ? new String(\n ((BigDecimal) resultado.getValueAt(0, 10)).toString())\n : \"0\");*/\n dtos.setNumeroHijos((resultado.getValueAt(0, 10) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 10)).toString()) : null);\n\n //dtos.setPersonasDependientes((String)resultado.getValueAt(0, 11));\n /* dtos.setPersonasDependientes((resultado.getValueAt(0, 11) != null)\n ? new String(\n ((BigDecimal) resultado.getValueAt(0, 11)).toString())\n : \"0\");*/\n dtos.setPersonasDependientes((resultado.getValueAt(0, 11) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 11)).toString()) : null);\n\n dtos.setNSEP((String) resultado.getValueAt(0, 18));\n dtos.setCicloVidaFamiliar((String) resultado.getValueAt(0, 19));\n dtos.setNivelEstudios((String) resultado.getValueAt(0, 21));\n\n //String corres = (String)resultado.getValueAt(0, 14);\n String corres = (resultado.getValueAt(0, 14) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 14)).toString()) : null;\n\n //String corres = ((BigDecimal) resultado.getValueAt(0,14)).toString();\n Boolean correspondencia = null;\n\n if ((corres != null) && !(corres.equals(\"\"))) {\n if (corres.equals(\"1\")) {\n correspondencia = Boolean.TRUE;\n } else {\n correspondencia = Boolean.FALSE;\n }\n }\n\n dtos.setDeseaCorrespondencia(correspondencia);\n\n BigDecimal big = (BigDecimal) resultado.getValueAt(0, 15);\n\n if (big == null) {\n dtos.setImporteIngreso(\"\");\n } else {\n dtos.setImporteIngreso(big.toString());\n }\n \n //SICC-DMCO-MAE-GCC-006 - Cleal\n Boolean indActi = null;\n if(((BigDecimal) resultado.getValueAt(0, 22))!=null){\n\n if(((BigDecimal) resultado.getValueAt(0, 22)).longValue()==1){\n indActi = new Boolean(true);\n } else if(((BigDecimal) resultado.getValueAt(0, 22)).longValue()==0){\n indActi = new Boolean(false); \n }\n }\n dtos.setIndicadorActivo(indActi);\n }\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT I2.VAL_I18N, C.COD_CLIE, FEC_DESD, FEC_HAST, TIVC_OID_TIPO_VINC, IND_VINC_PPAL, I1.VAL_I18N DESC_TIPO_VINCU \");\n query.append(\" FROM MAE_CLIEN_VINCU, V_GEN_I18N_SICC I1, mae_tipo_vincu tv, seg_pais p, v_gen_i18n_sicc i2, mae_clien c \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_VINCU' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TIVC_OID_TIPO_VINC \");\n \n /* inicio deshace modif ciglesias incidencia 24377 17/11/2006\n // SPLATAS - 26/10/2006 - Error al obtener clientes vinculados \n // query.append(\" and CLIE_OID_CLIE_VNDO = \" + oid.getOid() + \" \");\n query.append(\" and CLIE_OID_CLIE_VNTE = \" + oid.getOid() + \" \");\n */\n query.append(\" and CLIE_OID_CLIE_VNDO = \" + oid.getOid() + \" \");\n /*fin deshace ciglesias 24377*/\n \n query.append(\" AND mae_clien_vincu.TIVC_OID_TIPO_VINC = tv.OID_TIPO_VINC \");\n \n // SPLATAS - 26/10/2006 - Error al obtener clientes vinculados \n query.append(\" AND mae_clien_vincu.CLIE_OID_CLIE_VNTE = c.OID_CLIE \"); //eiraola 30/11/2006 Incidencia DBLG7...165\n \n //query.append(\" AND mae_clien_vincu.CLIE_OID_CLIE_VNDO = c.OID_CLIE \");\n \n query.append(\" AND tv.PAIS_OID_PAIS = p.OID_PAIS \");\n query.append(\" AND i2.VAL_OID = p.OID_PAIS \");\n query.append(\" AND i2.ATTR_ENTI = 'SEG_PAIS' \");\n query.append(\" AND i2.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n //UtilidadesLog.info(\"resultado Vinculo: \" + resultado.toString() );\n dtos.setVinculos(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /*query.append(\" SELECT DES_CLIE_PREF, TIPF_OID_TIPO_PREF, DES_CLIE_PREF \");\n query.append(\" FROM MAE_CLIEN_PREFE \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");*/\n query.append(\" SELECT i1.VAL_I18N descripcionTipo , a.TIPF_OID_TIPO_PREF, a.DES_CLIE_PREF \");\n query.append(\" FROM MAE_CLIEN_PREFE a , v_gen_i18n_sicc i1 \");\n query.append(\" where a.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and i1.ATTR_ENTI = 'MAE_TIPO_PREFE' \");\n query.append(\" and i1.VAL_OID = a.TIPF_OID_TIPO_PREF \");\n query.append(\" and i1.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" and i1.ATTR_NUM_ATRI = 1 \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setPreferencias(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT MARC_OID_MARC, NUM_OBSE, VAL_TEXT, DES_MARC \");\n query.append(\" FROM MAE_CLIEN_OBSER M, SEG_MARCA S \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and M.MARC_OID_MARC = S.OID_MARC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setObservaciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /* query.append(\" SELECT c.PAIS_OID_PAIS , c.COD_CLIE, t. TICL_OID_TIPO_CLIE, p.COD_TIPO_CONT, \");\n query.append(\" p.FEC_CONT, p.FEC_SIGU_CONT, I1.VAL_I18N DESC_PAIS, I2.VAL_I18N DESC_TIPO_CLIENTE \");\n query.append(\" FROM MAE_CLIEN_PRIME_CONTA p, MAE_CLIEN c, MAE_CLIEN_TIPO_SUBTI t, V_GEN_I18N_SICC I1, \");\n query.append(\" V_GEN_I18N_SICC I2 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'SEG_PAIS' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = c.PAIS_OID_PAIS \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = TICL_OID_TIPO_CLIE \");\n query.append(\" AND p.CTSU_CLIE_CONT = t.OID_CLIE_TIPO_SUBT \");\n query.append(\" AND t.CLIE_OID_CLIE = c.OID_CLIE \");\n query.append(\" and p.CLIE_OID_CLIE = \" + oid.getOid() + \" \"); */\n query.append(\" SELECT c.pais_oid_pais, c.cod_clie, t.ticl_oid_tipo_clie, p.cod_tipo_cont, \");\n query.append(\" p.fec_cont, p.fec_sigu_cont, i1.val_i18n desc_pais, \");\n query.append(\" i2.val_i18n desc_tipo_cliente, i3.val_i18n, perio.val_nomb_peri, marca.DES_MARC \");\n query.append(\" FROM mae_clien_prime_conta p, \");\n query.append(\" mae_clien c, \");\n query.append(\" mae_clien_tipo_subti t, \");\n query.append(\" seg_canal canal, \");\n query.append(\" cra_perio perio, \");\n query.append(\" seg_marca marca, \");\n query.append(\" v_gen_i18n_sicc i1, \");\n query.append(\" v_gen_i18n_sicc i2, \");\n query.append(\" v_gen_i18n_sicc i3 \");\n query.append(\" WHERE i1.attr_enti(+) = 'SEG_PAIS' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i1.val_oid(+) = c.pais_oid_pais \");\n query.append(\" AND i2.attr_enti(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND i2.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i2.val_oid(+) = ticl_oid_tipo_clie \");\n query.append(\" AND p.ctsu_clie_cont = t.oid_clie_tipo_subt \");\n query.append(\" AND t.clie_oid_clie = c.oid_clie \");\n query.append(\" AND p.clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND p.perd_oid_peri = perio.oid_peri(+) \");\n query.append(\" AND p.cana_oid_cana = canal.oid_cana(+) \");\n query.append(\" AND canal.oid_cana = i3.val_oid(+) \");\n query.append(\" AND i3.attr_enti(+) = 'SEG_CANAL' \");\n query.append(\" AND i3.attr_num_atri(+) = 1 \");\n query.append(\" AND i3.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" and p.MARC_OID_MARC = marca.OID_MARC(+) \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (!resultado.esVacio()) {\n // by Ssantana, 29/7/04 - Se corren algunos indices en -1 al quitar\n // campo Primer Pedido Contacto. \n // 5/8//2004 - Se agregan descripciones de Marca, Canal y Periodo\n dtos.setPaisContactado((String) resultado.getValueAt(0, 6));\n dtos.setCodigoClienteContactado((String) resultado.getValueAt(0, 1));\n dtos.setTipoClienteContactado((String) resultado.getValueAt(0, 7));\n dtos.setTipoContacto((String) resultado.getValueAt(0, 3));\n dtos.setFechaContacto((Date) resultado.getValueAt(0, 4));\n dtos.setFechaSiguienteContacto((Date) resultado.getValueAt(0, 5));\n dtos.setMarcaContactoDesc((String) resultado.getValueAt(0, 10));\n dtos.setCanalContactoDesc((String) resultado.getValueAt(0, 8));\n dtos.setPeriodoContactoDesc((String) resultado.getValueAt(0, 9));\n\n /* dtos.setPaisContactado((String)resultado.getValueAt(0, 7));\n dtos.setCodigoClienteContactado((String)resultado.getValueAt(0, 1));\n dtos.setTipoClienteContactado((String)resultado.getValueAt(0, 8));\n dtos.setTipoContacto((String)resultado.getValueAt(0, 3));\n dtos.setFechaContacto((Date)resultado.getValueAt(0, 4));\n //dtos.setFechaPrimerPedido((Date)resultado.getValueAt(0, 5));\n dtos.setFechaSiguienteContacto((Date)resultado.getValueAt(0, 6));*/\n }\n //Cleal Mae-03\n MONMantenimientoSEGHome mmsHome = SEGEjbLocators.getMONMantenimientoSEGHome();\n mms = mmsHome.create();\n bUsaGEOREFERENCIADOR = mms.usaGeoreferenciador(oid.getOidPais());\n \n resultado = new RecordSet();\n if(Boolean.FALSE.equals(bUsaGEOREFERENCIADOR)){\n UtilidadesLog.debug(\"*** No usa GEO\");\n resultado = obtieneDireccionSinGEO(oid);\n } else{\n UtilidadesLog.debug(\"*** Usa GEO\");\n resultado = obtieneDireccionConGEO(oid);\n }//\n \n //\n /*\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT dir.TIDC_OID_TIPO_DIRE, dir.TIVI_OID_TIPO_VIA, \");\n //SICC-GCC-MAE-005 - Cleal\n query.append(\" NVL(dir.VAL_NOMB_VIA,vi.NOM_VIA) AS VIA, \");\n \n query.append(\" dir.NUM_PPAL, dir.VAL_COD_POST, \");\n query.append(\" dir.VAL_OBSE, I1.VAL_I18N DESC_TIPO_DIREC, I2.VAL_I18N DESC_TIPO_VIA, ind_dire_ppal, VAL.DES_GEOG \");\n query.append(\" FROM MAE_CLIEN_DIREC dir, ZON_VIA vi, ZON_VALOR_ESTRU_GEOPO val, \");\n //Cleal MAE-03\n if(bUsaGEOREFERENCIADOR.equals(Boolean.FALSE)){\n query.append(\" ZON_TERRI terr, \");\n }\n //\n query.append(\" V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2 \");\n query.append(\" WHERE I1.ATTR_ENTI(+) = 'MAE_TIPO_DIREC' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TIDC_OID_TIPO_DIRE \");\n query.append(\" and I2.ATTR_ENTI(+) = 'SEG_TIPO_VIA' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n\n //query.append(\" and I2.VAL_OID(+) = vi.TIVI_OID_TIPO_VIA \");\n query.append(\" and I2.VAL_OID(+) = dir.tivi_oid_tipo_via \");\n query.append(\" and dir.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" AND dir.ZVIA_OID_VIA = vi.OID_VIA(+) \");\n //Cleal MAE-03\n if(bUsaGEOREFERENCIADOR.equals(Boolean.FALSE)){\n query.append(\" AND dir.TERR_OID_TERR = terr.OID_TERR \");\n query.append(\" AND terr.VEPO_OID_VALO_ESTR_GEOP = val.OID_VALO_ESTR_GEOP \");\n //SICC-GCC-MAE-005 - Cleal\n query.append(\" AND vi.PAIS_OID_PAIS = \"+oid.getOidPais());\n } else{\n \n query.append(\" \");\n \n }\n resultado = bs.dbService.executeStaticQuery(query.toString());\n */\n dtos.setDirecciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /* query.append(\" SELECT TICM_OID_TIPO_COMU, VAL_DIA_COMU, VAL_TEXT_COMU, FEC_HORA_DESD, \");\n query.append(\" FEC_HORA_HAST, VAL_INTE_COMU, IND_COMU_PPAL, I1.VAL_I18N DESC_TIPO_COMUN \");\n query.append(\" FROM MAE_CLIEN_COMUN, V_GEN_I18N_SICC I1 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_COMUN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TICM_OID_TIPO_COMU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");*/\n query.append(\" SELECT i1.val_i18n desc_tipo_comun, val_dia_comu, val_text_comu, ind_comu_ppal, \");\n\n /* query.append(\" DECODE(to_char(FEC_HORA_DESD, 'HH24:MI'), NULL, ' ', to_char(FEC_HORA_DESD, 'HH24:MI')), \");\n query.append(\" DECODE(to_char(FEC_HORA_HAST, 'HH24:MI'), NULL, ' ', to_char(FEC_HORA_HAST, 'HH24:MI')), \");*/\n query.append(\" to_char(FEC_HORA_DESD, 'HH24:MI'), \");\n query.append(\" to_char(FEC_HORA_HAST, 'HH24:MI'), \");\n query.append(\" val_inte_comu \");\n query.append(\" FROM mae_clien_comun, v_gen_i18n_sicc i1 \");\n query.append(\" WHERE i1.attr_enti(+) = 'MAE_TIPO_COMUN' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i1.val_oid(+) = ticm_oid_tipo_comu \");\n query.append(\" AND clie_oid_clie = \" + oid.getOid().toString());\n\n /* query.append(\" SELECT TICM_OID_TIPO_COMU, VAL_DIA_COMU, VAL_TEXT_COMU, FEC_HORA_DESD, \");\n query.append(\" FEC_HORA_HAST, VAL_INTE_COMU, IND_COMU_PPAL, I1.VAL_I18N DESC_TIPO_COMUN \");\n query.append(\" FROM MAE_CLIEN_COMUN, V_GEN_I18N_SICC I1 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_COMUN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TICM_OID_TIPO_COMU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \"); */\n resultado = bs.dbService.executeStaticQuery(query.toString());\n UtilidadesLog.debug(\"----- resultado Comunicaciones: \" + resultado);\n dtos.setComunicaciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT MARC_OID_MARC, S.DES_MARC \");\n query.append(\" FROM MAE_CLIEN_MARCA M, SEG_MARCA S \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and M.MARC_OID_MARC = S.OID_MARC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n String[] marcas = new String[resultado.getRowCount()];\n\n for (int i = 0; i < resultado.getRowCount(); i++)\n marcas[i] = (String) resultado.getValueAt(i, 1);\n\n dtos.setMarcas(marcas);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT TITR_OID_TIPO_TARJ, CLTA_OID_CLAS_TARJ, CBAN_OID_BANC, I1.VAL_I18N DESC_TIPO_TARJ, \");\n query.append(\" DES_CLAS_TARJ, DES_BANC \");\n query.append(\" FROM MAE_CLIEN_TARJE, V_GEN_I18N_SICC I1, MAE_CLASE_TARJE, CCC_BANCO \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_TARJE' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TITR_OID_TIPO_TARJ \");\n query.append(\" and CLTA_OID_CLAS_TARJ = OID_CLAS_TARJ \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and CBAN_OID_BANC = OID_BANC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setTarjetas(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /* query.append(\" SELECT t.TICL_OID_TIPO_CLIE, t.SBTI_OID_SUBT_CLIE, c.CLAS_OID_CLAS, c.TCCL_OID_TIPO_CLASI, \");\n query.append(\n \" c.FEC_CLAS, PERD_OID_PERI, I1.VAL_I18N DESC_TIPO_CLIENTE, I2.VAL_I18N DESC_SUB_TIPO_CLIENTE, I3.VAL_I18N DESC_CLASI, I4.VAL_I18N DESC_TIPO_CLASI_CLIENTE, I5.VAL_I18N DESC_PERIODO, \");\n query.append(\" i6.VAL_I18N desc_canal, m.DES_MARC desc_marca \");\n query.append(\" FROM MAE_CLIEN_TIPO_SUBTI t, MAE_CLIEN_CLASI c, V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2, \");\n query.append(\" V_GEN_I18N_SICC I3, V_GEN_I18N_SICC I4, V_GEN_I18N_SICC I5, \");\n query.append(\" cra_perio p, seg_marca m, v_gen_i18n_sicc i6 \");\n query.append(\" WHERE I1.ATTR_ENTI(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = t.TICL_OID_TIPO_CLIE \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_SUBTI_CLIEN' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = t.SBTI_OID_SUBT_CLIE \");\n query.append(\" and I3.ATTR_ENTI(+) = 'MAE_CLASI' \");\n query.append(\" and I3.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I3.VAL_OID(+) = c.CLAS_OID_CLAS \");\n query.append(\" and I4.ATTR_ENTI(+) = 'MAE_TIPO_CLASI_CLIEN' \");\n query.append(\" and I4.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I4.VAL_OID(+) = c.TCCL_OID_TIPO_CLASI \");\n query.append(\" and I5.ATTR_ENTI(+) = 'CRA_PERIO' \");\n query.append(\" and I5.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I5.VAL_OID(+) = PERD_OID_PERI \");\n query.append(\" and t.OID_CLIE_TIPO_SUBT = c.CTSU_OID_CLIE_TIPO_SUBT \");\n query.append(\" AND t.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" AND perd_oid_peri = p.OID_PERI \");\n query.append(\" AND i6.VAL_OID(+) = p.CANA_OID_CANA \");\n query.append(\" AND i6.ATTR_ENTI(+) = 'SEG_CANAL' \");\n query.append(\" AND i6.IDIO_OID_IDIO = \" + oid.getOidIdioma() + \" \");\n query.append(\" AND i6.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND p.MARC_OID_MARC = m.OID_MARC \"); */\n query.append(\" SELECT m.DES_MARC, v1.VAL_I18N, v2.VAL_I18N, \");\n query.append(\" v3.VAL_I18N, v4.VAL_I18N, v5.VAL_I18N \");\n query.append(\" FROM mae_clien_tipo_subti t, mae_clien_clasi c, cra_perio p, seg_marca m, v_gen_i18n_sicc v1, \");\n query.append(\" v_gen_i18n_sicc v2, v_gen_i18n_sicc v3, v_gen_i18n_sicc v4, v_gen_i18n_sicc v5 \");\n query.append(\" WHERE t.oid_clie_tipo_subt = c.ctsu_oid_clie_tipo_subt \");\n query.append(\" AND c.perd_oid_peri = p.oid_peri \");\n query.append(\" AND t.clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND p.MARC_OID_MARC = m.OID_MARC \"); // MARCA\n query.append(\" AND p.CANA_OID_CANA = v1.VAL_OID \"); // CANAL\n query.append(\" AND v1.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v1.ATTR_ENTI = 'SEG_CANAL' \");\n query.append(\" AND v1.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND t.TICL_OID_TIPO_CLIE = v2.VAL_OID \"); // TIPO CLIENTE\n query.append(\" AND v2.ATTR_ENTI = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND v2.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v2.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND t.SBTI_OID_SUBT_CLIE = v3.VAL_OID \"); // SUBTIPO CLIENTE\n query.append(\" AND v3.ATTR_ENTI = 'MAE_SUBTI_CLIEN' \");\n query.append(\" AND v3.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v3.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND c.TCCL_OID_TIPO_CLASI = v4.VAL_OID \"); // TIPO CLASIFICACION\n query.append(\" AND v4.ATTR_ENTI = 'MAE_TIPO_CLASI_CLIEN' \");\n query.append(\" AND v4.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v4.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND c.CLAS_OID_CLAS = v5.VAL_OID \"); // CLASIFICACION\n query.append(\" AND v5.ATTR_ENTI = 'MAE_CLASI' \");\n query.append(\" AND v5.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v5.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n \n // BELC300023061 - 04/07/2006\n // Si no se obtuvo ninguna clasificacion para el cliente en la consulta anterior, \n // insertar una fila en el atributo clasificaciones, con el indicador principal activo, \n // sólo con la marca y el canal\n if (!resultado.esVacio()) {\n dtos.setClasificaciones(resultado);\n } else {\n query = new StringBuffer();\n resultado = new RecordSet();\n \n query.append(\" SELECT mar.DES_MARC, \");\n query.append(\" \t\t iCa.VAL_I18N, null VAL_I18N, null VAL_I18N, null VAL_I18N, null VAL_I18N \");\n query.append(\" FROM MAE_CLIEN_UNIDA_ADMIN uA, \");\n query.append(\" \t CRA_PERIO per, \");\n query.append(\" \t\t SEG_MARCA mar, \");\n query.append(\" \t V_GEN_I18N_SICC iCa \");\n query.append(\" WHERE uA.CLIE_OID_CLIE = \" + oid.getOid().toString());\n query.append(\" AND uA.IND_ACTI = 1 \");\n query.append(\" \t AND uA.PERD_OID_PERI_INI = per.OID_PERI \");\n query.append(\" \t AND per.MARC_OID_MARC = mar.OID_MARC \");\n query.append(\" AND per.CANA_OID_CANA = iCa.VAL_OID \");\n query.append(\" AND iCa.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND iCa.ATTR_ENTI = 'SEG_CANAL' \");\n query.append(\" AND iCa.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" ORDER BY uA.OID_CLIE_UNID_ADMI ASC \");\n \n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setClasificaciones(resultado);\n }\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n //el false se utiliza para indicar que estas filas son de problemas \n //el true indica que estas filas son de soluciones \n query.append(\" SELECT i1.VAL_I18N, DES_PROB, decode(IND_SOLU,0,'false',1,'true') IND_SOLU, I2.VAL_I18N TSOC_OID_TIPO_SOLU, DES_SOLU, VAL_NEGO_PROD \");\n query.append(\" FROM MAE_CLIEN_PROBL, V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_PROBL' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TIPB_OID_TIPO_PROB \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_TIPO_SOLUC' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = TSOC_OID_TIPO_SOLU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setProblemasSoluciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /*SELECT s.des_marc, i1.val_i18n desc_tipo_perfil_psico, cod_test, fec_psic\n FROM mae_psico, v_gen_i18n_sicc i1, seg_marca s\n WHERE i1.attr_enti(+) = 'MAE_TIPO_PERFI_PSICO'\n AND i1.idio_oid_idio(+) = 1\n AND i1.val_oid(+) = tpoid_tipo_perf_psic\n AND clie_oid_clie = 152\n AND marc_oid_marc = s.oid_marc */\n query.append(\" SELECT s.des_marc, i1.val_i18n desc_tipo_perfil_psico, cod_test, fec_psic \");\n query.append(\" FROM mae_psico, v_gen_i18n_sicc i1, seg_marca s \");\n query.append(\" WHERE i1.attr_enti(+) = 'MAE_TIPO_PERFI_PSICO' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i1.val_oid(+) = tpoid_tipo_perf_psic \");\n query.append(\" AND clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND marc_oid_marc = s.oid_marc \");\n\n /* query.append(\" SELECT MARC_OID_MARC, TPOID_TIPO_PERF_PSIC, COD_TEST, FEC_PSIC, \");\n query.append(\" I1.VAL_I18N DESC_TIPO_PERFIL_PSICO, S.DES_MARC \");\n query.append(\" FROM MAE_PSICO, V_GEN_I18N_SICC I1, SEG_MARCA S \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_PERFI_PSICO' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TPOID_TIPO_PERF_PSIC \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and MARC_OID_MARC = S.OID_MARC \");*/\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setPsicografias(resultado);\n } catch (CreateException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (RemoteException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (Exception e) {\n e.printStackTrace();\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n UtilidadesLog.debug(\"DTO a retornar: \" + dtos.toString());\n UtilidadesLog.info(\" DAOMAEMaestroClientes.consultarCliente(DTOOID): Salida\");\n\n return dtos;\n }", "public synchronized HashMap nextClient() throws SQLException \n\t{\n\t\tif (selClientes.next()) \n\t\t{\n\t\t\tHashMap result = new HashMap();\n\t\t\tresult.put(\"IDT_MSISDN\", selClientes.getString(\"IDT_MSISDN\"));\n\t\t\tresult.put(\"IDT_PROMOCAO\", new Integer(selClientes.getInt(\"IDT_PROMOCAO\")));\n\t\t\tresult.put(\"DAT_EXECUCAO\", selClientes.getDate(\"DAT_EXECUCAO\"));\n\t\t\tresult.put(\"DAT_ENTRADA_PROMOCAO\", selClientes.getDate(\"DAT_ENTRADA_PROMOCAO\"));\n\t\t\t//Para o campo IND_SUSPENSO, verificar se o campo lido foi NULL porque nao pode ser assumido o valor\n\t\t\t//0 como default\n\t\t\tresult.put(\"IND_SUSPENSO\", new Integer(selClientes.getInt(\"IND_SUSPENSO\")));\n\t\t\tif(selClientes.wasNull())\n\t\t\t{\n\t\t\t\tresult.put(\"IND_SUSPENSO\", null);\n\t\t\t}\n\t\t\tresult.put(\"IND_ISENTO_LIMITE\", new Integer(selClientes.getInt(\"IND_ISENTO_LIMITE\")));\n\t\t\tresult.put(\"IDT_STATUS\", new Integer(selClientes.getInt(\"IDT_STATUS\")));\n\t\t\tresult.put(\"DAT_EXPIRACAO_PRINCIPAL\", selClientes.getDate(\"DAT_EXPIRACAO_PRINCIPAL\"));\n\t\t\tresult.put(\"IND_ZERAR_SALDO_BONUS\", new Integer(selClientes.getInt(\"IND_ZERAR_SALDO_BONUS\")));\n\t\t\tresult.put(\"IND_ZERAR_SALDO_SMS\", new Integer(selClientes.getInt(\"IND_ZERAR_SALDO_SMS\")));\n\t\t\tresult.put(\"IND_ZERAR_SALDO_GPRS\", new Integer(selClientes.getInt(\"IND_ZERAR_SALDO_GPRS\")));\n\t\t\t//Verifica se os minutos totais sao menores que os minutos com tarifacao diferenciada Friends&Family. Caso \n\t\t\t//seja verdadeiro (o que indica inconsistencia na base ou perda de CDRs), os minutos FF devem ser ajustados \n\t\t\t//de forma a ficarem iguais aos minutos totais, conforme alinhamento entre Albervan, Luciano e Daniel\n\t\t\t//Ferreira. Esta decisao foi tomada de modo a diminuir o numero de reclamacoes por nao recebimento de \n\t\t\t//bonus, ao mesmo tempo em que os registros de ligacoes recebidas no extrato permanecerao consistentes \n\t\t\t//(o numero total de minutos nas ligacoes detalhadas correspondem ao numero consolidado, sendo estes todos \n\t\t\t//considerados como tendo tarifacao diferenciada).\n\t\t\tdouble minCredito = selClientes.getDouble(\"MIN_CREDITO\");\n\t\t\tdouble minFF = selClientes.getDouble(\"MIN_FF\");\n\t\t\tif(minCredito < minFF)\n\t\t\t{\n\t\t\t\tminFF = minCredito;\n\t\t\t}\n\t\t\tresult.put(\"MIN_CREDITO\", new Double(minCredito));\n\t\t\tresult.put(\"MIN_FF\", new Double(minFF));\n\t\t\t\n\t\t\treturn result;\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "@RequestMapping(method=RequestMethod.GET)\r\n\tpublic ResponseEntity<?> listar() {\r\n\t\treturn new ResponseEntity<List<Cliente>>(clienteService.listar(), HttpStatus.OK);\r\n\t}", "Set<Client> getAllClients();", "public void cadastrar(Cliente cliente){\n\t\tSystem.out.println(cliente.toString());\r\n\t\tint tamanho = this.clientes.length;\r\n\t\tthis.clientes = Arrays.copyOf(this.clientes, this.clientes.length + 1);\r\n\t\tthis.clientes[tamanho - 1] = cliente;\r\n\t}", "@Override\n protected byte[] getClientData() {\n return (clientData + \" individual\").getBytes(StandardCharsets.UTF_8);\n }", "private void obtenerClienteRecomendante(Cliente clienteParametro, Long \n oidPais) throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendante(Cliente\"\n +\"clienteParametro, Long oidPais):Entrada\");\n // query sobre INC\n BelcorpService bsInc = null;\n RecordSet respuestaInc = null;\n StringBuffer queryInc = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n try {\n //jrivas 17/8/2005\n //Inc 20556 \n queryInc.append(\" SELECT RECT.CLIE_OID_CLIE, FEC_INIC, FEC_FINA \");\n queryInc.append(\" FROM INC_CLIEN_RECDO RDO, CRA_PERIO, \");\n queryInc.append(\" INC_CLIEN_RECTE RECT \");\n queryInc.append(\" WHERE PERD_OID_PERI = OID_PERI \");\n queryInc.append(\" AND RDO.CLIE_OID_CLIE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND CLR3_OID_CLIE_RETE = OID_CLIE_RETE \");\n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n // query sobre MAE\n BelcorpService bsMae = null;\n RecordSet respuestaMae = null;\n StringBuffer queryMae = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n ClienteRecomendante clienteRecomendante = new ClienteRecomendante();\n boolean hayRecomendante;\n\n if (!respuestaInc.esVacio()) {\n // tomo los datos de INC\n hayRecomendante = true;\n\n {\n BigDecimal recomendante = (BigDecimal) respuestaInc\n .getValueAt(0, \"CLIE_OID_CLIE\");\n clienteRecomendante.setRecomendante((recomendante != null) \n ? new Long(recomendante.longValue()) : null);\n }\n\n clienteRecomendante.setFechaInicio((Date) respuestaInc\n .getValueAt(0, \"FEC_INIC\"));\n // fecha fin de INC\n {\n Date fechaFin = (Date) respuestaInc.getValueAt(0, \"FEC_FINA\");\n clienteRecomendante.setFechaFin((fechaFin != null) \n ? fechaFin : null);\n }\n \n /* */\n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n Date fec_desd = (Date) respuestaInc.getValueAt(0, \"FEC_INIC\");\n\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteParametro.getOidCliente()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(fec_desd) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n \n clienteParametro.setPeriodo(periodo);\n\n/* */\n } else {\n // BELC300022542 - gPineda - 24/08/06\n try {\n queryInc = new StringBuffer();\n \n //jrivas 4/7/2005\n //Inc 16978\n queryInc.append(\" SELECT CLIE_OID_CLIE_VNTE, FEC_DESD, FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNDO = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n \n // BELC300022542 - gPineda - 24/08/06\n //queryInc.append(\" AND COD_TIPO_VINC = '\" + ConstantesMAE.TIPO_VINCULO_RECOMENDADA + \"'\");\n queryInc.append(\" AND IND_RECO = 1 \");\n \n respuestaMae = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMae \" + respuestaMae); \n \n \n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n if (!respuestaMae.esVacio()) { \n Date fec_desd = (Date) respuestaMae.getValueAt(0, \"FEC_DESD\");\n \n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteParametro.getOidCliente()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(fec_desd) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n \n clienteParametro.setPeriodo(periodo);\n } \n // } \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if (!respuestaMae.esVacio()) {\n hayRecomendante = true;\n clienteRecomendante.setRecomendante(new Long(((BigDecimal) \n respuestaMae.getValueAt(0, \"CLIE_OID_CLIE_VNTE\"))\n .longValue()));\n\n {\n Date fechaInicio = (Date) respuestaMae\n .getValueAt(0, \"FEC_DESD\");\n clienteRecomendante.setFechaInicio((fechaInicio != null) \n ? fechaInicio : null);\n }\n // fecha fin de MAE\n {\n Date fechaFin = (Date) respuestaMae\n .getValueAt(0, \"FEC_HAST\");\n clienteRecomendante.setFechaFin((fechaFin != null) \n ? fechaFin : null);\n }\n } else {\n hayRecomendante = false;\n }\n }\n // tomo los datos de MAE\n if (hayRecomendante) {\n \n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteRecomendante.getRecomendante()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n\n clienteRecomendante.setPeriodo(periodo);\n // } \n \n Cliente clienteLocal = new Cliente();\n clienteLocal.setOidCliente(clienteRecomendante.getRecomendante());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendante.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n clienteParametro.setClienteRecomendante(clienteRecomendante);\n \n } else {\n clienteParametro.setClienteRecomendante(null);\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendante(Cliente\"\n +\" clienteParametro, Long oidPais):Salida\");\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == INTENTO_NUEVO_CLIENTE) {\n if (resultCode == RESULT_OK) {\n\n // obtengo los datos del cliente lo meto en un objeto cliente y lo meto en el arrylist\n\n String nombre=data.getStringExtra(\"nombre\");\n int cantidad=Integer.parseInt(data.getStringExtra(\"cantidad\"));\n String fecha=data.getStringExtra(\"fecha\");\n // creo un objeto cliente\n listaCuentas.add(new Cliente(nombre,cantidad,fecha));\n rellenarListview(listaCuentas);\n\n // mientras escribo el archivo\n }\n if (resultCode == RESULT_CANCELED) {\n // no hago nada\n\n\n }\n\n\n }\n }", "List<User> getAllClients();", "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Cliente> findAll() {\n\t\treturn clienteDao.findAll();\n\t}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<Cliente> findAll() {\n\t\treturn clienteDao.findAll();\n\t}", "@Override\n\tpublic Cliente buscarPorId(int id) throws ExceptionUtil {\n\t\treturn daoCliente.buscarPorId(id);\n\t}" ]
[ "0.7522278", "0.74219495", "0.7366895", "0.7331336", "0.72618705", "0.7242617", "0.7232715", "0.7207234", "0.7193815", "0.7192866", "0.71903026", "0.71792483", "0.71692", "0.71597326", "0.71567965", "0.71505123", "0.7149951", "0.71484005", "0.7137916", "0.7117699", "0.7102515", "0.7086406", "0.7040469", "0.7031938", "0.7026201", "0.7017815", "0.70130837", "0.69812226", "0.6981206", "0.69731265", "0.6969897", "0.68909", "0.68710124", "0.68679726", "0.6834671", "0.68251663", "0.6824433", "0.6816978", "0.6813983", "0.68021774", "0.679165", "0.6786014", "0.67813975", "0.6778844", "0.6750367", "0.6747549", "0.67324024", "0.6717672", "0.671372", "0.66819155", "0.66751564", "0.6671224", "0.6655264", "0.664878", "0.66421384", "0.6601764", "0.65959233", "0.6585778", "0.6576367", "0.6573532", "0.6572245", "0.65669537", "0.6552785", "0.65420204", "0.65409976", "0.6514966", "0.64948684", "0.64939857", "0.6489571", "0.6487785", "0.6485507", "0.64805365", "0.647386", "0.6466034", "0.64649785", "0.6464962", "0.6453805", "0.644846", "0.64473224", "0.6445683", "0.6438812", "0.6438494", "0.6426018", "0.6423379", "0.6419053", "0.64162356", "0.6413737", "0.6411092", "0.64044803", "0.64027244", "0.63923824", "0.6376125", "0.6373772", "0.6367627", "0.63649285", "0.63633794", "0.63515157", "0.6350895", "0.633994", "0.6338307" ]
0.74532866
1
TODO Autogenerated method stub
@Override public void onClick(View v) { switch(v.getId()){ case R.id.modifypwd_ensure: strNewPasswd = CEnewPasswd.getText().toString(); strRenewPasswd = CErenewPasswd.getText().toString(); if (strOldPasswd == null || strNewPasswd == null || strRenewPasswd == null){ Toast.makeText(ModifyPassword.this, "请输入密码!", Toast.LENGTH_SHORT).show(); return; } if (!strNewPasswd.equals(strRenewPasswd)){ Toast.makeText(ModifyPassword.this, "两次输入的密码不一致,请重新输入!", Toast.LENGTH_SHORT).show(); return; } if (strOldPasswd.equals(strNewPasswd)){ Toast.makeText(ModifyPassword.this, "新旧密码一样,请重新输入!", Toast.LENGTH_SHORT).show(); return; } if ((strNewPasswd.length() < 6) || (strNewPasswd.length() > 16)){ Toast.makeText(ModifyPassword.this, "密码应为6-16位字母和数字组合!", Toast.LENGTH_SHORT).show(); return; } else{ Pattern pN = Pattern.compile("[0-9]{6,16}"); Matcher mN = pN.matcher(strNewPasswd); Pattern pS = Pattern.compile("[a-zA-Z]{6,16}"); Matcher mS = pS.matcher(strNewPasswd); if((mN.matches()) || (mS.matches())){ Toast.makeText(ModifyPassword.this,"密码应为6-16位字母和数字组合!", Toast.LENGTH_SHORT).show(); return; } } if (new ConnectionDetector(ModifyPassword.this).isConnectingTOInternet()) { pd = ProgressDialog.show(ModifyPassword.this, "", "正在加载...."); new RequestTask().execute(); } else { Toast.makeText(ModifyPassword.this, "网络连接不可用,请检查网络后再试", Toast.LENGTH_SHORT).show(); } break; case R.id.modify_pwd_back: startActivity(new Intent(ModifyPassword.this, ShowUserMessage.class)); this.finish(); break; default: break; } }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
The constructor which essentially calculates the textual similarities between two files.
public CodeComparisonScores(String[] filesOne, String[] filesTwo) throws IOException { scoreForLD = 0; scoreForLCS = 0; overallTextDiffScore = 0; List<String> normalizedOfFilesOne = new ArrayList<String>(); List<String> normalizedOfFilesTwo = new ArrayList<String>(); for (int a = 0; a < filesOne.length; a++) { Normalizer normalizer = new Normalizer(filesOne[a]); normalizer.runNormalization(); normalizedOfFilesOne.add(normalizer.getNormalized()); } for (int b = 0; b < filesTwo.length; b++) { Normalizer normalizer = new Normalizer(filesTwo[b]); normalizer.runNormalization(); normalizedOfFilesTwo.add(normalizer.getNormalized()); } for (int i = 0; i < normalizedOfFilesOne.size(); i++) { for (int j = 0; j < normalizedOfFilesTwo.size(); j++) { CodeComparisonScoresHelper(normalizedOfFilesOne.get(i), normalizedOfFilesTwo.get(j)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TextFileComparator(String f1, String f2) {\n\t\tfileName1 = f1;\n\t\tfileName2 = f2;\n\t\tcompareFiles();\n\t}", "private void CompareTwoFiles() {\n GetCharactersFromProject prog1Char;\r\n KGram prog1KGram;\r\n HashKGram prog1HashKGram;\r\n FingerPrint prog1FingerPrint;\r\n ArrayList<Integer> fingerprintProg1 = null;\r\n\r\n GetCharactersFromProject prog2Char;\r\n KGram prog2KGram;\r\n HashKGram prog2HashKGram;\r\n FingerPrint prog2FingerPrint;\r\n ArrayList<Integer> fingerprintProg2 = null;\r\n\r\n //for the first file\r\n try {\r\n prog1Char = new GetCharactersFromProject(filepath1);\r\n prog1KGram = new KGram(prog1Char.getCharacters());\r\n prog1HashKGram = new HashKGram(prog1KGram.ReturnProcessedKGram());\r\n prog1FingerPrint = new FingerPrint(prog1HashKGram.ReturnProcessedHashes());\r\n fingerprintProg1 = prog1FingerPrint.ReturnFingerPrint();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n //this is for the second file\r\n try {\r\n prog2Char = new GetCharactersFromProject(filepath2);\r\n prog2KGram = new KGram(prog2Char.getCharacters());\r\n prog2HashKGram = new HashKGram(prog2KGram.ReturnProcessedKGram());\r\n prog2FingerPrint = new FingerPrint(prog2HashKGram.ReturnProcessedHashes());\r\n fingerprintProg2 = prog2FingerPrint.ReturnFingerPrint();\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n //this is for jaccard index. Jaccard index will be the basis of similarity\r\n float numSimilarity = 0;\r\n boolean isSimilarEncounter = false;\r\n int sizeFingerprint1 = fingerprintProg1.size();\r\n int sizeFingerprint2 = fingerprintProg2.size();\r\n\r\n for (Integer integer : fingerprintProg1) {\r\n\r\n for (Integer value : fingerprintProg2) {\r\n\r\n\r\n if ((integer.intValue() == value.intValue()) && !isSimilarEncounter) {\r\n numSimilarity++;\r\n isSimilarEncounter = true;\r\n }\r\n\r\n }\r\n\r\n\r\n isSimilarEncounter = false;\r\n }\r\n\r\n SimilarityScore = (numSimilarity / (sizeFingerprint1 + sizeFingerprint2 - numSimilarity));\r\n }", "@Override\n\tpublic ComparisonResult computeDifference() throws Exception {\n\t\t\n\t\tList<Token> tokens1 = file1.getTokens();\n\t\tList<Token> tokens2 = file2.getTokens();\n\t\t\n\t\t\n\t\tif (tokens1.size() == 0 || tokens2.size() == 0)\n\t\t\treturn new ComparisonResult(null, 0);\n\t\t\n\t\tQGramToken qGram1 = (QGramToken) new QGramTokenContainer(tokens1, tokens1.size()).get(0);\n\t\tQGramToken qGram2 = (QGramToken) new QGramTokenContainer(tokens2, tokens2.size()).get(0);\n\t\t\n\t\t// peut être négatif si les deux fichiers ont un taux d'alignement des tokens supérieur au nombre total de token.\n\t\tdouble val = qGram1.needlemanWunschAlignment(qGram2, -1) / (double) Math.max(qGram1.size(), qGram2.size());\n\t\t\n\t\treturn new ComparisonResult((val > heuristicPlagiatThreshold) ? (Boolean)true : val <= 0 ? false : null, val < 0 ? 0 : val);\n\t}", "@Override\r\n\tpublic String getSimilarityExplained(String string1, String string2) {\r\n //todo this should explain the operation of a given comparison\r\n return null; //To change body of implemented methods use File | Settings | File Templates.\r\n }", "@Test\n public final void testSimilarity() {\n System.out.println(\"similarity\");\n RatcliffObershelp instance = new RatcliffObershelp();\n\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"ring\" ==> 4, \"My s\" ==> 3, \"s\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(4 + 3 + 1) / (9 + 9)\n\t\t// = 16/18\n\t\t// = 0.888888\n assertEquals(\n 0.888888,\n instance.similarity(\"My string\", \"My tsring\"),\n 0.000001);\n\t\t\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"My \" ==> 3, \"tri\" ==> 3, \"g\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(3 + 3 + 1) / (9 + 9)\n\t\t// = 14/18\n\t\t// = 0.777778\n assertEquals(\n 0.777778,\n instance.similarity(\"My string\", \"My ntrisg\"),\n 0.000001);\n\n // test data from essay by Ilya Ilyankou\n // \"Comparison of Jaro-Winkler and Ratcliff/Obershelp algorithms\n // in spell check\"\n // https://ilyankou.files.wordpress.com/2015/06/ib-extended-essay.pdf\n // p13, expected result is 0.857\n assertEquals(\n 0.857,\n instance.similarity(\"MATEMATICA\", \"MATHEMATICS\"),\n 0.001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.7368421052631579\n assertEquals(\n 0.736842,\n instance.similarity(\"aleksander\", \"alexandre\"),\n 0.000001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.6666666666666666\n assertEquals(\n 0.666666,\n instance.similarity(\"pennsylvania\", \"pencilvaneya\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 14/18 = 0.7777777777777778‬\n assertEquals(\n 0.777778,\n instance.similarity(\"WIKIMEDIA\", \"WIKIMANIA\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 24/40 = 0.65\n assertEquals(\n 0.6,\n instance.similarity(\"GESTALT PATTERN MATCHING\", \"GESTALT PRACTICE\"),\n 0.000001);\n \n NullEmptyTests.testSimilarity(instance);\n }", "public static void demo_SimilarityMetrics(RoWordNet RoWN, String textCorpus_FilePath) throws Exception {\n boolean allowAllRelations = true;\n\n Literal l1 = new Literal(\"salvare\");\n Literal l2 = new Literal(\"dotare\");\n String id1 = RoWN.getSynsetsFromLiteral(l1).get(0).getId();\n String id2 = RoWN.getSynsetsFromLiteral(l2).get(0).getId();\n Synset s1, s2;\n\n s1 = RoWN.getSynsetById(id1);\n s2 = RoWN.getSynsetById(id2);\n\n IO.outln(\"Computed IC for synset_1: \" + s1.getInformationContent());\n IO.outln(\"Computed IC for synset_2: \" + s2.getInformationContent());\n IO.outln(\"Custom distance: \" + SimilarityMetrics.distance(RoWN, s1\n .getId(), s2.getId(), true, null));\n IO.outln(\"Custom hypernymy distance: \" + SimilarityMetrics\n .distance(RoWN, s1.getId(), s2.getId()));\n\n IO.outln(\"Sim Resnik: \" + SimilarityMetrics.Resnik(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim Lin: \" + SimilarityMetrics.Lin(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim JCN: \" + SimilarityMetrics.JiangConrath(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Dist JCN: \" + SimilarityMetrics\n .JiangConrath_distance(RoWN, s1.getId(), s2.getId(), allowAllRelations));\n }", "public void compareFiles() {\n\t \n\t\tprepareLinesFile(fileName1, linesFile1);\n\t\tprepareLinesFile(fileName2, linesFile2);\n\t\t\n\t\t//If both files have the same number of lines then we compare each line\n\t if (linesFile1.size() == linesFile2.size()) {\n\t \t \tfor (int i = 0; i < linesFile1.size(); i++) {\n\t \t\tcompareLines(i);\t\t\t\t\n\t\t\t}\n\t }\n\t \n\t //Otherwise\n\t else {\n\t \t//We distinguish the files by their number of lines\n\t \tfinal ArrayList<String> linesLongerFile;\n\t \tfinal ArrayList<String> linesShorterFile;\n\t \t\n\t \t\n\t \tif (linesFile1.size() > linesFile2.size()) {\n\t \t\tlinesLongerFile = linesFile1;\n\t \t\tlinesShorterFile = linesFile2;\n\t \t}\n\t \t\n\t \telse {\n\t \t\tlinesLongerFile = linesFile2;\n\t \t\tlinesShorterFile = linesFile1;\n\t \t}\n\t \t\n\t \tint counter = 0;\n\t \t//We compare each line a number of times equals to the number of the shortest file lines\n\t \tfor (int i = 0; i < linesShorterFile.size(); i++) {\n\t \t\tcompareLines(i);\n\t \t\tcounter = i;\n\t \t}\n\t \t\n\t \t//We show the remaining lines to add into the first file\n\t \tfor (int i = counter+1; i < linesLongerFile.size(); i++) {\n\t \t\t\n\t \t\t//If the second file is the longest then we show the remaining lines to add into the first file\n\t \t\tif (linesLongerFile.size() == linesFile2.size()) {\n\t \t\t\tSystem.out.println(\"+ \"+linesLongerFile.get(i));\n\t \t\t}\n\t \t\t\n\t \t\t//If the first file is the longest then we show the remaining lines to delete \n\t \t\telse {\n\t \t\t\tSystem.out.println(\"- \"+linesLongerFile.get(i));\n\t \t\t}\n\t \t\t\n\t \t}\n\t }\t\t\n\t}", "public void description() throws Exception {\n PrintWriter pw = new PrintWriter(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \n \n // BufferedReader for obtaining the description files of the ontology & ODP\n BufferedReader br1 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/ontology_description\")); \n BufferedReader br2 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/odps_description.txt\")); \n String line1 = br1.readLine(); \n String line2 = br2.readLine(); \n \n // loop is used to copy the lines of file 1 to the other \n if(line1==null){\n\t \tpw.print(\"\\n\");\n\t }\n while (line1 != null || line2 !=null) \n { \n if(line1 != null) \n { \n pw.println(line1); \n line1 = br1.readLine(); \n } \n \n if(line2 != null) \n { \n pw.println(line2); \n line2 = br2.readLine(); \n } \n } \n pw.flush(); \n // closing the resources \n br1.close(); \n br2.close(); \n pw.close(); \n \n // System.out.println(\"Merged\"); -> for checking the code execution\n /* On obtaining the merged file, Doc2Vec model is implemented so that vectors are\n * obtained. And the, similarity ratio of the ontology description with the ODPs \n * can be found using cosine similarity \n */\n \tFile file = new File(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \t\n SentenceIterator iter = new BasicLineIterator(file);\n AbstractCache<VocabWord> cache = new AbstractCache<VocabWord>();\n TokenizerFactory t = new DefaultTokenizerFactory();\n t.setTokenPreProcessor(new CommonPreprocessor()); \n LabelsSource source = new LabelsSource(\"Line_\");\n ParagraphVectors vec = new ParagraphVectors.Builder()\n \t\t.minWordFrequency(1)\n \t .labelsSource(source)\n \t .layerSize(100)\n \t .windowSize(5)\n \t .iterate(iter)\n \t .allowParallelTokenization(false)\n .workers(1)\n .seed(1)\n .tokenizerFactory(t) \n .build();\n vec.fit();\n \n //System.out.println(\"Check the file\");->for execution of code\n PrintStream p=new PrintStream(new File(System.getProperty(\"user.dir\")+ \"/resources/description_values\")); //storing the numeric values\n \n \n Similarity s=new Similarity(); //method that checks the cosine similarity\n s.similarityCheck(p,vec);\n \n \n }", "public static String getDiff(String file1, String file2) {\n\t OutputStream out = new ByteArrayOutputStream();\n\t try {\n\t RawText rt1 = new RawText(new File(file1));\n\t RawText rt2 = new RawText(new File(file2));\n\t EditList diffList = new EditList();\n\t //new HistogramDiff().diff(RawTextComparator.DEFAULT, rt1, rt2);\t\n\t diffList.addAll(new HistogramDiff().diff(RawTextComparator.DEFAULT, rt1, rt2));\n\t //new DiffFormatter(out).format(diffList, rt1, rt2);\n\t DiffFormatter diffFormatter = new DiffFormatter(out);\n\t diffFormatter.format(diffList, rt1, rt2);\n\t System.out.println(out.toString());\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return out.toString();\n\t}", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "public Set<String> calculateDistance() throws IOException {\n booleanSearch();\n\n Set<String> words = invertedIndexForQuerryWords.keySet();\n Map<String, Double> tfidfQuerry = new TreeMap<>();\n\n //load idf\n char c='a';\n char prC = 'v';\n for (String word : words){\n c = word.charAt(0);\n if(c != prC) {\n String path = Constants.PATH_TO_IDF + c + \"IDF.idf\";\n prC = c;\n idfMap.putAll(objectMapper.readValue(new File(path), new TypeReference<TreeMap<String, Double>>(){}));\n }\n }\n\n Map<String, Double> distanceMap = new HashMap<>();\n double sum = 0.0;\n //calculez norma interogarii\n for(String word:words){\n double idf, tf;\n if(idfMap.containsKey(word)) {\n idf = idfMap.get(word);\n tf = 1.0 / words.size();\n tfidfQuerry.put(word, tf * idf);\n\n sum += (tf * idf) * (tf * idf);\n } else {\n sum += 0.0;\n }\n }\n\n double normQuerry = Math.sqrt(sum);\n\n //iau toate documentele rezultate din boolean search\n Set<String> docs = new TreeSet<>();\n for(List<MyPair> list : invertedIndexForQuerryWords.values()) {\n if (list != null) {\n docs.addAll(list.stream().map(p -> p.getKey()).collect(Collectors.toSet()));\n }\n }\n\n List<File> documents = FileLoader.getFilesForInternalPath(\"Norms\", \".norm\");\n\n Map<String, Double> norms = new HashMap<>();\n for(File file : documents) {\n norms.putAll(objectMapper.readValue(file, new TypeReference<TreeMap<String, Double>>(){}));\n }\n\n //pentru fiecare document din boolean search calculez distanta cosinus\n for(String doc : docs) {\n\n String fileName = Paths.get(doc).getFileName().toString();\n\n String filePath = Constants.PATH_TO_TF + fileName.replaceFirst(\"[.][^.]+$\", \".tf\");\n\n Map<String, Double> tf = objectMapper.readValue(new File(filePath), new TypeReference<TreeMap<String, Double>>(){});\n double wordTF, wordIDF;\n double vectorialProduct = 0.0;\n double tfidfForQueryWord;\n\n for(String word : words) {\n if (tf.containsKey(word)) {\n wordTF = tf.get(word);\n wordIDF = idfMap.get(word);\n tfidfForQueryWord = tfidfQuerry.get(word);\n\n vectorialProduct += tfidfForQueryWord * wordIDF * wordTF;\n }\n }\n\n double normProduct = normQuerry * norms.get(Paths.get(doc).getFileName().toString());\n\n distanceMap.put(doc, vectorialProduct / normProduct);\n }\n\n //sortare distance map\n distanceMap = distanceMap.entrySet().stream()\n .sorted(Map.Entry.comparingByValue(Collections.reverseOrder()))\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n Map.Entry::getValue,\n (e1, e2) -> e1,\n LinkedHashMap::new));\n\n// System.out.println(\"Cos distance:\");\n// for(Map.Entry entry : distanceMap.entrySet()){\n// System.out.println(entry);\n// }\n\n return distanceMap.keySet();\n }", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "@Override\r\n\tpublic final float getSimilarity(final String string1, final String string2) {\r\n //split the strings into tokens for comparison\r\n final ArrayList<String> str1Tokens = this.tokeniser.tokenizeToArrayList(string1);\r\n final ArrayList<String> str2Tokens = this.tokeniser.tokenizeToArrayList(string2);\r\n \r\n if (str1Tokens.size() == 0){\r\n \treturn 0.0f;\r\n }\r\n\r\n float sumMatches = 0.0f;\r\n float maxFound;\r\n for (Object str1Token : str1Tokens) {\r\n maxFound = 0.0f;\r\n for (Object str2Token : str2Tokens) {\r\n final float found = this.internalStringMetric.getSimilarity((String) str1Token, (String) str2Token);\r\n if (found > maxFound) {\r\n maxFound = found;\r\n }\r\n }\r\n sumMatches += maxFound;\r\n }\r\n return sumMatches / str1Tokens.size();\r\n }", "public ConfidenceAlignment(String sgtFile,String tgsFile,String sgtLexFile,String tgsLexFile){\r\n\t\r\n\t\tLEX = new TranslationLEXICON(sgtLexFile,tgsLexFile);\r\n\t\t\r\n\t\tint sennum = 0;\r\n\t\tdouble score = 0.0;\r\n\t\t// Reading a GZIP file (SGT) \r\n\t\ttry { \r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader\r\n\t\t\t\t\t\t\t\t(new GZIPInputStream(new FileInputStream(sgtFile)),\"UTF8\"));\r\n\t\t\r\n\t\tString one = \"\"; String two =\"\"; String three=\"\"; \r\n\t\twhile((one=br.readLine())!=null){\r\n\t\t\ttwo = br.readLine(); \r\n\t\t\tthree=br.readLine(); \r\n\r\n\t\t\tMatcher m1 = scorepattern.matcher(one);\r\n\t\t\tif (m1.find()) \r\n\t\t\t{\r\n\t\t\t\tscore = Double.parseDouble(m1.group(1));\r\n\t\t\t\t//System.err.println(\"Score:\"+score);\r\n\t\t\t}\r\n\r\n\t\t\tgizaSGT.put(sennum,score); \r\n\t\t\tsennum++;\r\n\t\t}\r\n\t\tbr.close();\r\n\t\tSystem.err.println(\"Loaded \"+sennum+ \" sens from SGT file:\"+sgtFile);\r\n\t\t\r\n\t\t// Reading a GZIP file (TGS)\r\n\t\tsennum = 0; \r\n\t\tbr = new BufferedReader(new InputStreamReader\r\n\t\t\t\t\t\t\t\t(new GZIPInputStream(new FileInputStream(tgsFile)),\"UTF8\")); \r\n\t\twhile((one=br.readLine())!=null){\r\n\t\t\ttwo = br.readLine(); \r\n\t\t\tthree=br.readLine(); \r\n\t\t\t\r\n\t\t\tMatcher m1 = scorepattern.matcher(one);\r\n\t\t\tif (m1.find()) \r\n\t\t\t{\r\n\t\t\t\tscore = Double.parseDouble(m1.group(1));\r\n\t\t\t\t//System.err.println(\"Score:\"+score);\r\n\t\t\t}\r\n\t\t\tgizaTGS.put(sennum,score); \r\n\t\t\tsennum++;\r\n\t\t}\r\n\t\tbr.close();\t\t\r\n\t\t}catch(Exception e){}\r\n\t\tSystem.err.println(\"Loaded \"+sennum+ \" sens from SGT file:\"+sgtFile);\t\r\n\t}", "public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "void calculateDistance()\t{\n\t\t\t\t\t\t\t\t\t\n\t\tfor (String substringOne : setOne)\t{\n\t\t\t\tif (setTwo.contains(substringOne))\n\t\t\t\t\toverlapSubstringCount++;\n\t\t}\t\t\t\t\t\t\t\n\n\t\tsubstringCount = (length1 - q) + (length2 - q) + 2 - overlapSubstringCount; \n\t\tdistance = (double)overlapSubstringCount/(substringCount - overlapSubstringCount);\t\n\t}", "@Override\r\n\tpublic float getUnNormalisedSimilarity(String string1, String string2) {\r\n //todo check this is valid before use mail [email protected] if problematic\r\n return getSimilarity(string1, string2);\r\n }", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "protected double nameSimilarity(String n1, String n2, boolean useWordNet)\n\t{\n\t\tif(n1.equals(n2))\n\t\t\treturn 1.0;\n\t\t\n\t\t//Split the source name into words\n\t\tString[] sW = n1.split(\" \");\n\t\tHashSet<String> sWords = new HashSet<String>();\n\t\tHashSet<String> sSyns = new HashSet<String>();\n\t\tfor(String w : sW)\n\t\t{\n\t\t\tsWords.add(w);\n\t\t\tsSyns.add(w);\n\t\t\t//And compute the WordNet synonyms of each word\n\t\t\tif(useWordNet && w.length() > 2)\n\t\t\t\tsSyns.addAll(wn.getAllNounWordForms(w));\n\t\t}\n\t\t\n\t\t//Split the target name into words\n\t\tString[] tW = n2.split(\" \");\n\t\tHashSet<String> tWords = new HashSet<String>();\n\t\tHashSet<String> tSyns = new HashSet<String>();\t\t\n\t\tfor(String w : tW)\n\t\t{\n\t\t\ttWords.add(w);\n\t\t\ttSyns.add(w);\n\t\t\t//And compute the WordNet synonyms of each word\n\t\t\tif(useWordNet && w.length() > 3)\n\t\t\t\ttSyns.addAll(wn.getAllWordForms(w));\n\t\t}\n\t\t\n\t\t//Compute the Jaccard word similarity between the properties\n\t\tdouble wordSim = Similarity.jaccard(sWords,tWords)*0.9;\n\t\t//and the String similarity\n\t\tdouble simString = ISub.stringSimilarity(n1,n2)*0.9;\n\t\t//Combine the two\n\t\tdouble sim = 1 - ((1-wordSim) * (1-simString));\n\t\tif(useWordNet)\n\t\t{\n\t\t\t//Check if the WordNet similarity\n\t\t\tdouble wordNetSim = Similarity.jaccard(sSyns,tSyns);\n\t\t\t//Is greater than the name similarity\n\t\t\tif(wordNetSim > sim)\n\t\t\t\t//And if so, return it\n\t\t\t\tsim = wordNetSim;\n\t\t}\n\t\treturn sim;\n\t}", "public FileCat(String file1, String file2) {\n this.file1 = file1;\n this.file2 = file2;\n extension = \".txt\";\n }", "@Override\r\n\tpublic String getLongDescriptionString() {\r\n return \"Implements the Monge Elkan algorithm providing an matching style similarity measure between two strings\";\r\n }", "public Phonetics(ArrayList<String> fileNames, ArrayList<String> inputNames) {\n\t\t// User inputs names\n\t\tinsertNames(fileNames);\n\t\tfor (int i = 0; i < inputNames.size(); i++) {\n\t\t\tString name = (inputNames.get(i));\n\t\t\tgetSimilarNames(name);\n\t\t}\n\t}", "private static int textCompare(final Resource r1, final Resource r2) throws IOException {\n try (BufferedReader in1 =\n new BufferedReader(new InputStreamReader(r1.getInputStream()));\n BufferedReader in2 = new BufferedReader(\n new InputStreamReader(r2.getInputStream()))) {\n\n String expected = in1.readLine();\n while (expected != null) {\n final String actual = in2.readLine();\n if (!expected.equals(actual)) {\n if (actual == null) {\n return 1;\n }\n return expected.compareTo(actual);\n }\n expected = in1.readLine();\n }\n return in2.readLine() == null ? 0 : -1; //NOSONAR\n }\n }", "private void CodeComparisonScoresHelper(String fileOne, String fileTwo) {\n double maxLength = Math.max(fileOne.length(), fileTwo.length());\n\n int amountOfChangesLD = new LevensthienDistance(fileOne, fileTwo).getEditDistance();\n int amountLCS = new LongestCommonSubsequence(fileOne, fileTwo).getLengthOfLCS();\n\n double LDScore = (maxLength - amountOfChangesLD) / maxLength * 100;\n double LCSScore = amountLCS / maxLength * 100;\n double overallScore = (LCSScore + LDScore) / 2;\n\n if (LDScore > scoreForLD) {\n scoreForLD = LDScore;\n }\n if (LCSScore > scoreForLCS) {\n scoreForLCS = LCSScore;\n }\n if (overallScore > overallTextDiffScore) {\n overallTextDiffScore = overallScore;\n }\n }", "public static void main(String [] args) throws IOException\n {\n System.out.println(\"PLAINTEXT FREQUENCY\");\n \n FrequencyAnalysis fa = new FrequencyAnalysis(); \n PrintWriter outFile1 = new PrintWriter (new File(\"plaintextfreq.txt\")); \n fa.readFile(\"plaintext.txt\"); \n int total1 = fa.getTotal();\n System.out.printf(\"%-10s%11s%16s%n\", \"Letter\", \"Count\", \"Frequency\");\n outFile1.printf(\"%-10s%11s%16s%n\", \"Letter\", \"Count\", \"Frequency\");\n int l = 0;\n for (int k : fa.getFrequency())\n {\n System.out.printf(\"%-10s%10d%16.2f%n\", (char) (65 + l), k, (((double) k / total1) * 100));\n outFile1.printf(\"%-10s%10d%16.2f%n\", (char) (65 + l), k, (((double) k / total1) * 100));\n l++;\n }\n outFile1.close();\n \n System.out.println();\n System.out.println();\n System.out.println(\"CIPHER FREQUENCY\");\n \n FrequencyAnalysis cfa = new FrequencyAnalysis(); \n PrintWriter outFile2 = new PrintWriter (new File(\"ciphertextfreq.txt\")); \n cfa.readFile(\"ciphertext.txt\"); \n int total2 = cfa.getTotal();\n System.out.printf(\"%-10s%11s%16s%n\", \"Letter\", \"Count\", \"Frequency\");\n outFile2.printf(\"%-10s%11s%16s%n\", \"Letter\", \"Count\", \"Frequency\");\n l = 0;\n for (int k : cfa.getFrequency())\n {\n System.out.printf(\"%-10s%10d%16.2f%n\", (char) (65 + l), k, (((double) k / total2) * 100));\n outFile2.printf(\"%-10s%10d%16.2f%n\", (char) (65 + l), k, (((double) k / total2) * 100));\n l++;\n }\n outFile2.close();\n \n \n }", "public static void main(String args[]) throws IOException{\n\t\tString filename=null;\n\t\tString outfileNoS=\"CorpusOutputNoS.txt\";\n\t\tString outfileS=\"CorpusOutputS.txt\";\n\t\tString outfileT=\"CorpusOutputT.txt\";\n\t\tString str;\n\t\t\n\t\tFile out1= new File(outfileNoS);\n\t\twriter1= new FileWriter(out1);\n\t\t\n\t\tFile out2= new File(outfileS);\n\t\twriter2= new FileWriter(out2);\n\t\t\n\t\tFile out3= new File(outfileT);\n\t\twriter3= new FileWriter(out3);\n\t\t\n\t\tString given=null; \n\t\tif(args.length>0)\n\t\t\tfilename=args[0];\n\t\t\n\t\tcorpusTokens = new ArrayList<String>();\n\t\tcorpusUnigramCount = new HashMap<String, Integer>();\n\t\tcorpusBigramCount = new HashMap<String, Integer>();\n\t\tcorpusBigramProb= new HashMap<String,Double>();\n\t\tcorpusNumOfBigrams=0;\n\t\t\n\t\tScanner in = new Scanner(new File(filename));\n\t\t\n//----------------------------------CORPUS BEGIN-------------------------\n\t\t//finds unigram and Bigram count in Corpus and display it\n\t\tcorpusNumOfBigrams=findBigramCount(in,corpusTokens,corpusUnigramCount,corpusBigramCount);\n\t\t\n\t\t//Find corpus Bigram Prob and display it\n\t\tfindBigramProb(corpusUnigramCount,corpusBigramCount,corpusBigramProb,corpusTokens,corpusNumOfBigrams);\n\t\t\n\t\tint V= corpusUnigramCount.size();\n\n\t\t//display details of corpus\n\t\tstr=String.valueOf(corpusNumOfBigrams)+\"\\n\"; //number of Bigrams\n\t\tstr+=String.valueOf(corpusBigramCount.size())+\"\\n\";//Unique Bigram count \n\t\tstr+=String.valueOf(V)+\"\\n\";//Unique Unigram count \n\t\tstr+= String.valueOf(corpusTokens.size())+\"\\n\";//Total count\n\t\tstr+=\"\\n\";\n\t\twriter1.write(str);\n\t\t\n\t\tdisplayCount1(corpusUnigramCount);\n\t\tdisplayCount1(corpusBigramCount);\n\t\tdisplayProb1(corpusBigramProb);\n\t\t\n\t\t\n//-----------------------------------CORPUS END--------------------------------\n\n//-------------------------Add-one Smoothing begins--------------------\n\t\t\n\t\tfindBigramProbSmoothing(corpusBigramCount,V);\n\t\tdisplayProb2(bigramProbS);\n//----------------------Add-one smoothing ends--------------------------\n\t\t\n//-------------------Good-Turing Discounting Begins-------------------------\n\t\t\n\t\t//finds the initial bucket count using the bigram count before smoothing \n\t\tdoBucketCount(corpusBigramCount);\n\t\t\n\t\tstr=bucketCountT.size()+\"\\n\\n\";\n\t\twriter3.write(str);\n\t\tdisplayBucketCount3();\n\t\t\n\t\t//finding new Counts with Good Turing discounting\n\t\tfindBigramCountsTuring();\n\t\t\n\t\t\n\t\t//finding bigram probabilities with Good Turing discounting\n\t\tfindBigramProbTuring();\n\t\tdisplayProb3(bigramProbT);\n\t\t\n//--------------------Good-Turing Discounting Ends-------------------------\n\t\twriter1.close();\n\t\twriter2.close();\n\t\twriter3.close();\n\t}", "private List<SimilarNode> astCCImplmentation(HashMap<ASTNode, NodeInfo> fileNodeMap1, HashMap<ASTNode, NodeInfo> fileNodeMap2) {\n TreeMap<Integer, List<NodeInfo>> treeMap1 = convertToTreeMap(fileNodeMap1);\n TreeMap<Integer, List<NodeInfo>> treeMap2 = convertToTreeMap(fileNodeMap2);\n List<SimilarNode> result = new ArrayList<>();\n int[] array1 = getArray(treeMap1.keySet());\n int[] array2 = getArray(treeMap2.keySet());\n int i = 0;\n int j = 0;\n int sum = 0;\n while (i < array1.length && j < array2.length) {\n if (array1[i] == array2[j]) {\n // obtain list of nodeInfos for both and compare them if match found then add it to report\n List<NodeInfo> list1 = treeMap1.get(array1[i]);\n List<NodeInfo> list2 = treeMap2.get(array2[j]);\n for (NodeInfo nodeInfo1 : list1) {\n for (NodeInfo nodeInfo2 : list2) {\n if ((nodeInfo1.hashValue == nodeInfo2.hashValue) && (nodeInfo1.nodeType == nodeInfo2.nodeType)) {\n result.add(new SimilarNode(nodeInfo1, nodeInfo2));\n\n }\n }\n }\n i++;\n j++;\n\n } else if (array1[i] > array2[j]) {\n j++;\n } else if (array1[i] < array2[j]) {\n i++;\n }\n }\n return result;\n }", "public static void getInputFileData(){\n\t\t\t\n\t\t\t// editable fields\n\t\t\t\n\t\t\tString directDistanceFile = \"../data/direct_distance_1.txt\";\n\t\t\tString graphInputFile = \"../data/graph_input_1.txt\";\n\t\t\t\n\t\t\t\n\t\t\t// end of editable fields\n\t\t\t\n\t\t\t\n\t\t\tFile file1 = new File(directDistanceFile);\n\t\t\tFile file2 = new File(graphInputFile);\n\t\t\tfiles.add(file1);\n\t\t\tfiles.add(file2);\n\t\t\t\n\t\t\t/*// Directory where data files are\n\t\t\tPath dataPath = Paths.get(\"../data\");\n\t\t\t\n\t\t\tString path = dataPath.toAbsolutePath().toString();\n\t\t\t\n\t\t\tFile dir = new File (path);\n\t\t\t\t\t\n\t\t\tif (dir.listFiles() == null){\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"WARNING: No files found.\");\n\n\t\t\t} else if (dir.listFiles() != null && dir.listFiles().length == 2) {\n\t\t\n\t\t\t\tfor (File file : dir.listFiles()){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfiles.add(file.getName());\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}\n\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"WARNING: Data folder may only contain two files: direct_distance and\"\n\t\t\t\t\t\t+ \" graph_input. Please modify contents accordingly before proceeding for alorithm to execute.\");\n\t\t\t\t\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\tfor (File file: files){\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// store direct distances in a hashmap\n\t\t\t\t\tif (file.toString().contains(\"distance\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FileReader fileReader = new FileReader(dataPath.toString() + \"/\" + file);\n\t\t\t\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\t\t BufferedReader reader = new BufferedReader(fileReader);\n\t\t\t\t String line = null;\n\t\t\t\t \n\t\t\t\t while ((line = reader.readLine()) != null) {\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder num = new StringBuilder();\n\t\t\t\t \tStringBuilder str = new StringBuilder();\n\t\t\t\t \n\t\t\t\t \tfor(char c : line.toCharArray()){\n\t\t\t\t \t\t//find the distance\n\t\t\t\t if(Character.isDigit(c)){\n\t\t\t\t num.append(c);\n\t\t\t\t } \n\t\t\t\t //find the associated letter\n\t\t\t\t else if(Character.isLetter(c)){\n\t\t\t\t str.append(c); \n\t\t\t\t }\n\t\t\t\t \t}\n\t\t\t\t \t\n\t\t\t\t \t// add values into hashmap\n\t\t\t\t \tdistance.put(str.toString(), Integer.parseInt(num.toString()));\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t reader.close(); // close the reader\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(distance);\n\t\t\t\t \n\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t// store inputs in a \n\t\t\t\t\telse if (file.toString().contains(\"input\")){\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//FileReader fileReader = new FileReader(dataPath.toString() + \"/\" + file);\n\t\t\t\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\t\t BufferedReader reader = new BufferedReader(fileReader);\n\t\t\t\t \n\t\t\t\t String line = null;\n\t\t\t\t \n\t\t\t\t int x=0; // keeps track of line to add\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t while ((line = reader.readLine()) != null) {\n\t\t\t\t \tString[] values = line.split(\"\\\\s+\");\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t if (matrix == null) {\n\t\t\t\t \t\t //instantiate matrix\n\t\t\t\t matrix = new String[widthOfArray = values.length]\n\t\t\t\t \t\t \t\t\t[lenghtOfArray = values.length];\n\t\t\t\t }\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t// add values into the matrix\n\t\t\t\t \tfor (int i=0; i < values.length; i++){\n\t\t\t\t \t\t\n\t\t\t\t \t\tmatrix[i][x] = values[i];\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t \t\n\t\t\t\t \tx++; // next line\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t reader.close(); // close the reader\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Store input combinations in a hashmap\n\t\t\t\t\tint y=1; \n\t\t\t\t\twhile (y < lenghtOfArray){\n\t\t\t\t\t\t\n\t\t\t\t\t\tinputNodes.add(matrix[0][y]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int i=1; i < widthOfArray; i++){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tStringBuilder str = new StringBuilder();\n\t\t\t\t\t\t\tstr.append(matrix[0][y]);\n\t\t\t\t\t\t\tstr.append(matrix[i][0]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint inputValue = Integer.parseInt(matrix[i][y]);\n\n\t\t\t\t\t\t\tif (inputValue > 0){\n\t\t\t\t\t\t\t\tinputMap.put(str.toString(), inputValue);\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\ty++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"WARNING: Please check: \"+ file.toString() + \". It was not found.\");\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "@SuppressWarnings(\"unchecked\")\n public void init(String f2e_line1, String f2e_line2, String f2e_line3)\n throws IOException {\n String[] comment_f2e = f2e_line1.split(\"\\\\s+\");\n assert (comment_f2e[0].equals(\"#\"));\n p_f2e = Double.parseDouble(comment_f2e[comment_f2e.length - 1]);\n // Read target strings:\n f = new SimpleSequence<IString>(true,\n IStrings.toSyncIStringArray(escape(f2e_line2.split(\"\\\\s+\"))));\n e = new SimpleSequence<IString>(true,\n IStrings.toSyncIStringArray(extractWordsFromAlignment(f2e_line3)));\n // Read alignments:\n f2e = new TreeSet[f.size()];\n e2f = new TreeSet[e.size()];\n initAlign(f2e_line3, f2e, e);\n reverseAlignment(f2e, e2f);\n }", "public Markov(TextArray files) {\n\t\tthis(files, 1122334455);\n\t}", "PlagiarismAlgos(String[] parsefile1, String[] parsefile2){\n this.parsefile1=parsefile1;\n this.parsefile2=parsefile2;\n }", "public ConversionMoneda(String moneda1, String moneda2){\n this.moneda1 = moneda1;\n this.moneda2 = moneda2;\n }", "public DocumentPair(Document doc1, Document doc2) {\r\n assert ((doc1 != null) && (doc2 != null));\r\n this.doc1 = doc1;\r\n this.doc2 = doc2;\r\n jsDiv = (int) doc1.computeJSDiv(doc2);\r\n sentimentDiff = Math.abs(doc1.getOverallSentiment() - doc2.getOverallSentiment());\r\n }", "@Override\n public int compare(Suggestion sugg1, Suggestion sugg2) {\n int alteredGrammarWordsDifference = sugg1.getAlteredGrammarWordsCount()\n - sugg2.getAlteredGrammarWordsCount();\n\n if (alteredGrammarWordsDifference != 0) {\n return alteredGrammarWordsDifference;\n }\n\n //if tied: less added info first\n int additionalNamesDifference = sugg1.getAdditionalNamesCount() + sugg1.getAdditionalGrammarWords()\n - (sugg2.getAdditionalNamesCount() + sugg2.getAdditionalGrammarWords());\n\n if (additionalNamesDifference != 0) {\n return additionalNamesDifference;\n }\n\n //if tied: less words first\n int wordCountDifference = sugg1.getWordsCount() - sugg2.getWordsCount();\n\n if (wordCountDifference == 0) {\n return wordCountDifference;\n }\n\n //if tied: shortest text first\n return sugg1.getText().length() - sugg2.getText().length();\n }", "public static void main(String[] args, String str) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 입력\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\t\n\t\t\tString f_n = f.getName(); \n//\t\t\tSystem.out.println(f_n);\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\n\t\t\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\t\tString input = str;\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) throws AlignmentException, IOException, URISyntaxException, OWLOntologyCreationException {\n\t\tfinal double threshold = 0.9;\n\t\tfinal String thresholdValue = removeCharAt(String.valueOf(threshold),1);\t\n\t\t\n\t\t/*** 2. Define the folder name holding all ontologies to be matched ***/\t\t\n\t\tFile topOntologiesFolder = new File (\"./files/ATMONTO_AIRM/ontologies\");\n\t\t//File topOntologiesFolder = new File (\"./files/expe_oaei_2011/ontologies\");\n\t\tFile[] ontologyFolders = topOntologiesFolder.listFiles();\n\t\t\n\t\t/*** 3. Define the folder name holding all reference alignments for evaluation of the computed alignments ***/\n\t\t//File refAlignmentsFolder = new File(\"./files/expe_oaei_2011/ref_alignments\");\n\t\tFile refAlignmentsFolder = new File(\"./files/ATMONTO_AIRM/ref_alignments\");\n\n\n\t\t/*** No need to touch these ***/\n\t\tString alignmentFileName = null;\n\t\tFile outputAlignment = null;\n\t\tPrintWriter writer = null;\n\t\tAlignmentVisitor renderer = null;\n\t\tProperties params = new Properties();\n\t\tAlignmentProcess a = null;\n\t\tString onto1 = null;\n\t\tString onto2 = null;\t\t\n\t\tString vectorFile1Name = null;\n\t\tString vectorFile2Name = null;\n\n//\t\t//String matcher\n//\t\tfor (int i = 0; i < ontologyFolders.length; i++) {\n//\n//\t\t\tFile[] files = ontologyFolders[i].listFiles();\n//\n//\t\t\tfor (int j = 1; j < files.length; j++) {\n//\t\t\t\tSystem.out.println(\"Matching \" + files[0] + \" and \" + files[1]);\n//\t\t\t\t\n//\t\t\t\t//used for retrieving the correct vector files and for presenting prettier names of the stored alignments \n//\t\t\t\tonto1 = files[0].getName().substring(files[0].getName().lastIndexOf(\"/\") +1, files[0].getName().lastIndexOf(\"/\") + 4);\n//\t\t\t\tonto2 = files[1].getName().substring(files[1].getName().lastIndexOf(\"/\") +4, files[1].getName().lastIndexOf(\"/\") + 7);\t\n//\t\t\t\t\t\t\t\n//\n//\t\t\t\t//match the files using the ISUBMatcher\n//\t\t\t\ta = new ISubMatcher();\n//\t\t\t\ta.init(files[0].toURI(), files[1].toURI());\n//\t\t\t\tparams = new Properties();\n//\t\t\t\tparams.setProperty(\"\", \"\");\n//\t\t\t\ta.align((Alignment)null, params);\t\n//\t\t\t\t\n//\t\t\t\t//store the computed alignment to file\n//\t\t\t\talignmentFileName = \"./files/expe_oaei_2011/isub_alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"ISub\" + \"-\" + thresholdValue + \".rdf\";\n//\t\t\t\toutputAlignment = new File(alignmentFileName);\n//\t\t\t\t\n//\t\t\t\twriter = new PrintWriter(\n//\t\t\t\t\t\tnew BufferedWriter(\n//\t\t\t\t\t\t\t\tnew FileWriter(outputAlignment)), true); \n//\t\t\t\trenderer = new RDFRendererVisitor(writer);\n//\n//\t\t\t\tBasicAlignment ISubAlignment = (BasicAlignment)(a.clone());\n//\t\t\t\t\t\t\t\n//\t\t\t\t//remove all correspondences with similarity below the defined threshold\n//\t\t\t\tISubAlignment.cut(threshold);\n//\n//\t\t\t\tISubAlignment.render(renderer);\n//\t\t\t\t\n//\t\t\t\tSystem.err.println(\"The ISub alignment contains \" + ISubAlignment.nbCells() + \" correspondences\");\n//\t\t\t\twriter.flush();\n//\t\t\t\twriter.close();\n//\t\t\t\t\n//\t\t\t\tSystem.out.println(\"\\nMatching with ISub Matcher completed!\");\n//\n//\t\t\t}\n//\t\t}\n\t\t\n\t\t //WEMatcher\n\t\t for (int i = 0; i < ontologyFolders.length; i++) {\n\n\t\t\tFile[] files = ontologyFolders[i].listFiles();\n\n\t\t\tfor (int j = 1; j < files.length; j++) {\n\t\t\t\tSystem.out.println(\"Matching \" + files[0] + \" and \" + files[1]);\n\t\t\t\t\n\t\t\t\t//used for retrieving the correct vector files and for presenting prettier names of the stored alignments \n\t\t\t\tonto1 = files[0].getName().substring(files[0].getName().lastIndexOf(\"/\") +1, files[0].getName().lastIndexOf(\"/\") + 4);\n\t\t\t\tonto2 = files[1].getName().substring(files[1].getName().lastIndexOf(\"/\") +4, files[1].getName().lastIndexOf(\"/\") + 7);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t//get the relevant vector files for these ontologies\n//\t\t\t\tvectorFile1Name = \"./files/expe_oaei_2011/vector-files-single-ontology/vectorOutput-\" + onto1 + \".txt\";\n//\t\t\t\tvectorFile2Name = \"./files/expe_oaei_2011/vector-files-single-ontology/vectorOutput-\" + onto2 + \".txt\";\n\t\t\t\tvectorFile1Name = \"./files/ATMONTO_AIRM/vector-files-single-ontology/vectorOutput-\" + onto1 + \".txt\";\n\t\t\t\tvectorFile2Name = \"./files/ATMONTO_AIRM/vector-files-single-ontology/vectorOutput-\" + onto2 + \".txt\";\n\n\t\t\t\t//match the files using the WEGlobalMatcher\n\t\t\t\ta = new WEGlobalMatcher(vectorFile1Name, vectorFile2Name);\n\t\t\t\ta.init(files[0].toURI(), files[1].toURI());\n\t\t\t\tparams = new Properties();\n\t\t\t\tparams.setProperty(\"\", \"\");\n\t\t\t\ta.align((Alignment)null, params);\t\n\t\t\t\t\n\t\t\t\t//store the computed alignment to file\n//\t\t\t\talignmentFileName = \"./files/expe_oaei_2011/alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"WEGlobal\" + \"-\" + thresholdValue + \".rdf\";\n\t\t\t\talignmentFileName = \"./files/ATMONTO_AIRM/alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"WEGlobal\" + \"-\" + thresholdValue + \".rdf\";\n\t\t\t\toutputAlignment = new File(alignmentFileName);\n\t\t\t\t\n\t\t\t\twriter = new PrintWriter(\n\t\t\t\t\t\tnew BufferedWriter(\n\t\t\t\t\t\t\t\tnew FileWriter(outputAlignment)), true); \n\t\t\t\trenderer = new RDFRendererVisitor(writer);\n\n\t\t\t\tBasicAlignment WEGlobalAlignment = (BasicAlignment)(a.clone());\n\t\t\t\t\t\t\t\n\t\t\t\t//remove all correspondences with similarity below the defined threshold\n\t\t\t\tWEGlobalAlignment.cut(threshold);\n\n\t\t\t\tWEGlobalAlignment.render(renderer);\n\t\t\t\t\n\t\t\t\tSystem.err.println(\"The WEGlobal alignment contains \" + WEGlobalAlignment.nbCells() + \" correspondences\");\n\t\t\t\twriter.flush();\n\t\t\t\twriter.close();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nMatching with WEGlobal Matcher completed!\");\n\t\t\t\t\n\t\t\t\t//match the files using the WELabelMatcher\n\t\t\t\ta = new WELabelMatcher(vectorFile1Name, vectorFile2Name);\n\t\t\t\ta.init(files[0].toURI(), files[1].toURI());\n\t\t\t\tparams = new Properties();\n\t\t\t\tparams.setProperty(\"\", \"\");\n\t\t\t\ta.align((Alignment)null, params);\t\n\t\t\t\t\n\t\t\t\t//store the computed alignment to file\n//\t\t\t\talignmentFileName = \"./files/expe_oaei_2011/alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"WELabel\" + \"-\" + thresholdValue + \".rdf\";\n\t\t\t\talignmentFileName = \"./files/ATMONTO_AIRM/alignments/\" + onto1 + \"-\" + onto2 + \"-\" + \"WELabel\" + \"-\" + thresholdValue + \".rdf\";\n\t\t\t\toutputAlignment = new File(alignmentFileName);\n\t\t\t\t\n\t\t\t\twriter = new PrintWriter(\n\t\t\t\t\t\tnew BufferedWriter(\n\t\t\t\t\t\t\t\tnew FileWriter(outputAlignment)), true); \n\t\t\t\trenderer = new RDFRendererVisitor(writer);\n\n\t\t\t\tBasicAlignment WELabelAlignment = (BasicAlignment)(a.clone());\n\t\t\t\t\t\t\t\n\t\t\t\t//remove all correspondences with similarity below the defined threshold\n\t\t\t\tWELabelAlignment.cut(threshold);\n\n\t\t\t\tWELabelAlignment.render(renderer);\n\t\t\t\t\n\t\t\t\tSystem.err.println(\"The WELabel alignment contains \" + WELabelAlignment.nbCells() + \" correspondences\");\n\t\t\t\twriter.flush();\n\t\t\t\twriter.close();\n\t\t\t\tSystem.out.println(\"Matching with WELabel Matcher completed!\");\n\t\t\t}\n\t\t}\n}", "public static void main(String[] args) throws Exception \n\t{\n\t\tList<String> stopWords = new ArrayList<String>();\n\t\tstopWords = stopWordsCreation();\n\n\n\t\t\n\t\tHashMap<Integer, String> hmap = new HashMap<Integer, String>();\t//Used in tittle, all terms are unique, and any dups become \" \"\n\t\n\t\t\n\t\tList<String> uniqueTerms = new ArrayList<String>();\n\t\tList<String> allTerms = new ArrayList<String>();\n\t\t\t\t\n\t\t\n\t\tHashMap<Integer, String> hmap2 = new HashMap<Integer, String>();\n\t\tHashMap<Integer, String> allValues = new HashMap<Integer, String>();\n\t\tHashMap<Integer, Double> docNorms = new HashMap<Integer, Double>();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMap<Integer, List<String>> postingsFileListAllWords = new HashMap<>();\t\t\n\t\tMap<Integer, List<String>> postingsFileList = new HashMap<>();\n\t\t\n\t\tMap<Integer, List<StringBuilder>> docAndTitles = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAbstract = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAuthors = new HashMap<>();\n\t\t\n\t\t\n\t\tMap<Integer, List<Double>> termWeights = new HashMap<>();\n\t\t\n\t\tList<Integer> docTermCountList = new ArrayList<Integer>();\n\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tString sCurrentLine;\n\n\t\tint documentCount = 0;\n\t\tint documentFound = 0;\n\t\tint articleNew = 0;\n\t\tint docTermCount = 0;\n\t\t\n\t\t\n\t\tboolean abstractReached = false;\n\n\t\ttry {\n\t\t\tfr = new FileReader(FILENAME);\n\t\t\tbr = new BufferedReader(fr);\n\n\t\t\t// Continues to get 1 line from document until it reaches the end of EVERY doc\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) \n\t\t\t{\n\t\t\t\t// sCurrentLine now contains the 1 line from the document\n\n\t\t\t\t// Take line and split each word and place them into array\n\t\t\t\tString[] arr = sCurrentLine.split(\" \");\n\n\n\t\t\t\t//Go through the entire array\n\t\t\t\tfor (String ss : arr) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * This section takes the array and checks to see if it has reached a new\n\t\t\t\t\t * document or not. If the current line begins with an .I, then it knows that a\n\t\t\t\t\t * document has just started. If it incounters another .I, then it knows that a\n\t\t\t\t\t * new document has started.\n\t\t\t\t\t */\n\t\t\t\t\t//System.out.println(\"Before anything: \"+sCurrentLine);\n\t\t\t\t\tif (arr[0].equals(\".I\")) \n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tif (articleNew == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 1;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if (articleNew == 1) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 0;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t//System.out.println(documentFound);\n\t\t\t\t\t\t//count++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* This section detects that after a document has entered,\n\t\t\t\t\t * it has to gather all the words contained in the title \n\t\t\t\t\t * section.\n\t\t\t\t\t */\n\t\t\t\t\tif (arr[0].equals(\".T\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndTitles.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".B|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttitle.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (String tittleWords : tittle)\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\ttittleWords = tittleWords.toLowerCase();\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'*{}|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\t//System.out.println(tittleWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(tittleWords)) \n\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(tittleWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(tittleWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\ttitle.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndTitles.get(documentFound).add(title);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (arr[0].equals(\".A\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndAuthors.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder author = new StringBuilder();\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\twhile ( !(sCurrentLine = br.readLine()).matches(\".N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tauthor.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\tauthor.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndAuthors.get(documentFound).add(author);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* Since there may or may not be an asbtract after\n\t\t\t\t\t * the title, we need to check what the next section\n\t\t\t\t\t * is. We know that every doc has a publication date,\n\t\t\t\t\t * so it can end there, but if there is no abstract,\n\t\t\t\t\t * then it will keep scanning until it reaches the publication\n\t\t\t\t\t * date. If abstract is empty (in tests), it will also finish instantly\n\t\t\t\t\t * since it's blank and goes straight to .B (the publishing date).\n\t\t\t\t\t * Works EXACTLY like Title \t\t \n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (abstractReached) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t//System.out.println(\"\\n\");\n\t\t\t\t\t\t//System.out.println(\"REACHED ABSTRACT and current line is: \" +sCurrentLine);\n\t\t\t\t\t\tdocAndAbstract.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\tStringBuilder totalAbstract = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".T|.I|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tString[] abstaract = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (abstaract[0].equals(\".B\") )\n\t\t\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\tabstractReached = false;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttotalAbstract.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] misc = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tfor (String miscWords : misc) \n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.toLowerCase(); \n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|?{}!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\t//System.out.println(miscWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(miscWords)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(miscWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(miscWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\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\ttotalAbstract.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocAndAbstract.get(documentFound).add(totalAbstract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t//Once article is found, we enter all of of it's title and abstract terms \n\t\t\t\tif (articleNew == 0) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tdocumentFound = documentFound - 1;\n\t\t\t\t\t//System.out.println(\"Words found in Doc: \" + documentFound);\n\t\t\t\t\t//System.out.println(\"Map is\" +allValues);\n\t\t\t\t\tSet set = hmap.entrySet();\n\t\t\t\t\tIterator iterator = set.iterator();\n\n\t\t\t\t\tSet set2 = allValues.entrySet();\n\t\t\t\t\tIterator iterator2 = set2.iterator();\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileList.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\tdocTermCount++;\n\t\t\t\t\t}\n\t\t\t\t\t// \"BEFORE its put in, this is what it looks like\" + hmap);\n\t\t\t\t\thmap2.putAll(hmap);\n\t\t\t\t\thmap.clear();\n\t\t\t\t\tarticleNew = 1;\n\n\t\t\t\t\tdocTermCountList.add(docTermCount);\n\t\t\t\t\tdocTermCount = 0;\n\n\t\t\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry2 = (Map.Entry) iterator2.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\t// docTermCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tallValues.clear();\t\t\t\t\t\n\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\n\t\t\t\t\t// \"MEANWHILE THESE ARE ALL VALUES\" + postingsFileListAllWords);\n\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Looking at final doc!\");\n\t\t\t//Final loop for last sets\n\t\t\tSet set = hmap.entrySet();\n\t\t\tIterator iterator = set.iterator();\n\n\t\t\tSet setA = allValues.entrySet();\n\t\t\tIterator iteratorA = setA.iterator();\n\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t// //);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\tString term2 = mentry.getValue().toString();\n\t\t\t\tpostingsFileList.get(documentFound - 1).add(term2);\n\n\t\t\t\tdocTermCount++;\n\t\t\t}\n\t\t\t//System.out.println(\"Done looking at final doc!\");\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Sorting time!\");\n\t\t\twhile (iteratorA.hasNext()) {\n\t\t\t\tMap.Entry mentry2 = (Map.Entry) iteratorA.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t// //);\n\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t// docTermCount++;\n\t\t\t}\n\n\t\t\thmap2.putAll(hmap);\n\t\t\thmap.clear();\n\t\t\tdocTermCountList.add(docTermCount);\n\t\t\tdocTermCount = 0;\n\n\n\t\t\t\n\t\t\n\t\t\t// END OF LOOKING AT ALL DOCS\n\t\t\t\n\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms);\n\t\t\tString[] sortedArray = allTerms.toArray(new String[0]);\n\t\t\tString[] sortedArrayUnique = uniqueTerms.toArray(new String[0]);\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t\n\t\t\tArrays.sort(sortedArray);\n\t\t\tArrays.sort(sortedArrayUnique);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Sortings \n\t\t\tSet set3 = hmap2.entrySet();\n\t\t\tIterator iterator3 = set3.iterator();\n\n\t\t\t// Sorting the map\n\t\t\t//System.out.println(\"Before sorting \" +hmap2);\t\t\t\n\t\t\tMap<Integer, String> map = sortByValues(hmap2);\n\t\t\t//System.out.println(\"after sorting \" +map);\n\t\t\t// //\"After Sorting:\");\n\t\t\tSet set2 = map.entrySet();\n\t\t\tIterator iterator2 = set2.iterator();\n\t\t\tint docCount = 1;\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry me2 = (Map.Entry) iterator2.next();\n\t\t\t\t// (me2.getKey() + \": \");\n\t\t\t\t// //me2.getValue());\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"Done sorting!\");\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Posting starts \");\n\t\t\t//\"THIS IS START OF DICTIONARTY\" \n\t\t\tBufferedWriter bw = null;\n\t\t\tFileWriter fw = null;\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Start making an array thats big as every doc total \");\n\t\t\tfor (int z = 1; z < documentFound+1; z++)\n\t\t\t{\n\t\t\t\ttermWeights.put(z, new ArrayList<Double>());\n\t\t\t}\n\t\t\t//System.out.println(\"Done making that large array Doc \");\n\t\t\t\n\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms)\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t//System.out.println(Arrays.toString(sortedArrayUnique));\n\t\t\t//System.out.println(uniqueTerms);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//\tSystem.out.println(\"Posting starts \");\n\t\t\t// \tPOSTING FILE STARTS \n\t\t\ttry {\n\t\t\t\t// Posting File\n\t\t\t\t//System.out.println(\"postingsFileListAllWords: \"+postingsFileListAllWords); //Contains every word including Dups, seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileList: \"+postingsFileList); \t\t //Contains unique words, dups are \" \", seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileListAllWords.size(): \" +postingsFileListAllWords.size()); //Total # of docs \n\t\t\t\t//System.out.println(\"Array size: \"+sortedArrayUnique.length);\n\n\t\t\t\tfw = new FileWriter(POSTING);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\tString temp = \" \";\n\t\t\t\tDouble termFreq = 0.0;\n\t\t\t\t// //postingsFileListAllWords);\n\t\t\t\tList<String> finalTermList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t// //postingsFileList.get(i).size());\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(finalTermList.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//PART TO FIND DOCUMENT FREQ\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docCountIDF = 0;\n\t\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\t\tfor (int totalWords = 0; totalWords < sortedArray.length; totalWords++) \t\t\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD \n\t\t\t\t\t\t\t\t\t//System.out.println(\"fOUND STOP WORD\");\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString temp2 = sortedArray[totalWords];\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdocCountIDF++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"Total Number: \" +docCountIDF);\n\t\t\t\t\t\t\t//System.out.println(\"documentFound: \" +documentFound);\n\t\t\t\t\t\t\t//System.out.println(\"So its \" + documentFound + \" dividied by \" +docCountIDF);\n\t\t\t\t\t\t\t//docCountIDF = 1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble idf = (Math.log10(((double)documentFound/(double)docCountIDF)));\n\t\t\t\t\t\t\t//System.out.println(\"Calculated IDF: \"+idf);\n\t\t\t\t\t\t\tif (idf < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tidf = 0.0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"IDF is: \" +idf);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Size of doc words: \" + postingsFileListAllWords.size());\n\t\t\t\t\t\t\tfor (int k = 0; k < postingsFileListAllWords.size(); k++) \t\t//Go thru each doc. Since only looking at 1 term, it does it once per doc\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//System.out.println(\"Current Doc: \" +(k+1));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttermFreq = 1 + (Math.log10(Collections.frequency(postingsFileListAllWords.get(k), temp)));\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Freq is: \" +Collections.frequency(postingsFileListAllWords.get(k), temp));\n\t\t\t\t\t\t\t\t\t//System.out.println(termFreq + \": \" + termFreq.isInfinite());\n\t\t\t\t\t\t\t\t\tif (termFreq.isInfinite() || termFreq <= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttermFreq = 0.0;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"termFreq :\" +termFreq); \n\t\t\t\t\t\t\t\t\t//System.out.println(\"idf: \" +idf);\n\t\t\t\t\t\t\t\t\ttermWeights.get(k+1).add( (idf*termFreq) );\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t\t\tfinalTermList.add(temp);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FINALCOUNTER\n\t\t\t\t\t\t//System.out.println(\"Done looking at word: \" +j);\n\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\twhile (true)\n\t\t\t\t {\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Enter a query: \");\n\t\t\t\t\t\n\t \tScanner scanner = new Scanner(System.in);\n\t \tString enterQuery = scanner.nextLine();\n\t \t\n\t \t\n\t\t\t\t\tList<Double> queryWeights = new ArrayList<Double>();\n\t\t\t\t\t\n\t\t\t\t\t// Query turn\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tenterQuery = enterQuery.toLowerCase();\t\t\n\t\t\t\t\tenterQuery = enterQuery.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"]\", \"\");\n\t\t\t\t\t//System.out.println(\"Query is: \" + enterQuery);\n\t\t\t\t\t\n\t\t\t\t\tif (enterQuery.equals(\"exit\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tString[] queryArray = enterQuery.split(\" \");\n\t\t\t\t\tArrays.sort(queryArray);\n\t\t\t\t\t\n\t\t\t\t\t//Find the query weights for each term in vocab\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tint docCountDF = 0;\n\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\tfor (int totalWords = 0; totalWords < queryArray.length; totalWords++) \t\t\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString temp2 = queryArray[totalWords];\n\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocCountDF++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDouble queryWeight = 1 + (Math.log10(docCountDF));\n\t\t\t\t\t\tif (queryWeight.isInfinite())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueryWeight = 0.0;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tqueryWeights.add(queryWeight);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query WEights is: \"+queryWeights);\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// Finding the norms for DOCS\t\t\t\t\t\n\t\t\t\t\tfor (int norms = 1; norms < documentFound+1; norms++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble currentTotal = 0.0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < termWeights.get(norms).size(); weightsPerDoc++)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble square = Math.pow(termWeights.get(norms).get(weightsPerDoc), 2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Current square: \" + termWeights.get(norms).get(weightsPerDoc));\n\t\t\t\t\t\t\tcurrentTotal = currentTotal + square;\n\t\t\t\t\t\t\t//System.out.println(\"Current total: \" + currentTotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"About to square root this: \" +currentTotal);\n\t\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\t\tdocNorms.put(norms, root);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"All of the docs norms: \"+docNorms);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Finding the norm for the query\n\t\t\t\t\tdouble currentTotal = 0.0;\t\t\t\t\t\n\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < queryWeights.size(); weightsPerDoc++)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdouble square = Math.pow(queryWeights.get(weightsPerDoc), 2);\n\t\t\t\t\t\tcurrentTotal = currentTotal + square;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\tdouble queryNorm = root; \t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query norm \" + queryNorm);\n\t\t\t\t\t\n\t\t\t\t\t//Finding the cosine sim\n\t\t\t\t\t//System.out.println(\"Term Weights \" + termWeights);\n\t\t\t\t\tHashMap<Integer, Double> cosineScore = new HashMap<Integer, Double>();\n\t\t\t\t\tfor (int cosineSim = 1; cosineSim < documentFound+1; cosineSim++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble total = 0.0;\n\t\t\t\t\t\tfor (int docTerms = 0; docTerms < termWeights.get(cosineSim).size(); docTerms++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble docTermWeight = termWeights.get(cosineSim).get(docTerms);\n\t\t\t\t\t\t\tdouble queryTermWeight = queryWeights.get(docTerms);\n\t\t\t\t\t\t\t//System.out.println(\"queryTermWeight \" + queryTermWeight);\n\t\t\t\t\t\t\t//System.out.println(\"docTermWeight \" + docTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttotal = total + (docTermWeight*queryTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdouble cosineSimScore = 0.0;\n\t\t\t\t\t\tif (!(total == 0.0 || (docNorms.get(cosineSim) * queryNorm) == 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = total / (docNorms.get(cosineSim) * queryNorm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = 0.0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcosineScore.put(cosineSim, cosineSimScore);\n\t\t\t\t\t}\n\t\t\t\t\tcosineScore = sortByValues2(cosineScore);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"This is the cosineScores: \" +cosineScore);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"docAndTitles: \"+ docAndTitles);\n\t\t\t\t\tint topK = 0;\n\t\t\t\t\tint noValue = 0;\n\t\t\t\t\tfor (Integer name: cosineScore.keySet())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (topK < 50)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\n\t\t\t\t String key =name.toString();\n\t\t\t\t //String value = cosineScore.get(name).toString(); \n\t\t\t\t if (!(cosineScore.get(name) <= 0))\n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Doc: \"+key);\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder builder = new StringBuilder();\n\t\t\t\t \tfor (StringBuilder value : docAndTitles.get(name)) {\n\t\t\t\t \t builder.append(value);\n\t\t\t\t \t}\n\t\t\t\t \tString text = builder.toString();\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Title:\\n\" +docAndTitles.get(name));\n\t\t\t\t \tSystem.out.println(\"Title: \" +text);\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Authors:\\n\" +docAndAuthors.get(name));\n\t\t\t\t \t\n\t\t\t\t \tif (docAndAuthors.get(name) == null || docAndAuthors.get(name).toString().equals(\"\"))\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Authors: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAuthors.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Authors found: \" +text2);\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/* ABSTRACT \n\t\t\t\t \tif (docAndAbstract.get(name) == null)\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Abstract: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAbstract.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Abstract: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t*/\n\t\t\t\t \t\n\t\t\t\t \tSystem.out.println(\"\");\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \tnoValue++;\n\t\t\t\t }\n\t\t\t\t topK++;\n\t\t\t\t \n\t\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\tif (noValue == documentFound)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"No documents contain query!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\ttopK=0;\n\t\t\t\t\tnoValue = 0;\n\t\t\t\t }\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null)\n\t\t\t\t\t\tbw.close();\n\n\t\t\t\t\tif (fw != null)\n\t\t\t\t\t\tfw.close();\n\n\t\t\t\t} catch (IOException ex) {\n\n\t\t\t\t\tex.printStackTrace();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\n\t\t\t\tif (fr != null)\n\t\t\t\t\tfr.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tint itemCount = uniqueTerms.size();\n\t\t\t//System.out.println(allValues);\n\t\t\tSystem.out.println(\"Total Terms BEFORE STEMING: \" +itemCount);\n\t\t\tSystem.out.println(\"Total Documents \" + documentFound);\n\t\t\t\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t\t//END OF MAIN\n\t\t}", "public static void relprecision() throws IOException \n\t{\n\t \n\t\t\n\t\tMap<String,Map<String,List<String>>> trainset = null ; \n\t\t//Map<String, List<String>> titles = ReadXMLFile.ReadCDR_TestSet_BioC() ;\n\t File fFile = new File(\"F:\\\\eclipse64\\\\data\\\\labeled_titles.txt\");\n\t // File fFile = new File(\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelation\");\n\t List<String> sents = readfiles.readLinesbylines(fFile.toURL());\n\t\t\n\t\tSentinfo sentInfo = new Sentinfo() ; \n\t\t\n\t\t//trainset = ReadXMLFile.DeserializeT(\"F:\\\\eclipse64\\\\eclipse\\\\TrainsetTest\") ;\n\t\tLinkedHashMap<String, Integer> TripleDict = new LinkedHashMap<String, Integer>();\n\t\tMap<String,List<Integer>> Labeling= new HashMap<String,List<Integer>>() ;\n\t\t\n\t\tMetaMapApi api = new MetaMapApiImpl();\n\t\tList<String> theOptions = new ArrayList<String>();\n\t theOptions.add(\"-y\"); // turn on Word Sense Disambiguation\n\t theOptions.add(\"-u\"); // unique abrevation \n\t theOptions.add(\"--negex\"); \n\t theOptions.add(\"-v\");\n\t theOptions.add(\"-c\"); // use relaxed model that containing internal syntactic structure, such as conjunction.\n\t if (theOptions.size() > 0) {\n\t api.setOptions(theOptions);\n\t }\n\t \n\t\t\n\t\t\n\t\t\n\t\tint count = 0 ;\n\t\tint count1 = 0 ;\n\t\tModel candidategraph = ModelFactory.createDefaultModel(); \n\t\tMap<String,List<String>> TripleCandidates = new HashMap<String, List<String>>();\n\t\tList<String> statements= new ArrayList<String>() ;\n\t\tList<String> notstatements= new ArrayList<String>() ;\n\t\tDouble TPcount = 0.0 ; \n\t\tDouble FPcount = 0.0 ;\n\t\tDouble NonTPcount = 0.0 ;\n\t\tDouble TPcountTot = 0.0 ; \n\t\tDouble NonTPcountTot = 0.0 ;\n\t\tfor(String title : sents)\n\t\t{\n\t\t\t\n\t\t\tif (title.contains(\"<YES>\") || title.contains(\"<TREAT>\") || title.contains(\"<DIS>\") || title.contains(\"</\"))\n\t\t\t{\n\t\t\t\n\t\t\t\tBoolean TP = false ; \n\t\t\t\tBoolean NonTP = false ;\n\t if (title.contains(\"<YES>\") && title.contains(\"</YES>\"))\n\t {\n\t \t TP = true ; \n\t \t TPcountTot++ ; \n\t \t \n\t }\n\t else\n\t {\n\t \t NonTP = true ; \n\t \t NonTPcountTot++ ; \n\t }\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\ttitle = title.replaceAll(\"<YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<DIS>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</DIS>\", \" \") ;\n\t\t\t\ttitle = title.toLowerCase() ;\n\t\n\t\t\t\tcount++ ; \n\t\n\t\t\t\t// get the goldstandard concepts for current title \n\t\t\t\tList<String> GoldSndconcepts = new ArrayList<String> () ;\n\t\t\t\tMap<String, Integer> allconcepts = null ; \n\t\t\t\t\n\t\t\t\t// this is optional and not needed here , it used to measure the concepts recall \n\t\t\t\tMap<String, List<String>> temptitles = new HashMap<String, List<String>>(); \n\t\t\t\ttemptitles.put(title,GoldSndconcepts) ;\n\t\t\t\t\t\t\t\n\t\t\t\t// get the concepts \n\t\t\t\tallconcepts = ConceptsDiscovery.getconcepts(temptitles,api);\n\t\t\t\t\n\t\t\t\tArrayList<String> RelInstances1 = SyntaticPattern.getSyntaticPattern(title,allconcepts,dataset.FILE_NAME_Patterns) ;\n\t\t\t\t//Methylated-CpG island recovery assay: a new technique for the rapid detection of methylated-CpG islands in cancer\n\t\t\t\tif (RelInstances1 != null && RelInstances1.size() > 0 )\n\t\t\t\t{\n\t\t\t\t\tTripleCandidates.put(title, RelInstances1) ;\n\t\t\t\t\tReadXMLFile.Serialized(TripleCandidates,\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelationdisc\") ;\n\t\t\t\t\t\n\t\t\t if (TP )\n\t\t\t {\n\t\t\t \t TPcount++ ; \n\t\t\t \t \n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \t FPcount++ ; \n\t\t\t }\n\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t notstatements.add(title) ;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t\tint i = 0 ;\n\t\ti++ ; \n\t}", "private void train() throws IOException {\n\t\thamContent = new String();// the content of ham training files\n\t\tspamContent = new String();// the content of spam training files\n\t\tvocabulary = new ArrayList<String>();// all the\n\t\t\t\t\t\t\t\t\t\t\t\t// vocabulary\n\t\t\t\t\t\t\t\t\t\t\t\t// within\n\t\t\t\t\t\t\t\t\t\t\t\t// training\n\t\t\t\t\t\t\t\t\t\t\t\t// files\n\t\thamSenderDomainHash = new HashMap<String, Integer>();\n\t\thamTimeHash = new HashMap<String, Integer>();\n\t\thamReplyHash = new HashMap<String, Integer>();\n\t\thamNonCharNumHash = new HashMap<String, Integer>();\n\t\tspamSenderDomainHash = new HashMap<String, Integer>();\n\t\tspamTimeHash = new HashMap<String, Integer>();\n\t\tspamReplyHash = new HashMap<String, Integer>();\n\t\tspamNonCharNumHash = new HashMap<String, Integer>();\n\n\t\thamWordProb = new HashMap<String, Double>();\n\t\tspamWordProb = new HashMap<String, Double>();\n\t\tclassProb = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < 24; i++) {\n\t\t\thamTimeHash.put(String.valueOf(i), 0);\n\t\t\tspamTimeHash.put(String.valueOf(i), 0);\n\t\t}\n\t\tint numSpam = 0, numHam = 0, numFile = 0;// numbers of training files\n\t\tString buff;// file reading tmp buffer\n\n\t\t/* get all the files in the directory */\n\t\tFile directory = new File(inputDirectory);\n\t\tFile[] files = directory.listFiles();\n\n\t\t/*\n\t\t * assign the content of hams and spams while counting the number of\n\t\t * files\n\t\t */\n\t\tfor (File f : files) {\n\t\t\tif (f.getName().startsWith(\"spam\")) {\n\t\t\t\tString readbuffer = readFile(f, 1);\n\t\t\t\tif (!spamTime.equals(\"-1\")) {\n\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain, 0);\n\t\t\t\t\thamSenderDomainHash.put(spamSenderDomain, 0);\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum, 0);\n\t\t\t\t\thamNonCharNumHash.put(spamNonCharNum, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (f.getName().startsWith(\"ham\")) {\n\t\t\t\tString readbufferString = readFile(f, 0);\n\t\t\t\tif (!hamTime.equals(\"-1\")) {\n\t\t\t\t\tspamSenderDomainHash.put(hamSenderDomain, 0);\n\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain, 0);\n\t\t\t\t\tspamNonCharNumHash.put(hamNonCharNum, 0);\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (File f : files) {\n\t\t\tnumFile++;\n\t\t\t// System.out.println(f.getName());\n\t\t\tif (f.getName().startsWith(\"spam\")) {\n\t\t\t\tnumSpam++; // add to the number of spams\n\t\t\t\tString readbuffer = readFile(f, 1);\n\t\t\t\tif (!spamNonCharNumHash.containsKey(spamNonCharNum))\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum, 1);\n\t\t\t\telse if (spamNonCharNumHash.containsKey(spamNonCharNum))\n\t\t\t\t\tspamNonCharNumHash.put(spamNonCharNum,\n\t\t\t\t\t\t\tspamNonCharNumHash.get(spamNonCharNum) + 1);\n\t\t\t\tif (!spamTime.equals(\"-1\")) {\n\t\t\t\t\tif (!spamSenderDomainHash.containsKey(spamSenderDomain)\n\t\t\t\t\t\t\t&& !(spamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (spamSenderDomain.length() <= 3))\n\t\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain, 1);\n\t\t\t\t\telse if (spamSenderDomainHash.containsKey(spamSenderDomain)\n\t\t\t\t\t\t\t&& !(spamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (spamSenderDomain.length() <= 3))\n\t\t\t\t\t\tspamSenderDomainHash.put(spamSenderDomain,\n\t\t\t\t\t\t\t\tspamSenderDomainHash.get(spamSenderDomain) + 1);\n\t\t\t\t\tif (!spamTimeHash.containsKey(spamTime))\n\t\t\t\t\t\tspamTimeHash.put(spamTime, 1);\n\t\t\t\t\telse if (spamTimeHash.containsKey(spamTime))\n\t\t\t\t\t\tspamTimeHash.put(spamTime,\n\t\t\t\t\t\t\t\tspamTimeHash.get(spamTime) + 1);\n\t\t\t\t\tif (!spamReplyHash.containsKey(spamReply))\n\t\t\t\t\t\tspamReplyHash.put(spamReply, 1);\n\t\t\t\t\telse if (spamReplyHash.containsKey(spamReply))\n\t\t\t\t\t\tspamReplyHash.put(spamReply,\n\t\t\t\t\t\t\t\tspamReplyHash.get(spamReply) + 1);\n\n\t\t\t\t}\n\t\t\t\tspamContent += readbuffer.toLowerCase();\n\t\t\t\tspamContent = spamContent.replaceAll(\"[^a-zA-Z$\\n]+\", \" \");\n\n\t\t\t} else if (f.getName().startsWith(\"ham\")) { // the same thing for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ham\n\t\t\t\tnumHam++;\n\t\t\t\tString readbuffer = readFile(f, 0);\n\t\t\t\tif (!hamNonCharNumHash.containsKey(hamNonCharNum))\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum, 1);\n\t\t\t\telse if (hamNonCharNumHash.containsKey(hamNonCharNum))\n\t\t\t\t\thamNonCharNumHash.put(hamNonCharNum,\n\t\t\t\t\t\t\thamNonCharNumHash.get(hamNonCharNum) + 1);\n\t\t\t\tif (!hamTime.equals(\"-1\")) {\n\t\t\t\t\tif (!hamSenderDomainHash.containsKey(hamSenderDomain)\n\t\t\t\t\t\t\t&& !(hamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (hamSenderDomain.length() <= 3))\n\t\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain, 1);\n\t\t\t\t\telse if (hamSenderDomainHash.containsKey(hamSenderDomain)\n\t\t\t\t\t\t\t&& !(hamSenderDomain.equals(\"\"))\n\t\t\t\t\t\t\t&& (hamSenderDomain.length() <= 3))\n\t\t\t\t\t\thamSenderDomainHash.put(hamSenderDomain,\n\t\t\t\t\t\t\t\thamSenderDomainHash.get(hamSenderDomain) + 1);\n\n\t\t\t\t\tif (!hamTimeHash.containsKey(hamTime))\n\t\t\t\t\t\thamTimeHash.put(hamTime, 1);\n\t\t\t\t\telse if (hamTimeHash.containsKey(hamTime))\n\t\t\t\t\t\thamTimeHash.put(hamTime, hamTimeHash.get(hamTime) + 1);\n\t\t\t\t\tif (!hamReplyHash.containsKey(hamReply))\n\t\t\t\t\t\thamReplyHash.put(hamReply, 1);\n\t\t\t\t\telse if (hamReplyHash.containsKey(hamReply))\n\t\t\t\t\t\thamReplyHash.put(hamReply,\n\t\t\t\t\t\t\t\thamReplyHash.get(hamReply) + 1);\n\n\t\t\t\t}\n\t\t\t\thamContent += readbuffer.toLowerCase();\n\t\t\t\thamContent = hamContent.replaceAll(\"[^a-zA-Z$\\n]+\", \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"file read complete!!!\");\n\t\t// System.out.println(hamSenderDomainHash);\n\t\t// System.out.println(hamTimeHash);\n\t\t// System.out.println(hamReplyHash);\n\t\t// System.out.println(hamNonCharNumHash);\n\t\t// System.out.println(spamSenderDomainHash);\n\t\t// System.out.println(spamTimeHash);\n\t\t// System.out.println(spamReplyHash);\n\t\t// System.out.println(spamNonCharNumHash);\n\t\t// System.out.println(spamContent);\n\t\t// System.out.println(hamContent);\n\n\t\t/* calculate probabilities */\n\t\tpHam = (double) numHam / (double) numFile;\n\t\tpSpam = (double) numSpam / (double) numFile;\n\t\t// System.out.println(numHam);\n\t\t// System.out.println(numSpam);\n\t\t// System.out.println(numFile);\n\n\t\tclassProb.put(\"hamProb\", pHam);\n\t\tclassProb.put(\"spamProb\", pSpam);\n\n\t\t/* get vocabulary and its length */\n\t\tString[] hamWord = hamContent.split(\"\\\\s+\");\n\t\tHashMap<String, Integer> hamWordFreq = new HashMap<String, Integer>();\n\t\tfor (int i = 0; i < hamWord.length; i++) {\n\t\t\tif (hamWordFreq.containsKey(hamWord[i]))\n\t\t\t\thamWordFreq.put(hamWord[i], hamWordFreq.get(hamWord[i]) + 1);\n\t\t\tif (!hamWordFreq.containsKey(hamWord[i]))\n\t\t\t\thamWordFreq.put(hamWord[i], 1);\n\t\t}\n\t\thamWordCount = hamWord.length;\n\t\tString[] spamWord = spamContent.split(\"\\\\s+\");\n\t\tHashMap<String, Integer> spamWordFreq = new HashMap<String, Integer>();\n\t\tfor (int i = 0; i < spamWord.length; i++) {\n\t\t\tif (spamWordFreq.containsKey(spamWord[i]))\n\t\t\t\tspamWordFreq\n\t\t\t\t\t\t.put(spamWord[i], spamWordFreq.get(spamWord[i]) + 1);\n\t\t\tif (!spamWordFreq.containsKey(spamWord[i]))\n\t\t\t\tspamWordFreq.put(spamWord[i], 1);\n\t\t}\n\t\tspamWordCount = spamWord.length;\n\t\tSystem.out.println(hamWordFreq.size());\n\t\tSystem.out.println(spamWordFreq.size());\n\t\tSystem.out.println(\"count get!!!\");\n\t\t// System.out.println(hamWordCount);\n\t\t// System.out.println(spamWordCount);\n\t\tfor (int i = 0; i < hamWordCount; i++) {\n\t\t\tif (!vocabulary.contains(hamWord[i]) && !hamWord[i].equals(\"\"))\n\t\t\t\tvocabulary.add(hamWord[i]);\n\t\t}\n\t\t// System.out.println(hamWordFreq);\n\t\tfor (int i = 0; i < spamWordCount; i++)\n\t\t\tif (!vocabulary.contains(spamWord[i]) && !spamWord[i].equals(\"\"))\n\t\t\t\tvocabulary.add(spamWord[i]);\n\t\tvocabLen = vocabulary.size();\n\t\tSystem.out.println(\"vocab init\");\n\t\t/* remove unnecessary words */\n\t\tfor (int i = 0; i < vocabulary.size(); i++) {\n\t\t\tint hamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\thamwordFreq = hamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\thamwordFreq = 0;\n\t\t\t}\n\t\t\tint spamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\tspamwordFreq = spamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\tspamwordFreq = 0;\n\t\t\t}\n\t\t\tif ((hamwordFreq <= 3) && (spamwordFreq <= 3)) {\n\t\t\t\tvocabulary.remove(i);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (((double) ((double) hamwordFreq / (double) hamWordCount) >= 0.005)\n\t\t\t\t\t&& ((double) ((double) spamwordFreq / (double) spamWordCount) >= 0.005)) {\n\t\t\t\t// System.out.println(vocabulary.get(i));\n\t\t\t\tvocabulary.remove(i);\n\t\t\t\ti--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"vocab complete!!!\");\n\t\tSystem.out.println(vocabulary.size());\n\t\tvocabLen = vocabulary.size();\n\t\tfor (int i = 0; i < vocabulary.size(); i++) {\n\t\t\tint hamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\thamwordFreq = hamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\thamwordFreq = 0;\n\t\t\t}\n\t\t\tint spamwordFreq = 0;\n\t\t\ttry {\n\t\t\t\tspamwordFreq = spamWordFreq.get(vocabulary.get(i));\n\t\t\t} catch (Exception e) {\n\t\t\t\tspamwordFreq = 0;\n\t\t\t}\n\t\t\thamWordProb.put(\n\t\t\t\t\tvocabulary.get(i),\n\t\t\t\t\tjava.lang.Math.log((double) (hamwordFreq + 1)\n\t\t\t\t\t\t\t/ (double) (hamWordCount + vocabLen)));\n\t\t\tspamWordProb.put(\n\t\t\t\t\tvocabulary.get(i),\n\t\t\t\t\tjava.lang.Math.log((double) (spamwordFreq + 1)\n\t\t\t\t\t\t\t/ (double) (spamWordCount + vocabLen)));\n\t\t\t// System.out.println(i);\n\n\t\t}\n\t\t// System.out.println(hamWordCount);\n\t\t// System.out.println(hamContent);\n\t\t// System.out.println(hamWordProb.size());\n\t\t// System.out.println(spamWordProb.size());\n\t\t// System.out.println(vocabulary.size());\n\t\t//\n\t\t// System.out.println(hamWordProb.size());\n\t\t// System.out.println(vocabulary);\n\t\t// System.out.println(vocabLen);\n\t\tSystem.out.println(\"word prob complete!!!\");\n\t}", "public double qGramsDistance ( String str1, String str2, int qNumber)\t{\n\t\t\n\t\tif (str1.equals(str2)) return 1.0; //checking if strings are the same\n if ((length1 = str1.length()) == 0) return 0.0; \n if ((length2 = str2.length()) == 0) return 0.0; \n \t\tif ((q = qNumber) == 0 || q > length1 || q > length2)\treturn -1.0;\t//q is too big | too small\n\n\t\tsetOne = new HashSet<String>();\n\t\tsetTwo = new HashSet<String>();\n\t\ts1 = new String (str1);\n s2 = new String (str2);\n\t\t\n\t\tstringConstruction();\t\n\t\tsetSets();\n\t\tcalculateDistance();\t//1.0 if s1=s2, 0.0 otherwise\n\t\t\n\t\treturn distance;\n\t}", "@Override\r\n\tpublic float getSimilarityTimingEstimated(final String string1, final String string2) {\r\n //timed millisecond times with string lengths from 1 + 50 each increment\r\n //0\t5.97\t11.94\t27.38\t50.75\t73\t109.5\t148\t195.5\t250\t297\t375\t437\t500\t594\t672\t781\t875\t969\t1079\t1218\t1360\t1469\t1609\t1750\t1906\t2063\t2203\t2375\t2563\t2734\t2906\t3110\t3312\t3500\t3688\t3906\t4141\t4375\t4594\t4844\t5094\t5328\t5609\t5860\t6156\t6422\t6688\t6984\t7235\t7547\t7859\t8157\t8500\t8813\t9172\t9484\t9766\t10125\t10516\r\n final float str1Tokens = this.tokeniser.tokenizeToArrayList(string1).size();\r\n final float str2Tokens = this.tokeniser.tokenizeToArrayList(string2).size();\r\n return (((str1Tokens + str2Tokens) * str1Tokens) + ((str1Tokens + str2Tokens) * str2Tokens)) * this.ESTIMATEDTIMINGCONST;\r\n }", "public WordNet(String synsetFilename, String hyponymFilename) {\n\n synset = new HashMap<Integer, ArrayList<String>>();\n synsetRev = new HashMap<ArrayList<String>, Integer>();\n hyponym = new ArrayList<ArrayList<Integer>>();\n // hyponym = new HashMap<Integer,ArrayList<Integer>>();\n\n In syn = new In(synsetFilename);\n In hypo = new In(hyponymFilename);\n\n while (!syn.isEmpty()) {\n String line = syn.readLine();\n String[] split1 = line.split(\",\");\n int stempkey = Integer.parseInt(split1[0]);\n String syns = split1[1];\n String[] temps = syns.split(\" \");\n ArrayList<String> stempval = new ArrayList<String>();\n for (String s : temps) {\n stempval.add(s);\n }\n synset.put(stempkey, stempval);\n synsetRev.put(stempval, stempkey);\n }\n\n while (!hypo.isEmpty()) {\n String line = hypo.readLine();\n String[] arrayOfStrings = line.split(\",\");\n ArrayList<Integer> integersAL = new ArrayList<Integer>();\n for (int i = 0; i < arrayOfStrings.length; i++) {\n integersAL.add(Integer.parseInt(arrayOfStrings[i]));\n }\n hyponym.add(integersAL);\n\n // ArrayList<Integer> valuesAL = new ArrayList<Integer>();\n // for (Integer i : integersAL) {\n // valuesAL.add(i);\n // }\n // int comma1 = line.indexOf(\",\");\n // int htempkey = Integer.parseInt(line.substring(0,comma1));\n // String sub = line.substring(comma1 + 1);\n // String[] arrayOfStrings = sub.split(\",\");\n // hyponym.put(htempkey, integersAL);\n }\n }", "public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }", "public SearchFile(){\r\n filePath = \"Unknown\";\r\n wordSearched = \"Unknown\";\r\n wordLength = 0;\r\n occurrences = 0;\r\n }", "public double cosineSimilarity(double[] docVector1, double[] docVector2) \r\n {\r\n double dotProduct = 0.0;\r\n double magnitude1 = 0.0;\r\n double magnitude2 = 0.0;\r\n double cosineSimilarity = 0.0;\r\n \r\n for (int i = 0; i < docVector1.length; i++) //docVector1 and docVector2 must be of same length\r\n {\r\n dotProduct += docVector1[i] * docVector2[i]; //a.b\r\n magnitude1 += Math.pow(docVector1[i], 2); //(a^2)\r\n magnitude2 += Math.pow(docVector2[i], 2); //(b^2)\r\n }\r\n \r\n magnitude1 = Math.sqrt(magnitude1);//sqrt(a^2)\r\n magnitude2 = Math.sqrt(magnitude2);//sqrt(b^2)\r\n \r\n if (magnitude1 != 0.0 | magnitude2 != 0.0)\r\n {\r\n cosineSimilarity = dotProduct / (magnitude1 * magnitude2);\r\n } \r\n else\r\n {\r\n return 0.0;\r\n }\r\n return cosineSimilarity;\r\n }", "public StringDifferenceRunnable(ConcurrentHashMap<String, Float> stringSimCache,\n INode[] subLeaves1, ArrayList<INode> subLeaves2, long stringCount, int start, int end,\n AtomicInteger counter, boolean verbose) {\n super();\n this.stringSimCache = stringSimCache;\n this.subLeaves1 = subLeaves1;\n this.subLeaves2 = subLeaves2;\n this.stringCount = stringCount;\n this.start = start;\n this.end = end;\n this.counter = counter;\n counter.incrementAndGet();\n this.verbose = verbose;\n }", "public Double calculateSimilarity(OWLObject a, OWLObject b);", "public double getSimilarity(Pair<String, String> representations);", "public static void experiment2() {\n\t\tList<String> lines = FileUtil.loadFrom(\"docs/corpus-search-results-new-408.txt\");\n\t\tString cipher = Ciphers.cipher[1].cipher;\n\t\tString plain = Ciphers.cipher[1].solution;\n\t\tfor (String line : lines) {\n\t\t\tint pos = plain.indexOf(line.toLowerCase());\n\t\t\tif (pos < 0) System.out.println(\"Could not find \" + line + \" in plaintext\");\n\t\t\telse {\n\t\t\t\tString sub = cipher.substring(pos, pos+line.length());\n\t\t\t\tInfo info = new Info(sub, 0);\n\t\t\t\tSystem.out.println(line + \", \" + sub + \", \" + info.probability);\n\t\t\t}\n\t\t}\n\t}", "private static void demo_WordNetOps() throws Exception {\n\n RoWordNet r1, r2, result;\n Synset s;\n Timer timer = new Timer();\n String time = \"\";\n\n IO.outln(\"Creating two RoWN objects R1 and R2\");\n timer.start();\n r1 = new RoWordNet();\n r2 = new RoWordNet();\n\n // adding synsets to O1\n s = new Synset();\n s.setId(\"S1\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L1\"))));\n r1.addSynset(s, false); // adding synset S1 to O2;\n\n s = new Synset();\n s.setId(\"S2\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L2\"))));\n r1.addSynset(s, false); // adding synset S2 to O1;\n\n // adding synsets to O2\n s = new Synset();\n s.setId(\"S1\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L1\"))));\n r2.addSynset(s, false); // adding synset S1 to O2;\n\n s = new Synset();\n s.setId(\"S2\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L4\"))));\n r2.addSynset(s, false); // adding synset S2 to O2, but with literal L4\n // not L2;\n\n s = new Synset();\n s.setId(\"S3\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L3\"))));\n r2.addSynset(s, false); // adding synset S3 to O2;\n time = timer.mark();\n\n // print current objects\n IO.outln(\"\\n Object R1:\");\n for (Synset syn : r1.synsets) {\n IO.outln(syn.toString());\n }\n\n IO.outln(\"\\n Object R2:\");\n for (Synset syn : r2.synsets) {\n IO.outln(syn.toString());\n }\n IO.outln(\"Done: \" + time);\n\n // DIFFERENCE\n IO.outln(\"\\nOperation DIFFERENCE(R1,R2) (different synsets in R1 and R2 having the same id):\");\n timer.start();\n String[] diff = Operation.diff(r1, r2);\n time = timer.mark();\n\n for (String id : diff) {\n IO.outln(\"Different synset having the same id in both RoWN objects: \" + id);\n }\n\n IO.outln(\"Done: \" + time);\n\n // UNION\n IO.outln(\"\\nOperation UNION(R1,R2):\");\n timer.start();\n try {\n result = new RoWordNet(r1);// we copy-construct the result object\n // after r1 because the union and merge\n // methods work in-place directly on the\n // first parameter of the methods\n result = Operation.union(result, r2);\n IO.outln(\" Union object:\");\n for (Synset syn : result.synsets) {\n IO.outln(syn.toString());\n }\n } catch (Exception ex) {\n IO.outln(\"Union operation failed (as it should, as synset S2 is in both objects but has a different literal and are thus two different synsets having the same id that cannot reside in a single RoWN object). \\nException message: \" + ex\n .getMessage());\n }\n IO.outln(\"Done: \" + timer.mark());\n\n // MERGE\n IO.outln(\"\\nOperation MERGE(R1,R2):\");\n\n result = new RoWordNet(r1);\n timer.start();\n result = Operation.merge(result, r2);\n time = timer.mark();\n\n IO.outln(\" Merged object (R2 overwritten on R1):\");\n for (Synset syn : result.synsets) {\n IO.outln(syn.toString());\n }\n IO.outln(\"Done: \" + time);\n\n // COMPLEMENT\n IO.outln(\"\\nOperation COMPLEMENT(R2,R1) (compares only synset ids):\");\n timer.start();\n String[] complement = Operation.complement(r2, r1);\n time = timer.mark();\n IO.outln(\" Complement ids:\");\n for (String id : complement) {\n IO.outln(\"Synset that is in R2 but not in R1: \" + id);\n }\n IO.outln(\"Done: \" + timer.mark());\n\n // INTERSECTION\n IO.outln(\"\\nOperation INTERSECTION(R1,R2) (fully compares synsets):\");\n timer.start();\n String[] intersection = Operation.intersection(r1, r2);\n time = timer.mark();\n IO.outln(\" Intersection ids:\");\n for (String id : intersection) {\n IO.outln(\"Equal synset in both R1 and R2: \" + id);\n }\n IO.outln(\"Done: \" + timer.mark());\n\n // IO.outln(((Synset) r1.getSynsetById(\"S1\")).equals((Synset)\n // r2.getSynsetById(\"S1\")));\n\n }", "private ObjectCounter<PathCalculatorDft.Manipulation> calculateWER(String s1, String s2) {\n// out_tmp_tobias.add(s2 + \"^\" + s1);\n ObjectCounter<PathCalculatorDft.Manipulation> counterWER = new ObjectCounter<>();\n List<String> s1_split = new ArrayList<>();\n List<String> list = Arrays.asList(s1.split(\"[ ]+\"));\n for (String s : list) {\n s = s.trim();\n if (!s.isEmpty() && !s.equals(\" \")) {\n s1_split.add(s);\n }\n }\n List<String> s2_split = new ArrayList<>();\n List<String> list2 = Arrays.asList(s2.split(\"[ ]+\"));\n for (String s : list2) {\n s = s.trim();\n if (!s.isEmpty() && !s.equals(\" \")) {\n s2_split.add(s);\n }\n }\n errModule.calculate(s1, s2);\n return counterWER;\n }", "public Pair(String one, String two, double corr) {\n word1 = one;\n word2 = two;\n correlation = corr;\n }", "public double getSimilarityMetric(String word1, String word2) {\n\t\t// given two words, this function computes two measures of similarity\n\t\t// and returns the average\n\t\tint l1 = word1.length();\n\t\tint l2 = word2.length();\n\t\tint lmin = Math.min(l1, l2);\n\t\tint leftSimilarity = 0;\n\t\tint rightSimilarity = 0;\n\n\t\t// calculate leftSimilarity\n\t\tfor(int i = 0; i < lmin; i++) {\n\t\t\tif(word1.charAt(i) == word2.charAt(i)) {\n\t\t\t\tleftSimilarity += 1;\n\t\t\t}\n\t\t}\n\n\t\t// calculate rightSimilarity\n\t\tfor(int j = 0; j < lmin; j++) {\n\t\t\tif(word1.charAt(l1-j-1) == word2.charAt(l2-j-1)) {\n\t\t\t\trightSimilarity += 1;\n\t\t\t}\n\t\t}\n\t\treturn (leftSimilarity + rightSimilarity)/2.0;\n\t}", "@Override\n\tpublic float similarity(PetriNet pn1, PetriNet pn2) {\n\t\treturn similarity((PetriNet) pn1.clone(), (PetriNet) pn2.clone(), 1);\n\t}", "public void calculate(Set<Article> articles) {\n \n Set<ArticleDocument> articleDocuments = new HashSet<>();\n for (Article article : articles) {\n articleDocuments.add(article.getDocument());\n }\n \n VSMDocument positiveWords = new TextDocument(\"positive_words.txt\");\n VSMDocument negativeWords = new TextDocument(\"negative_words.txt\");\n \n ArrayList<VSMDocument> documents = new ArrayList<VSMDocument>();\n documents.add(positiveWords);\n documents.add(negativeWords);\n documents.addAll(articleDocuments);\n \n Corpus corpus = new Corpus(documents);\n \n VectorSpaceModel vectorSpace = new VectorSpaceModel(corpus);\n \n double totalPositive = 0;\n double totalNegative = 0;\n \n \n for(ArticleDocument articleDoc : articleDocuments) {\n VSMDocument doc = (VSMDocument) articleDoc;\n System.out.println(\"\\nComparing to \" + doc);\n double positive = vectorSpace.cosineSimilarity(positiveWords, doc);\n double negative = vectorSpace.cosineSimilarity(negativeWords, doc);\n System.out.println(\"Positive: \" + positive);\n System.out.println(\"Negative: \" + negative);\n if (!Double.isNaN(positive)) {\n totalPositive += positive;\n }\n if (!Double.isNaN(negative)) {\n totalNegative += negative;\n }\n double difference = positive - negative;\n if (difference >= 0) {\n System.out.println(\"More positive by \" + difference);\n } else {\n System.out.println(\"More negative by \" + Math.abs(difference));\n }\n \n if (positive >= mostPositive) {\n mostPositive = positive;\n mostPositiveDoc = doc;\n }\n if (negative >= mostNegative) {\n mostNegative = negative;\n mostNegativeDoc = doc;\n }\n if (Math.abs(difference) >= Math.abs(biggestDifference)) {\n biggestDifference = difference;\n biggestDifferenceDoc = doc;\n }\n \n String publisher = articleDoc.getPublisher();\n String region = articleDoc.getRegion();\n LocalDate day = articleDoc.getDate().toLocalDate();\n DayOfWeek weekday = day.getDayOfWeek();\n if (!Double.isNaN(positive)) {\n if (publisherOptimism.containsKey(publisher)) {\n publisherOptimism.get(publisher).add(positive);\n } else {\n publisherOptimism.put(publisher, new LinkedList<Double>());\n publisherOptimism.get(publisher).add(positive);\n }\n \n if (publisherPessimism.containsKey(publisher)) {\n publisherPessimism.get(publisher).add(negative);\n } else {\n publisherPessimism.put(publisher, new LinkedList<Double>());\n publisherPessimism.get(publisher).add(negative);\n }\n \n if (regionOptimism.containsKey(region)) {\n regionOptimism.get(region).add(positive);\n } else {\n regionOptimism.put(region, new LinkedList<Double>());\n regionOptimism.get(region).add(positive);\n }\n \n if (regionPessimism.containsKey(region)) {\n regionPessimism.get(region).add(negative);\n } else {\n regionPessimism.put(region, new LinkedList<Double>());\n regionPessimism.get(region).add(negative);\n }\n \n if (dayOptimism.containsKey(day)) {\n dayOptimism.get(day).add(positive);\n } else {\n dayOptimism.put(day, new LinkedList<Double>());\n dayOptimism.get(day).add(positive);\n }\n \n if (dayPessimism.containsKey(day)) {\n dayPessimism.get(day).add(negative);\n } else {\n dayPessimism.put(day, new LinkedList<Double>());\n dayPessimism.get(day).add(negative);\n }\n \n if (weekdayOptimism.containsKey(weekday)) {\n weekdayOptimism.get(weekday).add(positive);\n } else {\n weekdayOptimism.put(weekday, new LinkedList<Double>());\n weekdayOptimism.get(weekday).add(positive);\n }\n \n if (weekdayPessimism.containsKey(weekday)) {\n weekdayPessimism.get(weekday).add(negative);\n } else {\n weekdayPessimism.put(weekday, new LinkedList<Double>());\n weekdayPessimism.get(weekday).add(negative);\n }\n }\n }\n \n size = articleDocuments.size();\n avgPositive = totalPositive / size;\n avgNegative = totalNegative / size;\n printInfo();\n }", "public static double similarity(TopicLabel l1,TopicLabel l2)\n\t{\n\t\tdouble sim = 0;\n\t\tint i = 0;\n\t\tfor(String w: l2.listWords)\n\t\t{\n\t\t\tif(l1.listWords.contains(w))\n\t\t\t{\n\t\t\t\tint j = l1.listWords.indexOf(w);\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/ l1.Pw_given_l.get(j));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/Config.EPSELON);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sim;\n\t}", "public static String calculate(String path) throws IOException {\n initialize();\n double spam = 0.0;\n double ham = 0.0;\n int spamCount = 0;\n int hamCount = 0;\n\n Get g1 = new Get(\"spam\".getBytes());\n Result r = wordFreTable.get(g1);\n spam += Math.log(bytes2Double(r.getValue(\"spam\".getBytes())));\n Get g2 = new Get(\"ham\".getBytes());\n r = wordFreTable.get(g2);\n ham += Math.log(bytes2Double(result.getValue(\"ham\".getBytes())));\n\n BufferedWriter writer = new BufferedWriter(new FileWriter(path));\n writer.write(\"doc_id,class_id\");\n\n for (int i = 0; i < Document.size(); i++) {\n String[] doc = Document.get(i).split(\"\\t| \");\n for (String word : doc) {\n Get get = new Get(word.getBytes());\n if (!get.isCheckExistenceOnly()) {\n Result result = wordFreTable.get(get);\n for (Cell cell : result.rawCells()) {\n String colName = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());\n String value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());\n if (colName.equals(\"spam\")) {\n spam += Math.log(Double.valueOf(value));\n } else if (colName.equals(\"ham\")) {\n ham += Math.log(Double.valueOf(value));\n }\n }\n } else {\n //word not exist\n get = new Get(\"SpamSpam\".getBytes());\n Result result = wordFreTable.get(get);\n spam += Math.log(bytes2Double(result.getValue(\"spam\".getBytes())));\n get = new Get(\"HamHam\".getBytes());\n result = wordFreTable.get(get);\n ham += Math.log(bytes2Double(result.getValue(\"ham\".getBytes())));\n }\n }\n if (spam > ham) {\n writer.write(i + \"1\");\n spamCount++;\n } else {\n writer.write(i + \"0\");\n hamCount++;\n }\n }\n writer.close();\n return spamCount * 1.0 / Document.size() + \", \" + hamCount * 1.0 / Document.size();\n }", "public static void main(String[] args) {\n\t\tLinkedList<String> listData1 = new LinkedList<>();\n\t\tLinkedList<String> listData2 = new LinkedList<>();\n\n\t\topenTextFile();\n\n\t\tSystem.out.println(\"Read data from file 1\");\n\t\tlistData1 = readData(in1);\n\t\tSystem.out.println(\"Read data from file 2\");\n\t\tlistData2 = readData(in2);\n\n\t\tcheckDataMatch(listData1, listData2);\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n public void init(String f2e_line1, String f2e_line2, String f2e_line3,\n String e2f_line1, String e2f_line2, String e2f_line3) throws IOException {\n String[] comment_f2e = f2e_line1.split(\"\\\\s+\");\n String[] comment_e2f = e2f_line1.split(\"\\\\s+\");\n assert (comment_f2e[0].equals(\"#\"));\n assert (comment_e2f[0].equals(\"#\"));\n p_f2e = Double.parseDouble(comment_f2e[comment_f2e.length - 1]);\n p_e2f = Double.parseDouble(comment_f2e[comment_e2f.length - 1]);\n // Read target strings:\n f = new SimpleSequence<IString>(true,\n IStrings.toSyncIStringArray(escape(f2e_line2.split(\"\\\\s+\"))));\n e = new SimpleSequence<IString>(true,\n IStrings.toSyncIStringArray(escape(e2f_line2.split(\"\\\\s+\"))));\n // Read alignments:\n f2e = new TreeSet[f.size()];\n e2f = new TreeSet[e.size()];\n initAlign(f2e_line3, f2e, e);\n initAlign(e2f_line3, e2f, f);\n }", "public static void main(String[] args)\n {\n WordNet obj=new WordNet(\"synsets.txt\", \"hypernyms.txt\");\n System.out.println(obj.g.V()+\" \"+obj.g.E());\n System.out.println(obj.h2.size());\n System.out.println(obj.distance(\"American_water_spaniel\", \"histology\"));\n }", "@Test\n \tpublic void testSimpleAlignments()\n \t{\n \t\tSystem.out.format(\"\\n\\n-------testSimpleAlignments() ------------------------\\n\");\n \t\tPseudoDamerauLevenshtein DL = new PseudoDamerauLevenshtein();\n \t\t//DL.init(\"AB\", \"CD\", false, true);\n \t\t//DL.init(\"ACD\", \"ADE\", false, true);\n \t\t//DL.init(\"AB\", \"XAB\", false, true);\n \t\t//DL.init(\"AB\", \"XAB\", true, true);\n \t\t//DL.init(\"fit\", \"xfity\", true, true);\n \t\t//DL.init(\"fit\", \"xxfityyy\", true, true);\n \t\t//DL.init(\"ABCD\", \"BACD\", false, true);\n \t\t//DL.init(\"fit\", \"xfityfitz\", true, true);\n \t\t//DL.init(\"fit\", \"xfitfitz\", true, true);\n \t\t//DL.init(\"fit\", \"xfitfitfitfitz\", true, true);\n \t\t//DL.init(\"setup\", \"set up\", true, true);\n \t\t//DL.init(\"set up\", \"setup\", true, true);\n \t\t//DL.init(\"hobbies\", \"hobbys\", true, true);\n \t\t//DL.init(\"hobbys\", \"hobbies\", true, true);\n \t\t//DL.init(\"thee\", \"The x y the jdlsjds salds\", true, false);\n \t\tDL.init(\"Bismark\", \"... Bismarck lived...Bismarck reigned...\", true, true);\n \t\t//DL.init(\"refugee\", \"refuge x y\", true, true);\n \t\t//StringMatchingStrategy.APPROXIMATE_MATCHING_MINPROB\n \t\tList<PseudoDamerauLevenshtein.Alignment> alis = DL.computeAlignments(0.65);\n \t\tSystem.out.format(\"----------result of testSimpleAlignments() ---------------------\\n\\n\");\n \t\tfor (Alignment ali: alis)\n \t\t{\n \t\t\tali.print();\n \t\t}\n \t}", "public EntityComparison() throws IOException {\n\t\tacroMan = new AcronymManager(ACRONYMS_LIST);\n\t\tshortMan = new ShortcutManager(SHORTCUTS_LIST);\n\t\tname1Parser = new NameParser(HONORIFIC_LIST, NICKNAMES_LIST, NICKNAMES_THRES);\n\t\tname2Parser = new NameParser(HONORIFIC_LIST, NICKNAMES_LIST, NICKNAMES_THRES);\n\t\textraName1Parser = new NameParser(HONORIFIC_LIST, NICKNAMES_LIST, NICKNAMES_THRES);\n\t\textraName2Parser = new NameParser(HONORIFIC_LIST, NICKNAMES_LIST, NICKNAMES_THRES);\n\t\tcountryMan = new CountryLanguageManager(COUNTRYLANG_LIST);\n\t\tpeopleMan = new PeopleManager(PEOPLE_LIST);\n\t\tlocMan = new LocationManager(LOCATION_LIST);\n\t\torgMan = new OrganizationManager(ACRONYMS_LIST);\n\t\tscore = 0.0f;\n\t\tscoreShingle = 0.0f;\n\t\treason = \"\";\n\t}", "private static double mpSpeechHeaderSimilarityScore(MPVertex pCurrMPVertex, MP pMP2)\n\t{\n\t\tMPVertex tempMPVertex = new MPVertex(pMP2.getEmail(), getWordIndex());\n\t\tdouble similarityScore = pCurrMPVertex.subtract(tempMPVertex).vLength();\n\t\treturn similarityScore;\n\t}", "public static double similarity(Library a, Library b) {\r\n double sizeA = a.getPhotos().size();\r\n double sizeB = b.getPhotos().size();\r\n\r\n if (sizeA == 0.0 || sizeB == 0.0) { // return 0.0 if either library is empty\r\n return 0.0;\r\n } else {\r\n int size = commonPhotos(a, b).size();\r\n if (sizeA < sizeB) { // return amount of common photos divided by the smaller library\r\n return size / sizeA;\r\n } else {\r\n return size / sizeB;\r\n }\r\n }\r\n\r\n }", "private static void GenerateBaseline(String path, ArrayList<String> aNgramChar, Hashtable<String, TruthInfo> oTruth, String outputFile, String classValues) {\n FileWriter fw = null;\n int nTerms = 1000;\n \n try {\n fw = new FileWriter(outputFile);\n fw.write(Weka.HeaderToWeka(aNgramChar, nTerms, classValues));\n fw.flush();\n\n ArrayList<File> files = getFilesFromSubfolders(path, new ArrayList<File>());\n\n assert files != null;\n int countFiles = 0;\n for (File file : files)\n {\n System.out.println(\"--> Generating \" + (++countFiles) + \"/\" + files.size());\n try {\n Hashtable<String, Integer> oDocBOW = new Hashtable<>();\n Hashtable<String, Integer> oDocNgrams = new Hashtable<>();\n\n String sFileName = file.getName();\n\n //File fJsonFile = new File(path + \"/\" + sFileName);\n //Get name without extension\n String sAuthor = sFileName.substring(0, sFileName.lastIndexOf('.'));\n\n Scanner scn = new Scanner(file, \"UTF-8\");\n String sAuthorContent = \"\";\n //Reading and Parsing Strings to Json\n while(scn.hasNext()){\n JSONObject tweet= (JSONObject) new JSONParser().parse(scn.nextLine());\n\n String textTweet = (String) tweet.get(\"text\");\n\n sAuthorContent += textTweet + \" \" ;\n\n StringReader reader = new StringReader(textTweet);\n\n NGramTokenizer gramTokenizer = new NGramTokenizer(reader, MINSIZENGRAM, MAXSIZENGRAM);\n CharTermAttribute charTermAttribute = gramTokenizer.addAttribute(CharTermAttribute.class);\n gramTokenizer.reset();\n\n gramTokenizer.reset();\n\n while (gramTokenizer.incrementToken()) {\n String sTerm = charTermAttribute.toString();\n int iFreq = 0;\n if (oDocBOW.containsKey(sTerm)) {\n iFreq = oDocBOW.get(sTerm);\n }\n oDocBOW.put(sTerm, ++iFreq);\n }\n\n gramTokenizer.end();\n gramTokenizer.close();\n }\n \n Features oFeatures = new Features();\n oFeatures.GetNumFeatures(sAuthorContent);\n\n if (oTruth.containsKey(sAuthor)) {\n TruthInfo truth = oTruth.get(sAuthor);\n String sGender = truth.gender.toUpperCase();\n //If gender is unknown, this author is not interesting\n if (sGender.equals(\"UNKNOWN\")) continue;\n String sCountry = truth.country.toUpperCase();\n\n if (classValues.contains(\"MALE\")) {\n fw.write(Weka.FeaturesToWeka(aNgramChar, oDocBOW, oDocNgrams, oFeatures, nTerms, sGender));\n } else {\n fw.write(Weka.FeaturesToWeka(aNgramChar, oDocBOW, oDocNgrams, oFeatures, nTerms, sCountry));\n }\n fw.flush();\n }\n\n } catch (Exception ex) {\n System.out.println(\"ERROR: \" + ex.toString());\n }\n }\n } catch (Exception ex) {\n System.out.println(\"ERROR: \" + ex.toString());\n } finally {\n if (fw!=null) { try { fw.close(); } catch (Exception ignored) {} }\n }\n }", "public Phase1_mod(String dataset1, String dataset2, String output)throws IOException{\n\t\t\n\t\tcontext=new HashMap<String,HashSet<String>>();\n\t\tScanner in1=new Scanner(new FileReader(new File(dataset1)));\n\t\tdata1=new ArrayList<String>();\n\t\t\n\t\t\n\t\tint index=0;\n\t\twhile(in1.hasNextLine()){\n\t\t\tString line=in1.nextLine();\n\t\t\tSystem.out.println(index);\n\t\t\tdata1.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes1=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t1\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin1.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tdata2=new ArrayList<String>();\n\t\tScanner in2=new Scanner(new FileReader(new File(dataset2)));\n\t\t\n\t\t index=0;\n\t\twhile(in2.hasNextLine()){\n\t\t\tString line=in2.nextLine();\n\t\t\t\n\t\t\tdata2.add(new String(line));\n\t\t\tline=line.toLowerCase();\n\t\t\tfor(String forb:Parameters.forbiddenwords)\n\t\t\t\tline=line.replace(forb,\"\");\n\t\t\tline=line.replace(\"\\t\",\" \");\n\t\t\t/*\n\t\t\tif(line.substring(line.length()-1,line.length()).equals(\",\"))\n\t\t\t\tline=line+\" \";\n\t\t\tString[] res=line.split(\"\\\"\");\n\t\t\t if(res.length>1){\n\t\t\t \tString total=\"\";\n\t\t\t\tfor(int j=1; j<res.length; j+=2)\n\t\t\t\t\tres[j]=res[j].replace(\",\",\" \");\n\t\t\t\tfor(int p=0; p<res.length; p++)\n\t\t\t\t\ttotal+=res[p];\n\t\t\t\tline=total;\n\t\t\t\t\t\t\n\t\t\t }\n\t\t\n\t\t\t String[] cols=line.split(\",\");*/\n\t\t\tCSVParser test=new CSVParser();\n\t\t\tString[] cols=test.parseLine(line);\n\t\t\t numAttributes2=cols.length;\n\t\t\t for(int i=0; i<cols.length; i++){\n\t\t\t\tString[] tokens=cols[i].split(Parameters.splitstring);\n\t\t\t\tfor(int j=0; j<tokens.length; j++){\n\t\t\t\t\tif(tokens[j].trim().length()==0||tokens[j].trim().equals(\"null\"))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tString word=new String(tokens[j]);\n\t\t\t\t\tString v=new String(line);\n\t\t\t\t\tif(!context.containsKey(word))\n\t\t\t\t\t\tcontext.put(word, new HashSet<String>());\n\t\t\t\t\tcontext.get(word).add(v+\"\\t2\\t\"+index);\n\t\t\t\t\t//System.out.println(v+\";\"+index);\n\t\t\t\t}\n\t\t\t }\n\t\t\t index++;\n\t\t}\n\t\t\n\t\tin2.close();\n\t\t\n\t\t//printBlocks(\"bel-air hotel\");\n\t\tReducer(output);\n\t}", "public void BruteForceSimilarity(String s1, String s2, int sLength) {\n\n s1_Array = splitStringIntoArray(s1, sLength);\n s2_Array = splitStringIntoArray(s2, sLength);\n\n// for (int i = 0; i < s1_Array.size(); i++) {\n//// System.out.println(s1_Array.get(i));\n// }\n// System.out.println(\"**************************\");\n//\n// for (int i = 0; i < s2_Array.size(); i++) {\n// System.out.println(s2_Array.get(i));\n// }\n\n }", "public RtfOptimizer()\n {\n }", "public HotWordsAnalyzer (String hotWordsFileName, String docFileName){\r\n //Setting the filenames to the variables to make them easier to type\r\n doc = docFileName;\r\n hw = hotWordsFileName;\r\n \r\n //If opening of the file fails, an ioException will be thrown\r\n\t\ttry{\r\n hotword = new Scanner(Paths.get(hw));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n try{\r\n \r\n docs = new Scanner(Paths.get(doc));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above opens both files\r\n \r\n //Goes through hotwords file and takes each word and pushes them to \r\n //the map words so they can be used to locate the hotwords in the document\r\n\t\ttry{\r\n while(hotword.hasNext()){\r\n String y;\r\n String x = hotword.next();\r\n y = x.toLowerCase();\r\n //sets hotword as key and 0 for the count of that hotword in the document\r\n words.put(y, 0);\r\n }\r\n }\r\n //The element doesn't exist- file must not be a file\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n //The file may not be readable or corrupt\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above gets words and puts them into the words map\r\n try{\r\n //reads the document and when it finds a hotword it increments the count in words\r\n while(docs.hasNext()){\r\n //gets next word\r\n String x = docs.next();\r\n String y = x.toLowerCase();\r\n //Gets rid of the commas and periods\r\n y = y.replace(\",\", \"\");\r\n y = y.replace(\".\", \"\");\r\n //If the word y is in the hotwords list\r\n if(words.containsKey(y)){\r\n //Adds to words map and increments count\r\n consec.add(y);\r\n int z;\r\n z = words.get(y);\r\n z++;\r\n words.put(y, z);\r\n }\r\n }\r\n }\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n \r\n\t\t\r\n\t}", "private boolean compareFiles(String file1, String file2)\r\n throws IOException {\r\n \r\n BufferedReader reader1 = new BufferedReader(new FileReader(file1));\r\n BufferedReader reader2 = new BufferedReader(new FileReader(file2));\r\n \r\n\r\n String line1 = reader1.readLine();\r\n String line2 = reader2.readLine();\r\n\r\n boolean areEqual = true;\r\n\r\n int lineNum = 1;\r\n\r\n while (line1 != null || line2 != null) {\r\n if (line1 == null || line2 == null) {\r\n areEqual = false;\r\n break;\r\n }\r\n \r\n else if (!line1.equals(line2)) {\r\n areEqual = false;\r\n break;\r\n }\r\n\r\n line1 = reader1.readLine();\r\n line2 = reader2.readLine();\r\n\r\n lineNum++;\r\n }\r\n reader1.close();\r\n reader2.close();\r\n\r\n if (areEqual) { \r\n return true;\r\n }\r\n else { \r\n System.out.println(\r\n \"Two files have different content. They differ at line \"\r\n + lineNum);\r\n return false;\r\n }\r\n\r\n \r\n }", "public static void main(String args[]) throws Exception {\n\n String sourceFile = args[0]; //source file has supervised SRL tags\n String targetFile = args[1]; //target file has supervised SRL tags\n String alignmentFile = args[2];\n String sourceClusterFilePath = args[3];\n String targetClusterFilePath = args[4];\n String projectionFilters = args[5];\n double sparsityThresholdStart = Double.parseDouble(args[6]);\n double sparsityThresholdEnd = Double.parseDouble(args[6]);\n\n\n Alignment alignment = new Alignment(alignmentFile);\n HashMap<Integer, HashMap<Integer, Integer>> alignmentDic = alignment.getSourceTargetAlignmentDic();\n\n final IndexMap sourceIndexMap = new IndexMap(sourceFile, sourceClusterFilePath);\n final IndexMap targetIndexMap = new IndexMap(targetFile, targetClusterFilePath);\n ArrayList<String> sourceSents = IO.readCoNLLFile(sourceFile);\n ArrayList<String> targetSents = IO.readCoNLLFile(targetFile);\n\n System.out.println(\"Projection started...\");\n DependencyLabelsAnalyser dla = new DependencyLabelsAnalyser();\n for (int senId = 0; senId < sourceSents.size(); senId++) {\n if (senId % 100000 == 0)\n System.out.print(senId);\n else if (senId % 10000 == 0)\n System.out.print(\".\");\n\n Sentence sourceSen = new Sentence(sourceSents.get(senId), sourceIndexMap);\n Sentence targetSen = new Sentence(targetSents.get(senId), targetIndexMap);\n int maxNumOfProjectedLabels = dla.getNumOfProjectedLabels(sourceSen, alignmentDic.get(senId));\n double trainGainPerWord = (double) maxNumOfProjectedLabels/targetSen.getLength();\n\n if (trainGainPerWord >= sparsityThresholdStart && trainGainPerWord< sparsityThresholdEnd) {\n dla.analysSourceTargetDependencyMatch(sourceSen, targetSen, alignmentDic.get(senId),\n sourceIndexMap, targetIndexMap, projectionFilters);\n }\n }\n System.out.print(sourceSents.size() + \"\\n\");\n dla.writeConfusionMatrix(\"confusion_\"+sparsityThresholdStart+\"_\"+sparsityThresholdEnd+\".out\", sourceIndexMap, targetIndexMap);\n }", "public static void main(String[] args) {\n\t\tPhraseSimilarity phSim = new PhraseSimilarity(\"D:\\\\Google-n-gram\\\\n-gram-indexed\\\\\", \n\t\t\t\t\"D:\\\\Google-n-gram\\\\stopwords\\\\stopWords.txt\");\n\t\ttry {\n\t\t\tdouble simScore = phSim.getSimilarity(\"large number\", \"vast amount\", SimMethod.NGD);\n\t\t\tSystem.out.println(\"large number, vast amount=\"+ simScore);\n\t\t\t\n\t\t\tsimScore = phSim.getSimilarity(\"vast amount\", \"large quantity\", SimMethod.NGD);\n\t\t\tSystem.out.println(\"vast amount, large quantity=\"+ simScore);\n\t\t\t\n\t\t\tsimScore = phSim.getSimilarity(\"important part\", \"significant role\", SimMethod.NGD);\n\t\t\tSystem.out.println(\"important part, significant role=\"+ simScore);\n\t\t\t\n\t\t\tsimScore = phSim.getSimilarity(\"certain circumstance\", \"particular case\", SimMethod.NGD);\n\t\t\tSystem.out.println(\"certain circumstance, particular case=\"+ simScore);\n\t\t\t\n\t\t\tsimScore = phSim.getSimilarity(\"general principle\", \"basic rule\", SimMethod.NGD);\n\t\t\tSystem.out.println(\"general principle, basic rule=\"+ simScore);\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}", "public double getcommonPercent(String word1, String word2){\n\t\t// Numerator = letters in common\n\t\t// Denominator = all the letters\n\t\t// Common percent = Numerator/Denominator\n\t\tint Numerator = 0;\n\t\tdouble Denominator = 0.0;\n\t\tdouble commonPercent = 0.0;\n\n\t\tArrayList<Character> myNset = new ArrayList<Character>();\n\t\tmyNset = getNumeratorset(word1, word2);\n\t\tNumerator = myNset.size();\n\n\t\tArrayList<Character> myDset = new ArrayList<Character>();\n\t\tmyDset = getDenominatorset(word1, word2);\n\t\tDenominator = myDset.size();\n\n\t\t// calculate Numerator and Denominator\n\t\tcommonPercent = Numerator/Denominator;\n\n\t\treturn commonPercent;\n\t}", "public FileCat(String file1, String file2, String extension) {\n this.file1 = file1;\n this.file2 = file2;\n this.extension = \".\" + extension;\n }", "public TextTester(){}", "@Override\r\n\tpublic double calculateDistance(Object obj1, Object obj2) {\r\n\t\treturn Math.abs(((String)obj1).split(\" \").length - \r\n\t\t\t\t((String)obj1).split(\" \").length);\r\n\t}", "public VSM(String[] docs) {\n\t\tmyDocs = docs;\n\t\ttermList = new ArrayList<String>();\n\t\tdocLists = new ArrayList<ArrayList<Doc>>();\n\t\tArrayList<Doc> docList;\n\t\t// parse the documents to construct the index and collect the raw\n\t\t// frequencies.\n\t\tfor (int i = 0; i < myDocs.length; i++) {\n\t\t\tString[] tokens = myDocs[i].split(\" \");\n\t\t\tString token;\n\t\t\tfor (int j = 0; j < tokens.length; j++) {\n\t\t\t\ttoken = tokens[j];\n\t\t\t\tif (!termList.contains(token)) {\n\t\t\t\t\ttermList.add(token);\n\t\t\t\t\tdocList = new ArrayList<Doc>();\n\t\t\t\t\tDoc doc = new Doc(i, 1); // initial raw frequency is 1\n\t\t\t\t\tdocList.add(doc);\n\t\t\t\t\tdocLists.add(docList);\n\t\t\t\t} else {\n\t\t\t\t\tint index = termList.indexOf(token);\n\t\t\t\t\tdocList = docLists.get(index);\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tboolean match = false;\n\n\t\t\t\t\t// search the postings list for a document id, if match,\n\t\t\t\t\t// insert a new position number to the document id\n\t\t\t\t\tfor (Doc doc : docList) {\n\t\t\t\t\t\tif (doc.docId == i) {\n\t\t\t\t\t\t\tdoc.tw++; // increase word count\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tk++;\n\t\t\t\t\t}\n\t\t\t\t\t// if no match, add a new document id along with the\n\t\t\t\t\t// position number\n\t\t\t\t\tif (!match) {\n\t\t\t\t\t\tDoc doc = new Doc(i, 1);\n\t\t\t\t\t\tdocList.add(doc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//\n\t\t}// end with parsing\n\n\t\t// compute the tf-idf term weights and the doc lengths\n\t\tint N = myDocs.length;\n\t\tdocLength = new double[N];\n\t\tfor (int i = 0; i < termList.size(); i++) {\n\t\t\tdocList = docLists.get(i);\n\t\t\tint df = docList.size();\n\t\t\tDoc doc;\n\t\t\tfor (int j = 0; j < docList.size(); j++) {\n\t\t\t\tdoc = docList.get(j);\n\t\t\t\tdouble tfidf = (1 + Math.log(doc.tw))\n\t\t\t\t\t\t* Math.log(N / (df * 1.0));\n\t\t\t\tdocLength[doc.docId] += Math.pow(tfidf, 2);\n\t\t\t\tdoc.tw = tfidf;\n\t\t\t\tdocList.set(j, doc);\n\t\t\t}\n\t\t}\n\t\t// update the length\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tdocLength[i] = Math.sqrt(docLength[i]);\n\t\t}\n\n\t}", "public LevenshteinApp() {\n calculateDistanceButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent actionEvent) {\n int distance = LevenshteinToolkit.levenshteinDistance(\n wordOneTextField.getText(), wordTwoTextField.getText());\n distanceLabel.setText(String.valueOf(distance));\n }\n });\n\n visualizationButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent actionEvent) {\n VisualizationViewer vv = LevenshteinToolkit.levenshteinVisualization(\n wordOneTextField.getText(), wordTwoTextField.getText());\n\n JFrame frame = new JFrame(\"Levenshtein Distance between Substrings\");\n frame.getContentPane().add(vv);\n frame.pack();\n frame.setVisible(true);\n }\n });\n }", "public FileTwo() {\n System.out.println(\"File Two is constructed\");\n }", "public static void main(String[] args)throws IOException {\n\t\tint small = 0;\r\n\t\tint big = 0;\r\n\t\tint whitespace = 0;\r\n\t\tint other = 0;\r\n\t\t\r\n\t\tStringBuilder contents = new StringBuilder();\r\n\t\tBufferedReader input = new BufferedReader(new FileReader(\"C:/Users/khalid/workspace/1DV506/src/ko222gj_assign4/second_file\"));\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\twhile ((line = input.readLine()) != null) {\r\n\t\t\t\tcontents.append(line);\r\n\t\t\t}\r\n\t\t//System.out.println(contents);\r\n\t\t}\r\n\t\tcatch (UnsupportedEncodingException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tinput.close();\r\n\t\t}\r\n\t\tString text = contents.toString();\r\n\t\t\r\n\t\t//System.out.println(text);\r\n\r\n\t\tint sblen = text.length();\r\n\t\tfor (int i = 0; i < sblen; i++) {\r\n\t\t\t//System.out.println(sb.charAt(i));\r\n\t\t\tchar x = text.charAt(i);\r\n\t\t\t//System.out.println(x);\r\n\t\t\tif (Character.isLetter(x)) {\r\n\t\t\t\tif (Character.isUpperCase(x)) {\r\n\t\t\t\t\tbig++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tsmall++;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if (Character.isSpaceChar(x)) {\r\n\t\t\t\twhitespace = whitespace + 1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tother++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Number of lower case letters: \"+ small);\r\n\t\tSystem.out.println(\"Number of upper case letters: \" + big);\r\n\t\tSystem.out.println(\"Number of whitespace: \" + whitespace);\r\n\t\tSystem.out.println(\"Number of other: \" + other);\r\n\t}", "@Override\r\n\tpublic double getTwoDiseaseSimilarity(String omimId1, String omimId2) {\r\n\t\tdouble similarity = (1 - alpha) * firstDiseaseSimilarity.getTwoDiseaseSimilarity(omimId1, omimId2);\r\n\t\tsimilarity += alpha * secondDiseaseSimilarity.getTwoDiseaseSimilarity(omimId1, omimId2);\r\n\t\t\r\n\t\treturn similarity;\r\n\t}", "public static void main(String[] args) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 각 문서의 특성을 추출 : Test04 - map\t\t\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n//\t\t\tSystem.out.println();\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\tSystem.out.println(f.getName());\n\t\t\tString f_n = f.getName(); \n\t\t\t\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n//\t\t\tSystem.out.println(Top5List);\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"문서 이름을 입력하세요 : \");\n\t\tString input = sc.next();\n\t\t\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\t\t\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}", "public CSGraph(String fileName) {\n hashTable = new CSHashing();\n words = readWords(fileName);\n\n// createGraph(); // Minimal lösning\n\n createHashTable(); // Frivillig bra lösning\n createGraphWithHashTable(); // Frivillig bra lösning\n\n// shortestPaths(); // Metod som endast används till textfilen utan par.\n\n readPairs(\"files/5757Pairs\");\n }", "@Test\n public void testEditDistDifferentStrings() throws Exception{\n assertEquals(1,Esercizio2.edit_distance_dyn(s1, s2));\n }", "public void showDiff(String left, String right) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Show diff\");\n\n logger.debug(\"Left \" + left.getClass());\n logger.debug(\"Right \" + right.getClass());\n\n logger.debug(\"Left content \" + left);\n logger.debug(\"Right content \" + right);\n }\n\n int leftKey = left.hashCode();\n int rightKey = right.hashCode();\n\n File f1 = compareFiles.get(leftKey);\n File f2 = compareFiles.get(rightKey);\n\n try {\n if (f1 == null) {\n f1 = File.createTempFile(\"result_\", \".xml\");\n FileOutputStream fos = new FileOutputStream(f1);\n try {\n fos.write(((String)left).getBytes(\"UTF-8\"));\n } finally {\n fos.close();\n }\n compareFiles.put(leftKey, f1);\n }\n\n if (f2 == null) {\n f2 = File.createTempFile(\"expected_\", \".xml\");\n FileOutputStream fos2 = new FileOutputStream(f2);\n try {\n fos2.write(((String)right).getBytes(\"UTF-8\"));\n } finally {\n fos2.close();\n }\n\n compareFiles.put(rightKey, f2);\n } \n \n \n final URL url1 = f1.toURI().toURL();\n final URL url2 = f2.toURI().toURL();\n \n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n ((StandalonePluginWorkspace)pluginWorkspace).openDiffFilesApplication(url1, url2);\n }\n });\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public display() {\n initComponents();\n //Start Flag\n \t \n \t try \n \t {\n \t\tWordCount.main();\n \t\tWordCount2.main();\n\t\tWordCount_list.main();\n \t } \n \t catch (Exception e1) {e1.printStackTrace();}\n \t \n \t String t1=\"\";\n \t String t2=\"\";\n \t String t3=\"\";\n \t int flag=0;\n \t String FILENAME = \"output/part-r-00000\";\t \n \t String FILENAME2 = \"output3/part-r-00000\";\t\t\t \t \n \t String FILENAME3 = \"output2/part-r-00000\";\t\t\t \t \t \n \t BufferedReader br = null;\n \t FileReader fr = null;\n \t BufferedReader br2 = null;\n \t FileReader fr2 = null;\n \t BufferedReader br3 = null;\n \t FileReader fr3 = null;\t\t\t \t \n \t \t\n \t try {\n \t\t\tfr = new FileReader(FILENAME);\n \t\t\tbr = new BufferedReader(fr);\n \t\t\tbr = new BufferedReader(new FileReader(FILENAME));\n \t\t\tString sCurrentLine=\"\";\n \t\t\twhile ((sCurrentLine = br.readLine()) != null)\n \t\t\t{\t\t\t\t\n \t\t\t\tString[] parts = sCurrentLine.split(\"\t\");\n \t\t\t\tString part1 = parts[0]; // IP\n \t\t\t\tString part2 = parts[1];//Date\n \t\t\t\t//System.out.println(sCurrentLine);\n \t\t\t\t//System.out.println(\"1\");\n \t\t\t if(part2.length()>20)\n \t\t\t {\n \t\t\t fr2 = new FileReader(FILENAME2);\n \t\t\t \tbr2 = new BufferedReader(fr2);\n \t\t\t \tbr2 = new BufferedReader(new FileReader(FILENAME2));\n \t\t\t \tString sCurrentLine2=\"\";\n \t\t\t \twhile ((sCurrentLine2 = br2.readLine()) != null)\n \t\t\t \t\t{\n \t\t\t \t\t\tString[] pts = sCurrentLine2.split(\"\t\");\n \t\t\t \t\t\tString pt1 = pts[0]; //Hash \n \t\t\t \t\t\tString pt2 = pts[1]; //IP\n \t\t\t \t\t\t//System.out.println(\"2\");\n \t\t\t if(pt2.equals(part1))\n \t\t\t {\n \t\t\t \tfr3 = new FileReader(FILENAME3);\n \t\t\t \t\t\t \tbr3 = new BufferedReader(fr3);\n \t\t\t \t\t\t \tbr3 = new BufferedReader(new FileReader(FILENAME3));\n \t\t\t \t\t\t \tString sCurrentLine3=\"\";\n \t\t\t \t\t\t \twhile ((sCurrentLine3 = br3.readLine()) != null)\n \t\t\t \t\t\t \t\t{\n \t\t\t \t\t\t \t\t\tString[] prts = sCurrentLine3.split(\"\t\");\n \t\t\t \t\t\t \t\t\tString prt1 = prts[0]; //Hash \n \t\t\t \t\t\t \t\t\tString prt2 = prts[1]; //Date\n \t\t\t \t\t\t \t\t\t//System.out.println(\"3\");\n \t\t\t \t\t\t \t\t\tif(prt2.length()==part2.length())\n \t\t\t \t\t\t \t\t\t{\t\n \t\t\t \t\t\t \t\t\t\tSystem.out.println(\"SPAM Detected\");\n \t\t\t \t\t\t \t\t\t\tdisplay.append(\"SPAM Detected \\n\");\n \t\t\t \t\t\t \t\t\t\tt1=prt1;\n \t\t\t \t\t\t \t\t\t\tt2=prt2;\n \t\t\t \t\t\t \t\t\t\tt3=pt2;\n \t\t\t \t\t\t \t\t\t\tdisplay.append(t1+\" \"+t2+\" \"+t3+\" \\n\");\n \t\t\t \t\t\t \t\t\t\tSystem.out.println(t1+\" \"+t2+\" \"+t3+\" \");\n \t\t\t \t\t\t \t\t\t\tflag=1;\t\t\t \t\t\t \t\t\t\t\n \t\t\t \t\t\t \t\t\t\tbreak;\n \t\t\t \t\t\t \t\t\t}\t\t\t \t\t\t \t\t\n \t\t\t \t\t\t \t\t}\t\t\t\t\t \t\t\n \t\t\t \t\t\t \tif(flag==1)\n \t\t\t \t\t\t\t\tbreak;\n \t\t\t }\n \t\t\t }\n \t\t\t }\n \t\t\t}\t\t\t \n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (br != null)\n \t\t\t\t\tbr.close();\n \t\t\t\tif (fr != null)\n \t\t\t\t\tfr.close();\n\n \t\t\t} catch (IOException ex) {\n\n \t\t\t\tex.printStackTrace();\n \t\t\t}\n \t\t}\n \n \n//End Flag \n }", "public static void main(String[] args) {\n\n try {\n FastScanner scanner = new FastScanner(Files.newInputStream(Paths.get(\"./sample/5_3_edit_distance.in\")));\n String s1 = scanner.next();\n String s2 = scanner.next();\n\n System.out.println(dpEditDistanceTwoString(s1, s2, s1.length(), s2.length()));\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "private void test() throws IOException {\n\t\tdouble wordFreq = 0, probAttr = 0, // overlapped word frequency,\n\t\t\t\t\t\t\t\t\t\t\t// probability of each attribute\n\t\tprobHam, probSpam;// probability of being ham and spam\n\t\tdouble wordAppearInVocab = 0; // whether words in test file appeared in\n\t\t\t\t\t\t\t\t\t\t// all training files\n\t\ttestContent = new String();// content of test file\n\n\t\t/* words in test, spam, ham files */\n\t\tArrayList<String> testWord = new ArrayList<String>();\n\t\tArrayList<String> hamWord = new ArrayList<String>();\n\t\tArrayList<String> spamWord = new ArrayList<String>();\n\t\tString buff;// tmp buffer for file reading\n\t\tBufferedReader in = new BufferedReader(new FileReader(inputTestFile));\n\n\t\t/* assign words */\n\t\twhile ((buff = in.readLine()) != null)\n\t\t\ttestContent += buff;\n\t\tfor (int i = 0; i < testContent.split(\" \").length; i++)\n\t\t\ttestWord.add(testContent.split(\" \")[i]);\n\t\tfor (int i = 0; i < hamContent.split(\" \").length; i++)\n\t\t\thamWord.add(hamContent.split(\" \")[i]);\n\t\tfor (int i = 0; i < spamContent.split(\" \").length; i++)\n\t\t\tspamWord.add(spamContent.split(\" \")[i]);\n\n\t\t/*\n\t\t * calculate the probability of being ham\n\t\t */\n\t\tfor (int i = 0; i < testWord.size(); i++) {\n\t\t\tif (vocabulary.contains(testWord.get(i))) // check whether a word is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// in vocabulary, if\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// not, ignore it\n\t\t\t\twordAppearInVocab++;\n\t\t\tfor (int j = 0; j < hamWord.size(); j++) { // get word frequency of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// words in training\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// files\n\t\t\t\tif (testWord.get(i).equals(hamWord.get(j))) {\n\t\t\t\t\twordFreq++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (wordAppearInVocab != 0) {\n\t\t\t\tprobAttr += java.lang.Math.log((double) (wordFreq + 1) // get\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// probability\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of an\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// attribute\n\t\t\t\t\t\t/ (double) (hamWordCount + vocabLen));\n\t\t\t}\n\t\t\twordFreq = 0;\n\t\t\twordAppearInVocab = 0;\n\t\t}\n\t\tprobHam = java.lang.Math.log(pHam) + probAttr;\n\t\tprobAttr = 0;\n\t\t/*\n\t\t * calculate the probability of being spam\n\t\t */\n\t\tfor (int i = 0; i < testWord.size(); i++) {\n\t\t\tif (vocabulary.contains(testWord.get(i)))\n\t\t\t\twordAppearInVocab++;\n\n\t\t\tfor (int j = 0; j < spamWord.size(); j++) {\n\t\t\t\tif (testWord.get(i).equals(spamWord.get(j))) {\n\t\t\t\t\twordFreq++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (wordAppearInVocab != 0) {\n\t\t\t\tprobAttr += java.lang.Math.log((double) (wordFreq + 1)\n\t\t\t\t\t\t/ (double) (spamWordCount + vocabLen));\n\t\t\t}\n\t\t\twordFreq = 0;\n\t\t\twordAppearInVocab = 0;\n\t\t}\n\t\tprobSpam = java.lang.Math.log(pSpam) + probAttr;\n\t\tprobAttr = 0;\n\n\t\t/*\n\t\t * output\n\t\t */\n\n\t\t/*\n\t\t * for (int i = 0; i < vocabulary.size(); i++) {\n\t\t * System.out.println(vocabulary.get(i)); } System.out.println(probHam -\n\t\t * probSpam);\n\t\t */\n\t\tif (probHam > probSpam)\n\t\t\tSystem.out.println(\"ham\");\n\t\telse\n\t\t\tSystem.out.println(\"spam\");\n\t}", "public static void main(String[] args) throws IOException {\n if (args.length != 1) {\n System.out.println(\"Usage: FuzzySearchMain <entities file>\");\n System.exit(1);\n }\n String fileName = args[0];\n\n System.out.print(\"Reading strings and building index...\");\n\n // Build q-gram index.\n QGramIndex qgi = new QGramIndex(3);\n qgi.buildFromFile(fileName);\n\n System.out.print(\" done.\\n\");\n Scanner sc = new Scanner(System.in);\n ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();\n while (true) {\n System.out.println(\" \\n Please enter an input: \");\n String s = sc.nextLine();\n long time1 = System.nanoTime();\n s = QGramIndex.normalizeString(s);\n result = qgi.findMatches(s, s.length() / 4);\n result = qgi.sortResult(result);\n System.out.print(\"#PED = \" + qgi.noPED + \" \");\n System.out.println(\"#RES = \" + result.size());\n for (int i = 0; i < Math.min(5, result.size()); i++) {\n System.out.println(qgi.originalWords.get(result.get(i).get(0)) \n + \" \" + result.get(i).get(1) + \" \"\n + result.get(i).get(2));\n }\n long time2 = System.nanoTime();\n long timediff = (time2 - time1) / 1000000;\n System.out.println(\"Time taken is: \" + timediff + \"ms\");\n }\n }", "@Test\n public void testCompareEqual() {\n System.out.println(\"compare\");\n FileNameComparator instance = new FileNameComparator();\n int expResult = 0;\n int result = instance.compare(testFileA, testFileA);\n Assert.assertEquals(expResult, result);\n }", "public static double getMatchScore(String obj1, String obj2) {\n\tint distance = getLevenshteinDistance(obj1, obj2);\n\tSystem.out.println(\"distance = \" + distance);\n\tdouble match = 1.0 - ((double)distance / (double)(Math.max(obj1.length(), obj2.length())));\n\t\n\tSystem.out.println(\"match is \" + match);\n\treturn match;\n }", "public WordNet(String synsetFilename, String hyponymFilename) {\n In synsets = new In(synsetFilename);\n In hyponyms = new In(hyponymFilename);\n int count = 0;\n while (synsets.hasNextLine()) {\n String line = synsets.readLine();\n String[] linesplit = line.split(\",\");\n String[] wordsplit = linesplit[1].split(\" \");\n Set<String> synset = new HashSet<String>();\n Set<Integer> wordIndexes = new HashSet<Integer>();\n for (int i = 0; i < wordsplit.length; i += 1) {\n synset.add(wordsplit[i]);\n if (wnetsi.containsKey(wordsplit[i])) {\n wordIndexes = wnetsi.get(wordsplit[i]);\n wordIndexes.add(Integer.parseInt(linesplit[0]));\n wnetsi.put(wordsplit[i], wordIndexes);\n } else {\n wordIndexes.add(Integer.parseInt(linesplit[0]));\n wnetsi.put(wordsplit[i], wordIndexes);\n }\n }\n wnetis.put(Integer.parseInt(linesplit[0]), synset);\n count += 1;\n }\n \n \n \n String[] allVerts = hyponyms.readAllLines();\n g = new Digraph(count);\n for (int i = 0; i < allVerts.length; i += 1) {\n String[] linesplit = allVerts[i].split(\",\");\n for (int j = 0; j < linesplit.length; j += 1) {\n g.addEdge(Integer.parseInt(linesplit[0]), Integer.parseInt(linesplit[j]));\n }\n }\n \n }", "public CellMLDiffInterpreter (SimpleConnectionManager conMgmt, CellMLDocument cellmlDocA,\n\t\tCellMLDocument cellmlDocB)\n\t{\n\t\tsuper (conMgmt, cellmlDocA.getTreeDocument (), cellmlDocB.getTreeDocument ());\n\t\t\t//report = new SBMLDiffReport ();\n\t\t\tthis.cellmlDocA = cellmlDocA;\n\t\t\tthis.cellmlDocB = cellmlDocB;\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException\n\t\t\t{\n\t\t\t\tFileInputStream fis_x = new FileInputStream(\"D:\\\\Downloads\\\\testvalue13\\\\lable.txt\");\n\t\t\t\tScanner scanner_x = new Scanner(fis_x);\n\t\t\t\tFileInputStream fis_y = new FileInputStream(\"D:\\\\Downloads\\\\testvalue13\\\\out_r.txt\");\n\t\t\t\tScanner scanner_y = new Scanner(fis_y);\n\t\t\t\tdouble TP = 0;\n\t\t\t\tdouble TN = 0;\n\t\t\t\tdouble FP = 0;\n\t\t\t\tdouble FN = 0;\n\t\t\t\twhile (scanner_x.hasNext() && scanner_y.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble x1 = scanner_x.nextDouble();\n\t\t\t\t\t\tdouble y1 = scanner_y.nextDouble();\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * String[] tempArray_x =new String[] {\"\"}; tempArray_x\n\t\t\t\t\t\t * = scanner_x.nextLine().trim().split(\" \");\n\t\t\t\t\t\t * //System.out.println(\"set_x: \"+Arrays.toString(\n\t\t\t\t\t\t * tempArray_x));\n\t\t\t\t\t\t * \n\t\t\t\t\t\t * String[] tempArray_y = new String[] {\"\"}; tempArray_y\n\t\t\t\t\t\t * = scanner_y.nextLine().trim().split(\" \");\n\t\t\t\t\t\t * //System.out.println(\"set_y: \"+Arrays.toString(\n\t\t\t\t\t\t * tempArray_y));\n\t\t\t\t\t\t * \n\t\t\t\t\t\t * String x=\"\"; String y=\"\"; double t=0; for (int i=0;\n\t\t\t\t\t\t * i<tempArray_x.length; i++) { x=tempArray_x[i]; } int\n\t\t\t\t\t\t * x1=Integer.parseInt(x);\n\t\t\t\t\t\t * //System.out.print(\"x:\"+x+\"\\r\\n\"); for (int j=0;\n\t\t\t\t\t\t * j<tempArray_y.length; j++) { y=tempArray_y[j];} int\n\t\t\t\t\t\t * y1=Integer.parseInt(y);\n\t\t\t\t\t\t */\n\t\t\t\t\t\t// System.out.print(\"y:\"+y+\"\\r\\n\");\n\n\t\t\t\t\t\t// if(x1==1)TP=TP+1;\n\t\t\t\t\t\t// if(x.equals(y))TP=TP+1;\n\t\t\t\t\t\tif ((x1 == y1) && (x1 == 1))\n\t\t\t\t\t\t\tTP = TP + 1;\n\t\t\t\t\t\tif ((x1 == y1) && (x1 == -1))\n\t\t\t\t\t\t\tTN = TN + 1;\n\t\t\t\t\t\tif ((x1 == -1) && (y1 == 1))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tFP = FP + 1;\n\t\t\t\t\t\t\t\t// System.out.print(\"(x1==0)&&(y1==1)\"+FP+\"\\r\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((x1 == 1) && (y1 == -1))\n\t\t\t\t\t\t\tFN = FN + 1;\n\n\t\t\t\t\t}\n\t\t\t\tSystem.out.print(\"TP:\" + TP + \"\\r\\n\");\n\t\t\t\tSystem.out.print(\"TN:\" + TN + \"\\r\\n\");\n\t\t\t\tSystem.out.print(\"FP:\" + FP + \"\\r\\n\");\n\t\t\t\tSystem.out.print(\"FN:\" + FN + \"\\r\\n\");\n\t\t\t\tdouble A0 = (TP + TN) / 238;\n\t\t\t\tdouble P0 = TP / (TP + FP);\n\t\t\t\tdouble R0 = TP / (TP + FN);\n\t\t\t\tdouble F0 = 2 * P0 * R0 / (P0 + R0);\n\t\t\t\tSystem.out.print(\"准确率A0=\" + A0);\n\t\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t\t\tSystem.out.print(\"精确率P0=\" + P0);\n\t\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t\t\tSystem.out.print(\"召回率R0=\" + R0);\n\t\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t\t\tSystem.out.print(\"F0=\" + F0);\n\t\t\t\tSystem.out.print(\"\\r\\n\");\n\n\t\t\t\tscanner_x.close();\n\t\t\t\tscanner_y.close();\n\t\t\t}", "public DocumentComparisonResult(int similarity, String details, boolean suspicious) {\n this.similarity = similarity;\n this.details = details;\n this.suspicious = suspicious;\n }", "protected MergeSpellingData()\r\n\t{\r\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t\tList<Paragraph> paragraphs = new ArrayList<Paragraph>();\n\t\tList<Paragraph> paragraphsWithNoSentences = new ArrayList<Paragraph>();\n\t\t\n\t\tScanner sc = null, sc1 = null;\n\t\ttry {\n\t\t\tsc = new Scanner(new File(\"testsearchtext.txt\"));\n\t\t\tsc1 = new Scanner(new File(\"testsearchentity.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsc.useDelimiter(\"[.]\");\n\t\tsc1.useDelimiter(\"[|]\");\n\t\t\n\t\tList<Sentence> sentences = new ArrayList<Sentence>();\n\t\tint sCount = 0;\n\t\tint pCount = 0;\n\t\twhile(sc.hasNext()){\n\t\t\tString temp = sc.next().trim();\n\n\t\t\tif(sCount > 0 && (sCount%10 == 0 || !sc.hasNext())){\n\t\t\t\tParagraph p = new Paragraph(pCount);\n\t\t\t\tparagraphsWithNoSentences.add(p);\n\t\t\t\t\n\t\t\t\tp = new Paragraph(pCount);\n\t\t\t\tp.setSentences(sentences);\n\t\t\t\tparagraphs.add(p);\n\t\t\t\tpCount++;\n\t\t\t\t\n\t\t\t\tsentences = new ArrayList<Sentence>();\n\t\t\t}\n\t\t\t\n\t\t\tif(!temp.equals(\"\"))\n\t\t\t\tsentences.add(new Sentence((sCount%10), temp));\n\t\t\t\n\t\t\tsCount++;\n\t\t}\n\t\t\n\t\tList<Entity> entities = new ArrayList<Entity>();\n\t\tint currType = -1; \n\t\twhile(sc1.hasNext()){\n\t\t\tString temp = sc1.next().trim();\n\t\t\tif(temp.equals(\"place\")){currType = Entity.PLACE;} else\n\t\t\tif(temp.equals(\"url\")){currType = Entity.URL;} else\n\t\t\tif(temp.equals(\"email\")){currType = Entity.EMAIL;} else\n\t\t\tif(temp.equals(\"address\")){currType = Entity.ADDRESS;} \n\t\t\telse{\n\t\t\t\tentities.add(new Entity(currType, temp));\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSource s = new Source(\"testsearchtext.txt\", \"testsearchtext.txt\");\n\t\tpt1 = new ProcessedText(s, paragraphs, null); \n\t\t\n\t\ts = new Source(\"testsearchtext1.txt\", \"testsearchtext1.txt\");\n\t\tpt2 = new ProcessedText(s, paragraphsWithNoSentences, null); \n\t\t\n\t\tpt3 = new ProcessedText();\n\t\tpt3.setParagraphs(paragraphs);\n\t\t\n\t\tpt4 = new ProcessedText();\n\t\ts = new Source(\"testsearchtext2.txt\", \"testsearchtext2.txt\");\n\t\tpt4.setMetadata(s);\n\t\t\n\t\ts = new Source(\"testsearchtext3.txt\", \"testsearchtext3.txt\");\n\t\tpt5 = new ProcessedText(s, paragraphs, entities); \n\t\t\n\t\ts = new Source(\"testsearchtext4.txt\", \"testsearchtext4.txt\");\n\t\tpt6 = new ProcessedText(s, null, entities); \n\t}", "static void returnTfIdfResults() {\n\t\tSet<String> specificWords = findKeywords();\n\n\t\t// for every phrase\n\t\tfor (String word : specificWords) {\n\t\t\t// get the total number of documents\n\t\t\tdouble totalSize = size;\n\n\t\t\t// get the collection of documents containing that word\n\t\t\tCollection<File> containingWordSet = invertedMap.getValues(word);\n\n\t\t\t// makes a new one if null (for ease of code)\n\t\t\tif (containingWordSet == null) {\n\t\t\t\tcontainingWordSet = new HashSet<File>();\n\t\t\t}\n\n\t\t\t// the number containing the word\n\t\t\tdouble numContainingWord = containingWordSet.size();\n\n\t\t\t// get the idf (log(total/(1 + |# contain word|)\n\t\t\t// it is normalize with 1 to prevent division by 0\n\t\t\tdouble idf = Math.log(totalSize / (1 + numContainingWord));\n\n\t\t\t// System.out.println(\"------------------\");\n\t\t\t// System.out.println(word + \" totalSize \" + totalSize);\n\t\t\t// System.out.println(word + \" numContainingWord \" +\n\t\t\t// numContainingWord);\n\t\t\t// System.out.println(word + \" idf \" + idf);\n\t\t\t// System.out.println(\"------------------\");\n\n\t\t\t// set the wordscore to 0\n\t\t\tdouble wordScore = 0;\n\n\t\t\t// for all of the files with the word\n\t\t\tfor (File file : containingWordSet) {\n\t\t\t\tString fileName = file.getName();\n\n\t\t\t\t// get the phrase count for this document\n\t\t\t\tInteger phraseCount = phraseCountMap.get(fileName);\n\t\t\t\tdouble numPhrases = phraseCount.doubleValue();\n\n\t\t\t\t// get the word frequency map for this page\n\t\t\t\tHashMap<String, Integer> docFreqMap = wordFreqMap.get(fileName);\n\t\t\t\tInteger freq = docFreqMap.get(word);\n\n\t\t\t\t// otherwise, get the tf\n\t\t\t\tdouble tf;\n\t\t\t\tif (freq == null) {\n\t\t\t\t\t// if it's not present, it's 0\n\t\t\t\t\ttf = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, it's the value\n\t\t\t\t\ttf = freq / numPhrases;\n\t\t\t\t\t// System.out.println(tf);\n\t\t\t\t}\n\n\t\t\t\t// multiply for this score\n\t\t\t\tdouble score = tf * idf;\n\n\t\t\t\t// add it to the page score\n\t\t\t\twordScore += score;\n\t\t\t}\n\n\t\t\t// make a node with the sum of tf-idf for all relevant phrases and\n\t\t\t// add to pq\n\t\t\tWordNode w = new WordNode(word, wordScore);\n\t\t\tpq.add(w);\n\t\t}\n\t}", "public double getNormalizedCount(String word1, String word2) {\n// double normalizedCount = 0;\n// // YOUR CODE HERE\n// return normalizedCount;\n \n double normalizedCount = 0;\n // YOUR CODE HERE\n if (KnownWord(word1) && KnownWord(word2)) {\n normalizedCount = bi_grams_normalized[NDTokens.indexOf(word1)][NDTokens.indexOf(word2)];\n } else {\n if(smooth) {\n double temp = (!KnownWord(word1)) ? 0 : uni_grams[NDTokens.indexOf(word1)];\n double sum = temp+NDTokens_size;\n normalizedCount = 1/sum;\n }\n }\n return normalizedCount;\n \n }", "private void compute() {\n try {\n sc = new InputReader(new FileInputStream(\"./resources/trainandpeter\"));\n } catch (FileNotFoundException ex) {\n throw new IllegalArgumentException(ex);\n }\n text = sc.readNext().toCharArray();\n n = text.length;\n pattern1 = sc.readNext();\n pattern2 = sc.readNext();\n buildDfa(pattern1.toCharArray());\n int patpos1 = search(0, n, true);\n int patpos2 = search(n - 1, -1, false);\n if (patpos1 == -1 && patpos2 == -1) {\n System.out.println(\"fantasy\");\n System.exit(0);\n }\n buildDfa(pattern2.toCharArray());\n int patpos3 = -1;\n if (patpos1 > -1) {\n patpos3 = search(patpos1 + pattern1.length(), n, true);\n }\n int patpos4 = -1;\n if (patpos2 > -1) {\n patpos4 = search(patpos2 - pattern1.length(), -1, false);\n }\n if (patpos3 == -1 && patpos4 == -1) {\n System.out.println(\"fantasy\");\n System.exit(0);\n }\n if (patpos1 > -1 && patpos2 > -1 && patpos3 > -1 && patpos4 > -1) {\n System.out.println(\"both\");\n System.exit(0);\n }\n if (patpos1 > -1 && patpos3 > -1) {\n System.out.println(\"forward\");\n System.exit(0);\n }\n if (patpos2 > -1 && patpos4 > -1) {\n System.out.println(\"backward\");\n System.exit(0);\n }\n }" ]
[ "0.6672584", "0.6206244", "0.6001743", "0.6001529", "0.59337586", "0.5863953", "0.5853523", "0.5793654", "0.5709727", "0.5681692", "0.56206024", "0.56039876", "0.5544966", "0.5524772", "0.55011874", "0.5471499", "0.54667044", "0.54606193", "0.5407048", "0.5395178", "0.5383867", "0.5377821", "0.5371476", "0.5367428", "0.5356577", "0.5351148", "0.5277084", "0.5239556", "0.5227975", "0.5220605", "0.52146894", "0.52054447", "0.5200206", "0.5169955", "0.51542157", "0.5153296", "0.51269484", "0.5094898", "0.50682545", "0.5064929", "0.50174886", "0.5001818", "0.5001539", "0.49910897", "0.49901816", "0.4982024", "0.49773127", "0.4973079", "0.49718767", "0.49592045", "0.4956388", "0.49554256", "0.49500078", "0.49490568", "0.4945737", "0.49376166", "0.49366003", "0.4932221", "0.49248528", "0.49230176", "0.49227327", "0.49203274", "0.49164784", "0.4907301", "0.49053916", "0.4900863", "0.4895675", "0.48890018", "0.488383", "0.48821807", "0.4877694", "0.48693103", "0.4868037", "0.48671818", "0.48640817", "0.48516172", "0.48486173", "0.48485646", "0.4845675", "0.48312056", "0.48259586", "0.48238719", "0.4820041", "0.48083895", "0.48057383", "0.4803728", "0.48018983", "0.4799188", "0.47950414", "0.47939476", "0.47897846", "0.47890306", "0.47776383", "0.4753294", "0.4744603", "0.47416264", "0.47370517", "0.47339478", "0.4732256", "0.47244868" ]
0.6634566
1
A helper function which computes the similarity levels between two files. It updates the scores which are otherwise utilized in the constructor.
private void CodeComparisonScoresHelper(String fileOne, String fileTwo) { double maxLength = Math.max(fileOne.length(), fileTwo.length()); int amountOfChangesLD = new LevensthienDistance(fileOne, fileTwo).getEditDistance(); int amountLCS = new LongestCommonSubsequence(fileOne, fileTwo).getLengthOfLCS(); double LDScore = (maxLength - amountOfChangesLD) / maxLength * 100; double LCSScore = amountLCS / maxLength * 100; double overallScore = (LCSScore + LDScore) / 2; if (LDScore > scoreForLD) { scoreForLD = LDScore; } if (LCSScore > scoreForLCS) { scoreForLCS = LCSScore; } if (overallScore > overallTextDiffScore) { overallTextDiffScore = overallScore; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CodeComparisonScores(String[] filesOne, String[] filesTwo) throws IOException {\n\n scoreForLD = 0;\n scoreForLCS = 0;\n overallTextDiffScore = 0;\n\n List<String> normalizedOfFilesOne = new ArrayList<String>();\n List<String> normalizedOfFilesTwo = new ArrayList<String>();\n\n for (int a = 0; a < filesOne.length; a++) {\n Normalizer normalizer = new Normalizer(filesOne[a]);\n normalizer.runNormalization();\n normalizedOfFilesOne.add(normalizer.getNormalized());\n }\n\n for (int b = 0; b < filesTwo.length; b++) {\n Normalizer normalizer = new Normalizer(filesTwo[b]);\n normalizer.runNormalization();\n normalizedOfFilesTwo.add(normalizer.getNormalized());\n }\n\n for (int i = 0; i < normalizedOfFilesOne.size(); i++) {\n for (int j = 0; j < normalizedOfFilesTwo.size(); j++) {\n CodeComparisonScoresHelper(normalizedOfFilesOne.get(i), normalizedOfFilesTwo.get(j));\n }\n }\n\n }", "private void CompareTwoFiles() {\n GetCharactersFromProject prog1Char;\r\n KGram prog1KGram;\r\n HashKGram prog1HashKGram;\r\n FingerPrint prog1FingerPrint;\r\n ArrayList<Integer> fingerprintProg1 = null;\r\n\r\n GetCharactersFromProject prog2Char;\r\n KGram prog2KGram;\r\n HashKGram prog2HashKGram;\r\n FingerPrint prog2FingerPrint;\r\n ArrayList<Integer> fingerprintProg2 = null;\r\n\r\n //for the first file\r\n try {\r\n prog1Char = new GetCharactersFromProject(filepath1);\r\n prog1KGram = new KGram(prog1Char.getCharacters());\r\n prog1HashKGram = new HashKGram(prog1KGram.ReturnProcessedKGram());\r\n prog1FingerPrint = new FingerPrint(prog1HashKGram.ReturnProcessedHashes());\r\n fingerprintProg1 = prog1FingerPrint.ReturnFingerPrint();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n //this is for the second file\r\n try {\r\n prog2Char = new GetCharactersFromProject(filepath2);\r\n prog2KGram = new KGram(prog2Char.getCharacters());\r\n prog2HashKGram = new HashKGram(prog2KGram.ReturnProcessedKGram());\r\n prog2FingerPrint = new FingerPrint(prog2HashKGram.ReturnProcessedHashes());\r\n fingerprintProg2 = prog2FingerPrint.ReturnFingerPrint();\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n //this is for jaccard index. Jaccard index will be the basis of similarity\r\n float numSimilarity = 0;\r\n boolean isSimilarEncounter = false;\r\n int sizeFingerprint1 = fingerprintProg1.size();\r\n int sizeFingerprint2 = fingerprintProg2.size();\r\n\r\n for (Integer integer : fingerprintProg1) {\r\n\r\n for (Integer value : fingerprintProg2) {\r\n\r\n\r\n if ((integer.intValue() == value.intValue()) && !isSimilarEncounter) {\r\n numSimilarity++;\r\n isSimilarEncounter = true;\r\n }\r\n\r\n }\r\n\r\n\r\n isSimilarEncounter = false;\r\n }\r\n\r\n SimilarityScore = (numSimilarity / (sizeFingerprint1 + sizeFingerprint2 - numSimilarity));\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 void calculateScore() {\n for (Sequence seq: currentSeq) {\n double wordWeight = Retriever.getWeight(seq);\n String token = seq.getToken();\n int size = seq.getRight() - seq.getLeft() + 1;\n int titleCount = getCount(token.toLowerCase(), title.toLowerCase());\n if (titleCount != 0) {\n setMatch(size);\n setTitleContains(true);\n }\n int lowerCount = getCount(token.toLowerCase(), lowerContent);\n if (lowerCount == 0) {\n// scoreInfo += \"Token: \" + token + \" Original=0 Lower=0 WordWeight=\" + wordWeight + \" wordTotal=0\\n\";\n continue;\n }\n int originalCount = getCount(token, content);\n lowerCount = lowerCount - originalCount;\n if (lowerCount != 0 || originalCount != 0) {\n setMatch(size);\n }\n double originalScore = formula(wordWeight, originalCount);\n double lowerScore = formula(wordWeight, lowerCount);\n final double weight = 1.5;\n double addedScore = weight * originalScore + lowerScore;\n// scoreInfo += \"Token: \" + token + \" Original=\" + originalScore + \" Lower=\" + lowerScore +\n// \" WordWeight=\" + wordWeight + \" wordTotal=\" + addedScore + \"\\n\";\n dependencyScore += addedScore;\n }\n currentSeq.clear();\n }", "@Override\n\tpublic Scores compare(File f1, File f2) {\n\t\treturn new Scores(1.0, \"AlwaysTrueComparisonStrategy:1\");\n\t}", "public void testWithScoreFile(String testFile, String scoreFile) {\n/* 1108 */ try (BufferedReader in = FileUtils.smartReader(scoreFile)) {\n/* 1109 */ List<RankList> test = readInput(testFile);\n/* 1110 */ String content = \"\";\n/* */ \n/* 1112 */ List<Double> scores = new ArrayList<>();\n/* 1113 */ while ((content = in.readLine()) != null) {\n/* */ \n/* 1115 */ content = content.trim();\n/* 1116 */ if (content.compareTo(\"\") == 0)\n/* */ continue; \n/* 1118 */ scores.add(Double.valueOf(Double.parseDouble(content)));\n/* */ } \n/* 1120 */ in.close();\n/* 1121 */ int k = 0;\n/* 1122 */ for (int i = 0; i < test.size(); i++) {\n/* */ \n/* 1124 */ RankList rl = test.get(i);\n/* 1125 */ double[] s = new double[rl.size()];\n/* 1126 */ for (int j = 0; j < rl.size(); j++)\n/* 1127 */ s[j] = ((Double)scores.get(k++)).doubleValue(); \n/* 1128 */ rl = new RankList(rl, MergeSorter.sort(s, false));\n/* 1129 */ test.set(i, rl);\n/* */ } \n/* */ \n/* 1132 */ double rankScore = evaluate(null, test);\n/* 1133 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* 1134 */ } catch (IOException e) {\n/* 1135 */ throw RankLibError.create(e);\n/* */ } \n/* */ }", "private float calculateSimilarityScore(int numOfSuspiciousNodesInA, int numOfSuspiciousNodesInB) {\n\t\t// calculate the similarity score\n\t\treturn (float) (numOfSuspiciousNodesInA + numOfSuspiciousNodesInB) \n\t\t\t\t/ (programANodeList.size() + programBNodeList.size()) * 100;\n\t}", "private int[] getTotalScore_Positive() throws FileNotFoundException, IOException {\n \n String target_dir = \"src/testing_data/pos\";\n File dir = new File(target_dir);\n File[] files = dir.listFiles();\n String[] posWordList = null;\n ArrayList<String> stopWords = new ArrayList<>();\n int totalReviewScoreAfinn = 0;\n int totalReviewScoreMohan = 0;\n int[] totalScorePositive = new int[2];\n\n for (File f : files) {\n if(f.isFile()) {\n BufferedReader inputStream = null;\n\n try {\n inputStream = new BufferedReader(new FileReader(f));\n String line;\n\n while ((line = inputStream.readLine()) != null) {\n \n int reviewScore = 0;\n\n String result = line.replaceAll(\"[\\\\d+|\\\\p{P}\\\\p{S}]\" ,\"\");\n posWordList = result.toLowerCase().split(\" \");\n \n ArrayList<String> wordList = new ArrayList<>(Arrays.asList(posWordList)); \n\n for(String word : wordList){\n for(String sWord : stopWordList){\n if(word.equals(sWord)){\n stopWords.add(sWord);\n }\n }\n }\n \n wordList.removeAll(stopWords); \n \n for(String word: wordList){\n for(String key : afinnEnglishLibrary.keySet())\n {\n if(word.equals(key)){ \n reviewScore += afinnEnglishLibrary.get(key);\n }\n }\n }\n\n if(reviewScore>0){ \n totalReviewScoreAfinn++;\n }\n \n reviewScore = 0; \n for(String word: wordList){\n for (String key : mohanLibrary.keySet())\n {\n if(word.equals(key)){\n reviewScore += mohanLibrary.get(key);\n }\n }\n }\n\n if(reviewScore>0){\n totalReviewScoreMohan++;\n }\n }\n }\n finally {\n if (inputStream != null) {\n inputStream.close();\n }\n }\n } \n }\n totalScorePositive[0] = totalReviewScoreAfinn;\n totalScorePositive[1] = totalReviewScoreMohan;\n return totalScorePositive;\n }", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n match_score *= 100.0f;\n tvFaceMatchScore1.setText(Float.toString(match_score));\n llFaceMatchScore.setVisibility(View.VISIBLE);\n\n }\n }", "private void calculateScores() throws IOException {\n\n // Create Hashmap to return\n LCOMScores = new HashMap<>();\n LCOMGraph = new HashMap<>();\n\n for (File classFile : CLASS_FILES) {\n\n // Maps for which method uses which fields and which method calls which other methods\n Map<String, List<String>> methodUsesMap = new HashMap<>();\n Map<String, List<String>> methodCallsMap = new HashMap<>();\n\n /*\n Get Class Object of Main Class in ASM\n TODO: What about more than one Class in a classfile?!\n */\n ClassNode myClassNode;\n ClassReader myClassReader;\n try (InputStream classFileIS = new FileInputStream(classFile)) {\n myClassNode = new ClassNode();\n\n myClassReader = new ClassReader(classFileIS);\n }\n myClassReader.accept(myClassNode, 0);\n\n // System.out.println(\"LCOM Calculation for Class \" + myClassNode.name );\n // Initialize jGraphT Graph to Calculate LCOM on\n LCOMGraph.put(cleanInternalName(myClassNode.name), new SimpleGraph<>(DefaultEdge.class));\n\n // Iterate over Methods in Class\n for (MethodNode method : myClassNode.methods) {\n // System.out.println(\"Looking at \" + cleanInternalName(method.name) + \" in \"\n // +\n // myClassNode.name);\n // Add vertex for method\n LCOMGraph.get(cleanInternalName(myClassNode.name))\n .addVertex(cleanInternalName(method.name));\n // List of fields used in method\n List<String> myMethodFields = new ArrayList<>();\n // List of methods called in Method\n List<String> myMethodCalls = new ArrayList<>();\n // Iterate over instructions\n for (AbstractInsnNode ain : method.instructions.toArray()) {\n /*\n If ain is instance variable, write to list of fields used Else If it is a method call,\n write to list of methods called\n */\n if (ain.getType() == AbstractInsnNode.FIELD_INSN) {\n FieldInsnNode fin = (FieldInsnNode) ain;\n // System.out.println(\"Registering field \" + fin.name + \" for\n // method \" + cleanInternalName(method.name));\n myMethodFields.add(fin.name);\n\n } else if (ain.getType() == AbstractInsnNode.METHOD_INSN) {\n MethodInsnNode methCall = (MethodInsnNode) ain;\n if (methCall.owner.equals(cleanInternalName(myClassNode.name))) { // CHECK!\n myMethodCalls.add(methCall.name);\n }\n }\n }\n // Add Lists to HashMap for all methods\n methodUsesMap.put(cleanInternalName(method.name), myMethodFields);\n methodCallsMap.put(cleanInternalName(method.name), myMethodCalls);\n }\n // Iterate over found methods and add edges to LCOM graph using mutual used fields\n for (String method : LCOMGraph.get(cleanInternalName(myClassNode.name)).vertexSet()) {\n for (String usedField : methodUsesMap.get(method)) {\n for (String secondMethod :\n LCOMGraph.get(cleanInternalName(myClassNode.name)).vertexSet()) {\n if (!method.equals(secondMethod)) {\n // System.out.println(\"Looking for Edges from \" + method + \" to \" + secondMethod + \"\n // for field \" + usedField);\n if (!methodUsesMap.get(secondMethod).isEmpty()\n && methodUsesMap.get(secondMethod).contains(usedField)) {\n // System.out.println(\"Adding edge from \" + method + \"\n // to \" + secondMethod);\n LCOMGraph.get(cleanInternalName(myClassNode.name)).addEdge(method, secondMethod);\n }\n }\n }\n }\n }\n // Iterate over found methods and add edges to LCOM graph using calls\n for (String method : LCOMGraph.get(cleanInternalName(myClassNode.name)).vertexSet()) {\n for (String secondMethod : methodCallsMap.get(method)) {\n if (!secondMethod.equals(method)\n && LCOMGraph.get(cleanInternalName(myClassNode.name))\n .vertexSet()\n .contains(secondMethod)) {\n LCOMGraph.get(cleanInternalName(myClassNode.name)).addEdge(method, secondMethod);\n }\n }\n }\n\n // Create ConnectivityInspector to find connected components of graph\n ConnectivityInspector<String, DefaultEdge> connectedComponentIns =\n new ConnectivityInspector<>(LCOMGraph.get(cleanInternalName(myClassNode.name)));\n List<Set<String>> connectedComponents = connectedComponentIns.connectedSets();\n\n LCOMScores.put(cleanInternalName(myClassNode.name), connectedComponents.size());\n }\n\n // TODO: saveResultJSON(myLCOMScores);\n }", "public void getAccuracy() throws IOException {\n\t\tList<String> in = FileHelper.readFiles(Constants.outputpath);\r\n\t\tList<String> testhscode=FileHelper.readFiles(Constants.testpath);\r\n\t\tList<String> hslist=new ArrayList<String>();\r\n\t\tfor(String code:testhscode){\r\n\t\t\thslist.add(code.split(\" \")[0]);\r\n\t\t}\r\n\t\tList<TreeMap<String,Double>> finallist=new ArrayList<TreeMap<String,Double>>();\r\n\t\tString[] label = in.get(0).split(\" \");\r\n\t\t\r\n\t\tfor (int i=1;i<in.size();i++){\r\n\t\t\tString[] probability=in.get(i).split(\" \");\r\n\t\t\tTreeMap<String,Double> tm=new TreeMap<String,Double>();\r\n//\t\t\tString hscode = probability[0];\r\n//\t\t\tSystem.out.println(hscode);\r\n//\t\t\thslist.add(hscode);\r\n\t\t\tfor(int j=1;j<probability.length;j++){\r\n\t\t\t\tDouble p = Double.valueOf(probability[j]);\r\n\t\t\t\ttm.put(label[j]+\"\", p);\r\n//\t\t\t\tSystem.out.println(label[j]+\" \"+ p);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfinallist.add(tm);\r\n\t\t}\r\n\t\tList<String> outputlist=new ArrayList<String>();\r\n\t\tint right=0;\r\n\t\tfor(int j=0;j<finallist.size();j++){\r\n\t\t\tTreeMap<String, Double> m = finallist.get(j);\r\n\t\t\t\r\n\t\t\tString hs = hslist.get(j);\r\n//\t\t\tSystem.out.println(hs);\r\n//\t\t\tSystem.out.println(j);\r\n//\t\t\tString hscode = hs;\r\n//\t\t\tSystem.out.println(hscode);\r\n\t\t\tString hscode = changeToHSCode(hs);\r\n\t\t\tStringBuffer sb=new StringBuffer();\r\n\t\t\tsb.append(hscode+\" \");\r\n\t\t\tList<Map.Entry<String,Double>> list = new ArrayList<Map.Entry<String,Double>>(m.entrySet());\r\n //然后通过比较器来实现排序\r\n Collections.sort(list,new Comparator<Map.Entry<String,Double>>() {\r\n //升序排序\r\n \t\tpublic int compare(Entry<String, Double> o1,\r\n Entry<String, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }});\r\n\t\t\t \r\n\t\t\t \r\n\t\t\tint point=0;\r\n\t\t\tint flag=0;\r\n\t\t\t for(Map.Entry<String,Double> mapping:list){ \r\n \tflag++;\r\n \t\r\n \tif(hs.equals(mapping.getKey())){\r\n \t\tpoint=1;\r\n \t\tright++;\r\n \t} \r\n \tsb.append(changeToHSCode(mapping.getKey())+\" \"+mapping.getValue()+\" \");\r\n// System.out.println(mapping.getKey()+\":\"+mapping.getValue()); \r\n \tif(flag==5)\r\n \t\t{\r\n \t\tsb.append(\",\"+point);\r\n \t\tbreak;\r\n \t\t}\r\n } \r\n\t\t\toutputlist.add(sb.toString());\r\n\t\t}\r\n\t\tSystem.out.println(\"准确率\"+(double)right/finallist.size());\r\n\t\tFileHelper.writeFile(outputlist,Constants.finaloutputpath);\r\n\t}", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }", "private static void calculateSimilarity() {\n \tLOG.info(\"Begin calculating spatial similarity between users.\");\n \t\n\t\t// Get a list of all users\n \tNeo4JUserDAO uDao = (Neo4JUserDAO) DAOFactory.instance().getUserDAO();\n\t\tList<Node> users = uDao.findAll();\n\t\t\n\t\tint usersCount = users.size();\n \tLOG.debug(\"Found {} users.\", usersCount);\n\t\t\n\t\t// Instantiate all needed classes for similarity measurement\n\t\tNeo4JSequenceExtractor ex = new Neo4JSequenceExtractor();\n\t\tex.setFromLevel(clArgs.calcSimilarityFromLevel);\n\t\tex.setToLevel(clArgs.calcSimilarityToLevel);\n\t\t\n\t\tNeo4JSequenceMatcher matcher = new Neo4JSequenceMatcher(\n\t\t\t\tclArgs.calcSimilaritySplitThreshold, \n\t\t\t\tclArgs.calcSimilarityMinSequenceLength,\n\t\t\t\tclArgs.calcSimilarityTempConstraintThreshold);\n\t\tNeo4JSimilarityAnalyzer analyzer = new Neo4JSimilarityAnalyzer();\n\t\t\n\t\t// Create matrix that holds similarity results\n\t\tdouble[][] similarityResults = new double[usersCount][usersCount];\n\t\t\n\t\t// Go through all pair-wise user combinations\n \tfor (int i = 0; i < usersCount; i++) {\n\t\t\tNode userOne = users.get(i);\n\t\t\tObject userOneId = uDao.getUserId(userOne);\n\t\t\t\n\t\t\t// Set current first user for sequence extraction\n\t\t\tex.setUserNodeOne(userOne);\n\t\t\t\n\t\t\tfor (int j = i + 1; j < usersCount; j++) {\n\t\t\t\tNode userTwo = users.get(j);\n\t\t\t\tObject userTwoId = uDao.getUserId(userTwo);\n\t\t\t\tLOG.info(\"Calculate similarity between user [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\n\t\t\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\t\t\t// Step 1: Extract cluster sequences of two users based on their hierarchical graphs\n\t\t\t\t// Set current second user for sequence extraction\n\t\t\t\tex.setUserNodeTwo(userTwo);\n\t\t\t\tMap<Integer, SequenceWrapper> clusterSequences = null;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t// Start extraction of cluster sequences\n\t\t\t\t\tLOG.info(\"Step 1: Extraction of cluster sequences from level {} to level {}.\", clArgs.calcSimilarityFromLevel, clArgs.calcSimilarityToLevel);\n\t\t\t\t\tclusterSequences = ex.extract();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(\"An error occurred while extracting the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Step 2: Match the extracted cluster sequences to find maximal length similar sequences\n\t\t\t\tMap<Integer, List<Sequence<SimilarSequenceCluster>>> maxLengthSimilarSequences = null;\n\t\t\t\t\n\t\t\t\t// Matching is only possible if there is a valid result of step 1 \n\t\t\t\tif (clusterSequences != null && !clusterSequences.isEmpty()) {\n\t\t\t\t\tmatcher.setSequencesOnLevel(clusterSequences);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Start matching of cluster sequences\n\t\t\t\t\t\tLOG.info(\"Step 2: Matching of cluster sequences.\");\n\t\t\t\t\t\tmaxLengthSimilarSequences = matcher.match();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLOG.error(\"An error occurred while matching the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t// Step 3: Compute spatial similarity between the current two users\n\t\t\t\t\t// Similarity measurement is only possible with a valid result of step 2\n\t\t\t\t\tif (maxLengthSimilarSequences != null && !maxLengthSimilarSequences.isEmpty()) {\n\t\t\t\t\t\tanalyzer.setUserNodeOne(userOne);\n\t\t\t\t\t\tanalyzer.setUserNodeTwo(userTwo);\n\t\t\t\t\t\tanalyzer.setMaximalLengthSimilarSequencesOnLevel(maxLengthSimilarSequences);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Start similarity measurement\n\t\t\t\t\t\t\tLOG.info(\"Step 3: Similarity measurement.\");\n\t\t\t\t\t\t\tsimilarity = analyzer.analyze();\n\t\t\t\t\t\t\tLOG.debug(\"Final similarity score: {}\", similarity);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Save similarity value in result matrix\n\t\t\t\t\t\t\tsimilarityResults[i][j] = similarity;\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tLOG.error(\"An error occurred while measuring similarity between user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\t// END: step 3\n\t\t\t\t}\t// END: step 2\n\t\t\t}\t// END: user two loop\n\t\t}\t// END: user one loop\n \t\n \tLOG.info(\"Finished calculating spatial similarity.\");\n \t\n \t// Normalize the similarity scores from 0 to 1\n \tif (clArgs.normalization) {\n\t \tLOG.info(\"Normalizing similarity scores.\");\n\t \tsimilarityResults = SimilarityNormalizer.normalize(similarityResults);\n \t}\n \t\n \t// The evaluation is requested\n \tif (clArgs.evaluation) {\n \t\tLOG.info(\"Evaluation is enabled.\");\n \t\t\n \t\t// Calculate simple evaluation\n \t\tLOG.info(\"Calculate similarity evaluation values.\");\n \t\tSimilarityEvaluation evaluation = SimilarityEvaluator.evaluate(similarityResults);\n \t\t\n \t\t// Build up other information to include in the evaluation files\n \t\tList<String> otherInformation = new ArrayList<String>();\n \t\tif (clArgs.automation) {\n \t\t\t// Clustering information is only included if the automation task is running\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_XI);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsXi)));\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_MIN_POINTS);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsMinPoints)));\n \t\t}\n \t\t\n \t\t// Add simple metrics from similarity measurement\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MIN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMin())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MAX);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMax())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MEAN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getSimilarityMean())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILAR_USER_PAIRS);\n \t\totherInformation.add(String.valueOf(evaluation.getSimilarUserPairs()));\n \t\t\n \t\t// Write similarity results in a file\n \t\tLOG.info(\"Writing evaluation data to a file.\");\n \t\tArrayToCsvWriter.writeDoubles(similarityResults, clArgs.evaluationOutDir, otherInformation.toArray(new String[0]));\n \t}\n \t// Evaluation is not requested, write the similarity scores into the graph database\n \telse {\n \t\tLOG.info(\"Write similarity scores to the graph database.\");\n \t\t\n \t\tfor (int i = 0; i < similarityResults.length; i++) {\n \t\t\t// Get first user by id\n \t\t\tNode userOne = uDao.findUserById(i);\n \t\t\tfor (int j = i + 1; j < similarityResults.length; j++) {\n \t\t\t\tdouble similarityScore = similarityResults[i][j];\n \t\t\t\t// User pairs that are not similar (i.e., have a similarity score of zero) do not get a connection\n \t\t\t\tif (similarityScore > 0) {\n\t \t\t\t\t// Get second user by id\n\t \t\t\t\tNode userTwo = uDao.findUserById(j);\n\t \t\t\t\t\n\t \t\t\t\t// Add similarity relationship\n\t \t\t\t\tuDao.connectSimilarUsers(userOne, userTwo, similarityScore);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }", "public void score(List<String> modelFiles, List<String> testFiles, String outputFile) {\n/* 1223 */ int nFold = modelFiles.size();\n/* 1224 */ try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), \"UTF-8\"))) {\n/* 1225 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* */ \n/* 1228 */ List<RankList> test = readInput(testFiles.get(f));\n/* 1229 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1230 */ int[] features = ranker.getFeatures();\n/* */ \n/* 1232 */ if (normalize) {\n/* 1233 */ normalize(test, features);\n/* */ }\n/* 1235 */ for (RankList l : test) {\n/* 1236 */ for (int j = 0; j < l.size(); j++) {\n/* 1237 */ out.write(l.getID() + \"\\t\" + j + \"\\t\" + ranker.eval(l.get(j)) + \"\");\n/* 1238 */ out.newLine();\n/* */ }\n/* */ \n/* */ } \n/* */ } \n/* 1243 */ } catch (IOException ex) {\n/* */ \n/* 1245 */ throw RankLibError.create(\"Error in Evaluator::score(): \", ex);\n/* */ } \n/* */ }", "private Similarity getSimilarity(DisjointSets<Pixel> ds, int root1, int root2)\n {\n return null; //TODO: remove and replace this line\n }", "private double getScore(String source, String target) {\n return sourceTargetCounts.getCount(source, target) / (sourceWordCounts.get(source) * targetWordCounts.get(target));\n }", "public void getSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += (list.get(j).getValue() - iAverage) * (userRate- this.userAverageRate);\r\n\t\t\t\t\t\tb += (list.get(j).getValue() - iAverage) * (list.get(j).getValue() - iAverage);\r\n\t\t\t\t\t\tc += (userRate - this.userAverageRate) * (userRate - this.userAverageRate);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && c == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && b != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Create a heap storing the similarity pairs in a descending order.\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void score(List<String> modelFiles, String testFile, String outputFile) {\n/* 1180 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 1181 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* 1184 */ int nFold = modelFiles.size();\n/* */ \n/* 1186 */ List<RankList> samples = readInput(testFile);\n/* 1187 */ System.out.print(\"Preparing \" + nFold + \"-fold test data... \");\n/* 1188 */ FeatureManager.prepareCV(samples, nFold, trainingData, testData);\n/* 1189 */ System.out.println(\"[Done.]\");\n/* */ try {\n/* 1191 */ BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), \"UTF-8\"));\n/* 1192 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* 1194 */ List<RankList> test = testData.get(f);\n/* 1195 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1196 */ int[] features = ranker.getFeatures();\n/* 1197 */ if (normalize)\n/* 1198 */ normalize(test, features); \n/* 1199 */ for (RankList l : test) {\n/* 1200 */ for (int j = 0; j < l.size(); j++) {\n/* 1201 */ out.write(l.getID() + \"\\t\" + j + \"\\t\" + ranker.eval(l.get(j)) + \"\");\n/* 1202 */ out.newLine();\n/* */ } \n/* */ } \n/* */ } \n/* 1206 */ out.close();\n/* */ }\n/* 1208 */ catch (IOException ex) {\n/* */ \n/* 1210 */ throw RankLibError.create(\"Error in Evaluator::score(): \", ex);\n/* */ } \n/* */ }", "private int[] getTotalScore_Negative() throws FileNotFoundException, IOException {\n \n String target_dir = \"src/testing_data/neg\";\n File dir = new File(target_dir);\n File[] files = dir.listFiles();\n String[] negWordList = null;\n ArrayList<String> stopWords = new ArrayList<>();\n int totalReviewScoreAfinn = 0;\n int totalReviewScoreMohan = 0;\n int[] totalScoreNegative = new int[2];\n\n for (File f : files) {\n if(f.isFile()) {\n BufferedReader inputStream = null;\n try {\n inputStream = new BufferedReader(new FileReader(f));\n String line;\n while ((line = inputStream.readLine()) != null) { \n int reviewScore = 0;\n String result = line.replaceAll(\"[\\\\d+|\\\\p{P}\\\\p{S}]\" ,\"\");\n negWordList = result.toLowerCase().split(\" \");\n ArrayList<String> wordList = new ArrayList<>(Arrays.asList(negWordList)); \n for(String word : wordList){\n for(String sWord : stopWordList){\n if(word.equals(sWord)){\n stopWords.add(sWord);\n }\n }\n } \n wordList.removeAll(stopWords); \n \n \n for(String word: wordList){\n for (String key : afinnEnglishLibrary.keySet())\n {\n if(word.equals(key)){\n reviewScore += afinnEnglishLibrary.get(key);\n }\n }\n }\n if(reviewScore<0){\n totalReviewScoreAfinn++;\n }\n \n reviewScore = 0; \n for(String word: wordList){\n for (String key : mohanLibrary.keySet())\n {\n if(word.equals(key)){\n reviewScore += mohanLibrary.get(key);\n }\n }\n }\n if(reviewScore<0){\n totalReviewScoreMohan++;\n }\n }\n }\n finally {\n if (inputStream != null) {\n inputStream.close();\n }\n }\n } \n }\n totalScoreNegative[0] = totalReviewScoreAfinn;\n totalScoreNegative[1] = totalReviewScoreMohan;\n return totalScoreNegative;\n }", "public void compareWithinClusters() {\n\t\tList<Cluster> clusterList = clusterDao.getClusterList();\n\n\t\tfor (Cluster cluster : clusterList) {\n\t\t\tList<Document> docList = documentDao.getDocListByClusterId(cluster.getId());\n\t\t\tint size = docList.size();\n\t\t\t\n\t\t\tdouble[][] matrix = new double[size][size];\n\t\t\t\n\t\t\tfor(int i =0; i<size; i++){\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (size > 1) {\n\t\t\t\t//List<Document> docList2 = docList1;\n\t\t\t\tfor (int i=0; i<size; i++){\n\t\t\t\t\tfor(int j=i+1; j<size; j++){\n\t\t\t\t\t\t//match docs docList.get(i) & docList.get(j)\n\t\t\t\t\t\tMap<String, Double> map = datumboxCaller.compareDocs(docList.get(i).getDocName(), docList.get(j).getDocName());\n\t\t\t\t\t\tmatrix[i][j] = map.get(\"Oliver\");\n\t\t\t\t\t\tmatrix[j][i] = map.get(\"Shingle\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//persist both metrics in a file \n\t\t\tpersist(matrix, cluster, docList);\n\t\t\t\n\t\t\t//printing the matrix\n\t\t\tSystem.out.println(\"\\nDocument Similarity Matrix for Cluster \"+cluster.getId());\n\t\t\tSystem.out.println(\"\\nOliver Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.println(docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nShingle Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.print(\"\\n\"+docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[j][i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//print ends\n\t\t\t\n\t\t}\n\n\t}", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "public double compareImages(ImageSub img1, ImageSub img2) {\n\t\tdouble[] channels = new double[3];\n\t\tdouble sumOfSquares = 0;\n\t\tfor(int i = 0; i < channels.length; i++) {\n\t\t\tchannels[i] = Imgproc.compareHist(img1.cvChannels.get(i), img2.cvChannels.get(i), Imgproc.CV_COMP_BHATTACHARYYA);\n\t\t\t\n\t\t\t//Uncomment this. Comment the line above\n\t\t\t//channels[i] = SSIM.compareImages(img1.cvChannels.get(i), img2.cvChannels.get(i));\n\t\t\tsumOfSquares += channels[i];\n\t\t}\n\t\tsumOfSquares /= channels.length;\n\t\t//System.out.println(sumOfSquares);\n\t\treturn sumOfSquares;\n\t}", "public static ArrayList<ArrayList<ArrayList<Double>>> assignScoreToQueries() {\r\n\t\t\r\n\t\tArrayList<ArrayList<ArrayList<Double>>> allQueries = Queries.createQueries();\r\n\t\tArrayList<ArrayList<String>> dataset = ReadInDataset.finalDataset;\r\n\t\tint Counter = 0;\r\n\t\tDouble Score = 0.0;\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\r\n\t\tdf.setRoundingMode(RoundingMode.CEILING); // round up to 4 decimal places\r\n\t\t\r\n\t\t\r\n\t\t// initially assign to each query a score of 0\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) {\r\n\t\t\tArrayList<Double> zero = new ArrayList<Double>();\r\n\t\t\tzero.add(0.0);\r\n\t\t\tallQueries.get(i).add(zero);}\r\n\t\t\r\n\t\t// go through each query and check how many entries of the dataset it matches\r\n\t\t// with each match increase the score\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) { // for each query\r\n\t\t\tfor(int b=0; b < dataset.size(); b++) { // for each dataset\r\n\t\t\t\tCounter = 0; \r\n\t\t\t\tfor (int a=0; a < allQueries.get(i).size()-1; a++) { // for each query clause\r\n\t\t\t\t//check if the query criteria match the dataset and increase the Score accordingly\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //this counter ensures that all query requirements are met in order to increase the score\r\n\t\t\t\t\tif (a != allQueries.get(i).size() - 1) {\t\t\t\t\t\t // ensure that Score entry is not involved in Query Matching\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// take min and max from query along with an entry from the dataset, convert to a double of 4 decimal places\r\n\t\t\t\t\t\tdouble minPoint1 = allQueries.get(i).get(a).get(0);\r\n\t\t\t\t\t\tString minPoint2 = df.format(minPoint1);\r\n\t\t\t\t\t\tdouble minPoint = Double.parseDouble(minPoint2);\r\n\t\t\t\t\t\tdouble maxPoint1 = allQueries.get(i).get(a).get(1);\r\n\t\t\t\t\t\tString maxPoint2 = df.format(maxPoint1);\r\n\t\t\t\t\t\tdouble maxPoint = Double.parseDouble(maxPoint2);\r\n\t\t\t\t\t\tdouble dataPoint1 = Double.parseDouble(dataset.get(b).get(a+1));\r\n\t\t\t\t\t\tString dataPoint2 = df.format(dataPoint1);\r\n\t\t\t\t\t\tdouble dataPoint = Double.parseDouble(dataPoint2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( dataPoint<= maxPoint && dataPoint >= minPoint) { Counter++; \r\n\t\t\t\t\t//\tSystem.out.println(\"min:\" + minPoint+\" max: \"+maxPoint+\" data: \"+dataPoint+ \" of Query: \" + b+ \"| Query Match!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {//System.out.println(minPoint+\" \"+maxPoint+\" \"+dataPoint+ \" of \" + b);\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\tif (Counter==(Queries.getDimensions())/2) { // if counter equals the dimensions of the query then increase score\r\n\t\t\t\t\tScore = allQueries.get(i).get(allQueries.get(i).size()-1).get(0);\r\n\t\t\t\t\tallQueries.get(i).get(allQueries.get(i).size()-1).set(0, Score+1.00); \r\n\t\t\t\t\t}}\r\n\t\t\t\t \r\n\t\t\t\t}\r\n\t\t//\tSystem.out.println(\"Score = \" + allQueries.get(i).get(allQueries.get(i).size()-1).get(0));\r\n\t\t}\t\r\n\t\treturn allQueries;\r\n\t}", "public static void classifyWithLowerCaseWords(String[] args) \r\n\t\t\tthrows IOException\r\n\t\t\t{\n\t\tFile dir_location = new File( args[0] ); \r\n\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] dir_listing = new File[0];\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\tdir_listing = dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] listing_ham = new File[0];\r\n\t\tFile[] listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean hamFound = false; boolean spamFound = false;\r\n\t\tfor (int i=0; i<dir_listing.length; i++) {\r\n\t\t\tif (dir_listing[i].getName().equals(\"ham\")) { listing_ham = dir_listing[i].listFiles(); hamFound = true;}\r\n\t\t\telse if (dir_listing[i].getName().equals(\"spam\")) { listing_spam = dir_listing[i].listFiles(); spamFound = true;}\r\n\t\t}\r\n\t\tif (!hamFound || !spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Print out the number of messages in ham and in spam\r\n\t\t//System.out.println( \"\\t number of ham messages is: \" + listing_ham.length );\r\n\t\t//System.out.println( \"\\t number of spam messages is: \" + listing_spam.length );\r\n\r\n\t\t//******************************\r\n\t\t// Create a hash table for the vocabulary (word searching is very fast in a hash table)\r\n\t\tHashtable<String,Multiple_Counter> vocab = new Hashtable<String,Multiple_Counter>();\r\n\t\tMultiple_Counter old_cnt = new Multiple_Counter();\r\n\r\n\t\t//\t\tgw\r\n\t\tHashtable<String,WordStat> vocab_stat = new Hashtable<String,WordStat>();\r\n\r\n\t\tint nWordsHam = 0;\r\n\t\tint nWordsSpam = 0;\r\n\r\n\t\t// Read the e-mail messages\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\tnWordsHam++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterHam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterHam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 1;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 0;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 1;\r\n\t\t\t\t\t\t\tws.counterSpam = 0;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\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\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\t\t\t\t\t\tnWordsSpam ++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterSpam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterSpam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 0;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 1;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 0;\r\n\t\t\t\t\t\t\tws.counterSpam = 1;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\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\r\n\t\t\tin.close();\r\n\t\t}\r\n\r\n\t\t// Print out the hash table\r\n\t\t//\t\tfor (Enumeration<String> e = vocab.keys() ; e.hasMoreElements() ;)\r\n\t\t//\t\t{\t\r\n\t\t//\t\t\tString word;\r\n\t\t//\r\n\t\t//\t\t\tword = e.nextElement();\r\n\t\t//\t\t\told_cnt = vocab.get(word);\r\n\t\t//\r\n\t\t//\t\t\tSystem.out.println( word + \" | in ham: \" + old_cnt.counterHam + \r\n\t\t//\t\t\t\t\t\" in spam: \" + old_cnt.counterSpam);\r\n\t\t//\t\t}\r\n\r\n\t\t// Now all students must continue from here\r\n\t\t// Prior probabilities must be computed from the number of ham and spam messages\r\n\t\t// Conditional probabilities must be computed for every unique word\r\n\t\t// add-1 smoothing must be implemented\r\n\t\t// Probabilities must be stored as log probabilities (log likelihoods).\r\n\t\t// Bayes rule must be applied on new messages, followed by argmax classification (using log probabilities)\r\n\t\t// Errors must be computed on the test set and a confusion matrix must be generated\r\n\r\n\t\t// prior prob\r\n\t\tint nMessagesHam = listing_ham.length;\r\n\r\n\t\tint nMessagesSpam = listing_spam.length;\r\n\r\n\t\tint nMessagesTotal = nMessagesHam + nMessagesSpam;\r\n\r\n\t\tif(nMessagesHam == 0 || nMessagesSpam ==0)\r\n\t\t\tSystem.out.println(\"Zero ham or spam messages\");\r\n\r\n\t\tdouble p_ham_log = Math.log((nMessagesHam* 1.0)/(nMessagesTotal));\r\n\t\tdouble p_spam_log = Math.log((nMessagesSpam* 1.0)/(nMessagesTotal));\r\n\r\n\t\tIterator it = vocab_stat.entrySet().iterator();\r\n\t\tWordStat ws = null;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.counterHam ++;\r\n\t\t\tws.counterSpam ++;\r\n\t\t\tnWordsHam ++;\r\n\t\t\tnWordsSpam ++;\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"nWordsHam = \" +nWordsHam);\r\n\t\t//System.out.println(\"nWordsSpam = \" + nWordsSpam);\r\n\r\n\t\t//\t\tgw:\r\n\t\tit = vocab_stat.entrySet().iterator();\r\n\t\tws = null; \r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.p_w_given_ham_log = Math.log(ws.counterHam *1.0 / nWordsHam);\r\n\t\t\tws.p_w_given_spam_log = Math.log(ws.counterSpam *1.0 / nWordsSpam);\r\n\t\t\t//vocab_stat.put(is,ws);\r\n\t\t}\r\n\t\t//\t\tTODO: further confirm arg index\r\n\t\t//test sets\r\n\t\tFile test_dir_location = new File( args[1] ); \r\n\r\n\t\t//\t\tTODO: verify below works\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] test_dir_listing = new File[0];\r\n\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( test_dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\ttest_dir_listing = test_dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\tTODO: verify File[0]\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] test_listing_ham = new File[0];\r\n\t\tFile[] test_listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean test_hamFound = false; boolean test_spamFound = false;\r\n\t\tfor (int i=0; i<test_dir_listing.length; i++) {\r\n\t\t\tif (test_dir_listing[i].getName().equals(\"ham\")) { test_listing_ham = test_dir_listing[i].listFiles(); test_hamFound = true;}\r\n\t\t\telse if (test_dir_listing[i].getName().equals(\"spam\")) { test_listing_spam = test_dir_listing[i].listFiles(); test_spamFound = true;}\r\n\t\t}\r\n\t\tif (!test_hamFound || !test_spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified test directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\t// Print out the number of messages in ham and in spam\r\n\t\t//\t\tSystem.out.println( \"\\t number of test ham messages is: \" + test_listing_ham.length );\r\n\t\t//\t\tSystem.out.println( \"\\t number of test spam messages is: \" + test_listing_spam.length );\r\n\r\n\r\n\t\t//\t\tmetrics\r\n\t\tint true_positives = 0; //spam classified as spam\r\n\t\tint true_negatives = 0; //ham classified as ham\r\n\t\tint false_positives = 0; //ham ... as spam\r\n\t\tint false_negatives = 0; //spam... as ham\r\n\r\n\t\t// Test starts\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < test_listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) false_positives ++;\r\n\t\t\telse true_negatives ++;\r\n\t\t}\r\n\r\n\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < test_listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\t\t\t\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) true_positives ++;\r\n\t\t\telse false_negatives ++;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Result 2: \");\r\n\t\tSystem.out.println(\"Lower-case\\t\\ttrue spam\\ttrue ham\");\r\n\t\tSystem.out.println(\"Classified spam:\\t\"+true_positives+\"\\t\\t\"+false_positives);\r\n\t\tSystem.out.println(\"Classified ham: \\t\"+false_negatives+\"\\t\\t\"+ true_negatives);\r\n\t\tSystem.out.println(\"\");\r\n\r\n\t\t\t}", "private int getSimlarityScore(String s1, String s2) {\r\n\t\tint match = 1;\r\n\t\tint mismatch = -1;\r\n\t\tint gap = -2;\r\n\t\tNeedlemanWunsch algorithm = new NeedlemanWunsch();\r\n\t\tBasicScoringScheme scoring = new BasicScoringScheme(match, mismatch, gap);\r\n\t\talgorithm.setScoringScheme(scoring);\r\n\t\talgorithm.loadSequences(s1, s2);\r\n\t\t\r\n\t\tint score = INT_MAX;\r\n\t\ttry {\r\n\t\t\tscore = algorithm.getScore();\r\n\t\t\t//System.out.println(algorithm.getPairwiseAlignment().getGappedSequence1());\r\n\t\t\t//System.out.println(algorithm.getPairwiseAlignment().getGappedSequence2());\r\n\t\t\t//System.out.println(algorithm.getPairwiseAlignment());\r\n\t\t} catch (IncompatibleScoringSchemeException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\tif (score < 0) {\r\n\t\t\tscore = 0;\r\n\t\t}\r\n\t\treturn score;\r\n\t}", "private List<SimilarNode> astCCImplmentation(HashMap<ASTNode, NodeInfo> fileNodeMap1, HashMap<ASTNode, NodeInfo> fileNodeMap2) {\n TreeMap<Integer, List<NodeInfo>> treeMap1 = convertToTreeMap(fileNodeMap1);\n TreeMap<Integer, List<NodeInfo>> treeMap2 = convertToTreeMap(fileNodeMap2);\n List<SimilarNode> result = new ArrayList<>();\n int[] array1 = getArray(treeMap1.keySet());\n int[] array2 = getArray(treeMap2.keySet());\n int i = 0;\n int j = 0;\n int sum = 0;\n while (i < array1.length && j < array2.length) {\n if (array1[i] == array2[j]) {\n // obtain list of nodeInfos for both and compare them if match found then add it to report\n List<NodeInfo> list1 = treeMap1.get(array1[i]);\n List<NodeInfo> list2 = treeMap2.get(array2[j]);\n for (NodeInfo nodeInfo1 : list1) {\n for (NodeInfo nodeInfo2 : list2) {\n if ((nodeInfo1.hashValue == nodeInfo2.hashValue) && (nodeInfo1.nodeType == nodeInfo2.nodeType)) {\n result.add(new SimilarNode(nodeInfo1, nodeInfo2));\n\n }\n }\n }\n i++;\n j++;\n\n } else if (array1[i] > array2[j]) {\n j++;\n } else if (array1[i] < array2[j]) {\n i++;\n }\n }\n return result;\n }", "private Node estimateRelevance(Node original) throws Exception {\n Node combineNode = new Node(\"combine\", new NodeParameters(), original.getInternalNodes(), original.getPosition());\n\n // Only get as many as we need\n Parameters localParameters = retrieval.getGlobalParameters().clone();\n int fbDocs = (int) retrieval.getGlobalParameters().get(\"fbDocs\", 10);\n localParameters.set(\"requested\", fbDocs);\n\n // transform and run\n Node transformedCombineNode = retrieval.transformQuery(combineNode, localParameters);\n List<ScoredDocument> initialResults = retrieval.executeQuery(transformedCombineNode, localParameters).scoredDocuments;\n \n // Gather content\n ArrayList<String> names = new ArrayList<String>();\n for (ScoredDocument sd : initialResults) {\n names.add(sd.documentName);\n }\n List<Document> docs = getDocuments(names);\n\n // Now the maps from the different information sources\n // Each of these is a term -> field -> score double-mapping\n HashMap<String, TObjectDoubleHashMap<String>> uCFSs = null;\n double ucfw = p.get(\"ucfw\", 1.0);\n if (ucfw != 0.0) {\n uCFSs = getUnigramCollFieldScores();\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> bCFSs = null;\n double bcfw = p.get(\"bcfw\", 1.0);\n if (bcfw != 0.0) {\n bCFSs = getBigramCollFieldScores();\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> uPRFSs = null;\n double uprfw = p.get(\"uprfw\", 1.0);\n if (uprfw != 0.0) {\n uPRFSs = getUnigramPRFScores(docs);\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> bPRFSs = null;\n double bprfw = p.get(\"bprfw\", 1.0);\n if (bprfw != 0.0) {\n bPRFSs = getBigramPRFScores(docs);\n }\n\n // We can now construct term-field weights using our supplied lambdas\n // and scores\n Node termNodes = new Node(\"combine\", new NodeParameters(), new ArrayList<Node>(), 0);\n termNodes.getNodeParameters().set(\"norm\", false);\n TObjectDoubleHashMap<String> weights = new TObjectDoubleHashMap<String>();\n for (String term : queryTerms) {\n weights.clear();\n for (String field : fields) {\n double sum = 0.0;\n if (uCFSs != null) {\n sum += (ucfw * uCFSs.get(term).get(field));\n }\n\n if (bCFSs != null) {\n TObjectDoubleHashMap<String> termMap = bCFSs.get(term);\n if (termMap != null) {\n sum += (bcfw * termMap.get(field));\n }\n }\n\n if (uPRFSs != null) {\n sum += (uprfw * uPRFSs.get(term).get(field));\n }\n\n if (bPRFSs != null) {\n TObjectDoubleHashMap<String> termMap = bPRFSs.get(term);\n if (termMap != null) {\n sum += (bprfw * termMap.get(field));\n }\n }\n weights.put(field, sum);\n }\n termNodes.addChild(createTermFieldNodes(term, weights));\n }\n return termNodes;\n }", "@Override\n public float customScore(int doc,\n float subQueryScore,\n float[] valSrcScores)\n throws IOException {\n float dl = this.context.reader().getNumericDocValues(\"TotalTerms\").get(doc);\n float dvl = this.context.reader().getNumericDocValues(\"UniqueTerms\").get(doc);\n float ent = this.context.reader().getNumericDocValues(\"Entropy\").get(doc);\n \n float qvl = QuerySearch.currentQuery.numTypes();\n\n \n float lmnorm = 0;\n \n if (SPUDLMSimilarity.method == SPUDLMSimilarity.dir){\n //LM Dirichlet \n \n lmnorm = (float) (Math.log(SPUDLMSimilarity.dir_mu / (dl + SPUDLMSimilarity.dir_mu)));\n }else if (SPUDLMSimilarity.method == SPUDLMSimilarity.spud){\n //spud\n double spud_mu = SPUDLMSimilarity.b0*SPUDLMSimilarity.omega/(1-SPUDLMSimilarity.omega);\n lmnorm = (float) (Math.log(spud_mu / (dvl + spud_mu)));\n \n }else{\n //default spud\n double spud_mu = SPUDLMSimilarity.b0*SPUDLMSimilarity.omega/(1-SPUDLMSimilarity.omega);\n lmnorm = (float) (Math.log(spud_mu / (dvl + spud_mu)));\n \n }\n \n \n return (subQueryScore + lmnorm );\n \n }", "@SuppressWarnings(\"unchecked\")\n\tpublic double calculateSimilarity(String tag1, String tag2) {\n\t\tHashMap<String, ArrayList<HashMap<String, HashSet<String>>>> userMap = db.getUserMap();\n\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\tfor(String user : userMap.keySet()){\n\t\t\n\t\t\tHashMap<String, HashSet<String>> tagsMap = userMap.get(user).get(1);\n\t\t\tint totalTags = tagsMap.keySet().size();\n\t\t\t\n\t\t\tif(null == tagsMap.get(tag1) || null == tagsMap.get(tag2))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tHashMap<String, HashSet<String>> resourcesMap = userMap.get(user).get(0);\n\t\t\t\n\t\t\tdouble userSimilarity = 0.0;\n\t\t\t\n\t\t\tfor(String resource : resourcesMap.keySet()){\n\t\t\t\tHashSet<String> tags = resourcesMap.get(resource);\n\t\t\t\t\n\t\t\t\tif(tags.contains(tag1) && tags.contains(tag2)){\n\t\t\t\t\tuserSimilarity += Math.log(\n\t\t\t\t\t\t\t( (double) tags.size() ) /\n\t\t\t\t\t\t\t( ( (double) totalTags ) + 1.0 )\n\t\t\t\t\t\t\t);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsimilarity += -userSimilarity;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn similarity; //rounding is necessary to match the results given at: www2009.org/proceedings/pdf/p641.pdf\n\t\t\n\t}", "public float CalculateSimilarity(int u, int v, boolean fromFile, int V) {\n\t\t\n\t\tfloat[] uRow = new float[V], vRow = new float[V];\n\t\t\n\t\tSystem.out.println(\"u=\"+u+\", v=\"+v+\", V=\"+V);\n\n\t\tif(fromFile) {\n\t\t\ttry {\n\n\t\t\t\tRandomAccessFile matrix = new RandomAccessFile(\"context-matrix.raf\", \"r\");\n\n\t\t\t\t// Get uRow\n\t\t\t\tmatrix.seek((long)u * (((long)V * 8) + 2));\n\t\t\t\tString uRowLine = matrix.readLine();\n//\t\t\t\tSystem.out.println(uRowLine);\n\t\t\t\tString[] uRowString = uRowLine.trim().split(\" \");\n\t\t\t\tfor(int i = 0; i < uRowString.length; i++) \n\t\t\t\t\tuRow[i] = Float.parseFloat(uRowString[i]);\n\t\t\t\t\n\t\t\t\t// Get vRow\n\t\t\t\tmatrix.seek((long)v * (((long)V * 8) + 2));\n\t\t\t\tString vRowLine = matrix.readLine();\n//\t\t\t\tSystem.out.println(vRowLine);\n\t\t\t\tString[] vRowString = vRowLine.trim().split(\" \");\n\t\t\t\tfor(int i = 0; i < vRowString.length; i++) \n\t\t\t\t\tvRow[i] = Float.parseFloat(vRowString[i]);\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\n\t\t\tif(this.TermContextMatrix_PPMI == null) \n\t\t\t\tSystem.out.println(\"PPMI term-context matrix is null.\");\n\t\t\t\n\t\t\tfloat[][] C = this.TermContextMatrix_PPMI;\n\t\t\tif(u != v && u < C.length && v < C.length) {\n\t\t\t\tuRow = C[u];\n\t\t\t\tvRow = C[v];\n\t\t\t} else {\n\t\t\t\treturn 0f;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\tfloat similarity = 0f;\n\t\t\n\t\ttry {\n\n\n\t\t\tfloat numerator = 0f;\n\t\t\tfor(int i = 0; i < V; i++) {\n\t\t\t\tnumerator += uRow[i] * vRow[i];\n\t\t\t}\n\t\t\t\n\t\t\tfloat uDenom = 0f;\n\t\t\tfor(int i = 0; i < uRow.length; i++) {\n\t\t\t\tuDenom += Math.pow(uRow[i], 2);\n\t\t\t}\n\t\t\tfloat vDenom = 0f;\n\t\t\tfor(int i = 0; i < vRow.length; i++) {\n\t\t\t\tvDenom += Math.pow(vRow[i], 2);\n\t\t\t}\n\t\t\t\n\t\t\tfloat denominator = (float) (Math.sqrt(uDenom) * Math.sqrt(vDenom));\n\t\t\t\n\t\t\tsimilarity = numerator / denominator;\n\n\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t\treturn similarity;\n\t}", "public static void main(String args[]) throws FileNotFoundException {\n\t\tSampling sampleCondition1 = new Sampling(\"src/tests/R2.txt\", \"src/tests/S2.txt\", 1, 1, \"4\", \"4\");\n\t\tSampling sampleCondition2 = new Sampling(\"src/tests/R2.txt\", \"src/tests/S2.txt\", 1, 1, \"4\", \"4\");\n\t\t\n\t\t\n\t\tSelectivityCalculator xo1 = new SelectivityCalculator();\n\t\tSelectivityCalculator xo2 = new SelectivityCalculator();\n\t\t\n\t\txo1.Calculator(sampleCondition1.SampleS);\n\t\txo2.Calculator(sampleCondition2.SampleS);\n\t\t\n\t\tdouble res1 = xo1.selectivityCalculator(sampleCondition1.SampleR, sampleCondition1.SampleS, 1);\n\t\tdouble res2 = xo2.selectivityCalculator(sampleCondition2.SampleR, sampleCondition2.SampleS, 2);\n\t\t\n\t\tSystem.out.println(res1);\n\t\tSystem.out.println(res2);\n//\t\tSystem.out.println(sample.SampleR.size());\n//\t\tSystem.out.println(value.size());\n//\t\tSystem.out.println(value.toString());\n\t}", "public ArrayList<WordMap> countWordOccurrences(String filePaths, WordMap corpus,\n Word.Polarity polarity) {\n\n Scanner sc1, sc2;\n ArrayList<WordMap> wordMaps = new ArrayList<WordMap>();\n\n // Where the training texts are located\n String subFolder;\n if (polarity == Word.Polarity.POSITIVE) subFolder = FOLDER_POSITIVE;\n else if (polarity == Word.Polarity.NEGATIVE) subFolder = FOLDER_NEGATIVE;\n else subFolder = FOLDER_NEUTRAL;\n\n try {\n String previousWord = \"\";\n\n sc1 = new Scanner(new File(filePaths));\n\n //For each training file\n while (sc1.hasNextLine()) {\n // Contains one filename per row\n String currentFile = FOLDER_TXT + subFolder + sc1.nextLine();\n\n sc2 = new Scanner(new File(currentFile));\n WordMap textMap = new WordMap(); // Map for this text\n\n while (sc2.hasNextLine()) {\n String[] words = sc2.nextLine().split(\" \");\n\n for (int j = 0; j < words.length; j++){\n //Replaces all characters which might cause us to miss the key\n String word = words[j].replaceAll(\"\\\\W\", \"\");\n\n //For each word, if it is in the WordMap increment the count\n if (corpus.has(word)) {\n // Store a new word if it has not been created\n if (!textMap.has(words[j])) {\n Word objWord = copyWord(corpus.get(word));\n textMap.put(word, objWord);\n }\n\n //If the words are negated, flip the count\n if (polarity == Word.Polarity.POSITIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountNegative(word);\n } else if (polarity == Word.Polarity.POSITIVE) {\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE &&\n negations.contains(previousWord)) { // Negate\n textMap.addCountPositive(word);\n } else if (polarity == Word.Polarity.NEGATIVE) {\n textMap.addCountNegative(word);\n } else { // Neutral, don't negate\n textMap.addCountNeutral(word);\n }\n }\n\n previousWord = word;\n }\n }\n\n wordMaps.add(textMap);\n\n sc2.close();\n }\n\n sc1.close();\n } catch (Exception e) {\n System.err.println(\"Error in countWordOccurences\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n return wordMaps;\n }", "public ConfidenceAlignment(String sgtFile,String tgsFile,String sgtLexFile,String tgsLexFile){\r\n\t\r\n\t\tLEX = new TranslationLEXICON(sgtLexFile,tgsLexFile);\r\n\t\t\r\n\t\tint sennum = 0;\r\n\t\tdouble score = 0.0;\r\n\t\t// Reading a GZIP file (SGT) \r\n\t\ttry { \r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader\r\n\t\t\t\t\t\t\t\t(new GZIPInputStream(new FileInputStream(sgtFile)),\"UTF8\"));\r\n\t\t\r\n\t\tString one = \"\"; String two =\"\"; String three=\"\"; \r\n\t\twhile((one=br.readLine())!=null){\r\n\t\t\ttwo = br.readLine(); \r\n\t\t\tthree=br.readLine(); \r\n\r\n\t\t\tMatcher m1 = scorepattern.matcher(one);\r\n\t\t\tif (m1.find()) \r\n\t\t\t{\r\n\t\t\t\tscore = Double.parseDouble(m1.group(1));\r\n\t\t\t\t//System.err.println(\"Score:\"+score);\r\n\t\t\t}\r\n\r\n\t\t\tgizaSGT.put(sennum,score); \r\n\t\t\tsennum++;\r\n\t\t}\r\n\t\tbr.close();\r\n\t\tSystem.err.println(\"Loaded \"+sennum+ \" sens from SGT file:\"+sgtFile);\r\n\t\t\r\n\t\t// Reading a GZIP file (TGS)\r\n\t\tsennum = 0; \r\n\t\tbr = new BufferedReader(new InputStreamReader\r\n\t\t\t\t\t\t\t\t(new GZIPInputStream(new FileInputStream(tgsFile)),\"UTF8\")); \r\n\t\twhile((one=br.readLine())!=null){\r\n\t\t\ttwo = br.readLine(); \r\n\t\t\tthree=br.readLine(); \r\n\t\t\t\r\n\t\t\tMatcher m1 = scorepattern.matcher(one);\r\n\t\t\tif (m1.find()) \r\n\t\t\t{\r\n\t\t\t\tscore = Double.parseDouble(m1.group(1));\r\n\t\t\t\t//System.err.println(\"Score:\"+score);\r\n\t\t\t}\r\n\t\t\tgizaTGS.put(sennum,score); \r\n\t\t\tsennum++;\r\n\t\t}\r\n\t\tbr.close();\t\t\r\n\t\t}catch(Exception e){}\r\n\t\tSystem.err.println(\"Loaded \"+sennum+ \" sens from SGT file:\"+sgtFile);\t\r\n\t}", "public static void demo_SimilarityMetrics(RoWordNet RoWN, String textCorpus_FilePath) throws Exception {\n boolean allowAllRelations = true;\n\n Literal l1 = new Literal(\"salvare\");\n Literal l2 = new Literal(\"dotare\");\n String id1 = RoWN.getSynsetsFromLiteral(l1).get(0).getId();\n String id2 = RoWN.getSynsetsFromLiteral(l2).get(0).getId();\n Synset s1, s2;\n\n s1 = RoWN.getSynsetById(id1);\n s2 = RoWN.getSynsetById(id2);\n\n IO.outln(\"Computed IC for synset_1: \" + s1.getInformationContent());\n IO.outln(\"Computed IC for synset_2: \" + s2.getInformationContent());\n IO.outln(\"Custom distance: \" + SimilarityMetrics.distance(RoWN, s1\n .getId(), s2.getId(), true, null));\n IO.outln(\"Custom hypernymy distance: \" + SimilarityMetrics\n .distance(RoWN, s1.getId(), s2.getId()));\n\n IO.outln(\"Sim Resnik: \" + SimilarityMetrics.Resnik(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim Lin: \" + SimilarityMetrics.Lin(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim JCN: \" + SimilarityMetrics.JiangConrath(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Dist JCN: \" + SimilarityMetrics\n .JiangConrath_distance(RoWN, s1.getId(), s2.getId(), allowAllRelations));\n }", "void calcScore() {\n\t\t\tMat points = new Mat(nodes.size(),2,CvType.CV_32FC1);\n\t\t\tMat line = new Mat(4,1,CvType.CV_32FC1);\n\n\t\t\tif(nodes.size() > 2) {\n\t\t\t\t// We know for sure here that the size() is at least 3\n\t\t\t\tfor(int i = 0; i < nodes.size(); i++) {\n\t\t\t\t\tpoints.put(i, 0, nodes.get(i).x);\n\t\t\t\t\tpoints.put(i, 1, nodes.get(i).y);\n\t\t\t\t}\n\t\n\t\t\t\tImgproc.fitLine(points, line, Imgproc.CV_DIST_L2, 0, 0.01, 0.01);\n\t\t\t\tPoint2 lineNormale = new Point2(line.get(0, 0)[0], line.get(1, 0)[0]);\n\t\t\t\tPoint2 linePoint = new Point2(line.get(2, 0)[0], line.get(3, 0)[0]);\n\t\n\t\t\t\tscore = 0;\n\t\t\t\tdouble totalLength = 0;\n\t\t\t\tdouble[] lengths = new double[nodes.size() - 1];\n\t\t\t\tfor(int i = 0; i < nodes.size(); i++) {\n\t\t\t\t\t// First score is the distance from each point to the fitted line\n\t\t\t\t\t// We normalize the distances by the base size so the size doesn't matter\n\t\t\t\t\tscore += Math.abs(nodes.get(i).distanceToLine(linePoint, lineNormale) / base().norm());\n\t\t\t\t\tif(i > 0) {\n\t\t\t\t\t\t// Then the collinearity of the steps with the base\n\t\t\t\t\t\t// That is cosine -> 1.0, where cosine = a dot b / |a|*|b|\n\t\t\t\t\t\tPoint2 step = nodes.get(i).minus(nodes.get(i-1));\n\t\t\t\t\t\tdouble dotProduct = step.dot(base());\n\t\t\t\t\t\tscore += Math.abs(dotProduct/(base().norm()*step.norm()) - 1);\n\t\t\t\t\t\ttotalLength += step.norm();\n\t\t\t\t\t\tlengths[i-1] = step.norm();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Normalize by the number of nodes so the shorter sequences don't have advantage\n\t\t\t\tscore /= nodes.size();\n\t\t\t\t// Add scores (penalties) for missing nodes\n\t\t\t\t// If we divide the total length by the expected number of steps\n\t\t\t\t// the result should be close to the length of the majority of the visible steps \n\t\t\t\tArrays.sort(lengths);\n\t\t\t\tdouble median = lengths.length % 2 == 0\n\t\t\t\t\t\t? (lengths[nodes.size()/2] + lengths[nodes.size()/2-1]) / 2\n\t\t\t\t\t\t: lengths[nodes.size()/2];\n\t\t\t\tscore += Math.abs(median - totalLength/(maxNodes-1)) / median;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Two or less nodes is not a chain. So give it the worst score possible \n\t\t\t\tscore = Double.MAX_VALUE;\n\t\t\t}\n\t\t}", "private void getAccuracy() throws IOException {\r\n\t\tFile accuracy = new File(\".\" + _fileName + \"_\" + _level);\r\n\t\tif (! accuracy.exists()) {\r\n\t\t\taccuracy.createNewFile();\r\n\t\t} else {\r\n\r\n\t\t\tFileReader fr = new FileReader(accuracy);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\tString str;\r\n\t\t\tstr = br.readLine();\r\n\t\t\t_attempts = Integer.parseInt(str);\r\n\t\t\tstr = br.readLine();\r\n\t\t\t_fails = Integer.parseInt(str);\r\n\t\t\tstr = br.readLine();\r\n\t\t\t_highScore = Integer.parseInt(str);\r\n\r\n\t\t}\r\n\t}", "@Override\r\n public double Score(int[] leftDist, int[] rightDist) {\r\n return leftDist[Utils.maxIndex(leftDist)] + rightDist[Utils.maxIndex(rightDist)];\r\n }", "public static void main( String args[] ) throws Exception\n\t{\n\t\t\tBufferedReader infile = new BufferedReader( new FileReader( \"ExamScores.txt\" ) );\n\n\t\t\t// you declare all needed ArrayLists and other variables from here on.\n\t\t\tArrayList<String> lines = new ArrayList<String>();\n\n\t\t\tSystem.out.println(\"\\nSTEP #1: 50%\"); // 50%\n\t\t\twhile (infile.ready()) {\n\t\t\t\tString line = infile.readLine();\n\t\t\t\tSystem.out.println(line);\n\t\t\t\tlines.add(line);\n\t\t\t}\n\t\t\tinfile.close();\n\n\n\t\t\tSystem.out.println(\"\\nSTEP #2: 25%\"); // 75 %\n\t\t\tCollections.sort(lines);\n\t\t\tfor (String s: lines)\n\t\t\t\tSystem.out.println(s);\n\n\t\t\tSystem.out.println(\"\\nSTEP #3: 10%\"); // 85%\n\n\t\t\tTreeMap<String, ArrayList<Integer>> st2sc = new TreeMap<String, ArrayList<Integer>>();\n\t\t\tTreeMap<Double, String> ave2st = new TreeMap<Double, String>();\n\t\t\tint[] sum = new int[lines.get(0).split(\"\\\\s+\").length-1];\n\t\t\t\n\t\t\tinfile = new BufferedReader ( new FileReader(\"query.txt\") );\n\t\t\tString[] queryS= infile.readLine().split(\" \");\n\t\t\tint[] query = new int[queryS.length];\n\t\t\tfor (int i=0; i<queryS.length; i++)\n\t\t\t\tquery[i]=Integer.parseInt(queryS[i]);\n\t\t\tfor (String s: lines)\n\t\t\t{\t\n\t\t\t\tdouble sumq = 0;\n\t\t\t\tdouble aveq = 0;\n\t\t\t\tString[] tokens = s.split(\"\\\\s+\");\n\t\t\t\tArrayList<Integer> scores = new ArrayList<Integer>();\n\t\t\t\tfor (int t=1; t<tokens.length; t++){\n\t\t\t\t\tscores.add(Integer.parseInt(tokens[t]));\n\t\t\t\t}\n\t\t\t\tst2sc.put(tokens[0], scores);\n\t\t\t\tfor (int q: query)\n\t\t\t\t\tsumq += Integer.parseInt(tokens[q]);\n\t\t\t\tfor (int nth = 0; nth<sum.length; nth++){\n\t\t\t\t\tsum[nth]+= Integer.parseInt(tokens[nth+1]);\n\t\t\t\t}\n\t\t\t\taveq = sumq/3;\n\t\t\t\tave2st.put(aveq, tokens[0]);\n\t\t\t}\n\t\t\tfor (double f: ave2st.keySet())\n\t\t\t\tSystem.out.printf(ave2st.get(f)+\" \"+\"%.2f\\n\", f);\n\n\t\t\tSystem.out.println(\"\\nSTEP #4: 15%\"); // 100%\n\t\t\t\n\t\t\tint lowest = sum[0];\n\t\t\tint which = 0;\n\t\t\tfor (int i=1; i<sum.length; i++)\n\t\t\t{\n\t\t\t\tif (sum[i]<lowest)\n\t\t\t\t{\n\t\t\t\t\tlowest = sum[i];\n\t\t\t\t\twhich = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"exam\"+(which+1)+\" had the lowest average\");\n\n\n\t}", "private void mapSortedFiles(String file1, String file2) {\n\t\tString file1Copy = tempPath + tempFileName.getTempFileName(sourcePath1, \"Mapper\");\r\n\t\tString file2Copy = tempPath + tempFileName.getTempFileName(sourcePath2, \"Mapper\");\r\n\r\n\t\tcreateFileCopy(new File(file1).toPath(), file1Copy);\r\n\t\tcreateFileCopy(new File(file2).toPath(), file2Copy);\r\n\r\n\t\ttry {\r\n\t\t\tLineIterator file1Iterator = FileUtils.lineIterator(new File(file1));\r\n\r\n\t\t\tLineIterator file2Iterator = FileUtils.lineIterator(new File(file2));\r\n\r\n\t\t\tint leftIndex = 0;\r\n\t\t\tint rightIndex = 0;\r\n\r\n\t\t\twhile (file1Iterator.hasNext()) {\r\n\r\n\t\t\t\tString left = file1Iterator.nextLine();\r\n\t\t\t\tString right = file2Iterator.nextLine();\r\n\r\n\t\t\t\tString leftSortKey = getSortKey(left);\r\n\t\t\t\tString rightSortKey = getSortKey(right);\r\n\t\t\t\t\r\n\t\t\t\tleftIndex++;\r\n\t\t\t\trightIndex++;\r\n\t\t\t\t\r\n\r\n\t\t\t\twhile (leftSortKey.compareTo(rightSortKey) > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(leftSortKey +\", \" + rightSortKey);\r\n\r\n\t\t\t\t\tList<String> lines = Files.readAllLines(Paths.get(file1Copy));\r\n\t\t\t\t\tlines.add(leftIndex-1, getEmptyLine());\r\n\t\t\t\t\tFiles.write(Paths.get(file1Copy), lines);\r\n\r\n\t\t\t\t\trightIndex++;\r\n\t\t\t\t\tright = file2Iterator.nextLine();\r\n\t\t\t\t\trightSortKey = getSortKey(right);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\twhile (leftSortKey.compareTo(rightSortKey) < 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//System.out.println(leftSortKey +\", \" + rightSortKey);\r\n\r\n\t\t\t\t\tList<String> lines = Files.readAllLines(Paths.get(file2Copy));\r\n\t\t\t\t\tlines.add(rightIndex-1, getEmptyLine());\r\n\t\t\t\t\tFiles.write(Paths.get(file2Copy), lines);\r\n\r\n\t\t\t\t\tleftIndex++;\r\n\t\t\t\t\tleft = file1Iterator.nextLine();\r\n\t\t\t\t\tleftSortKey = getSortKey(left);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Temp file was not found: \" + e.getMessage());\r\n\t\t}\r\n\r\n\t}", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "public void compareFiles() {\n\t \n\t\tprepareLinesFile(fileName1, linesFile1);\n\t\tprepareLinesFile(fileName2, linesFile2);\n\t\t\n\t\t//If both files have the same number of lines then we compare each line\n\t if (linesFile1.size() == linesFile2.size()) {\n\t \t \tfor (int i = 0; i < linesFile1.size(); i++) {\n\t \t\tcompareLines(i);\t\t\t\t\n\t\t\t}\n\t }\n\t \n\t //Otherwise\n\t else {\n\t \t//We distinguish the files by their number of lines\n\t \tfinal ArrayList<String> linesLongerFile;\n\t \tfinal ArrayList<String> linesShorterFile;\n\t \t\n\t \t\n\t \tif (linesFile1.size() > linesFile2.size()) {\n\t \t\tlinesLongerFile = linesFile1;\n\t \t\tlinesShorterFile = linesFile2;\n\t \t}\n\t \t\n\t \telse {\n\t \t\tlinesLongerFile = linesFile2;\n\t \t\tlinesShorterFile = linesFile1;\n\t \t}\n\t \t\n\t \tint counter = 0;\n\t \t//We compare each line a number of times equals to the number of the shortest file lines\n\t \tfor (int i = 0; i < linesShorterFile.size(); i++) {\n\t \t\tcompareLines(i);\n\t \t\tcounter = i;\n\t \t}\n\t \t\n\t \t//We show the remaining lines to add into the first file\n\t \tfor (int i = counter+1; i < linesLongerFile.size(); i++) {\n\t \t\t\n\t \t\t//If the second file is the longest then we show the remaining lines to add into the first file\n\t \t\tif (linesLongerFile.size() == linesFile2.size()) {\n\t \t\t\tSystem.out.println(\"+ \"+linesLongerFile.get(i));\n\t \t\t}\n\t \t\t\n\t \t\t//If the first file is the longest then we show the remaining lines to delete \n\t \t\telse {\n\t \t\t\tSystem.out.println(\"- \"+linesLongerFile.get(i));\n\t \t\t}\n\t \t\t\n\t \t}\n\t }\t\t\n\t}", "private static double intraClusterScore(List<String> arg1, List<String> arg2) {\n\t\t// compare each elements from argList1 vs argList2\n\n\t\tPair<String, String> pair = null;\n\t\tdouble tempScore = 0;\n\t\tdouble maxScore = 0;\n\n\t\tfor (int list1Id = 0; list1Id < arg1.size(); list1Id++) {\n\t\t\tfor (int list2Id = 0; list2Id < arg2.size(); list2Id++) {\n\n\t\t\t\t// create a pair\n\t\t\t\tpair = new ImmutablePair<String, String>(arg1.get(list1Id)\n\t\t\t\t\t\t.trim(), arg2.get(list2Id).trim());\n\n\t\t\t\ttry {\n\t\t\t\t\t// retrieve the key from the collection\n\t\t\t\t\ttempScore = SCORE_MAP.get(pair);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpair = new ImmutablePair<String, String>(arg2.get(\n\t\t\t\t\t\t\t\tlist2Id).trim(), arg1.get(list1Id).trim());\n\t\t\t\t\t\ttempScore = SCORE_MAP.get(pair);\n\n\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\ttempScore = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// System.out.println(\" temp score = \" + tempScore);\n\t\t\t\tmaxScore = (tempScore > maxScore) ? tempScore : maxScore;\n\t\t\t}\n\t\t}\n\n\t\t// System.out.println(\"max = \" + maxScore);\n\t\treturn maxScore;\n\t}", "private void updateAccuracy() throws IOException {\r\n\t\tFile accuracy = new File(\".\" + _fileName + \"_\" + _level);\r\n\r\n\t\tPrintWriter pw = new PrintWriter(accuracy);\r\n\t\tpw.close();\r\n\r\n\t\tFileWriter fw = new FileWriter(accuracy);\r\n\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\r\n\t\tbw.write(_attempts + \"\\n\");\r\n\t\tbw.write(_fails + \"\\n\");\r\n\t\tbw.write(_highScore + \"\\n\");\r\n\t\tbw.close();\r\n\t}", "protected void calculateAccuracyOfTestFile( double threshold, String test_file_name ) throws FileNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile test_file = new File( test_file_name );\n\t\t\tScanner in;\n\t\t\tString[] tokens;\n\t\t\tint total_tokens = 0, total_matched = 0, n, result;\n\t\t\tdouble sum;\n\t\t\tAttribute temp;\n\n\t\t\tin = new Scanner( test_file );\n\t\t\tin.nextLine();\n\n\t\t\twhile ( in.hasNextLine() )\n\t\t\t{\n\t\t\t\ttokens = in.nextLine().trim().split( \"\\\\s+\" );\n\t\t\t\tn = tokens.length;\n\t\t\t\tif ( n > 1 )\n\t\t\t\t{\n\t\t\t\t\ttemp = this.attribute_list.get( 0 );\n\t\t\t\t\tsum = temp.getWeigth();\n\n\t\t\t\t\tfor ( int i = 1; i < n; i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\ttemp = this.attribute_list.get( i );\n\t\t\t\t\t\tsum += Integer.parseInt( tokens[ i - 1 ] ) * temp.getWeigth();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( sum < threshold )\n\t\t\t\t\t\tresult = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tresult = 1;\n\n\t\t\t\t\tif ( Integer.parseInt( tokens[ n - 1 ] ) == result )\n\t\t\t\t\t\ttotal_matched++;\n\n\t\t\t\t\ttotal_tokens++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tDecimalFormat df = new DecimalFormat( \"#.##\" );\n\t\t\tSystem.out.println( \"Accuracy of test data ( \" + total_tokens + \" instances ) = \" + df.format( total_matched * 100.00 / total_tokens ) );\n\n\t\t\tin.close();\n\t\t}\n\t\tcatch ( FileNotFoundException e )\n\t\t{\n\t\t\tSystem.out.println( \"Cannot find test file - \" + test_file_name );\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\r\n\tpublic final float getSimilarity(final String string1, final String string2) {\r\n //split the strings into tokens for comparison\r\n final ArrayList<String> str1Tokens = this.tokeniser.tokenizeToArrayList(string1);\r\n final ArrayList<String> str2Tokens = this.tokeniser.tokenizeToArrayList(string2);\r\n \r\n if (str1Tokens.size() == 0){\r\n \treturn 0.0f;\r\n }\r\n\r\n float sumMatches = 0.0f;\r\n float maxFound;\r\n for (Object str1Token : str1Tokens) {\r\n maxFound = 0.0f;\r\n for (Object str2Token : str2Tokens) {\r\n final float found = this.internalStringMetric.getSimilarity((String) str1Token, (String) str2Token);\r\n if (found > maxFound) {\r\n maxFound = found;\r\n }\r\n }\r\n sumMatches += maxFound;\r\n }\r\n return sumMatches / str1Tokens.size();\r\n }", "public ConScores getConScores() {\n\t\tint inheritedLevel = getLevel(subNetGenes, globalLevelFile,\n\t\t\t\tinheritedLocalLevelFile);\n\t\t// Now we can calculate the zscores on that inheritedLocalLevelFile.\n\n\t\tZScore zscoreInherited = new ZScore(subNetFile,\n\t\t\t\tinheritedLocalLevelFile, penaltyType);\n\t\tScores scoreInherited = zscoreInherited.getZScore(totalGraphs,\n\t\t\t\tpenaltyType);\n\n\t\t/* local the global level */\n\t\tHPNUlilities.createLevelFile(codePath, subNetFile, inheritedLevel,\n\t\t\t\tcalculateLocalLevelFile, penaltyType, partitionSize);\n\n\t\t/* get the global ZScore and penalty */\n\n\t\tZScore zscoreCalculated = new ZScore(subNetFile,\n\t\t\t\tcalculateLocalLevelFile, penaltyType);\n\t\tScores scoreCalculated = zscoreCalculated.getZScore(totalGraphs,\n\t\t\t\tpenaltyType);\n\n\t\tPrintWriter out = null;\n\t\ttry {\n\t\t\tout = new PrintWriter(new FileWriter(outFile));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tConScores score = new ConScores(scoreInherited.getZScore(),\n\t\t\t\tscoreInherited.getPenalty(), scoreCalculated.getZScore(),\n\t\t\t\tscoreCalculated.getPenalty());\n\n\t\tout.println(\"zScoreInherited: \" + score.zScoreInherited\n\t\t\t\t+ \" penaltyInherited: \" + score.penaltyInherited\n\t\t\t\t+ \" zScorecalculated: \" + score.zScorecalculated\n\t\t\t\t+ \" penaltyCalculated: \" + score.penaltyCalculated);\n\n\t\tout.close();\n\n\t\treturn score;\n\n\t}", "public static float calcSimilarity(Map<String, Enum> first, Map<String, Enum> second) {\n if (first == null && second == null) return 1f;\n Set<String> allKeys = new HashSet<>();\n\n if (first != null) allKeys.addAll(first.keySet());\n if (second != null) allKeys.addAll(second.keySet());\n\n int normDiv = 0;\n float sum = 0;\n for (String key : allKeys) {\n Enum thisEnum = first != null ? first.get(key) : null;\n Enum otherEnum = second != null ? second.get(key) : null;\n PhAttribType phA = getAllPhAttribTypes().get(key);\n try {\n sum += phA.calcSimilarity(thisEnum, otherEnum) * phA.getWeight();\n normDiv++;\n } catch (AttribTypeNotComparableException ncE) {\n System.err.println(\"NotComparableException: \" + ncE);\n }\n }\n if (sum == 0) return 0;\n return sum / normDiv;\n }", "public double approximateJaccard(String file1, String file2) {\r\n\t\tint file1Col=-1,file2Col=-1;\r\n\t\tdouble count = 0;\r\n\t\tfor (int i = 0; i < docarray.length; i++)\r\n\t\t{\r\n\t\t\tif (docarray[i].equals(file1)) \r\n\t\t\t\tfile1Col = i;\r\n\t\t\tif (docarray[i].equals(file2)) \r\n\t\t\t\tfile2Col = i;\r\n\t\t}\r\n\t\tfor (int i = 0; i < numPermutations; i++) \r\n\t\t{\r\n\t\t\tif (minHash[i][file1Col] == minHash[i][file2Col])\r\n\t\t\t\tcount = count + 1;\r\n\t\t}\r\n\t\treturn count / numPermutations;\r\n\t}", "public static int score(String first, String second) {\n Set<String> s1 = splitIntoBigrams(first);\n Set<String> s2 = splitIntoBigrams(second);\n\n // Get the number of elements in each set.\n int n1 = s1.size();\n int n2 = s2.size();\n\n // Find the intersection, and get the number of elements in that set.\n s1.retainAll(s2);\n int nt = s1.size();\n\n\n // The coefficient is:\n //\n // 2 ∙ | s1 ⋂ s2 |\n // D = ----------------------\n // | s1 | + | s2 |\n //\n double out = (2.0 * (double)nt) / ((double)(n1 + n2));\n out = (out + scoreReverse(first, second)) / 2;\n return (int)(Math.abs(out - 1) * 10);\n\n }", "@Override\n\tpublic ComparisonResult computeDifference() throws Exception {\n\t\t\n\t\tList<Token> tokens1 = file1.getTokens();\n\t\tList<Token> tokens2 = file2.getTokens();\n\t\t\n\t\t\n\t\tif (tokens1.size() == 0 || tokens2.size() == 0)\n\t\t\treturn new ComparisonResult(null, 0);\n\t\t\n\t\tQGramToken qGram1 = (QGramToken) new QGramTokenContainer(tokens1, tokens1.size()).get(0);\n\t\tQGramToken qGram2 = (QGramToken) new QGramTokenContainer(tokens2, tokens2.size()).get(0);\n\t\t\n\t\t// peut être négatif si les deux fichiers ont un taux d'alignement des tokens supérieur au nombre total de token.\n\t\tdouble val = qGram1.needlemanWunschAlignment(qGram2, -1) / (double) Math.max(qGram1.size(), qGram2.size());\n\t\t\n\t\treturn new ComparisonResult((val > heuristicPlagiatThreshold) ? (Boolean)true : val <= 0 ? false : null, val < 0 ? 0 : val);\n\t}", "public void rank(List<String> modelFiles, List<String> testFiles, String indriRanking) {\n/* 1377 */ int nFold = modelFiles.size();\n/* */ \n/* */ try {\n/* 1380 */ BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(indriRanking), \"UTF-8\"));\n/* */ \n/* 1382 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* */ \n/* 1385 */ List<RankList> test = readInput(testFiles.get(f));\n/* 1386 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1387 */ int[] features = ranker.getFeatures();\n/* */ \n/* 1389 */ if (normalize) {\n/* 1390 */ normalize(test, features);\n/* */ }\n/* 1392 */ for (RankList l : test) {\n/* 1393 */ double[] scores = new double[l.size()];\n/* */ \n/* 1395 */ for (int j = 0; j < l.size(); j++) {\n/* 1396 */ scores[j] = ranker.eval(l.get(j));\n/* */ }\n/* 1398 */ int[] idx = MergeSorter.sort(scores, false);\n/* */ \n/* 1400 */ for (int i = 0; i < idx.length; i++) {\n/* 1401 */ int k = idx[i];\n/* 1402 */ String str = l.getID() + \" Q0 \" + l.get(k).getDescription().replace(\"#\", \"\").trim() + \" \" + (i + 1) + \" \" + SimpleMath.round(scores[k], 5) + \" indri\";\n/* 1403 */ out.write(str);\n/* 1404 */ out.newLine();\n/* */ } \n/* */ } \n/* */ } \n/* 1408 */ out.close();\n/* */ }\n/* 1410 */ catch (IOException ex) {\n/* */ \n/* 1412 */ throw RankLibError.create(\"Error in Evaluator::rank(): \", ex);\n/* */ } \n/* */ }", "protected abstract void calcScores();", "private void scoring(NameInfo name1Info, NameInfo name2Info, int flag) {\n\t\tString name1 = name1Info.getName();\n\t\tString name2 = name2Info.getName();\n\t\tString type1 = name1Info.getType();\n\t\tString type2 = name2Info.getType();\n\t\tif (name1.length() == 0 || name2.length() == 0) {\n\t\t\tscore = 0.0f;\n\t\t\tscoreShingle = 0.0f;\n\t\t\treason = \"There is an empty name.\";\n\t\t\treturn;\n\t\t}\n\t\tswitch (flag) {\n\t\t\n\t\tcase 1: // PER\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tfloat scorePER = getPERScore(name1Info, name2Info);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric\";\n\t\t\tif (score < scorePER) {\n\t\t\t\tscore = scorePER;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 2: // LOC\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tscore = shortMan.scoring(name1, name2);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\tfloat countryLangScore = countryMan.scoring(name1, name2);\n\t\t\tif (score < countryLangScore) {\n\t\t\t\tscore = countryLangScore;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Country-Language list.\";\n\t\t\t\tif (score < scoreShingle) {\n\t\t\t\t\tscore = scoreShingle;\n\t\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 3: // ORG\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tscore = acroMan.scoring(name1Info, name2Info);\n\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\tif (scoreShingle > score) {\n\t\t\t\tscore = scoreShingle;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 4: // GEN\n\t\t\tscoreShingle = (float)LSHUtils.dice(name1, name2);\n\t\t\tfloat scorePer = getPERScore(name1Info, name2Info);\n\t\t\tfloat scoreShort = shortMan.scoring(name1, name2);\n\t\t\tfloat scoreCL = countryMan.scoring(name1, name2);\n\t\t\tfloat scoreAcro = acroMan.scoring(name1Info, name2Info);\n\t\t\tif (scoreAcro > score) {\n\t\t\t\tscore = scoreAcro;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t}\n\t\t\tif (scoreCL > score) {\n\t\t\t\tscore = scoreCL;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Country-Language list.\";\n\t\t\t}\n\t\t\tif (scoreShort > score) {\n\t\t\t\tscore = scoreShort;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\t}\n\t\t\tif (scorePer > score) {\n\t\t\t\tscore = scorePer;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric\";\n\t\t\t}\n\t\t\tif (scoreShingle > score) {\n\t\t\t\tscore = scoreShingle;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by Shingling\";\n\t\t\t}\n\t\t\tif (acroMan.isSpecificCase()) {\n\t\t\t\tscore = scoreAcro;\n\t\t\t\treason = \"Type: \" + name1Info.getType() + \". metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 5: // Two different types\n\t\t\tif (type1.equals(\"PER\") || type2.equals(\"PER\")) {\n\t\t\t\tscore = 0.0f;\n\t\t\t\treason = \"Type: \" + type1 + \". and \" + type2 + \". cannot be compared\";\n\t\t\t} else if (type1.equals(\"LOC\") || type2.equals(\"LOC\")) {\n\t\t\t\tscore = shortMan.scoring(name1, name2);\n\t\t\t\treason = \"Type: LOC. metric; Scored by JaroWinkler metric with Shortcut.\";\n\t\t\t} else if (type1.equals(\"ORG\") || type2.equals(\"ORG\")) {\n\t\t\t\tfloat orgScore = acroMan.scoring(name1Info, name2Info);\n\t\t\t\tif (score < orgScore) {\n\t\t\t\t\tscore = orgScore;\n\t\t\t\t\treason = \"Type: ORG. metric; Scored by JaroWinkler metric with Acronym.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tscore = 0.0f;\n\t\t\t\treason = \"Type: \" + type1 + \". and \" + type2 + \". cannot be compared\";\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tscore = 0.0f;\n\t\t\treason = \"#######SHOULD NOT HAPPEN#######\";\n\t\t}\n\t\tif (name1.equalsIgnoreCase(name2))\n\t\t\tscore = 1.0f;\n\t\tif (!name1Info.getType().equals(\"PER\") && !name2Info.getType().equals(\"PER\"))\n\t\t\thandleLargeRatio(name1, name2);\n\t}", "private static double scoreReverse(String first, String second) {\n Set<String> s1 = splitIntoBigrams(reverseString(first));\n Set<String> s2 = splitIntoBigrams(second);\n\n // Get the number of elements in each set.\n int n1 = s1.size();\n int n2 = s2.size();\n\n // Find the intersection, and get the number of elements in that set.\n s1.retainAll(s2);\n int nt = s1.size();\n\n\n // The coefficient is:\n //\n // 2 ∙ | s1 ⋂ s2 |\n // D = ----------------------\n // | s1 | + | s2 |\n //\n double out = (2.0 * (double)nt) / ((double)(n1 + n2));\n\n return out;\n }", "private void handleLargeRatio(String name1, String name2) {\n\t\tint n1 = name1.length();\n\t\tint n2 = name2.length();\n\t\tint longN = (n1 > n2) ? n1 : n2;\n\t\tint shortN = (n1 > n2) ? n2 : n1;\n\t\tfloat ratio = (float) shortN / (float) longN;\n\t\tif (ratio < RATIO_THRES)\n\t\t\tif (score != 1.0f) {\n\t\t\t\tscore = 0.0f;\n\t\t\t\tscoreShingle = 0.0f;\n\t\t\t\treason = \"Two names have a very large difference in length, and were not captured by other handlers.\";\n\t\t\t}\n\t}", "public SparseScoreMatrix(String fileName, int alignmentLimit)\r\n throws IOException\r\n {\r\n System.out.println(\"Reading sparse matrix.\");\r\n \r\n BufferedReader input = open_file(new File(fileName));\r\n if (input == null) \r\n throw new IOException(\"Could not open sparse matrix file \" + fileName); \r\n \r\n String line = read_a_line(input);\r\n StringTokenizer st = new StringTokenizer(line.substring(1), \"\\t\");\r\n \r\n this.names = new String[AGS_console.GD.size()];\r\n //this.matchNames = new ArrayList[GD.size()];\r\n this.matchIndexes = new ArrayList[AGS_console.GD.size()];\r\n this.scores = new ArrayList[AGS_console.GD.size()];\r\n \r\n for (int i=0; i<AGS_console.GD.size(); i++)\r\n {\r\n //this.matchNames[i] = new ArrayList<String>(alignmentLimit);\r\n this.matchIndexes[i] = new ArrayList<Integer>(alignmentLimit/3);\r\n this.scores[i] = new ArrayList<Integer>(alignmentLimit/3);\r\n }\r\n \r\n int count = 0;\r\n while (st.hasMoreTokens())\r\n {\r\n this.names[count] = st.nextToken();\r\n count++;\r\n }\r\n \r\n \r\n // Read line by line and fetch every score to list\t \r\n int row_count = 0;\r\n String nextHit = \"\";\r\n while (more_records(input))\r\n {\r\n line = read_a_line(input);\r\n if ((line.length()==0))\r\n {\r\n break;\r\n }\r\n st = new StringTokenizer(line, \"\\t\");\r\n \r\n int column_count = 0;\r\n while (st.hasMoreTokens())\r\n {\r\n nextHit = st.nextToken();\r\n //this.matchNames[row_count].add(nextHit);\r\n this.matchIndexes[row_count].add(AGS_console.GD.getGeneLocationByPreComputedIndex(nextHit));\r\n int nextNumber = Integer.parseInt(st.nextToken());\r\n this.scores[row_count].add(nextNumber);\r\n column_count++;\r\n }\r\n row_count++;\r\n }\r\n input.close();\r\n \r\n // Set ONLY self-scoring genes\r\n for (int i=0; i<this.matchIndexes.length; i++)\r\n {\r\n if (this.matchIndexes[i].size()<=1) // Scores only itself or (nothing--which should not happen)\r\n {\r\n AGS_console.GD.allGenes[i].noScoresFound = true;\r\n }\r\n } \r\n }", "@Override\n\tpublic void load(final String filePath) {\n\t\tsuper.load(filePath);\n\t\ttry {\n\t\t\tfinal JCL_facade jcl = JCL_FacadeImpl.getInstance();\n\t\t\tfinal Object2DoubleMap<String> distances = new Object2DoubleOpenHashMap<>();\n\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(filePath));\n\t\t\tString str = null;\n\n\t\t\tList<String> inputLimpos = new LinkedList<>();\n\n\t\t\tdouble lower = 0;\n\n\t\t\t// ler o arquivo\n\t\t\twhile ((str = in.readLine()) != null) {\n\t\t\t\tif (!str.trim().equals(\"EOF\")) {\n\t\t\t\t\tString[] inputDetalhes = str.split(\" \");\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tfor (final String frag : inputDetalhes) {\n\t\t\t\t\t\tif (!frag.equals(\"\")) {\n\t\t\t\t\t\t\tsb.append(frag + \":\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tinputLimpos.add(sb.toString());\n\t\t\t\t\tsb = null;\n\t\t\t\t\tinputDetalhes = null;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tin.close();\n\t\t\tin = null;\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tfinal ObjectSet<String> vertices = (ObjectSet<String>) jcl.getValue(\"vertices\").getCorrectResult();\n\n\t\t\tdouble lowest = Double.MAX_VALUE;\n\t\t\t/*\n\t\t\t * transitar todo projeto para DOUBLE tirar todos floats para que aceite o\n\t\t\t * permutation\n\t\t\t */\n\t\t\t// montando distancias\n\t\t\tfor (final String umaEntrada : inputLimpos) {\n\t\t\t\tString[] umaEntradaDetalhe = umaEntrada.split(\":\");\n\t\t\t\tdouble menorD = Double.MAX_VALUE;\n\t\t\t\tdouble maiorD = Double.MIN_VALUE;\n\t\t\t\tvertices.add(\"$\" + umaEntradaDetalhe[0] + \"$\");\n\t\t\t\tfor (final String outraEntrada : inputLimpos) {\n\t\t\t\t\tString[] outraEntradaDetalhe = outraEntrada.split(\":\");\n\t\t\t\t\tif (!umaEntradaDetalhe[0].equals(outraEntradaDetalhe[0])) {\n\t\t\t\t\t\tfinal double dx = (Double.parseDouble(outraEntradaDetalhe[1])\n\t\t\t\t\t\t\t\t- Double.parseDouble(umaEntradaDetalhe[1]));\n\t\t\t\t\t\tfinal double dy = (Double.parseDouble(outraEntradaDetalhe[2])\n\t\t\t\t\t\t\t\t- Double.parseDouble(umaEntradaDetalhe[2]));\n\n\t\t\t\t\t\tfinal double d = Math.hypot(dx, dy);\n\n\t\t\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$\" + outraEntradaDetalhe[0] + \"$\", d);\n\n\t\t\t\t\t\tif (d < menorD) {\n\t\t\t\t\t\t\tmenorD = d;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (d > maiorD) {\n\t\t\t\t\t\t\tmaiorD = d;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\toutraEntradaDetalhe = null;\n\t\t\t\t}\n\n\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$shorterD$\", menorD);\n\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$longerD$\", maiorD);\n\n\t\t\t\tlower += menorD;\n\t\t\t\tif (lowest > menorD) {\n\t\t\t\t\tlowest = menorD;\n\t\t\t\t}\n\n\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$X$\", Float.parseFloat(umaEntradaDetalhe[1]));\n\t\t\t\tdistances.put(\"$\" + umaEntradaDetalhe[0] + \"$:$Y$\", Float.parseFloat(umaEntradaDetalhe[2]));\n\t\t\t\tumaEntradaDetalhe = null;\n\t\t\t}\n\n\t\t\tlower += lowest;\n\n\t\t\tinputLimpos.clear();\n\t\t\tinputLimpos = null;\n\n\t\t\tjcl.instantiateGlobalVar(\"numOfVertices\", vertices.size());\n\n\t\t\tjcl.setValueUnlocking(\"vertices\", vertices);\n\n\t\t\tjcl.setValueUnlocking(\"lower\", lower);\n\n\t\t\tJcldataAccess.instantiateVarInJCL(\"distances\", distances);\n\n\t\t\tSystem.out.println(vertices.toString());\n\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void getInputFileData(){\n\t\t\t\n\t\t\t// editable fields\n\t\t\t\n\t\t\tString directDistanceFile = \"../data/direct_distance_1.txt\";\n\t\t\tString graphInputFile = \"../data/graph_input_1.txt\";\n\t\t\t\n\t\t\t\n\t\t\t// end of editable fields\n\t\t\t\n\t\t\t\n\t\t\tFile file1 = new File(directDistanceFile);\n\t\t\tFile file2 = new File(graphInputFile);\n\t\t\tfiles.add(file1);\n\t\t\tfiles.add(file2);\n\t\t\t\n\t\t\t/*// Directory where data files are\n\t\t\tPath dataPath = Paths.get(\"../data\");\n\t\t\t\n\t\t\tString path = dataPath.toAbsolutePath().toString();\n\t\t\t\n\t\t\tFile dir = new File (path);\n\t\t\t\t\t\n\t\t\tif (dir.listFiles() == null){\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"WARNING: No files found.\");\n\n\t\t\t} else if (dir.listFiles() != null && dir.listFiles().length == 2) {\n\t\t\n\t\t\t\tfor (File file : dir.listFiles()){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfiles.add(file.getName());\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}\n\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"WARNING: Data folder may only contain two files: direct_distance and\"\n\t\t\t\t\t\t+ \" graph_input. Please modify contents accordingly before proceeding for alorithm to execute.\");\n\t\t\t\t\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\tfor (File file: files){\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// store direct distances in a hashmap\n\t\t\t\t\tif (file.toString().contains(\"distance\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FileReader fileReader = new FileReader(dataPath.toString() + \"/\" + file);\n\t\t\t\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\t\t BufferedReader reader = new BufferedReader(fileReader);\n\t\t\t\t String line = null;\n\t\t\t\t \n\t\t\t\t while ((line = reader.readLine()) != null) {\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder num = new StringBuilder();\n\t\t\t\t \tStringBuilder str = new StringBuilder();\n\t\t\t\t \n\t\t\t\t \tfor(char c : line.toCharArray()){\n\t\t\t\t \t\t//find the distance\n\t\t\t\t if(Character.isDigit(c)){\n\t\t\t\t num.append(c);\n\t\t\t\t } \n\t\t\t\t //find the associated letter\n\t\t\t\t else if(Character.isLetter(c)){\n\t\t\t\t str.append(c); \n\t\t\t\t }\n\t\t\t\t \t}\n\t\t\t\t \t\n\t\t\t\t \t// add values into hashmap\n\t\t\t\t \tdistance.put(str.toString(), Integer.parseInt(num.toString()));\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t reader.close(); // close the reader\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(distance);\n\t\t\t\t \n\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t// store inputs in a \n\t\t\t\t\telse if (file.toString().contains(\"input\")){\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//FileReader fileReader = new FileReader(dataPath.toString() + \"/\" + file);\n\t\t\t\t\t\tFileReader fileReader = new FileReader(file);\n\t\t\t\t BufferedReader reader = new BufferedReader(fileReader);\n\t\t\t\t \n\t\t\t\t String line = null;\n\t\t\t\t \n\t\t\t\t int x=0; // keeps track of line to add\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t while ((line = reader.readLine()) != null) {\n\t\t\t\t \tString[] values = line.split(\"\\\\s+\");\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t if (matrix == null) {\n\t\t\t\t \t\t //instantiate matrix\n\t\t\t\t matrix = new String[widthOfArray = values.length]\n\t\t\t\t \t\t \t\t\t[lenghtOfArray = values.length];\n\t\t\t\t }\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t// add values into the matrix\n\t\t\t\t \tfor (int i=0; i < values.length; i++){\n\t\t\t\t \t\t\n\t\t\t\t \t\tmatrix[i][x] = values[i];\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t \t\n\t\t\t\t \tx++; // next line\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t reader.close(); // close the reader\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Store input combinations in a hashmap\n\t\t\t\t\tint y=1; \n\t\t\t\t\twhile (y < lenghtOfArray){\n\t\t\t\t\t\t\n\t\t\t\t\t\tinputNodes.add(matrix[0][y]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int i=1; i < widthOfArray; i++){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tStringBuilder str = new StringBuilder();\n\t\t\t\t\t\t\tstr.append(matrix[0][y]);\n\t\t\t\t\t\t\tstr.append(matrix[i][0]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint inputValue = Integer.parseInt(matrix[i][y]);\n\n\t\t\t\t\t\t\tif (inputValue > 0){\n\t\t\t\t\t\t\t\tinputMap.put(str.toString(), inputValue);\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\ty++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"WARNING: Please check: \"+ file.toString() + \". It was not found.\");\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "public static double similarity(TopicLabel l1,TopicLabel l2)\n\t{\n\t\tdouble sim = 0;\n\t\tint i = 0;\n\t\tfor(String w: l2.listWords)\n\t\t{\n\t\t\tif(l1.listWords.contains(w))\n\t\t\t{\n\t\t\t\tint j = l1.listWords.indexOf(w);\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/ l1.Pw_given_l.get(j));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/Config.EPSELON);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sim;\n\t}", "private static double mpSpeechHeaderSimilarityScore(MPVertex pCurrMPVertex, MP pMP2)\n\t{\n\t\tMPVertex tempMPVertex = new MPVertex(pMP2.getEmail(), getWordIndex());\n\t\tdouble similarityScore = pCurrMPVertex.subtract(tempMPVertex).vLength();\n\t\treturn similarityScore;\n\t}", "public void rank(List<String> modelFiles, String testFile, String indriRanking) {\n/* 1325 */ List<List<RankList>> trainingData = new ArrayList<>();\n/* 1326 */ List<List<RankList>> testData = new ArrayList<>();\n/* */ \n/* */ \n/* 1329 */ int nFold = modelFiles.size();\n/* */ \n/* 1331 */ List<RankList> samples = readInput(testFile);\n/* 1332 */ System.out.print(\"Preparing \" + nFold + \"-fold test data... \");\n/* 1333 */ FeatureManager.prepareCV(samples, nFold, trainingData, testData);\n/* 1334 */ System.out.println(\"[Done.]\");\n/* */ \n/* */ try {\n/* 1337 */ BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(indriRanking), \"UTF-8\"));\n/* 1338 */ for (int f = 0; f < nFold; f++) {\n/* */ \n/* 1340 */ List<RankList> test = testData.get(f);\n/* 1341 */ Ranker ranker = this.rFact.loadRankerFromFile(modelFiles.get(f));\n/* 1342 */ int[] features = ranker.getFeatures();\n/* 1343 */ if (normalize) {\n/* 1344 */ normalize(test, features);\n/* */ }\n/* 1346 */ for (RankList l : test) {\n/* 1347 */ double[] scores = new double[l.size()];\n/* 1348 */ for (int j = 0; j < l.size(); j++)\n/* 1349 */ scores[j] = ranker.eval(l.get(j)); \n/* 1350 */ int[] idx = MergeSorter.sort(scores, false);\n/* 1351 */ for (int i = 0; i < idx.length; i++) {\n/* 1352 */ int k = idx[i];\n/* */ \n/* 1354 */ String str = l.getID() + \" Q0 \" + l.get(k).getDescription().replace(\"#\", \"\").trim() + \" \" + (i + 1) + \" \" + SimpleMath.round(scores[k], 5) + \" indri\";\n/* 1355 */ out.write(str);\n/* 1356 */ out.newLine();\n/* */ } \n/* */ } \n/* */ } \n/* 1360 */ out.close();\n/* */ }\n/* 1362 */ catch (Exception ex) {\n/* */ \n/* 1364 */ throw RankLibError.create(\"Error in Evaluator::rank(): \", ex);\n/* */ } \n/* */ }", "public void similar(String tableName, String name) {\n String simName = null;\n float score = 11;\n float val = 0;\n int simCount = 0;\n if (tableName.equals(\"reviewer\")) {\n if (matrix.getReviewers().contains(name) != null) {\n // Node with the reference to the list we are comparing other\n // lists to\n ReviewerList.Node n = matrix.getReviewers().contains(name);\n // Gets the head to the DLList that we are comparing other lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n ReviewerList.Node n1 = matrix.getReviewers().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n RDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n node = n.getList().getHead();\n // Going through this list to find matching movies in\n // simList\n while (node != null) {\n simNode = simList.containsMovie(node\n .getMovieName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextMovie();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getReviewerName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n\n printSimilar(\"reviewer\", name, simName, score);\n }\n else {\n System.out.println(\"Reviewer |\" + name\n + \"| not found in the database.\");\n }\n }\n else {\n if (matrix.getMovies().contains(name) != null) {\n // Node with the reference to the list we are comparing\n // other lists to\n MSLList.Node n = matrix.getMovies().contains(name);\n // Gets the head to the DLList that we are comparing other\n // lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n MSLList.Node n1 = matrix.getMovies().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n MDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n // Going through this list to find matching movies\n // in simList\n node = n.getList().getHead();\n while (node != null) {\n simNode = simList.containsReviewer(node\n .getReviewerName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextReviewer();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getMovieName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n printSimilar(\"movie\", name, simName, score);\n }\n else {\n System.out.println(\"Movie |\" + name\n + \"| not found in the database.\");\n }\n }\n }", "@Override\n\tpublic void updateLevel() {\n\t\tthis.algorithm();\n\t\t\n\t}", "public double getSimilarityMetric(String word1, String word2) {\n\t\t// given two words, this function computes two measures of similarity\n\t\t// and returns the average\n\t\tint l1 = word1.length();\n\t\tint l2 = word2.length();\n\t\tint lmin = Math.min(l1, l2);\n\t\tint leftSimilarity = 0;\n\t\tint rightSimilarity = 0;\n\n\t\t// calculate leftSimilarity\n\t\tfor(int i = 0; i < lmin; i++) {\n\t\t\tif(word1.charAt(i) == word2.charAt(i)) {\n\t\t\t\tleftSimilarity += 1;\n\t\t\t}\n\t\t}\n\n\t\t// calculate rightSimilarity\n\t\tfor(int j = 0; j < lmin; j++) {\n\t\t\tif(word1.charAt(l1-j-1) == word2.charAt(l2-j-1)) {\n\t\t\t\trightSimilarity += 1;\n\t\t\t}\n\t\t}\n\t\treturn (leftSimilarity + rightSimilarity)/2.0;\n\t}", "@Override\r\n public double calculateBestQuality() {\r\n int numClasses = parentClassDist.size();\r\n \r\n //Sort the mean distance orderline\r\n Collections.sort(meanDistOrderLine);\r\n \r\n //Find approximate minimum orderline objects\r\n OrderLineObj min = new OrderLineObj(-1.0, 0.0);\r\n for(Double d : parentClassDist.keySet()){\r\n int unassignedObjs = parentClassDist.get(d) - orderLineClassDist.get(d);\r\n double distMin = (sums[d.intValue()] + (unassignedObjs * minDistance)) / parentClassDist.get(d);\r\n if(min.getDistance() == -1.0 || distMin < min.getDistance()){\r\n min.setDistance(distMin);\r\n min.setClassVal(d);\r\n }\r\n }\r\n \r\n //Find approximate maximum orderline objects\r\n OrderLineObj max = new OrderLineObj(-1.0, 0.0);\r\n for(Double d : parentClassDist.keySet()){\r\n int unassignedObjs = parentClassDist.get(d) - orderLineClassDist.get(d);\r\n double distMax = (sums[d.intValue()] + (unassignedObjs * maxDistance)) / parentClassDist.get(d); \r\n if(d != min.getClassVal() && (max.getDistance() == -1.0 || distMax > max.getDistance())){\r\n max.setDistance(distMax);\r\n max.setClassVal(d);\r\n }\r\n }\r\n \r\n //Adjust running sums\r\n double increment = (max.getDistance() - min.getDistance()) / (numClasses-1);\r\n int multiplyer = 1;\r\n for (OrderLineObj currentObj : meanDistOrderLine) {\r\n double thisDist;\r\n int unassignedObjs = parentClassDist.get(currentObj.getClassVal()) - orderLineClassDist.get(currentObj.getClassVal());\r\n \r\n if(currentObj.getClassVal() == min.getClassVal()){\r\n thisDist = minDistance;\r\n }else if(currentObj.getClassVal() == max.getClassVal()){\r\n thisDist = maxDistance;\r\n }else{\r\n thisDist = minDistance + (increment * multiplyer);\r\n multiplyer++; \r\n }\r\n sums[(int)currentObj.getClassVal()] += thisDist * unassignedObjs;\r\n sumOfSquares[(int)currentObj.getClassVal()] += thisDist * thisDist * unassignedObjs;\r\n sumsSquared[(int)currentObj.getClassVal()] = sums[(int)currentObj.getClassVal()] * sums[(int)currentObj.getClassVal()];\r\n }\r\n \r\n double ssTotal;\r\n double part1 = 0;\r\n double part2 = 0;\r\n\r\n for (int i = 0; i < numClasses; i++) {\r\n part1 += sumOfSquares[i];\r\n part2 += sums[i];\r\n }\r\n\r\n part2 *= part2;\r\n part2 /= numInstances;\r\n ssTotal = part1 - part2;\r\n\r\n double ssAmoung;\r\n part1 = 0;\r\n part2 = 0;\r\n for (int i = 0; i < numClasses; i++) {\r\n part1 += (double) sumsSquared[i] / parentClassDist.get((double) i);//.data[i].size();\r\n part2 += sums[i];\r\n }\r\n ssAmoung = part1 - (part2 * part2) / numInstances;\r\n double ssWithin = ssTotal - ssAmoung;\r\n\r\n int dfAmoung = numClasses - 1;\r\n int dfWithin = numInstances - numClasses;\r\n\r\n double msAmoung = ssAmoung / dfAmoung;\r\n double msWithin = ssWithin / dfWithin;\r\n\r\n double f = msAmoung / msWithin;\r\n \r\n //Reset running sums\r\n multiplyer = 1;\r\n for (OrderLineObj currentObj : meanDistOrderLine) {\r\n double thisDist;\r\n int unassignedObjs = parentClassDist.get(currentObj.getClassVal()) - orderLineClassDist.get(currentObj.getClassVal());\r\n \r\n if(currentObj.getClassVal() == min.getClassVal()){\r\n thisDist = minDistance;\r\n }else if(currentObj.getClassVal() == max.getClassVal()){\r\n thisDist = maxDistance;\r\n }else{\r\n thisDist = minDistance + (increment * multiplyer);\r\n multiplyer++; \r\n }\r\n sums[(int)currentObj.getClassVal()] -= thisDist * unassignedObjs;\r\n sumOfSquares[(int)currentObj.getClassVal()] -= thisDist * thisDist * unassignedObjs;\r\n sumsSquared[(int)currentObj.getClassVal()] = sums[(int)currentObj.getClassVal()] * sums[(int)currentObj.getClassVal()];\r\n }\r\n \r\n return Double.isNaN(f) ? 0.0 : f;\r\n }", "@Override\n public double similarity(\n final Integer value1, final Integer value2) {\n\n // The value of nodes is an integer...\n return 1.0 / (1.0 + Math.abs(value1 - value2));\n }", "public static void main(String[] args) throws IOException {\n\t\tString FastqFilePath = args[0];\n\t\tString QSWritePath = args[1];\n\t\tString encoding = \"utf-8\";\n\t\tint SumCount = CommonClass.getFileLines(FastqFilePath) / 4;\n\t\tdouble AverageQS[][] = new double[SumCount][2];\n\t\tint LineCount = 0;\n\t\tFile file1 = new File(FastqFilePath);\n\t\tif (file1.isFile() && file1.exists()) {\n\t\t\tInputStreamReader read = new InputStreamReader(new FileInputStream(file1), encoding);\n\t\t\tBufferedReader bufferedReader1 = new BufferedReader(read);\n\t\t\twhile ((bufferedReader1.readLine()) != null) {\n\t\t\t\tbufferedReader1.readLine();\n\t\t\t\tbufferedReader1.readLine();\n\t\t\t\tString CurrentQS = CommonClass.GetAverageQualityScoreOfRead(bufferedReader1.readLine());\n\t\t\t\tAverageQS[LineCount++][0] = Double.parseDouble(CurrentQS);\n\t\t\t}\n\t\t\tbufferedReader1.close();\n\t\t} else {\n\t\t\tSystem.out.println(\"File is not exist!\");\n\t\t}\n\t\t//Statistics.\n\t\tint MarKCount = 0;\n\t\tdouble MarkQS[][] = new double[SumCount][2];\n\t\tfor (int w = 0; w < LineCount; w++) {\n\t\t\tif (AverageQS[w][0] != 0) {\n\t\t\t\tint IndexCount = 1;\n\t\t\t\tfor (int r = w + 1; r < LineCount; r++) {\n\t\t\t\t\tif (AverageQS[r][0] != 0) {\n\t\t\t\t\t\tif (AverageQS[w][0] == AverageQS[r][0]) {\n\t\t\t\t\t\t\tIndexCount++;\n\t\t\t\t\t\t\tAverageQS[r][0] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tMarkQS[MarKCount][0] = AverageQS[w][0];\n\t\t\t\tMarkQS[MarKCount][1] = IndexCount;\n\t\t\t\tMarKCount++;\n\t\t\t}\n\t\t}\n\t\t//Get Statistics.\n\t\tdouble exch1 = 0;\n\t\tdouble exch2 = 0;\n\t\tfor (int k = 0; k < MarKCount; k++) {\n\t\t\tfor (int h = k + 1; h < MarKCount; h++) {\n\t\t\t\tif (MarkQS[k][0] > MarkQS[h][0]) {\n\t\t\t\t\texch1 = MarkQS[k][0];\n\t\t\t\t\texch2 = MarkQS[k][1];\n\t\t\t\t\tMarkQS[k][0] = MarkQS[h][0];\n\t\t\t\t\tMarkQS[k][1] = MarkQS[h][1];\n\t\t\t\t\tMarkQS[h][0] = exch1;\n\t\t\t\t\tMarkQS[h][1] = exch2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tfor (int g = 0; g < MarKCount; g++) {\n\t\t\tFileWriter writer1 = new FileWriter(QSWritePath + \"QSFile.fa\", true);\n\t\t\twriter1.write(MarkQS[g][0] + \"\\t\" + MarkQS[g][1] + \"\\n\");\n\t\t\twriter1.close();\n\t\t}\n\t\t//Free.\n\t\tAverageQS = null;\n\t}", "public static void main(String[] args) {\n\t\tHashMap<String, HashMap<String, Double>> file_alph_tf = new HashMap<String, HashMap<String, Double>>();\n\t\tHashMap<String, Double> file_alph_idf = new HashMap<String, Double>();\n\t\tHashMap<String, Double> tmp_idf = new HashMap<String, Double>();\n\t\tHashMap<String, HashMap<String, Double>> result_map = new HashMap<String, HashMap<String, Double>>();\n\t\t// 이후에 cosine similarity를 계산할때 사용할 top5해쉬맵\n\t\tHashMap<String, HashMap<String, Double>> top5 = new HashMap<String, HashMap<String, Double>>();\n\t\t\n\t\tTest01 t1 = new Test01();\n\t\tTest02 t2 = new Test02();\n\t\tTest03 t3 = new Test03();\n\t\t\n\t\t// 각 문서의 특성을 추출 : Test04 - map\t\t\n\t\t\n\t\tFile[] fileList = t1.get_file();\n\t\t\n\t\tfor (File file : fileList) {\n\t\t\t\n\t\t\tHashMap <String, Double> tmp_map = new HashMap <String, Double>();\n\t\t\t\n\t\t\t// count alphabet _ each files\n\t\t\ttry {\n\t\t\t\tFileReader file_reader = new FileReader(file);\n\t\t\t\tint cur = 0;\n\t\t\t\twhile ((cur = file_reader.read()) != -1) {\n\t\t\t\t\tif (cur != 32) {\n\t\t\t\t\t\tif (!tmp_map.containsKey(String.valueOf((char)cur))) {\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur), (double) 1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble temp_num = tmp_map.get(String.valueOf((char)cur));\n\t\t\t\t\t\t\ttmp_map.put(String.valueOf((char)cur),temp_num+1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t} catch(IOException e) {\n\t\t\t\te.getStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// calc_TF\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(tmp_map.keySet());\n\t\t\tdouble sum_value = 0;\n\t\t\t// TF의 분모 문서내에 오는 모든수 더하기\n\t\t\tfor (String k : key_lst) {\n\t\t\t\tsum_value += tmp_map.get(k);\t\n\t\t\t}\n\t\t\t// TF의 분자 : 해당 파일에 있는 알파벳의 갯수 (tmp_map에 저장되어있음) / tf분모\n\t\t\tfor (String tf_k : key_lst) {\n\t\t\t\tdouble tf = tmp_map.get(tf_k) / sum_value;\n\t\t\t\ttmp_map.put(tf_k, tf);\n\t\t\t}\n\t\t\tsum_value = 0;\n\t\t\tfile_alph_tf.put(file.getName(), tmp_map);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// calc_IDF_Bottom : counting IDF_Bottom\n\t\t\ttmp_idf = file_alph_tf.get(file.getName());\n\t\t\t\n\t\t\tfor (String idf_k : key_lst) {\n\t\t\t\tif (tmp_idf.get(idf_k) != 0) {\n\t\t\t\t\tif (!file_alph_idf.containsKey(idf_k)) {\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, (double) 1);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdouble tmp_num = file_alph_idf.get(idf_k);\n\t\t\t\t\t\tfile_alph_idf.put(idf_k, tmp_num+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // file의 이름으로 반복\n\t\t\n\t\t\n\t\t// calc_IDF\n\t\tfor (File file : fileList) {\n\t\t\tHashMap<String, Double> aa = new HashMap<String, Double>();\n\t\t\tArrayList<String> key_lst = new ArrayList<String>(file_alph_idf.keySet());\n\t\t\tdouble temp_num = 0;\n\t\t\tfor (String key : key_lst) {\n\t\t\t\t\n\t\t\t\tdouble tf;\n\t\t\t\ttemp_num = 0;\n\t\t\t\ttry {\n\t\t\t\t\ttf = file_alph_tf.get(file.getName()).get(key);\n\t\t\t\t\tif (file_alph_idf.get(key) != 0) {\n\t\t\t\t\t\tdouble tt = file_alph_idf.get(key);\n\t\t\t\t\t\ttemp_num = 7/tt;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttemp_num = 0;\n\t\t\t\t\t}\n\t\t\t\t} catch(NullPointerException e) {\n\t\t\t\t\ttf = 0;\n\t\t\t\t}\n\t\t\t\tdouble idf = Math.log(1+ temp_num);\n\t\t\t\tdouble tfidf = tf*idf;\n\t\t\t\taa.put(key, tfidf);\n\t\t\t}\n//\t\t\tSystem.out.println();\n\t\t\tresult_map.put(file.getName(), aa);\n\t\t}\t\n\t\n\t\t\n\t\t\n\t\t\n\t\tfor(File f : fileList) {\n\t\t\t\n\t//---------------------------------------상위 5개-------------------------------------------\t\t\t\n\t\t\t\n//\t\t\tSystem.out.println(f.getName());\n\t\t\tString f_n = f.getName(); \n\t\t\t\n\t\t\t// 0. 정렬 전 파일 출력\n//\t\t\tArrayList <String> key_lst = new ArrayList<String>(result_map.get(f_n).keySet());\n//\t\t\tfor (String kk : key_lst) {\n//\t\t\t\tSystem.out.println(kk + \" : \" + result_map.get(f_n).get(kk));\n//\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> Top5List = sortHSbyValue_double(result_map.get(f_n));\n//\t\t\tSystem.out.println(Top5List);\n\t\t\tHashMap<String, Double> map = new HashMap<String, Double>();\n\t\t\tfor (String s : Top5List) {\n\t\t\t\tmap.put(s, result_map.get(f_n).get(s));\n\t\t\t}\n\n\t\t\ttop5.put(f_n, map);\t\n\t\t}\n\t\t\n\t\t// cosine_similarity\n\t\t// 구하기 전에 벡터의 차원을 맞춰준다.\n\t\t// input받는 파일을 제외한 나머지 파일들과의 유사도를 구한다.\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"문서 이름을 입력하세요 : \");\n\t\tString input = sc.next();\n\t\t\n\t\tHashMap<String, Double> csMap = new HashMap<String, Double>();\n\t\t\n\t\tfor (File f : fileList) {\n\t\t\tHashMap<String, Double> a = (HashMap<String, Double>) top5.get(input).clone();\n\t\t\tArrayList<String> a_key_lst = new ArrayList<String>(a.keySet());\n\t\t\tArrayList<String> total_key = new ArrayList<String>();\n\t\t\t\n\t\t\tif (input.equals(f.getName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tHashMap<String, Double> b = (HashMap<String, Double>) top5.get(f.getName()).clone();\n\t\t\tArrayList<String> b_key_lst = new ArrayList<String>(b.keySet());\n\t\t\t\n\t\t\tfor (String a_k : a_key_lst) {\n\t\t\t\ttotal_key.add(a_k);\n\t\t\t}\n\t\t\tfor (String b_k : b_key_lst) {\n\t\t\t\ttotal_key.add(b_k);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String t_k : total_key) {\n\t\t\t\tif(!a.containsKey(t_k)) {\n\t\t\t\t\ta.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t\tif(!b.containsKey(t_k)) {\n\t\t\t\t\tb.put(t_k, (double)0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble[] a_lst = t3.mapToList(a);\n\t\t\tdouble[] b_lst = t3.mapToList(b);\n\t\t\tdouble cs = cosinSimilarity(a_lst, b_lst);\n\t\t\tcsMap.put(f.getName(), cs);\n\t\t\t\n\t\t\ta_key_lst.clear();\n\t\t\ttotal_key.clear();\n\t\t\t\n\t\t}\n\t\t\n\t\tt2.sort_print(csMap, input);\n\t\t\n\t\tSystem.out.println();\n\t}", "private void readDocQueriesRelevance(){\n File f = new File(\"cranfield.query.relevance.txt\");\n if(f.exists() && !f.isDirectory()){\n try {\n FileReader fileReader=null;\n try {\n fileReader = new FileReader(f);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(EvaluationQueries.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String line;\n String[] querieDocRel;\n List<QuerieDocRelevance> tempQueriesRelevance;\n while ((line = bufferedReader.readLine()) != null) {\n querieDocRel = line.split(\"\\\\s+\");\n int querieNumber = Integer.parseInt(querieDocRel[0]);\n if(queriesRelevanceMap.containsKey(querieNumber)){\n tempQueriesRelevance = queriesRelevanceMap.get(querieNumber);\n tempQueriesRelevance.add(new QuerieDocRelevance(Integer.parseInt(querieDocRel[1]),Integer.parseInt(querieDocRel[2])));\n queriesRelevanceMap.put(querieNumber,tempQueriesRelevance);\n \n }else{\n tempQueriesRelevance = new ArrayList<>();\n tempQueriesRelevance.add(new QuerieDocRelevance(Integer.parseInt(querieDocRel[1]),Integer.parseInt(querieDocRel[2])));\n queriesRelevanceMap.put(querieNumber,tempQueriesRelevance); \n }\n \n }\n \n } catch (IOException ex) {\n Logger.getLogger(EvaluationQueries.class.getName()).log(Level.SEVERE, null, ex);\n } \n } \n \n }", "@Override\r\n\tpublic double getTwoDiseaseSimilarity(String omimId1, String omimId2) {\r\n\t\tdouble similarity = (1 - alpha) * firstDiseaseSimilarity.getTwoDiseaseSimilarity(omimId1, omimId2);\r\n\t\tsimilarity += alpha * secondDiseaseSimilarity.getTwoDiseaseSimilarity(omimId1, omimId2);\r\n\t\t\r\n\t\treturn similarity;\r\n\t}", "@Override\n public int compare(Recognition lhs, Recognition rhs) {\n return Float.compare(rhs.getConfidence(), lhs.getConfidence());\n }", "public void testCompare() throws Exception {\n\n Object testData[][] = {\n { \"aaa\", \"bbb\", -1 },\n { \"aaa\", \"aaa\", 0 },\n { \"bbb\", \"aaa\", 1 },\n { \"aaa\", \"aaa_L1_bbb.lsm\", -1 },\n { \"aaa_L1_bbb.lsm\", \"aaa_L1_bbb.lsm\", 0 },\n { \"aaa_L1_bbb.lsm\", \"aaa\", 1 },\n { \"aaa_L1_bbb.lsm\", \"aaa_L10_bbb.lsm\", -1 },\n { \"aaa_L10_bbb.lsm\", \"aaa_L1_bbb.lsm\", 1 },\n { \"aaa_La_bbb.lsm\", \"aaa_L1_bbb.lsm\", 1 },\n { \"aaa_L2_bbb.lsm\", \"aaa_L10_bbb.lsm\", -1 }\n };\n\n LNumberComparator comparator = new LNumberComparator();\n\n for (Object[] testRow : testData) {\n String name1 = (String) testRow[0];\n String name2 = (String) testRow[1];\n File file1 = new File(name1);\n File file2 = new File(name2);\n int expectedResult = (Integer) testRow[2];\n int actualResult = comparator.compare(new FileTarget(file1),\n new FileTarget(file2));\n\n boolean isValid = ((expectedResult > 0) && (actualResult > 0)) ||\n ((expectedResult < 0) && (actualResult < 0)) ||\n ((expectedResult == 0) && (actualResult == 0));\n\n assertTrue(name1 + \" compared to \" + name2 +\n \" returned invalid result of \" + actualResult +\n \" (should have same sign as \" + expectedResult + \")\",\n isValid);\n }\n\n }", "public void percentages(String[] files, PrintWriter out) throws IOException {\n\t\t\n\t\tint i, j; //loop counters\n\t\tint[] infoArray; //array that holds the counters for each file-to-file comparison \n\t\tLinkedList<RevisionNode> theList = toAnalyze; // takes a copy of the RevisionNode list of data parsed from the log\n\t\t\n\t\tfor (i = 0; i < files.length; i++) { //for the every element in the parameter array\n\t\t\tinfoArray = new int[files.length]; //set the array length to reflect how many elements there are\n\t\t\tIterator<RevisionNode> lIterator = theList.iterator(); //iterate through the list, for every node\n\t\t\t\n\t\t\twhile (lIterator.hasNext()) { //for every node in the RevisionNode list\n\t\t\t\tRevisionNode next = lIterator.next(); //take the next node in the list\n\t\t\t\t\n\t\t\t\tif (next.getRelevantFiles().contains(files[i])) { //if the current revision involved the current file, else skip this\n\t\t\t\t\t\n\t\t\t\t\tfor (j = 0; j < files.length; j++) { //checks for the presence of every other file\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (next.getRelevantFiles().contains(files[j])) { //if another is present\n\t\t\t\t\t\t\tinfoArray[j] += 1; //increment its respective counter, also counts occurrences of the current file as well\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(); //spacing\n\t\t\tout.println();\n\t\t\tSystem.out.println(\"For the file \" + files[i].substring(files[i].lastIndexOf(\"/\") + 1) + \":\"); //indicates what file we are talking about\n\t\t\tout.println(\"For the file \" + files[i].substring(files[i].lastIndexOf(\"/\") + 1) + \":\");\n\t\t\n\t\t\tfor (j = 0; j < files.length; j++) { //for the length of our data array\n\t\t\t\n\t\t\t\tif (j != i) { //ignoring the current files slot since it would be 100% no matter what\n\t\t\t\t\n\t\t\t\t\tint percent = (int) Math.round((infoArray[j] / (double) infoArray[i]) * 100); //round to the nearest percent\n\t\t\t\t\t//indicates that when file i is changed in a revision, file j is also changed at the same revision percent% of the time\n\t\t\t\t\tSystem.out.println(\"\\t When changed, \" + files[j].substring(files[j].lastIndexOf(\"/\") + 1) + \" is changed \" + percent + \"% of the time.\");\n\t\t\t\t\tout.println(\"\\t When changed, \" + files[j].substring(files[j].lastIndexOf(\"/\") + 1) + \" is changed \" + percent + \"% of the time.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic float getUnNormalisedSimilarity(String string1, String string2) {\r\n //todo check this is valid before use mail [email protected] if problematic\r\n return getSimilarity(string1, string2);\r\n }", "private float getPERScore(NameInfo name1Info, NameInfo name2Info) {\n\t\t// initials compared with full name\n\t\tString acroName1 = name1Info.getName();\n\t\tString acroName2 = name2Info.getName();\n\t\tif (acroName1.length() == acroName2.length()) { // similar names, perhaps with misspelling or apostrophe\n\t\t\tif (ed.score(acroName1, acroName2) <= 1.0f)\n\t\t\t\treturn 1.0f;\n\t\t}\n\t\tString shortName = \"\";\n\t\tif (acroName1.length() > acroName2.length()){\n\t\t\tshortName = acroMan.findAcronym(acroName1);\n\t\t\tif (shortName.equalsIgnoreCase(acroName2))\n\t\t\t\treturn 1.0f;\n\t\t} else {\n\t\t\tshortName = acroMan.findAcronym(acroName2);\n\t\t\tif (shortName.equalsIgnoreCase(acroName1))\n\t\t\t\treturn 1.0f;\n\t\t}\n\t\t\n\t\t// last name compared with full name\n\t\tString longName = \"\";\n\t\tshortName = \"\";\n\t\tif ((name1Info.getName()).length() >= (name2Info.getName()).length()) {\n\t\t\tlongName = name1Info.getName();\n\t\t\tshortName = name2Info.getName();\n\t\t} else {\n\t\t\tlongName = name2Info.getName();\n\t\t\tshortName = name1Info.getName();\n\t\t}\n\t\tString [] tokensLong = longName.split(\"\\\\s+\");\n\t\tfor (String word : tokensLong) {\n\t\t\tif (shortName.equalsIgnoreCase(word))\n\t\t\t\treturn 1.0f;\n\t\t}\n\t\t\n\t\t// first and last names are too similar for NameParser to distinguish\n\t\tString Name1 = name1Info.getName(), Name2 = name2Info.getName();\n\t\tString [] tokens1 = (Name1.trim()).split(\"\\\\s+\");\n\t\tString [] tokens2 = (Name2.trim()).split(\"\\\\s+\");\n\t\tif (tokens1.length == tokens2.length && tokens1.length == 2) {\n\t\t\tString [] shortened = removeSameWords(Name1, Name2);\n\t\t\tString shortName1 = shortened[0], shortName2 = shortened[1];\n\t\t\tfloat preciseScore = (float)LSHUtils.dice(shortName1, shortName2);\n\t\t\tif (preciseScore < 0.5f)\n\t\t\t\treturn 0.0f;\n\t\t\telse\n\t\t\t\treturn 1.0f;\n\t\t}\n\t\t\n\t\t// score using NameParser \n\t\tfloat maxScore = 0.0f;\n\t\tfloat maxExtraScore = 0.0f ;\n\t\tString name1Extra, name2Extra ;\n\t\tfloat perScore ;\n\n\t\tArrayList<String> candidate1 = name1Info.getCandidates();\n\t\tArrayList<String> candidate2 = name2Info.getCandidates();\n\t\tint n = candidate1.size();\n\t\tint m = candidate2.size();\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString name1 = candidate1.get(i);\n\t\t\tname1Parser.parsing(name1);\n\n\t\t\tname1Extra = name1Parser.getExtraName() ;\n\t\t\tif(! name1Extra.isEmpty())\n\t\t\t\textraName1Parser.parsing(name1Extra) ;\n\n\t\t\tfor (int j = 0; j < m; j++) {\n\t\t\t\tString name2 = candidate2.get(j);\n\t\t\t\tname2Parser.parsing(name2);\n\n\t\t\t\tname2Extra = name2Parser.getExtraName() ;\n\t\t\t\tif(! name2Extra.isEmpty())\n\t\t\t\t\textraName2Parser.parsing(name2Extra) ;\n\n\t\t\t\tif (name1.equals(name2))\n\t\t\t\t\tperScore = 1.0f;\n\t\t\t\telse {\n\t\t\t\t\tperScore = name1Parser.compare(name2Parser);\n\t\t\t\t\tfloat extraPerScore ;\n\t\t\t\t\tif( name1Extra.isEmpty() || name2Extra.isEmpty() )\n\t\t\t\t\t\textraPerScore = (name1Extra.isEmpty() && name2Extra.isEmpty()) ? perScore : 0.9f ;\n\t\t\t\t\telse\n\t\t\t\t\t\textraPerScore = (name1Extra.equals(name2Extra)) ? 1.0f : extraName1Parser.compare(extraName2Parser) ;\n\n\t\t\t\t\tperScore = (perScore + extraPerScore) / 2.0f ;\n\t\t\t\t}\n\t\t\t\tif (perScore > maxScore)\n\t\t\t\t\tmaxScore = perScore;\n\n\t\t\t\tif( ! name1Extra.isEmpty() ) {\n\t\t\t\t\tperScore = extraName1Parser.compare(name2Parser) ;\n\t\t\t\t\tif (perScore > maxExtraScore)\n\t\t\t\t\t\tmaxExtraScore = perScore;\n\t\t\t\t}\n\t\t\t\tif( ! name2Extra.isEmpty() ) {\n\t\t\t\t\tperScore = name1Parser.compare(extraName2Parser) ;\n\t\t\t\t\tif (perScore > maxExtraScore)\n\t\t\t\t\t\tmaxExtraScore = perScore;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (maxExtraScore > maxScore) ? maxExtraScore : maxScore ;\n\t}", "public static double similarity(Library a, Library b) {\n double numerator = commonPhotos(a, b).size();\n if (a.numPhotos() == 0 || b.numPhotos() == 0) { // check if both libraries have 0 photos\n return 0;\n } else if (a.numPhotos() > b.numPhotos()) { // checking to see which number to divide by\n return numerator / b.numPhotos();\n } else {\n return numerator / a.numPhotos();\n }\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 protected float score(BasicStats stats, float termFreq, float docLength) {\n float k1 = (float)1.2;\n float k2 = 750;\n float b = (float)0.75;\n float N = stats.getNumberOfDocuments();\n float df = stats.getDocFreq();\n float qtermFreq = 1;\n float score = (float)Math.log((N - df + 0.5)/df+0.5);\n score*=((k1+1)*termFreq)/(k1*(1-b+b*(docLength/stats.getAvgFieldLength()))+termFreq);\n score*=((k2+1)*qtermFreq)/(k2+qtermFreq);\n return score; }", "@Test\n public final void testSimilarity() {\n System.out.println(\"similarity\");\n RatcliffObershelp instance = new RatcliffObershelp();\n\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"ring\" ==> 4, \"My s\" ==> 3, \"s\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(4 + 3 + 1) / (9 + 9)\n\t\t// = 16/18\n\t\t// = 0.888888\n assertEquals(\n 0.888888,\n instance.similarity(\"My string\", \"My tsring\"),\n 0.000001);\n\t\t\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"My \" ==> 3, \"tri\" ==> 3, \"g\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(3 + 3 + 1) / (9 + 9)\n\t\t// = 14/18\n\t\t// = 0.777778\n assertEquals(\n 0.777778,\n instance.similarity(\"My string\", \"My ntrisg\"),\n 0.000001);\n\n // test data from essay by Ilya Ilyankou\n // \"Comparison of Jaro-Winkler and Ratcliff/Obershelp algorithms\n // in spell check\"\n // https://ilyankou.files.wordpress.com/2015/06/ib-extended-essay.pdf\n // p13, expected result is 0.857\n assertEquals(\n 0.857,\n instance.similarity(\"MATEMATICA\", \"MATHEMATICS\"),\n 0.001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.7368421052631579\n assertEquals(\n 0.736842,\n instance.similarity(\"aleksander\", \"alexandre\"),\n 0.000001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.6666666666666666\n assertEquals(\n 0.666666,\n instance.similarity(\"pennsylvania\", \"pencilvaneya\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 14/18 = 0.7777777777777778‬\n assertEquals(\n 0.777778,\n instance.similarity(\"WIKIMEDIA\", \"WIKIMANIA\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 24/40 = 0.65\n assertEquals(\n 0.6,\n instance.similarity(\"GESTALT PATTERN MATCHING\", \"GESTALT PRACTICE\"),\n 0.000001);\n \n NullEmptyTests.testSimilarity(instance);\n }", "public static double similarity(Library a, Library b) {\r\n double sizeA = a.getPhotos().size();\r\n double sizeB = b.getPhotos().size();\r\n\r\n if (sizeA == 0.0 || sizeB == 0.0) { // return 0.0 if either library is empty\r\n return 0.0;\r\n } else {\r\n int size = commonPhotos(a, b).size();\r\n if (sizeA < sizeB) { // return amount of common photos divided by the smaller library\r\n return size / sizeA;\r\n } else {\r\n return size / sizeB;\r\n }\r\n }\r\n\r\n }", "public void runTest(String level){\n\t\t//sets instance variable to level input\n\t\tthis.level = level;\n\t\t//Switch based on level\n\t\tswitch(this.level){\n\t\t//In the case of test level E\n\t\tcase\"E\":\n\t\t\t// array containing possible grade equivalencies for the Math Computation test\n\t\t\tdouble[] mathCompArrayE = {0.7, 0.7, 0.7, 0.7, 0.7, 1.8, 2.1, 2.3, 2.5, 2.6, 2.6, 2.7, 2.9, 2.9, 3.1, 3.2, 3.4, 3.5, 3.6, 4.0, 4.2, 4.5, 4.8, 5.0, 5.4, 6.9};\n\t\t\t//array containing possible grade equivalencies for the Applied Math test\n\t\t\tdouble[] mathAppliedArrayE = {0, 0, 0, 0, 0, 0, 1.4, 1.9, 2.2, 2.3, 2.7, 2.9, 3.2, 3.4, 3.8, 4.1, 4.5, 4.8, 5.2, 5.6, 5.9, 6.1, 6.7, 6.9, 6.9, 6.9};\n\t\t\t//Multi-Dimensional Array containing possible mathematics grade equivalencies based on math computation score and applied math score\n\t\t\tdouble[][] totalMathematicsE = {\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{0, 0, 0, 0, 0, 0.9, 1.2, 1.4, 1.4, 1.4, 1.5, 1.7, 1.7, 1.7, 1.8, 1.8, 1.9, 1.9, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.5},\n\t\t\t\t\t{1.4, 1.4, 1.4, 1.4, 1.4, 1.7, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.3, 2.4, 2.4, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.9, 3.4},\n\t\t\t\t\t{1.7, 1.7, 1.7, 1.7, 1.7, 2.0, 2.1, 2.2, 2.3, 2.4, 2.4, 2.4, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 4.1},\n\t\t\t\t\t{1.8, 1.8, 1.8, 1.8, 1.8, 2.1, 2.3, 2.4, 2.4, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.8, 2.9, 2.9, 3.0, 3.1, 3.2, 3.3, 3.3, 3.5, 4.5},\n\t\t\t\t\t{1.9, 1.9, 1.9, 1.9, 1.9, 2.2, 2.3, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.8, 2.9, 2.9, 3.0, 3.1, 3.2, 3.2, 3.3, 3.4, 3.5, 3.9, 4.7},\n\t\t\t\t\t{2.0, 2.0, 2.0, 2.0, 2.0, 2.3, 2.4, 2.5, 2.5, 2.5, 2.6, 2.7, 2.8, 2.9, 2.9, 3.0, 3.1, 3.1, 3.2, 3.3, 3.3, 3.4, 3.5, 3.8, 4.1, 4.9},\n\t\t\t\t\t{2.0, 2.0, 2.0, 2.0, 2.0, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.8, 2.9, 3.0, 3.1, 3.1, 3.2, 3.2, 3.3, 3.4, 3.4, 3.5, 3.8, 4.0, 4.3, 5.1},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 2.9, 3.0, 3.1, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.5, 3.8, 3.9, 4.2, 4.5, 5.2},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.4, 2.5, 2.6, 2.8, 2.9, 2.9, 3.0, 3.1, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.6, 3.8, 3.9, 4.1, 4.4, 4.6, 5.4},\n\t\t\t\t\t{2.2, 2.2, 2.2, 2.2, 2.2, 2.4, 2.6, 2.7, 2.9, 2.9, 3.0, 3.1, 3.2, 3.2, 3.3, 3.3, 3.4, 3.5, 3.6, 3.8, 3.9, 4.1, 4.3, 4.5, 4.8, 5.5},\n\t\t\t\t\t{2.3, 2.3, 2.3, 2.3, 2.3, 2.5, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.5, 3.7, 3.9, 4.0, 4.1, 4.3, 4.5, 4.7, 4.9, 5.7},\n\t\t\t\t\t{2.3, 2.3, 2.3, 2.3, 2.3, 2.5, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.5, 3.7, 3.9, 4.0, 4.2, 4.3, 4.5, 4.6, 4.8, 5.1, 5.8},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.6, 2.8, 3.0, 3.1, 3.2, 3.3, 3.3, 3.4, 3.4, 3.6, 3.8, 3.9, 4.0, 4.2, 4.4, 4.5, 4.6, 4.7, 4.9, 5.2, 6.0},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.7, 2.9, 3.1, 3.2, 3.3, 3.3, 3.4, 3.5, 3.6, 3.8, 3.9, 4.1, 4.2, 4.4, 4.5, 4.6, 4.7, 4.9, 5.1, 5.3, 6.2},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.8, 3.0, 3.2, 3.3, 3.4, 3.4, 3.5, 3.7, 3.9, 4.0, 4.1, 4.3, 4.4, 4.5, 4.7, 4.8, 4.9, 5.0, 5.2, 5.5, 6.4},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.9, 3.1, 3.3, 3.4, 3.4, 3.6, 3.8, 3.9, 4.0, 4.2, 4.3, 4.4, 4.6, 4.7, 4.8, 4.9, 5.1, 5.2, 5.3, 5.7, 6.7},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0, 4.1, 4.2, 4.4, 4.5, 4.6, 4.7, 4.8, 5.0, 5.1, 5.2, 5.3, 5.5, 5.8, 6.9},\n\t\t\t\t\t{2.6, 2.6, 2.6, 2.6, 2.6, 3.1, 3.3, 3.4, 3.7, 3.9, 4.1, 4.2, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.1, 5.2, 5.3, 5.5, 5.6, 5.8, 6.1, 6.9},\n\t\t\t\t\t{2.8, 2.8, 2.8, 2.8, 2.8, 3.3, 3.5, 3.8, 4.0, 4.2, 4.4, 4.6, 4.7, 4.8, 4.9, 5.0, 5.1, 5.2, 5.3, 5.5, 5.6, 5.7, 5.9, 6.1, 6.4, 6.9},\n\t\t\t\t\t{3.1, 3.1, 3.1, 3.1, 3.1, 3.5, 4.0, 4.4, 4.6, 4.7, 4.9, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.7, 5.8, 5.9, 6.0, 6.2, 6.4, 6.7, 6.9, 6.9},\n\t\t\t\t\t{4.0, 4.0, 4.0, 4.0, 4.0, 4.9, 5.2, 5.5, 5.7, 5.9, 6.0, 6.2, 6.4, 6.5, 6.7, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9, 6.9},\t\t\n\t\t\t\t};\n\t\t\t//prompts user to input number of correct answers for mathematics computation test\n\t\t\tSystem.out.println(\"Input number correct for Mathematics Computation.\");\n\t\t\t//stores user input as an integer\n\t\t\tint mathCompE = input.nextInt();\n\t\t\t//prompts user to input number of correct answers for applied mathematics test\n\t\t\tSystem.out.println(\"Input number correct for Applied Mathematics.\");\n\t\t\t//stores user input as an integer\n\t\t\tint mathAppliedE = input.nextInt();\n\t\t\t//sets the Grade Equivalency instance variable to the double stored in totalMathematicsE\n\t\t\tgradeEquivalency = totalMathematicsE[mathAppliedE][mathCompE];\n\t\t\t//outputs all grade equivalencies for mathematics computation, applied mathematics and total mathematics\n\t\t\tSystem.out.println(\"Mathematics Computation grade equivalency is: \" + mathCompArrayE[mathCompE]);\n\t\t\tSystem.out.println(\"Applied Mathematics grade equivalency is: \" + mathAppliedArrayE[mathAppliedE]);\n\t\t\tSystem.out.println(\"Total Mathematics grade equivalency is: \" + gradeEquivalency);\n\t\t\tbreak;\n\t\t//In the case of test level m\n\t\tcase\"M\":\n\t\t\tdouble[]mathCompArrayM = {1.1, 1.1, 1.1, 1.1, 1.1, 1.2, 1.8, 2.2, 2.4, 2.6, 2.7, 2.9, 3.2, 3.4, 3.5, 3.9, 4.2, 4.6, 4.9, 5.1, 5.5, 6.1, 7.0, 7.8, 9.2, 9.9};\n\t\t\tdouble[]mathAppliedArrayM = {0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 1.5, 2.0, 2.4, 2.9, 3.5, 4.1, 4.7, 5.4, 5.8, 6.2, 6.7, 7.3, 8.2, 9.4, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9};\n\t\t\tdouble[][]totalMathM = {\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{0.8, 0.8, 0.8, 0.8, 0.8, 1.1, 1.4, 1.5, 1.7, 1.8, 1.9, 2.0, 2.0, 2.1, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.7, 2.9, 3.1, 3.5},\n\t\t\t\t\t{1.4, 1.4, 1.4, 1.4, 1.4, 1.5, 1.8, 2.0, 2.1, 2.2, 2.3, 2.3, 2.4, 2.4, 2.5, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.2, 3.3, 3.5, 4.0, 4.8},\n\t\t\t\t\t{1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 2.1, 2.2, 2.3, 2.4, 2.5, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.3, 4.8, 5.4},\n\t\t\t\t\t{2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.3, 2.4, 2.5, 2.5, 2.6, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.3, 3.4, 3.6, 3.9, 4.2, 4.5, 4.8, 5.2, 5.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.1, 2.4, 2.5, 2.5, 2.7, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.4, 3.6, 3.9, 4.1, 4.4, 4.6, 4.9, 5.2, 5.6, 6.3},\n\t\t\t\t\t{2.2, 2.2, 2.2, 2.2, 2.2, 2.3, 2.5, 2.6, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.4, 3.6, 3.9, 4.0, 4.2, 4.5, 4.7, 4.9, 5.2, 5.5, 5.9, 6.9},\n\t\t\t\t\t{2.3, 2.3, 2.3, 2.3, 2.3, 2.4, 2.5, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.5, 3.8, 4.0, 4.2, 4.4, 4.6, 4.7, 4.9, 5.2, 5.5, 5.7, 6.3, 7.4},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.4, 2.6, 2.9, 3.1, 3.2, 3.3, 3.4, 3.7, 3.9, 4.1, 4.3, 4.4, 4.6, 4.8, 5.0, 5.0, 5.4, 5.7, 6.0, 6.7, 7.7},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.8, 3.1, 3.2, 3.3, 3.5, 3.8, 4.0, 4.2, 4.4, 4.6, 4.7, 4.9, 5.0, 5.2, 5.5, 5.7, 5.9, 6.3, 7.1, 8.1},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.9, 3.2, 3.3, 3.5, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 4.9, 5.1, 5.2, 5.5, 5.7, 5.9, 6.2, 6.7, 7.5, 8.5}, \n\t\t\t\t\t{2.6, 2.6, 2.6, 2.6, 2.6, 2.7, 3.1, 3.3, 3.4, 3.8, 4.0, 4.3, 4.5, 4.7, 4.8, 5.0, 5.1, 5.3, 5.5, 5.7, 5.9, 6.1, 6.5, 7.1, 7.7, 9.2},\n\t\t\t\t\t{2.7, 2.7, 2.7, 2.7, 2.7, 2.8, 3.2, 3.4, 3.7, 4.0, 4.3, 4.5, 4.7, 4.8, 5.0, 5.2, 5.3, 5.5, 5.7, 5.8, 6.1, 6.4, 6.8, 7.4, 8.0, 9.4},\n\t\t\t\t\t{2.8, 2.8, 2.8, 2.8, 2.8, 2.9, 3.3, 3.5, 3.9, 4.2, 4.5, 4.7, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.8, 6.1, 6.3, 6.7, 7.2, 7.6, 8.3, 9.9},\n\t\t\t\t\t{2.9, 2.9, 2.9, 2.9, 2.9, 3.0, 3.4, 3.8, 4.1, 4.4, 4.7, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.0, 6.3, 6.7, 7.1, 7.5, 7.9, 8.9, 9.9},\n\t\t\t\t\t{3.1, 3.1, 3.1, 3.1, 3.1, 3.1, 3.5, 4.0, 4.4, 4.6, 4.9, 5.1, 5.2, 5.3, 5.6, 5.7, 5.9, 6.1, 6.3, 6.6, 7.1, 7.4, 7.7, 8.2, 9.3, 9.9},\n\t\t\t\t\t{3.2, 3.2, 3.2, 3.2, 3.2, 3.3, 3.8, 4.2, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.7, 5.9, 6.1, 6.3, 6.6, 7.0, 7.3, 7.6, 8.1, 8.8, 9.7, 9.9},\n\t\t\t\t\t{3.3, 3.3, 3.3, 3.3, 3.3, 3.4, 4.0, 4.5, 4.8, 5.0, 5.2, 5.5, 5.7, 5.8, 6.0, 6.2, 6.4, 6.7, 7.1, 7.3, 7.6, 8.0, 8.4, 9.3, 9.9, 9.9},\n\t\t\t\t\t{3.4, 3.4, 3.4, 3.4, 3.4, 3.5, 4.4, 4.7, 5.0, 5.3, 5.5, 5.7, 5.9, 6.1, 6.3, 6.6, 6.8, 7.1, 7.4, 7.7, 8.0, 8.4, 9.2, 9.8, 9.9, 9.9},\n\t\t\t\t\t{3.9, 3.9, 3.9, 3.9, 3.9, 4.0, 4.7, 5.1, 5.3, 5.7, 5.9, 6.1, 6.3, 6.7, 6.9, 7.2, 7.5, 7.7, 7.9, 8.2, 8.8, 9.3, 9.9, 9.9, 9.9, 9.9},\n\t\t\t\t\t{4.6, 4.6, 4.6, 4.6, 4.6, 4.7, 5.2, 5.7, 6.0, 6.3, 6.7, 7.1, 7.4, 7.6, 7.8, 8.1, 8.2, 8.8, 9.2, 9.5, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9},\n\t\t\t\t\t{5.2, 5.2, 5.2, 5.2, 5.2, 5.3, 6.0, 6.4, 7.1, 7.5, 7.7, 8.1, 8.3, 8.9, 9.2, 9.5, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9, 9.9},\n\t\t\t};\n\t\t\tSystem.out.println(\"Input number correct for Mathematics Computation.\");\n\t\t\tint mathCompM = input.nextInt();\n\t\t\tSystem.out.println(\"Input number correct for Applied Mathematics.\");\n\t\t\tint mathAppliedM = input.nextInt();\n\t\t\tgradeEquivalency = totalMathM[mathAppliedM][mathCompM];\n\t\t\tSystem.out.println(\"Mathematics Computation grade equivalency is: \" + mathCompArrayM[mathCompM]);\n\t\t\tSystem.out.println(\"Applied Mathematics grade equivalency is: \" + mathAppliedArrayM[mathAppliedM]);\n\t\t\tSystem.out.println(\"Total Mathematics grade equivalency is: \" + gradeEquivalency);\n\t\t\tbreak;\n\t\t//In the case of test level D\t\n\t\tcase\"D\":\n\t\t\tdouble[] mathCompArrayD = {1.2, 1.2, 1.2, 1.2, 1.2, 1.9, 2.5, 2.7, 3.1, 3.4, 3.9, 4.4, 4.8, 5.1, 5.4, 6.0, 6.7, 7.4, 7.8, 8.4, 9.1, 10.2, 11.4, 12.9, 12.9, 12.9};\n\t\t\tdouble[] mathAppliedArrayD = {1.7, 1.7, 1.7, 1.7, 1.7, 1.7, 2.3, 3.3, 4.3, 5.0, 5.7, 6.0, 6.4, 7.1, 8.0, 9.0, 10.1, 10.8, 11.3, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9};\n\t\t\tdouble[][] totalMathD = {\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{1.5, 1.5, 1.5, 1.5, 1.5, 1.9, 2.1, 2.3, 2.4, 2.5, 2.5, 2.7, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.9, 4.2, 4.4, 4.7, 5.0, 5.7, 5.8},\n\t\t\t\t\t{2.0, 2.0, 2.0, 2.0, 2.0, 2.2, 2.4, 2.5, 2.8, 2.9, 3.1, 3.2, 3.3, 3.4, 3.7, 4.0, 4.2, 4.5, 4.7, 4.9, 5.1, 5.3, 5.6, 5.9, 6.9, 7.1},\n\t\t\t\t\t{2.3, 2.3, 2.3, 2.3, 2.3, 2.4, 2.8, 3.0, 3.2, 3.4, 3.5, 3.9, 4.1, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.1, 6.4, 7.1, 8.1, 8.2},\n\t\t\t\t\t{2.4, 2.4, 2.4, 2.4, 2.4, 2.5, 3.0, 3.3, 3.4, 3.7, 4.0, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.0, 6.3, 6.7, 7.1, 7.7, 8.9, 9.3},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.8, 3.2, 3.4, 3.8, 4.1, 4.4, 4.7, 4.9, 5.1, 5.3, 5.5, 5.7, 5.9, 6.1, 6.4, 6.8, 7.2, 7.6, 8.2, 9.5, 10.1},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 2.9, 3.3, 3.7, 4.1, 4.4, 4.7, 4.9, 5.1, 5.3, 5.6, 5.8, 6.0, 6.3, 6.5, 6.9, 7.2, 7.6, 8.0, 8.8, 10.3, 10.5},\n\t\t\t\t\t{2.6, 2.6, 2.6, 2.6, 2.6, 3.0, 3.4, 3.9, 4.4, 4.7, 4.9, 5.1, 5.3, 5.6, 5.8, 6.0, 6.3, 6.6, 7.0, 7.3, 7.6, 7.9, 8.3, 9.3, 10.8, 11.0},\n\t\t\t\t\t{2.8, 2.8, 2.8, 2.8, 2.8, 3.1, 3.6, 4.2, 4.6, 4.9, 5.1, 5.3, 5.6, 5.8, 6.0, 6.3, 6.6, 7.0, 7.3, 7.6, 7.9, 8.2, 8.9, 9.7, 11.2, 11.6},\n\t\t\t\t\t{2.9, 2.9, 2.9, 2.9, 2.9, 3.3, 3.9, 4.4, 4.8, 5.1, 5.3, 5.5, 5.8, 6.0, 6.3, 6.6, 7.0, 7.3, 7.6, 7.9, 8.2, 8.8, 9.4, 10.3, 11.8, 12.4},\n\t\t\t\t\t{3.0, 3.0, 3.0, 3.0, 3.0, 3.4, 4.2, 4.7, 5.0, 5.2, 5.5, 5.7, 6.0, 6.3, 6.6, 7.0, 7.3, 7.6, 7.8, 8.2, 8.8, 9.3, 10.0, 10.7, 12.4, 12.9},\n\t\t\t\t\t{3.1, 3.1, 3.1, 3.1, 3.1, 3.5, 4.4, 4.8, 5.2, 5.4, 5.7, 5.9, 6.2, 6.5, 6.9, 7.2, 7.6, 7.8, 8.2, 8.7, 9.2, 9.6, 10.4, 11.0, 12.9, 12.9},\n\t\t\t\t\t{3.2, 3.2, 3.2, 3.2, 3.2, 3.7, 4.6, 5.0, 5.3, 5.6, 5.9, 6.1, 6.4, 6.8, 7.2, 7.5, 7.8, 8.2, 8.7, 9.2, 9.5, 10.2, 10.7, 11.4, 12.9, 12.9},\n\t\t\t\t\t{3.3, 3.3, 3.3, 3.3, 3.3, 3.9, 4.7, 5.2, 5.5, 5.8, 6.1, 6.4, 6.8, 7.1, 7.5, 7.8, 8.1, 8.5, 9.2, 9.5, 10.1, 10.5, 11.0, 12.0, 12.9, 12.9},\n\t\t\t\t\t{3.4, 3.4, 3.4, 3.4, 3.4, 4.2, 4.9, 5.3, 5.7, 6.0, 6.3, 6.7, 7.1, 7.5, 7.7, 8.1, 8.4, 9.0, 9.4, 10.1, 10.5, 10.9, 11.4, 12.8, 12.9, 12.9},\n\t\t\t\t\t{3.6, 3.6, 3.6, 3.6, 3.6, 4.4, 5.1, 5.6, 5.9, 6.2, 6.7, 7.1, 7.4, 7.7, 8.1, 8.4, 9.0, 9.4, 10.0, 10.4, 10.9, 11.3, 12.2, 12.9, 12.9, 12.9},\n\t\t\t\t\t{3.9, 3.9, 3.9, 3.9, 3.9, 4.6, 5.3, 5.7, 6.1, 6.5, 7.0, 7.4, 7.7, 8.0, 8.3, 8.9, 9.4, 10.0, 10.4, 10.9, 11.2, 11.8, 12.8, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.1, 4.1, 4.1, 4.1, 4.1, 4.8, 5.5, 6.0, 6.4, 6.9, 7.4, 7.7, 8.0, 8.4, 9.0, 9.4, 10.1, 10.5, 10.9, 11.2, 11.8, 12.8, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.4, 4.4, 4.4, 4.4, 4.4, 5.1, 5.8, 6.3, 6.9, 7.4, 7.7, 8.1, 8.5, 9.2, 9.5, 10.2, 10.5, 11.0, 11.4, 12.0, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.8, 4.8, 4.8, 4.8, 4.8, 5.4, 6.2, 6.9, 7.5, 7.8, 8.2, 8.9, 9.3, 10.0, 10.4, 10.9, 11.2, 11.8, 12.4, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.2, 5.2, 5.2, 5.2, 5.2, 5.9, 7.1, 7.7, 8.2, 8.9, 9.4, 10.1, 10.5, 11.0, 11.4, 12.2, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{6.4, 6.4, 6.4, 6.4, 6.4, 7.5, 8.8, 9.8, 10.6, 11.2, 11.8, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t};\n\t\t\tSystem.out.println(\"Input number correct for Mathematics Computation.\");\n\t\t\tint mathCompD = input.nextInt();\n\t\t\tSystem.out.println(\"Input number correct for Applied Mathematics.\");\n\t\t\tint mathAppliedD = input.nextInt();\n\t\t\tgradeEquivalency = totalMathD [mathAppliedD][mathCompD];\n\t\t\tSystem.out.println(\"Mathematics Computation grade equivalency is: \" + mathCompArrayD[mathCompD]);\n\t\t\tSystem.out.println(\"Applied Mathematics grade equivalency is: \" + mathAppliedArrayD[mathAppliedD]);\n\t\t\tSystem.out.println(\"Total Mathematics grade equivalency is: \" + gradeEquivalency);\n\t\t\tbreak;\n\t\t//In the case of test level A\n\t\tcase\"A\":\n\t\t\tdouble[] mathCompArrayA = {1.8, 1.8, 1.8, 1.8, 1.8, 3.1, 4.2, 4.9, 5.3, 5.8, 6.3, 6.9, 7.4, 7.8, 8.1, 8.5, 9.0, 9.8, 10.4, 11.2, 12.1, 12.9, 12.9, 12.9, 12.9, 12.9};\n\t\t\tdouble[] mathAppliedArrayA = {2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 3.9, 5.4, 6.1, 6.7, 7.6, 8.6, 9.8, 10.6, 11.0, 11.7, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9};\n\t\t\tdouble[][] totalMathA = {\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.1, 2.1, 2.1, 2.1, 2.1, 2.8, 3.1, 3.4, 3.5, 3.9, 4.1, 4.3, 4.5, 4.6, 4.8, 4.9, 5.0, 5.2, 5.3, 5.5, 5.7, 5.9, 6.1, 6.7, 7.6, 8.9},\n\t\t\t\t\t{2.5, 2.5, 2.5, 2.5, 2.5, 3.3, 4.0, 4.5, 4.7, 5.0, 5.2, 5.3, 5.5, 5.6, 5.8, 5.9, 6.1, 6.3, 6.4, 6.8, 7.1, 7.4, 7.7, 8.2, 9.7, 11.2},\n\t\t\t\t\t{2.8, 2.8, 2.8, 2.8, 2.8, 3.9, 4.7, 5.1, 5.3, 5.6, 5.7, 5.9, 6.1, 6.3, 6.5, 6.7, 7.1, 7.2, 7.5, 7.7, 8.0, 8.2, 8.9, 9.6, 11.0, 12.9},\n\t\t\t\t\t{3.0, 3.0, 3.0, 3.0, 3.0, 4.4, 5.0, 5.4, 5.7, 5.9, 6.2, 6.4, 6.7, 6.9, 7.1, 7.4, 7.6, 7.8, 8.1, 8.2, 8.8, 9.3, 9.8, 10.5, 12.2, 12.9},\n\t\t\t\t\t{3.1, 3.1, 3.1, 3.1, 3.1, 4.7, 5.3, 5.7, 6.0, 6.3, 6.6, 6.9, 7.1, 7.4, 7.6, 7.8, 8.0, 8.2, 8.7, 9.2, 9.4, 10.0, 10.5, 11.1, 12.9, 12.9},\n\t\t\t\t\t{3.3, 3.3, 3.3, 3.3, 3.3, 4.9, 5.6, 6.0, 6.3, 6.7, 7.1, 7.3, 7.5, 7.7, 8.0, 8.2, 8.4, 8.9, 9.2, 9.5, 10.1, 10.5, 11.0, 11.8, 12.9, 12.9},\n\t\t\t\t\t{3.4, 3.4, 3.4, 3.4, 3.4, 5.1, 5.7, 6.2, 6.7, 7.1, 7.4, 7.6, 7.8, 8.0, 8.2, 8.7, 9.0, 9.3, 9.6, 10.1, 10.5, 10.9, 11.4, 12.4, 12.9, 12.9},\n\t\t\t\t\t{3.5, 3.5, 3.5, 3.5, 3.5, 5.2, 6.0, 6.4, 7.0, 7.4, 7.6, 7.8, 8.1, 8.3, 8.8, 9.2, 9.4, 9.7, 10.2, 10.5, 10.9, 11.2, 12.0, 12.9, 12.9, 12.9},\n\t\t\t\t\t{3.7, 3.7, 3.7, 3.7, 3.7, 5.5, 6.2, 6.8, 7.2, 7.6, 7.8, 8.2, 8.4, 8.9, 9.2, 9.4, 9.8, 10.3, 10.5, 10.9, 11.2, 11.8, 12.6, 12.9, 12.9, 12.9},\n\t\t\t\t\t{3.9, 3.9, 3.9, 3.9, 3.9, 5.6, 6.4, 7.1, 7.5, 7.8, 8.2, 8.4, 8.9, 9.2, 9.5, 10.0, 10.3, 10.5, 10.9, 11.2, 11.8, 12.4, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.1, 4.1, 4.1, 4.1, 4.1, 5.8, 6.7, 7.3, 7.7, 8.1, 8.4, 8.9, 9.2, 9.5, 10.0, 10.3, 10.5, 10.9, 11.2, 11.6, 12.2, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.3, 4.3, 4.3, 4.3, 4.3, 5.9, 7.0, 7.6, 8.0, 8.3, 8.9, 9.3, 9.5, 10.1, 10.4, 10.5, 10.9, 11.2, 11.6, 12.2, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.5, 4.5, 4.5, 4.5, 4.5, 6.1, 7.2, 7.8, 8.2, 8.8, 9.3, 9.5, 10.1, 10.4, 10.6, 11.0, 11.2, 11.8, 12.2, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.7, 4.7, 4.7, 4.7, 4.7, 6.4, 7.5, 8.1, 8.8, 9.2, 9.6, 10.1, 10.4, 10.7, 11.0, 11.3, 11.8, 12.4, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{4.9, 4.9, 4.9, 4.9, 4.9, 6.7, 7.7, 8.3, 9.2, 9.5, 10.2, 10.5, 10.8, 11.0, 11.4, 11.8, 12.4, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.0, 5.0, 5.0, 5.0, 5.0, 7.1, 8.1, 8.9, 9.5, 10.2, 10.5, 10.9, 11.2, 11.6, 12.0, 12.4, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.2, 5.2, 5.2, 5.2, 5.2, 7.4, 8.4, 9.4, 10.1, 10.5, 11.0, 11.3, 11.8, 12.4, 12.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.5, 5.5, 5.5, 5.5, 5.5, 7.7, 9.2, 10,1, 10.6, 11.0, 11.6, 12.0, 12.6, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{5.8, 5.8, 5.8, 5.8, 5.8, 8.2, 9.7, 10.6, 11.2, 11.8, 12.6, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{6.4, 6.4, 6.4, 6.4, 6.4, 9.4, 10.9, 11.8, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t\t\t{7.6, 7.6, 7.6, 7.6, 7.6, 11.0, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9, 12.9},\n\t\t\t};\n\t\t\tSystem.out.println(\"Input number correct for Mathematics Computation.\");\n\t\t\tint mathCompA = input.nextInt();\n\t\t\tSystem.out.println(\"Input number correct for Applied Mathematics.\");\n\t\t\tint mathAppliedA = input.nextInt();\n\t\t\tgradeEquivalency = totalMathA[mathAppliedA][mathCompA];\n\t\t\tSystem.out.println(\"Mathematics Computation grade equivalency is: \" + mathCompArrayA[mathCompA]);\n\t\t\tSystem.out.println(\"Applied Mathematics grade equivalency is: \" + mathAppliedArrayA[mathAppliedA]);\n\t\t\tSystem.out.println(\"Total Mathematics grade equivalency is: \" + totalMathA[mathAppliedA][mathCompA]);\n\t\t\tbreak;\t\t\t\n\t\t}\n\t}", "@Override\n public int compare(Sample s1, Sample s2) {\n if (s1.positive_features.size() < s2.positive_features.size())\n return -1;\n else if (s1.positive_features.size() > s2.positive_features.size())\n return +1;\n else {\n for (int i = 0; i < s1.positive_features.size(); i++) {\n int v1 = s1.positive_features.get(i);\n int v2 = s2.positive_features.get(i);\n if (v1 < v2) return -1;\n if (v1 > v2) return +1;\n }\n return 0;\n }\n }", "public static HashMap<String, HashMap<String, Double>> fileToObv(String wordsPathName, String posPathName) throws IOException{\n //initialize BufferedReaders and ap to put observations in\n BufferedReader wordsInput = null;\n BufferedReader posInput = null;\n HashMap<String, HashMap<String, Double>> observations = new HashMap<String, HashMap<String, Double>>();\n try{\n //try to open files\n posInput = new BufferedReader(new FileReader(posPathName));\n wordsInput = new BufferedReader(new FileReader(wordsPathName));\n String posLine = posInput.readLine();\n String wordsLine = wordsInput.readLine();\n //While there are more lines in each of the given files\n while (wordsLine != null && posLine != null){\n //Lowercase the sentence file, and split both on white space\n wordsLine = wordsLine.toLowerCase();\n //posLine = posLine.toLowerCase();\n String[] wordsPerLine = wordsLine.split(\" \");\n String[] posPerLine = posLine.split(\" \");\n //Checks for the '#' character, if it's already in the map,\n //checks if the first word in the sentence is already in the inner map\n //if it is, then add 1 to the integer value associated with it, if not,\n //add it to the map with an integer value of 1.0\n if (observations.containsKey(\"#\")){\n HashMap<String, Double> wnc = new HashMap<String, Double>();\n wnc = observations.get(\"#\");\n if (wnc.containsKey(wordsPerLine[0])){\n Double num = wnc.get(wordsPerLine[0]) +1;\n wnc.put(wordsPerLine[0], num);\n observations.put(\"#\", wnc);\n }\n else{\n wnc.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", wnc);\n }\n }\n else{\n HashMap<String, Double> map = new HashMap<String, Double>();\n map.put(wordsPerLine[0], 1.0);\n observations.put(\"#\", map);\n }\n //for each word in line of the given string\n for (int i = 0; i < wordsPerLine.length-1; i ++){\n HashMap<String, Double> wordsAndCounts = new HashMap<String, Double>();\n //if the map already contains the part of speech\n if (observations.containsKey(posPerLine[i])){\n //get the inner map associated with that part of speech\n wordsAndCounts = observations.get(posPerLine[i]);\n //if that inner map contains the associated word\n //add 1 to the integer value\n if (wordsAndCounts.containsKey(wordsPerLine[i])){\n Double num = wordsAndCounts.get(wordsPerLine[i]) + 1;\n wordsAndCounts.put(wordsPerLine[i], num);\n }\n //else, add the word to the inner map with int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n }\n //else, add the word to an empty map with the int value of 1\n else{\n wordsAndCounts.put(wordsPerLine[i], 1.0);\n }\n //add the part of speech and associated inner map to the observations map.\n observations.put(posPerLine[i], wordsAndCounts);\n }\n //read the next lines in each of the files\n posLine = posInput.readLine();\n wordsLine = wordsInput.readLine();\n }\n }\n //Catch exceptions\n catch (IOException e){\n e.printStackTrace();\n }\n //close files\n finally{\n wordsInput.close();\n posInput.close();\n }\n //return created map\n return observations;\n }", "@Override\r\n\tpublic String getSimilarityExplained(String string1, String string2) {\r\n //todo this should explain the operation of a given comparison\r\n return null; //To change body of implemented methods use File | Settings | File Templates.\r\n }", "public Set<String> calculateDistance() throws IOException {\n booleanSearch();\n\n Set<String> words = invertedIndexForQuerryWords.keySet();\n Map<String, Double> tfidfQuerry = new TreeMap<>();\n\n //load idf\n char c='a';\n char prC = 'v';\n for (String word : words){\n c = word.charAt(0);\n if(c != prC) {\n String path = Constants.PATH_TO_IDF + c + \"IDF.idf\";\n prC = c;\n idfMap.putAll(objectMapper.readValue(new File(path), new TypeReference<TreeMap<String, Double>>(){}));\n }\n }\n\n Map<String, Double> distanceMap = new HashMap<>();\n double sum = 0.0;\n //calculez norma interogarii\n for(String word:words){\n double idf, tf;\n if(idfMap.containsKey(word)) {\n idf = idfMap.get(word);\n tf = 1.0 / words.size();\n tfidfQuerry.put(word, tf * idf);\n\n sum += (tf * idf) * (tf * idf);\n } else {\n sum += 0.0;\n }\n }\n\n double normQuerry = Math.sqrt(sum);\n\n //iau toate documentele rezultate din boolean search\n Set<String> docs = new TreeSet<>();\n for(List<MyPair> list : invertedIndexForQuerryWords.values()) {\n if (list != null) {\n docs.addAll(list.stream().map(p -> p.getKey()).collect(Collectors.toSet()));\n }\n }\n\n List<File> documents = FileLoader.getFilesForInternalPath(\"Norms\", \".norm\");\n\n Map<String, Double> norms = new HashMap<>();\n for(File file : documents) {\n norms.putAll(objectMapper.readValue(file, new TypeReference<TreeMap<String, Double>>(){}));\n }\n\n //pentru fiecare document din boolean search calculez distanta cosinus\n for(String doc : docs) {\n\n String fileName = Paths.get(doc).getFileName().toString();\n\n String filePath = Constants.PATH_TO_TF + fileName.replaceFirst(\"[.][^.]+$\", \".tf\");\n\n Map<String, Double> tf = objectMapper.readValue(new File(filePath), new TypeReference<TreeMap<String, Double>>(){});\n double wordTF, wordIDF;\n double vectorialProduct = 0.0;\n double tfidfForQueryWord;\n\n for(String word : words) {\n if (tf.containsKey(word)) {\n wordTF = tf.get(word);\n wordIDF = idfMap.get(word);\n tfidfForQueryWord = tfidfQuerry.get(word);\n\n vectorialProduct += tfidfForQueryWord * wordIDF * wordTF;\n }\n }\n\n double normProduct = normQuerry * norms.get(Paths.get(doc).getFileName().toString());\n\n distanceMap.put(doc, vectorialProduct / normProduct);\n }\n\n //sortare distance map\n distanceMap = distanceMap.entrySet().stream()\n .sorted(Map.Entry.comparingByValue(Collections.reverseOrder()))\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n Map.Entry::getValue,\n (e1, e2) -> e1,\n LinkedHashMap::new));\n\n// System.out.println(\"Cos distance:\");\n// for(Map.Entry entry : distanceMap.entrySet()){\n// System.out.println(entry);\n// }\n\n return distanceMap.keySet();\n }", "private float similarity(PetriNet pn1, PetriNet pn2, int internal) {\n\t\tNewPtsSet nps1 = computeSequenceSet(pn1);\n\t\tNewPtsSet nps2 = computeSequenceSet(pn2);\n\t\tdouble[][] seqM = computeSeqMatrix(nps1, nps2);\n\t\tdouble sim = computeSimilarityForTwoNet_Astar(seqM, nps1, nps2);\n\t\treturn (float) sim;\n\t}", "public void getCosineSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n//\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += userRate * list.get(j).getValue();\r\n\t\t\t\t\t\tb += userRate * userRate;\r\n\t\t\t\t\t\tc += list.get(j).getValue() * list.get(j).getValue();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && b == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && c != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\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\n public double score(Map<BasedMining, Map<BasedMining, RateEvent>> preferences,\n BasedMining item1,\n BasedMining item2) {\n var sharedInnerItems = new ArrayList<BasedMining>();\n\n preferences.get(item1).forEach((innerItem, rateEvent) -> {\n if (preferences.get(item2).get(innerItem) != null) {\n sharedInnerItems.add(innerItem);\n }\n });\n\n// If they have no rating in common, return 0\n if (sharedInnerItems.size() > 0)\n return 0;\n\n// Add up the square of all the differences\n var sumOfSquares = preferences.get(item1).entrySet()\n .stream()\n .filter(entry -> preferences.get(item2).get(entry.getKey()) != null)\n .mapToDouble(entry -> Math.pow((entry.getValue().getRating() - preferences.get(item2).get(entry.getKey()).getRating()), 2.0))\n .sum();\n\n return 1 / (1 + sumOfSquares);\n }", "double getScore(IToken tk1, IToken tk2);", "private void updateScoreRatios(IGame game, boolean addToTotal) {\n int player1Score = getScore(game, game.getPlayer1());\n int player2Score = getScore(game, game.getPlayer2());\n int difference = Math.abs(player1Score - player2Score);\n\n IPlayer player1 = game.getPlayer1();\n IPlayer player2 = game.getPlayer2();\n\n logger.info(player1 + \" has scored \" + player1Score + \" in total\");\n logger.info(player2 + \" has scored \" + player2Score + \" in total\");\n\n if (player1Score > player2Score) {\n\n if (addToTotal) {\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n }\n\n } else if (player2Score > player1Score) {\n if (addToTotal) {\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n }\n }\n }", "public static int[] mucScore(LeanDocument key, LeanDocument response)\n{\n // System.out.println(\"==========================================================\");\n // System.out.println(\"Key:\\n\"+key.toStringNoSing()+\"\\n*************************\\nResponse:\\n\"+response.toStringNoSing());\n\n Iterator<TreeMap<Integer, Integer>> goldChains = key.chainIterator();\n // double mucRecall = 0.0;\n int mucRecallNom = 0;\n int mucRecallDenom = 0;\n while (goldChains.hasNext()) {\n TreeMap<Integer, Integer> keyChain = goldChains.next();\n if (keyChain.size() > 1) {\n int numInt = numIntersect(key, keyChain, response);\n\n // int numMatched = getNumMatched(key, keyChain);\n // if(numMatched>0){\n // mucRecallNom += numMatched-numInt;\n mucRecallNom += (keyChain.size() - numInt);\n // mucRecallDenom += numMatched-1;\n mucRecallDenom += keyChain.size() - 1;\n\n // System.out.println(keyChain+\"\\n\"+(keyChain.size() - numInt)+\"/\"+(keyChain.size()-1));\n // }\n }\n }\n int[] result = { mucRecallNom, mucRecallDenom };\n\n return result;\n}", "public double getNormalizedCount(String word1, String word2) {\n// double normalizedCount = 0;\n// // YOUR CODE HERE\n// return normalizedCount;\n \n double normalizedCount = 0;\n // YOUR CODE HERE\n if (KnownWord(word1) && KnownWord(word2)) {\n normalizedCount = bi_grams_normalized[NDTokens.indexOf(word1)][NDTokens.indexOf(word2)];\n } else {\n if(smooth) {\n double temp = (!KnownWord(word1)) ? 0 : uni_grams[NDTokens.indexOf(word1)];\n double sum = temp+NDTokens_size;\n normalizedCount = 1/sum;\n }\n }\n return normalizedCount;\n \n }", "@Override\n protected float score(BasicStats stats, float termFreq, float docLength) {\n double s = 0.75;\n\n long N = stats.getNumberOfDocuments();\n long df = stats.getDocFreq();\n float cwd = termFreq;\n float cwq = 1; //assume that the query term frequency is always one\n float n = docLength;\n float navg = stats.getAvgFieldLength();\n\n double p1 = (1+Math.log(1+Math.log(cwd)))/(1-s+s*n/navg);\n float ans = (float) (p1 * cwq * Math.log((N+1)/df));\n\n return ans;\n }", "public double computeSimilarity(int[] cluster1, int[] cluster2);", "@Override\n\tprotected List<Double> computeRelatedness(Page page1, Page page2) throws WikiApiException {\n List<Double> relatednessValues = new ArrayList<Double>();\n\n Set<Category> categories1 = relatednessUtilities.getCategories(page1);\n Set<Category> categories2 = relatednessUtilities.getCategories(page2);\n\n if (categories1 == null || categories2 == null) {\n return null;\n }\n\n Category root = wiki.getMetaData().getMainCategory();\n // test whether the root category is in this graph\n if (!catGraph.getGraph().containsVertex(root.getPageId())) {\n logger.error(\"The root node is not part of this graph. Cannot compute Lin relatedness.\");\n return null;\n }\n\n for (Category cat1 : categories1) {\n for (Category cat2 : categories2) {\n // get the lowest common subsumer (lcs) of the two categories\n Category lcs = catGraph.getLCS(cat1, cat2);\n\n if (lcs == null) {\n continue;\n }\n\n // lin(c1,c2) = 2 * ic ( lcs(c1,c2) ) / IC(c1) + IC(c2)\n double intrinsicIcLcs = catGraph.getIntrinsicInformationContent(lcs);\n double intrinsicIcCat1 = catGraph.getIntrinsicInformationContent(cat1);\n double intrinsicIcCat2 = catGraph.getIntrinsicInformationContent(cat2);\n\n double relatedness = 0.0;\n if (intrinsicIcCat1 != 0 && intrinsicIcCat2 != 0) {\n relatedness = 2 * intrinsicIcLcs / (intrinsicIcCat1 + intrinsicIcCat2);\n }\n\n relatednessValues.add(relatedness);\n }\n }\n\n logger.debug(relatednessValues);\n return relatednessValues;\n }", "public static void relprecision() throws IOException \n\t{\n\t \n\t\t\n\t\tMap<String,Map<String,List<String>>> trainset = null ; \n\t\t//Map<String, List<String>> titles = ReadXMLFile.ReadCDR_TestSet_BioC() ;\n\t File fFile = new File(\"F:\\\\eclipse64\\\\data\\\\labeled_titles.txt\");\n\t // File fFile = new File(\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelation\");\n\t List<String> sents = readfiles.readLinesbylines(fFile.toURL());\n\t\t\n\t\tSentinfo sentInfo = new Sentinfo() ; \n\t\t\n\t\t//trainset = ReadXMLFile.DeserializeT(\"F:\\\\eclipse64\\\\eclipse\\\\TrainsetTest\") ;\n\t\tLinkedHashMap<String, Integer> TripleDict = new LinkedHashMap<String, Integer>();\n\t\tMap<String,List<Integer>> Labeling= new HashMap<String,List<Integer>>() ;\n\t\t\n\t\tMetaMapApi api = new MetaMapApiImpl();\n\t\tList<String> theOptions = new ArrayList<String>();\n\t theOptions.add(\"-y\"); // turn on Word Sense Disambiguation\n\t theOptions.add(\"-u\"); // unique abrevation \n\t theOptions.add(\"--negex\"); \n\t theOptions.add(\"-v\");\n\t theOptions.add(\"-c\"); // use relaxed model that containing internal syntactic structure, such as conjunction.\n\t if (theOptions.size() > 0) {\n\t api.setOptions(theOptions);\n\t }\n\t \n\t\t\n\t\t\n\t\t\n\t\tint count = 0 ;\n\t\tint count1 = 0 ;\n\t\tModel candidategraph = ModelFactory.createDefaultModel(); \n\t\tMap<String,List<String>> TripleCandidates = new HashMap<String, List<String>>();\n\t\tList<String> statements= new ArrayList<String>() ;\n\t\tList<String> notstatements= new ArrayList<String>() ;\n\t\tDouble TPcount = 0.0 ; \n\t\tDouble FPcount = 0.0 ;\n\t\tDouble NonTPcount = 0.0 ;\n\t\tDouble TPcountTot = 0.0 ; \n\t\tDouble NonTPcountTot = 0.0 ;\n\t\tfor(String title : sents)\n\t\t{\n\t\t\t\n\t\t\tif (title.contains(\"<YES>\") || title.contains(\"<TREAT>\") || title.contains(\"<DIS>\") || title.contains(\"</\"))\n\t\t\t{\n\t\t\t\n\t\t\t\tBoolean TP = false ; \n\t\t\t\tBoolean NonTP = false ;\n\t if (title.contains(\"<YES>\") && title.contains(\"</YES>\"))\n\t {\n\t \t TP = true ; \n\t \t TPcountTot++ ; \n\t \t \n\t }\n\t else\n\t {\n\t \t NonTP = true ; \n\t \t NonTPcountTot++ ; \n\t }\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\ttitle = title.replaceAll(\"<YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</YES>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</TREAT>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"<DIS>\", \" \") ;\n\t\t\t\ttitle = title.replaceAll(\"</DIS>\", \" \") ;\n\t\t\t\ttitle = title.toLowerCase() ;\n\t\n\t\t\t\tcount++ ; \n\t\n\t\t\t\t// get the goldstandard concepts for current title \n\t\t\t\tList<String> GoldSndconcepts = new ArrayList<String> () ;\n\t\t\t\tMap<String, Integer> allconcepts = null ; \n\t\t\t\t\n\t\t\t\t// this is optional and not needed here , it used to measure the concepts recall \n\t\t\t\tMap<String, List<String>> temptitles = new HashMap<String, List<String>>(); \n\t\t\t\ttemptitles.put(title,GoldSndconcepts) ;\n\t\t\t\t\t\t\t\n\t\t\t\t// get the concepts \n\t\t\t\tallconcepts = ConceptsDiscovery.getconcepts(temptitles,api);\n\t\t\t\t\n\t\t\t\tArrayList<String> RelInstances1 = SyntaticPattern.getSyntaticPattern(title,allconcepts,dataset.FILE_NAME_Patterns) ;\n\t\t\t\t//Methylated-CpG island recovery assay: a new technique for the rapid detection of methylated-CpG islands in cancer\n\t\t\t\tif (RelInstances1 != null && RelInstances1.size() > 0 )\n\t\t\t\t{\n\t\t\t\t\tTripleCandidates.put(title, RelInstances1) ;\n\t\t\t\t\tReadXMLFile.Serialized(TripleCandidates,\"F:\\\\eclipse64\\\\eclipse\\\\TreatRelationdisc\") ;\n\t\t\t\t\t\n\t\t\t if (TP )\n\t\t\t {\n\t\t\t \t TPcount++ ; \n\t\t\t \t \n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \t FPcount++ ; \n\t\t\t }\n\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t notstatements.add(title) ;\n\t\t\t\t}\n\t\t\t}\n \n\t\t}\n\t\tint i = 0 ;\n\t\ti++ ; \n\t}", "private OCCTPair<Double, Integer> calculateSplitScoreInternal(Instances i1, Instances i2)\n throws Exception {\n // Handle empty case\n double sumOfScores = 0;\n int comparisonsCount = 0;\n if ((i1.numInstances()) > 0 && (i2.numInstances() > 0)) {\n // Calculate the sum of similarities of all possible pairs of records,\n Enumeration inst1Enum = i1.enumerateInstances();\n while (inst1Enum.hasMoreElements()) {\n Instance currentI1 = (Instance) inst1Enum.nextElement();\n Enumeration inst2Enum = i2.enumerateInstances();\n while (inst2Enum.hasMoreElements()) {\n Instance currentI2 = (Instance) inst2Enum.nextElement();\n sumOfScores += this.calculateSplitScoreForInstancesPair(currentI1, currentI2);\n ++comparisonsCount;\n }\n }\n }\n // Return the result - don't calculate here the final score\n return new OCCTPair<Double, Integer>(sumOfScores, comparisonsCount);\n }", "public int scoreLeafNode();" ]
[ "0.67399937", "0.576408", "0.5685069", "0.56772166", "0.5584238", "0.5535638", "0.55006737", "0.5490995", "0.5431398", "0.54113203", "0.54094785", "0.53361464", "0.53195125", "0.53123677", "0.5281552", "0.52717215", "0.52138233", "0.5182461", "0.51541466", "0.5153789", "0.514829", "0.5138072", "0.5114694", "0.5114402", "0.50859153", "0.5080539", "0.50715", "0.5070653", "0.5064655", "0.506442", "0.50392807", "0.5028518", "0.5024841", "0.50205475", "0.5019898", "0.501964", "0.5010506", "0.49880153", "0.49735156", "0.4965199", "0.49582532", "0.4939172", "0.4932783", "0.4913294", "0.48941815", "0.4884878", "0.48847362", "0.4871913", "0.4871202", "0.48646775", "0.48637813", "0.48568723", "0.4850222", "0.48487398", "0.4838499", "0.48351526", "0.48297504", "0.48289767", "0.4827164", "0.48163038", "0.48086828", "0.48086768", "0.48044157", "0.4804155", "0.4803265", "0.47941226", "0.4785328", "0.47840568", "0.4775199", "0.47725534", "0.4767159", "0.4766906", "0.47656018", "0.47616023", "0.47551143", "0.47536525", "0.47467533", "0.47366318", "0.47345313", "0.47242683", "0.47232583", "0.47183627", "0.47067913", "0.47035757", "0.47029364", "0.4702902", "0.46927148", "0.46878478", "0.46868077", "0.4678024", "0.46779314", "0.46760735", "0.46750122", "0.46747214", "0.4673079", "0.46715626", "0.46618578", "0.46567923", "0.4656121", "0.46530998" ]
0.6514118
1
A getter function for the LD results.
public double getScoreForLD() { return scoreForLD; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getLastrunresult();", "double getResult() {\r\n\t\treturn result;\r\n\t}", "public Result getResults()\r\n {\r\n return result;\r\n }", "public abstract int getLapResult();", "public double getResult() {\n\t\treturn result; // so that skeleton code compiles\n\t}", "public Double getResult();", "Variable getReturn();", "R getValue();", "protected R getResult() {\n\t\treturn result;\n\t}", "public String getLovResult() {\r\n\t\treturn lovResult;\r\n\t}", "double get();", "@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}", "public String getResults() {\r\n return returnObject.getResults();\r\n }", "public double getL() {\n return l;\n }", "public int getresult(){\n return result;}", "public long getValue();", "public java.lang.String getGetsfzyResult() {\r\n return localGetsfzyResult;\r\n }", "int getResultValue();", "int getResultValue();", "public int getResult(){\n return localResult;\n }", "public Object getResult() {\n if (result == null) {\n return defaultResult();\n } else {\n return result;\n }\n }", "public List<Integer> Result()\n\t{\n\t\treturn result;\n\t}", "@Override\n\tpublic Result getResult() {\n\t\treturn m_Result;\n\t}", "public double[] getDoubles()\r\n {\r\n return resultDoubles;\r\n }", "public VData getResult() {\n\t\treturn mResult;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic String getResult() {\n\t\treturn this.result;\r\n\r\n\t}", "public java.lang.String getGetItemDataResult() {\r\n return localGetItemDataResult;\r\n }", "synchronized public Result getResult () {\n Result result = (Result) get (RESULT.toString());\n if (result == null) {\n result = new Result();\n put (RESULT.toString(), result);\n }\n return result;\n }", "public int getResult(){\r\n\t\t return result;\r\n\t }", "public Result getResult() {\n\t\treturn this._result;\n\t}", "public Result getResult() {\n return result;\n }", "String getLo();", "double getDoubleValue1();", "int getResult() {\n return result;\n }", "public List<Person> getResults() {\n\t\treturn mResult;\n\t}", "public long result(){\n long result = 0L;\n int one = 1;\n \n result = result(one, one, result);\n \n return result;\n }", "public Result getResult() {\n return result;\n }", "public abstract R getValue();", "public T getResult() {\n return result;\n }", "public T getResult() {\n return result;\n }", "Result getResult();", "public Fact get_return() {\r\n return local_return;\r\n }", "public java.lang.String getGetGhlbResult() {\r\n return localGetGhlbResult;\r\n }", "public String getResult();", "public String getResult();", "public String getResult();", "static public LinkedList<CUser> getResult() {\r\n\t\treturn result;\r\n\t}", "public double getResult()\n { \n return answer;\n }", "double getValue(int id);", "public E getResult(){\r\n\t\treturn this.result;\r\n\t}", "public ResultType getResult() {\r\n return result;\r\n }", "public String getResult()\r\n\t{\r\n\t\treturn result;\r\n\t}", "float getLte();", "public abstract long getValue();", "public abstract long getValue();", "public StepResult getStepResult(String identifier)\n {\n return results.get(identifier);\n }", "public Object getResult(final SessionContext ctx)\n\t{\n\t\treturn getProperty( ctx, RESULT);\n\t}", "public ReturnValueNode getRVN(ProgramLocation mc) {\n return (ReturnValueNode) callToRVN.get(mc);\n }", "protected SimulatorValue giveResult() {\n\tthis.evalExpression();\n\treturn value;\n }", "public T result() {\n return result;\n }", "public download.Map getResult() {\n return result;\n }", "public ArrayList<R> getResults() {\n return results;\n }", "public long getValue()\n {\n return itsValue;\n }", "double getValue();", "double getValue();", "double getValue();", "public TResult getResult() {\n return result;\n }", "public double getValue();", "@Override\r\n\tpublic ArrayList<ArrayList<Value>> getResults(Value[] quad) throws IOException {\n\t\treturn null;\r\n\t}", "private RDFPairs getRDFPairs() {\n return this.rdfPairs;\n }", "public String getResult()\n {\n return result;\n }", "public T getResult();", "public native String getResult() /*-{\n\t\treturn this.target.result;\n\t}-*/;", "public Map<String, Result> getResults() {\n return results;\n }", "double getDoubleValue2();", "List<T> getResults();", "@Override\n\tpublic Long get() {\n\t\tlong f=f3+f2+f1;\n\t\tf3=f2;\n\t\tf2=f1;\n\t\tf1=f;\n\t\treturn f;\n\t}", "int getResult();", "public java.lang.String getGetDoctorDeResult() {\r\n return localGetDoctorDeResult;\r\n }", "public final LearningObjectMetadataEntity getLomd() {\n return this.lomd;\n }", "protected T retrieve() {\n return _result;\n }", "@Override\r\n\tpublic Porduct GetResult() {\n\t\treturn product;\r\n\t}", "public double[] getOutputRealValues(){\r\n\t\treturn realValues[1];\r\n\t}", "public double getValue()\n\t{\n\t\treturn ifD1.getValue();// X100 lux\n\t}", "java.lang.String getResult();", "double getDoubleValue3();", "public Facts get_return() {\r\n return local_return;\r\n }", "float getEvaluationResult();", "@VTID(14)\r\n double getValue();", "public double get(int propId)\n {\n \n double retVal = get_0(nativeObj, propId);\n \n return retVal;\n }", "public String getResult() {\n return result;\n }", "public String getResult() {\n return result;\n }", "public String getResult() {\n return result;\n }", "public ValueType getResultValue() {\n\t\treturn this.value;\n\t}", "public java.lang.String getGetYYT_YDBGResult() {\r\n return localGetYYT_YDBGResult;\r\n }", "public Map<String, StepResult> getResults()\n {\n return results;\n }", "public final Map<Agent, ReplicationResult> getResults() {\n return this.results;\n }", "public Integer get_ldcount()\r\n\t{\r\n\t\treturn this.ldcount;\r\n\t}", "public long getLA() {\n return la;\n }", "public int getResult() {\n return result;\n }" ]
[ "0.64709175", "0.63382155", "0.62771857", "0.62770903", "0.6262138", "0.62347054", "0.60562533", "0.6047397", "0.59989834", "0.59968984", "0.59006363", "0.5881551", "0.5859362", "0.5838118", "0.58114564", "0.57952374", "0.57719696", "0.5767604", "0.5767604", "0.5765196", "0.5734187", "0.57335615", "0.5731662", "0.5690597", "0.56737417", "0.5669011", "0.5662717", "0.56537527", "0.5637886", "0.5633776", "0.56282854", "0.5627384", "0.5616687", "0.56108034", "0.5599641", "0.55970496", "0.5592994", "0.55907136", "0.55851114", "0.55851114", "0.5581075", "0.5579619", "0.55763954", "0.55698544", "0.55698544", "0.55698544", "0.5563893", "0.5558156", "0.5544458", "0.554318", "0.55418426", "0.5541296", "0.553411", "0.5521712", "0.5521712", "0.55191445", "0.55149305", "0.5512087", "0.55032235", "0.55019027", "0.5501016", "0.5499262", "0.5493415", "0.549281", "0.549281", "0.549281", "0.5488384", "0.54862386", "0.548159", "0.547516", "0.547185", "0.5467532", "0.5465792", "0.54531854", "0.54494715", "0.54390925", "0.54387474", "0.54355747", "0.54313385", "0.54241705", "0.540004", "0.5388087", "0.5387005", "0.53817284", "0.5380656", "0.53771144", "0.53761977", "0.53710556", "0.5363281", "0.536296", "0.53598124", "0.53598124", "0.53598124", "0.5359719", "0.53577644", "0.53480595", "0.5343452", "0.5342806", "0.53386736", "0.53372824" ]
0.602021
8
A getter function for the LCS results.
public double getScoreForLCS() { return scoreForLCS; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getLastrunresult();", "public String getLovResult() {\r\n\t\treturn lovResult;\r\n\t}", "public Set<Cdss4NsarLabor> getLabResults();", "public abstract int getLapResult();", "public Result getResults()\r\n {\r\n return result;\r\n }", "public RLSClient.LRC getLRC() {\n return (this.isClosed()) ? null : mRLS.getLRC();\n }", "private Set getReportingLRC(){\n //sanity check\n if (this.isClosed()) {\n //probably an exception should be thrown here!!\n throw new RuntimeException(RLI_NOT_CONNECTED_MSG + this.mRLIURL);\n }\n Set result = new HashSet();\n Collection c = null;\n\n try{\n c = mRLI.lrcList();\n }\n catch(RLSException e){\n mLogger.log(\"getReportingLRC(Set)\",e,LogManager.ERROR_MESSAGE_LEVEL);\n }\n\n for(Iterator it = c.iterator(); it.hasNext();){\n RLSLRCInfo lrc = (RLSLRCInfo)it.next();\n result.add(lrc.url);\n }\n\n return result;\n }", "public Set list() {\n //sanity check\n if (this.isClosed()) {\n //probably an exception should be thrown here!!\n throw new RuntimeException(RLI_NOT_CONNECTED_MSG + this.mRLIURL);\n }\n Set result = new HashSet();\n String url = null,message = null;\n //we need to get hold of all the LRC\n //that report to the RLI and call the\n //list() method on each of them\n for(Iterator it = this.getReportingLRC().iterator();it.hasNext();){\n url = (String)it.next();\n message = \"Querying LRC \" + url;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,url);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + url,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n try{\n result.addAll(lrc.list());\n }\n catch(Exception e){\n mLogger.log(\"list()\",e,LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n lrc.close();\n }\n mLogger.log(message + LogManager.MESSAGE_DONE_PREFIX,LogManager.DEBUG_MESSAGE_LEVEL);\n }\n\n return result;\n }", "public java.lang.String getGetsfzyResult() {\r\n return localGetsfzyResult;\r\n }", "public String getResults() {\r\n return returnObject.getResults();\r\n }", "public Map lookup(Map constraints) {\n //sanity check\n if (this.isClosed()) {\n //probably an exception should be thrown here!!\n throw new RuntimeException(RLI_NOT_CONNECTED_MSG + this.mRLIURL);\n }\n Map result = new HashMap();\n String url = null,message = null;\n //we need to get hold of all the LRC\n //that report to the RLI and call the\n //list() method on each of them\n for(Iterator it = this.getReportingLRC().iterator();it.hasNext();){\n url = (String)it.next();\n message = \"Querying LRC \" + url;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,url);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + url,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n try{\n Map m = lrc.lookup(constraints);\n for(Iterator mit = m.entrySet().iterator();mit.hasNext();){\n Map.Entry entry = (Map.Entry)mit.next();\n //merge the entries into the main result\n String key = (String)entry.getKey(); //the lfn\n if(result.containsKey(key)){\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ((List)result.get(key)).addAll((List)entry.getValue());\n }\n else{\n result.put(key,entry.getValue());\n }\n }\n\n }\n catch(Exception e){\n mLogger.log(\"list(String)\",e,LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n lrc.close();\n }\n }\n\n return result;\n\n }", "public IScapSyncSearchResult[] getResults();", "public java.lang.String getDataFromLMS();", "public List<Integer> Result()\n\t{\n\t\treturn result;\n\t}", "List<T> getResults();", "public Vector getResultObjects() {\n\treturn _vcResults;\n }", "public int getLC() {\n return this.lc;\n }", "String getLo();", "static public LinkedList<CUser> getResult() {\r\n\t\treturn result;\r\n\t}", "public ArrayList<R> getResults() {\n return results;\n }", "@Override\n public List<CycleSlipDetectorResults> getResults() {\n return super.getResults();\n }", "public ArrayList<Integer> getResults(){\n return results;\n }", "public Collection<T> getResults();", "public String getcLsh() {\n return cLsh;\n }", "public String getcLsh() {\n return cLsh;\n }", "public String getcLsh() {\n return cLsh;\n }", "int getLac();", "public ResultsContainerI LSD() { Here all settings have been loaded already -- note that we should take a look at what\n\t\t// data the user has 'assigned', and make sure it makes sense\n\t\t//\n\n\t\tString[] lsdArgs = new String[ 2 ];\n\t\t\n\t\ttry {\n\n\t\t\t\n\t\t\tlsdArgs[ 0 ] = TDA.SETTING_TASKCHOICE + \"=\" + TDA.UI_TASK_LSD;\n\t\t\tlsdArgs[ 1 ] = TDA.SETTING_APPLICATIONMODE + \"=\" + TDA.UI_APPLICATIONMODE_API;\n\t\t\t\n\t\t\t\n\t\t\t// TODO to be on the safe side, examine the data that is used for running\n\t\t\t\n\t\t\t\n\t\t\tappTda_.assignData( lsdArgs );\n\t\t\tappTda_.executeTda();\n\t\t\tresultsContainer_ = appTda_.getResults();\n\t\t}\n\t\tcatch ( Exception e ) {\n\t\t\t\n\t\t\tresultsContainer_.addRegisteredResult( \n\t\t\t\t\tTDA.DATA_REGISTEREDRESULT_LSD_ERROR3,\n\t\t\t\t\te, \n\t\t\t\t\t\"[ERROR Tda.LSD()]\" );\n\t\t\t\n\t\t\tif ( TDA.DEBUG ) {\n\n\t\t\t\tSystem.out.println( \"[ERROR Tda.LSD-3] Exception encountered: \" + e.toString() );\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn resultsContainer_;\t\t\n\t}", "public String getGameResults(){\n \treturn this.gameResults;\n }", "public double getL() {\n return l;\n }", "java.lang.String getResult();", "public Set list(String constraint) {\n //sanity check\n if (this.isClosed()) {\n //probably an exception should be thrown here!!\n throw new RuntimeException(RLI_NOT_CONNECTED_MSG + this.mRLIURL);\n }\n Set result = new HashSet();\n String url = null,message = null;\n //we need to get hold of all the LRC\n //that report to the RLI and call the\n //list() method on each of them\n for(Iterator it = this.getReportingLRC().iterator();it.hasNext();){\n url = (String)it.next();\n message = \"Querying LRC \" + url;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,url);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + url,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n try{\n result.addAll(lrc.list(constraint));\n }\n catch(Exception e){\n mLogger.log(\"list(String)\",e,LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n lrc.close();\n }\n mLogger.log(message + LogManager.MESSAGE_DONE_PREFIX,LogManager.DEBUG_MESSAGE_LEVEL);\n }\n\n return result;\n }", "java.util.List<org.apache.calcite.avatica.proto.Responses.ResultSetResponse> \n getResultsList();", "public String getResult();", "public String getResult();", "public String getResult();", "public int getLC() {\n\treturn lc;\n }", "double getResult() {\r\n\t\treturn result;\r\n\t}", "public int getresult(){\n return result;}", "public IAstRlsString[] getRlsStrings();", "CParserResult getParserResult();", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic String getResult() {\n\t\treturn this.result;\r\n\r\n\t}", "public String getLsjgcc() {\n return lsjgcc;\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ScoreAnalysis getScoreAnalysis();", "public String getResult()\r\n\t{\r\n\t\treturn result;\r\n\t}", "public String getSclj() {\n return sclj;\n }", "public Map lookup(Set lfns) {\n //Map indexed by lrc url and each value a collection\n //of lfns that the RLI says are present in it.\n Map lrc2lfn = this.getLRC2LFNS(lfns);\n\n if(lrc2lfn == null){\n //probably RLI is not connected!!\n return null;\n }\n\n // now query the LRCs with the LFNs that they are responsible for\n // and aggregate stuff.\n String key = null;\n Map result = new HashMap(lfns.size());\n String message;\n for(Iterator it = lrc2lfn.entrySet().iterator();it.hasNext();){\n Map.Entry entry = (Map.Entry)it.next();\n key = (String)entry.getKey();\n message = \"Querying LRC \" + key;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,key);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + key,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n\n //query the lrc\n try{\n Map m = lrc.lookup((Set)entry.getValue());\n\n //figure out if we need to restrict our queries or not.\n //restrict means only include results if they have a site\n //handle associated\n boolean restrict = ( this.determineQueryType(key) == this.LRC_QUERY_RESTRICT );\n\n for(Iterator mit = m.entrySet().iterator();mit.hasNext();){\n entry = (Map.Entry)mit.next();\n List pfns = (( List )entry.getValue());\n if ( restrict ){\n //traverse through all the PFN's and check for resource handle\n for ( Iterator pfnIterator = pfns.iterator(); pfnIterator.hasNext(); ){\n ReplicaCatalogEntry pfn = (ReplicaCatalogEntry) pfnIterator.next();\n if ( pfn.getResourceHandle() == null ){\n //do not include in the results if the entry does not have\n //a pool attribute associated with it.\n mLogger.log(\"Ignoring entry \" + entry.getValue() +\n \" from LRC \" + key,\n LogManager.DEBUG_MESSAGE_LEVEL);\n pfnIterator.remove();\n }\n }\n\n }\n\n //if pfns are empty which could be due to\n //restriction case taking away all pfns\n //do not merge in result\n if( pfns.isEmpty() ){ continue; }\n\n //merge the entries into the main result\n key = (String)entry.getKey(); //the lfn\n if( result.containsKey(key) ){\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ((List)result.get(key)).addAll( pfns );\n }\n else{\n result.put( key, pfns );\n }\n }\n }\n catch(Exception ex){\n mLogger.log(\"lookup(Set)\",ex,LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n //disconnect\n lrc.close();\n }\n\n\n mLogger.log( message + LogManager.MESSAGE_DONE_PREFIX,LogManager.DEBUG_MESSAGE_LEVEL);\n }\n return result;\n }", "public Map lookup(Set lfns, String handle) {\n //Map indexed by lrc url and each value a collection\n //of lfns that the RLI says are present in it.\n Map lrc2lfn = this.getLRC2LFNS(lfns);\n if(lrc2lfn == null){\n //probably RLI is not connected!!\n return null;\n }\n\n // now query the LRCs with the LFNs they are responsible for\n // and aggregate stuff.\n String key = null,message = null;\n Map result = new HashMap(lfns.size());\n for(Iterator it = lrc2lfn.entrySet().iterator();it.hasNext();){\n Map.Entry entry = (Map.Entry)it.next();\n key = (String)entry.getKey();\n message = \"Querying LRC \" + key;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,key);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + key,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n\n //query the lrc\n try{\n Map m = lrc.lookup((Set)entry.getValue(),handle);\n for(Iterator mit = m.entrySet().iterator();mit.hasNext();){\n entry = (Map.Entry)mit.next();\n //merge the entries into the main result\n key = (String)entry.getKey(); //the lfn\n if(result.containsKey(key)){\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ((Set)result.get(key)).addAll((Set)entry.getValue());\n }\n else{\n result.put(key,entry.getValue());\n }\n }\n }\n catch(Exception ex){\n mLogger.log(\"lookup(Set,String)\",ex,\n LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n //disconnect\n lrc.close();\n }\n\n\n mLogger.log(message + LogManager.MESSAGE_DONE_PREFIX,LogManager.DEBUG_MESSAGE_LEVEL);\n }\n return result;\n\n\n }", "public IStatus getResult();", "public String getResult()\n {\n return result;\n }", "public int getResult(){\n return localResult;\n }", "public WsPmsResult get_return(){\n return local_return;\n }", "public WsPmsResult get_return(){\n return local_return;\n }", "public WsPmsResult get_return(){\n return local_return;\n }", "public WsPmsResult get_return(){\n return local_return;\n }", "public WsPmsResult get_return(){\n return local_return;\n }", "public WsPmsResult get_return(){\n return local_return;\n }", "public WsPmsResult get_return(){\n return local_return;\n }", "public WsPmsResult get_return(){\n return local_return;\n }", "public WsPmsResult get_return(){\n return local_return;\n }", "int getSs();", "public Map<String, Result> getResults() {\n return results;\n }", "public double getScoreForLD() {\n return scoreForLD;\n }", "public java.lang.String getGetChargetariffResult() {\r\n return localGetChargetariffResult;\r\n }", "private MrnWoatlas5[] doGet(Vector result) {\n if (dbg) System.out.println (\"vector size = \" + result.size());\n int latitudeCol = db.getColNumber(LATITUDE);\n int longitudeCol = db.getColNumber(LONGITUDE);\n int depthCol = db.getColNumber(DEPTH);\n int temperatureMinCol = db.getColNumber(TEMPERATURE_MIN);\n int temperatureMaxCol = db.getColNumber(TEMPERATURE_MAX);\n int salinityMinCol = db.getColNumber(SALINITY_MIN);\n int salinityMaxCol = db.getColNumber(SALINITY_MAX);\n int oxygenMinCol = db.getColNumber(OXYGEN_MIN);\n int oxygenMaxCol = db.getColNumber(OXYGEN_MAX);\n int nitrateMinCol = db.getColNumber(NITRATE_MIN);\n int nitrateMaxCol = db.getColNumber(NITRATE_MAX);\n int phosphateMinCol = db.getColNumber(PHOSPHATE_MIN);\n int phosphateMaxCol = db.getColNumber(PHOSPHATE_MAX);\n int silicateMinCol = db.getColNumber(SILICATE_MIN);\n int silicateMaxCol = db.getColNumber(SILICATE_MAX);\n int chlorophyllMinCol = db.getColNumber(CHLOROPHYLL_MIN);\n int chlorophyllMaxCol = db.getColNumber(CHLOROPHYLL_MAX);\n MrnWoatlas5[] cArray = new MrnWoatlas5[result.size()];\n for (int i = 0; i < result.size(); i++) {\n Vector row = (Vector) result.elementAt(i);\n cArray[i] = new MrnWoatlas5();\n if (latitudeCol != -1)\n cArray[i].setLatitude ((String) row.elementAt(latitudeCol));\n if (longitudeCol != -1)\n cArray[i].setLongitude ((String) row.elementAt(longitudeCol));\n if (depthCol != -1)\n cArray[i].setDepth ((String) row.elementAt(depthCol));\n if (temperatureMinCol != -1)\n cArray[i].setTemperatureMin((String) row.elementAt(temperatureMinCol));\n if (temperatureMaxCol != -1)\n cArray[i].setTemperatureMax((String) row.elementAt(temperatureMaxCol));\n if (salinityMinCol != -1)\n cArray[i].setSalinityMin ((String) row.elementAt(salinityMinCol));\n if (salinityMaxCol != -1)\n cArray[i].setSalinityMax ((String) row.elementAt(salinityMaxCol));\n if (oxygenMinCol != -1)\n cArray[i].setOxygenMin ((String) row.elementAt(oxygenMinCol));\n if (oxygenMaxCol != -1)\n cArray[i].setOxygenMax ((String) row.elementAt(oxygenMaxCol));\n if (nitrateMinCol != -1)\n cArray[i].setNitrateMin ((String) row.elementAt(nitrateMinCol));\n if (nitrateMaxCol != -1)\n cArray[i].setNitrateMax ((String) row.elementAt(nitrateMaxCol));\n if (phosphateMinCol != -1)\n cArray[i].setPhosphateMin ((String) row.elementAt(phosphateMinCol));\n if (phosphateMaxCol != -1)\n cArray[i].setPhosphateMax ((String) row.elementAt(phosphateMaxCol));\n if (silicateMinCol != -1)\n cArray[i].setSilicateMin ((String) row.elementAt(silicateMinCol));\n if (silicateMaxCol != -1)\n cArray[i].setSilicateMax ((String) row.elementAt(silicateMaxCol));\n if (chlorophyllMinCol != -1)\n cArray[i].setChlorophyllMin((String) row.elementAt(chlorophyllMinCol));\n if (chlorophyllMaxCol != -1)\n cArray[i].setChlorophyllMax((String) row.elementAt(chlorophyllMaxCol));\n } // for i\n return cArray;\n }", "@Override\r\n\tpublic String showResult() {\n\t\treturn rps.toString();\r\n\t}", "public java.lang.String getGetGhlbResult() {\r\n return localGetGhlbResult;\r\n }", "public String getResult() \n\t{\n\t\treturn strResult;\n\t}", "public Result() {\n getLatenciesSuccess = new ArrayList<Long>();\n getLatenciesFail = new ArrayList<Long>();\n postLatenciesSuccess = new ArrayList<Long>();\n postLatenciesFail = new ArrayList<Long>();\n getRequestFailNum = 0;\n postRequestFailNum = 0;\n getRequestSuccessNum = 0;\n postRequestSuccessNum = 0;\n// getTimestamps = new ArrayList<Long>();\n// postTimestamps = new ArrayList<Long>();\n }", "public String getResult() {\n return result;\n }", "public String getResult() {\n return result;\n }", "public String getResult() {\n return result;\n }", "public int getResult(){\r\n\t\t return result;\r\n\t }", "int getResultValue();", "int getResultValue();", "public double getResult() {\n\t\treturn result; // so that skeleton code compiles\n\t}", "public java.lang.String getGetItemDataResult() {\r\n return localGetItemDataResult;\r\n }", "protected abstract String getStatistics();", "public String getLccCode() {\n\t\treturn lccCode;\n\t}", "int getResult() {\n return result;\n }", "public org.tempuri.GetZyKSResponseGetZyKSResult getGetZyKSResult() {\r\n return getZyKSResult;\r\n }", "public final Map<Agent, ReplicationResult> getResults() {\n return this.results;\n }", "public long getLUC() {\r\n/* 180 */ return this._LUC;\r\n/* */ }", "@Override\r\n\tpublic String getResult() {\n\t\tString res;\r\n\t\ttry {\r\n\t\t\tresult = c.calculate(o.getFirst(), o.getSecond(), o.getOperator());\r\n\t\t\t// System.out.println(\"00\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\r\n\t\tres = String.valueOf(result);\r\n\r\n\t\treturn res;\r\n\t}", "public String getResult() {\n return mResult;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic <R> R getResults(Class<? extends R> type) {\n\t\tif (type.equals(String.class)) {\n\t\t\treturn (R) getJson(arr_chromosome);\n\t\t} else if (type.equals(JSONResult.class)) {\n\t\t\tJSONResult res = () -> {\n\t\t\t\treturn getJson(arr_chromosome);\n\t\t\t};\n\t\t\treturn (R) (res);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public List<CorpusSearchHit> getResult() {\n return result;\n }", "public java.lang.String getActualResults() {\n return actualResults;\n }", "public Result getResult() {\n\t\treturn this._result;\n\t}", "synchronized public Result getResult () {\n Result result = (Result) get (RESULT.toString());\n if (result == null) {\n result = new Result();\n put (RESULT.toString(), result);\n }\n return result;\n }", "public java.lang.String getGetYYT_DTXYJCBGResult() {\r\n return localGetYYT_DTXYJCBGResult;\r\n }", "public List<BenchmarkResultSet> getResults() {\n return results;\n }", "public java.lang.String getGetYYT_CTBGResult() {\r\n return localGetYYT_CTBGResult;\r\n }", "Result getResult();", "public int getLac() {\n return lac_;\n }", "public String getZlcc() {\n return zlcc;\n }", "java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult> \n getReaultList();", "public VersionVO get_return(){\n return local_return;\n }", "@Override\n\tpublic Result getResult() {\n\t\treturn m_Result;\n\t}", "public Long getSsrc() {\n return ssrc;\n }" ]
[ "0.63638943", "0.6112409", "0.60653526", "0.60527915", "0.6030946", "0.59541273", "0.5950754", "0.58783776", "0.5805889", "0.5793769", "0.5754726", "0.5733138", "0.5698238", "0.56128734", "0.5606544", "0.5582991", "0.5571527", "0.5569314", "0.5565326", "0.55572855", "0.5545173", "0.5491744", "0.54837734", "0.54817444", "0.54817444", "0.54817444", "0.5455375", "0.5414075", "0.54096943", "0.54054344", "0.5402702", "0.5401882", "0.5400094", "0.5397638", "0.5397638", "0.5397638", "0.5385018", "0.536946", "0.5361034", "0.535836", "0.5342081", "0.5341374", "0.53372556", "0.53299236", "0.53296196", "0.5323632", "0.53031707", "0.5298307", "0.52961445", "0.52921754", "0.528741", "0.52824086", "0.52824086", "0.52824086", "0.52824086", "0.52824086", "0.52824086", "0.52824086", "0.52824086", "0.52824086", "0.5275555", "0.5272266", "0.52555513", "0.52515155", "0.52465826", "0.5238682", "0.5235717", "0.5226524", "0.5220121", "0.5200615", "0.5200615", "0.5200615", "0.51920605", "0.5188805", "0.5188805", "0.518442", "0.51785564", "0.51720077", "0.516279", "0.51612025", "0.51545167", "0.5152695", "0.5152317", "0.51491654", "0.51470625", "0.5140911", "0.5138378", "0.51269543", "0.5112094", "0.51109457", "0.51092386", "0.5106411", "0.5104669", "0.51030576", "0.50981337", "0.5096173", "0.50875795", "0.5086619", "0.50853455", "0.5083348" ]
0.6589449
0
A getter function for the overall score results.
public double getOverallTextDiffScore() { return overallTextDiffScore; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getScore();", "float getScore();", "Float getScore();", "@Override\r\n\tpublic double getScore() \r\n\t{\r\n\t\treturn this._totalScore;\r\n\t}", "public int getScore() {\n return getStat(score);\n }", "public abstract float getScore();", "int getScore();", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "@Override\r\n\tpublic double getScore() {\n\t\treturn score;\r\n\t}", "public double getScore() {\r\n return score;\r\n }", "@Override\n public int getScore() {\n return totalScore;\n }", "int getScoreValue();", "public int getTotalScore(){\r\n return totalScore;\r\n }", "public Double getOverallScore() {\n\t\treturn overallScore;\n\t}", "public int getTotalScore(){\n return totalScore;\n }", "@Override\n\tpublic double getTotalScore() {\n\t\treturn score;\n\t}", "public double getScore() {\r\n return mScore;\r\n }", "public Double getScore() {\n return this.score;\n }", "public Double getScore() {\n return this.score;\n }", "public int getScore()\n {\n // put your code here\n return score;\n }", "public int getScore() { return score; }", "public int getScore ()\r\n {\r\n\treturn score;\r\n }", "public int getScore()\n {\n return score;\n }", "public Double getTotalScore() {\n return totalScore;\n }", "public int getHomeScore();", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\r\n return score;\r\n }", "public static int getScore(){\n return score;\n }", "public int score() {\n return score;\n }", "public int getScore() {\n return score;\n }", "public int getScore() {\n return score;\n }", "public int getTotalScore() {\r\n return totalScore;\r\n }", "@Override\n public int getScore() {\n return score;\n }", "public int getScore() {return score;}", "public float getScore() {\n return score;\n }", "public double getScore() {\n\t\t\treturn this.score;\n\t\t}", "public int totalScore() {\n return 0;\n }", "public static int getScore()\n {\n return score;\n }", "public double getBestScore();", "public Score getScore()\r\n { \r\n return theScore;\r\n }", "public Float getScore() {\n return score;\n }", "public int getScore () {\n return mScore;\n }", "public int getScore() {\n return score;\n }", "public int getScore() {\n return this.score;\n }", "public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public Integer getScore() {\n return score;\n }", "public Integer getScore() {\r\n return score;\r\n }", "public double getTotalScore() {\n\t return this.totalScore;\n\t }", "private double getScore() {\n double score = 0;\n score += getRBAnswers(R.id.radiogroup1, R.id.radiobutton_answer12);\n score += getRBAnswers(R.id.radiogroup2, R.id.radiobutton_answer21);\n score += getRBAnswers(R.id.radiogroup3, R.id.radiobutton_answer33);\n score += getRBAnswers(R.id.radiogroup4, R.id.radiobutton_answer41);\n score += getCBAnswers();\n score += getTextAns();\n score = Math.round(score / .0006);\n score = score / 100;\n return score;\n }", "public float getScore() {\r\n\t\treturn score;\r\n\t}", "public int getScore(){\n return this.score;\n }", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public int getScore() {\r\n \treturn score;\r\n }", "int score();", "int score();", "public float getScore() {\n\t\treturn score;\n\t}", "int getScore() {\n return score;\n }", "public int getScore() {\n\t\treturn (score);\n\t}", "public int getScore(){\n\t\treturn this.score;\n\t}", "public int getScore(){\n\t\treturn this.score;\n\t}", "public int getScore(){\n\t\treturn score;\n\t}", "public int getScore(){\n\t\treturn score;\n\t}", "public java.lang.Integer getScore () {\r\n\t\treturn score;\r\n\t}", "public Score getScore() {\n\t\treturn score;\n\t}", "public java.lang.Float getScore () {\n\t\treturn score;\n\t}", "public int getScore()\n {\n return score; \n }", "public int getScore()\n {\n return currentScore;\n }", "public abstract Score[] getScore();", "public static int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "protected abstract void calcScores();", "public int getScore()\n {\n return points + extras;\n }", "public int getScore(){\n \treturn 100;\n }", "Float getAutoScore();", "public int getPlayerScore();", "public int getScore(){return score;}", "public int getScore(){return score;}", "public int getScore() {\n return currentScore;\n }", "public static int getScore()\n\t{\n\t\treturn score;\n\t}", "public float getScore(){return score;}", "public Long getScore() {\n return score;\n }", "public int getScore()\n\t{\n\t\treturn this.score;\n\t}", "protected abstract List<Double> calcScores();", "public double getAverageScore() {\n\t return this.totalScore / this.count; \n\t }", "public int getScore(){ return this.score; }", "public double getScore() {\n double compositeScore = this.normaliseViewingTime();\n if (this.normalisedRating > 0) {\n compositeScore *= this.normalisedRating;\n }\n else {\n compositeScore *= ((double)RANGE / (double)2) / (double)RANGE;\n }\n return compositeScore;\n }", "public int getScore() {\r\n\t\treturn score;\r\n\t}", "public int getScore() {\r\n\t\treturn score;\r\n\t}", "Score getScores(int index);", "public long getScore() {\n return score_;\n }", "public long getScore() {\n return score_;\n }", "public String getScore(){\n return score;\n }", "public final int getScore() {\n\t\treturn score;\n\t}", "public int[] getScores() {\n return this.scores;\n }", "public int returnPoints()\n {\n return score ;\n }", "public int getScore() {\n\t\treturn score;\n\t}" ]
[ "0.7926607", "0.7926607", "0.77791494", "0.7775989", "0.77721363", "0.77464205", "0.77318215", "0.7706582", "0.7706582", "0.7706582", "0.7706582", "0.76964396", "0.76504236", "0.7648591", "0.76452565", "0.76316535", "0.7616123", "0.7596729", "0.7573435", "0.7512238", "0.74725723", "0.74725723", "0.74677694", "0.7442985", "0.7437152", "0.7421718", "0.7410453", "0.73810744", "0.7369917", "0.7369917", "0.7369917", "0.7364012", "0.73608637", "0.73530346", "0.73530346", "0.73507684", "0.7348295", "0.73430043", "0.73404664", "0.73383236", "0.7323953", "0.7322508", "0.73175585", "0.73144263", "0.7312602", "0.7295012", "0.72861385", "0.72674245", "0.72619075", "0.72619075", "0.7259887", "0.7259828", "0.72360337", "0.72340965", "0.72182614", "0.7206508", "0.7199127", "0.7199127", "0.7193332", "0.7190848", "0.7190848", "0.718147", "0.718011", "0.7175932", "0.7173921", "0.7173921", "0.7165888", "0.7165888", "0.7161319", "0.71573704", "0.7148534", "0.7140844", "0.7136533", "0.7133848", "0.7131864", "0.7127327", "0.71253085", "0.7123732", "0.7117738", "0.70965314", "0.708227", "0.708227", "0.70815057", "0.70795864", "0.7058095", "0.7052243", "0.7046663", "0.70377105", "0.7033843", "0.7032885", "0.70266795", "0.7024473", "0.7024473", "0.70170105", "0.699296", "0.699296", "0.6992029", "0.6977105", "0.6963086", "0.69573814", "0.69484705" ]
0.0
-1
For parsing response message
public MMPGetAuthMethod(MMPCtrlMsg copy) { super(copy); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parseResponse();", "public ResponseMessage extractMessage(String response) {\n \n \t\tString[] res = response.split( Ending.CRLF.toString() );\n \t\tif ( ( res == null ) || ( res.length == 1 ) ) {\n \t\t\tcontent = \"\";\n \t\t}\n \t\telse {\n \t\t\tint count = 0;\n \t\t\tint current = 0;\n \t\t\tfor ( String str : res ) {\n \n \t\t\t\tif ( current == 0 ) {\n \t\t\t\t\tsetStatusCode( str );\n \t\t\t\t\tcurrent++;\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tif ( str.isEmpty() ) {\n \t\t\t\t\t\tcount++;\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \n \t\t\t\t\t\tif ( count == 1 ) {\n \t\t\t\t\t\t\tcontent = str;\n \t\t\t\t\t\t}\n \t\t\t\t\t\telse {\n \t\t\t\t\t\t\textractHeader( str );\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\tcurrent++;\n \t\t\t}\n \t\t}\n \t\treturn this;\n \t}", "public static String parseResponse(String message){\n\t\tchar[] b = message.toCharArray();\n\t\tStringBuffer sb = new StringBuffer();\n\t\t//单行回复\n\t\tif('+'==b[0]){\n\t\t\tsb.append(message.substring(1));\n\t\t}else{\n\t\t\tSystem.out.println(\"格式错误\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "@Override\n public Object parseNetworkResponse(Response response, int i) throws Exception {\n return response.body().string();\n }", "@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}", "com.google.protobuf.ByteString getResponseMessage();", "public Void parseResponse(String str) {\n return null;\n }", "java.lang.String getResponse();", "private static String parseResponse(HttpResponse response) throws Exception {\r\n \t\tString result = null;\r\n \t\tBufferedReader reader = null;\r\n \t\ttry {\r\n \t\t\tHeader contentEncoding = response\r\n \t\t\t\t\t.getFirstHeader(\"Content-Encoding\");\r\n \t\t\tif (contentEncoding != null\r\n \t\t\t\t\t&& contentEncoding.getValue().equalsIgnoreCase(\"gzip\")) {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(\r\n \t\t\t\t\t\tnew GZIPInputStream(response.getEntity().getContent())));\r\n \t\t\t} else {\r\n \t\t\t\treader = new BufferedReader(new InputStreamReader(response\r\n \t\t\t\t\t\t.getEntity().getContent()));\r\n \t\t\t}\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tString line = null;\r\n \r\n \t\t\twhile ((line = reader.readLine()) != null) {\r\n \t\t\t\tsb.append(line + \"\\n\");\r\n \t\t\t}\r\n \t\t\tresult = sb.toString();\r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\treader.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn result;\r\n \t}", "@Override\r\n\tpublic String parseResponses(String unfriendlyString) {\n\t\treturn null;\r\n\t}", "public Message getResponseData();", "public static LoginMessageResponse parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n LoginMessageResponse object = new LoginMessageResponse();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n if (reader.getAttributeValue(\n \"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\") != null) {\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n\n if (fullTypeName != null) {\n java.lang.String nsPrefix = null;\n\n if (fullTypeName.indexOf(\":\") > -1) {\n nsPrefix = fullTypeName.substring(0,\n fullTypeName.indexOf(\":\"));\n }\n\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\n \":\") + 1);\n\n if (!\"LoginMessageResponse\".equals(type)) {\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext()\n .getNamespaceURI(nsPrefix);\n\n return (LoginMessageResponse) ExtensionMapper.getTypeObject(nsUri,\n type, reader);\n }\n }\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n reader.next();\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"Error\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.setError(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\n content));\n } else {\n reader.getElementText(); // throw away text nodes if any.\n }\n\n reader.next();\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"User\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setUser(null);\n reader.next();\n\n reader.next();\n } else {\n object.setUser(UserModel.Factory.parse(reader));\n\n reader.next();\n }\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"UserToken\").equals(reader.getName())) {\n object.setUserToken(Guid.Factory.parse(reader));\n\n reader.next();\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement()) {\n // 2 - A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" + reader.getName());\n }\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse r7) {\n /*\n r6 = this;\n r5 = 1;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"StatusCode=\";\n r0 = r0.append(r1);\n r1 = r7.statusCode;\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = \"infoss\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"code==\";\n r1 = r1.append(r2);\n r2 = r7.statusCode;\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r2 = \"\";\n r0 = r7.statusCode;\n r1 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r0 != r1) goto L_0x013e;\n L_0x003b:\n r0 = org.greenrobot.eventbus.c.a();\n r1 = 3;\n r3 = 0;\n r1 = com.jd.fridge.bean.Event.newEvent(r1, r3);\n r0.c(r1);\n r1 = new java.lang.String;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r7.data;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = r7.headers;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = com.android.volley.toolbox.HttpHeaderParser.parseCharset(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r1.<init>(r0, r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n if (r0 == 0) goto L_0x005e;\n L_0x0059:\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.a(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x005e:\n r0 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = \"jsonStr===\";\n r0 = r0.append(r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.k.a(r0);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"jsonStr==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"gson==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r4 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r3.fromJson(r1, r4);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.fromJson(r1, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders(r7);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = com.android.volley.Response.success(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x00bc:\n return r0;\n L_0x00bd:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=1111111=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n L_0x00e6:\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n r0 = com.android.volley.Response.error(r0);\n goto L_0x00bc;\n L_0x00f0:\n r0 = move-exception;\n r1 = r2;\n L_0x00f2:\n r2 = r6.c;\n if (r2 == 0) goto L_0x00fb;\n L_0x00f6:\n r2 = r6.c;\n r2.a(r1);\n L_0x00fb:\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"JsonSyntaxException=222=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x0114:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=333=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x013e:\n r0 = \"infos\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"response fail: \";\n r1 = r1.append(r2);\n r2 = r7.data;\n r2 = r2.toString();\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"result=\";\n r0 = r0.append(r1);\n r1 = r7.data;\n r1 = r1.toString();\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = r6.f;\n r0.a(r5);\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n com.android.volley.Response.error(r0);\n goto L_0x00e6;\n L_0x0187:\n r0 = move-exception;\n goto L_0x00f2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.jd.fridge.util.a.d.parseNetworkResponse(com.android.volley.NetworkResponse):com.android.volley.Response<T>\");\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public String getResponseMessage();", "public String getResponseMessage() { return responseMessage; }", "public static void messageRequestResultParser(FacebookAdapter adapter,\r\n String response) throws JSONException\r\n {\r\n if (response == null)\r\n return;\r\n String prefix = \"for (;;);\";\r\n if (response.startsWith(prefix))\r\n response = response.substring(prefix.length());\r\n \r\n JSONObject respObjs = new JSONObject(response);\r\n logger.info(\"t: \" + (String) respObjs.get(\"t\"));\r\n if (respObjs.get(\"t\") != null)\r\n {\r\n if (((String) respObjs.get(\"t\")).equals(\"msg\"))\r\n {\r\n JSONArray ms = (JSONArray) respObjs.get(\"ms\");\r\n logger.info(\"Facebook: NO of msges: \" + ms.length());\r\n // Iterator<JSONObject> it = ms..iterator();\r\n int index = 0;\r\n while (index < ms.length())\r\n {\r\n JSONObject msg = ms.getJSONObject(index);\r\n index++;\r\n if (msg.get(\"type\").equals(\"typ\"))\r\n {\r\n // got a typing notification\r\n // for\r\n // (;;);{\"t\":\"msg\",\"c\":\"p_1386786477\",\"ms\":[{\"type\":\"typ\",\"st\":0,\"from\":1190346972,\"to\":1386786477}]}\r\n int facebookTypingState = msg.getInt(\"st\");\r\n Long from = msg.getLong(\"from\");\r\n if (!from.toString().equals(adapter.getUID()))\r\n adapter.promoteTypingNotification(from.toString(),\r\n facebookTypingState);\r\n }\r\n else if (msg.get(\"type\").equals(\"msg\"))\r\n {\r\n // the message itself\r\n JSONObject realmsg = (JSONObject) msg.get(\"msg\");\r\n /*\r\n * {\"text\":\"FINE\", \"time\":1214614165139,\r\n * \"clientTime\":1214614163774, \"msgID\":\"1809311570\"},\r\n * \"from\":1190346972, \"to\":1386786477,\r\n * \"from_name\":\"David Willer\", \"to_name\":\"\\u5341\\u4e00\",\r\n * \"from_first_name\":\"David\", \"to_first_name\":\"\\u4e00\"}\r\n */\r\n FacebookMessage fm = new FacebookMessage();\r\n fm.text = (String) realmsg.get(\"text\");\r\n fm.time = (Number) realmsg.get(\"time\");\r\n fm.clientTime = (Number) realmsg.get(\"clientTime\");\r\n fm.msgID = (String) realmsg.get(\"msgID\");\r\n \r\n // the attributes of the message\r\n fm.from = (Number) msg.get(\"from\");\r\n fm.to = (Number) msg.get(\"to\");\r\n fm.fromName = (String) msg.get(\"from_name\");\r\n fm.toName = (String) msg.get(\"to_name\");\r\n fm.fromFirstName = (String) msg.get(\"from_first_name\");\r\n fm.toFirstName = (String) msg.get(\"to_first_name\");\r\n \r\n if (adapter.isMessageHandledBefore(fm.msgID))\r\n {\r\n logger.trace(\"Omitting a already handled message: msgIDCollection.contains(msgID)\");\r\n continue;\r\n }\r\n adapter.addMessageToCollection(fm.msgID);\r\n \r\n printMessage(fm);\r\n \r\n if (!fm.from.toString().equals(adapter.getUID()))\r\n adapter.promoteMessage(fm);\r\n }\r\n }\r\n }\r\n //refresh means that the session or post_form_id is invalid\r\n else if (((String) respObjs.get(\"t\")).equals(\"refresh\"))\r\n {\r\n logger.trace(\"Facebook: Refresh\");// do nothing\r\n if (((String) respObjs.get(\"seq\")) != null)\r\n {\r\n logger.trace(\"Facebook: refresh seq: \"\r\n + (String) respObjs.get(\"seq\"));\r\n }\r\n }\r\n //continue means that the server wants us to remake the connection\r\n else if (((String) respObjs.get(\"t\")).equals(\"continue\"))\r\n {\r\n logger.trace(\"Facebook: Time out? reconnect...\");// do nothing\r\n }\r\n else\r\n {\r\n logger.warn(\"Facebook: Unrecognized response type: \"\r\n + (String) respObjs.get(\"t\"));\r\n }\r\n }\r\n }", "@Override\n\t\t\t\t\tpublic void onResponse(String s) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "net.iGap.proto.ProtoResponse.Response getResponse();", "net.iGap.proto.ProtoResponse.Response getResponse();", "public static HelloAuthenticatedResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedResponse object =\n new HelloAuthenticatedResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private void _parseResponse(String response) {\n if (response != null && response.equals(\"OK\")) {\n String message = getString(R.string.authentication_success_message, _getChallenge().getIdentity().getDisplayName(), _getChallenge().getIdentityProvider().getDisplayName());\n _showAlertWithMessage(getString(R.string.authentication_success_title), message, true, false);\n } else {\n String message = getString(R.string.error_auth_unknown_error);\n boolean retry = false;\n if (response.equals(\"INVALID_CHALLENGE\")) {\n message = getString(R.string.error_auth_invalid_challenge);\n } else if (response.equals(\"INVALID_REQUEST\")) {\n message = getString(R.string.error_auth_invalid_request);\n } else if (response.equals(\"INVALID_RESPONSE\")) {\n message = getString(R.string.error_auth_invalid_response);\n retry = true;\n } else if (response.equals(\"INVALID_USERID\")) {\n message = getString(R.string.error_auth_invalid_userid);\n }\n _showAlertWithMessage(getString(R.string.authentication_failure_title), message, false, retry);\n }\n\n }", "public String extractingmessagegetbookings()\r\n\t{\r\n\t\tString localresponseJSONString = responseJSONString;\r\n\t\tJSONObject jsonResult = new JSONObject(localresponseJSONString);\r\n\t\tString getbookingsstring;\r\n\t\tgetbookingsstring = jsonResult.getJSONObject(\"hotelogix\").getJSONObject(\"response\").getJSONObject(\"status\").getString(\"message\");\r\n\t\tSystem.out.println(\"at last getbookings success:\"+getbookingsstring);\r\n\t\treturn getbookingsstring;\r\n\t}", "@Override\n\t\t\tprotected Response<String> parseNetworkResponse(\n\t\t\t\t\tNetworkResponse response) {\n\n\t\t\t\treturn null;\n\t\t\t}", "private OlapResult parseFromResponse(OlapMessage.Response response) throws IOException{\n switch(response.getType()){\n case NOT_SUBMITTED:\n return new NotSubmittedResult();\n case FAILED:\n OlapMessage.FailedResponse fr=response.getExtension(OlapMessage.FailedResponse.response);\n throw Exceptions.rawIOException((Throwable)OlapSerializationUtils.decode(fr.getErrorBytes()));\n case IN_PROGRESS:\n OlapMessage.ProgressResponse pr=response.getExtension(OlapMessage.ProgressResponse.response);\n return new SubmittedResult(pr.getTickTimeMillis());\n case CANCELLED:\n return new CancelledResult();\n case COMPLETED:\n OlapMessage.Result r=response.getExtension(OlapMessage.Result.response);\n return OlapSerializationUtils.decode(r.getResultBytes());\n default:\n throw new IllegalStateException(\"Programmer error: unexpected response type\");\n }\n }", "@Override\n void parseOAuthResponse(String data) {\n }", "public static MsgInterfaceResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n MsgInterfaceResponse object = new MsgInterfaceResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"MsgInterfaceResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (MsgInterfaceResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"MsgInterfaceResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"MsgInterfaceResult\").equals(reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"MsgInterfaceResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setMsgInterfaceResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "String getResponse();", "@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}", "public static MessageResponseOfUserModelNuLtuh91 parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n MessageResponseOfUserModelNuLtuh91 object = new MessageResponseOfUserModelNuLtuh91();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n if (reader.getAttributeValue(\n \"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\") != null) {\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n\n if (fullTypeName != null) {\n java.lang.String nsPrefix = null;\n\n if (fullTypeName.indexOf(\":\") > -1) {\n nsPrefix = fullTypeName.substring(0,\n fullTypeName.indexOf(\":\"));\n }\n\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\n \":\") + 1);\n\n if (!\"MessageResponseOfUserModelNuLtuh91\".equals(\n type)) {\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext()\n .getNamespaceURI(nsPrefix);\n\n return (MessageResponseOfUserModelNuLtuh91) ExtensionMapper.getTypeObject(nsUri,\n type, reader);\n }\n }\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n reader.next();\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"Body\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setBody(null);\n reader.next();\n\n reader.next();\n } else {\n object.setBody(UserModel.Factory.parse(reader));\n\n reader.next();\n }\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"Error\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.setError(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\n content));\n } else {\n reader.getElementText(); // throw away text nodes if any.\n }\n\n reader.next();\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement()) {\n // 2 - A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" + reader.getName());\n }\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n protected Response<WeatherPOJO> parseNetworkResponse(NetworkResponse response) {\n try {\n // Convert the obtained byte[] into a String\n String json = new String(response.data, HttpHeaderParser.parseCharset(response.headers));\n // Use Gson to process the JSON string and return a WeatherPOJO object\n return Response.success(new Gson().fromJson(json, WeatherPOJO.class),\n HttpHeaderParser.parseCacheHeaders(response));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n return null;\n }", "public static MessageResponseOfAnimalModelNuLtuh91 parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n MessageResponseOfAnimalModelNuLtuh91 object = new MessageResponseOfAnimalModelNuLtuh91();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n if (reader.getAttributeValue(\n \"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\") != null) {\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n\n if (fullTypeName != null) {\n java.lang.String nsPrefix = null;\n\n if (fullTypeName.indexOf(\":\") > -1) {\n nsPrefix = fullTypeName.substring(0,\n fullTypeName.indexOf(\":\"));\n }\n\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\n \":\") + 1);\n\n if (!\"MessageResponseOfAnimalModelNuLtuh91\".equals(\n type)) {\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext()\n .getNamespaceURI(nsPrefix);\n\n return (MessageResponseOfAnimalModelNuLtuh91) ExtensionMapper.getTypeObject(nsUri,\n type, reader);\n }\n }\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n reader.next();\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"Body\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setBody(null);\n reader.next();\n\n reader.next();\n } else {\n object.setBody(AnimalModel.Factory.parse(reader));\n\n reader.next();\n }\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"Error\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.setError(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\n content));\n } else {\n reader.getElementText(); // throw away text nodes if any.\n }\n\n reader.next();\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement()) {\n // 2 - A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" + reader.getName());\n }\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private static String paseResponse(HttpResponse response) {\n\t\tHttpEntity entity = response.getEntity();\n\t\t\n//\t\tlog.info(\"response status: \" + response.getStatusLine());\n\t\tString charset = EntityUtils.getContentCharSet(entity);\n//\t\tlog.info(charset);\n\t\t\n\t\tString body = null;\n\t\ttry {\n if (entity != null) { \n InputStream instreams = entity.getContent(); \n body = convertStreamToString(instreams); \n// System.out.println(\"result:\" + body);\n } \n//\t\t\tlog.info(body);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn body;\n\t}", "@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}", "@Override\n public void onResponse(String response) {\n parseData(url, response);\n }", "public static LoginMessageResponseE parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n LoginMessageResponseE object = new LoginMessageResponseE();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"LoginMessageResponse\").equals(\n reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setLoginMessageResponse(null);\n reader.next();\n } else {\n object.setLoginMessageResponse(LoginMessageResponse.Factory.parse(\n reader));\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public TOUReadResponse()\r\n\t{\r\n\t}", "public static HelloResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloResponse object =\n new HelloResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static void parseResponse(byte[] response) {\n int qr = ((response[2] & 0b10000000) >> 7);\n int opcode = ((response[2] & 0b01111000) >> 3);\n int aa = ((response[2] & 0b00000100) >> 2);\n int tc = ((response[2] & 0b00000010) >> 1);\n int rd = (response[2] & 0b00000001);\n int ra = ((response[3] & 0b10000000) >> 7);\n int res1 = ((response[3] & 0b01000000) >> 6);\n int res2 = ((response[3] & 0b00100000) >> 5);\n int res3 = ((response[3] & 0b00010000) >> 4);\n int rcode = (response[3] & 0b00001111);\n int qdcount = (response[4] << 8 | response[5]);\n int ancount = (response[6] << 8 | response[7]);\n int nscount = (response[8] << 8 | response[9]);\n int arcount = (response[10] << 8 | response[11]);\n/*\n System.out.println(\"QR: \" + qr);\n System.out.println(\"OPCODE: \"+ opcode);\n System.out.println(\"AA: \" + aa);\n System.out.println(\"TC: \" + tc);\n System.out.println(\"RD: \" + rd);\n System.out.println(\"RA: \" + ra);\n System.out.println(\"RES1: \" + res1);\n System.out.println(\"RES2: \" + res2);\n System.out.println(\"RES3: \" + res3);\n System.out.println(\"RCODE: \" + rcode);\n System.out.println(\"QDCOUNT: \" + qdcount);\n System.out.println(\"ANCOUNT: \" + ancount);\n System.out.println(\"NSCOUNT: \" + nscount);\n System.out.println(\"ARCOUNT: \" + arcount);\n*/\n // WHO DESIGNED THE DNS PACKET FORMAT AND WHY DID THEY ADD POINTERS?!?\n HashMap<Integer, String> foundLabels = new HashMap<>();\n\n int curByte = 12;\n for(int i = 0; i < qdcount; i++) {\n ArrayList<Integer> currentLabels = new ArrayList<>();\n while(true) {\n if((response[curByte] & 0b11000000) != 0) {\n // Labels have a length value, the first two bits have to be 0.\n System.out.println(\"ERROR\\tInvalid label length in response.\");\n System.exit(1);\n }\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n currentLabels.add(pntr);\n for(Integer n : currentLabels) {\n if(foundLabels.containsKey(n)) {\n foundLabels.put(n, foundLabels.get(n) + \".\" + working.toString());\n } else {\n foundLabels.put(n, working.toString());\n }\n }\n }\n\n // Increment curByte every time we use it, meaning it always points to the byte we haven't used.\n short qtype = (short) ((response[curByte++] << 8) | response[curByte++]);\n short qclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n }\n\n // This for loop handles all the Answer section parts.\n for(int i = 0; i < ancount; i++) {\n StringBuilder recordName = new StringBuilder();\n while(true) {\n if((response[curByte] & 0b11000000) == 0b11000000) {\n recordName.append(foundLabels.get(((response[curByte++] & 0b00111111) << 8) | response[curByte++]));\n break;\n } else if ((response[curByte] & 0b11000000) == 0) {\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n recordName.append(working.toString());\n foundLabels.put(pntr, working.toString());\n } else {\n System.out.println(\"ERROR\\tInvalid label.\");\n System.exit(1);\n }\n }\n short type = (short) ((response[curByte++] << 8) | response[curByte++]);\n short dnsclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n int ttl = ((response[curByte++] << 24) | (response[curByte++] << 16) | (response[curByte++] << 8) | response[curByte++]);\n short rdlength = (short) ((response[curByte++] << 8) | response[curByte++]);\n\n // If it is an A record\n if(type == 1) {\n\n // If it is an invalid length\n if(rdlength != 4) {\n System.out.println(\"ERROR\\tA records should only have a 4 byte RDATA\");\n System.exit(1);\n }\n\n // Output the IP record\n System.out.println(\"IP\\t\" + (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \".\" +\n (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \"\\tnonauth\");\n }\n else if(type == 5){\n\n // Creates string to hold combined record\n String cnameRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte++] & 0xFF;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte] & 0xff;\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n cnameRecord += \".\";\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n cnameRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n cnameRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"CNAME\\t\" + cnameRecord + \"\\tnonauth\");\n }\n else if(type == 2){\n\n // Creates string to hold combined record\n String nsRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n nsRecord += \".\";\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n nsRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n nsRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"NS\\t\" + nsRecord + \"\\tnonauth\");\n }\n else if(type == 15){\n\n // Creates string to hold combined record\n String mxRecord = \"\";\n\n curByte ++;\n\n // Gets the preference number of the given mail server\n int preference = (int) response[curByte];\n\n curByte++;\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n mxRecord += \".\";\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n mxRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n mxRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"MX\\t\" + mxRecord + \"\\t\" + preference + \"\\tnonauth\");\n }\n }\n\n for(int i = 0; i < nscount; i++) {\n StringBuilder recordName = new StringBuilder();\n while(true) {\n if((response[curByte] & 0b11000000) == 0b11000000) {\n recordName.append(foundLabels.get(((response[curByte++] & 0b00111111) << 8) | response[curByte++]));\n break;\n } else if ((response[curByte] & 0b11000000) == 0) {\n StringBuilder working = new StringBuilder();\n int labelLen = response[curByte];\n int pntr = curByte++;\n if(labelLen == 0) {\n break;\n }\n for(int j = 0; j < labelLen; j++, curByte++) {\n working.append((char) response[curByte]);\n }\n recordName.append(working.toString());\n foundLabels.put(pntr, working.toString());\n } else {\n System.out.println(\"ERROR\\tInvalid label.\");\n System.exit(1);\n }\n }\n short type = (short) ((response[curByte++] << 8) | response[curByte++]);\n short dnsclass = (short) ((response[curByte++] << 8) | response[curByte++]);\n int ttl = ((response[curByte++] << 24) | (response[curByte++] << 16) | (response[curByte++] << 8) | response[curByte++]);\n short rdlength = (short) ((response[curByte++] << 8) | response[curByte++]);\n\n if(type == 1) {\n if(rdlength != 4) {\n System.out.println(\"ERROR\\tA records should only have a 4 byte RDATA\");\n System.exit(1);\n }\n System.out.println(\"IP\\t\" + (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \".\" +\n (response[curByte++] & 0xff) + \".\" + (response[curByte++] & 0xff) + \"\\tauth\");\n }\n // If CNAME\n else if(type == 5){\n\n // Creates string to hold combined record\n String cnameRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n cnameRecord += \".\";\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n cnameRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n cnameRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n cnameRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"CNAME\\t\" + cnameRecord + \"\\tauth\");\n }\n else if(type == 2){\n\n // Creates string to hold combined record\n String nsRecord = \"\";\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n nsRecord += \".\";\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n nsRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n nsRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n nsRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"NS\\t\" + nsRecord + \"\\tauth\");\n\n }\n else if(type == 15){\n\n // Creates string to hold combined record\n String mxRecord = \"\";\n\n curByte ++;\n\n // Gets the preference number of the given mail server\n int preference = (int) response[curByte];\n\n curByte++;\n\n // Gets length of subsection of CNAME record\n int curLength = (int) response[curByte];\n\n curByte++;\n\n int totalLength = 0;\n\n // While there are still chars to be read\n while(totalLength != rdlength){\n\n // If the current subsection has no more chars\n if(curLength == 0){\n\n // Sets length of next subsection\n curLength = (int) response[curByte];\n\n // If this subsection was the last\n if(curLength == 0){\n\n curByte++;\n\n // Breaks out of loop\n break;\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curLength = (int) (response[curByte++] << 8) | response[curByte];\n mxRecord += \".\";\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte++;\n break;\n }\n\n // Adds period to divide subsections\n mxRecord += \".\";\n\n } else if((curLength & 0b11000000) == 0b11000000) {\n // It's a pointer.\n curByte++;\n curLength = (int) ((response[curByte++] << 8) | response[curByte]);\n mxRecord += foundLabels.get(curLength & 0b0011111111111111);\n\n // Pointers are always the END of a label.\n curByte--;\n break;\n }\n // Otherwise adds next char to string\n else{\n mxRecord += (char) response[curByte];\n\n // Decreases size of current subsection\n curLength--;\n\n }\n\n // Increases total length of CNAME record\n totalLength++;\n\n // Increments the currently selected byte\n curByte++;\n\n }\n System.out.println(\"MX\\t\" + mxRecord + \"\\t\" + preference + \"\\tauth\");\n }\n }\n }", "@Override\n\tpublic void handleResponse() {\n\t\t\n\t}", "public static DoControlResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DoControlResponse object =\n new DoControlResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"doControlResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DoControlResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private void parseCompleteReqMessage() {\r\n byte result = _partialMessage.get(0);\r\n byte opCode = _partialMessage.get(1);\r\n byte numberOfParams = _partialMessage.get(2);\r\n\r\n /* cursor of bytes within 'message'. Parameters start at position 2 */\r\n int messageIndex = 3;\r\n int availableChars = (int) _partialMessage.size();\r\n\r\n List<String> paramList = new ArrayList<>();\r\n String param;\r\n\r\n for (byte i = 0; (i < numberOfParams) && (messageIndex < availableChars); i++) {\r\n param = \"\";\r\n\r\n /* collect data up to terminator */\r\n while ((messageIndex < availableChars) &&\r\n (_partialMessage.get(messageIndex) != '\\0')) {\r\n param += (char)((byte)(_partialMessage.get(messageIndex)));\r\n ++ messageIndex;\r\n }\r\n\r\n /* skip after terminator */\r\n if (messageIndex < availableChars) {\r\n ++ messageIndex;\r\n }\r\n\r\n paramList.add( param);\r\n }\r\n\r\n _replyDispatcher.onReplyReceivedForRequest(opCode, result, paramList);\r\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic Map<String, Object> parseResponse(String response, String service, String method, String version) throws TransformersException {\n\t\tClass<Object> transformerClass;\n\t\tMap<String, Object> res;\n\n\t\tres = null;\n\t\tif (!GenericUtils.assertStringValue(response) || !GenericUtils.assertStringValue(service) || !GenericUtils.assertStringValue(version) || !GenericUtils.assertStringValue(method)) {\n\t\t\tString errorMsg = CaibEsbLanguage.getResIntegra(ILogConstantKeys.TF_LOG003);\n\t\t\tLOGGER.error(errorMsg);\n\t\t\tthrow new TransformersException(errorMsg);\n\t\t}\n\t\ttry {\n\t\t\t// Obtenemos la clase que creara la estructura que contiene una\n\t\t\t// respuesta generada\n\t\t\t// por la plataforma\n\t\t\ttransformerClass = ParseTransformersFactory.getParseTransformer(service, method, version);\n\t\t\tres = (Map) invokeParseTransf(response, transformerClass, service, method, version);\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(e);\n\t\t\tthrow new TransformersException(e);\n\t\t}\n\t\treturn res;\n\t}", "@Override\n\tpublic void onParser(JSONArray response) {\n\n\t}", "public Map<String, Object> parseResponse(String response, String service, String version) throws TransformersException {\n\t\treturn parseResponse(response, service, getMethodName(service), version);\n\t}", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "private ArrayList<?> ParseXMLResponse(StringBuilder response, IDataInterface myHandler){\n \t\t SAXParserFactory spf = SAXParserFactory.newInstance();\n \t\t try {\n \t\t\tSAXParser sp = spf.newSAXParser();\n \t\t\tXMLReader xr = sp.getXMLReader();\n \t\t\t\n \t\t\txr.setContentHandler((ContentHandler) myHandler);\n \t\t\tInputSource is = new InputSource();\n \t\t\tis.setCharacterStream(new StringReader(response.toString()));\n \t\t\txr.parse(is);\n \t\t\t\n \t\t} catch (ParserConfigurationException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (SAXException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\treturn myHandler.getData();\n \t}", "@Override\n public void onResponse(String response) {\n }", "@Override\r\n\t\t\tpublic void onResponse(Call arg0, Response response) throws IOException {\n\t\t\t\tString resultmsg = response.body().string();\r\n\t\t\t\tString result=\"\";\r\n//\t\t\t\ttry {\r\n//\t\t\t\t\tresult = URLDecoder.decode(resultmsg, \"UTF-8\");\r\n//\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n//\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\te.printStackTrace();\r\n//\t\t\t\t\tFLogger.e(Global.INNER_TAG, \"解析数据出错\");\r\n//\t\t\t\t}\r\n\t\t\t\t// 是否有响应\r\n\t\t\t\tif (response.isSuccessful()) {\r\n\t\t\t\t\tFLogger.e(Global.INNER_TAG, \"success\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tonResult(callback, result.toString(),true);\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tFLogger.e(Global.INNER_TAG, \"failed\");\r\n\t\t\t\t\tonResult(callback, result.toString(),false);\r\n\t\t\t\t}\r\n\t\t\t}", "protected void doConsumeResponse() throws Exception {\n if (response.getEntity() != null)\n response_data = EntityUtils.toByteArray(response.getEntity());\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public static HelloAuthenticatedWithEntitlementPrecheckResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n HelloAuthenticatedWithEntitlementPrecheckResponse object =\n new HelloAuthenticatedWithEntitlementPrecheckResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"helloAuthenticatedWithEntitlementPrecheckResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (HelloAuthenticatedWithEntitlementPrecheckResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://ws.sample\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.set_return(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public IMAPUntaggedResponse(String keyword, byte [] response) {\n super(response); \n this.keyword = keyword; \n }", "private String validateValidResponse(Response response) {\n\n\t\t\n\t\tlogger.debug(response.getBody().asString());\n\t\tlogger.debug(response.body().asString());\n\t\t\n\t\treturn response.body().asString();\n\t}", "edu.usfca.cs.dfs.StorageMessages.ListResponse getListResponse();", "public static GetYYT_ZQGSZSYBGResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetYYT_ZQGSZSYBGResponse object = new GetYYT_ZQGSZSYBGResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetYYT_ZQGSZSYBGResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetYYT_ZQGSZSYBGResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetYYT_ZQGSZSYBGResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetYYT_ZQGSZSYBGResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetYYT_ZQGSZSYBGResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetYYT_ZQGSZSYBGResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static GetDictionaryPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDictionaryPageResponse object =\n new GetDictionaryPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDictionaryPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDictionaryPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private ServerAddress parseResponse(String response, InetAddress address) {\n\n\t\tHashMap<String, String> values = parseBDP1Xml(response);\n\t\tif (values == null)\n\t\t\treturn null;\n\n\t\t// Validate \"response\" and \"signature\"\n\t\tString challenge_response = values.get(\"response\");\n\t\tString signature = values.get(\"signature\");\n\t\tif (challenge_response != null && signature != null) {\n\t\t\tString legit_response = getSignature(challenge_response)\n\t\t\t\t\t.toLowerCase();\n\t\t\tif (!legit_response.equals(signature.toLowerCase())) {\n\t\t\t\tLog.e(TAG, \"Signature verification failed \" + legit_response\n\t\t\t\t\t\t+ \" vs \" + signature);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// Validate \"cmd\"\n\t\tString cmd = values.get(\"cmd\");\n\t\tif (cmd == null || !cmd.equals(\"found\")) {\n\t\t\t// We'll get the discovery packet we sent out, where cmd=\"discovery\"\n\t\t\tLog.e(TAG, \"Bad cmd \" + response);\n\t\t\treturn null;\n\t\t}\n\n\t\t// Validate \"application\"\n\t\tString app = values.get(\"application\");\n\t\tif (app == null || !app.equals(\"boxee\")) {\n\t\t\tLog.e(TAG, \"Bad app \" + app);\n\t\t\treturn null;\n\t\t}\n\n\t\tServerAddress server = new ServerAddress(\"Boxee\", \n\t\t\t\tvalues.get(\"version\"), values.get(\"name\"),\n\t\t\t\t\"true\".equalsIgnoreCase(values.get(\"httpAuthRequired\")),\n\t\t\t\taddress, Integer.parseInt(values.get(\"httpPort\")));\n\t\tLog.d(TAG, \"Discovered server \" + server);\n\t\treturn server;\n\t}", "@Override\n public void onResponse(String response) {\n }", "private CallResponse() {\n initFields();\n }", "@Override\n public void onResponse(String response) {\n }", "public String getResponse() {\n Object ref = response_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n response_ = s;\n }\n return s;\n }\n }", "public abstract String getResponse();", "public static GetYYT_DTXYJCBGResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetYYT_DTXYJCBGResponse object = new GetYYT_DTXYJCBGResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetYYT_DTXYJCBGResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetYYT_DTXYJCBGResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetYYT_DTXYJCBGResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetYYT_DTXYJCBGResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetYYT_DTXYJCBGResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetYYT_DTXYJCBGResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "@Override\n protected Response<T> parseNetworkResponse(NetworkResponse networkResponse) {\n Response<T> response;\n try {\n String json = new String(networkResponse.data, HttpHeaderParser.parseCharset(networkResponse.headers));\n FRLogger.msg(\"Success Response : \" + json);\n FRLogger.msg(\"Response Code : \" + networkResponse.statusCode);\n\n if (httpResponseValidator.validateHttpResponseForApplicationErrors(json)) {\n T t = null;\n if (typeOfT instanceof Class<?>) {\n if (((Class<?>) typeOfT).getName().equals(String.class.getName())) {\n t = (T) json;\n } else {\n t = jsonParser.fromJson(json, (Class<T>) typeOfT);\n }\n } else {\n t = jsonParser.fromJson(json, typeOfT);\n }\n response = Response.success(t, HttpHeaderParser.parseCacheHeaders(networkResponse));\n } else {\n response = Response.error(new ApplicationError(networkResponse));\n }\n } catch (UnsupportedEncodingException e) {\n response = Response.error(new ParseError(e));\n } catch (JsonSyntaxException je) {\n response = Response.error(new ParseError(je));\n } catch (Exception exp) {\n response = Response.error(new VolleyError(exp));\n }\n return response;\n }", "protected Object decode(\n ChannelHandlerContext ctx, Channel channel, Object msg)\n throws Exception {\n\n String sentence = (String) msg;\n\n // Send response #1\n if (sentence.contains(\"##\")) {\n if (channel != null) {\n channel.write(\"LOAD\");\n }\n return null;\n }\n\n // Send response #2\n if (sentence.length() == 15 && Character.isDigit(sentence.charAt(0))) {\n if (channel != null) {\n channel.write(\"ON\");\n }\n return null;\n }\n\n // Parse message\n Matcher parser = pattern.matcher(sentence);\n if (!parser.matches()) {\n if(log.isInfoEnabled())\n log.info(\"Parse failed, message: \" + sentence);\n return null;\n }\n\n // Create new position\n PositionData position = new PositionData();\n \n Integer index = 1;\n\n // Get device by IMEI\n String imei = parser.group(index++);\n position.setUdid(imei);\n\n String alarm = parser.group(index++);\n \n // Date\n Calendar time = Calendar.getInstance(TimeZone.getTimeZone(\"UTC\"));\n time.clear();\n time.set(Calendar.YEAR, 2000 + Integer.valueOf(parser.group(index++)));\n time.set(Calendar.MONTH, Integer.valueOf(parser.group(index++)) - 1);\n time.set(Calendar.DAY_OF_MONTH, Integer.valueOf(parser.group(index++)));\n \n int localHours = Integer.valueOf(parser.group(index++));\n int localMinutes = Integer.valueOf(parser.group(index++));\n \n int utcHours = Integer.valueOf(parser.group(index++));\n int utcMinutes = Integer.valueOf(parser.group(index++));\n\n // Time\n time.set(Calendar.HOUR, localHours);\n time.set(Calendar.MINUTE, localMinutes);\n time.set(Calendar.SECOND, Integer.valueOf(parser.group(index++)));\n time.set(Calendar.MILLISECOND, Integer.valueOf(parser.group(index++)));\n \n // Timezone calculation\n int deltaMinutes = (localHours - utcHours) * 60 + localMinutes - utcMinutes;\n if (deltaMinutes <= -12 * 60) {\n deltaMinutes += 24 * 60;\n } else if (deltaMinutes > 12 * 60) {\n deltaMinutes -= 24 * 60;\n }\n time.add(Calendar.MINUTE, -deltaMinutes);\n position.setTime(time.getTime());\n\n // Validity\n position.setValid(parser.group(index++).compareTo(\"A\") == 0 ? true : false);\n\n // Latitude\n Double latitude = Double.valueOf(parser.group(index++));\n latitude += Double.valueOf(parser.group(index++)) / 60;\n if (parser.group(index++).compareTo(\"S\") == 0) latitude = -latitude;\n position.setLatitude(latitude);\n\n // Longitude\n Double lonlitude = Double.valueOf(parser.group(index++));\n lonlitude += Double.valueOf(parser.group(index++)) / 60;\n String hemisphere = parser.group(index++);\n if (hemisphere != null) {\n if (hemisphere.compareTo(\"W\") == 0) lonlitude = -lonlitude;\n }\n position.setLongitude(lonlitude);\n\n // Altitude\n position.setAltitude(-1d);\n // Speed from knot to km\n position.setSpeed(1.852 * Double.valueOf(parser.group(index++)));\n\n // Course\n String course = parser.group(index++);\n if (course != null) {\n position.setCourse(Double.valueOf(course));\n } else {\n position.setCourse(-1d);\n }\n\n // Extended info from GPS103 protocol\n Map<String,Object> extendedInfo = position.getExtendedInfo();\n extendedInfo.put(\"protocol\", \"gps103\");\n // Alarm message\n if(alarm != null){\n \tif(alarm.indexOf(\"help me\") != -1){\n \t\t// it's emergency\n \t\tposition.setMessageType(2/*MESSAGE_TYPE_EMERGENCY*/);\n \t\tposition.setMessage(alarm);\n \t}else if(alarm.equalsIgnoreCase(\"tracker\")){\n \t\t// do nothing\n \t}else if(alarm.equalsIgnoreCase(\"speed\")){\n \t\tposition.setMessageType(1/*MESSAGE_TYPE_ALERT*/);\n \t\tposition.setMessage(\"Over Speed!\");\n \t}else if(alarm.equalsIgnoreCase(\"low battery\")){\n \t\tposition.setMessageType(1/*MESSAGE_TYPE_ALERT*/);\n \t\tposition.setMessage(\"Low Battery!\");\n \t}else{\n \t\tposition.setMessage(alarm);\n \t}\n }\n \n return position;\n }", "private static void readResponse(ClientResponse response)\r\n\t{\r\n\t// Response\r\n\tSystem.out.println();\r\n\tSystem.out.println(\"Response: \" + response.toString());\r\n\r\n\t}", "public void setResponseMessage(String responseMessage) { this.responseMessage = responseMessage; }", "@Override\n public T parseResponse(Request<T> request, NetworkResponse response) throws Exception {\n if(!SomePreferences.confirmLogin()){\n SomePreferences.clearAuthentication();\n throw new SessionError(\"Not Logged In\");\n }\n Document document = parseDocument(response);\n if(document.body().hasClass(\"database_error\")){\n throw new SomeError(\"SA Database Unavailable, try again later.\");\n }\n if(document.getElementsByClass(\"notregistered\").size() > 0){\n //Not logged in.\n SomePreferences.clearAuthentication();\n throw new SessionError(\"Not Logged In\");\n }\n Element stdErr = document.getElementsByClass(\"standarderror\").first();\n if(stdErr != null){\n //Generic SA error messages\n throw new SomeError(stdErr.getElementsByClass(\"standard\").first().getElementsByClass(\"inner\").first().ownText());\n }\n return parseHtmlResponse(request, response, document);\n }", "private void parseResponse(String serverResponse){\n\n if(serverResponse.equals(\"PLAY\")){ //Client turn\n player.play();\n }\n if(serverResponse.equals(\"SUCCESS\")){ //Action was valid\n player.success();\n }\n if(serverResponse.equals(\"FAILURE\")){ //Action was invalid\n player.failure();\n }\n if(serverResponse.equals(\"FINISHED\")){ //Other Player leaves\n player.finished();\n running = false;\n }\n if(serverResponse.equals(\"WIN\")){ //You win\n player.win();\n running = false;\n }\n if(serverResponse.equals(\"LOSE\")){ //You lose\n player.lose();\n running = false;\n }\n if(serverResponse.equals(\"TIE\")) { //You tie\n player.tie();\n running = false;\n }\n else\n System.out.println(serverResponse);\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n\n //obj.getstring(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(profile.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "static void processResponse(CTPResponse response)\n {\n \tfor(int i=0;i<response.GetNumResponses();i++)\n \t{\n \t\tint type = response.getReponseType(i);\n \t\tswitch (type) {\n\t \t\tcase CTPResponse.ERROR_RSP:{\n\t \t\t\tif(response.getStatus(i)== -1)\n\t \t\t\tSystem.out.println(\"ERROR_RSP Invalid client request\");\t\n\t \t\t\telse\n\t \t\t\tSystem.out.println(\"ERROR_RSP \"+response.getErrorText(i));\t\n\t \t\t\tbreak;\n\t \t\t}\n\t \t\tcase CTPResponse.ACKCONNECT_RSP:{\n\t \t\t\tSystem.out.println(\"ACKCONNECT_RSP received\");\t\n\t \t\t\tbreak;\n\t \t\t}\n\t\t\t\tcase CTPResponse.ACKOPEN_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKOPEN_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKLOCK_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKLOCK_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKEDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKEDIT_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.SERVRELEASE_RSP:{\n\t\t\t\t\tSystem.out.println(\"SERVRELEASE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CONTENTS_RSP:{\n\t\t\t\t\tSystem.out.println(\"CONTENTS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.MOVE_RSP:{\n\t\t\t\t\tSystem.out.println(\"MOVE_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Cursor position in file= \"+response.getPosInfile(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.STATUS_RSP:{\n\t\t\t\t\tSystem.out.println(\"STATUS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Checksum = \"+response.getChecksum(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.EDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"EDIT_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"action = \"+response.getEditAction(i));\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CLOSE_RSP:{\n\t\t\t\t\tSystem.out.println(\"CLOSE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: \n\t\t\t\t\tSystem.out.println(\"Invalid Response type received\");\t\n \t\t}//end switch\n \t}//end for loop\n }", "public static GetChargetariffResponse parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n GetChargetariffResponse object = new GetChargetariffResponse();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"GetChargetariffResponse\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (GetChargetariffResponse) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"GetChargetariffResult\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\",\r\n \"GetChargetariffResult\").equals(\r\n reader.getName())) {\r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"nil\");\r\n\r\n if (\"true\".equals(nillableValue) ||\r\n \"1\".equals(nillableValue)) {\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"The element: \" + \"GetChargetariffResult\" +\r\n \" cannot be null\");\r\n }\r\n\r\n java.lang.String content = reader.getElementText();\r\n\r\n object.setGetChargetariffResult(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\r\n content));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public static MessageResponseOfUserModelNuLtuh91E parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n MessageResponseOfUserModelNuLtuh91E object = new MessageResponseOfUserModelNuLtuh91E();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"MessageResponseOfUserModelNuLtuh91\").equals(\n reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setMessageResponseOfUserModelNuLtuh91(null);\n reader.next();\n } else {\n object.setMessageResponseOfUserModelNuLtuh91(MessageResponseOfUserModelNuLtuh91.Factory.parse(\n reader));\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "com.google.search.now.wire.feed.ResponseProto.Response getResponse();", "com.google.search.now.wire.feed.ResponseProto.Response getResponse();", "public void parse(byte[] buffer) {\n if (buffer == null) {\n MMLog.log(TAG, \"parse failed buffer = \" + null);\n return;\n }\n\n if (buffer.length >= 9) {\n this.msgHead = getIntVale(0, 2, buffer);\n if(this.msgHead != DEFAULT_HEAD) return;\n\n this.msgEnd = getIntVale(buffer.length - 1, 1, buffer);\n if(this.msgEnd != DEFAULT_END) return;\n\n this.msgID = getIntVale(2, 2, buffer);\n this.msgIndex = getIntVale(4, 1, buffer);\n this.msgLength = getIntVale(5, 2, buffer);\n this.msgCRC = getIntVale(buffer.length - 2, 1, buffer);\n\n } else {\n MMLog.log(TAG, \"parse failed length = \" + buffer.length);\n }\n if (msgLength <= 0) return;\n datas = new byte[msgLength];\n System.arraycopy(buffer, 7, datas, 0, this.msgLength);\n }", "@Override\n protected Response<byte[]> parseNetworkResponse(NetworkResponse response) {\n\n //一般来说,在这个方法里面,会从response里获取data,然后做相应的处理,最后再创建一个T类型的Response,这个Response里面的内容最终会被回调给Developer\n return Response.success(response.data, HttpHeaderParser.parseCacheHeaders(response));\n }", "public static SparseArray<BoxResponse> formatResponseCode(byte[] bytes) {\n\n String responseCode = JMLUtils.bytesToHexString(bytes);\n if (responseCode == null || responseCode.length() != 40 || !responseCode.toLowerCase().startsWith(\"dbde\")) {\n return null;\n }\n responseCode = responseCode.toLowerCase();//\n // 去掉dbde\n responseCode = responseCode.substring(4);\n\n // 新建数组,每两个放一起\n List<Integer> array = new ArrayList<>();\n char[] chars = responseCode.toCharArray();\n for (int i = 0; i < chars.length / 2; i++) {\n\n Integer tmp;\n try {\n tmp = JMLUtils.getIntBy16(\"\" + chars[i * 2] + chars[i * 2 + 1]);\n } catch (Exception e) {\n// e.printStackTrace();\n return null;\n }\n array.add(tmp);\n }\n\n // 应答数据长度\n int len1 = array.get(0);\n\n // 去掉长度 -- 上面的07\n array.remove(0);\n\n Integer _index, _be, _id, _success;\n\n // 判断是否是应答指令\n // 这边解析是否正确\n if (array.get(1) == BoxKey.HELM_NOTIFY_ID) {\n // db de 08 01 54 xxxxxxxx\n List<Integer> data1 = new ArrayList<>(array.subList(0, 2));\n array.subList(0, 2).clear(); // 删掉前2个\n len1 -= 2;\n _index = data1.get(0);\n _be = null;\n _id = data1.get(1);\n _success = 0;\n } else {\n // 序列号(值我发送的计数,每次不一样), be说明是应答指令, 51 应答命令ID, 00成功状态--成功\n List<Integer> data1 = new ArrayList<>(array.subList(0, 4));\n array.subList(0, 4).clear(); // 删掉前4个\n len1 -= 4;\n _index = data1.get(0);\n _be = data1.get(1);\n _id = data1.get(2);\n _success = data1.get(3);\n }\n\n if (_success != 0) {\n BleLog.d(\"_success\" + _success + \"\");\n return null;\n }\n\n // 开始递归 取传的值 = 应答数据\n\n SparseArray<BoxResponse> _detailValue = new SparseArray<>();\n\n if (_id == BoxKey.BOX_SEND_ID || _id == BoxKey.HELM_NOTIFY_ID) {\n while (true) {\n int _len = array.get(0);\n if (len1 <= 0) {\n break;\n } else {\n // 长度\n array.remove(0);\n\n // type\n int key = array.get(0);\n array.remove(0);\n\n _detailValue.put(key, new BoxResponse(_id, _index, key, new ArrayList<>(array.subList(0, _len - 1))));\n array.subList(0, _len - 1).clear();\n }\n len1 -= (_len + 1);\n }\n } else {\n // 只有一条命令 -- 没有分指令的长度\n // key 为 _id\n BleLog.d(len1 + \"\");\n if (len1 >= 0 && array.size() >= len1) {\n _detailValue.put(0, new BoxResponse(_id, _index, 0, new ArrayList<>(array.subList(0, len1))));\n }\n }\n return _detailValue;\n }", "@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n switch (msg.what) {\n case 0x001:\n Bundle bundle1 = msg.getData();\n String result1 = bundle1.getString(\"result\");\n parseData(result1);\n break;\n default:\n break;\n }\n }", "private com.novartis.xmlbinding.mt_response.Response getResponse(String xml) throws JAXBException, SAXException{\n\n try{\n requestContext = JAXBContext.newInstance(\"com.novartis.xmlbinding.mt_response\");\n\n schema = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI)\n .newSchema(MTPrep.class.getClassLoader().getResource(\"com/novartis/messaging/schemas/MTResponse.xsd\"));\n\n unmarshaller = requestContext.createUnmarshaller();\n unmarshaller.setSchema(schema);\n }\n catch(JAXBException jex){\n throw new JAXBException(jex+\" in MTPrep.getResponse()\");\n }\n catch(SAXException sex){\n throw new SAXException(sex+\" in MTPrep.getResponse()\");\n }\n\n //read xml into object\n com.novartis.xmlbinding.mt_response.Response res = (com.novartis.xmlbinding.mt_response.Response) unmarshaller.unmarshal(new StringReader(xml));\n\n return res;\n }", "private void __getReply() throws IOException\n {\n __getReply(true); // tagged response\n }", "public static GetVehicleAlarmInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPageResponse object =\n new GetVehicleAlarmInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "protected ACLMessage prepareResponse(ACLMessage msg) {\n ACLMessage reply = msg.createReply();\n try {\n Object contentRebut = (Object)msg.getContent();\n showMessage(\"RECIEVED \"+msg.getSender().getName() + \", \"+msg.getPerformative());\n if(contentRebut.equals(\"Movement request\")) {\n showMessage(\"Movement request received\");\n reply.setPerformative(ACLMessage.AGREE);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n showMessage(\"Answer sent Movement requet recieved\"); //: \\n\"+reply.toString());\n return reply;\n }", "private void parseResponse(String body) {\n Gson gson = new Gson();\n try {\n FactDataList factDataList = gson.fromJson(body, FactDataList.class);\n if (!factDataList.title.isEmpty() || (factDataList.factDataArrayList != null && factDataList.factDataArrayList.size() > 0)) {\n factDataView.UpdateListView(factDataList);\n } else {\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n } catch (Exception e) {\n e.printStackTrace();\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n }", "@Override\n\t\tprotected Response<JSONObject> parseNetworkResponse(NetworkResponse arg0) {\n\t\t\treturn null;\n\t\t}", "public static GetClientsResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\r\n GetClientsResponse object =\r\n new GetClientsResponse();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix =\"\";\r\n java.lang.String namespaceuri =\"\";\r\n try {\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n \r\n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n if (fullTypeName!=null){\r\n java.lang.String nsPrefix = null;\r\n if (fullTypeName.indexOf(\":\") > -1){\r\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\r\n }\r\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\r\n \r\n if (!\"getClientsResponse\".equals(type)){\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\r\n return (GetClientsResponse)ExtensionMapper.getTypeObject(\r\n nsUri,type,reader);\r\n }\r\n \r\n\r\n }\r\n \r\n\r\n }\r\n\r\n \r\n\r\n \r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n \r\n\r\n \r\n \r\n reader.next();\r\n \r\n java.util.ArrayList list1 = new java.util.ArrayList();\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://registry\",\"return\").equals(reader.getName())){\r\n \r\n \r\n \r\n // Process the array and step past its final element's end.\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n list1.add(null);\r\n reader.next();\r\n } else {\r\n list1.add(User.Factory.parse(reader));\r\n }\r\n //loop until we find a start element that is not part of this array\r\n boolean loopDone1 = false;\r\n while(!loopDone1){\r\n // We should be at the end element, but make sure\r\n while (!reader.isEndElement())\r\n reader.next();\r\n // Step out of this element\r\n reader.next();\r\n // Step to next element event.\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n if (reader.isEndElement()){\r\n //two continuous end elements means we are exiting the xml structure\r\n loopDone1 = true;\r\n } else {\r\n if (new javax.xml.namespace.QName(\"http://registry\",\"return\").equals(reader.getName())){\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n list1.add(null);\r\n reader.next();\r\n } else {\r\n list1.add(User.Factory.parse(reader));\r\n }\r\n }else{\r\n loopDone1 = true;\r\n }\r\n }\r\n }\r\n // call the converter utility to convert and set the array\r\n \r\n object.set_return((User[])\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(\r\n User.class,\r\n list1));\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n \r\n if (reader.isStartElement())\r\n // A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\r\n \r\n\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public String message()\n {\n return rawResponse.message();\n }", "private static ArrayList<Map> formatResponse(String response) {\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t try {\r\n\t\t\tMap res1 = mapper.readValue(response, HashMap.class);\r\n\t\t\t\r\n\t\t\t return (ArrayList<Map>) res1.get(SESSION);\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\t \r\n\t}", "public static void messagePostingResultParser(FacebookAdapter adapter, \r\n String msg, String to, String response) throws JSONException\r\n {\r\n if (response == null)\r\n throw new NullPointerException(\"The parameter response is null\");\r\n String prefix = \"for (;;);\";\r\n if (response.startsWith(prefix))\r\n response = response.substring(prefix.length());\r\n \r\n // for (;;);{\"error\":0,\"errorSummary\":\"\",\"errorDescription\":\"No\r\n // error.\",\"payload\":[],\"bootload\":[{\"name\":\"js\\/common.js.pkg.php\",\"type\":\"js\",\"src\":\"http:\\/\\/static.ak.fbcdn.net\\/rsrc.php\\/pkg\\/60\\/106715\\/js\\/common.js.pkg.php\"}]}\r\n // for (;;);{\"error\":1356003,\"errorSummary\":\"Send destination not\r\n // online\",\"errorDescription\":\"This person is no longer\r\n // online.\",\"payload\":null,\"bootload\":[{\"name\":\"js\\/common.js.pkg.php\",\"type\":\"js\",\"src\":\"http:\\/\\/static.ak.fbcdn.net\\/rsrc.php\\/pkg\\/60\\/106715\\/js\\/common.js.pkg.php\"}]}\r\n JSONObject respObjs = new JSONObject(response);\r\n if (respObjs == null)\r\n throw new NullPointerException(\r\n \"Failed to parse JSONObject from the parameter response\");\r\n logger.info(\"Facebook: error: \" + respObjs.getInt(\"error\"));\r\n if (respObjs.get(\"error\") != null)\r\n {\r\n /*\r\n * kError_Global_ValidationError = 1346001,\r\n * kError_Login_GenericError = 1348009,\r\n * kError_Chat_NotAvailable = 1356002, \r\n * kError_Chat_SendOtherNotAvailable = 1356003,\r\n * kError_Async_NotLoggedIn = 1357001, \r\n * kError_Async_LoginChanged = 1357003,\r\n * kError_Async_CSRFCheckFailed = 1357004,\r\n * kError_Chat_TooManyMessages = 1356008,\r\n * kError_Platform_CallbackValidationFailure = 1349007,\r\n * kError_Platform_ApplicationResponseInvalid = 1349008;\r\n */\r\n \r\n int errorCode = respObjs.getInt(\"error\");\r\n String errorString =\r\n \"Error(\" + errorCode + \"): \"\r\n + (String) respObjs.get(\"errorSummary\") + \"; \"\r\n + (String) respObjs.get(\"errorDescription\");\r\n \r\n logger.warn(\"Facebook: \"+errorString);\r\n \r\n if (errorCode == FacebookErrorCode.Error_Global_NoError)\r\n {\r\n // \"error\":0, no error\r\n return;\r\n }\r\n else\r\n {\r\n // notify the posting error\r\n adapter.getSession().getTransport().sendMessage(adapter.getSession().getJID(),\r\n adapter.getSession().getTransport().getJID(),\r\n respObjs.get(\"errorSummary\").toString(), Type.error);\r\n return;\r\n // MessageDeliveryFailedEvent mdfe =\r\n // new MessageDeliveryFailedEvent(msg, to, errorCode,\r\n // new Date(), (String) respObjs.get(\"errorSummary\"));\r\n // return mdfe;\r\n \r\n }\r\n }\r\n throw new JSONException(\"The response has no \\'error\\' code field\");\r\n }", "private void parseResponse(InputStream is, SoapEnvelope envelope)\n throws Exception {\n\n try {\n System.out.print(is);\n XmlPullParser xp = Xml.newPullParser();\n xp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);\n xp.setInput(is, \"UTF-8\");\n envelope.parse(xp);\n } catch (Throwable e) {\n Log.e(\"LOG_TAG\", \"Error reading/parsing SOAP response\", e);\n\n }\n\n }", "public com.google.protobuf.ByteString getResponseMessage() {\n return responseMessage_;\n }", "String responseErrorsToString(MovilizerResponse response);", "public static MessageResponseOfAnimalModelNuLtuh91E parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n MessageResponseOfAnimalModelNuLtuh91E object = new MessageResponseOfAnimalModelNuLtuh91E();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"MessageResponseOfAnimalModelNuLtuh91\").equals(\n reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setMessageResponseOfAnimalModelNuLtuh91(null);\n reader.next();\n } else {\n object.setMessageResponseOfAnimalModelNuLtuh91(MessageResponseOfAnimalModelNuLtuh91.Factory.parse(\n reader));\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public MessageResponse(String message) {\r\n\t\tsetMessage(message);\r\n\t}", "public static WsPmsResult parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n WsPmsResult object =\n new WsPmsResult();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"WsPmsResult\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (WsPmsResult)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\"errorMessage\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setErrorMessage(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\"responseXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setResponseXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://dto.thirdsdk.api.pms.cms.hikvision.com/xsd\",\"result\").equals(reader.getName())){\n \n java.lang.String content = reader.getElementText();\n \n object.setResult(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(content));\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n object.setResult(java.lang.Integer.MIN_VALUE);\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "com.czht.face.recognition.Czhtdev.ResponseOrBuilder getResponseOrBuilder();", "private void processResponse(Vector response)\n throws IBMLPacketException {\n println(\"Processing response ...\\n\");\n\n // for each items in the vector\n for (int i = 0; i < response.size(); i++) {\n Object obj = response.get(i);\n\n if (obj instanceof String) { // normal\n \tString msg = \"#\" + i + \" (String) : \" + obj;\n println(msg);\n\n } else if (obj instanceof IBMLError) { // error\n IBMLError errorObj = (IBMLError) obj;\n String msg = \"#\" + i + \" (IBMLError) : \" + errorObj.getCode() + \", \" + errorObj.getMessage();\n println(msg);\n\n } else {\n \tString msg = \"#\" + i + \" : \" + response.get(i);\n \tprintln(msg);\n\n }\n\n }\n\n }", "private B2BMessage getRspMsg(NettyTCPResponse response, String funcId) throws Throwable {\n B2BMessage rspMsg = new B2BMessage();\n\n Assert.notNull(response, \"response must not be null\");\n Assert.isTrue(response.isSuccess(), \"does not get success response, reason:\"+response.getResponseBody(charset));\n String rspStr = response.getResponseBody(charset);\n if (this.enableLog) {\n String logUUID = logUUIDThreadLocal.get();\n LOGGER.info(logUUID + \" response message from bank:\" + rspStr);\n }\n ByteArrayInputStream baips = new ByteArrayInputStream(rspStr.getBytes(charset));\n\n rspMsg.setNetHeader(new NetMsgHeader());\n rspMsg.setBizzHeader(new BizzMsgHeader());\n MessageObjInput in = new MessageObjInput(baips, rspMsg);\n\n rspMsg.getNetHeader().readExternal(in);\n if (!rspMsg.getNetHeader().getRspCode().equalsIgnoreCase(ResponseCode.RES_000000.getCode())) {\n // throw new IOException(rspMsg.getNetHeader().getRspCode() + \":\"\n // + rspMsg.getNetHeader().getRspMsg());\n return rspMsg;\n }\n\n rspMsg.getBizzHeader().readExternal(in);\n if (!rspMsg.getBizzHeader().getRspCode()\n .equalsIgnoreCase(ResponseCode.RES_000000.getCode())) {\n // throw new IOException(rspMsg.getBizzHeader().getRspCode() + \":\"\n // + rspMsg.getBizzHeader().getRspMsg());\n return rspMsg;\n }\n\n // rspMsg = (B2BMessage) in.readObject();\n\n // if (rspMsg.getRspCode().trim().equalsIgnoreCase(ResponseCode.RES_000000.getCode()))\n\n Assert.isTrue(rspMsg.getTranFunc() != null, \"tran func id should not be null!\");\n String rspFuncId = rspMsg.getTranFunc();\n if (rspFuncId.equalsIgnoreCase(funcId)) {\n rspBodyFac.setFuncId(funcId);\n BaseMessageBody rspBody = (BaseMessageBody) context\n .getBean(RspBodyFactoryBean.beanName);\n Assert.notNull(rspBody, \"response body must not be null\");\n rspMsg.setBody(rspBody);\n rspBody.readExternal(in);\n\n if (enableRecValidator) {\n rspMsg.setValidator(validator);\n rspMsg.validateDto();\n }\n in.close();\n }\n return rspMsg;\n }" ]
[ "0.7727258", "0.70068574", "0.69505256", "0.6943738", "0.67993915", "0.6785666", "0.6657643", "0.66185385", "0.65641886", "0.6561199", "0.6536179", "0.64913356", "0.6461817", "0.64525187", "0.64372486", "0.6425787", "0.64200544", "0.63470817", "0.6335402", "0.6335402", "0.6311155", "0.6294852", "0.6264305", "0.62534577", "0.62417114", "0.6216096", "0.6196296", "0.6190531", "0.614532", "0.6142906", "0.6140496", "0.613036", "0.6125859", "0.6077481", "0.60748684", "0.60710037", "0.6058238", "0.60576195", "0.6053431", "0.60436463", "0.60370785", "0.60352486", "0.6021916", "0.6012229", "0.60108703", "0.59921", "0.59921", "0.59921", "0.59822804", "0.597805", "0.5977943", "0.59717363", "0.5971096", "0.5966901", "0.596369", "0.59592056", "0.5950784", "0.59497285", "0.5936896", "0.5931544", "0.59309477", "0.5925659", "0.5916899", "0.5911623", "0.59073853", "0.5905382", "0.59041727", "0.5899578", "0.5898805", "0.5894948", "0.58771193", "0.5874435", "0.5871346", "0.58698094", "0.58680326", "0.5865232", "0.58570087", "0.58570087", "0.5853018", "0.5851923", "0.5851825", "0.5848446", "0.5846879", "0.5846508", "0.5840299", "0.58392465", "0.5838108", "0.5837837", "0.5835297", "0.5834639", "0.58339006", "0.58244056", "0.58232015", "0.5819415", "0.5815755", "0.58067155", "0.5800418", "0.57933563", "0.5786825", "0.5783585", "0.5782133" ]
0.0
-1
Scanner in = new Scanner(System.in);
public static void main(String[] args) { int firstValue = 24, secondValue = 32, thirdValue = 11; int mostLargestValue, secondLargeValue, minimumValue; int temporary; // 임시로 사용할 저장 공간 // System.out.print("첫번째 수 = "); // firstValue = in.nextInt(); // // System.out.print("두번째 수 = "); // secondValue = in.nextInt(); // // System.out.print("세번째 수 = "); // thirdValue = in.nextInt(); // and // if (secondValue >= firstValue && secondValue >= thirdValue) { // temporary = firstValue; // firstValue = secondValue; // secondValue = temporary; // } else if (thirdValue >= firstValue && thirdValue >= secondValue) { // temporary = firstValue; // firstValue = thirdValue; // thirdValue = temporary; // } // // if (thirdValue >= secondValue) { // temporary = secondValue; // secondValue = thirdValue; // thirdValue = temporary; // } if (secondValue >= firstValue && secondValue >= thirdValue) { mostLargestValue = secondValue; } System.out.println(); System.out.println(firstValue + " >= " + secondValue + " >= " + thirdValue); // in.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\n\t}", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t}", "public InputReader() {\n reader = new Scanner(System.in);\n }", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n System.out.println(str);\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "public Menu() {\n scanner = new Scanner(System.in);\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "String consoleInput();", "public static void main(String[] args) {\nScanner sc= new Scanner(System.in);\nString name=sc.nextLine();\n\t\tSystem.out.println(\"hello\\n\"+name);\n\t\t\n\t}", "public static void main(String[] args) \n {\n Scanner sc = new Scanner(System.in); \n \n // String input\n System.out.print(\"What's your name? \"); \n String name = sc.nextLine(); \n \n // Print the values to check if input was correctly obtained. \n System.out.println(\"Name: \" + name); \n\n // Close the Scanner\n sc.close();\n }", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public void inputScanner(){\n\t\t Scanner sc=new Scanner(System.in); \n\t \n\t\t System.out.println(\"Enter your rollno\"); \n\t\t int rollno=sc.nextInt(); \n\t\t System.out.println(\"Enter your name\"); \n\t\t String name=sc.next(); \n\t\t System.out.println(\"Enter your fee\"); \n\t\t double fee=sc.nextDouble(); \n\t\t System.out.println(\"Rollno:\"+rollno+\" name:\"+name+\" fee:\"+fee); \n\t\t sc.close(); \n\t}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\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 static String readUserInput() {\n return in.nextLine();\n }", "public alphabetize()\n {\n word = new Scanner(System.in);\n }", "private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tInputStream input = System.in;\n\t\tScanner scanner = new Scanner(input);\n\t\t// nextLine()을 실행하기 전에 \n\t\t// 무엇을 해야할지 알려주는 메시지를 먼저 출력 하라.\n\t\t// 이를 'prompt(프롬프트)' 라고 한다\n\t\tSystem.out.println(\"문자열을 입력후 Enter....\");\n\t\tString strInput = scanner.nextLine();\n\t\tSystem.out.println(strInput);\n\n\t}", "public static int getInput() {\n Scanner in = new Scanner(System.in);\n\n return in.nextInt();\n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(SimpleSymbols(s.nextLine())); \n }", "public In(){\n\t\tscanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME);\n\t\tscanner.useLocale(LOCALE);\n\t}", "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // String input\n String first = sc.nextLine();\n System.out.println(first);\n\n }", "private ConsoleScanner() {}", "public WelcomeGame() {\r\n\t\tthis.input = new Scanner(System.in);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\n\t\t\n\t\tkeyboard.close();\n\t}", "public static void echoContents(Scanner in) {\n }", "public void takeUserInput() {\n\t\t\r\n\t}", "@Test\n\tpublic void one()\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"enter the value of a\");\n\t\tint a = sc.nextInt();\n\t\tSystem.out.println(\"value of a is: \" +a);\n\t}", "public Game() {\n\t\tsc = new Scanner(System.in);\n\t}", "OutputStream getStdin();", "public static String getString(){\n Scanner in = new Scanner(System.in); //scanner variable to take input\n return in.nextLine().trim();\n }", "public static void main(String[] args) {\n\t\tString s = \"We're learning about Scanner\";\n\t\tSystem.out.println(s);\n\t\tScanner sc = new Scanner(System.in);\n//\t\tint m = sc.nextInt();\n//\t\tint n = sc.nextInt();\n//\t\tSystem.out.println(\"The Value of m is: \"+m);\n//\t\tSystem.out.println(\"The Value of n is: \"+n);\n//\t\tdouble d = sc.nextDouble();\n//\t\tString name = sc.next();//Gives us one Word\n//\t\tSystem.out.println(\"Name is: \" + name);\n\t\t\n//\t\tString fullName = sc.nextLine();\n//\t\tSystem.out.println(\"Full Name is: \" + fullName);\n\t\t\n\t\tString intInput = sc.nextLine();\n\t\tint n = Integer.parseInt(intInput);\n\t\tSystem.out.println(n);\n\t}", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static void main(String args[])throws IOException\n\t{\n\tScanner obj=new Scanner(System.in);\n\n\t//Entering a string\n\tSystem.out.println(\"\\nEnter a string !\");\n\tString s=obj.nextLine();\n\tSystem.out.println(\"you have entered \"+ s);\n\n\t//entering a word\n\tSystem.out.println(\"\\nEnter a word !\");\n\tString w=obj.next();\n\n\t//entering an integer\n\tSystem.out.println(\"\\nEnter an integer !\");\n\tint n=obj.nextInt();\n\n\t//entering a float\n\tSystem.out.println(\"\\nEnter a floating point number !\");\n\tfloat f=obj.nextFloat();\n\n\t//Printing the inputs\n\tSystem.out.println(\"\\nThe inputs are .....\");\n\tSystem.out.println(\"\\nWord : \"+w+\"\\nInteger : \"+n+\"\\nFloat : \"+f);\n\n\n}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextLine()){\n\t\t\tString str=sc.nextLine();\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public String weiterSpielen(){\n Scanner keyboard = new Scanner(System.in);\n return keyboard.nextLine();\n }", "public static void main(String[] args) {\n\t\tScanner inpt = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Hello Word!!!\");\r\n\t\t\r\n\r\n\t}", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString hello = sc.nextLine();\n\t\tSystem.out.println(hello);\n\n\n\t}", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "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}", "public void doIt(Input in);", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tprocess(s);\n\t}", "public static void getString()\n\t{\n\t\t\n\t\tScanner s=new Scanner(System.in);\n\t\t\n\t\t//Here Scanner is the class name, a is the name of object, \n\t\t//new keyword is used to allocate the memory and System.in is the input stream. \n\t\t\n\t\tSystem.out.println(\"Entered a string \");\n\t\tString inputString = s.nextLine();\n\t\tSystem.out.println(\"You entered a string \" + inputString );\n\t\tSystem.out.println();\n\t}", "private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }", "public static void main(String[] args) {\n\n\t\tInputStreamReader rd= new InputStreamReader(System.in);\n\t\ttry {\n\t\t\tSystem.out.println(\"enter a number\");\n\t\t\tint value=rd.read();\n\t\t\tSystem.out.println(\"you entered:-\"+(char)value);\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 intro(){Scanner teclado = new Scanner(System.in);\nSystem.out.println(\"Introduzca la unidad de medida a la que transformar \"\n + \"pies, cm o yardas\");\nSystem.out.println(\"o escriba salir si quiere volver al primer menu\");\nopcion=teclado.nextLine();}", "String getInput();", "public static String inputStringFromKeyboard(String input){\n System.out.println(\"Input the String: \");\n //Scanner, save the inputted from keyboard\n Scanner scanner = new Scanner(System.in);\n //The value 'scanner' is assigned to 'input'\n input = scanner.next();\n return input;\n }", "@Test\n public void testMain() {\n String simulatedUserInput = \"100AUD\" + System.getProperty(\"line.separator\")\n + \"1\" + System.getProperty(\"line.separator\");\n\n InputStream savedStandardInputStream = System.in;\n System.setIn(new ByteArrayInputStream(simulatedUserInput.getBytes()));\n\n mainFunction mainfunc = new mainFunction();\n\n try {\n mainfunc.start();\n } catch(Exception e) {\n System.out.println(\"Exception!\");\n }\n\n assertEquals(1,1);\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\n\t\tprocess(s);\n\n\t}", "public TerminalGame()\n \t{\n \t\tsuper();\n \t\tbuilder = new StringBuilder();\n \t\tscanner = new Scanner(System.in);\n \t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString input = sc.nextLine();\n\t\t\tSystem.out.println(input);\n\t\t\tif(input == null || input==\"\") {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main (String[] args) throws java.lang.Exception\r\n\t{\n\t\tScanner sc=new Scanner(System.in);int f=0;\r\n\t\twhile(sc.hasNext()){\r\n\t\tint t=sc.nextInt();\r\n\t\t\r\n\t\tif(t==42) f=1;\r\n\t\tif(f==0) System.out.println(t);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\r\n System.out.println(\"Introduzca un entero: \");\r\n int a = scn.nextInt();\r\n System.out.println(\"El numero introducido es el: \" + a);\r\n String b = scn.nextLine();\r\n System.out.println(b);\r\n String c = scn.next();\r\n System.out.println(c);\r\n }", "public void input(Scanner in) { \r\n if (in.hasNext()) firstName = in.next();\r\n if (in.hasNext()) lastName = in.next();\r\n\t}", "String getUserInput();", "void Input() {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter name of the book::\");\n Bname = scanner.nextLine();\n System.out.println(\"Enter price of the book::\");\n price = scanner.nextDouble();\n }", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "static InputScanner getInputScanner() {\n return inputScanner;\n }", "private static String scan(String text)\r\n\t{\r\n\t\tSystem.out.print(text);\r\n\t\treturn input.nextLine();\r\n\t}", "public static\n Terminal in() {\n return Input.terminal;\n }", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t \n\t\tScanner scanner=new Scanner(System.in);\n\t\tUtility utility=new Utility();\n\t\n\t\tdouble c;\n\tSystem.out.println(\"enter the number\");\n\t\tc=scanner.nextInt();\n\n\t\tutility.newt(c);\n\t\tscanner.close();\n\t}", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n String str=sc.next();\n String str1=sc.next();\n String str2=sc.next();\n String str3=sc.next();\n System.out.println(str);\n System.out.println(str1);\n System.out.println(str2);\n System.out.println(str3);\n\n\n }", "public void pedirPalabra() {\r\n\r\n Scanner entradaEscaner = new Scanner(System.in);\r\n palabra = entradaEscaner.nextLine();\r\n }", "public static void main(String[] args) {\n\r\n\t\tchar n;\r\n\t\tScanner teclado=new Scanner (System.in);\r\n\t\tSystem.out.println(\"Introduce un valor al caracter\");\r\n\t\t\r\n\t\tn = teclado.nextLine().charAt(0); // Asigno el valor leido por teclado a la variable n\r\n\t\tSystem.out.println(\"El valor de la variable es \" + n);\r\n\t\tteclado.close();\r\n\t}", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\r\n System.out.print(BinaryReversalMethod(s.nextLine()));\r\n s.close();\r\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t//String str = \"Hello World\";\n\t\tScanner scanner = new Scanner(System.in); //create object;\n\t\tSystem.out.println(\"Enter an String input\");\n\t\tString userInput = scanner.nextLine();//iput\n\t\tSystem.out.println(userInput.toString());\n\t\n\t\t\n\t\t//System.out.println(\"First string upper case is \" + userInput.toUpperCase().charAt(0) + \" from \" + userInput);\n\t\t\n\t}", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n System.out.print(AlphabetSoup(s.nextLine())); \n }", "public static void echoFile(Scanner in) {\n }", "public static void main(String[] args) {\n Scanner reader = new Scanner(System.in);\r\n System.out.print(\"Enter a number: \");\r\n\r\n // nextInt() reads the next integer from the keyboard\r\n int number = reader.nextInt();\r\n\r\n // println() prints the following line to the output screen\r\n System.out.println(\"You entered: \" + number);\r\n }", "public static void main(String[] args) throws IOException{\n char c;\r\n do{\r\n c = (char)System.in.read();\r\n System.out.println(\"c: \"+c);\r\n }while(c!='.');\r\n //2 method: int read(byte data[]) & int read(byte data[],int min, int max)\r\n// byte data[] = new byte[10];// input char translated into byte numbers\r\n// System.out.println(\"nhap cac ki tu: \");\r\n// //System.in.read(data);\r\n// System.in.read(data,0,3);// read chars [0;3)\r\n// System.out.println(\"cac ki tu vua nhap\");\r\n// for(int i=0;i<data.length;i++)\r\n// System.out.println((char)data[i]);// empty positions filled with 0/empty space\r\n }", "private static Scanner determineInputSource(String[] args) throws FileNotFoundException{\n if (args.length > 0) {\n //Reading from file\n return new Scanner(new File(args[0]));\n }\n else {\n //Reading from standard Input\n return new Scanner(System.in);\n }\n }", "public static void main(String[] args) {\n\t\tString nom;\r\n\t\tScanner leer= new Scanner(System.in);\r\n\t\tSystem.out.println(\"Ingrese su nombre\");\r\n\t\tnom=leer.nextLine();\r\n\t\tSystem.out.println(\"Hola \"+nom);\r\n\t}", "public static void main(String...args){\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tString s = scan.nextLine();\r\n//\t\tString str = s.replaceAll(\"\\\\s\", \"\"); // removing white space from string\r\n//\t\tSystem.out.println(str);\r\n\t\tchar[] ch = s.toCharArray();\r\n\t\tSet<Character> charSet = new HashSet<>();\r\n\t\tfor(char c: ch){\r\n\t\t\t\r\n\t\t\tcharSet.add(c);\t\r\n\t\t}\r\n\t\t\r\n//\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor(Character character : charSet){\r\n//\t\t\tsb.append(character);\r\n\t\t\tSystem.out.print(character);\r\n\t\t}\r\n//\t\tSystem.out.println(sb.toString());\r\n\t\t\r\n\t}", "private static void takeInput() throws IOException {\n\n System.out.println(\"Enter number 1\");\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\n String number1=br.readLine();\n System.out.println(\"Enter number 2\");\n String number2=br.readLine();\n System.out.println(\"Operation\");\n String op=br.readLine();\n //WhiteHatHacker processes the input\n WhiteHatHacker hack=new WhiteHatHacker(number1,number2,op);\n hack.processInput();\n }", "public static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\twhile(in.hasNext()){\n\t\t\tString strIn=in.nextLine();\n\t\t\tString strOut=processing(strIn);\n\t\t\tSystem.out.println(strOut);\n\t\t}\n\t\tin.close();\n\t}", "private String getInput(String prompt) throws IOException {\n System.out.print(prompt);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(System.in));\n return in.readLine();\n }", "public String userCommand(){\n return scanner.nextLine();\n }", "public static void main(String[]args){//inicio del main\r\n\r\n\tScanner in = new Scanner(System.in);// creacion del scanner\r\n\tSystem.out.println(\"Input Character\");//impresion del mensaje en consola\r\n\tchar C= in.next().charAt(0);//lectura del char\r\n\t\r\n\tSystem.out.println(\"The ASCII value of \" +C+ \" is : \"+(int) C);//casteo del caracter e impresion del resultado\r\n\t}", "@Test\n public void testTooManyInput(){\n //set up\n CurrencyRates test = new CurrencyRates();\n\n //add sample user input\n InputStream in = new ByteArrayInputStream(\"ABC123 BCD234 WER456 FDG435\".getBytes());\n System.setIn(in);\n\n //test if system exits when user input is incorrect\n assertNull(test.takeInput());\n\n return;\n }", "public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}", "private void getInput() {\n\t\tSystem.out.println(\"****Welcome to TNEB online Payment*****\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter your current unit\");\r\n\t\tunit = scan.nextInt();\r\n\t}", "public Game()\n {\n Scanner userInput = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Get player name\"); \n playerName = userInput.nextLine(); \n }", "public static int askUser(Scanner in)\n {\n System.out.println(\"What do you want, respectable human being?\");\n System.out.println(\"1. Add Reminder\");\n System.out.println(\"2. View Reminder\");\n System.out.println(\"3. Edit Reminder\");\n System.out.println(\"4. Delete Reminder\");\n System.out.println(\"5. Exit\");\n System.out.print(\"User Input : \");\n return in.nextInt();\n }" ]
[ "0.81365585", "0.75688446", "0.7479002", "0.7420761", "0.73658776", "0.7230861", "0.7184454", "0.7119603", "0.70545423", "0.70302045", "0.6945125", "0.69425946", "0.69132465", "0.6858622", "0.68580383", "0.6843713", "0.6805035", "0.6786793", "0.67522013", "0.67522013", "0.6748018", "0.6742492", "0.6742492", "0.66950744", "0.66727924", "0.66456556", "0.6613", "0.6588868", "0.653433", "0.6533784", "0.6533784", "0.6525876", "0.6515387", "0.6513407", "0.65105945", "0.65077275", "0.64761394", "0.6441216", "0.64271057", "0.6418928", "0.64005935", "0.63877356", "0.6374737", "0.6370358", "0.6369105", "0.6363907", "0.6362338", "0.6357871", "0.63541293", "0.6343708", "0.6304669", "0.63044035", "0.62886244", "0.62886244", "0.62878776", "0.6287774", "0.6277057", "0.6270171", "0.62666017", "0.6258004", "0.6252371", "0.6239434", "0.6209222", "0.62077904", "0.61754876", "0.6172597", "0.6165356", "0.61593175", "0.6155777", "0.6145857", "0.6138668", "0.61232084", "0.6120919", "0.612064", "0.61114174", "0.61100674", "0.61029106", "0.6098345", "0.60974646", "0.60853815", "0.6072985", "0.60587513", "0.60549355", "0.6053865", "0.6047546", "0.6046373", "0.60315794", "0.6022594", "0.60173786", "0.6017376", "0.6011941", "0.6011463", "0.6010118", "0.6007708", "0.59997976", "0.59947294", "0.5994207", "0.599395", "0.599174", "0.5991685", "0.5985941" ]
0.0
-1
/ access modifiers changed from: protected
public void logDebug(String str) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "private PropertyAccess() {\n\t\tsuper();\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 gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "private TMCourse() {\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "@Override\n public void get() {}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "private Get() {}", "private Get() {}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public abstract String mo118046b();" ]
[ "0.7374581", "0.704046", "0.6921078", "0.6907657", "0.68447137", "0.68278503", "0.68051183", "0.6581499", "0.65379775", "0.65013164", "0.64906055", "0.64906055", "0.6471428", "0.64376146", "0.64308655", "0.64308655", "0.6427683", "0.6424486", "0.64190304", "0.640871", "0.64053404", "0.6400181", "0.63988847", "0.6397776", "0.6377783", "0.6372898", "0.63703156", "0.6366763", "0.63532007", "0.6333713", "0.6325645", "0.63249475", "0.63249475", "0.6305955", "0.62785715", "0.6270012", "0.6250164", "0.62232584", "0.62212026", "0.6211955", "0.6203344", "0.61942434", "0.6181467", "0.6174815", "0.61573285", "0.61370647", "0.6121865", "0.61183035", "0.6117989", "0.6099771", "0.60917133", "0.60917133", "0.6085753", "0.60845906", "0.60690045", "0.60688764", "0.6064975", "0.60543966", "0.60454184", "0.6045176", "0.60337836", "0.60292566", "0.60245013", "0.6018325", "0.60145676", "0.6013568", "0.6010313", "0.5994281", "0.5994048", "0.59938633", "0.59918624", "0.5990596", "0.5983826", "0.59835196", "0.596629", "0.5964607", "0.5964607", "0.5964553", "0.5964553", "0.5964553", "0.5964553", "0.5964553", "0.5964553", "0.59601754", "0.5955775", "0.5953048", "0.5947975", "0.5944416", "0.59391934", "0.59318924", "0.59317297", "0.5931352", "0.59298736", "0.59288", "0.5924899", "0.5924048", "0.5923699", "0.5922455", "0.5919852", "0.59191453", "0.5918418" ]
0.0
-1
/ access modifiers changed from: protected
public void reportThrowable(int i, String str, String str2, Object obj, Throwable th) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1