Search is not available for this dataset
hexsha
stringlengths
40
40
repo
stringlengths
6
126
path
stringlengths
6
1.02k
license
sequence
language
stringclasses
1 value
identifier
stringlengths
1
220
return_type
stringlengths
1
110
original_string
stringlengths
39
223k
original_docstring
stringlengths
16
34.8k
docstring
stringlengths
11
3.41k
docstring_tokens
sequence
code
stringlengths
26
223k
code_tokens
sequence
short_docstring
stringlengths
0
3.02k
short_docstring_tokens
sequence
comment
sequence
parameters
list
docstring_params
dict
input_ids
sequence
attention_mask
sequence
labels
sequence
39963a291aca2c3259969dbe09709e75ba6a3fae
KSayrs/randomized-dequeus-and-queues
src/Deque.java
[ "MIT" ]
Java
addFirst
null
public void addFirst(Item item){ if(item == null){ throw new NullPointerException("Cannot add a null item."); } if(itemCount == 0){ // resetting nodes back to one pointHead = new Node(item); pointTail = pointHead; } else { Node oldHead = pointHead; //old data pointHead = new Node(item); // replacing the head pointer pointHead.next = oldHead; // old value is the next one in the line oldHead.prev = pointHead; } itemCount++; // adding an item =] }
/** add the item to the front of the deque. Cannot add a null item. */
add the item to the front of the deque. Cannot add a null item.
[ "add", "the", "item", "to", "the", "front", "of", "the", "deque", ".", "Cannot", "add", "a", "null", "item", "." ]
public void addFirst(Item item){ if(item == null){ throw new NullPointerException("Cannot add a null item."); } if(itemCount == 0){ pointHead = new Node(item); pointTail = pointHead; } else { Node oldHead = pointHead; pointHead = new Node(item); pointHead.next = oldHead; oldHead.prev = pointHead; } itemCount++; }
[ "public", "void", "addFirst", "(", "Item", "item", ")", "{", "if", "(", "item", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Cannot add a null item.\"", ")", ";", "}", "if", "(", "itemCount", "==", "0", ")", "{", "pointHead", "=", "new", "Node", "(", "item", ")", ";", "pointTail", "=", "pointHead", ";", "}", "else", "{", "Node", "oldHead", "=", "pointHead", ";", "pointHead", "=", "new", "Node", "(", "item", ")", ";", "pointHead", ".", "next", "=", "oldHead", ";", "oldHead", ".", "prev", "=", "pointHead", ";", "}", "itemCount", "++", ";", "}" ]
add the item to the front of the deque.
[ "add", "the", "item", "to", "the", "front", "of", "the", "deque", "." ]
[ "// resetting nodes back to one", "//old data", "// replacing the head pointer", "// old value is the next one in the line", "// adding an item =]" ]
[ { "param": "item", "type": "Item" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "item", "type": "Item", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 527, 3759, 12, 1180, 761, 15329, 203, 3639, 309, 12, 1726, 422, 446, 15329, 604, 394, 10108, 2932, 4515, 527, 279, 446, 761, 1199, 1769, 289, 203, 203, 3639, 309, 12, 1726, 1380, 422, 374, 15329, 9079, 368, 30691, 2199, 1473, 358, 1245, 203, 5411, 1634, 1414, 273, 394, 2029, 12, 1726, 1769, 203, 5411, 1634, 12363, 273, 1634, 1414, 31, 203, 3639, 289, 469, 288, 203, 5411, 2029, 1592, 1414, 273, 1634, 1414, 31, 377, 368, 1673, 501, 203, 5411, 1634, 1414, 273, 394, 2029, 12, 1726, 1769, 282, 368, 13993, 326, 910, 4407, 203, 5411, 1634, 1414, 18, 4285, 273, 1592, 1414, 31, 377, 368, 1592, 460, 353, 326, 1024, 1245, 316, 326, 980, 203, 5411, 1592, 1414, 18, 10001, 273, 1634, 1414, 31, 203, 3639, 289, 203, 3639, 761, 1380, 9904, 31, 2868, 368, 6534, 392, 761, 273, 65, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 527, 326, 761, 358, 326, 6641, 434, 326, 21147, 18, 14143, 527, 279, 446, 761, 18, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
39963a291aca2c3259969dbe09709e75ba6a3fae
KSayrs/randomized-dequeus-and-queues
src/Deque.java
[ "MIT" ]
Java
addLast
null
public void addLast(Item item){ if(item == null){ throw new NullPointerException("Cannot add a null item."); } if(isEmpty()){ // resetting nodes back to one pointTail = new Node(item); pointHead = pointTail; } else { Node oldTail = pointTail; pointTail = new Node(item); oldTail.next = pointTail; pointTail.prev = oldTail; } itemCount++; }
/** add the item to the end of the deque */
add the item to the end of the deque
[ "add", "the", "item", "to", "the", "end", "of", "the", "deque" ]
public void addLast(Item item){ if(item == null){ throw new NullPointerException("Cannot add a null item."); } if(isEmpty()){ pointTail = new Node(item); pointHead = pointTail; } else { Node oldTail = pointTail; pointTail = new Node(item); oldTail.next = pointTail; pointTail.prev = oldTail; } itemCount++; }
[ "public", "void", "addLast", "(", "Item", "item", ")", "{", "if", "(", "item", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Cannot add a null item.\"", ")", ";", "}", "if", "(", "isEmpty", "(", ")", ")", "{", "pointTail", "=", "new", "Node", "(", "item", ")", ";", "pointHead", "=", "pointTail", ";", "}", "else", "{", "Node", "oldTail", "=", "pointTail", ";", "pointTail", "=", "new", "Node", "(", "item", ")", ";", "oldTail", ".", "next", "=", "pointTail", ";", "pointTail", ".", "prev", "=", "oldTail", ";", "}", "itemCount", "++", ";", "}" ]
add the item to the end of the deque
[ "add", "the", "item", "to", "the", "end", "of", "the", "deque" ]
[ "// resetting nodes back to one" ]
[ { "param": "item", "type": "Item" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "item", "type": "Item", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 28426, 12, 1180, 761, 15329, 203, 3639, 309, 12, 1726, 422, 446, 15329, 604, 394, 10108, 2932, 4515, 527, 279, 446, 761, 1199, 1769, 289, 203, 3639, 309, 12, 291, 1921, 10756, 95, 6647, 368, 30691, 2199, 1473, 358, 1245, 203, 5411, 1634, 12363, 273, 394, 2029, 12, 1726, 1769, 203, 5411, 1634, 1414, 273, 1634, 12363, 31, 203, 3639, 289, 469, 288, 203, 5411, 2029, 1592, 12363, 273, 1634, 12363, 31, 203, 5411, 1634, 12363, 273, 394, 2029, 12, 1726, 1769, 203, 5411, 1592, 12363, 18, 4285, 273, 1634, 12363, 31, 203, 5411, 1634, 12363, 18, 10001, 273, 1592, 12363, 31, 203, 3639, 289, 203, 3639, 761, 1380, 9904, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 527, 326, 761, 358, 326, 679, 434, 326, 21147, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
39963a291aca2c3259969dbe09709e75ba6a3fae
KSayrs/randomized-dequeus-and-queues
src/Deque.java
[ "MIT" ]
Java
removeFirst
Item
public Item removeFirst(){ if(isEmpty()){ throw new NoSuchElementException("Cannot remove an item from an empty deque."); } Item item = pointHead.item; // old if(itemCount == 1){ // reset when empties pointTail = null; pointHead = null; } else { pointHead = pointHead.next; // moving the node dowwwwn pointHead.prev = null; // nothing before, now } itemCount--; // removing an item =[ return item; // return the removed item }
/** remove and return the item from the front of the deque. Throws an error if called when the deque is empty. */
remove and return the item from the front of the deque. Throws an error if called when the deque is empty.
[ "remove", "and", "return", "the", "item", "from", "the", "front", "of", "the", "deque", ".", "Throws", "an", "error", "if", "called", "when", "the", "deque", "is", "empty", "." ]
public Item removeFirst(){ if(isEmpty()){ throw new NoSuchElementException("Cannot remove an item from an empty deque."); } Item item = pointHead.item; if(itemCount == 1){ pointTail = null; pointHead = null; } else { pointHead = pointHead.next; pointHead.prev = null; } itemCount--; return item; }
[ "public", "Item", "removeFirst", "(", ")", "{", "if", "(", "isEmpty", "(", ")", ")", "{", "throw", "new", "NoSuchElementException", "(", "\"Cannot remove an item from an empty deque.\"", ")", ";", "}", "Item", "item", "=", "pointHead", ".", "item", ";", "if", "(", "itemCount", "==", "1", ")", "{", "pointTail", "=", "null", ";", "pointHead", "=", "null", ";", "}", "else", "{", "pointHead", "=", "pointHead", ".", "next", ";", "pointHead", ".", "prev", "=", "null", ";", "}", "itemCount", "--", ";", "return", "item", ";", "}" ]
remove and return the item from the front of the deque.
[ "remove", "and", "return", "the", "item", "from", "the", "front", "of", "the", "deque", "." ]
[ "// old", "// reset when empties", "// moving the node dowwwwn", "// nothing before, now", "// removing an item =[", "// return the removed item" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 4342, 1206, 3759, 1435, 95, 203, 3639, 309, 12, 291, 1921, 10756, 95, 604, 394, 23104, 2932, 4515, 1206, 392, 761, 628, 392, 1008, 21147, 1199, 1769, 289, 203, 203, 3639, 4342, 761, 273, 1634, 1414, 18, 1726, 31, 368, 1592, 203, 3639, 309, 12, 1726, 1380, 422, 404, 15329, 377, 368, 2715, 1347, 801, 337, 606, 203, 5411, 1634, 12363, 273, 446, 31, 203, 5411, 1634, 1414, 273, 446, 31, 203, 3639, 289, 469, 288, 203, 5411, 1634, 1414, 273, 1634, 1414, 18, 4285, 31, 368, 12499, 326, 756, 22095, 5591, 82, 203, 5411, 1634, 1414, 18, 10001, 273, 446, 31, 1377, 368, 5083, 1865, 16, 2037, 203, 3639, 289, 203, 3639, 761, 1380, 413, 31, 7734, 368, 9427, 392, 761, 273, 63, 203, 3639, 327, 761, 31, 7734, 368, 327, 326, 3723, 761, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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566, 1347, 326, 21147, 353, 1008, 18, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
39963a291aca2c3259969dbe09709e75ba6a3fae
KSayrs/randomized-dequeus-and-queues
src/Deque.java
[ "MIT" ]
Java
removeLast
Item
public Item removeLast(){ if(isEmpty()){ throw new NoSuchElementException("Cannot remove an item from an empty deque."); } Item item = pointTail.item; // old if(itemCount == 1){ pointTail = null; pointHead = null; } else { pointTail = pointTail.prev; // moving the node uuuuup pointTail.next = null; // nothing after, now } itemCount--; return item; // return the removed item }
/** remove and return the item from the end of the deque. Throws an error if called when the deque is empty. */
remove and return the item from the end of the deque. Throws an error if called when the deque is empty.
[ "remove", "and", "return", "the", "item", "from", "the", "end", "of", "the", "deque", ".", "Throws", "an", "error", "if", "called", "when", "the", "deque", "is", "empty", "." ]
public Item removeLast(){ if(isEmpty()){ throw new NoSuchElementException("Cannot remove an item from an empty deque."); } Item item = pointTail.item; if(itemCount == 1){ pointTail = null; pointHead = null; } else { pointTail = pointTail.prev; pointTail.next = null; } itemCount--; return item; }
[ "public", "Item", "removeLast", "(", ")", "{", "if", "(", "isEmpty", "(", ")", ")", "{", "throw", "new", "NoSuchElementException", "(", "\"Cannot remove an item from an empty deque.\"", ")", ";", "}", "Item", "item", "=", "pointTail", ".", "item", ";", "if", "(", "itemCount", "==", "1", ")", "{", "pointTail", "=", "null", ";", "pointHead", "=", "null", ";", "}", "else", "{", "pointTail", "=", "pointTail", ".", "prev", ";", "pointTail", ".", "next", "=", "null", ";", "}", "itemCount", "--", ";", "return", "item", ";", "}" ]
remove and return the item from the end of the deque.
[ "remove", "and", "return", "the", "item", "from", "the", "end", "of", "the", "deque", "." ]
[ "// old", "// moving the node uuuuup", "// nothing after, now", "// return the removed item" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 4342, 1206, 3024, 1435, 95, 203, 3639, 309, 12, 291, 1921, 10756, 95, 604, 394, 23104, 2932, 4515, 1206, 392, 761, 628, 392, 1008, 21147, 1199, 1769, 289, 203, 3639, 4342, 761, 273, 1634, 12363, 18, 1726, 31, 368, 1592, 203, 3639, 309, 12, 1726, 1380, 422, 404, 15329, 203, 5411, 1634, 12363, 273, 446, 31, 203, 5411, 1634, 1414, 273, 446, 31, 203, 3639, 289, 469, 288, 203, 5411, 1634, 12363, 273, 1634, 12363, 18, 10001, 31, 368, 12499, 326, 756, 582, 24286, 89, 416, 203, 5411, 1634, 12363, 18, 4285, 273, 446, 31, 1377, 368, 5083, 1839, 16, 2037, 203, 3639, 289, 203, 3639, 761, 1380, 413, 31, 203, 3639, 327, 761, 31, 7734, 368, 327, 326, 3723, 761, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 1206, 471, 327, 326, 761, 628, 326, 679, 434, 326, 21147, 18, 22435, 392, 555, 309, 2566, 1347, 326, 21147, 353, 1008, 18, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
1045e5176088a42222dc33070d290ef8a3f1b79b
KSayrs/randomized-dequeus-and-queues
src/RandomizedQueue.java
[ "MIT" ]
Java
enqueue
null
public void enqueue(Item item){ if (item == null){ throw new NullPointerException("Cannot add a null item"); } // fill the nulls if(itemCount < array.length) { for(int i=0;i<array.length;i++) { if(array[i] == null) { array[i] = item; break; } } } // resize when too big if(itemCount == array.length){ resize(2*itemCount); array[itemCount] = item; } itemCount++; // Item added!! }
/** Add the item to the queue. Null items cannot be added. */
Add the item to the queue. Null items cannot be added.
[ "Add", "the", "item", "to", "the", "queue", ".", "Null", "items", "cannot", "be", "added", "." ]
public void enqueue(Item item){ if (item == null){ throw new NullPointerException("Cannot add a null item"); } if(itemCount < array.length) { for(int i=0;i<array.length;i++) { if(array[i] == null) { array[i] = item; break; } } } if(itemCount == array.length){ resize(2*itemCount); array[itemCount] = item; } itemCount++; }
[ "public", "void", "enqueue", "(", "Item", "item", ")", "{", "if", "(", "item", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Cannot add a null item\"", ")", ";", "}", "if", "(", "itemCount", "<", "array", ".", "length", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")", "{", "if", "(", "array", "[", "i", "]", "==", "null", ")", "{", "array", "[", "i", "]", "=", "item", ";", "break", ";", "}", "}", "}", "if", "(", "itemCount", "==", "array", ".", "length", ")", "{", "resize", "(", "2", "*", "itemCount", ")", ";", "array", "[", "itemCount", "]", "=", "item", ";", "}", "itemCount", "++", ";", "}" ]
Add the item to the queue.
[ "Add", "the", "item", "to", "the", "queue", "." ]
[ "// fill the nulls", "// resize when too big", "// Item added!!" ]
[ { "param": "item", "type": "Item" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "item", "type": "Item", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 12850, 12, 1180, 761, 15329, 203, 3639, 309, 261, 1726, 422, 446, 15329, 604, 394, 10108, 2932, 4515, 527, 279, 446, 761, 8863, 289, 203, 203, 3639, 368, 3636, 326, 27778, 203, 3639, 309, 12, 1726, 1380, 411, 526, 18, 2469, 13, 288, 203, 5411, 364, 12, 474, 277, 33, 20, 31, 77, 32, 1126, 18, 2469, 31, 77, 27245, 288, 203, 7734, 309, 12, 1126, 63, 77, 65, 422, 446, 13, 288, 203, 10792, 526, 63, 77, 65, 273, 761, 31, 203, 10792, 898, 31, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 203, 3639, 368, 7041, 1347, 4885, 5446, 203, 3639, 309, 12, 1726, 1380, 422, 526, 18, 2469, 15329, 203, 5411, 7041, 12, 22, 14, 1726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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 225, 1436, 326, 761, 358, 326, 2389, 18, 4112, 1516, 2780, 506, 3096, 18, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
1045e5176088a42222dc33070d290ef8a3f1b79b
KSayrs/randomized-dequeus-and-queues
src/RandomizedQueue.java
[ "MIT" ]
Java
dequeue
Item
public Item dequeue(){ if(itemCount == 0){ throw new NoSuchElementException("Queue is empty"); } int rand = StdRandom.uniform(itemCount); while(array[rand] == null){ // if it's a null value (only happens after dequeing) rand = StdRandom.uniform(array.length); // pick another one } Item item = array[rand]; // get the item array[rand] = null; // D E S T R O Y itemCount--; // decrement the item count return item; // return the item }
/** Remove and return a random item. This will throw an error if called when the queue is empty. */
Remove and return a random item. This will throw an error if called when the queue is empty.
[ "Remove", "and", "return", "a", "random", "item", ".", "This", "will", "throw", "an", "error", "if", "called", "when", "the", "queue", "is", "empty", "." ]
public Item dequeue(){ if(itemCount == 0){ throw new NoSuchElementException("Queue is empty"); } int rand = StdRandom.uniform(itemCount); while(array[rand] == null){ rand = StdRandom.uniform(array.length); } Item item = array[rand]; array[rand] = null; itemCount--; return item; }
[ "public", "Item", "dequeue", "(", ")", "{", "if", "(", "itemCount", "==", "0", ")", "{", "throw", "new", "NoSuchElementException", "(", "\"Queue is empty\"", ")", ";", "}", "int", "rand", "=", "StdRandom", ".", "uniform", "(", "itemCount", ")", ";", "while", "(", "array", "[", "rand", "]", "==", "null", ")", "{", "rand", "=", "StdRandom", ".", "uniform", "(", "array", ".", "length", ")", ";", "}", "Item", "item", "=", "array", "[", "rand", "]", ";", "array", "[", "rand", "]", "=", "null", ";", "itemCount", "--", ";", "return", "item", ";", "}" ]
Remove and return a random item.
[ "Remove", "and", "return", "a", "random", "item", "." ]
[ "// if it's a null value (only happens after dequeing)", "// pick another one", "// get the item", "// D E S T R O Y", "// decrement the item count", "// return the item" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 4342, 29964, 1435, 95, 203, 3639, 309, 12, 1726, 1380, 422, 374, 15329, 604, 394, 23104, 2932, 3183, 353, 1008, 8863, 289, 203, 203, 3639, 509, 5605, 273, 6276, 8529, 18, 24120, 12, 1726, 1380, 1769, 203, 3639, 1323, 12, 1126, 63, 7884, 65, 422, 446, 15329, 1171, 368, 309, 518, 1807, 279, 446, 460, 261, 3700, 10555, 1839, 21147, 310, 13, 203, 5411, 5605, 273, 6276, 8529, 18, 24120, 12, 1126, 18, 2469, 1769, 225, 368, 6002, 4042, 1245, 203, 3639, 289, 203, 3639, 4342, 761, 273, 526, 63, 7884, 15533, 10792, 368, 336, 326, 761, 203, 3639, 526, 63, 7884, 65, 273, 446, 31, 7682, 368, 463, 512, 348, 399, 534, 531, 1624, 203, 3639, 761, 1380, 413, 31, 27573, 368, 15267, 326, 761, 1056, 203, 3639, 327, 761, 31, 27573, 368, 327, 326, 761, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 225, 3581, 471, 327, 279, 2744, 761, 18, 1220, 903, 604, 392, 555, 309, 2566, 1347, 326, 2389, 353, 1008, 18, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
1045e5176088a42222dc33070d290ef8a3f1b79b
KSayrs/randomized-dequeus-and-queues
src/RandomizedQueue.java
[ "MIT" ]
Java
sample
Item
public Item sample(){ if(itemCount == 0){ throw new NoSuchElementException("Queue is empty"); } int rand = StdRandom.uniform(array.length); while(array[rand] == null){ // if it's a null value rand = StdRandom.uniform(array.length); // pick another one } return array[rand]; }
/** return a random item (but do not remove it). * This will throw an error if called when the queue is empty. * */
return a random item (but do not remove it). This will throw an error if called when the queue is empty.
[ "return", "a", "random", "item", "(", "but", "do", "not", "remove", "it", ")", ".", "This", "will", "throw", "an", "error", "if", "called", "when", "the", "queue", "is", "empty", "." ]
public Item sample(){ if(itemCount == 0){ throw new NoSuchElementException("Queue is empty"); } int rand = StdRandom.uniform(array.length); while(array[rand] == null){ rand = StdRandom.uniform(array.length); } return array[rand]; }
[ "public", "Item", "sample", "(", ")", "{", "if", "(", "itemCount", "==", "0", ")", "{", "throw", "new", "NoSuchElementException", "(", "\"Queue is empty\"", ")", ";", "}", "int", "rand", "=", "StdRandom", ".", "uniform", "(", "array", ".", "length", ")", ";", "while", "(", "array", "[", "rand", "]", "==", "null", ")", "{", "rand", "=", "StdRandom", ".", "uniform", "(", "array", ".", "length", ")", ";", "}", "return", "array", "[", "rand", "]", ";", "}" ]
return a random item (but do not remove it).
[ "return", "a", "random", "item", "(", "but", "do", "not", "remove", "it", ")", "." ]
[ "// if it's a null value", "// pick another one" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 4342, 3296, 1435, 95, 203, 3639, 309, 12, 1726, 1380, 422, 374, 15329, 203, 5411, 604, 394, 23104, 2932, 3183, 353, 1008, 8863, 203, 3639, 289, 203, 3639, 509, 5605, 273, 6276, 8529, 18, 24120, 12, 1126, 18, 2469, 1769, 203, 3639, 1323, 12, 1126, 63, 7884, 65, 422, 446, 15329, 1171, 368, 309, 518, 1807, 279, 446, 460, 203, 5411, 5605, 273, 6276, 8529, 18, 24120, 12, 1126, 18, 2469, 1769, 225, 368, 6002, 4042, 1245, 203, 3639, 289, 203, 3639, 327, 526, 63, 7884, 15533, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 327, 279, 2744, 761, 261, 12885, 741, 486, 1206, 518, 2934, 203, 377, 380, 1220, 903, 604, 392, 555, 309, 2566, 1347, 326, 2389, 353, 1008, 18, 203, 377, 380, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
1045e5176088a42222dc33070d290ef8a3f1b79b
KSayrs/randomized-dequeus-and-queues
src/RandomizedQueue.java
[ "MIT" ]
Java
reset
null
private void reset(){ int j=0; for(int i=0; i<array.length; i++){ if(j == itemCount) {return;} if(array[i]!=null){ temp[j] = array[i]; j++; } } }
// not strictly necessary to have a separate method here, but hey it helped in the process
not strictly necessary to have a separate method here, but hey it helped in the process
[ "not", "strictly", "necessary", "to", "have", "a", "separate", "method", "here", "but", "hey", "it", "helped", "in", "the", "process" ]
private void reset(){ int j=0; for(int i=0; i<array.length; i++){ if(j == itemCount) {return;} if(array[i]!=null){ temp[j] = array[i]; j++; } } }
[ "private", "void", "reset", "(", ")", "{", "int", "j", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")", "{", "if", "(", "j", "==", "itemCount", ")", "{", "return", ";", "}", "if", "(", "array", "[", "i", "]", "!=", "null", ")", "{", "temp", "[", "j", "]", "=", "array", "[", "i", "]", ";", "j", "++", ";", "}", "}", "}" ]
not strictly necessary to have a separate method here, but hey it helped in the process
[ "not", "strictly", "necessary", "to", "have", "a", "separate", "method", "here", "but", "hey", "it", "helped", "in", "the", "process" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 2715, 1435, 95, 203, 5411, 509, 525, 33, 20, 31, 203, 5411, 364, 12, 474, 277, 33, 20, 31, 277, 32, 1126, 18, 2469, 31, 277, 27245, 95, 203, 7734, 309, 12, 78, 422, 761, 1380, 13, 288, 2463, 31, 97, 203, 7734, 309, 12, 1126, 63, 77, 65, 5, 33, 2011, 15329, 203, 10792, 1906, 63, 78, 65, 273, 526, 63, 77, 15533, 203, 10792, 525, 9904, 31, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 486, 23457, 4573, 358, 1240, 279, 9004, 707, 2674, 16, 1496, 366, 402, 518, 13150, 1845, 316, 326, 1207, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
476d964e4b060a8357c7d748f3b70c6617835eb1
iedadata/geomapapp
haxby/db/mgg/MGGData.java
[ "Apache-2.0" ]
Java
drawCurrentPoint
null
protected void drawCurrentPoint() { if( map==null || currentPoint==null || !map.isVisible() ) return; synchronized (map.getTreeLock() ) { Graphics2D g = map.getGraphics2D(); Graphics2D g2 = map.getGraphics2D(); float zoom = (float)map.getZoom(); g.setStroke( new BasicStroke( 5f/ zoom ) ); Rectangle2D rect = map.getClipRect2D(); double wrap = map.getWrap(); if( wrap>0. ) while( currentPoint.x-wrap > rect.getX() ) currentPoint.x-=wrap; double size = 10./map.getZoom(); Arc2D.Double arc = new Arc2D.Double( 0., currentPoint.y, size/6, size/6, 0., 360., Arc2D.CHORD); Arc2D.Double arc2 = new Arc2D.Double( 0., currentPoint.y-.5*size, size, size, 0., 360., Arc2D.CHORD); if( wrap>0. ) { while( currentPoint.x < rect.getX()+rect.getWidth() ) { g.setColor(Color.red); g.setStroke( new BasicStroke( 5f/ zoom ) ); g.draw(currentSeg); g.setColor(Color.white); g.setStroke( new BasicStroke( 2.f/ zoom ) ); arc.x = currentPoint.x; g.draw(arc); arc2.x = currentPoint.x-.5*size; g2.setXORMode( Color.white ); g2.setStroke( new BasicStroke( 4f/ zoom ) ); g2.draw(arc2); currentPoint.x += wrap; } } else { g.setColor(Color.red); g.setStroke( new BasicStroke( 5f/ zoom ) ); g.draw(currentSeg); g.setColor(Color.white); g.setStroke( new BasicStroke( 2.f/ zoom ) ); arc.x = currentPoint.x; g.draw(arc); arc2.x = currentPoint.x-.5*size; g2.setXORMode( Color.white ); g2.setStroke( new BasicStroke( 4f/ zoom ) ); g2.draw(arc2); } } }
// you are looking at; circle is now thicker
you are looking at; circle is now thicker
[ "you", "are", "looking", "at", ";", "circle", "is", "now", "thicker" ]
protected void drawCurrentPoint() { if( map==null || currentPoint==null || !map.isVisible() ) return; synchronized (map.getTreeLock() ) { Graphics2D g = map.getGraphics2D(); Graphics2D g2 = map.getGraphics2D(); float zoom = (float)map.getZoom(); g.setStroke( new BasicStroke( 5f/ zoom ) ); Rectangle2D rect = map.getClipRect2D(); double wrap = map.getWrap(); if( wrap>0. ) while( currentPoint.x-wrap > rect.getX() ) currentPoint.x-=wrap; double size = 10./map.getZoom(); Arc2D.Double arc = new Arc2D.Double( 0., currentPoint.y, size/6, size/6, 0., 360., Arc2D.CHORD); Arc2D.Double arc2 = new Arc2D.Double( 0., currentPoint.y-.5*size, size, size, 0., 360., Arc2D.CHORD); if( wrap>0. ) { while( currentPoint.x < rect.getX()+rect.getWidth() ) { g.setColor(Color.red); g.setStroke( new BasicStroke( 5f/ zoom ) ); g.draw(currentSeg); g.setColor(Color.white); g.setStroke( new BasicStroke( 2.f/ zoom ) ); arc.x = currentPoint.x; g.draw(arc); arc2.x = currentPoint.x-.5*size; g2.setXORMode( Color.white ); g2.setStroke( new BasicStroke( 4f/ zoom ) ); g2.draw(arc2); currentPoint.x += wrap; } } else { g.setColor(Color.red); g.setStroke( new BasicStroke( 5f/ zoom ) ); g.draw(currentSeg); g.setColor(Color.white); g.setStroke( new BasicStroke( 2.f/ zoom ) ); arc.x = currentPoint.x; g.draw(arc); arc2.x = currentPoint.x-.5*size; g2.setXORMode( Color.white ); g2.setStroke( new BasicStroke( 4f/ zoom ) ); g2.draw(arc2); } } }
[ "protected", "void", "drawCurrentPoint", "(", ")", "{", "if", "(", "map", "==", "null", "||", "currentPoint", "==", "null", "||", "!", "map", ".", "isVisible", "(", ")", ")", "return", ";", "synchronized", "(", "map", ".", "getTreeLock", "(", ")", ")", "{", "Graphics2D", "g", "=", "map", ".", "getGraphics2D", "(", ")", ";", "Graphics2D", "g2", "=", "map", ".", "getGraphics2D", "(", ")", ";", "float", "zoom", "=", "(", "float", ")", "map", ".", "getZoom", "(", ")", ";", "g", ".", "setStroke", "(", "new", "BasicStroke", "(", "5f", "/", "zoom", ")", ")", ";", "Rectangle2D", "rect", "=", "map", ".", "getClipRect2D", "(", ")", ";", "double", "wrap", "=", "map", ".", "getWrap", "(", ")", ";", "if", "(", "wrap", ">", "0.", ")", "while", "(", "currentPoint", ".", "x", "-", "wrap", ">", "rect", ".", "getX", "(", ")", ")", "currentPoint", ".", "x", "-=", "wrap", ";", "double", "size", "=", "10.", "/", "map", ".", "getZoom", "(", ")", ";", "Arc2D", ".", "Double", "arc", "=", "new", "Arc2D", ".", "Double", "(", "0.", ",", "currentPoint", ".", "y", ",", "size", "/", "6", ",", "size", "/", "6", ",", "0.", ",", "360.", ",", "Arc2D", ".", "CHORD", ")", ";", "Arc2D", ".", "Double", "arc2", "=", "new", "Arc2D", ".", "Double", "(", "0.", ",", "currentPoint", ".", "y", "-", ".5", "*", "size", ",", "size", ",", "size", ",", "0.", ",", "360.", ",", "Arc2D", ".", "CHORD", ")", ";", "if", "(", "wrap", ">", "0.", ")", "{", "while", "(", "currentPoint", ".", "x", "<", "rect", ".", "getX", "(", ")", "+", "rect", ".", "getWidth", "(", ")", ")", "{", "g", ".", "setColor", "(", "Color", ".", "red", ")", ";", "g", ".", "setStroke", "(", "new", "BasicStroke", "(", "5f", "/", "zoom", ")", ")", ";", "g", ".", "draw", "(", "currentSeg", ")", ";", "g", ".", "setColor", "(", "Color", ".", "white", ")", ";", "g", ".", "setStroke", "(", "new", "BasicStroke", "(", "2.f", "/", "zoom", ")", ")", ";", "arc", ".", "x", "=", "currentPoint", ".", "x", ";", "g", ".", "draw", "(", "arc", ")", ";", "arc2", ".", "x", "=", "currentPoint", ".", "x", "-", ".5", "*", "size", ";", "g2", ".", "setXORMode", "(", "Color", ".", "white", ")", ";", "g2", ".", "setStroke", "(", "new", "BasicStroke", "(", "4f", "/", "zoom", ")", ")", ";", "g2", ".", "draw", "(", "arc2", ")", ";", "currentPoint", ".", "x", "+=", "wrap", ";", "}", "}", "else", "{", "g", ".", "setColor", "(", "Color", ".", "red", ")", ";", "g", ".", "setStroke", "(", "new", "BasicStroke", "(", "5f", "/", "zoom", ")", ")", ";", "g", ".", "draw", "(", "currentSeg", ")", ";", "g", ".", "setColor", "(", "Color", ".", "white", ")", ";", "g", ".", "setStroke", "(", "new", "BasicStroke", "(", "2.f", "/", "zoom", ")", ")", ";", "arc", ".", "x", "=", "currentPoint", ".", "x", ";", "g", ".", "draw", "(", "arc", ")", ";", "arc2", ".", "x", "=", "currentPoint", ".", "x", "-", ".5", "*", "size", ";", "g2", ".", "setXORMode", "(", "Color", ".", "white", ")", ";", "g2", ".", "setStroke", "(", "new", "BasicStroke", "(", "4f", "/", "zoom", ")", ")", ";", "g2", ".", "draw", "(", "arc2", ")", ";", "}", "}", "}" ]
you are looking at; circle is now thicker
[ "you", "are", "looking", "at", ";", "circle", "is", "now", "thicker" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 3724, 3935, 2148, 1435, 288, 203, 202, 202, 430, 12, 852, 631, 2011, 747, 783, 2148, 631, 2011, 747, 401, 1458, 18, 291, 6207, 1435, 262, 327, 31, 203, 202, 202, 22043, 261, 1458, 18, 588, 2471, 2531, 1435, 262, 288, 203, 1082, 202, 17558, 22, 40, 314, 273, 852, 18, 588, 17558, 22, 40, 5621, 203, 1082, 202, 17558, 22, 40, 314, 22, 273, 852, 18, 588, 17558, 22, 40, 5621, 203, 1082, 202, 5659, 7182, 273, 261, 5659, 13, 1458, 18, 588, 11497, 5621, 203, 203, 1082, 202, 75, 18, 542, 14602, 12, 394, 7651, 14602, 12, 1381, 74, 19, 7182, 262, 11272, 203, 203, 1082, 202, 19463, 22, 40, 4917, 273, 852, 18, 588, 15339, 6120, 22, 40, 5621, 203, 1082, 202, 9056, 2193, 273, 852, 18, 588, 2964, 5621, 203, 1082, 202, 430, 12, 2193, 34, 20, 18, 262, 1323, 12, 783, 2148, 18, 92, 17, 4113, 405, 4917, 18, 588, 60, 1435, 262, 783, 2148, 18, 92, 17, 33, 4113, 31, 203, 1082, 202, 9056, 963, 273, 1728, 18, 19, 1458, 18, 588, 11497, 5621, 203, 203, 1082, 202, 14598, 22, 40, 18, 5265, 8028, 273, 394, 24881, 22, 40, 18, 5265, 12, 374, 12990, 783, 2148, 18, 93, 16, 7010, 6862, 1082, 202, 1467, 19, 26, 16, 963, 19, 26, 16, 374, 12990, 12360, 12990, 24881, 22, 40, 18, 30555, 40, 1769, 203, 1082, 202, 14598, 22, 40, 18, 5265, 8028, 22, 273, 394, 24881, 22, 40, 18, 5265, 12, 374, 12990, 783, 2148, 18, 93, 17, 18, 25, 14, 1467, 16, 7010, 6862, 202, 1467, 16, 963, 16, 374, 12990, 12360, 12990, 24881, 22, 40, 18, 30555, 40, 1769, 203, 1082, 202, 430, 12, 2193, 34, 20, 18, 262, 288, 203, 9506, 202, 17523, 12, 783, 2148, 18, 92, 411, 4917, 18, 588, 60, 1435, 15, 2607, 18, 588, 2384, 1435, 262, 288, 203, 6862, 202, 75, 18, 542, 2957, 12, 2957, 18, 1118, 1769, 203, 6862, 202, 75, 18, 542, 14602, 12, 394, 7651, 14602, 12, 1381, 74, 19, 7182, 262, 11272, 203, 6862, 202, 75, 18, 9446, 12, 2972, 3289, 1769, 203, 6862, 202, 75, 18, 542, 2957, 12, 2957, 18, 14739, 1769, 203, 6862, 202, 75, 18, 542, 14602, 12, 394, 7651, 14602, 12, 576, 18, 74, 19, 7182, 262, 11272, 203, 6862, 202, 11828, 18, 92, 273, 783, 2148, 18, 92, 31, 203, 6862, 202, 75, 18, 9446, 12, 11828, 1769, 203, 6862, 202, 11828, 22, 18, 92, 273, 783, 2148, 18, 92, 17, 18, 25, 14, 1467, 31, 203, 6862, 202, 75, 22, 18, 542, 60, 916, 2309, 12, 5563, 18, 14739, 11272, 203, 6862, 202, 75, 22, 18, 542, 14602, 12, 394, 7651, 14602, 12, 1059, 74, 19, 7182, 262, 11272, 203, 6862, 202, 75, 22, 18, 9446, 12, 11828, 22, 1769, 203, 6862, 202, 2972, 2148, 18, 92, 1011, 2193, 31, 203, 9506, 202, 97, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 75, 18, 542, 2957, 12, 2957, 18, 1118, 1769, 203, 9506, 202, 75, 18, 542, 14602, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 759, 202, 19940, 854, 7849, 622, 31, 12470, 353, 2037, 286, 5448, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
476d964e4b060a8357c7d748f3b70c6617835eb1
iedadata/geomapapp
haxby/db/mgg/MGGData.java
[ "Apache-2.0" ]
Java
inDisplayedMap
null
public boolean inDisplayedMap(Point2D p) { double x = p.getX(); double y = p.getY(); //get the displayed area Rectangle2D rect = map.getClipRect2D(); float yMin = (float)rect.getY(); float yMax = (float)(rect.getY() + rect.getHeight()); float xMin = (float)rect.getX(); float xMax = (float)(rect.getX() + rect.getWidth()); float wrap = (float)map.getWrap(); if (wrap>0f){ while (x>xMin+wrap) x-=wrap; while (x<xMax-wrap) x+=wrap; } if (x >= xMin && x <= xMax && y >= yMin && y <= yMax) return true; return false; }
/* * Determine if a point is located on the displayed map */
Determine if a point is located on the displayed map
[ "Determine", "if", "a", "point", "is", "located", "on", "the", "displayed", "map" ]
public boolean inDisplayedMap(Point2D p) { double x = p.getX(); double y = p.getY(); Rectangle2D rect = map.getClipRect2D(); float yMin = (float)rect.getY(); float yMax = (float)(rect.getY() + rect.getHeight()); float xMin = (float)rect.getX(); float xMax = (float)(rect.getX() + rect.getWidth()); float wrap = (float)map.getWrap(); if (wrap>0f){ while (x>xMin+wrap) x-=wrap; while (x<xMax-wrap) x+=wrap; } if (x >= xMin && x <= xMax && y >= yMin && y <= yMax) return true; return false; }
[ "public", "boolean", "inDisplayedMap", "(", "Point2D", "p", ")", "{", "double", "x", "=", "p", ".", "getX", "(", ")", ";", "double", "y", "=", "p", ".", "getY", "(", ")", ";", "Rectangle2D", "rect", "=", "map", ".", "getClipRect2D", "(", ")", ";", "float", "yMin", "=", "(", "float", ")", "rect", ".", "getY", "(", ")", ";", "float", "yMax", "=", "(", "float", ")", "(", "rect", ".", "getY", "(", ")", "+", "rect", ".", "getHeight", "(", ")", ")", ";", "float", "xMin", "=", "(", "float", ")", "rect", ".", "getX", "(", ")", ";", "float", "xMax", "=", "(", "float", ")", "(", "rect", ".", "getX", "(", ")", "+", "rect", ".", "getWidth", "(", ")", ")", ";", "float", "wrap", "=", "(", "float", ")", "map", ".", "getWrap", "(", ")", ";", "if", "(", "wrap", ">", "0f", ")", "{", "while", "(", "x", ">", "xMin", "+", "wrap", ")", "x", "-=", "wrap", ";", "while", "(", "x", "<", "xMax", "-", "wrap", ")", "x", "+=", "wrap", ";", "}", "if", "(", "x", ">=", "xMin", "&&", "x", "<=", "xMax", "&&", "y", ">=", "yMin", "&&", "y", "<=", "yMax", ")", "return", "true", ";", "return", "false", ";", "}" ]
Determine if a point is located on the displayed map
[ "Determine", "if", "a", "point", "is", "located", "on", "the", "displayed", "map" ]
[ "//get the displayed area" ]
[ { "param": "p", "type": "Point2D" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "p", "type": "Point2D", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 316, 4236, 329, 863, 12, 2148, 22, 40, 293, 13, 288, 203, 202, 202, 9056, 619, 273, 293, 18, 588, 60, 5621, 203, 202, 202, 9056, 677, 273, 293, 18, 588, 61, 5621, 203, 202, 202, 759, 588, 326, 10453, 5091, 203, 202, 202, 19463, 22, 40, 4917, 273, 852, 18, 588, 15339, 6120, 22, 40, 5621, 203, 202, 202, 5659, 677, 2930, 273, 261, 5659, 13, 2607, 18, 588, 61, 5621, 203, 202, 202, 5659, 677, 2747, 273, 261, 5659, 21433, 2607, 18, 588, 61, 1435, 397, 4917, 18, 588, 2686, 10663, 203, 202, 202, 5659, 619, 2930, 273, 261, 5659, 13, 2607, 18, 588, 60, 5621, 203, 202, 202, 5659, 619, 2747, 273, 261, 5659, 21433, 2607, 18, 588, 60, 1435, 397, 4917, 18, 588, 2384, 10663, 203, 202, 202, 5659, 2193, 273, 261, 5659, 13, 1458, 18, 588, 2964, 5621, 203, 203, 202, 202, 430, 261, 4113, 34, 20, 74, 15329, 203, 1082, 202, 17523, 261, 92, 34, 92, 2930, 15, 4113, 13, 619, 17, 33, 4113, 31, 203, 1082, 202, 17523, 261, 92, 32, 92, 2747, 17, 4113, 13, 619, 15, 33, 4113, 31, 203, 202, 202, 97, 203, 1082, 203, 202, 202, 430, 261, 92, 1545, 619, 2930, 597, 619, 1648, 619, 2747, 597, 677, 1545, 677, 2930, 597, 677, 1648, 677, 2747, 13, 327, 638, 31, 203, 203, 202, 202, 2463, 629, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 10229, 309, 279, 1634, 353, 13801, 603, 326, 10453, 852, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
476d964e4b060a8357c7d748f3b70c6617835eb1
iedadata/geomapapp
haxby/db/mgg/MGGData.java
[ "Apache-2.0" ]
Java
tryPopUp
null
public void tryPopUp(MouseEvent evt){ String osName = System.getProperty("os.name"); if ( !evt.isControlDown() ) { if ( osName.startsWith("Mac OS") && evt.isShiftDown() ) { pm.show(evt.getComponent(), evt.getX(), evt.getY() ); } else if ( evt.isPopupTrigger() ) { pm.show(evt.getComponent(), evt.getX(), evt.getY()); } } }
// the current point to the clipboard.
the current point to the clipboard.
[ "the", "current", "point", "to", "the", "clipboard", "." ]
public void tryPopUp(MouseEvent evt){ String osName = System.getProperty("os.name"); if ( !evt.isControlDown() ) { if ( osName.startsWith("Mac OS") && evt.isShiftDown() ) { pm.show(evt.getComponent(), evt.getX(), evt.getY() ); } else if ( evt.isPopupTrigger() ) { pm.show(evt.getComponent(), evt.getX(), evt.getY()); } } }
[ "public", "void", "tryPopUp", "(", "MouseEvent", "evt", ")", "{", "String", "osName", "=", "System", ".", "getProperty", "(", "\"os.name\"", ")", ";", "if", "(", "!", "evt", ".", "isControlDown", "(", ")", ")", "{", "if", "(", "osName", ".", "startsWith", "(", "\"Mac OS\"", ")", "&&", "evt", ".", "isShiftDown", "(", ")", ")", "{", "pm", ".", "show", "(", "evt", ".", "getComponent", "(", ")", ",", "evt", ".", "getX", "(", ")", ",", "evt", ".", "getY", "(", ")", ")", ";", "}", "else", "if", "(", "evt", ".", "isPopupTrigger", "(", ")", ")", "{", "pm", ".", "show", "(", "evt", ".", "getComponent", "(", ")", ",", "evt", ".", "getX", "(", ")", ",", "evt", ".", "getY", "(", ")", ")", ";", "}", "}", "}" ]
the current point to the clipboard.
[ "the", "current", "point", "to", "the", "clipboard", "." ]
[]
[ { "param": "evt", "type": "MouseEvent" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "evt", "type": "MouseEvent", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 775, 7049, 1211, 12, 9186, 1133, 6324, 15329, 203, 202, 202, 780, 1140, 461, 273, 2332, 18, 588, 1396, 2932, 538, 18, 529, 8863, 203, 202, 202, 430, 261, 401, 73, 11734, 18, 291, 3367, 4164, 1435, 262, 288, 203, 1082, 202, 430, 261, 1140, 461, 18, 17514, 1190, 2932, 9990, 5932, 7923, 597, 6324, 18, 291, 10544, 4164, 1435, 262, 288, 203, 9506, 202, 7755, 18, 4500, 12, 73, 11734, 18, 588, 1841, 9334, 6324, 18, 588, 60, 9334, 6324, 18, 588, 61, 1435, 11272, 203, 1082, 202, 97, 203, 1082, 202, 12107, 309, 261, 6324, 18, 291, 13770, 6518, 1435, 262, 288, 203, 9506, 202, 7755, 18, 4500, 12, 73, 11734, 18, 588, 1841, 9334, 6324, 18, 588, 60, 9334, 6324, 18, 588, 61, 10663, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 202, 5787, 783, 1634, 358, 326, 20304, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
476d964e4b060a8357c7d748f3b70c6617835eb1
iedadata/geomapapp
haxby/db/mgg/MGGData.java
[ "Apache-2.0" ]
Java
loadFromDataFile
MGGData
static MGGData loadFromDataFile(XMap map, String leg) throws IOException { MGGData data = null; BufferedReader dataIn; File dataFile; DataInputStream controlIn; String name, s; ArrayList<Double> lon = new ArrayList<Double>(); ArrayList<Double> lat = new ArrayList<Double>(); ArrayList<Float> topo = new ArrayList<Float>(); ArrayList<Float> grav = new ArrayList<Float>(); ArrayList<Float> mag = new ArrayList<Float>(); // First search the control files to find which one contains our data set. // The control file include the data set name. // The data file has the same timestamp in the file name, so once we have found // the control file, we can work out the data file. if ( MGG.MGG_control_dir.exists() ) { File[] MGG_control_files = MGG.MGG_control_dir.listFiles(); for ( int m = 0; m < MGG_control_files.length; m++ ) { if ( MGG_control_files[m].getName().indexOf( "mgg_control" ) != -1 ) { controlIn = new DataInputStream( new BufferedInputStream( new FileInputStream( MGG_control_files[m] ) ) ); name = ""; try { name = controlIn.readUTF(); } catch (EOFException ex) { break; } controlIn.close(); if (name.equals(leg)) { //we have found the right control file, now read the data file dataFile = new File (MGG.MGG_data_dir, "mgg_data_" + leg); try { dataIn = new BufferedReader( new InputStreamReader(new FileInputStream( dataFile ))); } catch (Exception ex) { continue; } while ( ( s = dataIn.readLine() ) != null ) { StringTokenizer st = new StringTokenizer(s); String date = st.nextToken(); //don't need this lon.add(Double.parseDouble(st.nextToken())); lat.add(Double.parseDouble(st.nextToken())); topo.add(Float.parseFloat(st.nextToken())); grav.add(Float.parseFloat(st.nextToken())); mag.add(Float.parseFloat(st.nextToken())); } dataIn.close(); //create the MGDData structure (need to convert the arrayLists to arrays first) data = new MGGData( map, leg, GeneralUtils.arrayList2doubles(lon), GeneralUtils.arrayList2doubles(lat), GeneralUtils.arrayList2floats(topo), GeneralUtils.arrayList2floats(grav), GeneralUtils.arrayList2floats(mag)); } } } } return data; }
/* * for imported data sets, load from the data file stored on the user's hard drive */
for imported data sets, load from the data file stored on the user's hard drive
[ "for", "imported", "data", "sets", "load", "from", "the", "data", "file", "stored", "on", "the", "user", "'", "s", "hard", "drive" ]
static MGGData loadFromDataFile(XMap map, String leg) throws IOException { MGGData data = null; BufferedReader dataIn; File dataFile; DataInputStream controlIn; String name, s; ArrayList<Double> lon = new ArrayList<Double>(); ArrayList<Double> lat = new ArrayList<Double>(); ArrayList<Float> topo = new ArrayList<Float>(); ArrayList<Float> grav = new ArrayList<Float>(); ArrayList<Float> mag = new ArrayList<Float>(); if ( MGG.MGG_control_dir.exists() ) { File[] MGG_control_files = MGG.MGG_control_dir.listFiles(); for ( int m = 0; m < MGG_control_files.length; m++ ) { if ( MGG_control_files[m].getName().indexOf( "mgg_control" ) != -1 ) { controlIn = new DataInputStream( new BufferedInputStream( new FileInputStream( MGG_control_files[m] ) ) ); name = ""; try { name = controlIn.readUTF(); } catch (EOFException ex) { break; } controlIn.close(); if (name.equals(leg)) { dataFile = new File (MGG.MGG_data_dir, "mgg_data_" + leg); try { dataIn = new BufferedReader( new InputStreamReader(new FileInputStream( dataFile ))); } catch (Exception ex) { continue; } while ( ( s = dataIn.readLine() ) != null ) { StringTokenizer st = new StringTokenizer(s); String date = st.nextToken(); lon.add(Double.parseDouble(st.nextToken())); lat.add(Double.parseDouble(st.nextToken())); topo.add(Float.parseFloat(st.nextToken())); grav.add(Float.parseFloat(st.nextToken())); mag.add(Float.parseFloat(st.nextToken())); } dataIn.close(); data = new MGGData( map, leg, GeneralUtils.arrayList2doubles(lon), GeneralUtils.arrayList2doubles(lat), GeneralUtils.arrayList2floats(topo), GeneralUtils.arrayList2floats(grav), GeneralUtils.arrayList2floats(mag)); } } } } return data; }
[ "static", "MGGData", "loadFromDataFile", "(", "XMap", "map", ",", "String", "leg", ")", "throws", "IOException", "{", "MGGData", "data", "=", "null", ";", "BufferedReader", "dataIn", ";", "File", "dataFile", ";", "DataInputStream", "controlIn", ";", "String", "name", ",", "s", ";", "ArrayList", "<", "Double", ">", "lon", "=", "new", "ArrayList", "<", "Double", ">", "(", ")", ";", "ArrayList", "<", "Double", ">", "lat", "=", "new", "ArrayList", "<", "Double", ">", "(", ")", ";", "ArrayList", "<", "Float", ">", "topo", "=", "new", "ArrayList", "<", "Float", ">", "(", ")", ";", "ArrayList", "<", "Float", ">", "grav", "=", "new", "ArrayList", "<", "Float", ">", "(", ")", ";", "ArrayList", "<", "Float", ">", "mag", "=", "new", "ArrayList", "<", "Float", ">", "(", ")", ";", "if", "(", "MGG", ".", "MGG_control_dir", ".", "exists", "(", ")", ")", "{", "File", "[", "]", "MGG_control_files", "=", "MGG", ".", "MGG_control_dir", ".", "listFiles", "(", ")", ";", "for", "(", "int", "m", "=", "0", ";", "m", "<", "MGG_control_files", ".", "length", ";", "m", "++", ")", "{", "if", "(", "MGG_control_files", "[", "m", "]", ".", "getName", "(", ")", ".", "indexOf", "(", "\"mgg_control\"", ")", "!=", "-", "1", ")", "{", "controlIn", "=", "new", "DataInputStream", "(", "new", "BufferedInputStream", "(", "new", "FileInputStream", "(", "MGG_control_files", "[", "m", "]", ")", ")", ")", ";", "name", "=", "\"\"", ";", "try", "{", "name", "=", "controlIn", ".", "readUTF", "(", ")", ";", "}", "catch", "(", "EOFException", "ex", ")", "{", "break", ";", "}", "controlIn", ".", "close", "(", ")", ";", "if", "(", "name", ".", "equals", "(", "leg", ")", ")", "{", "dataFile", "=", "new", "File", "(", "MGG", ".", "MGG_data_dir", ",", "\"mgg_data_\"", "+", "leg", ")", ";", "try", "{", "dataIn", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "new", "FileInputStream", "(", "dataFile", ")", ")", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", "continue", ";", "}", "while", "(", "(", "s", "=", "dataIn", ".", "readLine", "(", ")", ")", "!=", "null", ")", "{", "StringTokenizer", "st", "=", "new", "StringTokenizer", "(", "s", ")", ";", "String", "date", "=", "st", ".", "nextToken", "(", ")", ";", "lon", ".", "add", "(", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", ")", ";", "lat", ".", "add", "(", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", ")", ";", "topo", ".", "add", "(", "Float", ".", "parseFloat", "(", "st", ".", "nextToken", "(", ")", ")", ")", ";", "grav", ".", "add", "(", "Float", ".", "parseFloat", "(", "st", ".", "nextToken", "(", ")", ")", ")", ";", "mag", ".", "add", "(", "Float", ".", "parseFloat", "(", "st", ".", "nextToken", "(", ")", ")", ")", ";", "}", "dataIn", ".", "close", "(", ")", ";", "data", "=", "new", "MGGData", "(", "map", ",", "leg", ",", "GeneralUtils", ".", "arrayList2doubles", "(", "lon", ")", ",", "GeneralUtils", ".", "arrayList2doubles", "(", "lat", ")", ",", "GeneralUtils", ".", "arrayList2floats", "(", "topo", ")", ",", "GeneralUtils", ".", "arrayList2floats", "(", "grav", ")", ",", "GeneralUtils", ".", "arrayList2floats", "(", "mag", ")", ")", ";", "}", "}", "}", "}", "return", "data", ";", "}" ]
for imported data sets, load from the data file stored on the user's hard drive
[ "for", "imported", "data", "sets", "load", "from", "the", "data", "file", "stored", "on", "the", "user", "'", "s", "hard", "drive" ]
[ "// First search the control files to find which one contains our data set.", "// The control file include the data set name.", "// The data file has the same timestamp in the file name, so once we have found", "// the control file, we can work out the data file.", "//we have found the right control file, now read the data file", "//don't need this", "//create the MGDData structure (need to convert the arrayLists to arrays first)" ]
[ { "param": "map", "type": "XMap" }, { "param": "leg", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "map", "type": "XMap", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "leg", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 760, 490, 19491, 751, 24935, 751, 812, 12, 60, 863, 852, 16, 514, 4553, 13, 1216, 1860, 288, 7010, 202, 202, 49, 19491, 751, 501, 273, 446, 31, 203, 202, 202, 17947, 2514, 501, 382, 31, 203, 202, 202, 812, 501, 812, 31, 203, 202, 202, 751, 4348, 3325, 382, 31, 203, 202, 202, 780, 508, 16, 272, 31, 203, 202, 202, 19558, 32, 5265, 34, 4281, 273, 394, 2407, 32, 5265, 34, 5621, 203, 202, 202, 19558, 32, 5265, 34, 2516, 273, 394, 2407, 32, 5265, 34, 5621, 203, 202, 202, 19558, 32, 4723, 34, 17671, 273, 394, 2407, 32, 4723, 34, 5621, 203, 202, 202, 19558, 32, 4723, 34, 3087, 90, 273, 394, 2407, 32, 4723, 34, 5621, 203, 202, 202, 19558, 32, 4723, 34, 4447, 273, 394, 2407, 32, 4723, 34, 5621, 203, 202, 202, 759, 5783, 1623, 326, 3325, 1390, 358, 1104, 1492, 1245, 1914, 3134, 501, 444, 18, 203, 202, 202, 759, 1021, 3325, 585, 2341, 326, 501, 444, 508, 18, 203, 202, 202, 759, 1021, 501, 585, 711, 326, 1967, 2858, 316, 326, 585, 508, 16, 1427, 3647, 732, 1240, 1392, 203, 202, 202, 759, 326, 3325, 585, 16, 732, 848, 1440, 596, 326, 501, 585, 18, 203, 202, 202, 430, 261, 490, 19491, 18, 49, 19491, 67, 7098, 67, 1214, 18, 1808, 1435, 262, 288, 203, 1082, 202, 812, 8526, 490, 19491, 67, 7098, 67, 2354, 273, 490, 19491, 18, 49, 19491, 67, 7098, 67, 1214, 18, 1098, 2697, 5621, 203, 1082, 202, 1884, 261, 509, 312, 273, 374, 31, 312, 411, 490, 19491, 67, 7098, 67, 2354, 18, 2469, 31, 312, 9904, 262, 288, 203, 9506, 202, 430, 261, 490, 19491, 67, 7098, 67, 2354, 63, 81, 8009, 17994, 7675, 31806, 12, 315, 81, 14253, 67, 7098, 6, 262, 480, 300, 21, 262, 288, 203, 6862, 202, 7098, 382, 273, 394, 29382, 12, 394, 24742, 12, 394, 11907, 12, 490, 19491, 67, 7098, 67, 2354, 63, 81, 65, 262, 262, 11272, 203, 6862, 202, 529, 273, 1408, 31, 203, 6862, 202, 698, 288, 203, 25083, 202, 529, 273, 3325, 382, 18, 896, 5159, 5621, 203, 6862, 202, 97, 1044, 261, 12706, 503, 431, 13, 288, 203, 25083, 202, 8820, 31, 203, 6862, 202, 97, 203, 6862, 202, 7098, 382, 18, 4412, 5621, 203, 25083, 203, 6862, 202, 430, 261, 529, 18, 14963, 12, 1935, 3719, 288, 203, 25083, 202, 759, 1814, 1240, 1392, 326, 2145, 3325, 585, 16, 2037, 855, 326, 501, 585, 203, 25083, 202, 892, 812, 273, 394, 1387, 261, 49, 19491, 18, 49, 19491, 67, 892, 67, 1214, 16, 315, 81, 14253, 67, 892, 9548, 397, 4553, 1769, 203, 25083, 202, 698, 288, 203, 6862, 1082, 202, 892, 382, 273, 394, 10633, 12, 394, 15322, 12, 2704, 11907, 12, 501, 812, 8623, 1769, 203, 25083, 202, 97, 1044, 261, 503, 431, 13, 288, 203, 6862, 1082, 202, 17143, 31, 203, 25083, 202, 97, 203, 25083, 202, 17523, 261, 261, 272, 273, 501, 382, 18, 896, 1670, 1435, 262, 480, 446, 262, 288, 203, 6862, 1082, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
daf5396ce61f1e4e971fac0ddfd95d91386cb8f9
iedadata/geomapapp
haxby/db/pdb/PDBSampleModel.java
[ "Apache-2.0" ]
Java
sortByColumn
null
public synchronized void sortByColumn(int col) { if (lastSortedCol == col) ascent = !ascent; else ascent = true; lastSortedCol = col; Collections.sort(samples, columnSorter); updateSampleIndexMap(); fireTableDataChanged(); }
// Sorts on column col, alternating between ascent and descent
Sorts on column col, alternating between ascent and descent
[ "Sorts", "on", "column", "col", "alternating", "between", "ascent", "and", "descent" ]
public synchronized void sortByColumn(int col) { if (lastSortedCol == col) ascent = !ascent; else ascent = true; lastSortedCol = col; Collections.sort(samples, columnSorter); updateSampleIndexMap(); fireTableDataChanged(); }
[ "public", "synchronized", "void", "sortByColumn", "(", "int", "col", ")", "{", "if", "(", "lastSortedCol", "==", "col", ")", "ascent", "=", "!", "ascent", ";", "else", "ascent", "=", "true", ";", "lastSortedCol", "=", "col", ";", "Collections", ".", "sort", "(", "samples", ",", "columnSorter", ")", ";", "updateSampleIndexMap", "(", ")", ";", "fireTableDataChanged", "(", ")", ";", "}" ]
Sorts on column col, alternating between ascent and descent
[ "Sorts", "on", "column", "col", "alternating", "between", "ascent", "and", "descent" ]
[]
[ { "param": "col", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "col", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 3852, 918, 14021, 1494, 12, 474, 645, 13, 288, 203, 202, 202, 430, 261, 2722, 11739, 914, 422, 645, 13, 203, 1082, 202, 345, 2998, 273, 401, 345, 2998, 31, 203, 202, 202, 12107, 203, 1082, 202, 345, 2998, 273, 638, 31, 203, 202, 202, 2722, 11739, 914, 273, 645, 31, 203, 203, 202, 202, 15150, 18, 3804, 12, 7319, 16, 1057, 24952, 1769, 203, 203, 202, 202, 2725, 8504, 1016, 863, 5621, 203, 202, 202, 12179, 1388, 751, 5033, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 5928, 87, 603, 1057, 645, 16, 6416, 1776, 3086, 487, 2998, 471, 3044, 319, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
68fd99c9178f42cdb6a30101d6cbbeb6d8eb7417
iedadata/geomapapp
haxby/db/xmcs/XMCS.java
[ "Apache-2.0" ]
Java
checkListForProjection
null
private boolean checkListForProjection(String listPath) { URL url; try { url = URLFactory.url(listPath); BufferedReader in = new BufferedReader( new InputStreamReader(url.openStream())); String inStr; while ((inStr = in.readLine()) != null) { String[] split = inStr.split("\t"); if (split.length != 6) continue; // improper entry int mapType = MapApp.MERCATOR_MAP; if (map.getApp() instanceof MapApp) mapType =((MapApp) map.getApp()).getMapType(); try { int cruiseType = Integer.parseInt(split[1]); switch (mapType) { case MapApp.MERCATOR_MAP: if ((cruiseType & MERCATOR_MAP) != 0) return true; break; case MapApp.SOUTH_POLAR_MAP: if ((cruiseType & SOUTH_POLAR_MAP) != 0) return true; break; case MapApp.NORTH_POLAR_MAP: if ((cruiseType & NORTH_POLAR_MAP) != 0) return true; break; } } catch (NumberFormatException ex) { return false; } } } catch (Exception e) { return false; } return false; }
/* * check the cruise list to see if it contains cruises for the current * map projection */
check the cruise list to see if it contains cruises for the current map projection
[ "check", "the", "cruise", "list", "to", "see", "if", "it", "contains", "cruises", "for", "the", "current", "map", "projection" ]
private boolean checkListForProjection(String listPath) { URL url; try { url = URLFactory.url(listPath); BufferedReader in = new BufferedReader( new InputStreamReader(url.openStream())); String inStr; while ((inStr = in.readLine()) != null) { String[] split = inStr.split("\t"); if (split.length != 6) continue; int mapType = MapApp.MERCATOR_MAP; if (map.getApp() instanceof MapApp) mapType =((MapApp) map.getApp()).getMapType(); try { int cruiseType = Integer.parseInt(split[1]); switch (mapType) { case MapApp.MERCATOR_MAP: if ((cruiseType & MERCATOR_MAP) != 0) return true; break; case MapApp.SOUTH_POLAR_MAP: if ((cruiseType & SOUTH_POLAR_MAP) != 0) return true; break; case MapApp.NORTH_POLAR_MAP: if ((cruiseType & NORTH_POLAR_MAP) != 0) return true; break; } } catch (NumberFormatException ex) { return false; } } } catch (Exception e) { return false; } return false; }
[ "private", "boolean", "checkListForProjection", "(", "String", "listPath", ")", "{", "URL", "url", ";", "try", "{", "url", "=", "URLFactory", ".", "url", "(", "listPath", ")", ";", "BufferedReader", "in", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "url", ".", "openStream", "(", ")", ")", ")", ";", "String", "inStr", ";", "while", "(", "(", "inStr", "=", "in", ".", "readLine", "(", ")", ")", "!=", "null", ")", "{", "String", "[", "]", "split", "=", "inStr", ".", "split", "(", "\"\\t\"", ")", ";", "if", "(", "split", ".", "length", "!=", "6", ")", "continue", ";", "int", "mapType", "=", "MapApp", ".", "MERCATOR_MAP", ";", "if", "(", "map", ".", "getApp", "(", ")", "instanceof", "MapApp", ")", "mapType", "=", "(", "(", "MapApp", ")", "map", ".", "getApp", "(", ")", ")", ".", "getMapType", "(", ")", ";", "try", "{", "int", "cruiseType", "=", "Integer", ".", "parseInt", "(", "split", "[", "1", "]", ")", ";", "switch", "(", "mapType", ")", "{", "case", "MapApp", ".", "MERCATOR_MAP", ":", "if", "(", "(", "cruiseType", "&", "MERCATOR_MAP", ")", "!=", "0", ")", "return", "true", ";", "break", ";", "case", "MapApp", ".", "SOUTH_POLAR_MAP", ":", "if", "(", "(", "cruiseType", "&", "SOUTH_POLAR_MAP", ")", "!=", "0", ")", "return", "true", ";", "break", ";", "case", "MapApp", ".", "NORTH_POLAR_MAP", ":", "if", "(", "(", "cruiseType", "&", "NORTH_POLAR_MAP", ")", "!=", "0", ")", "return", "true", ";", "break", ";", "}", "}", "catch", "(", "NumberFormatException", "ex", ")", "{", "return", "false", ";", "}", "}", "}", "catch", "(", "Exception", "e", ")", "{", "return", "false", ";", "}", "return", "false", ";", "}" ]
check the cruise list to see if it contains cruises for the current map projection
[ "check", "the", "cruise", "list", "to", "see", "if", "it", "contains", "cruises", "for", "the", "current", "map", "projection" ]
[ "// improper entry" ]
[ { "param": "listPath", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "listPath", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 1250, 866, 682, 1290, 14789, 12, 780, 666, 743, 13, 288, 203, 202, 202, 1785, 880, 31, 203, 202, 202, 698, 288, 203, 1082, 202, 718, 273, 1976, 1733, 18, 718, 12, 1098, 743, 1769, 203, 1082, 202, 17947, 2514, 316, 273, 394, 10633, 12, 394, 15322, 12, 718, 18, 3190, 1228, 1435, 10019, 203, 202, 203, 1082, 202, 780, 316, 1585, 31, 203, 1082, 202, 17523, 14015, 267, 1585, 273, 316, 18, 896, 1670, 10756, 480, 446, 13, 288, 203, 9506, 202, 780, 8526, 1416, 273, 316, 1585, 18, 4939, 31458, 88, 8863, 203, 9506, 202, 430, 261, 4939, 18, 2469, 480, 1666, 13, 1324, 31, 368, 13069, 457, 1241, 203, 202, 203, 9506, 202, 474, 852, 559, 273, 1635, 3371, 18, 20969, 39, 3575, 67, 8352, 31, 203, 9506, 202, 430, 261, 1458, 18, 588, 3371, 1435, 1276, 1635, 3371, 13, 203, 6862, 202, 1458, 559, 273, 12443, 863, 3371, 13, 852, 18, 588, 3371, 1435, 2934, 588, 863, 559, 5621, 203, 202, 203, 9506, 202, 698, 288, 203, 6862, 202, 474, 4422, 89, 784, 559, 273, 2144, 18, 2670, 1702, 12, 4939, 63, 21, 19226, 203, 6862, 202, 9610, 261, 1458, 559, 13, 288, 203, 25083, 202, 3593, 1635, 3371, 18, 20969, 39, 3575, 67, 8352, 30, 203, 6862, 1082, 202, 430, 14015, 3353, 89, 784, 559, 473, 490, 654, 39, 3575, 67, 8352, 13, 480, 374, 13, 327, 638, 31, 203, 6862, 1082, 202, 8820, 31, 203, 25083, 202, 3593, 1635, 3371, 18, 3584, 5844, 67, 14232, 985, 67, 8352, 30, 203, 6862, 1082, 202, 430, 14015, 3353, 89, 784, 559, 473, 348, 5069, 44, 67, 14232, 985, 67, 8352, 13, 480, 374, 13, 327, 638, 31, 203, 6862, 1082, 202, 8820, 31, 203, 25083, 202, 3593, 1635, 3371, 18, 50, 28212, 67, 14232, 985, 67, 8352, 30, 203, 6862, 1082, 202, 430, 14015, 3353, 89, 784, 559, 473, 423, 28212, 67, 14232, 985, 67, 8352, 13, 480, 374, 13, 327, 638, 31, 203, 6862, 1082, 202, 8820, 31, 203, 6862, 202, 97, 203, 202, 203, 9506, 202, 97, 1044, 261, 1854, 9291, 431, 13, 288, 203, 6862, 202, 2463, 629, 31, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 202, 202, 97, 1044, 261, 503, 425, 13, 288, 203, 1082, 202, 2463, 629, 31, 203, 202, 202, 97, 202, 203, 202, 202, 2463, 629, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 866, 326, 4422, 89, 784, 666, 358, 2621, 309, 518, 1914, 4422, 89, 6141, 364, 326, 783, 7010, 202, 380, 852, 8106, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
626a6895ee8b9c3da8e8a876def4e5b57a0c4f7e
iedadata/geomapapp
haxby/db/ship/ShipTrack.java
[ "Apache-2.0" ]
Java
hasAllKeywords
null
public boolean hasAllKeywords(ArrayList<String> keys) { for(String key:keys) { if((keywords.contains(key.toLowerCase()))==false) return false; } return true; }
/*Checks to see if a Ship has all of the keywords contained in the argument*/
Checks to see if a Ship has all of the keywords contained in the argument
[ "Checks", "to", "see", "if", "a", "Ship", "has", "all", "of", "the", "keywords", "contained", "in", "the", "argument" ]
public boolean hasAllKeywords(ArrayList<String> keys) { for(String key:keys) { if((keywords.contains(key.toLowerCase()))==false) return false; } return true; }
[ "public", "boolean", "hasAllKeywords", "(", "ArrayList", "<", "String", ">", "keys", ")", "{", "for", "(", "String", "key", ":", "keys", ")", "{", "if", "(", "(", "keywords", ".", "contains", "(", "key", ".", "toLowerCase", "(", ")", ")", ")", "==", "false", ")", "return", "false", ";", "}", "return", "true", ";", "}" ]
Checks to see if a Ship has all of the keywords contained in the argument
[ "Checks", "to", "see", "if", "a", "Ship", "has", "all", "of", "the", "keywords", "contained", "in", "the", "argument" ]
[]
[ { "param": "keys", "type": "ArrayList<String>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "keys", "type": "ArrayList<String>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 711, 1595, 14149, 12, 19558, 32, 780, 34, 1311, 13, 206, 203, 202, 95, 1082, 206, 203, 202, 202, 1884, 12, 780, 498, 30, 2452, 13, 206, 203, 202, 202, 95, 206, 203, 1082, 202, 430, 12443, 11771, 18, 12298, 12, 856, 18, 869, 5630, 1435, 3719, 631, 5743, 13, 206, 203, 9506, 202, 2463, 629, 31, 206, 203, 202, 202, 97, 206, 203, 1082, 206, 203, 202, 202, 2463, 638, 31, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 4081, 358, 2621, 309, 279, 2638, 625, 711, 777, 434, 326, 7093, 7542, 316, 326, 1237, 5549, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a5fcf797454b948fa1d2763a7b86d452b5d2eedd
iedadata/geomapapp
haxby/db/dig/LineSegmentsObject.java
[ "Apache-2.0" ]
Java
updatePoints
null
protected void updatePoints() { for (Object point : points) { double[] xyz = (double[])point; Point2D.Double p = new Point2D.Double(xyz[0], xyz[1]); xyz[2] = getZ(p); } }
//update z-values for points
update z-values for points
[ "update", "z", "-", "values", "for", "points" ]
protected void updatePoints() { for (Object point : points) { double[] xyz = (double[])point; Point2D.Double p = new Point2D.Double(xyz[0], xyz[1]); xyz[2] = getZ(p); } }
[ "protected", "void", "updatePoints", "(", ")", "{", "for", "(", "Object", "point", ":", "points", ")", "{", "double", "[", "]", "xyz", "=", "(", "double", "[", "]", ")", "point", ";", "Point2D", ".", "Double", "p", "=", "new", "Point2D", ".", "Double", "(", "xyz", "[", "0", "]", ",", "xyz", "[", "1", "]", ")", ";", "xyz", "[", "2", "]", "=", "getZ", "(", "p", ")", ";", "}", "}" ]
update z-values for points
[ "update", "z", "-", "values", "for", "points" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 1089, 5636, 1435, 288, 203, 202, 202, 1884, 261, 921, 1634, 294, 3143, 13, 288, 203, 1082, 202, 9056, 8526, 14779, 273, 261, 9056, 63, 5717, 1153, 31, 203, 1082, 202, 2148, 22, 40, 18, 5265, 293, 273, 394, 4686, 22, 40, 18, 5265, 12, 17177, 63, 20, 6487, 14779, 63, 21, 19226, 203, 1082, 202, 17177, 63, 22, 65, 273, 23448, 12, 84, 1769, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 2725, 998, 17, 2372, 364, 3143, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
eb29f49f25a5bbbdbc2f6aa6e039d725c1744bfd
iedadata/geomapapp
haxby/util/PathUtil.java
[ "Apache-2.0" ]
Java
loadNewPaths
null
public static void loadNewPaths(String path) { keyToURL2 = new HashMap<String, String>(); try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setIgnoringComments(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document dom = db.parse( URLFactory.url(path).openStream() ); Node root = getElement(dom, "GMA_paths"); for (Node layer : getElements(root, "layer")) addLayer(layer, null); } catch (IOException ex) { ex.printStackTrace(); } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (SAXException e) { e.printStackTrace(); } String rootPath = getPath("ROOT_PATH", MapApp.BASE_URL); for (String key : keyToURL2.keySet()) { String url = keyToURL2.get(key); System.out.println("np url"+ url); if (url.contains("http://")) continue; keyToURL2.put(key, rootPath + url); } }
// Loads another GMA paths file from another location
Loads another GMA paths file from another location
[ "Loads", "another", "GMA", "paths", "file", "from", "another", "location" ]
public static void loadNewPaths(String path) { keyToURL2 = new HashMap<String, String>(); try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setIgnoringComments(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document dom = db.parse( URLFactory.url(path).openStream() ); Node root = getElement(dom, "GMA_paths"); for (Node layer : getElements(root, "layer")) addLayer(layer, null); } catch (IOException ex) { ex.printStackTrace(); } catch (ParserConfigurationException e) { e.printStackTrace(); } catch (SAXException e) { e.printStackTrace(); } String rootPath = getPath("ROOT_PATH", MapApp.BASE_URL); for (String key : keyToURL2.keySet()) { String url = keyToURL2.get(key); System.out.println("np url"+ url); if (url.contains("http://")) continue; keyToURL2.put(key, rootPath + url); } }
[ "public", "static", "void", "loadNewPaths", "(", "String", "path", ")", "{", "keyToURL2", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "try", "{", "DocumentBuilderFactory", "dbf", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ";", "dbf", ".", "setIgnoringComments", "(", "true", ")", ";", "DocumentBuilder", "db", "=", "dbf", ".", "newDocumentBuilder", "(", ")", ";", "Document", "dom", "=", "db", ".", "parse", "(", "URLFactory", ".", "url", "(", "path", ")", ".", "openStream", "(", ")", ")", ";", "Node", "root", "=", "getElement", "(", "dom", ",", "\"GMA_paths\"", ")", ";", "for", "(", "Node", "layer", ":", "getElements", "(", "root", ",", "\"layer\"", ")", ")", "addLayer", "(", "layer", ",", "null", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "ex", ".", "printStackTrace", "(", ")", ";", "}", "catch", "(", "ParserConfigurationException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "catch", "(", "SAXException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "String", "rootPath", "=", "getPath", "(", "\"ROOT_PATH\"", ",", "MapApp", ".", "BASE_URL", ")", ";", "for", "(", "String", "key", ":", "keyToURL2", ".", "keySet", "(", ")", ")", "{", "String", "url", "=", "keyToURL2", ".", "get", "(", "key", ")", ";", "System", ".", "out", ".", "println", "(", "\"np url\"", "+", "url", ")", ";", "if", "(", "url", ".", "contains", "(", "\"http://\"", ")", ")", "continue", ";", "keyToURL2", ".", "put", "(", "key", ",", "rootPath", "+", "url", ")", ";", "}", "}" ]
Loads another GMA paths file from another location
[ "Loads", "another", "GMA", "paths", "file", "from", "another", "location" ]
[]
[ { "param": "path", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "path", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 1262, 1908, 4466, 12, 780, 589, 13, 288, 206, 203, 202, 202, 856, 774, 1785, 22, 273, 394, 4317, 32, 780, 16, 514, 34, 5621, 206, 203, 206, 203, 202, 202, 698, 288, 206, 203, 1082, 202, 2519, 20692, 1319, 74, 273, 30236, 18, 2704, 1442, 5621, 206, 203, 1082, 202, 1966, 74, 18, 542, 21702, 9051, 12, 3767, 1769, 206, 203, 206, 203, 1082, 202, 2519, 1263, 1319, 273, 1319, 74, 18, 2704, 2519, 1263, 5621, 206, 203, 1082, 202, 2519, 4092, 273, 1319, 18, 2670, 12, 1976, 1733, 18, 718, 12, 803, 2934, 3190, 1228, 1435, 11272, 206, 203, 206, 203, 1082, 202, 907, 1365, 273, 7426, 12, 9859, 16, 315, 43, 5535, 67, 4481, 8863, 206, 203, 1082, 202, 1884, 261, 907, 3018, 294, 8886, 12, 3085, 16, 315, 6363, 6, 3719, 206, 203, 9506, 202, 1289, 4576, 12, 6363, 16, 446, 1769, 206, 203, 206, 203, 202, 202, 97, 1044, 261, 14106, 431, 13, 288, 206, 203, 1082, 202, 338, 18, 1188, 6332, 5621, 206, 203, 202, 202, 97, 1044, 261, 2678, 10737, 425, 13, 288, 206, 203, 1082, 202, 73, 18, 1188, 6332, 5621, 206, 203, 202, 202, 97, 1044, 261, 55, 2501, 503, 425, 13, 288, 206, 203, 1082, 202, 73, 18, 1188, 6332, 5621, 206, 203, 202, 202, 97, 206, 203, 206, 203, 202, 202, 780, 13959, 273, 4339, 2932, 9185, 67, 4211, 3113, 1635, 3371, 18, 8369, 67, 1785, 1769, 206, 203, 206, 203, 202, 202, 1884, 261, 780, 498, 294, 498, 774, 1785, 22, 18, 856, 694, 10756, 288, 206, 203, 1082, 202, 780, 880, 273, 498, 774, 1785, 22, 18, 588, 12, 856, 1769, 206, 203, 1082, 202, 3163, 18, 659, 18, 8222, 2932, 6782, 880, 6, 15, 880, 1769, 206, 203, 1082, 202, 430, 261, 718, 18, 12298, 2932, 2505, 14334, 3719, 206, 203, 9506, 202, 17143, 31, 206, 203, 206, 203, 1082, 202, 856, 774, 1785, 22, 18, 458, 12, 856, 16, 13959, 397, 880, 1769, 206, 203, 202, 202, 97, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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4042, 2117, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
eb29f49f25a5bbbdbc2f6aa6e039d725c1744bfd
iedadata/geomapapp
haxby/util/PathUtil.java
[ "Apache-2.0" ]
Java
replacePlaceHolder
null
public static void replacePlaceHolder (String placeHolder, String var) { for (Map.Entry<String, String> entry : keyToURL.entrySet()) { entry.setValue(entry.getValue().replace(placeHolder, var)); } }
/* * replace any placeholders in path names with variables, eg version numbers */
replace any placeholders in path names with variables, eg version numbers
[ "replace", "any", "placeholders", "in", "path", "names", "with", "variables", "eg", "version", "numbers" ]
public static void replacePlaceHolder (String placeHolder, String var) { for (Map.Entry<String, String> entry : keyToURL.entrySet()) { entry.setValue(entry.getValue().replace(placeHolder, var)); } }
[ "public", "static", "void", "replacePlaceHolder", "(", "String", "placeHolder", ",", "String", "var", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "entry", ":", "keyToURL", ".", "entrySet", "(", ")", ")", "{", "entry", ".", "setValue", "(", "entry", ".", "getValue", "(", ")", ".", "replace", "(", "placeHolder", ",", "var", ")", ")", ";", "}", "}" ]
replace any placeholders in path names with variables, eg version numbers
[ "replace", "any", "placeholders", "in", "path", "names", "with", "variables", "eg", "version", "numbers" ]
[]
[ { "param": "placeHolder", "type": "String" }, { "param": "var", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "placeHolder", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "var", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 1453, 6029, 6064, 261, 780, 3166, 6064, 16, 514, 569, 13, 288, 206, 203, 202, 202, 1884, 261, 863, 18, 1622, 32, 780, 16, 514, 34, 1241, 294, 498, 774, 1785, 18, 4099, 694, 10756, 288, 206, 203, 1082, 202, 4099, 18, 542, 620, 12, 4099, 18, 24805, 7675, 2079, 12, 964, 6064, 16, 569, 10019, 206, 203, 202, 202, 97, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 206, 203, 202, 380, 1453, 1281, 12150, 316, 589, 1257, 598, 3152, 16, 9130, 1177, 5600, 206, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b4c00dfedb7e539a0727a75d146f5c309e50732a
iedadata/geomapapp
haxby/db/surveyplanner/SurveyPlannerDataDisplay.java
[ "Apache-2.0" ]
Java
saveToFile
null
private void saveToFile() { JFileChooser jfc = new JFileChooser(System.getProperty("user.home")); File f=new File("SurveyLines.txt"); jfc.setSelectedFile(f); do { int c = jfc.showSaveDialog(null); if (c==JFileChooser.CANCEL_OPTION||c==JFileChooser.ERROR_OPTION) return; f = jfc.getSelectedFile(); if (f.exists()) { c=JOptionPane.showConfirmDialog(null, "File Already Exists\nConfirm Overwrite"); if (c==JOptionPane.OK_OPTION) break; if (c==JOptionPane.CANCEL_OPTION) return; } } while (f.exists()); try { BufferedWriter out = new BufferedWriter(new FileWriter(f)); //add disclaimer at the top of the output file out.write("#NOT TO BE USED FOR NAVIGATION PURPOSES\n"); boolean firstCol = true; for (int i=0;i<tm.getColumnCount();i++) { if (i == sp.getSurveyLineColumn()) continue; if (firstCol) { out.write(tm.getColumnName(i)); firstCol = false; } else { out.write("\t" + tm.getColumnName(i)); } } out.write("\n"); int[] ind; ind = new int[tm.getRowCount()]; for (int i=0; i<tm.getRowCount(); i++) ind[i] = i; for (int i=0;i<tm.getRowCount();i++) { firstCol = true; for (int j=0; j<tm.getColumnCount();j++) { if (j == sp.getSurveyLineColumn()) continue; Object o = tm.getValueAt(i, j); if (o instanceof String && ((String)o).equals("NaN")) o = ""; if (firstCol) { out.write(o.toString()); firstCol = false; } else { out.write("\t"+ o); } } out.write("\n"); } out.close(); } catch (IOException e){ JOptionPane.showMessageDialog(panel, "Unable to save file", "Save Error", JOptionPane.ERROR_MESSAGE); System.out.println(e); } }
/* * save the survey lines to a text file */
save the survey lines to a text file
[ "save", "the", "survey", "lines", "to", "a", "text", "file" ]
private void saveToFile() { JFileChooser jfc = new JFileChooser(System.getProperty("user.home")); File f=new File("SurveyLines.txt"); jfc.setSelectedFile(f); do { int c = jfc.showSaveDialog(null); if (c==JFileChooser.CANCEL_OPTION||c==JFileChooser.ERROR_OPTION) return; f = jfc.getSelectedFile(); if (f.exists()) { c=JOptionPane.showConfirmDialog(null, "File Already Exists\nConfirm Overwrite"); if (c==JOptionPane.OK_OPTION) break; if (c==JOptionPane.CANCEL_OPTION) return; } } while (f.exists()); try { BufferedWriter out = new BufferedWriter(new FileWriter(f)); out.write("#NOT TO BE USED FOR NAVIGATION PURPOSES\n"); boolean firstCol = true; for (int i=0;i<tm.getColumnCount();i++) { if (i == sp.getSurveyLineColumn()) continue; if (firstCol) { out.write(tm.getColumnName(i)); firstCol = false; } else { out.write("\t" + tm.getColumnName(i)); } } out.write("\n"); int[] ind; ind = new int[tm.getRowCount()]; for (int i=0; i<tm.getRowCount(); i++) ind[i] = i; for (int i=0;i<tm.getRowCount();i++) { firstCol = true; for (int j=0; j<tm.getColumnCount();j++) { if (j == sp.getSurveyLineColumn()) continue; Object o = tm.getValueAt(i, j); if (o instanceof String && ((String)o).equals("NaN")) o = ""; if (firstCol) { out.write(o.toString()); firstCol = false; } else { out.write("\t"+ o); } } out.write("\n"); } out.close(); } catch (IOException e){ JOptionPane.showMessageDialog(panel, "Unable to save file", "Save Error", JOptionPane.ERROR_MESSAGE); System.out.println(e); } }
[ "private", "void", "saveToFile", "(", ")", "{", "JFileChooser", "jfc", "=", "new", "JFileChooser", "(", "System", ".", "getProperty", "(", "\"user.home\"", ")", ")", ";", "File", "f", "=", "new", "File", "(", "\"SurveyLines.txt\"", ")", ";", "jfc", ".", "setSelectedFile", "(", "f", ")", ";", "do", "{", "int", "c", "=", "jfc", ".", "showSaveDialog", "(", "null", ")", ";", "if", "(", "c", "==", "JFileChooser", ".", "CANCEL_OPTION", "||", "c", "==", "JFileChooser", ".", "ERROR_OPTION", ")", "return", ";", "f", "=", "jfc", ".", "getSelectedFile", "(", ")", ";", "if", "(", "f", ".", "exists", "(", ")", ")", "{", "c", "=", "JOptionPane", ".", "showConfirmDialog", "(", "null", ",", "\"File Already Exists\\nConfirm Overwrite\"", ")", ";", "if", "(", "c", "==", "JOptionPane", ".", "OK_OPTION", ")", "break", ";", "if", "(", "c", "==", "JOptionPane", ".", "CANCEL_OPTION", ")", "return", ";", "}", "}", "while", "(", "f", ".", "exists", "(", ")", ")", ";", "try", "{", "BufferedWriter", "out", "=", "new", "BufferedWriter", "(", "new", "FileWriter", "(", "f", ")", ")", ";", "out", ".", "write", "(", "\"#NOT TO BE USED FOR NAVIGATION PURPOSES\\n\"", ")", ";", "boolean", "firstCol", "=", "true", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tm", ".", "getColumnCount", "(", ")", ";", "i", "++", ")", "{", "if", "(", "i", "==", "sp", ".", "getSurveyLineColumn", "(", ")", ")", "continue", ";", "if", "(", "firstCol", ")", "{", "out", ".", "write", "(", "tm", ".", "getColumnName", "(", "i", ")", ")", ";", "firstCol", "=", "false", ";", "}", "else", "{", "out", ".", "write", "(", "\"\\t\"", "+", "tm", ".", "getColumnName", "(", "i", ")", ")", ";", "}", "}", "out", ".", "write", "(", "\"\\n\"", ")", ";", "int", "[", "]", "ind", ";", "ind", "=", "new", "int", "[", "tm", ".", "getRowCount", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tm", ".", "getRowCount", "(", ")", ";", "i", "++", ")", "ind", "[", "i", "]", "=", "i", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tm", ".", "getRowCount", "(", ")", ";", "i", "++", ")", "{", "firstCol", "=", "true", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "tm", ".", "getColumnCount", "(", ")", ";", "j", "++", ")", "{", "if", "(", "j", "==", "sp", ".", "getSurveyLineColumn", "(", ")", ")", "continue", ";", "Object", "o", "=", "tm", ".", "getValueAt", "(", "i", ",", "j", ")", ";", "if", "(", "o", "instanceof", "String", "&&", "(", "(", "String", ")", "o", ")", ".", "equals", "(", "\"NaN\"", ")", ")", "o", "=", "\"\"", ";", "if", "(", "firstCol", ")", "{", "out", ".", "write", "(", "o", ".", "toString", "(", ")", ")", ";", "firstCol", "=", "false", ";", "}", "else", "{", "out", ".", "write", "(", "\"\\t\"", "+", "o", ")", ";", "}", "}", "out", ".", "write", "(", "\"\\n\"", ")", ";", "}", "out", ".", "close", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "JOptionPane", ".", "showMessageDialog", "(", "panel", ",", "\"Unable to save file\"", ",", "\"Save Error\"", ",", "JOptionPane", ".", "ERROR_MESSAGE", ")", ";", "System", ".", "out", ".", "println", "(", "e", ")", ";", "}", "}" ]
save the survey lines to a text file
[ "save", "the", "survey", "lines", "to", "a", "text", "file" ]
[ "//add disclaimer at the top of the output file" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1923, 15450, 1435, 288, 203, 203, 202, 202, 46, 812, 17324, 525, 7142, 273, 394, 804, 812, 17324, 12, 3163, 18, 588, 1396, 2932, 1355, 18, 8712, 7923, 1769, 203, 202, 202, 812, 284, 33, 2704, 1387, 2932, 22165, 5763, 18, 5830, 8863, 203, 202, 202, 78, 7142, 18, 542, 7416, 812, 12, 74, 1769, 203, 202, 202, 2896, 288, 203, 1082, 202, 474, 276, 273, 525, 7142, 18, 4500, 4755, 6353, 12, 2011, 1769, 203, 1082, 202, 430, 261, 71, 631, 46, 812, 17324, 18, 25268, 67, 7425, 20081, 71, 631, 46, 812, 17324, 18, 3589, 67, 7425, 13, 327, 31, 203, 1082, 202, 74, 273, 525, 7142, 18, 588, 7416, 812, 5621, 203, 1082, 202, 430, 261, 74, 18, 1808, 10756, 288, 203, 9506, 202, 71, 33, 46, 1895, 8485, 18, 4500, 11269, 6353, 12, 2011, 16, 315, 812, 17009, 17277, 64, 82, 11269, 29747, 8863, 203, 9506, 202, 430, 261, 71, 631, 46, 1895, 8485, 18, 3141, 67, 7425, 13, 898, 31, 203, 9506, 202, 430, 261, 71, 631, 46, 1895, 8485, 18, 25268, 67, 7425, 13, 327, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 1323, 261, 74, 18, 1808, 10663, 203, 203, 202, 202, 698, 288, 203, 1082, 202, 17947, 2289, 596, 273, 394, 22490, 12, 2704, 24639, 12, 74, 10019, 203, 9506, 203, 1082, 202, 759, 1289, 1015, 830, 69, 4417, 622, 326, 1760, 434, 326, 876, 585, 203, 1082, 202, 659, 18, 2626, 2932, 7, 4400, 8493, 9722, 14988, 40, 12108, 423, 5856, 3047, 2689, 30817, 55, 64, 82, 8863, 203, 1082, 202, 6494, 1122, 914, 273, 638, 31, 203, 1082, 202, 1884, 261, 474, 277, 33, 20, 31, 77, 32, 16925, 18, 588, 1494, 1380, 5621, 77, 27245, 288, 203, 9506, 202, 430, 261, 77, 422, 1694, 18, 588, 22165, 1670, 1494, 10756, 1324, 31, 203, 9506, 202, 430, 261, 3645, 914, 13, 288, 203, 6862, 202, 659, 18, 2626, 12, 16925, 18, 588, 8516, 12, 77, 10019, 203, 6862, 202, 3645, 914, 273, 629, 31, 203, 9506, 202, 97, 469, 288, 203, 6862, 202, 659, 18, 2626, 31458, 88, 6, 397, 6118, 18, 588, 8516, 12, 77, 10019, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 1082, 202, 659, 18, 2626, 31458, 82, 8863, 203, 9506, 203, 1082, 202, 474, 8526, 1547, 31, 203, 1082, 202, 728, 273, 394, 509, 63, 16925, 18, 588, 26359, 1435, 15533, 203, 1082, 202, 1884, 261, 474, 277, 33, 20, 31, 277, 32, 16925, 18, 588, 26359, 5621, 277, 27245, 1547, 63, 77, 65, 273, 277, 31, 203, 9506, 203, 1082, 202, 1884, 261, 474, 277, 33, 20, 31, 77, 32, 16925, 18, 588, 26359, 5621, 77, 27245, 288, 203, 9506, 202, 3645, 914, 273, 638, 31, 203, 9506, 202, 1884, 261, 474, 525, 33, 20, 31, 525, 32, 16925, 18, 588, 1494, 1380, 5621, 78, 27245, 288, 203, 6862, 202, 430, 261, 78, 422, 1694, 18, 588, 22165, 1670, 1494, 10756, 1324, 31, 203, 6862, 202, 921, 320, 273, 6118, 18, 24805, 861, 12, 77, 16, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 20308, 203, 202, 380, 1923, 326, 14902, 2362, 358, 279, 977, 585, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
3bfee38c45538bcdd15494ac601f7b01e095f864
iedadata/geomapapp
haxby/map/CylindricalMapBorder.java
[ "Apache-2.0" ]
Java
formatNum2
String
public String formatNum2(double inValue){ DecimalFormat twoDec = new DecimalFormat("0.00"); twoDec.setGroupingUsed(false); return twoDec.format(inValue); }
// Formats double into preferred decimal place.
Formats double into preferred decimal place.
[ "Formats", "double", "into", "preferred", "decimal", "place", "." ]
public String formatNum2(double inValue){ DecimalFormat twoDec = new DecimalFormat("0.00"); twoDec.setGroupingUsed(false); return twoDec.format(inValue); }
[ "public", "String", "formatNum2", "(", "double", "inValue", ")", "{", "DecimalFormat", "twoDec", "=", "new", "DecimalFormat", "(", "\"0.00\"", ")", ";", "twoDec", ".", "setGroupingUsed", "(", "false", ")", ";", "return", "twoDec", ".", "format", "(", "inValue", ")", ";", "}" ]
Formats double into preferred decimal place.
[ "Formats", "double", "into", "preferred", "decimal", "place", "." ]
[]
[ { "param": "inValue", "type": "double" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "inValue", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 514, 740, 2578, 22, 12, 9056, 316, 620, 15329, 203, 202, 202, 5749, 1630, 2795, 1799, 273, 394, 29665, 2932, 20, 18, 713, 8863, 203, 202, 202, 15415, 1799, 18, 542, 21014, 6668, 12, 5743, 1769, 203, 202, 202, 2463, 2795, 1799, 18, 2139, 12, 267, 620, 1769, 203, 202, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 2748, 2323, 1645, 1368, 9119, 6970, 3166, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
f2e4de63f50740f88f572088a6cd7238eeddfb7b
iedadata/geomapapp
haxby/db/custom/CustomDB.java
[ "Apache-2.0" ]
Java
save
null
public void save() { if ( save.getSelectedItem() == "Copy Selection to Clipboard" ) { copy(); }else if ( save.getSelectedItem() == " -Table Data to ASCII File" ) { exportASCII("all"); }else if ( save.getSelectedItem() == " -Table Data to Excel File (.xls)" ) { exportExcel("all"); }else if ( save.getSelectedItem() == " -Table Data to Excel File (.xlsx)" ) { exportExcelXLSX("all"); }else if ( save.getSelectedItem() == " -Plotted Data to ASCII File" ) { exportASCII("plottable"); }else if ( save.getSelectedItem() == " -Plotted Data to Excel File (.xls)" ) { exportExcel("plottable"); }else if ( save.getSelectedItem() == " -Plotted Data to Excel File (.xlsx)" ) { exportExcelXLSX("plottable"); }else if ( save.getSelectedItem() == " -Selection to ASCII File" ) { exportASCII("selection"); }else if ( save.getSelectedItem() == " -Selection to Excel File (.xls)" ) { exportExcel("selection"); }else if ( save.getSelectedItem() == " -Selection to Excel File (.xlsx)" ) { exportExcelXLSX("selection"); }else if (save.getSelectedItem() == " -Table Data to Google Earth (KMZ)") { exportKML("all"); }else if (save.getSelectedItem() == " -Plotted Data to Google Earth (KMZ)") { exportKML("plottable"); }else if (save.getSelectedItem() == " -Selection to Google Earth (KMZ)") { exportKML("selection"); } save.setSelectedIndex(0); // JOC: This will now return the save combo selection back to "Save" }
// ***** GMA 1.4.8: The save() function checks the option selected from the save combo box and invokes the appropriate save function
GMA 1.4.8: The save() function checks the option selected from the save combo box and invokes the appropriate save function
[ "GMA", "1", ".", "4", ".", "8", ":", "The", "save", "()", "function", "checks", "the", "option", "selected", "from", "the", "save", "combo", "box", "and", "invokes", "the", "appropriate", "save", "function" ]
public void save() { if ( save.getSelectedItem() == "Copy Selection to Clipboard" ) { copy(); }else if ( save.getSelectedItem() == " -Table Data to ASCII File" ) { exportASCII("all"); }else if ( save.getSelectedItem() == " -Table Data to Excel File (.xls)" ) { exportExcel("all"); }else if ( save.getSelectedItem() == " -Table Data to Excel File (.xlsx)" ) { exportExcelXLSX("all"); }else if ( save.getSelectedItem() == " -Plotted Data to ASCII File" ) { exportASCII("plottable"); }else if ( save.getSelectedItem() == " -Plotted Data to Excel File (.xls)" ) { exportExcel("plottable"); }else if ( save.getSelectedItem() == " -Plotted Data to Excel File (.xlsx)" ) { exportExcelXLSX("plottable"); }else if ( save.getSelectedItem() == " -Selection to ASCII File" ) { exportASCII("selection"); }else if ( save.getSelectedItem() == " -Selection to Excel File (.xls)" ) { exportExcel("selection"); }else if ( save.getSelectedItem() == " -Selection to Excel File (.xlsx)" ) { exportExcelXLSX("selection"); }else if (save.getSelectedItem() == " -Table Data to Google Earth (KMZ)") { exportKML("all"); }else if (save.getSelectedItem() == " -Plotted Data to Google Earth (KMZ)") { exportKML("plottable"); }else if (save.getSelectedItem() == " -Selection to Google Earth (KMZ)") { exportKML("selection"); } save.setSelectedIndex(0); }
[ "public", "void", "save", "(", ")", "{", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\"Copy Selection to Clipboard\"", ")", "{", "copy", "(", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Table Data to ASCII File\"", ")", "{", "exportASCII", "(", "\"all\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Table Data to Excel File (.xls)\"", ")", "{", "exportExcel", "(", "\"all\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Table Data to Excel File (.xlsx)\"", ")", "{", "exportExcelXLSX", "(", "\"all\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Plotted Data to ASCII File\"", ")", "{", "exportASCII", "(", "\"plottable\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Plotted Data to Excel File (.xls)\"", ")", "{", "exportExcel", "(", "\"plottable\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Plotted Data to Excel File (.xlsx)\"", ")", "{", "exportExcelXLSX", "(", "\"plottable\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Selection to ASCII File\"", ")", "{", "exportASCII", "(", "\"selection\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Selection to Excel File (.xls)\"", ")", "{", "exportExcel", "(", "\"selection\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Selection to Excel File (.xlsx)\"", ")", "{", "exportExcelXLSX", "(", "\"selection\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Table Data to Google Earth (KMZ)\"", ")", "{", "exportKML", "(", "\"all\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Plotted Data to Google Earth (KMZ)\"", ")", "{", "exportKML", "(", "\"plottable\"", ")", ";", "}", "else", "if", "(", "save", ".", "getSelectedItem", "(", ")", "==", "\" -Selection to Google Earth (KMZ)\"", ")", "{", "exportKML", "(", "\"selection\"", ")", ";", "}", "save", ".", "setSelectedIndex", "(", "0", ")", ";", "}" ]
GMA 1.4.8: The save() function checks the option selected from the save combo box and invokes the appropriate save function
[ "GMA", "1", ".", "4", ".", "8", ":", "The", "save", "()", "function", "checks", "the", "option", "selected", "from", "the", "save", "combo", "box", "and", "invokes", "the", "appropriate", "save", "function" ]
[ "// JOC: This will now return the save combo selection back to \"Save\"\r" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1923, 1435, 288, 206, 203, 202, 202, 430, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 2951, 12977, 358, 385, 3169, 3752, 6, 262, 288, 206, 203, 1082, 202, 3530, 5621, 206, 203, 202, 202, 97, 12107, 309, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 300, 1388, 1910, 358, 11768, 1387, 6, 262, 288, 206, 203, 1082, 202, 6530, 13756, 2932, 454, 8863, 206, 203, 202, 202, 97, 12107, 309, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 300, 1388, 1910, 358, 17674, 1387, 261, 18, 92, 3251, 2225, 262, 288, 206, 203, 1082, 202, 6530, 7177, 2932, 454, 8863, 206, 203, 202, 202, 97, 12107, 309, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 300, 1388, 1910, 358, 17674, 1387, 261, 18, 92, 14917, 2225, 262, 288, 206, 203, 1082, 202, 6530, 7177, 60, 3045, 60, 2932, 454, 8863, 202, 206, 203, 202, 202, 97, 12107, 309, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 300, 11532, 2344, 1910, 358, 11768, 1387, 6, 262, 288, 206, 203, 1082, 202, 6530, 13756, 2932, 4032, 2121, 8863, 206, 203, 202, 202, 97, 12107, 309, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 300, 11532, 2344, 1910, 358, 17674, 1387, 261, 18, 92, 3251, 2225, 262, 288, 206, 203, 1082, 202, 6530, 7177, 2932, 4032, 2121, 8863, 206, 203, 202, 202, 97, 12107, 309, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 300, 11532, 2344, 1910, 358, 17674, 1387, 261, 18, 92, 14917, 2225, 262, 288, 206, 203, 1082, 202, 6530, 7177, 60, 3045, 60, 2932, 4032, 2121, 8863, 9506, 206, 203, 202, 202, 97, 12107, 309, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 300, 6233, 358, 11768, 1387, 6, 262, 288, 206, 203, 1082, 202, 6530, 13756, 2932, 10705, 8863, 206, 203, 202, 202, 97, 12107, 309, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 300, 6233, 358, 17674, 1387, 261, 18, 92, 3251, 2225, 262, 288, 206, 203, 1082, 202, 6530, 7177, 2932, 10705, 8863, 206, 203, 202, 202, 97, 12107, 309, 261, 1923, 18, 588, 7416, 1180, 1435, 422, 315, 300, 6233, 358, 17674, 1387, 261, 18, 92, 14917, 2225, 262, 288, 206, 203, 1082, 202, 6530, 7177, 60, 3045, 60, 2932, 10705, 8863, 1082, 206, 203, 202, 202, 97, 12107, 309, 261, 5688, 18, 588, 7416, 1180, 1435, 422, 315, 300, 1388, 1910, 358, 6124, 512, 27076, 261, 47, 49, 62, 2225, 13, 288, 206, 203, 1082, 202, 6530, 47, 1495, 2932, 454, 8863, 1082, 206, 203, 202, 202, 97, 12107, 309, 261, 5688, 18, 588, 7416, 1180, 1435, 422, 315, 300, 11532, 2344, 1910, 358, 6124, 512, 27076, 261, 47, 49, 62, 2225, 13, 288, 206, 203, 1082, 202, 6530, 47, 1495, 2932, 4032, 2121, 8863, 202, 206, 203, 202, 202, 97, 12107, 309, 261, 5688, 18, 588, 7416, 1180, 1435, 422, 315, 300, 6233, 358, 6124, 512, 27076, 261, 47, 49, 62, 2225, 13, 288, 206, 203, 1082, 202, 6530, 47, 1495, 2932, 10705, 8863, 206, 203, 202, 202, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 759, 202, 23490, 611, 5535, 404, 18, 24, 18, 28, 30, 1021, 1923, 1435, 445, 4271, 326, 1456, 3170, 628, 326, 1923, 16778, 3919, 471, 18058, 326, 5505, 1923, 445, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
f2e4de63f50740f88f572088a6cd7238eeddfb7b
iedadata/geomapapp
haxby/db/custom/CustomDB.java
[ "Apache-2.0" ]
Java
togglePlotAll
null
public void togglePlotAll() { UnknownDataSet d = (UnknownDataSet) box.getSelectedItem(); if ( plotAllB.isSelected() ) { d.rememberPlottableStatus(); d.makeAllPlottable(); } else { d.revertToOldPlottableStatus(); } map.moveOverlayToTop(d); d.dataT.repaint(); map.repaint(); }
//toggle between plotting all datapoints and only the ones that the user has selected
toggle between plotting all datapoints and only the ones that the user has selected
[ "toggle", "between", "plotting", "all", "datapoints", "and", "only", "the", "ones", "that", "the", "user", "has", "selected" ]
public void togglePlotAll() { UnknownDataSet d = (UnknownDataSet) box.getSelectedItem(); if ( plotAllB.isSelected() ) { d.rememberPlottableStatus(); d.makeAllPlottable(); } else { d.revertToOldPlottableStatus(); } map.moveOverlayToTop(d); d.dataT.repaint(); map.repaint(); }
[ "public", "void", "togglePlotAll", "(", ")", "{", "UnknownDataSet", "d", "=", "(", "UnknownDataSet", ")", "box", ".", "getSelectedItem", "(", ")", ";", "if", "(", "plotAllB", ".", "isSelected", "(", ")", ")", "{", "d", ".", "rememberPlottableStatus", "(", ")", ";", "d", ".", "makeAllPlottable", "(", ")", ";", "}", "else", "{", "d", ".", "revertToOldPlottableStatus", "(", ")", ";", "}", "map", ".", "moveOverlayToTop", "(", "d", ")", ";", "d", ".", "dataT", ".", "repaint", "(", ")", ";", "map", ".", "repaint", "(", ")", ";", "}" ]
toggle between plotting all datapoints and only the ones that the user has selected
[ "toggle", "between", "plotting", "all", "datapoints", "and", "only", "the", "ones", "that", "the", "user", "has", "selected" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 10486, 11532, 1595, 1435, 288, 206, 203, 202, 202, 4874, 13676, 302, 273, 261, 4874, 13676, 13, 3919, 18, 588, 7416, 1180, 5621, 206, 203, 206, 203, 202, 202, 430, 261, 3207, 1595, 38, 18, 291, 7416, 1435, 262, 288, 206, 203, 1082, 202, 72, 18, 28155, 11532, 2121, 1482, 5621, 206, 203, 1082, 202, 72, 18, 6540, 1595, 11532, 2121, 5621, 206, 203, 202, 202, 97, 469, 288, 206, 203, 1082, 202, 72, 18, 266, 1097, 774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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 14401, 3086, 20947, 777, 27725, 471, 1338, 326, 5945, 716, 326, 729, 711, 3170, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7cf4dc0f86a6ff1246c8f7a658013b39d01d5502
iedadata/geomapapp
haxby/db/pdb/PDBAnalysisModel.java
[ "Apache-2.0" ]
Java
sortByColumn
null
public synchronized void sortByColumn(int col) { if (lastSortedCol == col) ascent = !ascent; else ascent = true; lastSortedCol = col; Collections.sort(analyses, columnSorter); updateAnalysisIndexMap(); fireTableDataChanged(); }
// Sorts on column col, alternating between ascent and descent
Sorts on column col, alternating between ascent and descent
[ "Sorts", "on", "column", "col", "alternating", "between", "ascent", "and", "descent" ]
public synchronized void sortByColumn(int col) { if (lastSortedCol == col) ascent = !ascent; else ascent = true; lastSortedCol = col; Collections.sort(analyses, columnSorter); updateAnalysisIndexMap(); fireTableDataChanged(); }
[ "public", "synchronized", "void", "sortByColumn", "(", "int", "col", ")", "{", "if", "(", "lastSortedCol", "==", "col", ")", "ascent", "=", "!", "ascent", ";", "else", "ascent", "=", "true", ";", "lastSortedCol", "=", "col", ";", "Collections", ".", "sort", "(", "analyses", ",", "columnSorter", ")", ";", "updateAnalysisIndexMap", "(", ")", ";", "fireTableDataChanged", "(", ")", ";", "}" ]
Sorts on column col, alternating between ascent and descent
[ "Sorts", "on", "column", "col", "alternating", "between", "ascent", "and", "descent" ]
[]
[ { "param": "col", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "col", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 3852, 918, 14021, 1494, 12, 474, 645, 13, 288, 203, 202, 202, 430, 261, 2722, 11739, 914, 422, 645, 13, 203, 1082, 202, 345, 2998, 273, 401, 345, 2998, 31, 203, 202, 202, 12107, 203, 1082, 202, 345, 2998, 273, 638, 31, 203, 202, 202, 2722, 11739, 914, 273, 645, 31, 203, 203, 202, 202, 15150, 18, 3804, 12, 304, 23723, 16, 1057, 24952, 1769, 203, 203, 202, 202, 2725, 9418, 1016, 863, 5621, 203, 202, 202, 12179, 1388, 751, 5033, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b0157fed8ae290d96d96ff0a66f05f81bffecba9
iedadata/geomapapp
haxby/map/MapApp.java
[ "Apache-2.0" ]
Java
loadSessionCustomMainMenu
null
public void loadSessionCustomMainMenu() { //Retrieving XML main menus String mainMenuURL = System.getProperty("geomapapp.menus_url"); // Check to make sure xml files are in layers dir. File customMenuURL = new File(layerSessionDir, "SessionsMenu.xml"); File sessionsFile = new File(layerSessionDir, "MySessions.xml"); if (mainMenuURL == null) { //mainMenuURL = PathUtil.getPath("MENU_PATH",MapApp.BASE_URL+"/gma_menus/main_menu.xml"); // 3.5.2 and older mainMenuURL = PathUtil.getPath("NEW_MENU_PATH_2015",MapApp.BASE_URL+"/gma_menus/main_menu_new_2015.xml"); } if(!customMenuURL.exists()) { //Check and create. LayerManager.checkLayerFileStructure(); } try { XML_Menu.setMapApp(this); menuBar = XML_Menu.createMainMenuBars(XML_Menu.parse(mainMenuURL),XML_Menu.parse(customMenuURL)); frame.setJMenuBar(menuBar); //Delete the tmp Session file File tmp = new File(layerSessionDir + File.separator + "MySessions.xml.tmp"); if (tmp.exists() && !tmp.delete()) { System.out.println("Could not delete file"); return; } } catch (MalformedURLException e1) { e1.printStackTrace(); } catch (IOException e1) { e1.printStackTrace(); } catch (ParserConfigurationException e1) { e1.printStackTrace(); } catch (SAXException e1) { e1.printStackTrace(); } }
// Loads custom GMA regular XML menu
Loads custom GMA regular XML menu
[ "Loads", "custom", "GMA", "regular", "XML", "menu" ]
public void loadSessionCustomMainMenu() { String mainMenuURL = System.getProperty("geomapapp.menus_url"); File customMenuURL = new File(layerSessionDir, "SessionsMenu.xml"); File sessionsFile = new File(layerSessionDir, "MySessions.xml"); if (mainMenuURL == null) { mainMenuURL = PathUtil.getPath("NEW_MENU_PATH_2015",MapApp.BASE_URL+"/gma_menus/main_menu_new_2015.xml"); } if(!customMenuURL.exists()) { LayerManager.checkLayerFileStructure(); } try { XML_Menu.setMapApp(this); menuBar = XML_Menu.createMainMenuBars(XML_Menu.parse(mainMenuURL),XML_Menu.parse(customMenuURL)); frame.setJMenuBar(menuBar); File tmp = new File(layerSessionDir + File.separator + "MySessions.xml.tmp"); if (tmp.exists() && !tmp.delete()) { System.out.println("Could not delete file"); return; } } catch (MalformedURLException e1) { e1.printStackTrace(); } catch (IOException e1) { e1.printStackTrace(); } catch (ParserConfigurationException e1) { e1.printStackTrace(); } catch (SAXException e1) { e1.printStackTrace(); } }
[ "public", "void", "loadSessionCustomMainMenu", "(", ")", "{", "String", "mainMenuURL", "=", "System", ".", "getProperty", "(", "\"geomapapp.menus_url\"", ")", ";", "File", "customMenuURL", "=", "new", "File", "(", "layerSessionDir", ",", "\"SessionsMenu.xml\"", ")", ";", "File", "sessionsFile", "=", "new", "File", "(", "layerSessionDir", ",", "\"MySessions.xml\"", ")", ";", "if", "(", "mainMenuURL", "==", "null", ")", "{", "mainMenuURL", "=", "PathUtil", ".", "getPath", "(", "\"NEW_MENU_PATH_2015\"", ",", "MapApp", ".", "BASE_URL", "+", "\"/gma_menus/main_menu_new_2015.xml\"", ")", ";", "}", "if", "(", "!", "customMenuURL", ".", "exists", "(", ")", ")", "{", "LayerManager", ".", "checkLayerFileStructure", "(", ")", ";", "}", "try", "{", "XML_Menu", ".", "setMapApp", "(", "this", ")", ";", "menuBar", "=", "XML_Menu", ".", "createMainMenuBars", "(", "XML_Menu", ".", "parse", "(", "mainMenuURL", ")", ",", "XML_Menu", ".", "parse", "(", "customMenuURL", ")", ")", ";", "frame", ".", "setJMenuBar", "(", "menuBar", ")", ";", "File", "tmp", "=", "new", "File", "(", "layerSessionDir", "+", "File", ".", "separator", "+", "\"MySessions.xml.tmp\"", ")", ";", "if", "(", "tmp", ".", "exists", "(", ")", "&&", "!", "tmp", ".", "delete", "(", ")", ")", "{", "System", ".", "out", ".", "println", "(", "\"Could not delete file\"", ")", ";", "return", ";", "}", "}", "catch", "(", "MalformedURLException", "e1", ")", "{", "e1", ".", "printStackTrace", "(", ")", ";", "}", "catch", "(", "IOException", "e1", ")", "{", "e1", ".", "printStackTrace", "(", ")", ";", "}", "catch", "(", "ParserConfigurationException", "e1", ")", "{", "e1", ".", "printStackTrace", "(", ")", ";", "}", "catch", "(", "SAXException", "e1", ")", "{", "e1", ".", "printStackTrace", "(", ")", ";", "}", "}" ]
Loads custom GMA regular XML menu
[ "Loads", "custom", "GMA", "regular", "XML", "menu" ]
[ "//Retrieving XML main menus", "// Check to make sure xml files are in layers dir.", "//mainMenuURL = PathUtil.getPath(\"MENU_PATH\",MapApp.BASE_URL+\"/gma_menus/main_menu.xml\"); // 3.5.2 and older", "//Check and create.", "//Delete the tmp Session file" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1262, 2157, 3802, 6376, 4599, 1435, 288, 203, 202, 202, 759, 3848, 6282, 3167, 2774, 21374, 203, 202, 202, 780, 2774, 4599, 1785, 273, 2332, 18, 588, 1396, 2932, 10049, 438, 2910, 18, 26065, 67, 718, 8863, 203, 202, 202, 759, 2073, 358, 1221, 3071, 2025, 1390, 854, 316, 6623, 1577, 18, 203, 202, 202, 812, 1679, 4599, 1785, 273, 394, 1387, 12, 6363, 2157, 1621, 16, 315, 13566, 4599, 18, 2902, 8863, 203, 202, 202, 812, 8856, 812, 273, 394, 1387, 12, 6363, 2157, 1621, 16, 315, 12062, 13566, 18, 2902, 8863, 203, 203, 202, 202, 430, 261, 5254, 4599, 1785, 422, 446, 13, 288, 203, 1082, 202, 759, 5254, 4599, 1785, 273, 2666, 1304, 18, 588, 743, 2932, 29227, 67, 4211, 3113, 863, 3371, 18, 8369, 67, 1785, 9078, 19, 75, 2540, 67, 26065, 19, 5254, 67, 5414, 18, 2902, 8863, 368, 890, 18, 25, 18, 22, 471, 12156, 203, 1082, 202, 5254, 4599, 1785, 273, 2666, 1304, 18, 588, 743, 2932, 12917, 67, 29227, 67, 4211, 67, 26709, 3113, 863, 3371, 18, 8369, 67, 1785, 9078, 19, 75, 2540, 67, 26065, 19, 5254, 67, 5414, 67, 2704, 67, 26709, 18, 2902, 8863, 203, 202, 202, 97, 203, 202, 202, 430, 12, 5, 3662, 4599, 1785, 18, 1808, 10756, 288, 203, 1082, 202, 759, 1564, 471, 752, 18, 203, 9506, 202, 4576, 1318, 18, 1893, 4576, 812, 6999, 5621, 203, 1082, 202, 97, 203, 203, 202, 202, 698, 288, 203, 1082, 202, 4201, 67, 4599, 18, 542, 863, 3371, 12, 2211, 1769, 203, 1082, 202, 5414, 5190, 273, 3167, 67, 4599, 18, 2640, 6376, 4599, 5190, 87, 12, 4201, 67, 4599, 18, 2670, 12, 5254, 4599, 1785, 3631, 4201, 67, 4599, 18, 2670, 12, 3662, 4599, 1785, 10019, 203, 1082, 202, 3789, 18, 542, 46, 4599, 5190, 12, 5414, 5190, 1769, 203, 203, 1082, 202, 759, 2613, 326, 1853, 3877, 585, 203, 1082, 202, 812, 1853, 273, 394, 1387, 12, 6363, 2157, 1621, 397, 1387, 18, 11287, 397, 315, 12062, 13566, 18, 2902, 18, 5645, 8863, 203, 1082, 202, 430, 261, 5645, 18, 1808, 1435, 597, 401, 5645, 18, 3733, 10756, 288, 203, 9506, 202, 3163, 18, 659, 18, 8222, 2932, 4445, 486, 1430, 585, 8863, 203, 9506, 202, 2463, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 1044, 261, 18695, 20160, 425, 21, 13, 288, 203, 1082, 202, 73, 21, 18, 1188, 6332, 5621, 203, 202, 202, 97, 1044, 261, 14106, 425, 21, 13, 288, 203, 1082, 202, 73, 21, 18, 1188, 6332, 5621, 203, 202, 202, 97, 1044, 261, 2678, 10737, 425, 21, 13, 288, 203, 1082, 202, 73, 21, 18, 1188, 6332, 5621, 203, 202, 202, 97, 1044, 261, 55, 2501, 503, 425, 21, 13, 288, 203, 1082, 202, 73, 21, 18, 1188, 6332, 5621, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 4444, 87, 1679, 611, 5535, 6736, 3167, 3824, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b0157fed8ae290d96d96ff0a66f05f81bffecba9
iedadata/geomapapp
haxby/map/MapApp.java
[ "Apache-2.0" ]
Java
accessDatabaseMenuItems
null
public void accessDatabaseMenuItems(final String accessItem) { for( int i=0 ; i<db.length ; i++) { if( accessItem.equals( db[i].getDBName()) ) { final Database database = db[i]; addProcessingTask(database.getDBName(), new Runnable() { public void run() { Runtime rt = Runtime.getRuntime(); long free = rt.freeMemory()/1024/1024; long total = rt.totalMemory()/1024/1024; System.out.println("before:\t" + free +" MB Free,\t" + (total-free) +" MB used"); if(database.loadDB()) { disableCurrentDB(); currentDB = database; currentDB.setEnabled(true); addCurrentDBToDisplay(); while( map.hasOverlay( database ) ) { map.removeOverlay(database); } map.addOverlay(database.getDBName(), database ); } free = rt.freeMemory()/1024/1024; total = rt.totalMemory()/1024/1024; System.out.println("after:\t" + free +" MB Free,\t" + (total-free) +" MB used"); map.repaint(); } }); } } if ( accessItem == "Drilling-DSDP/ODP/BRG" ) { showDSDP(); } }
// ***** GMA 1.5.2: Add function to access "Database" menu menu items
GMA 1.5.2: Add function to access "Database" menu menu items
[ "GMA", "1", ".", "5", ".", "2", ":", "Add", "function", "to", "access", "\"", "Database", "\"", "menu", "menu", "items" ]
public void accessDatabaseMenuItems(final String accessItem) { for( int i=0 ; i<db.length ; i++) { if( accessItem.equals( db[i].getDBName()) ) { final Database database = db[i]; addProcessingTask(database.getDBName(), new Runnable() { public void run() { Runtime rt = Runtime.getRuntime(); long free = rt.freeMemory()/1024/1024; long total = rt.totalMemory()/1024/1024; System.out.println("before:\t" + free +" MB Free,\t" + (total-free) +" MB used"); if(database.loadDB()) { disableCurrentDB(); currentDB = database; currentDB.setEnabled(true); addCurrentDBToDisplay(); while( map.hasOverlay( database ) ) { map.removeOverlay(database); } map.addOverlay(database.getDBName(), database ); } free = rt.freeMemory()/1024/1024; total = rt.totalMemory()/1024/1024; System.out.println("after:\t" + free +" MB Free,\t" + (total-free) +" MB used"); map.repaint(); } }); } } if ( accessItem == "Drilling-DSDP/ODP/BRG" ) { showDSDP(); } }
[ "public", "void", "accessDatabaseMenuItems", "(", "final", "String", "accessItem", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "db", ".", "length", ";", "i", "++", ")", "{", "if", "(", "accessItem", ".", "equals", "(", "db", "[", "i", "]", ".", "getDBName", "(", ")", ")", ")", "{", "final", "Database", "database", "=", "db", "[", "i", "]", ";", "addProcessingTask", "(", "database", ".", "getDBName", "(", ")", ",", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "Runtime", "rt", "=", "Runtime", ".", "getRuntime", "(", ")", ";", "long", "free", "=", "rt", ".", "freeMemory", "(", ")", "/", "1024", "/", "1024", ";", "long", "total", "=", "rt", ".", "totalMemory", "(", ")", "/", "1024", "/", "1024", ";", "System", ".", "out", ".", "println", "(", "\"before:\\t\"", "+", "free", "+", "\" MB Free,\\t\"", "+", "(", "total", "-", "free", ")", "+", "\" MB used\"", ")", ";", "if", "(", "database", ".", "loadDB", "(", ")", ")", "{", "disableCurrentDB", "(", ")", ";", "currentDB", "=", "database", ";", "currentDB", ".", "setEnabled", "(", "true", ")", ";", "addCurrentDBToDisplay", "(", ")", ";", "while", "(", "map", ".", "hasOverlay", "(", "database", ")", ")", "{", "map", ".", "removeOverlay", "(", "database", ")", ";", "}", "map", ".", "addOverlay", "(", "database", ".", "getDBName", "(", ")", ",", "database", ")", ";", "}", "free", "=", "rt", ".", "freeMemory", "(", ")", "/", "1024", "/", "1024", ";", "total", "=", "rt", ".", "totalMemory", "(", ")", "/", "1024", "/", "1024", ";", "System", ".", "out", ".", "println", "(", "\"after:\\t\"", "+", "free", "+", "\" MB Free,\\t\"", "+", "(", "total", "-", "free", ")", "+", "\" MB used\"", ")", ";", "map", ".", "repaint", "(", ")", ";", "}", "}", ")", ";", "}", "}", "if", "(", "accessItem", "==", "\"Drilling-DSDP/ODP/BRG\"", ")", "{", "showDSDP", "(", ")", ";", "}", "}" ]
GMA 1.5.2: Add function to access "Database" menu menu items
[ "GMA", "1", ".", "5", ".", "2", ":", "Add", "function", "to", "access", "\"", "Database", "\"", "menu", "menu", "items" ]
[]
[ { "param": "accessItem", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "accessItem", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 2006, 4254, 4599, 3126, 12, 6385, 514, 2006, 1180, 13, 288, 203, 202, 202, 1884, 12, 509, 277, 33, 20, 274, 277, 32, 1966, 18, 2469, 274, 277, 27245, 288, 203, 1082, 202, 430, 12, 2006, 1180, 18, 14963, 12, 1319, 63, 77, 8009, 588, 2290, 461, 10756, 262, 288, 203, 203, 9506, 202, 6385, 5130, 2063, 273, 1319, 63, 77, 15533, 203, 9506, 202, 1289, 7798, 2174, 12, 6231, 18, 588, 2290, 461, 9334, 394, 10254, 1435, 288, 203, 6862, 202, 482, 918, 1086, 1435, 288, 203, 25083, 202, 5576, 8253, 273, 2509, 18, 588, 5576, 5621, 203, 25083, 202, 5748, 4843, 273, 8253, 18, 9156, 6031, 1435, 19, 2163, 3247, 19, 2163, 3247, 31, 203, 25083, 202, 5748, 2078, 273, 8253, 18, 4963, 6031, 1435, 19, 2163, 3247, 19, 2163, 3247, 31, 203, 25083, 202, 3163, 18, 659, 18, 8222, 2932, 5771, 5581, 88, 6, 397, 4843, 397, 6, 17897, 15217, 17211, 88, 6, 397, 261, 4963, 17, 9156, 13, 397, 6, 17897, 1399, 8863, 203, 25083, 202, 430, 12, 6231, 18, 945, 2290, 10756, 288, 203, 6862, 1082, 202, 8394, 3935, 2290, 5621, 203, 203, 6862, 1082, 202, 2972, 2290, 273, 2063, 31, 203, 6862, 1082, 202, 2972, 2290, 18, 542, 1526, 12, 3767, 1769, 203, 203, 6862, 1082, 202, 1289, 3935, 2290, 774, 4236, 5621, 203, 203, 6862, 1082, 202, 17523, 12, 852, 18, 5332, 11627, 12, 2063, 262, 262, 288, 203, 6862, 9506, 202, 1458, 18, 4479, 11627, 12, 6231, 1769, 203, 6862, 1082, 202, 97, 203, 6862, 1082, 202, 1458, 18, 1289, 11627, 12, 6231, 18, 588, 2290, 461, 9334, 2063, 11272, 203, 25083, 202, 97, 203, 25083, 202, 9156, 273, 8253, 18, 9156, 6031, 1435, 19, 2163, 3247, 19, 2163, 3247, 31, 203, 25083, 202, 4963, 273, 8253, 18, 4963, 6031, 1435, 19, 2163, 3247, 19, 2163, 3247, 31, 203, 25083, 202, 3163, 18, 659, 18, 8222, 2932, 5205, 5581, 88, 6, 397, 4843, 397, 6, 17897, 15217, 17211, 88, 6, 397, 261, 4963, 17, 9156, 13, 397, 6, 17897, 1399, 8863, 203, 25083, 202, 1458, 18, 14462, 1598, 5621, 203, 6862, 202, 97, 203, 9506, 202, 22938, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 202, 430, 261, 2006, 1180, 422, 315, 8956, 5789, 17, 3948, 8640, 19, 1212, 52, 19, 7192, 43, 6, 262, 288, 203, 1082, 202, 4500, 3948, 8640, 5621, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 202, 23490, 611, 5535, 404, 18, 25, 18, 22, 30, 1436, 445, 358, 2006, 315, 4254, 6, 3824, 3824, 1516, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b0157fed8ae290d96d96ff0a66f05f81bffecba9
iedadata/geomapapp
haxby/map/MapApp.java
[ "Apache-2.0" ]
Java
addShapeFile
null
public void addShapeFile(String layerURL) { try { tools.suite.addShapeFile(layerURL); if ( !tools.shapeTB.isSelected() ) { tools.shapeTB.doClick(); } else { tools.shapes.setVisible(true); } initializeColorScale(); } catch (IOException e) { e.printStackTrace(); } }
// GMA 1.5.2: Get tools.suite.layers for the layer tree to give to data portal
GMA 1.5.2: Get tools.suite.layers for the layer tree to give to data portal
[ "GMA", "1", ".", "5", ".", "2", ":", "Get", "tools", ".", "suite", ".", "layers", "for", "the", "layer", "tree", "to", "give", "to", "data", "portal" ]
public void addShapeFile(String layerURL) { try { tools.suite.addShapeFile(layerURL); if ( !tools.shapeTB.isSelected() ) { tools.shapeTB.doClick(); } else { tools.shapes.setVisible(true); } initializeColorScale(); } catch (IOException e) { e.printStackTrace(); } }
[ "public", "void", "addShapeFile", "(", "String", "layerURL", ")", "{", "try", "{", "tools", ".", "suite", ".", "addShapeFile", "(", "layerURL", ")", ";", "if", "(", "!", "tools", ".", "shapeTB", ".", "isSelected", "(", ")", ")", "{", "tools", ".", "shapeTB", ".", "doClick", "(", ")", ";", "}", "else", "{", "tools", ".", "shapes", ".", "setVisible", "(", "true", ")", ";", "}", "initializeColorScale", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "}" ]
GMA 1.5.2: Get tools.suite.layers for the layer tree to give to data portal
[ "GMA", "1", ".", "5", ".", "2", ":", "Get", "tools", ".", "suite", ".", "layers", "for", "the", "layer", "tree", "to", "give", "to", "data", "portal" ]
[]
[ { "param": "layerURL", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "layerURL", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 527, 8500, 812, 12, 780, 3018, 1785, 13, 288, 203, 202, 202, 698, 288, 203, 1082, 202, 6642, 18, 30676, 18, 1289, 8500, 812, 12, 6363, 1785, 1769, 203, 1082, 202, 430, 261, 401, 6642, 18, 4867, 25730, 18, 291, 7416, 1435, 262, 288, 203, 9506, 202, 6642, 18, 4867, 25730, 18, 2896, 6563, 5621, 203, 1082, 202, 97, 203, 1082, 202, 12107, 288, 203, 9506, 202, 6642, 18, 17648, 18, 542, 6207, 12, 3767, 1769, 203, 1082, 202, 97, 203, 1082, 202, 11160, 2957, 5587, 5621, 203, 203, 202, 202, 97, 1044, 261, 14106, 425, 13, 288, 203, 1082, 202, 73, 18, 1188, 6332, 5621, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0 ]
[ 1, 759, 611, 5535, 404, 18, 25, 18, 22, 30, 968, 8513, 18, 30676, 18, 10396, 364, 326, 3018, 2151, 358, 8492, 358, 501, 11899, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b0157fed8ae290d96d96ff0a66f05f81bffecba9
iedadata/geomapapp
haxby/map/MapApp.java
[ "Apache-2.0" ]
Java
autoFocus
null
public void autoFocus() { synchronized (autoFocusLock) { if (focusTime == -1) { focusTime = System.currentTimeMillis() + AUTO_FOCUS_WAIT; Thread t =new Thread("Focus Thread" + focusTime) { public void run() { while (System.currentTimeMillis() < focusTime) try { sleep(200); } catch (InterruptedException e) { e.printStackTrace(); } if (focusTime!=-1) { mapFocus(); } } }; t.setDaemon(true); t.start(); } else{ focusTime = System.currentTimeMillis() + AUTO_FOCUS_WAIT; } } }
/** * Adds another request for an autofocus. * MapApp will wait AUTO_FOCUS_WAIT ms until focusing * MapApp will only autofocus if the autoFocus Check box is selected * If autoFocus() is called while waiting the timer will be set back to 0 * and wait another AUTO_FOCUS_WAIT seconds */
Adds another request for an autofocus. MapApp will wait AUTO_FOCUS_WAIT ms until focusing MapApp will only autofocus if the autoFocus Check box is selected If autoFocus() is called while waiting the timer will be set back to 0 and wait another AUTO_FOCUS_WAIT seconds
[ "Adds", "another", "request", "for", "an", "autofocus", ".", "MapApp", "will", "wait", "AUTO_FOCUS_WAIT", "ms", "until", "focusing", "MapApp", "will", "only", "autofocus", "if", "the", "autoFocus", "Check", "box", "is", "selected", "If", "autoFocus", "()", "is", "called", "while", "waiting", "the", "timer", "will", "be", "set", "back", "to", "0", "and", "wait", "another", "AUTO_FOCUS_WAIT", "seconds" ]
public void autoFocus() { synchronized (autoFocusLock) { if (focusTime == -1) { focusTime = System.currentTimeMillis() + AUTO_FOCUS_WAIT; Thread t =new Thread("Focus Thread" + focusTime) { public void run() { while (System.currentTimeMillis() < focusTime) try { sleep(200); } catch (InterruptedException e) { e.printStackTrace(); } if (focusTime!=-1) { mapFocus(); } } }; t.setDaemon(true); t.start(); } else{ focusTime = System.currentTimeMillis() + AUTO_FOCUS_WAIT; } } }
[ "public", "void", "autoFocus", "(", ")", "{", "synchronized", "(", "autoFocusLock", ")", "{", "if", "(", "focusTime", "==", "-", "1", ")", "{", "focusTime", "=", "System", ".", "currentTimeMillis", "(", ")", "+", "AUTO_FOCUS_WAIT", ";", "Thread", "t", "=", "new", "Thread", "(", "\"Focus Thread\"", "+", "focusTime", ")", "{", "public", "void", "run", "(", ")", "{", "while", "(", "System", ".", "currentTimeMillis", "(", ")", "<", "focusTime", ")", "try", "{", "sleep", "(", "200", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "if", "(", "focusTime", "!=", "-", "1", ")", "{", "mapFocus", "(", ")", ";", "}", "}", "}", ";", "t", ".", "setDaemon", "(", "true", ")", ";", "t", ".", "start", "(", ")", ";", "}", "else", "{", "focusTime", "=", "System", ".", "currentTimeMillis", "(", ")", "+", "AUTO_FOCUS_WAIT", ";", "}", "}", "}" ]
Adds another request for an autofocus.
[ "Adds", "another", "request", "for", "an", "autofocus", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 3656, 9233, 1435, 288, 203, 202, 202, 22043, 261, 6079, 9233, 2531, 13, 288, 203, 1082, 202, 430, 261, 13923, 950, 422, 300, 21, 13, 288, 203, 9506, 202, 13923, 950, 273, 2332, 18, 2972, 28512, 1435, 397, 17191, 67, 3313, 39, 3378, 67, 19046, 31, 203, 9506, 202, 3830, 268, 273, 2704, 4884, 2932, 9233, 4884, 6, 397, 7155, 950, 13, 288, 203, 6862, 202, 482, 918, 1086, 1435, 288, 203, 25083, 202, 17523, 261, 3163, 18, 2972, 28512, 1435, 411, 7155, 950, 13, 203, 6862, 1082, 202, 698, 288, 203, 6862, 9506, 202, 19607, 12, 6976, 1769, 203, 6862, 1082, 202, 97, 1044, 261, 24485, 503, 425, 13, 288, 203, 6862, 9506, 202, 73, 18, 1188, 6332, 5621, 203, 25083, 202, 97, 203, 25083, 202, 430, 261, 13923, 950, 5, 29711, 21, 13, 288, 203, 6862, 1082, 202, 1458, 9233, 5621, 203, 25083, 202, 97, 203, 6862, 202, 97, 203, 9506, 202, 20451, 203, 9506, 202, 88, 18, 542, 12858, 12, 3767, 1769, 203, 9506, 202, 88, 18, 1937, 5621, 203, 1082, 202, 97, 469, 95, 203, 9506, 202, 13923, 950, 273, 2332, 18, 2972, 28512, 1435, 397, 17191, 67, 3313, 39, 3378, 67, 19046, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 15605, 4042, 590, 364, 392, 30181, 4560, 18, 203, 202, 14, 1635, 3371, 903, 2529, 17191, 67, 3313, 39, 3378, 67, 19046, 4086, 3180, 7155, 310, 203, 202, 14, 1635, 3371, 903, 1338, 30181, 4560, 309, 326, 3656, 9233, 2073, 3919, 353, 3170, 203, 202, 14, 971, 3656, 9233, 1435, 353, 2566, 1323, 7336, 326, 5441, 903, 506, 444, 1473, 358, 374, 203, 202, 14, 225, 471, 2529, 4042, 17191, 67, 3313, 39, 3378, 67, 19046, 3974, 203, 202, 5549, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b0157fed8ae290d96d96ff0a66f05f81bffecba9
iedadata/geomapapp
haxby/map/MapApp.java
[ "Apache-2.0" ]
Java
clearCache
null
protected static void clearCache(File file) throws IOException { if(file.isDirectory()) { //directory is empty, then delete it if(file.list().length==0) { file.delete(); } else { //List all the directory contents String files[] = file.list(); for (String temp : files) { //Construct the file structure File fileDelete = new File(file, temp); //Recursive delete clearCache(fileDelete); } //Check the directory again, if empty then delete it if(file.list().length==0) { file.delete(); //System.out.println("Removed Cache directory: " + file.getAbsolutePath()); } } } else { //if file, then delete it file.delete(); //System.out.println("Removed Cache File : " + file.getAbsolutePath()); } }
// Clear cache recursively from given dir.
Clear cache recursively from given dir.
[ "Clear", "cache", "recursively", "from", "given", "dir", "." ]
protected static void clearCache(File file) throws IOException { if(file.isDirectory()) { if(file.list().length==0) { file.delete(); } else { String files[] = file.list(); for (String temp : files) { File fileDelete = new File(file, temp); clearCache(fileDelete); } if(file.list().length==0) { file.delete(); } } } else { file.delete(); } }
[ "protected", "static", "void", "clearCache", "(", "File", "file", ")", "throws", "IOException", "{", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{", "if", "(", "file", ".", "list", "(", ")", ".", "length", "==", "0", ")", "{", "file", ".", "delete", "(", ")", ";", "}", "else", "{", "String", "files", "[", "]", "=", "file", ".", "list", "(", ")", ";", "for", "(", "String", "temp", ":", "files", ")", "{", "File", "fileDelete", "=", "new", "File", "(", "file", ",", "temp", ")", ";", "clearCache", "(", "fileDelete", ")", ";", "}", "if", "(", "file", ".", "list", "(", ")", ".", "length", "==", "0", ")", "{", "file", ".", "delete", "(", ")", ";", "}", "}", "}", "else", "{", "file", ".", "delete", "(", ")", ";", "}", "}" ]
Clear cache recursively from given dir.
[ "Clear", "cache", "recursively", "from", "given", "dir", "." ]
[ "//directory is empty, then delete it", "//List all the directory contents", "//Construct the file structure", "//Recursive delete", "//Check the directory again, if empty then delete it", "//System.out.println(\"Removed Cache directory: \" + file.getAbsolutePath());", "//if file, then delete it", "//System.out.println(\"Removed Cache File : \" + file.getAbsolutePath());" ]
[ { "param": "file", "type": "File" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "file", "type": "File", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 760, 918, 19346, 12, 812, 585, 13, 1216, 1860, 288, 203, 202, 202, 430, 12, 768, 18, 291, 2853, 10756, 288, 203, 1082, 202, 759, 5149, 353, 1008, 16, 1508, 1430, 518, 203, 1082, 202, 430, 12, 768, 18, 1098, 7675, 2469, 631, 20, 13, 288, 203, 9506, 202, 768, 18, 3733, 5621, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 759, 682, 777, 326, 1867, 2939, 203, 9506, 202, 780, 1390, 8526, 273, 585, 18, 1098, 5621, 203, 9506, 202, 1884, 261, 780, 1906, 294, 1390, 13, 288, 203, 6862, 202, 759, 7249, 326, 585, 3695, 203, 6862, 202, 812, 585, 2613, 273, 394, 1387, 12, 768, 16, 1906, 1769, 203, 203, 6862, 202, 759, 10483, 1430, 203, 6862, 202, 8507, 1649, 12, 768, 2613, 1769, 203, 9506, 202, 97, 203, 9506, 202, 759, 1564, 326, 1867, 3382, 16, 309, 1008, 1508, 1430, 518, 203, 9506, 202, 430, 12, 768, 18, 1098, 7675, 2469, 631, 20, 13, 288, 203, 6862, 202, 768, 18, 3733, 5621, 203, 6862, 202, 759, 3163, 18, 659, 18, 8222, 2932, 10026, 4379, 1867, 30, 315, 397, 585, 18, 588, 10368, 743, 10663, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 759, 430, 585, 16, 1508, 1430, 518, 203, 1082, 202, 768, 18, 3733, 5621, 203, 1082, 202, 759, 3163, 18, 659, 18, 8222, 2932, 10026, 4379, 1387, 294, 315, 397, 585, 18, 588, 10368, 743, 10663, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 10121, 1247, 8536, 628, 864, 1577, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b0157fed8ae290d96d96ff0a66f05f81bffecba9
iedadata/geomapapp
haxby/map/MapApp.java
[ "Apache-2.0" ]
Java
addCurrentDBToDisplay
null
public void addCurrentDBToDisplay() { final Database cDB = currentDB; // if (cDB == null) return; SwingUtilities.invokeLater(new Runnable() { public void run() { dbLabel.setText( cDB.getDBName() ); dialog.add( cDB.getSelectionDialog(), "Center"); hPane.setRightComponent( dialogScroll ); if( cDB.getSelectionDialog() != null ) { int w = cDB.getSelectionDialog().getPreferredSize().width; hPane.setDividerLocation( hPane.getSize().width - w -hPane.getDividerSize() ); } if( cDB.getDataDisplay() != null ) { int h = cDB.getDataDisplay().getPreferredSize().height; detach_attachB.setEnabled( h > 50 ); if (attached || h < 50) { //Attaches Tables spreadsheet under the main map. attachDisplay(); } else { detachDisplay(); } } else { detach_attachB.setEnabled(false); } } }); }
// Displays Side bar of current DB
Displays Side bar of current DB
[ "Displays", "Side", "bar", "of", "current", "DB" ]
public void addCurrentDBToDisplay() { final Database cDB = currentDB; SwingUtilities.invokeLater(new Runnable() { public void run() { dbLabel.setText( cDB.getDBName() ); dialog.add( cDB.getSelectionDialog(), "Center"); hPane.setRightComponent( dialogScroll ); if( cDB.getSelectionDialog() != null ) { int w = cDB.getSelectionDialog().getPreferredSize().width; hPane.setDividerLocation( hPane.getSize().width - w -hPane.getDividerSize() ); } if( cDB.getDataDisplay() != null ) { int h = cDB.getDataDisplay().getPreferredSize().height; detach_attachB.setEnabled( h > 50 ); if (attached || h < 50) { attachDisplay(); } else { detachDisplay(); } } else { detach_attachB.setEnabled(false); } } }); }
[ "public", "void", "addCurrentDBToDisplay", "(", ")", "{", "final", "Database", "cDB", "=", "currentDB", ";", "SwingUtilities", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "dbLabel", ".", "setText", "(", "cDB", ".", "getDBName", "(", ")", ")", ";", "dialog", ".", "add", "(", "cDB", ".", "getSelectionDialog", "(", ")", ",", "\"Center\"", ")", ";", "hPane", ".", "setRightComponent", "(", "dialogScroll", ")", ";", "if", "(", "cDB", ".", "getSelectionDialog", "(", ")", "!=", "null", ")", "{", "int", "w", "=", "cDB", ".", "getSelectionDialog", "(", ")", ".", "getPreferredSize", "(", ")", ".", "width", ";", "hPane", ".", "setDividerLocation", "(", "hPane", ".", "getSize", "(", ")", ".", "width", "-", "w", "-", "hPane", ".", "getDividerSize", "(", ")", ")", ";", "}", "if", "(", "cDB", ".", "getDataDisplay", "(", ")", "!=", "null", ")", "{", "int", "h", "=", "cDB", ".", "getDataDisplay", "(", ")", ".", "getPreferredSize", "(", ")", ".", "height", ";", "detach_attachB", ".", "setEnabled", "(", "h", ">", "50", ")", ";", "if", "(", "attached", "||", "h", "<", "50", ")", "{", "attachDisplay", "(", ")", ";", "}", "else", "{", "detachDisplay", "(", ")", ";", "}", "}", "else", "{", "detach_attachB", ".", "setEnabled", "(", "false", ")", ";", "}", "}", "}", ")", ";", "}" ]
Displays Side bar of current DB
[ "Displays", "Side", "bar", "of", "current", "DB" ]
[ "//\tif (cDB == null) return;", "//Attaches Tables spreadsheet under the main map." ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 527, 3935, 2290, 774, 4236, 1435, 288, 203, 202, 202, 6385, 5130, 276, 2290, 273, 783, 2290, 31, 203, 202, 759, 202, 430, 261, 71, 2290, 422, 446, 13, 327, 31, 203, 202, 202, 6050, 310, 11864, 18, 14407, 20607, 12, 2704, 10254, 1435, 288, 203, 1082, 202, 482, 918, 1086, 1435, 288, 203, 9506, 202, 1966, 2224, 18, 542, 1528, 12, 276, 2290, 18, 588, 2290, 461, 1435, 11272, 203, 9506, 202, 12730, 18, 1289, 12, 276, 2290, 18, 588, 6233, 6353, 9334, 315, 8449, 8863, 203, 9506, 202, 76, 8485, 18, 542, 4726, 1841, 12, 6176, 6806, 11272, 203, 203, 9506, 202, 430, 12, 276, 2290, 18, 588, 6233, 6353, 1435, 480, 446, 262, 288, 203, 6862, 202, 474, 341, 273, 276, 2290, 18, 588, 6233, 6353, 7675, 588, 16028, 1225, 7675, 2819, 31, 203, 6862, 202, 76, 8485, 18, 542, 25558, 2735, 12, 366, 8485, 18, 588, 1225, 7675, 2819, 300, 341, 203, 6862, 1082, 202, 17, 76, 8485, 18, 588, 25558, 1225, 1435, 11272, 203, 9506, 202, 97, 203, 203, 9506, 202, 430, 12, 276, 2290, 18, 588, 751, 4236, 1435, 480, 446, 262, 288, 203, 6862, 202, 474, 366, 273, 276, 2290, 18, 588, 751, 4236, 7675, 588, 16028, 1225, 7675, 4210, 31, 203, 6862, 202, 8238, 497, 67, 7331, 38, 18, 542, 1526, 12, 366, 405, 6437, 11272, 203, 203, 6862, 202, 430, 261, 24157, 747, 366, 411, 6437, 13, 288, 203, 25083, 202, 759, 4761, 281, 30536, 30775, 3613, 326, 2774, 852, 18, 203, 25083, 202, 7331, 4236, 5621, 203, 6862, 202, 97, 203, 6862, 202, 12107, 288, 203, 25083, 202, 8238, 497, 4236, 5621, 203, 6862, 202, 97, 203, 9506, 202, 97, 469, 288, 203, 6862, 202, 8238, 497, 67, 7331, 38, 18, 542, 1526, 12, 5743, 1769, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 202, 202, 22938, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 9311, 87, 26248, 4653, 434, 783, 2383, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b0157fed8ae290d96d96ff0a66f05f81bffecba9
iedadata/geomapapp
haxby/map/MapApp.java
[ "Apache-2.0" ]
Java
compareVersions
null
private int compareVersions(String vSoftware, String vServer) { // This will only trigger the Download New Version alert if the // server version is newer than the software version, // but since we may need to backtrack if a release goes bad // best not to use this in release version. if (DEV_MODE) { String[] software = vSoftware.split("\\."); String[] server = vServer.split("\\."); for (int i=0; i<software.length; i++) { int sw = Integer.parseInt(software[i]); int sv = Integer.parseInt(server[i]); if (Integer.compare(sw,sv) != 0) return Integer.compare(sw,sv) ; } } else { //use this line for release version instead. if (!vSoftware.equals(vServer)) return -1; } return 0; }
/* * Compare software version number with version on server */
Compare software version number with version on server
[ "Compare", "software", "version", "number", "with", "version", "on", "server" ]
private int compareVersions(String vSoftware, String vServer) { if (DEV_MODE) { String[] software = vSoftware.split("\\."); String[] server = vServer.split("\\."); for (int i=0; i<software.length; i++) { int sw = Integer.parseInt(software[i]); int sv = Integer.parseInt(server[i]); if (Integer.compare(sw,sv) != 0) return Integer.compare(sw,sv) ; } } else { if (!vSoftware.equals(vServer)) return -1; } return 0; }
[ "private", "int", "compareVersions", "(", "String", "vSoftware", ",", "String", "vServer", ")", "{", "if", "(", "DEV_MODE", ")", "{", "String", "[", "]", "software", "=", "vSoftware", ".", "split", "(", "\"\\\\.\"", ")", ";", "String", "[", "]", "server", "=", "vServer", ".", "split", "(", "\"\\\\.\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "software", ".", "length", ";", "i", "++", ")", "{", "int", "sw", "=", "Integer", ".", "parseInt", "(", "software", "[", "i", "]", ")", ";", "int", "sv", "=", "Integer", ".", "parseInt", "(", "server", "[", "i", "]", ")", ";", "if", "(", "Integer", ".", "compare", "(", "sw", ",", "sv", ")", "!=", "0", ")", "return", "Integer", ".", "compare", "(", "sw", ",", "sv", ")", ";", "}", "}", "else", "{", "if", "(", "!", "vSoftware", ".", "equals", "(", "vServer", ")", ")", "return", "-", "1", ";", "}", "return", "0", ";", "}" ]
Compare software version number with version on server
[ "Compare", "software", "version", "number", "with", "version", "on", "server" ]
[ "// This will only trigger the Download New Version alert if the", "// server version is newer than the software version,", "// but since we may need to backtrack if a release goes bad", "// best not to use this in release version.", "//use this line for release version instead." ]
[ { "param": "vSoftware", "type": "String" }, { "param": "vServer", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "vSoftware", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "vServer", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 509, 3400, 5940, 12, 780, 331, 21742, 16, 514, 331, 2081, 13, 288, 203, 202, 202, 759, 1220, 903, 1338, 3080, 326, 13059, 1166, 4049, 6881, 309, 326, 203, 202, 202, 759, 1438, 1177, 353, 16069, 2353, 326, 17888, 1177, 16, 203, 202, 202, 759, 1496, 3241, 732, 2026, 1608, 358, 1473, 4101, 309, 279, 3992, 13998, 5570, 203, 202, 202, 759, 3796, 486, 358, 999, 333, 316, 3992, 1177, 18, 203, 202, 202, 430, 261, 15301, 67, 7038, 13, 288, 203, 1082, 202, 780, 8526, 17888, 273, 331, 21742, 18, 4939, 2932, 1695, 1199, 1769, 203, 1082, 202, 780, 8526, 1438, 273, 331, 2081, 18, 4939, 2932, 1695, 1199, 1769, 203, 1082, 202, 1884, 261, 474, 277, 33, 20, 31, 277, 32, 9269, 2726, 18, 2469, 31, 277, 27245, 288, 203, 9506, 202, 474, 1352, 273, 2144, 18, 2670, 1702, 12, 9269, 2726, 63, 77, 19226, 203, 9506, 202, 474, 5893, 273, 2144, 18, 2670, 1702, 12, 3567, 63, 77, 19226, 203, 9506, 202, 430, 261, 4522, 18, 9877, 12, 5328, 16, 5751, 13, 480, 374, 13, 327, 2144, 18, 9877, 12, 5328, 16, 5751, 13, 274, 203, 1082, 202, 97, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 759, 1202, 333, 980, 364, 3992, 1177, 3560, 18, 203, 1082, 202, 430, 16051, 90, 21742, 18, 14963, 12, 90, 2081, 3719, 327, 300, 21, 31, 203, 202, 202, 97, 203, 202, 202, 2463, 374, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 11051, 17888, 1177, 1300, 598, 1177, 603, 1438, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d0fe8bd5448c07431f66b4b90dca274f0c60a9ec
iedadata/geomapapp
org/geomapapp/gis/shape/ShapeSuite.java
[ "Apache-2.0" ]
Java
addShapeFile
null
public boolean addShapeFile() throws IOException { getChooser(); boolean multi = chooser.isMultiSelectionEnabled(); chooser.setMultiSelectionEnabled(true); chooser.addChoosableFileFilter(shapeF); int ok = chooser.showOpenDialog(parent); if( ok==chooser.CANCEL_OPTION ) { chooser.setMultiSelectionEnabled(multi); chooser.removeChoosableFileFilter(shapeF); // GMA 1.4.8: Modified version must return boolean return false; } File[] sel = chooser.getSelectedFiles(); for( int k=0 ; k<sel.length ; k++) { addShapeFile(sel[k]); MapApp.sendLogMessage("Shape_File_Imported&name="+sel[k].getName()); } chooser.setMultiSelectionEnabled(multi); chooser.removeChoosableFileFilter(shapeF); // GMA 1.4.8: Modified version must return boolean return true; }
// public void addShapeFile( ) throws IOException {
public void addShapeFile( ) throws IOException {
[ "public", "void", "addShapeFile", "(", ")", "throws", "IOException", "{" ]
public boolean addShapeFile() throws IOException { getChooser(); boolean multi = chooser.isMultiSelectionEnabled(); chooser.setMultiSelectionEnabled(true); chooser.addChoosableFileFilter(shapeF); int ok = chooser.showOpenDialog(parent); if( ok==chooser.CANCEL_OPTION ) { chooser.setMultiSelectionEnabled(multi); chooser.removeChoosableFileFilter(shapeF); return false; } File[] sel = chooser.getSelectedFiles(); for( int k=0 ; k<sel.length ; k++) { addShapeFile(sel[k]); MapApp.sendLogMessage("Shape_File_Imported&name="+sel[k].getName()); } chooser.setMultiSelectionEnabled(multi); chooser.removeChoosableFileFilter(shapeF); return true; }
[ "public", "boolean", "addShapeFile", "(", ")", "throws", "IOException", "{", "getChooser", "(", ")", ";", "boolean", "multi", "=", "chooser", ".", "isMultiSelectionEnabled", "(", ")", ";", "chooser", ".", "setMultiSelectionEnabled", "(", "true", ")", ";", "chooser", ".", "addChoosableFileFilter", "(", "shapeF", ")", ";", "int", "ok", "=", "chooser", ".", "showOpenDialog", "(", "parent", ")", ";", "if", "(", "ok", "==", "chooser", ".", "CANCEL_OPTION", ")", "{", "chooser", ".", "setMultiSelectionEnabled", "(", "multi", ")", ";", "chooser", ".", "removeChoosableFileFilter", "(", "shapeF", ")", ";", "return", "false", ";", "}", "File", "[", "]", "sel", "=", "chooser", ".", "getSelectedFiles", "(", ")", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "sel", ".", "length", ";", "k", "++", ")", "{", "addShapeFile", "(", "sel", "[", "k", "]", ")", ";", "MapApp", ".", "sendLogMessage", "(", "\"Shape_File_Imported&name=\"", "+", "sel", "[", "k", "]", ".", "getName", "(", ")", ")", ";", "}", "chooser", ".", "setMultiSelectionEnabled", "(", "multi", ")", ";", "chooser", ".", "removeChoosableFileFilter", "(", "shapeF", ")", ";", "return", "true", ";", "}" ]
public void addShapeFile( ) throws IOException {
[ "public", "void", "addShapeFile", "(", ")", "throws", "IOException", "{" ]
[ "//\t\t\tGMA 1.4.8: Modified version must return boolean", "//\t\tGMA 1.4.8: Modified version must return boolean" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 527, 8500, 812, 1435, 1216, 1860, 288, 203, 202, 202, 588, 17324, 5621, 203, 202, 202, 6494, 3309, 273, 5011, 13164, 18, 291, 5002, 6233, 1526, 5621, 203, 202, 202, 2599, 13164, 18, 542, 5002, 6233, 1526, 12, 3767, 1769, 203, 202, 202, 2599, 13164, 18, 1289, 9636, 538, 429, 29837, 12, 4867, 42, 1769, 203, 202, 202, 474, 1529, 273, 5011, 13164, 18, 4500, 3678, 6353, 12, 2938, 1769, 203, 202, 202, 430, 12, 1529, 631, 2599, 13164, 18, 25268, 67, 7425, 262, 288, 203, 1082, 202, 2599, 13164, 18, 542, 5002, 6233, 1526, 12, 7027, 1769, 203, 1082, 202, 2599, 13164, 18, 4479, 9636, 538, 429, 29837, 12, 4867, 42, 1769, 203, 203, 759, 1082, 202, 43, 5535, 404, 18, 24, 18, 28, 30, 21154, 1177, 1297, 327, 1250, 203, 1082, 202, 2463, 629, 31, 203, 202, 202, 97, 203, 202, 202, 812, 8526, 357, 273, 5011, 13164, 18, 588, 7416, 2697, 5621, 203, 202, 202, 1884, 12, 509, 417, 33, 20, 274, 417, 32, 1786, 18, 2469, 274, 417, 27245, 288, 203, 1082, 202, 1289, 8500, 812, 12, 1786, 63, 79, 19226, 203, 1082, 202, 863, 3371, 18, 4661, 1343, 1079, 2932, 8500, 67, 812, 67, 24934, 10, 529, 1546, 15, 1786, 63, 79, 8009, 17994, 10663, 203, 202, 202, 97, 203, 202, 202, 2599, 13164, 18, 542, 5002, 6233, 1526, 12, 7027, 1769, 203, 202, 202, 2599, 13164, 18, 4479, 9636, 538, 429, 29837, 12, 4867, 42, 1769, 203, 203, 759, 202, 202, 43, 5535, 404, 18, 24, 18, 28, 30, 21154, 1177, 1297, 327, 1250, 203, 202, 202, 2463, 638, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 202, 482, 918, 527, 8500, 812, 12, 262, 1216, 1860, 288, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
bae93ffe935dc30fe4e8e85d7bb7015ff807fa4c
iedadata/geomapapp
haxby/db/radar/RCruise.java
[ "Apache-2.0" ]
Java
loadLines
null
public RLine[] loadLines(String path) throws IOException { URL url = URLFactory.url( path + id + CHANNEL_CONTROL); DataInputStream in = new DataInputStream(url.openStream()); String s; // Load lines from MCS/cruiseID/nav/mcs_control while( true ) { try { s = in.readUTF(); } catch (EOFException ex) { break; } StringTokenizer st = new StringTokenizer(s); String lineID = st.nextToken(); String cruiseId = st.nextToken(); int nseg = in.readInt(); int npt = in.readInt(); CDP[] cdp = new CDP[npt]; for( int k=0 ; k<npt ; k++ ) { int[] entry = new int[] { in.readInt(), in.readInt(), in.readInt() }; cdp[k] = new CDP( entry[2], (double)(entry[0]*1.e-6), (double)(entry[1]*1.e-6), (long)entry[2], false); } if( !cruiseId.equals( id ) ) continue; RLine line = new RLine( map, this, lineID, cdp ); addLine( line ); } in.close(); // Load bounds from MCS/cruiseID/nav/bounds URL url2 = URLFactory.url( path + id + CHANNEL_BOUNDS); in = new DataInputStream( url2.openStream() ); BufferedReader reader = new BufferedReader( new InputStreamReader( in )); RLine[] lines = getLines(); while( (s=reader.readLine()) != null ) { StringTokenizer st = new StringTokenizer(s); String cruiseId = st.nextToken(); int index = -1; if (! cruiseId.equals(id)) continue; index = -1; String lineId = st.nextToken(); for( int i=0 ; i<lines.length ; i++) { if( lineId.equals( lines[i].getID() )) { index = i; break; } } if( index==-1 ) continue; double[] cdpRange = new double[] { Double.parseDouble( st.nextToken()), Double.parseDouble( st.nextToken()) }; double[] zRange = new double[] { Double.parseDouble( st.nextToken()), Double.parseDouble( st.nextToken()) }; // zRange[1] *= 2; zRange[1] += zRange[0]; lines[index].setRanges( cdpRange, zRange ); } Collections.sort(this.lines, new Comparator<Object>() { public int compare(Object arg0, Object arg1) { String s0 = ((RLine) arg0).lineID; String s1 = ((RLine) arg1).lineID; try { String[] ss0 = s0.split("[^\\d\\.]"); String[] ss1 = s1.split("[^\\d\\.]"); float n0 = Float.parseFloat(ss0[0]); float n1 = Float.parseFloat(ss1[0]); return n0 - n1 < 0 ? -1 : (n0 - n1 == 0 ? 0 : 1); } catch (NumberFormatException ex) { return s0.compareTo(s1); } } }); for (int i = 0; i < lines.length; i++) lines[i].setMap(map); // Add crossings to RLines for( int k=0 ; k<lines.length-1 ; k++) { for( int j=k+1 ; j<lines.length ; j++) { double[] crs = RLine.cross(lines[k], lines[j]); if(crs==null) continue; lines[k].addCrossing( crs[0], crs[1], lines[j] ); lines[j].addCrossing( crs[1], crs[0], lines[k] ); } } setBounds(); return getLines(); }
/*Donald Pomeroy, loads the lines for a cruise, same style as XMCruise Added 9.16.2011*/
Donald Pomeroy, loads the lines for a cruise, same style as XMCruise Added 9.16.2011
[ "Donald", "Pomeroy", "loads", "the", "lines", "for", "a", "cruise", "same", "style", "as", "XMCruise", "Added", "9", ".", "16", ".", "2011" ]
public RLine[] loadLines(String path) throws IOException { URL url = URLFactory.url( path + id + CHANNEL_CONTROL); DataInputStream in = new DataInputStream(url.openStream()); String s; while( true ) { try { s = in.readUTF(); } catch (EOFException ex) { break; } StringTokenizer st = new StringTokenizer(s); String lineID = st.nextToken(); String cruiseId = st.nextToken(); int nseg = in.readInt(); int npt = in.readInt(); CDP[] cdp = new CDP[npt]; for( int k=0 ; k<npt ; k++ ) { int[] entry = new int[] { in.readInt(), in.readInt(), in.readInt() }; cdp[k] = new CDP( entry[2], (double)(entry[0]*1.e-6), (double)(entry[1]*1.e-6), (long)entry[2], false); } if( !cruiseId.equals( id ) ) continue; RLine line = new RLine( map, this, lineID, cdp ); addLine( line ); } in.close(); URL url2 = URLFactory.url( path + id + CHANNEL_BOUNDS); in = new DataInputStream( url2.openStream() ); BufferedReader reader = new BufferedReader( new InputStreamReader( in )); RLine[] lines = getLines(); while( (s=reader.readLine()) != null ) { StringTokenizer st = new StringTokenizer(s); String cruiseId = st.nextToken(); int index = -1; if (! cruiseId.equals(id)) continue; index = -1; String lineId = st.nextToken(); for( int i=0 ; i<lines.length ; i++) { if( lineId.equals( lines[i].getID() )) { index = i; break; } } if( index==-1 ) continue; double[] cdpRange = new double[] { Double.parseDouble( st.nextToken()), Double.parseDouble( st.nextToken()) }; double[] zRange = new double[] { Double.parseDouble( st.nextToken()), Double.parseDouble( st.nextToken()) }; zRange[1] += zRange[0]; lines[index].setRanges( cdpRange, zRange ); } Collections.sort(this.lines, new Comparator<Object>() { public int compare(Object arg0, Object arg1) { String s0 = ((RLine) arg0).lineID; String s1 = ((RLine) arg1).lineID; try { String[] ss0 = s0.split("[^\\d\\.]"); String[] ss1 = s1.split("[^\\d\\.]"); float n0 = Float.parseFloat(ss0[0]); float n1 = Float.parseFloat(ss1[0]); return n0 - n1 < 0 ? -1 : (n0 - n1 == 0 ? 0 : 1); } catch (NumberFormatException ex) { return s0.compareTo(s1); } } }); for (int i = 0; i < lines.length; i++) lines[i].setMap(map); for( int k=0 ; k<lines.length-1 ; k++) { for( int j=k+1 ; j<lines.length ; j++) { double[] crs = RLine.cross(lines[k], lines[j]); if(crs==null) continue; lines[k].addCrossing( crs[0], crs[1], lines[j] ); lines[j].addCrossing( crs[1], crs[0], lines[k] ); } } setBounds(); return getLines(); }
[ "public", "RLine", "[", "]", "loadLines", "(", "String", "path", ")", "throws", "IOException", "{", "URL", "url", "=", "URLFactory", ".", "url", "(", "path", "+", "id", "+", "CHANNEL_CONTROL", ")", ";", "DataInputStream", "in", "=", "new", "DataInputStream", "(", "url", ".", "openStream", "(", ")", ")", ";", "String", "s", ";", "while", "(", "true", ")", "{", "try", "{", "s", "=", "in", ".", "readUTF", "(", ")", ";", "}", "catch", "(", "EOFException", "ex", ")", "{", "break", ";", "}", "StringTokenizer", "st", "=", "new", "StringTokenizer", "(", "s", ")", ";", "String", "lineID", "=", "st", ".", "nextToken", "(", ")", ";", "String", "cruiseId", "=", "st", ".", "nextToken", "(", ")", ";", "int", "nseg", "=", "in", ".", "readInt", "(", ")", ";", "int", "npt", "=", "in", ".", "readInt", "(", ")", ";", "CDP", "[", "]", "cdp", "=", "new", "CDP", "[", "npt", "]", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "npt", ";", "k", "++", ")", "{", "int", "[", "]", "entry", "=", "new", "int", "[", "]", "{", "in", ".", "readInt", "(", ")", ",", "in", ".", "readInt", "(", ")", ",", "in", ".", "readInt", "(", ")", "}", ";", "cdp", "[", "k", "]", "=", "new", "CDP", "(", "entry", "[", "2", "]", ",", "(", "double", ")", "(", "entry", "[", "0", "]", "*", "1.e-6", ")", ",", "(", "double", ")", "(", "entry", "[", "1", "]", "*", "1.e-6", ")", ",", "(", "long", ")", "entry", "[", "2", "]", ",", "false", ")", ";", "}", "if", "(", "!", "cruiseId", ".", "equals", "(", "id", ")", ")", "continue", ";", "RLine", "line", "=", "new", "RLine", "(", "map", ",", "this", ",", "lineID", ",", "cdp", ")", ";", "addLine", "(", "line", ")", ";", "}", "in", ".", "close", "(", ")", ";", "URL", "url2", "=", "URLFactory", ".", "url", "(", "path", "+", "id", "+", "CHANNEL_BOUNDS", ")", ";", "in", "=", "new", "DataInputStream", "(", "url2", ".", "openStream", "(", ")", ")", ";", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "in", ")", ")", ";", "RLine", "[", "]", "lines", "=", "getLines", "(", ")", ";", "while", "(", "(", "s", "=", "reader", ".", "readLine", "(", ")", ")", "!=", "null", ")", "{", "StringTokenizer", "st", "=", "new", "StringTokenizer", "(", "s", ")", ";", "String", "cruiseId", "=", "st", ".", "nextToken", "(", ")", ";", "int", "index", "=", "-", "1", ";", "if", "(", "!", "cruiseId", ".", "equals", "(", "id", ")", ")", "continue", ";", "index", "=", "-", "1", ";", "String", "lineId", "=", "st", ".", "nextToken", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "lines", ".", "length", ";", "i", "++", ")", "{", "if", "(", "lineId", ".", "equals", "(", "lines", "[", "i", "]", ".", "getID", "(", ")", ")", ")", "{", "index", "=", "i", ";", "break", ";", "}", "}", "if", "(", "index", "==", "-", "1", ")", "continue", ";", "double", "[", "]", "cdpRange", "=", "new", "double", "[", "]", "{", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", ",", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", "}", ";", "double", "[", "]", "zRange", "=", "new", "double", "[", "]", "{", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", ",", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", "}", ";", "zRange", "[", "1", "]", "+=", "zRange", "[", "0", "]", ";", "lines", "[", "index", "]", ".", "setRanges", "(", "cdpRange", ",", "zRange", ")", ";", "}", "Collections", ".", "sort", "(", "this", ".", "lines", ",", "new", "Comparator", "<", "Object", ">", "(", ")", "{", "public", "int", "compare", "(", "Object", "arg0", ",", "Object", "arg1", ")", "{", "String", "s0", "=", "(", "(", "RLine", ")", "arg0", ")", ".", "lineID", ";", "String", "s1", "=", "(", "(", "RLine", ")", "arg1", ")", ".", "lineID", ";", "try", "{", "String", "[", "]", "ss0", "=", "s0", ".", "split", "(", "\"[^\\\\d\\\\.]\"", ")", ";", "String", "[", "]", "ss1", "=", "s1", ".", "split", "(", "\"[^\\\\d\\\\.]\"", ")", ";", "float", "n0", "=", "Float", ".", "parseFloat", "(", "ss0", "[", "0", "]", ")", ";", "float", "n1", "=", "Float", ".", "parseFloat", "(", "ss1", "[", "0", "]", ")", ";", "return", "n0", "-", "n1", "<", "0", "?", "-", "1", ":", "(", "n0", "-", "n1", "==", "0", "?", "0", ":", "1", ")", ";", "}", "catch", "(", "NumberFormatException", "ex", ")", "{", "return", "s0", ".", "compareTo", "(", "s1", ")", ";", "}", "}", "}", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "lines", ".", "length", ";", "i", "++", ")", "lines", "[", "i", "]", ".", "setMap", "(", "map", ")", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "lines", ".", "length", "-", "1", ";", "k", "++", ")", "{", "for", "(", "int", "j", "=", "k", "+", "1", ";", "j", "<", "lines", ".", "length", ";", "j", "++", ")", "{", "double", "[", "]", "crs", "=", "RLine", ".", "cross", "(", "lines", "[", "k", "]", ",", "lines", "[", "j", "]", ")", ";", "if", "(", "crs", "==", "null", ")", "continue", ";", "lines", "[", "k", "]", ".", "addCrossing", "(", "crs", "[", "0", "]", ",", "crs", "[", "1", "]", ",", "lines", "[", "j", "]", ")", ";", "lines", "[", "j", "]", ".", "addCrossing", "(", "crs", "[", "1", "]", ",", "crs", "[", "0", "]", ",", "lines", "[", "k", "]", ")", ";", "}", "}", "setBounds", "(", ")", ";", "return", "getLines", "(", ")", ";", "}" ]
Donald Pomeroy, loads the lines for a cruise, same style as XMCruise Added 9.16.2011
[ "Donald", "Pomeroy", "loads", "the", "lines", "for", "a", "cruise", "same", "style", "as", "XMCruise", "Added", "9", ".", "16", ".", "2011" ]
[ "// Load lines from MCS/cruiseID/nav/mcs_control", "// Load bounds from MCS/cruiseID/nav/bounds", "//\t\tzRange[1] *= 2;", "// Add crossings to RLines" ]
[ { "param": "path", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "path", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 534, 1670, 8526, 1262, 5763, 12, 780, 589, 13, 1216, 1860, 288, 203, 202, 1785, 880, 273, 1976, 1733, 18, 718, 12, 589, 397, 612, 397, 27417, 67, 18248, 1769, 203, 202, 751, 4348, 316, 273, 394, 29382, 12, 718, 18, 3190, 1228, 10663, 203, 202, 780, 272, 31, 203, 203, 202, 759, 4444, 2362, 628, 490, 4596, 19, 3353, 89, 784, 734, 19, 11589, 19, 81, 2143, 67, 7098, 203, 202, 17523, 12, 638, 262, 288, 203, 202, 202, 698, 288, 203, 1082, 202, 87, 273, 316, 18, 896, 5159, 5621, 203, 202, 202, 97, 1044, 261, 12706, 503, 431, 13, 288, 203, 1082, 202, 8820, 31, 203, 202, 202, 97, 203, 202, 202, 780, 10524, 384, 273, 394, 16370, 12, 87, 1769, 203, 202, 202, 780, 980, 734, 273, 384, 18, 4285, 1345, 5621, 203, 202, 202, 780, 4422, 89, 784, 548, 273, 384, 18, 4285, 1345, 5621, 203, 203, 202, 202, 474, 290, 5680, 273, 316, 18, 896, 1702, 5621, 203, 202, 202, 474, 290, 337, 273, 316, 18, 896, 1702, 5621, 203, 202, 202, 39, 8640, 8526, 7976, 84, 273, 394, 385, 8640, 63, 82, 337, 15533, 203, 202, 202, 1884, 12, 509, 417, 33, 20, 274, 417, 32, 82, 337, 274, 417, 9904, 262, 288, 203, 1082, 202, 474, 8526, 1241, 273, 394, 509, 8526, 288, 203, 9506, 202, 267, 18, 896, 1702, 9334, 203, 9506, 202, 267, 18, 896, 1702, 9334, 203, 9506, 202, 267, 18, 896, 1702, 1435, 289, 31, 203, 1082, 202, 4315, 84, 63, 79, 65, 273, 394, 385, 8640, 12, 1241, 63, 22, 6487, 203, 9506, 202, 12, 9056, 21433, 4099, 63, 20, 5772, 21, 18, 73, 17, 26, 3631, 203, 9506, 202, 12, 9056, 21433, 4099, 63, 21, 5772, 21, 18, 73, 17, 26, 3631, 203, 9506, 202, 12, 5748, 13, 4099, 63, 22, 6487, 629, 1769, 203, 202, 202, 97, 203, 202, 202, 430, 12, 401, 3353, 89, 784, 548, 18, 14963, 12, 612, 262, 262, 203, 1082, 202, 17143, 31, 203, 203, 202, 202, 54, 1670, 980, 273, 394, 534, 1670, 12, 852, 16, 333, 16, 980, 734, 16, 7976, 84, 11272, 203, 202, 202, 1289, 1670, 12, 980, 11272, 203, 202, 97, 203, 202, 267, 18, 4412, 5621, 203, 203, 202, 759, 4444, 4972, 628, 490, 4596, 19, 3353, 89, 784, 734, 19, 11589, 19, 10576, 203, 202, 203, 202, 1785, 880, 22, 273, 1976, 1733, 18, 718, 12, 589, 397, 612, 397, 27417, 67, 5315, 2124, 3948, 1769, 203, 202, 267, 273, 394, 29382, 12, 880, 22, 18, 3190, 1228, 1435, 11272, 203, 202, 17947, 2514, 2949, 273, 394, 10633, 12, 203, 1082, 202, 2704, 15322, 12, 316, 262, 1769, 203, 203, 202, 54, 1670, 8526, 2362, 273, 336, 5763, 5621, 203, 202, 17523, 12, 261, 87, 33, 10530, 18, 896, 1670, 10756, 480, 446, 262, 288, 203, 202, 202, 780, 10524, 384, 273, 394, 16370, 12, 87, 1769, 203, 202, 202, 780, 4422, 89, 784, 548, 273, 384, 18, 4285, 1345, 5621, 203, 202, 202, 474, 770, 273, 300, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 20308, 40, 9528, 72, 453, 362, 2439, 93, 16, 6277, 326, 2362, 364, 279, 4422, 89, 784, 16, 1967, 2154, 487, 1139, 20022, 8653, 784, 25808, 2468, 18, 2313, 18, 6734, 21, 5549, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6731a0456d0b298fe13c3f751cfb04bc85d7f14
iedadata/geomapapp
haxby/db/custom/UnknownDataSet.java
[ "Apache-2.0" ]
Java
exportChecks
null
private boolean exportChecks(String saveOption) { if (isEdited()) { int numEdited = countEditedRows(); String changedRowsTxt = (numEdited == 1) ? " row has" : " rows have"; int c=JOptionPane.showConfirmDialog(null, "Table has been edited.\n" + numEdited + changedRowsTxt + " been changed.\nConfirm Save.", "Edited Table", JOptionPane.YES_NO_OPTION); if (c==JOptionPane.NO_OPTION) return false; } if (saveOption.equals("selection")) { // 1.5.10 Check if anything is selected if (dataT.getSelectedRowCount() == 0) { JOptionPane.showMessageDialog(null, "No data selected for export", "No Selection", JOptionPane.ERROR_MESSAGE); return false; } } else if (saveOption.equals("plottable")) { //check that there are plottable rows if (getPlottableRows().length == 0) { JOptionPane.showMessageDialog(null, "No plotted data available for export", "No Selection", JOptionPane.ERROR_MESSAGE); return false; } } return true; }
//standard checks on the data to be exported that apply to all output types
standard checks on the data to be exported that apply to all output types
[ "standard", "checks", "on", "the", "data", "to", "be", "exported", "that", "apply", "to", "all", "output", "types" ]
private boolean exportChecks(String saveOption) { if (isEdited()) { int numEdited = countEditedRows(); String changedRowsTxt = (numEdited == 1) ? " row has" : " rows have"; int c=JOptionPane.showConfirmDialog(null, "Table has been edited.\n" + numEdited + changedRowsTxt + " been changed.\nConfirm Save.", "Edited Table", JOptionPane.YES_NO_OPTION); if (c==JOptionPane.NO_OPTION) return false; } if (saveOption.equals("selection")) { if (dataT.getSelectedRowCount() == 0) { JOptionPane.showMessageDialog(null, "No data selected for export", "No Selection", JOptionPane.ERROR_MESSAGE); return false; } } else if (saveOption.equals("plottable")) { if (getPlottableRows().length == 0) { JOptionPane.showMessageDialog(null, "No plotted data available for export", "No Selection", JOptionPane.ERROR_MESSAGE); return false; } } return true; }
[ "private", "boolean", "exportChecks", "(", "String", "saveOption", ")", "{", "if", "(", "isEdited", "(", ")", ")", "{", "int", "numEdited", "=", "countEditedRows", "(", ")", ";", "String", "changedRowsTxt", "=", "(", "numEdited", "==", "1", ")", "?", "\" row has\"", ":", "\" rows have\"", ";", "int", "c", "=", "JOptionPane", ".", "showConfirmDialog", "(", "null", ",", "\"Table has been edited.\\n\"", "+", "numEdited", "+", "changedRowsTxt", "+", "\" been changed.\\nConfirm Save.\"", ",", "\"Edited Table\"", ",", "JOptionPane", ".", "YES_NO_OPTION", ")", ";", "if", "(", "c", "==", "JOptionPane", ".", "NO_OPTION", ")", "return", "false", ";", "}", "if", "(", "saveOption", ".", "equals", "(", "\"selection\"", ")", ")", "{", "if", "(", "dataT", ".", "getSelectedRowCount", "(", ")", "==", "0", ")", "{", "JOptionPane", ".", "showMessageDialog", "(", "null", ",", "\"No data selected for export\"", ",", "\"No Selection\"", ",", "JOptionPane", ".", "ERROR_MESSAGE", ")", ";", "return", "false", ";", "}", "}", "else", "if", "(", "saveOption", ".", "equals", "(", "\"plottable\"", ")", ")", "{", "if", "(", "getPlottableRows", "(", ")", ".", "length", "==", "0", ")", "{", "JOptionPane", ".", "showMessageDialog", "(", "null", ",", "\"No plotted data available for export\"", ",", "\"No Selection\"", ",", "JOptionPane", ".", "ERROR_MESSAGE", ")", ";", "return", "false", ";", "}", "}", "return", "true", ";", "}" ]
standard checks on the data to be exported that apply to all output types
[ "standard", "checks", "on", "the", "data", "to", "be", "exported", "that", "apply", "to", "all", "output", "types" ]
[ "// 1.5.10 Check if anything is selected\r", "//check that there are plottable rows\r" ]
[ { "param": "saveOption", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "saveOption", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 1250, 3359, 4081, 12, 780, 1923, 1895, 13, 288, 206, 203, 202, 202, 430, 261, 291, 4666, 329, 10756, 288, 206, 203, 1082, 202, 474, 818, 4666, 329, 273, 1056, 4666, 329, 4300, 5621, 206, 203, 1082, 202, 780, 3550, 4300, 21811, 273, 261, 2107, 4666, 329, 422, 404, 13, 692, 315, 1027, 711, 6, 294, 315, 2595, 1240, 14432, 206, 203, 1082, 202, 474, 276, 33, 46, 1895, 8485, 18, 4500, 11269, 6353, 12, 2011, 16, 315, 1388, 711, 2118, 18532, 8403, 82, 6, 397, 9760, 203, 6862, 202, 2107, 4666, 329, 397, 3550, 4300, 21811, 397, 315, 2118, 3550, 8403, 82, 11269, 7074, 1199, 16, 315, 4666, 329, 3555, 3113, 804, 1895, 8485, 18, 29081, 67, 3417, 67, 7425, 1769, 206, 203, 1082, 202, 430, 261, 71, 631, 46, 1895, 8485, 18, 3417, 67, 7425, 13, 327, 629, 31, 206, 203, 202, 202, 97, 206, 203, 202, 202, 430, 261, 5688, 1895, 18, 14963, 2932, 10705, 6, 3719, 288, 206, 203, 1082, 202, 759, 404, 18, 25, 18, 2163, 2073, 309, 6967, 353, 3170, 206, 203, 1082, 202, 430, 261, 892, 56, 18, 588, 7416, 26359, 1435, 422, 374, 13, 288, 206, 203, 9506, 202, 46, 1895, 8485, 18, 4500, 1079, 6353, 12, 2011, 16, 315, 2279, 501, 3170, 364, 3359, 3113, 315, 2279, 12977, 3113, 804, 1895, 8485, 18, 3589, 67, 8723, 1769, 206, 203, 9506, 202, 2463, 629, 31, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 469, 309, 261, 5688, 1895, 18, 14963, 2932, 4032, 2121, 6, 3719, 288, 206, 203, 1082, 202, 759, 1893, 716, 1915, 854, 3207, 2121, 2595, 206, 203, 1082, 202, 430, 261, 588, 11532, 2121, 4300, 7675, 2469, 422, 374, 13, 288, 206, 203, 9506, 202, 46, 1895, 8485, 18, 4500, 1079, 6353, 12, 2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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 10005, 4271, 603, 326, 501, 358, 506, 11518, 716, 2230, 358, 777, 876, 1953, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6731a0456d0b298fe13c3f751cfb04bc85d7f14
iedadata/geomapapp
haxby/db/custom/UnknownDataSet.java
[ "Apache-2.0" ]
Java
exportExcel
null
public void exportExcel(String saveOption){ //run standard checks before exporting if (!exportChecks(saveOption)) return; JFileChooser jfc = new JFileChooser(System.getProperty("user.home")); ExcelFileFilter eff = new ExcelFileFilter(); jfc.setFileFilter(eff); String defaultName = desc.name.replace(":", "").replace(",", "") + ".xls"; defaultName = defaultName.replace("Data Table ", "").replace(" ", "_"); File f=new File(defaultName); jfc.setSelectedFile(f); do { int c = jfc.showSaveDialog(null); if (c==JFileChooser.CANCEL_OPTION||c==JFileChooser.ERROR_OPTION) return; f = jfc.getSelectedFile(); if (f.exists()) { c=JOptionPane.showConfirmDialog(null, "File Already Exists\nConfirm Overwrite"); if (c==JOptionPane.OK_OPTION) break; if (c==JOptionPane.CANCEL_OPTION) return; } } while (f.exists()); final File saveTo = f; MapApp app = ((MapApp) map.getApp()); app.addProcessingTask("Saving Data Table...", new Runnable() { public void run() { try { WritableWorkbook wb = Workbook.createWorkbook(saveTo); WritableSheet sheet = wb.createSheet("First Sheet", 0); //don't include Plot column for (int i=1;i<dataT.getColumnCount();i++) sheet.addCell( new Label(i-1,0,dataT.getColumnName(i)) ); int[] ind; if (saveOption.equals("selection")) { ind = dataT.getSelectedRows(); } else if (saveOption.equals("plottable")) { ind = getPlottableRows(); } else { ind = new int[dataT.getRowCount()]; for (int i=0; i<dataT.getRowCount(); i++) ind[i] = i; } for (int i=0;i<ind.length;i++) { for (int j=1; j<dataT.getColumnCount();j++) { Object o = dataT.getValueAt(ind[i], j); if (o instanceof String && ((String)o).equals("NaN")) o = ""; sheet.addCell( new Label(j-1,i+1,o.toString()) ); } } wb.write(); wb.close(); MapApp.sendLogMessage("Saving_or_Downloading&table="+desc.name.replace("Data Table: ", "")+"&saveOption="+saveOption+"&fmt=excel"); } catch(Exception ex) { JOptionPane.showMessageDialog(map.getTopLevelAncestor(), "an error occurred during this operation:\t" + " "+ ex.getMessage()); } } }); }
// Exports viewable items in the data table to excel format file .xls
Exports viewable items in the data table to excel format file .xls
[ "Exports", "viewable", "items", "in", "the", "data", "table", "to", "excel", "format", "file", ".", "xls" ]
public void exportExcel(String saveOption){ if (!exportChecks(saveOption)) return; JFileChooser jfc = new JFileChooser(System.getProperty("user.home")); ExcelFileFilter eff = new ExcelFileFilter(); jfc.setFileFilter(eff); String defaultName = desc.name.replace(":", "").replace(",", "") + ".xls"; defaultName = defaultName.replace("Data Table ", "").replace(" ", "_"); File f=new File(defaultName); jfc.setSelectedFile(f); do { int c = jfc.showSaveDialog(null); if (c==JFileChooser.CANCEL_OPTION||c==JFileChooser.ERROR_OPTION) return; f = jfc.getSelectedFile(); if (f.exists()) { c=JOptionPane.showConfirmDialog(null, "File Already Exists\nConfirm Overwrite"); if (c==JOptionPane.OK_OPTION) break; if (c==JOptionPane.CANCEL_OPTION) return; } } while (f.exists()); final File saveTo = f; MapApp app = ((MapApp) map.getApp()); app.addProcessingTask("Saving Data Table...", new Runnable() { public void run() { try { WritableWorkbook wb = Workbook.createWorkbook(saveTo); WritableSheet sheet = wb.createSheet("First Sheet", 0); for (int i=1;i<dataT.getColumnCount();i++) sheet.addCell( new Label(i-1,0,dataT.getColumnName(i)) ); int[] ind; if (saveOption.equals("selection")) { ind = dataT.getSelectedRows(); } else if (saveOption.equals("plottable")) { ind = getPlottableRows(); } else { ind = new int[dataT.getRowCount()]; for (int i=0; i<dataT.getRowCount(); i++) ind[i] = i; } for (int i=0;i<ind.length;i++) { for (int j=1; j<dataT.getColumnCount();j++) { Object o = dataT.getValueAt(ind[i], j); if (o instanceof String && ((String)o).equals("NaN")) o = ""; sheet.addCell( new Label(j-1,i+1,o.toString()) ); } } wb.write(); wb.close(); MapApp.sendLogMessage("Saving_or_Downloading&table="+desc.name.replace("Data Table: ", "")+"&saveOption="+saveOption+"&fmt=excel"); } catch(Exception ex) { JOptionPane.showMessageDialog(map.getTopLevelAncestor(), "an error occurred during this operation:\t" + " "+ ex.getMessage()); } } }); }
[ "public", "void", "exportExcel", "(", "String", "saveOption", ")", "{", "if", "(", "!", "exportChecks", "(", "saveOption", ")", ")", "return", ";", "JFileChooser", "jfc", "=", "new", "JFileChooser", "(", "System", ".", "getProperty", "(", "\"user.home\"", ")", ")", ";", "ExcelFileFilter", "eff", "=", "new", "ExcelFileFilter", "(", ")", ";", "jfc", ".", "setFileFilter", "(", "eff", ")", ";", "String", "defaultName", "=", "desc", ".", "name", ".", "replace", "(", "\":\"", ",", "\"\"", ")", ".", "replace", "(", "\",\"", ",", "\"\"", ")", "+", "\".xls\"", ";", "defaultName", "=", "defaultName", ".", "replace", "(", "\"Data Table \"", ",", "\"\"", ")", ".", "replace", "(", "\" \"", ",", "\"_\"", ")", ";", "File", "f", "=", "new", "File", "(", "defaultName", ")", ";", "jfc", ".", "setSelectedFile", "(", "f", ")", ";", "do", "{", "int", "c", "=", "jfc", ".", "showSaveDialog", "(", "null", ")", ";", "if", "(", "c", "==", "JFileChooser", ".", "CANCEL_OPTION", "||", "c", "==", "JFileChooser", ".", "ERROR_OPTION", ")", "return", ";", "f", "=", "jfc", ".", "getSelectedFile", "(", ")", ";", "if", "(", "f", ".", "exists", "(", ")", ")", "{", "c", "=", "JOptionPane", ".", "showConfirmDialog", "(", "null", ",", "\"File Already Exists\\nConfirm Overwrite\"", ")", ";", "if", "(", "c", "==", "JOptionPane", ".", "OK_OPTION", ")", "break", ";", "if", "(", "c", "==", "JOptionPane", ".", "CANCEL_OPTION", ")", "return", ";", "}", "}", "while", "(", "f", ".", "exists", "(", ")", ")", ";", "final", "File", "saveTo", "=", "f", ";", "MapApp", "app", "=", "(", "(", "MapApp", ")", "map", ".", "getApp", "(", ")", ")", ";", "app", ".", "addProcessingTask", "(", "\"Saving Data Table...\"", ",", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "try", "{", "WritableWorkbook", "wb", "=", "Workbook", ".", "createWorkbook", "(", "saveTo", ")", ";", "WritableSheet", "sheet", "=", "wb", ".", "createSheet", "(", "\"First Sheet\"", ",", "0", ")", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "dataT", ".", "getColumnCount", "(", ")", ";", "i", "++", ")", "sheet", ".", "addCell", "(", "new", "Label", "(", "i", "-", "1", ",", "0", ",", "dataT", ".", "getColumnName", "(", "i", ")", ")", ")", ";", "int", "[", "]", "ind", ";", "if", "(", "saveOption", ".", "equals", "(", "\"selection\"", ")", ")", "{", "ind", "=", "dataT", ".", "getSelectedRows", "(", ")", ";", "}", "else", "if", "(", "saveOption", ".", "equals", "(", "\"plottable\"", ")", ")", "{", "ind", "=", "getPlottableRows", "(", ")", ";", "}", "else", "{", "ind", "=", "new", "int", "[", "dataT", ".", "getRowCount", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "dataT", ".", "getRowCount", "(", ")", ";", "i", "++", ")", "ind", "[", "i", "]", "=", "i", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ind", ".", "length", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "1", ";", "j", "<", "dataT", ".", "getColumnCount", "(", ")", ";", "j", "++", ")", "{", "Object", "o", "=", "dataT", ".", "getValueAt", "(", "ind", "[", "i", "]", ",", "j", ")", ";", "if", "(", "o", "instanceof", "String", "&&", "(", "(", "String", ")", "o", ")", ".", "equals", "(", "\"NaN\"", ")", ")", "o", "=", "\"\"", ";", "sheet", ".", "addCell", "(", "new", "Label", "(", "j", "-", "1", ",", "i", "+", "1", ",", "o", ".", "toString", "(", ")", ")", ")", ";", "}", "}", "wb", ".", "write", "(", ")", ";", "wb", ".", "close", "(", ")", ";", "MapApp", ".", "sendLogMessage", "(", "\"Saving_or_Downloading&table=\"", "+", "desc", ".", "name", ".", "replace", "(", "\"Data Table: \"", ",", "\"\"", ")", "+", "\"&saveOption=\"", "+", "saveOption", "+", "\"&fmt=excel\"", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", "JOptionPane", ".", "showMessageDialog", "(", "map", ".", "getTopLevelAncestor", "(", ")", ",", "\"an error occurred during this operation:\\t\"", "+", "\" \"", "+", "ex", ".", "getMessage", "(", ")", ")", ";", "}", "}", "}", ")", ";", "}" ]
Exports viewable items in the data table to excel format file .xls
[ "Exports", "viewable", "items", "in", "the", "data", "table", "to", "excel", "format", "file", ".", "xls" ]
[ "//run standard checks before exporting\r", "//don't include Plot column\r" ]
[ { "param": "saveOption", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "saveOption", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 3359, 7177, 12, 780, 1923, 1895, 15329, 206, 203, 202, 202, 759, 2681, 4529, 4271, 1865, 3359, 310, 206, 203, 202, 202, 430, 16051, 6530, 4081, 12, 5688, 1895, 3719, 327, 31, 206, 203, 1082, 206, 203, 202, 202, 46, 812, 17324, 525, 7142, 273, 394, 804, 812, 17324, 12, 3163, 18, 588, 1396, 2932, 1355, 18, 8712, 7923, 1769, 206, 203, 202, 202, 7177, 29837, 16419, 273, 394, 17674, 29837, 5621, 206, 203, 202, 202, 78, 7142, 18, 542, 29837, 12, 17098, 1769, 206, 203, 202, 202, 780, 805, 461, 273, 3044, 18, 529, 18, 2079, 2932, 2773, 16, 1408, 2934, 2079, 2932, 16, 3113, 1408, 13, 397, 3552, 92, 3251, 14432, 206, 203, 202, 202, 1886, 461, 273, 805, 461, 18, 2079, 2932, 751, 3555, 3104, 1408, 2934, 2079, 2932, 3104, 8802, 1769, 206, 203, 202, 202, 812, 284, 33, 2704, 1387, 12, 1886, 461, 1769, 206, 203, 202, 202, 78, 7142, 18, 542, 7416, 812, 12, 74, 1769, 206, 203, 202, 202, 2896, 288, 206, 203, 1082, 202, 474, 276, 273, 525, 7142, 18, 4500, 4755, 6353, 12, 2011, 1769, 206, 203, 1082, 202, 430, 261, 71, 631, 46, 812, 17324, 18, 25268, 67, 7425, 20081, 71, 631, 46, 812, 17324, 18, 3589, 67, 7425, 13, 327, 31, 206, 203, 1082, 202, 74, 273, 525, 7142, 18, 588, 7416, 812, 5621, 206, 203, 1082, 202, 430, 261, 74, 18, 1808, 10756, 288, 206, 203, 9506, 202, 71, 33, 46, 1895, 8485, 18, 4500, 11269, 6353, 12, 2011, 16, 315, 812, 17009, 17277, 64, 82, 11269, 29747, 8863, 206, 203, 9506, 202, 430, 261, 71, 631, 46, 1895, 8485, 18, 3141, 67, 7425, 13, 898, 31, 206, 203, 9506, 202, 430, 261, 71, 631, 46, 1895, 8485, 18, 25268, 67, 7425, 13, 327, 31, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 1323, 261, 74, 18, 1808, 10663, 206, 203, 206, 203, 202, 202, 6385, 1387, 1923, 774, 273, 284, 31, 206, 203, 202, 202, 863, 3371, 595, 273, 14015, 863, 3371, 13, 852, 18, 588, 3371, 10663, 206, 203, 202, 202, 2910, 18, 1289, 7798, 2174, 2932, 24660, 1910, 3555, 7070, 16, 394, 10254, 1435, 288, 206, 203, 1082, 202, 482, 918, 1086, 1435, 288, 206, 203, 9506, 202, 698, 288, 9760, 203, 6862, 202, 12061, 23345, 17298, 273, 4147, 3618, 18, 2640, 23345, 12, 5688, 774, 1769, 206, 203, 6862, 202, 12061, 8229, 6202, 273, 17298, 18, 2640, 8229, 2932, 3759, 18707, 3113, 374, 1769, 206, 203, 6862, 202, 759, 19752, 1404, 2341, 15211, 1057, 206, 203, 6862, 202, 1884, 261, 474, 277, 33, 21, 31, 77, 32, 892, 56, 18, 588, 1494, 1380, 5621, 77, 27245, 206, 203, 25083, 202, 8118, 18, 1289, 4020, 12, 394, 5287, 12, 77, 17, 21, 16, 20, 16, 892, 56, 18, 588, 8516, 12, 77, 3719, 11272, 206, 203, 25083, 206, 203, 6862, 202, 474, 8526, 1547, 31, 206, 203, 6862, 202, 430, 261, 5688, 1895, 18, 14963, 2932, 10705, 6, 3719, 288, 206, 203, 25083, 202, 728, 273, 501, 56, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 759, 1312, 4363, 1476, 429, 1516, 316, 326, 501, 1014, 358, 22011, 740, 585, 263, 92, 3251, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6731a0456d0b298fe13c3f751cfb04bc85d7f14
iedadata/geomapapp
haxby/db/custom/UnknownDataSet.java
[ "Apache-2.0" ]
Java
exportExcelXLSX
null
public void exportExcelXLSX(String saveOption){ //run standard checks before exporting if (!exportChecks(saveOption)) return; JFileChooser jfc = new JFileChooser(System.getProperty("user.home")); ExcelFileFilter eff = new ExcelFileFilter(); jfc.setFileFilter(eff); String defaultName = desc.name.replace(":", "").replace(",", "") + ".xlsx"; defaultName = defaultName.replace("Data Table ", "").replace(" ", "_"); File f=new File(defaultName); jfc.setSelectedFile(f); do { int c = jfc.showSaveDialog(null); if (c==JFileChooser.CANCEL_OPTION||c==JFileChooser.ERROR_OPTION) return; f = jfc.getSelectedFile(); if (f.exists()) { c=JOptionPane.showConfirmDialog(null, "File Already Exists\nConfirm Overwrite"); if (c==JOptionPane.OK_OPTION)break; if (c==JOptionPane.CANCEL_OPTION) return; } } while (f.exists()); final File saveTo = f; MapApp app = ((MapApp) map.getApp()); app.addProcessingTask("Saving Data Table...", new Runnable() { public void run() { try { if (!saveTo.getName().endsWith(".xlsx")){ System.out.println(saveTo.getName()); JOptionPane.showMessageDialog(null, "Save did not complete. Must end in .xlsx. Try again."); }else{ SXSSFWorkbook xlsxWB = new SXSSFWorkbook(); SXSSFSheet xlsxSheet1 = xlsxWB.createSheet("First Sheet"); SXSSFRow row = null; int[] ind; if (saveOption.equals("selection")) { ind = dataT.getSelectedRows(); } else if (saveOption.equals("plottable")) { ind = getPlottableRows(); } else { ind = new int[dataT.getRowCount()]; for (int i=0; i<dataT.getRowCount(); i++) ind[i] = i; } int xlsxCol = dataT.getColumnCount(); row = xlsxSheet1.createRow((0)); //don't include Plot column for (int c=1; c<xlsxCol; c++){ String columnName = dataT.getColumnName(c); row.createCell(c-1).setCellValue(columnName); } Object o = null; for (int r=1; r<=ind.length; r++){ row = xlsxSheet1.createRow((r)); for (int c=1; c<xlsxCol; c++){ o = dataT.getValueAt(ind[r-1], c); if(!(o instanceof String)) continue; if (((String)o).equals("NaN")){ o = ""; } row.createCell(c-1).setCellValue((String)o); } } FileOutputStream xlsxOut = new FileOutputStream(saveTo); xlsxWB.write(xlsxOut); xlsxOut.close(); xlsxWB.close(); MapApp.sendLogMessage("Saving_or_Downloading&table="+desc.name.replace("Data Table: ", "")+"&saveOption="+saveOption+"&fmt=excelxlsx"); } } catch(Exception ex) { JOptionPane.showMessageDialog(map.getTopLevelAncestor(), "an error occurred during this operation:\t" + " "+ ex.getMessage()); } } }); }
// Exports viewable items in the data table to excel format file .xlsx
Exports viewable items in the data table to excel format file .xlsx
[ "Exports", "viewable", "items", "in", "the", "data", "table", "to", "excel", "format", "file", ".", "xlsx" ]
public void exportExcelXLSX(String saveOption){ if (!exportChecks(saveOption)) return; JFileChooser jfc = new JFileChooser(System.getProperty("user.home")); ExcelFileFilter eff = new ExcelFileFilter(); jfc.setFileFilter(eff); String defaultName = desc.name.replace(":", "").replace(",", "") + ".xlsx"; defaultName = defaultName.replace("Data Table ", "").replace(" ", "_"); File f=new File(defaultName); jfc.setSelectedFile(f); do { int c = jfc.showSaveDialog(null); if (c==JFileChooser.CANCEL_OPTION||c==JFileChooser.ERROR_OPTION) return; f = jfc.getSelectedFile(); if (f.exists()) { c=JOptionPane.showConfirmDialog(null, "File Already Exists\nConfirm Overwrite"); if (c==JOptionPane.OK_OPTION)break; if (c==JOptionPane.CANCEL_OPTION) return; } } while (f.exists()); final File saveTo = f; MapApp app = ((MapApp) map.getApp()); app.addProcessingTask("Saving Data Table...", new Runnable() { public void run() { try { if (!saveTo.getName().endsWith(".xlsx")){ System.out.println(saveTo.getName()); JOptionPane.showMessageDialog(null, "Save did not complete. Must end in .xlsx. Try again."); }else{ SXSSFWorkbook xlsxWB = new SXSSFWorkbook(); SXSSFSheet xlsxSheet1 = xlsxWB.createSheet("First Sheet"); SXSSFRow row = null; int[] ind; if (saveOption.equals("selection")) { ind = dataT.getSelectedRows(); } else if (saveOption.equals("plottable")) { ind = getPlottableRows(); } else { ind = new int[dataT.getRowCount()]; for (int i=0; i<dataT.getRowCount(); i++) ind[i] = i; } int xlsxCol = dataT.getColumnCount(); row = xlsxSheet1.createRow((0)); for (int c=1; c<xlsxCol; c++){ String columnName = dataT.getColumnName(c); row.createCell(c-1).setCellValue(columnName); } Object o = null; for (int r=1; r<=ind.length; r++){ row = xlsxSheet1.createRow((r)); for (int c=1; c<xlsxCol; c++){ o = dataT.getValueAt(ind[r-1], c); if(!(o instanceof String)) continue; if (((String)o).equals("NaN")){ o = ""; } row.createCell(c-1).setCellValue((String)o); } } FileOutputStream xlsxOut = new FileOutputStream(saveTo); xlsxWB.write(xlsxOut); xlsxOut.close(); xlsxWB.close(); MapApp.sendLogMessage("Saving_or_Downloading&table="+desc.name.replace("Data Table: ", "")+"&saveOption="+saveOption+"&fmt=excelxlsx"); } } catch(Exception ex) { JOptionPane.showMessageDialog(map.getTopLevelAncestor(), "an error occurred during this operation:\t" + " "+ ex.getMessage()); } } }); }
[ "public", "void", "exportExcelXLSX", "(", "String", "saveOption", ")", "{", "if", "(", "!", "exportChecks", "(", "saveOption", ")", ")", "return", ";", "JFileChooser", "jfc", "=", "new", "JFileChooser", "(", "System", ".", "getProperty", "(", "\"user.home\"", ")", ")", ";", "ExcelFileFilter", "eff", "=", "new", "ExcelFileFilter", "(", ")", ";", "jfc", ".", "setFileFilter", "(", "eff", ")", ";", "String", "defaultName", "=", "desc", ".", "name", ".", "replace", "(", "\":\"", ",", "\"\"", ")", ".", "replace", "(", "\",\"", ",", "\"\"", ")", "+", "\".xlsx\"", ";", "defaultName", "=", "defaultName", ".", "replace", "(", "\"Data Table \"", ",", "\"\"", ")", ".", "replace", "(", "\" \"", ",", "\"_\"", ")", ";", "File", "f", "=", "new", "File", "(", "defaultName", ")", ";", "jfc", ".", "setSelectedFile", "(", "f", ")", ";", "do", "{", "int", "c", "=", "jfc", ".", "showSaveDialog", "(", "null", ")", ";", "if", "(", "c", "==", "JFileChooser", ".", "CANCEL_OPTION", "||", "c", "==", "JFileChooser", ".", "ERROR_OPTION", ")", "return", ";", "f", "=", "jfc", ".", "getSelectedFile", "(", ")", ";", "if", "(", "f", ".", "exists", "(", ")", ")", "{", "c", "=", "JOptionPane", ".", "showConfirmDialog", "(", "null", ",", "\"File Already Exists\\nConfirm Overwrite\"", ")", ";", "if", "(", "c", "==", "JOptionPane", ".", "OK_OPTION", ")", "break", ";", "if", "(", "c", "==", "JOptionPane", ".", "CANCEL_OPTION", ")", "return", ";", "}", "}", "while", "(", "f", ".", "exists", "(", ")", ")", ";", "final", "File", "saveTo", "=", "f", ";", "MapApp", "app", "=", "(", "(", "MapApp", ")", "map", ".", "getApp", "(", ")", ")", ";", "app", ".", "addProcessingTask", "(", "\"Saving Data Table...\"", ",", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "try", "{", "if", "(", "!", "saveTo", ".", "getName", "(", ")", ".", "endsWith", "(", "\".xlsx\"", ")", ")", "{", "System", ".", "out", ".", "println", "(", "saveTo", ".", "getName", "(", ")", ")", ";", "JOptionPane", ".", "showMessageDialog", "(", "null", ",", "\"Save did not complete. Must end in .xlsx. Try again.\"", ")", ";", "}", "else", "{", "SXSSFWorkbook", "xlsxWB", "=", "new", "SXSSFWorkbook", "(", ")", ";", "SXSSFSheet", "xlsxSheet1", "=", "xlsxWB", ".", "createSheet", "(", "\"First Sheet\"", ")", ";", "SXSSFRow", "row", "=", "null", ";", "int", "[", "]", "ind", ";", "if", "(", "saveOption", ".", "equals", "(", "\"selection\"", ")", ")", "{", "ind", "=", "dataT", ".", "getSelectedRows", "(", ")", ";", "}", "else", "if", "(", "saveOption", ".", "equals", "(", "\"plottable\"", ")", ")", "{", "ind", "=", "getPlottableRows", "(", ")", ";", "}", "else", "{", "ind", "=", "new", "int", "[", "dataT", ".", "getRowCount", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "dataT", ".", "getRowCount", "(", ")", ";", "i", "++", ")", "ind", "[", "i", "]", "=", "i", ";", "}", "int", "xlsxCol", "=", "dataT", ".", "getColumnCount", "(", ")", ";", "row", "=", "xlsxSheet1", ".", "createRow", "(", "(", "0", ")", ")", ";", "for", "(", "int", "c", "=", "1", ";", "c", "<", "xlsxCol", ";", "c", "++", ")", "{", "String", "columnName", "=", "dataT", ".", "getColumnName", "(", "c", ")", ";", "row", ".", "createCell", "(", "c", "-", "1", ")", ".", "setCellValue", "(", "columnName", ")", ";", "}", "Object", "o", "=", "null", ";", "for", "(", "int", "r", "=", "1", ";", "r", "<=", "ind", ".", "length", ";", "r", "++", ")", "{", "row", "=", "xlsxSheet1", ".", "createRow", "(", "(", "r", ")", ")", ";", "for", "(", "int", "c", "=", "1", ";", "c", "<", "xlsxCol", ";", "c", "++", ")", "{", "o", "=", "dataT", ".", "getValueAt", "(", "ind", "[", "r", "-", "1", "]", ",", "c", ")", ";", "if", "(", "!", "(", "o", "instanceof", "String", ")", ")", "continue", ";", "if", "(", "(", "(", "String", ")", "o", ")", ".", "equals", "(", "\"NaN\"", ")", ")", "{", "o", "=", "\"\"", ";", "}", "row", ".", "createCell", "(", "c", "-", "1", ")", ".", "setCellValue", "(", "(", "String", ")", "o", ")", ";", "}", "}", "FileOutputStream", "xlsxOut", "=", "new", "FileOutputStream", "(", "saveTo", ")", ";", "xlsxWB", ".", "write", "(", "xlsxOut", ")", ";", "xlsxOut", ".", "close", "(", ")", ";", "xlsxWB", ".", "close", "(", ")", ";", "MapApp", ".", "sendLogMessage", "(", "\"Saving_or_Downloading&table=\"", "+", "desc", ".", "name", ".", "replace", "(", "\"Data Table: \"", ",", "\"\"", ")", "+", "\"&saveOption=\"", "+", "saveOption", "+", "\"&fmt=excelxlsx\"", ")", ";", "}", "}", "catch", "(", "Exception", "ex", ")", "{", "JOptionPane", ".", "showMessageDialog", "(", "map", ".", "getTopLevelAncestor", "(", ")", ",", "\"an error occurred during this operation:\\t\"", "+", "\" \"", "+", "ex", ".", "getMessage", "(", ")", ")", ";", "}", "}", "}", ")", ";", "}" ]
Exports viewable items in the data table to excel format file .xlsx
[ "Exports", "viewable", "items", "in", "the", "data", "table", "to", "excel", "format", "file", ".", "xlsx" ]
[ "//run standard checks before exporting\r", "//don't include Plot column\r" ]
[ { "param": "saveOption", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "saveOption", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 3359, 7177, 60, 3045, 60, 12, 780, 1923, 1895, 15329, 206, 203, 202, 202, 759, 2681, 4529, 4271, 1865, 3359, 310, 206, 203, 202, 202, 430, 16051, 6530, 4081, 12, 5688, 1895, 3719, 327, 31, 206, 203, 206, 203, 202, 202, 46, 812, 17324, 525, 7142, 273, 394, 804, 812, 17324, 12, 3163, 18, 588, 1396, 2932, 1355, 18, 8712, 7923, 1769, 206, 203, 202, 202, 7177, 29837, 16419, 273, 394, 17674, 29837, 5621, 206, 203, 202, 202, 78, 7142, 18, 542, 29837, 12, 17098, 1769, 206, 203, 202, 202, 780, 805, 461, 273, 3044, 18, 529, 18, 2079, 2932, 2773, 16, 1408, 2934, 2079, 2932, 16, 3113, 1408, 13, 397, 3552, 92, 14917, 14432, 206, 203, 202, 202, 1886, 461, 273, 805, 461, 18, 2079, 2932, 751, 3555, 3104, 1408, 2934, 2079, 2932, 3104, 8802, 1769, 206, 203, 202, 202, 812, 284, 33, 2704, 1387, 12, 1886, 461, 1769, 206, 203, 202, 202, 78, 7142, 18, 542, 7416, 812, 12, 74, 1769, 206, 203, 202, 202, 2896, 288, 206, 203, 1082, 202, 474, 276, 273, 525, 7142, 18, 4500, 4755, 6353, 12, 2011, 1769, 206, 203, 1082, 202, 430, 261, 71, 631, 46, 812, 17324, 18, 25268, 67, 7425, 20081, 71, 631, 46, 812, 17324, 18, 3589, 67, 7425, 13, 327, 31, 206, 203, 1082, 202, 74, 273, 525, 7142, 18, 588, 7416, 812, 5621, 206, 203, 1082, 202, 430, 261, 74, 18, 1808, 10756, 288, 206, 203, 9506, 202, 71, 33, 46, 1895, 8485, 18, 4500, 11269, 6353, 12, 2011, 16, 315, 812, 17009, 17277, 64, 82, 11269, 29747, 8863, 206, 203, 9506, 202, 430, 261, 71, 631, 46, 1895, 8485, 18, 3141, 67, 7425, 13, 8820, 31, 206, 203, 9506, 202, 430, 261, 71, 631, 46, 1895, 8485, 18, 25268, 67, 7425, 13, 327, 31, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 1323, 261, 74, 18, 1808, 10663, 206, 203, 1082, 206, 203, 202, 202, 6385, 1387, 1923, 774, 273, 284, 31, 206, 203, 202, 202, 863, 3371, 595, 273, 14015, 863, 3371, 13, 852, 18, 588, 3371, 10663, 206, 203, 202, 202, 2910, 18, 1289, 7798, 2174, 2932, 24660, 1910, 3555, 7070, 16, 394, 10254, 1435, 288, 206, 203, 1082, 202, 482, 918, 1086, 1435, 288, 206, 203, 9506, 202, 698, 288, 206, 203, 6862, 202, 430, 16051, 5688, 774, 18, 17994, 7675, 5839, 1190, 2932, 18, 92, 14917, 6, 3719, 95, 206, 203, 25083, 202, 3163, 18, 659, 18, 8222, 12, 5688, 774, 18, 17994, 10663, 206, 203, 25083, 202, 46, 1895, 8485, 18, 4500, 1079, 6353, 12, 2011, 16, 315, 4755, 5061, 486, 3912, 18, 6753, 679, 316, 263, 92, 14917, 18, 6161, 3382, 1199, 1769, 206, 203, 6862, 202, 97, 12107, 95, 206, 203, 25083, 202, 55, 60, 1260, 42, 23345, 19453, 59, 38, 273, 394, 348, 60, 1260, 42, 23345, 5621, 206, 203, 25083, 202, 55, 60, 1260, 4931, 2963, 19453, 8229, 21, 273, 19453, 59, 38, 18, 2640, 8229, 2932, 3759, 18707, 8863, 206, 203, 25083, 202, 55, 60, 1260, 42, 1999, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 759, 1312, 4363, 1476, 429, 1516, 316, 326, 501, 1014, 358, 22011, 740, 585, 263, 92, 14917, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6731a0456d0b298fe13c3f751cfb04bc85d7f14
iedadata/geomapapp
haxby/db/custom/UnknownDataSet.java
[ "Apache-2.0" ]
Java
isPlottable
Boolean
public Boolean isPlottable(int row) { //find plot column int plotColumn = dataT.getPlotColumnIndex(); if (plotColumn == -1) return true; int plotRow = tm.displayToDataIndex.get(row); //get the PLOT value for the row return (Boolean) data.get(plotRow).data.get(plotColumn); }
//return true if there is a tick in the Plot Column
return true if there is a tick in the Plot Column
[ "return", "true", "if", "there", "is", "a", "tick", "in", "the", "Plot", "Column" ]
public Boolean isPlottable(int row) { int plotColumn = dataT.getPlotColumnIndex(); if (plotColumn == -1) return true; int plotRow = tm.displayToDataIndex.get(row); return (Boolean) data.get(plotRow).data.get(plotColumn); }
[ "public", "Boolean", "isPlottable", "(", "int", "row", ")", "{", "int", "plotColumn", "=", "dataT", ".", "getPlotColumnIndex", "(", ")", ";", "if", "(", "plotColumn", "==", "-", "1", ")", "return", "true", ";", "int", "plotRow", "=", "tm", ".", "displayToDataIndex", ".", "get", "(", "row", ")", ";", "return", "(", "Boolean", ")", "data", ".", "get", "(", "plotRow", ")", ".", "data", ".", "get", "(", "plotColumn", ")", ";", "}" ]
return true if there is a tick in the Plot Column
[ "return", "true", "if", "there", "is", "a", "tick", "in", "the", "Plot", "Column" ]
[ "//find plot column\r", "//get the PLOT value for the row\r" ]
[ { "param": "row", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "row", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 3411, 353, 11532, 2121, 12, 474, 1027, 13, 288, 206, 203, 202, 202, 759, 4720, 3207, 1057, 206, 203, 202, 202, 474, 3207, 1494, 273, 501, 56, 18, 588, 11532, 21689, 5621, 206, 203, 202, 202, 430, 261, 4032, 1494, 422, 300, 21, 13, 327, 638, 31, 206, 203, 1082, 206, 203, 202, 202, 474, 3207, 1999, 273, 6118, 18, 5417, 774, 751, 1016, 18, 588, 12, 492, 1769, 206, 203, 202, 202, 759, 588, 326, 453, 1502, 56, 460, 364, 326, 1027, 206, 203, 202, 202, 2463, 261, 5507, 13, 501, 18, 588, 12, 4032, 1999, 2934, 892, 18, 588, 12, 4032, 1494, 1769, 206, 203, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 2463, 638, 309, 1915, 353, 279, 4024, 316, 326, 15211, 4753, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6731a0456d0b298fe13c3f751cfb04bc85d7f14
iedadata/geomapapp
haxby/db/custom/UnknownDataSet.java
[ "Apache-2.0" ]
Java
isEditable
Boolean
public Boolean isEditable() { //use the xml_menu parameter to determine whether the dataset was imported //or loaded from the menu if (this.xml_menu == null) return true; return false; }
//Only editable if dataset was imported
Only editable if dataset was imported
[ "Only", "editable", "if", "dataset", "was", "imported" ]
public Boolean isEditable() { if (this.xml_menu == null) return true; return false; }
[ "public", "Boolean", "isEditable", "(", ")", "{", "if", "(", "this", ".", "xml_menu", "==", "null", ")", "return", "true", ";", "return", "false", ";", "}" ]
Only editable if dataset was imported
[ "Only", "editable", "if", "dataset", "was", "imported" ]
[ "//use the xml_menu parameter to determine whether the dataset was imported\r", "//or loaded from the menu\r" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 3411, 353, 15470, 1435, 288, 206, 203, 202, 202, 759, 1202, 326, 2025, 67, 5414, 1569, 358, 4199, 2856, 326, 3709, 1703, 9101, 206, 203, 202, 202, 759, 280, 4203, 628, 326, 3824, 206, 203, 202, 202, 430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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6731a0456d0b298fe13c3f751cfb04bc85d7f14
iedadata/geomapapp
haxby/db/custom/UnknownDataSet.java
[ "Apache-2.0" ]
Java
rememberPlottableStatus
null
public void rememberPlottableStatus() { int plotColumn = dataT.getPlotColumnIndex(); oldPlottableStatus = new ArrayList<Boolean>(); for (UnknownData d : data) { oldPlottableStatus.add((boolean) d.data.get(plotColumn)); } }
//store the plottable status for each row
store the plottable status for each row
[ "store", "the", "plottable", "status", "for", "each", "row" ]
public void rememberPlottableStatus() { int plotColumn = dataT.getPlotColumnIndex(); oldPlottableStatus = new ArrayList<Boolean>(); for (UnknownData d : data) { oldPlottableStatus.add((boolean) d.data.get(plotColumn)); } }
[ "public", "void", "rememberPlottableStatus", "(", ")", "{", "int", "plotColumn", "=", "dataT", ".", "getPlotColumnIndex", "(", ")", ";", "oldPlottableStatus", "=", "new", "ArrayList", "<", "Boolean", ">", "(", ")", ";", "for", "(", "UnknownData", "d", ":", "data", ")", "{", "oldPlottableStatus", ".", "add", "(", "(", "boolean", ")", "d", ".", "data", ".", "get", "(", "plotColumn", ")", ")", ";", "}", "}" ]
store the plottable status for each row
[ "store", "the", "plottable", "status", "for", "each", "row" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 11586, 11532, 2121, 1482, 1435, 288, 206, 203, 202, 202, 474, 3207, 1494, 273, 501, 56, 18, 588, 11532, 21689, 5621, 206, 203, 202, 202, 1673, 11532, 2121, 1482, 273, 394, 2407, 32, 5507, 34, 5621, 206, 203, 202, 202, 1884, 261, 4874, 751, 302, 294, 501, 13, 288, 206, 203, 1082, 202, 1673, 11532, 2121, 1482, 18, 1289, 12443, 6494, 13, 302, 18, 892, 18, 588, 12, 4032, 1494, 10019, 206, 203, 202, 202, 97, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6731a0456d0b298fe13c3f751cfb04bc85d7f14
iedadata/geomapapp
haxby/db/custom/UnknownDataSet.java
[ "Apache-2.0" ]
Java
revertToOldPlottableStatus
null
public void revertToOldPlottableStatus() { if (oldPlottableStatus == null) return; //find plot column int plotColumn = dataT.getPlotColumnIndex(); for (int i=0; i<data.size(); i++) { UnknownData d = data.get(i); d.data.set(plotColumn, oldPlottableStatus.get(i)); } }
//revert to each row to it's previous plottable status
revert to each row to it's previous plottable status
[ "revert", "to", "each", "row", "to", "it", "'", "s", "previous", "plottable", "status" ]
public void revertToOldPlottableStatus() { if (oldPlottableStatus == null) return; int plotColumn = dataT.getPlotColumnIndex(); for (int i=0; i<data.size(); i++) { UnknownData d = data.get(i); d.data.set(plotColumn, oldPlottableStatus.get(i)); } }
[ "public", "void", "revertToOldPlottableStatus", "(", ")", "{", "if", "(", "oldPlottableStatus", "==", "null", ")", "return", ";", "int", "plotColumn", "=", "dataT", ".", "getPlotColumnIndex", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "data", ".", "size", "(", ")", ";", "i", "++", ")", "{", "UnknownData", "d", "=", "data", ".", "get", "(", "i", ")", ";", "d", ".", "data", ".", "set", "(", "plotColumn", ",", "oldPlottableStatus", ".", "get", "(", "i", ")", ")", ";", "}", "}" ]
revert to each row to it's previous plottable status
[ "revert", "to", "each", "row", "to", "it", "'", "s", "previous", "plottable", "status" ]
[ "//find plot column\r" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 15226, 774, 7617, 11532, 2121, 1482, 1435, 288, 206, 203, 202, 202, 430, 261, 1673, 11532, 2121, 1482, 422, 446, 13, 327, 31, 206, 203, 202, 202, 759, 4720, 3207, 1057, 206, 203, 202, 202, 474, 3207, 1494, 273, 501, 56, 18, 588, 11532, 21689, 5621, 206, 203, 202, 202, 1884, 261, 474, 277, 33, 20, 31, 277, 32, 892, 18, 1467, 5621, 277, 27245, 288, 206, 203, 1082, 202, 4874, 751, 302, 273, 501, 18, 588, 12, 77, 1769, 206, 203, 1082, 202, 72, 18, 892, 18, 542, 12, 4032, 1494, 16, 1592, 11532, 2121, 1482, 18, 588, 12, 77, 10019, 206, 203, 202, 202, 97, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 266, 1097, 358, 1517, 1027, 358, 518, 1807, 2416, 3207, 2121, 1267, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
457ebb0e5ba625ce1fa521cfdcf39884536c9a7f
iedadata/geomapapp
haxby/db/custom/DBTableModel.java
[ "Apache-2.0" ]
Java
sortByColumn
null
public void sortByColumn(int col) { try { if (lastSortedCol == col) { ascent = !ascent; } else if ((lastSortedCol < col) || (lastSortedCol > col)) { ascent = true; } lastSortedCol = col; Collections.sort(displayToDataIndex, getColumnSorter()); updateRowToDisplayIndex(); fireTableDataChanged(); } catch (IllegalArgumentException ae){ ae.printStackTrace(); } }
// Sorts on column col, alternating between ascent and descent
Sorts on column col, alternating between ascent and descent
[ "Sorts", "on", "column", "col", "alternating", "between", "ascent", "and", "descent" ]
public void sortByColumn(int col) { try { if (lastSortedCol == col) { ascent = !ascent; } else if ((lastSortedCol < col) || (lastSortedCol > col)) { ascent = true; } lastSortedCol = col; Collections.sort(displayToDataIndex, getColumnSorter()); updateRowToDisplayIndex(); fireTableDataChanged(); } catch (IllegalArgumentException ae){ ae.printStackTrace(); } }
[ "public", "void", "sortByColumn", "(", "int", "col", ")", "{", "try", "{", "if", "(", "lastSortedCol", "==", "col", ")", "{", "ascent", "=", "!", "ascent", ";", "}", "else", "if", "(", "(", "lastSortedCol", "<", "col", ")", "||", "(", "lastSortedCol", ">", "col", ")", ")", "{", "ascent", "=", "true", ";", "}", "lastSortedCol", "=", "col", ";", "Collections", ".", "sort", "(", "displayToDataIndex", ",", "getColumnSorter", "(", ")", ")", ";", "updateRowToDisplayIndex", "(", ")", ";", "fireTableDataChanged", "(", ")", ";", "}", "catch", "(", "IllegalArgumentException", "ae", ")", "{", "ae", ".", "printStackTrace", "(", ")", ";", "}", "}" ]
Sorts on column col, alternating between ascent and descent
[ "Sorts", "on", "column", "col", "alternating", "between", "ascent", "and", "descent" ]
[]
[ { "param": "col", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "col", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 14021, 1494, 12, 474, 645, 13, 288, 206, 203, 202, 698, 288, 202, 206, 203, 202, 202, 430, 261, 2722, 11739, 914, 422, 645, 13, 288, 206, 203, 1082, 202, 345, 2998, 273, 401, 345, 2998, 31, 206, 203, 1082, 206, 203, 202, 202, 97, 469, 309, 14015, 2722, 11739, 914, 411, 645, 13, 747, 261, 2722, 11739, 914, 405, 645, 3719, 288, 206, 203, 1082, 202, 345, 2998, 273, 638, 31, 206, 203, 202, 202, 97, 206, 203, 202, 202, 2722, 11739, 914, 273, 645, 31, 206, 203, 202, 202, 15150, 18, 3804, 12, 5417, 774, 751, 1016, 16, 6716, 24952, 10663, 206, 203, 202, 202, 2725, 1999, 774, 4236, 1016, 5621, 206, 203, 202, 202, 12179, 1388, 751, 5033, 5621, 206, 203, 202, 97, 1044, 261, 31237, 14221, 15329, 206, 203, 202, 202, 8906, 18, 1188, 6332, 5621, 206, 203, 202, 97, 206, 203, 202, 97, 2, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 5928, 87, 603, 1057, 645, 16, 6416, 1776, 3086, 487, 2998, 471, 3044, 319, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
48836c9fc4021bf4f38a24a7db526652fc78e274
iedadata/geomapapp
haxby/db/pdb/PDBStationModel.java
[ "Apache-2.0" ]
Java
sortByColumn
null
public synchronized void sortByColumn(int col) { if (lastSortedCol == col) ascent = !ascent; else ascent = true; lastSortedCol = col; Integer[] tmp = new Integer[current.length]; for (int i = 0; i < current.length; i++) tmp[i] = new Integer(current[i]); Arrays.sort(tmp, columnSorter); for (int i = 0; i < current.length; i++) current[i] = tmp[i].intValue(); updateStationIndexMap(); fireTableDataChanged(); }
// Sorts on column col, alternating between ascent and descent
Sorts on column col, alternating between ascent and descent
[ "Sorts", "on", "column", "col", "alternating", "between", "ascent", "and", "descent" ]
public synchronized void sortByColumn(int col) { if (lastSortedCol == col) ascent = !ascent; else ascent = true; lastSortedCol = col; Integer[] tmp = new Integer[current.length]; for (int i = 0; i < current.length; i++) tmp[i] = new Integer(current[i]); Arrays.sort(tmp, columnSorter); for (int i = 0; i < current.length; i++) current[i] = tmp[i].intValue(); updateStationIndexMap(); fireTableDataChanged(); }
[ "public", "synchronized", "void", "sortByColumn", "(", "int", "col", ")", "{", "if", "(", "lastSortedCol", "==", "col", ")", "ascent", "=", "!", "ascent", ";", "else", "ascent", "=", "true", ";", "lastSortedCol", "=", "col", ";", "Integer", "[", "]", "tmp", "=", "new", "Integer", "[", "current", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "current", ".", "length", ";", "i", "++", ")", "tmp", "[", "i", "]", "=", "new", "Integer", "(", "current", "[", "i", "]", ")", ";", "Arrays", ".", "sort", "(", "tmp", ",", "columnSorter", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "current", ".", "length", ";", "i", "++", ")", "current", "[", "i", "]", "=", "tmp", "[", "i", "]", ".", "intValue", "(", ")", ";", "updateStationIndexMap", "(", ")", ";", "fireTableDataChanged", "(", ")", ";", "}" ]
Sorts on column col, alternating between ascent and descent
[ "Sorts", "on", "column", "col", "alternating", "between", "ascent", "and", "descent" ]
[]
[ { "param": "col", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "col", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 3852, 918, 14021, 1494, 12, 474, 645, 13, 288, 203, 202, 202, 430, 261, 2722, 11739, 914, 422, 645, 13, 203, 1082, 202, 345, 2998, 273, 401, 345, 2998, 31, 203, 202, 202, 12107, 203, 1082, 202, 345, 2998, 273, 638, 31, 203, 202, 202, 2722, 11739, 914, 273, 645, 31, 203, 203, 202, 202, 4522, 8526, 1853, 273, 394, 2144, 63, 2972, 18, 2469, 15533, 203, 202, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 783, 18, 2469, 31, 277, 27245, 203, 1082, 202, 5645, 63, 77, 65, 273, 394, 2144, 12, 2972, 63, 77, 19226, 203, 202, 202, 12726, 18, 3804, 12, 5645, 16, 1057, 24952, 1769, 203, 202, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 783, 18, 2469, 31, 277, 27245, 203, 1082, 202, 2972, 63, 77, 65, 273, 1853, 63, 77, 8009, 474, 620, 5621, 203, 203, 202, 202, 2725, 16672, 1016, 863, 5621, 203, 202, 202, 12179, 1388, 751, 5033, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 5928, 87, 603, 1057, 645, 16, 6416, 1776, 3086, 487, 2998, 471, 3044, 319, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
82fdd6b4096e5a4d0b6a4515d1832235aa5f1e7b
iedadata/geomapapp
haxby/nav/TrackLine.java
[ "Apache-2.0" ]
Java
intersects
null
public boolean intersects( Rectangle2D area ) { if (name.contains("header only")) return true; float xMin = (float)area.getX(); float xMax = (float)(area.getX() + area.getWidth()); float offset = (float)this.offset; for( int seg=0 ; seg<cpts.length ; seg++ ) { for(int i=0 ; i<cpts[seg].length ; i++) { float x = offset+(float)cpts[seg][i].getX(); float y = (float)cpts[seg][i].getY(); float prevX = (i > 0) ? offset+(float)cpts[seg][i-1].getX() : Float.NaN; float prevY = (i > 0) ? (float)cpts[seg][i-1].getY() : Float.NaN;; float nextX = (i < cpts[seg].length - 1) ? offset+(float)cpts[seg][i+1].getX() : Float.NaN; float nextY = (i < cpts[seg].length - 1) ? (float)cpts[seg][i+1].getY() : Float.NaN; //some fiddling around to make sure all points are in the correct wrap segment if (wrap>0f){ if (x < xMin && x + wrap < xMax) { x += wrap; } else if (x > xMax && x - wrap > xMin) { x -= wrap; } if( !Float.isNaN(prevX)) { while( x-prevX < wrap/2f ){x+=wrap;} while( x-prevX > wrap/2f ){x-=wrap;} } if ( !Float.isNaN(nextX)) { if (nextX < xMin && nextX + wrap < xMax) { nextX += wrap; } else if (nextX > xMax && nextX - wrap > xMin) { nextX -= wrap; } } } //only draw tracks if a cpt is in the visible map, or if the track //intersects the map if (area.contains(x, y) || (!Float.isNaN(prevX) && area.intersectsLine(prevX, prevY, x, y)) || (!Float.isNaN(nextX) && area.intersectsLine(x, y, nextX, nextY))) { return(true); } } } return false; }
// returns true if any point in the track line is within the area, or if the line intersects the area
returns true if any point in the track line is within the area, or if the line intersects the area
[ "returns", "true", "if", "any", "point", "in", "the", "track", "line", "is", "within", "the", "area", "or", "if", "the", "line", "intersects", "the", "area" ]
public boolean intersects( Rectangle2D area ) { if (name.contains("header only")) return true; float xMin = (float)area.getX(); float xMax = (float)(area.getX() + area.getWidth()); float offset = (float)this.offset; for( int seg=0 ; seg<cpts.length ; seg++ ) { for(int i=0 ; i<cpts[seg].length ; i++) { float x = offset+(float)cpts[seg][i].getX(); float y = (float)cpts[seg][i].getY(); float prevX = (i > 0) ? offset+(float)cpts[seg][i-1].getX() : Float.NaN; float prevY = (i > 0) ? (float)cpts[seg][i-1].getY() : Float.NaN;; float nextX = (i < cpts[seg].length - 1) ? offset+(float)cpts[seg][i+1].getX() : Float.NaN; float nextY = (i < cpts[seg].length - 1) ? (float)cpts[seg][i+1].getY() : Float.NaN; if (wrap>0f){ if (x < xMin && x + wrap < xMax) { x += wrap; } else if (x > xMax && x - wrap > xMin) { x -= wrap; } if( !Float.isNaN(prevX)) { while( x-prevX < wrap/2f ){x+=wrap;} while( x-prevX > wrap/2f ){x-=wrap;} } if ( !Float.isNaN(nextX)) { if (nextX < xMin && nextX + wrap < xMax) { nextX += wrap; } else if (nextX > xMax && nextX - wrap > xMin) { nextX -= wrap; } } } if (area.contains(x, y) || (!Float.isNaN(prevX) && area.intersectsLine(prevX, prevY, x, y)) || (!Float.isNaN(nextX) && area.intersectsLine(x, y, nextX, nextY))) { return(true); } } } return false; }
[ "public", "boolean", "intersects", "(", "Rectangle2D", "area", ")", "{", "if", "(", "name", ".", "contains", "(", "\"header only\"", ")", ")", "return", "true", ";", "float", "xMin", "=", "(", "float", ")", "area", ".", "getX", "(", ")", ";", "float", "xMax", "=", "(", "float", ")", "(", "area", ".", "getX", "(", ")", "+", "area", ".", "getWidth", "(", ")", ")", ";", "float", "offset", "=", "(", "float", ")", "this", ".", "offset", ";", "for", "(", "int", "seg", "=", "0", ";", "seg", "<", "cpts", ".", "length", ";", "seg", "++", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "cpts", "[", "seg", "]", ".", "length", ";", "i", "++", ")", "{", "float", "x", "=", "offset", "+", "(", "float", ")", "cpts", "[", "seg", "]", "[", "i", "]", ".", "getX", "(", ")", ";", "float", "y", "=", "(", "float", ")", "cpts", "[", "seg", "]", "[", "i", "]", ".", "getY", "(", ")", ";", "float", "prevX", "=", "(", "i", ">", "0", ")", "?", "offset", "+", "(", "float", ")", "cpts", "[", "seg", "]", "[", "i", "-", "1", "]", ".", "getX", "(", ")", ":", "Float", ".", "NaN", ";", "float", "prevY", "=", "(", "i", ">", "0", ")", "?", "(", "float", ")", "cpts", "[", "seg", "]", "[", "i", "-", "1", "]", ".", "getY", "(", ")", ":", "Float", ".", "NaN", ";", ";", "float", "nextX", "=", "(", "i", "<", "cpts", "[", "seg", "]", ".", "length", "-", "1", ")", "?", "offset", "+", "(", "float", ")", "cpts", "[", "seg", "]", "[", "i", "+", "1", "]", ".", "getX", "(", ")", ":", "Float", ".", "NaN", ";", "float", "nextY", "=", "(", "i", "<", "cpts", "[", "seg", "]", ".", "length", "-", "1", ")", "?", "(", "float", ")", "cpts", "[", "seg", "]", "[", "i", "+", "1", "]", ".", "getY", "(", ")", ":", "Float", ".", "NaN", ";", "if", "(", "wrap", ">", "0f", ")", "{", "if", "(", "x", "<", "xMin", "&&", "x", "+", "wrap", "<", "xMax", ")", "{", "x", "+=", "wrap", ";", "}", "else", "if", "(", "x", ">", "xMax", "&&", "x", "-", "wrap", ">", "xMin", ")", "{", "x", "-=", "wrap", ";", "}", "if", "(", "!", "Float", ".", "isNaN", "(", "prevX", ")", ")", "{", "while", "(", "x", "-", "prevX", "<", "wrap", "/", "2f", ")", "{", "x", "+=", "wrap", ";", "}", "while", "(", "x", "-", "prevX", ">", "wrap", "/", "2f", ")", "{", "x", "-=", "wrap", ";", "}", "}", "if", "(", "!", "Float", ".", "isNaN", "(", "nextX", ")", ")", "{", "if", "(", "nextX", "<", "xMin", "&&", "nextX", "+", "wrap", "<", "xMax", ")", "{", "nextX", "+=", "wrap", ";", "}", "else", "if", "(", "nextX", ">", "xMax", "&&", "nextX", "-", "wrap", ">", "xMin", ")", "{", "nextX", "-=", "wrap", ";", "}", "}", "}", "if", "(", "area", ".", "contains", "(", "x", ",", "y", ")", "||", "(", "!", "Float", ".", "isNaN", "(", "prevX", ")", "&&", "area", ".", "intersectsLine", "(", "prevX", ",", "prevY", ",", "x", ",", "y", ")", ")", "||", "(", "!", "Float", ".", "isNaN", "(", "nextX", ")", "&&", "area", ".", "intersectsLine", "(", "x", ",", "y", ",", "nextX", ",", "nextY", ")", ")", ")", "{", "return", "(", "true", ")", ";", "}", "}", "}", "return", "false", ";", "}" ]
returns true if any point in the track line is within the area, or if the line intersects the area
[ "returns", "true", "if", "any", "point", "in", "the", "track", "line", "is", "within", "the", "area", "or", "if", "the", "line", "intersects", "the", "area" ]
[ "//some fiddling around to make sure all points are in the correct wrap segment", "//only draw tracks if a cpt is in the visible map, or if the track ", "//intersects the map" ]
[ { "param": "area", "type": "Rectangle2D" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "area", "type": "Rectangle2D", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 19791, 12, 13264, 22, 40, 5091, 262, 288, 203, 1082, 203, 202, 202, 430, 261, 529, 18, 12298, 2932, 3374, 1338, 6, 3719, 203, 1082, 202, 2463, 638, 31, 203, 1082, 203, 202, 202, 5659, 619, 2930, 273, 261, 5659, 13, 5036, 18, 588, 60, 5621, 203, 202, 202, 5659, 619, 2747, 273, 261, 5659, 21433, 5036, 18, 588, 60, 1435, 397, 5091, 18, 588, 2384, 10663, 203, 203, 202, 202, 5659, 1384, 273, 261, 5659, 13, 2211, 18, 3348, 31, 203, 203, 202, 202, 1884, 12, 509, 2291, 33, 20, 274, 2291, 32, 71, 1092, 18, 2469, 274, 2291, 9904, 262, 288, 203, 1082, 202, 1884, 12, 474, 277, 33, 20, 274, 277, 32, 71, 1092, 63, 5680, 8009, 2469, 274, 277, 27245, 288, 203, 9506, 202, 5659, 619, 273, 1384, 15, 12, 5659, 13, 71, 1092, 63, 5680, 6362, 77, 8009, 588, 60, 5621, 203, 9506, 202, 5659, 677, 273, 261, 5659, 13, 71, 1092, 63, 5680, 6362, 77, 8009, 588, 61, 5621, 203, 6862, 203, 9506, 202, 5659, 2807, 60, 273, 261, 77, 405, 374, 13, 692, 1384, 15, 12, 5659, 13, 71, 1092, 63, 5680, 6362, 77, 17, 21, 8009, 588, 60, 1435, 294, 5450, 18, 21172, 31, 203, 9506, 202, 5659, 2807, 61, 273, 261, 77, 405, 374, 13, 692, 261, 5659, 13, 71, 1092, 63, 5680, 6362, 77, 17, 21, 8009, 588, 61, 1435, 294, 5450, 18, 21172, 25708, 203, 9506, 202, 5659, 1024, 60, 273, 261, 77, 411, 276, 1092, 63, 5680, 8009, 2469, 300, 404, 13, 692, 1384, 15, 12, 5659, 13, 71, 1092, 63, 5680, 6362, 77, 15, 21, 8009, 588, 60, 1435, 294, 5450, 18, 21172, 31, 203, 9506, 202, 5659, 1024, 61, 273, 261, 77, 411, 276, 1092, 63, 5680, 8009, 2469, 300, 404, 13, 692, 261, 5659, 13, 71, 1092, 63, 5680, 6362, 77, 15, 21, 8009, 588, 61, 1435, 294, 5450, 18, 21172, 31, 203, 6862, 203, 9506, 202, 759, 19068, 284, 1873, 2456, 6740, 358, 1221, 3071, 777, 3143, 854, 316, 326, 3434, 2193, 3267, 203, 9506, 202, 430, 261, 4113, 34, 20, 74, 15329, 203, 203, 6862, 202, 430, 261, 92, 411, 619, 2930, 597, 619, 397, 2193, 411, 619, 2747, 13, 288, 203, 25083, 202, 92, 1011, 2193, 31, 203, 6862, 202, 97, 469, 309, 261, 92, 405, 619, 2747, 597, 619, 300, 2193, 405, 619, 2930, 13, 288, 203, 25083, 202, 92, 3947, 2193, 31, 203, 6862, 202, 97, 203, 6862, 203, 6862, 202, 430, 12, 401, 4723, 18, 291, 21172, 12, 10001, 60, 3719, 288, 203, 25083, 202, 17523, 12, 619, 17, 10001, 60, 411, 2193, 19, 22, 74, 262, 95, 92, 15, 33, 4113, 31, 97, 203, 25083, 202, 17523, 12, 619, 17, 10001, 60, 405, 2193, 19, 22, 74, 262, 95, 92, 17, 33, 4113, 31, 97, 203, 6862, 202, 97, 7010, 6862, 9506, 203, 6862, 202, 430, 261, 401, 4723, 18, 291, 21172, 12, 4285, 60, 3719, 288, 203, 25083, 202, 430, 261, 4285, 60, 411, 619, 2930, 597, 1024, 60, 397, 2193, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 759, 1135, 638, 309, 1281, 1634, 316, 326, 3298, 980, 353, 3470, 326, 5091, 16, 578, 309, 326, 980, 19791, 326, 5091, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
82fdd6b4096e5a4d0b6a4515d1832235aa5f1e7b
iedadata/geomapapp
haxby/nav/TrackLine.java
[ "Apache-2.0" ]
Java
intersectsOld
null
public boolean intersectsOld( Rectangle2D area ) { if(wrap>0) { if(area.getHeight()>=0) { if(area.getY()+area.getHeight()<bounds.getY()) return false; if(bounds.getY()+bounds.getHeight()<area.getY()) return false; } else { if(area.getY()<bounds.getY()) return false; if(bounds.getY()+bounds.getHeight()<area.getY()+area.getHeight()) return false; } while( bounds.getX()+(double)offset > area.getX() ) offset -= wrap; while( bounds.getX()+bounds.getWidth()+(double)offset < area.getX() ) offset += wrap; if( bounds.getX()+(double)offset > area.getX()+area.getWidth() ) return false; return true; } else { return bounds.intersects(area.getX(), area.getY(), area.getWidth(), area.getHeight()); } }
//previous version that uses intersection of bounds, rather than the track
previous version that uses intersection of bounds, rather than the track
[ "previous", "version", "that", "uses", "intersection", "of", "bounds", "rather", "than", "the", "track" ]
public boolean intersectsOld( Rectangle2D area ) { if(wrap>0) { if(area.getHeight()>=0) { if(area.getY()+area.getHeight()<bounds.getY()) return false; if(bounds.getY()+bounds.getHeight()<area.getY()) return false; } else { if(area.getY()<bounds.getY()) return false; if(bounds.getY()+bounds.getHeight()<area.getY()+area.getHeight()) return false; } while( bounds.getX()+(double)offset > area.getX() ) offset -= wrap; while( bounds.getX()+bounds.getWidth()+(double)offset < area.getX() ) offset += wrap; if( bounds.getX()+(double)offset > area.getX()+area.getWidth() ) return false; return true; } else { return bounds.intersects(area.getX(), area.getY(), area.getWidth(), area.getHeight()); } }
[ "public", "boolean", "intersectsOld", "(", "Rectangle2D", "area", ")", "{", "if", "(", "wrap", ">", "0", ")", "{", "if", "(", "area", ".", "getHeight", "(", ")", ">=", "0", ")", "{", "if", "(", "area", ".", "getY", "(", ")", "+", "area", ".", "getHeight", "(", ")", "<", "bounds", ".", "getY", "(", ")", ")", "return", "false", ";", "if", "(", "bounds", ".", "getY", "(", ")", "+", "bounds", ".", "getHeight", "(", ")", "<", "area", ".", "getY", "(", ")", ")", "return", "false", ";", "}", "else", "{", "if", "(", "area", ".", "getY", "(", ")", "<", "bounds", ".", "getY", "(", ")", ")", "return", "false", ";", "if", "(", "bounds", ".", "getY", "(", ")", "+", "bounds", ".", "getHeight", "(", ")", "<", "area", ".", "getY", "(", ")", "+", "area", ".", "getHeight", "(", ")", ")", "return", "false", ";", "}", "while", "(", "bounds", ".", "getX", "(", ")", "+", "(", "double", ")", "offset", ">", "area", ".", "getX", "(", ")", ")", "offset", "-=", "wrap", ";", "while", "(", "bounds", ".", "getX", "(", ")", "+", "bounds", ".", "getWidth", "(", ")", "+", "(", "double", ")", "offset", "<", "area", ".", "getX", "(", ")", ")", "offset", "+=", "wrap", ";", "if", "(", "bounds", ".", "getX", "(", ")", "+", "(", "double", ")", "offset", ">", "area", ".", "getX", "(", ")", "+", "area", ".", "getWidth", "(", ")", ")", "return", "false", ";", "return", "true", ";", "}", "else", "{", "return", "bounds", ".", "intersects", "(", "area", ".", "getX", "(", ")", ",", "area", ".", "getY", "(", ")", ",", "area", ".", "getWidth", "(", ")", ",", "area", ".", "getHeight", "(", ")", ")", ";", "}", "}" ]
previous version that uses intersection of bounds, rather than the track
[ "previous", "version", "that", "uses", "intersection", "of", "bounds", "rather", "than", "the", "track" ]
[]
[ { "param": "area", "type": "Rectangle2D" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "area", "type": "Rectangle2D", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 19791, 7617, 12, 13264, 22, 40, 5091, 262, 288, 1082, 203, 202, 202, 430, 12, 4113, 34, 20, 13, 288, 203, 1082, 202, 430, 12, 5036, 18, 588, 2686, 1435, 34, 33, 20, 13, 288, 203, 9506, 202, 430, 12, 5036, 18, 588, 61, 1435, 15, 5036, 18, 588, 2686, 1435, 32, 10576, 18, 588, 61, 10756, 327, 629, 31, 203, 9506, 202, 430, 12, 10576, 18, 588, 61, 1435, 15, 10576, 18, 588, 2686, 1435, 32, 5036, 18, 588, 61, 10756, 327, 629, 31, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 430, 12, 5036, 18, 588, 61, 1435, 32, 10576, 18, 588, 61, 10756, 327, 629, 31, 203, 9506, 202, 430, 12, 10576, 18, 588, 61, 1435, 15, 10576, 18, 588, 2686, 1435, 32, 5036, 18, 588, 61, 1435, 15, 5036, 18, 588, 2686, 10756, 327, 629, 31, 203, 1082, 202, 97, 203, 1082, 202, 17523, 12, 4972, 18, 588, 60, 1435, 15, 12, 9056, 13, 3348, 405, 5091, 18, 588, 60, 1435, 262, 1384, 3947, 2193, 31, 203, 1082, 202, 17523, 12, 4972, 18, 588, 60, 1435, 15, 10576, 18, 588, 2384, 1435, 15, 12, 9056, 13, 3348, 411, 7010, 6862, 202, 5036, 18, 588, 60, 1435, 262, 1384, 1011, 2193, 31, 203, 1082, 202, 430, 12, 4972, 18, 588, 60, 1435, 15, 12, 9056, 13, 3348, 405, 5091, 18, 588, 60, 1435, 15, 5036, 18, 588, 2384, 1435, 262, 327, 629, 31, 203, 1082, 202, 2463, 638, 31, 203, 9506, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 2463, 4972, 18, 12288, 87, 12, 5036, 18, 588, 60, 9334, 5091, 18, 588, 61, 9334, 7010, 6862, 202, 5036, 18, 588, 2384, 9334, 5091, 18, 588, 2686, 10663, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 11515, 1177, 716, 4692, 7619, 434, 4972, 16, 9178, 2353, 326, 3298, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
9aaa2a3ce36bca4e13c1e4a67701a584dc9d37e5
iedadata/geomapapp
haxby/map/GetGrid.java
[ "Apache-2.0" ]
Java
fillShortGrid
null
public static void fillShortGrid(String tilesPrefix, int gridRes, int fillRes, String basePath) { fillShortGrid(tilesPrefix, gridRes, fillRes, basePath, false); }
/** * Fills a from a Grid2D.Short with data from the requested * resolution and tileset. Does not overwrite existing values, * replacing only NaNs. * * @param tilesPrefix the path from GetGrid.base to the tiles, * including the "z_", "zw_", or other prefix (e.g. "gdem/z_") * @param res the scaling factor the the new resolution (must * be a power of 2) * @param grid the grid to be populated */
Fills a from a Grid2D.Short with data from the requested resolution and tileset. Does not overwrite existing values, replacing only NaNs. @param tilesPrefix the path from GetGrid.base to the tiles, including the "z_", "zw_", or other prefix @param res the scaling factor the the new resolution (must be a power of 2) @param grid the grid to be populated
[ "Fills", "a", "from", "a", "Grid2D", ".", "Short", "with", "data", "from", "the", "requested", "resolution", "and", "tileset", ".", "Does", "not", "overwrite", "existing", "values", "replacing", "only", "NaNs", ".", "@param", "tilesPrefix", "the", "path", "from", "GetGrid", ".", "base", "to", "the", "tiles", "including", "the", "\"", "z_", "\"", "\"", "zw_", "\"", "or", "other", "prefix", "@param", "res", "the", "scaling", "factor", "the", "the", "new", "resolution", "(", "must", "be", "a", "power", "of", "2", ")", "@param", "grid", "the", "grid", "to", "be", "populated" ]
public static void fillShortGrid(String tilesPrefix, int gridRes, int fillRes, String basePath) { fillShortGrid(tilesPrefix, gridRes, fillRes, basePath, false); }
[ "public", "static", "void", "fillShortGrid", "(", "String", "tilesPrefix", ",", "int", "gridRes", ",", "int", "fillRes", ",", "String", "basePath", ")", "{", "fillShortGrid", "(", "tilesPrefix", ",", "gridRes", ",", "fillRes", ",", "basePath", ",", "false", ")", ";", "}" ]
Fills a from a Grid2D.Short with data from the requested resolution and tileset.
[ "Fills", "a", "from", "a", "Grid2D", ".", "Short", "with", "data", "from", "the", "requested", "resolution", "and", "tileset", "." ]
[]
[ { "param": "tilesPrefix", "type": "String" }, { "param": "gridRes", "type": "int" }, { "param": "fillRes", "type": "int" }, { "param": "basePath", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "tilesPrefix", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "gridRes", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "fillRes", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "basePath", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 3636, 4897, 6313, 12, 780, 12568, 2244, 16, 203, 1082, 377, 509, 3068, 607, 16, 203, 1082, 377, 509, 3636, 607, 16, 7010, 1082, 377, 514, 9104, 13, 288, 203, 377, 202, 5935, 4897, 6313, 12, 28366, 2244, 16, 3068, 607, 16, 3636, 607, 16, 9104, 16, 629, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 14192, 87, 279, 628, 279, 7145, 22, 40, 18, 4897, 598, 501, 628, 326, 3764, 203, 377, 380, 7861, 471, 12568, 278, 18, 9637, 486, 6156, 2062, 924, 16, 203, 377, 380, 13993, 1338, 10180, 87, 18, 203, 377, 380, 7010, 377, 380, 632, 891, 12568, 2244, 326, 589, 628, 968, 6313, 18, 1969, 358, 326, 12568, 16, 203, 377, 380, 6508, 326, 315, 94, 67, 3113, 315, 94, 91, 67, 3113, 578, 1308, 1633, 261, 73, 18, 75, 18, 315, 75, 19117, 19, 94, 67, 7923, 203, 377, 380, 632, 891, 400, 326, 10612, 5578, 326, 326, 394, 7861, 261, 11926, 203, 377, 380, 506, 279, 7212, 434, 576, 13, 203, 377, 380, 632, 891, 3068, 326, 3068, 358, 506, 6737, 2 ]
9aaa2a3ce36bca4e13c1e4a67701a584dc9d37e5
iedadata/geomapapp
haxby/map/GetGrid.java
[ "Apache-2.0" ]
Java
fillFloatGrid
null
public static void fillFloatGrid(String tilesPrefix, int gridRes, int fillRes, String basePath) { fillFloatGrid (tilesPrefix, gridRes, fillRes, basePath, false); }
/** * Fills from a Grid2D.Float with data from the requested * resolution and tileset. Does not overwrite existing values, * replacing only NaNs. * * @param tilesPrefix the path from GetGrid.base to the tiles, * including the "z_", "zw_", or other prefix (e.g. "gdem/z_") * @param gridRes the resolution of the input tiles (must * be a power of 2) * @param fillRes the resolution of the output tile (must * be a power of 2) * @param basePath the basepath to use */
Fills from a Grid2D.Float with data from the requested resolution and tileset. Does not overwrite existing values, replacing only NaNs. @param tilesPrefix the path from GetGrid.base to the tiles, including the "z_", "zw_", or other prefix @param gridRes the resolution of the input tiles (must be a power of 2) @param fillRes the resolution of the output tile (must be a power of 2) @param basePath the basepath to use
[ "Fills", "from", "a", "Grid2D", ".", "Float", "with", "data", "from", "the", "requested", "resolution", "and", "tileset", ".", "Does", "not", "overwrite", "existing", "values", "replacing", "only", "NaNs", ".", "@param", "tilesPrefix", "the", "path", "from", "GetGrid", ".", "base", "to", "the", "tiles", "including", "the", "\"", "z_", "\"", "\"", "zw_", "\"", "or", "other", "prefix", "@param", "gridRes", "the", "resolution", "of", "the", "input", "tiles", "(", "must", "be", "a", "power", "of", "2", ")", "@param", "fillRes", "the", "resolution", "of", "the", "output", "tile", "(", "must", "be", "a", "power", "of", "2", ")", "@param", "basePath", "the", "basepath", "to", "use" ]
public static void fillFloatGrid(String tilesPrefix, int gridRes, int fillRes, String basePath) { fillFloatGrid (tilesPrefix, gridRes, fillRes, basePath, false); }
[ "public", "static", "void", "fillFloatGrid", "(", "String", "tilesPrefix", ",", "int", "gridRes", ",", "int", "fillRes", ",", "String", "basePath", ")", "{", "fillFloatGrid", "(", "tilesPrefix", ",", "gridRes", ",", "fillRes", ",", "basePath", ",", "false", ")", ";", "}" ]
Fills from a Grid2D.Float with data from the requested resolution and tileset.
[ "Fills", "from", "a", "Grid2D", ".", "Float", "with", "data", "from", "the", "requested", "resolution", "and", "tileset", "." ]
[]
[ { "param": "tilesPrefix", "type": "String" }, { "param": "gridRes", "type": "int" }, { "param": "fillRes", "type": "int" }, { "param": "basePath", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "tilesPrefix", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "gridRes", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "fillRes", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "basePath", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 3636, 4723, 6313, 12, 780, 12568, 2244, 16, 203, 1082, 377, 509, 3068, 607, 16, 203, 1082, 377, 509, 3636, 607, 16, 7010, 5411, 514, 9104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 278, 18, 9637, 486, 6156, 2062, 924, 16, 203, 377, 380, 13993, 1338, 10180, 87, 18, 203, 377, 380, 7010, 377, 380, 632, 891, 12568, 2244, 326, 589, 628, 968, 6313, 18, 1969, 358, 326, 12568, 16, 203, 377, 380, 6508, 326, 315, 94, 67, 3113, 315, 94, 91, 67, 3113, 578, 1308, 1633, 261, 73, 18, 75, 18, 315, 75, 19117, 19, 94, 67, 7923, 203, 377, 380, 632, 891, 3068, 607, 326, 7861, 434, 326, 810, 12568, 261, 11926, 203, 377, 380, 506, 279, 7212, 434, 576, 13, 203, 377, 380, 632, 891, 3636, 607, 326, 7861, 434, 326, 876, 2 ]
9aaa2a3ce36bca4e13c1e4a67701a584dc9d37e5
iedadata/geomapapp
haxby/map/GetGrid.java
[ "Apache-2.0" ]
Java
applyMask
null
public static void applyMask(String tilesPrefix, int gridRes, Grid2D grid, String baseUrl) { // setup tile IO Rectangle gridBounds = grid.getBounds(); int maskRes = gridRes; Projection maskProj = ProjectionFactory.getMercator(PIXELS_PER_360 * maskRes); Rectangle maskBaseRect = new Rectangle(0, -PIXELS_PER_NS_HEMISPHERE * maskRes, PIXELS_PER_360 * maskRes, PIXELS_PER_NS_HEMISPHERE * 2 * maskRes); TileIO.Boolean maskIO = new TileIO.Boolean(maskProj, baseUrl + tilesPrefix + "/m_" + maskRes, PIXELS_PER_180, getNLevel(maskRes)); TiledMask maskTiler = new TiledMask(maskProj, maskBaseRect, maskIO, PIXELS_PER_180, 1, null); maskTiler.setWrap(PIXELS_PER_360 * maskRes); // read in grid contents to buffer Rectangle maskBounds = gridBounds; Grid2D.Boolean maskGrid = new Grid2D.Boolean(maskBounds, maskProj); maskGrid = (Grid2D.Boolean)maskTiler.composeGrid(maskGrid); // DEBUG int t = 0; int f = 0; for (int x = gridBounds.x; x < gridBounds.x + gridBounds.width; x++) { for (int y = gridBounds.y; y < gridBounds.y + gridBounds.height; y++) { /*if (maskGrid.booleanValue(x,y)) { grid.setValue(x, y, Float.NaN); t++; } else { f++; }*/ float d = (float) grid.valueAt(x, y); if( !Float.isNaN(d) && d < 0 && maskGrid.valueAt(x, y) == 0) grid.setValue(x, y, Float.NaN); } } //System.out.printf("True: %d\nFalse %d\n", t, f); }
/** * Apply the hi-res mask to the grid, converting all non-hi-res data points to NaNs. * * @param tilesPrefix the name of the directory where the mask * tiles are located, plus the prefix for a masked tile * (e.g. for /path/to/merc320/mask/m_* tilesPrefix is * "mask/m_" * @param gridRes the resolution of the grid to mask * @param grid the grid to mask */
Apply the hi-res mask to the grid, converting all non-hi-res data points to NaNs. @param tilesPrefix the name of the directory where the mask tiles are located, plus the prefix for a masked tile (e.g.
[ "Apply", "the", "hi", "-", "res", "mask", "to", "the", "grid", "converting", "all", "non", "-", "hi", "-", "res", "data", "points", "to", "NaNs", ".", "@param", "tilesPrefix", "the", "name", "of", "the", "directory", "where", "the", "mask", "tiles", "are", "located", "plus", "the", "prefix", "for", "a", "masked", "tile", "(", "e", ".", "g", "." ]
public static void applyMask(String tilesPrefix, int gridRes, Grid2D grid, String baseUrl) { Rectangle gridBounds = grid.getBounds(); int maskRes = gridRes; Projection maskProj = ProjectionFactory.getMercator(PIXELS_PER_360 * maskRes); Rectangle maskBaseRect = new Rectangle(0, -PIXELS_PER_NS_HEMISPHERE * maskRes, PIXELS_PER_360 * maskRes, PIXELS_PER_NS_HEMISPHERE * 2 * maskRes); TileIO.Boolean maskIO = new TileIO.Boolean(maskProj, baseUrl + tilesPrefix + "/m_" + maskRes, PIXELS_PER_180, getNLevel(maskRes)); TiledMask maskTiler = new TiledMask(maskProj, maskBaseRect, maskIO, PIXELS_PER_180, 1, null); maskTiler.setWrap(PIXELS_PER_360 * maskRes); Rectangle maskBounds = gridBounds; Grid2D.Boolean maskGrid = new Grid2D.Boolean(maskBounds, maskProj); maskGrid = (Grid2D.Boolean)maskTiler.composeGrid(maskGrid); int t = 0; int f = 0; for (int x = gridBounds.x; x < gridBounds.x + gridBounds.width; x++) { for (int y = gridBounds.y; y < gridBounds.y + gridBounds.height; y++) { /*if (maskGrid.booleanValue(x,y)) { grid.setValue(x, y, Float.NaN); t++; } else { f++; }*/ float d = (float) grid.valueAt(x, y); if( !Float.isNaN(d) && d < 0 && maskGrid.valueAt(x, y) == 0) grid.setValue(x, y, Float.NaN); } } }
[ "public", "static", "void", "applyMask", "(", "String", "tilesPrefix", ",", "int", "gridRes", ",", "Grid2D", "grid", ",", "String", "baseUrl", ")", "{", "Rectangle", "gridBounds", "=", "grid", ".", "getBounds", "(", ")", ";", "int", "maskRes", "=", "gridRes", ";", "Projection", "maskProj", "=", "ProjectionFactory", ".", "getMercator", "(", "PIXELS_PER_360", "*", "maskRes", ")", ";", "Rectangle", "maskBaseRect", "=", "new", "Rectangle", "(", "0", ",", "-", "PIXELS_PER_NS_HEMISPHERE", "*", "maskRes", ",", "PIXELS_PER_360", "*", "maskRes", ",", "PIXELS_PER_NS_HEMISPHERE", "*", "2", "*", "maskRes", ")", ";", "TileIO", ".", "Boolean", "maskIO", "=", "new", "TileIO", ".", "Boolean", "(", "maskProj", ",", "baseUrl", "+", "tilesPrefix", "+", "\"/m_\"", "+", "maskRes", ",", "PIXELS_PER_180", ",", "getNLevel", "(", "maskRes", ")", ")", ";", "TiledMask", "maskTiler", "=", "new", "TiledMask", "(", "maskProj", ",", "maskBaseRect", ",", "maskIO", ",", "PIXELS_PER_180", ",", "1", ",", "null", ")", ";", "maskTiler", ".", "setWrap", "(", "PIXELS_PER_360", "*", "maskRes", ")", ";", "Rectangle", "maskBounds", "=", "gridBounds", ";", "Grid2D", ".", "Boolean", "maskGrid", "=", "new", "Grid2D", ".", "Boolean", "(", "maskBounds", ",", "maskProj", ")", ";", "maskGrid", "=", "(", "Grid2D", ".", "Boolean", ")", "maskTiler", ".", "composeGrid", "(", "maskGrid", ")", ";", "int", "t", "=", "0", ";", "int", "f", "=", "0", ";", "for", "(", "int", "x", "=", "gridBounds", ".", "x", ";", "x", "<", "gridBounds", ".", "x", "+", "gridBounds", ".", "width", ";", "x", "++", ")", "{", "for", "(", "int", "y", "=", "gridBounds", ".", "y", ";", "y", "<", "gridBounds", ".", "y", "+", "gridBounds", ".", "height", ";", "y", "++", ")", "{", "/*if (maskGrid.booleanValue(x,y)) {\n\t\t grid.setValue(x, y, Float.NaN);\n\t\t t++;\n\t\t} else {\n\t\t f++;\n\t\t}*/", "float", "d", "=", "(", "float", ")", "grid", ".", "valueAt", "(", "x", ",", "y", ")", ";", "if", "(", "!", "Float", ".", "isNaN", "(", "d", ")", "&&", "d", "<", "0", "&&", "maskGrid", ".", "valueAt", "(", "x", ",", "y", ")", "==", "0", ")", "grid", ".", "setValue", "(", "x", ",", "y", ",", "Float", ".", "NaN", ")", ";", "}", "}", "}" ]
Apply the hi-res mask to the grid, converting all non-hi-res data points to NaNs.
[ "Apply", "the", "hi", "-", "res", "mask", "to", "the", "grid", "converting", "all", "non", "-", "hi", "-", "res", "data", "points", "to", "NaNs", "." ]
[ "// setup tile IO", "// read in grid contents to buffer", "// DEBUG", "//System.out.printf(\"True: %d\\nFalse %d\\n\", t, f);" ]
[ { "param": "tilesPrefix", "type": "String" }, { "param": "gridRes", "type": "int" }, { "param": "grid", "type": "Grid2D" }, { "param": "baseUrl", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "tilesPrefix", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "gridRes", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "grid", "type": "Grid2D", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "baseUrl", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2230, 5796, 12, 780, 12568, 2244, 16, 203, 6862, 509, 3068, 607, 16, 203, 6862, 7145, 22, 40, 3068, 16, 514, 9818, 13, 288, 203, 202, 759, 3875, 4769, 1665, 203, 202, 19463, 3068, 5694, 273, 3068, 18, 588, 5694, 5621, 203, 202, 474, 3066, 607, 273, 3068, 607, 31, 203, 202, 14789, 3066, 626, 78, 273, 21288, 1733, 18, 588, 8478, 71, 639, 12, 27381, 2247, 55, 67, 3194, 67, 29751, 380, 3066, 607, 1769, 203, 202, 19463, 3066, 2171, 6120, 273, 394, 13264, 12, 20, 16, 7010, 25083, 4202, 300, 27381, 2247, 55, 67, 3194, 67, 3156, 67, 44, 3375, 45, 3118, 4298, 380, 3066, 607, 16, 203, 25083, 4202, 7024, 60, 2247, 55, 67, 3194, 67, 29751, 380, 3066, 607, 16, 203, 25083, 4202, 7024, 60, 2247, 55, 67, 3194, 67, 3156, 67, 44, 3375, 45, 3118, 4298, 380, 576, 380, 3066, 607, 1769, 203, 202, 9337, 4294, 18, 5507, 3066, 4294, 273, 394, 13791, 4294, 18, 5507, 12, 4455, 626, 78, 16, 203, 25083, 9818, 397, 12568, 2244, 397, 2206, 81, 9548, 397, 3066, 607, 16, 203, 25083, 7024, 60, 2247, 55, 67, 3194, 67, 18278, 16, 203, 25083, 11069, 2355, 12, 4455, 607, 10019, 203, 202, 56, 1411, 5796, 3066, 56, 2895, 273, 394, 399, 1411, 5796, 12, 4455, 626, 78, 16, 203, 25083, 565, 3066, 2171, 6120, 16, 203, 25083, 565, 3066, 4294, 16, 203, 25083, 565, 7024, 60, 2247, 55, 67, 3194, 67, 18278, 16, 203, 25083, 565, 404, 16, 203, 25083, 565, 446, 1769, 203, 202, 4455, 56, 2895, 18, 542, 2964, 12, 27381, 2247, 55, 67, 3194, 67, 29751, 380, 3066, 607, 1769, 203, 202, 759, 855, 316, 3068, 2939, 358, 1613, 203, 202, 19463, 3066, 5694, 273, 3068, 5694, 31, 203, 202, 6313, 22, 40, 18, 5507, 3066, 6313, 273, 394, 7145, 22, 40, 18, 5507, 12, 4455, 5694, 16, 3066, 626, 78, 1769, 203, 202, 4455, 6313, 273, 261, 6313, 22, 40, 18, 5507, 13, 4455, 56, 2895, 18, 23658, 6313, 12, 4455, 6313, 1769, 203, 203, 202, 759, 6369, 203, 202, 474, 268, 273, 374, 31, 203, 202, 474, 284, 273, 374, 31, 203, 203, 202, 1884, 261, 474, 619, 273, 3068, 5694, 18, 92, 31, 619, 411, 3068, 5694, 18, 92, 397, 3068, 5694, 18, 2819, 31, 619, 27245, 288, 203, 202, 565, 364, 261, 474, 677, 273, 3068, 5694, 18, 93, 31, 677, 411, 3068, 5694, 18, 93, 397, 3068, 5694, 18, 4210, 31, 677, 27245, 288, 203, 202, 202, 20308, 430, 261, 4455, 6313, 18, 6494, 620, 12, 92, 16, 93, 3719, 288, 203, 1082, 565, 3068, 18, 542, 620, 12, 92, 16, 677, 16, 5450, 18, 21172, 1769, 203, 1082, 565, 268, 9904, 31, 203, 202, 202, 97, 469, 288, 203, 1082, 565, 284, 9904, 31, 203, 202, 202, 97, 5549, 203, 1082, 202, 5659, 302, 273, 261, 5659, 13, 3068, 18, 1132, 861, 12, 92, 16, 677, 1769, 203, 1082, 202, 430, 12, 401, 4723, 18, 291, 21172, 12, 72, 13, 597, 302, 411, 374, 597, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 377, 380, 5534, 326, 10118, 17, 455, 3066, 358, 326, 3068, 16, 14540, 777, 1661, 17, 12266, 17, 455, 501, 3143, 358, 10180, 87, 18, 203, 377, 380, 7010, 377, 380, 632, 891, 12568, 2244, 326, 508, 434, 326, 1867, 1625, 326, 3066, 203, 377, 380, 12568, 854, 13801, 16, 8737, 326, 1633, 364, 279, 13196, 4769, 203, 377, 380, 261, 73, 18, 75, 18, 364, 342, 803, 19, 869, 19, 6592, 71, 31273, 19, 4455, 19, 81, 67, 14, 12568, 2244, 353, 203, 377, 380, 315, 4455, 19, 81, 9548, 203, 377, 380, 632, 891, 3068, 607, 326, 7861, 434, 326, 3068, 358, 3066, 203, 377, 380, 632, 891, 3068, 326, 3068, 358, 3066, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100 ]
9aaa2a3ce36bca4e13c1e4a67701a584dc9d37e5
iedadata/geomapapp
haxby/map/GetGrid.java
[ "Apache-2.0" ]
Java
main
null
public static void main(String[] args ) { // parse command line arguments if (args.length != 7) { printUsage(args, "wrong arg length: " + args.length); } double[] wesn = new double[] { Double.parseDouble(args[0]), Double.parseDouble(args[1]), Double.parseDouble(args[2]), Double.parseDouble(args[3]) }; int res = Integer.parseInt(args[4]) ; boolean masked = Integer.parseInt(args[5]) == 1; // make sure res is a power of 2 int kres=0; for (kres = 1; kres < 600; kres *= 2) { if (res == kres) { break; } } if (res != kres) { printUsage(args, "res = " + res + ", kres = " + kres + "\t" + res); } // make sure all of the wesn were actually parsed corretly for (int k = 0; k < 4; k++) { if (Double.isNaN(wesn[k])) { printUsage(args, null); } } // wrap wesn while (wesn[0] > wesn[1]) { wesn[0] -= 360.; } while (wesn[1] > wesn[0] + 360.) { wesn[0]-=360.; } while (wesn[0] < 0.) { wesn[1] += 360.; wesn[0] += 360.; } while (wesn[0]>=360.) { wesn[1] -= 360.; wesn[0] -= 360.; } // create unscaled, projected bounding box Mercator merc = ProjectionFactory.getMercator(PIXELS_PER_360); double ymin = merc.getY(wesn[3]); double ymax = merc.getY(wesn[2]); Rectangle2D.Double area = new Rectangle2D.Double( wesn[0] * PIXELS_PER_360 / 360., ymin, (wesn[1] - wesn[0]) * PIXELS_PER_360 / 360., ymax - ymin ); Grid2D.Float grid = null; // try to create the grid try { grid = getGrid(area, 1, res, masked, base, mb_base); } catch (Throwable ex) { System.err.println("An error occured while composing grd file"); System.err.println(ex.getMessage()); if (ex instanceof OutOfMemoryError) { System.err.println("out of memory"); } ex.printStackTrace(System.err); System.exit(1); } // try to create the output file for writing String name = args[6] + ".grd"; FileOutputStream out = null; try { out = new FileOutputStream(name); } catch (Exception ex) { System.err.println("Could not create output file"); System.err.println("ex.getMessage()"); ex.printStackTrace(System.err); System.exit(1); } try { // NetCDFGrid.createStandardGrd(grid, null, (OutputStream) out); } catch (Throwable ex) { System.err.println("An error occured while composing grd file"); System.err.println(ex.getMessage()); if (ex instanceof OutOfMemoryError) { System.err.println("out of memory"); } ex.printStackTrace(System.err); System.exit(1); } }
/** * Construct a grid at a particular resolution that encompasses a WESN bounding box. * * USAGE: * java xb.map.GetGrid <w> <e> <s> <n> <res> <masked> <output file name> * <masked> should be 1 for a masked grid, 0 for an unmasked * grid * <res> must be a power of 2 */
Construct a grid at a particular resolution that encompasses a WESN bounding box. USAGE: java xb.map.GetGrid should be 1 for a masked grid, 0 for an unmasked grid must be a power of 2
[ "Construct", "a", "grid", "at", "a", "particular", "resolution", "that", "encompasses", "a", "WESN", "bounding", "box", ".", "USAGE", ":", "java", "xb", ".", "map", ".", "GetGrid", "should", "be", "1", "for", "a", "masked", "grid", "0", "for", "an", "unmasked", "grid", "must", "be", "a", "power", "of", "2" ]
public static void main(String[] args ) { if (args.length != 7) { printUsage(args, "wrong arg length: " + args.length); } double[] wesn = new double[] { Double.parseDouble(args[0]), Double.parseDouble(args[1]), Double.parseDouble(args[2]), Double.parseDouble(args[3]) }; int res = Integer.parseInt(args[4]) ; boolean masked = Integer.parseInt(args[5]) == 1; int kres=0; for (kres = 1; kres < 600; kres *= 2) { if (res == kres) { break; } } if (res != kres) { printUsage(args, "res = " + res + ", kres = " + kres + "\t" + res); } for (int k = 0; k < 4; k++) { if (Double.isNaN(wesn[k])) { printUsage(args, null); } } while (wesn[0] > wesn[1]) { wesn[0] -= 360.; } while (wesn[1] > wesn[0] + 360.) { wesn[0]-=360.; } while (wesn[0] < 0.) { wesn[1] += 360.; wesn[0] += 360.; } while (wesn[0]>=360.) { wesn[1] -= 360.; wesn[0] -= 360.; } Mercator merc = ProjectionFactory.getMercator(PIXELS_PER_360); double ymin = merc.getY(wesn[3]); double ymax = merc.getY(wesn[2]); Rectangle2D.Double area = new Rectangle2D.Double( wesn[0] * PIXELS_PER_360 / 360., ymin, (wesn[1] - wesn[0]) * PIXELS_PER_360 / 360., ymax - ymin ); Grid2D.Float grid = null; try { grid = getGrid(area, 1, res, masked, base, mb_base); } catch (Throwable ex) { System.err.println("An error occured while composing grd file"); System.err.println(ex.getMessage()); if (ex instanceof OutOfMemoryError) { System.err.println("out of memory"); } ex.printStackTrace(System.err); System.exit(1); } String name = args[6] + ".grd"; FileOutputStream out = null; try { out = new FileOutputStream(name); } catch (Exception ex) { System.err.println("Could not create output file"); System.err.println("ex.getMessage()"); ex.printStackTrace(System.err); System.exit(1); } try { } catch (Throwable ex) { System.err.println("An error occured while composing grd file"); System.err.println(ex.getMessage()); if (ex instanceof OutOfMemoryError) { System.err.println("out of memory"); } ex.printStackTrace(System.err); System.exit(1); } }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "if", "(", "args", ".", "length", "!=", "7", ")", "{", "printUsage", "(", "args", ",", "\"wrong arg length: \"", "+", "args", ".", "length", ")", ";", "}", "double", "[", "]", "wesn", "=", "new", "double", "[", "]", "{", "Double", ".", "parseDouble", "(", "args", "[", "0", "]", ")", ",", "Double", ".", "parseDouble", "(", "args", "[", "1", "]", ")", ",", "Double", ".", "parseDouble", "(", "args", "[", "2", "]", ")", ",", "Double", ".", "parseDouble", "(", "args", "[", "3", "]", ")", "}", ";", "int", "res", "=", "Integer", ".", "parseInt", "(", "args", "[", "4", "]", ")", ";", "boolean", "masked", "=", "Integer", ".", "parseInt", "(", "args", "[", "5", "]", ")", "==", "1", ";", "int", "kres", "=", "0", ";", "for", "(", "kres", "=", "1", ";", "kres", "<", "600", ";", "kres", "*=", "2", ")", "{", "if", "(", "res", "==", "kres", ")", "{", "break", ";", "}", "}", "if", "(", "res", "!=", "kres", ")", "{", "printUsage", "(", "args", ",", "\"res = \"", "+", "res", "+", "\", kres = \"", "+", "kres", "+", "\"\\t\"", "+", "res", ")", ";", "}", "for", "(", "int", "k", "=", "0", ";", "k", "<", "4", ";", "k", "++", ")", "{", "if", "(", "Double", ".", "isNaN", "(", "wesn", "[", "k", "]", ")", ")", "{", "printUsage", "(", "args", ",", "null", ")", ";", "}", "}", "while", "(", "wesn", "[", "0", "]", ">", "wesn", "[", "1", "]", ")", "{", "wesn", "[", "0", "]", "-=", "360.", ";", "}", "while", "(", "wesn", "[", "1", "]", ">", "wesn", "[", "0", "]", "+", "360.", ")", "{", "wesn", "[", "0", "]", "-=", "360.", ";", "}", "while", "(", "wesn", "[", "0", "]", "<", "0.", ")", "{", "wesn", "[", "1", "]", "+=", "360.", ";", "wesn", "[", "0", "]", "+=", "360.", ";", "}", "while", "(", "wesn", "[", "0", "]", ">=", "360.", ")", "{", "wesn", "[", "1", "]", "-=", "360.", ";", "wesn", "[", "0", "]", "-=", "360.", ";", "}", "Mercator", "merc", "=", "ProjectionFactory", ".", "getMercator", "(", "PIXELS_PER_360", ")", ";", "double", "ymin", "=", "merc", ".", "getY", "(", "wesn", "[", "3", "]", ")", ";", "double", "ymax", "=", "merc", ".", "getY", "(", "wesn", "[", "2", "]", ")", ";", "Rectangle2D", ".", "Double", "area", "=", "new", "Rectangle2D", ".", "Double", "(", "wesn", "[", "0", "]", "*", "PIXELS_PER_360", "/", "360.", ",", "ymin", ",", "(", "wesn", "[", "1", "]", "-", "wesn", "[", "0", "]", ")", "*", "PIXELS_PER_360", "/", "360.", ",", "ymax", "-", "ymin", ")", ";", "Grid2D", ".", "Float", "grid", "=", "null", ";", "try", "{", "grid", "=", "getGrid", "(", "area", ",", "1", ",", "res", ",", "masked", ",", "base", ",", "mb_base", ")", ";", "}", "catch", "(", "Throwable", "ex", ")", "{", "System", ".", "err", ".", "println", "(", "\"An error occured while composing grd file\"", ")", ";", "System", ".", "err", ".", "println", "(", "ex", ".", "getMessage", "(", ")", ")", ";", "if", "(", "ex", "instanceof", "OutOfMemoryError", ")", "{", "System", ".", "err", ".", "println", "(", "\"out of memory\"", ")", ";", "}", "ex", ".", "printStackTrace", "(", "System", ".", "err", ")", ";", "System", ".", "exit", "(", "1", ")", ";", "}", "String", "name", "=", "args", "[", "6", "]", "+", "\".grd\"", ";", "FileOutputStream", "out", "=", "null", ";", "try", "{", "out", "=", "new", "FileOutputStream", "(", "name", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", "System", ".", "err", ".", "println", "(", "\"Could not create output file\"", ")", ";", "System", ".", "err", ".", "println", "(", "\"ex.getMessage()\"", ")", ";", "ex", ".", "printStackTrace", "(", "System", ".", "err", ")", ";", "System", ".", "exit", "(", "1", ")", ";", "}", "try", "{", "}", "catch", "(", "Throwable", "ex", ")", "{", "System", ".", "err", ".", "println", "(", "\"An error occured while composing grd file\"", ")", ";", "System", ".", "err", ".", "println", "(", "ex", ".", "getMessage", "(", ")", ")", ";", "if", "(", "ex", "instanceof", "OutOfMemoryError", ")", "{", "System", ".", "err", ".", "println", "(", "\"out of memory\"", ")", ";", "}", "ex", ".", "printStackTrace", "(", "System", ".", "err", ")", ";", "System", ".", "exit", "(", "1", ")", ";", "}", "}" ]
Construct a grid at a particular resolution that encompasses a WESN bounding box.
[ "Construct", "a", "grid", "at", "a", "particular", "resolution", "that", "encompasses", "a", "WESN", "bounding", "box", "." ]
[ "// parse command line arguments", "// make sure res is a power of 2", "// make sure all of the wesn were actually parsed corretly", "// wrap wesn", "// create unscaled, projected bounding box", "// try to create the grid", "// try to create the output file for writing", "// NetCDFGrid.createStandardGrd(grid, null, (OutputStream) out);" ]
[ { "param": "args", "type": "String[]" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2774, 12, 780, 8526, 833, 262, 288, 203, 203, 202, 759, 1109, 1296, 980, 1775, 203, 202, 430, 261, 1968, 18, 2469, 480, 2371, 13, 288, 203, 202, 565, 1172, 5357, 12, 1968, 16, 315, 21530, 1501, 769, 30, 315, 397, 833, 18, 2469, 1769, 203, 202, 97, 203, 203, 202, 9056, 8526, 341, 281, 82, 273, 394, 1645, 8526, 288, 3698, 18, 2670, 5265, 12, 1968, 63, 20, 65, 3631, 203, 6862, 4202, 3698, 18, 2670, 5265, 12, 1968, 63, 21, 65, 3631, 203, 6862, 4202, 3698, 18, 2670, 5265, 12, 1968, 63, 22, 65, 3631, 203, 6862, 4202, 3698, 18, 2670, 5265, 12, 1968, 63, 23, 5717, 289, 31, 203, 202, 474, 400, 273, 2144, 18, 2670, 1702, 12, 1968, 63, 24, 5717, 274, 203, 202, 6494, 13196, 273, 2144, 18, 2670, 1702, 12, 1968, 63, 25, 5717, 422, 404, 31, 203, 1171, 203, 202, 759, 1221, 3071, 400, 353, 279, 7212, 434, 576, 203, 202, 474, 417, 455, 33, 20, 31, 203, 202, 1884, 261, 79, 455, 273, 404, 31, 417, 455, 411, 14707, 31, 417, 455, 6413, 576, 13, 288, 203, 202, 565, 309, 261, 455, 422, 417, 455, 13, 288, 203, 202, 202, 8820, 31, 203, 202, 565, 289, 203, 202, 97, 203, 202, 430, 261, 455, 480, 417, 455, 13, 288, 203, 202, 565, 1172, 5357, 12, 1968, 16, 315, 455, 273, 315, 397, 400, 397, 3104, 417, 455, 273, 315, 397, 417, 455, 397, 1548, 88, 6, 397, 400, 1769, 203, 202, 97, 203, 203, 202, 759, 1221, 3071, 777, 434, 326, 341, 281, 82, 4591, 6013, 2707, 1858, 1349, 715, 203, 202, 1884, 261, 474, 417, 273, 374, 31, 417, 411, 1059, 31, 417, 27245, 288, 203, 202, 565, 309, 261, 5265, 18, 291, 21172, 12, 91, 281, 82, 63, 79, 22643, 288, 203, 202, 202, 1188, 5357, 12, 1968, 16, 446, 1769, 203, 202, 565, 289, 203, 202, 97, 203, 203, 202, 759, 2193, 341, 281, 82, 203, 202, 17523, 261, 91, 281, 82, 63, 20, 65, 405, 341, 281, 82, 63, 21, 5717, 288, 203, 202, 565, 341, 281, 82, 63, 20, 65, 3947, 12360, 18, 31, 203, 202, 97, 203, 202, 17523, 261, 91, 281, 82, 63, 21, 65, 405, 341, 281, 82, 63, 20, 65, 397, 12360, 12998, 288, 203, 202, 565, 341, 281, 82, 63, 20, 65, 17, 33, 29751, 18, 31, 203, 202, 97, 203, 202, 17523, 261, 91, 281, 82, 63, 20, 65, 411, 374, 12998, 288, 203, 202, 565, 341, 281, 82, 63, 21, 65, 1011, 12360, 18, 31, 203, 202, 565, 341, 281, 82, 63, 20, 65, 1011, 12360, 18, 31, 203, 202, 97, 203, 202, 17523, 261, 91, 281, 82, 63, 20, 65, 34, 33, 29751, 12998, 288, 203, 202, 565, 341, 281, 82, 63, 21, 65, 3947, 12360, 18, 31, 203, 202, 565, 341, 281, 82, 63, 20, 65, 3947, 12360, 18, 31, 203, 202, 97, 203, 203, 202, 759, 752, 16804, 12825, 16, 20939, 7552, 3919, 203, 202, 8478, 71, 639, 4045, 71, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 377, 380, 14291, 279, 3068, 622, 279, 6826, 7861, 716, 570, 2919, 428, 281, 279, 678, 3991, 50, 7552, 3919, 18, 203, 377, 380, 203, 377, 380, 11836, 2833, 30, 203, 377, 380, 2252, 15970, 18, 1458, 18, 967, 6313, 411, 91, 34, 411, 73, 34, 225, 1, 411, 82, 34, 411, 455, 34, 411, 23455, 34, 411, 2844, 585, 508, 34, 203, 377, 380, 411, 23455, 34, 1410, 506, 404, 364, 279, 13196, 3068, 16, 374, 364, 392, 640, 23455, 203, 377, 380, 3068, 203, 377, 380, 411, 455, 34, 1297, 506, 279, 7212, 434, 576, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
139d3d41e24f371c7bf059be2a1029dcf19a2bdc
iedadata/geomapapp
haxby/map/MapTools.java
[ "Apache-2.0" ]
Java
accept
null
public boolean accept(File f) { if (f.isDirectory()) { return true; } String extension = f.getPath().substring( f.getPath().lastIndexOf(".") ); if (extension != null) { if (extension.equals("tiff") || extension.equals("tif") ) { return true; } else { return false; } } return false; }
//Accept all directories and all tiff files.
Accept all directories and all tiff files.
[ "Accept", "all", "directories", "and", "all", "tiff", "files", "." ]
public boolean accept(File f) { if (f.isDirectory()) { return true; } String extension = f.getPath().substring( f.getPath().lastIndexOf(".") ); if (extension != null) { if (extension.equals("tiff") || extension.equals("tif") ) { return true; } else { return false; } } return false; }
[ "public", "boolean", "accept", "(", "File", "f", ")", "{", "if", "(", "f", ".", "isDirectory", "(", ")", ")", "{", "return", "true", ";", "}", "String", "extension", "=", "f", ".", "getPath", "(", ")", ".", "substring", "(", "f", ".", "getPath", "(", ")", ".", "lastIndexOf", "(", "\".\"", ")", ")", ";", "if", "(", "extension", "!=", "null", ")", "{", "if", "(", "extension", ".", "equals", "(", "\"tiff\"", ")", "||", "extension", ".", "equals", "(", "\"tif\"", ")", ")", "{", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}", "return", "false", ";", "}" ]
Accept all directories and all tiff files.
[ "Accept", "all", "directories", "and", "all", "tiff", "files", "." ]
[]
[ { "param": "f", "type": "File" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "f", "type": "File", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 2791, 12, 812, 284, 13, 288, 203, 1082, 202, 430, 261, 74, 18, 291, 2853, 10756, 288, 203, 9506, 202, 2463, 638, 31, 203, 1082, 202, 97, 203, 1082, 202, 780, 2710, 273, 284, 18, 588, 743, 7675, 28023, 12, 284, 18, 588, 743, 7675, 2722, 31985, 2932, 1199, 13, 11272, 203, 1082, 202, 430, 261, 6447, 480, 446, 13, 288, 203, 9506, 202, 430, 261, 6447, 18, 14963, 2932, 88, 3048, 7923, 747, 2710, 18, 14963, 2932, 26922, 7923, 262, 288, 203, 6862, 202, 2463, 638, 31, 203, 9506, 202, 97, 469, 288, 203, 6862, 202, 2463, 629, 31, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 1082, 202, 2463, 629, 31, 203, 202, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 5933, 777, 6402, 471, 777, 268, 3048, 1390, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
ee5bc53ac7c1f9f5ab19107d595252cc7bbaf84b
iedadata/geomapapp
org/geomapapp/grid/ImportGrid.java
[ "Apache-2.0" ]
Java
appendNewText
null
protected void appendNewText(final String txt) { Runnable runnable = new UpdateArea(); Thread thread = new Thread(runnable); areaText = txt; thread.start(); }
/* * append new text to the Import Grid log area */
append new text to the Import Grid log area
[ "append", "new", "text", "to", "the", "Import", "Grid", "log", "area" ]
protected void appendNewText(final String txt) { Runnable runnable = new UpdateArea(); Thread thread = new Thread(runnable); areaText = txt; thread.start(); }
[ "protected", "void", "appendNewText", "(", "final", "String", "txt", ")", "{", "Runnable", "runnable", "=", "new", "UpdateArea", "(", ")", ";", "Thread", "thread", "=", "new", "Thread", "(", "runnable", ")", ";", "areaText", "=", "txt", ";", "thread", ".", "start", "(", ")", ";", "}" ]
append new text to the Import Grid log area
[ "append", "new", "text", "to", "the", "Import", "Grid", "log", "area" ]
[]
[ { "param": "txt", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "txt", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 714, 1908, 1528, 12, 6385, 514, 6463, 13, 288, 203, 202, 202, 20013, 14685, 273, 394, 2315, 5484, 5621, 203, 202, 202, 3830, 2650, 273, 394, 4884, 12, 2681, 6914, 1769, 203, 202, 202, 5036, 1528, 273, 6463, 31, 203, 202, 202, 5930, 18, 1937, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 714, 394, 977, 358, 326, 6164, 7145, 613, 5091, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
ee5bc53ac7c1f9f5ab19107d595252cc7bbaf84b
iedadata/geomapapp
org/geomapapp/grid/ImportGrid.java
[ "Apache-2.0" ]
Java
displayWaitingDots
null
protected void displayWaitingDots() { Runnable runnable = new WaitingDots(); Thread thread = new Thread(runnable); thread.start(); }
/* * Add a Please Wait... message top the Import Grid log area. * Add a new . every 2s until the global variable 'waiting' is set to false. */
Add a Please Wait... message top the Import Grid log area. Add a new . every 2s until the global variable 'waiting' is set to false.
[ "Add", "a", "Please", "Wait", "...", "message", "top", "the", "Import", "Grid", "log", "area", ".", "Add", "a", "new", ".", "every", "2s", "until", "the", "global", "variable", "'", "waiting", "'", "is", "set", "to", "false", "." ]
protected void displayWaitingDots() { Runnable runnable = new WaitingDots(); Thread thread = new Thread(runnable); thread.start(); }
[ "protected", "void", "displayWaitingDots", "(", ")", "{", "Runnable", "runnable", "=", "new", "WaitingDots", "(", ")", ";", "Thread", "thread", "=", "new", "Thread", "(", "runnable", ")", ";", "thread", ".", "start", "(", ")", ";", "}" ]
Add a Please Wait... message top the Import Grid log area.
[ "Add", "a", "Please", "Wait", "...", "message", "top", "the", "Import", "Grid", "log", "area", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 2562, 15946, 40, 6968, 1435, 288, 203, 202, 202, 20013, 14685, 273, 394, 23333, 40, 6968, 5621, 203, 202, 202, 3830, 2650, 273, 394, 4884, 12, 2681, 6914, 1769, 203, 202, 202, 5930, 18, 1937, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 1436, 279, 7801, 5838, 2777, 883, 1760, 326, 6164, 7145, 613, 5091, 18, 203, 202, 380, 1436, 279, 394, 263, 3614, 576, 87, 3180, 326, 2552, 2190, 296, 20241, 11, 353, 444, 358, 629, 18, 7010, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
78c67a79278f9a6813749dee9da0e113b0768aaa
iedadata/geomapapp
haxby/db/mgg/MGGSelector.java
[ "Apache-2.0" ]
Java
addToCachedTracks
null
private void addToCachedTracks(MGGTrack track) { for (int i=0; i<cachedTracks.length; i++) { MGGTrack[] tracks = cachedTracks[i]; if (tracks != null) { int size = tracks.length; MGGTrack[] tmp = new MGGTrack[size + 1]; System.arraycopy(tracks, 0, tmp, 0, size); tmp[size] = track; cachedTracks[i] = tmp; } } }
/* * add a new track to any cached track arrays */
add a new track to any cached track arrays
[ "add", "a", "new", "track", "to", "any", "cached", "track", "arrays" ]
private void addToCachedTracks(MGGTrack track) { for (int i=0; i<cachedTracks.length; i++) { MGGTrack[] tracks = cachedTracks[i]; if (tracks != null) { int size = tracks.length; MGGTrack[] tmp = new MGGTrack[size + 1]; System.arraycopy(tracks, 0, tmp, 0, size); tmp[size] = track; cachedTracks[i] = tmp; } } }
[ "private", "void", "addToCachedTracks", "(", "MGGTrack", "track", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "cachedTracks", ".", "length", ";", "i", "++", ")", "{", "MGGTrack", "[", "]", "tracks", "=", "cachedTracks", "[", "i", "]", ";", "if", "(", "tracks", "!=", "null", ")", "{", "int", "size", "=", "tracks", ".", "length", ";", "MGGTrack", "[", "]", "tmp", "=", "new", "MGGTrack", "[", "size", "+", "1", "]", ";", "System", ".", "arraycopy", "(", "tracks", ",", "0", ",", "tmp", ",", "0", ",", "size", ")", ";", "tmp", "[", "size", "]", "=", "track", ";", "cachedTracks", "[", "i", "]", "=", "tmp", ";", "}", "}", "}" ]
add a new track to any cached track arrays
[ "add", "a", "new", "track", "to", "any", "cached", "track", "arrays" ]
[]
[ { "param": "track", "type": "MGGTrack" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "track", "type": "MGGTrack", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 9604, 9839, 22138, 12, 49, 19491, 4402, 3298, 13, 288, 203, 202, 202, 1884, 261, 474, 277, 33, 20, 31, 277, 32, 7097, 22138, 18, 2469, 31, 277, 27245, 288, 203, 1082, 202, 49, 19491, 4402, 8526, 13933, 273, 3472, 22138, 63, 77, 15533, 7010, 1082, 202, 430, 261, 21499, 480, 446, 13, 288, 203, 9506, 202, 474, 963, 273, 13933, 18, 2469, 31, 203, 9506, 202, 49, 19491, 4402, 8526, 1853, 273, 394, 490, 19491, 4402, 63, 1467, 397, 404, 15533, 203, 9506, 202, 3163, 18, 1126, 3530, 12, 21499, 16, 374, 16, 1853, 16, 374, 16, 963, 1769, 203, 9506, 202, 5645, 63, 1467, 65, 273, 3298, 31, 203, 9506, 202, 7097, 22138, 63, 77, 65, 273, 1853, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 202, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 527, 279, 394, 3298, 358, 1281, 3472, 3298, 5352, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
78c67a79278f9a6813749dee9da0e113b0768aaa
iedadata/geomapapp
haxby/db/mgg/MGGSelector.java
[ "Apache-2.0" ]
Java
removeImportedFromCache
null
private void removeImportedFromCache(String name) { for (int i=0; i<cachedTracks.length; i++) { MGGTrack[] tracks = cachedTracks[i]; if (tracks != null) { ArrayList<MGGTrack> tracksList = new ArrayList<MGGTrack>(); boolean importedFiles = false; for (MGGTrack t : tracks) { if ( t.getName().equals(MGG.IMPORT_TRACK_LINE.getName()) ) importedFiles = true; if ( importedFiles && t.getName().equals(name) ) continue; tracksList.add(t); } tracks = new MGGTrack[tracksList.size()]; tracks = tracksList.toArray(tracks); cachedTracks[i] = tracks; } } }
/* * remove any imported tracks that match the input name from the cached tracks */
remove any imported tracks that match the input name from the cached tracks
[ "remove", "any", "imported", "tracks", "that", "match", "the", "input", "name", "from", "the", "cached", "tracks" ]
private void removeImportedFromCache(String name) { for (int i=0; i<cachedTracks.length; i++) { MGGTrack[] tracks = cachedTracks[i]; if (tracks != null) { ArrayList<MGGTrack> tracksList = new ArrayList<MGGTrack>(); boolean importedFiles = false; for (MGGTrack t : tracks) { if ( t.getName().equals(MGG.IMPORT_TRACK_LINE.getName()) ) importedFiles = true; if ( importedFiles && t.getName().equals(name) ) continue; tracksList.add(t); } tracks = new MGGTrack[tracksList.size()]; tracks = tracksList.toArray(tracks); cachedTracks[i] = tracks; } } }
[ "private", "void", "removeImportedFromCache", "(", "String", "name", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "cachedTracks", ".", "length", ";", "i", "++", ")", "{", "MGGTrack", "[", "]", "tracks", "=", "cachedTracks", "[", "i", "]", ";", "if", "(", "tracks", "!=", "null", ")", "{", "ArrayList", "<", "MGGTrack", ">", "tracksList", "=", "new", "ArrayList", "<", "MGGTrack", ">", "(", ")", ";", "boolean", "importedFiles", "=", "false", ";", "for", "(", "MGGTrack", "t", ":", "tracks", ")", "{", "if", "(", "t", ".", "getName", "(", ")", ".", "equals", "(", "MGG", ".", "IMPORT_TRACK_LINE", ".", "getName", "(", ")", ")", ")", "importedFiles", "=", "true", ";", "if", "(", "importedFiles", "&&", "t", ".", "getName", "(", ")", ".", "equals", "(", "name", ")", ")", "continue", ";", "tracksList", ".", "add", "(", "t", ")", ";", "}", "tracks", "=", "new", "MGGTrack", "[", "tracksList", ".", "size", "(", ")", "]", ";", "tracks", "=", "tracksList", ".", "toArray", "(", "tracks", ")", ";", "cachedTracks", "[", "i", "]", "=", "tracks", ";", "}", "}", "}" ]
remove any imported tracks that match the input name from the cached tracks
[ "remove", "any", "imported", "tracks", "that", "match", "the", "input", "name", "from", "the", "cached", "tracks" ]
[]
[ { "param": "name", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "name", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1206, 24934, 19800, 12, 780, 508, 13, 288, 203, 1082, 203, 202, 202, 1884, 261, 474, 277, 33, 20, 31, 277, 32, 7097, 22138, 18, 2469, 31, 277, 27245, 288, 203, 1082, 202, 49, 19491, 4402, 8526, 13933, 273, 3472, 22138, 63, 77, 15533, 7010, 1082, 202, 430, 261, 21499, 480, 446, 13, 288, 203, 9506, 202, 19558, 32, 49, 19491, 4402, 34, 13933, 682, 273, 394, 2407, 32, 49, 19491, 4402, 34, 5621, 203, 9506, 202, 6494, 9101, 2697, 273, 629, 31, 203, 9506, 202, 1884, 261, 49, 19491, 4402, 268, 294, 225, 13933, 13, 288, 203, 6862, 202, 430, 261, 268, 18, 17994, 7675, 14963, 12, 49, 19491, 18, 20445, 67, 28720, 67, 5997, 18, 17994, 10756, 262, 9101, 2697, 273, 638, 31, 203, 6862, 202, 430, 261, 9101, 2697, 597, 268, 18, 17994, 7675, 14963, 12, 529, 13, 262, 1324, 31, 203, 6862, 202, 21499, 682, 18, 1289, 12, 88, 1769, 203, 9506, 202, 97, 203, 6862, 203, 9506, 202, 21499, 273, 394, 490, 19491, 4402, 63, 21499, 682, 18, 1467, 1435, 15533, 203, 9506, 202, 21499, 273, 13933, 682, 18, 31447, 12, 21499, 1769, 203, 9506, 202, 7097, 22138, 63, 77, 65, 273, 13933, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 202, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
3674f6d6766adc91595eabe558759e17a0837611
iedadata/geomapapp
haxby/util/BrowserControl.java
[ "Apache-2.0" ]
Java
isWindowsPlatform
null
public static boolean isWindowsPlatform() { String os = System.getProperty("os.name"); if ( os != null && os.startsWith(WIN_ID)) return true; else return false; }
/** * Try to determine whether this application is running under Windows * or some other platform by examing the "os.name" property. * * @return true if this application is running under a Windows OS */
Try to determine whether this application is running under Windows or some other platform by examing the "os.name" property. @return true if this application is running under a Windows OS
[ "Try", "to", "determine", "whether", "this", "application", "is", "running", "under", "Windows", "or", "some", "other", "platform", "by", "examing", "the", "\"", "os", ".", "name", "\"", "property", ".", "@return", "true", "if", "this", "application", "is", "running", "under", "a", "Windows", "OS" ]
public static boolean isWindowsPlatform() { String os = System.getProperty("os.name"); if ( os != null && os.startsWith(WIN_ID)) return true; else return false; }
[ "public", "static", "boolean", "isWindowsPlatform", "(", ")", "{", "String", "os", "=", "System", ".", "getProperty", "(", "\"os.name\"", ")", ";", "if", "(", "os", "!=", "null", "&&", "os", ".", "startsWith", "(", "WIN_ID", ")", ")", "return", "true", ";", "else", "return", "false", ";", "}" ]
Try to determine whether this application is running under Windows or some other platform by examing the "os.name" property.
[ "Try", "to", "determine", "whether", "this", "application", "is", "running", "under", "Windows", "or", "some", "other", "platform", "by", "examing", "the", "\"", "os", ".", "name", "\"", "property", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 1250, 353, 10399, 8201, 1435, 288, 203, 202, 202, 780, 1140, 273, 2332, 18, 588, 1396, 2932, 538, 18, 529, 8863, 203, 202, 202, 430, 261, 1140, 480, 446, 597, 1140, 18, 17514, 1190, 12, 24572, 67, 734, 3719, 203, 1082, 202, 2463, 638, 31, 203, 202, 202, 12107, 203, 1082, 202, 2463, 629, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 6161, 358, 4199, 2856, 333, 2521, 353, 3549, 3613, 8202, 203, 202, 380, 578, 2690, 1308, 4072, 635, 431, 7772, 326, 315, 538, 18, 529, 6, 1272, 18, 203, 202, 380, 203, 202, 380, 632, 2463, 638, 309, 333, 2521, 353, 3549, 3613, 279, 8202, 5932, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
97d82652bc6062155c079bbbf280eed9db2a5e95
iedadata/geomapapp
haxby/db/custom/KMLExport.java
[ "Apache-2.0" ]
Java
processString
String
private static String processString(String str) { String nStr = str; int i = 0; while (i < nStr.length()) { if (Character.isIdentifierIgnorable(nStr.charAt(i))) nStr = nStr.substring(0, i) + nStr.substring(i+1); else i++; } return nStr; }
/** * Remove all noncharacter data * @param str * @return */
Remove all noncharacter data @param str @return
[ "Remove", "all", "noncharacter", "data", "@param", "str", "@return" ]
private static String processString(String str) { String nStr = str; int i = 0; while (i < nStr.length()) { if (Character.isIdentifierIgnorable(nStr.charAt(i))) nStr = nStr.substring(0, i) + nStr.substring(i+1); else i++; } return nStr; }
[ "private", "static", "String", "processString", "(", "String", "str", ")", "{", "String", "nStr", "=", "str", ";", "int", "i", "=", "0", ";", "while", "(", "i", "<", "nStr", ".", "length", "(", ")", ")", "{", "if", "(", "Character", ".", "isIdentifierIgnorable", "(", "nStr", ".", "charAt", "(", "i", ")", ")", ")", "nStr", "=", "nStr", ".", "substring", "(", "0", ",", "i", ")", "+", "nStr", ".", "substring", "(", "i", "+", "1", ")", ";", "else", "i", "++", ";", "}", "return", "nStr", ";", "}" ]
Remove all noncharacter data @param str @return
[ "Remove", "all", "noncharacter", "data", "@param", "str", "@return" ]
[]
[ { "param": "str", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "str", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 514, 1207, 780, 12, 780, 609, 13, 288, 206, 203, 202, 202, 780, 290, 1585, 273, 609, 31, 206, 203, 202, 202, 474, 277, 273, 374, 31, 206, 203, 202, 202, 17523, 261, 77, 411, 290, 1585, 18, 2469, 10756, 288, 206, 203, 1082, 202, 430, 261, 7069, 18, 291, 3004, 45, 1600, 15514, 12, 82, 1585, 18, 3001, 861, 12, 77, 20349, 206, 203, 9506, 202, 82, 1585, 273, 290, 1585, 18, 28023, 12, 20, 16, 277, 13, 397, 290, 1585, 18, 28023, 12, 77, 15, 21, 1769, 206, 203, 1082, 202, 12107, 206, 203, 9506, 202, 77, 9904, 31, 206, 203, 202, 202, 97, 206, 203, 202, 202, 2463, 290, 1585, 31, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 206, 203, 202, 380, 3581, 777, 1661, 11560, 501, 206, 203, 202, 380, 632, 891, 609, 206, 203, 202, 380, 632, 2463, 206, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
49d06e5249221c95ec6dc4499913e394032dcb6a
iedadata/geomapapp
haxby/worldwind/layers/GridTileLayer.java
[ "Apache-2.0" ]
Java
resizeImage
BufferedImage
private static BufferedImage resizeImage(BufferedImage sample, double sampleMinLat, double sampleMaxLat, double tileMinLat, double tileMaxLat) { BufferedImage img = new BufferedImage(TILE_SIZE, TILE_SIZE, sample.getType()); double tileScale = TILE_SIZE / (tileMinLat - tileMaxLat); // s for source; d for destination; all measurements in pixels int sx1 = 0; int sy1 = 0; int sx2 = sample.getWidth(); int sy2 = sample.getHeight(); int dx1 = 0; int dy1 = (int) ((sampleMaxLat - tileMaxLat) * tileScale); int dx2 = TILE_SIZE; int dy2 = (int) ((sampleMinLat - tileMaxLat) * tileScale); img.createGraphics().drawImage(sample, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null); return img; }
/** * Takes an Buffered Image and resizes it to TILE_SIZE x TILE_SIZE */
Takes an Buffered Image and resizes it to TILE_SIZE x TILE_SIZE
[ "Takes", "an", "Buffered", "Image", "and", "resizes", "it", "to", "TILE_SIZE", "x", "TILE_SIZE" ]
private static BufferedImage resizeImage(BufferedImage sample, double sampleMinLat, double sampleMaxLat, double tileMinLat, double tileMaxLat) { BufferedImage img = new BufferedImage(TILE_SIZE, TILE_SIZE, sample.getType()); double tileScale = TILE_SIZE / (tileMinLat - tileMaxLat); int sx1 = 0; int sy1 = 0; int sx2 = sample.getWidth(); int sy2 = sample.getHeight(); int dx1 = 0; int dy1 = (int) ((sampleMaxLat - tileMaxLat) * tileScale); int dx2 = TILE_SIZE; int dy2 = (int) ((sampleMinLat - tileMaxLat) * tileScale); img.createGraphics().drawImage(sample, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null); return img; }
[ "private", "static", "BufferedImage", "resizeImage", "(", "BufferedImage", "sample", ",", "double", "sampleMinLat", ",", "double", "sampleMaxLat", ",", "double", "tileMinLat", ",", "double", "tileMaxLat", ")", "{", "BufferedImage", "img", "=", "new", "BufferedImage", "(", "TILE_SIZE", ",", "TILE_SIZE", ",", "sample", ".", "getType", "(", ")", ")", ";", "double", "tileScale", "=", "TILE_SIZE", "/", "(", "tileMinLat", "-", "tileMaxLat", ")", ";", "int", "sx1", "=", "0", ";", "int", "sy1", "=", "0", ";", "int", "sx2", "=", "sample", ".", "getWidth", "(", ")", ";", "int", "sy2", "=", "sample", ".", "getHeight", "(", ")", ";", "int", "dx1", "=", "0", ";", "int", "dy1", "=", "(", "int", ")", "(", "(", "sampleMaxLat", "-", "tileMaxLat", ")", "*", "tileScale", ")", ";", "int", "dx2", "=", "TILE_SIZE", ";", "int", "dy2", "=", "(", "int", ")", "(", "(", "sampleMinLat", "-", "tileMaxLat", ")", "*", "tileScale", ")", ";", "img", ".", "createGraphics", "(", ")", ".", "drawImage", "(", "sample", ",", "dx1", ",", "dy1", ",", "dx2", ",", "dy2", ",", "sx1", ",", "sy1", ",", "sx2", ",", "sy2", ",", "null", ")", ";", "return", "img", ";", "}" ]
Takes an Buffered Image and resizes it to TILE_SIZE x TILE_SIZE
[ "Takes", "an", "Buffered", "Image", "and", "resizes", "it", "to", "TILE_SIZE", "x", "TILE_SIZE" ]
[ "// s for source; d for destination; all measurements in pixels\r" ]
[ { "param": "sample", "type": "BufferedImage" }, { "param": "sampleMinLat", "type": "double" }, { "param": "sampleMaxLat", "type": "double" }, { "param": "tileMinLat", "type": "double" }, { "param": "tileMaxLat", "type": "double" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "sample", "type": "BufferedImage", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sampleMinLat", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sampleMaxLat", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "tileMinLat", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "tileMaxLat", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 12362, 7041, 2040, 12, 17947, 2040, 3296, 16, 1645, 3296, 2930, 6607, 16, 1645, 3296, 2747, 6607, 16, 1645, 4769, 2930, 6607, 16, 1645, 4769, 2747, 6607, 13, 288, 206, 203, 1082, 202, 17947, 2040, 3774, 273, 394, 12362, 12, 56, 13578, 67, 4574, 16, 399, 13578, 67, 4574, 16, 3296, 18, 588, 559, 10663, 206, 203, 1082, 202, 9056, 4769, 5587, 273, 399, 13578, 67, 4574, 342, 261, 15368, 2930, 6607, 300, 4769, 2747, 6607, 1769, 206, 203, 206, 203, 1082, 202, 759, 272, 364, 1084, 31, 302, 364, 2929, 31, 777, 16725, 316, 8948, 206, 203, 1082, 202, 474, 13280, 21, 273, 374, 31, 206, 203, 1082, 202, 474, 1393, 21, 273, 374, 31, 206, 203, 1082, 202, 474, 13280, 22, 273, 3296, 18, 588, 2384, 5621, 206, 203, 1082, 202, 474, 1393, 22, 273, 3296, 18, 588, 2686, 5621, 206, 203, 206, 203, 1082, 202, 474, 6633, 21, 273, 374, 31, 206, 203, 1082, 202, 474, 7732, 21, 273, 261, 474, 13, 14015, 6358, 2747, 6607, 300, 4769, 2747, 6607, 13, 380, 4769, 5587, 1769, 206, 203, 1082, 202, 474, 6633, 22, 273, 399, 13578, 67, 4574, 31, 206, 203, 1082, 202, 474, 7732, 22, 273, 261, 474, 13, 14015, 6358, 2930, 6607, 300, 4769, 2747, 6607, 13, 380, 4769, 5587, 1769, 206, 203, 206, 203, 1082, 202, 6081, 18, 2640, 17558, 7675, 9446, 2040, 12, 6358, 16, 6633, 21, 16, 7732, 21, 16, 6633, 22, 16, 7732, 22, 16, 13280, 21, 16, 1393, 21, 16, 13280, 22, 16, 1393, 22, 16, 446, 1769, 206, 203, 206, 203, 1082, 202, 2463, 3774, 31, 206, 203, 202, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 206, 203, 1082, 380, 202, 11524, 392, 5987, 3421, 471, 400, 3128, 518, 358, 399, 13578, 67, 4574, 619, 399, 13578, 67, 4574, 9760, 203, 1082, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
381ed07ccf731bc9935a0ca921d17fa71f14ecee
iedadata/geomapapp
haxby/db/surveyplanner/SurveyPlannerSelector.java
[ "Apache-2.0" ]
Java
readyToSubmit
null
private boolean readyToSubmit() { if (sp.importLines) return false; if (sp.waypoints) return false; if (importLinesRB.isSelected() && sp.getSurveyLines().size() > 0) return true; return (GeneralUtils.isDouble(startLatTF.getText()) && GeneralUtils.isDouble(startLonTF.getText()) && GeneralUtils.isDouble(endLatTF.getText()) && GeneralUtils.isDouble(endLonTF.getText()) && (GeneralUtils.isInteger(numLinesTF.getText()) && Integer.parseInt(numLinesTF.getText()) > 0) && ( !enableSpacing() || (gapTF.isEnabled() && GeneralUtils.isDouble(gapTF.getText())) // || (autoGapCB.isSelected() && GeneralUtils.isDouble(swathTF.getText()) && // GeneralUtils.isDouble(overlapTF.getText())) )); }
/* *check whether enough fields have been filled *in the right format so that we can start calculating survey lines */
check whether enough fields have been filled in the right format so that we can start calculating survey lines
[ "check", "whether", "enough", "fields", "have", "been", "filled", "in", "the", "right", "format", "so", "that", "we", "can", "start", "calculating", "survey", "lines" ]
private boolean readyToSubmit() { if (sp.importLines) return false; if (sp.waypoints) return false; if (importLinesRB.isSelected() && sp.getSurveyLines().size() > 0) return true; return (GeneralUtils.isDouble(startLatTF.getText()) && GeneralUtils.isDouble(startLonTF.getText()) && GeneralUtils.isDouble(endLatTF.getText()) && GeneralUtils.isDouble(endLonTF.getText()) && (GeneralUtils.isInteger(numLinesTF.getText()) && Integer.parseInt(numLinesTF.getText()) > 0) && ( !enableSpacing() || (gapTF.isEnabled() && GeneralUtils.isDouble(gapTF.getText())) )); }
[ "private", "boolean", "readyToSubmit", "(", ")", "{", "if", "(", "sp", ".", "importLines", ")", "return", "false", ";", "if", "(", "sp", ".", "waypoints", ")", "return", "false", ";", "if", "(", "importLinesRB", ".", "isSelected", "(", ")", "&&", "sp", ".", "getSurveyLines", "(", ")", ".", "size", "(", ")", ">", "0", ")", "return", "true", ";", "return", "(", "GeneralUtils", ".", "isDouble", "(", "startLatTF", ".", "getText", "(", ")", ")", "&&", "GeneralUtils", ".", "isDouble", "(", "startLonTF", ".", "getText", "(", ")", ")", "&&", "GeneralUtils", ".", "isDouble", "(", "endLatTF", ".", "getText", "(", ")", ")", "&&", "GeneralUtils", ".", "isDouble", "(", "endLonTF", ".", "getText", "(", ")", ")", "&&", "(", "GeneralUtils", ".", "isInteger", "(", "numLinesTF", ".", "getText", "(", ")", ")", "&&", "Integer", ".", "parseInt", "(", "numLinesTF", ".", "getText", "(", ")", ")", ">", "0", ")", "&&", "(", "!", "enableSpacing", "(", ")", "||", "(", "gapTF", ".", "isEnabled", "(", ")", "&&", "GeneralUtils", ".", "isDouble", "(", "gapTF", ".", "getText", "(", ")", ")", ")", ")", ")", ";", "}" ]
check whether enough fields have been filled in the right format so that we can start calculating survey lines
[ "check", "whether", "enough", "fields", "have", "been", "filled", "in", "the", "right", "format", "so", "that", "we", "can", "start", "calculating", "survey", "lines" ]
[ "//\t\t\t\t|| (autoGapCB.isSelected() && GeneralUtils.isDouble(swathTF.getText()) &&", "//\t\t\t\t\t\t GeneralUtils.isDouble(overlapTF.getText()))" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 1250, 5695, 774, 11620, 1435, 288, 203, 202, 202, 430, 261, 1752, 18, 5666, 5763, 13, 327, 629, 31, 203, 202, 202, 430, 261, 1752, 18, 1888, 4139, 13, 327, 629, 31, 203, 202, 202, 430, 261, 5666, 5763, 19437, 18, 291, 7416, 1435, 597, 1694, 18, 588, 22165, 5763, 7675, 1467, 1435, 405, 374, 13, 327, 638, 31, 203, 202, 202, 2463, 261, 12580, 1989, 18, 291, 5265, 12, 1937, 6607, 17963, 18, 588, 1528, 10756, 597, 203, 9506, 202, 12580, 1989, 18, 291, 5265, 12, 1937, 15927, 17963, 18, 588, 1528, 10756, 597, 203, 9506, 202, 12580, 1989, 18, 291, 5265, 12, 409, 6607, 17963, 18, 588, 1528, 10756, 597, 203, 9506, 202, 12580, 1989, 18, 291, 5265, 12, 409, 15927, 17963, 18, 588, 1528, 10756, 597, 203, 9506, 202, 12, 12580, 1989, 18, 291, 4522, 12, 2107, 5763, 17963, 18, 588, 1528, 10756, 597, 2144, 18, 2670, 1702, 12, 2107, 5763, 17963, 18, 588, 1528, 10756, 405, 374, 13, 597, 203, 9506, 202, 12, 401, 7589, 18006, 1435, 747, 202, 203, 6862, 261, 14048, 17963, 18, 291, 1526, 1435, 597, 9544, 1989, 18, 291, 5265, 12, 14048, 17963, 18, 588, 1528, 1435, 3719, 225, 203, 759, 9506, 202, 20081, 261, 6079, 14001, 8876, 18, 291, 7416, 1435, 597, 9544, 1989, 18, 291, 5265, 12, 5328, 421, 17963, 18, 588, 1528, 10756, 597, 203, 759, 6862, 1082, 9544, 1989, 18, 291, 5265, 12, 17946, 17963, 18, 588, 1528, 1435, 3719, 203, 9506, 202, 10019, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
381ed07ccf731bc9935a0ca921d17fa71f14ecee
iedadata/geomapapp
haxby/db/surveyplanner/SurveyPlannerSelector.java
[ "Apache-2.0" ]
Java
drawLine
null
void drawLine() { if( currentPath==null || sp.waypoints )return; double wrap = map.getWrap(); synchronized(map.getTreeLock()) { Graphics2D g = map.getGraphics2D(); g.setStroke( new BasicStroke(2f/(float)map.getZoom()) ); //g.setColor( Color.red ); g.setXORMode(Color.white); g.draw( currentPath ); if( wrap>0.) { g.translate(wrap,0.); g.draw( currentPath ); } } }
/* * draw the line on the screen */
draw the line on the screen
[ "draw", "the", "line", "on", "the", "screen" ]
void drawLine() { if( currentPath==null || sp.waypoints )return; double wrap = map.getWrap(); synchronized(map.getTreeLock()) { Graphics2D g = map.getGraphics2D(); g.setStroke( new BasicStroke(2f/(float)map.getZoom()) ); g.setXORMode(Color.white); g.draw( currentPath ); if( wrap>0.) { g.translate(wrap,0.); g.draw( currentPath ); } } }
[ "void", "drawLine", "(", ")", "{", "if", "(", "currentPath", "==", "null", "||", "sp", ".", "waypoints", ")", "return", ";", "double", "wrap", "=", "map", ".", "getWrap", "(", ")", ";", "synchronized", "(", "map", ".", "getTreeLock", "(", ")", ")", "{", "Graphics2D", "g", "=", "map", ".", "getGraphics2D", "(", ")", ";", "g", ".", "setStroke", "(", "new", "BasicStroke", "(", "2f", "/", "(", "float", ")", "map", ".", "getZoom", "(", ")", ")", ")", ";", "g", ".", "setXORMode", "(", "Color", ".", "white", ")", ";", "g", ".", "draw", "(", "currentPath", ")", ";", "if", "(", "wrap", ">", "0.", ")", "{", "g", ".", "translate", "(", "wrap", ",", "0.", ")", ";", "g", ".", "draw", "(", "currentPath", ")", ";", "}", "}", "}" ]
draw the line on the screen
[ "draw", "the", "line", "on", "the", "screen" ]
[ "//g.setColor( Color.red );" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 918, 30732, 1435, 288, 203, 202, 202, 430, 12, 18027, 631, 2011, 747, 1694, 18, 1888, 4139, 262, 2463, 31, 203, 202, 202, 9056, 2193, 273, 852, 18, 588, 2964, 5621, 203, 202, 202, 22043, 12, 1458, 18, 588, 2471, 2531, 10756, 288, 203, 1082, 202, 17558, 22, 40, 314, 273, 852, 18, 588, 17558, 22, 40, 5621, 203, 1082, 202, 75, 18, 542, 14602, 12, 394, 7651, 14602, 12, 22, 74, 19, 12, 5659, 13, 1458, 18, 588, 11497, 10756, 11272, 203, 1082, 202, 759, 75, 18, 542, 2957, 12, 5563, 18, 1118, 11272, 203, 1082, 202, 75, 18, 542, 60, 916, 2309, 12, 2957, 18, 14739, 1769, 203, 1082, 202, 75, 18, 9446, 12, 18027, 11272, 203, 1082, 202, 430, 12, 2193, 34, 20, 12998, 288, 203, 9506, 202, 75, 18, 13929, 12, 4113, 16, 20, 18, 1769, 203, 9506, 202, 75, 18, 9446, 12, 18027, 11272, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 3724, 326, 980, 603, 326, 5518, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
381ed07ccf731bc9935a0ca921d17fa71f14ecee
iedadata/geomapapp
haxby/db/surveyplanner/SurveyPlannerSelector.java
[ "Apache-2.0" ]
Java
finish
null
void finish(MouseEvent e) { double wrap = map.getWrap(); if (p0 == null || currentPath == null || sp.waypoints) { return; } drawLine(); Graphics2D g = map.getGraphics2D(); g.setStroke( new BasicStroke(4f/(float)map.getZoom()) ); g.setColor( Color.white ); //g.setXORMode(Color.white); g.draw( currentPath ); if( wrap>0.) { g.translate(wrap,0.); g.draw( currentPath ); } Point p1 = e.getPoint(); if( p0.x==p1.x && p0.y==p1.y ) { if( line!=null ) { line=null; if(dialog!=null)dialog.setVisible(false); map.repaint(); } p0=null; return; } Point2D pA = map.getScaledPoint( p0 ); Point2D pB = map.getScaledPoint( e.getPoint()); Point2D latLonA = map.getProjection().getRefXY(pA); Point2D latLonB = map.getProjection().getRefXY(pB); startLonTF.setText(df.format(latLonA.getX())); startLatTF.setText(df.format(latLonA.getY())); endLonTF.setText(df.format(latLonB.getX())); endLatTF.setText(df.format(latLonB.getY())); // update the direction circles updateDirectionCircles(); currentLine = null; currentPath = null; p0=null; }
/* * At the end of a mouse drag, redraw the line in white, * convert the start and end points to lat/lon and display * in the start end end lat/lon text fields */
At the end of a mouse drag, redraw the line in white, convert the start and end points to lat/lon and display in the start end end lat/lon text fields
[ "At", "the", "end", "of", "a", "mouse", "drag", "redraw", "the", "line", "in", "white", "convert", "the", "start", "and", "end", "points", "to", "lat", "/", "lon", "and", "display", "in", "the", "start", "end", "end", "lat", "/", "lon", "text", "fields" ]
void finish(MouseEvent e) { double wrap = map.getWrap(); if (p0 == null || currentPath == null || sp.waypoints) { return; } drawLine(); Graphics2D g = map.getGraphics2D(); g.setStroke( new BasicStroke(4f/(float)map.getZoom()) ); g.setColor( Color.white ); g.draw( currentPath ); if( wrap>0.) { g.translate(wrap,0.); g.draw( currentPath ); } Point p1 = e.getPoint(); if( p0.x==p1.x && p0.y==p1.y ) { if( line!=null ) { line=null; if(dialog!=null)dialog.setVisible(false); map.repaint(); } p0=null; return; } Point2D pA = map.getScaledPoint( p0 ); Point2D pB = map.getScaledPoint( e.getPoint()); Point2D latLonA = map.getProjection().getRefXY(pA); Point2D latLonB = map.getProjection().getRefXY(pB); startLonTF.setText(df.format(latLonA.getX())); startLatTF.setText(df.format(latLonA.getY())); endLonTF.setText(df.format(latLonB.getX())); endLatTF.setText(df.format(latLonB.getY())); updateDirectionCircles(); currentLine = null; currentPath = null; p0=null; }
[ "void", "finish", "(", "MouseEvent", "e", ")", "{", "double", "wrap", "=", "map", ".", "getWrap", "(", ")", ";", "if", "(", "p0", "==", "null", "||", "currentPath", "==", "null", "||", "sp", ".", "waypoints", ")", "{", "return", ";", "}", "drawLine", "(", ")", ";", "Graphics2D", "g", "=", "map", ".", "getGraphics2D", "(", ")", ";", "g", ".", "setStroke", "(", "new", "BasicStroke", "(", "4f", "/", "(", "float", ")", "map", ".", "getZoom", "(", ")", ")", ")", ";", "g", ".", "setColor", "(", "Color", ".", "white", ")", ";", "g", ".", "draw", "(", "currentPath", ")", ";", "if", "(", "wrap", ">", "0.", ")", "{", "g", ".", "translate", "(", "wrap", ",", "0.", ")", ";", "g", ".", "draw", "(", "currentPath", ")", ";", "}", "Point", "p1", "=", "e", ".", "getPoint", "(", ")", ";", "if", "(", "p0", ".", "x", "==", "p1", ".", "x", "&&", "p0", ".", "y", "==", "p1", ".", "y", ")", "{", "if", "(", "line", "!=", "null", ")", "{", "line", "=", "null", ";", "if", "(", "dialog", "!=", "null", ")", "dialog", ".", "setVisible", "(", "false", ")", ";", "map", ".", "repaint", "(", ")", ";", "}", "p0", "=", "null", ";", "return", ";", "}", "Point2D", "pA", "=", "map", ".", "getScaledPoint", "(", "p0", ")", ";", "Point2D", "pB", "=", "map", ".", "getScaledPoint", "(", "e", ".", "getPoint", "(", ")", ")", ";", "Point2D", "latLonA", "=", "map", ".", "getProjection", "(", ")", ".", "getRefXY", "(", "pA", ")", ";", "Point2D", "latLonB", "=", "map", ".", "getProjection", "(", ")", ".", "getRefXY", "(", "pB", ")", ";", "startLonTF", ".", "setText", "(", "df", ".", "format", "(", "latLonA", ".", "getX", "(", ")", ")", ")", ";", "startLatTF", ".", "setText", "(", "df", ".", "format", "(", "latLonA", ".", "getY", "(", ")", ")", ")", ";", "endLonTF", ".", "setText", "(", "df", ".", "format", "(", "latLonB", ".", "getX", "(", ")", ")", ")", ";", "endLatTF", ".", "setText", "(", "df", ".", "format", "(", "latLonB", ".", "getY", "(", ")", ")", ")", ";", "updateDirectionCircles", "(", ")", ";", "currentLine", "=", "null", ";", "currentPath", "=", "null", ";", "p0", "=", "null", ";", "}" ]
At the end of a mouse drag, redraw the line in white, convert the start and end points to lat/lon and display in the start end end lat/lon text fields
[ "At", "the", "end", "of", "a", "mouse", "drag", "redraw", "the", "line", "in", "white", "convert", "the", "start", "and", "end", "points", "to", "lat", "/", "lon", "and", "display", "in", "the", "start", "end", "end", "lat", "/", "lon", "text", "fields" ]
[ "//g.setXORMode(Color.white);", "// update the direction circles" ]
[ { "param": "e", "type": "MouseEvent" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "e", "type": "MouseEvent", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 918, 4076, 12, 9186, 1133, 425, 13, 288, 203, 202, 202, 9056, 2193, 273, 852, 18, 588, 2964, 5621, 203, 202, 202, 430, 261, 84, 20, 422, 446, 747, 18027, 422, 446, 747, 1694, 18, 1888, 4139, 13, 288, 203, 1082, 202, 2463, 31, 203, 202, 202, 97, 203, 202, 202, 9446, 1670, 5621, 203, 202, 202, 17558, 22, 40, 314, 273, 852, 18, 588, 17558, 22, 40, 5621, 203, 202, 202, 75, 18, 542, 14602, 12, 394, 7651, 14602, 12, 24, 74, 19, 12, 5659, 13, 1458, 18, 588, 11497, 10756, 11272, 203, 202, 202, 75, 18, 542, 2957, 12, 5563, 18, 14739, 11272, 203, 202, 202, 759, 75, 18, 542, 60, 916, 2309, 12, 2957, 18, 14739, 1769, 203, 202, 202, 75, 18, 9446, 12, 18027, 11272, 203, 202, 202, 430, 12, 2193, 34, 20, 12998, 288, 203, 1082, 202, 75, 18, 13929, 12, 4113, 16, 20, 18, 1769, 203, 1082, 202, 75, 18, 9446, 12, 18027, 11272, 203, 202, 202, 97, 203, 202, 202, 2148, 293, 21, 273, 425, 18, 588, 2148, 5621, 203, 202, 202, 430, 12, 293, 20, 18, 92, 631, 84, 21, 18, 92, 597, 293, 20, 18, 93, 631, 84, 21, 18, 93, 262, 288, 203, 1082, 202, 430, 12, 980, 5, 33, 2011, 262, 288, 203, 9506, 202, 1369, 33, 2011, 31, 203, 9506, 202, 430, 12, 12730, 5, 33, 2011, 13, 12730, 18, 542, 6207, 12, 5743, 1769, 203, 9506, 202, 1458, 18, 14462, 1598, 5621, 203, 1082, 202, 97, 203, 1082, 202, 84, 20, 33, 2011, 31, 203, 1082, 202, 2463, 31, 203, 202, 202, 97, 203, 203, 202, 202, 2148, 22, 40, 293, 37, 273, 852, 18, 588, 55, 12825, 2148, 12, 293, 20, 11272, 203, 202, 202, 2148, 22, 40, 293, 38, 273, 852, 18, 588, 55, 12825, 2148, 12, 425, 18, 588, 2148, 10663, 203, 202, 202, 2148, 22, 40, 2516, 15927, 37, 273, 852, 18, 588, 14789, 7675, 588, 1957, 8546, 12, 84, 37, 1769, 203, 202, 202, 2148, 22, 40, 2516, 15927, 38, 273, 852, 18, 588, 14789, 7675, 588, 1957, 8546, 12, 84, 38, 1769, 203, 1082, 203, 202, 202, 1937, 15927, 17963, 18, 542, 1528, 12, 2180, 18, 2139, 12, 4801, 15927, 37, 18, 588, 60, 1435, 10019, 203, 202, 202, 1937, 6607, 17963, 18, 542, 1528, 12, 2180, 18, 2139, 12, 4801, 15927, 37, 18, 588, 61, 1435, 10019, 203, 202, 202, 409, 15927, 17963, 18, 542, 1528, 12, 2180, 18, 2139, 12, 4801, 15927, 38, 18, 588, 60, 1435, 10019, 203, 202, 202, 409, 6607, 17963, 18, 542, 1528, 12, 2180, 18, 2139, 12, 4801, 15927, 38, 18, 588, 61, 1435, 10019, 203, 202, 203, 202, 202, 759, 1089, 326, 4068, 5886, 9558, 203, 202, 202, 2725, 8212, 10887, 9558, 5621, 203, 1082, 203, 202, 202, 2972, 1670, 273, 446, 31, 203, 202, 202, 2972, 743, 273, 446, 31, 203, 202, 202, 84, 20, 33, 2011, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 2380, 326, 679, 434, 279, 7644, 8823, 16, 16540, 326, 980, 316, 9578, 16, 203, 202, 380, 1765, 326, 787, 471, 679, 3143, 358, 2516, 19, 9379, 471, 2562, 7010, 202, 380, 316, 326, 787, 679, 679, 2516, 19, 9379, 977, 1466, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
381ed07ccf731bc9935a0ca921d17fa71f14ecee
iedadata/geomapapp
haxby/db/surveyplanner/SurveyPlannerSelector.java
[ "Apache-2.0" ]
Java
enableSpacing
null
private boolean enableSpacing() { return (GeneralUtils.isInteger(numLinesTF.getText()) && (Integer.parseInt(numLinesTF.getText()) > 1) && !autogap); }
/* * enable line spacing is autogap is off and number of lines > 1 */
enable line spacing is autogap is off and number of lines > 1
[ "enable", "line", "spacing", "is", "autogap", "is", "off", "and", "number", "of", "lines", ">", "1" ]
private boolean enableSpacing() { return (GeneralUtils.isInteger(numLinesTF.getText()) && (Integer.parseInt(numLinesTF.getText()) > 1) && !autogap); }
[ "private", "boolean", "enableSpacing", "(", ")", "{", "return", "(", "GeneralUtils", ".", "isInteger", "(", "numLinesTF", ".", "getText", "(", ")", ")", "&&", "(", "Integer", ".", "parseInt", "(", "numLinesTF", ".", "getText", "(", ")", ")", ">", "1", ")", "&&", "!", "autogap", ")", ";", "}" ]
enable line spacing is autogap is off and number of lines > 1
[ "enable", "line", "spacing", "is", "autogap", "is", "off", "and", "number", "of", "lines", ">", "1" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 1250, 4237, 18006, 1435, 288, 203, 202, 202, 2463, 261, 12580, 1989, 18, 291, 4522, 12, 2107, 5763, 17963, 18, 588, 1528, 10756, 7010, 9506, 202, 10, 10, 261, 4522, 18, 2670, 1702, 12, 2107, 5763, 17963, 18, 588, 1528, 10756, 405, 404, 13, 7010, 9506, 202, 10, 10, 401, 5854, 717, 438, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 4237, 980, 13259, 353, 7608, 438, 353, 3397, 471, 1300, 434, 2362, 405, 404, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
381ed07ccf731bc9935a0ca921d17fa71f14ecee
iedadata/geomapapp
haxby/db/surveyplanner/SurveyPlannerSelector.java
[ "Apache-2.0" ]
Java
updateDirectionCircles
null
private void updateDirectionCircles() { if (GeneralUtils.isDouble(startLatTF.getText()) && GeneralUtils.isDouble(startLonTF.getText()) && GeneralUtils.isDouble(endLatTF.getText()) && GeneralUtils.isDouble(endLonTF.getText()) ) { double startLat = Double.parseDouble(startLatTF.getText()); double startLon = Double.parseDouble(startLonTF.getText()); double endLat = Double.parseDouble(endLatTF.getText()); double endLon = Double.parseDouble(endLonTF.getText()); float wrap = (float)map.getWrap(); //get the limits of the displayed map Rectangle2D rect = map.getClipRect2D(); double xmin = rect.getMinX(); double xmax = rect.getMaxX(); Projection proj = map.getProjection(); Point2D.Double pt = new Point2D.Double(); pt.x = startLon; pt.y = startLat; Point2D.Double p_start = (Point2D.Double) proj.getMapXY(pt); if( wrap>0f ) { while( p_start.x <= xmin ){p_start.x+=wrap;} while( p_start.x >= xmax ){p_start.x-=wrap;} } pt.x = endLon; pt.y = endLat; Point2D.Double p_end = (Point2D.Double) proj.getMapXY(pt); if( wrap>0f ) { while( p_end.x <= xmin ){p_end.x+=wrap;} while( p_end.x > wrap + xmin ){p_end.x-=wrap;} } //draw the shortest line - either p_start.x to p_end.x or the x+wrap values. if ( ((p_start.x - p_end.x) * (p_start.x - p_end.x)) > ((p_start.x - (p_end.x + wrap)) * (p_start.x - (p_end.x + wrap))) ) {p_end.x += wrap;} if ( ((p_start.x - p_end.x) * (p_start.x - p_end.x)) > (((p_start.x + wrap) - p_end.x) * ((p_start.x + wrap) - p_end.x)) ) {p_start.x += wrap;} Point2D[] firstLine = {p_start, p_end}; double bearing = GeneralUtils.flatEarthBearing(firstLine); flippedCircles = false; if (bearing > 90 || bearing <= -90) { bearing -= 180; flippedCircles = true; } dirCircle1.setAngle((int)bearing); dirCircle2.setAngle(180 + (int)bearing); } }
/* * Update the direction circles based on the current start and end points */
Update the direction circles based on the current start and end points
[ "Update", "the", "direction", "circles", "based", "on", "the", "current", "start", "and", "end", "points" ]
private void updateDirectionCircles() { if (GeneralUtils.isDouble(startLatTF.getText()) && GeneralUtils.isDouble(startLonTF.getText()) && GeneralUtils.isDouble(endLatTF.getText()) && GeneralUtils.isDouble(endLonTF.getText()) ) { double startLat = Double.parseDouble(startLatTF.getText()); double startLon = Double.parseDouble(startLonTF.getText()); double endLat = Double.parseDouble(endLatTF.getText()); double endLon = Double.parseDouble(endLonTF.getText()); float wrap = (float)map.getWrap(); Rectangle2D rect = map.getClipRect2D(); double xmin = rect.getMinX(); double xmax = rect.getMaxX(); Projection proj = map.getProjection(); Point2D.Double pt = new Point2D.Double(); pt.x = startLon; pt.y = startLat; Point2D.Double p_start = (Point2D.Double) proj.getMapXY(pt); if( wrap>0f ) { while( p_start.x <= xmin ){p_start.x+=wrap;} while( p_start.x >= xmax ){p_start.x-=wrap;} } pt.x = endLon; pt.y = endLat; Point2D.Double p_end = (Point2D.Double) proj.getMapXY(pt); if( wrap>0f ) { while( p_end.x <= xmin ){p_end.x+=wrap;} while( p_end.x > wrap + xmin ){p_end.x-=wrap;} } if ( ((p_start.x - p_end.x) * (p_start.x - p_end.x)) > ((p_start.x - (p_end.x + wrap)) * (p_start.x - (p_end.x + wrap))) ) {p_end.x += wrap;} if ( ((p_start.x - p_end.x) * (p_start.x - p_end.x)) > (((p_start.x + wrap) - p_end.x) * ((p_start.x + wrap) - p_end.x)) ) {p_start.x += wrap;} Point2D[] firstLine = {p_start, p_end}; double bearing = GeneralUtils.flatEarthBearing(firstLine); flippedCircles = false; if (bearing > 90 || bearing <= -90) { bearing -= 180; flippedCircles = true; } dirCircle1.setAngle((int)bearing); dirCircle2.setAngle(180 + (int)bearing); } }
[ "private", "void", "updateDirectionCircles", "(", ")", "{", "if", "(", "GeneralUtils", ".", "isDouble", "(", "startLatTF", ".", "getText", "(", ")", ")", "&&", "GeneralUtils", ".", "isDouble", "(", "startLonTF", ".", "getText", "(", ")", ")", "&&", "GeneralUtils", ".", "isDouble", "(", "endLatTF", ".", "getText", "(", ")", ")", "&&", "GeneralUtils", ".", "isDouble", "(", "endLonTF", ".", "getText", "(", ")", ")", ")", "{", "double", "startLat", "=", "Double", ".", "parseDouble", "(", "startLatTF", ".", "getText", "(", ")", ")", ";", "double", "startLon", "=", "Double", ".", "parseDouble", "(", "startLonTF", ".", "getText", "(", ")", ")", ";", "double", "endLat", "=", "Double", ".", "parseDouble", "(", "endLatTF", ".", "getText", "(", ")", ")", ";", "double", "endLon", "=", "Double", ".", "parseDouble", "(", "endLonTF", ".", "getText", "(", ")", ")", ";", "float", "wrap", "=", "(", "float", ")", "map", ".", "getWrap", "(", ")", ";", "Rectangle2D", "rect", "=", "map", ".", "getClipRect2D", "(", ")", ";", "double", "xmin", "=", "rect", ".", "getMinX", "(", ")", ";", "double", "xmax", "=", "rect", ".", "getMaxX", "(", ")", ";", "Projection", "proj", "=", "map", ".", "getProjection", "(", ")", ";", "Point2D", ".", "Double", "pt", "=", "new", "Point2D", ".", "Double", "(", ")", ";", "pt", ".", "x", "=", "startLon", ";", "pt", ".", "y", "=", "startLat", ";", "Point2D", ".", "Double", "p_start", "=", "(", "Point2D", ".", "Double", ")", "proj", ".", "getMapXY", "(", "pt", ")", ";", "if", "(", "wrap", ">", "0f", ")", "{", "while", "(", "p_start", ".", "x", "<=", "xmin", ")", "{", "p_start", ".", "x", "+=", "wrap", ";", "}", "while", "(", "p_start", ".", "x", ">=", "xmax", ")", "{", "p_start", ".", "x", "-=", "wrap", ";", "}", "}", "pt", ".", "x", "=", "endLon", ";", "pt", ".", "y", "=", "endLat", ";", "Point2D", ".", "Double", "p_end", "=", "(", "Point2D", ".", "Double", ")", "proj", ".", "getMapXY", "(", "pt", ")", ";", "if", "(", "wrap", ">", "0f", ")", "{", "while", "(", "p_end", ".", "x", "<=", "xmin", ")", "{", "p_end", ".", "x", "+=", "wrap", ";", "}", "while", "(", "p_end", ".", "x", ">", "wrap", "+", "xmin", ")", "{", "p_end", ".", "x", "-=", "wrap", ";", "}", "}", "if", "(", "(", "(", "p_start", ".", "x", "-", "p_end", ".", "x", ")", "*", "(", "p_start", ".", "x", "-", "p_end", ".", "x", ")", ")", ">", "(", "(", "p_start", ".", "x", "-", "(", "p_end", ".", "x", "+", "wrap", ")", ")", "*", "(", "p_start", ".", "x", "-", "(", "p_end", ".", "x", "+", "wrap", ")", ")", ")", ")", "{", "p_end", ".", "x", "+=", "wrap", ";", "}", "if", "(", "(", "(", "p_start", ".", "x", "-", "p_end", ".", "x", ")", "*", "(", "p_start", ".", "x", "-", "p_end", ".", "x", ")", ")", ">", "(", "(", "(", "p_start", ".", "x", "+", "wrap", ")", "-", "p_end", ".", "x", ")", "*", "(", "(", "p_start", ".", "x", "+", "wrap", ")", "-", "p_end", ".", "x", ")", ")", ")", "{", "p_start", ".", "x", "+=", "wrap", ";", "}", "Point2D", "[", "]", "firstLine", "=", "{", "p_start", ",", "p_end", "}", ";", "double", "bearing", "=", "GeneralUtils", ".", "flatEarthBearing", "(", "firstLine", ")", ";", "flippedCircles", "=", "false", ";", "if", "(", "bearing", ">", "90", "||", "bearing", "<=", "-", "90", ")", "{", "bearing", "-=", "180", ";", "flippedCircles", "=", "true", ";", "}", "dirCircle1", ".", "setAngle", "(", "(", "int", ")", "bearing", ")", ";", "dirCircle2", ".", "setAngle", "(", "180", "+", "(", "int", ")", "bearing", ")", ";", "}", "}" ]
Update the direction circles based on the current start and end points
[ "Update", "the", "direction", "circles", "based", "on", "the", "current", "start", "and", "end", "points" ]
[ "//get the limits of the displayed map", "//draw the shortest line - either p_start.x to p_end.x or the x+wrap values. " ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1089, 8212, 10887, 9558, 1435, 288, 203, 202, 202, 430, 261, 12580, 1989, 18, 291, 5265, 12, 1937, 6607, 17963, 18, 588, 1528, 10756, 597, 203, 9506, 202, 12580, 1989, 18, 291, 5265, 12, 1937, 15927, 17963, 18, 588, 1528, 10756, 597, 203, 9506, 202, 12580, 1989, 18, 291, 5265, 12, 409, 6607, 17963, 18, 588, 1528, 10756, 597, 203, 9506, 202, 12580, 1989, 18, 291, 5265, 12, 409, 15927, 17963, 18, 588, 1528, 10756, 262, 288, 203, 9506, 203, 1082, 202, 9056, 787, 6607, 273, 3698, 18, 2670, 5265, 12, 1937, 6607, 17963, 18, 588, 1528, 10663, 203, 1082, 202, 9056, 787, 15927, 273, 3698, 18, 2670, 5265, 12, 1937, 15927, 17963, 18, 588, 1528, 10663, 203, 1082, 202, 9056, 679, 6607, 273, 3698, 18, 2670, 5265, 12, 409, 6607, 17963, 18, 588, 1528, 10663, 203, 1082, 202, 9056, 679, 15927, 273, 3698, 18, 2670, 5265, 12, 409, 15927, 17963, 18, 588, 1528, 10663, 203, 203, 1082, 202, 5659, 2193, 273, 261, 5659, 13, 1458, 18, 588, 2964, 5621, 9506, 203, 1082, 202, 759, 588, 326, 8181, 434, 326, 10453, 852, 203, 1082, 202, 19463, 22, 40, 4917, 273, 852, 18, 588, 15339, 6120, 22, 40, 5621, 203, 1082, 202, 9056, 13777, 273, 4917, 18, 588, 2930, 60, 5621, 203, 1082, 202, 9056, 14016, 273, 4917, 18, 588, 2747, 60, 5621, 203, 9506, 203, 1082, 202, 14789, 10296, 273, 852, 18, 588, 14789, 5621, 203, 1082, 202, 2148, 22, 40, 18, 5265, 5818, 273, 394, 4686, 22, 40, 18, 5265, 5621, 203, 1082, 202, 337, 18, 92, 273, 787, 15927, 31, 203, 1082, 202, 337, 18, 93, 273, 787, 6607, 31, 203, 1082, 202, 2148, 22, 40, 18, 5265, 293, 67, 1937, 273, 261, 2148, 22, 40, 18, 5265, 13, 10296, 18, 588, 863, 8546, 12, 337, 1769, 203, 203, 1082, 202, 430, 12, 2193, 34, 20, 74, 262, 288, 203, 9506, 202, 17523, 12, 293, 67, 1937, 18, 92, 1648, 13777, 262, 95, 84, 67, 1937, 18, 92, 15, 33, 4113, 31, 97, 203, 9506, 202, 17523, 12, 293, 67, 1937, 18, 92, 1545, 14016, 262, 95, 84, 67, 1937, 18, 92, 17, 33, 4113, 31, 97, 203, 1082, 202, 97, 203, 9506, 203, 1082, 202, 337, 18, 92, 273, 679, 15927, 31, 203, 1082, 202, 337, 18, 93, 273, 679, 6607, 31, 203, 1082, 202, 2148, 22, 40, 18, 5265, 293, 67, 409, 273, 261, 2148, 22, 40, 18, 5265, 13, 10296, 18, 588, 863, 8546, 12, 337, 1769, 203, 203, 1082, 202, 430, 12, 2193, 34, 20, 74, 262, 288, 203, 9506, 202, 17523, 12, 293, 67, 409, 18, 92, 1648, 13777, 262, 95, 84, 67, 409, 18, 92, 15, 33, 4113, 31, 97, 203, 9506, 202, 17523, 12, 293, 67, 409, 18, 92, 405, 2193, 397, 13777, 262, 95, 84, 67, 409, 18, 92, 17, 33, 4113, 31, 97, 203, 1082, 202, 97, 203, 9506, 203, 1082, 202, 759, 9446, 326, 20579, 980, 300, 3344, 293, 67, 1937, 18, 92, 358, 293, 67, 409, 18, 92, 578, 326, 619, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
showPlaces
null
public void showPlaces() { map.removeMouseListener(mouse); map.removeMouseMotionListener(mouse); if( showLoc.isSelected() ) { map.addMouseListener(mouse); map.addMouseMotionListener(mouse); //synch the selected checkbox in another location showBookmarkedPlaces.setSelected(true); if(map.hasOverlay(this))return; map.addOverlay("Bookmarked Places",this,false); map.repaint(); } else { showBookmarkedPlaces.setSelected(false); if(!map.hasOverlay(this))return; map.removeOverlay(this); map.repaint(); } }
/** * When Check Box Menu Item 'Show Places' is selected the overlay * of boxes will be repainted to display to the selected map. */
When Check Box Menu Item 'Show Places' is selected the overlay of boxes will be repainted to display to the selected map.
[ "When", "Check", "Box", "Menu", "Item", "'", "Show", "Places", "'", "is", "selected", "the", "overlay", "of", "boxes", "will", "be", "repainted", "to", "display", "to", "the", "selected", "map", "." ]
public void showPlaces() { map.removeMouseListener(mouse); map.removeMouseMotionListener(mouse); if( showLoc.isSelected() ) { map.addMouseListener(mouse); map.addMouseMotionListener(mouse); showBookmarkedPlaces.setSelected(true); if(map.hasOverlay(this))return; map.addOverlay("Bookmarked Places",this,false); map.repaint(); } else { showBookmarkedPlaces.setSelected(false); if(!map.hasOverlay(this))return; map.removeOverlay(this); map.repaint(); } }
[ "public", "void", "showPlaces", "(", ")", "{", "map", ".", "removeMouseListener", "(", "mouse", ")", ";", "map", ".", "removeMouseMotionListener", "(", "mouse", ")", ";", "if", "(", "showLoc", ".", "isSelected", "(", ")", ")", "{", "map", ".", "addMouseListener", "(", "mouse", ")", ";", "map", ".", "addMouseMotionListener", "(", "mouse", ")", ";", "showBookmarkedPlaces", ".", "setSelected", "(", "true", ")", ";", "if", "(", "map", ".", "hasOverlay", "(", "this", ")", ")", "return", ";", "map", ".", "addOverlay", "(", "\"Bookmarked Places\"", ",", "this", ",", "false", ")", ";", "map", ".", "repaint", "(", ")", ";", "}", "else", "{", "showBookmarkedPlaces", ".", "setSelected", "(", "false", ")", ";", "if", "(", "!", "map", ".", "hasOverlay", "(", "this", ")", ")", "return", ";", "map", ".", "removeOverlay", "(", "this", ")", ";", "map", ".", "repaint", "(", ")", ";", "}", "}" ]
When Check Box Menu Item 'Show Places' is selected the overlay of boxes will be repainted to display to the selected map.
[ "When", "Check", "Box", "Menu", "Item", "'", "Show", "Places", "'", "is", "selected", "the", "overlay", "of", "boxes", "will", "be", "repainted", "to", "display", "to", "the", "selected", "map", "." ]
[ "//synch the selected checkbox in another location" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 2405, 24791, 1435, 288, 203, 202, 202, 1458, 18, 4479, 9186, 2223, 12, 11697, 1769, 203, 202, 202, 1458, 18, 4479, 9186, 29360, 2223, 12, 11697, 1769, 203, 202, 202, 430, 12, 2405, 1333, 18, 291, 7416, 1435, 262, 288, 203, 1082, 202, 1458, 18, 1289, 9186, 2223, 12, 11697, 1769, 203, 1082, 202, 1458, 18, 1289, 9186, 29360, 2223, 12, 11697, 1769, 203, 1082, 202, 759, 87, 2515, 326, 3170, 11832, 316, 4042, 2117, 203, 1082, 202, 4500, 22966, 329, 24791, 18, 542, 7416, 12, 3767, 1769, 203, 1082, 202, 430, 12, 1458, 18, 5332, 11627, 12, 2211, 3719, 2463, 31, 203, 1082, 202, 1458, 18, 1289, 11627, 2932, 22966, 329, 3008, 2307, 3113, 2211, 16, 5743, 1769, 203, 1082, 202, 1458, 18, 14462, 1598, 5621, 203, 202, 202, 97, 469, 288, 203, 1082, 202, 4500, 22966, 329, 24791, 18, 542, 7416, 12, 5743, 1769, 203, 1082, 202, 430, 12, 5, 1458, 18, 5332, 11627, 12, 2211, 3719, 2463, 31, 203, 1082, 202, 1458, 18, 4479, 11627, 12, 2211, 1769, 203, 1082, 202, 1458, 18, 14462, 1598, 5621, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 5203, 2073, 8549, 9809, 4342, 296, 5706, 3008, 2307, 11, 353, 3170, 326, 9218, 203, 202, 380, 434, 14356, 903, 506, 24962, 329, 358, 2562, 358, 326, 3170, 852, 18, 7010, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
initPlaces
null
protected void initPlaces() { checkFileStructure(); list = new JCheckBox("Add for This Session Only", true); save = new JCheckBox("Save for Future Sessions", false); addPresetPlaces(); loadMyPlaces(); }
/** * The preset values of checkboxes are set. * Retrieves preset places and loads them. */
The preset values of checkboxes are set. Retrieves preset places and loads them.
[ "The", "preset", "values", "of", "checkboxes", "are", "set", ".", "Retrieves", "preset", "places", "and", "loads", "them", "." ]
protected void initPlaces() { checkFileStructure(); list = new JCheckBox("Add for This Session Only", true); save = new JCheckBox("Save for Future Sessions", false); addPresetPlaces(); loadMyPlaces(); }
[ "protected", "void", "initPlaces", "(", ")", "{", "checkFileStructure", "(", ")", ";", "list", "=", "new", "JCheckBox", "(", "\"Add for This Session Only\"", ",", "true", ")", ";", "save", "=", "new", "JCheckBox", "(", "\"Save for Future Sessions\"", ",", "false", ")", ";", "addPresetPlaces", "(", ")", ";", "loadMyPlaces", "(", ")", ";", "}" ]
The preset values of checkboxes are set.
[ "The", "preset", "values", "of", "checkboxes", "are", "set", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 1208, 24791, 1435, 288, 203, 202, 202, 1893, 812, 6999, 5621, 203, 202, 202, 1098, 273, 394, 804, 19174, 2932, 986, 364, 1220, 3877, 5098, 3113, 638, 1769, 203, 202, 202, 5688, 273, 394, 804, 19174, 2932, 4755, 364, 9108, 3877, 87, 3113, 629, 1769, 203, 202, 202, 1289, 18385, 24791, 5621, 203, 202, 202, 945, 12062, 24791, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 1021, 12313, 924, 434, 11832, 281, 854, 444, 18, 203, 202, 380, 20507, 12313, 12576, 471, 6277, 2182, 18, 7010, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
addPlace
null
public void addPlace() { double zoom = map.getZoom(); Rectangle2D r = map.getClipRect2D(); Point2D.Double p = new Point2D.Double( r.getX()+.5*r.getWidth(), r.getY()+.5*r.getHeight() ); p = (Point2D.Double)map.getProjection().getRefXY(p); JPanel panel = new JPanel(new GridLayout(0,1,2,2)); JLabel label = new JLabel("Bookmark Name: "); JTextField nameF = new JTextField("A Place"); panel.add(label); panel.add(nameF); panel.add(list); panel.add(save); int ok = JOptionPane.showConfirmDialog( map.getTopLevelAncestor(), panel, "Add Bookmark for Current Map View", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); if(ok==JOptionPane.CANCEL_OPTION) return; if(ok==JOptionPane.CLOSED_OPTION) return; MapPlace loc = createPlace( root, nameF.getText(), p.getX(), p.getY(), zoom); // Will execute list or save options only if Okay button is selected if( list.isSelected()) { addPlace(loc); } // Saves to file if( save.isSelected()) { File gmaRoot = org.geomapapp.io.GMARoot.getRoot(); // Before we begin // Check to make sure places folder is there File file = new File(gmaRoot, "places"); //Check to make sure all.loc is there File allFile = new File(file, "all.loc"); // Check to make sure My Saved Places.loc is there File locFile = new File( file, "My Saved Places.loc"); if( locFile.exists()&& allFile.exists() && file.exists() ) { String addLine = createLocStr(loc); FilesUtil.addLineinFile("My Saved Places.loc",addLine); reloadMyPlaces(); MapPlacesViewer.updateViewers(); }else{ String addLine = createLocStr(loc); FilesUtil.addLineinFile("My Saved Places.loc",addLine); loadMyPlaces(); reloadMyPlaces(); MapPlacesViewer.updateViewers(); } } }
/** * Displays a new panel popup to prompt user on input for * new place name. To add or save a location. The save * option will place the info into MyPlaces.loc file. */
Displays a new panel popup to prompt user on input for new place name. To add or save a location. The save option will place the info into MyPlaces.loc file.
[ "Displays", "a", "new", "panel", "popup", "to", "prompt", "user", "on", "input", "for", "new", "place", "name", ".", "To", "add", "or", "save", "a", "location", ".", "The", "save", "option", "will", "place", "the", "info", "into", "MyPlaces", ".", "loc", "file", "." ]
public void addPlace() { double zoom = map.getZoom(); Rectangle2D r = map.getClipRect2D(); Point2D.Double p = new Point2D.Double( r.getX()+.5*r.getWidth(), r.getY()+.5*r.getHeight() ); p = (Point2D.Double)map.getProjection().getRefXY(p); JPanel panel = new JPanel(new GridLayout(0,1,2,2)); JLabel label = new JLabel("Bookmark Name: "); JTextField nameF = new JTextField("A Place"); panel.add(label); panel.add(nameF); panel.add(list); panel.add(save); int ok = JOptionPane.showConfirmDialog( map.getTopLevelAncestor(), panel, "Add Bookmark for Current Map View", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); if(ok==JOptionPane.CANCEL_OPTION) return; if(ok==JOptionPane.CLOSED_OPTION) return; MapPlace loc = createPlace( root, nameF.getText(), p.getX(), p.getY(), zoom); if( list.isSelected()) { addPlace(loc); } if( save.isSelected()) { File gmaRoot = org.geomapapp.io.GMARoot.getRoot(); File file = new File(gmaRoot, "places"); File allFile = new File(file, "all.loc"); File locFile = new File( file, "My Saved Places.loc"); if( locFile.exists()&& allFile.exists() && file.exists() ) { String addLine = createLocStr(loc); FilesUtil.addLineinFile("My Saved Places.loc",addLine); reloadMyPlaces(); MapPlacesViewer.updateViewers(); }else{ String addLine = createLocStr(loc); FilesUtil.addLineinFile("My Saved Places.loc",addLine); loadMyPlaces(); reloadMyPlaces(); MapPlacesViewer.updateViewers(); } } }
[ "public", "void", "addPlace", "(", ")", "{", "double", "zoom", "=", "map", ".", "getZoom", "(", ")", ";", "Rectangle2D", "r", "=", "map", ".", "getClipRect2D", "(", ")", ";", "Point2D", ".", "Double", "p", "=", "new", "Point2D", ".", "Double", "(", "r", ".", "getX", "(", ")", "+", ".5", "*", "r", ".", "getWidth", "(", ")", ",", "r", ".", "getY", "(", ")", "+", ".5", "*", "r", ".", "getHeight", "(", ")", ")", ";", "p", "=", "(", "Point2D", ".", "Double", ")", "map", ".", "getProjection", "(", ")", ".", "getRefXY", "(", "p", ")", ";", "JPanel", "panel", "=", "new", "JPanel", "(", "new", "GridLayout", "(", "0", ",", "1", ",", "2", ",", "2", ")", ")", ";", "JLabel", "label", "=", "new", "JLabel", "(", "\"Bookmark Name: \"", ")", ";", "JTextField", "nameF", "=", "new", "JTextField", "(", "\"A Place\"", ")", ";", "panel", ".", "add", "(", "label", ")", ";", "panel", ".", "add", "(", "nameF", ")", ";", "panel", ".", "add", "(", "list", ")", ";", "panel", ".", "add", "(", "save", ")", ";", "int", "ok", "=", "JOptionPane", ".", "showConfirmDialog", "(", "map", ".", "getTopLevelAncestor", "(", ")", ",", "panel", ",", "\"Add Bookmark for Current Map View\"", ",", "JOptionPane", ".", "OK_CANCEL_OPTION", ",", "JOptionPane", ".", "PLAIN_MESSAGE", ")", ";", "if", "(", "ok", "==", "JOptionPane", ".", "CANCEL_OPTION", ")", "return", ";", "if", "(", "ok", "==", "JOptionPane", ".", "CLOSED_OPTION", ")", "return", ";", "MapPlace", "loc", "=", "createPlace", "(", "root", ",", "nameF", ".", "getText", "(", ")", ",", "p", ".", "getX", "(", ")", ",", "p", ".", "getY", "(", ")", ",", "zoom", ")", ";", "if", "(", "list", ".", "isSelected", "(", ")", ")", "{", "addPlace", "(", "loc", ")", ";", "}", "if", "(", "save", ".", "isSelected", "(", ")", ")", "{", "File", "gmaRoot", "=", "org", ".", "geomapapp", ".", "io", ".", "GMARoot", ".", "getRoot", "(", ")", ";", "File", "file", "=", "new", "File", "(", "gmaRoot", ",", "\"places\"", ")", ";", "File", "allFile", "=", "new", "File", "(", "file", ",", "\"all.loc\"", ")", ";", "File", "locFile", "=", "new", "File", "(", "file", ",", "\"My Saved Places.loc\"", ")", ";", "if", "(", "locFile", ".", "exists", "(", ")", "&&", "allFile", ".", "exists", "(", ")", "&&", "file", ".", "exists", "(", ")", ")", "{", "String", "addLine", "=", "createLocStr", "(", "loc", ")", ";", "FilesUtil", ".", "addLineinFile", "(", "\"My Saved Places.loc\"", ",", "addLine", ")", ";", "reloadMyPlaces", "(", ")", ";", "MapPlacesViewer", ".", "updateViewers", "(", ")", ";", "}", "else", "{", "String", "addLine", "=", "createLocStr", "(", "loc", ")", ";", "FilesUtil", ".", "addLineinFile", "(", "\"My Saved Places.loc\"", ",", "addLine", ")", ";", "loadMyPlaces", "(", ")", ";", "reloadMyPlaces", "(", ")", ";", "MapPlacesViewer", ".", "updateViewers", "(", ")", ";", "}", "}", "}" ]
Displays a new panel popup to prompt user on input for new place name.
[ "Displays", "a", "new", "panel", "popup", "to", "prompt", "user", "on", "input", "for", "new", "place", "name", "." ]
[ "// Will execute list or save options only if Okay button is selected", "// Saves to file", "// Before we begin ", "// Check to make sure places folder is there", "//Check to make sure all.loc is there", "// Check to make sure My Saved Places.loc is there" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 527, 6029, 1435, 288, 203, 202, 202, 9056, 7182, 273, 852, 18, 588, 11497, 5621, 203, 202, 202, 19463, 22, 40, 436, 273, 852, 18, 588, 15339, 6120, 22, 40, 5621, 203, 202, 202, 2148, 22, 40, 18, 5265, 293, 273, 394, 4686, 22, 40, 18, 5265, 12, 203, 9506, 202, 86, 18, 588, 60, 1435, 15, 18, 25, 14, 86, 18, 588, 2384, 9334, 203, 9506, 202, 86, 18, 588, 61, 1435, 15, 18, 25, 14, 86, 18, 588, 2686, 1435, 11272, 203, 202, 202, 84, 273, 261, 2148, 22, 40, 18, 5265, 13, 1458, 18, 588, 14789, 7675, 588, 1957, 8546, 12, 84, 1769, 203, 202, 202, 46, 5537, 6594, 273, 394, 24048, 12, 2704, 7145, 3744, 12, 20, 16, 21, 16, 22, 16, 22, 10019, 203, 202, 202, 46, 2224, 1433, 273, 394, 21403, 2932, 22966, 1770, 30, 315, 1769, 203, 202, 202, 46, 16157, 508, 42, 273, 394, 804, 16157, 2932, 37, 13022, 8863, 203, 202, 202, 13916, 18, 1289, 12, 1925, 1769, 203, 202, 202, 13916, 18, 1289, 12, 529, 42, 1769, 203, 202, 202, 13916, 18, 1289, 12, 1098, 1769, 203, 202, 202, 13916, 18, 1289, 12, 5688, 1769, 203, 202, 202, 474, 1529, 273, 804, 1895, 8485, 18, 4500, 11269, 6353, 12, 7010, 9506, 202, 1458, 18, 588, 27046, 15637, 9334, 203, 9506, 202, 13916, 16, 203, 9506, 202, 6, 986, 20258, 3355, 364, 6562, 1635, 4441, 3113, 203, 9506, 202, 46, 1895, 8485, 18, 3141, 67, 25268, 67, 7425, 16, 203, 9506, 202, 46, 1895, 8485, 18, 26549, 67, 8723, 1769, 203, 202, 202, 430, 12, 601, 631, 46, 1895, 8485, 18, 25268, 67, 7425, 13, 327, 31, 203, 202, 202, 430, 12, 601, 631, 46, 1895, 8485, 18, 28475, 67, 7425, 13, 327, 31, 203, 1082, 203, 202, 202, 863, 6029, 1515, 273, 752, 6029, 12, 7010, 9506, 202, 3085, 16, 203, 9506, 202, 529, 42, 18, 588, 1528, 9334, 7010, 9506, 202, 84, 18, 588, 60, 9334, 203, 9506, 202, 84, 18, 588, 61, 9334, 203, 9506, 202, 14932, 1769, 203, 202, 202, 759, 9980, 1836, 666, 578, 1923, 702, 1338, 309, 16154, 528, 3568, 353, 3170, 203, 202, 202, 430, 12, 666, 18, 291, 7416, 10756, 225, 288, 203, 1082, 202, 1289, 6029, 12, 1829, 1769, 203, 202, 202, 97, 203, 202, 202, 759, 348, 6606, 358, 585, 203, 202, 202, 430, 12, 1923, 18, 291, 7416, 10756, 288, 203, 1082, 202, 812, 314, 2540, 2375, 273, 2358, 18, 10049, 438, 2910, 18, 1594, 18, 43, 19772, 1632, 18, 588, 2375, 5621, 203, 1082, 202, 759, 11672, 732, 2376, 7010, 9506, 202, 759, 2073, 358, 1221, 3071, 12576, 3009, 353, 1915, 203, 9506, 202, 812, 585, 273, 394, 1387, 12, 75, 2540, 2375, 16, 315, 11350, 8863, 203, 9506, 202, 759, 1564, 358, 1221, 3071, 777, 18, 1829, 353, 1915, 203, 9506, 202, 812, 777, 812, 273, 394, 1387, 12, 768, 16, 315, 454, 18, 1829, 8863, 203, 9506, 202, 759, 2073, 358, 1221, 3071, 8005, 348, 8158, 3008, 2307, 18, 1829, 353, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 202, 380, 9311, 87, 279, 394, 6594, 10431, 358, 6866, 729, 603, 810, 364, 203, 202, 380, 394, 3166, 508, 18, 2974, 527, 578, 1923, 279, 2117, 18, 1021, 1923, 203, 202, 380, 1456, 903, 3166, 326, 1123, 1368, 8005, 24791, 18, 1829, 585, 18, 7010, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
checkFileStructure
null
public static void checkFileStructure(){ File gmaRoot = org.geomapapp.io.GMARoot.getRoot(); // Before we begin if( gmaRoot!=null ) { // Check to make sure places folder is there File file = new File(gmaRoot, "places"); if( !file.exists() ) file.mkdirs(); // Check to make sure My Saved Places.loc is there File locFile = new File( file, "My Saved Places.loc"); if( !locFile.exists() ) { try { PrintStream out = new PrintStream( new FileOutputStream(locFile)); out.close(); } catch(IOException ex) { } } //Check to make sure all.loc is there File allFile = new File(file, "all.loc"); if( !allFile.exists() ) { try { PrintStream out = new PrintStream( new FileOutputStream(allFile)); out.append( "My Saved Places.loc"); out.flush(); out.close(); } catch(IOException ex) { } } if(allFile.exists()){ try { PrintStream out = new PrintStream( new FileOutputStream(allFile)); out.append( "My Saved Places.loc"); out.flush(); out.close(); } catch(IOException ex) { } } } }
/** * Checks the file structure needed to save and load bookmarks. * @return */
Checks the file structure needed to save and load bookmarks. @return
[ "Checks", "the", "file", "structure", "needed", "to", "save", "and", "load", "bookmarks", ".", "@return" ]
public static void checkFileStructure(){ File gmaRoot = org.geomapapp.io.GMARoot.getRoot(); if( gmaRoot!=null ) { File file = new File(gmaRoot, "places"); if( !file.exists() ) file.mkdirs(); File locFile = new File( file, "My Saved Places.loc"); if( !locFile.exists() ) { try { PrintStream out = new PrintStream( new FileOutputStream(locFile)); out.close(); } catch(IOException ex) { } } File allFile = new File(file, "all.loc"); if( !allFile.exists() ) { try { PrintStream out = new PrintStream( new FileOutputStream(allFile)); out.append( "My Saved Places.loc"); out.flush(); out.close(); } catch(IOException ex) { } } if(allFile.exists()){ try { PrintStream out = new PrintStream( new FileOutputStream(allFile)); out.append( "My Saved Places.loc"); out.flush(); out.close(); } catch(IOException ex) { } } } }
[ "public", "static", "void", "checkFileStructure", "(", ")", "{", "File", "gmaRoot", "=", "org", ".", "geomapapp", ".", "io", ".", "GMARoot", ".", "getRoot", "(", ")", ";", "if", "(", "gmaRoot", "!=", "null", ")", "{", "File", "file", "=", "new", "File", "(", "gmaRoot", ",", "\"places\"", ")", ";", "if", "(", "!", "file", ".", "exists", "(", ")", ")", "file", ".", "mkdirs", "(", ")", ";", "File", "locFile", "=", "new", "File", "(", "file", ",", "\"My Saved Places.loc\"", ")", ";", "if", "(", "!", "locFile", ".", "exists", "(", ")", ")", "{", "try", "{", "PrintStream", "out", "=", "new", "PrintStream", "(", "new", "FileOutputStream", "(", "locFile", ")", ")", ";", "out", ".", "close", "(", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "}", "}", "File", "allFile", "=", "new", "File", "(", "file", ",", "\"all.loc\"", ")", ";", "if", "(", "!", "allFile", ".", "exists", "(", ")", ")", "{", "try", "{", "PrintStream", "out", "=", "new", "PrintStream", "(", "new", "FileOutputStream", "(", "allFile", ")", ")", ";", "out", ".", "append", "(", "\"My Saved Places.loc\"", ")", ";", "out", ".", "flush", "(", ")", ";", "out", ".", "close", "(", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "}", "}", "if", "(", "allFile", ".", "exists", "(", ")", ")", "{", "try", "{", "PrintStream", "out", "=", "new", "PrintStream", "(", "new", "FileOutputStream", "(", "allFile", ")", ")", ";", "out", ".", "append", "(", "\"My Saved Places.loc\"", ")", ";", "out", ".", "flush", "(", ")", ";", "out", ".", "close", "(", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "}", "}", "}", "}" ]
Checks the file structure needed to save and load bookmarks.
[ "Checks", "the", "file", "structure", "needed", "to", "save", "and", "load", "bookmarks", "." ]
[ "// Before we begin ", "// Check to make sure places folder is there", "// Check to make sure My Saved Places.loc is there", "//Check to make sure all.loc is there" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 866, 812, 6999, 1435, 95, 203, 202, 202, 812, 314, 2540, 2375, 273, 2358, 18, 10049, 438, 2910, 18, 1594, 18, 43, 19772, 1632, 18, 588, 2375, 5621, 203, 202, 202, 759, 11672, 732, 2376, 7010, 202, 202, 430, 12, 314, 2540, 2375, 5, 33, 2011, 262, 288, 203, 1082, 202, 759, 2073, 358, 1221, 3071, 12576, 3009, 353, 1915, 203, 1082, 202, 812, 585, 273, 394, 1387, 12, 75, 2540, 2375, 16, 315, 11350, 8863, 203, 1082, 202, 430, 12, 401, 768, 18, 1808, 1435, 262, 585, 18, 24816, 8291, 5621, 203, 1082, 202, 759, 2073, 358, 1221, 3071, 8005, 348, 8158, 3008, 2307, 18, 1829, 353, 1915, 203, 1082, 202, 812, 1515, 812, 273, 394, 1387, 12, 585, 16, 315, 12062, 348, 8158, 3008, 2307, 18, 1829, 8863, 203, 1082, 202, 430, 12, 401, 1829, 812, 18, 1808, 1435, 262, 288, 203, 9506, 202, 698, 288, 203, 6862, 202, 5108, 1228, 596, 273, 394, 21677, 12, 203, 25083, 202, 2704, 12942, 12, 1829, 812, 10019, 203, 6862, 202, 659, 18, 4412, 5621, 203, 9506, 202, 97, 1044, 12, 14106, 431, 13, 288, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 1082, 202, 759, 1564, 358, 1221, 3071, 777, 18, 1829, 353, 1915, 203, 1082, 202, 812, 777, 812, 273, 394, 1387, 12, 768, 16, 315, 454, 18, 1829, 8863, 203, 1082, 202, 430, 12, 401, 454, 812, 18, 1808, 1435, 262, 288, 203, 9506, 202, 698, 288, 203, 6862, 202, 5108, 1228, 596, 273, 394, 21677, 12, 203, 25083, 202, 2704, 12942, 12, 454, 812, 10019, 203, 6862, 202, 659, 18, 6923, 12, 315, 12062, 348, 8158, 3008, 2307, 18, 1829, 8863, 203, 6862, 202, 659, 18, 11330, 5621, 203, 6862, 202, 659, 18, 4412, 5621, 203, 9506, 202, 97, 1044, 12, 14106, 431, 13, 288, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 1082, 202, 430, 12, 454, 812, 18, 1808, 10756, 95, 203, 9506, 202, 698, 288, 203, 6862, 202, 5108, 1228, 596, 273, 394, 21677, 12, 203, 25083, 202, 2704, 12942, 12, 454, 812, 10019, 203, 6862, 202, 659, 18, 6923, 12, 315, 12062, 348, 8158, 3008, 2307, 18, 1829, 8863, 203, 6862, 202, 659, 18, 11330, 5621, 203, 6862, 202, 659, 18, 4412, 5621, 203, 9506, 202, 97, 1044, 12, 14106, 431, 13, 288, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 13074, 326, 585, 3695, 3577, 358, 1923, 471, 1262, 13696, 87, 18, 203, 202, 380, 632, 2463, 7010, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
deleteBookmarks
null
public void deleteBookmarks(MapPlace loc) { locs.remove( loc.name); System.out.println("Deleting " + loc); double zoom = loc.zoom; Point2D.Double p = (Point2D.Double)(map.getProjection().getMapXY( new Point2D.Double( loc.lon, loc.lat ))); p = (Point2D.Double)map.getProjection().getRefXY(p); //Call FilesUtil for removal FilesUtil.removeLineinFile("My Saved Places.loc", loc + "\t" + p.getX() + "\t" + p.getY() + "\t" + zoom); }
/** * Deletes a previously saved place from My Saved Places * directory. * @param loc location name user input when saving * @see FilesUtil */
Deletes a previously saved place from My Saved Places directory. @param loc location name user input when saving @see FilesUtil
[ "Deletes", "a", "previously", "saved", "place", "from", "My", "Saved", "Places", "directory", ".", "@param", "loc", "location", "name", "user", "input", "when", "saving", "@see", "FilesUtil" ]
public void deleteBookmarks(MapPlace loc) { locs.remove( loc.name); System.out.println("Deleting " + loc); double zoom = loc.zoom; Point2D.Double p = (Point2D.Double)(map.getProjection().getMapXY( new Point2D.Double( loc.lon, loc.lat ))); p = (Point2D.Double)map.getProjection().getRefXY(p); FilesUtil.removeLineinFile("My Saved Places.loc", loc + "\t" + p.getX() + "\t" + p.getY() + "\t" + zoom); }
[ "public", "void", "deleteBookmarks", "(", "MapPlace", "loc", ")", "{", "locs", ".", "remove", "(", "loc", ".", "name", ")", ";", "System", ".", "out", ".", "println", "(", "\"Deleting \"", "+", "loc", ")", ";", "double", "zoom", "=", "loc", ".", "zoom", ";", "Point2D", ".", "Double", "p", "=", "(", "Point2D", ".", "Double", ")", "(", "map", ".", "getProjection", "(", ")", ".", "getMapXY", "(", "new", "Point2D", ".", "Double", "(", "loc", ".", "lon", ",", "loc", ".", "lat", ")", ")", ")", ";", "p", "=", "(", "Point2D", ".", "Double", ")", "map", ".", "getProjection", "(", ")", ".", "getRefXY", "(", "p", ")", ";", "FilesUtil", ".", "removeLineinFile", "(", "\"My Saved Places.loc\"", ",", "loc", "+", "\"\\t\"", "+", "p", ".", "getX", "(", ")", "+", "\"\\t\"", "+", "p", ".", "getY", "(", ")", "+", "\"\\t\"", "+", "zoom", ")", ";", "}" ]
Deletes a previously saved place from My Saved Places directory.
[ "Deletes", "a", "previously", "saved", "place", "from", "My", "Saved", "Places", "directory", "." ]
[ "//Call FilesUtil for removal" ]
[ { "param": "loc", "type": "MapPlace" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "loc", "type": "MapPlace", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1430, 9084, 17439, 12, 863, 6029, 1515, 13, 288, 203, 202, 202, 24323, 18, 4479, 12, 1515, 18, 529, 1769, 203, 202, 202, 3163, 18, 659, 18, 8222, 2932, 20433, 315, 397, 1515, 1769, 203, 202, 202, 9056, 7182, 273, 1515, 18, 14932, 31, 203, 202, 202, 2148, 22, 40, 18, 5265, 293, 273, 261, 2148, 22, 40, 18, 5265, 21433, 1458, 18, 588, 14789, 7675, 588, 863, 8546, 12, 7010, 9506, 202, 2704, 4686, 22, 40, 18, 5265, 12, 1515, 18, 9379, 16, 1515, 18, 4801, 8623, 1769, 203, 202, 202, 84, 273, 261, 2148, 22, 40, 18, 5265, 13, 1458, 18, 588, 14789, 7675, 588, 1957, 8546, 12, 84, 1769, 203, 203, 202, 202, 759, 1477, 6471, 1304, 364, 14817, 203, 202, 202, 2697, 1304, 18, 4479, 1670, 267, 812, 2932, 12062, 348, 8158, 3008, 2307, 18, 1829, 3113, 7010, 9506, 202, 1829, 397, 1548, 88, 6, 397, 293, 18, 588, 60, 1435, 397, 1548, 88, 6, 397, 293, 18, 588, 61, 1435, 397, 1548, 88, 6, 397, 7182, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 17973, 279, 7243, 5198, 3166, 628, 8005, 348, 8158, 3008, 2307, 203, 202, 380, 1867, 18, 203, 202, 380, 632, 891, 1515, 2117, 508, 729, 810, 1347, 12392, 203, 202, 380, 632, 5946, 6471, 1304, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
addPresetPlaces
null
protected void addPresetPlaces() { try { String pathURL = PathUtil.getPath("PLACES_PATH", "gma_places/"); URL url = URLFactory.url( pathURL ); loadPlaces(url, "all.loc", root, true); if ( map.getProjection() instanceof Mercator ) { loadPlaces(url, "grids.loc", root, true); } } catch(Exception ex) { ex.printStackTrace(); } }
/** * Adds the preset places from set server path. * @see PathUtil */
Adds the preset places from set server path.
[ "Adds", "the", "preset", "places", "from", "set", "server", "path", "." ]
protected void addPresetPlaces() { try { String pathURL = PathUtil.getPath("PLACES_PATH", "gma_places/"); URL url = URLFactory.url( pathURL ); loadPlaces(url, "all.loc", root, true); if ( map.getProjection() instanceof Mercator ) { loadPlaces(url, "grids.loc", root, true); } } catch(Exception ex) { ex.printStackTrace(); } }
[ "protected", "void", "addPresetPlaces", "(", ")", "{", "try", "{", "String", "pathURL", "=", "PathUtil", ".", "getPath", "(", "\"PLACES_PATH\"", ",", "\"gma_places/\"", ")", ";", "URL", "url", "=", "URLFactory", ".", "url", "(", "pathURL", ")", ";", "loadPlaces", "(", "url", ",", "\"all.loc\"", ",", "root", ",", "true", ")", ";", "if", "(", "map", ".", "getProjection", "(", ")", "instanceof", "Mercator", ")", "{", "loadPlaces", "(", "url", ",", "\"grids.loc\"", ",", "root", ",", "true", ")", ";", "}", "}", "catch", "(", "Exception", "ex", ")", "{", "ex", ".", "printStackTrace", "(", ")", ";", "}", "}" ]
Adds the preset places from set server path.
[ "Adds", "the", "preset", "places", "from", "set", "server", "path", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 527, 18385, 24791, 1435, 288, 203, 202, 202, 698, 288, 203, 1082, 202, 780, 589, 1785, 273, 203, 9506, 202, 743, 1304, 18, 588, 743, 2932, 12134, 55, 67, 4211, 3113, 315, 75, 2540, 67, 11350, 4898, 1769, 203, 203, 1082, 202, 1785, 880, 273, 1976, 1733, 18, 718, 12, 589, 1785, 11272, 203, 1082, 202, 945, 24791, 12, 718, 16, 315, 454, 18, 1829, 3113, 1365, 16, 638, 1769, 203, 203, 1082, 202, 430, 261, 852, 18, 588, 14789, 1435, 1276, 490, 12610, 639, 262, 288, 203, 9506, 202, 945, 24791, 12, 718, 16, 315, 5222, 87, 18, 1829, 3113, 1365, 16, 638, 1769, 203, 1082, 202, 97, 203, 202, 202, 97, 1044, 12, 503, 431, 13, 288, 203, 1082, 202, 338, 18, 1188, 6332, 5621, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 15605, 326, 12313, 12576, 628, 444, 1438, 589, 18, 203, 202, 380, 632, 5946, 2666, 1304, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
loadMyPlaces
null
protected void loadMyPlaces() { File gmaRoot = org.geomapapp.io.GMARoot.getRoot(); if( gmaRoot==null )return; File file = new File(gmaRoot, "places"); if( !file.exists() || !file.isDirectory() )return; try { loadPlaces( file.toURL(), "all.loc", root); } catch(Exception ex) { } }
/** * Load places from users home directory * @see GMARoot */
Load places from users home directory @see GMARoot
[ "Load", "places", "from", "users", "home", "directory", "@see", "GMARoot" ]
protected void loadMyPlaces() { File gmaRoot = org.geomapapp.io.GMARoot.getRoot(); if( gmaRoot==null )return; File file = new File(gmaRoot, "places"); if( !file.exists() || !file.isDirectory() )return; try { loadPlaces( file.toURL(), "all.loc", root); } catch(Exception ex) { } }
[ "protected", "void", "loadMyPlaces", "(", ")", "{", "File", "gmaRoot", "=", "org", ".", "geomapapp", ".", "io", ".", "GMARoot", ".", "getRoot", "(", ")", ";", "if", "(", "gmaRoot", "==", "null", ")", "return", ";", "File", "file", "=", "new", "File", "(", "gmaRoot", ",", "\"places\"", ")", ";", "if", "(", "!", "file", ".", "exists", "(", ")", "||", "!", "file", ".", "isDirectory", "(", ")", ")", "return", ";", "try", "{", "loadPlaces", "(", "file", ".", "toURL", "(", ")", ",", "\"all.loc\"", ",", "root", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", "}", "}" ]
Load places from users home directory @see GMARoot
[ "Load", "places", "from", "users", "home", "directory", "@see", "GMARoot" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 1262, 12062, 24791, 1435, 288, 203, 202, 202, 812, 314, 2540, 2375, 273, 2358, 18, 10049, 438, 2910, 18, 1594, 18, 43, 19772, 1632, 18, 588, 2375, 5621, 203, 202, 202, 430, 12, 314, 2540, 2375, 631, 2011, 262, 2463, 31, 203, 202, 202, 812, 585, 273, 394, 1387, 12, 75, 2540, 2375, 16, 315, 11350, 8863, 203, 202, 202, 430, 12, 401, 768, 18, 1808, 1435, 747, 401, 768, 18, 291, 2853, 1435, 262, 2463, 31, 203, 202, 202, 698, 288, 203, 1082, 202, 945, 24791, 12, 585, 18, 869, 1785, 9334, 315, 454, 18, 1829, 3113, 1365, 1769, 203, 1082, 202, 97, 1044, 12, 503, 431, 13, 288, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 4444, 12576, 628, 3677, 6382, 1867, 203, 202, 380, 632, 5946, 611, 19772, 1632, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
goTo
null
protected void goTo(MapPlace loc) { if (!loc.isLeaf()) return; Point2D.Double p = (Point2D.Double)(map.getProjection().getMapXY( new Point2D.Double( loc.lon, loc.lat ))); double z = map.getZoom(); p.x *= z; p.y *= z; Insets insets = map.getInsets(); p.x += insets.left; p.y += insets.top; double factor = loc.zoom/z; if( loc instanceof org.geomapapp.grid.HiResGrid) { // System.out.println("high res"); Rectangle rect = map.getVisibleRect(); rect.width -= insets.left+insets.right; rect.height -= insets.top+insets.bottom; Rectangle r = ((org.geomapapp.grid.HiResGrid)loc).bounds; double s = Math.max( r.getWidth()/rect.width, r.getHeight()/rect.height); factor /= s; map.doZoom( p, factor ); if (tools != null && tools.getGridDialog() != null) { GridDialog gd = tools.getGridDialog(); Grid2DOverlay[] overlays = gd.getGrids(); if( !gd.getToggle().isSelected() ) gd.getToggle().doClick(); gd.gridCB.setSelectedItem( overlays[0]); gd.loadGrid(); } // tools.grid.doClick(); } else { map.doZoom( p, factor ); // tools.focus.doClick(); if (tools != null) tools.getApp().autoFocus(); } }
/** * Scales to fit the requested place location on user request. * @param loc location */
Scales to fit the requested place location on user request. @param loc location
[ "Scales", "to", "fit", "the", "requested", "place", "location", "on", "user", "request", ".", "@param", "loc", "location" ]
protected void goTo(MapPlace loc) { if (!loc.isLeaf()) return; Point2D.Double p = (Point2D.Double)(map.getProjection().getMapXY( new Point2D.Double( loc.lon, loc.lat ))); double z = map.getZoom(); p.x *= z; p.y *= z; Insets insets = map.getInsets(); p.x += insets.left; p.y += insets.top; double factor = loc.zoom/z; if( loc instanceof org.geomapapp.grid.HiResGrid) { Rectangle rect = map.getVisibleRect(); rect.width -= insets.left+insets.right; rect.height -= insets.top+insets.bottom; Rectangle r = ((org.geomapapp.grid.HiResGrid)loc).bounds; double s = Math.max( r.getWidth()/rect.width, r.getHeight()/rect.height); factor /= s; map.doZoom( p, factor ); if (tools != null && tools.getGridDialog() != null) { GridDialog gd = tools.getGridDialog(); Grid2DOverlay[] overlays = gd.getGrids(); if( !gd.getToggle().isSelected() ) gd.getToggle().doClick(); gd.gridCB.setSelectedItem( overlays[0]); gd.loadGrid(); } } else { map.doZoom( p, factor ); if (tools != null) tools.getApp().autoFocus(); } }
[ "protected", "void", "goTo", "(", "MapPlace", "loc", ")", "{", "if", "(", "!", "loc", ".", "isLeaf", "(", ")", ")", "return", ";", "Point2D", ".", "Double", "p", "=", "(", "Point2D", ".", "Double", ")", "(", "map", ".", "getProjection", "(", ")", ".", "getMapXY", "(", "new", "Point2D", ".", "Double", "(", "loc", ".", "lon", ",", "loc", ".", "lat", ")", ")", ")", ";", "double", "z", "=", "map", ".", "getZoom", "(", ")", ";", "p", ".", "x", "*=", "z", ";", "p", ".", "y", "*=", "z", ";", "Insets", "insets", "=", "map", ".", "getInsets", "(", ")", ";", "p", ".", "x", "+=", "insets", ".", "left", ";", "p", ".", "y", "+=", "insets", ".", "top", ";", "double", "factor", "=", "loc", ".", "zoom", "/", "z", ";", "if", "(", "loc", "instanceof", "org", ".", "geomapapp", ".", "grid", ".", "HiResGrid", ")", "{", "Rectangle", "rect", "=", "map", ".", "getVisibleRect", "(", ")", ";", "rect", ".", "width", "-=", "insets", ".", "left", "+", "insets", ".", "right", ";", "rect", ".", "height", "-=", "insets", ".", "top", "+", "insets", ".", "bottom", ";", "Rectangle", "r", "=", "(", "(", "org", ".", "geomapapp", ".", "grid", ".", "HiResGrid", ")", "loc", ")", ".", "bounds", ";", "double", "s", "=", "Math", ".", "max", "(", "r", ".", "getWidth", "(", ")", "/", "rect", ".", "width", ",", "r", ".", "getHeight", "(", ")", "/", "rect", ".", "height", ")", ";", "factor", "/=", "s", ";", "map", ".", "doZoom", "(", "p", ",", "factor", ")", ";", "if", "(", "tools", "!=", "null", "&&", "tools", ".", "getGridDialog", "(", ")", "!=", "null", ")", "{", "GridDialog", "gd", "=", "tools", ".", "getGridDialog", "(", ")", ";", "Grid2DOverlay", "[", "]", "overlays", "=", "gd", ".", "getGrids", "(", ")", ";", "if", "(", "!", "gd", ".", "getToggle", "(", ")", ".", "isSelected", "(", ")", ")", "gd", ".", "getToggle", "(", ")", ".", "doClick", "(", ")", ";", "gd", ".", "gridCB", ".", "setSelectedItem", "(", "overlays", "[", "0", "]", ")", ";", "gd", ".", "loadGrid", "(", ")", ";", "}", "}", "else", "{", "map", ".", "doZoom", "(", "p", ",", "factor", ")", ";", "if", "(", "tools", "!=", "null", ")", "tools", ".", "getApp", "(", ")", ".", "autoFocus", "(", ")", ";", "}", "}" ]
Scales to fit the requested place location on user request.
[ "Scales", "to", "fit", "the", "requested", "place", "location", "on", "user", "request", "." ]
[ "//\tSystem.out.println(\"high res\");", "//\ttools.grid.doClick();", "//\t\t\ttools.focus.doClick();" ]
[ { "param": "loc", "type": "MapPlace" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "loc", "type": "MapPlace", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 1960, 774, 12, 863, 6029, 1515, 13, 288, 203, 202, 202, 430, 16051, 1829, 18, 291, 9858, 10756, 327, 31, 203, 203, 202, 202, 2148, 22, 40, 18, 5265, 293, 273, 261, 2148, 22, 40, 18, 5265, 21433, 1458, 18, 588, 14789, 7675, 588, 863, 8546, 12, 7010, 9506, 202, 2704, 4686, 22, 40, 18, 5265, 12, 1515, 18, 9379, 16, 1515, 18, 4801, 8623, 1769, 203, 202, 202, 9056, 998, 273, 852, 18, 588, 11497, 5621, 203, 202, 202, 84, 18, 92, 6413, 998, 31, 203, 202, 202, 84, 18, 93, 6413, 998, 31, 203, 202, 202, 382, 4424, 23576, 273, 852, 18, 588, 382, 4424, 5621, 203, 202, 202, 84, 18, 92, 1011, 23576, 18, 4482, 31, 203, 202, 202, 84, 18, 93, 1011, 23576, 18, 3669, 31, 203, 202, 202, 9056, 5578, 273, 1515, 18, 14932, 19, 94, 31, 203, 202, 202, 430, 12, 1515, 1276, 2358, 18, 10049, 438, 2910, 18, 5222, 18, 25009, 607, 6313, 13, 288, 203, 202, 202, 759, 202, 3163, 18, 659, 18, 8222, 2932, 8766, 400, 8863, 203, 1082, 202, 19463, 4917, 273, 852, 18, 588, 6207, 6120, 5621, 203, 1082, 202, 2607, 18, 2819, 3947, 23576, 18, 4482, 15, 267, 4424, 18, 4083, 31, 203, 1082, 202, 2607, 18, 4210, 3947, 23576, 18, 3669, 15, 267, 4424, 18, 9176, 31, 203, 1082, 202, 19463, 436, 273, 14015, 3341, 18, 10049, 438, 2910, 18, 5222, 18, 25009, 607, 6313, 13, 1829, 2934, 10576, 31, 203, 1082, 202, 9056, 272, 273, 2361, 18, 1896, 12, 436, 18, 588, 2384, 1435, 19, 2607, 18, 2819, 16, 203, 6862, 202, 86, 18, 588, 2686, 1435, 19, 2607, 18, 4210, 1769, 203, 1082, 202, 6812, 9531, 272, 31, 203, 1082, 202, 1458, 18, 2896, 11497, 12, 293, 16, 5578, 11272, 203, 1082, 202, 430, 261, 6642, 480, 446, 597, 8513, 18, 588, 6313, 6353, 1435, 480, 446, 13, 288, 203, 9506, 202, 6313, 6353, 15551, 273, 8513, 18, 588, 6313, 6353, 5621, 203, 9506, 202, 6313, 22, 3191, 502, 5544, 8526, 9218, 87, 273, 15551, 18, 588, 6313, 87, 5621, 203, 9506, 202, 430, 12, 401, 19016, 18, 588, 17986, 7675, 291, 7416, 1435, 262, 15551, 18, 588, 17986, 7675, 2896, 6563, 5621, 203, 9506, 202, 19016, 18, 5222, 8876, 18, 542, 7416, 1180, 12, 9218, 87, 63, 20, 19226, 203, 9506, 202, 19016, 18, 945, 6313, 5621, 203, 1082, 202, 97, 203, 202, 202, 759, 202, 6642, 18, 5222, 18, 2896, 6563, 5621, 203, 202, 202, 97, 469, 225, 288, 203, 1082, 202, 1458, 18, 2896, 11497, 12, 293, 16, 5578, 11272, 203, 759, 1082, 202, 6642, 18, 13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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 348, 21177, 358, 4845, 326, 3764, 3166, 2117, 603, 729, 590, 18, 203, 202, 380, 632, 891, 1515, 2117, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
draw
null
public void draw(Graphics2D g) { if( !showLoc.isSelected() )return; double zoom = map.getZoom(); g.setStroke(new BasicStroke(1f/(float)zoom)); Rectangle rect = map.getVisibleRect(); Dimension r1 = map.getParent().getSize(); Enumeration e = locs.elements(); while( e.hasMoreElements()) { MapPlace loc = (MapPlace)e.nextElement(); loc.draw(g, map); } }
/** * Draws bounding box of bookmarked locations */
Draws bounding box of bookmarked locations
[ "Draws", "bounding", "box", "of", "bookmarked", "locations" ]
public void draw(Graphics2D g) { if( !showLoc.isSelected() )return; double zoom = map.getZoom(); g.setStroke(new BasicStroke(1f/(float)zoom)); Rectangle rect = map.getVisibleRect(); Dimension r1 = map.getParent().getSize(); Enumeration e = locs.elements(); while( e.hasMoreElements()) { MapPlace loc = (MapPlace)e.nextElement(); loc.draw(g, map); } }
[ "public", "void", "draw", "(", "Graphics2D", "g", ")", "{", "if", "(", "!", "showLoc", ".", "isSelected", "(", ")", ")", "return", ";", "double", "zoom", "=", "map", ".", "getZoom", "(", ")", ";", "g", ".", "setStroke", "(", "new", "BasicStroke", "(", "1f", "/", "(", "float", ")", "zoom", ")", ")", ";", "Rectangle", "rect", "=", "map", ".", "getVisibleRect", "(", ")", ";", "Dimension", "r1", "=", "map", ".", "getParent", "(", ")", ".", "getSize", "(", ")", ";", "Enumeration", "e", "=", "locs", ".", "elements", "(", ")", ";", "while", "(", "e", ".", "hasMoreElements", "(", ")", ")", "{", "MapPlace", "loc", "=", "(", "MapPlace", ")", "e", ".", "nextElement", "(", ")", ";", "loc", ".", "draw", "(", "g", ",", "map", ")", ";", "}", "}" ]
Draws bounding box of bookmarked locations
[ "Draws", "bounding", "box", "of", "bookmarked", "locations" ]
[]
[ { "param": "g", "type": "Graphics2D" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "g", "type": "Graphics2D", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 3724, 12, 17558, 22, 40, 314, 13, 288, 203, 202, 202, 430, 12, 401, 4500, 1333, 18, 291, 7416, 1435, 262, 2463, 31, 203, 202, 202, 9056, 7182, 273, 852, 18, 588, 11497, 5621, 203, 202, 202, 75, 18, 542, 14602, 12, 2704, 7651, 14602, 12, 21, 74, 19, 12, 5659, 13, 14932, 10019, 203, 202, 202, 19463, 4917, 273, 852, 18, 588, 6207, 6120, 5621, 203, 202, 202, 8611, 436, 21, 273, 852, 18, 588, 3054, 7675, 588, 1225, 5621, 203, 202, 202, 21847, 425, 273, 26357, 18, 6274, 5621, 203, 202, 202, 17523, 12, 425, 18, 5332, 7417, 3471, 10756, 288, 203, 1082, 202, 863, 6029, 1515, 273, 261, 863, 6029, 13, 73, 18, 4285, 1046, 5621, 203, 1082, 202, 1829, 18, 9446, 12, 75, 16, 852, 1769, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 10184, 87, 7552, 3919, 434, 13696, 329, 7838, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
414aaaae23e47863385ec32b676bcd2b34be66ce
iedadata/geomapapp
org/geomapapp/map/MapPlaces.java
[ "Apache-2.0" ]
Java
mouseReleased
null
public void mouseReleased(MouseEvent e) { int xOff = ((JTree)e.getSource()).getLocationOnScreen().x; int yOff = ((JTree)e.getSource()).getLocationOnScreen().y; currentXPos = e.getX()+xOff; currentYPos = e.getY()+yOff; if ( e.getSource().equals(bookmarkTree) && ( Math.abs(currentXPos - initialXPos) + Math.abs(currentYPos - initialYPos) ) > 50 ) { if (tearOffNode != null) { tearOffSearchTree(); tearOffNode = null; } } }
/** * Dragging from a parent or child node and releasing * produces a teared off view of the tree. */
Dragging from a parent or child node and releasing produces a teared off view of the tree.
[ "Dragging", "from", "a", "parent", "or", "child", "node", "and", "releasing", "produces", "a", "teared", "off", "view", "of", "the", "tree", "." ]
public void mouseReleased(MouseEvent e) { int xOff = ((JTree)e.getSource()).getLocationOnScreen().x; int yOff = ((JTree)e.getSource()).getLocationOnScreen().y; currentXPos = e.getX()+xOff; currentYPos = e.getY()+yOff; if ( e.getSource().equals(bookmarkTree) && ( Math.abs(currentXPos - initialXPos) + Math.abs(currentYPos - initialYPos) ) > 50 ) { if (tearOffNode != null) { tearOffSearchTree(); tearOffNode = null; } } }
[ "public", "void", "mouseReleased", "(", "MouseEvent", "e", ")", "{", "int", "xOff", "=", "(", "(", "JTree", ")", "e", ".", "getSource", "(", ")", ")", ".", "getLocationOnScreen", "(", ")", ".", "x", ";", "int", "yOff", "=", "(", "(", "JTree", ")", "e", ".", "getSource", "(", ")", ")", ".", "getLocationOnScreen", "(", ")", ".", "y", ";", "currentXPos", "=", "e", ".", "getX", "(", ")", "+", "xOff", ";", "currentYPos", "=", "e", ".", "getY", "(", ")", "+", "yOff", ";", "if", "(", "e", ".", "getSource", "(", ")", ".", "equals", "(", "bookmarkTree", ")", "&&", "(", "Math", ".", "abs", "(", "currentXPos", "-", "initialXPos", ")", "+", "Math", ".", "abs", "(", "currentYPos", "-", "initialYPos", ")", ")", ">", "50", ")", "{", "if", "(", "tearOffNode", "!=", "null", ")", "{", "tearOffSearchTree", "(", ")", ";", "tearOffNode", "=", "null", ";", "}", "}", "}" ]
Dragging from a parent or child node and releasing produces a teared off view of the tree.
[ "Dragging", "from", "a", "parent", "or", "child", "node", "and", "releasing", "produces", "a", "teared", "off", "view", "of", "the", "tree", "." ]
[]
[ { "param": "e", "type": "MouseEvent" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "e", "type": "MouseEvent", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 7644, 26363, 12, 9186, 1133, 425, 13, 288, 203, 6862, 202, 474, 619, 7210, 273, 14015, 46, 2471, 13, 73, 18, 588, 1830, 1435, 2934, 588, 2735, 1398, 7956, 7675, 92, 31, 203, 6862, 202, 474, 677, 7210, 273, 14015, 46, 2471, 13, 73, 18, 588, 1830, 1435, 2934, 588, 2735, 1398, 7956, 7675, 93, 31, 203, 6862, 202, 2972, 60, 1616, 273, 425, 18, 588, 60, 1435, 15, 92, 7210, 31, 203, 6862, 202, 2972, 61, 1616, 273, 425, 18, 588, 61, 1435, 15, 93, 7210, 31, 203, 6862, 202, 430, 261, 425, 18, 588, 1830, 7675, 14963, 12, 3618, 3355, 2471, 13, 597, 7010, 6862, 1082, 202, 12, 2361, 18, 5113, 12, 2972, 60, 1616, 300, 2172, 60, 1616, 13, 397, 2361, 18, 5113, 12, 2972, 61, 1616, 300, 2172, 61, 1616, 13, 262, 405, 6437, 262, 288, 203, 25083, 202, 430, 261, 736, 297, 7210, 907, 480, 446, 13, 288, 203, 6862, 1082, 202, 736, 297, 7210, 2979, 2471, 5621, 203, 6862, 1082, 202, 736, 297, 7210, 907, 273, 446, 31, 203, 25083, 202, 97, 203, 6862, 202, 97, 203, 9506, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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578, 1151, 756, 471, 6707, 11730, 7010, 6862, 380, 15505, 279, 6489, 2258, 3397, 1476, 434, 326, 2151, 18, 203, 6862, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7e33d2d9984324fa11f7eda05d749e24ebed04e8
iedadata/geomapapp
haxby/db/pdb/PDBDataSetGraph.java
[ "Apache-2.0" ]
Java
drawLasso
null
void drawLasso(XYGraph xyg) { synchronized (xyg.getTreeLock()) { Graphics2D g = (Graphics2D) xyg.getGraphics(); g.setXORMode(Color.GRAY); int x1 = poly.xpoints[poly.npoints-2]; int y1 = poly.ypoints[poly.npoints-2]; int x2 = poly.xpoints[poly.npoints-1]; int y2 = poly.ypoints[poly.npoints-1]; g.drawLine(x1, y1, x2, y2); } }
/** Draws the last line in polygon poly to XYGraph xyg Uses XOR mode */
Draws the last line in polygon poly to XYGraph xyg Uses XOR mode
[ "Draws", "the", "last", "line", "in", "polygon", "poly", "to", "XYGraph", "xyg", "Uses", "XOR", "mode" ]
void drawLasso(XYGraph xyg) { synchronized (xyg.getTreeLock()) { Graphics2D g = (Graphics2D) xyg.getGraphics(); g.setXORMode(Color.GRAY); int x1 = poly.xpoints[poly.npoints-2]; int y1 = poly.ypoints[poly.npoints-2]; int x2 = poly.xpoints[poly.npoints-1]; int y2 = poly.ypoints[poly.npoints-1]; g.drawLine(x1, y1, x2, y2); } }
[ "void", "drawLasso", "(", "XYGraph", "xyg", ")", "{", "synchronized", "(", "xyg", ".", "getTreeLock", "(", ")", ")", "{", "Graphics2D", "g", "=", "(", "Graphics2D", ")", "xyg", ".", "getGraphics", "(", ")", ";", "g", ".", "setXORMode", "(", "Color", ".", "GRAY", ")", ";", "int", "x1", "=", "poly", ".", "xpoints", "[", "poly", ".", "npoints", "-", "2", "]", ";", "int", "y1", "=", "poly", ".", "ypoints", "[", "poly", ".", "npoints", "-", "2", "]", ";", "int", "x2", "=", "poly", ".", "xpoints", "[", "poly", ".", "npoints", "-", "1", "]", ";", "int", "y2", "=", "poly", ".", "ypoints", "[", "poly", ".", "npoints", "-", "1", "]", ";", "g", ".", "drawLine", "(", "x1", ",", "y1", ",", "x2", ",", "y2", ")", ";", "}", "}" ]
Draws the last line in polygon poly to XYGraph xyg Uses XOR mode
[ "Draws", "the", "last", "line", "in", "polygon", "poly", "to", "XYGraph", "xyg", "Uses", "XOR", "mode" ]
[]
[ { "param": "xyg", "type": "XYGraph" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "xyg", "type": "XYGraph", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 918, 3724, 48, 428, 83, 12, 8546, 4137, 619, 4338, 13, 288, 206, 203, 202, 202, 22043, 261, 1698, 75, 18, 588, 2471, 2531, 10756, 288, 206, 203, 1082, 202, 17558, 22, 40, 314, 273, 261, 17558, 22, 40, 13, 619, 4338, 18, 588, 17558, 5621, 9760, 203, 1082, 202, 75, 18, 542, 60, 916, 2309, 12, 2957, 18, 43, 6722, 1769, 206, 203, 1082, 202, 474, 619, 21, 273, 7573, 18, 92, 4139, 63, 16353, 18, 82, 4139, 17, 22, 15533, 206, 203, 1082, 202, 474, 677, 21, 273, 7573, 18, 879, 763, 87, 63, 16353, 18, 82, 4139, 17, 22, 15533, 206, 203, 1082, 202, 474, 619, 22, 273, 7573, 18, 92, 4139, 63, 16353, 18, 82, 4139, 17, 21, 15533, 206, 203, 1082, 202, 474, 677, 22, 273, 7573, 18, 879, 763, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 206, 203, 202, 202, 25113, 326, 1142, 980, 316, 7154, 7573, 358, 18774, 4137, 619, 4338, 206, 203, 202, 202, 15128, 28086, 1965, 206, 203, 202, 5549, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7e33d2d9984324fa11f7eda05d749e24ebed04e8
iedadata/geomapapp
haxby/db/pdb/PDBDataSetGraph.java
[ "Apache-2.0" ]
Java
unDrawLasso
null
void unDrawLasso(XYGraph xyg){ synchronized (xyg.getTreeLock()) { Graphics2D g = (Graphics2D) xyg.getGraphics(); g.setXORMode(Color.GRAY); for(int i=1;i<poly.npoints;i++) { g.drawLine(poly.xpoints[i-1], poly.ypoints[i-1], poly.xpoints[i], poly.ypoints[i]); } } }
/** undraws the polygon represented by poly */
undraws the polygon represented by poly
[ "undraws", "the", "polygon", "represented", "by", "poly" ]
void unDrawLasso(XYGraph xyg){ synchronized (xyg.getTreeLock()) { Graphics2D g = (Graphics2D) xyg.getGraphics(); g.setXORMode(Color.GRAY); for(int i=1;i<poly.npoints;i++) { g.drawLine(poly.xpoints[i-1], poly.ypoints[i-1], poly.xpoints[i], poly.ypoints[i]); } } }
[ "void", "unDrawLasso", "(", "XYGraph", "xyg", ")", "{", "synchronized", "(", "xyg", ".", "getTreeLock", "(", ")", ")", "{", "Graphics2D", "g", "=", "(", "Graphics2D", ")", "xyg", ".", "getGraphics", "(", ")", ";", "g", ".", "setXORMode", "(", "Color", ".", "GRAY", ")", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "poly", ".", "npoints", ";", "i", "++", ")", "{", "g", ".", "drawLine", "(", "poly", ".", "xpoints", "[", "i", "-", "1", "]", ",", "poly", ".", "ypoints", "[", "i", "-", "1", "]", ",", "poly", ".", "xpoints", "[", "i", "]", ",", "poly", ".", "ypoints", "[", "i", "]", ")", ";", "}", "}", "}" ]
undraws the polygon represented by poly
[ "undraws", "the", "polygon", "represented", "by", "poly" ]
[]
[ { "param": "xyg", "type": "XYGraph" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "xyg", "type": "XYGraph", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 918, 640, 6493, 48, 428, 83, 12, 8546, 4137, 619, 4338, 15329, 206, 203, 202, 202, 22043, 261, 1698, 75, 18, 588, 2471, 2531, 10756, 288, 206, 203, 1082, 202, 17558, 22, 40, 314, 273, 261, 17558, 22, 40, 13, 619, 4338, 18, 588, 17558, 5621, 9760, 203, 1082, 202, 75, 18, 542, 60, 916, 2309, 12, 2957, 18, 43, 6722, 1769, 206, 203, 1082, 202, 1884, 12, 474, 277, 33, 21, 31, 77, 32, 16353, 18, 82, 4139, 31, 77, 27245, 288, 206, 203, 9506, 202, 75, 18, 9446, 1670, 12, 16353, 18, 92, 4139, 63, 77, 17, 21, 6487, 7573, 18, 879, 763, 87, 63, 77, 17, 21, 6487, 7573, 18, 92, 4139, 63, 77, 6487, 7573, 18, 879, 763, 87, 63, 77, 19226, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 1, 26873, 206, 203, 202, 202, 1074, 1899, 87, 326, 7154, 10584, 635, 7573, 206, 203, 202, 5549, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7e33d2d9984324fa11f7eda05d749e24ebed04e8
iedadata/geomapapp
haxby/db/pdb/PDBDataSetGraph.java
[ "Apache-2.0" ]
Java
selectLasso
null
void selectLasso(XYGraph xyg) { GeneralPath path = new GeneralPath(); for (int i=0; i<poly.npoints; i++){ Point2D p2 = new Point2D.Float (poly.xpoints[i], poly.ypoints[i]); Point2D point = new Point2D.Double (xyg.getXAt(p2), xyg.getYAt(p2)); if (i==0) path.moveTo((float)point.getX(), (float) point.getY()); else path.lineTo((float)point.getX(), (float) point.getY()); } path.closePath(); Rectangle2D r = path.getBounds(); int n = 0; while (n<x.length&&(Float.isNaN(x[n])||Float.isNaN(y[n]))) { n++; } if (n>=x.length) return; table.getSelectionModel().setValueIsAdjusting(true); table.clearSelection(); for (int i = n; i < x.length; i++) { if (Float.isNaN(x[i])||Float.isNaN(y[i])) continue; if (r.contains(x[i], y[i]) && path.contains(x[i], y[i])) { table.getSelectionModel().addSelectionInterval(i, i); } } table.getSelectionModel().setValueIsAdjusting(false); unDrawLasso(xyg); if (table.getSelectedRow() != -1) table.ensureIndexIsVisible(table.getSelectedRow()); }
/** Selects the area represented by poly */
Selects the area represented by poly
[ "Selects", "the", "area", "represented", "by", "poly" ]
void selectLasso(XYGraph xyg) { GeneralPath path = new GeneralPath(); for (int i=0; i<poly.npoints; i++){ Point2D p2 = new Point2D.Float (poly.xpoints[i], poly.ypoints[i]); Point2D point = new Point2D.Double (xyg.getXAt(p2), xyg.getYAt(p2)); if (i==0) path.moveTo((float)point.getX(), (float) point.getY()); else path.lineTo((float)point.getX(), (float) point.getY()); } path.closePath(); Rectangle2D r = path.getBounds(); int n = 0; while (n<x.length&&(Float.isNaN(x[n])||Float.isNaN(y[n]))) { n++; } if (n>=x.length) return; table.getSelectionModel().setValueIsAdjusting(true); table.clearSelection(); for (int i = n; i < x.length; i++) { if (Float.isNaN(x[i])||Float.isNaN(y[i])) continue; if (r.contains(x[i], y[i]) && path.contains(x[i], y[i])) { table.getSelectionModel().addSelectionInterval(i, i); } } table.getSelectionModel().setValueIsAdjusting(false); unDrawLasso(xyg); if (table.getSelectedRow() != -1) table.ensureIndexIsVisible(table.getSelectedRow()); }
[ "void", "selectLasso", "(", "XYGraph", "xyg", ")", "{", "GeneralPath", "path", "=", "new", "GeneralPath", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "poly", ".", "npoints", ";", "i", "++", ")", "{", "Point2D", "p2", "=", "new", "Point2D", ".", "Float", "(", "poly", ".", "xpoints", "[", "i", "]", ",", "poly", ".", "ypoints", "[", "i", "]", ")", ";", "Point2D", "point", "=", "new", "Point2D", ".", "Double", "(", "xyg", ".", "getXAt", "(", "p2", ")", ",", "xyg", ".", "getYAt", "(", "p2", ")", ")", ";", "if", "(", "i", "==", "0", ")", "path", ".", "moveTo", "(", "(", "float", ")", "point", ".", "getX", "(", ")", ",", "(", "float", ")", "point", ".", "getY", "(", ")", ")", ";", "else", "path", ".", "lineTo", "(", "(", "float", ")", "point", ".", "getX", "(", ")", ",", "(", "float", ")", "point", ".", "getY", "(", ")", ")", ";", "}", "path", ".", "closePath", "(", ")", ";", "Rectangle2D", "r", "=", "path", ".", "getBounds", "(", ")", ";", "int", "n", "=", "0", ";", "while", "(", "n", "<", "x", ".", "length", "&&", "(", "Float", ".", "isNaN", "(", "x", "[", "n", "]", ")", "||", "Float", ".", "isNaN", "(", "y", "[", "n", "]", ")", ")", ")", "{", "n", "++", ";", "}", "if", "(", "n", ">=", "x", ".", "length", ")", "return", ";", "table", ".", "getSelectionModel", "(", ")", ".", "setValueIsAdjusting", "(", "true", ")", ";", "table", ".", "clearSelection", "(", ")", ";", "for", "(", "int", "i", "=", "n", ";", "i", "<", "x", ".", "length", ";", "i", "++", ")", "{", "if", "(", "Float", ".", "isNaN", "(", "x", "[", "i", "]", ")", "||", "Float", ".", "isNaN", "(", "y", "[", "i", "]", ")", ")", "continue", ";", "if", "(", "r", ".", "contains", "(", "x", "[", "i", "]", ",", "y", "[", "i", "]", ")", "&&", "path", ".", "contains", "(", "x", "[", "i", "]", ",", "y", "[", "i", "]", ")", ")", "{", "table", ".", "getSelectionModel", "(", ")", ".", "addSelectionInterval", "(", "i", ",", "i", ")", ";", "}", "}", "table", ".", "getSelectionModel", "(", ")", ".", "setValueIsAdjusting", "(", "false", ")", ";", "unDrawLasso", "(", "xyg", ")", ";", "if", "(", "table", ".", "getSelectedRow", "(", ")", "!=", "-", "1", ")", "table", ".", "ensureIndexIsVisible", "(", "table", ".", "getSelectedRow", "(", ")", ")", ";", "}" ]
Selects the area represented by poly
[ "Selects", "the", "area", "represented", "by", "poly" ]
[]
[ { "param": "xyg", "type": "XYGraph" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "xyg", "type": "XYGraph", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 918, 2027, 48, 428, 83, 12, 8546, 4137, 619, 4338, 13, 288, 206, 203, 202, 202, 12580, 743, 589, 273, 394, 9544, 743, 5621, 206, 203, 206, 203, 202, 202, 1884, 261, 474, 277, 33, 20, 31, 277, 32, 16353, 18, 82, 4139, 31, 277, 27245, 95, 206, 203, 1082, 202, 2148, 22, 40, 293, 22, 273, 394, 4686, 22, 40, 18, 4723, 261, 16353, 18, 92, 4139, 63, 77, 6487, 7573, 18, 879, 763, 87, 63, 77, 19226, 206, 203, 1082, 202, 2148, 22, 40, 1634, 273, 394, 4686, 22, 40, 18, 5265, 261, 1698, 75, 18, 588, 60, 861, 12, 84, 22, 3631, 619, 4338, 18, 588, 61, 861, 12, 84, 22, 10019, 206, 203, 1082, 202, 430, 261, 77, 631, 20, 13, 589, 18, 8501, 774, 12443, 5659, 13, 1153, 18, 588, 60, 9334, 261, 5659, 13, 1634, 18, 588, 61, 10663, 206, 203, 1082, 202, 12107, 589, 18, 1369, 774, 12443, 5659, 13, 1153, 18, 588, 60, 9334, 261, 5659, 13, 1634, 18, 588, 61, 10663, 206, 203, 202, 202, 97, 206, 203, 202, 202, 803, 18, 4412, 743, 5621, 206, 203, 202, 202, 19463, 22, 40, 436, 273, 589, 18, 588, 5694, 5621, 206, 203, 206, 203, 202, 202, 474, 290, 273, 374, 31, 206, 203, 202, 202, 17523, 261, 82, 32, 92, 18, 2469, 10, 10, 12, 4723, 18, 291, 21172, 12, 92, 63, 82, 5717, 20081, 4723, 18, 291, 21172, 12, 93, 63, 82, 65, 20349, 288, 206, 203, 1082, 202, 82, 9904, 31, 206, 203, 202, 202, 97, 206, 203, 202, 202, 430, 261, 82, 34, 33, 92, 18, 2469, 13, 327, 31, 206, 203, 1082, 206, 203, 202, 202, 2121, 18, 588, 6233, 1488, 7675, 542, 620, 2520, 10952, 310, 12, 3767, 1769, 206, 203, 202, 202, 2121, 18, 8507, 6233, 5621, 206, 203, 202, 202, 1884, 261, 474, 277, 273, 290, 31, 277, 411, 619, 18, 2469, 31, 277, 27245, 288, 206, 203, 1082, 202, 430, 261, 4723, 18, 291, 21172, 12, 92, 63, 77, 5717, 20081, 4723, 18, 291, 21172, 12, 93, 63, 77, 22643, 1324, 31, 206, 203, 1082, 202, 430, 261, 86, 18, 12298, 12, 92, 63, 77, 6487, 677, 63, 77, 5717, 597, 589, 18, 12298, 12, 92, 63, 77, 6487, 677, 63, 77, 22643, 288, 206, 203, 9506, 202, 2121, 18, 588, 6233, 1488, 7675, 1289, 6233, 4006, 12, 77, 16, 277, 1769, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 206, 203, 202, 202, 2121, 18, 588, 6233, 1488, 7675, 542, 620, 2520, 10952, 310, 12, 5743, 1769, 206, 203, 206, 203, 202, 202, 318, 6493, 48, 428, 83, 12, 1698, 75, 1769, 206, 203, 202, 202, 430, 261, 2121, 18, 588, 7416, 1999, 1435, 480, 300, 21, 13, 206, 203, 1082, 202, 2121, 18, 15735, 1016, 2520, 6207, 12, 2121, 18, 588, 7416, 1999, 10663, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7e33d2d9984324fa11f7eda05d749e24ebed04e8
iedadata/geomapapp
haxby/db/pdb/PDBDataSetGraph.java
[ "Apache-2.0" ]
Java
initDrag
null
public boolean initDrag(Point p, XYGraph xyg) { testForSide(p, xyg); if (side==0)return false; drawLine(xyg); if (side<0) lastV=(float)xyg.getXAt(p); else lastV=(float)xyg.getYAt(p); drawLine(xyg); return true; }
/** initDrag returns true if a drag has been started, false otherwise */
initDrag returns true if a drag has been started, false otherwise
[ "initDrag", "returns", "true", "if", "a", "drag", "has", "been", "started", "false", "otherwise" ]
public boolean initDrag(Point p, XYGraph xyg) { testForSide(p, xyg); if (side==0)return false; drawLine(xyg); if (side<0) lastV=(float)xyg.getXAt(p); else lastV=(float)xyg.getYAt(p); drawLine(xyg); return true; }
[ "public", "boolean", "initDrag", "(", "Point", "p", ",", "XYGraph", "xyg", ")", "{", "testForSide", "(", "p", ",", "xyg", ")", ";", "if", "(", "side", "==", "0", ")", "return", "false", ";", "drawLine", "(", "xyg", ")", ";", "if", "(", "side", "<", "0", ")", "lastV", "=", "(", "float", ")", "xyg", ".", "getXAt", "(", "p", ")", ";", "else", "lastV", "=", "(", "float", ")", "xyg", ".", "getYAt", "(", "p", ")", ";", "drawLine", "(", "xyg", ")", ";", "return", "true", ";", "}" ]
initDrag returns true if a drag has been started, false otherwise
[ "initDrag", "returns", "true", "if", "a", "drag", "has", "been", "started", "false", "otherwise" ]
[]
[ { "param": "p", "type": "Point" }, { "param": "xyg", "type": "XYGraph" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "p", "type": "Point", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "xyg", "type": "XYGraph", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 1208, 11728, 12, 2148, 293, 16, 18774, 4137, 619, 4338, 13, 288, 206, 203, 202, 202, 3813, 1290, 8895, 12, 84, 16, 619, 4338, 1769, 206, 203, 202, 202, 430, 261, 5564, 631, 20, 13, 2463, 629, 31, 206, 203, 202, 202, 9446, 1670, 12, 1698, 75, 1769, 206, 203, 202, 202, 430, 261, 5564, 32, 20, 13, 1142, 58, 28657, 5659, 13, 1698, 75, 18, 588, 60, 861, 12, 84, 1769, 206, 203, 202, 202, 12107, 1142, 58, 28657, 5659, 13, 1698, 75, 18, 588, 61, 861, 12, 84, 1769, 206, 203, 202, 202, 9446, 1670, 12, 1698, 75, 1769, 206, 203, 202, 202, 2463, 638, 31, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 206, 203, 202, 202, 2738, 11728, 1135, 638, 309, 279, 8823, 711, 2118, 5746, 16, 629, 3541, 206, 203, 202, 5549, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
454a67502cb77f46b3a7e48efccdc15ad3093b77
iedadata/geomapapp
haxby/nav/PingNav.java
[ "Apache-2.0" ]
Java
speedTest
null
public boolean speedTest(double maxSpeed) { int i1 = 0; while( i1<nPing && edit[i1] )i1++; if(i1>=nPing-1) return true; int i2 = i1+1; while( i2<nPing && edit[i2] )i2++; if(i2==nPing)return true; XYZ p1 = XYZ.LonLat_to_XYZ(new Point2D.Double(x[i1], y[i1])); XYZ p2; do { if(time[i2]<=time[i1]) return true; p2 = XYZ.LonLat_to_XYZ(new Point2D.Double(x[i2], y[i2])); if(speed(p1, time[i1], p2, time[i2]) > maxSpeed) return true; p1.x = p2.x; p1.y = p2.y; p1.z = p2.z; i1 = i2; i2++; while( i2<nPing && edit[i2] )i2++; } while(i2<nPing); return false; }
/** * returns true if (1) there are 0 or 1 non-edited points in this * nav object; (2) time difference between succesive points is <= 0; * or (3) if the speed defined by succesive points is greater than * maxSpeed meters/second. */
returns true if (1) there are 0 or 1 non-edited points in this nav object; (2) time difference between succesive points is <= 0; or (3) if the speed defined by succesive points is greater than maxSpeed meters/second.
[ "returns", "true", "if", "(", "1", ")", "there", "are", "0", "or", "1", "non", "-", "edited", "points", "in", "this", "nav", "object", ";", "(", "2", ")", "time", "difference", "between", "succesive", "points", "is", "<", "=", "0", ";", "or", "(", "3", ")", "if", "the", "speed", "defined", "by", "succesive", "points", "is", "greater", "than", "maxSpeed", "meters", "/", "second", "." ]
public boolean speedTest(double maxSpeed) { int i1 = 0; while( i1<nPing && edit[i1] )i1++; if(i1>=nPing-1) return true; int i2 = i1+1; while( i2<nPing && edit[i2] )i2++; if(i2==nPing)return true; XYZ p1 = XYZ.LonLat_to_XYZ(new Point2D.Double(x[i1], y[i1])); XYZ p2; do { if(time[i2]<=time[i1]) return true; p2 = XYZ.LonLat_to_XYZ(new Point2D.Double(x[i2], y[i2])); if(speed(p1, time[i1], p2, time[i2]) > maxSpeed) return true; p1.x = p2.x; p1.y = p2.y; p1.z = p2.z; i1 = i2; i2++; while( i2<nPing && edit[i2] )i2++; } while(i2<nPing); return false; }
[ "public", "boolean", "speedTest", "(", "double", "maxSpeed", ")", "{", "int", "i1", "=", "0", ";", "while", "(", "i1", "<", "nPing", "&&", "edit", "[", "i1", "]", ")", "i1", "++", ";", "if", "(", "i1", ">=", "nPing", "-", "1", ")", "return", "true", ";", "int", "i2", "=", "i1", "+", "1", ";", "while", "(", "i2", "<", "nPing", "&&", "edit", "[", "i2", "]", ")", "i2", "++", ";", "if", "(", "i2", "==", "nPing", ")", "return", "true", ";", "XYZ", "p1", "=", "XYZ", ".", "LonLat_to_XYZ", "(", "new", "Point2D", ".", "Double", "(", "x", "[", "i1", "]", ",", "y", "[", "i1", "]", ")", ")", ";", "XYZ", "p2", ";", "do", "{", "if", "(", "time", "[", "i2", "]", "<=", "time", "[", "i1", "]", ")", "return", "true", ";", "p2", "=", "XYZ", ".", "LonLat_to_XYZ", "(", "new", "Point2D", ".", "Double", "(", "x", "[", "i2", "]", ",", "y", "[", "i2", "]", ")", ")", ";", "if", "(", "speed", "(", "p1", ",", "time", "[", "i1", "]", ",", "p2", ",", "time", "[", "i2", "]", ")", ">", "maxSpeed", ")", "return", "true", ";", "p1", ".", "x", "=", "p2", ".", "x", ";", "p1", ".", "y", "=", "p2", ".", "y", ";", "p1", ".", "z", "=", "p2", ".", "z", ";", "i1", "=", "i2", ";", "i2", "++", ";", "while", "(", "i2", "<", "nPing", "&&", "edit", "[", "i2", "]", ")", "i2", "++", ";", "}", "while", "(", "i2", "<", "nPing", ")", ";", "return", "false", ";", "}" ]
returns true if (1) there are 0 or 1 non-edited points in this nav object; (2) time difference between succesive points is <= 0; or (3) if the speed defined by succesive points is greater than maxSpeed meters/second.
[ "returns", "true", "if", "(", "1", ")", "there", "are", "0", "or", "1", "non", "-", "edited", "points", "in", "this", "nav", "object", ";", "(", "2", ")", "time", "difference", "between", "succesive", "points", "is", "<", "=", "0", ";", "or", "(", "3", ")", "if", "the", "speed", "defined", "by", "succesive", "points", "is", "greater", "than", "maxSpeed", "meters", "/", "second", "." ]
[]
[ { "param": "maxSpeed", "type": "double" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "maxSpeed", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 8632, 4709, 12, 9056, 943, 16562, 13, 288, 203, 202, 202, 474, 277, 21, 273, 374, 31, 203, 202, 202, 17523, 12, 277, 21, 32, 82, 17223, 597, 3874, 63, 77, 21, 65, 262, 77, 21, 9904, 31, 203, 202, 202, 430, 12, 77, 21, 34, 33, 82, 17223, 17, 21, 13, 327, 638, 31, 203, 202, 202, 474, 277, 22, 273, 277, 21, 15, 21, 31, 203, 202, 202, 17523, 12, 277, 22, 32, 82, 17223, 597, 3874, 63, 77, 22, 65, 262, 77, 22, 9904, 31, 203, 202, 202, 430, 12, 77, 22, 631, 82, 17223, 13, 2463, 638, 31, 203, 202, 202, 23479, 293, 21, 273, 30742, 18, 15927, 6607, 67, 869, 67, 23479, 12, 2704, 4686, 22, 40, 18, 5265, 12, 92, 63, 77, 21, 6487, 677, 63, 77, 21, 5717, 1769, 203, 202, 202, 23479, 293, 22, 31, 203, 202, 202, 2896, 288, 203, 1082, 202, 430, 12, 957, 63, 77, 22, 65, 32, 33, 957, 63, 77, 21, 5717, 327, 638, 31, 203, 1082, 202, 84, 22, 273, 30742, 18, 15927, 6607, 67, 869, 67, 23479, 12, 2704, 4686, 22, 40, 18, 5265, 12, 92, 63, 77, 22, 6487, 677, 63, 77, 22, 5717, 1769, 203, 1082, 202, 430, 12, 13871, 12, 84, 21, 16, 813, 63, 77, 21, 6487, 293, 22, 16, 813, 63, 77, 22, 5717, 405, 943, 16562, 13, 327, 638, 31, 203, 1082, 202, 84, 21, 18, 92, 273, 293, 22, 18, 92, 31, 203, 1082, 202, 84, 21, 18, 93, 273, 293, 22, 18, 93, 31, 203, 1082, 202, 84, 21, 18, 94, 273, 293, 22, 18, 94, 31, 203, 1082, 202, 77, 21, 273, 277, 22, 31, 203, 1082, 202, 77, 22, 9904, 31, 203, 1082, 202, 17523, 12, 277, 22, 32, 82, 17223, 597, 3874, 63, 77, 22, 65, 262, 77, 22, 9904, 31, 203, 202, 202, 97, 1323, 12, 77, 22, 32, 82, 17223, 1769, 203, 202, 202, 2463, 629, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 31, 203, 14, 225, 578, 261, 23, 13, 309, 326, 8632, 2553, 635, 8667, 764, 688, 3143, 353, 6802, 2353, 203, 14, 225, 943, 16562, 27169, 19, 8538, 18, 203, 5549, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
c9c81389c068117b7f89426dcce709c033b46bbf
iedadata/geomapapp
org/geomapapp/util/XML_Menu.java
[ "Apache-2.0" ]
Java
createMainMenuBar
JMenuBar
public static JMenuBar createMainMenuBar(List<XML_Menu> menuLayers) { //clear old menu hash tables (if switching projection) clearMenus(); JMenuBar mainMenuBar = new JMenuBar(); for (XML_Menu sub_menu : menuLayers) { if ( mapApp.start != null ) { mapApp.start.setText("Initializing " + sub_menu.name + " Menu..."); } if ( sub_menu.proj.toLowerCase().indexOf(MapApp.CURRENT_PROJECTION.toLowerCase()) != -1 ) { JMenu subMenu = createMenu(sub_menu); if (subMenu.getItemCount() != 0) mainMenuBar.add(subMenu); subMenu.addMenuListener(mapApp.listener); } } if ( mapApp != null && mapApp.start != null ) { mapApp.start.setText("Initializing GUI"); } return mainMenuBar; }
// Calls one XML list to load menus to main menu bar.
Calls one XML list to load menus to main menu bar.
[ "Calls", "one", "XML", "list", "to", "load", "menus", "to", "main", "menu", "bar", "." ]
public static JMenuBar createMainMenuBar(List<XML_Menu> menuLayers) { clearMenus(); JMenuBar mainMenuBar = new JMenuBar(); for (XML_Menu sub_menu : menuLayers) { if ( mapApp.start != null ) { mapApp.start.setText("Initializing " + sub_menu.name + " Menu..."); } if ( sub_menu.proj.toLowerCase().indexOf(MapApp.CURRENT_PROJECTION.toLowerCase()) != -1 ) { JMenu subMenu = createMenu(sub_menu); if (subMenu.getItemCount() != 0) mainMenuBar.add(subMenu); subMenu.addMenuListener(mapApp.listener); } } if ( mapApp != null && mapApp.start != null ) { mapApp.start.setText("Initializing GUI"); } return mainMenuBar; }
[ "public", "static", "JMenuBar", "createMainMenuBar", "(", "List", "<", "XML_Menu", ">", "menuLayers", ")", "{", "clearMenus", "(", ")", ";", "JMenuBar", "mainMenuBar", "=", "new", "JMenuBar", "(", ")", ";", "for", "(", "XML_Menu", "sub_menu", ":", "menuLayers", ")", "{", "if", "(", "mapApp", ".", "start", "!=", "null", ")", "{", "mapApp", ".", "start", ".", "setText", "(", "\"Initializing \"", "+", "sub_menu", ".", "name", "+", "\" Menu...\"", ")", ";", "}", "if", "(", "sub_menu", ".", "proj", ".", "toLowerCase", "(", ")", ".", "indexOf", "(", "MapApp", ".", "CURRENT_PROJECTION", ".", "toLowerCase", "(", ")", ")", "!=", "-", "1", ")", "{", "JMenu", "subMenu", "=", "createMenu", "(", "sub_menu", ")", ";", "if", "(", "subMenu", ".", "getItemCount", "(", ")", "!=", "0", ")", "mainMenuBar", ".", "add", "(", "subMenu", ")", ";", "subMenu", ".", "addMenuListener", "(", "mapApp", ".", "listener", ")", ";", "}", "}", "if", "(", "mapApp", "!=", "null", "&&", "mapApp", ".", "start", "!=", "null", ")", "{", "mapApp", ".", "start", ".", "setText", "(", "\"Initializing GUI\"", ")", ";", "}", "return", "mainMenuBar", ";", "}" ]
Calls one XML list to load menus to main menu bar.
[ "Calls", "one", "XML", "list", "to", "load", "menus", "to", "main", "menu", "bar", "." ]
[ "//clear old menu hash tables (if switching projection)\r" ]
[ { "param": "menuLayers", "type": "List<XML_Menu>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "menuLayers", "type": "List<XML_Menu>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 804, 4599, 5190, 752, 6376, 4599, 5190, 12, 682, 32, 4201, 67, 4599, 34, 3824, 9282, 13, 288, 206, 203, 202, 202, 759, 8507, 1592, 3824, 1651, 4606, 261, 430, 30882, 8106, 13, 206, 203, 202, 202, 8507, 29755, 5621, 206, 203, 1082, 206, 203, 202, 202, 46, 4599, 5190, 2774, 4599, 5190, 273, 394, 804, 4599, 5190, 5621, 206, 203, 202, 202, 1884, 261, 4201, 67, 4599, 720, 67, 5414, 294, 3824, 9282, 13, 288, 206, 203, 1082, 202, 430, 261, 852, 3371, 18, 1937, 480, 446, 262, 288, 206, 203, 9506, 202, 1458, 3371, 18, 1937, 18, 542, 1528, 2932, 29782, 315, 397, 720, 67, 5414, 18, 529, 397, 315, 9809, 7070, 1769, 206, 203, 1082, 202, 97, 206, 203, 1082, 202, 430, 261, 720, 67, 5414, 18, 17995, 18, 869, 5630, 7675, 31806, 12, 863, 3371, 18, 15487, 67, 3373, 30781, 3106, 18, 869, 5630, 10756, 480, 300, 21, 262, 288, 206, 203, 9506, 202, 46, 4599, 720, 4599, 273, 752, 4599, 12, 1717, 67, 5414, 1769, 206, 203, 9506, 202, 430, 261, 1717, 4599, 18, 588, 30687, 1435, 480, 374, 13, 206, 203, 6862, 202, 5254, 4599, 5190, 18, 1289, 12, 1717, 4599, 1769, 206, 203, 6862, 202, 1717, 4599, 18, 1289, 4599, 2223, 12, 1458, 3371, 18, 12757, 1769, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 206, 203, 202, 202, 430, 261, 852, 3371, 480, 446, 597, 852, 3371, 18, 1937, 480, 446, 262, 288, 206, 203, 1082, 202, 1458, 3371, 18, 1937, 18, 542, 1528, 2932, 29782, 10978, 8863, 206, 203, 202, 202, 97, 206, 203, 202, 202, 2463, 2774, 4599, 5190, 31, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0 ]
[ 1, 759, 23665, 1245, 3167, 666, 358, 1262, 21374, 358, 2774, 3824, 4653, 18, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
c9c81389c068117b7f89426dcce709c033b46bbf
iedadata/geomapapp
org/geomapapp/util/XML_Menu.java
[ "Apache-2.0" ]
Java
createMainMenuBars
JMenuBar
public static JMenuBar createMainMenuBars(List<XML_Menu> menuLayers, List<XML_Menu> menuLayersLocal) { JMenuBar mainMenuBar = new JMenuBar(); for (XML_Menu sub_menu : menuLayers) { if ( mapApp.start != null ) { mapApp.start.setText("Initializing " + sub_menu.name + " Menu..."); } if ( sub_menu.proj.toLowerCase().indexOf(MapApp.CURRENT_PROJECTION.toLowerCase()) != -1 ) { JMenu subMenu = createMenu(sub_menu); if (subMenu.getItemCount() != 0) mainMenuBar.add(subMenu); subMenu.addMenuListener(mapApp.listener); } } // Add My Sessions Menu for (XML_Menu sub_menu2 : menuLayersLocal) { if ( mapApp.start != null ) { mapApp.start.setText("Initializing " + sub_menu2.name + " Menu..."); } if ( sub_menu2.proj.toLowerCase().indexOf(MapApp.CURRENT_PROJECTION.toLowerCase()) != -1 ) { JMenu subMenu2 = createMenu(sub_menu2); if (subMenu2.getItemCount() != 0) mainMenuBar.add(subMenu2); subMenu2.addMenuListener(mapApp.listener); } } if ( mapApp != null && mapApp.start != null ) { mapApp.start.setText("Initializing GUI"); } return mainMenuBar; }
/* Calls Two XML list to load menus to main menu bar. One can be from server * while one in on user desktop or another server. */
Calls Two XML list to load menus to main menu bar. One can be from server while one in on user desktop or another server.
[ "Calls", "Two", "XML", "list", "to", "load", "menus", "to", "main", "menu", "bar", ".", "One", "can", "be", "from", "server", "while", "one", "in", "on", "user", "desktop", "or", "another", "server", "." ]
public static JMenuBar createMainMenuBars(List<XML_Menu> menuLayers, List<XML_Menu> menuLayersLocal) { JMenuBar mainMenuBar = new JMenuBar(); for (XML_Menu sub_menu : menuLayers) { if ( mapApp.start != null ) { mapApp.start.setText("Initializing " + sub_menu.name + " Menu..."); } if ( sub_menu.proj.toLowerCase().indexOf(MapApp.CURRENT_PROJECTION.toLowerCase()) != -1 ) { JMenu subMenu = createMenu(sub_menu); if (subMenu.getItemCount() != 0) mainMenuBar.add(subMenu); subMenu.addMenuListener(mapApp.listener); } } for (XML_Menu sub_menu2 : menuLayersLocal) { if ( mapApp.start != null ) { mapApp.start.setText("Initializing " + sub_menu2.name + " Menu..."); } if ( sub_menu2.proj.toLowerCase().indexOf(MapApp.CURRENT_PROJECTION.toLowerCase()) != -1 ) { JMenu subMenu2 = createMenu(sub_menu2); if (subMenu2.getItemCount() != 0) mainMenuBar.add(subMenu2); subMenu2.addMenuListener(mapApp.listener); } } if ( mapApp != null && mapApp.start != null ) { mapApp.start.setText("Initializing GUI"); } return mainMenuBar; }
[ "public", "static", "JMenuBar", "createMainMenuBars", "(", "List", "<", "XML_Menu", ">", "menuLayers", ",", "List", "<", "XML_Menu", ">", "menuLayersLocal", ")", "{", "JMenuBar", "mainMenuBar", "=", "new", "JMenuBar", "(", ")", ";", "for", "(", "XML_Menu", "sub_menu", ":", "menuLayers", ")", "{", "if", "(", "mapApp", ".", "start", "!=", "null", ")", "{", "mapApp", ".", "start", ".", "setText", "(", "\"Initializing \"", "+", "sub_menu", ".", "name", "+", "\" Menu...\"", ")", ";", "}", "if", "(", "sub_menu", ".", "proj", ".", "toLowerCase", "(", ")", ".", "indexOf", "(", "MapApp", ".", "CURRENT_PROJECTION", ".", "toLowerCase", "(", ")", ")", "!=", "-", "1", ")", "{", "JMenu", "subMenu", "=", "createMenu", "(", "sub_menu", ")", ";", "if", "(", "subMenu", ".", "getItemCount", "(", ")", "!=", "0", ")", "mainMenuBar", ".", "add", "(", "subMenu", ")", ";", "subMenu", ".", "addMenuListener", "(", "mapApp", ".", "listener", ")", ";", "}", "}", "for", "(", "XML_Menu", "sub_menu2", ":", "menuLayersLocal", ")", "{", "if", "(", "mapApp", ".", "start", "!=", "null", ")", "{", "mapApp", ".", "start", ".", "setText", "(", "\"Initializing \"", "+", "sub_menu2", ".", "name", "+", "\" Menu...\"", ")", ";", "}", "if", "(", "sub_menu2", ".", "proj", ".", "toLowerCase", "(", ")", ".", "indexOf", "(", "MapApp", ".", "CURRENT_PROJECTION", ".", "toLowerCase", "(", ")", ")", "!=", "-", "1", ")", "{", "JMenu", "subMenu2", "=", "createMenu", "(", "sub_menu2", ")", ";", "if", "(", "subMenu2", ".", "getItemCount", "(", ")", "!=", "0", ")", "mainMenuBar", ".", "add", "(", "subMenu2", ")", ";", "subMenu2", ".", "addMenuListener", "(", "mapApp", ".", "listener", ")", ";", "}", "}", "if", "(", "mapApp", "!=", "null", "&&", "mapApp", ".", "start", "!=", "null", ")", "{", "mapApp", ".", "start", ".", "setText", "(", "\"Initializing GUI\"", ")", ";", "}", "return", "mainMenuBar", ";", "}" ]
Calls Two XML list to load menus to main menu bar.
[ "Calls", "Two", "XML", "list", "to", "load", "menus", "to", "main", "menu", "bar", "." ]
[ "// Add My Sessions Menu\r" ]
[ { "param": "menuLayers", "type": "List<XML_Menu>" }, { "param": "menuLayersLocal", "type": "List<XML_Menu>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "menuLayers", "type": "List<XML_Menu>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "menuLayersLocal", "type": "List<XML_Menu>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 804, 4599, 5190, 752, 6376, 4599, 5190, 87, 12, 682, 32, 4201, 67, 4599, 34, 3824, 9282, 16, 987, 32, 4201, 67, 4599, 34, 3824, 9282, 2042, 13, 288, 206, 203, 202, 202, 46, 4599, 5190, 2774, 4599, 5190, 273, 394, 804, 4599, 5190, 5621, 206, 203, 202, 202, 1884, 261, 4201, 67, 4599, 720, 67, 5414, 294, 3824, 9282, 13, 288, 206, 203, 1082, 202, 430, 261, 852, 3371, 18, 1937, 480, 446, 262, 288, 206, 203, 9506, 202, 1458, 3371, 18, 1937, 18, 542, 1528, 2932, 29782, 315, 397, 720, 67, 5414, 18, 529, 397, 315, 9809, 7070, 1769, 206, 203, 1082, 202, 97, 206, 203, 1082, 202, 430, 261, 720, 67, 5414, 18, 17995, 18, 869, 5630, 7675, 31806, 12, 863, 3371, 18, 15487, 67, 3373, 30781, 3106, 18, 869, 5630, 10756, 480, 300, 21, 262, 288, 206, 203, 9506, 202, 46, 4599, 720, 4599, 273, 752, 4599, 12, 1717, 67, 5414, 1769, 206, 203, 9506, 202, 430, 261, 1717, 4599, 18, 588, 30687, 1435, 480, 374, 13, 206, 203, 6862, 202, 5254, 4599, 5190, 18, 1289, 12, 1717, 4599, 1769, 206, 203, 6862, 202, 1717, 4599, 18, 1289, 4599, 2223, 12, 1458, 3371, 18, 12757, 1769, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 206, 203, 202, 202, 759, 1436, 8005, 3877, 87, 9809, 206, 203, 202, 202, 1884, 261, 4201, 67, 4599, 720, 67, 5414, 22, 294, 3824, 9282, 2042, 13, 288, 206, 203, 1082, 202, 430, 261, 852, 3371, 18, 1937, 480, 446, 262, 288, 206, 203, 9506, 202, 1458, 3371, 18, 1937, 18, 542, 1528, 2932, 29782, 315, 397, 720, 67, 5414, 22, 18, 529, 397, 315, 9809, 7070, 1769, 206, 203, 1082, 202, 97, 206, 203, 1082, 202, 430, 261, 720, 67, 5414, 22, 18, 17995, 18, 869, 5630, 7675, 31806, 12, 863, 3371, 18, 15487, 67, 3373, 30781, 3106, 18, 869, 5630, 10756, 480, 300, 21, 262, 288, 206, 203, 9506, 202, 46, 4599, 720, 4599, 22, 273, 752, 4599, 12, 1717, 67, 5414, 22, 1769, 206, 203, 9506, 202, 430, 261, 1717, 4599, 22, 18, 588, 30687, 1435, 480, 374, 13, 206, 203, 6862, 202, 5254, 4599, 5190, 18, 1289, 12, 1717, 4599, 22, 1769, 206, 203, 6862, 202, 1717, 4599, 22, 18, 1289, 4599, 2223, 12, 1458, 3371, 18, 12757, 1769, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 206, 203, 206, 203, 202, 202, 430, 261, 852, 3371, 480, 446, 597, 852, 3371, 18, 1937, 480, 446, 262, 288, 206, 203, 1082, 202, 1458, 3371, 18, 1937, 18, 542, 1528, 2932, 29782, 10978, 8863, 206, 203, 202, 202, 97, 206, 203, 202, 202, 2463, 2774, 4599, 5190, 31, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 23665, 16896, 3167, 666, 358, 1262, 21374, 358, 2774, 3824, 4653, 18, 6942, 848, 506, 628, 1438, 206, 203, 202, 380, 1323, 1245, 316, 603, 729, 21304, 578, 4042, 1438, 18, 206, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
c9c81389c068117b7f89426dcce709c033b46bbf
iedadata/geomapapp
org/geomapapp/util/XML_Menu.java
[ "Apache-2.0" ]
Java
createMenuItem
JMenuItem
public static JMenuItem createMenuItem(XML_Menu menuItemLayer) { JMenuItem mi; if ( menuItemLayer.checkbox != null && menuItemLayer.checkbox.equals("true")) { mi = new JCheckBoxMenuItem(menuItemLayer.name, false); } else if( menuItemLayer.color != null && (menuItemLayer.name.contentEquals("") || menuItemLayer.name.contentEquals("Zoom To Saved Session"))) { String itemColor = menuItemLayer.color.toString(); //System.out.println("Item Hex Color" + itemColor); Color c = Color.decode(itemColor); //Color textColor = Color.decode("#333333"); mi = new JMenuItem(menuItemLayer.name ); mi.setBackground(c); //mi.setEnabled(false); } else if(menuItemLayer.name != null && menuItemLayer.name.contains("Click For Searchable Tear-Off Menus")) { mi = new JMenuItem(menuItemLayer.name); // Color the background of certain items Color colorBackground1 = new Color(255,192,139); // light orange if(menuItemLayer.command.contains("open_search_tree")) { mi.setBackground(colorBackground1); } } else { mi = new JMenuItem(menuItemLayer.name); } if ( menuItemLayer.layer_url != null ) { mi.setName(menuItemLayer.layer_url); } mi.setActionCommand(menuItemLayer.command); mi.addActionListener(mapApp); if ( menuItemLayer.command != null ) { commandToMenuItemHash.put(menuItemLayer.command, mi); if (!MapApp.supported_commands.contains(menuItemLayer.command) && !MapApp.portal_commands.contains(menuItemLayer.command)) mi.setEnabled(false); } if ( menuItemLayer.shortcut != null ) { String keystroke; if (System.getProperty("os.name").toLowerCase().contains("mac")) keystroke = "meta "; else keystroke = "control released "; keystroke += menuItemLayer.shortcut.toUpperCase(); mi.setAccelerator(KeyStroke.getKeyStroke( keystroke )); } if ("true".equalsIgnoreCase(menuItemLayer.isRemote) && MapApp.AT_SEA) mi.setEnabled(false); menuItemToMenu.put(mi, menuItemLayer); menuToMenuItem.put(menuItemLayer, mi); return mi; }
// Creates the Menu Items belonging in each Menu from xml
Creates the Menu Items belonging in each Menu from xml
[ "Creates", "the", "Menu", "Items", "belonging", "in", "each", "Menu", "from", "xml" ]
public static JMenuItem createMenuItem(XML_Menu menuItemLayer) { JMenuItem mi; if ( menuItemLayer.checkbox != null && menuItemLayer.checkbox.equals("true")) { mi = new JCheckBoxMenuItem(menuItemLayer.name, false); } else if( menuItemLayer.color != null && (menuItemLayer.name.contentEquals("") || menuItemLayer.name.contentEquals("Zoom To Saved Session"))) { String itemColor = menuItemLayer.color.toString(); Color c = Color.decode(itemColor); mi = new JMenuItem(menuItemLayer.name ); mi.setBackground(c); } else if(menuItemLayer.name != null && menuItemLayer.name.contains("Click For Searchable Tear-Off Menus")) { mi = new JMenuItem(menuItemLayer.name); Color colorBackground1 = new Color(255,192,139); if(menuItemLayer.command.contains("open_search_tree")) { mi.setBackground(colorBackground1); } } else { mi = new JMenuItem(menuItemLayer.name); } if ( menuItemLayer.layer_url != null ) { mi.setName(menuItemLayer.layer_url); } mi.setActionCommand(menuItemLayer.command); mi.addActionListener(mapApp); if ( menuItemLayer.command != null ) { commandToMenuItemHash.put(menuItemLayer.command, mi); if (!MapApp.supported_commands.contains(menuItemLayer.command) && !MapApp.portal_commands.contains(menuItemLayer.command)) mi.setEnabled(false); } if ( menuItemLayer.shortcut != null ) { String keystroke; if (System.getProperty("os.name").toLowerCase().contains("mac")) keystroke = "meta "; else keystroke = "control released "; keystroke += menuItemLayer.shortcut.toUpperCase(); mi.setAccelerator(KeyStroke.getKeyStroke( keystroke )); } if ("true".equalsIgnoreCase(menuItemLayer.isRemote) && MapApp.AT_SEA) mi.setEnabled(false); menuItemToMenu.put(mi, menuItemLayer); menuToMenuItem.put(menuItemLayer, mi); return mi; }
[ "public", "static", "JMenuItem", "createMenuItem", "(", "XML_Menu", "menuItemLayer", ")", "{", "JMenuItem", "mi", ";", "if", "(", "menuItemLayer", ".", "checkbox", "!=", "null", "&&", "menuItemLayer", ".", "checkbox", ".", "equals", "(", "\"true\"", ")", ")", "{", "mi", "=", "new", "JCheckBoxMenuItem", "(", "menuItemLayer", ".", "name", ",", "false", ")", ";", "}", "else", "if", "(", "menuItemLayer", ".", "color", "!=", "null", "&&", "(", "menuItemLayer", ".", "name", ".", "contentEquals", "(", "\"\"", ")", "||", "menuItemLayer", ".", "name", ".", "contentEquals", "(", "\"Zoom To Saved Session\"", ")", ")", ")", "{", "String", "itemColor", "=", "menuItemLayer", ".", "color", ".", "toString", "(", ")", ";", "Color", "c", "=", "Color", ".", "decode", "(", "itemColor", ")", ";", "mi", "=", "new", "JMenuItem", "(", "menuItemLayer", ".", "name", ")", ";", "mi", ".", "setBackground", "(", "c", ")", ";", "}", "else", "if", "(", "menuItemLayer", ".", "name", "!=", "null", "&&", "menuItemLayer", ".", "name", ".", "contains", "(", "\"Click For Searchable Tear-Off Menus\"", ")", ")", "{", "mi", "=", "new", "JMenuItem", "(", "menuItemLayer", ".", "name", ")", ";", "Color", "colorBackground1", "=", "new", "Color", "(", "255", ",", "192", ",", "139", ")", ";", "if", "(", "menuItemLayer", ".", "command", ".", "contains", "(", "\"open_search_tree\"", ")", ")", "{", "mi", ".", "setBackground", "(", "colorBackground1", ")", ";", "}", "}", "else", "{", "mi", "=", "new", "JMenuItem", "(", "menuItemLayer", ".", "name", ")", ";", "}", "if", "(", "menuItemLayer", ".", "layer_url", "!=", "null", ")", "{", "mi", ".", "setName", "(", "menuItemLayer", ".", "layer_url", ")", ";", "}", "mi", ".", "setActionCommand", "(", "menuItemLayer", ".", "command", ")", ";", "mi", ".", "addActionListener", "(", "mapApp", ")", ";", "if", "(", "menuItemLayer", ".", "command", "!=", "null", ")", "{", "commandToMenuItemHash", ".", "put", "(", "menuItemLayer", ".", "command", ",", "mi", ")", ";", "if", "(", "!", "MapApp", ".", "supported_commands", ".", "contains", "(", "menuItemLayer", ".", "command", ")", "&&", "!", "MapApp", ".", "portal_commands", ".", "contains", "(", "menuItemLayer", ".", "command", ")", ")", "mi", ".", "setEnabled", "(", "false", ")", ";", "}", "if", "(", "menuItemLayer", ".", "shortcut", "!=", "null", ")", "{", "String", "keystroke", ";", "if", "(", "System", ".", "getProperty", "(", "\"os.name\"", ")", ".", "toLowerCase", "(", ")", ".", "contains", "(", "\"mac\"", ")", ")", "keystroke", "=", "\"meta \"", ";", "else", "keystroke", "=", "\"control released \"", ";", "keystroke", "+=", "menuItemLayer", ".", "shortcut", ".", "toUpperCase", "(", ")", ";", "mi", ".", "setAccelerator", "(", "KeyStroke", ".", "getKeyStroke", "(", "keystroke", ")", ")", ";", "}", "if", "(", "\"true\"", ".", "equalsIgnoreCase", "(", "menuItemLayer", ".", "isRemote", ")", "&&", "MapApp", ".", "AT_SEA", ")", "mi", ".", "setEnabled", "(", "false", ")", ";", "menuItemToMenu", ".", "put", "(", "mi", ",", "menuItemLayer", ")", ";", "menuToMenuItem", ".", "put", "(", "menuItemLayer", ",", "mi", ")", ";", "return", "mi", ";", "}" ]
Creates the Menu Items belonging in each Menu from xml
[ "Creates", "the", "Menu", "Items", "belonging", "in", "each", "Menu", "from", "xml" ]
[ "//System.out.println(\"Item Hex Color\" + itemColor);\r", "//Color textColor = Color.decode(\"#333333\");\r", "//mi.setEnabled(false);\r", "// Color the background of certain items\r", "// light orange\r" ]
[ { "param": "menuItemLayer", "type": "XML_Menu" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "menuItemLayer", "type": "XML_Menu", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 804, 12958, 752, 12958, 12, 4201, 67, 4599, 19711, 4576, 13, 288, 206, 203, 202, 202, 46, 12958, 12837, 31, 206, 203, 202, 202, 430, 261, 19711, 4576, 18, 12017, 480, 446, 597, 19711, 4576, 18, 12017, 18, 14963, 2932, 3767, 6, 3719, 288, 206, 203, 1082, 202, 9197, 273, 394, 804, 19174, 12958, 12, 5414, 1180, 4576, 18, 529, 16, 629, 1769, 206, 203, 202, 202, 97, 469, 309, 12, 19711, 4576, 18, 3266, 480, 446, 597, 261, 5414, 1180, 4576, 18, 529, 18, 1745, 8867, 2932, 7923, 747, 19711, 4576, 18, 529, 18, 1745, 8867, 2932, 11497, 2974, 348, 8158, 3877, 6, 20349, 288, 206, 203, 206, 203, 1082, 202, 780, 761, 2957, 273, 19711, 4576, 18, 3266, 18, 10492, 5621, 206, 203, 1082, 202, 759, 3163, 18, 659, 18, 8222, 2932, 1180, 15734, 5563, 6, 397, 761, 2957, 1769, 206, 203, 1082, 202, 2957, 276, 273, 5563, 18, 3922, 12, 1726, 2957, 1769, 206, 203, 9506, 206, 203, 1082, 202, 759, 2957, 977, 2957, 273, 5563, 18, 3922, 2932, 7, 18094, 3707, 8863, 206, 203, 1082, 202, 9197, 273, 394, 804, 12958, 12, 5414, 1180, 4576, 18, 529, 11272, 206, 203, 1082, 202, 9197, 18, 542, 8199, 12, 71, 1769, 206, 203, 9506, 206, 203, 1082, 202, 759, 9197, 18, 542, 1526, 12, 5743, 1769, 206, 203, 206, 203, 202, 202, 97, 469, 309, 12, 5414, 1180, 4576, 18, 529, 480, 446, 597, 19711, 4576, 18, 529, 18, 12298, 2932, 6563, 2457, 5167, 429, 399, 2091, 17, 7210, 490, 11797, 6, 3719, 288, 206, 203, 1082, 202, 9197, 273, 394, 804, 12958, 12, 5414, 1180, 4576, 18, 529, 1769, 206, 203, 9506, 206, 203, 1082, 202, 759, 5563, 326, 5412, 434, 8626, 1516, 206, 203, 1082, 202, 2957, 2036, 8199, 21, 273, 394, 5563, 12, 10395, 16, 15561, 16, 24347, 1769, 202, 202, 759, 9052, 578, 726, 206, 203, 1082, 202, 430, 12, 5414, 1180, 4576, 18, 3076, 18, 12298, 2932, 3190, 67, 3072, 67, 3413, 6, 3719, 288, 206, 203, 9506, 202, 9197, 18, 542, 8199, 12, 3266, 8199, 21, 1769, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 469, 288, 9506, 206, 203, 1082, 202, 9197, 273, 394, 804, 12958, 12, 5414, 1180, 4576, 18, 529, 1769, 206, 203, 202, 202, 97, 206, 203, 206, 203, 202, 202, 430, 261, 19711, 4576, 18, 6363, 67, 718, 480, 446, 262, 288, 206, 203, 1082, 202, 9197, 18, 542, 461, 12, 5414, 1180, 4576, 18, 6363, 67, 718, 1769, 206, 203, 202, 202, 97, 206, 203, 206, 203, 202, 202, 9197, 18, 542, 1803, 2189, 12, 5414, 1180, 4576, 18, 3076, 1769, 206, 203, 202, 202, 9197, 18, 1289, 1803, 2223, 12, 1458, 3371, 1769, 206, 203, 206, 203, 202, 202, 430, 261, 19711, 4576, 18, 3076, 480, 446, 262, 288, 206, 203, 1082, 202, 3076, 774, 12958, 2310, 18, 458, 12, 5414, 1180, 4576, 18, 3076, 16, 12837, 1769, 206, 203, 206, 203, 1082, 202, 430, 16051, 863, 3371, 18, 4127, 67, 7847, 18, 12298, 12, 5414, 1180, 2 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 759, 10210, 326, 9809, 10240, 17622, 316, 1517, 9809, 628, 2025, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
07299f13d88a7a9dd136bd473152c07764c73107
iedadata/geomapapp
haxby/db/scs/SCS.java
[ "Apache-2.0" ]
Java
valueChanged
null
public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting() == false) { if (cruiseList.getSelectedIndex() == -1) { //No selection, disable fire button. return; } else { //Selection, enable the fire button. //if (cruiseList.getSelectedIndex() - 1 != -1) { //System.out.println("Item selected: " + cruiseListModel.get(cruiseList.getSelectedIndex() - 1)); //} //System.out.println(cruiseList.getSelectedIndex()); if (cruiseListPopulated) { int c = selCruise; double zoom = map.getZoom(); Nearest nearest = new Nearest(null, 0, 0, Math.pow(2./zoom, 2) ); int ip = 0; int ic = cruiseList.getSelectedIndex(); String text = cruises[ic].name +" "+ SCSCruise.dateString(cruises[ic].getTime(nearest)); selPanel = cruises[ic].getPanel( cruises[ic].getTime(nearest) ); selPath = cruises[ic].getPanelPath( selPanel ); label.setText( text ); synchronized (map.getTreeLock()) { Graphics2D g = map.getGraphics2D(); g.setStroke( new BasicStroke( 1f/(float)zoom )); if( c>=0 ) { g.setColor( Color.darkGray ); cruises[c].draw(g); } selCruise = ic; g.setColor( Color.white ); cruises[ic].draw(g); if( selPath!=null ) { g.setColor( Color.white ); g.draw( selPath ); } return; } } } } }
// Highlight selected track on map when selected in cruiseList
Highlight selected track on map when selected in cruiseList
[ "Highlight", "selected", "track", "on", "map", "when", "selected", "in", "cruiseList" ]
public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting() == false) { if (cruiseList.getSelectedIndex() == -1) { return; } else { if (cruiseListPopulated) { int c = selCruise; double zoom = map.getZoom(); Nearest nearest = new Nearest(null, 0, 0, Math.pow(2./zoom, 2) ); int ip = 0; int ic = cruiseList.getSelectedIndex(); String text = cruises[ic].name +" "+ SCSCruise.dateString(cruises[ic].getTime(nearest)); selPanel = cruises[ic].getPanel( cruises[ic].getTime(nearest) ); selPath = cruises[ic].getPanelPath( selPanel ); label.setText( text ); synchronized (map.getTreeLock()) { Graphics2D g = map.getGraphics2D(); g.setStroke( new BasicStroke( 1f/(float)zoom )); if( c>=0 ) { g.setColor( Color.darkGray ); cruises[c].draw(g); } selCruise = ic; g.setColor( Color.white ); cruises[ic].draw(g); if( selPath!=null ) { g.setColor( Color.white ); g.draw( selPath ); } return; } } } } }
[ "public", "void", "valueChanged", "(", "ListSelectionEvent", "e", ")", "{", "if", "(", "e", ".", "getValueIsAdjusting", "(", ")", "==", "false", ")", "{", "if", "(", "cruiseList", ".", "getSelectedIndex", "(", ")", "==", "-", "1", ")", "{", "return", ";", "}", "else", "{", "if", "(", "cruiseListPopulated", ")", "{", "int", "c", "=", "selCruise", ";", "double", "zoom", "=", "map", ".", "getZoom", "(", ")", ";", "Nearest", "nearest", "=", "new", "Nearest", "(", "null", ",", "0", ",", "0", ",", "Math", ".", "pow", "(", "2.", "/", "zoom", ",", "2", ")", ")", ";", "int", "ip", "=", "0", ";", "int", "ic", "=", "cruiseList", ".", "getSelectedIndex", "(", ")", ";", "String", "text", "=", "cruises", "[", "ic", "]", ".", "name", "+", "\" \"", "+", "SCSCruise", ".", "dateString", "(", "cruises", "[", "ic", "]", ".", "getTime", "(", "nearest", ")", ")", ";", "selPanel", "=", "cruises", "[", "ic", "]", ".", "getPanel", "(", "cruises", "[", "ic", "]", ".", "getTime", "(", "nearest", ")", ")", ";", "selPath", "=", "cruises", "[", "ic", "]", ".", "getPanelPath", "(", "selPanel", ")", ";", "label", ".", "setText", "(", "text", ")", ";", "synchronized", "(", "map", ".", "getTreeLock", "(", ")", ")", "{", "Graphics2D", "g", "=", "map", ".", "getGraphics2D", "(", ")", ";", "g", ".", "setStroke", "(", "new", "BasicStroke", "(", "1f", "/", "(", "float", ")", "zoom", ")", ")", ";", "if", "(", "c", ">=", "0", ")", "{", "g", ".", "setColor", "(", "Color", ".", "darkGray", ")", ";", "cruises", "[", "c", "]", ".", "draw", "(", "g", ")", ";", "}", "selCruise", "=", "ic", ";", "g", ".", "setColor", "(", "Color", ".", "white", ")", ";", "cruises", "[", "ic", "]", ".", "draw", "(", "g", ")", ";", "if", "(", "selPath", "!=", "null", ")", "{", "g", ".", "setColor", "(", "Color", ".", "white", ")", ";", "g", ".", "draw", "(", "selPath", ")", ";", "}", "return", ";", "}", "}", "}", "}", "}" ]
Highlight selected track on map when selected in cruiseList
[ "Highlight", "selected", "track", "on", "map", "when", "selected", "in", "cruiseList" ]
[ "//No selection, disable fire button.", "//Selection, enable the fire button.", "//if (cruiseList.getSelectedIndex() - 1 != -1) {", "//System.out.println(\"Item selected: \" + cruiseListModel.get(cruiseList.getSelectedIndex() - 1));", "//}", "//System.out.println(cruiseList.getSelectedIndex());" ]
[ { "param": "e", "type": "ListSelectionEvent" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "e", "type": "ListSelectionEvent", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 460, 5033, 12, 682, 6233, 1133, 425, 13, 288, 203, 202, 202, 430, 261, 73, 18, 24805, 2520, 10952, 310, 1435, 422, 629, 13, 288, 203, 203, 1082, 202, 430, 261, 3353, 89, 784, 682, 18, 588, 7416, 1016, 1435, 422, 300, 21, 13, 288, 203, 1082, 202, 759, 2279, 4421, 16, 4056, 4452, 3568, 18, 203, 9506, 202, 2463, 31, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 759, 6233, 16, 4237, 326, 4452, 3568, 18, 203, 9506, 202, 759, 430, 261, 3353, 89, 784, 682, 18, 588, 7416, 1016, 1435, 300, 404, 480, 300, 21, 13, 288, 203, 9506, 202, 759, 3163, 18, 659, 18, 8222, 2932, 1180, 3170, 30, 315, 397, 4422, 89, 784, 682, 1488, 18, 588, 12, 3353, 89, 784, 682, 18, 588, 7416, 1016, 1435, 300, 404, 10019, 203, 9506, 202, 759, 97, 203, 9506, 202, 759, 3163, 18, 659, 18, 8222, 12, 3353, 89, 784, 682, 18, 588, 7416, 1016, 10663, 203, 9506, 202, 430, 261, 3353, 89, 784, 682, 7049, 11799, 13, 288, 203, 6862, 202, 474, 276, 273, 357, 39, 8653, 784, 31, 203, 6862, 202, 9056, 7182, 273, 852, 18, 588, 11497, 5621, 203, 6862, 202, 28031, 11431, 273, 394, 7455, 8945, 12, 2011, 16, 374, 16, 374, 16, 2361, 18, 23509, 12, 22, 18, 19, 14932, 16, 576, 13, 11272, 203, 6862, 202, 474, 2359, 273, 374, 31, 203, 6862, 202, 474, 13579, 273, 4422, 89, 784, 682, 18, 588, 7416, 1016, 5621, 203, 6862, 202, 780, 977, 273, 4422, 89, 6141, 63, 335, 8009, 529, 397, 6, 13773, 7010, 6862, 202, 2312, 2312, 8653, 784, 18, 712, 780, 12, 3353, 89, 6141, 63, 335, 8009, 588, 950, 12, 25785, 10019, 203, 6862, 202, 1786, 5537, 273, 4422, 89, 6141, 63, 335, 8009, 588, 5537, 12, 4422, 89, 6141, 63, 335, 8009, 588, 950, 12, 25785, 13, 11272, 203, 6862, 202, 1786, 743, 273, 4422, 89, 6141, 63, 335, 8009, 588, 5537, 743, 12, 357, 5537, 11272, 203, 6862, 202, 1925, 18, 542, 1528, 12, 977, 11272, 203, 203, 6862, 202, 22043, 261, 1458, 18, 588, 2471, 2531, 10756, 288, 203, 25083, 202, 17558, 22, 40, 314, 273, 852, 18, 588, 17558, 22, 40, 5621, 203, 25083, 202, 75, 18, 542, 14602, 12, 394, 7651, 14602, 12, 404, 74, 19, 12, 5659, 13, 14932, 262, 1769, 203, 25083, 202, 430, 12, 276, 34, 33, 20, 262, 288, 203, 6862, 1082, 202, 75, 18, 542, 2957, 12, 5563, 18, 25045, 23521, 11272, 203, 6862, 1082, 202, 3353, 89, 6141, 63, 71, 8009, 9446, 12, 75, 1769, 203, 25083, 202, 97, 203, 25083, 202, 1786, 39, 8653, 784, 273, 13579, 31, 203, 25083, 202, 75, 18, 542, 2957, 12, 5563, 18, 14739, 11272, 203, 25083, 202, 3353, 89, 6141, 63, 335, 8009, 9446, 12, 75, 1769, 203, 25083, 202, 430, 12, 357, 743, 5, 33, 2011, 262, 288, 203, 6862, 1082, 202, 75, 18, 542, 2957, 12, 5563, 18, 14739, 11272, 203, 6862, 1082, 202, 75, 18, 9446, 12, 357, 743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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 759, 202, 16205, 3170, 3298, 603, 852, 1347, 3170, 316, 4422, 89, 784, 682, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
fd2e59a719f3e76323b1a8627ef7fc73f4af1306
iedadata/geomapapp
haxby/db/scs/SCSImage2.java
[ "Apache-2.0" ]
Java
tryPopUp
null
public void tryPopUp(MouseEvent evt){ String osName = System.getProperty("os.name"); if ( !evt.isControlDown() && !zoomInTB.isSelected() && !zoomOutTB.isSelected() ) { if ( osName.startsWith("Mac OS") && evt.isShiftDown() ) { pm.show(evt.getComponent(), evt.getX(), evt.getY() ); } else if ( evt.isPopupTrigger() ) { pm.show(evt.getComponent(), evt.getX(), evt.getY()); } } }
// the current point to the clipboard.
the current point to the clipboard.
[ "the", "current", "point", "to", "the", "clipboard", "." ]
public void tryPopUp(MouseEvent evt){ String osName = System.getProperty("os.name"); if ( !evt.isControlDown() && !zoomInTB.isSelected() && !zoomOutTB.isSelected() ) { if ( osName.startsWith("Mac OS") && evt.isShiftDown() ) { pm.show(evt.getComponent(), evt.getX(), evt.getY() ); } else if ( evt.isPopupTrigger() ) { pm.show(evt.getComponent(), evt.getX(), evt.getY()); } } }
[ "public", "void", "tryPopUp", "(", "MouseEvent", "evt", ")", "{", "String", "osName", "=", "System", ".", "getProperty", "(", "\"os.name\"", ")", ";", "if", "(", "!", "evt", ".", "isControlDown", "(", ")", "&&", "!", "zoomInTB", ".", "isSelected", "(", ")", "&&", "!", "zoomOutTB", ".", "isSelected", "(", ")", ")", "{", "if", "(", "osName", ".", "startsWith", "(", "\"Mac OS\"", ")", "&&", "evt", ".", "isShiftDown", "(", ")", ")", "{", "pm", ".", "show", "(", "evt", ".", "getComponent", "(", ")", ",", "evt", ".", "getX", "(", ")", ",", "evt", ".", "getY", "(", ")", ")", ";", "}", "else", "if", "(", "evt", ".", "isPopupTrigger", "(", ")", ")", "{", "pm", ".", "show", "(", "evt", ".", "getComponent", "(", ")", ",", "evt", ".", "getX", "(", ")", ",", "evt", ".", "getY", "(", ")", ")", ";", "}", "}", "}" ]
the current point to the clipboard.
[ "the", "current", "point", "to", "the", "clipboard", "." ]
[]
[ { "param": "evt", "type": "MouseEvent" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "evt", "type": "MouseEvent", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 775, 7049, 1211, 12, 9186, 1133, 6324, 15329, 203, 202, 202, 780, 1140, 461, 273, 2332, 18, 588, 1396, 2932, 538, 18, 529, 8863, 203, 202, 202, 430, 261, 401, 73, 11734, 18, 291, 3367, 4164, 1435, 225, 597, 401, 14932, 382, 25730, 18, 291, 7416, 1435, 597, 401, 14932, 1182, 25730, 18, 291, 7416, 1435, 262, 288, 203, 1082, 202, 430, 261, 1140, 461, 18, 17514, 1190, 2932, 9990, 5932, 7923, 597, 6324, 18, 291, 10544, 4164, 1435, 262, 288, 203, 9506, 202, 7755, 18, 4500, 12, 73, 11734, 18, 588, 1841, 9334, 6324, 18, 588, 60, 9334, 6324, 18, 588, 61, 1435, 11272, 203, 1082, 202, 97, 203, 1082, 202, 12107, 309, 261, 6324, 18, 291, 13770, 6518, 1435, 262, 288, 203, 9506, 202, 7755, 18, 4500, 12, 73, 11734, 18, 588, 1841, 9334, 6324, 18, 588, 60, 9334, 6324, 18, 588, 61, 10663, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 202, 5787, 783, 1634, 358, 326, 20304, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
25afc2d939d73f7bf3901a6a1c5b6f6b8eb9cd7f
iedadata/geomapapp
haxby/db/mgg/MGG.java
[ "Apache-2.0" ]
Java
valueChanged
null
public void valueChanged(ListSelectionEvent e) { int i = list.getSelectedIndex(); if(i!=-1) { i = model.indexOf( i ); } drawSelectedTrack(Color.black); selectedIndex = i; drawSelectedTrack(Color.white); return; }
// If line on list is selected changes track to white.
If line on list is selected changes track to white.
[ "If", "line", "on", "list", "is", "selected", "changes", "track", "to", "white", "." ]
public void valueChanged(ListSelectionEvent e) { int i = list.getSelectedIndex(); if(i!=-1) { i = model.indexOf( i ); } drawSelectedTrack(Color.black); selectedIndex = i; drawSelectedTrack(Color.white); return; }
[ "public", "void", "valueChanged", "(", "ListSelectionEvent", "e", ")", "{", "int", "i", "=", "list", ".", "getSelectedIndex", "(", ")", ";", "if", "(", "i", "!=", "-", "1", ")", "{", "i", "=", "model", ".", "indexOf", "(", "i", ")", ";", "}", "drawSelectedTrack", "(", "Color", ".", "black", ")", ";", "selectedIndex", "=", "i", ";", "drawSelectedTrack", "(", "Color", ".", "white", ")", ";", "return", ";", "}" ]
If line on list is selected changes track to white.
[ "If", "line", "on", "list", "is", "selected", "changes", "track", "to", "white", "." ]
[]
[ { "param": "e", "type": "ListSelectionEvent" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "e", "type": "ListSelectionEvent", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 460, 5033, 12, 682, 6233, 1133, 425, 13, 288, 203, 202, 202, 474, 277, 273, 666, 18, 588, 7416, 1016, 5621, 203, 202, 202, 430, 12, 77, 5, 29711, 21, 13, 288, 203, 1082, 202, 77, 273, 938, 18, 31806, 12, 277, 11272, 203, 202, 202, 97, 203, 202, 202, 9446, 7416, 4402, 12, 2957, 18, 11223, 1769, 203, 202, 202, 8109, 1016, 273, 277, 31, 203, 202, 202, 9446, 7416, 4402, 12, 2957, 18, 14739, 1769, 203, 202, 202, 2463, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 971, 980, 603, 666, 353, 3170, 3478, 3298, 358, 9578, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
25afc2d939d73f7bf3901a6a1c5b6f6b8eb9cd7f
iedadata/geomapapp
haxby/db/mgg/MGG.java
[ "Apache-2.0" ]
Java
removeImported
null
public void removeImported(String name) { model.clearTracks(); ArrayList<MGGTrack> tracksList = new ArrayList<MGGTrack>(); boolean imported = false; for (MGGTrack t : tracks) { if (t == null) continue; if ( t.getName().equals(IMPORT_TRACK_LINE.getName()) ) imported = true; if ( imported && t.getName().equals(name) ) continue; tracksList.add(t); } tracks = new MGGTrack[tracksList.size()]; tracks = tracksList.toArray(tracks); for (int i = 0; i < tracks.length; i++) { model.addTrack(tracks[i], i); } size = tracksList.size(); }
/* * remove any imported tracks that match the input name */
remove any imported tracks that match the input name
[ "remove", "any", "imported", "tracks", "that", "match", "the", "input", "name" ]
public void removeImported(String name) { model.clearTracks(); ArrayList<MGGTrack> tracksList = new ArrayList<MGGTrack>(); boolean imported = false; for (MGGTrack t : tracks) { if (t == null) continue; if ( t.getName().equals(IMPORT_TRACK_LINE.getName()) ) imported = true; if ( imported && t.getName().equals(name) ) continue; tracksList.add(t); } tracks = new MGGTrack[tracksList.size()]; tracks = tracksList.toArray(tracks); for (int i = 0; i < tracks.length; i++) { model.addTrack(tracks[i], i); } size = tracksList.size(); }
[ "public", "void", "removeImported", "(", "String", "name", ")", "{", "model", ".", "clearTracks", "(", ")", ";", "ArrayList", "<", "MGGTrack", ">", "tracksList", "=", "new", "ArrayList", "<", "MGGTrack", ">", "(", ")", ";", "boolean", "imported", "=", "false", ";", "for", "(", "MGGTrack", "t", ":", "tracks", ")", "{", "if", "(", "t", "==", "null", ")", "continue", ";", "if", "(", "t", ".", "getName", "(", ")", ".", "equals", "(", "IMPORT_TRACK_LINE", ".", "getName", "(", ")", ")", ")", "imported", "=", "true", ";", "if", "(", "imported", "&&", "t", ".", "getName", "(", ")", ".", "equals", "(", "name", ")", ")", "continue", ";", "tracksList", ".", "add", "(", "t", ")", ";", "}", "tracks", "=", "new", "MGGTrack", "[", "tracksList", ".", "size", "(", ")", "]", ";", "tracks", "=", "tracksList", ".", "toArray", "(", "tracks", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tracks", ".", "length", ";", "i", "++", ")", "{", "model", ".", "addTrack", "(", "tracks", "[", "i", "]", ",", "i", ")", ";", "}", "size", "=", "tracksList", ".", "size", "(", ")", ";", "}" ]
remove any imported tracks that match the input name
[ "remove", "any", "imported", "tracks", "that", "match", "the", "input", "name" ]
[]
[ { "param": "name", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "name", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1206, 24934, 12, 780, 508, 13, 288, 203, 202, 202, 2284, 18, 8507, 22138, 5621, 203, 1082, 203, 202, 202, 19558, 32, 49, 19491, 4402, 34, 13933, 682, 273, 394, 2407, 32, 49, 19491, 4402, 34, 5621, 203, 202, 202, 6494, 9101, 273, 629, 31, 203, 202, 202, 1884, 261, 49, 19491, 4402, 268, 294, 225, 13933, 13, 288, 203, 1082, 202, 430, 261, 88, 422, 446, 13, 1324, 31, 203, 1082, 202, 430, 261, 268, 18, 17994, 7675, 14963, 12, 20445, 67, 28720, 67, 5997, 18, 17994, 10756, 262, 9101, 273, 638, 31, 203, 1082, 202, 430, 261, 9101, 597, 268, 18, 17994, 7675, 14963, 12, 529, 13, 262, 1324, 31, 203, 1082, 202, 21499, 682, 18, 1289, 12, 88, 1769, 203, 202, 202, 97, 203, 202, 202, 21499, 273, 394, 490, 19491, 4402, 63, 21499, 682, 18, 1467, 1435, 15533, 203, 202, 202, 21499, 273, 13933, 682, 18, 31447, 12, 21499, 1769, 203, 202, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 13933, 18, 2469, 31, 277, 27245, 288, 203, 1082, 202, 2284, 18, 1289, 4402, 12, 21499, 63, 77, 6487, 277, 1769, 203, 202, 202, 97, 203, 202, 202, 1467, 273, 13933, 682, 18, 1467, 5621, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 1206, 1281, 9101, 13933, 716, 845, 326, 810, 508, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
25afc2d939d73f7bf3901a6a1c5b6f6b8eb9cd7f
iedadata/geomapapp
haxby/db/mgg/MGG.java
[ "Apache-2.0" ]
Java
rebuildModel
null
public void rebuildModel() { trim(); model.clearTracks(); for (int i = 0; i < tracks.length; i++) { model.addTrack(tracks[i], i); } }
/* * rebuild the model after adding a track */
rebuild the model after adding a track
[ "rebuild", "the", "model", "after", "adding", "a", "track" ]
public void rebuildModel() { trim(); model.clearTracks(); for (int i = 0; i < tracks.length; i++) { model.addTrack(tracks[i], i); } }
[ "public", "void", "rebuildModel", "(", ")", "{", "trim", "(", ")", ";", "model", ".", "clearTracks", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tracks", ".", "length", ";", "i", "++", ")", "{", "model", ".", "addTrack", "(", "tracks", "[", "i", "]", ",", "i", ")", ";", "}", "}" ]
rebuild the model after adding a track
[ "rebuild", "the", "model", "after", "adding", "a", "track" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 13419, 1488, 1435, 288, 203, 202, 202, 5290, 5621, 203, 202, 202, 2284, 18, 8507, 22138, 5621, 203, 202, 202, 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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
4f40bdd91abd47b7b3e4599974d621347e453b30
iedadata/geomapapp
org/geomapapp/image/Palette.java
[ "Apache-2.0" ]
Java
readCPT
null
void readCPT( InputStream input ) throws IOException { BufferedReader in = new BufferedReader( new InputStreamReader(input)); ve = 2; String s; String[] elements; ArrayList<ArrayList<Float>> lut = new ArrayList<ArrayList<Float>>(); ArrayList<Float> startPoint; ArrayList<Float> endPoint; while( (s=in.readLine())!=null ) { //if color_model = hsv, read in LUT using readHSV method if (s.toLowerCase().contains("hsv")) { lut = readHSV(in); break; } //ignore comment lines if (s.startsWith("#") || s.startsWith("B") || s.startsWith("F") || s.startsWith("N")) continue; //split line based on white space (incl tabs) or / elements = s.split("\\s+|\\/"); //only read lines with at least 2 columns if( elements.length < 2 ) continue; int k = 0; //ignore any empty elements while (elements[k].equals("")) k++; //read in start point startPoint = new ArrayList<Float>(); //check if color is given as a word, rather than RGB startPoint.add(Float.parseFloat(elements[k++])); try { startPoint.add(Float.parseFloat(elements[k++])); startPoint.add(Float.parseFloat(elements[k++])); startPoint.add(Float.parseFloat(elements[k++])); } catch(Exception e) { k--; String textColor = elements[k++]; List<Float> RGB = color2RGB.get(textColor); startPoint.addAll(RGB); } //only add start point if not already in table if (!lut.contains(startPoint)) lut.add(startPoint); //if there is just one color value per line, then continue to the next line if (k >= elements.length) continue; //read in end point endPoint = new ArrayList<Float>(); //check if color is given as a word, rather than RGB endPoint.add(Float.parseFloat(elements[k++])); try { endPoint.add(Float.parseFloat(elements[k++])); endPoint.add(Float.parseFloat(elements[k++])); endPoint.add(Float.parseFloat(elements[k++])); } catch(Exception e) { k--; String textColor = elements[k++]; List<Float> RGB = color2RGB.get(textColor); endPoint.addAll(RGB); } //only add end point if not already in table if (!lut.contains(endPoint)) lut.add(endPoint); } in.close(); int size = lut.size(); red = new float[size]; green = new float[size]; blue = new float[size]; ht = new float[size]; for (int i=0; i<size; i++) { ArrayList<Float> tab = lut.get(i); ht[i] = tab.get(0); red[i] = tab.get(1)/255f; green[i] = tab.get(2)/255f; blue[i] = tab.get(3)/255f; } range = new float[] {ht[0], ht[ht.length-1]}; hScale = 1f; }
/* * read in CPT formatted color palettes */
read in CPT formatted color palettes
[ "read", "in", "CPT", "formatted", "color", "palettes" ]
void readCPT( InputStream input ) throws IOException { BufferedReader in = new BufferedReader( new InputStreamReader(input)); ve = 2; String s; String[] elements; ArrayList<ArrayList<Float>> lut = new ArrayList<ArrayList<Float>>(); ArrayList<Float> startPoint; ArrayList<Float> endPoint; while( (s=in.readLine())!=null ) { if (s.toLowerCase().contains("hsv")) { lut = readHSV(in); break; } if (s.startsWith("#") || s.startsWith("B") || s.startsWith("F") || s.startsWith("N")) continue; elements = s.split("\\s+|\\/"); if( elements.length < 2 ) continue; int k = 0; while (elements[k].equals("")) k++; startPoint = new ArrayList<Float>(); startPoint.add(Float.parseFloat(elements[k++])); try { startPoint.add(Float.parseFloat(elements[k++])); startPoint.add(Float.parseFloat(elements[k++])); startPoint.add(Float.parseFloat(elements[k++])); } catch(Exception e) { k--; String textColor = elements[k++]; List<Float> RGB = color2RGB.get(textColor); startPoint.addAll(RGB); } if (!lut.contains(startPoint)) lut.add(startPoint); if (k >= elements.length) continue; endPoint = new ArrayList<Float>(); endPoint.add(Float.parseFloat(elements[k++])); try { endPoint.add(Float.parseFloat(elements[k++])); endPoint.add(Float.parseFloat(elements[k++])); endPoint.add(Float.parseFloat(elements[k++])); } catch(Exception e) { k--; String textColor = elements[k++]; List<Float> RGB = color2RGB.get(textColor); endPoint.addAll(RGB); } if (!lut.contains(endPoint)) lut.add(endPoint); } in.close(); int size = lut.size(); red = new float[size]; green = new float[size]; blue = new float[size]; ht = new float[size]; for (int i=0; i<size; i++) { ArrayList<Float> tab = lut.get(i); ht[i] = tab.get(0); red[i] = tab.get(1)/255f; green[i] = tab.get(2)/255f; blue[i] = tab.get(3)/255f; } range = new float[] {ht[0], ht[ht.length-1]}; hScale = 1f; }
[ "void", "readCPT", "(", "InputStream", "input", ")", "throws", "IOException", "{", "BufferedReader", "in", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "input", ")", ")", ";", "ve", "=", "2", ";", "String", "s", ";", "String", "[", "]", "elements", ";", "ArrayList", "<", "ArrayList", "<", "Float", ">", ">", "lut", "=", "new", "ArrayList", "<", "ArrayList", "<", "Float", ">", ">", "(", ")", ";", "ArrayList", "<", "Float", ">", "startPoint", ";", "ArrayList", "<", "Float", ">", "endPoint", ";", "while", "(", "(", "s", "=", "in", ".", "readLine", "(", ")", ")", "!=", "null", ")", "{", "if", "(", "s", ".", "toLowerCase", "(", ")", ".", "contains", "(", "\"hsv\"", ")", ")", "{", "lut", "=", "readHSV", "(", "in", ")", ";", "break", ";", "}", "if", "(", "s", ".", "startsWith", "(", "\"#\"", ")", "||", "s", ".", "startsWith", "(", "\"B\"", ")", "||", "s", ".", "startsWith", "(", "\"F\"", ")", "||", "s", ".", "startsWith", "(", "\"N\"", ")", ")", "continue", ";", "elements", "=", "s", ".", "split", "(", "\"\\\\s+|\\\\/\"", ")", ";", "if", "(", "elements", ".", "length", "<", "2", ")", "continue", ";", "int", "k", "=", "0", ";", "while", "(", "elements", "[", "k", "]", ".", "equals", "(", "\"\"", ")", ")", "k", "++", ";", "startPoint", "=", "new", "ArrayList", "<", "Float", ">", "(", ")", ";", "startPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "try", "{", "startPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "startPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "startPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "k", "--", ";", "String", "textColor", "=", "elements", "[", "k", "++", "]", ";", "List", "<", "Float", ">", "RGB", "=", "color2RGB", ".", "get", "(", "textColor", ")", ";", "startPoint", ".", "addAll", "(", "RGB", ")", ";", "}", "if", "(", "!", "lut", ".", "contains", "(", "startPoint", ")", ")", "lut", ".", "add", "(", "startPoint", ")", ";", "if", "(", "k", ">=", "elements", ".", "length", ")", "continue", ";", "endPoint", "=", "new", "ArrayList", "<", "Float", ">", "(", ")", ";", "endPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "try", "{", "endPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "endPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "endPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "k", "--", ";", "String", "textColor", "=", "elements", "[", "k", "++", "]", ";", "List", "<", "Float", ">", "RGB", "=", "color2RGB", ".", "get", "(", "textColor", ")", ";", "endPoint", ".", "addAll", "(", "RGB", ")", ";", "}", "if", "(", "!", "lut", ".", "contains", "(", "endPoint", ")", ")", "lut", ".", "add", "(", "endPoint", ")", ";", "}", "in", ".", "close", "(", ")", ";", "int", "size", "=", "lut", ".", "size", "(", ")", ";", "red", "=", "new", "float", "[", "size", "]", ";", "green", "=", "new", "float", "[", "size", "]", ";", "blue", "=", "new", "float", "[", "size", "]", ";", "ht", "=", "new", "float", "[", "size", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "ArrayList", "<", "Float", ">", "tab", "=", "lut", ".", "get", "(", "i", ")", ";", "ht", "[", "i", "]", "=", "tab", ".", "get", "(", "0", ")", ";", "red", "[", "i", "]", "=", "tab", ".", "get", "(", "1", ")", "/", "255f", ";", "green", "[", "i", "]", "=", "tab", ".", "get", "(", "2", ")", "/", "255f", ";", "blue", "[", "i", "]", "=", "tab", ".", "get", "(", "3", ")", "/", "255f", ";", "}", "range", "=", "new", "float", "[", "]", "{", "ht", "[", "0", "]", ",", "ht", "[", "ht", ".", "length", "-", "1", "]", "}", ";", "hScale", "=", "1f", ";", "}" ]
read in CPT formatted color palettes
[ "read", "in", "CPT", "formatted", "color", "palettes" ]
[ "//if color_model = hsv, read in LUT using readHSV method", "//ignore comment lines", "//split line based on white space (incl tabs) or /", "//only read lines with at least 2 columns", "//ignore any empty elements", "//read in start point", "//check if color is given as a word, rather than RGB", "//only add start point if not already in table ", "//if there is just one color value per line, then continue to the next line", "//read in end point", "//check if color is given as a word, rather than RGB", "//only add end point if not already in table " ]
[ { "param": "input", "type": "InputStream" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "input", "type": "InputStream", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 918, 855, 39, 1856, 12, 5037, 810, 262, 1216, 1860, 288, 203, 202, 202, 17947, 2514, 316, 273, 394, 10633, 12, 203, 9506, 202, 2704, 15322, 12, 2630, 10019, 203, 202, 202, 537, 273, 576, 31, 203, 202, 202, 780, 272, 31, 203, 202, 202, 780, 8526, 2186, 31, 203, 202, 202, 19558, 32, 19558, 32, 4723, 9778, 27171, 273, 394, 2407, 32, 19558, 32, 4723, 9778, 5621, 203, 202, 202, 19558, 32, 4723, 34, 787, 2148, 31, 203, 202, 202, 19558, 32, 4723, 34, 19849, 31, 203, 1082, 203, 202, 202, 17523, 12, 261, 87, 33, 267, 18, 896, 1670, 10756, 5, 33, 2011, 262, 288, 203, 1082, 202, 759, 430, 2036, 67, 2284, 273, 30785, 16, 855, 316, 511, 1693, 1450, 855, 13173, 58, 707, 203, 1082, 202, 430, 261, 87, 18, 869, 5630, 7675, 12298, 2932, 4487, 90, 6, 3719, 288, 203, 9506, 202, 80, 322, 273, 855, 13173, 58, 12, 267, 1769, 203, 9506, 202, 8820, 31, 203, 1082, 202, 97, 203, 1082, 202, 759, 6185, 2879, 2362, 203, 1082, 202, 430, 261, 87, 18, 17514, 1190, 2932, 7, 7923, 747, 272, 18, 17514, 1190, 2932, 38, 7923, 747, 272, 18, 17514, 1190, 2932, 42, 7923, 747, 272, 18, 17514, 1190, 2932, 50, 6, 3719, 1324, 31, 203, 1082, 202, 759, 4939, 980, 2511, 603, 9578, 3476, 261, 267, 830, 10920, 13, 578, 342, 203, 1082, 202, 6274, 273, 272, 18, 4939, 2932, 1695, 87, 15, 26984, 4898, 1769, 203, 1082, 202, 759, 3700, 855, 2362, 598, 622, 4520, 576, 2168, 203, 1082, 202, 430, 12, 2186, 18, 2469, 411, 576, 262, 1324, 31, 203, 1082, 202, 474, 417, 273, 374, 31, 203, 1082, 202, 759, 6185, 1281, 1008, 2186, 203, 1082, 202, 17523, 261, 6274, 63, 79, 8009, 14963, 2932, 6, 3719, 417, 9904, 31, 203, 1082, 202, 759, 896, 316, 787, 1634, 203, 1082, 202, 1937, 2148, 273, 394, 2407, 32, 4723, 34, 5621, 203, 1082, 202, 759, 1893, 309, 2036, 353, 864, 487, 279, 2076, 16, 9178, 2353, 11510, 203, 1082, 202, 1937, 2148, 18, 1289, 12, 4723, 18, 2670, 4723, 12, 6274, 63, 79, 9904, 5717, 1769, 203, 1082, 202, 698, 288, 203, 9506, 202, 1937, 2148, 18, 1289, 12, 4723, 18, 2670, 4723, 12, 6274, 63, 79, 9904, 5717, 1769, 203, 9506, 202, 1937, 2148, 18, 1289, 12, 4723, 18, 2670, 4723, 12, 6274, 63, 79, 9904, 5717, 1769, 203, 9506, 202, 1937, 2148, 18, 1289, 12, 4723, 18, 2670, 4723, 12, 6274, 63, 79, 9904, 5717, 1769, 203, 1082, 202, 97, 1044, 12, 503, 425, 13, 288, 203, 9506, 202, 79, 413, 31, 203, 9506, 202, 780, 977, 2957, 273, 2186, 63, 79, 9904, 15533, 203, 9506, 202, 682, 32, 4723, 34, 11510, 225, 273, 2036, 22, 11343, 18, 588, 12, 955, 2957, 1769, 203, 9506, 202, 1937, 2148, 18, 1289, 1595, 12, 11343, 1769, 203, 1082, 202, 97, 203, 1082, 202, 759, 3700, 527, 787, 1634, 309, 486, 1818, 316, 1014, 7010, 1082, 202, 430, 16051, 80, 322, 18, 12298, 12, 1937, 2148, 3719, 27171, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
4f40bdd91abd47b7b3e4599974d621347e453b30
iedadata/geomapapp
org/geomapapp/image/Palette.java
[ "Apache-2.0" ]
Java
readHSV
null
public ArrayList<ArrayList<Float>> readHSV( BufferedReader in ) throws IOException { String l; String[] elements, hsv; ArrayList<ArrayList<Float>> lut = new ArrayList<ArrayList<Float>>(); ArrayList<Float> startPoint; ArrayList<Float> endPoint; while( (l=in.readLine())!=null ) { //ignore comment lines if (l.startsWith("#") || l.startsWith("B") || l.startsWith("F") || l.startsWith("N")) continue; //split line based on white space (incl tabs) elements = l.split("\\s+"); //only read lines with at least 2 columns if( elements.length < 2 ) continue; int k = 0; //read in start point startPoint = new ArrayList<Float>(); startPoint.add(Float.parseFloat(elements[k++])); //check if color is given as a word, rather than RGB try { //split HSV in based on hyphens hsv = elements[k++].split("-"); //convert HSV to RGB startPoint.addAll(HSV2RGB(hsv)); } catch(Exception e) { k--; String textColor = elements[k++]; List<Float> RGB = color2RGB.get(textColor); startPoint.addAll(RGB); } //only add start point if not already in table if (!lut.contains(startPoint)) lut.add(startPoint); //if there is just one color value per line, then continue to the next line if (k >= elements.length) continue; //read in end point endPoint = new ArrayList<Float>(); endPoint.add(Float.parseFloat(elements[k++])); //check if color is given as a word, rather than RGB try { //split HSV in based on hyphens hsv = elements[k++].split("-"); //convert HSV to RGB endPoint.addAll(HSV2RGB(hsv)); } catch(Exception e) { k--; String textColor = elements[k++]; List<Float> RGB = color2RGB.get(textColor); endPoint.addAll(RGB); } //only add end point if not already in table if (!lut.contains(endPoint)) lut.add(endPoint); } in.close(); return lut; }
/* * Read in CPT files with color_model = hsv */
Read in CPT files with color_model = hsv
[ "Read", "in", "CPT", "files", "with", "color_model", "=", "hsv" ]
public ArrayList<ArrayList<Float>> readHSV( BufferedReader in ) throws IOException { String l; String[] elements, hsv; ArrayList<ArrayList<Float>> lut = new ArrayList<ArrayList<Float>>(); ArrayList<Float> startPoint; ArrayList<Float> endPoint; while( (l=in.readLine())!=null ) { if (l.startsWith("#") || l.startsWith("B") || l.startsWith("F") || l.startsWith("N")) continue; elements = l.split("\\s+"); if( elements.length < 2 ) continue; int k = 0; startPoint = new ArrayList<Float>(); startPoint.add(Float.parseFloat(elements[k++])); try { hsv = elements[k++].split("-"); startPoint.addAll(HSV2RGB(hsv)); } catch(Exception e) { k--; String textColor = elements[k++]; List<Float> RGB = color2RGB.get(textColor); startPoint.addAll(RGB); } if (!lut.contains(startPoint)) lut.add(startPoint); if (k >= elements.length) continue; endPoint = new ArrayList<Float>(); endPoint.add(Float.parseFloat(elements[k++])); try { hsv = elements[k++].split("-"); endPoint.addAll(HSV2RGB(hsv)); } catch(Exception e) { k--; String textColor = elements[k++]; List<Float> RGB = color2RGB.get(textColor); endPoint.addAll(RGB); } if (!lut.contains(endPoint)) lut.add(endPoint); } in.close(); return lut; }
[ "public", "ArrayList", "<", "ArrayList", "<", "Float", ">", ">", "readHSV", "(", "BufferedReader", "in", ")", "throws", "IOException", "{", "String", "l", ";", "String", "[", "]", "elements", ",", "hsv", ";", "ArrayList", "<", "ArrayList", "<", "Float", ">", ">", "lut", "=", "new", "ArrayList", "<", "ArrayList", "<", "Float", ">", ">", "(", ")", ";", "ArrayList", "<", "Float", ">", "startPoint", ";", "ArrayList", "<", "Float", ">", "endPoint", ";", "while", "(", "(", "l", "=", "in", ".", "readLine", "(", ")", ")", "!=", "null", ")", "{", "if", "(", "l", ".", "startsWith", "(", "\"#\"", ")", "||", "l", ".", "startsWith", "(", "\"B\"", ")", "||", "l", ".", "startsWith", "(", "\"F\"", ")", "||", "l", ".", "startsWith", "(", "\"N\"", ")", ")", "continue", ";", "elements", "=", "l", ".", "split", "(", "\"\\\\s+\"", ")", ";", "if", "(", "elements", ".", "length", "<", "2", ")", "continue", ";", "int", "k", "=", "0", ";", "startPoint", "=", "new", "ArrayList", "<", "Float", ">", "(", ")", ";", "startPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "try", "{", "hsv", "=", "elements", "[", "k", "++", "]", ".", "split", "(", "\"-\"", ")", ";", "startPoint", ".", "addAll", "(", "HSV2RGB", "(", "hsv", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "k", "--", ";", "String", "textColor", "=", "elements", "[", "k", "++", "]", ";", "List", "<", "Float", ">", "RGB", "=", "color2RGB", ".", "get", "(", "textColor", ")", ";", "startPoint", ".", "addAll", "(", "RGB", ")", ";", "}", "if", "(", "!", "lut", ".", "contains", "(", "startPoint", ")", ")", "lut", ".", "add", "(", "startPoint", ")", ";", "if", "(", "k", ">=", "elements", ".", "length", ")", "continue", ";", "endPoint", "=", "new", "ArrayList", "<", "Float", ">", "(", ")", ";", "endPoint", ".", "add", "(", "Float", ".", "parseFloat", "(", "elements", "[", "k", "++", "]", ")", ")", ";", "try", "{", "hsv", "=", "elements", "[", "k", "++", "]", ".", "split", "(", "\"-\"", ")", ";", "endPoint", ".", "addAll", "(", "HSV2RGB", "(", "hsv", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "k", "--", ";", "String", "textColor", "=", "elements", "[", "k", "++", "]", ";", "List", "<", "Float", ">", "RGB", "=", "color2RGB", ".", "get", "(", "textColor", ")", ";", "endPoint", ".", "addAll", "(", "RGB", ")", ";", "}", "if", "(", "!", "lut", ".", "contains", "(", "endPoint", ")", ")", "lut", ".", "add", "(", "endPoint", ")", ";", "}", "in", ".", "close", "(", ")", ";", "return", "lut", ";", "}" ]
Read in CPT files with color_model = hsv
[ "Read", "in", "CPT", "files", "with", "color_model", "=", "hsv" ]
[ "//ignore comment lines", "//split line based on white space (incl tabs)", "//only read lines with at least 2 columns ", "//read in start point", "//check if color is given as a word, rather than RGB", "//split HSV in based on hyphens", "//convert HSV to RGB", "//only add start point if not already in table ", "//if there is just one color value per line, then continue to the next line", "//read in end point", "//check if color is given as a word, rather than RGB", "//split HSV in based on hyphens", "//convert HSV to RGB", "//only add end point if not already in table " ]
[ { "param": "in", "type": "BufferedReader" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "in", "type": "BufferedReader", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 2407, 32, 19558, 32, 4723, 9778, 855, 13173, 58, 12, 10633, 316, 262, 1216, 1860, 288, 203, 202, 202, 780, 328, 31, 203, 202, 202, 780, 8526, 2186, 16, 30785, 31, 203, 202, 202, 19558, 32, 19558, 32, 4723, 9778, 27171, 273, 394, 2407, 32, 19558, 32, 4723, 9778, 5621, 203, 202, 202, 19558, 32, 4723, 34, 787, 2148, 31, 203, 202, 202, 19558, 32, 4723, 34, 19849, 31, 203, 203, 202, 202, 17523, 12, 261, 80, 33, 267, 18, 896, 1670, 10756, 5, 33, 2011, 262, 288, 203, 203, 1082, 202, 759, 6185, 2879, 2362, 203, 1082, 202, 430, 261, 80, 18, 17514, 1190, 2932, 7, 7923, 747, 328, 18, 17514, 1190, 2932, 38, 7923, 747, 328, 18, 17514, 1190, 2932, 42, 7923, 747, 328, 18, 17514, 1190, 2932, 50, 6, 3719, 1324, 31, 203, 1082, 202, 759, 4939, 980, 2511, 603, 9578, 3476, 261, 267, 830, 10920, 13, 203, 1082, 202, 6274, 273, 328, 18, 4939, 2932, 1695, 87, 15, 8863, 203, 1082, 202, 759, 3700, 855, 2362, 598, 622, 4520, 576, 2168, 7010, 1082, 202, 430, 12, 2186, 18, 2469, 411, 576, 262, 1324, 31, 203, 1082, 202, 474, 417, 273, 374, 31, 203, 1082, 202, 759, 896, 316, 787, 1634, 203, 1082, 202, 1937, 2148, 273, 394, 2407, 32, 4723, 34, 5621, 203, 1082, 202, 1937, 2148, 18, 1289, 12, 4723, 18, 2670, 4723, 12, 6274, 63, 79, 9904, 5717, 1769, 9506, 203, 1082, 202, 759, 1893, 309, 2036, 353, 864, 487, 279, 2076, 16, 9178, 2353, 11510, 203, 1082, 202, 698, 288, 203, 9506, 202, 759, 4939, 670, 23927, 316, 2511, 603, 4855, 28776, 203, 9506, 202, 4487, 90, 273, 2186, 63, 79, 9904, 8009, 4939, 2932, 17, 8863, 203, 9506, 202, 759, 6283, 670, 23927, 358, 11510, 203, 9506, 202, 1937, 2148, 18, 1289, 1595, 12, 13173, 58, 22, 11343, 12, 4487, 90, 10019, 203, 1082, 202, 97, 1044, 12, 503, 425, 13, 288, 203, 9506, 202, 79, 413, 31, 203, 9506, 202, 780, 977, 2957, 273, 2186, 63, 79, 9904, 15533, 203, 9506, 202, 682, 32, 4723, 34, 11510, 225, 273, 2036, 22, 11343, 18, 588, 12, 955, 2957, 1769, 203, 9506, 202, 1937, 2148, 18, 1289, 1595, 12, 11343, 1769, 203, 1082, 202, 97, 203, 1082, 202, 759, 3700, 527, 787, 1634, 309, 486, 1818, 316, 1014, 7010, 1082, 202, 430, 16051, 80, 322, 18, 12298, 12, 1937, 2148, 3719, 27171, 18, 1289, 12, 1937, 2148, 1769, 203, 9506, 203, 1082, 202, 759, 430, 1915, 353, 2537, 1245, 2036, 460, 1534, 980, 16, 1508, 1324, 358, 326, 1024, 980, 203, 1082, 202, 430, 261, 79, 1545, 2186, 18, 2469, 13, 1324, 31, 203, 9506, 203, 1082, 202, 759, 896, 316, 679, 1634, 203, 1082, 202, 409, 2148, 273, 394, 2407, 32, 4723, 34, 5621, 203, 1082, 202, 409, 2148, 18, 1289, 12, 4723, 18, 2670, 4723, 12, 6274, 63, 79, 9904, 5717, 1769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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 20308, 203, 202, 380, 2720, 316, 385, 1856, 1390, 598, 2036, 67, 2284, 273, 30785, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2c8ae337f45b5842c9a290ed27b2c28fcde66b5e
iedadata/geomapapp
haxby/worldwind/renderers/DetailedIconRenderer.java
[ "Apache-2.0" ]
Java
recordFeedback
null
protected void recordFeedback(DrawContext dc, DetailedIcon icon, Vec4 modelPoint, Rectangle screenRect) { if (!this.isFeedbackEnabled(dc, icon)) return; this.doRecordFeedback(dc, icon, modelPoint, screenRect); }
/** * If feedback is enabled for the specified WWIcon, this method records feedback about how the specified WWIcon has * been processed. * * @param dc the current DrawContext. * @param icon the icon which the feedback information refers to. * @param modelPoint the icon's reference point in model coordinates. * @param screenRect the icon's bounding rectangle in screen coordinates. */
If feedback is enabled for the specified WWIcon, this method records feedback about how the specified WWIcon has been processed. @param dc the current DrawContext. @param icon the icon which the feedback information refers to. @param modelPoint the icon's reference point in model coordinates. @param screenRect the icon's bounding rectangle in screen coordinates.
[ "If", "feedback", "is", "enabled", "for", "the", "specified", "WWIcon", "this", "method", "records", "feedback", "about", "how", "the", "specified", "WWIcon", "has", "been", "processed", ".", "@param", "dc", "the", "current", "DrawContext", ".", "@param", "icon", "the", "icon", "which", "the", "feedback", "information", "refers", "to", ".", "@param", "modelPoint", "the", "icon", "'", "s", "reference", "point", "in", "model", "coordinates", ".", "@param", "screenRect", "the", "icon", "'", "s", "bounding", "rectangle", "in", "screen", "coordinates", "." ]
protected void recordFeedback(DrawContext dc, DetailedIcon icon, Vec4 modelPoint, Rectangle screenRect) { if (!this.isFeedbackEnabled(dc, icon)) return; this.doRecordFeedback(dc, icon, modelPoint, screenRect); }
[ "protected", "void", "recordFeedback", "(", "DrawContext", "dc", ",", "DetailedIcon", "icon", ",", "Vec4", "modelPoint", ",", "Rectangle", "screenRect", ")", "{", "if", "(", "!", "this", ".", "isFeedbackEnabled", "(", "dc", ",", "icon", ")", ")", "return", ";", "this", ".", "doRecordFeedback", "(", "dc", ",", "icon", ",", "modelPoint", ",", "screenRect", ")", ";", "}" ]
If feedback is enabled for the specified WWIcon, this method records feedback about how the specified WWIcon has been processed.
[ "If", "feedback", "is", "enabled", "for", "the", "specified", "WWIcon", "this", "method", "records", "feedback", "about", "how", "the", "specified", "WWIcon", "has", "been", "processed", "." ]
[]
[ { "param": "dc", "type": "DrawContext" }, { "param": "icon", "type": "DetailedIcon" }, { "param": "modelPoint", "type": "Vec4" }, { "param": "screenRect", "type": "Rectangle" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "dc", "type": "DrawContext", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "icon", "type": "DetailedIcon", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "modelPoint", "type": "Vec4", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "screenRect", "type": "Rectangle", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 1409, 15888, 12, 6493, 1042, 6744, 16, 463, 6372, 5554, 4126, 16, 12969, 24, 938, 2148, 16, 206, 203, 1082, 202, 19463, 5518, 6120, 13, 288, 206, 203, 202, 202, 430, 16051, 2211, 18, 291, 15888, 1526, 12, 7201, 16, 4126, 3719, 206, 203, 1082, 202, 2463, 31, 206, 203, 206, 203, 202, 202, 2211, 18, 2896, 2115, 15888, 12, 7201, 16, 4126, 16, 938, 2148, 16, 5518, 6120, 1769, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 206, 203, 202, 380, 971, 10762, 353, 3696, 364, 326, 1269, 678, 59, 5554, 16, 333, 707, 3853, 10762, 2973, 3661, 326, 1269, 678, 59, 5554, 711, 206, 203, 202, 380, 2118, 5204, 18, 206, 203, 202, 380, 206, 203, 202, 380, 632, 891, 6744, 540, 326, 783, 10184, 1042, 18, 206, 203, 202, 380, 632, 891, 4126, 4202, 326, 4126, 1492, 326, 10762, 1779, 21368, 358, 18, 206, 203, 202, 380, 632, 891, 938, 2148, 326, 4126, 1807, 2114, 1634, 316, 938, 5513, 18, 206, 203, 202, 380, 632, 891, 5518, 6120, 326, 4126, 1807, 7552, 11845, 316, 5518, 5513, 18, 206, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2c8ae337f45b5842c9a290ed27b2c28fcde66b5e
iedadata/geomapapp
haxby/worldwind/renderers/DetailedIconRenderer.java
[ "Apache-2.0" ]
Java
doRecordFeedback
null
@SuppressWarnings({"UnusedDeclaration"}) protected void doRecordFeedback(DrawContext dc, DetailedIcon icon, Vec4 modelPoint, Rectangle screenRect) { // icon.setValue(AVKey.FEEDBACK_REFERENCE_POINT, modelPoint); // icon.setValue(AVKey.FEEDBACK_SCREEN_BOUNDS, screenRect); }
/** * Records feedback about how the specified WWIcon has been processed. * * @param dc the current DrawContext. * @param icon the icon which the feedback information refers to. * @param modelPoint the icon's reference point in model coordinates. * @param screenRect the icon's bounding rectangle in screen coordinates. */
Records feedback about how the specified WWIcon has been processed. @param dc the current DrawContext. @param icon the icon which the feedback information refers to. @param modelPoint the icon's reference point in model coordinates. @param screenRect the icon's bounding rectangle in screen coordinates.
[ "Records", "feedback", "about", "how", "the", "specified", "WWIcon", "has", "been", "processed", ".", "@param", "dc", "the", "current", "DrawContext", ".", "@param", "icon", "the", "icon", "which", "the", "feedback", "information", "refers", "to", ".", "@param", "modelPoint", "the", "icon", "'", "s", "reference", "point", "in", "model", "coordinates", ".", "@param", "screenRect", "the", "icon", "'", "s", "bounding", "rectangle", "in", "screen", "coordinates", "." ]
@SuppressWarnings({"UnusedDeclaration"}) protected void doRecordFeedback(DrawContext dc, DetailedIcon icon, Vec4 modelPoint, Rectangle screenRect) { }
[ "@", "SuppressWarnings", "(", "{", "\"UnusedDeclaration\"", "}", ")", "protected", "void", "doRecordFeedback", "(", "DrawContext", "dc", ",", "DetailedIcon", "icon", ",", "Vec4", "modelPoint", ",", "Rectangle", "screenRect", ")", "{", "}" ]
Records feedback about how the specified WWIcon has been processed.
[ "Records", "feedback", "about", "how", "the", "specified", "WWIcon", "has", "been", "processed", "." ]
[ "// icon.setValue(AVKey.FEEDBACK_REFERENCE_POINT, modelPoint);\r", "// icon.setValue(AVKey.FEEDBACK_SCREEN_BOUNDS, screenRect);\r" ]
[ { "param": "dc", "type": "DrawContext" }, { "param": "icon", "type": "DetailedIcon" }, { "param": "modelPoint", "type": "Vec4" }, { "param": "screenRect", "type": "Rectangle" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "dc", "type": "DrawContext", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "icon", "type": "DetailedIcon", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "modelPoint", "type": "Vec4", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "screenRect", "type": "Rectangle", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 12590, 6, 21106, 6094, 6, 6792, 206, 203, 565, 4750, 918, 741, 2115, 15888, 12, 6493, 1042, 6744, 16, 463, 6372, 5554, 4126, 16, 12969, 24, 938, 2148, 16, 13264, 5518, 6120, 13, 206, 203, 565, 288, 206, 203, 282, 368, 377, 4126, 18, 542, 620, 12, 5856, 653, 18, 29195, 8720, 67, 14617, 67, 8941, 16, 938, 2148, 1769, 206, 203, 225, 368, 1377, 4126, 18, 542, 620, 12, 5856, 653, 18, 29195, 8720, 67, 27908, 67, 5315, 2124, 3948, 16, 5518, 6120, 1769, 206, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 206, 203, 377, 380, 27390, 10762, 2973, 3661, 326, 1269, 678, 59, 5554, 711, 2118, 5204, 18, 206, 203, 377, 380, 206, 203, 377, 380, 632, 891, 6744, 540, 326, 783, 10184, 1042, 18, 206, 203, 377, 380, 632, 891, 4126, 4202, 326, 4126, 1492, 326, 10762, 1779, 21368, 358, 18, 206, 203, 377, 380, 632, 891, 938, 2148, 326, 4126, 1807, 2114, 1634, 316, 938, 5513, 18, 206, 203, 377, 380, 632, 891, 5518, 6120, 326, 4126, 1807, 7552, 11845, 316, 5518, 5513, 18, 206, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d089bf59756777dd4ce37e2e221ca9c1584ad08e
iedadata/geomapapp
haxby/util/URLFactory.java
[ "Apache-2.0" ]
Java
checkForRedirect
String
public static String checkForRedirect(String url) { if (MapApp.AT_SEA) return url; if (url != null && MapApp.BASE_URL != null && MapApp.BASE_URL.matches(MapApp.DEV_URL)) { url = url.replace(MapApp.PRODUCTION_URL, MapApp.DEV_URL); } try { HttpURLConnection con = (HttpURLConnection) new URL( url ).openConnection(); if (con.getResponseCode() == HttpURLConnection.HTTP_MOVED_PERM || con.getResponseCode() == HttpURLConnection.HTTP_MOVED_TEMP) { url = con.getHeaderField("Location"); } } catch(IOException e) { // e.printStackTrace(); } return url; }
/* * Check if the url has been redirected, and change the url if so. */
Check if the url has been redirected, and change the url if so.
[ "Check", "if", "the", "url", "has", "been", "redirected", "and", "change", "the", "url", "if", "so", "." ]
public static String checkForRedirect(String url) { if (MapApp.AT_SEA) return url; if (url != null && MapApp.BASE_URL != null && MapApp.BASE_URL.matches(MapApp.DEV_URL)) { url = url.replace(MapApp.PRODUCTION_URL, MapApp.DEV_URL); } try { HttpURLConnection con = (HttpURLConnection) new URL( url ).openConnection(); if (con.getResponseCode() == HttpURLConnection.HTTP_MOVED_PERM || con.getResponseCode() == HttpURLConnection.HTTP_MOVED_TEMP) { url = con.getHeaderField("Location"); } } catch(IOException e) { } return url; }
[ "public", "static", "String", "checkForRedirect", "(", "String", "url", ")", "{", "if", "(", "MapApp", ".", "AT_SEA", ")", "return", "url", ";", "if", "(", "url", "!=", "null", "&&", "MapApp", ".", "BASE_URL", "!=", "null", "&&", "MapApp", ".", "BASE_URL", ".", "matches", "(", "MapApp", ".", "DEV_URL", ")", ")", "{", "url", "=", "url", ".", "replace", "(", "MapApp", ".", "PRODUCTION_URL", ",", "MapApp", ".", "DEV_URL", ")", ";", "}", "try", "{", "HttpURLConnection", "con", "=", "(", "HttpURLConnection", ")", "new", "URL", "(", "url", ")", ".", "openConnection", "(", ")", ";", "if", "(", "con", ".", "getResponseCode", "(", ")", "==", "HttpURLConnection", ".", "HTTP_MOVED_PERM", "||", "con", ".", "getResponseCode", "(", ")", "==", "HttpURLConnection", ".", "HTTP_MOVED_TEMP", ")", "{", "url", "=", "con", ".", "getHeaderField", "(", "\"Location\"", ")", ";", "}", "}", "catch", "(", "IOException", "e", ")", "{", "}", "return", "url", ";", "}" ]
Check if the url has been redirected, and change the url if so.
[ "Check", "if", "the", "url", "has", "been", "redirected", "and", "change", "the", "url", "if", "so", "." ]
[ "//\t\t\te.printStackTrace();" ]
[ { "param": "url", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "url", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 514, 13855, 5961, 12, 780, 880, 13, 288, 203, 202, 202, 430, 261, 863, 3371, 18, 789, 67, 1090, 37, 13, 327, 880, 31, 203, 202, 202, 430, 261, 718, 480, 446, 597, 1635, 3371, 18, 8369, 67, 1785, 480, 446, 597, 1635, 3371, 18, 8369, 67, 1785, 18, 8436, 12, 863, 3371, 18, 15301, 67, 1785, 3719, 288, 203, 1082, 202, 718, 273, 880, 18, 2079, 12, 863, 3371, 18, 8025, 1212, 27035, 67, 1785, 16, 1635, 3371, 18, 15301, 67, 1785, 1769, 203, 202, 202, 97, 203, 202, 202, 698, 288, 203, 1082, 202, 2940, 14790, 356, 273, 261, 2940, 14790, 13, 394, 1976, 12, 880, 262, 18, 3190, 1952, 5621, 203, 1082, 202, 430, 261, 591, 18, 588, 1064, 1085, 1435, 422, 19084, 18, 3693, 67, 5980, 12135, 67, 3194, 49, 747, 356, 18, 588, 1064, 1085, 1435, 422, 19084, 18, 3693, 67, 5980, 12135, 67, 10258, 13, 288, 203, 9506, 202, 718, 273, 356, 18, 588, 1864, 974, 2932, 2735, 8863, 203, 1082, 202, 97, 203, 202, 202, 97, 1044, 12, 14106, 425, 13, 288, 203, 759, 1082, 202, 73, 18, 1188, 6332, 5621, 203, 202, 202, 97, 203, 202, 202, 2463, 880, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 2073, 309, 326, 880, 711, 2118, 21808, 16, 471, 2549, 326, 880, 309, 1427, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d089bf59756777dd4ce37e2e221ca9c1584ad08e
iedadata/geomapapp
haxby/util/URLFactory.java
[ "Apache-2.0" ]
Java
checkWorkingURL
null
public static boolean checkWorkingURL(String url) { if (MapApp.AT_SEA) return true; url = checkForRedirect(url); try { HttpURLConnection con = (HttpURLConnection) new URL( url ).openConnection(); if (con.getResponseCode() == HttpURLConnection.HTTP_OK) { return true; } } catch(IOException e) { //e.printStackTrace(); return false; } return false; }
/* * check whether a URL returns a 200 response code */
check whether a URL returns a 200 response code
[ "check", "whether", "a", "URL", "returns", "a", "200", "response", "code" ]
public static boolean checkWorkingURL(String url) { if (MapApp.AT_SEA) return true; url = checkForRedirect(url); try { HttpURLConnection con = (HttpURLConnection) new URL( url ).openConnection(); if (con.getResponseCode() == HttpURLConnection.HTTP_OK) { return true; } } catch(IOException e) { return false; } return false; }
[ "public", "static", "boolean", "checkWorkingURL", "(", "String", "url", ")", "{", "if", "(", "MapApp", ".", "AT_SEA", ")", "return", "true", ";", "url", "=", "checkForRedirect", "(", "url", ")", ";", "try", "{", "HttpURLConnection", "con", "=", "(", "HttpURLConnection", ")", "new", "URL", "(", "url", ")", ".", "openConnection", "(", ")", ";", "if", "(", "con", ".", "getResponseCode", "(", ")", "==", "HttpURLConnection", ".", "HTTP_OK", ")", "{", "return", "true", ";", "}", "}", "catch", "(", "IOException", "e", ")", "{", "return", "false", ";", "}", "return", "false", ";", "}" ]
check whether a URL returns a 200 response code
[ "check", "whether", "a", "URL", "returns", "a", "200", "response", "code" ]
[ "//e.printStackTrace();" ]
[ { "param": "url", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "url", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 1250, 866, 14836, 1785, 12, 780, 880, 13, 288, 203, 202, 202, 430, 261, 863, 3371, 18, 789, 67, 1090, 37, 13, 327, 638, 31, 203, 202, 202, 718, 273, 13855, 5961, 12, 718, 1769, 203, 202, 202, 698, 288, 203, 1082, 202, 2940, 14790, 356, 273, 261, 2940, 14790, 13, 394, 1976, 12, 880, 262, 18, 3190, 1952, 5621, 203, 1082, 202, 430, 261, 591, 18, 588, 1064, 1085, 1435, 422, 19084, 18, 3693, 67, 3141, 13, 288, 203, 9506, 202, 2463, 638, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 1044, 12, 14106, 425, 13, 288, 203, 1082, 202, 759, 73, 18, 1188, 6332, 5621, 203, 1082, 202, 2463, 629, 31, 203, 202, 202, 97, 203, 202, 202, 2463, 629, 31, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 866, 2856, 279, 1976, 1135, 279, 4044, 766, 981, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
cd4b52b27a6b115b437c2186ababc9f231dc5708
iedadata/geomapapp
haxby/db/ship/ShipSelector.java
[ "Apache-2.0" ]
Java
doInBackground
Void
@Override public Void doInBackground() { Random random = new Random(); int progress = 0; //Initialize progress property. setProgress(0); while (progress < 100) { //Sleep for up to one second. try { Thread.sleep(random.nextInt(50)); } catch (InterruptedException ignore) {} //Make random progress. progress += random.nextInt(10); setProgress(Math.min(progress, 100)); } return null; }
/* * Main task. Executed in background thread. */
Main task. Executed in background thread.
[ "Main", "task", ".", "Executed", "in", "background", "thread", "." ]
@Override public Void doInBackground() { Random random = new Random(); int progress = 0; setProgress(0); while (progress < 100) { try { Thread.sleep(random.nextInt(50)); } catch (InterruptedException ignore) {} progress += random.nextInt(10); setProgress(Math.min(progress, 100)); } return null; }
[ "@", "Override", "public", "Void", "doInBackground", "(", ")", "{", "Random", "random", "=", "new", "Random", "(", ")", ";", "int", "progress", "=", "0", ";", "setProgress", "(", "0", ")", ";", "while", "(", "progress", "<", "100", ")", "{", "try", "{", "Thread", ".", "sleep", "(", "random", ".", "nextInt", "(", "50", ")", ")", ";", "}", "catch", "(", "InterruptedException", "ignore", ")", "{", "}", "progress", "+=", "random", ".", "nextInt", "(", "10", ")", ";", "setProgress", "(", "Math", ".", "min", "(", "progress", ",", "100", ")", ")", ";", "}", "return", "null", ";", "}" ]
Main task.
[ "Main", "task", "." ]
[ "//Initialize progress property.\r", "//Sleep for up to one second.\r", "//Make random progress.\r" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 206, 203, 202, 202, 482, 6988, 741, 382, 8199, 1435, 288, 206, 203, 1082, 202, 8529, 2744, 273, 394, 8072, 5621, 206, 203, 1082, 202, 474, 4007, 273, 374, 31, 206, 203, 1082, 202, 759, 7520, 4007, 1272, 18, 206, 203, 1082, 202, 542, 5491, 12, 20, 1769, 206, 203, 1082, 202, 17523, 261, 8298, 411, 2130, 13, 288, 206, 203, 9506, 202, 759, 20768, 364, 731, 358, 1245, 2205, 18, 206, 203, 9506, 202, 698, 288, 206, 203, 6862, 202, 3830, 18, 19607, 12, 9188, 18, 4285, 1702, 12, 3361, 10019, 206, 203, 9506, 202, 97, 1044, 261, 24485, 503, 2305, 13, 2618, 206, 203, 9506, 202, 759, 6464, 2744, 4007, 18, 206, 203, 9506, 202, 8298, 1011, 2744, 18, 4285, 1702, 12, 2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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 206, 203, 1082, 380, 12740, 1562, 18, 3889, 4817, 316, 5412, 2650, 18, 206, 203, 1082, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
30c2b7f1cd2baa011515506b541c4c12d640aa23
iedadata/geomapapp
haxby/db/custom/KMLExportConfigDialog.java
[ "Apache-2.0" ]
Java
processName
String
private String processName(String name) { if (name.toLowerCase().startsWith("lat")) return "Latitude"; else if (name.toLowerCase().startsWith("lon")) return "Longitude"; return name.substring(0, 1).toUpperCase() + name.substring(1); }
/** * As of now just returns name. Should try to format name to * be more readable * @param name * @return */
As of now just returns name. Should try to format name to be more readable @param name @return
[ "As", "of", "now", "just", "returns", "name", ".", "Should", "try", "to", "format", "name", "to", "be", "more", "readable", "@param", "name", "@return" ]
private String processName(String name) { if (name.toLowerCase().startsWith("lat")) return "Latitude"; else if (name.toLowerCase().startsWith("lon")) return "Longitude"; return name.substring(0, 1).toUpperCase() + name.substring(1); }
[ "private", "String", "processName", "(", "String", "name", ")", "{", "if", "(", "name", ".", "toLowerCase", "(", ")", ".", "startsWith", "(", "\"lat\"", ")", ")", "return", "\"Latitude\"", ";", "else", "if", "(", "name", ".", "toLowerCase", "(", ")", ".", "startsWith", "(", "\"lon\"", ")", ")", "return", "\"Longitude\"", ";", "return", "name", ".", "substring", "(", "0", ",", "1", ")", ".", "toUpperCase", "(", ")", "+", "name", ".", "substring", "(", "1", ")", ";", "}" ]
As of now just returns name.
[ "As", "of", "now", "just", "returns", "name", "." ]
[]
[ { "param": "name", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "name", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 514, 1207, 461, 12, 780, 508, 13, 288, 206, 203, 202, 202, 430, 261, 529, 18, 869, 5630, 7675, 17514, 1190, 2932, 4801, 6, 3719, 206, 203, 1082, 202, 2463, 315, 16890, 14432, 206, 203, 202, 202, 12107, 309, 261, 529, 18, 869, 5630, 7675, 17514, 1190, 2932, 9379, 6, 3719, 206, 203, 1082, 202, 2463, 315, 20179, 14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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 206, 203, 202, 380, 2970, 434, 2037, 2537, 1135, 508, 18, 225, 9363, 775, 358, 740, 508, 358, 206, 203, 202, 380, 506, 1898, 7471, 206, 203, 202, 380, 632, 891, 508, 206, 203, 202, 380, 632, 2463, 206, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d1ce76b211148b27e43121ca7bc2e36ee3bf37bc
iedadata/geomapapp
haxby/util/LayerManager.java
[ "Apache-2.0" ]
Java
remove
null
private void remove(LayerPanel layerPanel) { layerPanels.remove(layerPanel); overlays.remove(layerPanel.layer); this.remove((Component)layerPanel); Dimension lmMaxSize = getMaximumSize(); Dimension size = new Dimension( lmMaxSize.width+20, lmMaxSize.height+40); Dimension maxSize = lmFrame.getMaximumSize(); size.height = Math.min(size.height, maxSize.height); size.width = Math.min(size.width, maxSize.width); lmFrame.setMinimumSize(size); lmFrame.setSize(size); lmFrame.pack(); this.revalidate(); this.repaint(); if ( lmFrame.isVisible() ) { Window activeWindow = FocusManager.getCurrentManager().getActiveWindow(); lmFrame.toFront(); if (activeWindow != null) activeWindow.requestFocus(); } }
// Removes a selected panel(layer) from the layer manager
Removes a selected panel(layer) from the layer manager
[ "Removes", "a", "selected", "panel", "(", "layer", ")", "from", "the", "layer", "manager" ]
private void remove(LayerPanel layerPanel) { layerPanels.remove(layerPanel); overlays.remove(layerPanel.layer); this.remove((Component)layerPanel); Dimension lmMaxSize = getMaximumSize(); Dimension size = new Dimension( lmMaxSize.width+20, lmMaxSize.height+40); Dimension maxSize = lmFrame.getMaximumSize(); size.height = Math.min(size.height, maxSize.height); size.width = Math.min(size.width, maxSize.width); lmFrame.setMinimumSize(size); lmFrame.setSize(size); lmFrame.pack(); this.revalidate(); this.repaint(); if ( lmFrame.isVisible() ) { Window activeWindow = FocusManager.getCurrentManager().getActiveWindow(); lmFrame.toFront(); if (activeWindow != null) activeWindow.requestFocus(); } }
[ "private", "void", "remove", "(", "LayerPanel", "layerPanel", ")", "{", "layerPanels", ".", "remove", "(", "layerPanel", ")", ";", "overlays", ".", "remove", "(", "layerPanel", ".", "layer", ")", ";", "this", ".", "remove", "(", "(", "Component", ")", "layerPanel", ")", ";", "Dimension", "lmMaxSize", "=", "getMaximumSize", "(", ")", ";", "Dimension", "size", "=", "new", "Dimension", "(", "lmMaxSize", ".", "width", "+", "20", ",", "lmMaxSize", ".", "height", "+", "40", ")", ";", "Dimension", "maxSize", "=", "lmFrame", ".", "getMaximumSize", "(", ")", ";", "size", ".", "height", "=", "Math", ".", "min", "(", "size", ".", "height", ",", "maxSize", ".", "height", ")", ";", "size", ".", "width", "=", "Math", ".", "min", "(", "size", ".", "width", ",", "maxSize", ".", "width", ")", ";", "lmFrame", ".", "setMinimumSize", "(", "size", ")", ";", "lmFrame", ".", "setSize", "(", "size", ")", ";", "lmFrame", ".", "pack", "(", ")", ";", "this", ".", "revalidate", "(", ")", ";", "this", ".", "repaint", "(", ")", ";", "if", "(", "lmFrame", ".", "isVisible", "(", ")", ")", "{", "Window", "activeWindow", "=", "FocusManager", ".", "getCurrentManager", "(", ")", ".", "getActiveWindow", "(", ")", ";", "lmFrame", ".", "toFront", "(", ")", ";", "if", "(", "activeWindow", "!=", "null", ")", "activeWindow", ".", "requestFocus", "(", ")", ";", "}", "}" ]
Removes a selected panel(layer) from the layer manager
[ "Removes", "a", "selected", "panel", "(", "layer", ")", "from", "the", "layer", "manager" ]
[]
[ { "param": "layerPanel", "type": "LayerPanel" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "layerPanel", "type": "LayerPanel", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1206, 12, 4576, 5537, 3018, 5537, 13, 288, 206, 203, 202, 202, 6363, 5537, 87, 18, 4479, 12, 6363, 5537, 1769, 206, 203, 202, 202, 17312, 87, 18, 4479, 12, 6363, 5537, 18, 6363, 1769, 206, 203, 202, 202, 2211, 18, 4479, 12443, 1841, 13, 6363, 5537, 1769, 206, 203, 206, 203, 202, 202, 8611, 14966, 21485, 273, 25194, 1225, 5621, 206, 203, 206, 203, 202, 202, 8611, 963, 273, 394, 13037, 12, 206, 203, 9506, 202, 25972, 21485, 18, 2819, 15, 3462, 16, 206, 203, 9506, 202, 25972, 21485, 18, 4210, 15, 7132, 1769, 206, 203, 202, 202, 8611, 14777, 273, 14966, 3219, 18, 588, 13528, 1225, 5621, 206, 203, 206, 203, 202, 202, 1467, 18, 4210, 273, 2361, 18, 1154, 12, 1467, 18, 4210, 16, 14777, 18, 4210, 1769, 206, 203, 202, 202, 1467, 18, 2819, 273, 2361, 18, 1154, 12, 1467, 18, 2819, 16, 14777, 18, 2819, 1769, 206, 203, 206, 203, 202, 202, 25972, 3219, 18, 542, 13042, 1225, 12, 1467, 1769, 206, 203, 202, 202, 25972, 3219, 18, 542, 1225, 12, 1467, 1769, 206, 203, 202, 202, 25972, 3219, 18, 2920, 5621, 206, 203, 202, 202, 2211, 18, 266, 5662, 5621, 206, 203, 202, 202, 2211, 18, 14462, 1598, 5621, 206, 203, 202, 202, 430, 261, 14966, 3219, 18, 291, 6207, 1435, 262, 288, 206, 203, 1082, 202, 3829, 2695, 3829, 273, 478, 4560, 1318, 18, 588, 3935, 1318, 7675, 588, 3896, 3829, 5621, 206, 203, 1082, 202, 25972, 3219, 18, 869, 9580, 5621, 206, 203, 1082, 202, 430, 261, 3535, 3829, 480, 446, 13, 2695, 3829, 18, 2293, 9233, 5621, 206, 203, 202, 202, 97, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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1, 759, 20284, 279, 3170, 6594, 12, 6363, 13, 628, 326, 3018, 3301, 206, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d1ce76b211148b27e43121ca7bc2e36ee3bf37bc
iedadata/geomapapp
haxby/util/LayerManager.java
[ "Apache-2.0" ]
Java
displayPlotProfileCheckBoxes
null
public void displayPlotProfileCheckBoxes(boolean profileSelected) { for (LayerPanel lp : layerPanels) { if (lp.plotProfile != null) { lp.plotProfile.setVisible(profileSelected); } } this.revalidate(); this.repaint(); }
/* * toggle the visibility of the Plot Profile checkboxes for each layerPanel */
toggle the visibility of the Plot Profile checkboxes for each layerPanel
[ "toggle", "the", "visibility", "of", "the", "Plot", "Profile", "checkboxes", "for", "each", "layerPanel" ]
public void displayPlotProfileCheckBoxes(boolean profileSelected) { for (LayerPanel lp : layerPanels) { if (lp.plotProfile != null) { lp.plotProfile.setVisible(profileSelected); } } this.revalidate(); this.repaint(); }
[ "public", "void", "displayPlotProfileCheckBoxes", "(", "boolean", "profileSelected", ")", "{", "for", "(", "LayerPanel", "lp", ":", "layerPanels", ")", "{", "if", "(", "lp", ".", "plotProfile", "!=", "null", ")", "{", "lp", ".", "plotProfile", ".", "setVisible", "(", "profileSelected", ")", ";", "}", "}", "this", ".", "revalidate", "(", ")", ";", "this", ".", "repaint", "(", ")", ";", "}" ]
toggle the visibility of the Plot Profile checkboxes for each layerPanel
[ "toggle", "the", "visibility", "of", "the", "Plot", "Profile", "checkboxes", "for", "each", "layerPanel" ]
[]
[ { "param": "profileSelected", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "profileSelected", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 2562, 11532, 4029, 19174, 281, 12, 6494, 3042, 7416, 13, 288, 206, 203, 202, 202, 1884, 261, 4576, 5537, 12423, 294, 3018, 5537, 87, 13, 288, 206, 203, 1082, 202, 430, 261, 9953, 18, 4032, 4029, 480, 446, 13, 288, 206, 203, 9506, 202, 9953, 18, 4032, 4029, 18, 542, 6207, 12, 5040, 7416, 1769, 206, 203, 1082, 202, 97, 206, 203, 202, 202, 97, 206, 203, 202, 202, 2211, 18, 266, 5662, 5621, 206, 203, 202, 202, 2211, 18, 14462, 1598, 5621, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 206, 203, 202, 380, 10486, 326, 9478, 434, 326, 15211, 11357, 11832, 281, 364, 1517, 3018, 5537, 206, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d1ce76b211148b27e43121ca7bc2e36ee3bf37bc
iedadata/geomapapp
haxby/util/LayerManager.java
[ "Apache-2.0" ]
Java
sortLayers
null
public void sortLayers() { // make a copy of layerPanels that won't get re-ordered // need to run twice to make sure everything ends up in the right order for (int i=0; i<2; i++) { LinkedList<LayerPanel> copyOfLayerPanels = new LinkedList<LayerPanel>(); copyOfLayerPanels.addAll(layerPanels); for (LayerPanel lp : copyOfLayerPanels) { Overlay ol = lp.layer; if (lp.item != null && lp.item.index != null) { //get the index from the saved session item int n = 0; int index = Integer.parseInt(lp.item.index); //adjust the index for any missing layers that didn't load correctly for (int missing: missingLayers) { if (index > missing) n++; } index -= n; if (index < overlays.size()) { //move the overlay up or down to reach the desired index while (overlays.indexOf(ol) > index) { this.up(ol); } while (overlays.indexOf(ol) < index) { this.down(ol); } } // toggle top layer visibility to make sure it is plotted on top if (index == 0) { try { TimeUnit.SECONDS.sleep(1); boolean vis = lp.isVisible(); setLayerVisible(lp, !vis); setLayerVisible(lp, vis); } catch (InterruptedException e) { e.printStackTrace(); } } } } } }
/* * Order the Layers based on indices saved during Save Session */
Order the Layers based on indices saved during Save Session
[ "Order", "the", "Layers", "based", "on", "indices", "saved", "during", "Save", "Session" ]
public void sortLayers() { for (int i=0; i<2; i++) { LinkedList<LayerPanel> copyOfLayerPanels = new LinkedList<LayerPanel>(); copyOfLayerPanels.addAll(layerPanels); for (LayerPanel lp : copyOfLayerPanels) { Overlay ol = lp.layer; if (lp.item != null && lp.item.index != null) { int n = 0; int index = Integer.parseInt(lp.item.index); for (int missing: missingLayers) { if (index > missing) n++; } index -= n; if (index < overlays.size()) { while (overlays.indexOf(ol) > index) { this.up(ol); } while (overlays.indexOf(ol) < index) { this.down(ol); } } if (index == 0) { try { TimeUnit.SECONDS.sleep(1); boolean vis = lp.isVisible(); setLayerVisible(lp, !vis); setLayerVisible(lp, vis); } catch (InterruptedException e) { e.printStackTrace(); } } } } } }
[ "public", "void", "sortLayers", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "2", ";", "i", "++", ")", "{", "LinkedList", "<", "LayerPanel", ">", "copyOfLayerPanels", "=", "new", "LinkedList", "<", "LayerPanel", ">", "(", ")", ";", "copyOfLayerPanels", ".", "addAll", "(", "layerPanels", ")", ";", "for", "(", "LayerPanel", "lp", ":", "copyOfLayerPanels", ")", "{", "Overlay", "ol", "=", "lp", ".", "layer", ";", "if", "(", "lp", ".", "item", "!=", "null", "&&", "lp", ".", "item", ".", "index", "!=", "null", ")", "{", "int", "n", "=", "0", ";", "int", "index", "=", "Integer", ".", "parseInt", "(", "lp", ".", "item", ".", "index", ")", ";", "for", "(", "int", "missing", ":", "missingLayers", ")", "{", "if", "(", "index", ">", "missing", ")", "n", "++", ";", "}", "index", "-=", "n", ";", "if", "(", "index", "<", "overlays", ".", "size", "(", ")", ")", "{", "while", "(", "overlays", ".", "indexOf", "(", "ol", ")", ">", "index", ")", "{", "this", ".", "up", "(", "ol", ")", ";", "}", "while", "(", "overlays", ".", "indexOf", "(", "ol", ")", "<", "index", ")", "{", "this", ".", "down", "(", "ol", ")", ";", "}", "}", "if", "(", "index", "==", "0", ")", "{", "try", "{", "TimeUnit", ".", "SECONDS", ".", "sleep", "(", "1", ")", ";", "boolean", "vis", "=", "lp", ".", "isVisible", "(", ")", ";", "setLayerVisible", "(", "lp", ",", "!", "vis", ")", ";", "setLayerVisible", "(", "lp", ",", "vis", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "}", "}", "}", "}", "}" ]
Order the Layers based on indices saved during Save Session
[ "Order", "the", "Layers", "based", "on", "indices", "saved", "during", "Save", "Session" ]
[ "// make a copy of layerPanels that won't get re-ordered\r", "// need to run twice to make sure everything ends up in the right order\r", "//get the index from the saved session item\r", "//adjust the index for any missing layers that didn't load correctly\r", "//move the overlay up or down to reach the desired index\r", "// toggle top layer visibility to make sure it is plotted on top \r" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1524, 9282, 1435, 288, 206, 203, 202, 202, 759, 1221, 279, 1610, 434, 3018, 5537, 87, 716, 8462, 1404, 336, 283, 17, 9885, 206, 203, 202, 202, 759, 1608, 358, 1086, 13605, 358, 1221, 3071, 7756, 3930, 731, 316, 326, 2145, 1353, 206, 203, 202, 202, 1884, 261, 474, 277, 33, 20, 31, 277, 32, 22, 31, 277, 27245, 288, 206, 203, 1082, 202, 13174, 682, 32, 4576, 5537, 34, 13571, 4576, 5537, 87, 273, 394, 10688, 32, 4576, 5537, 34, 5621, 206, 203, 1082, 202, 3530, 951, 4576, 5537, 87, 18, 1289, 1595, 12, 6363, 5537, 87, 1769, 206, 203, 1082, 202, 1884, 261, 4576, 5537, 12423, 294, 13571, 4576, 5537, 87, 13, 288, 206, 203, 9506, 202, 11627, 8793, 273, 12423, 18, 6363, 31, 206, 203, 9506, 202, 430, 261, 9953, 18, 1726, 480, 446, 597, 12423, 18, 1726, 18, 1615, 480, 446, 13, 288, 206, 203, 6862, 202, 759, 588, 326, 770, 628, 326, 5198, 1339, 761, 206, 203, 6862, 202, 474, 290, 273, 374, 31, 206, 203, 6862, 202, 474, 770, 273, 2144, 18, 2670, 1702, 12, 9953, 18, 1726, 18, 1615, 1769, 206, 203, 6862, 202, 759, 13362, 326, 770, 364, 1281, 3315, 6623, 716, 10242, 1404, 1262, 8783, 206, 203, 6862, 202, 1884, 261, 474, 3315, 30, 3315, 9282, 13, 288, 206, 203, 25083, 202, 430, 261, 1615, 405, 3315, 13, 290, 9904, 31, 206, 203, 6862, 202, 97, 206, 203, 6862, 202, 1615, 3947, 290, 31, 206, 203, 25083, 206, 203, 6862, 202, 430, 261, 1615, 411, 9218, 87, 18, 1467, 10756, 288, 206, 203, 25083, 202, 759, 8501, 326, 9218, 731, 578, 2588, 358, 9287, 326, 6049, 770, 206, 203, 25083, 202, 17523, 261, 17312, 87, 18, 31806, 12, 355, 13, 405, 770, 13, 288, 206, 203, 6862, 1082, 202, 2211, 18, 416, 12, 355, 1769, 206, 203, 25083, 202, 97, 206, 203, 25083, 202, 17523, 261, 17312, 87, 18, 31806, 12, 355, 13, 411, 770, 13, 288, 206, 203, 6862, 1082, 202, 2211, 18, 2378, 12, 355, 1769, 206, 203, 25083, 202, 97, 206, 203, 6862, 202, 97, 206, 203, 6862, 202, 759, 10486, 1760, 3018, 9478, 358, 1221, 3071, 518, 353, 3207, 2344, 603, 1760, 9760, 203, 6862, 202, 430, 261, 1615, 422, 374, 13, 288, 206, 203, 25083, 202, 698, 288, 206, 203, 6862, 1082, 202, 950, 2802, 18, 11609, 18, 19607, 12, 21, 1769, 206, 203, 6862, 1082, 202, 6494, 2281, 273, 12423, 18, 291, 6207, 5621, 206, 203, 6862, 1082, 202, 542, 4576, 6207, 12, 9953, 16, 401, 3516, 1769, 206, 203, 6862, 1082, 202, 542, 4576, 6207, 12, 9953, 16, 2281, 1769, 206, 203, 25083, 202, 97, 1044, 261, 24485, 503, 425, 13, 288, 206, 203, 6862, 1082, 202, 73, 18, 1188, 6332, 5621, 206, 203, 25083, 202, 97, 206, 203, 6862, 202, 97, 206, 203, 9506, 202, 97, 206, 203, 1082, 202, 97, 9506, 206, 203, 202, 202, 97, 206, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 206, 203, 202, 380, 4347, 326, 511, 3907, 2511, 603, 4295, 5198, 4982, 7074, 3877, 206, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d1ce76b211148b27e43121ca7bc2e36ee3bf37bc
iedadata/geomapapp
haxby/util/LayerManager.java
[ "Apache-2.0" ]
Java
moveToTop
null
public void moveToTop(Overlay layer) { while (overlays.indexOf(layer) > 0) { this.up(layer); } // this.revalidate(); // this.repaint(); // map.repaint(); }
/* * Move a layer to the top of the layer manager */
Move a layer to the top of the layer manager
[ "Move", "a", "layer", "to", "the", "top", "of", "the", "layer", "manager" ]
public void moveToTop(Overlay layer) { while (overlays.indexOf(layer) > 0) { this.up(layer); } }
[ "public", "void", "moveToTop", "(", "Overlay", "layer", ")", "{", "while", "(", "overlays", ".", "indexOf", "(", "layer", ")", ">", "0", ")", "{", "this", ".", "up", "(", "layer", ")", ";", "}", "}" ]
Move a layer to the top of the layer manager
[ "Move", "a", "layer", "to", "the", "top", "of", "the", "layer", "manager" ]
[ "//\t\tthis.revalidate();\r", "//\t\tthis.repaint();\r", "//\t\tmap.repaint();\r" ]
[ { "param": "layer", "type": "Overlay" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "layer", "type": "Overlay", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 13863, 3401, 12, 11627, 3018, 13, 288, 206, 203, 202, 202, 17523, 261, 17312, 87, 18, 31806, 12, 6363, 13, 405, 374, 13, 288, 206, 203, 1082, 202, 2211, 18, 416, 12, 6363, 1769, 206, 203, 202, 202, 97, 206, 203, 759, 202, 202, 2211, 18, 266, 5662, 5621, 206, 203, 759, 202, 202, 2211, 18, 14462, 1598, 5621, 206, 203, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 206, 203, 202, 380, 9933, 279, 3018, 358, 326, 1760, 434, 326, 3018, 3301, 206, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7fbcb76d9b8f627beae1ba37bd56b44882232382
iedadata/geomapapp
haxby/map/MMapServer.java
[ "Apache-2.0" ]
Java
deepCopy
BufferedImage
private static BufferedImage deepCopy(BufferedImage bi) { ColorModel cm = bi.getColorModel(); boolean isAlphaPremultiplied = cm.isAlphaPremultiplied(); WritableRaster raster = bi.copyData(null); return new BufferedImage(cm, raster, isAlphaPremultiplied, null); }
/** * Create a duplicate of a BufferedImage. * @param bi * @return the copied image. */
Create a duplicate of a BufferedImage. @param bi @return the copied image.
[ "Create", "a", "duplicate", "of", "a", "BufferedImage", ".", "@param", "bi", "@return", "the", "copied", "image", "." ]
private static BufferedImage deepCopy(BufferedImage bi) { ColorModel cm = bi.getColorModel(); boolean isAlphaPremultiplied = cm.isAlphaPremultiplied(); WritableRaster raster = bi.copyData(null); return new BufferedImage(cm, raster, isAlphaPremultiplied, null); }
[ "private", "static", "BufferedImage", "deepCopy", "(", "BufferedImage", "bi", ")", "{", "ColorModel", "cm", "=", "bi", ".", "getColorModel", "(", ")", ";", "boolean", "isAlphaPremultiplied", "=", "cm", ".", "isAlphaPremultiplied", "(", ")", ";", "WritableRaster", "raster", "=", "bi", ".", "copyData", "(", "null", ")", ";", "return", "new", "BufferedImage", "(", "cm", ",", "raster", ",", "isAlphaPremultiplied", ",", "null", ")", ";", "}" ]
Create a duplicate of a BufferedImage.
[ "Create", "a", "duplicate", "of", "a", "BufferedImage", "." ]
[]
[ { "param": "bi", "type": "BufferedImage" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "bi", "type": "BufferedImage", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 12362, 26762, 12, 17947, 2040, 10054, 13, 288, 203, 1082, 5563, 1488, 5003, 273, 10054, 18, 588, 2957, 1488, 5621, 203, 1082, 1250, 353, 9690, 1386, 7027, 3110, 273, 5003, 18, 291, 9690, 1386, 7027, 3110, 5621, 203, 1082, 14505, 18637, 12553, 273, 10054, 18, 3530, 751, 12, 2011, 1769, 203, 1082, 327, 394, 12362, 12, 7670, 16, 12553, 16, 353, 9690, 1386, 7027, 3110, 16, 446, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 202, 380, 1788, 279, 6751, 434, 279, 12362, 18, 203, 202, 380, 632, 891, 10054, 203, 202, 380, 632, 2463, 326, 9268, 1316, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7fbef8052cf03b3238a7d1df92a64f841c0f30c0
iedadata/geomapapp
haxby/db/velocityvectors/VelocityVectors.java
[ "Apache-2.0" ]
Java
drawEllipse
null
private void drawEllipse(Graphics2D g, AffineTransform at, double x, double y, double arrowLength, double angle, double sigE, double sigN, double rho){ g.setTransform(at); double a, b, c, d, e, semiMinor, semiMajor, ang; /* confidence scaling */ /* confid - Confidence interval wanted (0-1) */ /* conrad = sqrt( -2.0 * log(1.0 - confid)); */ double conRad = Math.sqrt(-2.0 * Math.log(1 - confLevel) ); /* the formulas for this part may be found in Bomford, p. 719 */ a = (sigE * sigE - sigN * sigN) * (sigE * sigE - sigN * sigN); b = 4. * (rho * sigE * sigN) * (rho * sigE * sigN); c = sigE * sigE + sigN * sigN; semiMinor = conRad * Math.sqrt((c - Math.sqrt(a + b))/2.0); semiMajor = conRad * Math.sqrt((c + Math.sqrt(a + b))/2.0); d = 2. * rho * sigE * sigN; e = sigE * sigE - sigN * sigN; ang = Math.atan2(d, e)/2.0; double dE = arrowLength* Math.cos(angle); double dN = arrowLength * Math.sin(angle); Ellipse2D.Double sigEllipse = new Ellipse2D.Double(-semiMajor, -semiMinor, semiMajor*2, semiMinor*2); g.translate(x+dE, y+dN); g.rotate(-ang); g.draw(sigEllipse); }
/* * draw an ellipse at the end of the arrow - based on code from psvelo (see utilmeca.c ellipse_convert()) */
draw an ellipse at the end of the arrow - based on code from psvelo )
[ "draw", "an", "ellipse", "at", "the", "end", "of", "the", "arrow", "-", "based", "on", "code", "from", "psvelo", ")" ]
private void drawEllipse(Graphics2D g, AffineTransform at, double x, double y, double arrowLength, double angle, double sigE, double sigN, double rho){ g.setTransform(at); double a, b, c, d, e, semiMinor, semiMajor, ang; /* confidence scaling */ /* confid - Confidence interval wanted (0-1) */ /* conrad = sqrt( -2.0 * log(1.0 - confid)); */ double conRad = Math.sqrt(-2.0 * Math.log(1 - confLevel) ); /* the formulas for this part may be found in Bomford, p. 719 */ a = (sigE * sigE - sigN * sigN) * (sigE * sigE - sigN * sigN); b = 4. * (rho * sigE * sigN) * (rho * sigE * sigN); c = sigE * sigE + sigN * sigN; semiMinor = conRad * Math.sqrt((c - Math.sqrt(a + b))/2.0); semiMajor = conRad * Math.sqrt((c + Math.sqrt(a + b))/2.0); d = 2. * rho * sigE * sigN; e = sigE * sigE - sigN * sigN; ang = Math.atan2(d, e)/2.0; double dE = arrowLength* Math.cos(angle); double dN = arrowLength * Math.sin(angle); Ellipse2D.Double sigEllipse = new Ellipse2D.Double(-semiMajor, -semiMinor, semiMajor*2, semiMinor*2); g.translate(x+dE, y+dN); g.rotate(-ang); g.draw(sigEllipse); }
[ "private", "void", "drawEllipse", "(", "Graphics2D", "g", ",", "AffineTransform", "at", ",", "double", "x", ",", "double", "y", ",", "double", "arrowLength", ",", "double", "angle", ",", "double", "sigE", ",", "double", "sigN", ",", "double", "rho", ")", "{", "g", ".", "setTransform", "(", "at", ")", ";", "double", "a", ",", "b", ",", "c", ",", "d", ",", "e", ",", "semiMinor", ",", "semiMajor", ",", "ang", ";", "/* confidence scaling */", "/* confid - Confidence interval wanted (0-1) */", "/* conrad = sqrt( -2.0 * log(1.0 - confid)); */", "double", "conRad", "=", "Math", ".", "sqrt", "(", "-", "2.0", "*", "Math", ".", "log", "(", "1", "-", "confLevel", ")", ")", ";", "/* the formulas for this part may be found in Bomford, p. 719 */", "a", "=", "(", "sigE", "*", "sigE", "-", "sigN", "*", "sigN", ")", "*", "(", "sigE", "*", "sigE", "-", "sigN", "*", "sigN", ")", ";", "b", "=", "4.", "*", "(", "rho", "*", "sigE", "*", "sigN", ")", "*", "(", "rho", "*", "sigE", "*", "sigN", ")", ";", "c", "=", "sigE", "*", "sigE", "+", "sigN", "*", "sigN", ";", "semiMinor", "=", "conRad", "*", "Math", ".", "sqrt", "(", "(", "c", "-", "Math", ".", "sqrt", "(", "a", "+", "b", ")", ")", "/", "2.0", ")", ";", "semiMajor", "=", "conRad", "*", "Math", ".", "sqrt", "(", "(", "c", "+", "Math", ".", "sqrt", "(", "a", "+", "b", ")", ")", "/", "2.0", ")", ";", "d", "=", "2.", "*", "rho", "*", "sigE", "*", "sigN", ";", "e", "=", "sigE", "*", "sigE", "-", "sigN", "*", "sigN", ";", "ang", "=", "Math", ".", "atan2", "(", "d", ",", "e", ")", "/", "2.0", ";", "double", "dE", "=", "arrowLength", "*", "Math", ".", "cos", "(", "angle", ")", ";", "double", "dN", "=", "arrowLength", "*", "Math", ".", "sin", "(", "angle", ")", ";", "Ellipse2D", ".", "Double", "sigEllipse", "=", "new", "Ellipse2D", ".", "Double", "(", "-", "semiMajor", ",", "-", "semiMinor", ",", "semiMajor", "*", "2", ",", "semiMinor", "*", "2", ")", ";", "g", ".", "translate", "(", "x", "+", "dE", ",", "y", "+", "dN", ")", ";", "g", ".", "rotate", "(", "-", "ang", ")", ";", "g", ".", "draw", "(", "sigEllipse", ")", ";", "}" ]
draw an ellipse at the end of the arrow - based on code from psvelo (see utilmeca.c ellipse_convert())
[ "draw", "an", "ellipse", "at", "the", "end", "of", "the", "arrow", "-", "based", "on", "code", "from", "psvelo", "(", "see", "utilmeca", ".", "c", "ellipse_convert", "()", ")" ]
[]
[ { "param": "g", "type": "Graphics2D" }, { "param": "at", "type": "AffineTransform" }, { "param": "x", "type": "double" }, { "param": "y", "type": "double" }, { "param": "arrowLength", "type": "double" }, { "param": "angle", "type": "double" }, { "param": "sigE", "type": "double" }, { "param": "sigN", "type": "double" }, { "param": "rho", "type": "double" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "g", "type": "Graphics2D", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "at", "type": "AffineTransform", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "y", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "arrowLength", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "angle", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sigE", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sigN", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "rho", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 3724, 4958, 10472, 12, 17558, 22, 40, 314, 16, 23906, 558, 4059, 622, 16, 1645, 619, 16, 1645, 677, 16, 1645, 12274, 1782, 16, 1645, 5291, 16, 7010, 1082, 202, 9056, 3553, 41, 16, 1645, 3553, 50, 16, 1645, 10360, 15329, 203, 1082, 203, 202, 202, 75, 18, 542, 4059, 12, 270, 1769, 203, 1082, 203, 202, 202, 9056, 279, 16, 324, 16, 276, 16, 302, 16, 425, 16, 23161, 19549, 16, 23161, 17581, 16, 7603, 31, 203, 1082, 203, 202, 202, 20308, 15588, 10612, 1195, 203, 202, 202, 20308, 282, 2195, 350, 1377, 300, 9675, 10328, 3673, 15504, 261, 20, 17, 21, 13, 1195, 203, 202, 202, 20308, 356, 6012, 273, 5700, 12, 300, 22, 18, 20, 380, 613, 12, 21, 18, 20, 300, 2195, 350, 10019, 1195, 203, 202, 202, 9056, 356, 6621, 273, 2361, 18, 24492, 19236, 22, 18, 20, 380, 2361, 18, 1330, 12, 21, 300, 2195, 2355, 13, 11272, 203, 1082, 203, 202, 202, 20308, 326, 646, 24857, 364, 333, 1087, 2026, 506, 1392, 316, 605, 362, 31836, 16, 293, 18, 2371, 3657, 1195, 203, 202, 202, 69, 273, 261, 7340, 41, 380, 3553, 41, 300, 3553, 50, 380, 3553, 50, 13, 380, 261, 7340, 41, 380, 3553, 41, 300, 3553, 50, 380, 3553, 50, 1769, 203, 202, 202, 70, 273, 1059, 18, 380, 261, 25603, 380, 3553, 41, 380, 3553, 50, 13, 380, 261, 25603, 380, 3553, 41, 380, 3553, 50, 1769, 203, 202, 202, 71, 273, 3553, 41, 380, 3553, 41, 397, 3553, 50, 380, 3553, 50, 31, 203, 202, 202, 307, 9197, 19549, 273, 356, 6621, 380, 2361, 18, 24492, 12443, 71, 300, 2361, 18, 24492, 12, 69, 397, 324, 3719, 19, 22, 18, 20, 1769, 203, 202, 202, 307, 9197, 17581, 273, 356, 6621, 380, 2361, 18, 24492, 12443, 71, 397, 2361, 18, 24492, 12, 69, 397, 324, 3719, 19, 22, 18, 20, 1769, 203, 202, 202, 72, 273, 576, 18, 380, 10360, 380, 3553, 41, 380, 3553, 50, 31, 203, 202, 202, 73, 273, 3553, 41, 380, 3553, 41, 300, 3553, 50, 380, 3553, 50, 31, 203, 202, 202, 539, 273, 2361, 18, 270, 304, 22, 12, 72, 16, 225, 425, 13176, 22, 18, 20, 31, 203, 1082, 203, 202, 202, 9056, 302, 41, 273, 12274, 1782, 14, 2361, 18, 14445, 12, 4341, 1769, 203, 202, 202, 9056, 302, 50, 273, 12274, 1782, 380, 2361, 18, 21861, 12, 4341, 1769, 203, 202, 565, 10426, 10472, 22, 40, 18, 5265, 3553, 4958, 10472, 273, 394, 10426, 10472, 22, 40, 18, 5265, 19236, 307, 9197, 17581, 16, 300, 307, 9197, 19549, 16, 23161, 17581, 14, 22, 16, 23161, 19549, 14, 22, 1769, 203, 202, 377, 203, 202, 565, 314, 18, 13929, 12, 92, 15, 72, 41, 16, 677, 15, 72, 50, 1769, 203, 202, 565, 314, 18, 20342, 19236, 539, 1769, 203, 202, 202, 75, 18, 9446, 12, 7340, 4958, 10472, 1769, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2165cbf70f7e6034131049a4781bd6332172f205
iedadata/geomapapp
haxby/db/mcs/MCS.java
[ "Apache-2.0" ]
Java
initCruises
null
protected static void initCruises(XMap map, MCS mcs) throws IOException { URL url = URLFactory.url(haxby.map.MapApp.TEMP_BASE_URL + "cgi-bin/MCS/mcs_init"); BufferedReader in = new BufferedReader( new InputStreamReader( url.openStream() )); String s; StringTokenizer st; Vector tmp = new Vector(); while( (s=in.readLine()) != null ) { if(s.equals("@")) break; st = new StringTokenizer(s); if(st.countTokens() != 6) continue; String id = st.nextToken(); Timestamp ts = new Timestamp(Long.parseLong(st.nextToken())); double[] wesn = new double[] { Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()) }; MCSCruise cruise = new MCSCruise(mcs, map, id, ts, wesn); tmp.add(cruise); Vector vec = new Vector(); String lineID = ""; while( !(s=in.readLine()).equals("@") ) { st = new StringTokenizer(s); id = st.nextToken(); if( !lineID.equals(id) ) { if( vec.size() > 1 ) { CDP[] cdps = new CDP[vec.size()]; for( int i=0 ; i<cdps.length ; i++)cdps[i]=(CDP)vec.get(i); MCSLine line = new MCSLine(map, cruise, lineID,cdps); cruise.addLine(line); } lineID = id; vec.removeAllElements(); } long time = Long.parseLong(st.nextToken()); double lon = Double.parseDouble(st.nextToken()); double lat = Double.parseDouble(st.nextToken()); int cdp = Integer.parseInt(st.nextToken()); boolean connect = (vec.size()==0) ? false : true; vec.add(new CDP(cdp, lon, lat, time, connect)); } if( vec.size() > 1 ) { CDP[] cdps = new CDP[vec.size()]; for( int i=0 ; i<cdps.length ; i++)cdps[i]=(CDP)vec.get(i); MCSLine line = new MCSLine(map, cruise, lineID,cdps); cruise.addLine(line); } } in.close(); cruises = new MCSCruise[tmp.size()]; for( int i=0 ; i<cruises.length ; i++) { cruises[i] = (MCSCruise) tmp.get(i); MCSLine[] lines = cruises[i].getLines(); for( int k=0 ; k<lines.length-1 ; k++) { for( int j=k+1 ; j<lines.length ; j++) { double[] crs = MCSLine.cross(lines[k], lines[j]); if(crs==null) continue; lines[k].addCrossing( crs[0], crs[1], lines[j] ); lines[j].addCrossing( crs[1], crs[0], lines[k] ); } } } initiallized = true; }
/** * Initiallizes all the <code>MCSCruise</code> objects in the ldeo database. */
Initiallizes all the MCSCruise objects in the ldeo database.
[ "Initiallizes", "all", "the", "MCSCruise", "objects", "in", "the", "ldeo", "database", "." ]
protected static void initCruises(XMap map, MCS mcs) throws IOException { URL url = URLFactory.url(haxby.map.MapApp.TEMP_BASE_URL + "cgi-bin/MCS/mcs_init"); BufferedReader in = new BufferedReader( new InputStreamReader( url.openStream() )); String s; StringTokenizer st; Vector tmp = new Vector(); while( (s=in.readLine()) != null ) { if(s.equals("@")) break; st = new StringTokenizer(s); if(st.countTokens() != 6) continue; String id = st.nextToken(); Timestamp ts = new Timestamp(Long.parseLong(st.nextToken())); double[] wesn = new double[] { Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()) }; MCSCruise cruise = new MCSCruise(mcs, map, id, ts, wesn); tmp.add(cruise); Vector vec = new Vector(); String lineID = ""; while( !(s=in.readLine()).equals("@") ) { st = new StringTokenizer(s); id = st.nextToken(); if( !lineID.equals(id) ) { if( vec.size() > 1 ) { CDP[] cdps = new CDP[vec.size()]; for( int i=0 ; i<cdps.length ; i++)cdps[i]=(CDP)vec.get(i); MCSLine line = new MCSLine(map, cruise, lineID,cdps); cruise.addLine(line); } lineID = id; vec.removeAllElements(); } long time = Long.parseLong(st.nextToken()); double lon = Double.parseDouble(st.nextToken()); double lat = Double.parseDouble(st.nextToken()); int cdp = Integer.parseInt(st.nextToken()); boolean connect = (vec.size()==0) ? false : true; vec.add(new CDP(cdp, lon, lat, time, connect)); } if( vec.size() > 1 ) { CDP[] cdps = new CDP[vec.size()]; for( int i=0 ; i<cdps.length ; i++)cdps[i]=(CDP)vec.get(i); MCSLine line = new MCSLine(map, cruise, lineID,cdps); cruise.addLine(line); } } in.close(); cruises = new MCSCruise[tmp.size()]; for( int i=0 ; i<cruises.length ; i++) { cruises[i] = (MCSCruise) tmp.get(i); MCSLine[] lines = cruises[i].getLines(); for( int k=0 ; k<lines.length-1 ; k++) { for( int j=k+1 ; j<lines.length ; j++) { double[] crs = MCSLine.cross(lines[k], lines[j]); if(crs==null) continue; lines[k].addCrossing( crs[0], crs[1], lines[j] ); lines[j].addCrossing( crs[1], crs[0], lines[k] ); } } } initiallized = true; }
[ "protected", "static", "void", "initCruises", "(", "XMap", "map", ",", "MCS", "mcs", ")", "throws", "IOException", "{", "URL", "url", "=", "URLFactory", ".", "url", "(", "haxby", ".", "map", ".", "MapApp", ".", "TEMP_BASE_URL", "+", "\"cgi-bin/MCS/mcs_init\"", ")", ";", "BufferedReader", "in", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "url", ".", "openStream", "(", ")", ")", ")", ";", "String", "s", ";", "StringTokenizer", "st", ";", "Vector", "tmp", "=", "new", "Vector", "(", ")", ";", "while", "(", "(", "s", "=", "in", ".", "readLine", "(", ")", ")", "!=", "null", ")", "{", "if", "(", "s", ".", "equals", "(", "\"@\"", ")", ")", "break", ";", "st", "=", "new", "StringTokenizer", "(", "s", ")", ";", "if", "(", "st", ".", "countTokens", "(", ")", "!=", "6", ")", "continue", ";", "String", "id", "=", "st", ".", "nextToken", "(", ")", ";", "Timestamp", "ts", "=", "new", "Timestamp", "(", "Long", ".", "parseLong", "(", "st", ".", "nextToken", "(", ")", ")", ")", ";", "double", "[", "]", "wesn", "=", "new", "double", "[", "]", "{", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", ",", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", ",", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", ",", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", "}", ";", "MCSCruise", "cruise", "=", "new", "MCSCruise", "(", "mcs", ",", "map", ",", "id", ",", "ts", ",", "wesn", ")", ";", "tmp", ".", "add", "(", "cruise", ")", ";", "Vector", "vec", "=", "new", "Vector", "(", ")", ";", "String", "lineID", "=", "\"\"", ";", "while", "(", "!", "(", "s", "=", "in", ".", "readLine", "(", ")", ")", ".", "equals", "(", "\"@\"", ")", ")", "{", "st", "=", "new", "StringTokenizer", "(", "s", ")", ";", "id", "=", "st", ".", "nextToken", "(", ")", ";", "if", "(", "!", "lineID", ".", "equals", "(", "id", ")", ")", "{", "if", "(", "vec", ".", "size", "(", ")", ">", "1", ")", "{", "CDP", "[", "]", "cdps", "=", "new", "CDP", "[", "vec", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "cdps", ".", "length", ";", "i", "++", ")", "cdps", "[", "i", "]", "=", "(", "CDP", ")", "vec", ".", "get", "(", "i", ")", ";", "MCSLine", "line", "=", "new", "MCSLine", "(", "map", ",", "cruise", ",", "lineID", ",", "cdps", ")", ";", "cruise", ".", "addLine", "(", "line", ")", ";", "}", "lineID", "=", "id", ";", "vec", ".", "removeAllElements", "(", ")", ";", "}", "long", "time", "=", "Long", ".", "parseLong", "(", "st", ".", "nextToken", "(", ")", ")", ";", "double", "lon", "=", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", ";", "double", "lat", "=", "Double", ".", "parseDouble", "(", "st", ".", "nextToken", "(", ")", ")", ";", "int", "cdp", "=", "Integer", ".", "parseInt", "(", "st", ".", "nextToken", "(", ")", ")", ";", "boolean", "connect", "=", "(", "vec", ".", "size", "(", ")", "==", "0", ")", "?", "false", ":", "true", ";", "vec", ".", "add", "(", "new", "CDP", "(", "cdp", ",", "lon", ",", "lat", ",", "time", ",", "connect", ")", ")", ";", "}", "if", "(", "vec", ".", "size", "(", ")", ">", "1", ")", "{", "CDP", "[", "]", "cdps", "=", "new", "CDP", "[", "vec", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "cdps", ".", "length", ";", "i", "++", ")", "cdps", "[", "i", "]", "=", "(", "CDP", ")", "vec", ".", "get", "(", "i", ")", ";", "MCSLine", "line", "=", "new", "MCSLine", "(", "map", ",", "cruise", ",", "lineID", ",", "cdps", ")", ";", "cruise", ".", "addLine", "(", "line", ")", ";", "}", "}", "in", ".", "close", "(", ")", ";", "cruises", "=", "new", "MCSCruise", "[", "tmp", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "cruises", ".", "length", ";", "i", "++", ")", "{", "cruises", "[", "i", "]", "=", "(", "MCSCruise", ")", "tmp", ".", "get", "(", "i", ")", ";", "MCSLine", "[", "]", "lines", "=", "cruises", "[", "i", "]", ".", "getLines", "(", ")", ";", "for", "(", "int", "k", "=", "0", ";", "k", "<", "lines", ".", "length", "-", "1", ";", "k", "++", ")", "{", "for", "(", "int", "j", "=", "k", "+", "1", ";", "j", "<", "lines", ".", "length", ";", "j", "++", ")", "{", "double", "[", "]", "crs", "=", "MCSLine", ".", "cross", "(", "lines", "[", "k", "]", ",", "lines", "[", "j", "]", ")", ";", "if", "(", "crs", "==", "null", ")", "continue", ";", "lines", "[", "k", "]", ".", "addCrossing", "(", "crs", "[", "0", "]", ",", "crs", "[", "1", "]", ",", "lines", "[", "j", "]", ")", ";", "lines", "[", "j", "]", ".", "addCrossing", "(", "crs", "[", "1", "]", ",", "crs", "[", "0", "]", ",", "lines", "[", "k", "]", ")", ";", "}", "}", "}", "initiallized", "=", "true", ";", "}" ]
Initiallizes all the <code>MCSCruise</code> objects in the ldeo database.
[ "Initiallizes", "all", "the", "<code", ">", "MCSCruise<", "/", "code", ">", "objects", "in", "the", "ldeo", "database", "." ]
[]
[ { "param": "map", "type": "XMap" }, { "param": "mcs", "type": "MCS" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "map", "type": "XMap", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mcs", "type": "MCS", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 760, 918, 1208, 39, 8653, 6141, 12, 60, 863, 852, 16, 490, 4596, 312, 2143, 13, 1216, 1860, 288, 203, 202, 202, 1785, 880, 273, 1976, 1733, 18, 718, 12, 76, 651, 1637, 18, 1458, 18, 863, 3371, 18, 10258, 67, 8369, 67, 1785, 397, 315, 19062, 17, 4757, 19, 49, 4596, 19, 81, 2143, 67, 2738, 8863, 203, 202, 202, 17947, 2514, 316, 273, 394, 10633, 12, 203, 9506, 202, 2704, 15322, 12, 880, 18, 3190, 1228, 1435, 262, 1769, 203, 202, 202, 780, 272, 31, 203, 202, 202, 780, 10524, 384, 31, 203, 202, 202, 5018, 1853, 273, 394, 5589, 5621, 203, 202, 202, 17523, 12, 261, 87, 33, 267, 18, 896, 1670, 10756, 480, 446, 262, 288, 203, 1082, 202, 430, 12, 87, 18, 14963, 2932, 27614, 3719, 898, 31, 203, 1082, 202, 334, 273, 394, 16370, 12, 87, 1769, 203, 1082, 202, 430, 12, 334, 18, 1883, 5157, 1435, 480, 1666, 13, 1324, 31, 203, 1082, 202, 780, 612, 273, 384, 18, 4285, 1345, 5621, 203, 1082, 202, 4921, 3742, 273, 394, 8159, 12, 3708, 18, 2670, 3708, 12, 334, 18, 4285, 1345, 1435, 10019, 203, 1082, 202, 9056, 8526, 341, 281, 82, 273, 394, 1645, 8526, 288, 3698, 18, 2670, 5265, 12, 334, 18, 4285, 1345, 1435, 3631, 203, 25083, 202, 5265, 18, 2670, 5265, 12, 334, 18, 4285, 1345, 1435, 3631, 203, 25083, 202, 5265, 18, 2670, 5265, 12, 334, 18, 4285, 1345, 1435, 3631, 203, 25083, 202, 5265, 18, 2670, 5265, 12, 334, 18, 4285, 1345, 10756, 289, 31, 203, 1082, 202, 20022, 2312, 8653, 784, 4422, 89, 784, 273, 394, 24105, 2312, 8653, 784, 12, 81, 2143, 16, 852, 16, 612, 16, 3742, 16, 341, 281, 82, 1769, 203, 1082, 202, 5645, 18, 1289, 12, 3353, 89, 784, 1769, 203, 1082, 202, 5018, 7062, 273, 394, 5589, 5621, 203, 1082, 202, 780, 980, 734, 273, 1408, 31, 203, 1082, 202, 17523, 12, 401, 12, 87, 33, 267, 18, 896, 1670, 1435, 2934, 14963, 2932, 36, 7923, 262, 288, 203, 9506, 202, 334, 273, 394, 16370, 12, 87, 1769, 203, 9506, 202, 350, 273, 384, 18, 4285, 1345, 5621, 203, 9506, 202, 430, 12, 401, 1369, 734, 18, 14963, 12, 350, 13, 262, 288, 203, 6862, 202, 430, 12, 7062, 18, 1467, 1435, 405, 404, 262, 288, 203, 25083, 202, 39, 8640, 8526, 7976, 1121, 273, 394, 385, 8640, 63, 8799, 18, 1467, 1435, 15533, 203, 25083, 202, 1884, 12, 509, 277, 33, 20, 274, 277, 32, 4315, 1121, 18, 2469, 274, 277, 27245, 4315, 1121, 63, 77, 65, 28657, 39, 8640, 13, 8799, 18, 588, 12, 77, 1769, 203, 25083, 202, 49, 4596, 1670, 980, 273, 394, 490, 4596, 1670, 12, 1458, 16, 4422, 89, 784, 16, 980, 734, 16, 4315, 1121, 1769, 203, 25083, 202, 3353, 89, 784, 18, 1289, 1670, 12, 1369, 1769, 203, 6862, 202, 97, 203, 6862, 202, 1369, 734, 273, 612, 31, 203, 6862, 202, 8799, 18, 4479, 1595, 3471, 5621, 203, 9506, 202, 97, 203, 9506, 202, 5748, 813, 273, 3407, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 202, 380, 4378, 77, 454, 3128, 777, 326, 411, 710, 34, 20022, 2312, 8653, 784, 1757, 710, 34, 2184, 316, 326, 328, 323, 83, 2063, 18, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
32575d8d7dafab052108a7f919d9c85d7232753b
iedadata/geomapapp
org/geomapapp/grid/GridDialog.java
[ "Apache-2.0" ]
Java
closeGrid
null
private void closeGrid() { if (gridCB.getSelectedItem() == null) return; Grid2DOverlay grid = (Grid2DOverlay) gridCB.getSelectedItem(); if( grid==null )return; List<LayerPanel> layerPanels = ((MapApp)grid.getMap().getApp()).layerManager.getLayerPanels(); for (LayerPanel lp : layerPanels) { if (lp.layerName.equals(grid.name) || lp.layerName.equals(GRID_SHORT_TO_LONG_NAMES.get(grid.name)) || lp.layerName.equals(getShortName(grid.name))) { ((MapApp)grid.getMap().getApp()).layerManager.doRemove(lp); return; } } }
/* * To close down one of the pre-loaded global grids */
To close down one of the pre-loaded global grids
[ "To", "close", "down", "one", "of", "the", "pre", "-", "loaded", "global", "grids" ]
private void closeGrid() { if (gridCB.getSelectedItem() == null) return; Grid2DOverlay grid = (Grid2DOverlay) gridCB.getSelectedItem(); if( grid==null )return; List<LayerPanel> layerPanels = ((MapApp)grid.getMap().getApp()).layerManager.getLayerPanels(); for (LayerPanel lp : layerPanels) { if (lp.layerName.equals(grid.name) || lp.layerName.equals(GRID_SHORT_TO_LONG_NAMES.get(grid.name)) || lp.layerName.equals(getShortName(grid.name))) { ((MapApp)grid.getMap().getApp()).layerManager.doRemove(lp); return; } } }
[ "private", "void", "closeGrid", "(", ")", "{", "if", "(", "gridCB", ".", "getSelectedItem", "(", ")", "==", "null", ")", "return", ";", "Grid2DOverlay", "grid", "=", "(", "Grid2DOverlay", ")", "gridCB", ".", "getSelectedItem", "(", ")", ";", "if", "(", "grid", "==", "null", ")", "return", ";", "List", "<", "LayerPanel", ">", "layerPanels", "=", "(", "(", "MapApp", ")", "grid", ".", "getMap", "(", ")", ".", "getApp", "(", ")", ")", ".", "layerManager", ".", "getLayerPanels", "(", ")", ";", "for", "(", "LayerPanel", "lp", ":", "layerPanels", ")", "{", "if", "(", "lp", ".", "layerName", ".", "equals", "(", "grid", ".", "name", ")", "||", "lp", ".", "layerName", ".", "equals", "(", "GRID_SHORT_TO_LONG_NAMES", ".", "get", "(", "grid", ".", "name", ")", ")", "||", "lp", ".", "layerName", ".", "equals", "(", "getShortName", "(", "grid", ".", "name", ")", ")", ")", "{", "(", "(", "MapApp", ")", "grid", ".", "getMap", "(", ")", ".", "getApp", "(", ")", ")", ".", "layerManager", ".", "doRemove", "(", "lp", ")", ";", "return", ";", "}", "}", "}" ]
To close down one of the pre-loaded global grids
[ "To", "close", "down", "one", "of", "the", "pre", "-", "loaded", "global", "grids" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1746, 6313, 1435, 288, 203, 202, 202, 430, 261, 5222, 8876, 18, 588, 7416, 1180, 1435, 422, 446, 13, 327, 31, 203, 202, 202, 6313, 22, 3191, 502, 5544, 3068, 273, 261, 6313, 22, 3191, 502, 5544, 13, 3068, 8876, 18, 588, 7416, 1180, 5621, 203, 202, 202, 430, 12, 3068, 631, 2011, 262, 2463, 31, 203, 202, 202, 682, 32, 4576, 5537, 34, 3018, 5537, 87, 273, 14015, 863, 3371, 13, 5222, 18, 588, 863, 7675, 588, 3371, 1435, 2934, 6363, 1318, 18, 588, 4576, 5537, 87, 5621, 203, 202, 202, 1884, 261, 4576, 5537, 12423, 294, 3018, 5537, 87, 13, 288, 203, 1082, 202, 430, 261, 9953, 18, 6363, 461, 18, 14963, 12, 5222, 18, 529, 13, 747, 12423, 18, 6363, 461, 18, 14963, 12, 6997, 734, 67, 15993, 67, 4296, 67, 14639, 67, 16257, 18, 588, 12, 5222, 18, 529, 3719, 7010, 6862, 202, 20081, 12423, 18, 6363, 461, 18, 14963, 12, 588, 29983, 12, 5222, 18, 529, 20349, 288, 203, 9506, 202, 12443, 863, 3371, 13, 5222, 18, 588, 863, 7675, 588, 3371, 1435, 2934, 6363, 1318, 18, 2896, 3288, 12, 9953, 1769, 203, 9506, 202, 2463, 31, 203, 1082, 202, 97, 203, 202, 202, 97, 203, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 202, 380, 2974, 1746, 2588, 1245, 434, 326, 675, 17, 4230, 2552, 3068, 87, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
32575d8d7dafab052108a7f919d9c85d7232753b
iedadata/geomapapp
org/geomapapp/grid/GridDialog.java
[ "Apache-2.0" ]
Java
dispose
null
public void dispose(String gridToRemoveName) { if ( gridToRemoveName != null ) { XMap map = ((Grid2DOverlay)gridCB.getSelectedItem()).getMap(); Grid2DOverlay gridToRemove = (Grid2DOverlay)gridCBElements.get(gridToRemoveName); if (gridToRemove == null) { gridToRemove = (Grid2DOverlay)gridCBElements.get(GRID_SHORT_TO_LONG_NAMES.get(gridToRemoveName)); } if ( mGrids.containsKey(gridToRemove) ) { mGrids.remove(gridToRemove); } //contributed grids only if ( isContributedGrid(gridToRemoveName) ) { //Set units to null org.geomapapp.gis.shape.ESRIShapefile.nullUnits(); // Remove reference to saving grid ((MapApp)map.getApp()).setToolsGrid(null); if (gridToRemove != null) { gridToRemove.dispose(); disposedGrid = gridToRemove; gridCBElements.remove(gridToRemoveName); gridCB.removeItem(gridToRemove); } } else { ((MapApp)map.getApp()).setToolsGrid(null); if (gridToRemove != null) { gridToRemove.dispose(); gridToRemove.getMap().removeOverlay(gridToRemove); } } //If closing GMRT grid, deselect the toggle button if ((gridToRemoveName.equals(DEM) ||gridToRemoveName.equals(GRID_SHORT_TO_LONG_NAMES.get(DEM)))) { gridTB.setSelected(false); } currentGrid = gridCB.getSelectedIndex(); //Check the layer manager for the next grid. //If no more, then close down the dialog. List<LayerPanel> layerPanels = ((MapApp)(map.getApp())).layerManager.getLayerPanels(); for (LayerPanel lp : layerPanels) { if (lp.layer instanceof Grid2DOverlay) { Grid2DOverlay gotoGrid = ((Grid2DOverlay) lp.layer); if (gotoGrid != gridToRemove && !gotoGrid.name.equals(MapApp.baseFocusName)) { gridCB.setSelectedItem(gotoGrid); switchGrid(); return; } } else if (lp.layer instanceof ESRIShapefile && ((ESRIShapefile)lp.layer).getMultiGrid() != null ) { Grid2DOverlay gotoGrid = ((ESRIShapefile)lp.layer).getMultiGrid().grid; if (gotoGrid != gridToRemove) { gridCB.setSelectedItem(gotoGrid); switchGrid(); return; } } } toggleListLockUnlock = null; dialog.dispose(); loaded = false; if ( map != null && map.getApp() instanceof MapApp) { ((MapApp)map.getApp()).initializeColorScale(); } map.repaint(); } }
/* * Based on the old disposeChosenGrid from GridLayerDialog for contributed grids */
Based on the old disposeChosenGrid from GridLayerDialog for contributed grids
[ "Based", "on", "the", "old", "disposeChosenGrid", "from", "GridLayerDialog", "for", "contributed", "grids" ]
public void dispose(String gridToRemoveName) { if ( gridToRemoveName != null ) { XMap map = ((Grid2DOverlay)gridCB.getSelectedItem()).getMap(); Grid2DOverlay gridToRemove = (Grid2DOverlay)gridCBElements.get(gridToRemoveName); if (gridToRemove == null) { gridToRemove = (Grid2DOverlay)gridCBElements.get(GRID_SHORT_TO_LONG_NAMES.get(gridToRemoveName)); } if ( mGrids.containsKey(gridToRemove) ) { mGrids.remove(gridToRemove); } if ( isContributedGrid(gridToRemoveName) ) { org.geomapapp.gis.shape.ESRIShapefile.nullUnits(); ((MapApp)map.getApp()).setToolsGrid(null); if (gridToRemove != null) { gridToRemove.dispose(); disposedGrid = gridToRemove; gridCBElements.remove(gridToRemoveName); gridCB.removeItem(gridToRemove); } } else { ((MapApp)map.getApp()).setToolsGrid(null); if (gridToRemove != null) { gridToRemove.dispose(); gridToRemove.getMap().removeOverlay(gridToRemove); } } if ((gridToRemoveName.equals(DEM) ||gridToRemoveName.equals(GRID_SHORT_TO_LONG_NAMES.get(DEM)))) { gridTB.setSelected(false); } currentGrid = gridCB.getSelectedIndex(); List<LayerPanel> layerPanels = ((MapApp)(map.getApp())).layerManager.getLayerPanels(); for (LayerPanel lp : layerPanels) { if (lp.layer instanceof Grid2DOverlay) { Grid2DOverlay gotoGrid = ((Grid2DOverlay) lp.layer); if (gotoGrid != gridToRemove && !gotoGrid.name.equals(MapApp.baseFocusName)) { gridCB.setSelectedItem(gotoGrid); switchGrid(); return; } } else if (lp.layer instanceof ESRIShapefile && ((ESRIShapefile)lp.layer).getMultiGrid() != null ) { Grid2DOverlay gotoGrid = ((ESRIShapefile)lp.layer).getMultiGrid().grid; if (gotoGrid != gridToRemove) { gridCB.setSelectedItem(gotoGrid); switchGrid(); return; } } } toggleListLockUnlock = null; dialog.dispose(); loaded = false; if ( map != null && map.getApp() instanceof MapApp) { ((MapApp)map.getApp()).initializeColorScale(); } map.repaint(); } }
[ "public", "void", "dispose", "(", "String", "gridToRemoveName", ")", "{", "if", "(", "gridToRemoveName", "!=", "null", ")", "{", "XMap", "map", "=", "(", "(", "Grid2DOverlay", ")", "gridCB", ".", "getSelectedItem", "(", ")", ")", ".", "getMap", "(", ")", ";", "Grid2DOverlay", "gridToRemove", "=", "(", "Grid2DOverlay", ")", "gridCBElements", ".", "get", "(", "gridToRemoveName", ")", ";", "if", "(", "gridToRemove", "==", "null", ")", "{", "gridToRemove", "=", "(", "Grid2DOverlay", ")", "gridCBElements", ".", "get", "(", "GRID_SHORT_TO_LONG_NAMES", ".", "get", "(", "gridToRemoveName", ")", ")", ";", "}", "if", "(", "mGrids", ".", "containsKey", "(", "gridToRemove", ")", ")", "{", "mGrids", ".", "remove", "(", "gridToRemove", ")", ";", "}", "if", "(", "isContributedGrid", "(", "gridToRemoveName", ")", ")", "{", "org", ".", "geomapapp", ".", "gis", ".", "shape", ".", "ESRIShapefile", ".", "nullUnits", "(", ")", ";", "(", "(", "MapApp", ")", "map", ".", "getApp", "(", ")", ")", ".", "setToolsGrid", "(", "null", ")", ";", "if", "(", "gridToRemove", "!=", "null", ")", "{", "gridToRemove", ".", "dispose", "(", ")", ";", "disposedGrid", "=", "gridToRemove", ";", "gridCBElements", ".", "remove", "(", "gridToRemoveName", ")", ";", "gridCB", ".", "removeItem", "(", "gridToRemove", ")", ";", "}", "}", "else", "{", "(", "(", "MapApp", ")", "map", ".", "getApp", "(", ")", ")", ".", "setToolsGrid", "(", "null", ")", ";", "if", "(", "gridToRemove", "!=", "null", ")", "{", "gridToRemove", ".", "dispose", "(", ")", ";", "gridToRemove", ".", "getMap", "(", ")", ".", "removeOverlay", "(", "gridToRemove", ")", ";", "}", "}", "if", "(", "(", "gridToRemoveName", ".", "equals", "(", "DEM", ")", "||", "gridToRemoveName", ".", "equals", "(", "GRID_SHORT_TO_LONG_NAMES", ".", "get", "(", "DEM", ")", ")", ")", ")", "{", "gridTB", ".", "setSelected", "(", "false", ")", ";", "}", "currentGrid", "=", "gridCB", ".", "getSelectedIndex", "(", ")", ";", "List", "<", "LayerPanel", ">", "layerPanels", "=", "(", "(", "MapApp", ")", "(", "map", ".", "getApp", "(", ")", ")", ")", ".", "layerManager", ".", "getLayerPanels", "(", ")", ";", "for", "(", "LayerPanel", "lp", ":", "layerPanels", ")", "{", "if", "(", "lp", ".", "layer", "instanceof", "Grid2DOverlay", ")", "{", "Grid2DOverlay", "gotoGrid", "=", "(", "(", "Grid2DOverlay", ")", "lp", ".", "layer", ")", ";", "if", "(", "gotoGrid", "!=", "gridToRemove", "&&", "!", "gotoGrid", ".", "name", ".", "equals", "(", "MapApp", ".", "baseFocusName", ")", ")", "{", "gridCB", ".", "setSelectedItem", "(", "gotoGrid", ")", ";", "switchGrid", "(", ")", ";", "return", ";", "}", "}", "else", "if", "(", "lp", ".", "layer", "instanceof", "ESRIShapefile", "&&", "(", "(", "ESRIShapefile", ")", "lp", ".", "layer", ")", ".", "getMultiGrid", "(", ")", "!=", "null", ")", "{", "Grid2DOverlay", "gotoGrid", "=", "(", "(", "ESRIShapefile", ")", "lp", ".", "layer", ")", ".", "getMultiGrid", "(", ")", ".", "grid", ";", "if", "(", "gotoGrid", "!=", "gridToRemove", ")", "{", "gridCB", ".", "setSelectedItem", "(", "gotoGrid", ")", ";", "switchGrid", "(", ")", ";", "return", ";", "}", "}", "}", "toggleListLockUnlock", "=", "null", ";", "dialog", ".", "dispose", "(", ")", ";", "loaded", "=", "false", ";", "if", "(", "map", "!=", "null", "&&", "map", ".", "getApp", "(", ")", "instanceof", "MapApp", ")", "{", "(", "(", "MapApp", ")", "map", ".", "getApp", "(", ")", ")", ".", "initializeColorScale", "(", ")", ";", "}", "map", ".", "repaint", "(", ")", ";", "}", "}" ]
Based on the old disposeChosenGrid from GridLayerDialog for contributed grids
[ "Based", "on", "the", "old", "disposeChosenGrid", "from", "GridLayerDialog", "for", "contributed", "grids" ]
[ "//contributed grids only", "//Set units to null", "// Remove reference to saving grid", "//If closing GMRT grid, deselect the toggle button", "//Check the layer manager for the next grid.", "//If no more, then close down the dialog." ]
[ { "param": "gridToRemoveName", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "gridToRemoveName", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 15825, 12, 780, 3068, 12765, 461, 13, 288, 203, 202, 202, 430, 261, 3068, 12765, 461, 480, 446, 262, 288, 203, 1082, 202, 60, 863, 852, 273, 14015, 6313, 22, 3191, 502, 5544, 13, 5222, 8876, 18, 588, 7416, 1180, 1435, 2934, 588, 863, 5621, 203, 9506, 203, 1082, 202, 6313, 22, 3191, 502, 5544, 3068, 12765, 273, 261, 6313, 22, 3191, 502, 5544, 13, 5222, 8876, 3471, 18, 588, 12, 5222, 12765, 461, 1769, 203, 1082, 202, 430, 261, 5222, 12765, 422, 446, 13, 288, 203, 9506, 202, 5222, 12765, 273, 261, 6313, 22, 3191, 502, 5544, 13, 5222, 8876, 3471, 18, 588, 12, 6997, 734, 67, 15993, 67, 4296, 67, 14639, 67, 16257, 18, 588, 12, 5222, 12765, 461, 10019, 203, 1082, 202, 97, 203, 1082, 202, 430, 261, 312, 6313, 87, 18, 12298, 653, 12, 5222, 12765, 13, 262, 288, 203, 9506, 202, 81, 6313, 87, 18, 4479, 12, 5222, 12765, 1769, 203, 1082, 202, 97, 203, 1082, 202, 759, 591, 11050, 3068, 87, 1338, 203, 1082, 202, 430, 261, 353, 442, 11050, 6313, 12, 5222, 12765, 461, 13, 262, 288, 203, 6862, 203, 9506, 202, 759, 694, 4971, 358, 446, 203, 9506, 202, 3341, 18, 10049, 438, 2910, 18, 15761, 18, 4867, 18, 3991, 2259, 8500, 768, 18, 2011, 7537, 5621, 203, 6862, 203, 9506, 202, 759, 3581, 2114, 358, 12392, 3068, 203, 9506, 202, 12443, 863, 3371, 13, 1458, 18, 588, 3371, 1435, 2934, 542, 10348, 6313, 12, 2011, 1769, 203, 9506, 202, 430, 261, 5222, 12765, 480, 446, 13, 288, 203, 6862, 202, 5222, 12765, 18, 2251, 4150, 5621, 203, 6862, 202, 2251, 7423, 6313, 273, 3068, 12765, 31, 203, 6862, 202, 5222, 8876, 3471, 18, 4479, 12, 5222, 12765, 461, 1769, 203, 6862, 202, 5222, 8876, 18, 4479, 1180, 12, 5222, 12765, 1769, 203, 9506, 202, 97, 203, 1082, 202, 97, 469, 288, 203, 9506, 202, 12443, 863, 3371, 13, 1458, 18, 588, 3371, 1435, 2934, 542, 10348, 6313, 12, 2011, 1769, 203, 9506, 202, 430, 261, 5222, 12765, 480, 446, 13, 288, 203, 6862, 202, 5222, 12765, 18, 2251, 4150, 5621, 203, 6862, 202, 5222, 12765, 18, 588, 863, 7675, 4479, 11627, 12, 5222, 12765, 1769, 203, 9506, 202, 97, 203, 1082, 202, 97, 203, 9506, 203, 1082, 202, 759, 2047, 7647, 611, 49, 12185, 3068, 16, 2832, 13759, 326, 10486, 3568, 203, 1082, 202, 430, 14015, 5222, 12765, 461, 18, 14963, 12, 1639, 49, 13, 747, 5222, 12765, 461, 18, 14963, 12, 6997, 734, 67, 15993, 67, 4296, 67, 14639, 67, 16257, 18, 588, 12, 1639, 49, 3719, 3719, 288, 203, 9506, 202, 5222, 25730, 18, 542, 7416, 12, 5743, 1769, 203, 1082, 202, 97, 203, 9506, 203, 1082, 202, 2972, 6313, 273, 3068, 8876, 18, 588, 7416, 1016, 5621, 203, 1082, 202, 759, 1564, 326, 3018, 3301, 364, 326, 1024, 3068, 18, 203, 1082, 202, 759, 2047, 1158, 1898, 16, 1508, 1746, 2588, 326, 6176, 18, 203, 1082, 202, 682, 32, 4576, 5537, 34, 3018, 5537, 87, 273, 14015, 863, 3371, 21433, 1458, 18, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 20308, 203, 202, 380, 25935, 603, 326, 1592, 15825, 782, 8918, 6313, 628, 7145, 4576, 6353, 364, 356, 11050, 3068, 87, 203, 202, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]