query
stringlengths 8
1.54M
| document
stringlengths 9
312k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Normalize data in a sequence to a floatarray2D with range from 0 to 1 | final static public FloatArray2D SequenceToFloatArray2DNormalize(final Sequence seq) {
FloatArray2D fa = SequenceToFloatArray2D(seq);
FloatArray2D fa_normalized = fa.clone();
List<Float> list = Arrays.asList(ArrayUtils.toObject(fa.data));
float min = Collections.min(list);
float max = Collections.max(list);
float scale = (float) (1.0 / (max - min));
for (int i = 0; i < fa_normalized.data.length; ++i) {
fa_normalized.data[i] = (fa_normalized.data[i] - min) * scale;
}
return fa_normalized;
} | [
"double[] normalize(double[] data);",
"final static public void normalize( final float[] data )\n\t{\n\t\tfloat sum = 0;\n\t\tfor ( final float d : data )\n\t\t\tsum += d;\n\n\t\tfor ( int i = 0; i < data.length; ++i )\n\t\t\tdata[ i ] /= sum;\n\t}",
"int[][][] normalize(int[][][] img, int maxImg, int minImg);",
"double[] normalize(double[] array1) {\n\t\tint i = 0;\n\t\tint cnt = 0;\n\n\t\tfor (double col : array1) {\n\t\t\tif (col != Double.MIN_VALUE) {\n\t\t\t\tcnt += 1;\n\t\t\t}\n\t\t}\n\n\t\tdouble[] array2 = new double[cnt];\n\n\t\tfor (double col : array1) {\n\t\t\tif (col != Double.MIN_VALUE) {\n\t\t\t\tarray2[i] = col;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn array2;\n\t}",
"private double[] normalisation(double[] sourceArray) {\n\t\tdouble sum = 0.0;\n\t\tfor (int i = 0; i < sourceArray.length; i++) {\n\t\t\tsum += sourceArray[i];\n\t\t}\n\t\tfor (int i = 0; i < sourceArray.length; i++) {\n\t\t\tsourceArray[i] = sourceArray[i] / sum;\n\t\t}\n\t\treturn sourceArray;\n\t}",
"private double[] prepare(double[] data){\n\n //find min and max value\n double curMin = Double.POSITIVE_INFINITY;\n double curMax = Double.NEGATIVE_INFINITY;\n for (double v : data) {\n if(v < curMin){\n curMin = v;\n }\n if(v > curMax){\n curMax = v;\n }\n }\n\n //normalise the data using min-max normalisation\n //and also subtract each value from its normalised index\n final double range = curMax - curMin;\n double[] normalisedData = new double[data.length];\n\n for (int i = 0; i < normalisedData.length; i++) {\n double normalisedIndex = (double)i / data.length;\n normalisedData[i] = ((data[i] - curMin) / range) - normalisedIndex;\n }\n return normalisedData;\n }",
"private static double[] normalise(double[] in) {\n double[] out = new double[in.length];\n out[out.length-1] = in[in.length-1]; //label\n \n double min = utilities.GenericTools.min(in);\n double max = utilities.GenericTools.max(in);\n \n for (int i = 0; i < out.length-1; i++)\n out[i] = (in[i] - min) / (max - min); \n \n return out;\n }",
"public float[] normalisePNs(int[] image) {\n double sum = 0;\n float[] float_image = new float[image.length];\n for ( int i = 0; i < image.length; ++i ){ sum+=image[i]; }\n sum = Math.sqrt(sum);\n for ( int i = 0; i < image.length; ++i ){ float_image[i] = (float) image[i] / (float) sum; }\n\n return float_image;\n }",
"protected void normalize(float[] data, double max)\r\n\t{\r\n\t\tfor (int i = 0; i < data.length; i++)\r\n\t\t\tdata[i] /= max;\r\n\t}",
"public void norm(){\r\n for (int y = 0; y < dimY; y++){\r\n int firstX = 0;\r\n while (Math.abs(values[y][firstX]) < 2 * Double.MIN_VALUE){ //value close to 0\r\n values[y][firstX] = 0;\r\n firstX++;\r\n }\r\n double divisor = values[y][firstX];\r\n values[y][firstX] = 1;\r\n for (int x = firstX + 1; x < dimX; x++){\r\n values[y][x] = values[y][x] / divisor;\r\n }\r\n }\r\n }",
"public void normalize()\n {\n double f = 1;\n for(int i = 0; i < nDim; i++) f *= wBin[i];\n scale( realcount / f / totalCount() );\n }",
"protected static float[][] normaliser(float[][] mat)\n {\n float total = 0;\n for(int i =0;i<mat.length;i++)\n {\n for(int j = 0 ;j<mat.length;j++)\n {\n total+=mat[i][j];\n }\n }\n if(total !=0)\n {\n for(int i =0;i<mat.length;i++)\n {\n for(int j = 0 ;j<mat.length;j++)\n {\n mat[i][j] /=total;\n }\n }\n\n }\n return mat;\n\n }",
"private void normalizeTransformedData(final double[][] dataRI) {\n final double[] dataR = dataRI[0];\n final double[] dataI = dataRI[1];\n final int n = dataR.length;\n\n switch (normalization) {\n case STD:\n if (inverse) {\n final double scaleFactor = 1d / n;\n for (int i = 0; i < n; i++) {\n dataR[i] *= scaleFactor;\n dataI[i] *= scaleFactor;\n }\n }\n\n break;\n\n case UNIT:\n final double scaleFactor = 1d / Math.sqrt(n);\n for (int i = 0; i < n; i++) {\n dataR[i] *= scaleFactor;\n dataI[i] *= scaleFactor;\n }\n\n break;\n\n default:\n throw new IllegalStateException(); // Should never happen.\n }\n }",
"public static float[][][] normalizeAmplitudeRMS(float[][][] array)\n {\n if (array == null || array[0] == null || array[0][0] == null) return null;\n double rmsAmp = StsMath.rmsIgnoreZero(array);\n for (int i = 0; i < array.length; i++)\n {\n for (int j = 0; j < array[0].length; j++)\n {\n StsMath.normalizeAmplitude(array[i][j], rmsAmp);\n }\n }\n return array;\n }",
"public void normalize() {\n\t\tscale(0d, 1d);\n\t}",
"public abstract float scaleIntensityData(float rawData);",
"public static void normalizeVector(double[] input) {\r\n\t\tint index = 0;\r\n\t\tdouble sum = 0;\r\n\t\twhile (index < input.length) {\r\n\t\t\tsum += input[index];\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\tindex = 0;\r\n\t\twhile (index < input.length) {\r\n\t\t\tinput[index] = input[index] / sum;\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t}",
"public void deNormalise() {\n if ( minValues == null | maxValues == null ) return;\n\n // Minimum and maximum values calculated per column. DeNormalise it all...\n if ( trainingDataSet != null ) {\n for( int row = 0; row < trainingDataSet.length; row++ ) {\n for(int column = 0; column < trainingDataSet[row].length; column++ ) {\n double value = trainingDataSet[row][column];\n DeNormalize deNorm = new DeNormalize(minValues[column], maxValues[column]); \n trainingDataSet[row][column] = deNorm.apply(value);\n }\n }\n }\n\n // Check testing set and collect minimum and maximum values\n if ( testingDataSet != null ) {\n for( int row = 0; row < testingDataSet.length; row++ ) {\n for(int column = 0; column < testingDataSet[row].length; column++ ) {\n double value = testingDataSet[row][column];\n DeNormalize deNorm = new DeNormalize(minValues[column], maxValues[column]);\n testingDataSet[row][column] = deNorm.apply(value);\n }\n }\n }\n }",
"public ArrayList<ArrayList<Double>> normalizeMatrix(ArrayList<ArrayList<Double>> mat){\n\t\t double themax = 1;\n\t\t double themin = mat.get(0).get(0);\n\t\t for(int i=0; i < mat.get(0).size(); i++){\n\t\t\t for(int j=0; j < mat.get(0).size(); j++){\n\t\t\t\t themax = Math.max(themax, mat.get(i).get(j));\n\t\t\t\t themin = Math.max(themin, mat.get(i).get(j));\n\t\t\t }\n\t\t }\n\t\t for(int i=0; i < mat.get(0).size(); i++){\n\t\t\t for(int j=0; j < mat.get(0).size(); j++){\n\t\t\t\t mat.get(i).set(j, mat.get(i).get(j)/themax);\n\t\t\t }\n\t\t }\n\t\t return mat; \n\t }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search the tree for the shortest matching word | public TreeNode findShortest(String word) {
return findShortest(word, 0);
} | [
"public Node search(String word)\r\n { \r\n Node temp = root.getNext();\r\n \r\n for (int count = 0; count < size; count++)\r\n {\r\n if (temp.getWord().equals(word))\r\n {\r\n return temp;\r\n }\r\n \r\n temp = temp.getNext();\r\n }\r\n \r\n return null;\r\n }",
"private TrieNode searchPrefix(String word) {\n TrieNode node = root;\n\n for(char c : word.toCharArray()) {\n if(node.containsKey(c)) {\n node = node.get(c); //get next child\n }\n else {\n return null; //fail fast if no further match\n }\n }\n return node;\n }",
"private TrieNode searchPrefix(String word) {\n\t TrieNode node = root;\n\t for (int i = 0; i < word.length(); i++) {\n\t char curLetter = word.charAt(i);\n\t if (node.containsKey(curLetter)) {\n\t node = node.get(curLetter);\n\t } else {\n\t return null;\n\t }\n\t }\n\t return node;\n\t }",
"private int searchGraph(String word, LetterNode masterNode) {\n int ans = 0;\n int childSubAns = 0;\n if (masterNode != null) {\n\n LetterNode currentNode = masterNode;\n\n if (word.length() == 1) {\n if (currentNode.children[(int) word.charAt(0) - 65] != null) {//there is a node for that letter\n currentNode = currentNode.children[(int) word.charAt(0) - 65];\n if (currentNode.isfinal) {\n\n ans = ans + 1;\n currentNode.isfinal = false;\n currentNode.UsedTofinal = true;\n } else if (currentNode.UsedTofinal) {//currentNode.UsedTofinal==true\n //no need to keep searching word. all anagrams already found\n\n ans = -100000;\n\n }\n }\n\n } else {//word is longer than 1 so spawn new search on each letter\n\n for (int i = 0; i < word.length(); i++) {\n currentNode = masterNode;\n if (currentNode.children[(int) word.charAt(i) - 65] != null) {//there is a node for that letter\n\n currentNode = masterNode.children[(int) word.charAt(i) - 65];\n // System.out.println(\"send serch from word \" + word + \" letter \" + word.charAt(i) + \" substign \" + (word.substring(0, i) + word.substring(i + 1)) + \" in \" + currentNode);\n childSubAns = searchGraph((word.substring(0, i) + word.substring(i + 1)), currentNode);\n\n if (childSubAns < 0) {\n\n return -10000;\n } else {\n ans = ans + childSubAns;\n }\n }\n }\n }\n }\n\n return ans;\n }",
"public boolean search(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n return false;\n }\n now = now.children.get(c);\n }\n return now.hasWord;\n}",
"public static ArrayList<Word> search(String inputString){\n Node current = root;\n \n // remove doubles and make aphameticals\n Word tempWord = new Word(inputString);\n \n String s = tempWord.getTrieWord();\n \n ArrayList<Word> results = new ArrayList<Word>();\n ArrayList<Word> fuzzyResults = new ArrayList<Word>();\n\n while(current != null){\n \n for(int i=0;i<s.length();i++){ \n if(current.subNode(s.charAt(i)) == null){\n System.out.println(\"WE Have an extra letter ------ !!!!\");\n Collections.sort(results, new CustomComparator()); \n return results;\n }\n else\n current = current.subNode(s.charAt(i));\n \n if(i==inputString.length()-2){\n fuzzyResults.addAll(current.possibleWords);\n }\n \n }\n \n if (current.marker == true)\n results.addAll(current.possibleWords);\n \n // return results; // place here for no problems\n \n }\n \n \n \n //remove fuzzyResults from normal results\n for(int r=0; r<results.size(); r++){\n \n if(results.get(r).isFuzzy){\n results.remove(r);\n r--;\n }\n }\n \n \n // Go through fuzzy results and only accept ones that are less than 1 char of search string\n for(int r=0; r<fuzzyResults.size(); r++){\n \n if(((fuzzyResults.get(r).getWord().length()-1)==inputString.length()) && fuzzyResults.get(r).isFuzzy ){\n results.add(fuzzyResults.get(r)); \n }\n }\n \n Collections.sort(results, new CustomComparator()); \n\n return results;\n \n }",
"public int wordSearch(String word) {\n\t\tif (root.word.equals(word))\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn wordSearch(word, root, 0); //quiets the compiler\n\t}",
"private void insert (TrieNode root, String searchWord) {\n\t\tTrieNode node = root.childs.get(searchWord.charAt(0));\n\t\tif (node == null) {\n\t\t\tTrieNode N = new TrieNode ();\n\t\t\tN.currentString = searchWord;\n\t\t\tN.childs = new HashMap <Character, TrieNode> ();\n\t\t\tN.isLeaf = true;\n\t\t\tN.count = 1;//this will be leaf node\n\t\t\tN.refNode = null;\n\t\t\t\n\t\t\troot.childs.put(searchWord.charAt(0), N);\n\t\t}\n\t\telse {\n\t\t\t//some common exist\n\t\t\tString common = StringUtils.getCommonPrefix(new String [] {node.currentString, searchWord});\n\t\t\tif (!common.isEmpty()) {\n\t\t\t\tif (common.equals(searchWord) && common.equals(node.currentString)) {\n\t\t\t\t\t//Actual Search Word : SamsungMobile\n\t\t\t\t\t//Node : Mobile\n\t\t\t\t\t//common : Mobile \n\t\t\t\t\t//SearchWord : Mobile\n\n\t\t\t\t\t//Word already exist, increment counter\n\t\t\t\t\tnode.count +=1;\n\t\t\t\t}\n\t\t\t\t//Actual Search Word : SamsungMobilePhone\n\t\t\t\t//Node : Mobile\n\t\t\t\t//common : Mobile \n\t\t\t\t//SearchWord : MobilePhone\n\t\t\t\telse if (common.length() == node.currentString.length()) {\n\t\t\t\t\tString remainingSearchWord = searchWord.substring(common.length()); \n\t\t\t\t\tinsert (node, remainingSearchWord);\n\t\t\t\t}\n\t\t\t\t//Actual Search Word : SamsungMob\n\t\t\t\t//Node : Mobile\n\t\t\t\t//common : Mob\n\t\t\t\t//SearchWord : Mob\n\t\t\t\telse if (common.equals(searchWord) && !common.equals(node.currentString)) {\n\t\t\t\t\tTrieNode N = new TrieNode ();\n\t\t\t\t\tN.currentString = common;\n\t\t\t\t\tN.childs = new HashMap <Character, TrieNode> ();\n\t\t\t\t\tN.isLeaf = true;\n\t\t\t\t\tN.count = 1;//this will be leaf node\n\t\t\t\t\tN.refNode = null;\n\n\t\t\t\t\troot.childs.put(common.charAt(0), N);\n\n\t\t\t\t\t//break node\n\t\t\t\t\tString remainingOldWord = node.currentString.substring(common.length());\n\t\t\t\t\tnode.currentString = remainingOldWord;\n\t\t\t\t\tN.childs.put(remainingOldWord.charAt(0), node);\n\t\t\t\t}\n\t\t\t\t//Actual Search Word : SamsungMobSearch\n\t\t\t\t//Node : Mobile\n\t\t\t\t//common : Mob\n\t\t\t\t//SearchWord : MobSearch\n\t\t\t\telse {\n\t\t\t\t\tTrieNode N = new TrieNode ();\n\t\t\t\t\tN.currentString = common;\n\t\t\t\t\tN.childs = new HashMap <Character, TrieNode> ();\n\t\t\t\t\tN.isLeaf = false;\n\t\t\t\t\tN.count = 0;//this will be leaf node\n\t\t\t\t\tN.refNode = null;\n\n\t\t\t\t\troot.childs.put(common.charAt(0), N);\n\n\t\t\t\t\t//break node\n\t\t\t\t\tString remainingOldWord = node.currentString.substring(common.length());\n\t\t\t\t\tnode.currentString = remainingOldWord;\n\t\t\t\t\tN.childs.put(remainingOldWord.charAt(0), node);\n\n\t\t\t\t\tString remainingNewWord = searchWord.substring(common.length());\n\t\t\t\t\tinsert (N, remainingNewWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean search(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(temp == null) return false;\n tn = temp;\n }\n return tn.flag;\n }",
"public boolean search(String word) {\n int modified =0;\n TrieNode temp = root;\n for (int i = 0; i < word.length(); i++) {\n Character character = word.charAt(i);\n TrieNode node = temp.charMap.get(character);\n if(node==null){\n for (Map.Entry<Character,TrieNode> characterTrieNodeEntry : node.charMap.entrySet()) {\n TrieNode item = characterTrieNodeEntry.getValue().charMap.get(character);\n\n }\n modified++;\n }\n }\n return modified==1;\n }",
"private void suggestHelper(TrieNode node, char letter, String prefix, String word, int[] previousRow){\n int size = previousRow.length;\n int[] currentRow = new int[size];\n currentRow[0] = previousRow[0] + 1;\n int minimumElement = currentRow[0];\n int insertCost, deleteCost, replaceCost;\n for(int i = 1; i < size; i++){\n insertCost = currentRow[i - 1] + 1;\n deleteCost = previousRow[i] + 1;\n if(word.charAt(i-1) == letter)\n replaceCost = previousRow[i - 1];\n else\n replaceCost = previousRow[i - 1] + 1;\n currentRow[i] = Math.min(Math.min(insertCost,deleteCost),replaceCost);\n if(currentRow[i] < minimumElement)\n minimumElement = currentRow[i];\n\n }\n if(currentRow[size - 1] == minLevDist && node.isWord) {\n if (wordCount < 3)\n result[wordCount++] = prefix + letter;\n }\n\n if(currentRow[size - 1] < minLevDist && node.isWord) {\n minLevDist = currentRow[size - 1];\n wordCount = 0;\n result = new String[3];\n result[wordCount++] = prefix + letter;\n }\n if(minimumElement < minLevDist) {\n for(int i = 0; i < node.children.length; i++)\n if(node.children[i] != null)\n if(i==26)\n suggestHelper(node.children[i],'\\'',prefix+letter,word,currentRow);\n else\n suggestHelper(node.children[i],(char)(i+'a'),prefix+letter,word,currentRow);\n }\n }",
"public StringNode locate(String word) {\n StringNode current = first;\n while (true) {\n if (current == null) {\n return null;\n }\n if (current.getWord().equalsIgnoreCase(word)) {\n return current;\n }\n else {\n if (current.hasNext()) {\n current = current.getNext();\n }\n else {\n return null;\n }\n }\n }\n }",
"public static String shortestWord(Scanner s){\n\t\t\n\t\t//assume the first word is shortest\n\t\tString shortest = s.next();\n\t\t\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\tString temp = s.next();\n\t\t\t\n\t\t\t//check to see if 'temp' is shorter than the current shortest string\n\t\t\tif ( temp.length()< shortest.length()){\n\t\t\t\tshortest = temp;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn shortest;\n\t}",
"private void searchWord()\n {\n String inputWord = searchField.getText();\n \n if(inputWord.isEmpty())\n queryResult = null;\n \n else\n {\n char firstLetter = inputWord.toUpperCase().charAt(0);\n \n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetter)\n {\n queryResult = lexiNodeTrees.get(i).searchWord(inputWord, false);\n i = lexiNodeTrees.size(); // escape the loop\n }\n }\n }\n \n // update the list on the GUI\n if(queryResult != null)\n {\n ArrayList<String> words = new ArrayList<>();\n for(WordDefinition word : queryResult)\n {\n words.add(word.getWord());\n }\n \n // sort the list of words alphabetically \n Collections.sort(words);\n \n // display the list of wordsin the UI\n DefaultListModel model = new DefaultListModel();\n for(String word : words)\n {\n model.addElement(word);\n }\n\n this.getSearchSuggestionList().setModel(model);\n }\n \n else\n this.getSearchSuggestionList().setModel( new DefaultListModel() );\n }",
"private TrieNode trieSearch(String word) {\r\n\t\tTrieNode cur = root;\r\n\t\t\r\n\t\tfor (int i = 0; i < word.length(); i++) {\r\n\t\t\tchar c = word.charAt(i);\r\n\t\t\t\r\n\t\t\tif (!cur.charMap.containsKey(c)) {\r\n\t\t\t\t// the trie didn't contain a mapping for the current character must return false\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcur = cur.charMap.get(c); \r\n\t\t}\r\n\t\t\r\n\t\t// at this point we just return the node we got to\r\n\t\treturn cur;\r\n\t}",
"@Override\n public String suggestSimilarWord(String inputWord) {\n\n ITrie.INode foundWord = dictionary.find(inputWord);\n if (foundWord != null && foundWord.getValue() > 0) {\n return inputWord.toLowerCase();\n }\n\n TreeSet<String> oneDistance = getWordsOneDistanceFrom(inputWord.toLowerCase());\n\n String match = searchForMatch(oneDistance);\n\n if (match != null) {\n return match;\n }\n\n TreeSet<String> twoDistance = getWordsTwoDistanceFrom(oneDistance);\n\n match = searchForMatch(twoDistance);\n\n if (match != null) {\n return match;\n }\n\n return null;\n }",
"public String search_words(String word){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs)\n\t\t\tif(word.toLowerCase().charAt(0) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\tfound_words += child.search_words(word, 0);\n\t\t\n\t\treturn found_words;\n\t}",
"public void handleWord(String word) {\r\n\r\n\t\t// First check if our tree is empty, if so\r\n\t\t// simply add the word to the tree\r\n\t\tif(root == null){\r\n\t\t\tEntry new_root = new Entry(word,1);\r\n\t\t\troot = new TreeNode(new_root);\r\n\t\t\tthis.numElements++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//Create 2 nodes, current & previous so\r\n\t\t// we can transverse through the bst tree\r\n\t\tTreeNode current = root;\r\n\t\tTreeNode previous_node = null;\r\n\t\tint compare = 0; // our comparison variable between the current node's word\r\n\t\t\t\t\t\t\t\t\t\t// and the input word\r\n\r\n\t\t// While we our not at a leaf node\r\n\t\t// try to find the word in the bst tree\r\n\t\twhile(current!=null){\r\n\r\n\t\t\tcompare = current.compareTo(word);\r\n\r\n\t\t\t// If compare = 0, we know we have found our word in the bst tree,\r\n\t\t\t// therefore increment the nodes frequency.\r\n\t\t\tif(compare == 0){\r\n\t\t\t\tcurrent.addToFrequency();\r\n\t\t\t\treturn;\r\n\r\n\t\t\t// If compare is <0 we know we need to go the right to keep the\r\n\t\t\t// alphabetical order of the bst tree\r\n\t\t\t}else if(compare<0){\r\n\t\t\t\tprevious_node = current;\r\n\t\t\t\tcurrent = current.right;\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t// If compare is >0 we know we need to go to the left to keep the\r\n\t\t\t// alphabetical order of the bst tree\r\n\t\t\t}else if(compare>0){\r\n\t\t\t\tprevious_node = current;\r\n\t\t\t\tcurrent = current.left;\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// If we have not found the word in the bst tree,\r\n\t\t// we are already at the correct postion to add the word in the tree\r\n\t\t// due to the previous_node. So all we need to know is if the word needs\r\n\t\t// to be placed on the left or right of the leaf node\r\n\t\tif(compare<0){\r\n\t\t\tEntry new_word = new Entry(word);\r\n\t\t\tTreeNode new_node = new TreeNode(new_word);\r\n\t\t\tprevious_node.right = new_node;\r\n\t\t\treturn;\r\n\r\n\t\t}else{\r\n\t\t\tEntry new_word = new Entry(word);\r\n\t\t\tTreeNode new_node = new TreeNode(new_word);\r\n\t\t\tprevious_node.left = new_node;\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\t}",
"private static int SparseSearch(String[] ary, String target) {\n\t\tif (ary == null || ary.length == 0 || target.isEmpty())\n\t\t\treturn -1;\n\n\t\tint start = 0;\n\t\tint end = ary.length;\n\t\twhile (start <= end) {\n\t\t\tint mid = start + (end - start) / 2;\n\n\t\t\tif (ary[mid].isEmpty()) {//if empty, find the nearest non-empty string\n\t\t\t\tint left = mid - 1;\n\t\t\t\tint right = mid + 1;\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tif (left < start && right > end) { //cannot find non-empty\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t\tif (left >= start && !ary[left].isEmpty()) {\n\t\t\t\t\t\tmid = left;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (right <= end && !ary[right].isEmpty()) {\n\t\t\t\t\t\tmid = right;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tleft--;\n\t\t\t\t\tright++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint compare = target.compareTo(ary[mid]);\n\t\t\tif (compare == 0) {\n\t\t\t\treturn mid;\n\t\t\t} else if (compare > 0) {//target > mid, right part\n\t\t\t\tstart = mid + 1;\n\t\t\t} else {//compare < 0, target < mid, left part\n\t\t\t\tend = mid - 1;\n\t\t\t}\t\n\t\t}\n\n\t\treturn -1;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reconstructs a message from the given JSONArray. | public static Message fromJSON(JSONArray json){
String message = (String) json.get(0);
long creationTime = (long) json.get(1);
long visibleTime = (long) json.get(2);
long id = (long) json.get(3);
return new Message(message, visibleTime, creationTime, id);
} | [
"public static List<Message> parseMessageJson(String messageJson) throws JSONException {\n List<Message> msgList = new ArrayList<>();\n if(messageJson != null){\n JSONArray arr = new JSONArray(messageJson);\n //Log.e(\"MESSAGE\", String.valueOf(arr));\n for (int i = 0; i< arr.length(); i++){\n JSONObject obj = arr.getJSONObject(i);\n Message msg = new Message(obj.getString(Message.ITEMID), obj.getString(Message.SENDER),\n obj.getString(Message.RECIPIENT), obj.getString(Message.CONTENT), obj.getString(Message.TIME_STAMP));\n msgList.add(msg);\n }\n }\n return msgList;\n }",
"private void sendJSONArray(JSONArray message) {\n try {\n this.outputStream.writeBytes(message.toString());\n this.outputStream.flush();\n } catch (IOException e) {\n throw new LostConnectionException(e);\n }\n }",
"private static JsonArray parseArgsList(String message){\n Gson gson = new Gson();\n JsonArray jsonArray = gson.fromJson(message, JsonArray.class);\n JsonArray argList = (JsonArray) jsonArray.get(1);\n return argList;\n }",
"public static ArrayList<Pair> decodeArrayPair (String message) throws JSONException\n {\n JSONArray json = new JSONArray(message);\n return decodeArrayPair(json);\n }",
"public Message toMessage(byte[] data) throws IOException, JMSException;",
"public void reconstructMessage(String incomingMessage) {\n String[] msgs = incomingMessage.split(\";\");\n this.message = msgs[0];\n this.originPort = msgs[1];\n this.remotePort = msgs[2];\n this.seqNumber = Integer.valueOf(msgs[3]);\n this.originPNum = Integer.valueOf(msgs[4]);\n this.destPNum = Integer.valueOf(msgs[5]);\n this.messageType = msgs[6];\n this.fifoCounter = Integer.valueOf(msgs[7]);\n }",
"public static void parseMessages(String json, Handler handler) throws InvalidProtocolBufferException {\n CommerceProtos.MessageList.Builder builder = CommerceProtos.MessageList.newBuilder();\n JsonFormat.parser().merge(json, builder);\n\n for (CommerceProtos.Message e : builder.build().getMessageList()) {\n handleMessage(e, handler);\n }\n }",
"public static ArrayList<ArrayList<Pair>> decodeMatrixPairWithString (String message) throws JSONException\n {\n ArrayList<ArrayList<Pair>> list = new ArrayList<>();\n JSONArray matrix = new JSONArray(message);\n for (int i = 2; i < matrix.length(); i++)\n {\n JSONArray row = (JSONArray)matrix.get(i);\n list.add(decodeArrayPair(row));\n }\n return list;\n }",
"public static Object[] fromJson(JSONArray array) {\n\t\tObject[] objects = new Object[array.length()];\n\t\tfor (int i = 0; i < array.length(); i++) {\n\t\t\tif (array.get(i) instanceof JSONObject) {\n\t\t\t\tobjects[i] = fromJson((JSONObject) array.get(i));\n\t\t\t} else if (array.get(i) instanceof JSONArray) {\n\t\t\t\tobjects[i] = fromJson((JSONArray) array.get(i));\n\t\t\t} else {\n\t\t\t\tobjects[i] = array.get(i);\n\t\t\t}\n\t\t}\n\n\t\tObject[] bioArray = null;\n\t\tif (objects.length > 0) {\n\t\t\tbioArray = (Object[]) Array.newInstance(objects[0].getClass(), objects.length);\n\t\t\tfor (int i = 0; i < bioArray.length; i++) {\n\t\t\t\tbioArray[i] = objects[i];\n\t\t\t}\n\t\t}\n\n\t\treturn bioArray;\n\t}",
"public static FermatMessage constructFermatMessageFromJsonString(String jsonMessageData) throws FMPException {\n\n try {\n\n /*\n * Validate the data\n */\n validatePacketDataString(jsonMessageData);\n\n /**\n * Create a temporal object\n */\n FermatMessageCommunication temp = new FermatMessageCommunication();\n\n /*\n * Convert to the object\n */\n return temp.fromJson(jsonMessageData);\n\n }catch (Exception exception){\n\n throw new MalformedFMPPacketException(MalformedFMPPacketException.DEFAULT_MESSAGE, exception, null, \"The message data is not properly assembled\");\n }\n\n\t}",
"public void decodeMessage() {\n StringBuilder decoded = new StringBuilder();\n\n for (int i = 0; i < message.length(); i += 3) {\n if (message.charAt(i) == message.charAt(i + 1)) {\n decoded.append(message.charAt(i));\n } else if (message.charAt(i) == message.charAt(i + 2)) {\n decoded.append(message.charAt(i));\n } else {\n decoded.append(message.charAt(i + 1));\n }\n }\n\n message = decoded;\n }",
"private MqttMessage messageFromJSON(JSONObject jsMsg) {\n\t\tMqttMessage result = null;\n\t\ttry {\n\t\t\t// There seems no good way to turn a JSONArray (of number)\n\t\t\t// into a Java byte array, so use brute force\n\t\t\tJSONArray jsPayload = jsMsg.getJSONArray(PAYLOAD);\n\t\t\tbyte[] payload = new byte[jsPayload.length()];\n\t\t\tfor (int i = 0; i < jsPayload.length(); i++) {\n\t\t\t\tpayload[i] = (byte) jsPayload.getInt(i);\n\t\t\t}\n\t\t\tresult = new MqttMessage(payload);\n\t\t\tresult.setQos(jsMsg.optInt(QOS, 0));\n\t\t\tresult.setRetained(jsMsg.optBoolean(RETAINED, false));\n\t\t} catch (JSONException e) {\n\t\t\ttraceException(TAG, \"messageFromJSON\", e);\n\t\t}\n\n\t\treturn result;\n\t}",
"public static Message decodeMessage(byte[] data) throws IOException {\n JavaType type = Mapper.getTypeFactory().constructParametricType(Message.class, JsonNode.class, JsonNode.class);\n Message<JsonNode, JsonNode> m = Mapper.readValue(data, type);\n switch (m.fixedHeader().messageType()) {\n case CONNECT:\n MqttConnectVariableHeader cv = Mapper.treeToValue(m.variableHeader(), MqttConnectVariableHeader.class);\n MqttConnectPayload cp = Mapper.treeToValue(m.payload(), MqttConnectPayload.class);\n return new Message<>(m.fixedHeader(), m.additionalHeader(), cv, cp);\n case CONNACK:\n MqttConnAckVariableHeader cav = Mapper.treeToValue(m.variableHeader(), MqttConnAckVariableHeader.class);\n return new Message<>(m.fixedHeader(), m.additionalHeader(), cav, null);\n case SUBSCRIBE:\n MqttPacketIdVariableHeader sv = Mapper.treeToValue(m.variableHeader(), MqttPacketIdVariableHeader.class);\n MqttSubscribePayloadGranted sp = Mapper.treeToValue(m.payload(), MqttSubscribePayloadGranted.class);\n return new Message<>(m.fixedHeader(), m.additionalHeader(), sv, sp);\n case SUBACK:\n MqttPacketIdVariableHeader sav = Mapper.treeToValue(m.variableHeader(), MqttPacketIdVariableHeader.class);\n MqttSubAckPayload sap = Mapper.treeToValue(m.payload(), MqttSubAckPayload.class);\n return new Message<>(m.fixedHeader(), m.additionalHeader(), sav, sap);\n case UNSUBSCRIBE:\n MqttPacketIdVariableHeader uv = Mapper.treeToValue(m.variableHeader(), MqttPacketIdVariableHeader.class);\n MqttUnsubscribePayload up = Mapper.treeToValue(m.payload(), MqttUnsubscribePayload.class);\n return new Message<>(m.fixedHeader(), m.additionalHeader(), uv, up);\n case PUBLISH:\n MqttPublishVariableHeader pv = Mapper.treeToValue(m.variableHeader(), MqttPublishVariableHeader.class);\n MqttPublishPayload pp = Mapper.treeToValue(m.payload(), MqttPublishPayload.class);\n return new Message<>(m.fixedHeader(), m.additionalHeader(), pv, pp);\n case UNSUBACK:\n case PUBACK:\n case PUBREC:\n case PUBREL:\n case PUBCOMP:\n MqttPacketIdVariableHeader iv = Mapper.treeToValue(m.variableHeader(), MqttPacketIdVariableHeader.class);\n return new Message<>(m.fixedHeader(), m.additionalHeader(), iv, null);\n case PINGREQ:\n case PINGRESP:\n case DISCONNECT:\n return m;\n default:\n return null;\n }\n }",
"private ArrayList<String> parseMessageToArray(MqttMessage message) {\n ArrayList messageAsArray = new ArrayList();\n String message_ = message.toString();\n Log.d(\"Bus Stop\", message_);\n char[] charList = message_.toCharArray();\n String stop = \"\";\n for (char c : charList){\n if(c != ';'){\n stop = stop + c;\n }else{\n Log.d(\"Bus Stop\", stop);\n messageAsArray.add(stop);\n stop = \"\";\n }\n }\n return messageAsArray;\n }",
"public static byte[] extract_message(byte[] hash_message)\n {\n\tbyte[] plaintext = new byte[hash_message.length - HMAC_SHA1_LEN];\n\tSystem.arraycopy(hash_message, 0, plaintext, 0, plaintext.length);\n\n\treturn plaintext;\n }",
"public static ArrayList<ArrayList<Pair>> decodeMatrixPair (String message) throws JSONException\n {\n ArrayList<ArrayList<Pair>> list = new ArrayList<>();\n JSONArray matrix = new JSONArray(message);\n for (int i = 0; i < matrix.length(); i++)\n {\n JSONArray row = (JSONArray)matrix.get(i);\n list.add(decodeArrayPair(row));\n }\n return list;\n }",
"public JSONArray jsonArrayDecrypt(JSONArray a) throws JSONException {\n JSONArray returnArray = new JSONArray();\n\n for(int i = 0; i < a.length(); i++) {\n returnArray.put(this.jsonObjectDecrypt((JSONObject)a.get(i)));\n }\n\n return returnArray;\n }",
"public static void parseMessage(String json, Handler handler) throws InvalidProtocolBufferException {\n CommerceProtos.Message.Builder builder = CommerceProtos.Message.newBuilder();\n JsonFormat.parser().merge(json, builder);\n handleMessage(builder.build(), handler);\n }",
"protected Object extractMessage(Message message) {\n\t\tif (serializer != null) {\n\t\t\treturn serializer.deserialize(message.getBody());\n\t\t}\n\t\treturn message.getBody();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the type of Walker this is. | public final Type getWalkerType()
{
return walkerType;
} | [
"protected abstract Class<? extends TreeStructure> getTreeType();",
"public DrawerType getType() {\n\t\treturn mType;\n\t}",
"public TargetType getType();",
"public String type() {\n return getClass().getSimpleName();\n }",
"public DijkstraType getType()\n\t{\n\t\treturn binding != null ? binding.type : nodeType;\n\t}",
"public SixdmlXpathObjectType getType() {\n return this.type;\n }",
"public Class getFieldDeclarerType() {\n String type = getFieldDeclarerName();\n if (type == null)\n return null;\n return Strings.toClass(type, getClassLoader());\n }",
"public TypeManager getTypeManager() {\n return typeManager;\n }",
"public BuildingType getType() {\n\t\treturn buildingType;\n\t}",
"TypeManager getTypeManager();",
"public String treeType();",
"public com.openmdmremote.harbor.HRPCProto.Visitor.Type getType() {\n return type_;\n }",
"public final MinigameType getType() {\n return type;\n }",
"public com.openmdmremote.harbor.HRPCProto.Visitor.Type getType() {\n return type_;\n }",
"public TowerType getTower() {\n\t\treturn tower;\n\t}",
"static IType getType(ITextSelection textSelection) {\n IMember member = ActionDelegateHelper.getDefault().getCurrentMember(textSelection);\n IType type = null;\n if (member instanceof IType) {\n type = (IType) member;\n } else if (member != null) {\n type = member.getDeclaringType();\n }\n return type;\n }",
"MachineType getType();",
"public String getRelationType()\n\t{\n\t\tif (this instanceof SIFMiner)\n\t\t{\n\t\t\treturn ((SIFMiner) this).getSIFType().getTag();\n\t\t}\n\t\telse return null;\n\t}",
"public FeedType getType();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform the FVA optimization associated with FBA using the same SolverComponent | public void FVA( ArrayList< Double > objCoefs, Double objVal, ArrayList< Double > fbasoln, ArrayList< Double > min, ArrayList< Double > max, SolverComponent component ) throws Exception; | [
"private void optimize()\r\n\t{\r\n\t\tthis.alphaoptimize();\r\n\t\tthis.betaoptimize();\r\n\t}",
"private void refreshObjectiveFunction(boolean ... bUpdateBest) throws SolutionFoundException{\n //DO NOT DELETE THESE LINES\n //<<\n //totalEvals++;\n totalRefEvals += this.vals_.size();\n double prevRank;\n double curRank;\n double prevHardVios;\n double curHardVios;\n prevRank = this.getFitnessVal(0); //this.getRank();\n prevHardVios = this.getFitnessVal(1);\n //>>\n\n //TODO... Call your objective function here....\n //Start<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n try{\n if(externalData_ != null)\n externalData_.objectiveFnRefresh(satisfactions_, fitness_, vals_, valVsConstIdx_, tabuVios, false); \n\n else\n CCSPfns.objFn(1, vals_, fitness_, violations_, userInput_, CspProcess.maxCSPval);\n \n// totalHardVios = fitness_.get(1).intValue();\n\n boolean bupdate = true;\n if(bUpdateBest.length > 0){\n if(!bUpdateBest[0]){\n bupdate = false;\n }\n }\n \n \n if(this.isPartialSolution()){\n if(CspProcess.getBestSoFarCOP() != null && bupdate)\n if(this.isMorePromisingThanBestCOP()){\n CspProcess.setBestSoFarCOP((Chromosome)this.clone());\n }\n }else{\n if(CspProcess.getBestSoFarCSP() != null)\n if(this.isMorePromisingThanBestCSP()){\n CspProcess.setBestSoFarCSP((Chromosome)this.clone());\n }\n }\n \n }catch (SolutionFoundException sfe){\n CspProcess.setBestSoFarCOP((Chromosome)this.clone());\n throw sfe;\n }\n //End>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\n //DO NOT DELETE THESE LINES\n //<<\n curRank = this.getFitnessVal(0);//this.getRank();\n curHardVios = this.getFitnessVal(1);\n \n if(MyMath.roundN(curHardVios - prevHardVios, CspProcess.FIT_DP_LIMIT) < 0.0){\n noProgressCounter=0;\n goodnessAge++;\n }else if(MyMath.roundN(curHardVios - prevHardVios, CspProcess.FIT_DP_LIMIT) > 0.0){\n noProgressCounter++;\n }else{\n if(MyMath.roundN(curRank - prevRank, CspProcess.FIT_DP_LIMIT)>=0.0 ){ //worse or same => stagnant\n noProgressCounter++;\n }else{\n noProgressCounter=0;\n goodnessAge++;\n }\n }\n if(noProgressCounter == 0){ //improved...\n this.prevBest.update();\n }\n \n if(isStagnant(CspProcess.NO_PROGRESS_LIMIT)){\n goodnessAge = 0;\n }\n //>> \n }",
"private void update(double beta, double denom, int knew) {\n br.ufmg.labsoft.mutvariants.schematalib.SchemataLibMethods.listener.listen(\"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\");\n // XXX\n printMethod();\n final int n = currentBest.getDimension();\n final int npt = numberOfInterpolationPoints;\n final int nptm = AOR_minus(AOR_minus(npt, n, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78663, _mut78664, _mut78665, _mut78666), 1, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78667, _mut78668, _mut78669, _mut78670);\n // XXX Should probably be split into two arrays.\n final ArrayRealVector work = new ArrayRealVector(AOR_plus(npt, n, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78671, _mut78672, _mut78673, _mut78674));\n double ztest = ZERO;\n for (int k = 0; ROR_less(k, npt, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78680, _mut78681, _mut78682, _mut78683, _mut78684); k++) {\n br.ufmg.labsoft.mutvariants.schematalib.SchemataLibMethods.listener.listen(\"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\");\n for (int j = 0; ROR_less(j, nptm, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78675, _mut78676, _mut78677, _mut78678, _mut78679); j++) {\n br.ufmg.labsoft.mutvariants.schematalib.SchemataLibMethods.listener.listen(\"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\");\n // Computing MAX\n ztest = FastMath.max(ztest, FastMath.abs(zMatrix.getEntry(k, j)));\n }\n }\n ztest *= 1e-20;\n for (int j = 1; ROR_less(j, nptm, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78739, _mut78740, _mut78741, _mut78742, _mut78743); j++) {\n br.ufmg.labsoft.mutvariants.schematalib.SchemataLibMethods.listener.listen(\"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\");\n final double d1 = zMatrix.getEntry(knew, j);\n if (ROR_greater(FastMath.abs(d1), ztest, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78685, _mut78686, _mut78687, _mut78688, _mut78689)) {\n // Computing 2nd power\n final double d2 = zMatrix.getEntry(knew, 0);\n // Computing 2nd power\n final double d3 = zMatrix.getEntry(knew, j);\n final double d4 = FastMath.sqrt(AOR_plus(AOR_multiply(d2, d2, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78690, _mut78691, _mut78692, _mut78693), AOR_multiply(d3, d3, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78694, _mut78695, _mut78696, _mut78697), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78698, _mut78699, _mut78700, _mut78701));\n final double d5 = AOR_divide(zMatrix.getEntry(knew, 0), d4, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78702, _mut78703, _mut78704, _mut78705);\n final double d6 = AOR_divide(zMatrix.getEntry(knew, j), d4, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78706, _mut78707, _mut78708, _mut78709);\n for (int i = 0; ROR_less(i, npt, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78734, _mut78735, _mut78736, _mut78737, _mut78738); i++) {\n br.ufmg.labsoft.mutvariants.schematalib.SchemataLibMethods.listener.listen(\"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\");\n final double d7 = AOR_plus(AOR_multiply(d5, zMatrix.getEntry(i, 0), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78710, _mut78711, _mut78712, _mut78713), AOR_multiply(d6, zMatrix.getEntry(i, j), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78714, _mut78715, _mut78716, _mut78717), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78718, _mut78719, _mut78720, _mut78721);\n zMatrix.setEntry(i, j, AOR_minus(AOR_multiply(d5, zMatrix.getEntry(i, j), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78722, _mut78723, _mut78724, _mut78725), AOR_multiply(d6, zMatrix.getEntry(i, 0), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78726, _mut78727, _mut78728, _mut78729), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78730, _mut78731, _mut78732, _mut78733));\n zMatrix.setEntry(i, 0, d7);\n }\n }\n zMatrix.setEntry(knew, j, ZERO);\n }\n for (int i = 0; ROR_less(i, npt, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78748, _mut78749, _mut78750, _mut78751, _mut78752); i++) {\n br.ufmg.labsoft.mutvariants.schematalib.SchemataLibMethods.listener.listen(\"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\");\n work.setEntry(i, AOR_multiply(zMatrix.getEntry(knew, 0), zMatrix.getEntry(i, 0), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78744, _mut78745, _mut78746, _mut78747));\n }\n final double alpha = work.getEntry(knew);\n final double tau = lagrangeValuesAtNewPoint.getEntry(knew);\n lagrangeValuesAtNewPoint.setEntry(knew, AOR_minus(lagrangeValuesAtNewPoint.getEntry(knew), ONE, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78753, _mut78754, _mut78755, _mut78756));\n final double sqrtDenom = FastMath.sqrt(denom);\n final double d1 = AOR_divide(tau, sqrtDenom, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78757, _mut78758, _mut78759, _mut78760);\n final double d2 = AOR_divide(zMatrix.getEntry(knew, 0), sqrtDenom, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78761, _mut78762, _mut78763, _mut78764);\n for (int i = 0; ROR_less(i, npt, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78777, _mut78778, _mut78779, _mut78780, _mut78781); i++) {\n br.ufmg.labsoft.mutvariants.schematalib.SchemataLibMethods.listener.listen(\"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\");\n zMatrix.setEntry(i, 0, AOR_minus(AOR_multiply(d1, zMatrix.getEntry(i, 0), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78765, _mut78766, _mut78767, _mut78768), AOR_multiply(d2, lagrangeValuesAtNewPoint.getEntry(i), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78769, _mut78770, _mut78771, _mut78772), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78773, _mut78774, _mut78775, _mut78776));\n }\n for (int j = 0; ROR_less(j, n, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78848, _mut78849, _mut78850, _mut78851, _mut78852); j++) {\n br.ufmg.labsoft.mutvariants.schematalib.SchemataLibMethods.listener.listen(\"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\");\n final int jp = AOR_plus(npt, j, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78782, _mut78783, _mut78784, _mut78785);\n work.setEntry(jp, bMatrix.getEntry(knew, j));\n final double d3 = AOR_divide((AOR_minus(AOR_multiply(alpha, lagrangeValuesAtNewPoint.getEntry(jp), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78786, _mut78787, _mut78788, _mut78789), AOR_multiply(tau, work.getEntry(jp), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78790, _mut78791, _mut78792, _mut78793), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78794, _mut78795, _mut78796, _mut78797)), denom, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78798, _mut78799, _mut78800, _mut78801);\n final double d4 = AOR_divide((AOR_minus(AOR_multiply(-beta, work.getEntry(jp), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78802, _mut78803, _mut78804, _mut78805), AOR_multiply(tau, lagrangeValuesAtNewPoint.getEntry(jp), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78806, _mut78807, _mut78808, _mut78809), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78810, _mut78811, _mut78812, _mut78813)), denom, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78814, _mut78815, _mut78816, _mut78817);\n for (int i = 0; ROR_less_equals(i, jp, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78843, _mut78844, _mut78845, _mut78846, _mut78847); i++) {\n br.ufmg.labsoft.mutvariants.schematalib.SchemataLibMethods.listener.listen(\"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\");\n bMatrix.setEntry(i, j, AOR_plus(AOR_plus(bMatrix.getEntry(i, j), AOR_multiply(d3, lagrangeValuesAtNewPoint.getEntry(i), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78818, _mut78819, _mut78820, _mut78821), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78822, _mut78823, _mut78824, _mut78825), AOR_multiply(d4, work.getEntry(i), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78826, _mut78827, _mut78828, _mut78829), \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78830, _mut78831, _mut78832, _mut78833));\n if (ROR_greater_equals(i, npt, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78834, _mut78835, _mut78836, _mut78837, _mut78838)) {\n bMatrix.setEntry(jp, (AOR_minus(i, npt, \"org.apache.commons.math3.optimization.direct.BOBYQAOptimizer.update_2305\", _mut78839, _mut78840, _mut78841, _mut78842)), bMatrix.getEntry(i, j));\n }\n }\n }\n }",
"public void setfvec() {\n for (int i = 0; i < numberOfComponents; i++) {\n fvec.set(i, 0,\n u.get(i, 0) + Math.log(system.getPhases()[1].getComponents()[i].getFugacityCoefficient()\n / system.getPhases()[0].getComponents()[i].getFugacityCoefficient()));\n }\n\n double fsum = 0.0;\n for (int i = 0; i < numberOfComponents; i++) {\n fsum = fsum + system.getPhases()[1].getComponents()[i].getx()\n - system.getPhases()[0].getComponents()[i].getx();\n }\n fvec.set(numberOfComponents, 0, fsum);\n // fvec.print(0,20);\n }",
"public int perform_LMVM() {\n if (_inequality_width > 0) {\n int nvars = _fb.Size() * 2;\n double[] x = new double[nvars];\n \n // INITIAL POINT\n for (int i = 0; i < nvars / 2; i++) {\n x[i] = _va.get(i);\n x[i + _fb.Size()] = _vb.get(i);\n }\n \n // int info = BLMVMSolve(x, nvars);\n \n for (int i = 0; i < nvars / 2; i++) {\n _va.set(i, x[i]);\n _vb.set(i, x[i + _fb.Size()]);\n _vl.set(i, _va.get(i) - _vb.get(i));\n }\n \n return 0;\n } else {\n \n int nvars = _fb.Size();\n double[] x = new double[nvars];\n \n // INITIAL POINT\n for (int i = 0; i < nvars; i++) {\n x[i] = _vl.get(i);\n }\n \n // int info = BLMVMSolve(x, nvars);\n \n for (int i = 0; i < nvars; i++) {\n _vl.set(i, x[i]);\n }\n \n return 0;\n }\n }",
"public interface FOVSolver {\n\n /**\n * Calculates the Field Of View for the provided map from the given x, y\n * coordinates. Returns a lightmap for a result where the values represent a\n * percentage of fully lit.\n *\n * In general a value equal to or below 0 means that cell is not in the\n * field of view, whereas a value equal to or above 1 means that cell is\n * fully in the field of view.\n *\n * Note that values below 0 and above 1 may be returned in certain\n * circumstances. In these cases it is up to the calling class to determine\n * how to treat such values.\n *\n * The starting point for the calculations is considered to be at the center\n * of the origin cell. Radius determinations are determined by the provided\n * BasicRadiusStrategy.\n *\n * @param resistanceMap the grid of cells to calculate on\n * @param startx the horizontal component of the starting location\n * @param starty the vertical component of the starting location\n * @param force the power of the ray\n * @param decay how much the light is reduced for each whole integer step in\n * distance\n * @param radiusStrategy provides a means to calculate the radius as desired\n * @return the computed light grid\n */\n public float[][] calculateFOV(float[][] resistanceMap, int startx, int starty, float force, float decay, RadiusStrategy radiusStrategy);\n\n /**\n * Calculates the Field of View in the same manner as the version with more\n * parameters.\n *\n * Light will extend to the radius value. Uses the implementation's default\n * radius strategy.\n *\n * @param resistanceMap the grid of cells to calculate on\n * @param startx\n * @param starty\n * @param radius\n * @return\n */\n public float[][] calculateFOV(float[][] resistanceMap, int startx, int starty, float radius);\n}",
"public void fitPSF( int flag) {\n run =true;\n // FIXME set a best X\n DoubleShapedVector x = null;\n double best_cost = Double.POSITIVE_INFINITY;\n // Check input data and get dimensions.\n if (data == null) {\n fatal(\"Input data not specified.\");\n }\n\n\n x = pupil.parameterCoefs[flag];\n\n\n\n Shape dataShape = data.getShape();\n int rank = data.getRank();\n ShapedVectorSpace dataSpace, objSpace;\n\n DoubleShapedVector best_x = x.clone();\n // Check the PSF.\n if (obj == null) {\n fatal(\"Object not specified.\");\n }\n if (obj.getRank() != rank) {\n fatal(\"Obj must have same rank as data.\");\n }\n\n if(single){\n dataSpace = new FloatShapedVectorSpace(dataShape);\n objSpace = new FloatShapedVectorSpace(dataShape);\n }else{\n dataSpace = new DoubleShapedVectorSpace(dataShape);\n objSpace = new DoubleShapedVectorSpace(dataShape);\n }\n\n // Initialize a vector space and populate it with workspace vectors.\n\n DoubleShapedVectorSpace variableSpace = x.getSpace();\n int[] off ={0,0, 0};\n // Build convolution operator.\n WeightedConvolutionCost fdata = WeightedConvolutionCost.build(objSpace, dataSpace);\n fdata.setPSF(obj,off);\n fdata.setData(data);\n fdata.setWeights(weights,true);\n\n if (debug) {\n System.out.println(\"Vector space initialization complete.\");\n }\n\n gcost = objSpace.create();\n fcost = fdata.computeCostAndGradient(1.0, objSpace.create(pupil.getPsf() ), gcost, true);\n best_cost = fcost;\n best_x = x.clone();\n\n if (debug) {\n System.out.println(\"Cost function initialization complete.\");\n }\n\n // Initialize the non linear conjugate gradient\n LineSearch lineSearch = null;\n VMLMB vmlmb = null;\n BoundProjector projector = null;\n int bounded = 0;\n limitedMemorySize = 0;\n\n if (lowerBound != Double.NEGATIVE_INFINITY) {\n bounded |= 1;\n }\n if (upperBound != Double.POSITIVE_INFINITY) {\n bounded |= 2;\n }\n\n\n if (debug) {\n System.out.println(\"bounded\");\n System.out.println(bounded);\n }\n\n /* No bounds have been specified. */\n lineSearch = new MoreThuenteLineSearch(0.05, 0.1, 1E-17);\n\n int m = (limitedMemorySize > 1 ? limitedMemorySize : 5);\n vmlmb = new VMLMB(variableSpace, projector, m, lineSearch);\n vmlmb.setAbsoluteTolerance(gatol);\n vmlmb.setRelativeTolerance(grtol);\n minimizer = vmlmb;\n\n if (debug) {\n System.out.println(\"Optimization method initialization complete.\");\n }\n\n DoubleShapedVector gX = variableSpace.create();\n OptimTask task = minimizer.start();\n while (run) {\n if (task == OptimTask.COMPUTE_FG) {\n pupil.setParam(x);\n\n pupil.computePsf();\n\n fcost = fdata.computeCostAndGradient(1.0, objSpace.create(pupil.getPsf()), gcost, true);\n\n if(fcost<best_cost){\n best_cost = fcost;\n best_x = x.clone();\n\n\n if(debug){\n System.out.println(\"Cost: \" + best_cost);\n }\n }\n gX = pupil.apply_Jacobian(gcost,x.getSpace());\n\n } else if (task == OptimTask.NEW_X || task == OptimTask.FINAL_X) {\n boolean stop = (task == OptimTask.FINAL_X);\n if (! stop && maxiter >= 0 && minimizer.getIterations() >= maxiter) {\n if (debug){\n System.out.format(\"Warning: too many iterations (%d).\\n\", maxiter);\n }\n stop = true;\n }\n if (stop) {\n break;\n }\n } else {\n if (debug){\n System.out.println(\"TiPi: PSF_Estimation, \"+task+\" : \"+minimizer.getReason());\n }\n break;\n }\n if (debug) {\n System.out.println(\"Evaluations\");\n System.out.println(minimizer.getEvaluations());\n System.out.println(\"Iterations\");\n System.out.println(minimizer.getIterations());\n }\n\n if (minimizer.getEvaluations() >= maxeval) {\n if( debug){\n System.out.format(\"Warning: too many evaluation (%d).\\n\", maxeval);\n }\n break;\n }\n task = minimizer.iterate(x, fcost, gX);\n\n }\n\n\n pupil.setParam(best_x);\n\n }",
"void update(){ \n if(!isPartialSolution()){\n return;\n }\n prevBestFit = getFitnessVal(0);\n gen = CspProcess.curGen; \n \n if(allTimeBest == null || getFitnessVal(0)<allTimeBest){\n allTimeBest = getFitnessVal(0);\n }\n }",
"private void computeSolution() {\n // TODO: add solver parameters as argument\n int maxIterations = 10000;\n double diff_max = 10000;\n double criteriaIndividual = 0.0001;\n double criteriaTotal = 0.001;\n\n\n\n if (verbose) {\n System.out.println(\"Parameters for solver are:\");\n System.out.println(\" - relative individual increment = \" + criteriaIndividual);\n System.out.println(\" - relative total increment = \" + criteriaTotal);\n System.out.println(\" - max iterations = \" + maxIterations);\n System.out.print(\"Started solver iterations...\");\n\n }\n\n // iteration counter\n int iteration = 0;\n double total_diff = 10000;\n\n // Iterative procedure. Two stopping criterion are used:\n // - maximum number of iterations\n // - improvement compared to the previous solution\n while ( (!(diff_max < criteriaIndividual) || !(total_diff < criteriaTotal)) && iteration <= maxIterations ) {\n\n // increment counter\n iteration++;\n\n // update travel times based on current solution\n updateTravelTimes(flowSolution);\n\n // assign flows based on updated travel times\n double[] y = assignFlows();\n\n // Unidimensional search by Golden Section method\n double[] newSolution = GoldenSection.getNewFlow(flowSolution, y, linkIDList, linkMap, nodeIDList);\n\n // check for convergence\n diff_max = 0.0;\n total_diff = 0.0;\n //System.out.println(\"Printing improvements\");\n for (int a = 0; a < L; a++) {\n double diff = 0;\n //System.out.println(newSolution[a] + \", \" + flowSolution[a]);\n if (flowSolution[a] == 0) {\n diff = Math.abs(newSolution[a] - flowSolution[a]);\n } else {\n diff = Math.abs((newSolution[a] - flowSolution[a]) / flowSolution[a]);\n }//if\n //System.out.println(diff + \", \" + total_diff);\n\n total_diff = total_diff + diff;\n if (diff > diff_max) {\n diff_max = diff;\n }\n }\n\n //update solution\n flowSolution = newSolution;\n }// while\n\n if (verbose) {\n System.out.print(\" done ! \\nFinished iterating\");\n System.out.println(\" - number of iterations: \" + String.valueOf(iteration));\n System.out.println(\" - final total improvement: \" + String.valueOf(total_diff));\n }\n }",
"public interface Runge_Kutta_Method extends Solver {\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FEMSettingsPAK.owl#hasArgumentFunctionPair\r\n */\r\n \r\n /**\r\n * Gets all property values for the hasArgumentFunctionPair property.<p>\r\n * \r\n * @returns a collection of values for the hasArgumentFunctionPair property.\r\n */\r\n Collection<? extends ArgumentFunctionPair> getHasArgumentFunctionPair();\r\n\r\n /**\r\n * Checks if the class has a hasArgumentFunctionPair property value.<p>\r\n * \r\n * @return true if there is a hasArgumentFunctionPair property value.\r\n */\r\n boolean hasHasArgumentFunctionPair();\r\n\r\n /**\r\n * Adds a hasArgumentFunctionPair property value.<p>\r\n * \r\n * @param newHasArgumentFunctionPair the hasArgumentFunctionPair property value to be added\r\n */\r\n void addHasArgumentFunctionPair(ArgumentFunctionPair newHasArgumentFunctionPair);\r\n\r\n /**\r\n * Removes a hasArgumentFunctionPair property value.<p>\r\n * \r\n * @param oldHasArgumentFunctionPair the hasArgumentFunctionPair property value to be removed.\r\n */\r\n void removeHasArgumentFunctionPair(ArgumentFunctionPair oldHasArgumentFunctionPair);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FEMSettingsPAK.owl#hasSolverSettings\r\n */\r\n \r\n /**\r\n * Gets all property values for the hasSolverSettings property.<p>\r\n * \r\n * @returns a collection of values for the hasSolverSettings property.\r\n */\r\n Collection<? extends SolverSettings> getHasSolverSettings();\r\n\r\n /**\r\n * Checks if the class has a hasSolverSettings property value.<p>\r\n * \r\n * @return true if there is a hasSolverSettings property value.\r\n */\r\n boolean hasHasSolverSettings();\r\n\r\n /**\r\n * Adds a hasSolverSettings property value.<p>\r\n * \r\n * @param newHasSolverSettings the hasSolverSettings property value to be added\r\n */\r\n void addHasSolverSettings(SolverSettings newHasSolverSettings);\r\n\r\n /**\r\n * Removes a hasSolverSettings property value.<p>\r\n * \r\n * @param oldHasSolverSettings the hasSolverSettings property value to be removed.\r\n */\r\n void removeHasSolverSettings(SolverSettings oldHasSolverSettings);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#appliedSolverHasInput\r\n */\r\n \r\n /**\r\n * Gets all property values for the appliedSolverHasInput property.<p>\r\n * \r\n * @returns a collection of values for the appliedSolverHasInput property.\r\n */\r\n Collection<? extends Physical_Attribute> getAppliedSolverHasInput();\r\n\r\n /**\r\n * Checks if the class has a appliedSolverHasInput property value.<p>\r\n * \r\n * @return true if there is a appliedSolverHasInput property value.\r\n */\r\n boolean hasAppliedSolverHasInput();\r\n\r\n /**\r\n * Adds a appliedSolverHasInput property value.<p>\r\n * \r\n * @param newAppliedSolverHasInput the appliedSolverHasInput property value to be added\r\n */\r\n void addAppliedSolverHasInput(Physical_Attribute newAppliedSolverHasInput);\r\n\r\n /**\r\n * Removes a appliedSolverHasInput property value.<p>\r\n * \r\n * @param oldAppliedSolverHasInput the appliedSolverHasInput property value to be removed.\r\n */\r\n void removeAppliedSolverHasInput(Physical_Attribute oldAppliedSolverHasInput);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#hasInitialCondition\r\n */\r\n \r\n /**\r\n * Gets all property values for the hasInitialCondition property.<p>\r\n * \r\n * @returns a collection of values for the hasInitialCondition property.\r\n */\r\n Collection<? extends Initial_Condition> getHasInitialCondition();\r\n\r\n /**\r\n * Checks if the class has a hasInitialCondition property value.<p>\r\n * \r\n * @return true if there is a hasInitialCondition property value.\r\n */\r\n boolean hasHasInitialCondition();\r\n\r\n /**\r\n * Adds a hasInitialCondition property value.<p>\r\n * \r\n * @param newHasInitialCondition the hasInitialCondition property value to be added\r\n */\r\n void addHasInitialCondition(Initial_Condition newHasInitialCondition);\r\n\r\n /**\r\n * Removes a hasInitialCondition property value.<p>\r\n * \r\n * @param oldHasInitialCondition the hasInitialCondition property value to be removed.\r\n */\r\n void removeHasInitialCondition(Initial_Condition oldHasInitialCondition);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#isSolverOf\r\n */\r\n \r\n /**\r\n * Gets all property values for the isSolverOf property.<p>\r\n * \r\n * @returns a collection of values for the isSolverOf property.\r\n */\r\n Collection<? extends WrappedIndividual> getIsSolverOf();\r\n\r\n /**\r\n * Checks if the class has a isSolverOf property value.<p>\r\n * \r\n * @return true if there is a isSolverOf property value.\r\n */\r\n boolean hasIsSolverOf();\r\n\r\n /**\r\n * Adds a isSolverOf property value.<p>\r\n * \r\n * @param newIsSolverOf the isSolverOf property value to be added\r\n */\r\n void addIsSolverOf(WrappedIndividual newIsSolverOf);\r\n\r\n /**\r\n * Removes a isSolverOf property value.<p>\r\n * \r\n * @param oldIsSolverOf the isSolverOf property value to be removed.\r\n */\r\n void removeIsSolverOf(WrappedIndividual oldIsSolverOf);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#usesMaterialProperty\r\n */\r\n \r\n /**\r\n * Gets all property values for the usesMaterialProperty property.<p>\r\n * \r\n * @returns a collection of values for the usesMaterialProperty property.\r\n */\r\n Collection<? extends Material_Property> getUsesMaterialProperty();\r\n\r\n /**\r\n * Checks if the class has a usesMaterialProperty property value.<p>\r\n * \r\n * @return true if there is a usesMaterialProperty property value.\r\n */\r\n boolean hasUsesMaterialProperty();\r\n\r\n /**\r\n * Adds a usesMaterialProperty property value.<p>\r\n * \r\n * @param newUsesMaterialProperty the usesMaterialProperty property value to be added\r\n */\r\n void addUsesMaterialProperty(Material_Property newUsesMaterialProperty);\r\n\r\n /**\r\n * Removes a usesMaterialProperty property value.<p>\r\n * \r\n * @param oldUsesMaterialProperty the usesMaterialProperty property value to be removed.\r\n */\r\n void removeUsesMaterialProperty(Material_Property oldUsesMaterialProperty);\r\n\r\n\r\n /* ***************************************************\r\n * Common interfaces\r\n */\r\n\r\n OWLNamedIndividual getOwlIndividual();\r\n\r\n OWLOntology getOwlOntology();\r\n\r\n void delete();\r\n\r\n}",
"abstract public void updatePositionsAfterBetaReduction();",
"public void solve() {\r\n\t\tOptimizationStatus status;\r\n\t\tdo {\r\n\t\t\tstatus = iterate();\r\n\t\t} while (status == RUNNING);\r\n\t}",
"@Override\n\tpublic int optimize() throws Exception {\n\t\tlog.info(\"optimize\");\n\t\t\n\t\tLPOptimizationRequest lpRequest = getLPOptimizationRequest();\n\t\tif(log.isDebugEnabled() && lpRequest.isDumpProblem()){\n\t\t\tlog.debug(\"LP problem: \" + lpRequest.toString());\n\t\t}\n\t\t\n\t\t//standard form conversion\n\t\tLPStandardConverter lpConverter = new LPStandardConverter();//the slack variables will have default unboundedUBValue\n\t\t\n\t\tlpConverter.toStandardForm(getC(), getG(), getH(), getA(), getB(), getLb(), getUb());\n\t\tint nOfSlackVariables = lpConverter.getStandardS();\n\t\tlog.debug(\"nOfSlackVariables: \" + nOfSlackVariables);\n\t\tDoubleMatrix1D standardC = lpConverter.getStandardC();\n\t\tDoubleMatrix2D standardA = lpConverter.getStandardA();\n\t\tDoubleMatrix1D standardB = lpConverter.getStandardB();\n\t\tDoubleMatrix1D standardLb = lpConverter.getStandardLB();\n\t\tDoubleMatrix1D standardUb = lpConverter.getStandardUB();\n\t\t\n\t\t//solve the standard form problem\n\t\tLPOptimizationRequest standardLPRequest = lpRequest.cloneMe();\n\t\tstandardLPRequest.setC(standardC);\n\t\tstandardLPRequest.setA(standardA);\n\t\tstandardLPRequest.setB(standardB);\n\t\tstandardLPRequest.setLb(ColtUtils.replaceValues(standardLb, lpConverter.getUnboundedLBValue(), minLBValue));//substitute not-double numbers\n\t\tstandardLPRequest.setUb(ColtUtils.replaceValues(standardUb, lpConverter.getUnboundedUBValue(), maxUBValue));//substitute not-double numbers\n\t\tif(getInitialPoint()!=null){\n\t\t\tstandardLPRequest.setInitialPoint(lpConverter.getStandardComponents(getInitialPoint().toArray()));\n\t\t}\n\t\tif(getNotFeasibleInitialPoint()!=null){\n\t\t\tstandardLPRequest.setNotFeasibleInitialPoint(lpConverter.getStandardComponents(getNotFeasibleInitialPoint().toArray()));\n\t\t}\n\t\t\n\t\t//optimization\n\t\tLPPrimalDualMethod opt = new LPPrimalDualMethod(minLBValue, maxUBValue);\n\t\topt.setLPOptimizationRequest(standardLPRequest);\n\t\t//System.out.println(opt.optimizeStandardLP(nOfSlackVariables) );\n\t\t//System.out.println(OptimizationResponse.FAILED);\n\t\tif(opt.optimizeStandardLP(nOfSlackVariables) == OptimizationResponse.FAILED){\n\t\t\n\t\t\treturn OptimizationResponse.FAILED;\n\t\t}\n\t\t\n\t\t//back to original form\n\t\tLPOptimizationResponse lpResponse = opt.getLPOptimizationResponse();\n\t\tdouble[] standardSolution = lpResponse.getSolution();\n\t\tdouble[] originalSol = lpConverter.postConvert(standardSolution);\n\t\tlpResponse.setSolution(originalSol);\n\t\tsetLPOptimizationResponse(lpResponse);\n\t\treturn lpResponse.getReturnCode();\n\t}",
"public void solveSA() {\r\n initState();\r\n for (int ab = 0; ab < Config.NumberOfMetropolisResets; ab++) {\r\n LogTool.print(\"==================== INACTIVE: START CALC FOR OUTER ROUND \" + ab + \"=========================\",\"notification\");\r\n\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\");\r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n setCur_cost(costCURsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"CUR COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n /* [Newstate] with random dwelltimes */\r\n New_state = newstater(); \r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW STATE \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n// newstater();\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New State before Metropolis: A)\" + New_state[0] + \" B) \" + New_state[1] + \" C) \" + New_state[2],\"notification\");\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New Cost : \" + New_cost,\"notification\");\r\n }\r\n\r\n /**\r\n * MetropolisLoop\r\n * @param Config.NumberOfMetropolisRounds\r\n */\r\n\r\n for(int x=0;x<Config.NumberOfMetropolisRounds;x++) { \r\n LogTool.print(\"SolveSA Iteration \" + x + \" Curcost \" + Cur_cost + \" Newcost \" + New_cost,\"notification\");\r\n if ((Cur_cost - New_cost)>0) { // ? die Kosten\r\n \r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 START\",\"notification\");\r\n }\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA Cost delta \" + (Cur_cost - New_cost) + \" \",\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C1 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 STOP \",\"notification\");\r\n }\r\n } else if (Math.exp(-(New_cost - Cur_cost)/temperature)> RandGenerator.randDouble(0.01, 0.99)) {\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 START: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 before set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 STOP: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n } else {\r\n New_state = newstater();\r\n }\r\n temperature = temperature-1;\r\n if (temperature==0) {\r\n break;\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal());\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n//</editor-fold>\r\n if ((x==58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n if ((Cur_cost - New_cost)>0) {\r\n Cur_state = New_state;\r\n Cur_cost = New_cost; \r\n }\r\n }\r\n if ((x>58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n }\r\n }\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"Auskommentierter GLowestState Object Class\">\r\n// if (ab==9) {\r\n// double diff=0;\r\n// }\r\n \r\n // Hier wird kontrolliert, ob das minimalergebnis des aktuellen\r\n // Metropolisloops kleiner ist als das bsiher kleinste\r\n \r\n// if (Cur_cost<Global_lowest_cost) {\r\n// this.setGlobal_lowest_cost(Cur_cost);\r\n// GlobalState GLowestState = new GlobalState(this.Cur_state);\r\n// String rGLSOvalue = GLowestState.getGlobal_Lowest_state_string();\r\n// LogTool.print(\"GLS DEDICATED OBJECT STATE OUTPUT -- \" + GLowestState.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(GLowestState.getDwelltimes());\r\n // LogTool.print(\"READ FROM OBJECT OUTPUT -- \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// LogTool.print(\"DEBUG: CurCost direct : \" + this.getCur_cost(),\"notification\"); \r\n// LogTool.print(\"Debug: Cur<global CurState get : \" + this.getCur_state_string(),\"notification\");\r\n// LogTool.print(\"Debug: Cur<global GLS get : \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(this.getCur_state(Cur_state));\r\n// LogTool.print(\"Debug: Cur<global GLS get after set : \" + this.getGlobal_Lowest_state_string(),\"notification\"); \r\n// }\r\n //</editor-fold>\r\n LogTool.print(\"SolveSA: Outer Iteration : \" + ab,\"notification\");\r\n LogTool.print(\"SolveSA: Last Calculated New State/Possible state inner loop (i.e. 99) : \" + this.getNew_state_string(),\"notification\");\r\n// LogTool.print(\"SolveSA: Best Solution : \" + this.getCur_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: GLS after all loops: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: LastNewCost, unchecked : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: CurCost : \" + this.getCur_cost() + \"i.e. lowest State of this round\",\"notification\"); \r\n }\r\n // return GLowestState;\r\n }",
"@Override\n public boolean run() {\n Model model = makeModel();\n \n Set<SatConstraint> constraints = new HashSet<>();\n //We allow memory over-commitment with a overbooking ratio of 50%\n //i.e. 1MB physical RAM for 1.5MB virtual RAM\n constraints.add(new Overbook(model.getMapping().getAllNodes(), \"mem\", 1.5));\n \n /**\n * On 10 nodes, 4 of the 6 hosted VMs ask now for a 4GB bandwidth\n */\n for (int i = 0; i < 5; i++) {\n Node n = nodes.get(i);\n Set<VM> vmsOnN = model.getMapping().getRunningVMs(n);\n Iterator<VM> ite = vmsOnN.iterator();\n for (int j = 0; ite.hasNext() && j < 4; j++) {\n VM v = ite.next();\n constraints.add(new Preserve(Collections.singleton(v), \"bandwidth\", 4));\n }\n }\n \n ChocoReconfigurationAlgorithm cra = new DefaultChocoReconfigurationAlgorithm();\n \n //Customize the estimated duration of actions\n cra.getDurationEvaluators().register(MigrateVM.class, new LinearToAResourceActionDuration<VM>(\"mem\", 1, 3));\n \n //We want the best possible solution, computed in up to 5 sec.\n cra.doOptimize(true);\n cra.setTimeLimit(5);\n \n //We solve without the repair mode\n cra.doRepair(false);\n solve(cra, model, constraints);\n \n //Re-solve using the repair mode to check for the improvement\n cra.doRepair(true);\n solve(cra, model, constraints);\n return true;\n }",
"@Override\n protected void doAlgorithmA1() {\n int xP = 0;\n int yP = 0;\n\n\n //Taking the variable out of the list that are in the bounds\n //Testing that the bound has variables\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n xP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX().getPosition();\n }\n int xU = 0;\n int xL = 0;\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n yP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY().getPosition();\n }\n int yU = 0;\n int yL = 0;\n int cright = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCright();\n int cleft = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCleft();\n\n\n\n for (Variable variable : csp.getVars()) {\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n if (variable.getPosition() == xP) {\n xU = variable.getUpperDomainBound();\n xL = variable.getLowerDomainBound();\n }\n }\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n if (variable.getPosition() == yP) {\n yU = variable.getUpperDomainBound();\n yL = variable.getLowerDomainBound();\n }\n }\n }\n\n boolean first = false;\n boolean second = false;\n\n //Testing if the bound is true, false or inconclusive\n\n if (xL + cleft >= yU + cright) {\n first = true;\n }\n if (xU + cleft < yL + cright) {\n second = true;\n }\n\n //are first and second not equal is the bound not inconclusive\n if (first != second) {\n if (first) { //a true Simple Bound was found\n //checks if it was the last constraint in a csp\n //If so the csp is true\n //else check the next constraint and do this method again\n if (csp.getSimpleConstraints().size() - 1 == cIndex) {\n System.out.println(\"P is satisfiable\");\n System.out.println(System.nanoTime()-startTime);\n return;\n } else {\n bIndex = 0;\n cIndex++;\n unit=false;\n doAlgorithmA1();\n }\n } else if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) { //a false Simple Bound was found\n //\n bIndex = 0;\n cIndex = 0;\n if (isInconclusive) {\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n doAlgorithmA2();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n } else {//an inconclusive Simple Bound was found\n //checks if the bound wasn't already inconclusive\n if(!isInconclusive){\n unit=true;\n unitSB = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex);\n }else {\n unit=false;\n }\n isInconclusive = true;\n\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) {\n cIndex = 0;\n bIndex = 0;\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n }\n }",
"public void applyForce(PVector f)\n {\n // System.out.println(f.x +\" \" + f.y);\n accelaration.add(f.div(mass));\n }",
"@Override\r\n public void computeDensityEstimator() {\r\n // Compute scalarization values\r\n this.scalWrapper.execute(solutions());\r\n scaleToPositive();\r\n\r\n // Distance matrix\r\n double[][] distanceMatrix;\r\n if (normalizeObjectives) {\r\n FrontNormalizer normalizer = new FrontNormalizer(solutions());\r\n distanceMatrix = SolutionListUtils.distanceMatrix(normalizer.normalize(solutions()));\r\n } else\r\n distanceMatrix = SolutionListUtils.distanceMatrix(solutions());\r\n\r\n // Set fitness based on replacement strategy\r\n double[] energyVector = energyVector(distanceMatrix);\r\n double[] replacementVector = replacementVector(distanceMatrix);\r\n // Flag for memorizing whether solution can improve archive\r\n boolean eligible = false;\r\n for (int i = 0; i < replacementVector.length; i++) {\r\n // New solution is better than incumbent\r\n if (replacementVector[i] < energyVector[i]) {\r\n eligible = true;\r\n switch (replacementStrategy) {\r\n case BEST_FEASIBLE_POSITION:\r\n // Energy decrease is maximal if replacement energy is\r\n // minimized. This is why the the negated entry in\r\n // replacementVector is the corresponding fitness.\r\n fitness.setAttribute(archive.get(i), -replacementVector[i]);\r\n break;\r\n case LARGEST_DIFFERENCE:\r\n fitness.setAttribute(archive.get(i), energyVector[i]);\r\n break;\r\n case WORST_IN_ARCHIVE:\r\n fitness.setAttribute(archive.get(i), energyVector[i] - replacementVector[i]);\r\n break;\r\n }\r\n } else {\r\n // If archive member is not eligible for replacement, make sure\r\n // it is retained in any case.\r\n archive.get(i).attributes().put(fitness.getAttributeIdentifier(), -Double.MAX_VALUE);\r\n }\r\n if (eligible) {\r\n // New solution is always retained\r\n fitness.setAttribute(archive.get(maxSize), -Double.MAX_VALUE);\r\n } else {\r\n // New solution is rejected in any case\r\n fitness.setAttribute(archive.get(maxSize), Double.MAX_VALUE);\r\n }\r\n }\r\n }",
"public abstract double evaluer(SolutionPartielle s);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build call for getP2POrderMessageAttachmentURL | public com.squareup.okhttp.Call getP2POrderMessageAttachmentURLCall(Long id, Long fileId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/order/chat/{id}/{fileId}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
.replaceAll("\\{" + "fileId" + "\\}", apiClient.escapeString(fileId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
} | [
"protected String makeUrl() {\n\n String result = \"https://api.vk.com/method/\" + this.method + \"?\";\n\n Iterator it = this.params.entrySet().iterator();\n\n while (it.hasNext()) {\n Map.Entry item = (Map.Entry) it.next();\n result += item.getKey() + \"=\" + item.getValue() + \"&\";\n }\n\n result += \"access_token=\" + this.token;\n\n return result;\n\n }",
"private String buildUrl( String methodPath, CPath path )\n {\n StringBuilder sb = new StringBuilder();\n\n sb.append( END_POINT ).append( '/' ).append( methodPath );\n\n if ( path != null ) {\n sb.append( '/' ).append( scope ).append( path.getUrlEncoded() );\n }\n\n return sb.toString();\n }",
"public String getAttachmentURL(String name){\n String fURL = \"\";\n if(context.getDoc().getAttachmentList().size() > 0){\n String fname = ((XWikiAttachment)context.getDoc().getAttachment(name)).getFilename();\n fURL = context.getDoc().getAttachmentURL(fname, ImageLibStrings.XWIKI_URL_DOWNLOAD,\n context);\n }\n return fURL;\n }",
"com.google.protobuf.ByteString getAttachment();",
"public String getImageAttachmentURL() {\n return getStringAttributeAtIndex(AttachmentAttributeImage);\n }",
"private TakePhotoS2ReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"protected String createQueryString() {\r\n\t\tassert !this.hasBinaryAttachments;\r\n\t\t\r\n\t\tif (this.params.isEmpty())\r\n\t\t\treturn \"\";\r\n\t\t\r\n\t\tStringBuilder bld = null;\r\n\t\t\r\n\t\tfor (Map.Entry<String, Object> param: this.params.entrySet()) {\r\n\t\t\tif (bld == null)\r\n\t\t\t\tbld = new StringBuilder();\r\n\t\t\telse\r\n\t\t\t\tbld.append('&');\r\n\t\t\t\r\n\t\t\tbld.append(StringUtils.urlEncode(param.getKey()));\r\n\t\t\tbld.append('=');\r\n\t\t\tbld.append(StringUtils.urlEncode(param.getValue().toString()));\r\n\t\t}\r\n\t\t\r\n\t\treturn bld.toString();\r\n\t}",
"String build() {\n String error;\n StringBuilder authUrl = new StringBuilder();\n authUrl.append(\"http://\");\n try {\n authUrl.append(jcrService.getCurrentRepository().getConfiguration().getName());\n error = null;\n } catch (RepositoryException e) {\n LOG.warn(\"Error getting Current Repository for repository based auth url of eXo Drive: \" + e.getMessage(), e);\n error = \"Current Repository not set.\";\n }\n authUrl.append('/');\n authUrl.append(getConnectorHost());\n authUrl.append(\"/portal/rest/clouddrive/connect/\");\n authUrl.append(getProviderId());\n\n // query string\n authUrl.append('?');\n if (error == null) {\n authUrl.append(\"code=\");\n ConversationState convo = ConversationState.getCurrent();\n if (convo != null) {\n authUrl.append(\"code=\");\n authUrl.append(convo.getIdentity().getUserId());\n } else {\n authUrl.append(\"error=\");\n authUrl.append(\"User not authenticated.\");\n }\n } else {\n authUrl.append(\"error=\");\n authUrl.append(error);\n }\n\n return authUrl.toString();\n }",
"private String constructPhotoUrl(String photoref){\n Uri photo_uri = new Uri.Builder()\n .scheme(\"https\")\n .authority(\"maps.googleapis.com\")\n .path(\"/maps/api/place/photo\")\n .appendQueryParameter(\"key\", API_KEY)\n .appendQueryParameter(\"photoreference\", photoref)\n .appendQueryParameter(\"maxwidth\", PREFERED_IMG_WIDTH)\n .build();\n return photo_uri.toString();\n }",
"private static String buildRequestString(String targetPhoneNo, String message) throws UnsupportedEncodingException\n {\n String [] params = new String [5];\n params[0] = _userName;\n params[1] = _password;\n params[2] = message;\n params[3] = targetPhoneNo;\n params[4] = \"site2sms\";\n\n String query = String.format(\"uid=%s&pwd=%s&msg=%s&phone=%s&provider=%s\",\n URLEncoder.encode(params[0],charset),\n URLEncoder.encode(params[1],charset),\n URLEncoder.encode(params[2],charset),\n URLEncoder.encode(params[3],charset),\n URLEncoder.encode(params[4],charset)\n );\n return query;\n }",
"private String buildLinksURL() {\n\n StringBuilder sb = new StringBuilder(CHAIN_LINKS_URL);\n\n try {\n\n String email = mChain.getmMemberID();\n sb.append(\"member=\");\n sb.append(URLEncoder.encode(email, \"UTF-8\"));\n\n\n String chainTitle = mChain.getmChainTitle();\n sb.append(\"&chainTitle=\");\n sb.append(URLEncoder.encode(chainTitle, \"UTF-8\"));\n\n Log.i(TAG, sb.toString());\n\n }\n catch(Exception e) {\n Toast.makeText(this, \"Something wrong with the url\" + e.getMessage(), Toast.LENGTH_LONG)\n .show();\n }\n return sb.toString();\n }",
"private void computeAttachmentURL(Attachment attachment, UriInfo uriInfo) {\n // LinkType != null -> asset is not stored in LARS\n // Therefore there should be an external URL in the attachment\n if (attachment.getLinkType() != null) {\n return;\n }\n\n // For assets stored in LARS, we need to compute the URL and store it in the attachment\n String encodedName;\n try {\n encodedName = URLEncoder.encode(attachment.getName(), \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n throw new AssertionError(\"This should never happen.\", e);\n }\n\n String url = configuration.getRestBaseUri(uriInfo) + \"assets/\" + attachment.getAssetId() + \"/attachments/\" + attachment.get_id() + \"/\" + encodedName;\n attachment.setUrl(url);\n }",
"public String getFileAttachmentURL() {\n return getStringAttributeAtIndex(AttachmentAttributeFile);\n }",
"@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }",
"protected String createRequestURL() {\n\t\tif (!post && requestArguments != null) {\n\t\t\tStringBuffer b = new StringBuffer(url);\n\t\t\tEnumeration e = requestArguments.keys();\n\t\t\tif (e.hasMoreElements()) {\n\t\t\t\tb.append(\"?\");\n\t\t\t}\n\t\t\twhile (e.hasMoreElements()) {\n\t\t\t\tString key = (String) e.nextElement();\n\t\t\t\tString value = (String) requestArguments.get(key);\n\t\t\t\tb.append(key);\n\t\t\t\tb.append(\"=\");\n\t\t\t\tb.append(value);\n\t\t\t\tif (e.hasMoreElements()) {\n\t\t\t\t\tb.append(\"&\");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn b.toString();\n\t\t}\n\t\treturn url;\n\t}",
"public String getSourceAttachmentLocation();",
"protected String createRequestURL()\n\t{\n\t\tif (!post && (requestArguments != null))\n\t\t{\n\t\t\tfinal StringBuffer b = new StringBuffer(url);\n\t\t\tfinal Enumeration e = requestArguments.keys();\n\t\t\tif (e.hasMoreElements())\n\t\t\t{\n\t\t\t\tb.append(\"?\");\n\t\t\t}\n\t\t\twhile (e.hasMoreElements())\n\t\t\t{\n\t\t\t\tfinal String key = (String) e.nextElement();\n\t\t\t\tfinal String value = (String) requestArguments.get(key);\n\t\t\t\tb.append(key);\n\t\t\t\tb.append(\"=\");\n\t\t\t\tb.append(value);\n\t\t\t\tif (e.hasMoreElements())\n\t\t\t\t{\n\t\t\t\t\tb.append(\"&\");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn b.toString();\n\t\t}\n\t\treturn url;\n\t}",
"private TakePhotoS2RspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"protected abstract String getProcessedMessagesUri();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the gestSource() method when the source property is defined in a hierarchical configuration. | @Test
public void testGetSourceHierarchical()
{
setUpSourceTest();
assertEquals("Wrong source configuration", config
.getConfiguration(CHILD1), config.getSource(TEST_KEY));
} | [
"@Test\n public void testGetSourceNonHierarchical()\n {\n setUpSourceTest();\n assertEquals(\"Wrong source configuration\", config\n .getConfiguration(CHILD2), config.getSource(\"another.key\"));\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testGetSourceMultiSources()\n {\n setUpSourceTest();\n final String key = \"list.key\";\n config.getConfiguration(CHILD1).addProperty(key, \"1,2,3\");\n config.getConfiguration(CHILD2).addProperty(key, \"a,b,c\");\n config.getSource(key);\n }",
"public SourceConfig getSourceConfig();",
"@Test(expected = IllegalArgumentException.class)\n public void testGetSourceNull()\n {\n config.getSource(null);\n }",
"@Test\n public void testGetSourceCombined()\n {\n setUpSourceTest();\n final String key = \"yet.another.key\";\n config.addProperty(key, Boolean.TRUE);\n assertEquals(\"Wrong source for key\", config, config.getSource(key));\n }",
"public abstract boolean matchesSourceProperty(String source, String property);",
"@Test\n public void testGetSourceUnknown()\n {\n setUpSourceTest();\n assertNull(\"Wrong result for unknown key\", config\n .getSource(\"an.unknown.key\"));\n }",
"public boolean isSource(final Environmental E);",
"@Test\n public void eventSourceLocationsTest() {\n // TODO: test eventSourceLocations\n }",
"@java.lang.Override\n public boolean hasLocalFileSource() {\n return dataSourceCase_ == 6;\n }",
"@java.lang.Override\n public boolean hasLocalFileSource() {\n return dataSourceCase_ == 6;\n }",
"public interface ConfigSource\n{\n\t/**\n\t * Get the properties that this source has available.\n\t *\n\t * @return\n\t */\n\tMapIterable<String, Object> getProperties();\n\n\t/**\n\t * Get the keys that are available directly under the given path.\n\t *\n\t * @param path\n\t * @return\n\t */\n\tRichIterable<String> getKeys(@NonNull String path);\n\n\t/**\n\t * Attempt to get a value from this source. This is expected to only return\n\t * wrapped primitives, {@link String} or {@code null} if the value is not\n\t * available.\n\t *\n\t * @param path\n\t * @return\n\t */\n\tObject getValue(String path);\n}",
"java.lang.String getAssociatedSource();",
"public MultipleTree getSource() {\n \n return source;\n}",
"private static boolean isMinimalDataSource(Path path) {\n if ( ! Files.isDirectory(path) ) \n return false ;\n Path cfg = path.resolve(DeltaConst.DS_CONFIG);\n if ( ! Files.exists(cfg) )\n return false ;\n if ( ! Files.isRegularFile(cfg) ) \n LOG.warn(\"Data source configuration file name exists but is not a file: \"+cfg);\n if ( ! Files.isReadable(cfg) )\n LOG.warn(\"Data source configuration file exists but is not readable: \"+cfg);\n return true ;\n }",
"String getSourceProperty();",
"public boolean hasDefaultSource();",
"@Test\n public void testLoadDifferentSources() throws ConfigurationException\n {\n factory.setFile(MULTI_FILE);\n Configuration config = factory.getConfiguration();\n assertFalse(config.isEmpty());\n assertTrue(config instanceof CombinedConfiguration);\n CombinedConfiguration cc = (CombinedConfiguration) config;\n assertEquals(\"Wrong number of configurations\", 1, cc\n .getNumberOfConfigurations());\n\n assertNotNull(config\n .getProperty(\"tables.table(0).fields.field(2).name\"));\n assertNotNull(config.getProperty(\"element2.subelement.subsubelement\"));\n assertEquals(\"value\", config.getProperty(\"element3\"));\n assertEquals(\"foo\", config.getProperty(\"element3[@name]\"));\n assertNotNull(config.getProperty(\"mail.account.user\"));\n\n // test JNDIConfiguration\n assertNotNull(config.getProperty(\"test.onlyinjndi\"));\n assertTrue(config.getBoolean(\"test.onlyinjndi\"));\n\n Configuration subset = config.subset(\"test\");\n assertNotNull(subset.getProperty(\"onlyinjndi\"));\n assertTrue(subset.getBoolean(\"onlyinjndi\"));\n\n // test SystemConfiguration\n assertNotNull(config.getProperty(\"java.version\"));\n assertEquals(System.getProperty(\"java.version\"), config\n .getString(\"java.version\"));\n\n // test INIConfiguration\n assertEquals(\"Property from ini file not found\", \"yes\",\n config.getString(\"testini.loaded\"));\n\n // test environment configuration\n EnvironmentConfiguration envConf = new EnvironmentConfiguration();\n for (Iterator<String> it = envConf.getKeys(); it.hasNext();)\n {\n String key = it.next();\n String combinedKey = \"env.\" + key;\n assertEquals(\"Wrong value for env property \" + key,\n envConf.getString(key), config.getString(combinedKey));\n }\n }",
"public void setSourceNode(String sourceNode) {\n this.sourceNode = sourceNode;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search for the value in the float array and return the index of the first occurrence from the end of the array. | public static int searchLast(float[] floatArray, float value, int occurrence) {
// If the occurrence is less or equal to 0 or greater than the size of the array
if(occurrence <= 0 || occurrence > floatArray.length) {
throw new IllegalArgumentException("Occurrence must be greater or equal to 1 and less than "
+ "the array length: " + occurrence);
}
// The number of times the value has been currently seen is 0
int valuesSeen = 0;
// Loop through the entire array backwards
for(int i = floatArray.length-1; i >=0; i--) {
// If the current value equals the value we are looking for
if(floatArray[i] == value) {
// Increment the times we have seen the value
valuesSeen++;
// If the number of times we have seen the value matches
// the number of before returning
if(valuesSeen == occurrence) {
// Return the index
return i;
}
}
}
// If the method has not returned by this point, it means that the
// value was not found. So we return -1
return -1;
} | [
"public static int search(float[] floatArray, float value) { \n // Search for the first occurrence in the array\n return LinearSearch.search(floatArray, value, 1);\n }",
"public static int searchLast(float[] floatArray, float value) { \n // Search for the first occurrence in the array from the end\n return LinearSearch.searchLast(floatArray, value, 1);\n }",
"public static <E> int search(E[] array, E value) { \n // Search for the first occurrence in the array\n return LinearSearch.search(array, value, 1);\n }",
"public static int search(double[] doubleArray, double value) { \n // Search for the first occurrence in the array\n return LinearSearch.search(doubleArray, value, 1);\n }",
"public int firstIndexOf(T value){\r\n int index = -1;\r\n for (int i = 0; i < dataSize; i++) {\r\n if (data[i] == value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n return index;\r\n }",
"public int searchFirstGreaterValue(int[] arr, int target) {\n if(arr == null) return -1;\n \n int lo = 0;\n int hi = arr.length - 1;\n while(lo < hi) {\n int mid = lo + (hi - lo)/2;\n if(f(arr[mid], target)) {\n hi = mid;\n } else {\n lo = mid + 1;\n }\n }\n \n //Here, must be lo == hi\n if(f(arr[lo],target)) {//Found\n return lo;\n } else {//Not found\n return -1;\n }\n }",
"@Override\n\tpublic int binarySearchXValues(double fKey)\n\t{\n\t\treturn Arrays.binarySearch(this.afXValues, (float) fKey);\n\t}",
"public int searchPosition(String[] arr, String value){\n\t\t\n\t\tloop:for (int i = 0; i < arr.length; i++){\n\t\t\tif (arr[i] == null){\n\t\t\t\tbreak loop;\n\t\t\t}else{\n\t\t\t\tif(arr[i].equals(value))\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public static int searchLast(double[] doubleArray, double value) { \n // Search for the first occurrence in the array from the end\n return LinearSearch.searchLast(doubleArray, value, 1);\n }",
"private static int findIndexOfSmallest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.MAX_VALUE;\n\t\tfloat temp;\n\t\tfor (int d=0; d<Constants.ACCEL_DIM; ++d) {\n\t\t\ttemp = vector[d];\n\t\t\tif (temp<0.0f)\n\t\t\t\ttemp = -temp;\n\t\t\t\n\t\t\tif (temp<value) {\n\t\t\t\tvalue = temp;\n\t\t\t\tindex = d;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}",
"public static <E> int searchLast(E[] array, E value) { \n // Search for the first occurrence in the array from the end\n return LinearSearch.searchLast(array, value, 1);\n }",
"public static int findValue(int [] array, int value){\n int index = -1;\n for(int i = 0; i < array.length; i++){\n if(value == array[i]){\n index = i + 1;\n System.out.println(Arrays.toString(array));\n }\n }\n return index;\n }",
"protected int search(double value) {\n int n = sequence.size();\n int left = 0, right = n - 1, index = 0;\n while (left != right) {\n index = (right - left) / 2 + left;\n if (value >= sequence.get(index == left ? index + 1 : index)) {\n left = index == left ? index + 1 : index;\n } else {\n right = index;\n }\n }\n while (left > 0 && value == sequence.get(left - 1)) {\n left -= 1;\n }\n return left;\n }",
"private int find(byte[] haystack, int offset, byte[] needle, boolean forward) {\n if (needle.length == 0) return -1;\n int maxpos = haystack.length - needle.length;\n int step = (forward) ? 1 : -1;\n for (int pos = offset; pos >= 0 && pos <= maxpos; pos += step) {\n if (isAtPos(haystack, pos, needle)) { return pos; }\n }\n return -1;\n }",
"public int fixedPointSearch(int[] arr, int low, int high){\n while(low<=high) {\n int mid = (low + high) >>> 1;\n if(mid==arr[mid])\n return mid;\n else if(mid<arr[mid])\n high=mid-1;\n else\n low=mid+1;\n }\n return -1;\n }",
"public static int search(int[] intArray, int value) { \n // Search for the first occurrence in the array\n return LinearSearch.search(intArray, value, 1);\n }",
"public static int search(long[] longArray, long value) { \n // Search for the first occurrence in the array\n return LinearSearch.search(longArray, value, 1);\n }",
"int\nsearch(\nint\narr[], \nint\nstrt, \nint\nend, \nint\nvalue) \n\n{ \n\nint\ni; \n\nfor\n(i = strt; i <= end; i++) { \n\nif\n(arr[i] == value) \n\nbreak\n; \n\n} \n\nreturn\ni; \n\n}",
"public static int searchLast(double[] doubleArray, double value, int occurrence) { \n // If the occurrence is less or equal to 0 or greater than the size of the array\n if(occurrence <= 0 || occurrence > doubleArray.length) {\n throw new IllegalArgumentException(\"Occurrence must be greater or equal to 1 and less than \"\n + \"the array length: \" + occurrence);\n }\n \n // The number of times the value has been currently seen is 0\n int valuesSeen = 0;\n \n // Loop through the entire array backwards\n for(int i = doubleArray.length-1; i >=0; i--) {\n // If the current value equals the value we are looking for \n if(doubleArray[i] == value) {\n // Increment the times we have seen the value\n valuesSeen++;\n \n // If the number of times we have seen the value matches\n // the number of before returning\n if(valuesSeen == occurrence) {\n // Return the index\n return i;\n }\n }\n }\n \n // If the method has not returned by this point, it means that the\n // value was not found. So we return -1\n return -1;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a ISearchResultChangedListener. Has no effect when the listener hasn't previously been added. | void removeListener(ISearchResultListener l); | [
"@Override\n public void removeListener() {\n this.mListener = null;\n }",
"public void removeChangeListener(ChangeListener listener) { _changeListeners.remove(listener); }",
"void removeChangeListener(@NonNull ChangeListener listener);",
"@Override\n public void removeListener() {\n this.listener = null;\n }",
"public void removeChangeListener( ChangeListener listener ) {\n changeListeners_.remove( listener );\n }",
"public void removeCategoryChangedListener(CategoryChangedListener listener) {\n myCategoryChangedListeners.remove(listener);\n }",
"public void removeOnDataChangedListener(OnDataChangedListener listener) {\n dataChangedListeners.remove(listener);\n }",
"public void removeFilenameChangedListener(FilenameChangedListener listener) {\n eventListeners.remove(FilenameChangedListener.class, listener);\n }",
"public void unregisterListener() {\n\t\tthis.listener = null;\n\t}",
"public void removeBalanceDataRecChangedListener(BalanceDataRecChangedListener listener) {\n myBalanceDataRecChangedListeners.remove(listener);\n }",
"public void removeResultListener(ResultListener listener) {\n\t\tresultListeners.remove(listener);\n\t}",
"public void removeListener();",
"public void removeListener( FrequencyChangeListener listener )\n {\n \tmFrequencyController.removeListener( listener );\n }",
"@Override\r\n\tpublic void removeSelectionListener(SelectionListener listener) {\r\n\t\tsuper.removeSelectionListener(listener);\r\n\t\tsetData(\"listener\", null); //$NON-NLS-1$\r\n\t}",
"public static void removeVoiceChangedListener(VoiceChangedListener listener) {\r\n\t\tvoiceListeners.remove(listener);\r\n\t}",
"public void removeListSelectionListener(ListSelectionListener listener)\r\n {\r\n listSelectionListeners.remove(listener);\r\n }",
"public void removeUserSearchProviderListener(UserSearchProviderListener l)\n {\n synchronized (listeners) {\n listeners.remove(l);\n }\n }",
"public void removePositionChangedListener(TrackListener listener) {\n getListenerList().remove(TrackListener.class, listener);\n }",
"public void removeDirtyListener(IRDirtyDataListener listener) {\n dirtyListeners.remove(listener);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Force Y' attribute. If the meaning of the 'Force Y' attribute isn't clear, there really should be more of a description here... | float getForceY(); | [
"public double getYForce() {\n return netForceY;\n }",
"String getForceYAsString();",
"public double getYComponent()\r\n\t{\r\n\t\treturn this.m_Force.y;\r\n\t}",
"public double getY() {\r\n return yValue;\r\n }",
"@Test\n\tpublic void testGetY_Force() {\n\t\tassertEquals(yForce, message.getForces().y, 0.0F);\n\t}",
"public double getY() {\n return Y;\n }",
"public int getFixedY() {\n return fixedY;\n }",
"public double getY() {\n return (this.y);\n }",
"public double getAccelY() {\r\n if (accel == null) {\r\n return Double.NaN;\r\n }\r\n else {\r\n return accel.y;\r\n }\r\n }",
"public double getY() {\n return mY;\n }",
"public double getY() {\n return Y;\n }",
"public Double getyValue()\n {\n return yValue;\n }",
"public Double getYValue() {\n\treturn yValue;\n }",
"public double getYValue(){\n return(yValue);\n }",
"public DoubleData getY() {\n\t\treturn y;\n\t}",
"public double forcey(double y) {\n return (D * (1. - l / Math.sqrt(4 * x * x + (1. - 2 * y) * (1. - 2 * y))\n - l / Math.sqrt(5. - 8 * x + 4 * x * x - 4 * y + 4 * y * y)\n + y * (-2. + 2 * l * (1. / Math.sqrt(4 * x * x + (1. - 2 * y) * (1. - 2 * y))\n + 1. / Math.sqrt(5. - 8 * x + 4 * x * x - 4 * y + 4 * y * y))))) / m\n - 0.1 * reib * yp;\n }",
"public int getyVelocity() {\n return yVelocity;\n }",
"public double getYAccel() {\n acceleration = imu.getLinearAcceleration();\n return acceleration.yAccel;\n }",
"@Basic @Raw\n\tpublic double getYVelocity() {\n\t\treturn velocity.getYComponent();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Truck by license list. | @GetMapping("/truck/license")
List<TruckModel> truckByLicense(@RequestParam String license) {
return truckRepository.findByLicenseOrderByTsDesc(license);
} | [
"List<RawLicense> getRawLicenses();",
"java.util.List<java.lang.String> getLicensesList();",
"java.lang.String getLicenses(int index);",
"@SuppressWarnings(\"unchecked\")\n public List<License> getAllLicensesConcise() {\n final Query<License> query = pm.newQuery(License.class);\n query.getFetchPlan().addGroup(License.FetchGroup.CONCISE.name());\n if (orderBy == null) {\n query.setOrdering(\"name asc\");\n }\n return (List<License>)query.execute();\n }",
"List<NormalizedLicense> getNormalizedLicenses();",
"WorldUps.UInitTruck getTrucks(int index);",
"@Override\n public abstract ImmutableList<String> getLicenseLines();",
"List<String> applicationLicenses();",
"public List<TradeLicense> enrichTradeLicenseSearch(List<TradeLicense> licenses, TradeLicenseSearchCriteria criteria, RequestInfo requestInfo){\n\n String businessService = licenses.isEmpty()?null:licenses.get(0).getBusinessService();\n if (businessService == null)\n businessService = businessService_TL;\n TradeLicenseSearchCriteria searchCriteria = enrichTLSearchCriteriaWithOwnerids(criteria,licenses);\n switch (businessService) {\n case businessService_TL:\n enrichBoundary(new TradeLicenseRequest(requestInfo, licenses));\n break;\n }\n UserDetailResponse userDetailResponse = userService.getUser(searchCriteria,requestInfo);\n enrichOwner(userDetailResponse,licenses);\n return licenses;\n }",
"private List<String> getTradeUnitIds(TradeLicense license){\n List<String> tradeUnitIds = new LinkedList<>();\n if(!CollectionUtils.isEmpty(license.getTradeLicenseDetail().getTradeUnits())){\n license.getTradeLicenseDetail().getTradeUnits().forEach(tradeUnit -> {\n tradeUnitIds.add(tradeUnit.getId());\n });\n }\n return tradeUnitIds;\n }",
"public OrdinaryTruck(List<Item> cargo) {\n\n\t}",
"public void printLicensePlates() {\n Set<LicensePlate> licensePlates = this.vehicleRegistry.keySet();\n\n for (LicensePlate license : licensePlates) {\n System.out.println(license);\n }\n\n // System.out.println(this.vehicleRegistry);\n }",
"public T generateLicense();",
"public static void printTruckByYear(List<Truck> trucks){\n for (int i = 0; i <trucks.size(); i++) {\n for (int j = 0; j < trucks.size()-1-i; j++) {\n if (trucks.get(i).getPublishedYear()< trucks.get(i + 1).getPublishedYear()){\n Truck c = trucks.get(i);\n trucks.set(i, trucks.get(i + 1));\n trucks.set(i + 1, c);\n }\n }\n System.out.println(trucks.get(trucks.size() - 1 - i));\n }\n }",
"public int getLicenses() {\n return licenses;\n }",
"public List<License> getAllLicenses(){\n\t\treturn this.licenseRepo.findAll();\n\t}",
"public PaginatedResult getLicenses() {\n final Query<License> query = pm.newQuery(License.class);\n query.getFetchPlan().addGroup(License.FetchGroup.ALL.name());\n if (orderBy == null) {\n query.setOrdering(\"name asc\");\n }\n if (filter != null) {\n query.setFilter(\"name.toLowerCase().matches(:filter) || licenseId.toLowerCase().matches(:filter)\");\n final String filterString = \".*\" + filter.toLowerCase() + \".*\";\n return execute(query, filterString);\n }\n return execute(query);\n }",
"public TradeLicenseSearchCriteria getTLSearchCriteriaFromTLIds(List<TradeLicense> licenses){\n TradeLicenseSearchCriteria criteria = new TradeLicenseSearchCriteria();\n List<String> ids = new ArrayList<>();\n licenses.forEach(license -> ids.add(license.getId()));\n criteria.setIds(ids);\n criteria.setTenantId(licenses.get(0).getTenantId());\n criteria.setBusinessService(licenses.get(0).getBusinessService());\n return criteria;\n }",
"public TradeLicenseSearchCriteria getTradeLicenseCriteriaFromIds(List<TradeLicense> licenses){\n TradeLicenseSearchCriteria criteria = new TradeLicenseSearchCriteria();\n Set<String> licenseIds = new HashSet<>();\n licenses.forEach(license -> licenseIds.add(license.getId()));\n criteria.setIds(new LinkedList<>(licenseIds));\n criteria.setBusinessService(licenses.get(0).getBusinessService());\n return criteria;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Function for loading in all the session data from a text file | public List<Session> loadSessionData()
{
List<Session> tempSessions = new ArrayList<Session>();
List<String[]> loadedData = new ArrayList<String[]>();
for (int i = 0; i < 12; i++)
{
String[] tempArr = loadFile("sessions" + i + ".txt");
loadedData.add(tempArr);
}
for (int i = 0; i < 12; i++)
{
Session newSession = new Session(i);
for (int j = 0; j < loadedData.get(i).length; j++)
{
newSession.addMember(loadedData.get(i)[j], loadedData.get(i)[j + 1],
loadedData.get(i)[j + 2], loadedData.get(i)[j + 3]);
j += 3;
}
tempSessions.add(newSession);
}
return tempSessions;
} | [
"public static Sessions loadSessions(String filePath){\n\t\ttry{\n\t\t\tJAXBContext jct = JAXBContext.newInstance(org.svv.acmate.model.sessions.ObjectFactory.class.getPackage().getName()\n\t\t\t\t\t, org.svv.acmate.model.sessions.ObjectFactory.class.getClassLoader());\n\t\t\tUnmarshaller m = jct.createUnmarshaller();\n\t\t\treturn (Sessions)m.unmarshal(new FileInputStream(filePath));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public BufferedReader getSessionReader() throws FileNotFoundException {\n return new BufferedReader(new FileReader(new File(wnwData, \"session.dat\")));\n }",
"public Map<String, String> loadSessionData() {\n\n Properties prop = new Properties();\n try (InputStream input = new FileInputStream(\"/config.properties\")) {\n // load a properties file\n prop.load(input);\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n Map<String, String> map = new HashMap<String, String>((Map) prop);\n return map;\n }",
"public static void loadSession(File file) throws CommandException {\n String name = file.getName();\n\ttry {\n InputStream inraw = \n \tnew BufferedInputStream(new FileInputStream(file));\n loadSession(name, inraw);\n }\n catch (FileNotFoundException e) {\n throw new CommandException(\"#readerr\", name);\n }\n }",
"private void readPersistence() {\n BufferedReader in;\n String line;\n String symbol;\n String value;\n StringTokenizer tok;\n String filepath = FileUtil.openPath(\"USER/PERSISTENCE/\"+persistence_file);\n if(filepath==null)\n return;\n try {\n in = new BufferedReader(new FileReader(filepath));\n while ((line = in.readLine()) != null) {\n tok = new StringTokenizer(line, \" \");\n if (!tok.hasMoreTokens())\n continue;\n symbol = tok.nextToken().trim();\n if (tok.hasMoreTokens()){\n value = tok.nextToken().trim();\n symbol=symbol.replace('_',' ');\n boolean state=value.equals(\"true\")?true:false;\n if(symbol.equals(show_count_str)) {\n showCount=state;\n VMessage.setShowCount(state);\n } else if(symbol.equals(show_date_str)) {\n showDate=state;\n VMessage.setShowDate(state);\n } else if(symbol.equals(invert_colors_str)) {\n invertColors=state;\n } else if(symbol.equals(WINHT)) {\n int h=Integer.parseInt(value);\n if(h>m_nMinWinHt)\n m_nWinHt = h;\n } else if(symbol.equals(WINWIDTH)) {\n int w=Integer.parseInt(value);\n if(w>m_nMinWinWidth)\n m_nWinWidth = w;\n } else if(symbol.equals(WINLOCX)) {\n m_nWinLocX = Integer.parseInt(value);\n } else if(symbol.equals(WINLOCY)) {\n m_nWinLocY = Integer.parseInt(value);\n }\n }\n }\n in.close();\n }\n catch (Exception e) {\n Messages.writeStackTrace(e);\n }\n }",
"public static void loadSessions() {\n try (Connection con = getConnection()) {\n String query = \"SELECT `usermask`,`username` FROM \" + mysql_db + \".`sessions`\";\n try (PreparedStatement pst = con.prepareStatement(query)) {\n ResultSet r = pst.executeQuery();\n while (r.next()) {\n Bot.addUserSession(r.getString(\"usermask\"), r.getString(\"username\"));\n }\n pst.close();\n con.close();\n }\n con.close();\n } catch (SQLException e) {\n Logger.logMessage(LOGLEVEL_IMPORTANT, \"SQL Error in 'loadSessions()': \" + e.getMessage());\n }\n }",
"private void readData() {\n\t\ttry {\n\t\t\tFile file = new File(\"Users.txt\");\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\t\tString line = null;\n\t\t\twhile ((line = reader.readLine()) != null){\n\t\t\t\tString name = line;\n\t\t\t\tline = reader.readLine();\n\t\t\t\tString addres = line;\n\t\t\t\tusers.add(new User(name, addres));\t\t\t\n\t\t\t}\t\n\t\t\treader.close();\n\t\t}catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"private void readFromFile(){\n\t\t\n\t\ttry {\n\t\t\tFile file=new File(\"controller.txt\");\n\t\t\tFileInputStream fin;\n\t\t\tfin = new FileInputStream(file);\n\t\t\tDataInputStream din=new DataInputStream(fin);\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(din));\n\t\t\t\n\t\t\tfor(int i=0; i<2; i++){\n\t\t\t\tif(i==0)\n\t\t\t\t\tcodedUserName=br.readLine();\n\t\t\t\telse \n\t\t\t\t\tcodedPassword=br.readLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public HashMap<String, String> loadDatabase(){\n HashMap<String, String> database = new HashMap<>();\n try {\n BufferedReader br = new BufferedReader(new FileReader(fileLocation));\n String line;\n while((line = br.readLine()) != null) {\n String loginData[] = line.split(\":\");\n database.put(loginData[0], loginData[1]);\n }\n br.close();\n }catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }\n return database;\n }",
"public void readTable() {\r\n\r\n try ( BufferedReader b = new BufferedReader(new FileReader(\"Hashdata.txt\"))) {\r\n\r\n String line;\r\n ArrayList<String> arr = new ArrayList<>();\r\n while ((line = b.readLine()) != null) {\r\n\r\n arr.add(line);\r\n }\r\n\r\n for (String str : arr) {\r\n this.load(str);\r\n }\r\n this.print();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Unable to read file\");\r\n }\r\n\r\n this.userInterface();\r\n\r\n }",
"public void loadIdentity() throws FileNotFoundException {\n\t\tScanner s = new Scanner(new File(getPath()+fileName));\n\t\twhile(s.hasNextLine()) {\n\t\t\tidentityKey = s.nextLine();\n\t\t\t//System.out.println(identityKey);\n\t\t}\n\t\ts.close();\n\t}",
"static String[] readPlayerData() throws FileNotFoundException{\n\t\tjava.io.File player = new java.io.File(\"Players/\" + Player.getName() +\".txt\");\n\t\tjava.util.Scanner fileScanner = new java.util.Scanner(player); \n\t\tString[] tempPlayerData = new String[17];\n\t\tint counter = 0;\n\t\twhile (fileScanner.hasNextLine()) {\n\t\t\tString s = fileScanner.nextLine();\n\t\t\tif (!s.startsWith(\"#\")){\n\t\t\t\ttempPlayerData[counter] = s;\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tfileScanner.close();\n\t\treturn tempPlayerData;\n\t}",
"public void loadData()\r\n\t{\r\n\t\ttry {\r\n\r\n\t\t\tScanner s = new Scanner(new File(\"visited.txt\"));\r\n\r\n\t\t\twhile(s.hasNext())\r\n\t\t\t{\r\n\t\t\t\tURLList.put(s.next(), s.nextInt());\r\n\t\t\t}\r\n\r\n\t\t\ts.close();\r\n\r\n\t\t\ts = new Scanner(new File(\"PreSubdomains.txt\"));\r\n\r\n\t\t\twhile(s.hasNext())\r\n\t\t\t{\r\n\t\t\t\tsubdomains.put(s.next(), s.nextInt());\r\n\t\t\t}\r\n\r\n\t\t\ts.close();\r\n\r\n\t\t\tSystem.out.println(\"Loaded!\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"private String parseTextFile() {\n try {\n Scanner s = new Scanner(loadFile);\n String data = \"\";\n long fileSize = loadFile.getTotalSpace();\n long loaded = (long) 0.0;\n while (s.hasNext()) {\n String line = s.next();\n loaded += line.length() * 2;\n data += line;\n this.updateProgress(loaded, fileSize*1.2); // attempt at some sort of progress update\n }\n s.close();\n this.updateProgress(80, 100); // leave room for desert.\n return data;\n } catch (FileNotFoundException e) {\n System.out.println(\"TEXT FILE READ ERROR\");\n }\n return null;\n }",
"public void loadData() {\n try {\n file = new File(path);\n if (file.getParentFile() != null) {\n file.getParentFile().mkdirs();\n }\n file.createNewFile();\n System.out.println(\"Tasks loaded from local successfully!\");\n String line;\n Scanner readFile = new Scanner(file);\n while (readFile.hasNext()) {\n line = readFile.nextLine();\n lines.add(line);\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }",
"public void load() {\n try {\n BufferedReader reader = new BufferedReader(new FileReader(\"src/main/java/step/data/timetable.txt\"));\n String line = null;\n\n while ((line = reader.readLine()) != null) {\n String[] table = line.split(\"x\");\n System.out.println(table[0]);\n }\n } catch (IOException e) {\n System.out.println(\"error load\");\n }\n }",
"@Override\n public ArrayList<LiveSession> queryAll() {\n ArrayList<LiveSession> liveSessions = new ArrayList<>();\n File inFile = new File(filePath);\n try {\n String[] record;\n BufferedReader reader = new BufferedReader(new FileReader(inFile));\n CsvReader csvReader = new CsvReader(reader, ',');\n while(csvReader.readRecord()){\n record = csvReader.getValues();\n liveSession = new LiveSession(Long.parseLong(record[0]), record[1], Integer.parseInt(record[2]),\n Integer.parseInt(record[3]), Double.parseDouble(record[4]),\n new SimpleDateFormat(\"EEE MMM dd HH:mm:ss Z yyyy\", Locale.UK).parse(record[5]),\n record[6], record[7]);\n liveSessions.add(liveSession);\n }\n csvReader.close();\n } catch (IOException | ParseException ex) {\n ex.printStackTrace();\n }\n return liveSessions;\n }",
"public List<String> readTextFile() {\n\t\t List<String> list=new ArrayList<String>();\n\t\t\tBufferedReader reader;\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(\"src/dataSet.txt\"));\n\t\t\t\tString line = reader.readLine();\n\t\t\t\twhile (line != null) {\n\t\t\t\t\tlist.add(line);\n\n\t\t\t\t\t// read next line\n\t\t\t\t\tline = reader.readLine();\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}return list;\n\t\t}",
"public void loadSession() {\n System.out.println(\"loadSession\");\n URL url = null;\n Session session = null;\n IGVSessionReader instance = null;\n //instance.loadSession(url, session);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scan through org.w3c.dom.Element named statuses. | void visitElement_statuses(org.w3c.dom.Element element) { // <statuses>
// element.getValue();
org.w3c.dom.NodeList nodes = element.getChildNodes();
for (int i = 0; i < nodes.getLength(); i++) {
org.w3c.dom.Node node = nodes.item(i);
switch (node.getNodeType()) {
case org.w3c.dom.Node.CDATA_SECTION_NODE:
// ((org.w3c.dom.CDATASection)node).getData();
break;
case org.w3c.dom.Node.ELEMENT_NODE:
org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;
if (nodeElement.getTagName().equals("status")) {
visitElement_status(nodeElement);
}
break;
case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:
// ((org.w3c.dom.ProcessingInstruction)node).getTarget();
// ((org.w3c.dom.ProcessingInstruction)node).getData();
break;
}
}
} | [
"void visitElement_status(org.w3c.dom.Element element) { // <status>\n // element.getValue();\n org.w3c.dom.NamedNodeMap attrs = element.getAttributes();\n for (int i = 0; i < attrs.getLength(); i++) {\n org.w3c.dom.Attr attr = (org.w3c.dom.Attr)attrs.item(i);\n if (attr.getName().equals(\"name\")) { // <status name=\"???\">\n list.statuses.add(attr.getValue());\n }\n }\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n }\n }\n }",
"public String getStatusOfNode(String nodename){\n setNodeStatuses();\n WebElement e = nodeStatuses.findElement(By.xpath(\"//button[text()='\" + nodename + \"']\"));\n return e.getAttribute(\"class\");\n }",
"@JsonIgnore\n\tprivate void updateLevelElementsStatuses(final ReportElement element) {\n\t\tif (null == levelElementsBuffer) {\n\t\t\t// The levelElementsBuffer should have been initialized in the\n\t\t\t// updateLevelElementsBuffer method. If this never happened, that\n\t\t\t// means that we never started a level\n\t\t\treturn;\n\t\t}\n\t\tif (element == null || element.getType() == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (element.getStatus() == Status.success) {\n\t\t\t// Nothing to do\n\t\t\treturn;\n\t\t}\n\t\tfor (ReportElement startElement : levelElementsBuffer) {\n\t\t\tif (element.getStatus().ordinal() > startElement.getStatus().ordinal()) {\n\t\t\t\tstartElement.setStatus(element.getStatus());\n\t\t\t}\n\t\t}\n\t}",
"org.apache.xmlbeans.XmlString xgetStatus();",
"public MultiStatus(Element root) throws MalformedElementException {\n super(root, \"multistatus\"); //$NON-NLS-1$\n }",
"private void statusChanged(){\n for (PrinterStatusEvent printerStatusEvent : listPrinterStatusEvent) {\n printerStatusEvent.onStatusChanged();\n }\n }",
"void xsetStatus(org.apache.xmlbeans.XmlInt status);",
"void xsetStatus(org.apache.xmlbeans.XmlString status);",
"public static ArrayList<String> getLinkStatus(WebDriver wDriver, ArrayList<String> allLinkStatus) {\n List<WebElement> linksToClick = new ArrayList<WebElement>();\n List<WebElement> elements = wDriver.findElements(By.tagName(\"a\"));\n elements.addAll(wDriver.findElements(By.tagName(\"img\")));\n for (WebElement e : elements) {\n if (e.getAttribute(\"href\") != null) {\n linksToClick.add(e);\n }\n }\n for (WebElement link : linksToClick) {\n String href = link.getAttribute(\"href\");\n try {\n System.out.println(\"URL \" + href + \" returned \" + linkStatus(new URL(href)));\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n return allLinkStatus;\n }",
"public void verifyleadstatus(String status){\r\n\t\tString leadno = driver.findElement(By.className(bdm.getProperty(\"tableinfo_class\"))).getText();\r\n\t\tdriver.findElement(By.id(bdm.getProperty(\"searchbox_id\"))).findElement(By.tagName(bdm.getProperty(\"searchbox_tag\"))).sendKeys(status);\r\n\t\tString leadnos = driver.findElement(By.className(bdm.getProperty(\"tableinfo_class\"))).getText();\r\n\t\tif(leadno.contains(leadnos)) \r\n\t\t\tReporter.log(\"<p>\" + \"Lead Status of every lead is \" +status);\r\n\t else\r\n\t\t \tReporter.log(\"<p>\" + \"Lead Status of every lead is not \" +status);\r\n\t\t}",
"@Test (groups = {\"smokeTest\"})\n public void checkTheStatusOfItem() {\n purchases.switchTab(\"Incoming Products\");\n List<WebElement> statusValues = $$(byXpath(\"//td[@class='o_data_cell o_readonly_modifier']\"));\n int totalNumOfStatusValues = statusValues.size();\n //System.out.println(\"The total number of status values: \" + totalNumOfStatusValues);\n int counter =0;\n for (WebElement statusValue : statusValues) {\n String statusText=statusValue.getText();\n counter++;\n Assert.assertTrue((statusText.equals(\"Available\")||statusText.equals(\"Waiting Availability\")) && (!statusText.isEmpty()), \"The status of an item is not displayed.\");\n }\n //System.out.println(\"The number of status values found by counter: \" + counter);\n Assert.assertEquals(totalNumOfStatusValues, counter, \"The total number of status values doesn't match with counter.\");\n\n\n }",
"private void parseSignOnStatus(final XMLStreamReader reader) throws XMLStreamException {\n logger.entering(OfxV2Parser.class.getName(), \"parseSignOnStatus\");\n\n final QName parsingElement = reader.getName();\n\n parse:\n while (reader.hasNext()) {\n final int event = reader.next();\n\n switch (event) {\n case XMLStreamConstants.START_ELEMENT:\n switch (reader.getLocalName()) {\n case CODE:\n try {\n statusCode = Integer.parseInt(reader.getElementText());\n } catch (final NumberFormatException ex) {\n logger.log(Level.SEVERE, ex.getLocalizedMessage(), ex);\n }\n break;\n case SEVERITY:\n statusSeverity = reader.getElementText();\n break;\n default:\n logger.log(Level.WARNING, \"Unknown STATUS element {0}\", reader.getLocalName());\n break;\n }\n\n break;\n case XMLStreamConstants.END_ELEMENT:\n if (reader.getName().equals(parsingElement)) {\n logger.info(\"Found the end of the statusCode response\");\n break parse;\n }\n default:\n }\n }\n\n logger.exiting(OfxV2Parser.class.getName(), \"parseSignOnStatus\");\n }",
"@org.junit.Test\n public void getBookStatus(){\n webElement = webDriver.findElement(By.cssSelector(\"*[class^='callnumAndLocation']\")); // textbook information stored under this class\n List<WebElement> tableRows = webElement.findElements(By.tagName(\"tr\"));\n\n String tableCheck = getElemText(tableRows); // results the desired parameters of a single textbook item\n String tableArray[] = tableCheck.split(\" \"); // within those parameters, the last element holds the status value\n int N = tableArray.length;\n\n if ((tableArray[N-1].contains(\"Available\"))){\n bookAvailable = true;\n } else {\n webDriver.quit();\n }\n\n Assert.assertTrue(\"Book Available: \" + String.valueOf(bookAvailable), bookAvailable);\n }",
"public void verifyleadstatus(String status){\n\t\tString leadno = driver.findElement(By.className(bdm.getProperty(\"tableinfo_class\"))).getText();\n\t\tdriver.findElement(By.id(bdm.getProperty(\"searchbox_id\"))).findElement(By.tagName(bdm.getProperty(\"searchbox_tag\"))).sendKeys(status);\n\t\tString leadnos = driver.findElement(By.className(bdm.getProperty(\"tableinfo_class\"))).getText();\n\t\tif(leadno.contains(leadnos)) \n\t\t\tReporter.log(\"<p>\" + \"Lead Status of every lead is \" +status);\n\t else\n\t\t \tReporter.log(\"<p>\" + \"Lead Status of every lead is not \" +status);\n\t\t}",
"public void captureflightstatus() {\r\n\t\tString bookingstatus = driver.findElement(status_of_booked_flight).getText();\r\n\t\tSystem.out.println(\"The booking status is:\" + bookingstatus);\r\n\t}",
"private void scanForLocations(Element elem) {\n \n String location = getLocation(elem);\n if (location != null) {\n locationToElement.put(location, elem);\n DOM.setInnerHTML(elem, \"\");\n } else {\n int len = DOM.getChildCount(elem);\n for (int i = 0; i < len; i++) {\n scanForLocations(DOM.getChild(elem, i));\n }\n }\n }",
"public NodeStatus getStatus () { return status; }",
"NamedElement getContainsElementsOf();",
"private void parseCategoriesAndStatusesHelper(DocumentType documentType, NodeList appDocStatusList) {\n\n NodeList appDocStatusChildren = appDocStatusList.item(0).getChildNodes();\n\n for (int appDocStatusChildrenIndex = 0; appDocStatusChildrenIndex < appDocStatusChildren.getLength();\n appDocStatusChildrenIndex ++) {\n\n Node child = appDocStatusChildren.item(appDocStatusChildrenIndex);\n\n if (STATUS.equals(child.getNodeName())) {\n\n ApplicationDocumentStatus status =\n parseApplicationDocumentStatusHelper(documentType, child);\n\n parsedStatuses.add(status);\n\n } else if (CATEGORY.equals(child.getNodeName())) {\n\n Node categoryNameAttribute = child.getAttributes().getNamedItem(\"name\");\n String categoryName = categoryNameAttribute.getNodeValue();\n\n // validate category names are all unique\n validateUniqueName(categoryName);\n\n ApplicationDocumentStatusCategory category = new ApplicationDocumentStatusCategory();\n category.setDocumentType(documentType);\n category.setDocumentTypeId(documentType.getDocumentTypeId());\n category.setCategoryName(categoryName);\n\n // iterate through children\n NodeList categoryChildren = child.getChildNodes();\n for (int categoryChildIndex = 0; categoryChildIndex < categoryChildren.getLength();\n categoryChildIndex++) {\n Node categoryChild = categoryChildren.item(categoryChildIndex);\n if (Node.ELEMENT_NODE == categoryChild.getNodeType()) {\n ApplicationDocumentStatus status =\n parseApplicationDocumentStatusHelper(documentType, categoryChild);\n status.setCategory(category);\n\n parsedStatuses.add(status);\n }\n }\n\n parsedCategories.add(category);\n }\n }\n\n documentType.setValidApplicationStatuses(parsedStatuses);\n documentType.setApplicationStatusCategories(parsedCategories);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the allowable values. | public DocumentationAllowableValues getAllowableValues()
{
return allowableValues;
} | [
"public String getAllowedValues () {\n return allowedValues;\n }",
"@Schema(description = \"The allowed values, if applicable.\")\n public List<String> getAllowedValues() {\n return allowedValues;\n }",
"public List<Integer> GetPossibleValues()\n {\n return this._valuesToPut;\n }",
"@SuppressWarnings(\"unchecked\")\n public List<Boolean> getAllowances() {\n return (List<Boolean>) getObject(Boolean.class, KEY_ALLOWED);\n }",
"private String allowedValues() {\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (String s : values) {\n\t\t\tif (buf.length() > 0)\n\t\t\t\tbuf.append(\", \");\n\t\t\tbuf.append(s);\n\t\t}\n\t\treturn buf.toString();\n\t}",
"@Override\n\tpublic List<String> getAllowedValues() {\n\t\tArrayList<String> ret = new ArrayList<String>();\n\t\tCollections.addAll(ret, Configuration.getInstance().getElencoLingueOcr());\n\t\treturn ret;\n\t}",
"public List<String> getPossibleValues() {\n if (possibleValuesList.isPresent()) {\n return possibleValuesList.get();\n }\n\n if (possibleValuesSupplier.isPresent()) {\n return possibleValuesSupplier.get().get();\n }\n\n return new ArrayList<>();\n }",
"public Set getPermissibleValues()\r\n {\r\n return this.permissibleValues;\r\n }",
"public void setAllowableValues(List<ValueDefinition> allowableValues) {\n this.allowableValues = allowableValues;\n }",
"java.util.List<java.lang.Integer> getRequestedValuesList();",
"@Nullable\r\n ImmutableSet<IFeatureValue> getAllPossibleValues();",
"public String[] getValidValues();",
"public List<PropertyValidValue> getPropertyValidValues()\r\n\t{\r\n\t\treturn propertyValidValues;\r\n\t}",
"public Collection<ValueDomainPermissibleValue> getValueDomainPermissibleValueCollection(){\r\n\t\treturn valueDomainPermissibleValueCollection;\r\n\t}",
"public ArrayList<Peg> getOnlyValuesCorrect() {\r\n return onlyValuesCorrect;\r\n }",
"public Boolean getCanSelectValues() {\r\n return getAttributeAsBoolean(\"canSelectValues\");\r\n }",
"public Set<Material> getAllowedWeapons()\r\n\t{\treturn Collections.unmodifiableSet(this.allowedWeapons);\t}",
"public double getAllowedAmount() {\r\n return allowedAmount;\r\n }",
"public ArrayList<String> canBeBounded()\r\n\t{\r\n\t\tArrayList<String> canBeBounded = pre.getVariables();\r\n\t\tcanBeBounded.addAll(act.getVariables());\r\n\t\treturn canBeBounded;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column CTSTRS_HISTORY.FACILITY_REF | public BigDecimal getFACILITY_REF() {
return FACILITY_REF;
} | [
"public BigDecimal getFACILITY_REF()\r\n {\r\n\treturn FACILITY_REF;\r\n }",
"public void setFACILITY_REF(BigDecimal FACILITY_REF)\r\n {\r\n\tthis.FACILITY_REF = FACILITY_REF;\r\n }",
"public BigDecimal getFACILITY_NUMBER()\r\n {\r\n\treturn FACILITY_NUMBER;\r\n }",
"private String getFacility() throws SQLException\n {\n String facility = \"01\";\n ResultSet rs = null;\n\n try {\n m_Facility.setInt(1, Integer.parseInt(m_WhseId));\n rs = m_Facility.executeQuery();\n\n if ( rs.next() ) {\n facility = rs.getString(\"fas_facility_id\");\n\n //\n // Since we're here just get the name as well\n m_FacilityName = rs.getString(\"name\");\n }\n\n return facility;\n }\n finally {\n closeRSet(rs);\n rs = null;\n }\n }",
"public BigDecimal getREF_NO() {\r\n return REF_NO;\r\n }",
"public String getREF_COL_NAME() {\n return REF_COL_NAME;\n }",
"ColumnReference getColumnReference();",
"public BigDecimal getFACILITY_BRANCH()\r\n {\r\n\treturn FACILITY_BRANCH;\r\n }",
"public String getLBR_NotaFiscalDocRef_UU();",
"public String getDiferenciaFacRec() {\n return diferenciaFacRec;\n }",
"public java.lang.String getPclRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PCLREF$54);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"public HD getCurrentFacility() { \r\n\t\tHD retVal = this.getTypedField(5, 0);\r\n\t\treturn retVal;\r\n }",
"java.lang.String getRef();",
"public void getREFDT()//get reference date\n\t{\n\t\ttry\n\t\t{\n\t\t\tDate L_strTEMP=null;\n\t\t\tM_strSQLQRY = \"Select CMT_CCSVL,CMT_CHP01,CMT_CHP02 from CO_CDTRN where CMT_CGMTP='S\"+cl_dat.M_strCMPCD_pbst+\"' and CMT_CGSTP = 'FGXXREF' and CMT_CODCD='DOCDT'\";\n\t\t\tResultSet L_rstRSSET = cl_dat.exeSQLQRY2(M_strSQLQRY);\n\t\t\tif(L_rstRSSET != null && L_rstRSSET.next())\n\t\t\t{\n\t\t\t\tstrREFDT = L_rstRSSET.getString(\"CMT_CCSVL\").trim();\n\t\t\t\tL_rstRSSET.close();\n\t\t\t\tM_calLOCAL.setTime(M_fmtLCDAT.parse(strREFDT)); // Convert Into Local Date Format\n\t\t\t\tM_calLOCAL.add(Calendar.DATE,+1); // Increase Date from +1 with Locked Date\n\t\t\t\tstrREFDT = M_fmtLCDAT.format(M_calLOCAL.getTime()); // Assign Date to Veriable \n\t\t\t\t//System.out.println(\"REFDT = \"+strREFDT);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"getREFDT\");\n\t\t}\n\t}",
"public String getClasRefNo() {\r\n return clasRefNo;\r\n }",
"public String getRef() {\r\n return this.ref;\r\n }",
"public final String getFci() {\n return String.valueOf(fci);\n }",
"public String getStatusFranchise() {\n return (String)getAttributeInternal(STATUSFRANCHISE);\n }",
"public String toString ()\n {\n return (\"CONSTANT_Fieldref\" + \"\\t\\tclassIndex=\" + classIndex + \n \"\\tnameAndTypeIndex=\" + nameAndTypeIndex);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add steps made out of metal plates leading to end of world. | private void addMetalPlateSteps()
{
// How many plates total?
final int COUNT_OF_METAL_PLATES = 20;
final int PLATES_PER_GROUP = 4;
// Add groups of plates
for (int i = 0; i < COUNT_OF_METAL_PLATES / PLATES_PER_GROUP; i += 1)
{
// Group of four metal plates all at same y position
int y = VISIBLE_HEIGHT - HALF_TILE_SIZE * 3 - i * TILE_SIZE;
// Add the individual plates in a given group
for (int j = 0; j < PLATES_PER_GROUP; j += 1)
{
int x = VISIBLE_WIDTH + TILE_SIZE * 2 + TILE_SIZE * (i + j) + TILE_SIZE * 5 * i;
MetalPlate plate = new MetalPlate(x, y);
addObject(plate, x, y);
}
}
} | [
"@Override\n\tprotected void end() {\n\t\tmyLowerArm.set(0.0);\n\t}",
"public static void worldTimeStep() {\n\t\tlookingAfterDoTimeStep = false;\n\t\tregisterOldCoordinates();\n\t\tfor (Critter c : CritterWorld.getLivingCritters()) {\n\t\t\tc.doTimeStep();\n\t\t}\n\t\tlookingAfterDoTimeStep = true;\n\t\t\n\t\tpopulateWorld();\n\t\thandleEncounters();\n\t\tdeductRestEnergy();\n\t\tspawnAlgae();\n\t\tCritterWorld.babiesToCritters();\n\t\tCritterWorld.removeDead();\n\t}",
"private static MovePath addSteps(MovePath md, Client client) {\n Entity en = md.getEntity();\n IGame game = en.getGame();\n\n // if the last step is a launch or recovery, then I want to keep that at\n // the end\n MoveStep lastStep = md.getLastStep();\n if ((lastStep != null)\n && ((lastStep.getType() == MoveStepType.LAUNCH) || (lastStep\n .getType() == MoveStepType.RECOVER) || (lastStep\n .getType() == MoveStepType.UNDOCK))) {\n md.removeLastStep();\n }\n\n // get the start and end\n Coords start = en.getPosition();\n Coords end = Compute.getFinalPosition(start, md.getFinalVectors());\n\n boolean leftMap = false;\n\n // (see LosEffects.java)\n ArrayList<Coords> in = Coords.intervening(start, end);\n // first check whether we are splitting hexes\n boolean split = false;\n double degree = start.degree(end);\n if ((degree % 60) == 30) {\n split = true;\n in = Coords.intervening(start, end, true);\n }\n\n Coords current = start;\n int facing = md.getFinalFacing();\n for (int i = 1; i < in.size(); i++) {\n\n Coords c = in.get(i);\n // check for split hexes\n // check for some number after a multiple of 3 (1,4,7,etc)\n if (((i % 3) == 1) && split) {\n\n Coords left = in.get(i);\n Coords right = in.get(i + 1);\n\n // get the total tonnage in each hex\n double leftTonnage = 0;\n for (Entity ent : game.getEntitiesVector(left)) {\n leftTonnage += ent.getWeight();\n }\n \n double rightTonnage = 0;\n for (Entity ent : game.getEntitiesVector(right)) {\n rightTonnage += ent.getWeight();\n }\n\n // TODO: I will need to update this to account for asteroids\n\n // I need to consider both of these passed through\n // for purposes of bombing\n en.addPassedThrough(right);\n en.addPassedThrough(left);\n client.sendUpdateEntity(en);\n\n // if the left is preferred, increment i so next one is skipped\n if ((leftTonnage < rightTonnage) || !game.getBoard().contains(right)) {\n i++;\n } else {\n continue;\n }\n }\n\n if(!game.getBoard().contains(c)) {\n if(game.getOptions().booleanOption(\"return_flyover\")) {\n md.addStep(MoveStepType.RETURN);\n } else {\n md.addStep(MoveStepType.OFF);\n }\n leftMap = true;\n break;\n }\n\n // which direction is this from the current hex?\n int dir = current.direction(c);\n // what kind of step do I need to get there?\n int diff = dir - facing;\n if (diff == 0) {\n md.addStep(MoveStepType.FORWARDS);\n } else if ((diff == 1) || (diff == -5)) {\n md.addStep(MoveStepType.LATERAL_RIGHT);\n } else if ((diff == -2) || (diff == 4)) {\n md.addStep(MoveStepType.LATERAL_RIGHT_BACKWARDS);\n } else if ((diff == -1) || (diff == 5)) {\n md.addStep(MoveStepType.LATERAL_LEFT);\n } else if ((diff == 2) || (diff == -4)) {\n md.addStep(MoveStepType.LATERAL_LEFT_BACKWARDS);\n } else if ((diff == 3) || (diff == -3)) {\n md.addStep(MoveStepType.BACKWARDS);\n }\n current = c;\n\n }\n\n // do I now need to add on the last step again?\n if (!leftMap && (lastStep != null) && (lastStep.getType() == MoveStepType.LAUNCH)) {\n md.addStep(MoveStepType.LAUNCH, lastStep.getLaunched());\n }\n \n if (!leftMap && (lastStep != null) && (lastStep.getType() == MoveStepType.UNDOCK)) {\n md.addStep(MoveStepType.UNDOCK, lastStep.getLaunched());\n }\n\n if (!leftMap && (lastStep != null) && (lastStep.getType() == MoveStepType.RECOVER)) {\n md.addStep(MoveStepType.RECOVER, lastStep.getRecoveryUnit(), -1);\n }\n\n return md;\n }",
"private void halfElfChanges() {\n size = \"Medium\";\n speed = 30;\n raceFeatures.add(\"Darkvision\");\n raceFeatures.add(\"Fey Ancestry\");\n }",
"private void moveCaterpillarOnScreen() {\n\t\t// Erase the body unit at the tail\n\t\tRectangle r = bodyUnits.remove(0);\n\t\twindow.remove(r);\n\t\t// Add a new body unit at the head\n\t\tPoint p = body.get(body.size() - 1);\n\t\tPoint q = body.get(body.size() - 2);\n\t\taddBodyUnit(p, q, bodyUnits.size(), Color.RED);\n\t\t// show it\n\t\twindow.doRepaint();\n\t}",
"public void addDryLand() {\n lands.add(new DryLand());\n Stdout.print(this, \"A piece of Dry land is added\");\n }",
"public void RoughTerrain()\n {\n \tSystem.out.println(\"Run RoughTerrain\");\n \tdouble getTime = 15 - Timer.getMatchTime();\n \t\n \t\n \tdouble timePhase1 = .3;\n \tdouble timePhase2 = 2.5;\n \tdouble timePhase3 = 5.5;\n \tdouble timePhase4 = 7.0;\n \t\n \tif (getTime >= timePhase4) {\n \t\t//System.out.println(\"Ramp Phase done\");\n\t\t\tRobot.pitch.adjustPitchPID(0);\t\t\t//TODO:\tSet the PID amount based on where we believe we need it to make the shot.\n\t\t\tRobotMap.driveLeft.set(0);\n\t \tRobotMap.driveRight.set(0);\n\t\t\tdone_Defense = true;\n\t\t} else if (getTime >= timePhase3) {\n\t\t\tRobotMap.driveLeft.set(.5);\n\t \tRobotMap.driveRight.set(.5);\n\t\t} else if (getTime >= timePhase2) {\n\t\t\tRobotMap.driveLeft.set(1);\n\t \tRobotMap.driveRight.set(1);\n\t\t} else if (getTime >= timePhase1)\t{\n\t\t\t//System.out.println(\"Ramp Phase 2\");\n\t\t\tRobotMap.driveLeft.set(1);\n\t \tRobotMap.driveRight.set(1);\n \t\tRobot.pitch.adjustPitchPID(0);\t\t\t\t//TODO: Set the PID amount based on the needed angle for continuing to pass the ramprts.\n \t} else {\n \t\t\n //RobotMap.pitchTalonR.setEncPosition(0);\n \t\tRobotMap.driveLeft.set(.2);\n \tRobotMap.driveRight.set(.2);\n \tRobotMap.driveLeft2.set(-.2);\n \tRobotMap.driveRight2.set(-.2);\n\t\t\t\t\t\t//TODO: Set the PID amount based on the needed angle for climbing the ramparts\n \t}\n\n }",
"private void prepareWorld()\n {\n background.scale( 600, 400);\n setBackground(background);\n addObject( new Catapult(), 80, 355);\n addObject( new CatapultBands(), 70, 320);\n addObject( birds1[Greenfoot.getRandomNumber(4)], 60, 320);\n addObject( new Wood(true), 500, 300);\n Wood wood = new Wood(true);\n addObject(wood,392,387);\n wood.setLocation(379,385);\n Wood wood2 = new Wood(true);\n addObject(wood2,382,329);\n wood2.setLocation(378,326);\n Wood wood3 = new Wood(false);\n addObject(wood3,418,394);\n wood3.setLocation(435,393);\n Wood wood4 = new Wood(false);\n addObject(wood4,408,293);\n wood4.setLocation(402,304);\n Wood wood5 = new Wood(true);\n addObject(wood5,380,361);\n wood5.setLocation(379,356);\n Wood wood6 = new Wood(false);\n addObject(wood6,522,397);\n wood6.setLocation(514,393);\n Wood wood7 = new Wood(false);\n addObject(wood7,536,366);\n wood7.setLocation(561,394);\n Pig pig = new Pig(false);\n addObject(pig,414,288);\n pig.setLocation(414,284);\n Pig pig2 = new Pig(true);\n addObject(pig2,554,371);\n pig2.setLocation(557,363);\n }",
"public void step(){\n update();\n render();\n }",
"public void step() {\r\n\t\tsimpleSystem.enableTheLiving();\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tfor (int j = 0; j < SIZE; j++) {\r\n\t\t\t\tLocation l = new Location(i, j);\r\n\t\t\t\tif (simpleSystem.getItemAt(l) == null) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsimpleSystem.getItemAt(l).act(l, simpleSystem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsimpleSystem.buryTheDead();\r\n\t}",
"private void addMountains() {\n int randRow = 0;\n int randColumn = 0;\n int randValue = 0;\n do {\n randRow = (int)(Math.round(Math.random()*(MAP_LENGTH-4))) + 2;\n randColumn = (int)(Math.round(Math.random()*(MAP_LENGTH-4))) + 2;\n for (int i = (randRow - 2); i < (randRow + 2); i++) {\n for (int j = (randColumn - 2); j < (randColumn + 2); j++) {\n if ((tileMap[i][j].getTerrain() instanceof Grass) && (tileMap[i][j].isEmpty())) {\n randValue = (int)(Math.round(Math.random()));\n if (randValue == 0) {\n tileMap[i][j] = new Space(new Mountain(i, j)); //Create a mountain\n }\n }\n }\n }\n } while (!checkMountainCoverage());\n }",
"private void performStep()\r\n\t{\r\n for(int i = 0; i < m_WuppyAmount;i++)\r\n {\r\n if(m_Wuppies[i].m_YPos <= 0)\r\n {\r\n m_Wuppies[i].m_YHeadings = 1;\r\n }\r\n else if(m_Wuppies[i].m_YPos >= aii_Canvas.getHeight())\r\n {\r\n m_Wuppies[i].m_YHeadings = -1;\r\n }\r\n\r\n if(m_Wuppies[i].m_YHeadings == 1)\r\n {\r\n m_Wuppies[i].m_YPos += 1 + i;\r\n }\r\n else{\r\n m_Wuppies[i].m_YPos -= 1 + i;\r\n }\r\n }\r\n\t}",
"public void Step() {\n Testing.methodStart(\"Asteroid.Step()\");\n Move();\n Testing.methodEnd(\"Asteroid.Step()\");\n //its logic stuff, please omit this\n //distancetosun+=Movedirection;\n // System.out.println(\"The current distance to sun is:\" +distancetosun);\n }",
"private void step() {\n try {\n this.myHandler.handleCollision(this.myBalls);\n } catch (Exception e) {\n\n }\n this.add(myHelpText);\n\n this.myBalls = this.myHandler.getNewStates();\n for (Ball ball : myBalls) {\n ball.move();\n }\n\n myLongPressCounter += 1;\n }",
"@Override\n public void placeArmies( int numberOfArmies )\n {\n if (useSmart)\n {\n m_drafterForThisGame.placeArmies(numberOfArmies);\n }\n else\n {\n super.placeArmies(numberOfArmies);\n }\n\n }",
"public void nextStep(){\n scene.getZombies().parallelStream().forEach(z -> z.moveTo(z.nextPosition, 1));\n //Ash moves towards his target.\n\n //Any zombie within a 2000 unit range around Ash is destroyed.\n\n //Zombies eat any human they share coordinates with.\n\n ++turns;\n }",
"public void nextStep() {\n for (int i = getSize() - 1; i >= 0; i--) {\n GraphicVectorEntry e = elementAt(i);\n if (e.isTemporary())\n graphicObjects.removeElementAt(i);\n }\n }",
"private void MiddleSwitch_Right() {\n\t\tswitch (step) {\n\t\tcase (0):\n\t\t\tlift.disableSpeedLimit = true;\n\t\t\tautoFunc.setSpeedLimit(1); // SPEEDLIMIT\n\t\t\tlift.setLoc(0.5); // LIFT\n\t\t\tstep++;\n\t\t\tbreak;\n\n\t\tcase (1):\n\t\t\tif (autoFunc.driveDistanceNoStop(150, 40,false)) { // DRIVE, TURN RIGHT\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (2):\n\t\t\tif (autoFunc.driveDistanceNoStop(120, -60,false)) { // DRIVE, TURN LEFT\n\t\t\t\tTimer.delay(0.15);\n\t\t\t\tintake.setSpeed(-0.4); // OUTTAKE\n\t\t\t\tTimer.delay(0.25);\n\t\t\t\tintake.setSpeed(1);\n\t\t\t\tlift.setLoc(0); // DROP LIFT\n\t\t\t\tautoFunc.setSpeedLimit(0.6);\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (3):\n\t\t\tif (autoFunc.driveDistanceNoStop(-85, -7,false)) { // DRIVE BACK\n\t\t\t\tintake.setSpeed(1); // INTAKE\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase (4):\n\t\t\tif (autoFunc.angleRelTurnLiftUpNoShoot(-43.5,false)) { // TURN\n\t\t\t\tstep++;\n\t\t\t\tTimer.delay(0.05);\n\t\t\t\tintake.setSpeed(1); // INTAKE\n\t\t\t\tautoFunc.setSpeedLimit(0.5);\n\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (5):\n\t\t\tif (autoFunc.alignIntakeCube(135, 4, false)) {// DRIVE, ALIGN\n\t\t\t\tstep++;\n\t\t\t\tTimer.delay(0.1);\n\t\t\t\tintake.setSpeed(1); // INTAKE\n\t\t\t\tautoFunc.setSpeedLimit(0.3); // SPEEDLIMIT\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (6):\n\t\t\tif (autoFunc.alignIntakeCube(20, 4, false)) {\n\t\t\t\tstep++;\n\t\t\t\tautoFunc.setSpeedLimit(0.6); // SPEEDLIMIT\n\t\t\t\tintake.setSpeed(0.5); // INTAKE\n\t\t\t\tlift.setLoc(0.5); // LIFT\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (7):\n\t\t\tif (autoFunc.driveDistanceNoStop(-107, 250,false)) { // DRIVE BACK, TURN\n\t\t\t\tautoFunc.setSpeedLimit(0.65); // SPEEDLIMIT\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (8):\n\t\t\tif (autoFunc.driveDistanceNoStop(108, 65,false)) { // TURN, DRIVE\n\t\t\t\tTimer.delay(0.1);\n\t\t\t\tintake.setSpeed(-0.4); // OUTTAKE\n\t\t\t\tTimer.delay(0.25);\n\t\t\t\tintake.setSpeed(0);\n\t\t\t\tlift.setLoc(0);\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (9):\n\t\t\tif (autoFunc.driveDistanceNoStop(-84, -7,false)) {\n\t\t\t\tintake.setSpeed(0.5);\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (10):\n\t\t\tif (autoFunc.angleRelTurnLiftUpNoShoot(-42,false)) {\n\t\t\t\tstep++;\n\t\t\t\tTimer.delay(0.05);\n\t\t\t\tintake.setSpeed(1);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (11):\n\t\t\tif (autoFunc.alignIntakeCube(144, 4, false)) {\n\t\t\t\tstep++;\n\t\t\t\tTimer.delay(0.05);\n\t\t\t\tintake.setSpeed(1);\n\t\t\t\tautoFunc.setSpeedLimit(1);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase (12):\n\t\t\tif (autoFunc.driveDistanceNoStop(10, -100,false)) {\n\t\t\t\tintake.setSpeed(0.6);\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase (13):\n\t\t\tif (autoFunc.driveDistanceNoStop(-50, -100,false)) {\n\t\t\t\tintake.setSpeed(0.3);\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase (14):\n\t\t\tif (autoFunc.driveDistanceNoStop(100, -89,false)) {\n\t\t\t\tstep++;\n\t\t\t}\n\t\t\tbreak;\n\n\t\t}\n\t}",
"public void addTileAtTheEnd(Tile tile);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo para crear un nuevo paciente mediante los datos recibidos en el frontend | @Override
public Paciente create(Paciente paciente) {
return this.pacienteRepository.save(paciente);
} | [
"Compuesta createCompuesta();",
"OperacionColeccion createOperacionColeccion();",
"public void crearCuentaAdmin() {\n if (todos().isEmpty()) {\n PersonaServicio persona = new PersonaServicio();\n persona.getPersona().setNombre(\"Franz Flores\");\n persona.getPersona().setCedula(\"1104015928\");\n persona.getPersona().setTelefono(\"2572310\");\n persona.getPersona().setDireccion(\"Andrés Bello y Juan Jose Peña\");\n persona.getPersona().setRol(new RolServicio().buscarRolNombre(\"Administrador\"));\n\n Cuenta c = new Cuenta();\n c.setUsuario(\"franz\");\n c.setClave(\"franz\");\n c.setCreacion(new Date());\n c.setPersona(persona.getPersona());\n persona.getPersona().setCuenta(c);\n persona.guardar();\n }\n }",
"@Override\n\tpublic Result create() {\n\t\ttry{\n\t\t\tJsonNode request = request().body().asJson();\n\t\t\tif(request == null)\n\t return Response.requiredJson();\n\t\t\t\n\t\t\tPartnerRequest pr = Json.fromJson(request.get(\"partner\"), PartnerRequest.class);\n\t\t\tPartner p = modelMapper.map(pr, Partner.class);\n\t\t\tp.setToken(tokenGenerator()); // se genera el token que tendra asociado el partner\n\t\t\tp.setStatus_partner(2);\n\t\t\tp = partnerDao.create(p);\n\t\t\treturn Response.createdEntity(\n\t Json.toJson(p));\n\t\t}catch(Exception e){\n return ExceptionsUtils.create(e);\n }\n\t}",
"protected void creaPagine() {\n try { // prova ad eseguire il codice\n\n this.creaPagGenerale();\n\n } catch (Exception unErrore) { // intercetta l'errore\n new Errore(unErrore);\n }// fine del blocco try-catch\n\n }",
"private void creaPagGenerale() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n pag = this.addPagina(\"Task\");\n\n pag.add(Cam.sigla.get());\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.descrizione.get());\n pag.add(pan);\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.giornilavorazione.get());\n pan.add(Cam.dataInizio.get());\n pan.add(Cam.dataUtile.get());\n pag.add(pan);\n\n pag.add(Cam.evaso.get());\n\n } catch (Exception unErrore) { // intercetta l'errore\n new Errore(unErrore);\n }// fine del blocco try-catch\n\n }",
"@Test\n public void createPacienteDiferenteTest()throws WaveTeamLogicException {\n PodamFactory factory = new PodamFactoryImpl();\n PacienteEntity newPacienteEntity = factory.manufacturePojo(PacienteEntity.class);\n \n PacienteEntity result = pacienteLogic.createPaciente(newPacienteEntity);\n Assert.assertNotNull(result);\n \n PacienteEntity entity = em.find(PacienteEntity.class, result.getId());\n Assert.assertNotNull(entity);\n System.out.println(\"=====================================================================\");\n System.out.println(\"ENCONTRO EL PACIENTE\");\n Assert.assertEquals(newPacienteEntity.getName(), entity.getName());\n System.out.println(\"=====================================================================\");\n System.out.println(\"EL NOMBRE CORRESPONDE\");\n Assert.assertEquals(newPacienteEntity.getTipoDocumento(), entity.getTipoDocumento());\n System.out.println(\"=====================================================================\");\n System.out.println(\"EL TIPO DE DOCUMENTO CORRESPONDE\");\n }",
"Operacion createOperacion();",
"protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }",
"Secuencia createSecuencia();",
"public creacionempresa() {\n initComponents();\n mostrardatos();\n }",
"void crearCampania(GestionPrecioDTO campania);",
"void crear(Cliente cliente);",
"@Test\n\tpublic void pruebaCreate(){\n\t\tpuertoPrueba = new Puerto();\n\t\tpuertoPrueba.setActivo(false);\n\t\tpuertoPrueba.setDireccion(\"DIRECCION\");\n\t\tpuertoPrueba.setEstado(\"ESTADO DE MEXICO\");\n\t\tpuertoPrueba.setIdPuerto(\"TEST\");\n\t\tpuertoPrueba.setPuerto(\"MOCHOTITLAN\");\n\t\tpuertoDao.create(puertoPrueba);\n\t}",
"com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();",
"public void crearOperacion() {\n logger.debug(\"OperacionesMB::crearOperacion\");\n CrearOperacionFL crearOperacionFL = findFlowObject(CrearOperacionFL.class, CrearOperacionFL.NOMBRE_BEAN);\n OperacionDto operacionPersistir = new OperacionDto();\n operacionPersistir.setNombreOperacion(crearOperacionFL.getNombre());\n try {\n recursoOperacionEjb.registrarOperacion(operacionPersistir);\n addInfoMessage(NOMBRE_BUNDLE_OPERACION, \"msg_operacion_guardada\");\n crearOperacionFL.setNombre(null);\n } catch (SeguridadException e) {\n SeguridadErrorHandler.handleException(e);\n }\n\n }",
"public abstract Proyectil crearProyectil(Juego juego, Entidad e);",
"public PacchettoPersonalizzato(PacchettoPredefinitoDTO pacchettoPredefinitoDTO, UserDTO cliente){\t\t\r\n\t\tluogo = pacchettoPredefinitoDTO.getLuogo();\r\n\t\tutente = Cliente.fromDTO(cliente);\r\n\t\tacquistato = false;\r\n\t\tvoliPers = new ArrayList<VoliPers>();\r\n\t\thotelsPers = new ArrayList<HotelsPers>();\r\n\t\tescursioniPers = new ArrayList<EscursioniPers>();\r\n\t\t\r\n\t\tVoliPers voloPersAndata = new VoliPers(pacchettoPredefinitoDTO.getVoloAndata(), this, false,false,false);\r\n\t\tvoliPers.add(voloPersAndata);\r\n\t\t\r\n\t\tVoliPers voloPersRitorno = new VoliPers(pacchettoPredefinitoDTO.getVoloRitorno(), this, false,false,false);\r\n\t\tvoloPersRitorno.setPacchettoPersonalizzato(this);\r\n\t\tvoliPers.add(voloPersRitorno);\r\n\t\t\r\n\t\tHotelsPers hotelPers = new HotelsPers(pacchettoPredefinitoDTO.getHotel(), this, false,false,false);\r\n\t\thotelPers.setPacchettoPersonalizzato(this);\r\n\t\thotelsPers.add(hotelPers);\r\n\t\t\r\n\t\tfor(EscursioneDTO escursioneDTO: pacchettoPredefinitoDTO.getEscursioni()){\r\n\t\t\tEscursioniPers escursionePers = new EscursioniPers(escursioneDTO, this, false, false, false);\r\n\t\t\t\r\n\t\t\tescursioniPers.add(escursionePers);\r\n\t\t}/*\r\n\t\t*/\r\n\t\t/*\r\n\t\tfor (int i=0; i< pacchettoPredefinitoDTO.getEscursioni().size();i++){\r\n\t\t\tEscursioniPers ep = new EscursioniPers(pacchettoPredefinitoDTO.getEscursioni().get(i),false,false,false);\r\n\t\t\tep.setPacchettoPersonalizzato(this);\r\n\t\t\tescursioniPers.add(ep);\r\n\t\t}\r\n\t\t*/\r\n\t}",
"@Test\r\n public void testCreate() throws Exception {\r\n PodamFactory pf=new PodamFactoryImpl();\r\n MonitoriaEntity nuevaEntity=pf.manufacturePojo(MonitoriaEntity.class);\r\n MonitoriaEntity respuestaEntity=persistence.create(nuevaEntity);\r\n Assert.assertNotNull(respuestaEntity);\r\n Assert.assertEquals(respuestaEntity.getId(), nuevaEntity.getId());\r\n Assert.assertEquals(respuestaEntity.getIdMonitor(), nuevaEntity.getIdMonitor());\r\n Assert.assertEquals(respuestaEntity.getTipo(), nuevaEntity.getTipo());\r\n \r\n \r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notification when a subpartition is released. | void onConsumedSubpartition(int subpartitionIndex) {
if (isReleased.get()) {
return;
}
int refCnt = pendingReferences.decrementAndGet();
if (refCnt == 0) {
partitionManager.onConsumedPartition(this);
}
else if (refCnt < 0) {
throw new IllegalStateException("All references released.");
}
LOG.debug("{}: Received release notification for subpartition {} (reference count now at: {}).",
this, subpartitionIndex, pendingReferences);
} | [
"public void onNoteReleased(Note note);",
"Builder addReleasedEvent(PublicationEvent value);",
"void onReleased(Session session);",
"public void releaseClaim() throws CloudnameException {\n scheduler.shutdown();\n zkClient.deregisterListener(this);\n\n while (true) {\n final TrackedConfig config;\n synchronized (trackedConfigList) {\n if (trackedConfigList.isEmpty()) {\n break;\n }\n config = trackedConfigList.remove(0);\n }\n config.stop();\n }\n\n sendEventToCoordinateListener(\n CoordinateListener.Event.NOT_OWNER, \"Released claim of coordinate\");\n\n synchronized (lastStatusVersionMonitor) {\n try {\n zkClient.getZookeeper().delete(path, lastStatusVersion);\n } catch (InterruptedException e) {\n throw new CloudnameException(e);\n } catch (KeeperException e) {\n throw new CloudnameException(e);\n }\n }\n }",
"public EventMapper onRelease(final Consumer<Set<Duty>> consumer) {\n\t\tinitConsumerDelegate();\n\t\t((ConsumerDelegate)getDepPlaceholder().getDelegate()).putConsumer(consumer, MappingEvent.release);\n\t\treturn this;\n\t}",
"protected void diskBlockReleased() {\n if (statistics != null) {\n statistics.diskBlockReleased();\n }\n }",
"public synchronized void release() {\n if (available) {\n throw new IllegalArgumentException(\"Ewok is already Available\");\n }\n this.available = true;\n notifyAll();\n }",
"@Override\n public void receive(SubscriptionDeletion event) {\n logger.info(\"###Received subscription deletion event with id:\" + event.getSubscription().getId());\n }",
"public void release()\n {\n logger.fine(\"[DT] Worker Manager called release for deliveryThread \");\n }",
"private void triggerDistributionAndListenerNotification() {\n if (event.isConcurrencyConflict()\n && (event.getVersionTag() != null && event.getVersionTag().isGatewayTag())) {\n doPart3 = false;\n }\n // distribution and listener notification\n if (doPart3) {\n internalRegion.basicDestroyPart3(regionEntry, event, inTokenMode, duringRI, true,\n expectedOldValue);\n }\n }",
"protected void notifyDeleted() {}",
"public void notifySpaceAvailable(MediaStorageVolume msv);",
"private void release() {\n noxItemCatalog.release();\n noxItemCatalog.deleteObserver(catalogObserver);\n }",
"public void release()\n\t{\n\t\tsynchronized(reserved){\n\t\t\treserved = Boolean.TRUE;\n\t\t\towner = null;\n\t\t}\n\t\tdispatchResourceEvent(false);\n\t}",
"public boolean unsubscribe( Subscription sub ) throws IOException;",
"public interface SubChangeListener\n extends EventListener\n {\n /**\n * Invoked after a sub-trait is modified, added, removed, or un-removed.\n *\n * @param evt a SubChangeEvent object describing the event source and\n * the sub trait as well as the action being taken\n */\n void subChange(SubChangeEvent evt);\n }",
"public void testBoundaryEventSubscrptionsDeletedOnProcessInstanceDelete() {\n String deploymentId1 = deployBoundaryMessageTestProcess();\n runtimeService.startProcessInstanceByKeyAndTenantId(\"messageTest\", TENANT_ID);\n assertThat(taskService.createTaskQuery().singleResult().getName()).isEqualTo(\"My Task\");\n\n String deploymentId2 = deployBoundaryMessageTestProcess();\n ProcessInstance processInstance2 = runtimeService.startProcessInstanceByKeyAndTenantId(\"messageTest\", TENANT_ID);\n assertThat(taskService.createTaskQuery().count()).isEqualTo(2);\n assertThat(getAllEventSubscriptions()).hasSize(2);\n\n // Deleting PI of second deployment\n runtimeService.deleteProcessInstance(processInstance2.getId(), \"testing\");\n assertThat(taskService.createTaskQuery().singleResult().getName()).isEqualTo(\"My Task\");\n assertThat(getAllEventSubscriptions()).hasSize(1);\n\n runtimeService.messageEventReceived(\"myMessage\", getExecutionIdsForMessageEventSubscription(\"myMessage\").get(0));\n assertThat(getAllEventSubscriptions()).hasSize(0);\n assertThat(taskService.createTaskQuery().singleResult().getName()).isEqualTo(\"Task after message\");\n\n cleanup(deploymentId1, deploymentId2);\n }",
"void unsubscribeVolume();",
"void unsubscribe(String queueName, String consumerName);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column lz_dialset.Odds6 | public void setOdds6(BigDecimal odds6) {
this.odds6 = odds6;
} | [
"public BigDecimal getOdds6() {\r\n return odds6;\r\n }",
"public void setOdds5(BigDecimal odds5) {\r\n this.odds5 = odds5;\r\n }",
"@Override\n public void setSym6(java.lang.Object sym6) throws G2AccessException {\n setAttributeValue (SYM_6_, sym6);\n }",
"public void setOdds(Double odds) {\n this.odds = odds;\n }",
"public void setHouriops6(Integer houriops6) {\r\n this.houriops6 = houriops6;\r\n }",
"public void setUnknown6(int unknown6)\r\n\t{\r\n\t\tthis.unknown6 = unknown6;\r\n\t}",
"public BigDecimal getOdds5() {\r\n return odds5;\r\n }",
"public void setNum6(int value) {\n this.num6 = value;\n }",
"public void setOdds1(BigDecimal odds1) {\r\n this.odds1 = odds1;\r\n }",
"public void setCol6(String col6) {\r\n this.col6 = col6;\r\n }",
"public void setOdds2(BigDecimal odds2) {\r\n this.odds2 = odds2;\r\n }",
"public void setOdds4(BigDecimal odds4) {\r\n this.odds4 = odds4;\r\n }",
"public void setHour6(Integer hour6) {\r\n this.hour6 = hour6;\r\n }",
"public void setNumpad6(boolean numpad6) {\n\tthis.numpad6 = numpad6;\n }",
"public void setValue6(String value)\n {\n value6 = value;\n }",
"public void setC6(Boolean c6) {\n\t\tthis.c6 = c6;\n\t}",
"public void setHouriops5(Integer houriops5) {\r\n this.houriops5 = houriops5;\r\n }",
"public void seteSix(Integer eSix) {\n this.eSix = eSix;\n }",
"public void setOcOptNm6(String ocOptNm6) {\n this.ocOptNm6 = ocOptNm6 == null ? null : ocOptNm6.trim();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds the passed metadata object to the cell with cellID cid. logs errors if the cell does not exist or the metadata type has not been registered. Calls metadataModification to alert listeners of change. | void addMetadata(CellID cid, Metadata metadata){
db.addMetadata(cid, metadata);
metadataModification(cid, metadata);
} | [
"void modifyMetadata(MetadataID mid, CellID cid, Metadata metadata){\n db.removeMetadata(mid);\n db.addMetadata(cid, metadata);\n metadataModification(cid, metadata);\n }",
"<E extends CtElement> E putMetadata(String key, Object val);",
"protected void cellAdded(ICell cell) {\n if (cell != null) {\n\n if (cell.getId() == null && isCreateIds()) {\n cell.setId(createId(cell));\n }\n\n if (cell.getId() != null) {\n Object collision = getCell(cell.getId());\n\n if (collision != cell) {\n while (collision != null) {\n cell.setId(createId(cell));\n collision = getCell(cell.getId());\n }\n\n if (cells == null) {\n cells = new HashMap<>();\n }\n\n cells.put(cell.getId(), cell);\n }\n }\n\n // Makes sure IDs of deleted cells are not reused\n try {\n int id = Integer.parseInt(cell.getId());\n nextId = Math.max(nextId, id + 1);\n } catch (NumberFormatException e) {\n // most likely this just means a custom cell id and that it's\n // not a simple number - should be safe to skip\n log.log(Level.FINEST, \"Failed to parse cell id\", e);\n }\n\n int childCount = cell.getChildCount();\n\n for (int i = 0; i < childCount; i++) {\n cellAdded(cell.getChildAt(i));\n }\n }\n }",
"public void clearCellMetadata(CellID cid){\n db.clearCellMetadata(cid);\n }",
"private void addMetadataItemType(Connection conn, String typeName)\n throws SQLException {\n final String DEBUG_HEADER = \"addMetadataItemType(): \";\n if (log.isDebug2())\n log.debug2(DEBUG_HEADER + \"typeName = '\" + typeName + \"'.\");\n\n // Ignore an empty metadata item type.\n if (StringUtil.isNullString(typeName)) {\n return;\n }\n\n if (conn == null) {\n throw new IllegalArgumentException(\"Null connection\");\n }\n\n PreparedStatement insertMetadataItemType = null;\n\n try {\n insertMetadataItemType = prepareStatement(conn,\n\t INSERT_MD_ITEM_TYPE_QUERY);\n insertMetadataItemType.setString(1, typeName);\n\n int count = executeUpdate(insertMetadataItemType);\n if (log.isDebug3()) log.debug3(DEBUG_HEADER + \"count = \" + count);\n } catch (SQLException sqle) {\n log.error(\"Cannot add a metadata item type\", sqle);\n log.error(\"typeName = '\" + typeName + \"'.\");\n log.error(\"SQL = '\" + INSERT_MD_ITEM_TYPE_QUERY + \"'.\");\n throw sqle;\n } catch (RuntimeException re) {\n log.error(\"Cannot add a metadata item type\", re);\n log.error(\"typeName = '\" + typeName + \"'.\");\n log.error(\"SQL = '\" + INSERT_MD_ITEM_TYPE_QUERY + \"'.\");\n throw re;\n } finally {\n JdbcBridge.safeCloseStatement(insertMetadataItemType);\n }\n\n if (log.isDebug2()) log.debug2(DEBUG_HEADER + \"Done.\");\n }",
"public boolean add (long batchId, T metadata) { throw new RuntimeException(); }",
"boolean put( SerializableMetadata meta ) throws IOException;",
"void addCellContent(Cell cell, String content);",
"ClipboardMetaDTO addEntryMeta(String entryId, ClipboardMetaDTO meta)\n\t\t\tthrows QClipboardException;",
"org.apache.xmlbeans.XmlObject addNewCValue();",
"private void addMetadatum(DocStructInterface level, String key, String value, boolean fail) {\n try {\n level.addMetadata(key, value);\n } catch (Exception e) {\n if (fail) {\n throw new RuntimeException(\"Could not create metadatum \" + key + \" in \"\n + (level.getDocStructType() != null ? \"DocStrctType \" + level.getDocStructType().getName()\n : \"anonymous DocStrctType\")\n + \": \" + e.getClass().getSimpleName().replace(\"NullPointerException\",\n \"No metadata types are associated with that DocStructType.\"),\n e);\n }\n }\n }",
"public void addCell(DataCell cell)\n {\n cells.add(cell);\n }",
"public NotebookCell setMetadata(Object metadata) {\n this.metadata = metadata;\n return this;\n }",
"public void addSampleCellType(Integer id, Param cellType) {\r\n if (id <= 0) {\r\n throw new IllegalArgumentException(\"Sample id should be great than 0!\");\r\n }\r\n if (cellType == null) {\r\n return;\r\n }\r\n\r\n Sample sample = sampleMap.get(id);\r\n if (sample == null) {\r\n sample = new Sample(id);\r\n sample.addCellType(cellType);\r\n sampleMap.put(id, sample);\r\n } else {\r\n sample.addCellType(cellType);\r\n }\r\n }",
"public long addCells(String location_id, int lac, int cellid) {\n ContentValues initialValues = new ContentValues();\n initialValues.put(KEY_CELL_LOCATION, location_id);\n initialValues.put(KEY_CELL_LAC, lac);\n initialValues.put(KEY_CELL_CELLID, cellid);\n return db.insert(DATABASE_TABLE_CELL, null, initialValues);\n }",
"void storeComponentMetaData(final CheckpointInfo info, final CheckpointMetadata metadata)\n throws StatefulStorageException;",
"public void addCell(Cell cell) \n {\n cells.add(cell);\n }",
"private void addMetadataByString(Metadata metadata, String name, String value) {\n if (value != null) {\n metadata.add(name, value);\n }\n }",
"public gov.ucore.ucore._2_0.ContentMetadataType addNewMetadata()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.ContentMetadataType target = null;\n target = (gov.ucore.ucore._2_0.ContentMetadataType)get_store().add_element_user(METADATA$0);\n return target;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ ori: 1 2 3 4 5 number items to rotate: 2 expected result: 3 4 5 1 2 | @Test
public void rotateArray_rotateLeftTwoItems() {
int[] nums = prepareInputArray(5);
int[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 2);
assertThat(rotatedArray[0], equalTo(3));
assertThat(rotatedArray[1], equalTo(4));
assertThat(rotatedArray[2], equalTo(5));
assertThat(rotatedArray[3], equalTo(1));
assertThat(rotatedArray[4], equalTo(2));
} | [
"public void rotate(ArrayList<ArrayList<Integer>> a) {\n int n=a.size();\n for(int i=0; i<n/2; i++) {\n for(int j=0; j<Math.ceil(n/2.0); j++) {\n int temp = a.get(i).get(j);\n a.get(i).set(j, a.get(n-1-j).get(i));\n a.get(n-1-j).set(i, a.get(n-1-i).get(n-1-j));\n a.get(n-1-i).set(n-1-j, a.get(j).get(n-1-i));\n a.get(j).set(n-1-i, temp);\n }\n }\n }",
"@Test\n\tpublic void rotateArray_rotateLeftOneItem() {\n\t\tint[] nums = prepareInputArray(5);\n\t\tint[] rotatedArray = ArrayLeftRotation.rotateArray(nums, 1);\n\t\tassertThat(rotatedArray[0], equalTo(2));\n\t\tassertThat(rotatedArray[1], equalTo(3));\n\t\tassertThat(rotatedArray[2], equalTo(4));\n\t\tassertThat(rotatedArray[3], equalTo(5));\n\t\tassertThat(rotatedArray[4], equalTo(1));\n\t}",
"private int[] leftrotate(int[] arr, int times) {\n assert (arr.length == 4);\n if (times % 4 == 0) {\n return arr;\n }\n while (times > 0) {\n int temp = arr[0];\n System.arraycopy(arr, 1, arr, 0, arr.length - 1);\n arr[arr.length - 1] = temp;\n --times;\n }\n return arr;\n }",
"public void rotate(int n) {\n\t\t// get GCD of array length and rotation factor\n\t\tint gcd = getGCD(this.a.length, n);\n\t\t// temporary variable to store first element\n\t\tint t;\n\t\t// other temporary variable to jump from one element to other by n\n\t\tint t1;\n\t\tint t2;\n\t\tfor (int i = 0; i < gcd; i++) {\n\t\t\t// getting first element of first part\n\t\t\tt = this.a[i];\n\t\t\tt1 = i;\n\t\t\t// doing jump from one index to other by n\n\t\t\twhile (true) {\n\t\t\t\t// moving forward by n\n\t\t\t\tt2 = t1 + n;\n\t\t\t\t// if t2 reach end of the array\n\t\t\t\tif (t2 >= this.a.length)\n\t\t\t\t\tt2 = t2 - this.a.length;\n\t\t\t\tif (t2 == i)\n\t\t\t\t\tbreak;\n\t\t\t\t// put number at t2 into t1\n\t\t\t\tthis.a[t1] = this.a[t2];\n\t\t\t\t// move t1 to t2\n\t\t\t\tt1 = t2;\n\t\t\t}\n\t\t\t// finally set last element ot first element\n\t\t\tthis.a[t1] = t;\n\t\t}\n\t}",
"public static int[][] rotate(int[][] a){//take 7 4 1 in 3 by 3 then 8 5 2\n\t\tint storage1 = a[0][1];\n\t\tint storage2 = a[0][2];\n\t\tint storage3 = a[1][2];\n\t\tint storage4 = a[0][0];\n\t\tfor(int i = 0; i < a.length; i++) {\n\t\t\tfor(int j = 0; j < a[i].length; j++) {\n\t\t\t\ta[i][j] = a[2-j][i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < a.length; i++) {\n\t\t\tfor(int j = 0; j < a[i].length; j++) {\n\t\t\t\tif(i == 0 && j == 2)\n\t\t\t\t\ta[i][j] = storage4;\n\t\t\t\telse if(i == 1 && j == 2)\n\t\t\t\t\ta[i][j] = storage1;\n\t\t\t\telse if(i == 2 && j == 1)\n\t\t\t\t\ta[i][j] = storage3;\n\t\t\t\telse if(i == 2 && j == 2)\n\t\t\t\t\ta[i][j] = storage2;\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}",
"public void rotate2(int[] nums, int k) {\n int start = 0, n = nums.length;\n k %= n;\n while (n > 0 && k > 0) {\n // Swap the last k elements with the first k elements.\n // The last k elements will be in the correct positions\n // but we need to rotate the remaining (n - k) elements\n // to the right by k steps.\n for (int i = 0; i < k; i++) {\n swap(nums, i + start, n - k + i + start);\n }\n n -= k;\n start += k;\n k %= n;\n }\n }",
"public TList<T> rotate(int x) {\n assert -size()<x && x<size();\n if (x==0)\n return this;\n if (0<x)\n return TList.concat(subList(x, size()), subList(0, x));\n else\n return TList.concat(subList(size()+x, size()), subList(0, size()+x));\n }",
"public void rightRotate(int num)\n\t{\n\t\twhile(num>count||num<count*-1) //This gets rid of any unnecessary shifts.\n\t\t{\n\t\t\tif (num>count)\n\t\t\t{\n\t\t\t\tnum = num-count;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnum = num+count;\n\t\t\t}\n\t\t}\n\t\tif(num>=0) //If num is greater positive or zero, it will do num amounts of shiftRight()s\n\t\t{\n\t\t\tfor(int i = num; i>0; i--)\n\t\t\t{\n\t\t\t\tshiftRight();\n\t\t\t}\n\t\t}\n\t\telse //Otherwise it will do num amounts of shiftLeft()s\n\t\t{\n\t\t\tfor(int i = num*-1; i>0; i--)\n\t\t\t{\n\t\t\t\tshiftLeft();\n\t\t\t}\n\t\t}\n\n\t}",
"void rotate() {\r\n Rotor rightMost = _allRotorsOrdered\r\n .get(_allRotorsOrdered.size() - 1);\r\n int[] rotorSettings = new int[numRotors()];\r\n\r\n for (int i = 0; i < _allRotorsOrdered.size() - 1; i += 1) {\r\n Rotor rotorLeft = _allRotorsOrdered.get(i),\r\n rotorRight = _allRotorsOrdered.get(i + 1);\r\n if (rotorLeft.rotates() && rotorRight.atNotch()\r\n && rotorSettings[i] == 0) {\r\n rotorLeft.advance();\r\n rotorSettings[i] = 1;\r\n if (rotorRight.rotates()) {\r\n rotorRight.advance();\r\n rotorSettings[i + 1] = 1;\r\n }\r\n }\r\n }\r\n\r\n if (rotorSettings[numRotors() - 1] == 0 && rightMost.rotates()) {\r\n rightMost.advance();\r\n }\r\n }",
"public static void rotate2(int[] nums, int k) {\n if (k <= 0 || nums.length == 0) {\n return;\n }\n int startIndex = 0;\n int curNum = nums[startIndex];\n int curIndex = startIndex;\n for (int swapTimes = 0; swapTimes < nums.length; swapTimes++) {\n int nextIndex = (curIndex + k) % nums.length;\n int tempNum = nums[nextIndex];\n nums[nextIndex] = curNum;\n curNum = tempNum;\n curIndex = nextIndex;\n if (startIndex == curIndex && ++startIndex < nums.length) { // avoid 2 nums swap casue endless loop\n curNum = nums[startIndex];\n curIndex = startIndex;\n }\n }\n }",
"private int rotate(int x, int n) {\n return (((x) << (n)) | ((x) >>> (32 - (n))));\n }",
"public static void rotate(int[] digits) {\n\tint mostSignificant = digits[0];\n\tfor(int i = 1; i < digits.length; i++) {\n\t digits[i-1] = digits[i];\n\t}\n\tdigits[digits.length-1] = mostSignificant;\n }",
"public void rotate(int[] nums, int k) {\r\n k = k % nums.length;\r\n int start = 0,\r\n count = 0,\r\n cur = start,\r\n prevValue = nums[cur];\r\n while(count < nums.length) {\r\n int next = (cur + k) % nums.length;\r\n int temp = nums[next];\r\n nums[next] = prevValue;\r\n prevValue = temp;\r\n cur = next;\r\n if (cur == start) {\r\n start++;\r\n // to prevent preValue out of index boundary\r\n if (start == nums.length) break; \r\n cur = start;\r\n prevValue = nums[cur];\r\n }\r\n count++;\r\n }\r\n }",
"public void rotateClockwise() {\n\t\tswapPieces(0, 2, 0, 0);\n\t\tswapPieces(0, 0, 2, 0);\n\t\tswapPieces(2, 0, 2, 2);\n\n\t\tswapPieces(0, 1, 1, 0);\n\t\tswapPieces(1, 0, 2, 1);\n\t\tswapPieces(2, 1, 1, 2);\n\t}",
"static int[] rightRotateArray(int[] arry,int n) {\r\n\t\t\tint len = arry.length;\r\n\t\t\tint[] tempArry= new int[n];\r\n\t\t\tfor(int i=0;i<n;i++) {\r\n\t\t\t\ttempArry[i]=arry[len-(n-i)];\r\n\t\t\t}\t\r\n\t\t\tfor(int i=0;i<len-n;i++) {\r\n\t\t\t\tarry[(len-1)-i]= arry[(len-1)-(n+i)];\t\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<n;i++) {\r\n\t\t\t\tarry[i]=tempArry[i];\r\n\t\t\t}\t\r\n\t\t\treturn arry;\r\n\t\t}",
"private static int[] circularRotate(int[] array) {\n int temp = array[array.length - 1];\n for (int i = array.length - 1; i > 0; --i) {\n array[i] = array[i - 1];\n\n }\n array[0] = temp;\n return array;\n\n }",
"static int[] leftRotateArray(int[] arry,int n) {\r\n\t\tint len = arry.length;\r\n\t\tint[] tempArry= new int[n];\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\ttempArry[i]=arry[i];\r\n\t\t}\t\r\n\t\tfor(int i=0;i<len-n;i++) {\r\n\t\t\tarry[i]=arry[i+n];\r\n\t\t}\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\tarry[(len-n)+i]=tempArry[i];\r\n\t\t}\t\r\n\t\treturn arry;\r\n\t}",
"public void rotateBack(){\n this.rotation = (this.rotation + 3) % 4;\n }",
"public static void rotateArr(int[] N, int D) \n {\n for (int i = 0; i < D; i++)\n {\n rotation( N , D); //calling the logic method which performs rotation\n }\n\n //printing output after 2 times left rotation\n System.out.println(\"Elements after left rotation of array: \");\n for(int i=0;i<N.length;i++)\n {\n System.out.print(N[i]+\" \");\n }\n \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XClosure__Group_1_0_0__0__Impl" $ANTLR start "rule__XClosure__Group_1_0_0__1" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8033:1: rule__XClosure__Group_1_0_0__1 : rule__XClosure__Group_1_0_0__1__Impl ; | public final void rule__XClosure__Group_1_0_0__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8037:1: ( rule__XClosure__Group_1_0_0__1__Impl )
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8038:2: rule__XClosure__Group_1_0_0__1__Impl
{
pushFollow(FOLLOW_rule__XClosure__Group_1_0_0__1__Impl_in_rule__XClosure__Group_1_0_0__116485);
rule__XClosure__Group_1_0_0__1__Impl();
state._fsp--;
if (state.failed) return ;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__XClosure__Group_1_0_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8048:1: ( ( ( rule__XClosure__Group_1_0_0_1__0 )* ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8049:1: ( ( rule__XClosure__Group_1_0_0_1__0 )* )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8049:1: ( ( rule__XClosure__Group_1_0_0_1__0 )* )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8050:1: ( rule__XClosure__Group_1_0_0_1__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup_1_0_0_1()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8051:1: ( rule__XClosure__Group_1_0_0_1__0 )*\n loop63:\n do {\n int alt63=2;\n int LA63_0 = input.LA(1);\n\n if ( (LA63_0==52) ) {\n alt63=1;\n }\n\n\n switch (alt63) {\n \tcase 1 :\n \t // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8051:2: rule__XClosure__Group_1_0_0_1__0\n \t {\n \t pushFollow(FOLLOW_rule__XClosure__Group_1_0_0_1__0_in_rule__XClosure__Group_1_0_0__1__Impl16512);\n \t rule__XClosure__Group_1_0_0_1__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop63;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup_1_0_0_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7959:1: ( ( ( rule__XClosure__Group_1_0_0__0 )? ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7960:1: ( ( rule__XClosure__Group_1_0_0__0 )? )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7960:1: ( ( rule__XClosure__Group_1_0_0__0 )? )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7961:1: ( rule__XClosure__Group_1_0_0__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup_1_0_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7962:1: ( rule__XClosure__Group_1_0_0__0 )?\n int alt62=2;\n int LA62_0 = input.LA(1);\n\n if ( (LA62_0==RULE_ID||LA62_0==29||LA62_0==60) ) {\n alt62=1;\n }\n switch (alt62) {\n case 1 :\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7962:2: rule__XClosure__Group_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XClosure__Group_1_0_0__0_in_rule__XClosure__Group_1_0__0__Impl16333);\n rule__XClosure__Group_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_1_0_0_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8100:1: ( rule__XClosure__Group_1_0_0_1__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8101:2: rule__XClosure__Group_1_0_0_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XClosure__Group_1_0_0_1__1__Impl_in_rule__XClosure__Group_1_0_0_1__116609);\n rule__XClosure__Group_1_0_0_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7883:1: ( rule__XClosure__Group_0_0__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7884:2: rule__XClosure__Group_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XClosure__Group_0_0__1__Impl_in_rule__XClosure__Group_0_0__116181);\n rule__XClosure__Group_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7928:1: ( ( ( rule__XClosure__Group_1_0__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7929:1: ( ( rule__XClosure__Group_1_0__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7929:1: ( ( rule__XClosure__Group_1_0__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7930:1: ( rule__XClosure__Group_1_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup_1_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7931:1: ( rule__XClosure__Group_1_0__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7931:2: rule__XClosure__Group_1_0__0\n {\n pushFollow(FOLLOW_rule__XClosure__Group_1_0__0_in_rule__XClosure__Group_1__0__Impl16271);\n rule__XClosure__Group_1_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_1_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7976:1: ( rule__XClosure__Group_1_0__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7977:2: rule__XClosure__Group_1_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XClosure__Group_1_0__1__Impl_in_rule__XClosure__Group_1_0__116364);\n rule__XClosure__Group_1_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7738:1: ( ( ( rule__XClosure__Group_1__0 )? ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7739:1: ( ( rule__XClosure__Group_1__0 )? )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7739:1: ( ( rule__XClosure__Group_1__0 )? )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7740:1: ( rule__XClosure__Group_1__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup_1()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7741:1: ( rule__XClosure__Group_1__0 )?\n int alt61=2;\n alt61 = dfa61.predict(input);\n switch (alt61) {\n case 1 :\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7741:2: rule__XClosure__Group_1__0\n {\n pushFollow(FOLLOW_rule__XClosure__Group_1__0_in_rule__XClosure__Group__1__Impl15903);\n rule__XClosure__Group_1__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7709:1: ( ( ( rule__XClosure__Group_0__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7710:1: ( ( rule__XClosure__Group_0__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7710:1: ( ( rule__XClosure__Group_0__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7711:1: ( rule__XClosure__Group_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7712:1: ( rule__XClosure__Group_0__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7712:2: rule__XClosure__Group_0__0\n {\n pushFollow(FOLLOW_rule__XClosure__Group_0__0_in_rule__XClosure__Group__0__Impl15843);\n rule__XClosure__Group_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7833:1: ( ( ( rule__XClosure__Group_0_0__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7834:1: ( ( rule__XClosure__Group_0_0__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7834:1: ( ( rule__XClosure__Group_0_0__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7835:1: ( rule__XClosure__Group_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup_0_0()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7836:1: ( rule__XClosure__Group_0_0__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7836:2: rule__XClosure__Group_0_0__0\n {\n pushFollow(FOLLOW_rule__XClosure__Group_0_0__0_in_rule__XClosure__Group_0__0__Impl16088);\n rule__XClosure__Group_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_1_0_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9654:1: ( ( ( rule__XClosure__Group_1_0_0_1__0 )* ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9655:1: ( ( rule__XClosure__Group_1_0_0_1__0 )* )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9655:1: ( ( rule__XClosure__Group_1_0_0_1__0 )* )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9656:1: ( rule__XClosure__Group_1_0_0_1__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup_1_0_0_1()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9657:1: ( rule__XClosure__Group_1_0_0_1__0 )*\n loop76:\n do {\n int alt76=2;\n int LA76_0 = input.LA(1);\n\n if ( (LA76_0==51) ) {\n alt76=1;\n }\n\n\n switch (alt76) {\n \tcase 1 :\n \t // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9657:2: rule__XClosure__Group_1_0_0_1__0\n \t {\n \t pushFollow(FOLLOW_rule__XClosure__Group_1_0_0_1__0_in_rule__XClosure__Group_1_0_0__1__Impl19766);\n \t rule__XClosure__Group_1_0_0_1__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop76;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup_1_0_0_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleXClosure() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2546:2: ( ( ( rule__XClosure__Group__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2547:1: ( ( rule__XClosure__Group__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2547:1: ( ( rule__XClosure__Group__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2548:1: ( rule__XClosure__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXClosureAccess().getGroup()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2549:1: ( rule__XClosure__Group__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2549:2: rule__XClosure__Group__0\r\n {\r\n pushFollow(FOLLOW_rule__XClosure__Group__0_in_ruleXClosure5388);\r\n rule__XClosure__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXClosureAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__XClosure__Group_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9643:1: ( rule__XClosure__Group_1_0_0__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9644:2: rule__XClosure__Group_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XClosure__Group_1_0_0__1__Impl_in_rule__XClosure__Group_1_0_0__119739);\n rule__XClosure__Group_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9565:1: ( ( ( rule__XClosure__Group_1_0_0__0 )? ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9566:1: ( ( rule__XClosure__Group_1_0_0__0 )? )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9566:1: ( ( rule__XClosure__Group_1_0_0__0 )? )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9567:1: ( rule__XClosure__Group_1_0_0__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup_1_0_0()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9568:1: ( rule__XClosure__Group_1_0_0__0 )?\n int alt75=2;\n int LA75_0 = input.LA(1);\n\n if ( (LA75_0==RULE_ID||LA75_0==30||LA75_0==56) ) {\n alt75=1;\n }\n switch (alt75) {\n case 1 :\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9568:2: rule__XClosure__Group_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XClosure__Group_1_0_0__0_in_rule__XClosure__Group_1_0__0__Impl19587);\n rule__XClosure__Group_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9489:1: ( rule__XClosure__Group_0_0__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9490:2: rule__XClosure__Group_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XClosure__Group_0_0__1__Impl_in_rule__XClosure__Group_0_0__119435);\n rule__XClosure__Group_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7822:1: ( rule__XClosure__Group_0__0__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7823:2: rule__XClosure__Group_0__0__Impl\n {\n pushFollow(FOLLOW_rule__XClosure__Group_0__0__Impl_in_rule__XClosure__Group_0__016061);\n rule__XClosure__Group_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleXClosure() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:920:2: ( ( ( rule__XClosure__Group__0 ) ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:921:1: ( ( rule__XClosure__Group__0 ) )\n {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:921:1: ( ( rule__XClosure__Group__0 ) )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:922:1: ( rule__XClosure__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup()); \n }\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:923:1: ( rule__XClosure__Group__0 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:923:2: rule__XClosure__Group__0\n {\n pushFollow(FOLLOW_rule__XClosure__Group__0_in_ruleXClosure1905);\n rule__XClosure__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group_1_0_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8008:1: ( rule__XClosure__Group_1_0_0__0__Impl rule__XClosure__Group_1_0_0__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:8009:2: rule__XClosure__Group_1_0_0__0__Impl rule__XClosure__Group_1_0_0__1\n {\n pushFollow(FOLLOW_rule__XClosure__Group_1_0_0__0__Impl_in_rule__XClosure__Group_1_0_0__016425);\n rule__XClosure__Group_1_0_0__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XClosure__Group_1_0_0__1_in_rule__XClosure__Group_1_0_0__016428);\n rule__XClosure__Group_1_0_0__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9344:1: ( ( ( rule__XClosure__Group_1__0 )? ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9345:1: ( ( rule__XClosure__Group_1__0 )? )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9345:1: ( ( rule__XClosure__Group_1__0 )? )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9346:1: ( rule__XClosure__Group_1__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXClosureAccess().getGroup_1()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9347:1: ( rule__XClosure__Group_1__0 )?\n int alt74=2;\n alt74 = dfa74.predict(input);\n switch (alt74) {\n case 1 :\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9347:2: rule__XClosure__Group_1__0\n {\n pushFollow(FOLLOW_rule__XClosure__Group_1__0_in_rule__XClosure__Group__1__Impl19157);\n rule__XClosure__Group_1__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXClosureAccess().getGroup_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__XClosure__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7697:1: ( rule__XClosure__Group__0__Impl rule__XClosure__Group__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7698:2: rule__XClosure__Group__0__Impl rule__XClosure__Group__1\n {\n pushFollow(FOLLOW_rule__XClosure__Group__0__Impl_in_rule__XClosure__Group__015813);\n rule__XClosure__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XClosure__Group__1_in_rule__XClosure__Group__015816);\n rule__XClosure__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Patch a Genesys Cloud user's presence The presence object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the PURECLOUD source as the user's primary presence source. Option 2: Provide the presenceDefinition value. The 'id' is the only value required within the presenceDefinition. Option 3: Provide the message value. Option 1 can be combined with Option 2 and/or Option 3. | public ApiResponse<UserPresence> patchUserPresencesPurecloud(ApiRequest<UserPresence> request) throws IOException {
try {
return pcapiClient.invoke(request, new TypeReference<UserPresence>() {});
}
catch (ApiException exception) {
@SuppressWarnings("unchecked")
ApiResponse<UserPresence> response = (ApiResponse<UserPresence>)(ApiResponse<?>)exception;
return response;
}
catch (Throwable exception) {
if (pcapiClient.getShouldThrowErrors()) {
if (exception instanceof IOException) {
throw (IOException)exception;
}
throw new RuntimeException(exception);
}
@SuppressWarnings("unchecked")
ApiResponse<UserPresence> response = (ApiResponse<UserPresence>)(ApiResponse<?>)(new ApiException(exception));
return response;
}
} | [
"public ApiResponse<UserPresence> patchUserPresence(ApiRequest<UserPresence> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<UserPresence>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<UserPresence> response = (ApiResponse<UserPresence>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<UserPresence> response = (ApiResponse<UserPresence>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"public UserPresence patchUserPresence(PatchUserPresenceRequest request) throws IOException, ApiException {\n try {\n ApiResponse<UserPresence> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<UserPresence>() {});\n return response.getBody();\n }\n catch (ApiException | IOException exception) {\n if (pcapiClient.getShouldThrowErrors()) throw exception;\n return null;\n }\n }",
"void setPresence( Presence presence );",
"public ApiResponse<OrganizationPresence> putPresencedefinition(ApiRequest<OrganizationPresence> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<OrganizationPresence>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<OrganizationPresence> response = (ApiResponse<OrganizationPresence>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<OrganizationPresence> response = (ApiResponse<OrganizationPresence>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"public UserPresence patchUserPresence(String userId, String sourceId, UserPresence body) throws IOException, ApiException {\n return patchUserPresence(createPatchUserPresenceRequest(userId, sourceId, body));\n }",
"public void updatePresence(Presence presence) {\n \tElement presenceElement = new Element(\"presence\");\n \t\n \tif (presence.getType() != null) {\n \t\tpresenceElement.setAttribute(\"type\", presence.getType());\n \t}\n \t\n \tif (presence.getStatus() != null) {\n \t\tElement statusElement = new Element(\"status\");\n \t\tstatusElement.setText(presence.getStatus());\n \t\t\n \t\tpresenceElement.addContent(statusElement);\n \t}\n \t\n \tif (presence.getShow() != null) {\n \t\tElement showElement = new Element(\"show\");\n \t\tshowElement.setText(presence.getShow());\n \t\t\n \t\tpresenceElement.addContent(showElement);\n \t}\n\t\t\n\t\tclient.sendStanza(presenceElement);\n }",
"public void setPresenceModel(PresenceModel presence);",
"public ApiResponse<OrganizationPresenceDefinition> putPresenceDefinition0(ApiRequest<OrganizationPresenceDefinition> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<OrganizationPresenceDefinition>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<OrganizationPresenceDefinition> response = (ApiResponse<OrganizationPresenceDefinition>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<OrganizationPresenceDefinition> response = (ApiResponse<OrganizationPresenceDefinition>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"void presence(@Nonnull final Presence presence);",
"public ApiResponse<UserPrimarySource> putPresenceUserPrimarysource(ApiRequest<UserPrimarySource> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<UserPrimarySource>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<UserPrimarySource> response = (ApiResponse<UserPrimarySource>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<UserPrimarySource> response = (ApiResponse<UserPrimarySource>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }",
"public void setPresence(int value) {\n this.presence = value;\n }",
"public ApiResponse<UserPresence> patchUserPresenceWithHttpInfo(String userId, String sourceId, UserPresence body) throws IOException {\n return patchUserPresence(createPatchUserPresenceRequest(userId, sourceId, body).withHttpInfo());\n }",
"public void setConsolidatedPresence(ConsolidatedPresence presence);",
"public interface PresenceService extends Service\r\n{\r\n /**\r\n * The module class ID for the Presence class of service.\r\n Module Class ID: urn:jxta:uuid-9B66496088724DA98139DABD163B635B05\r\nModule Spec ID: urn:jxta:uuid-9B66496088724DA98139DABD163B635B459FCBF45A0748C78B219739DFCD39D706\r\n\r\n */\r\n //public static final String refModuleClassID = \"urn:jxta:uuid-0A28FD03D56043E3A1E9FAEC74A69A1905\";\r\n\tpublic static final String refModuleClassID = \"urn:jxta:uuid-E695B6712268421E900AB1076706F16B05\";\r\n\t//urn:jxta:uuid-9B66496088724DA98139DABD163B635B05\";\r\n /**\r\n * A status value indicating that a user is currently online but\r\n * is temporarily away from the device.\r\n */\r\n public static final int AWAY= 3;\r\n\r\n /**\r\n * A status value indicating that a user is currently online but\r\n * is busy and does not want to be disturbed.\r\n */\r\n public static final int BUSY = 2;\r\n\r\n /**\r\n * A status value indicating that a user is currently offline.\r\n */\r\n public static final int OFFLINE = 0;\r\n\r\n /**\r\n * A status value indicating that a user is currently online.\r\n */\r\n public static final int ONLINE = 1;\r\n\r\n\r\n /**\r\n * Add a listener object to the service. When a new Presence Response \r\n * Message arrives, the service will notify each registered listener.\r\n *\r\n * @param listener the listener object to register with the service.\r\n */\r\n public void addListener(PresenceListener listener);\r\n\r\n /**\r\n * Announce updated presence information within the peer group.\r\n *\r\n * @param presenceStatus the updated status for the user identified \r\n * by the email address.\r\n * @param emailAddress the email address used to identify the user \r\n * associated with the presence info.\r\n * @param name a display name for the user associated with the \r\n * presence info.\r\n */\r\n public boolean announcePresence(int presenceStatus, String emailAddress, \r\n String name, String peerID);\r\n\r\n public boolean checkPresence(String emailAddress);\r\n /**\r\n * Sends a query to find presence information for the user specified\r\n * by the given email address. Any response received by the service \r\n * will be dispatched to registered PresenceListener objects.\r\n *\r\n * @param emailAddress the email address to use to find presence info.\r\n */\r\n \r\n public void findPresence(String emailAddress);\r\n /**\r\n * Removes a given listener object from the service. Once removed, \r\n * a listener will no longer be notified when a new Presence Response\r\n * Message arrives. \r\n *\r\n * @param listener the listener object to unregister.\r\n */\r\n public boolean removeListener(PresenceListener listener);\r\n public boolean clearListener();\r\n \r\n}",
"@Nullable\n public EducationUser patch(@Nonnull final EducationUser sourceEducationUser) throws ClientException {\n return send(HttpMethod.PATCH, sourceEducationUser);\n }",
"public OrganizationPresence putPresencedefinition(PutPresencedefinitionRequest request) throws IOException, ApiException {\n try {\n ApiResponse<OrganizationPresence> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OrganizationPresence>() {});\n return response.getBody();\n }\n catch (ApiException | IOException exception) {\n if (pcapiClient.getShouldThrowErrors()) throw exception;\n return null;\n }\n }",
"public void setMode(Presence.Mode mode);",
"@PatchMapping(\"/user\")\n public String patchUser(){\n return \"PATCH-PYC\";\n }",
"String update_user_resto(String phone, String email, int lid );"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EventDef__Group__6" $ANTLR start "rule__EventDef__Group__6__Impl" InternalDsl.g:25663:1: rule__EventDef__Group__6__Impl : ( '}' ) ; | public final void rule__EventDef__Group__6__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:25667:1: ( ( '}' ) )
// InternalDsl.g:25668:1: ( '}' )
{
// InternalDsl.g:25668:1: ( '}' )
// InternalDsl.g:25669:2: '}'
{
if ( state.backtracking==0 ) {
before(grammarAccess.getEventDefAccess().getRightCurlyBracketKeyword_6());
}
match(input,68,FOLLOW_2); if (state.failed) return ;
if ( state.backtracking==0 ) {
after(grammarAccess.getEventDefAccess().getRightCurlyBracketKeyword_6());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__EventDef__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:25656:1: ( rule__EventDef__Group__6__Impl )\n // InternalDsl.g:25657:2: rule__EventDef__Group__6__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EventDef__Group__6__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EV_spec__Group__6__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7934:1: ( ( '}' ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7935:1: ( '}' )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7935:1: ( '}' )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7936:1: '}'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getEV_specAccess().getRightCurlyBracketKeyword_6()); \r\n }\r\n match(input,68,FOLLOW_68_in_rule__EV_spec__Group__6__Impl16681); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getEV_specAccess().getRightCurlyBracketKeyword_6()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Definition__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWh.g:643:1: ( rule__Definition__Group__6__Impl )\n // InternalWh.g:644:2: rule__Definition__Group__6__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Definition__Group__6__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Program__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:2543:1: ( ( '}' ) )\n // InternalReflex.g:2544:1: ( '}' )\n {\n // InternalReflex.g:2544:1: ( '}' )\n // InternalReflex.g:2545:2: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getProgramAccess().getRightCurlyBracketKeyword_6()); \n }\n match(input,87,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getProgramAccess().getRightCurlyBracketKeyword_6()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EV_spec__Group__6() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7923:1: ( rule__EV_spec__Group__6__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7924:2: rule__EV_spec__Group__6__Impl\r\n {\r\n pushFollow(FOLLOW_rule__EV_spec__Group__6__Impl_in_rule__EV_spec__Group__616653);\r\n rule__EV_spec__Group__6__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__AstExpressionIf__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19207:1: ( ( 'end' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19208:1: ( 'end' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19208:1: ( 'end' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19209:1: 'end'\n {\n before(grammarAccess.getAstExpressionIfAccess().getEndKeyword_6()); \n match(input,52,FOLLOW_52_in_rule__AstExpressionIf__Group__6__Impl38587); \n after(grammarAccess.getAstExpressionIfAccess().getEndKeyword_6()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Component__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24183:1: ( ( '}' ) )\n // InternalDsl.g:24184:1: ( '}' )\n {\n // InternalDsl.g:24184:1: ( '}' )\n // InternalDsl.g:24185:2: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_6()); \n }\n match(input,68,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_6()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Entity__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDomain.g:1041:1: ( ( '}' ) )\n // InternalDomain.g:1042:1: ( '}' )\n {\n // InternalDomain.g:1042:1: ( '}' )\n // InternalDomain.g:1043:2: '}'\n {\n before(grammarAccess.getEntityAccess().getRightCurlyBracketKeyword_6()); \n match(input,17,FOLLOW_2); \n after(grammarAccess.getEntityAccess().getRightCurlyBracketKeyword_6()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Event__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3812:1: ( ( '}' ) )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3813:1: ( '}' )\n {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3813:1: ( '}' )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:3814:1: '}'\n {\n before(grammarAccess.getEventAccess().getRightCurlyBracketKeyword_2()); \n match(input,33,FOLLOW_33_in_rule__Event__Group__2__Impl7645); \n after(grammarAccess.getEventAccess().getRightCurlyBracketKeyword_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Function__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:10412:1: ( ( '}' ) )\n // InternalDsl.g:10413:1: ( '}' )\n {\n // InternalDsl.g:10413:1: ( '}' )\n // InternalDsl.g:10414:2: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getFunctionAccess().getRightCurlyBracketKeyword_6()); \n }\n match(input,68,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getFunctionAccess().getRightCurlyBracketKeyword_6()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__InterfaceDef__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:20510:1: ( ( '}' ) )\n // InternalDsl.g:20511:1: ( '}' )\n {\n // InternalDsl.g:20511:1: ( '}' )\n // InternalDsl.g:20512:2: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getInterfaceDefAccess().getRightCurlyBracketKeyword_4()); \n }\n match(input,68,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getInterfaceDefAccess().getRightCurlyBracketKeyword_4()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Exception__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2789:1: ( ( '}' ) )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2790:1: ( '}' )\n {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2790:1: ( '}' )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:2791:1: '}'\n {\n before(grammarAccess.getExceptionAccess().getRightCurlyBracketKeyword_6()); \n match(input,33,FOLLOW_33_in_rule__Exception__Group__6__Impl5641); \n after(grammarAccess.getExceptionAccess().getRightCurlyBracketKeyword_6()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Conference__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.eclipsecon.conference.ui/src-gen/org/eclipse/eclipsecon/ui/contentassist/antlr/internal/InternalConference.g:384:1: ( rule__Conference__Group__6__Impl )\n // ../org.eclipse.eclipsecon.conference.ui/src-gen/org/eclipse/eclipsecon/ui/contentassist/antlr/internal/InternalConference.g:385:2: rule__Conference__Group__6__Impl\n {\n pushFollow(FOLLOW_rule__Conference__Group__6__Impl_in_rule__Conference__Group__6734);\n rule__Conference__Group__6__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__InputPort__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:2880:1: ( ( '}' ) )\n // InternalComponentDefinition.g:2881:1: ( '}' )\n {\n // InternalComponentDefinition.g:2881:1: ( '}' )\n // InternalComponentDefinition.g:2882:2: '}'\n {\n before(grammarAccess.getInputPortAccess().getRightCurlyBracketKeyword_6()); \n match(input,19,FOLLOW_2); \n after(grammarAccess.getInputPortAccess().getRightCurlyBracketKeyword_6()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Program__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:2532:1: ( rule__Program__Group__6__Impl )\n // InternalReflex.g:2533:2: rule__Program__Group__6__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Program__Group__6__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Conference__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.eclipsecon.conference.ui/src-gen/org/eclipse/eclipsecon/ui/contentassist/antlr/internal/InternalConference.g:395:1: ( ( '}' ) )\n // ../org.eclipse.eclipsecon.conference.ui/src-gen/org/eclipse/eclipsecon/ui/contentassist/antlr/internal/InternalConference.g:396:1: ( '}' )\n {\n // ../org.eclipse.eclipsecon.conference.ui/src-gen/org/eclipse/eclipsecon/ui/contentassist/antlr/internal/InternalConference.g:396:1: ( '}' )\n // ../org.eclipse.eclipsecon.conference.ui/src-gen/org/eclipse/eclipsecon/ui/contentassist/antlr/internal/InternalConference.g:397:1: '}'\n {\n before(grammarAccess.getConferenceAccess().getRightCurlyBracketKeyword_6()); \n match(input,13,FOLLOW_13_in_rule__Conference__Group__6__Impl762); \n after(grammarAccess.getConferenceAccess().getRightCurlyBracketKeyword_6()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__EventDef__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:25494:1: ( rule__EventDef__Group__0__Impl rule__EventDef__Group__1 )\n // InternalDsl.g:25495:2: rule__EventDef__Group__0__Impl rule__EventDef__Group__1\n {\n pushFollow(FOLLOW_6);\n rule__EventDef__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EventDef__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Specification__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:9089:1: ( ( '}' ) )\n // InternalDsl.g:9090:1: ( '}' )\n {\n // InternalDsl.g:9090:1: ( '}' )\n // InternalDsl.g:9091:2: '}'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getSpecificationAccess().getRightCurlyBracketKeyword_6()); \n }\n match(input,68,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getSpecificationAccess().getRightCurlyBracketKeyword_6()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__AnswerPort__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:2691:1: ( ( '}' ) )\n // InternalComponentDefinition.g:2692:1: ( '}' )\n {\n // InternalComponentDefinition.g:2692:1: ( '}' )\n // InternalComponentDefinition.g:2693:2: '}'\n {\n before(grammarAccess.getAnswerPortAccess().getRightCurlyBracketKeyword_6()); \n match(input,19,FOLLOW_2); \n after(grammarAccess.getAnswerPortAccess().getRightCurlyBracketKeyword_6()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor given callId and a comparator. | public MessageLogList(String callId, Comparator<TracesMessage> comp) {
super(comp);
} | [
"public VoucherSorter(Comparator<TravelVoucher> comparator){\n this.comparator = comparator;\n }",
"public SortCommand(Comparator<Record> comparator) {\n requireNonNull(comparator);\n this.comparator = comparator;\n }",
"private MessageIDComparator() {}",
"public SelectionSorter(Comparator<E> comparator) {\n super(comparator);\n }",
"public MySortedSet(Comparator<? super T> comparator) {\n data = new ArrayList<>();\n this.comparator = comparator;\n }",
"public CallPath(CallPath callPath, String resourceId) {\r\n this.basePath = callPath.basePath;\r\n this.version = callPath.version;\r\n this.servicePath = callPath.servicePath;\r\n this.resourceId = resourceId;\r\n }",
"public CSDLL(Comparator<E> comparator){\n\t\tthis.size = 0;\n\t\tthis.dummyHeader = new Node<E>(this.dummyHeader, this.dummyHeader, null);\n\t\tthis.comparator = comparator;\n\t}",
"public SortedList(Comparator<T> comparator){\n this(null, comparator);\n }",
"protected BaseComparator() {}",
"@SafeVarargs\r\n public Blenderator(final Comparator<T> comparator,\r\n Spliterator<T>... spliterators)\r\n {\r\n this(comparator, Arrays.asList(spliterators));\r\n }",
"public DMSQueueEntryComparator()\n {\n\n }",
"public SortedSqrtDecomposition(Comparator<T> comparator) {\n this(10, comparator);\n }",
"public TopicNameGrabber(Comparator<TopicNameIF> comparator) {\n this.comparator = comparator;\n }",
"public OrderedQueue(Comparator comparator) {\n _comparator = comparator;\n _queue = new Vector();\n }",
"public CallInfo() {\n\t}",
"public HashPrefixTree(HPTKeyComparator<K> comparator) {\n this(comparator, (int)System.currentTimeMillis());\n }",
"public SortedArrayList( Comparator<E> comparator )\r\n\t{\r\n\t\tsuper();\r\n\r\n\t\tthis.comparator\t= comparator;\r\n\t}",
"public ClientComparator(int iType)\r\n {\r\n this(iType, false);\r\n }",
"public Comparison(String name) {\r\n\t\tsuper(name);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column perms.perms_t_staff_role.cl_blockup | public Short getClBlockup() {
return clBlockup;
} | [
"public Long getnBlockUserId() {\n return nBlockUserId;\n }",
"public Long getBlockroomid()\n {\n return blockroomid; \n }",
"public Byte getCustRole() {\n return custRole;\n }",
"public Long getSdetBuserModify() {\n\t return sdetBuserModify;\n\t }",
"public String getOisLstupuser() {\n return oisLstupuser;\n }",
"long getSamanRoleId();",
"public Long getEmplBident() {\n return super.getEmplBident();\n }",
"public Number getbvRoleId() {\n return (Number)ensureVariableManager().getVariableValue(\"bvRoleId\");\n }",
"public java.lang.Long getTglBerakhirOtomatisBuatJadwal() {\n return tgl_berakhir_otomatis_buat_jadwal;\n }",
"public java.lang.Long getTglBerakhirOtomatisBuatJadwal() {\n return tgl_berakhir_otomatis_buat_jadwal;\n }",
"public java.lang.Long getTglMulaiOtomatisBuatJadwal() {\n return tgl_mulai_otomatis_buat_jadwal;\n }",
"public java.lang.Long getTglMulaiOtomatisBuatJadwal() {\n return tgl_mulai_otomatis_buat_jadwal;\n }",
"long getConnectUnitRoleId();",
"private String getUpdateAuActiveFlagSql() {\n if (isTypeMysql()) {\n return UPDATE_AU_ACTIVE_QUERY_MYSQL;\n }\n\n return UPDATE_AU_ACTIVE_QUERY;\n }",
"public void setClBlockup(Short clBlockup) {\r\n\t\tthis.clBlockup = clBlockup;\r\n\t}",
"public BigDecimal getROLE_CODE() {\r\n return ROLE_CODE;\r\n }",
"Block col() {\n return _col;\n }",
"private BlockType randomBlock(){\n // Check whether a powerup should be chosen or not\n if(random.nextInt(9) == 0){\n // Return a random powerup\n return allPowerUps.get(random.nextInt(allPowerUps.size()));\n\t}\n\treturn BlockType.PLATTFORM;\n }",
"public String getLcRole() {\r\n\t\treturn lcRole;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This returns the constant prefix to denote whether Util.readAll() should read from a JAR or read from the file system. (The reason we made this into a "method" rather than a constant String is that it is used by Util.canon() which is called by many static initializer blocks... so if we made this into a static field of Util, then it may not be initialized yet when we need it!) | public static String jarPrefix() {
return File.separator + "$alloy4$" + File.separator;
} | [
"String getResourceName() {\n if (!resourceNameKnown) {\n // The resource name of a classfile can only be determined by\n // reading\n // the file and parsing the constant pool.\n // If we can't do this for some reason, then we just\n // make the resource name equal to the filename.\n\n try {\n resourceName = getClassDescriptor().toResourceName();\n } catch (Exception e) {\n resourceName = fileName;\n }\n\n resourceNameKnown = true;\n }\n return resourceName;\n }",
"@Nullable\n String getResourcePrefix();",
"abstract protected String getMainResourceIdentifierPrefix();",
"public String getResourceStringPrefix(){\n\n switch (androidName){\n case Manifest.permission.WRITE_EXTERNAL_STORAGE:\n return \"permission_write_ext_storage\";\n case Manifest.permission.READ_EXTERNAL_STORAGE:\n return \"permission_read_ext_storage\";\n case Manifest.permission.CAMERA:\n return \"permission_camera\";\n case Manifest.permission.READ_PHONE_STATE:\n return \"permission_read_phone_state\";\n case Manifest.permission.ACCESS_FINE_LOCATION:\n return \"permission_access_fine_location\";\n case Manifest.permission.RECORD_AUDIO:\n return \"permission_record_audio\";\n default:\n return \"\";\n }\n }",
"public String getLexiconFilePrefix() {\n return prefix;\n }",
"public abstract String getSuggestedPrefix();",
"public static String getI18NPrefix() {\n // for tests we don't have the Config class initialized\n if (Config.getConfigUtils() == null)\n return \"\";\n else\n return Config.<String> GetValue(ConfigValues.DBI18NPrefix);\n\n }",
"public static Map<String, String> getKnownPrefixes() {\r\n init(Thread.currentThread().getContextClassLoader());\r\n return KNOWN_PREFIXES;\r\n }",
"public String getFileNamePrefix() {\n return fileNamePrefix;\n }",
"private static boolean isJar(){\n\t\tString str = IOHandler.class.getResource(\"IOHandler.class\").toString();\n\t\treturn str.toLowerCase().startsWith(\"jar\") && JAROVERRIDE;\n\t}",
"protected String constructJarName ()\n {\n return _libraryName + LIBRARY_SUFFIX;\n }",
"String getPrefix();",
"public String getReadLockKeyPrefix() {\n String key = toKey(READ_LOCK_KEY_PREFIX);\n return get(key, DEFAULT_READ_LOCK_KEY_PREFIX);\n }",
"public interface Constants {\r\n\t/**\r\n\t * Example directory.\r\n\t */\r\n\tPath EXAMPLE_DIR = Path.of(\"src/main/resources\");\r\n\t/**\r\n\t * Example XML file.\r\n\t */\r\n\tPath EXAMPLE_PATH = Path.of(EXAMPLE_DIR.toString(), \"example.xml\");\r\n\t/**\r\n\t * Example text file name.\r\n\t */\r\n\tString EXAMPLE_TXT_FILE_NAME = \"example.txt\";\r\n\t/**\r\n\t * Example ZIP file name.\r\n\t */\r\n\tString EXAMPLE_ZIP_FILE_NAME = \"example.zip\";\r\n\t/**\r\n\t * Example ZIP file.\r\n\t */\r\n\tPath EXAMPLE_ZIP_PATH = Path.of(EXAMPLE_DIR.toString(), EXAMPLE_ZIP_FILE_NAME);\r\n\t/**\r\n\t * Example ZIP file entry.\r\n\t */\r\n\tString EXAMPLE_ZIP_ENTRY = \"data/example.xml\";\r\n\t/**\r\n\t * Example properties file.\r\n\t */\r\n\tPath EXAMPLE_PROPERTIES_PATH = Path.of(System.getProperty(\"user.dir\"), EXAMPLE_DIR.toString(),\r\n\t\t\t\"example.properties\");\r\n\t/**\r\n\t * Length of string to read.\r\n\t */\r\n\tString XML_CONTENT = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";\r\n}",
"public String getPrefixCode() { return sharedPreferences.getString(PREFIX_CODE, \"\"); }",
"private String jarName(){\n // determine the name of this class\n String className=\"/\"+this.getClass().getName().replace('.','/')+\".class\";\n // find out where the class is on the filesystem\n String classFile=this.getClass().getResource(className).toString();\n\n if( (classFile==null) || !(classFile.startsWith(\"jar:\")) ) return null;\n \n // trim out parts and set this to be forwardslash\n classFile=classFile.substring(5,classFile.indexOf(className));\n classFile=FilenameUtil.setForwardSlash(classFile);\n\n // chop off a little bit more\n classFile=classFile.substring(4,classFile.length()-1);\n \n return FilenameUtil.URLSpacetoSpace(classFile);\n }",
"String getUtilPath();",
"private String getPrefix() {\n\t\tif (sub_prefix != null) {\n\t\t\treturn main_prefix+\"(\"+sub_prefix+\")\";\n\t\t} else {\n\t\t\treturn main_prefix;\n\t\t}\n\t}",
"public static String getFileTablePrefix(AppType appType) {\n\t\tStringBuilder sbuilder = new StringBuilder(\"tase_file_\");\n\t\tswitch(appType.getValue()) {\n\t\t// AppType.APK\n\t\tcase(1) :\n\t\t\tsbuilder.append(\"android_\");\n\t\t\tbreak;\n\t\tcase(2)\t:\n\t\t\tsbuilder.append(\"ios_\");\n\t\t\tbreak;\n\t\t}\n\t\treturn sbuilder.toString();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the value associated with the column: recipientDeletedFlag | @Column(name = "recipient_deleted_flag")
public Boolean isRecipientDeletedFlag() {
return this.recipientDeletedFlag;
} | [
"public void setRecipientDeletedFlag(final Boolean recipientDeletedFlag) {\n\t\tthis.recipientDeletedFlag = recipientDeletedFlag;\n\t}",
"public String getDeletedFlag() {\n return deletedFlag;\n }",
"java.lang.String getDeleted();",
"public BigDecimal getDeleteFlag() {\r\n return deleteFlag;\r\n }",
"public Byte getIsDeleted() {\n return isDeleted;\n }",
"public DeletedFlag getDeletedFlg() {\n return deletedFlg;\n }",
"public String getDeleteFlag() {\n return (String) getAttributeInternal(DELETEFLAG);\n }",
"public String getIsdeleted() {\n return isdeleted;\n }",
"public Integer getDeleteFlag() {\n return deleteFlag;\n }",
"public Boolean getDeleted()\n {\n return deleted; \n }",
"public Integer getDel_flag() {\n return del_flag;\n }",
"public String getDelFlag() {\n return delFlag;\n }",
"public Integer getIsDeleted() {\n return isDeleted;\n }",
"public Integer getDeleted() {\n return (Integer)getAttributeInternal(DELETED);\n }",
"public Integer getDeleteflag() {\n return deleteflag;\n }",
"public boolean getReceiverDeleteStatus() {\n return this.ReceiverDeleteStatus;\n }",
"@Override\n\tpublic int getMarkedAsDelete() {\n\t\treturn _dmGtStatus.getMarkedAsDelete();\n\t}",
"@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGtStatus.getIsDelete();\n\t}",
"public boolean getDeleted() {\n return deleted;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Modify SampleIndex configuration. Automatically submit a job to rebuild the sample index. | public OpenCGAResult<Job> configureSampleIndex(String studyStr, SampleIndexConfiguration sampleIndexConfiguration,
boolean skipRebuild, String token)
throws CatalogException, StorageEngineException {
return secureOperation("configure", studyStr, new ObjectMap(), token, engine -> {
String version = engine.getCellBaseUtils().getCellBaseClient().getClientConfiguration().getVersion();
sampleIndexConfiguration.validate(version);
String studyFqn = getStudyFqn(studyStr, token);
engine.getMetadataManager().addSampleIndexConfiguration(studyFqn, sampleIndexConfiguration, true);
catalogManager.getStudyManager()
.setVariantEngineConfigurationSampleIndex(studyStr, sampleIndexConfiguration, token);
if (skipRebuild) {
return new OpenCGAResult<>(0, new ArrayList<>(), 0, new ArrayList<>(), 0);
} else {
// If changes, launch sample-index-run
ToolParams params =
new VariantSecondarySampleIndexParams(Collections.singletonList(ParamConstants.ALL), true, true, true, false);
return catalogManager.getJobManager().submit(studyFqn, VariantSecondarySampleIndexOperationTool.ID, null,
params.toParams(STUDY_PARAM, studyFqn), token);
}
});
} | [
"private void indexExperiment() {\n \n \t\tsynchronized(fIndexing) {\n \t\t\tif (fIndexing) {\n \t\t\t\t// An indexing job is already running but a new request came\n \t\t\t\t// in (probably due to a change in the trace set). The index\n \t\t\t\t// being currently built is therefore already invalid.\n \t\t\t\t// TODO: Cancel and restart the job\n \t\t\t\t// TODO: Add support for dynamically adding/removing traces\n \t\t\t\treturn;\n \t\t\t}\n \t\t\tfIndexing = true;\n \t\t}\n \n \t\tjob = new IndexingJob(fExperimentId);\n \t\tjob.schedule();\n \t\tif (fWaitForIndexCompletion) {\n \t ProgressMonitorDialog dialog = new ProgressMonitorDialog(null);\n \t try {\n \t\t\t\t// TODO: Handle cancel!\n \t dialog.run(true, true, new IRunnableWithProgress() {\n \t public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n \t monitor.beginTask(\"Indexing \" + fExperimentId, IProgressMonitor.UNKNOWN);\n \t \t\t\t\tjob.join();\n \t monitor.done();\n \t }\n \t });\n \t } catch (InvocationTargetException e) {\n \t e.printStackTrace();\n \t } catch (InterruptedException e) {\n \t e.printStackTrace();\n \t }\n \t\t}\n \t}",
"public abstract void updateIndexConfig(GridH2Table tbl, String luceneIndexOptions, boolean forceMutateQueryEntity);",
"public synchronized void reindex() {\n }",
"public interface IndexBuilder {\n\n /**\n * Rebuilds the index only when the existing index is not populated.\n */\n void rebuildIfNecessary();\n\n}",
"private Reindex() {}",
"public abstract void collectIndexUpdate(IndexUpdateBuilder indexUpdateBuilder) throws InterruptedException, IOException, RepositoryException;",
"public abstract void updateIndex();",
"@Override\n public void configurationChanged(String change) {\n final Configuration cfg = cfgProvider.get();\n\n // for quick lookup of the index name\n final HashSet<String> names = new HashSet<String>();\n Iterables.addAll(names, fixtureConfigurationProvider.get().getIndexNames());\n\n boolean needRun = false;\n for (IndexConfig indexConfig : cfg.indices().values())\n for (TypeConfig typeConfig : indexConfig.types().values()) {\n if (names.contains(typeConfig.sourceIndex())) {\n needRun = true;\n break;\n }\n\n }\n\n if (needRun)\n try {\n runFixtures();\n } catch (Exception e) {\n LOG.error(\"Something went wrong inserting the fixtures after a configurationChanged event.\", e);\n }\n }",
"void reindex();",
"public void reloadIndex() {\n\t\t// if lucene updater is disabled or index-generation running, return without doing something\n\t\tif (!luceneUpdaterEnabled || generatingIndex) {\n\t\t\tlog.debug(\"lucene updater is disabled by user\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// don't run twice at the same time - if something went wrong, delete alreadyRunning\n\t\tif ((alreadyRunning > 0) && (alreadyRunning<maxAlreadyRunningTrys) ) {\n\t\t\talreadyRunning++;\n\t\t\tlog.warn(\"reloadIndex - alreadyRunning (\"+alreadyRunning+\"/\"+maxAlreadyRunningTrys+\")\");\n\t\t\treturn;\t\n\t\t}\n\t\talreadyRunning = 1;\n\t\tlog.debug(\"reloadIndex - run and reset alreadyRunning (\"+alreadyRunning+\"/\"+maxAlreadyRunningTrys+\")\");\n\n\t\tinit();\n\n\t\tif (!useUpdater) {\n\t\t\tlog.error(\"reloadIndex - LuceneUpdater deactivated!\");\n\t\t\talreadyRunning = 0;\n\t\t\treturn;\t\n\t\t}\n\n\t\t// do the actual work\n\t\tfinal int oldIdxId = this.searcher.getIndexId();\n\t\tfinal int newIdxId = this.resourceIndices.get(idxSelect).getIndexId();\n\t\tlog.debug(\"switching from index \"+oldIdxId+\" to index \"+newIdxId);\n\t\tsearcher.reloadIndex(newIdxId);\n\t\tlog.debug(\"reload search index done\");\n\n\t\talreadyRunning = 0;\n\t}",
"public void beforeIndexCreated(Index index) {\n\n }",
"public void setIndexingConfiguration(String path)\n {\n indexingConfigPath = path;\n }",
"@Test\n public void testShardConfig_internal_shardIndex() throws Exception {\n CommandOptions options = new CommandOptions();\n OptionSetter setter = new OptionSetter(options);\n setter.setOptionValue(\"disable-strict-sharding\", \"true\");\n setter.setOptionValue(\"shard-count\", \"5\");\n setter.setOptionValue(\"shard-index\", \"2\");\n mConfig.setCommandOptions(options);\n mConfig.setCommandLine(new String[] {\"empty\"});\n StubTest test = new StubTest();\n setter = new OptionSetter(test);\n setter.setOptionValue(\"num-shards\", \"5\");\n mConfig.setTest(test);\n assertEquals(1, mConfig.getTests().size());\n // We do not shard, we are relying on the current invocation to run.\n assertFalse(mHelper.shardConfig(mConfig, mContext, mRescheduler));\n // Rescheduled is NOT called because we use the current invocation to run the index.\n Mockito.verify(mRescheduler, Mockito.times(0)).scheduleConfig(Mockito.any());\n assertEquals(1, mConfig.getTests().size());\n // Original IRemoteTest was replaced by the sharded one in the configuration.\n assertNotEquals(test, mConfig.getTests().get(0));\n }",
"public void generateIndex() {\n\t\t// Allow only one index-generation at a time\n\t\tif (this.generatingIndex) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Prepare index generation\n\t\tsynchronized(this) {\n\t\t\tthis.generatingIndex = true;\n\t\t selectActiveIndex(1);\n\t\t}\n\t\t\n\t\t// Register a callback for the finalization of the index-generation\n\t\tgenerator.registerCallback(new GenerateIndexCallback() {\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tselectActiveIndex(0);\n\t\t\t\tgenerator.copyRedundantIndeces();\n\t\t\t\tgeneratingIndex = false;\n\t\t\t\tresetIndexReader();\n\t\t\t\tresetIndexSearcher();\n\t\t\t}\n\t\t});\n\n\t\t// run in another thread (non blocking)\n\t\tnew Thread(generator).start();\n\t}",
"public SampleIndexSchema(SampleIndexConfiguration configuration) {\n this.configuration = configuration;\n fileIndex = new FileIndexSchema(configuration.getFileIndexConfiguration());\n// annotationSummaryIndexSchema = new AnnotationSummaryIndexSchema();\n ctIndex = new ConsequenceTypeIndexSchema(configuration.getAnnotationIndexConfiguration().getConsequenceType());\n biotypeIndex = new BiotypeIndexSchema(configuration.getAnnotationIndexConfiguration().getBiotype());\n transcriptFlagIndexSchema = new TranscriptFlagIndexSchema(\n configuration.getAnnotationIndexConfiguration().getTranscriptFlagIndexConfiguration());\n ctBtTfIndex = new CtBtFtCombinationIndexSchema(ctIndex, biotypeIndex, transcriptFlagIndexSchema);\n popFreqIndex = new PopulationFrequencyIndexSchema(configuration.getAnnotationIndexConfiguration().getPopulationFrequency());\n clinicalIndexSchema = new ClinicalIndexSchema(\n configuration.getAnnotationIndexConfiguration().getClinicalSource(),\n configuration.getAnnotationIndexConfiguration().getClinicalSignificance()\n );\n }",
"@Override\n protected void configure() {\n install(new AvroIndexingInternalModule(properties));\n }",
"public void onIndexUpdate();",
"void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;",
"void repopulate() throws IndexRebuildException;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reverseLookupUser1_ID Reverse Lookup JP_Line_User1_ID | private boolean reverseLookupJP_Line_User1_ID() throws Exception
{
int no = 0;
StringBuilder sql = new StringBuilder ("UPDATE I_DataMigrationJP i ")
.append("SET JP_Line_User1_ID=(SELECT C_ElementValue_ID FROM C_ElementValue p")
.append(" WHERE i.JP_Line_UserElement1_Value=p.Value AND i.AD_Client_ID=p.AD_Client_ID) ")
.append("WHERE i.JP_Line_User1_ID IS NULL AND i.JP_Line_UserElement1_Value IS NOT NULL ")
.append(" AND I_IsImported<>'Y'").append(getWhereClause());
try {
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
}catch(Exception e) {
throw new Exception(Msg.getMsg(getCtx(), "Error") + message +" : " + e.toString() +" : " + sql );
}
//Invalid JP_Line_UserElement1_Value
message = Msg.getMsg(getCtx(), "Error") + Msg.getMsg(getCtx(), "Invalid") + Msg.getElement(getCtx(), "JP_Line_UserElement1_Value");
sql = new StringBuilder ("UPDATE I_DataMigrationJP ")
.append("SET I_ErrorMsg='"+ message + "'")
.append("WHERE JP_Line_User1_ID IS NULL AND JP_Line_UserElement1_Value IS NOT NULL")
.append(" AND I_IsImported<>'Y'").append(getWhereClause());
try {
no = DB.executeUpdateEx(sql.toString(), get_TrxName());
}catch(Exception e) {
throw new Exception(message +" : " + e.toString() +" : " + sql);
}
if(no > 0)
{
return false;
}
return true;
} | [
"private boolean reverseLookupJP_Line_User2_ID() throws Exception\r\n\t{\r\n\t\tint no = 0;\r\n\r\n\t\tStringBuilder sql = new StringBuilder (\"UPDATE I_DataMigrationJP i \")\r\n\t\t\t.append(\"SET JP_Line_User2_ID=(SELECT C_ElementValue_ID FROM C_ElementValue p\")\r\n\t\t\t.append(\" WHERE i.JP_Line_UserElement2_Value=p.Value AND i.AD_Client_ID=p.AD_Client_ID) \")\r\n\t\t\t.append(\"WHERE i.JP_Line_User2_ID IS NULL AND i.JP_Line_UserElement2_Value IS NOT NULL \")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + message +\" : \" + e.toString() +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\t//Invalid JP_Line_UserElement2_Value\r\n\t\tmessage = Msg.getMsg(getCtx(), \"Error\") + Msg.getMsg(getCtx(), \"Invalid\") + Msg.getElement(getCtx(), \"JP_Line_UserElement2_Value\");\r\n\t\tsql = new StringBuilder (\"UPDATE I_DataMigrationJP \")\r\n\t\t\t.append(\"SET I_ErrorMsg='\"+ message + \"'\")\r\n\t\t\t.append(\"WHERE JP_Line_User2_ID IS NULL AND JP_Line_UserElement2_Value IS NOT NULL\")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(message +\" : \" + e.toString() +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\tif(no > 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}",
"private boolean reverseLookupUser1_ID() throws Exception\r\n\t{\r\n\t\tint no = 0;\r\n\r\n\t\tStringBuilder sql = new StringBuilder (\"UPDATE I_DataMigrationJP i \")\r\n\t\t\t.append(\"SET User1_ID=(SELECT C_ElementValue_ID FROM C_ElementValue p\")\r\n\t\t\t.append(\" WHERE i.JP_UserElement1_Value=p.Value AND i.AD_Client_ID=p.AD_Client_ID) \")\r\n\t\t\t.append(\"WHERE i.User1_ID IS NULL AND i.JP_UserElement1_Value IS NOT NULL \")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + message +\" : \" + e.toString() +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\t//Invalid JP_UserElement1_Value\r\n\t\tmessage = Msg.getMsg(getCtx(), \"Error\") + Msg.getMsg(getCtx(), \"Invalid\") + Msg.getElement(getCtx(), \"JP_UserElement1_Value\");\r\n\t\tsql = new StringBuilder (\"UPDATE I_DataMigrationJP \")\r\n\t\t\t.append(\"SET I_ErrorMsg='\"+ message + \"'\")\r\n\t\t\t.append(\"WHERE User1_ID IS NULL AND JP_UserElement1_Value IS NOT NULL\")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(message +\" : \" + e.toString() +\" : \" + sql);\r\n\t\t}\r\n\r\n\t\tif(no > 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}",
"private boolean reverseLookupUser2_ID() throws Exception\r\n\t{\r\n\t\tint no = 0;\r\n\r\n\t\tStringBuilder sql = new StringBuilder (\"UPDATE I_DataMigrationJP i \")\r\n\t\t\t.append(\"SET User2_ID=(SELECT C_ElementValue_ID FROM C_ElementValue p\")\r\n\t\t\t.append(\" WHERE i.JP_UserElement2_Value=p.Value AND i.AD_Client_ID=p.AD_Client_ID) \")\r\n\t\t\t.append(\"WHERE i.User2_ID IS NULL AND i.JP_UserElement2_Value IS NOT NULL \")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + message +\" : \" + e.toString() +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\t//Invalid JP_UserElement2_Value\r\n\t\tmessage = Msg.getMsg(getCtx(), \"Error\") + Msg.getMsg(getCtx(), \"Invalid\") + Msg.getElement(getCtx(), \"JP_UserElement2_Value\");\r\n\t\tsql = new StringBuilder (\"UPDATE I_DataMigrationJP \")\r\n\t\t\t.append(\"SET I_ErrorMsg='\"+ message + \"'\")\r\n\t\t\t.append(\"WHERE User2_ID IS NULL AND JP_UserElement2_Value IS NOT NULL\")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(message +\" : \" + e.toString() +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\tif(no > 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}",
"private void reverseLookupC_Location_ID() throws Exception\r\n\t{\r\n\t\tStringBuilder sql = new StringBuilder();\r\n\t\tString msg = new String();\r\n\t\tint no = 0;\r\n\r\n\t\t//Reverse Loog up C_Location_ID From JP_Location_Label\r\n\t\tmsg = Msg.getMsg(getCtx(), \"Matching\") + \" : \" + Msg.getElement(getCtx(), \"C_Location_ID\")\r\n\t\t+ \" - \" + Msg.getMsg(getCtx(), \"MatchFrom\") + \" : \" + Msg.getElement(getCtx(), \"JP_Location_Label\") ;\r\n\t\tsql = new StringBuilder (\"UPDATE I_LocationJP i \")\r\n\t\t\t\t.append(\"SET C_Location_ID=(SELECT C_Location_ID FROM C_Location p\")\r\n\t\t\t\t.append(\" WHERE i.JP_Location_Label= p.JP_Location_Label AND p.AD_Client_ID=i.AD_Client_ID) \")\r\n\t\t\t\t.append(\" WHERE i.C_Location_ID IS NULL AND JP_Location_Label IS NOT NULL\")\r\n\t\t\t\t.append(\" AND i.I_IsImported='N'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t\tif (log.isLoggable(Level.FINE)) log.fine(msg +\"=\" + no + \":\" + sql);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + sql );\r\n\t\t}\r\n\r\n\t}",
"private void reverseLookupAD_Org_ID() throws Exception\r\n\t{\r\n\t\tStringBuilder sql = new StringBuilder();\r\n\t\tString msg = new String();\r\n\t\tint no = 0;\r\n\r\n\t\t//Reverese Look up AD_Org ID From JP_Org_Value\r\n\t\tmsg = Msg.getMsg(getCtx(), \"Matching\") + \" : \" + Msg.getElement(getCtx(), \"AD_Org_ID\")\r\n\t\t+ \" - \" + Msg.getMsg(getCtx(), \"MatchFrom\") + \" : \" + Msg.getElement(getCtx(), \"JP_Org_Value\") ;\r\n\t\tsql = new StringBuilder (\"UPDATE I_LocationJP i \")\r\n\t\t\t\t.append(\"SET AD_Org_ID=(SELECT AD_Org_ID FROM AD_org p\")\r\n\t\t\t\t.append(\" WHERE i.JP_Org_Value=p.Value AND (p.AD_Client_ID=i.AD_Client_ID or p.AD_Client_ID=0) ) \")\r\n\t\t\t\t.append(\" WHERE i.JP_Org_Value IS NOT NULL\")\r\n\t\t\t\t.append(\" AND i.I_IsImported='N'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t\tif (log.isLoggable(Level.FINE)) log.fine(msg +\"=\" + no + \":\" + sql);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + sql );\r\n\t\t}\r\n\r\n\t\t//Invalid JP_Org_Value\r\n\t\tmsg = Msg.getMsg(getCtx(), \"Invalid\")+Msg.getElement(getCtx(), \"JP_Org_Value\");\r\n\t\tsql = new StringBuilder (\"UPDATE I_LocationJP \")\r\n\t\t\t.append(\"SET I_ErrorMsg='\"+ msg + \"'\")\r\n\t\t\t.append(\" WHERE AD_Org_ID = 0 AND JP_Org_Value IS NOT NULL AND JP_Org_Value <> '0' \")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t\tif (log.isLoggable(Level.FINE)) log.fine(msg +\"=\" + no + \":\" + sql);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + msg +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\tif(no > 0)\r\n\t\t{\r\n\t\t\tcommitEx();\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + msg );\r\n\t\t}\r\n\r\n\t}",
"private boolean reverseLookupJP_Line_OrgTrx_ID() throws Exception\r\n\t{\r\n\t\tint no = 0;\r\n\r\n\t\tStringBuilder sql = new StringBuilder (\"UPDATE I_DataMigrationJP i \")\r\n\t\t\t\t.append(\"SET JP_Line_OrgTrx_ID=(SELECT AD_Org_ID FROM AD_Org p\")\r\n\t\t\t\t.append(\" WHERE i.JP_Line_OrgTrx_Value=p.Value AND (p.AD_Client_ID=i.AD_Client_ID or p.AD_Client_ID=0) AND p.IsSummary='N' ) \")\r\n\t\t\t\t.append(\" WHERE i.JP_Line_OrgTrx_Value IS NOT NULL\")\r\n\t\t\t\t.append(\" AND i.I_IsImported='N'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + message + \" : \"+ e.toString() + \" : \"+ sql );\r\n\t\t}\r\n\r\n\t\t//Invalid JP_Line_OrgTrx_Value\r\n\t\tmessage = Msg.getMsg(getCtx(), \"Error\") + Msg.getMsg(getCtx(), \"Invalid\") + Msg.getElement(getCtx(), \"JP_Line_OrgTrx_Value\");\r\n\t\tsql = new StringBuilder (\"UPDATE I_DataMigrationJP \")\r\n\t\t\t.append(\"SET I_ErrorMsg='\"+ message + \"'\")\r\n\t\t\t.append(\" WHERE JP_Line_OrgTrx_ID IS NULL AND JP_Line_OrgTrx_Value IS NOT NULL \")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(message + \" : \"+ e.toString() + \" : \"+ sql );\r\n\t\t}\r\n\r\n\t\tif(no > 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}",
"public abstract String extractLinkingId(User ldapUser);",
"private boolean reverseLookupJP_Line_Activity_ID() throws Exception\r\n\t{\r\n\t\tint no = 0;\r\n\r\n\t\tStringBuilder sql = new StringBuilder (\"UPDATE I_DataMigrationJP i \")\r\n\t\t\t.append(\"SET JP_Line_Activity_ID=(SELECT C_Activity_ID FROM C_Activity p\")\r\n\t\t\t.append(\" WHERE i.JP_Line_Activity_Value=p.Value AND (i.AD_Client_ID=p.AD_Client_ID or p.AD_Client_ID = 0) ) \")\r\n\t\t\t.append(\"WHERE i.JP_Line_Activity_ID IS NULL AND i.JP_Line_Activity_Value IS NOT NULL \")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + message +\" : \" + e.toString() +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\t//Invalid JP_Line_Activity_Value\r\n\t\tmessage = Msg.getMsg(getCtx(), \"Error\") + Msg.getMsg(getCtx(), \"Invalid\")+Msg.getElement(getCtx(), \"JP_Line_Activity_Value\");\r\n\t\tsql = new StringBuilder (\"UPDATE I_DataMigrationJP \")\r\n\t\t\t.append(\"SET I_ErrorMsg='\"+ message + \"'\")\r\n\t\t\t.append(\"WHERE JP_Line_Activity_ID IS NULL AND JP_Line_Activity_Value IS NOT NULL\")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(message +\" : \" + e.toString() +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\tif(no > 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}",
"private boolean reverseLookupJP_Line_Campaign_ID() throws Exception\r\n\t{\r\n\t\tint no = 0;\r\n\r\n\t\tStringBuilder sql = new StringBuilder (\"UPDATE I_DataMigrationJP i \")\r\n\t\t\t.append(\"SET JP_Line_Campaign_ID=(SELECT C_Campaign_ID FROM C_Campaign p\")\r\n\t\t\t.append(\" WHERE i.JP_Line_Campaign_Value=p.Value AND (i.AD_Client_ID=p.AD_Client_ID or p.AD_Client_ID = 0) ) \")\r\n\t\t\t.append(\"WHERE i.JP_Line_Campaign_ID IS NULL AND i.JP_Line_Campaign_Value IS NOT NULL \")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + message +\" : \" + e.toString() +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\t//Invalid JP_Line_Campaign_Value\r\n\t\tmessage = Msg.getMsg(getCtx(), \"Error\") + Msg.getMsg(getCtx(), \"Invalid\")+Msg.getElement(getCtx(), \"JP_Line_Campaign_Value\");\r\n\t\tsql = new StringBuilder (\"UPDATE I_DataMigrationJP \")\r\n\t\t\t.append(\"SET I_ErrorMsg='\"+ message + \"'\")\r\n\t\t\t.append(\"WHERE JP_Line_Campaign_ID IS NULL AND JP_Line_Campaign_Value IS NOT NULL\")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(message +\" : \" + e.toString() +\" : \" + sql );\r\n\t\t}\r\n\r\n\t\tif(no > 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}",
"private boolean reverseLookupJP_DataMigration_ID() throws Exception\r\n\t{\r\n\t\tint no = 0;\r\n\r\n\t\t//Look up JP_DataMigration_ID ID From JP_DataMigration_Identifier\r\n\t\tStringBuilder sql = new StringBuilder (\"UPDATE I_DataMigrationJP i \")\r\n\t\t\t\t.append(\"SET JP_DataMigration_ID=(SELECT JP_DataMigration_ID FROM JP_DataMigration p\")\r\n\t\t\t\t.append(\" WHERE i.JP_DataMigration_Identifier=p.JP_DataMigration_Identifier AND p.AD_Client_ID=i.AD_Client_ID ) \")\r\n\t\t\t\t.append(\" WHERE i.JP_DataMigration_ID IS NOT NULL\")\r\n\t\t\t\t.append(\" AND i.I_IsImported='N'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t\tif (log.isLoggable(Level.FINE)) log.fine(\"Look up JP_DataMigration_ID ID From JP_DataMigration_Identifier -> #\" + no);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + message + \" : \" + e.toString() + \" : \" + sql );\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}",
"private boolean reverseLookupAD_OrgTrx_ID() throws Exception\r\n\t{\r\n\t\tint no = 0;\r\n\r\n\t\tStringBuilder sql = new StringBuilder (\"UPDATE I_DataMigrationJP i \")\r\n\t\t\t\t.append(\"SET AD_OrgTrx_ID=(SELECT AD_Org_ID FROM AD_Org p\")\r\n\t\t\t\t.append(\" WHERE i.JP_OrgTrx_Value=p.Value AND (p.AD_Client_ID=i.AD_Client_ID or p.AD_Client_ID=0) AND p.IsSummary='N' ) \")\r\n\t\t\t\t.append(\" WHERE i.JP_OrgTrx_Value IS NOT NULL\")\r\n\t\t\t\t.append(\" AND i.I_IsImported='N'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(Msg.getMsg(getCtx(), \"Error\") + message + \" : \"+ e.toString() + \" : \"+ sql );\r\n\t\t}\r\n\r\n\t\t//Invalid JP_OrgTrx_Value\r\n\t\tmessage = Msg.getMsg(getCtx(), \"Error\") + Msg.getMsg(getCtx(), \"Invalid\") + Msg.getElement(getCtx(), \"JP_OrgTrx_Value\");\r\n\t\tsql = new StringBuilder (\"UPDATE I_DataMigrationJP \")\r\n\t\t\t.append(\"SET I_ErrorMsg='\"+ message + \"'\")\r\n\t\t\t.append(\" WHERE AD_OrgTrx_ID IS NULL AND JP_OrgTrx_Value IS NOT NULL \")\r\n\t\t\t.append(\" AND I_IsImported<>'Y'\").append(getWhereClause());\r\n\t\ttry {\r\n\t\t\tno = DB.executeUpdateEx(sql.toString(), get_TrxName());\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new Exception(message + \" : \"+ e.toString() + \" : \"+ sql );\r\n\t\t}\r\n\r\n\t\tif(no > 0)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}",
"java.lang.String getUserIdTwo();",
"java.lang.String getLiNZAddressId();",
"public void getRemappedUID(int seqid, String uid);",
"java.lang.String getUserIdOne();",
"private static synchronized String translateUid(String anonymizedPatientId, String oldUid, String originalPatientId) {\n String newUid = uidHistory.get(new Uid(anonymizedPatientId, oldUid, originalPatientId));\n if (newUid == null) {\n newUid = Util.getUID();\n uidHistory.put(new Uid(anonymizedPatientId, oldUid, originalPatientId), newUid);\n }\n return newUid;\n }",
"public int search_userid(String user_name);",
"Lookup getLookup();",
"private int lookupID(String id) throws SQLException {\n String sql = \"select id from knodes where lex = '\" + id + \"'\";\n\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql);\n rs.next();\n return rs.getInt(\"id\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form TelaSecundaria | public TelaSecundaria() {
initComponents();
ArrayTexto();
btpara.setVisible(false);
btresposta.setVisible(false);
} | [
"public creacionempresa() {\n initComponents();\n mostrardatos();\n }",
"public frm_tutor_subida_prueba() {\n }",
"public frm_registro_admision_ingreso_registro() {\n }",
"public RazredForma() {\n initComponents();\n obrada = new ObradaRazred();\n setTitle(Aplikacija.NASLOV_APP + \" | IZBORNIK RAZREDA\");\n obradaUcenik=new ObradaUcenik();\n obradaSkolskaGodina=new ObradaSkolskaGodina();\n ucitajGodine();\n ucitajRazrede();\n ucitajUcitelje();\n }",
"public CreacionCuenta() {\n initComponents();\n }",
"public SmjerForma() {\n initComponents();\n entitet = new Smjer();\n obrada = new ObradaSmjer(entitet);\n setTitle(Aplikacija.NASLOV_APP + \" Smjerovi\");\n ucitaj();\n }",
"public DocenteCrear() {\n initComponents();\n }",
"Secuencia createSecuencia();",
"FORM createFORM();",
"public TelaEsqueceuSenha() {\n initComponents();\n }",
"public ServerskaForma() {\n initComponents();\n \n \n \n }",
"public FormAdminEscuelas() {\n initComponents();\n }",
"private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}",
"public CadastroTela() {\n super(\"Cadastro\");\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public FormProduto() {\n initComponents();\n }",
"com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();",
"public GUIAddAntecedente() {\n initComponents();\n this.controller = ControllerAntecedentesPenales.getInstance();\n \n }",
"public NewConsultasS() {\n initComponents();\n limpiar();\n bloquear();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find the element in the list which matches the object | private <T> T findActual(T matchingObject, List<? extends T> list) {
T actual = null;
for (T check : list) {
if (check.equals(matchingObject)) {
actual = check;
}
}
return actual;
} | [
"public E find(E obj){\n \t//calls contains to save from writing same code.\n \tif (contains(obj))\n\t return obj;\n\telse\n\t return null;\n\t}",
"public static Object find (Object aObject, java.util.List aList)\n\t{\n\t\tint theIndex = indexOf(aObject, aList);\n\t\tif (theIndex == -1) return null;\n\t\telse return aList.get (theIndex);\n\t}",
"public Item findItem(Item toFind){\n int index = items.indexOf(toFind); // Searching for index of item\n if(index != -1){ // Making sure item found (indexOf didn't return -1) \n return items.get(index); // Returning reference to item in list\n }\n else{\n return null; // Return Null if item not found\n }\n }",
"@Override\n public T findById(Id id) throws Exception {\n for(T elem : list)\n if(elem.getId().equals(id))\n return elem;\n throw new Exception(\"Element not found\");\n }",
"Road findByName(String toFind, ArrayList<Road> list)\n\t{\n\t\tRoad tmp;\n\t\tIterator<Road> it = list.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\ttmp = it.next();\n\t\t\tif(tmp.getName().equals(toFind))\n\t\t\t{\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Object getMatch( Object x )\n {\n int currentPos = findPos( x );\n if( array[ currentPos ] == null )\n return null;\n return array[ currentPos ].element;\n }",
"public int indexOf(Object elem);",
"public T find (T target);",
"public int find(T ob){\n for (int j = 0; j < item.length; j++) {\n if (item[j] == ob) return j;\n }\n return -1;\n }",
"public E find(E obj)\n {\n Node<E> beginning=head;// Tmp variable so our head variable doens't move.\n E dataholder;\n\n while(beginning!=null)\n {\n if(((Comparable<E>)obj).compareTo(beginning.data)==0)\n {\n dataholder=obj;\n return dataholder;\n\n }\n if(((Comparable<E>)obj).compareTo(beginning.data)!=0 && beginning.next!=null)\n {\n beginning=beginning.next; //Move pointer if there is a node to the right. \n\n }\n if(((Comparable<E>)obj).compareTo(beginning.data)!=0 && beginning.next==null)// We reached the end so the element isn't in there. Check last element before returning null\n {\n return null;\n\n }\n\n }\n return null;\n }",
"@Override\n\tpublic T retrieveItem(T obj) {\n\t\tif(cache.contains(obj)) {\n\t\t\tfor (T objInSet : cache) {\n\t\t\t\tif (objInSet.equals(obj)) {\n\t\t\t\t\treturn objInSet;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public SNode<T> find (T searchdata){\r\n SNode<T> cur = head;\r\n while (cur!=null){\r\n if (cur.element().equals(searchdata)){\r\n return cur;\r\n }\r\n cur = cur.getNext();\r\n }\r\n return null;\r\n}",
"public int indexOfObject(Object obj);",
"public boolean findElement(int element) {\r\n\tfor(int i = 0 ;i <myList.size();i++) {\r\n\t\tif(element == myList.get(i))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}",
"public int indexOf(Object elem, int index);",
"private Node find(T target)\n {\n Node<T> position = head;\n T itemAtPosition;\n while (position != null)\n {\n itemAtPosition = position.data;\n if (itemAtPosition.equals(target))\n return position;\n position = position.link;\n }\n return null; //target was not found\n }",
"int search(E item);",
"public T findItem(Element elem) {\n for (T c : items) {\n if (DOM.isOrHasChild(c.getElement(), elem)) {\n return c;\n }\n }\n return null;\n }",
"private PooledSoftReference<T> findReference(final T obj) {\n final Optional<PooledSoftReference<T>> first = allReferences.stream()\n .filter(reference -> reference.getObject() != null && reference.getObject().equals(obj)).findFirst();\n return first.orElse(null);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ To do: implement sendRRequest method | public void sendRRequests() {
} | [
"public Response sendRequest(Request r){\n int currTries = 0;\n Response response = null;\n ByteBuffer dataBuf = ByteBuffer.allocate(2000);\n Serializer.serializeObject(r, dataBuf);\n\n while (currTries < this.maxTries){\n currTries += 1;\n System.out.println(\"Sending \" + r.getClass().getName() + \" to server with ID \" + this.requestID);\n this.send(dataBuf, this.requestID);\n try{\n response = this.receive();\n if (response != null){ //message is complete\n this.retryReceive = false;\n this.requestID += 1;\n return response;\n }\n this.retryReceive = true; //need to retry\n } catch (RuntimeException e){\n if (e.getCause() instanceof SocketTimeoutException) {\n System.out.println(\"Socket Timeout, No Response Received\");\n } else{\n e.printStackTrace();\n }\n }\n }\n if (currTries == this.maxTries){\n System.out.println(\"No response from server after all retries exceeded\");\n }\n this.requestID += 1;\n ResponseMessage responseMessage = new ResponseMessage(500, \"Request Timeout while waiting for reply.\");\n this.retryReceive = false;\n return new NullResponse(responseMessage);\n }",
"@Override\n\tpublic void visit(Request r) {\n\t\tif (!ph.getPeerChoked()) {\n\t\t\tSystem.out.println(\"requete rećue\");\n\t\t\tbyte[] body = r.getBody();\n\t\t\tbyte[] indexB = new byte[4], beginB = new byte[4], lengthB = new byte[4];\n\t\t\tTorrent torrent = ph.getTorrent();\n\t\t\tint index = 0, begin = 0, length = 0;\n\n\t\t\tindexB = Arrays.copyOfRange(body, 0, 4);\n\t\t\tindex = byteArrayToInt(indexB);\n\n\t\t\tbeginB = Arrays.copyOfRange(body, 4, 8);\n\t\t\tbegin = byteArrayToInt(beginB);\n\n\t\t\tlengthB = Arrays.copyOfRange(body, 8, body.length);\n\t\t\tlength = byteArrayToInt(lengthB);\n\n\t\t\tPiece piece = torrent.getPieces().get(index);\n\t\t\tif (index <= torrent.getPieces().size()) {\n\t\t\t\tbyte[] block = new byte[length];\n\t\t\t\tbyte[] pieceByte = piece.getData();\n\t\t\t\tfor (int i = 0; i < length; i++) {\n\t\t\t\t\tblock[i] = pieceByte[begin + i];\n\t\t\t\t}\n\t\t\t\tsb = new SendBlock(index, begin, block);\n\t\t\t\tthis.ph.addMessageQueue(sb);\n\t\t\t\tSystem.out.println(\"sendBlock envoyé\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Index trop grand\");\n\t\t\t}\n\t\t}\n\t}",
"void sendResponse(RSP_TYPE responseData);",
"public void SendRequest(final String sendFromX,final String sendFromY,final String sendToX,final String sendToY,final String routeType,final Long timestamp){\n try{\n if(!sendFromX.isEmpty() && !sendFromY.isEmpty() && !sendToX.isEmpty() && !sendToY.isEmpty()){\n Map<String,String> request = new HashMap<String,String>() {{\n // make list of data according to the requirement of reittiopas\n put(\"request[changeMargin]\", \"3\"); \n put(\"request[end][x]\", sendToX);\n put(\"request[end][y]\",sendToY);\n put(\"request[excludedLines]\",\"null\");\n put(\"request[includedLines]\",\"null\");\n put(\"request[maxTotWalkDist]\",\"no_restriction\");\n put(\"request[numberRoutes]\",\"1\");\n put(\"request[routingMethod]\",\"default\");\n put(\"request[start][x]\",sendFromX);\n put(\"request[start][y]\",sendFromY);\n put(\"request[timeDirection]\",routeType);\n put(\"request[timestamp]\",timestamp.toString());\n put(\"request[via]\",\"null\");\n put(\"request[walkSpeed]\",\"70\");\n put(\"token\",token);\n }};\n // Map of data to send with URL , created using \"Double Brace Initialization\"\n \n bFetchURL urlContent = new bFetchURL(\"http://reittiopas.turku.fi/getroute.php\",request,\"POST\");\n //fetch the url\n String html = null;\n try {\n html = urlContent.content();\n // get the reposonse content\n } \n catch (NullPointerException ex){\n JOptionPane.showMessageDialog(null, \"Sorry cannot connect to server, searching route failed\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"Sorry cannot connect to server, searching route failed\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n Document DOMxml=null;\n try {\n //since the reposonse data is XML we need to parse XML from normal html text\n DOMxml = loadXMLFromString(html);\n } catch (Exception ex) {\n Logger.getLogger(eMainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n //update the search panel with the XML response\n updateRightPanel(DOMxml);\n }\n }\n catch(NullPointerException ex){\n JOptionPane.showMessageDialog(null, \"Some fields are missing\",\"Error\",JOptionPane.ERROR_MESSAGE);\n }\n }",
"private void doRequest() {\n\n try {\n JsonObject request = new JsonObject()\n .put(\"action\", Math.random() < 0.5 ? \"w\" : \"r\")\n .put(\"timeOfRequest\", System.currentTimeMillis());\n\n if (request.getString(\"action\") == \"w\") {\n request.put(\"data\", new JsonObject()\n .put(\"key\", \"value\")\n );\n logger.debug(\"requesting write: \" + request.toString());\n eb.send(\"storage-write-address\", request, new DeliveryOptions().setSendTimeout(1000), this);\n } else {\n Random random = new Random();\n List<String> keys = new ArrayList<String>(map.keySet());\n String randomKey = keys.get(random.nextInt(keys.size()));\n request.put(\"id\", randomKey);\n logger.debug(\"waiting for read: \" + request.toString());\n eb.send(\"storage-read-address\", request, new DeliveryOptions().setSendTimeout(1000), this);\n }\n } catch (Exception e) {\n logger.warn(\"Error\");\n makeRequest();\n }\n\n }",
"public void sendReadRequest() throws UnknownHostException, SocketException, IOException {\n InetAddress address = InetAddress.getByName(\"localhost\");\n socket = new DatagramSocket(rand.nextInt(4000) + 1024);\n byte[] readByteArray = new byte[516];\n byte[] requestByteArray = createRequest(OP_RRQ, fileName, \"octet\");\n DatagramPacket packet = new DatagramPacket(requestByteArray, requestByteArray.length, address, TFTP_DEFAULT_PORT);\n socket.send(packet);\n receiveFile();\n socket.close();\n }",
"private void sendReceiveRes(){\n\t}",
"RickyAndMortyResponse request(RickyAndMortyRequest id) throws Exception;",
"public void addRR(Request req) {\n\n }",
"protected void doDMR(DapRequest drq, DapContext cxt) throws IOException {\n // Convert the url to an absolute path\n String realpath = getResourcePath(drq, drq.getDatasetPath());\n\n DSP dsp = DapCache.open(realpath, cxt);\n DapDataset dmr = dsp.getDMR();\n\n /* Annotate with our endianness */\n ByteOrder order = (ByteOrder) cxt.get(Dap4Util.DAP4ENDIANTAG);\n setEndianness(dmr, order);\n\n // Process any constraint view\n CEConstraint ce = null;\n String sce = drq.queryLookup(DapProtocol.CONSTRAINTTAG);\n ce = CEConstraint.compile(sce, dmr);\n setConstraint(dmr, ce);\n\n // Provide a PrintWriter for capturing the DMR.\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n\n // Get the DMR as a string\n DMRPrinter dapprinter = new DMRPrinter(dmr, ce, pw, drq.getFormat());\n if (cxt.get(Dap4Util.DAP4TESTTAG) != null)\n dapprinter.testprint();\n else\n dapprinter.print();\n pw.close();\n sw.close();\n\n String sdmr = sw.toString();\n if (DEBUG)\n System.err.println(\"Sending: DMR:\\n\" + sdmr);\n\n addCommonHeaders(drq);// Add relevant headers\n\n // Wrap the outputstream with a Chunk writer\n OutputStream out = drq.getOutputStream();\n ChunkWriter cw = new ChunkWriter(out, RequestMode.DMR, order);\n cw.cacheDMR(sdmr);\n cw.close();\n }",
"private void HandleRQ(DatagramSocket sendSocket, String requestedFile, int opcode) throws IOException {\n if(opcode == OP_RRQ) {\n // See \"TFTP Formats\" in TFTP specification for the DATA and ACK packet contents\n boolean result = send_DATA_receive_ACK(requestedFile, opcode, sendSocket);\n }\n\n else if (opcode == OP_WRQ) {\n boolean result = receive_DATA_send_ACK(requestedFile, opcode, sendSocket);\n }\n\n }",
"public void sendGetRequest() {\r\n\t\tString[] requests = this.input.substring(4, this.input.length()).split(\" \"); \r\n\t\t\r\n\t\tif(requests.length <= 1 || !(MyMiddleware.readSharded)){\r\n\t\t\tnumOfRecipients = 1;\r\n\t\t\trecipient = servers.get(loadBalance());\r\n\r\n\t\t\trecipient.send(this, input);\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\t\r\n\t\t\tif(requests.length <= 1) {\r\n\t\t\t\tnumOfGets++;\r\n\t\t\t\ttype= \"10\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumOfMultiGets++;\r\n\t\t\t\ttype = requests.length+\"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString reply = recipient.receive();\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\t\t\t\r\n\t\t\tint hit = 0;\r\n\t\t\thit += reply.split(\"VALUE\").length - 1;\r\n\t\t\tmiss += requests.length-hit;\r\n\r\n\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tsendBack(currentJob.getClient(), reply);\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnumOfMultiGets++;\r\n\t\t\ttype = requests.length+\"\";\r\n\t\t\tnumOfRecipients = servers.size();\r\n\t\t\trequestsPerServer = requests.length / servers.size();\r\n\t\t\tremainingRequests = requests.length % servers.size() ;\r\n\t\t\t\r\n\t\t\t//The worker thread sends a number of requests to each server equal to requestsPerServer \r\n\t\t\t//and at most requestsPerServer + remainingRequests\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < servers.size(); i++) {\r\n\t\t\t\tmessage = requestType;\r\n\t\t\t\tfor(int j = 0; j < requestsPerServer; j++){\r\n\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\tmessage += requests[requestsPerServer*i+j];\r\n\t\t\t\t\tif(i < remainingRequests) {\r\n\t\t\t\t\t\tmessage += \" \";\r\n\t\t\t\t\t\tmessage += requests[requests.length - remainingRequests + i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tservers.get(i).send(this, message);\r\n\t\t\t}\r\n\t\t\tsendTime = System.nanoTime();\r\n\r\n\t\t\tworkerTime = sendTime - pollTime;\r\n\r\n\t\t\tint hit = 0;\r\n\t\t\tfor(ServerHandler s : servers) {\r\n\t\t\t\tString ricevuto = s.receive();\r\n\t\t\t\thit += ricevuto.split(\"VALUE\").length - 1;\r\n\t\t\t\treplies.add(ricevuto);\r\n\t\t\t}\r\n\t\t\treceiveTime = System.nanoTime();\r\n\t\t\tprocessingTime = receiveTime - sendTime;\r\n\r\n\t\t\tmiss += requests.length-hit;\r\n\t\t\t\r\n\t\t\tfinalReply = \"\";\r\n\t\t\tfor(String reply : replies) {\r\n\t\t\t\tif(!(reply.endsWith(\"END\"))) {\r\n\t\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\t\treplies.clear();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treply = reply.substring(0, reply.length() - 3);\r\n\t\t\t\t\tfinalReply += reply;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalReply += \"END\";\r\n\t\t\tsendBack(currentJob.getClient(), finalReply);\r\n\t\t\treplies.clear();\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"public void sendRequest() {\n\t\tURL obj;\n\t\ttry {\n\t\t\t// Instantiating HttpURLConnection object for making GET request.\n\t\t\tobj = new URL(REQUEST_URL);\n\t\t HttpURLConnection connection = (HttpURLConnection) obj.openConnection();\n\t\t connection.setRequestMethod(REQUEST_METHOD);\n\t\t connection.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t connection.setInstanceFollowRedirects(FOLLOW_REDIRECTS);\n\t\t\tHttpURLConnection.setFollowRedirects(FOLLOW_REDIRECTS);\n\t\t\n\t\t\t// Checking response code for successful request.\n\t\t\t// If responseCode==200, read the response,\n\t\t\t// if responseCode==3xx, i.e., a redirect, then make the request to \n\t\t\t// new redirected link, specified by 'Location' field. \n\t\t\t// NOTE: Only one level of redirection is supported for now. \n\t\t\t// Can be modified to support multiple levels of Redirections.\n\t\t\tint responseCode = connection.getResponseCode();\n\t\t\tif(responseCode == HttpURLConnection.HTTP_MOVED_PERM ||\n\t\t\t\t\tresponseCode == HttpURLConnection.HTTP_MOVED_TEMP ||\n\t\t\t\t\tresponseCode == HttpURLConnection.HTTP_SEE_OTHER) {\n\t\t\t\tlogger.info(\"Redirect received in responseCode\");\n\t\t\t\tString newUrl = connection.getHeaderField(\"Location\");\n\t\t\t\tconnection = (HttpURLConnection) new URL(newUrl).openConnection();\n\t\t\t}\n\t\t\tresponseCode = connection.getResponseCode();\n\t\t\t\n\t\t\t// process response message if responseCode==200 i.e., success.\n\t\t\tif (responseCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tconnection.getInputStream()));\n\t\t\t\tString inputLine;\n\t\t\t\tStringBuffer response = new StringBuffer();\n\t\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\t\tresponse.append(inputLine);\n\t\t\t\t}\n\t\t\t\tin.close();\n\t\t\t\t//Uncomment following line to log response data.\n\t\t\t\t//logger.info(response.toString());\n\t\t\t} else {\n\t\t\t\tlogger.warning(\"Http GET request was unsuccessful!\");\n\t\t\t}\n\t\t} catch (MalformedURLException e) {\n\t\t\tlogger.severe(\"MalformedURLException: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tlogger.severe(\"IOException: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n }",
"com.google.openrtb.OpenRtb.BidRequest getRequest();",
"private void sendRequest() {\n\t\ttry {\r\n\t\t\tsendReceiveSocket.send(sendPacket);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tsendReceiveSocket.close();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}",
"int invokeOemRilRequestRaw(byte[] oemReq, byte[] oemResp);",
"public IFutureResponse send(IHttpRequest request) throws IOException, ConnectException;",
"@Test\n public void testSendRequest() throws Exception {\n String baseUrl = Transformer.getMessageTemplate(\"baseUrl\");\n Object[] objs = {reactionStableId};\n String pwQuery = Transformer.getMessageTemplate(\"getPathwaysByReactionIdQuery\", objs);\n Object[] objs1 = {pwQuery};\n String query = Transformer.getMessageTemplate(\"queryTpl\", objs1);\n URLConnection uCon = instance.sendRequest(baseUrl, query);\n assertNotNull(uCon);\n }",
"void sendHttpRequest(URI uri, HttpRequest.Method method, Map<String,String> headers, byte[] data, Object context);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the last added MenuHeader to the given header | private void setLastAddedHeader(MenuHeader header) {
this.lastAddedHeader = header;
} | [
"void addMenuHeader(MenuHeader menuHeader) {\r\n\t\tthis.getMenuBar().addMenuHeader(menuHeader);\r\n\t\tthis.setLastAddedHeader(menuHeader);\r\n\t}",
"void addMenuItemToLastAddedHeader(MenuItem item) {\r\n\t\tif (this.getLastAddedHeader() != null) {\r\n\t\t\tthis.lastAddedHeader.getDropDownMenu().addMenuItem(item);\r\n\t\t} else {\r\n\t\t\tthrow new IllegalStateException(\"No MenuHeaders are added to this MenuBar.\");\r\n\t\t}\r\n\t}",
"private MenuHeader getLastAddedHeader() {\r\n\t\treturn this.lastAddedHeader;\r\n\t}",
"public void addHeader(View header) {\n mHeaderView = header;\n notifyItemInserted(0);\n }",
"public void setHeader(final Header header) {\n mHeader=header;\n updateFields();\n }",
"public void newHeaderElement(String newHeader) {\n\n\t\t// header in map operation\n\t\tString[] key = newHeader.split(\": \");\n\t\theaders.put(key[0], key[1]);\n\n\t\t// header in listModel operation\n\t\tthis.requestHeader.addElement(newHeader);\n\t}",
"public void setHeader(ArrayList<HeaderCell> header, int headerHeight) {\r\n\t\tcontroller.setHeader(header, headerHeight);\r\n\t}",
"public void addHeader(Header h);",
"void setHeader(String header);",
"public void setHeader (HeaderRecord header) {\n this.header = header;\n }",
"void setHeader(java.lang.String header);",
"private static void updateHeaderMenu() throws Exception \n {\n String fileName = _outputDir + \"/src/\" + HEADER_FILE;\n File file = new File(fileName);\n if(file.exists())\n {\n List<String> content = readFile(file);\n \n StringBuffer linkStr = new StringBuffer();\n for(int index = 0; index < LINKS.size(); index++)\n {\n String link = LINKS.get(index);\n \n if(index > 0)\n {\n linkStr.append(\" \");\n }\n linkStr.append(link);\n linkStr.append(\"\\n\");\n }\n content = replaceMacro(content, Constants.LINKS_MACRO, linkStr.toString());\n content = replaceMacro(content, Constants.APPLICATION_NAME, _applicationName);\n \n StringBuffer contents = new StringBuffer();\n \n for(String line: content)\n {\n contents.append(line);\n contents.append(\"\\n\");\n }\n \n updateFile(fileName, contents.toString());\n }\n else\n {\n // Should never happen\n System.err.println(\"Error: The react header file does not exist : \" + fileName);\n System.exit(1);\n }\n }",
"public void setPlayerListHeader ( String header ) {\n\t\texecute ( handle -> handle.setPlayerListHeader ( header ) );\n\t}",
"void setPageHeader(PageHeader pageHeader);",
"void setHeader(String headerName, String headerValue);",
"private void updateHeader()\n\t{\n\t\tJLabel words = (JLabel) header.getComponent(0);\n\t\twords.setBackground(Color.WHITE);\n\t\twords.setFocusable(false);\n\t\twords.setText(model.getMonth() + \" \" + model.getYear());\n\t}",
"public void setHeader(jacob.scheduler.system.filescan.castor.HeaderType header)\n {\n this._header = header;\n }",
"protected /*virtual*/ void OnHeaderChanged(Object oldHeader, Object newHeader) \r\n {\r\n RemoveLogicalChild(oldHeader); \r\n AddLogicalChild(newHeader); \r\n }",
"public void set_header(String header) {\n this.header= header;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a custom JavaFx node example | @SuppressWarnings("checkstyle:magicnumber")
private Parent createCustomExample() {
Parent node;
StackPane nodePane = new StackPane();
nodePane.setId("node");
nodePane.setStyle("-fx-background-color: white;");
StackPane pane = createColoredStackPane();
List<Node> paneChildren = pane.getChildren();
nodePane.getChildren().add(pane);
Group group = createGroup();
List<Node> groupChildren = group.getChildren();
paneChildren.add(group);
Rectangle smallRectangle = new Rectangle(10, 10);
smallRectangle.setId("smallrectangle");
smallRectangle.setFill(Color.BLUE);
smallRectangle.resizeRelocate(0, 0, 1, 1);
paneChildren.add(smallRectangle);
Line line = new Line(0, 0, 50, 50);
groupChildren.add(line);
Label label = new Label("hello");
groupChildren.add(label);
node = nodePane;
return node;
} | [
"Node createNode();",
"@FXML\n\tpublic void CreateNode(ActionEvent e) {\n\t\tgraph.node=true;\n\t\tgraph.edge=false;\n\t}",
"TNode createTNode();",
"VEXNode createVEXNode();",
"private Node getExampleView() {\n Node base = new Node();\n base.setRenderable(exampleLayoutRenderable);\n Context c = this;\n // Add listeners etc here\n View eView = exampleLayoutRenderable.getView();\n eView.setOnTouchListener((v, event) -> {\n Toast.makeText(\n c, \"Location marker touched.\", Toast.LENGTH_LONG)\n .show();\n return false;\n });\n\n return base;\n }",
"NodePart createNodePart();",
"ChildNode createChildNode();",
"public Node addBoxNode() {\n TextField heightField = new TextField(\"1\");\n Label heightLabel = new Label(\"Height: \");\n heightLabel.setPadding(new Insets(5, 0, 0, 0));\n heightLabel.setLabelFor(heightField);\n TextField widthField = new TextField(\"1\");\n Label widthLabel = new Label(\"Width: \");\n widthLabel.setPadding(new Insets(5, 0, 0, 0));\n widthLabel.setLabelFor(widthField);\n TextField depthField = new TextField(\"1\");\n Label depthLabel = new Label(\"Depth: \");\n depthLabel.setPadding(new Insets(5, 0, 0, 0));\n depthLabel.setLabelFor(depthField);\n Button add = new Button(\"Add Box\");\n add.setOnAction(event -> {\n try {\n shapes.addShape(ShapeData.box(Double.parseDouble(widthField.getText()), Double.parseDouble(heightField.getText()), Double.parseDouble(depthField.getText()), 0, 0, 0, 1, COLORS[COLORS.length - 1]));\n addShapesAndBackground();\n } catch (Exception error) {\n Alert alert = new Alert(Alert.AlertType.ERROR, error.getMessage());\n alert.showAndWait();\n }\n });\n HBox hbox = new HBox(20, heightLabel, heightField, widthLabel, widthField, depthLabel, depthField, add);\n hbox.setAlignment(Pos.CENTER);\n hbox.setPadding(new Insets(20));\n return hbox;\n }",
"NodeFeature createNodeFeature();",
"public static native final Node createNode(String json) /*-{\n\t\treturn $wnd.Kinetic.Node.create(json);\n\t}-*/;",
"AddNodes createAddNodes();",
"private void create() {\n\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t} catch (Exception e) {\n\t\t}\n\n\t\tImageIcon iconFrame = ImageResource.getInstance().createImageIcon(\"jensoft.png\", \"\");\n\t\tsetIconImage(iconFrame.getImage());\n\t\tsetTitle(\"JenSoft API\");\n\t\tgetContentPane().removeAll();\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t\tJPanel masterPane = new JPanel();\n\t\tmasterPane.setBackground(Color.BLACK);\n\n\t\tmasterPane.setBorder(BorderFactory.createEmptyBorder(50, 50, 50, 50));\n\t\tmasterPane.setLayout(new BorderLayout());\n\n\t\tDemoTabSet tabSet = new DemoTabSet();\n\t\ttabSet.setTitle(\"JenSoft - API\");\n\n\t\tDemoTab demoTab = new DemoTab(\"Demo\");\n\n\t\tdemoTab.setTabColor(Color.DARK_GRAY);\n\t\tImageIcon icon1 = ImageResource.getInstance().createImageIcon(\"demo.png\", \"\");\n\t\tdemoTab.setTabIcon(icon1);\n\n\t\tDemoTab sourceTab = new DemoTab(\"X2D\");\n\t\tsourceTab.setTabColor(JennyPalette.JENNY6);\n\t\tImageIcon icon = ImageResource.getInstance().createImageIcon(\"source.png\", \"\");\n\t\tsourceTab.setTabIcon(icon);\n\n\t\tDemoTab uisourceTab = new DemoTab(\"Frame UI\");\n\t\tuisourceTab.setTabColor(RosePalette.LEMONPEEL.brighter());\n\t\tImageIcon icon2 = ImageResource.getInstance().createImageIcon(\"source.png\", \"\");\n\t\tuisourceTab.setTabIcon(icon2);\n\n\t\tX2D x2d = null;\n\t\ttry {\n\t\t\tInputStream inputStream = getClass().getResourceAsStream(x2dResourcePath);\n\t\t\tx2d = new X2D();\n\t\t\tx2d.registerX2D(inputStream);\n\t\t} catch (X2DException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tView view = x2d.getView();\n\n\t\ttabSet.addComandTab(demoTab, view);\n\t\tfinal X2D fx2d = x2d;\n\n\t\tJavaSourcePane uiSourcePane = new JavaSourcePane();\n\t\ttabSet.addComandTab(uisourceTab, uiSourcePane);\n\t\tX2DSourcePane x2dSourcePane = new X2DSourcePane();\n\t\ttabSet.addComandTab(sourceTab, x2dSourcePane);\t\t\n\n\t\tuiSourcePane.loadSource(this.getClass());\n\t\tx2dSourcePane.loadX2DSource(fx2d);\n\n\t\tdemoTab.setSelected(true);\n\t\tmasterPane.add(tabSet, BorderLayout.CENTER);\n\n\t\tgetContentPane().add(masterPane, BorderLayout.CENTER);\n\t\tsetVisible(true);\n\t}",
"private void createNodesForUI() {\r\n //Layout object\r\n borderPane=new BorderPane();\r\n borderPane.setPrefSize(980,600);\r\n borderPane.setStyle(\"-fx-background-color:tan\");\r\n \r\n //Setup UI Elements here\r\n topLbl=new Label(\"Watch Elearning\");\r\n btnForward=new Button(\"Next\");\r\n btnForward.setPrefSize(80,20);\r\n btnBack=new Button(\"Previous\");\r\n btnBack.setPrefSize(80,20);\r\n bottomLbl = new Label(\"Designed by TAHMINA BHUIYAN\");\r\n btnMenu=new Button(\"Menu\");\r\n btnMenu.setPrefSize(80,20);\r\n btnImages=new Button(\"Images\");\r\n btnImages.setPrefSize(80,20);\r\n btnQuiz=new Button(\"Quiz\");\r\n btnQuiz.setPrefSize(80,20);\r\n btnVideoNext=new Button(\">\");\r\n // new VBox s to hold UI element\r\n topVb = new VBox();\r\n leftVb = new VBox(15);\r\n rightVb = new VBox();\r\n bottomVb = new VBox();\r\n cornerVb=new HBox();\r\n // button event handler\r\n btnForward.setOnAction((ActionEvent event) -> {\r\n MyApp2.getMainScreen().changeScreen(9);\r\n });\r\n // button event handler\r\n btnBack.setOnAction((ActionEvent event) -> {\r\n MyApp2.getMainScreen().changeScreen(10);\r\n });\r\n btnMenu.setOnAction((ActionEvent event) -> {\r\n MyApp2.getMainScreen().changeScreen(2);\r\n });\r\n btnImages.setOnAction((ActionEvent event) -> {\r\n MyApp2.getMainScreen().changeScreen(6);\r\n });\r\n btnQuiz.setOnAction((ActionEvent event) -> {\r\n MyApp2.getMainScreen().changeScreen(7);\r\n }); \r\n}",
"protected SceneGraphObject createNode( String className ) {\n\tSceneGraphObject ret;\n\n\ttry {\n Class state = Class.forName( className, true, control.getClassLoader() );\n\n\t ret = createNode( state );\n\n\t //System.err.println(\"Created J3D node for \"+className );\n\t} catch(ClassNotFoundException e) {\n if (control.useSuperClassIfNoChildClass())\n ret = createNodeFromSuper( className );\n else\n throw new SGIORuntimeException( \"No Such Class \"+\n\t\t\t\t\t\tclassName );\n\t}\n\n\treturn ret;\n }",
"public JSNode() {\n\n }",
"public StackPane createNode(double x, double y, double r, String text, \n Color fill, Color outline, Color textColor) {\n\n Circle c = new Circle();\n c.setRadius(r);\n c.setFill(fill);\n c.setStroke(outline);\n Text t = createText(text, textColor);\n Node [] nodes = new Node [] {c, t};\n StackPane s = createStackPane(nodes);\n s.setLayoutX(x);\n s.setLayoutY(y);\n return s;\n }",
"public static void main(String[] args) {\n PointerTree<Integer> arbol = new PointerTree<>();\n\n Node<Integer> raiz = arbol.getRoot();\n raiz.setLabel(1);\n\n Node<Integer> hijo1 = new PointerTreeNode<>();\n hijo1.setLabel(2);\n Node<Integer> hijo2 = new PointerTreeNode<>();\n hijo2.setLabel(3);\n raiz.addChild(hijo1);\n raiz.addChild(hijo2);\n\n\n\n\n }",
"private GridPane createSeedPane() {\n\t\t\n\t\tGridPane seedPane = new GridPane();\n\t\t\n\t\tLabel nbSeed = new Label(\"Seed : \");\n\t\tTextField seedField = new TextField();\n\t\tseedPane.addRow(0, nbSeed, seedField);\n\t\tseed.textProperty().bind(seedField.textProperty());\n\t\t\n\t\tseedPane.setStyle(\"\"\n\t\t\t\t+ \"-fx-border-radius: 25;\"\n\t\t\t\t+ \"-fx-background-radius: 25;\"\n\t\t\t\t+ \"-fx-padding: 10;\"\n\t\t\t\t+ \"-fx-background-color:lightgray;\"\n\t\t\t\t+ \"-fx-border-width: 2;\"\n\t\t\t\t+ \" -fx-border-style: solid;\"\n\t\t\t\t+ \" -fx-border-color: gray;\");\n\t\t\n\t\treturn seedPane;\n\t}",
"private void createFirstNameBox() {\n firstNameField = new TextField();\n firstNameField.setId(\"Firstname\");\n HBox firstNameBox = new HBox(new Label(\"First name: \"), firstNameField);\n firstNameBox.setAlignment(Pos.CENTER);\n mainBox.getChildren().add(firstNameBox);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for property expSignStr. | public String getExpSignStr() {
return expSignStr;
} | [
"public void setExpSignStr(String expSignStr) {\n\t\tthis.expSignStr = expSignStr;\n\t}",
"public Integer getExpSign() {\n\t\treturn expSign;\n\t}",
"java.lang.String getSign();",
"public String getSign() {\n return sign;\n }",
"public String getWavesSignStr() {\n\t\treturn wavesSignStr;\n\t}",
"public void setExpSign(Integer expSign) {\n\t\tthis.expSign = expSign;\n\t}",
"public String getSignReturn() {\n return signReturn;\n }",
"public Sign getSign() {\n return sign;\n }",
"public java.lang.String getRombergsSign () {\n\t\treturn rombergsSign;\n\t}",
"public String getSignFlag() {\n return signFlag;\n }",
"public String getSignName() {\n return signName;\n }",
"public String getPlayerSign() {\n\t\treturn playerSign;\t\n\t}",
"public java.lang.String getMailSign() {\n java.lang.Object ref = mailSign_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n mailSign_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getSignCode() {\n return signCode;\n }",
"public java.lang.String getMailSign() {\n java.lang.Object ref = mailSign_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n mailSign_ = s;\n }\n return s;\n }\n }",
"public String getuSign() {\n return uSign;\n }",
"public java.lang.String toLatex(){\n\t\tif (this.sign == '*'){\n\t\t\tsuper.exponentStr = this.firstTerm + \" \\\\cdot \" +this.secondTerm;\n\t\t}else {\n\t\t\t\n\t\tsuper.exponentStr = this.firstTerm + \"\" + sign + \"\" +this.secondTerm;\n\t\t}\n\t\t\n\t\treturn super.exponentStr;\n\t\t\n\t}",
"java.lang.String getSignDate();",
"public String getValidInsp() {\n return (String) getAttributeInternal(VALIDINSP);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update last modified in local copy | protected void updateLocalFileLastModified() {
if (lastModified != null) {
File file = new File(getLocalPath());
file.setLastModified(lastModified.getTime());
}
} | [
"public void updateDateModified() {\n dateModified = DateTime.now();\n }",
"long getLastModifyTime();",
"public long getLastModified();",
"void setLastUpdatedTime();",
"public void updateLastModified() {\n Context context = getContext();\n try {\n Date lastModified = new java.sql.Timestamp(new Date().getTime());\n myRow.setColumn(\"modified\", lastModified);\n DatabaseManager.updateQuery(context, \"UPDATE \" + TABLE + \" SET modified = ? WHERE id= ? \", lastModified, getID());\n completeContext(context);\n } catch (SQLException e) {\n abortContext(context);\n log.error(LogManager.getHeader(context, \"Error while updating modified timestamp\", \"Concept: \" + getID()));\n }\n }",
"public void updateLastAccessedTime();",
"Imports setLastModified(String lastModified);",
"public final void updateModifyDateTime() {\n \tm_modifyDate = System.currentTimeMillis();\n \tm_accessDate = m_modifyDate;\n }",
"public Date getLastModifiedDate();",
"Date getLastUpdated();",
"public static void updateLastUpdatedDate() {\n lastUpdated = LocalDate.now();\n }",
"public Date getModified() {\n return file.getTimestamp().getTime();\n }",
"Date getLastModifiedDate() throws IOException;",
"public long getLastModifyTime() {\n return lastModifyTime_;\n }",
"void setLastWriteTime(String path, long newTime) throws IOException;",
"void setLastModifiedTime( long modTime ) throws FileSystemException;",
"void setLastWriteTimeUtc(String path, long newTime) throws IOException;",
"public long getLastModified()\n\t{\n\t\treturn modTime;\n\t}",
"public Date getLastModified() {\r\n return lastModified;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an empty file. | private File createEmptyFile() throws IOException {
File file = new File(this.filePath);
file.getParentFile().mkdirs();
file.createNewFile();
file.setExecutable(true, false);
file.setReadable(true, false);
file.setWritable(true, false);
return file;
} | [
"public static FilePath empty() {\n return EMPTY;\n }",
"public File createEmptyFile(File n) {\n\t\t try {\r\n\t\t\t\t//System.out.println(nodeToString(node));\r\n\t\t\t\tPrintWriter writer = new PrintWriter(n, \"UTF-8\");\r\n\t\t\t\t//System.out.println(f.getAbsolutePath());\r\n\t\t\t\t\r\n\t\t\t\twriter.print(\"<?xml version=\\\"1.0\\\" encoding=\\\"ASCII\\\"?>\\r\\n\");\r\n\t\t\t\twriter.print(\"<xmi:XMI xmi:version=\\\"2.0\\\" xmlns:xmi=\\\"http://www.omg.org/XMI\\\"/>\");\r\n\t\t\t\t\r\n\t\t\t\twriter.close();\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} \r\n\t\treturn n;\r\n\t}",
"private String fileEmpty() {\n return \" Task file is empty!\";\n }",
"public File createFile()\n {\n return new File();\n }",
"public void emptyFile() throws IOException {\n FileWriter fileWriter = new FileWriter(filePath);\n fileWriter.close();\n }",
"@Test\n public void openReadWriteEmptyFile() throws Exception {\n String testFile = \"/openReadWriteEmptyFile\";\n try (CloseableFuseFileInfo closeableFuseFileInfo = new CloseableFuseFileInfo()) {\n FuseFileInfo info = closeableFuseFileInfo.get();\n // Create empty file\n info.flags.set(OpenFlags.O_WRONLY.intValue());\n Assert.assertEquals(0, mFuseFileSystem.create(testFile, 100644, info));\n Assert.assertEquals(0, mFuseFileSystem.release(testFile, info));\n // Open empty file for write\n info.flags.set(OpenFlags.O_RDWR.intValue());\n Assert.assertEquals(0, mFuseFileSystem.open(testFile, info));\n try {\n ByteBuffer buffer = BufferUtils.getIncreasingByteBuffer(FILE_LEN);\n Assert.assertEquals(FILE_LEN, mFuseFileSystem.write(testFile, buffer, FILE_LEN, 0, info));\n buffer.clear();\n Assert.assertTrue(mFuseFileSystem.read(testFile, buffer, FILE_LEN, 0, info) < 0);\n } finally {\n Assert.assertEquals(0, mFuseFileSystem.release(testFile, info));\n }\n readAndValidateTestFile(testFile, info, FILE_LEN);\n }\n }",
"@Test\n public void testZeroByteFilesAreFiles() throws Exception {\n Path src = path(\"testZeroByteFilesAreFiles\");\n // create a zero byte file\n FSDataOutputStream out = fs.create(src);\n out.close();\n assertIsFile(src);\n }",
"public static AddressableDataFile getEmptyImmutableDataFile() {\n return new EmptyDataFile();\n }",
"private File createEmptyDirectory() throws IOException {\n File emptyDirectory = findNonExistentDirectory();\n if (emptyDirectory.mkdir() == false) {\n throw new IOException(\"Can't create \" + emptyDirectory);\n }\n\n return emptyDirectory;\n }",
"public static File createSmallFile() throws IOException{\n\t\tFile smallFile = File.createTempFile(\"TempFile\", \".txt\");\n\t\tsmallFile.deleteOnExit();\n\t\t\n\t\tWriter writer = new OutputStreamWriter(new FileOutputStream(smallFile));\n\t\twriter.write(\"0\");\n\t\twriter.close();\n\t\treturn smallFile;\n\t\t\t\t\n\t}",
"public RandomAccessFile createEmptyDisk(File diskFile) throws IOException {\n \treturn createEmptyDisk(diskFile, 20);\n }",
"@Test\n public void testDeleteGeneratedEmptyFile() throws Throwable {\n String resources = getResourceFolder();\n String outputFile = resources + \"/out/test_deleteGeneratedEmptyFile.csv\";\n LOGGER.debug(\"Test file path: \" + outputFile);\n TFileOutputDelimitedProperties properties = createOutputProperties(outputFile, false);\n List<IndexedRecord> records = new ArrayList<>();\n // Delete generated empty file function not be checked\n doWriteRows(properties, records);\n File outFile = new File(outputFile);\n assertTrue(outFile.exists());\n assertEquals(0, outFile.length());\n assertTrue(outFile.delete());\n // Active delete generated empty file function\n assertFalse(outFile.exists());\n properties.deleteEmptyFile.setValue(true);\n doWriteRows(properties, records);\n assertFalse(outFile.exists());\n\n }",
"public void createTestFileWithoutKey() {\n\t\tList<String> lines = new ArrayList<>(0);\n\t\tPath file = Paths.get(TEST_FILE_NAME);\n\t\ttry {\n\t\t\tFiles.write(file, lines);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void testEmptyHFile() throws IOException {\n Path f = new Path(TestHFile.ROOT_DIR, testName.getMethodName());\n HFileContext context = new HFileContextBuilder().withIncludesTags(false).build();\n Writer w = HFile.getWriterFactory(TestHFile.conf, TestHFile.cacheConf).withPath(TestHFile.fs, f).withFileContext(context).create();\n w.close();\n Reader r = HFile.createReader(TestHFile.fs, f, TestHFile.cacheConf, true, TestHFile.conf);\n r.loadFileInfo();\n Assert.assertFalse(r.getFirstKey().isPresent());\n Assert.assertFalse(r.getLastKey().isPresent());\n }",
"public boolean isEmpty() {\r\n return mFile.isEmpty();\r\n }",
"public static boolean isFileEmpty(File currentFile) {\n\t\treturn currentFile.length()<=0;\n\t}",
"public File() {}",
"public static File createEmptyPhotoFile(Context currentContext) throws IOException {\n // Create a timestamp which will be part of the name. This way we create a pseudo-unique\n // file name.\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault())\n .format(new Date());\n String photoFileName = \"JPEG_\" + timeStamp + \"_\";\n // Get the phone image storage directory.\n File storageDir = currentContext.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n // Return a temporary file created in the storage directory.\n return File.createTempFile(\n photoFileName,\n \".jpg\",\n storageDir\n );\n }",
"protected File createTmpFile() {\n final long rand = (new Random(System.currentTimeMillis())).nextLong();\n File file = new File(\"jpcoverage\" + rand + \".tmp\");\n return file;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds an user from a given userId | public User findUserFromId(String userId){
return null;
} | [
"public Account findUserID(int userId);",
"UserAccount loadUserByUserId(String userId) throws UsernameNotFoundException;",
"public UserEntity findByPrimaryKey(String userId) throws FinderException;",
"public Users queryUserById(String userId);",
"Users findByUserId(long id);",
"User find(long id);",
"UserEntity getExistingUser(Long userId) throws UserException;",
"User getUserById(int id) throws NotFoundException;",
"User find(Long id) throws DatabaseException;",
"User selectById(String uid);",
"LoginVO findUser(String id);",
"public abstract User find(long id);",
"public User find(Long id) throws DatabaseException;",
"public Users find(int id);",
"@Override\n public User getUser(String userId){\n return userDAO.getUser(userId);\n }",
"UserEntity getUserDetailsByUserId(Integer userId) throws Exception;",
"@Override\n public Game getByUserId(int userId) throws DataAccessException {\n List<Game> games = getAll();\n for (Game g : games){\n if (g.getUser().getId() == userId) {\n return g;\n }\n }\n return null;\n }",
"public String findUser(String id) throws UserNotFoundException{\n\t\tString userFound = \"\";\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tif (users.get(i).getDocumentNumber().equals(id)) {\n\t\t\t\tuserFound = \"\\n-------USER-------\\n\"+users.get(i).toString();\n\t\t\t}\n\t\t}\n\t\tif (userFound.equals(\"\")) {\n\t\t\tthrow new UserNotFoundException(id);\n\t\t}\n\t\telse {\n\t\t\treturn userFound;\n\t\t}\n\t}",
"public User findUser(String username, long id) throws UserNotFoundException {\n Dao<User, String> userDAO;\n User user = new User();\n user.setTwitchId(id);\n user.setUsername(username);\n try {\n userDAO = DaoManager.createDao(cs, User.class);\n QueryBuilder<User, String> builder = userDAO.queryBuilder();\n builder.where().eq(\"twitchId\", id);\n List<User> list = userDAO.query(builder.prepare());\n for (int i = 0; i < list.size(); i++) {\n user = list.get(i);\n }\n if (user.getId() == 0) {\n // User not found by his twitch ID, try to find it with his username\n builder.where().eq(\"username\", username);\n List<User> listUsername = userDAO.query(builder.prepare());\n for (int i = 0; i < listUsername.size(); i++) {\n // User found in database\n user = listUsername.get(i);\n user.setTwitchId(id);\n }\n if (user.getId() != 0) {\n user = addUser(user);\n }\n }\n //logger.info(\"User \" + username + \" retrieved from database\");\n } catch (Exception e) {\n e.printStackTrace();\n logger.warning(\"Can't check user_id \" + id + \", error:\" + e.getMessage());\n }\n\n return user;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ scaleIntensityData scaleIntensityData() the gene normalization operating on gene mid for sampleIdx where the data is ether extracted here or from the resetPipeline preanalysis. If the normalization is inoperative, then just return 0.0. The mid must be >=0 since 1 indicates an illegal gene. The midOK[mid] must be true, else it indicates an illegal gene. [NOTE] The plugin writer should try to avoid doing special analyses here that need to be computed DURING the processing and instead do the computations during the resetPipeline() operation if possible. That may be able to optimized and the data cached to avoid constant recomputation. | public float scaleIntensityData(float rawIntensity, float rawBkgrd,
int mid, int gid, int sampleNbr)
{ /* scaleIntensityData */
float val= 0.0F;
/* [GNPP] you may comment out if not debugging. */
//val= gnpp.scaleIntensityData(rawIntensity, rawBkgrd, mid, gid, sampleNbr);
return(val);
} | [
"public float scaleIntensityData(float rawIntensity, int mid, int gid, int sampleNbr)\n { /* scaleIntensityData */\n float val= 0.0F;\n \n /* [GNPP] you may comment out if not debugging. */\n //val= gnpp.scaleIntensityData(rawIntensity, mid, gid, sampleNbr);\n \n return(val);\n }",
"public abstract float scaleIntensityData(float rawData, int mid, int gid,\n int sampleNbr);",
"public abstract float scaleIntensityData(float rawIntensity, float rawBkgrd,\n int mid, int gid, int sampleIdx);",
"public abstract float scaleIntensityData(float rawData);",
"public float scaleIntensityData(float rawIntensityPoint)\n { /* scaleIntensityData */\n float val= 0.0F;\n \n /* [GNPP] you may comment out if not debugging. */\n //val= gnpp.scaleIntensityData(rawIntensityPoint);\n \n return(val);\n }",
"public abstract float[] calcIntensityScaleExtrema(float maxRI, float minRI,\n float maxRaw, float minRaw,\n int sampleNbr);",
"public void normalization() {\r\n\t\tDouble[][] featureSet = new Double[101][89];\r\n\t\tDouble[] average = new Double[89];\r\n\t\tDouble[] standardDev = new Double[89];\r\n\r\n\t\tArrays.fill(average, 0.0);\r\n\t\tArrays.fill(standardDev, 0.0);\r\n\r\n\t\t// set all of the photo bins into one 2d array\r\n\t\tfor (int j = 1; j < 101; j++) {\r\n\t\t\tfor (int i = 0; i < 25; i++) {\r\n\t\t\t\tfeatureSet[j][i] = intensityMatrix[j - 1][i + 1] / imageSize[j];\r\n\t\t\t}// end for\r\n\t\t\tfor (int i = 25; i < 89; i++) {\r\n\t\t\t\tfeatureSet[j][i] = colorCodeMatrix[j - 1][i - 25]\r\n\t\t\t\t\t\t/ imageSize[j];\r\n\t\t\t}// end for\r\n\r\n\t\t}// end for j\r\n\r\n\t\t// calc average\r\n\t\tfor (int j = 0; j < 89; j++) {\r\n\t\t\tfor (int i = 1; i < 101; i++) {\r\n\t\t\t\taverage[j] += featureSet[i][j];\r\n\t\t\t}// end i\r\n\t\t\taverage[j] /= 100;\r\n\t\t}// end j\r\n\r\n\t\t// calc standard dev.\r\n\t\tfor (int j = 0; j < 89; j++) {\r\n\t\t\tfor (int i = 1; i < 101; i++) {\r\n\t\t\t\tstandardDev[j] += Math.pow(\r\n\t\t\t\t\t\tMath.abs(featureSet[i][j] - average[j]), 2);\r\n\r\n\t\t\t}// end i\r\n\t\t\tstandardDev[j] /= 100; // size - 1\r\n\t\t\tstandardDev[j] = Math.sqrt(standardDev[j]);\r\n\r\n\t\t}// end j\r\n\t\t\t// check zero case\r\n\t\tdouble min;\r\n\t\tif (standardDev[0] != 0.0)\r\n\t\t\tmin = standardDev[0];\r\n\t\telse\r\n\t\t\tmin = 1;\r\n\t\tfor (int i = 1; i < 89; i++) {\r\n\t\t\tif ((min > standardDev[i]) && (standardDev[i] != 0.0))\r\n\t\t\t\tmin = standardDev[i];\r\n\t\t}// end if\r\n\r\n\t\tfor (int i = 0; i < 89; i++) {\r\n\t\t\tif ((standardDev[i] == 0.0) && (average[i] != 0.0)) {\r\n\t\t\t\tstandardDev[i] = min * 0.5;\r\n\t\t\t}// end if\r\n\r\n\t\t}// end for\r\n\t\t\t// normalize featureSet\r\n\r\n\t\tfor (int i = 1; i < 101; i++) {\r\n\t\t\tfor (int j = 0; j < 89; j++) {\r\n\t\t\t\tif (standardDev[j] == 0.0) {\r\n\t\t\t\t\tintensityAndCCMatrix[i - 1][j] = 0.0;\r\n\t\t\t\t} else\r\n\t\t\t\t\tintensityAndCCMatrix[i - 1][j] = (featureSet[i][j] - average[j])\r\n\t\t\t\t\t\t\t/ standardDev[j];\r\n\t\t\t}// end for j\r\n\t\t}// end for i\r\n\t}",
"public void normalise() {\n // Attempt to load any saved values\n if ( ( minValues == null || minValues[0] == 0.0 ) && \n ( maxValues == null || maxValues[0] == 0.0 ) ) loadNormalisedValues();\n\n // If nothing was saved, then these need to be calculated.\n if ( ( minValues == null || minValues[0] == 0.0 ) && \n ( maxValues == null || maxValues[0] == 0.0 ) ) {\n calculateMinMaxValuesFromData();\n saveNormalisedValues();\n }\n\n // Minimum and maximum values calculated per column. Now normalise it all...\n if ( trainingDataSet != null ) {\n for( int row = 0; row < trainingDataSet.length; row++ ) {\n for(int column = 0; column < trainingDataSet[row].length; column++ ) {\n double value = trainingDataSet[row][column];\n Normalize norm = new Normalize(minValues[column], maxValues[column]);\n trainingDataSet[row][column] = norm.apply(value);\n }\n }\n }\n\n // Check testing set and collect minimum and maximum values\n if ( testingDataSet != null ) {\n for( int row = 0; row < testingDataSet.length; row++ ) {\n for(int column = 0; column < testingDataSet[row].length; column++ ) {\n double value = testingDataSet[row][column];\n Normalize norm = new Normalize(minValues[column], maxValues[column]);\n testingDataSet[row][column] = norm.apply(value);\n }\n }\n }\n\n // Save these for later.\n saveNormalisedValues();\n }",
"int[][][] normalize(int[][][] img, int maxImg, int minImg);",
"private void normalizeTransformedData(final double[][] dataRI) {\n final double[] dataR = dataRI[0];\n final double[] dataI = dataRI[1];\n final int n = dataR.length;\n\n switch (normalization) {\n case STD:\n if (inverse) {\n final double scaleFactor = 1d / n;\n for (int i = 0; i < n; i++) {\n dataR[i] *= scaleFactor;\n dataI[i] *= scaleFactor;\n }\n }\n\n break;\n\n case UNIT:\n final double scaleFactor = 1d / Math.sqrt(n);\n for (int i = 0; i < n; i++) {\n dataR[i] *= scaleFactor;\n dataI[i] *= scaleFactor;\n }\n\n break;\n\n default:\n throw new IllegalStateException(); // Should never happen.\n }\n }",
"private static final float medianOf(final float[] data, final int startIndex, final int endIndex) {\r\n\t\tfinal int range = endIndex - startIndex;\r\n\t\t\r\n\t\tif (range % 2 == 1) {\r\n\t\t\treturn data[startIndex + (range / 2)];\r\n\t\t} else {\r\n\t\t\tfinal float first = data[startIndex + (range / 2) - 1];\r\n\t\t\tfinal float second = data[startIndex + (range / 2)];\r\n\t\t\t\r\n\t\t\treturn (first + second) / 2.0f;\r\n\t\t}\r\n\t}",
"public void deNormalise() {\n if ( minValues == null | maxValues == null ) return;\n\n // Minimum and maximum values calculated per column. DeNormalise it all...\n if ( trainingDataSet != null ) {\n for( int row = 0; row < trainingDataSet.length; row++ ) {\n for(int column = 0; column < trainingDataSet[row].length; column++ ) {\n double value = trainingDataSet[row][column];\n DeNormalize deNorm = new DeNormalize(minValues[column], maxValues[column]); \n trainingDataSet[row][column] = deNorm.apply(value);\n }\n }\n }\n\n // Check testing set and collect minimum and maximum values\n if ( testingDataSet != null ) {\n for( int row = 0; row < testingDataSet.length; row++ ) {\n for(int column = 0; column < testingDataSet[row].length; column++ ) {\n double value = testingDataSet[row][column];\n DeNormalize deNorm = new DeNormalize(minValues[column], maxValues[column]);\n testingDataSet[row][column] = deNorm.apply(value);\n }\n }\n }\n }",
"public float[] calcIntensityScaleExtrema(float maxRI, float minRI,\n float maxRaw, float minRaw,\n int sampleNbr)\n { /* calcIntensityScaleExtrema */ \n float f[]= null;\n \n /* [GNPP] you may comment out if not debugging. */\n //f= gnpp.calcIntensityScaleExtrema(maxRI, minRI, maxRaw, minRaw, sampleNbr);\n \n return(f);\n }",
"private void normalizeTheFitness() {\n\t\t//revisar y comprimir\n\t\t\n\t\tif (fNorm_average < 0 || fNoNorm_average < 0) {\n\t\t\tfloat m = Math.min(fNorm_average, fNoNorm_average);\n\t\t\tif (fNorm_average < fNoNorm_average) {\n\t\t\t\tfNorm_average = Math.abs(m);\n\t\t\t\tif (fNoNorm_average < 0) {\n\t\t\t\t\tfNoNorm_average = fNorm_average - Math.abs(fNoNorm_average) + Math.abs(m);\n\t\t\t\t} else if (fNoNorm_average >= 0) {\n\t\t\t\t\tfNoNorm_average = fNorm_average + fNoNorm_average + Math.abs(m);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfNoNorm_average = Math.abs(m);\n\t\t\t\tif (fNorm_average < 0) {\n\t\t\t\t\tfNorm_average = fNoNorm_average - Math.abs(fNorm_average) + Math.abs(m);\n\t\t\t\t} else if (fNorm_average >= 0) {\n\t\t\t\t\tfNorm_average = fNoNorm_average + fNorm_average + Math.abs(m);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfNorm_normalized = fNorm_average;\n\t\tfNoNorm_normalized = fNoNorm_average; \n }",
"public void normalizeRowMean() {\n x.normalizeRowMean();\n }",
"private double denormalizePrediction(double normalizedPrediction) {\n\t\t\t\n\t\t\tif (this.statsTarget.getCounter()==0)\n\t\t\t\treturn 0 ;\n\t\t\t\n\t\t\tdouble value = 0;\n\t\t\tif (normalizeationOption.getChosenIndex() == 0 || normalizeationOption.getChosenIndex() == 1) {\n\t\t\t\tvalue = normalizedPrediction * this.statsTarget.getStandardDeviation()\n\t\t\t\t\t\t+ this.statsTarget.getCurrentMean();\n\t\t\t} else if (normalizeationOption.getChosenIndex() == 2) {\n\t\t\t\tvalue = normalizedPrediction * this.statsTarget.getRange() + this.statsTarget.getMin();\n\t\t\t}else {\n\t\t\t\tvalue = normalizedPrediction ;\n\t\t\t}\n\t\t\treturn value;\n\t\t}",
"protected float normalize(float val)\n {\n return val/EV3SensorConstants.ADC_REF;\n }",
"private long getMedianIndexAsPivotIndex(long lowIndex, long highIndex) {\n return lowIndex + ((highIndex - lowIndex) / 2);\n }",
"public void setMid(Integer mid) {\r\n this.mid = mid;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets accommodation offering search pipeline manager. | @Required
public void setAccommodationOfferingSearchPipelineManager(
final AccommodationOfferingSearchPipelineManager accommodationOfferingSearchPipelineManager)
{
this.accommodationOfferingSearchPipelineManager = accommodationOfferingSearchPipelineManager;
} | [
"protected AccommodationOfferingSearchPipelineManager getAccommodationOfferingSearchPipelineManager()\n\t{\n\t\treturn accommodationOfferingSearchPipelineManager;\n\t}",
"public void setParkManager(Employee employee) {\r\n\t\t\tint thisyear = Calendar.getInstance().get(Calendar.YEAR);\r\n\t \tint thismonth=Calendar.getInstance().get(Calendar.MONTH);\r\n\t \tthismonth++;\r\n\t \tfor(int i=thisyear-7;i<=thisyear;i++)\r\n\t \t\tcomboYear.getItems().add(String.valueOf(i));\r\n\t \tcomboYear.setValue(String.valueOf(thisyear));\r\n\t \tfor(int j=1;j<13;j++)\r\n\t \t\tcomboMonth.getItems().add(String.valueOf(j));\r\n\t \tcomboMonth.setValue(String.valueOf(thismonth));\r\n\t\t\tparkManager = employee;\r\n\t\t\tparkName.setText(parkManager.getParkName());\r\n\t\t\t\r\n\r\n\t\t}",
"AccommodationOfferingModel getAccommodationOffering(String code) throws ModelNotFoundException;",
"@Required\n\tpublic void setAccommodationOfferingFacade(final AccommodationOfferingFacade accommodationOfferingFacade)\n\t{\n\t\tthis.accommodationOfferingFacade = accommodationOfferingFacade;\n\t}",
"public void setServiceOffering(java.lang.String serviceOffering) {\r\n this.serviceOffering = serviceOffering;\r\n }",
"public void setEnclave(AssetTechSpecInterface e) { enclave = e; }",
"public void setPlanManager(IAePlanManager aPlanManager) throws AeBusinessProcessException;",
"@Required\n\tpublic void setTransportOfferingService(final TransportOfferingService transportOfferingService)\n\t{\n\t\tthis.transportOfferingService = transportOfferingService;\n\t}",
"public void setBookOffering(java.lang.String value);",
"protected AccommodationOfferingFacade getAccommodationOfferingFacade()\n\t{\n\t\treturn accommodationOfferingFacade;\n\t}",
"public void setEquipment(Equipment equipamento) {\n this.equipment = equipamento;\n }",
"public void setOrganism(Organism organism);",
"public void setMarketableA( final Marketable a )\n {\n this.a = a;\n }",
"public void setAccommodationOffered(boolean accommodationOffered) {\n this.accommodationOffered = accommodationOffered;\n }",
"public synchronized void set_sASelectOrganization(String selectOrganization)\n\t{\n\t\t_sASelectOrganization = selectOrganization;\n\t}",
"AccommodationModel findAccommodationForAccommodationOffering(String accommodationOfferingCode, String accommodationCode);",
"Builder addOfferedBy(Organization value);",
"List<AccommodationOfferingModel> getAccommodationOfferings();",
"public void setCompany(Company aCompany) {\n company = aCompany;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the caseType by id. | public void delete(Long id) {
log.debug("Request to delete CaseType : {}", id);
caseTypeRepository.delete(id);
} | [
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete TypeVehicule : {}\", id);\n typeVehiculeRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete LessonType : {}\", id);\n lessonTypeRepository.delete(id);\n }",
"public void deleteExamType(final Integer id) {\n HibernateYschoolDaoFactory.getExamTypeDao().delete(loadExamType(id));\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete TypeDecision : {}\", id); typeDecisionRepository.deleteById(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete DisabilityType : {}\", id);\n disabilityTypeRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete TypeEntree : {}\", id);\n typeEntreeRepository.delete(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete TypeContactFacilityType : {}\", id);\n TypeContactFacilityType typeContactFacilityType = typeContactFacilityTypeRepository.findOne(id);\n typeContactFacilityType.setDelStatus(true);\n TypeContactFacilityType result = typeContactFacilityTypeRepository.save(typeContactFacilityType);\n \n typeContactFacilityTypeSearchRepository.save(result);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete PaymentType : {}\", id);\n paymentTypeRepository.delete(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ShipmentType : {}\", id);\n shipmentTypeRepository.deleteById(id);\n shipmentTypeSearchRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete DqStandardTypes : {}\", id);\n dqStandardTypesRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete TypeTB : {}\", id);\n typeTBRepository.deleteById(id);\n typeTBSearchRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete WorkType : {}\", id);\n workTypeRepository.deleteById(id);\n workTypeSearchRepository.deleteById(id);\n }",
"void deleteTrackerLocationGetType(final Integer id);",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ProjectTypeId : {}\", id);\n projectTypeIdRepository.deleteById(id);\n }",
"@DeleteMapping(\"/case-data-objects/{id}\")\n public ResponseEntity<Void> deleteCaseDataObject(@PathVariable Long id) {\n log.debug(\"REST request to delete CaseDataObject : {}\", id);\n caseDataObjectService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@RequestMapping(value = \"/types/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Type : {}\", id);\n typeRepository.delete(id);\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete ContributionType : {}\", id);\n contributionTypeRepository.deleteById(id);\n }",
"IAreaType deleteAreaType(UUID id) throws SiteWhereException;",
"@DeleteMapping(\"/customer-card-types/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCustomerCardType(@PathVariable Long id) {\n log.debug(\"REST request to delete CustomerCardType : {}\", id);\n customerCardTypeService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send a document to the treasury. | String sendDocument(String uniqueId, String type, byte[] document) throws XRoadServiceConsumptionException; | [
"public IppResponse sendDocument(URI printerURI, Path path, int jobId, boolean lastDocument) {\n CupsClient printerClient = new CupsClient(printerURI);\n return printerClient.sendDocument(printerURI, path, jobId, lastDocument);\n }",
"DocumentServer publish(DocumentServerLogic logic, DocumentDetails details);",
"public void saveDocument(D document, L documentLocation) throws Exception;",
"public interface RmrkXTeeService {\n /**\n * Send a document to the treasury.\n * \n * @param uniqueId A unique identifier for the document\n * @param type Type specified by their service analysis document\n * @param manus A signed digidoc container containing the document\n * @return\n * @throws XRoadServiceConsumptionException\n */\n String sendDocument(String uniqueId, String type, byte[] document) throws XRoadServiceConsumptionException;\n}",
"void updateSearchableSendInfo(NodeRef document);",
"public abstract void onDocument(Document doc, long timeStamp);",
"@Override\r\n public Document publishDocument(Document doc) {\n return doc;\r\n }",
"Mono<D> save ( D document );",
"private void share(String user, String docName) throws Exception {\n try {\n Request request = new Request();\n request.setToken(session.getSessionToken());\n request.setTargetUser(new User(user));\n request.setDocName(docName);\n Result result = serverInterface.shareDoc(new User(session.getUser().getUsername()), request);\n\n if (result.getStatus() == 1) {\n System.out.println(\"Document shared successfully\");\n } else {\n System.err.println(result.getMessage());\n return;\n }\n } catch (Exception e) {\n System.err.println(e.getMessage());\n throw new RuntimeException(e);\n }\n }",
"public void postDocument(Course c, String docName)\r\n\t{\r\n\t\ttry {\r\n\t\t\ts = conn.createStatement();\r\n\t\t\t\r\n\t\t\tquery = \"insert into Documents (doc_name, course_name) values ('\" + docName + \"', '\" + c.name + \"')\";\r\n\t\t\ts.executeUpdate(query);\r\n\t\t} catch (SQLException e) {System.out.println(\"Document posting failed: \" + e);}\r\n\t}",
"void saveDocument(SingleDocumentModel model, Path newPath);",
"public static void pushDocument(String doc, String index, String type) {\n\t\t// check if ES nodes available\n\t\ttry {\n\n\t\t\tif (client.listedNodes().size() > 0 && !doc.isEmpty()) {\n\t\t\t\tbulkProcessor.add(new IndexRequest(index, type).source(doc));\n\t\t\t\tlog.info(\"Added doc into BulkProcessor index [{}], type [{}]\", index, type);\n\n\t\t\t} else {\n\t\t\t\tlog.warn(\"Couldn't find any available ElasticSearch nodes for pushing document\");\n\t\t\t\t// TODO try to look for available nodes/ establish connection\n\t\t\t\t// again...\n\t\t\t}\n\t\t} catch (ElasticsearchException e) {\n\t\t\tlog.error(\"Error occurred while trying to add document to index [{}], type [{}]\", index, type, e);\n\t\t}\n\t}",
"public zoho clickSignsignAndSendDocumentsLink() {\n signsignAndSendDocuments.click();\n return this;\n }",
"public void saveDocument() throws IOException;",
"boolean saveDocument(String termFieldName, String termFieldValue, Document document);",
"public void setNewDocument(Document newDoc);",
"String submitJob(SubmitJobRequestDocument dtsJob);",
"Document saveDocument(Document document) throws EntityExistsException;",
"private void sendDocInfoToIndexer() {\n unique_words = oneDocTerms.size();\n if (unique_words > 0) {\n max_tf = Collections.max(oneDocTerms.values());\n Model.docs.put(docID, new DocInfo(docID, docName, max_tf, unique_words, docTitle, docDate, docFileName));\n\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use SCLootMapGameEnterLevel.newBuilder() to construct. | private SCLootMapGameEnterLevel(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | [
"private CSLootMapGameEnter(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCLootMapReadyEnter(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCLootMapReadyEnterDoor(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private EnterGameMapRt(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"StartGameStatus start(Level level);",
"private CSLootMapEnterDoor(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"int getEnterLevel();",
"public void startLevel() {\r\n\t\tfor(Player p : this.players) {\r\n\t\t\tp.setSpawn(spawn);\r\n\t\t\tp.moveToSpawn();\r\n\t\t}\r\n\t\t\r\n\t\tthis.victory = false;\r\n\t this.defeat = false;\r\n\t \r\n\t // record the platforms (since they only need to record once)\r\n/*\t for(TileObject t : this.tiles) {\r\n\t\t EventData e = new EventData();\r\n\t\t if(t instanceof DeathZone) {\r\n\t\t\t e.setMessage(\"DeathZone\");\r\n\t\t\t e.setObject((DeathZone) t);\r\n\t\t } else if(t instanceof Platform) {\r\n\t\t\t e.setMessage(\"Platform\");\r\n\t\t\t e.setObject((Platform) t);\r\n\t\t } else if(t instanceof SpawnPoint) {\r\n\t\t\t e.setMessage(\"SpawnPoint\");\r\n\t\t\t e.setObject((SpawnPoint) t);\r\n\t\t } else if(t instanceof VictoryZone) {\r\n\t\t\t e.setMessage(\"VictoryZone\");\r\n\t\t\t e.setObject((VictoryZone) t);\r\n\t\t }\r\n\t\t \r\n\t\t //this.eventManager.sendEvent(\"record\", e);\r\n\t }\r\n\t \r\n\t // this.eventManager.sendEvent(\"record\", new EventData(\"SpawnPoint\",this.spawn)); \r\n*/\r\n\t}",
"public void loadGame(Level level, Graphics g) {\r\n Stack<Position> pos = new Stack<>();\r\n maze = new Maze(this, level);\r\n player = new Player(maze.getPlayerPoint(), this);\r\n player.stepsTaken = level.score;\r\n player.hasPortalGun = level.portalGun;\r\n if (maze.getPortalGunPoint() != null) {\r\n portalGun = new PortalGun(maze.getNode(maze.getPortalGunPoint()), this);\r\n }\r\n if (maze.getTimeMachinePoint() != null) {\r\n timeMachine = new TimeMachine(maze.getNode(maze.getTimeMachinePoint()), this);\r\n }\r\n if (maze.getHelperPoint() != null) {\r\n helper = new Helper(maze.getNode(maze.getHelperPoint()), this);\r\n }\r\n if (maze.getGoalPoint() != null) {\r\n goal = new Goal(maze.getNode(maze.getGoalPoint()), this);\r\n }\r\n\r\n if (level.showPath) {\r\n maze.findPath(maze.getNode(player.position));\r\n maze.setShowPath(true);\r\n }\r\n\r\n while (!level.positions.isEmpty()) {\r\n pos.push(level.positions.pop());\r\n }\r\n player.steps = pos;\r\n counter = new StepCounter((maze.nodes.length * blockSize) + blockSize, 0, this);\r\n }",
"private PlayerEnterProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private SCLootMapOpenFloor(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public GameLevel(LevelInformation info, KeyboardSensor kboard, AnimationRunner aRunner,\n ScoreIndicator scoreInd, LivesIndicator lifeInd, Counter scoreC, Counter livesC) {\n this.levelInfo = info;\n this.keyboard = kboard;\n this.runner = aRunner;\n this.scoreIndi = scoreInd;\n this.lifeIndi = lifeInd;\n this.scoreCounter = scoreC;\n this.lifeCounter = livesC;\n }",
"void startLevel();",
"private CSLootMapReadyEnterDoor(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public interface Level {\n /**\n * Return a List of the currently existing Entities.\n * @return The list of current entities for this level\n */\n List<Entity> getEntities();\n\n /**\n * The height of the level\n * @return The height (should be in the same format as Entity sizes)\n */\n double getLevelHeight();\n /**\n * The width of the level\n * @return The width (should be in the same format as Entity sizes)\n */\n double getLevelWidth();\n\n /**\n * Instruct the level to progress forward in time by one increment.\n */\n void tick();\n\n /**\n * The height of the floor for this level. This is where the ground stops and the sky starts.\n * @return The floor height (should be in the same format as Entity sizes)\n */\n double getFloorHeight();\n\n /**\n * The current x position of the hero. This is useful for views so they can follow the hero.\n * @return The hero x position (should be in the same format as Entity sizes)\n */\n double getHeroX();\n /**\n * The current y position of the hero. This is useful for views so they can follow the hero.\n * @return The hero y position (should be in the same format as Entity sizes)\n */\n double getHeroY();\n\n // Hero inputs - boolean for success (possibly for sound feedback)\n // These may just be passed straight through to the hero\n\n /**\n * Increase the height the bouncing hero can reach. This could be the vertical acceleration of the hero, unless the current level has special behaviour.\n * @return true if successful\n */\n boolean boostHeight();\n /**\n * Reduce the height the bouncing hero can reach. This could be the vertical acceleration of the hero, unless the current level has special behaviour.\n * @return true if successful\n */\n boolean dropHeight();\n\n /**\n * Move the hero left or accelerate the hero left, depending on the current level's desired behaviour\n * @return true if successful\n */\n boolean moveLeft();\n /**\n * Move the hero right or accelerate the hero right, depending on the current level's desired behaviour\n * @return true if successful\n */\n boolean moveRight();\n\n boolean stop();\n\n String getFloorAppearance();\n String getSkyAppearance();\n\n\n}",
"public static Entity createLevelLoadTrigger() {\n Entity levelLoadTrigger = new Entity();\n\n levelLoadTrigger.addComponent(new PhysicsComponent());\n levelLoadTrigger.getComponent(PhysicsComponent.class).setBodyType(BodyType.StaticBody);\n Vector2 size = new Vector2(1, 40);\n levelLoadTrigger.addComponent(new HitboxComponent().setLayer(PhysicsLayer.OBSTACLE));\n levelLoadTrigger.getComponent(HitboxComponent.class).setAsBox(size);\n levelLoadTrigger.addComponent(new LevelLoadTriggerComponent());\n levelLoadTrigger.setType(EntityTypes.OBSTACLE);\n\n return levelLoadTrigger;\n }",
"private SCLootMapScoreChange(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public void applyLevelCollision(Entity e) {\n\t\tdouble leftBound = levelBounds.getMinX();\n\t\tdouble rightBound = levelBounds.getMaxX();\n\t\tdouble topBound = levelBounds.getMinY();\n\t\tdouble bottomBound = levelBounds.getMaxY();\n\t\tPoint2D ePos = e.getLocation();\n\t\t// System.out.println(ePos);\n\t\tdouble eX = ePos.getX();\n\t\tdouble eY = ePos.getY();\n\t\tif (eX + e.getBounds().getWidth() > rightBound) {\n\t\t\tif (e.getVelX() > 0) {\n\t\t\t\te.resetMovementAcceleration();\n\t\t\t}\n\t\t\te.setLocation(rightBound - e.getBounds().getWidth(), eY);\n\t\t} else if (eX < leftBound) {\n\t\t\tif (e.getVelX() < 0) {\n\t\t\t\te.resetMovementAcceleration();\n\t\t\t}\n\t\t\te.setLocation(leftBound, eY);\n\t\t}\n\t\tif (eY < topBound) {\n\t\t\tif (e.getVelY() < 0) {\n\t\t\t\te.resetGravity();\n\t\t\t}\n\t\t\te.setLocation(eX, topBound);\n\t\t} else if (eY + e.getBounds().getHeight() > bottomBound) {\n\t\t\t// System.out.println(e.getVelY());\n\t\t\tif (e.getVelY() > 0) {\n\t\t\t\te.resetGravity();\n\t\t\t\te.setGrounded(true);\n\t\t\t}\n\t\t\te.setLocation(eX, bottomBound - e.getBounds().getHeight());\n\t\t\te.resetJump();\n\t\t}\n\t}",
"public void initLevel(){\n baseLevel = levelCreator.createStaticGrid(this.levelFile);\n dynamicLevel= levelCreator.createDynamicGrid(levelFile);\n colDetector = new CollisionHandler();\n goalTiles = baseLevel.getTilePositions('x');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the delete action. | public Action getDeleteAction () {
return deleteAction;
} | [
"ForeignKeyAction getDeleteAction();",
"@SuppressWarnings(\"serial\")\r\n private Action getDeleteAction() {\r\n if (this.deleteAction == null) {\r\n String actionCommand = bundle.getString(DELETE_NODE_KEY);\r\n String actionKey = bundle.getString(DELETE_NODE_KEY + \".action\");\r\n this.deleteAction = new AbstractAction(actionCommand) {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n System.out.println(\"actionPerformed(): action = \"\r\n + e.getActionCommand());\r\n if (checkAction()) {\r\n // Checks if several nodes will be deleted\r\n if (nodes.length > 1) {\r\n model.deleteNodes(nodes);\r\n } else {\r\n model.deleteNode(nodes[0]);\r\n }\r\n }\r\n }\r\n\r\n private boolean checkAction() {\r\n // No node selected\r\n if (nodes == null) {\r\n JOptionPane.showMessageDialog(JZVNode.this, bundle\r\n .getString(\"dlg.error.deleteWithoutSelection\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }\r\n };\r\n this.deleteAction.putValue(Action.ACTION_COMMAND_KEY, actionKey);\r\n\r\n this.getInputMap(WHEN_IN_FOCUSED_WINDOW).put(\r\n KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), actionKey);\r\n this.getActionMap().put(actionKey, this.deleteAction);\r\n }\r\n return this.deleteAction;\r\n }",
"@SuppressWarnings(\"serial\")\r\n\tprotected Action getDeleteAction() {\r\n\t\tif (this.deleteAction != null)\r\n\t\t\treturn this.deleteAction; // Already defined;\r\n\t\tAction action = new AbstractAction(\"Delete\") {\r\n\t\t\tpublic void actionPerformed(ActionEvent ev) {\r\n\t\t\t\tif (ExtendedTupleEditorSupport.this.tuple == null)\r\n\t\t\t\t\treturn;\r\n\t\t\t\tAttrType type = ((AttrInstance) ExtendedTupleEditorSupport.this.tuple).getType();\r\n\t\t\t\tint slot = ExtendedTupleEditorSupport.this.tableView.getSelectedRow();\r\n\t\t\t\t\r\n\t\t\t\tif (slot >= type.getNumberOfEntries(ExtendedTupleEditorSupport.this.viewSetting)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\telse if (!type.isOwnMemberAt(ExtendedTupleEditorSupport.this.viewSetting, slot)) {\r\n\t\t\t\t\tsetMessage(\"Cannot delete this attribute member which belongs to a parent type.\"\r\n\t\t\t\t\t\t\t+\" Each attribute member must be deleted from its own type tuple.\");\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\"<html><body>\"\r\n\t\t\t\t\t\t\t+\"Cannot delete this attribute member which belongs to a parent type.\"\r\n\t\t\t\t\t\t\t+\"<br>\"\r\n\t\t\t\t\t\t\t+\"Each attribute member must be deleted from its own type tuple.\",\r\n\t\t\t\t\t\t\t\" Cannot delete \",\r\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\ttype.deleteMemberAt(ExtendedTupleEditorSupport.this.viewSetting, slot);\r\n\t\t\t}\r\n\t\t};\r\n\t\taction\r\n\t\t\t\t.putValue(Action.SHORT_DESCRIPTION,\r\n\t\t\t\t\t\t\"Removes the selected member\");\r\n\t\taddMemberAction(action);\r\n\t\tthis.deleteAction = action;\r\n\t\treturn action;\r\n\t}",
"public int getReferentialActionDeleteRule();",
"public final String getDeleteMethodName() {\n return METHOD_PREFIX_DELETE + getMethodSuffix();\n }",
"public OpenApiOperation getDeleteOperation() {\n return deleteOperation;\n }",
"public String getAction() {\n\t\treturn action.get();\n\t}",
"public org.naru.park.ParkController.CommonAction getDeleteSensor() {\n return deleteSensor_ == null ? org.naru.park.ParkController.CommonAction.getDefaultInstance() : deleteSensor_;\n }",
"public Delete getDelete() {\n\t\treturn this.delete;\n\t}",
"public java.lang.String getAction() {\n return action;\n }",
"RemoveRecordAction getRemoveAction() {\n\t\treturn removeAction;\n\t}",
"public String getActionCommand() {\n return (String) get(PROPERTY_ACTION_COMMAND);\n }",
"public java.lang.String getAction() {\n return action;\n }",
"ServiceResponse<Action> deleteAction(Long actionId);",
"public String getDeletePermission() {\n return deletePermission;\n }",
"public String getACTION() {\r\n return ACTION;\r\n }",
"public Button getDeleteButton() {\n\t\treturn deleteButton;\n\t}",
"public String getDeleteButtonText() {\n\t\treturn deleteButtonText;\n\t}",
"public int getAction() {\r\n\t\treturn this.actionId;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getCandidateLists method. Method used to get and pass back a reference to the data class that holds the candidates that were considered to be frequent itemsets. | final public CandidateList getCandidateLists(){
return cl;
} | [
"private Itemsets findCandidateItemsets() {\n\t\t\tItemsets candidateItemsets = new Itemsets();\n\t\t\tItemset[] frequentItemsetsArr = frequentItemsets.keySet().toArray(new Itemset[frequentItemsets.size()]);\n\t\t\t\n\t\t\tfor (int i = 0; i < frequentItemsetsArr.length - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j < frequentItemsetsArr.length; j++) {\n\t\t\t\t\tItemset itemset1Subsequence = frequentItemsetsArr[i].getItems(0, frequentItemsetsArr[i].size() - 1);\n\t\t\t\t\tItemset itemset2Subsequence = frequentItemsetsArr[j].getItems(0, frequentItemsetsArr[i].size() - 1);\n\t\t\t\t\t\n\t\t\t\t\t//if all itemset values except last match, then combine itemsets to form candidate itemset\n\t\t\t\t\tif (itemset1Subsequence.equals(itemset2Subsequence)) {\n\t\t\t\t\t\tItemset candidateItemset = frequentItemsetsArr[i].getItems(0, frequentItemsetsArr[i].size());\n\t\t\t\t\t\tcandidateItemset.add(frequentItemsetsArr[j].getItem(frequentItemsetsArr[i].size() - 1));\n\t\t\t\t\t\t\n\t\t\t\t\t\tcandidateItemsets.addCandidateItemset(candidateItemset);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn candidateItemsets;\n\t\t}",
"private Itemsets findFirstCandidateItemsets() {\n\t\t\tItemsets candidateItemsets = new Itemsets();\n\t\t\tItemset[] frequentItemsetsArr = frequentItemsets.keySet().toArray(new Itemset[frequentItemsets.size()]);\n\t\t\t\n\t\t\tfor (int i = 0; i < frequentItemsetsArr.length - 1; i++) {\n\t\t\t\t//combine items to form candidate itemset\n\t\t\t\tfor (int j = i + 1; j < frequentItemsetsArr.length; j++) {\n\t\t\t\t\tItemset itemset1 = frequentItemsetsArr[i].getItem(0);\n\t\t\t\t\tItemset itemset2 = frequentItemsetsArr[j].getItem(0);\n\t\t\t\t\tItemset candidateItemset = itemset1;\n\t\t\t\t\tcandidateItemset.add(itemset2);\n\t\t\t\t\t\t\n\t\t\t\t\tcandidateItemsets.addCandidateItemset(candidateItemset);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn candidateItemsets;\n\t\t}",
"public ArrayList<Candidate> getCandidates()\r\n\t{\r\n\t\treturn Candidates;\r\n\t}",
"public List<RankedCandidate> getCandidates(){\n return this.candidateslist;\n }",
"private JList getListCandidate() {\r\n\t\tif (listCandidate == null) {\r\n\t\t\tlistCandidate = new UIList();\r\n\t\t}\r\n\t\treturn listCandidate;\r\n\t}",
"public static List<ItemSet> getCandidateItemsets(List<ItemSet> largeItemSetPrevPass, int itemSetSize) {\n\n\t\tList<ItemSet> candidateItemsets = new ArrayList<ItemSet>();\n\t\tList<Integer> newItems = null;\n\t\tMap<Integer, List<ItemSet>> largeItemsetMap = getLargeItemsetMap(largeItemSetPrevPass);\n\t\tCollections.sort(largeItemSetPrevPass);\n\t\tfor (int i = 0; i < (largeItemSetPrevPass.size() - 1); i++) {\n\t\t\tfor (int j = i + 1; j < largeItemSetPrevPass.size(); j++) {\n\t\t\t\tList<Integer> outerItems = largeItemSetPrevPass.get(i).getItems();\n\t\t\t\tList<Integer> innerItems = largeItemSetPrevPass.get(j).getItems();\n\t\t\t\tif ((itemSetSize - 1) > 0) {\n\t\t\t\t\tboolean isMatch = true;\n\t\t\t\t\tfor (int k = 0; k < (itemSetSize - 1); k++) {\n\t\t\t\t\t\tif (!outerItems.get(k).equals(innerItems.get(k))) {\n\t\t\t\t\t\t\tisMatch = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isMatch) {\n\t\t\t\t\t\tnewItems = new ArrayList<Integer>();\n\t\t\t\t\t\tnewItems.addAll(outerItems);\n\t\t\t\t\t\tnewItems.add(innerItems.get(itemSetSize - 1));\n\t\t\t\t\t\tItemSet newItemSet = new ItemSet(newItems, 0);\n\t\t\t\t\t\tif (prune(largeItemsetMap, newItemSet)) {\n\t\t\t\t\t\t\tcandidateItemsets.add(newItemSet);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (outerItems.get(0) < innerItems.get(0)) {\n\t\t\t\t\t\tnewItems = new ArrayList<Integer>();\n\t\t\t\t\t\tnewItems.add(outerItems.get(0));\n\t\t\t\t\t\tnewItems.add(innerItems.get(0));\n\t\t\t\t\t\tItemSet newItemSet = new ItemSet(newItems, 0);\n\t\t\t\t\t\tcandidateItemsets.add(newItemSet);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn candidateItemsets;\n\t}",
"final private void candidates(TransRecords tr, byte itemsetSize){\n\t\tcandidates = new ArrayList();\n\t\tint[] tc, fp1, fp2;\n\t\tboolean match = true, ancestor = false;\n\t\tString i1, i2;\n\t\tint f1, c1, c2, p1, p2, index;\n\t\t//Generate list of possible candidates...\n\t\tf1 = frequent.size();\n\t\tfor (int i = 0; i < f1; i++){\n\t\t\tfp1 = (int[])frequent.get(i);\n\t\t\tfor (int j = 0; j < f1; j++){\n\t\t\t\tif (i != j){\n\t\t\t\t\tfp2 = (int[])frequent.get(j);\n\t\t\t\t\ttc = ops.unionRule(fp1, fp2);\n\t\t\t\t\tif (tc.length == itemsetSize){\n\t\t\t\t\t\t//Valid length candidate...\n\t\t\t\t\t\tcandidates.add(tc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Remove invalid candidate itemsets...\n\t\tc1 = candidates.size();\n\t\tfor (int i = 0; i < c1; i++){\n\t\t\tfp1 = (int[])candidates.get(i);\n\t\t\t//Remove duplicate candidate itemsets...\n\t\t\tfor (int j = 0; j < c1; j++){\n\t\t\t\tif (i != j){\n\t\t\t\t\tfp2 = (int[])candidates.get(j);\n\t\t\t\t\tif (ops.compare(fp1, fp2)){\n\t\t\t\t\t\t//Entries match, remove entry at j...\n\t\t\t\t\t\tcandidates.remove(j);\n\t\t\t\t\t\tc1--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Remove candidates which do not have frequent sub itemsets...\n\t\t\tp1 = fp1.length;\n\t\t\tfor (int j = 0; j < p1; j++){\n\t\t\t\tfp2 = new int[p1 - 1];\n\t\t\t\tindex = 0;\n\t\t\t\tfor (int k = 0; k < p1; k++){\n\t\t\t\t\tif (j != k){\n\t\t\t\t\t\tfp2[index] = fp1[k];\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmatch = false;\n\t\t\t\tfor (int k = 0; k < f1; k++){\n\t\t\t\t\tif (ops.compare(fp2, (int[])frequent.get(k))){\n\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!match){\n\t\t\t\t\tcandidates.remove(i);\n\t\t\t\t\tc1--;\n\t\t\t\t\ti--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (match){\n\t\t\t\t//Remove an candidate that contains two or more expanded attributes from the same stem...\n\t\t\t\tmatch = false;\n\t\t\t\tfor (int j = 0; j < p1; j++){\n\t\t\t\t\ti1 = tr.getName(fp1[j]);\n\t\t\t\t\tc2 = i1.lastIndexOf('_');\n\t\t\t\t\tif (c2 != -1){\n\t\t\t\t\t\ti1 = i1.substring(0, c2);\n\t\t\t\t\t}\n\t\t\t\t\tfor (int k = 0; k < p1; k++){\n\t\t\t\t\t\tif (j != k){\n\t\t\t\t\t\t\ti2 = tr.getName(fp1[k]);\n\t\t\t\t\t\t\tc2 = i2.lastIndexOf('_');\n\t\t\t\t\t\t\tif (c2 != -1){\n\t\t\t\t\t\t\t\ti2 = i2.substring(0, c2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (i1.equals(i2)){\n\t\t\t\t\t\t\t\t//These items share the same stem...\n\t\t\t\t\t\t\t\tcandidates.remove(i);\n\t\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\t\tc1--;\n\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\tj = p1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (match){\n\t\t\t\t//Check to see if any of the items are ancestors of other items within the itemset...\n\t\t\t\tancestor = false;\n\t\t\t\tfor (int j = 0; j < p1; j++){\n\t\t\t\t\tfor (int k = 0; k < p1; k++){\n\t\t\t\t\t\tif (j != k){\n\t\t\t\t\t\t\tif (tr.getName(fp1[j]).startsWith(tr.getName(fp1[k]) + \"-\")){\n\t\t\t\t\t\t\t\tancestor = true;\n\t\t\t\t\t\t\t\tj = p1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (ancestor){\n\t\t\t\t\tcandidates.remove(i);\n\t\t\t\t\tc1--;\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public ArrayList<NodeAOUID> obtainCandidatesToExpand() {\n\t\n\t// TODO Auto-generated method stub\n\t\tArrayList<NodeAOUID> nodesOfPartialSolution;\n\t\tArrayList<NodeAOUID> candidates;\n\t\t\n\t\tnodesOfPartialSolution = obtainNodesOfPartialSolutionRandomly();\n\t\tcandidates = new ArrayList();\n\t\t\n\t\t//The set of candidates is the intersection between the sets open and nodesPartialSolution\n\t\tfor (NodeAOUID auxNodeSolution: nodesOfPartialSolution){\n\t\t\tif (isOpen(auxNodeSolution)){\n\t\t\t\tcandidates.add(auxNodeSolution);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn candidates;\n\t}",
"public abstract LinkedList<CandidateInstance> getCandidateInstancesList();",
"public Set<DoublyLinkedList<T>> getContainingLists();",
"final public FItemsetList getFrequentItemsets(){\n\t\treturn fl;\n\t}",
"private List<int[]> buildNewCandidates(List<int[]> lastCandidates){\n Map<String, SetWithFrequency> frequency = new HashMap<>();\n\n // Set the threshold to be k\n int threshold = lastCandidates.get(0).length + 1;\n\n // Creates new candidates by merging the previous sets\n for (int i = 0; i < lastCandidates.size(); i++){\n for (int j = i + 1; j < lastCandidates.size(); j++){\n int[] firstSet = lastCandidates.get(i);\n int[] secondSet = lastCandidates.get(j);\n\n int[] candidate = mergeTwoSet(firstSet, secondSet);\n\n if (candidate != null){\n\n // This is a valid candidate (contains all elements from first / second set)\n String key = arrayToString(candidate);\n\n if (frequency.containsKey(key)){\n frequency.get(key).frequency++;\n } else{\n frequency.put(key, new SetWithFrequency(key, candidate, 1));\n }\n }\n }\n }\n\n List<int[]> res = new ArrayList<>();\n\n threshold = threshold * (threshold - 1) / 2;\n for (SetWithFrequency entry: frequency.values()){\n // Prune the candidates which does not have all subsets being frequent\n if (entry.frequency == threshold){\n res.add(entry.set);\n }\n }\n\n return res;\n }",
"private Set<Resource> backTrackingSearch(List<String> requiredClasses, List<Resource> candidates, Stack<SearchState> backtracking) {\n SearchState init = backtracking.pop();\n int index = init.resourceIndex + 1; //next\n\n List<Resource> resultSet;\n int[] providedClasses;\n if(backtracking.isEmpty()) {\n resultSet = new ArrayList<>();\n providedClasses = new int[requiredClasses.size()];\n } else {\n init = backtracking.peek();\n //copy to ensure history is not modified\n resultSet = new ArrayList<>(init.resources);\n providedClasses = Arrays.copyOf(init.providedClasses, init.providedClasses.length);\n }\n\n if(findResult(index, providedClasses, resultSet, requiredClasses, candidates, backtracking)) {\n return new HashSet<>(resultSet);\n }\n\n return null;\n }",
"public List<Candidate> getCandidateList() {\n\t\treturn candidateList;\n\t}",
"public List<Candidate> getCandidateList() {\n try {\n List<Candidate> candidates = new ArrayList<>();\n cn = DBUtils.makeConnection();\n Statement stm = null;\n ResultSet rs = null;\n\n String query = \"SELECT * FROM Candidate\";\n stm = cn.createStatement();\n rs = stm.executeQuery(query);\n\n while (rs.next()) {\n // Get values\n int id = rs.getInt(\"ID\");\n String firstName = rs.getString(\"FirstName\");\n String lastName = rs.getString(\"LastName\");\n int candidateType = rs.getInt(\"Candidate_Type\");\n // Add to list\n Candidate candidate = new Candidate(id, firstName, lastName, candidateType);\n\n candidates.add(candidate);\n }\n return candidates;\n } catch (SQLException ex) {\n Logger.getLogger(RecruitmentDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }",
"public TreeSet<Integer> getListOfFeasibleCoalitions() {\r\n \treturn listOfFeasibleCoalitions;\r\n }",
"private static ArrayList<ArrayList<Integer>> createCandidates(ArrayList<ArrayList<Integer>> itemSet, int k) {\n ArrayList<ArrayList<Integer>> candidateSet = new ArrayList<>();\n\n for (int i = 0; i < itemSet.size() - 1; i++) {\n for (int j = i; j < itemSet.size(); j++) {\n if (canTwoListsCombine(itemSet.get(i), itemSet.get(j), k)) {\n ArrayList<Integer> combinedItemSet = union(itemSet.get(i), itemSet.get(j));\n\n if (combinedItemSet.size() == k) {\n candidateSet.add(combinedItemSet);\n }\n }\n }\n }\n\n return candidateSet;\n }",
"public List<String> getCandidates() {\n\t\treturn candidates;\n\t}",
"private Itemset[] getItemsets() {\n\t\t\treturn frequentItemsets.keySet().toArray(new Itemset[frequentItemsets.size()]);\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Relay GL beats to EP, GMs and joining LCs | void relayGLBeats(SnoozeMsg m) {
// Get timestamp
String gl = (String) m.getOrigin();
if ((glHostname == "" || glDead) && !gl.isEmpty()) {
glHostname = gl;
glDead = false;
Logger.err("[MUL.relayGLBeats] GL initialized: " + glHostname);
}
if (glHostname != gl) {
Logger.err("[MUL.relayGLBeats] Multiple GLs: " + glHostname + ", " + gl);
return;
}
glTimestamp = (double) m.getMessage();
// Relay GL beat to EP, GMs and LCs
int i = 0;
if (!glHostname.isEmpty()) {
new RBeatGLMsg(glTimestamp, AUX.epInbox, glHostname, null).send();
Logger.info("[MUL.relayGLbeat] Beat relayed to: " + AUX.epInbox);
for (String gm : gmInfo.keySet()) {
m = new RBeatGLMsg(glTimestamp, AUX.gmInbox(gm)+"-glBeats", glHostname, null);
// m.send();
try {
GroupManager g = Test.gmsCreated.get(gm);
g.glBeats(m);
} catch (NullPointerException e) {
Logger.exc("[MUL.relayGLBeats] NullPointer, GM: " + gm);
gmInfo.remove(gm);
} catch (Exception e) {
e.printStackTrace();
}
Logger.info("[MUL.relayGLbeats] Beat relayed to GM: " + m);
}
for (String lc : lcInfo.keySet()) {
LCInfo lv = lcInfo.get(lc);
if (lv.joining) {
m = new RBeatGLMsg(glTimestamp, AUX.lcInbox(lv.lcHost), glHostname, null);
m.send();
i++;
// Logger.debug("[MUL.relayGLBeats] To LC: " + m);
}
}
} else Logger.err("[MUL] No GL");
Logger.imp("[MUL.relayGLBeats] GL beat received/relayed: " + glHostname + ", " + glTimestamp
+ ", #GMs: " + gmInfo.size() + ", # join. LCs: " + i);
} | [
"void relayGMBeats(GroupManager g, double ts) {\n String gm = g.host.getName();\n RBeatGMMsg m = new RBeatGMMsg(g, AUX.glInbox(glHostname)+\"-gmPeriodic\", gm, null);\n// m.send();\n// Test.gl.handleGMInfo(m);\n Logger.imp(\"[MUL.relayGMBeats] \" + m);\n\n // Send to LCs\n int i = 0;\n for (String lc: g.lcInfo.keySet()) {\n LCInfo lci = lcInfo.get(lc);\n if (lci != null) {\n String gmLc = lci.gmHost;\n// Logger.debug(\"[MUL.relayGMBeats] LC: \" + lc + \", GM: \" + gm);\n if (gm.equals(gmLc)) {\n GMInfo gmi = gmInfo.get(gm);\n m = new RBeatGMMsg(g, AUX.lcInbox(lc) + \"-gmBeats\", gm, null);\n LocalController lco = null;\n try {\n lco = Test.lcsJoined.get(lc).lco;\n lco.handleGMBeats(m);\n } catch (NullPointerException e) {\n Logger.exc(\"[MUL.relayGMBeats] NullPointer, LC: \" + lc + \", \" + m);\n lcInfo.remove(lc);\n }\n i++;\n Logger.info(\"[MUL.relayGMBeats] To LC: \" + lc + \", \"+ lco + \", \" + m);\n }\n }\n }\n Logger.imp(\"[MUL.relayGMBeats] GL beat received/relayed: \" + gm + \", \" + Msg.getClock()\n + \", #LCs: \" + i);\n }",
"private void applyOpenGLStartSettings(){\r\n\t\t//TODO pa.smooth() / pa.noSmooth() ver�ndert auch line_smooth!\r\n\t\t//f�r test ob multisampling lines ohne Line_smooth okay rendered m�ssen\r\n\t\t//sicherheitshalber auch die pa.smoot() etc abgefangen werden und line_smooth immer disabled sein!\r\n\t\t\r\n\t\t//TODO check line drawing and abstractvisible at stencil in this context (line_smooth)\r\n\t\t\r\n\t //TODO \r\n\t\t// - if multisampling enabled dont do line smoothing at all\r\n\t\t// - OR: disable multisampling each time before doing line_smoothing! (better but expensive?) \r\n\t\t// -> info: disabling multisampling isnt possible at runtime..\r\n\r\n\t // - or disable mutisample before drawing with line_smooth!\r\n\t\t//TOOD dont use lines to smooth some objects then (fonts, etc)\r\n\t if (MT4jSettings.getInstance().isOpenGlMode() ){\r\n\t \t\r\n\t \t//////////////////////////////\r\n\t \tthis.loadGL();\r\n\t //////////////////////////\r\n\t \r\n//\t \tGL gl = Tools3D.getGL(this);\r\n\t GLCommon gl = getGLCommon();\r\n\t \t\r\n\t \tlogger.info(\"OpenGL Version: \\\"\" + gl.glGetString(GL.GL_VERSION) + \"\\\"\" + \" - Vendor: \\\"\" + gl.glGetString(GL.GL_VENDOR) + \"\\\"\" + \" - Renderer: \\\"\" + gl.glGetString(GL.GL_RENDERER) + \"\\\"\");\r\n//\t \tlogger.info(\"Shading language version: \\\"\" + gl.glGetString(GL.GL_SHADING_LANGUAGE_VERSION) + \"\\\"\");\r\n\t \tlogger.info(\"Non power of two texture sizes allowed: \\\"\" + Tools3D.supportsNonPowerOfTwoTexture(this) + \"\\\"\");\r\n\t \tlogger.info(\"OpenGL Framebuffer Object Extension available: \\\"\" + GLFBO.isSupported(this) + \"\\\"\");\r\n\t \t\r\n\t\t\t//Set VSyncing on -> to avoid tearing \r\n\t\t\t//-> check if gfx card settings allow apps to set it!\r\n\t\t\t//-> Use with caution! only use with fps rate == monitor Hz!\r\n\t\t\t//and fps never drop below Hz! -> else choppy!\r\n\t\t\t//-> only works with opengl!\r\n\t \tTools3D.setVSyncing(this, MT4jSettings.getInstance().isVerticalSynchronization());\r\n\t\t\tlogger.info(\"Vertical Sync enabled: \\\"\" + MT4jSettings.getInstance().isVerticalSynchronization() + \"\\\"\");\r\n\t \t\r\n\t \tif ( MT4jSettings.getInstance().isMultiSampling()){\r\n\t \t\tgl.glEnable(GL.GL_MULTISAMPLE);\r\n//\t \t\tgl.glDisable(GL.GL_MULTISAMPLE);\r\n\t \t\tlogger.info(\"OpenGL multi-sampling enabled.\");\r\n\t \t}\r\n\t \tgl.glEnable(GL.GL_LINE_SMOOTH);\r\n//\t \tgl.glDisable(GL.GL_LINE_SMOOTH);\r\n\t }\r\n\t}",
"public void broadcastToChannelPartyLeaders(L2GameServerPacket gsp)\n\t{\n\t\tif(_commandChannelParties != null && !_commandChannelParties.isEmpty())\n\t\t\tfor(L2Party party : _commandChannelParties)\n\t\t\t\tif(party != null)\n\t\t\t\t{\n\t\t\t\t\tL2Player leader = party.getPartyLeader();\n\t\t\t\t\tif(leader != null)\n\t\t\t\t\t\tleader.sendPacket(gsp);\n\t\t\t\t}\n\t}",
"public void move_side_with_encoderr(DcMotor left_back_motor,DcMotor left_front_motor,DcMotor right_back_motor,DcMotor right_front_motor\n ,double distance , double power , boolean break_at_end){\n\n if (power > 0 ) {\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n\n\n int target_ticks = left_back_motor.getCurrentPosition() - cm_to_ticks(distance);\n int target_ticks2 = left_front_motor.getCurrentPosition() + cm_to_ticks(distance);\n\n\n left_back_motor.setPower(dc_motor_power_adapter(-power));\n left_front_motor.setPower(dc_motor_power_adapter(power));\n right_back_motor.setPower(dc_motor_power_adapter(power));\n right_front_motor.setPower(dc_motor_power_adapter(-power));\n\n\n while ((left_back_motor.getCurrentPosition() > target_ticks) &&\n (left_front_motor.getCurrentPosition() < target_ticks2)\n && (right_back_motor.getCurrentPosition() < target_ticks2) &&\n (right_front_motor.getCurrentPosition() > target_ticks))\n ;\n\n\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n\n }else if(power < 0){\n\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n\n\n int target_ticks = left_back_motor.getCurrentPosition() + cm_to_ticks(distance);\n int target_ticks2 = left_front_motor.getCurrentPosition() - cm_to_ticks(distance);\n\n\n\n left_back_motor.setPower(dc_motor_power_adapter(power));\n left_front_motor.setPower(dc_motor_power_adapter(-power));\n right_back_motor.setPower(dc_motor_power_adapter(-power));\n right_front_motor.setPower(dc_motor_power_adapter(power));\n\n\n while ((left_back_motor.getCurrentPosition() < target_ticks) &&\n (left_front_motor.getCurrentPosition() > target_ticks2)\n && (right_back_motor.getCurrentPosition() > target_ticks2) &&\n (right_front_motor.getCurrentPosition() < target_ticks))\n ;\n\n\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n\n }else if (power ==0){\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n }\n\n\n }",
"private void startSinkElection(){\n\t\tgetInstance().messageBatteryToFollower();\n\t}",
"private void incrementTerrain(GL10 gl){\n\n gl.glMatrixMode(GL10.GL_MODELVIEW);\n //Load the current transformation matrix.\n //gl.glLoadIdentity();\n\n //Translate to the location of the terrain.\n gl.glTranslatef(0, 0, z);\n\n\n //Increment the z value by speed.\n z += speed;\n\n\n //If we've moved more than the distance between each node, we need to do a crap-ton of stuff.\n if(Math.abs(oz-z)>= unitDepth){\n\n //First, we must retreat the terrain.\n //gl.glLoadIdentity();\n gl.glTranslatef(0, 0, (float)-unitDepth);\n\n //Also, on a related note, we need to negate the effects of that retreat on the pickups.\n if(drawBag && bag != null)\n bag.incrementPickupLocations(0, 0, (float)unitDepth);\n\n //Next we must reset the z value.\n z = oz;\n\n //And now we start scheduling updates.\n if(curVerBuffer == 0){//If the current vertex buffer is the first one...\n current = vertsB; //change it to the second one,\n updater.schedule(new VertUpdate(vertsA), 0); //and schedule an update on the first.\n curVerBuffer = 1; //Also change our flag.\n\n }\n else if(curVerBuffer == 1){//If the current vertex buffer is the second one...\n current = vertsA; //change it back to the first one,\n updater.schedule(new VertUpdate(vertsB), 0); //and schedule an update on the second.\n curVerBuffer = 0; //And again, change the flag.\n }\n\n }\n\n\n }",
"public void move_diagonale_left_with_encoderr(DcMotor left_back_motor,DcMotor left_front_motor,\n DcMotor right_back_motor,DcMotor right_front_motor\n ,double distance , double power , boolean break_at_end)\n {\n if (power > 0 ) {\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n int target_ticks = left_back_motor.getCurrentPosition() + cm_to_ticks(distance);\n left_back_motor.setPower(dc_motor_power_adapter(power));\n right_front_motor.setPower(dc_motor_power_adapter(power));\n while ((left_back_motor.getCurrentPosition() < target_ticks) &&\n (right_front_motor.getCurrentPosition() < target_ticks)) ;\n left_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n }else if(power < 0){\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n int target_ticks = left_back_motor.getCurrentPosition() - cm_to_ticks(distance);\n left_back_motor.setPower(dc_motor_power_adapter(power));\n right_front_motor.setPower(dc_motor_power_adapter(power));\n while ((left_back_motor.getCurrentPosition() > target_ticks) &&\n (right_front_motor.getCurrentPosition() > target_ticks)) ;\n left_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n }else if (power ==0){\n left_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n }\n }",
"public void draw() {\n // Transformations were done as they were read in. Edges update right after.\n // All edges are in the \"edges\" instance variable which acts as the\n // all_edges table\n \n // Moving appriopriate edges to global edge table whose slope does not\n // equal 0\n /*\n ArrayList<Edge> globalEdge = new ArrayList();\n for(int i = 0; i < edges.size(); i++) {\n if(edges.get(i).getSlope() != 0) { \n globalEdge.add(edges.get(i));\n }\n }\n Collections.sort(globalEdge);\n \n float scanLine = globalEdge.get(0).getyMin();\n\tfloat currY = scanLine;\n\tfloat currX;\n\tboolean parity = false;\n\t\t\n\tArrayList<Edge> activeEdges = new ArrayList<Edge>();\n\twhile(!globalEdge.isEmpty()) {\n for(Edge e : globalEdge) {\n if(e.getyMin() == scanLine) {\n activeEdges.add(e);\n globalEdge.remove(e);\n }\n }\n \n // Sorting activeEdges\n for(int i=0;i< activeEdges.size();i++){\n \n Edge curr = activeEdges.get(i);\n \n\t\tfor(int k=i+1; k<activeEdges.size();k++){\n if(curr.getxVal() > activeEdges.get(k).getxVal()){\n Edge temp = activeEdges.get(k);\n\t\t\tactiveEdges.set(i,temp);\n\t\t\tactiveEdges.set(k, curr);\n }\n\t\t}\n \n }\n \n if(!activeEdges.isEmpty()) {\n currX = activeEdges.get(0).getxVal();\n\t\twhile(currX <= activeEdges.get(activeEdges.size() -1).getxVal()) {\n\t\t\n\t\t}\n }\n\t\t\n }//End of while globalEdge is not empty \n\t*/\n \n // Couldn't finish so i just drew the outlines of what i got >.<\n glColor3f(color[0], color[1], color[2]);\n glBegin(GL_LINE_LOOP);\n for(Vertex vert : vertices) {\n System.out.println(vert);\n glVertex3f(vert.getX(), vert.getY(), 0);\n }\n glEnd();\n }",
"public void syncAllLights()\n {\n for (Recipient r : recipients.values())\n {\n r.sync();\n }\n fpsBuffer.markFrame();\n }",
"public void move_with_encoderr(DcMotor left_back_motor,DcMotor left_front_motor,\n DcMotor right_back_motor,DcMotor right_front_motor\n ,double distance , double power , boolean break_at_end)\n {\n if (power > 0 )\n {\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n int target_ticks = left_back_motor.getCurrentPosition() + cm_to_ticks(distance);\n left_back_motor.setPower(dc_motor_power_adapter(power));\n left_front_motor.setPower(dc_motor_power_adapter(power));\n right_back_motor.setPower(dc_motor_power_adapter(power));\n right_front_motor.setPower(dc_motor_power_adapter(power));\n while ((left_back_motor.getCurrentPosition() < target_ticks) &&\n (left_front_motor.getCurrentPosition() < target_ticks)\n && (right_back_motor.getCurrentPosition() < target_ticks) &&\n (right_front_motor.getCurrentPosition() < target_ticks)) ;\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n }else if(power < 0){\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n int target_ticks = left_back_motor.getCurrentPosition() - cm_to_ticks(distance);\n\n\n left_back_motor.setPower(dc_motor_power_adapter(power));\n left_front_motor.setPower(dc_motor_power_adapter(power));\n right_back_motor.setPower(dc_motor_power_adapter(power));\n right_front_motor.setPower(dc_motor_power_adapter(power));\n while ((left_back_motor.getCurrentPosition() > target_ticks) &&\n (left_front_motor.getCurrentPosition() > target_ticks)\n && (right_back_motor.getCurrentPosition() > target_ticks) &&\n (right_front_motor.getCurrentPosition() > target_ticks)) ;\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n }else if (power ==0){\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n }\n }",
"void composeTelemetry() {\n opMode.telemetry.addAction(new Runnable() { @Override public void run()\n {\n // Acquiring the angles is relatively expensive; we don't want\n // to do that in each of the three items that need that info, as that's\n // three times the necessary expense.\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n gravity = imu.getGravity();\n thing = imu.getVelocity();\n }\n });\n opMode.telemetry.addLine()\n .addData(\"Status\", new Func<String>() {\n @Override public String value() {\n return imu.getSystemStatus().toShortString();\n }\n })\n .addData(\"calib\", new Func<String>() {\n @Override public String value() {\n return imu.getCalibrationStatus().toString();\n }\n });\n opMode.telemetry.addLine()\n .addData(\"heading\", new Func<String>() {\n @Override public String value() {\n return formatAngle(angles.angleUnit, angles.firstAngle);\n }\n })\n .addData(\"roll\", new Func<String>() {\n @Override public String value() {\n return formatAngle(angles.angleUnit, angles.secondAngle);\n }\n })\n .addData(\"pitch\", new Func<String>() {\n @Override public String value() {\n return formatAngle(angles.angleUnit, angles.thirdAngle);\n }\n });\n opMode.telemetry.addLine()\n .addData(\"grvty\", new Func<String>() {\n @Override public String value() {\n return gravity.toString();\n }\n })\n .addData(\"mag\", new Func<String>() {\n @Override public String value() {\n return String.format(Locale.getDefault(), \"%.3f\",\n Math.sqrt(gravity.xAccel*gravity.xAccel\n + gravity.yAccel*gravity.yAccel\n + gravity.zAccel*gravity.zAccel));\n }\n });\n //telemetry = new MultipleTelemetry(telemetry,FtcDashboard.getInstance().getTelemetry());\n }",
"private void doLightLocalization() {\r\n\r\n\t\t// Initialize two booleans that represent whether or not the right\r\n\t\t// and left sensors have seen lines\r\n\t\tboolean rightSeen = false, leftSeen = false;\r\n\t\t\r\n\t\t/*\r\n\t\t * Initialize another boolean for the case when one line isn't detected\r\n\t\t * @author Ryan\r\n\t\t */\r\n\t\t\r\n\t\tboolean lineMissed = false;\r\n\r\n\t\t// Initialize lightTimer objects\r\n\t\tLightTimer leftLight = new LightTimer(lsL);\r\n\t\tLightTimer rightLight = new LightTimer(lsR);\r\n\r\n\t\t// Advance the robot until one light sensor sees a line. Stop the\r\n\t\t// correct wheel.\r\n\t\trobot.advance(5);\r\n\t\trobot.advance(5);\r\n\t\twhile (!rightSeen && !leftSeen) {\r\n\r\n\t\t\t// robot.advance(5);\r\n\t\t\tif (leftLight.lineDetected()) {\r\n\t\t\t\tleftSeen = true;\r\n\t\t\t\tSound.setVolume(70);\r\n\t\t\t\tSound.beep();\r\n\t\t\t\trobot.stopLeft();\r\n\t\t\t} else if (rightLight.lineDetected()) {\r\n\t\t\t\trightSeen = true;\r\n\t\t\t\tSound.setVolume(70);\r\n\t\t\t\tSound.beep();\r\n\t\t\t\trobot.stopRight();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Keep making the wheel that hasn't seen a line go forward until it\r\n\t\t// sees a line\r\n\t\tdouble currentAngle = odo.getCoordinates().getTheta();\r\n\t//\tRConsole.print(\"\" + currentAngle);\r\n\t\tif (rightSeen) {\r\n\t\t\trobot.advanceLeft(75);\r\n\t\t\trobot.advanceLeft(75);\r\n\t\t\twhile (!leftSeen) {\r\n\t\t\t\t if(currentAngle - odo.getCoordinates().getTheta() > 30) {\r\n\t\t\t\t\t if(!lineMissed){\r\n\t\t\t\t\t\t robot.stopLeft();\r\n\t\t\t\t\t\t lineMissed = true;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t robot.advanceLeft(-75);robot.advanceLeft(-75); \r\n\t\t\t\t\t try{\r\n\t\t\t\t\t\t Thread.sleep(3500);\r\n\t\t\t\t\t }catch(Exception e){}\r\n\t\t\t\t\t leftSeen = false;\r\n\t\t\t\t } \r\n\t\t\t\t else if(currentAngle - odo.getCoordinates().getTheta() > 50){\r\n\t\t\t\t\t robot.advanceLeft(-75);robot.advanceLeft(-75);\r\n\t\t\t\t\t try{\r\n\t\t\t\t\t\t Thread.sleep(3500);\r\n\t\t\t\t\t }catch(Exception e){}\r\n\t\t\t\t }\r\n\t\t\t\t else { robot.advanceLeft(75);robot.advanceLeft(75); \r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\t// robot.advanceLeft(25);\r\n\t\t\t\tif (leftLight.lineDetected()) {\r\n\t\t\t\t\tleftSeen = true;\r\n\t\t\t\t\tSound.setVolume(70);\r\n\t\t\t\t\tSound.beep();\r\n\t\t\t\t\trobot.stopLeft();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlineMissed = false;\r\n\t\t\t\r\n\t\t} else if (leftSeen) {\r\n\t\t\trobot.advanceRight(75);\r\n\t\t\trobot.advanceRight(75);\r\n\t\t\twhile (!rightSeen) {\r\n\t\t\t\t\r\n\t\t\t\t if(currentAngle - odo.getCoordinates().getTheta() < -30) {\r\n\t\t\t\t\t if(!lineMissed){\r\n\t\t\t\t\t\t robot.stopRight();\r\n\t\t\t\t\t\t lineMissed = true;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t robot.advanceRight(-75);robot.advanceRight(-75); \r\n\t\t\t\t\t try{\r\n\t\t\t\t\t\t Thread.sleep(3500);\r\n\t\t\t\t\t }catch(Exception e){}\r\n\t\t\t\t\t rightSeen = false;\r\n\t\t\t\t } \r\n\t\t\t\t else if(currentAngle - odo.getCoordinates().getTheta() > 50){\r\n\t\t\t\t\t robot.advanceLeft(-75);robot.advanceLeft(-75);\r\n\t\t\t\t\t try{\r\n\t\t\t\t\t\t Thread.sleep(3500);\r\n\t\t\t\t\t }catch(Exception e){}\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\t\t\t\t\t robot.advanceRight(75);robot.advanceRight(75);\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t// robot.advanceRight(25);\r\n\r\n\t\t\t\tif (rightLight.lineDetected()) {\r\n\t\t\t\t\trightSeen = true;\r\n\t\t\t\t\tSound.setVolume(70);\r\n\t\t\t\t\tSound.beep();\r\n\t\t\t\t\trobot.stopRight();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trobot.goForward(-1.8, 5);\r\n\t\tleftLight.stop();\r\n\t\trightLight.stop();\r\n\t}",
"public void move_diagonale_right_with_encoderr(DcMotor left_back_motor,DcMotor left_front_motor,\n DcMotor right_back_motor,DcMotor right_front_motor\n ,double distance , double power , boolean break_at_end){\n if (power > 0 ) {\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n int target_ticks = left_front_motor.getCurrentPosition() + cm_to_ticks(distance);\n left_front_motor.setPower(dc_motor_power_adapter(power));\n right_back_motor.setPower(dc_motor_power_adapter(power));\n while ((left_front_motor.getCurrentPosition() < target_ticks) &&\n (right_back_motor.getCurrentPosition() < target_ticks)) ;\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n }else if(power < 0){\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n int target_ticks = left_front_motor.getCurrentPosition() - cm_to_ticks(distance);\n left_front_motor.setPower(dc_motor_power_adapter(power));\n right_back_motor.setPower(dc_motor_power_adapter(power));\n while ((left_front_motor.getCurrentPosition() > target_ticks) && (right_back_motor.getCurrentPosition() > target_ticks)) ;\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n }else if (power ==0){\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n }\n }",
"public void startLightLOC() {\n\t\tlong correctionStart, correctionEnd;\n\t\tfloat[] leftsample = new float[1];\n\t\tfloat[] rightsample = new float[1];\n\t\t// navigation.turn(10);\n\t\t// while(navigation.isNavigating()) continue;\n\t\todometer.setTheta(0);\n\t\t// initialize color sensor\n\t\tSound.beepSequenceUp();\n\n\t\t// Initialize theta, it will be corrected\n\n\t\t// the following code enables the robot to position itself so that the\n\t\t// light sensor will hit all four lines\n\t\tFinalProject.leftMotor.setSpeed(2 * MOTOR_SPEED); // set speeds\n\t\tFinalProject.rightMotor.setSpeed(2 * MOTOR_SPEED);\n\n\t\tFinalProject.leftMotor.forward(); // Run forward\n\t\tFinalProject.rightMotor.forward();\n\n\t\tboolean crossedLineLeft = false; // Set flag\n\t\tboolean crossedLineRight = false;\n\t\tint colorLeft = 6;\n\t\tint lastColorLeft = 6;\n\t\tint lastColorRight = 6;\n\t\tint colorRight = 6;\n\t\t// Before starting turning, make the robot go to (-25, -25)\n\t\twhile (!(crossedLineLeft && crossedLineRight)) { // Set the crossedLine flag to be true when it\n\t\t\t// crosses a line\n\t\t\t// get sample from light sensor\n\t\t\tFinalProject.leftProvider.fetchSample(leftsample, 0);\n\t\t\tcolorLeft = (int) leftsample[0];\n\t\t\tFinalProject.rightProvider.fetchSample(rightsample, 0);\n\t\t\tcolorRight = (int) rightsample[0];\n\t\t\t// when the sensor sees a black line, stop the motors\n\t\t\tif (Math.abs((colorLeft - lastColorLeft) / lastColorLeft) >= 1) {\n\t\t\t\tFinalProject.leftMotor.stop(true);\n\t\t\t\tFinalProject.rightMotor.stop(false);\n\t\t\t\tSound.beep();\n\t\t\t\tcrossedLineLeft = true;\n\t\t\t\tcrossedLineRight = true;\n\n\t\t\t}\n\t\t\tif (Math.abs((colorRight - lastColorRight) / lastColorRight) >= 1) {\n\t\t\t\tFinalProject.leftMotor.stop(true);\n\t\t\t\tFinalProject.rightMotor.stop(false);\n\t\t\t\tSound.beep();\n\t\t\t\tcrossedLineLeft = true;\n\t\t\t\tcrossedLineRight = true;\n\t\t\t}\n\t\t\tlastColorLeft = colorLeft;\n\t\t\tlastColorRight = colorRight;\n\t\t}\n\n\t\t// once the sensor sees the black line, drive 25 cm backwards\n\t\tnavigation.driveWithoutAvoid(-25);\n\n\t\tnavigation.turnTo(90); // turn to 90 degrees\n\n\t\tcrossedLineLeft = false; // set flag back to false\n\t\tcrossedLineRight = false;\n\t\t// drive forward until the sensor crosses a black line\n\t\tFinalProject.leftMotor.forward();\n\t\tFinalProject.rightMotor.forward();\n\n\t\twhile (!(crossedLineLeft && crossedLineRight)) { // Set the crossedLine flag to be true when it\n\t\t\t// crosses a line\n\t\t\t// get sample from light sensor\n\n\t\t\tFinalProject.leftProvider.fetchSample(leftsample, 0);\n\t\t\tcolorLeft = (int) leftsample[0];\n\t\t\tFinalProject.rightProvider.fetchSample(rightsample, 0);\n\t\t\tcolorRight = (int) rightsample[0];\n\t\t\t// when the sensor sees a black line, stop the motors\n\t\t\tif (Math.abs((colorLeft - lastColorLeft) / lastColorLeft) >= 1) {\n\t\t\t\tFinalProject.leftMotor.stop(true);\n\t\t\t\tFinalProject.rightMotor.stop(false);\n\t\t\t\tSound.beep();\n\t\t\t\tcrossedLineLeft = true;\n\t\t\t\tcrossedLineRight = true;\n\t\t\t}\n\t\t\tif (Math.abs((colorRight - lastColorRight) / lastColorRight) >= 1) {\n\t\t\t\tFinalProject.leftMotor.stop(true);\n\t\t\t\tFinalProject.rightMotor.stop(false);\n\t\t\t\tSound.beep();\n\t\t\t\tcrossedLineLeft = true;\n\t\t\t\tcrossedLineRight = true;\n\t\t\t}\n\t\t\tlastColorLeft = colorLeft;\n\t\t\tlastColorRight = colorRight;\n\t\t}\n\n\t\t// drive 25 cm backwards and turn back to 0 degrees\n\t\tnavigation.driveWithoutAvoid(-25);\n\n\t\tnavigation.turnTo(0);\n\n\t\t// turn 360 degrees\n\t\tFinalProject.leftMotor.forward();\n\t\tFinalProject.rightMotor.backward();\n\t\tdouble[] leftThetas = new double[4];\n\t\tdouble[] rightThetas = new double[4];\n\t\tint rightNumCount = 0;\n\t\tint leftNumCount = 0;\n\t\t// while the robot is turning, fetch the color from the color sensor and\n\t\t// save the values of theta when the sensor crosses a black line\n\t\twhile (rightNumCount < 4 && leftNumCount < 4) {\n\n\t\t\tcorrectionStart = System.currentTimeMillis();\n\n\t\t\t// get color detected by light sensor\n\n\t\t\tFinalProject.leftProvider.fetchSample(leftsample, 0);\n\t\t\tcolorLeft = (int) leftsample[0];\n\t\t\tFinalProject.rightProvider.fetchSample(rightsample, 0);\n\t\t\tcolorRight = (int) rightsample[0];\n\t\t\tif (Math.abs((colorLeft - lastColorLeft) / lastColorLeft) >= 1) {\n\t\t\t\tSound.beep();\n\t\t\t\tleftThetas[leftNumCount] = odometer.getTheta();\n\t\t\t\tleftNumCount += 1;\n\t\t\t}\n\t\t\tif (Math.abs((colorRight - lastColorRight) / lastColorRight) >= 1) {\n\t\t\t\tSound.beep();\n\t\t\t\trightThetas[rightNumCount] = odometer.getTheta();\n\t\t\t\trightNumCount += 1;\n\t\t\t}\n\t\t\t// if color is black, beep, increment the number of lines crossed\n\t\t\t// and save value of theta\n\t\t\tlastColorLeft = colorLeft;\n\t\t\tlastColorRight = colorRight;\n\t\t}\n\n\t\t// this ensure the odometry correction occurs only once every period\n\t\t/*\n\t\t * correctionEnd = System.currentTimeMillis(); if (correctionEnd -\n\t\t * correctionStart < CORRECTION_PERIOD) { try { Thread.sleep(CORRECTION_PERIOD -\n\t\t * (correctionEnd - correctionStart)); } catch (InterruptedException e) { //\n\t\t * there is nothing to be done here because it is not // expected that the\n\t\t * odometry correction will be // interrupted by another thread } }\n\t\t */\n\n\t\tSound.beep();\n\n\t\t// calculate values of thetaX and thetaY\n\t\tthetaX2 = (leftThetas[2] + rightThetas[2]) / 2;\n\t\tthetaX1 = (leftThetas[0] + rightThetas[0] / 2);\n\t\tthetaY2 = (leftThetas[3] + rightThetas[3]) / 2;\n\t\tthetaY1 = (leftThetas[1] + rightThetas[1]) / 2;\n\t\tthetaX = thetaX2 - thetaX1;\n\t\tthetaY = thetaY2 - thetaY1;\n\n\t\t// calculate the value of deltaTheta, the -6 was determined\n\t\t// experimentally\n\t\tdouble deltaTheta = (Math.PI / 2.0) - thetaY2 + Math.PI + (thetaY / 2.0) - 6;\n\n\t\tdouble newTheta = odometer.getTheta() + deltaTheta;\n\n\t\tif (newTheta < 0) { // Keep newTheta (in radians) between 0 and 2pi\n\t\t\tnewTheta = newTheta + 2 * Math.PI;\n\t\t} else if (newTheta > 2 * Math.PI) {\n\t\t\tnewTheta = newTheta - 2 * Math.PI;\n\t\t}\n\n\t\t// for testing purposes, print the deltaTheta to be corrected\n\t\tTextLCD t = LocalEV3.get().getTextLCD();\n\t\tt.drawString(\"deltaTheta:\" + Math.toDegrees(deltaTheta), 0, 4);\n\n\t\t// set x and y to correct values\n\t\todometer.setX(-SENSOR_OFFSET * Math.cos(thetaY / 2.0));\n\t\todometer.setY(-SENSOR_OFFSET * Math.cos(thetaX / 2.0));\n\n\t\t// set theta to its correct value\n\t\todometer.setTheta(newTheta);\n\n\t\t// travel to the 0,0 point and turn to 0 degrees\n\t\tnavigation.travelTo(0, 0);\n\t\tnavigation.turnTo(0);\n\t\t// navigation.turnTo(deltaTheta);\n\t\tSound.playNote(Sound.XYLOPHONE, 500, 500);\n\t}",
"public static void LayerConvlt(Gene g) {\n System.out.println(\"MUT:LayerConvlt\");\n if(g.getLayerCount()>2){\n /*random hidden & not previos to output or next to input layer*/\n int rnd = Func.rnd(1, g.getLayerCount()-2);\n \n /*save new layer configuration*/\n boolean tempLayer [][] = \n new boolean[1+Gene.MAX_NEUR_IN_LAY][1+Gene.MAX_NEUR_IN_LAY];\n tempLayer[0][0] = true;\n for(int i=0; i<g.getLastActNeur(rnd+1); i++)\n tempLayer[1+i][0] = g.getConnections()[rnd+1][1+i][0];\n for(int i=0; i<g.getLastActNeur(rnd+1); i++)\n for(int j=0; j<g.getLastActNeur(rnd); j++)\n for(int k=0; k<g.getLastActNeur(rnd-1); k++)\n if(g.getConnections()[rnd+1][1+i][1+j] & \n g.getConnections()[rnd][1+j][1+k])\n tempLayer[1+i][1+k] = true;\n \n /*write new layer and shift the rest*/\n g.getConnections()[rnd] = tempLayer;\n for(int i=rnd+1; i<g.getLayerCount()-1; i++)\n g.getConnections()[i] = g.getConnections()[i+1];\n \n /*clean last layer*/\n for(int i=Gene.MAX_NEUR_IN_LAY; i>=0; i--)\n for(int j=Gene.MAX_NEUR_IN_LAY; j>=0; j--)\n g.getConnections()[g.getLayerCount()-1][i][j] = false;\n }\n }",
"public void spin_with_encoderr(DcMotor left_back_motor, DcMotor left_front_motor,\n DcMotor right_back_motor, DcMotor right_front_motor,\n double power , int Given_Degree , char direction,boolean break_at_end)\n {\n double num_of_rotations = (robot_spin_circumference/wheel_circumference);\n double degrees_per_rotation = 360 / num_of_rotations ;\n double distance = (Given_Degree*wheel_circumference/degrees_per_rotation);\n\n if(direction== 'C'){\n if (power > 0 )\n {\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n\n\n int target_ticks = left_back_motor.getCurrentPosition() + cm_to_ticks(distance);\n\n\n\n left_back_motor.setPower(dc_motor_power_adapter(power));\n left_front_motor.setPower(dc_motor_power_adapter(power));\n right_back_motor.setPower(dc_motor_power_adapter(-power));\n right_front_motor.setPower(dc_motor_power_adapter(-power));\n\n\n while ((left_back_motor.getCurrentPosition() > target_ticks) &&\n (left_front_motor.getCurrentPosition() > target_ticks)\n && (right_back_motor.getCurrentPosition() < target_ticks) &&\n (right_front_motor.getCurrentPosition() < target_ticks))\n ;\n\n\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n\n }else if(power < 0){\n\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n\n\n int target_ticks = left_back_motor.getCurrentPosition() - cm_to_ticks(distance);\n\n\n left_back_motor.setPower(dc_motor_power_adapter(-power));\n left_front_motor.setPower(dc_motor_power_adapter(-power));\n right_back_motor.setPower(dc_motor_power_adapter(power));\n right_front_motor.setPower(dc_motor_power_adapter(power));\n\n\n while ((left_back_motor.getCurrentPosition() < target_ticks) &&\n (left_front_motor.getCurrentPosition() < target_ticks)\n && (right_back_motor.getCurrentPosition() > target_ticks) &&\n (right_front_motor.getCurrentPosition() > target_ticks))\n ;\n\n\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n\n }else if (power ==0){\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n }\n\n\n\n }\n else if(direction=='A'){\n if (power > 0 )\n {\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() + cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() + cm_to_ticks(distance));\n\n\n int target_ticks = left_back_motor.getCurrentPosition() + cm_to_ticks(distance);\n\n\n\n left_back_motor.setPower(dc_motor_power_adapter(-power));\n left_front_motor.setPower(dc_motor_power_adapter(-power));\n right_back_motor.setPower(dc_motor_power_adapter(power));\n right_front_motor.setPower(dc_motor_power_adapter(power));\n\n\n while ((left_back_motor.getCurrentPosition() < target_ticks) &&\n (left_front_motor.getCurrentPosition() < target_ticks)\n && (right_back_motor.getCurrentPosition() > target_ticks) &&\n (right_front_motor.getCurrentPosition() > target_ticks))\n ;\n\n\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n\n }else if(power < 0){\n\n left_back_motor.setTargetPosition(left_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n left_front_motor.setTargetPosition(left_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_back_motor.setTargetPosition(right_back_motor.getCurrentPosition() - cm_to_ticks(distance));\n right_front_motor.setTargetPosition(right_front_motor.getCurrentPosition() - cm_to_ticks(distance));\n\n\n int target_ticks = left_back_motor.getCurrentPosition() - cm_to_ticks(distance);\n\n\n left_back_motor.setPower(dc_motor_power_adapter(power));\n left_front_motor.setPower(dc_motor_power_adapter(power));\n right_back_motor.setPower(dc_motor_power_adapter(-power));\n right_front_motor.setPower(dc_motor_power_adapter(-power));\n\n\n while ((left_back_motor.getCurrentPosition() > target_ticks) &&\n (left_front_motor.getCurrentPosition() > target_ticks)\n && (right_back_motor.getCurrentPosition() < target_ticks) &&\n (right_front_motor.getCurrentPosition() < target_ticks))\n ;\n\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n\n }else if (power ==0){\n left_back_motor.setPower(dc_motor_power_adapter(0));\n left_front_motor.setPower(dc_motor_power_adapter(0));\n right_back_motor.setPower(dc_motor_power_adapter(0));\n right_front_motor.setPower(dc_motor_power_adapter(0));\n }\n\n }\n\n\n\n\n\n\n }",
"private void drawTorus()\n\t{\t\n\t\tfloat []params = {1.f, 1.f, 1.f, 1.f};\n\t\tint mTorus = 100;\t\t\t\t\t\t\t\t\t\t\t\t\t\t//u-Schritte\n\t\tint nTorus = 100;\t\t\t\t\t\t\t\t\t\t\t\t\t\t//v-Schritte\n\t\tfloat u_iTorus , u_i_1Torus , v_jTorus , v_j_1Torus;\t\t\t\t\t\t\t\t\t//Eckpunkte einer Facette\n\t\tfloat \tuaTorus = -(float) (2*Math.PI), ueTorus = (float) (2*Math.PI),\t\t//Anfang und Ende des u-Bereichs\n\t\t\t\tvaTorus = -(float) (2*Math.PI), veTorus = (float) (2*Math.PI);\t\t//Anfang und Ende des v-Bereichs\n\t\tfloat deltaUTorus = (float)(ueTorus-uaTorus)/mTorus;\t\t\t\t\t\t\t\t\t//wie gro� ein einzelner Teilschritt sein muss in u-Richtung\n\t\tfloat deltaVTorus = (float)(veTorus-vaTorus)/nTorus;\t\t\t\t\t\t\t\t\t//wie gro� ein einzelner Teilschritt sein muss in v-Richtung\n\t\tfloat winkel = 0;\n\t\n\t\t\n//\t\tglLoadIdentity();\n\t\tglPushMatrix();\n\t\tglRotatef(winkel, 1, 0, -1);\n\n\t\tfor(int i = 0; i<mTorus; i++){\n\t\t\tglMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, params);\n\n\t\t\tfor(int j = 0; j<nTorus; j++){\n\t\t\t\tglPolygonMode(GL_FRONT_AND_BACK, GL_FILL);\n\t\t\t\n\t\t\t//Eckpunkte einer Facette deklarieren\t\n\t\t\tu_iTorus \t= uaTorus + i * deltaUTorus;\n\t\t\tu_i_1Torus \t= u_iTorus + deltaUTorus;\n\t\t\tv_jTorus \t= vaTorus + j * deltaVTorus;\n\t\t\tv_j_1Torus \t= v_jTorus + deltaVTorus;\n\t\t\t\n\t\t\tVector3f normal = Utils.normalVector(\n\t\t\t\t\tnew Vector3f(xTorus(u_iTorus,v_jTorus), yTorus(u_iTorus,v_jTorus), zTorus(u_iTorus, v_jTorus)),\n\t\t\t\t\tnew Vector3f(xTorus(u_i_1Torus,v_jTorus), yTorus(u_i_1Torus,v_jTorus), zTorus(u_i_1Torus, v_jTorus)),\n\t\t\t\t\tnew Vector3f(xTorus(u_iTorus,v_j_1Torus), yTorus(u_iTorus,v_j_1Torus), zTorus(u_iTorus, v_j_1Torus))).mul(-1);\n\t\t\t\n\t\t\t//Erstellung einer Facette\n\t\t\tglBegin(GL_POLYGON);\n\t\t\t\tglNormal3f(normal.x, normal.y, normal.z);\n\t\t\t\tMaterials.materialChrom();\n\n\t\t\t\tglVertex3f(xTorus(u_iTorus,v_jTorus),\t\tyTorus(u_iTorus,v_jTorus), \t\tzTorus(u_iTorus, v_jTorus));\n\t\t\t\tglVertex3f(xTorus(u_i_1Torus,v_jTorus),\t\tyTorus(u_i_1Torus,v_jTorus), \tzTorus(u_i_1Torus, v_jTorus));\n\t\t\t\tglVertex3f(xTorus(u_i_1Torus,v_j_1Torus),\tyTorus(u_i_1Torus,v_j_1Torus),\tzTorus(u_i_1Torus, v_j_1Torus));\n\t\t\t\tglVertex3f(xTorus(u_iTorus,v_j_1Torus),\t\tyTorus(u_iTorus,v_j_1Torus), \tzTorus(u_iTorus, v_j_1Torus));\n\t\t\tglEnd();\n\t\t\t}\n\t\t}\n\t}",
"public void updateIR() {\n\t\tfloat timeStart = System.nanoTime();\n\t\tfloat timeEnd;\n\t\tfloat timeElapsed;\n\t\tint remoteChan3 = infraredSensor.getRemotecmd(3);\n\t\tint remoteChan2 = infraredSensor.getRemotecmd(2);\n\t\tint remoteChan1 = infraredSensor.getRemotecmd(1);\n\t\tint remoteChan0 = infraredSensor.getRemotecmd(0);\n\t\tLCD.drawString(\"Hello\", 0, 0);\n\t\tLCD.drawInt(Channel, 0, 4);\n\n\t\tswitch (remoteChan3) {\n\t\t// Drive backward\n\t\tcase 1:\n\t\t\tdirection = 1;\n\t\t\tif (Record == true) {\n\t\t\t\tif (what != 1) {\n\t\t\t\t\ttimeEnd = System.nanoTime();\n\t\t\t\t\ttimeElapsed = timeEnd - timeStart;\n\t\t\t\t\trouteManager.Record(what, timeElapsed);\n\t\t\t\t}\n\t\t\t\ttimeStart = System.nanoTime();\n\t\t\t\twhat = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\t// Drive forward\n\t\tcase 2:\n\t\t\tdirection = -1;\n\t\t\tif (Record == true) {\n\t\t\t\tif (what != 2) {\n\t\t\t\t\ttimeEnd = System.nanoTime();\n\t\t\t\t\ttimeElapsed = timeEnd - timeStart;\n\t\t\t\t\trouteManager.Record(what, timeElapsed);\n\t\t\t\t}\n\t\t\t\ttimeStart = System.nanoTime();\n\t\t\t\twhat = 2;\n\t\t\t}\n\t\t\tbreak;\n\t\t// Steer right\n\t\tcase 3:\n\t\t\tsteeringAngle = 30;\n\t\t\tif (Record == true) {\n\t\t\t\tif (what != 3) {\n\t\t\t\t\ttimeEnd = System.nanoTime();\n\t\t\t\t\ttimeElapsed = timeEnd - timeStart;\n\t\t\t\t\trouteManager.Record(what, timeElapsed);\n\t\t\t\t}\n\t\t\t\ttimeStart = System.nanoTime();\n\t\t\t\twhat = 3;\n\t\t\t}\n\t\t\tbreak;\n\t\t// Steer left\n\t\tcase 4:\n\t\t\tsteeringAngle = -30;\n\t\t\tif (Record == true) {\n\t\t\t\tif (what != 4) {\n\t\t\t\t\ttimeEnd = System.nanoTime();\n\t\t\t\t\ttimeElapsed = timeEnd - timeStart;\n\t\t\t\t\trouteManager.Record(what, timeElapsed);\n\n\t\t\t\t}\n\t\t\t\ttimeStart = System.nanoTime();\n\t\t\t\twhat = 4;\n\t\t\t}\n\t\t\tbreak;\n\t\t// Stop\n\t\tcase 9:\n\t\t\tdirection = 0;\n\t\t\tif (Record == true) {\n\t\t\t\tif (what != 9) {\n\t\t\t\t\ttimeEnd = System.nanoTime();\n\t\t\t\t\ttimeElapsed = timeEnd - timeStart;\n\t\t\t\t\trouteManager.Record(what, timeElapsed);\n\t\t\t\t}\n\t\t\t\ttimeStart = System.nanoTime();\n\t\t\t\twhat = 9;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tswitch (remoteChan2) {\n\t\t// start recording\n\t\tcase 1:\n\t\t\tRecord = true;\n\t\t\tSound.beep();\n\t\t\tbreak;\n\t\t// stop recording\n\t\tcase 2:\n\t\t\tRecord = false;\n\t\t\tbreak;\n\t\t// drive recorded route\n\t\tcase 3:\n\t\t\tRecord = false;\n\t\t\tSound.beep();\n\t\t\tSound.beep();\n\t\t\trouteManager.Play();\n\t\t\trouteManager.Play = true;\n\t\t\tbreak;\n\t\t// cancel current route\n\t\tcase 4:\n\t\t\trouteManager.Play = false;\n\t\t\tbreak;\n\t\t}\n\t\t// play prerecorded route\n\t\tswitch (remoteChan1) {\n\t\tcase 1:\n\t\t\trouteManager.Route1();\n\t\t\tbreak;\n\t\t}\n\t\t// play music\n\t\tswitch (remoteChan0) {\n\t\tcase 1:\n\t\t\tif (this.music.getState() == Thread.State.TERMINATED) {\n\t\t\t\tthis.music = new Music();\n\t\t\t} else if (!this.music.isAlive()) {\n\t\t\t\tthis.music.start();\n\t\t\t} else {\n\t\t\t\tDelay.msDelay(10);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}",
"void stablizeRing(){\n\n\t\tint currentNodeIndex = Constants.globalNodeList.indexOf(Constants.currentPort);\n\n\t\t//get location of previous and next node\n\t\tint previousNodeLocation = (currentNodeIndex + Constants.globalNodeList.size() - 1) % Constants.globalNodeList.size();\n\t\tint previousTwoHopLocation = (currentNodeIndex + Constants.globalNodeList.size() - 2) % Constants.globalNodeList.size();\n\t\tString previousNodeLocationPort = Constants.globalNodeList.get(previousNodeLocation);\n\t\tString previousTwoHopLocationPort = Constants.globalNodeList.get(previousTwoHopLocation);\n\t\tString previousNodePort = String.valueOf(Integer.parseInt(previousNodeLocationPort) * 2);\n\n\n\t\tint nextNodeLocation = (currentNodeIndex + 1) % Constants.globalNodeList.size();\n\t\tString nextNodeLocationPort = Constants.globalNodeList.get(nextNodeLocation);\n\t\tString previousNodeAcknowledgement = new NodeRelay().send(previousNodePort,Constants.queryString,Constants.current);\n\t\tString nextNodePort = String.valueOf(Integer.parseInt(nextNodeLocationPort) * 2);\n\t\tString nextNodeAcknowledgement = new NodeRelay().send(nextNodePort, Constants.queryString,Constants.current);\n\n\n\n\n\t\tif(nextNodeAcknowledgement != null) {\n\t\t\tString[] nextNodeCustomMessage = nextNodeAcknowledgement.split(\";\");\n\t\t\tint currentSuccessorIndex = 0, successorPartsLength = nextNodeCustomMessage.length;\n\t\t\tif (currentSuccessorIndex < successorPartsLength) {\n\t\t\t\tdo {\n\t\t\t\t\tString keyValue = nextNodeCustomMessage[currentSuccessorIndex];\n\n\t\t\t\t\tString key = keyValue.split(Constants.keyValueSeparator)[0];\n\t\t\t\t\tString value = keyValue.split(Constants.keyValueSeparator)[1];\n\n\t\t\t\t\tString targetNode = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString hashKey = genHash(key);\n\t\t\t\t\t\ttargetNode = Constants.findNodeLocationByHashKey(hashKey);\n\t\t\t\t\t}catch (Exception e){\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//write to file if targetNode == currentPort\n\t\t\t\t\tif (targetNode.equals(Constants.currentPort)) {\n\t\t\t\t\t\tFileOutputStream fileOutputStream;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfileOutputStream = getContext().openFileOutput(key, Context.MODE_PRIVATE);\n\t\t\t\t\t\t\tfileOutputStream.write(value.getBytes());\n\t\t\t\t\t\t\tfileOutputStream.close();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (Constants.intermediateMap.contains(key)) {\n\t\t\t\t\t\t\tConstants.intermediateMap.get(key).release();\n\t\t\t\t\t\t\tConstants.intermediateMap.remove(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrentSuccessorIndex++;\n\t\t\t\t} while (currentSuccessorIndex < successorPartsLength);\n\t\t\t}\n\t\t}\n\n\t\t//check for predecessor Response\n\t\tif(previousNodeAcknowledgement != null) {\n\t\t\tString[] previousList;\n\t\t\tpreviousList = previousNodeAcknowledgement.split(Constants.queryDelimiter);\n\t\t\tint currentPrevious = 0;\n\t\t\tif (currentPrevious < previousList.length) {\n\t\t\t\tdo {\n\t\t\t\t\tString keyValue = previousList[currentPrevious];\n\n\t\t\t\t\tString key = keyValue.split(Constants.keyValueSeparator)[0];\n\t\t\t\t\tString value = keyValue.split(Constants.keyValueSeparator)[1];\n\n\t\t\t\t\tString targetNode = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString hashKey = genHash(key);\n\t\t\t\t\t\ttargetNode = Constants.findNodeLocationByHashKey(hashKey);\n\t\t\t\t\t}catch (Exception e){\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif (targetNode.equals(previousNodeLocationPort) || targetNode.equals(previousTwoHopLocationPort)) {\n\t\t\t\t\t\tFileOutputStream file;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfile = getContext().openFileOutput(key, Context.MODE_PRIVATE);\n\t\t\t\t\t\t\tfile.write(value.getBytes());\n\t\t\t\t\t\t\tfile.close();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(Constants.intermediateMap.contains(key)){\n\t\t\t\t\t\t\tConstants.intermediateMap.get(key).release();\n\t\t\t\t\t\t\tConstants.intermediateMap.remove(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentPrevious++;\n\t\t\t\t} while (currentPrevious < previousList.length);\n\t\t\t}\n\t\t}\n\t\tif(previousNodeAcknowledgement == null && nextNodeAcknowledgement == null) return;\n\n\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the y inicio. | public float getyInicio() {
return yInicio;
} | [
"public int y() {\r\n\t\treturn yCoord;\r\n\t}",
"public int getY(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(1)/ AvesAblazeHardware.mmPerInch);\n\t}",
"public double getY() {\n return Y;\n }",
"double getEndY();",
"public static int getMinY() { return y; }",
"public double getY() {\n return (this.y);\n }",
"public double getY() {\n return mY;\n }",
"public double getY() {\n return Y;\n }",
"public double getEndY() {\n return y;\n }",
"public double Y()\r\n {\r\n return curY;\r\n }",
"public int getCentroY() {\r\n return this.iCentroY;\r\n }",
"public int getCurrentY() {\n return currentY;\n }",
"int getToY();",
"public int getY() {\n\t\treturn this.y_indice * DIM_CASE;\n\t}",
"public int getY() {\n\t\treturn this.coordY;\n\t}",
"public static int getY() {\n\t\treturn mouseY;\n\t}",
"public double getY() {\r\n return yValue;\r\n }",
"public int getY() {\n\t\treturn (int) pos.y;\n\t}",
"public int getEndY() {\r\n\t\treturn endY;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the active workbench page. | public WorkbenchPage getPage() {
return my_page;
} | [
"public static IWorkbenchPage getActivePage() {\n\t\tIWorkbench wb = PlatformUI.getWorkbench();\t\t\n\t\tif(wb != null) {\n\t\t\tIWorkbenchWindow win = wb.getActiveWorkbenchWindow();\t\t\t\n\t\t\tif(win != null) {\n\t\t\t\tIWorkbenchPage page = win.getActivePage();\t\t\t\t\n\t\t\t\tif(page != null) {\n\t\t\t\t\treturn page;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static IWorkbenchPage getActivePage() {\n\t IWorkbenchWindow window= getActiveWorkbenchWindow();\n\t if (window != null) {\n\t\t return window.getActivePage();\n\t }\n\t return null;\n }",
"public int getCurrentPage();",
"int getCurrentPage();",
"public static IWorkbenchPage getActivePage() {\n IWorkbenchWindow window = getActiveWorkbenchWindow();\n if (window != null) {\n return window.getActivePage();\n }\n return null;\n }",
"public int getRealCurrentPage();",
"public static IWorkbenchPage getActivePage() {\n IWorkbenchPage page = null;\n\n IWorkbenchWindow window = OOEclipsePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();\n if (null != window) {\n page = window.getActivePage();\n }\n return page;\n }",
"public int getActivePage()\n {\n return activePage;\n }",
"int getProjectCurrentPage();",
"int getCurrentPageIndex();",
"public CharSequence getCurrentPage() {\n return pages.get(currentIndex);\n }",
"public T getCurrentPage() {\n\t\tcheckNotNull(this.currentPage, \"No current page defined.\");\n\t\treturn this.currentPage;\n\t}",
"public Integer getCurrentPage() {\r\n\t\treturn currentPage;\r\n\t}",
"public Page getCurrentPageObject() {\n return getPageObject(this.currentIndex.viewIndex);\n }",
"public int getCurrentPageIndex() {\r\n\t\treturn 0;\r\n\t}",
"public Page getCurrentPageObject() {\n return getPageObject(this.currentIndex.viewIndex);\n }",
"String getStartpage();",
"public String getPage() {\n return page;\n }",
"public static IWorkbenchPart getActiveWorkbenchPart() {\n IWorkbench wb = PlatformUI.getWorkbench();\n IWorkbenchWindow win = wb.getActiveWorkbenchWindow();\n IWorkbenchPage page = win.getActivePage();\n return page.getActivePart();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
runs the reservation server process This process, get reservation requests, processes them and return results to clients Clients are servers that wishes to make book reservation on this server. | public void startReservationServer(LibraryServerImpl libraryServer, DatagramSocket reservationSocket) {
try {
new Thread(new ReservationServer(libraryServer, reservationSocket)).start();
} catch (SocketException e) {
e.printStackTrace();
}
this.logger.info("startReservationServer for " + institution );
} | [
"private static void reservationsPage() {\n System.out.println(\"\");\n System.out.println(\"==================\");\n System.out.println(\"* RESERVED BOOKS *\");\n System.out.println(\"==================\");\n resUI.reservations(sessionId);\n String input = \"\";\n while(true) {\n System.out.print(\">\");\n input = reader.nextLine();\n switch(input.toLowerCase()) {\n case(\"help\"):\n helpPage();\n break;\n case(\"back\"):\n memberPage();\n break;\n case(\"cancel\"): \n System.out.print(\" reservation id: \");\n input = reader.nextLine();\n try {\n resUI.cancel(sessionId, Integer.parseInt(input), reader);\n }\n catch(NumberFormatException ex) { \n System.out.println(\"Invalid Reservation ID\"); \n }\n reservationsPage();\n break;\n case(\"refrsh\"):\n reservationsPage();\n break;\n default:\n if(!input.isEmpty()) {\n System.out.println(\n \"Error: '\" + input + \"' is not a command for this page\");\n }\n }\n }\n }",
"private void makeReservations() {\n \tint numberOfReservations = getNumberOfCarsArriving(weekDayReservationArrivals, weekendReservationArrivals, eventReservationArrivals);\n \tint numberOfMissedReservations = 0;\n \tint numberOfFreeSpaces = countFreeParkingSpaces(\"regular\");\n\n \tint numberOfAdditionalReservationsAllowed = maxReservations - reservationList.size() - totalParkedReservation;\n\n \tif(numberOfReservations > numberOfAdditionalReservationsAllowed) {\n \t\tnumberOfMissedReservations += numberOfReservations - numberOfAdditionalReservationsAllowed;\n \t\tnumberOfReservations = numberOfAdditionalReservationsAllowed;\n \t}\n \tif(numberOfReservations > numberOfFreeSpaces) {\n \t\tnumberOfMissedReservations += numberOfReservations - numberOfFreeSpaces;\n \t\tnumberOfReservations = numberOfFreeSpaces;\n \t}\n\n \ttotalReservationMissed += numberOfMissedReservations;\n \tmissedReservationIncome = totalReservationMissed * reservationFee;\n\n \tint curMinute = 24*60*day + 60*hour + minute;\n\n \tfor(int i = 0; i < numberOfReservations; i++) {\n Location freeLocation = getFirstFreeParkingSpace(\"regular\");\n\n int timeOfArrival = computeReservationArrivalTime();\n int timeOfExpiration = curMinute + 30;\n Reservation reservation = new Reservation(freeLocation, timeOfArrival, timeOfExpiration);\n\n reservationList.add(reservation);\n\n ParkingSpace space = getParkingSpaceAt(freeLocation);\n space.setType(\"reservation\");\n \t}\n }",
"private ArrayList<Reservation> executeFetchReservations() throws Exception {\n String url = UrlContainer.getReservationUrl();\n url = String.format(url, APIKey, this.Email);\n HttpURLConnection httpConnection = (HttpURLConnection)new URL(url).openConnection();\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.setUseCaches(false);\n httpConnection.connect();\n\n int response_code = httpConnection.getResponseCode();\n switch(response_code) {\n case HttpURLConnection.HTTP_OK:\n String json = getJSONString(httpConnection); //resources are closed\n return JSONReservationParser.getReservations(json);\n case HttpURLConnection.HTTP_UNAUTHORIZED:\n case HttpURLConnection.HTTP_UNAVAILABLE:\n case HttpURLConnection.HTTP_BAD_GATEWAY:\n case HttpURLConnection.HTTP_BAD_REQUEST:\n case HttpURLConnection.HTTP_CLIENT_TIMEOUT:\n case HttpURLConnection.HTTP_RESET:\n case HttpURLConnection.HTTP_USE_PROXY:\n case HttpURLConnection.HTTP_CONFLICT:\n case HttpURLConnection.HTTP_BAD_METHOD:\n case HttpURLConnection.HTTP_REQ_TOO_LONG:\n case HttpURLConnection.HTTP_UNSUPPORTED_TYPE:\n case HttpURLConnection.HTTP_GATEWAY_TIMEOUT:\n case HttpURLConnection.HTTP_FORBIDDEN:\n case HttpURLConnection.HTTP_NOT_FOUND:\n case HttpURLConnection.HTTP_INTERNAL_ERROR:\n case HttpURLConnection.HTTP_GONE:\n case HttpURLConnection.HTTP_NO_CONTENT:\n case HttpURLConnection.HTTP_NOT_ACCEPTABLE:\n throw new Exception();\n }\n return null;\n }",
"public void startReservation() {\n\t\tInput obj = new Input();\n\t\tMenu menu = new Menu();\n\t\tPassenger passenger = new Passenger();\n\t\tGoods goods = new Goods();\n\t\tString[] stations = new String[2];\n\t\tSystem.out.println(\"enter your name\");\n\t\tuserName = obj.input();\n\t\tString trainType = menu.menuTrainType();\n\t\tif (trainType.equalsIgnoreCase(\"passenger\")) {\n\t\t\tpassenger.showTrain(Passenger.trains);\n\t\t\tstations = menu.menuSourceDestinationStation();\n\t\t\tPassenger.refineTrainsList = passenger.refineTrains(stations[0],\n\t\t\t\t\tstations[1]);\n\t\t\tif (Passenger.refineTrainsList.size() == 0) {\n\t\t\t\tSystem.out.println(\"no trains are found\");\n\t\t\t} \n\t\t\telse {\n\t\t\t\tpassengerDetailsFromUser();\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\tgoods.showTrain(Goods.trains);\n\t\t\tstations = menu.menuSourceDestinationStation();\n\t\t\tGoods.refineTrainsList = goods.refineTrains(stations[0], stations[1]);\n\t\t\tif (Goods.refineTrainsList.size() == 0) {\n\t\t\t\tSystem.out.println(\"no trains are found\");\n\t\t\t} else {\n\t\t\t\tgoodsDetailFromUser();\n\t\t\t}\n\t\t}\n\t}",
"public void request(int id, Calendar start, Calendar end, int smallRooms, int mediumRooms, int largeRooms){\n\t\tString output = privateRequest(id, start, end, smallRooms, mediumRooms, largeRooms);\n\t\tif(output == null) System.out.println(\"Request rejected\");\t\n\t\telse System.out.println(\"Reservation \" + output);\n\t}",
"public void run()\r\n\t{\r\n\t\treserve.reserveSeat(requestedSeats,passengerName);\r\n\t}",
"public void execute() {\n try {\n \n PSSWorker pssWorker = PSSWorker.getInstance();\n PSSClient pssClient = pssWorker.getPSSClient();\n \n //register request so we can handle the reply later on\n MessagePropertiesType msgProps = new MessagePropertiesType();\n msgProps.setGlobalTransactionId(this.getRequestData().getTransactionId());\n PathRequest.getPathRequest(PathRequest.PSS_MODIFY_PATH + \n \"-\" + this.getRequestData().getReservation().getGlobalReservationId(),\n msgProps, this.getRequestData().getReservation());\n\n Object[] req = {this.getRequestData()};\n pssClient.invoke(PSSConstants.PSS_MODIFY,req);\n\n this.setResultData(null); \n this.executed();\n \n } catch (OSCARSServiceException ex) {\n this.fail(ex);\n }\n }",
"public RequestResponse run() {\n try (Socket client = new Socket(ip, port)) {\n System.out.println(\"Connected to server.\");\n OutputStream out = client.getOutputStream();\n ObjectOutputStream writer = new ObjectOutputStream(out);\n writer.writeObject(request);\n System.out.println(\"REQUEST Sent . \");\n InputStream in = client.getInputStream();\n ObjectInputStream reader = new ObjectInputStream(in);\n Thread.sleep(2000);\n requestResponse=(RequestResponse) reader.readObject();\n System.out.println(\"RESPONSE RECEIVED .\");\n client.close();\n } catch (IOException | ClassNotFoundException | InterruptedException ex) {\n ex.printStackTrace();\n }\n System.out.println(\"CLIENT \" + \" has done its job .\");\n return requestResponse;\n }",
"void newReservationCreated(Reservation reservation) throws RemoteException;",
"public void run() {\n\t\ttry {\n\t\t\tObjectInputStream in = new ObjectInputStream(clientSocket.getInputStream());\n\t\t\tDataOutputStream out = new DataOutputStream(clientSocket.getOutputStream());\n\t\t\t\n\t\t\tObject object = in.readObject();\n\t\t\t\n\t\t\tMigratableProcess process = null;\n if(object instanceof MigratableProcess){\n \tprocess = (MigratableProcess)object;\n \tprocess.migrated();\n \tout.writeBoolean(true);\n\t ProcessManager.getInstance().startProcess(process);\n }\n else {\n \tout.writeBoolean(false);\n }\n in.close();\n out.close();\n clientSocket.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"processing client request error\");\n } catch (ClassNotFoundException e) {\n \tSystem.out.println(\"client sent unrecognized object\");\n }\n\t}",
"@Override\r\n public ReservationDTO reserveSeats(ReservationRequestDTO reservationRequest) throws ServiceException {\r\n return (ReservationDTO) post(reservationRequest, ServiceURI.reservations(_username), ReservationDTO.class);\r\n }",
"public void createResBooking() {\n\t\tReservation r = new Reservation();\n\t\tr.createReservation();\n\t\ttm.setReservedTable();\n\t}",
"static void reserveFlight(){\n\nConnection conn = null;\nboolean flightNumCheck = false;\nint selection;\nStatement stmt = null;\nResultSet rs = null;\n\ntry{\n Class.forName(DRIVER);\n conn = DriverManager.getConnection(DB, USER, PW);\n \n \n \nSystem.out.print(\"\\nEnter 1 if you would like to reserve any of these flights\\n\" +\n \"Enter any other number if you would like to restart your flight search: \");\nwhile(!scan.hasNextInt()){\nSystem.out.print(\"Invalid choice. Please enter a number: \");\nscan.next();\n}\nselection = scan.nextInt();\n\n\nif(selection == 1){\nSystem.out.print(\"\\nEnter the flight number you would like to book: \");\nflightNum = scan.next().toUpperCase();\n\nwhile(fullFlights.contains(flightNum)){\nSystem.out.print(\"\\n** Sorry, \" + flightNum + \" is full **\\n\" +\n\"Please enter another or enter 'q' to quit: \");\n\nflightNum = scan.next().toUpperCase();\n\nif(flightNum.equals(\"Q\")){\nSystem.out.println();\ndisplayMenu();\ncallSwitch();\n}\n\n}\n\nwhile(flightNumCheck == false){\nif(validFlightNums.contains(flightNum)){\nstmt = conn.createStatement();\n\nString fullName = custFirstName + \" \" + custLastName;\nString reserve = \"INSERT INTO reservations (customer_id, name, flight_no) VALUES(\" + custID +\n\", '\" + fullName + \"', '\" + flightNum + \"');\";\nString getReservations = \"SELECT reservation_no FROM reservations WHERE customer_id = \" + custID + \";\";\nString updateSeats = \"UPDATE flights \" +\n\"SET reserved_seats = reserved_seats + 1 \" +\n\"WHERE flight_no = '\" + flightNum + \"';\";\n\nstmt.executeUpdate(reserve);\n\nstmt = null;\n\nstmt = conn.createStatement();\t\nrs = stmt.executeQuery(getReservations);\n\nwhile(rs.next()){\nint res_no = rs.getInt(\"reservation_no\");\ncustReservations.add(res_no);\n}\n\nstmt = null;\nstmt = conn.createStatement();\nstmt.execute(updateSeats);\n\nSystem.out.println(\"\\n*******************************************************\\n\" +\n \"* You have successfully reserved a flight for \" + flightNum +\"! *\\n\" +\n \"*******************************************************\\n\\n\" +\n \"You will now be returned to the main menu.\\n\");\n\nflightNumCheck = true;\ndisplayMenu();\ncallSwitch();\n}\nelse{\nSystem.out.print(\"You have entered an invalid flight number. Please enter it again: \");\nflightNum = scan.next().toUpperCase();\n}\n}\n\n\n}\nelse{\nmenuChoice = 2;\ncallSwitch();\n}\t\n}catch (ClassNotFoundException e) {\n System.out.println(\"Driver not found\");\n }\n catch (SQLException e) {\n e.printStackTrace();\n }finally {\ntry { if (rs != null) rs.close(); } catch (SQLException e) { e.printStackTrace(); }\ntry { if (stmt != null) stmt.close(); } catch (SQLException e) { e.printStackTrace(); }\ntry { if (conn != null) conn.close(); } catch (SQLException e) { e.printStackTrace(); }\n}\n}",
"public static void sendElectionRequest()\n {\n System.out.println(\"INFO : Election initiated\");\n int numberOfFailedRequests = 0;\n for ( int key : ServerState.getInstance().getServers().keySet() ) {\n if( key > ServerState.getInstance().getSelfID() ){\n Server destServer = ServerState.getInstance().getServers().get(key);\n try {\n MessageTransfer.sendServer(\n ServerMessage.getElection( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent election request to s\"+destServer.getServerID());\n }\n catch(Exception e){\n System.out.println(\"WARN : Server s\"+destServer.getServerID() +\n \" has failed, cannot send election request\");\n numberOfFailedRequests++;\n }\n }\n\n }\n if (numberOfFailedRequests == ServerState.getInstance().getNumberOfServersWithHigherIds()) {\n if(!electionInProgress){\n //startTime=System.currentTimeMillis();\n electionInProgress = true;\n receivedOk = false;\n Runnable timer = new BullyAlgorithm(\"Timer\");\n new Thread(timer).start();\n }\n }\n }",
"FutureReservation createFutureReservation();",
"private void createReservations() {\n final String username = extractUsername();\n final EMail email = extractEMail();\n if (!isReserved(username) || !isReserved(email)) {\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n UsernameReservation usernameReservation = null;\n EMailReservation emailReservation = null;\n try {\n errorMessageJLabel.setText(getString(\"CheckingUsername\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel\n .getWidth(), errorMessageJLabel.getHeight());\n \n // get username reservation\n usernameReservation = createUsernameReservation(username);\n if (null == usernameReservation) {\n unacceptableUsername = username;\n } else {\n usernameReservations.put(username.toLowerCase(), usernameReservation);\n }\n \n // get email reservation\n emailReservation = createEMailReservation(email);\n if (null == emailReservation) {\n unacceptableEMail = email;\n } else {\n emailReservations.put(email, emailReservation);\n }\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n temporaryError = getSharedString(\"ErrorOffline\");\n } catch (final Throwable t) {\n logger.logError(t, \"An unexpected error has occured.\");\n temporaryError = getSharedString(\"ErrorUnexpected\");\n } finally {\n SwingUtil.setCursor(this, null);\n }\n validateInput();\n }\n }",
"public Reservation makeReservation(ReservationRequest request) {\n Reservation reservation = new Reservation(request.getStartDate(), request.getEndDate());\n\n SearchRequest search = new SearchRequest(request.getStartDate(), request.getEndDate());\n\n Map<RoomType, List<Room>> availableRooms = getAvailableRooms(search);\n\n Map<RoomType, Integer> roomsNeeded = request.getRoomsNeeded();\n\n // traverse reservation request on each room type it needs and do reservation preparation for\n // each room of current room type\n for (Map.Entry<RoomType, Integer> entry : roomsNeeded.entrySet()) {\n RoomType roomType = entry.getKey();\n Integer roomCount = entry.getValue();\n\n List<Room> rooms = availableRooms.get(roomType); // current roomType room list\n\n // current reservation cannot make due to insufficient rooms left\n // still put current search and its result into cache for future use\n if (roomCount > rooms.size()) {\n cache.put(search, availableRooms);\n try {\n throw new RoomNotEnoughException(\"The rooms for current type is not enough!\");\n } catch (RoomNotEnoughException e) {\n e.printStackTrace();\n }\n }\n\n // if rooms are enough\n // add the current roomType room into reservation room list\n for (int i = 0; i < roomCount; i++) {\n Room room = rooms.remove(0);\n reservation.getRooms().add(room);\n }\n\n // update available rooms info\n availableRooms.put(roomType, rooms);\n\n }\n // store most recent info of available rooms and search in the cache\n cache.put(search, availableRooms);\n\n // make reservation on each selected room\n for (Room room : reservation.getRooms()) {\n room.makeReservation(reservation.getStartDate(), reservation.getEndDate());\n }\n\n return reservation;\n }",
"public synchronized void reservation(Client client) {\n\t\t\n\t\tif(!this.reservations.containsKey(client.getGroupe())) {\n\t\t\tSystem.out.println(\"Demande de reservation par \" + client);\n\t\t\tthis.reserverPiste(client.getGroupe());\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(client + \"\" + client.getGroupe() + \"[piste deja reserver]\" + this.reservations.get(client.getGroupe()));\n\t\t}\n\t}",
"@Override\n public void run() {\n try {\n\n String response = \"\";\n String[] args = command[1].split(\"\\\\s+\");\n \n if (this.command[0].equals(\"purchase\")) {\n response = Server.purchase(args[0], args[1], args[2], args[3]);\n }\n else if (this.command[0].equals(\"cancel\")) {\n response = Server.cancel(args[0], args[1]);\n }\n else if (this.command[0].equals(\"search\")) {\n response = Server.search(args[0], args[1]);\n }\n else if (this.command[0].equals(\"list\")) {\n response = Server.list(args[0]);\n }\n /* else: raise custom exception */\n respond(String.format(\"%s\\n\", response.trim()));\n } catch (IOException e) {\n System.err.println(String.format(\"Request aborted: %s\", e));\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'DEAL_PNT_FEAT_LN_CMNT_TXT' field. | public java.lang.CharSequence getDEALPNTFEATLNCMNTTXT() {
return DEAL_PNT_FEAT_LN_CMNT_TXT;
} | [
"public java.lang.CharSequence getDEALPNTFEATLNCMNTTXT() {\n return DEAL_PNT_FEAT_LN_CMNT_TXT;\n }",
"public java.lang.CharSequence getPRPSLLNCMNTTXT() {\n return PRPSL_LN_CMNT_TXT;\n }",
"public java.lang.CharSequence getPRPSLLNCMNTTXT() {\n return PRPSL_LN_CMNT_TXT;\n }",
"public java.lang.CharSequence getPRPSLLNEXTRNLCMNTTXT() {\n return PRPSL_LN_EXTRNL_CMNT_TXT;\n }",
"public java.lang.CharSequence getPRPSLLNEXTRNLCMNTTXT() {\n return PRPSL_LN_EXTRNL_CMNT_TXT;\n }",
"public void setPRPSLLNCMNTTXT(java.lang.CharSequence value) {\n this.PRPSL_LN_CMNT_TXT = value;\n }",
"public void setPRPSLLNEXTRNLCMNTTXT(java.lang.CharSequence value) {\n this.PRPSL_LN_EXTRNL_CMNT_TXT = value;\n }",
"public org.LNDCDC_ADS_PRPSL.DEAL_PNT_FEAT_LN.apache.nifi.LNDCDC_ADS_PRPSL_DEAL_PNT_FEAT_LN.Builder setDEALPNTFEATLNCMNTTXT(java.lang.CharSequence value) {\n validate(fields()[9], value);\n this.DEAL_PNT_FEAT_LN_CMNT_TXT = value;\n fieldSetFlags()[9] = true;\n return this;\n }",
"public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder setPRPSLLNEXTRNLCMNTTXT(java.lang.CharSequence value) {\n validate(fields()[18], value);\n this.PRPSL_LN_EXTRNL_CMNT_TXT = value;\n fieldSetFlags()[18] = true;\n return this;\n }",
"public void setDEALPNTFEATLNCMNTTXT(java.lang.CharSequence value) {\n this.DEAL_PNT_FEAT_LN_CMNT_TXT = value;\n }",
"public java.lang.Long getPLCMNTCNSTRNTID() {\n return PLCMNT_CNSTRNT_ID;\n }",
"public boolean hasPRPSLLNCMNTTXT() {\n return fieldSetFlags()[17];\n }",
"public java.lang.Long getPLCMNTCNSTRNTID() {\n return PLCMNT_CNSTRNT_ID;\n }",
"public org.LNDCDC_ADS_PRPSL.DEAL_PNT_FEAT_LN.apache.nifi.LNDCDC_ADS_PRPSL_DEAL_PNT_FEAT_LN.Builder clearDEALPNTFEATLNCMNTTXT() {\n DEAL_PNT_FEAT_LN_CMNT_TXT = null;\n fieldSetFlags()[9] = false;\n return this;\n }",
"public java.lang.Long getDEALPNTFEATLNID() {\n return DEAL_PNT_FEAT_LN_ID;\n }",
"public java.lang.Long getDEALPNTFEATLNID() {\n return DEAL_PNT_FEAT_LN_ID;\n }",
"public boolean hasPRPSLLNEXTRNLCMNTTXT() {\n return fieldSetFlags()[18];\n }",
"public boolean hasDEALPNTFEATLNCMNTTXT() {\n return fieldSetFlags()[9];\n }",
"public java.lang.String getCnl() {\r\n return cnl;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a list of potential Relationship Types given a typeName and attempts to match the given targetType and originType to a Relationship Type in the list. | private void validateTypesByTypeByTypeName(Context c,
String targetType, String originType, String typeName, String originRow)
throws MetadataImportException {
try {
RelationshipType foundRelationshipType = null;
List<RelationshipType> relationshipTypeList = relationshipTypeService.
findByLeftwardOrRightwardTypeName(
c, typeName.split("\\.")[1]);
// Validate described relationship form the CSV.
foundRelationshipType = matchRelationshipType(relationshipTypeList, targetType, originType, typeName);
if (foundRelationshipType == null) {
relationValidationErrors.add("Error on CSV row " + originRow + ":" + "\n" +
"No Relationship type found for:\n" +
"Target type: " + targetType + "\n" +
"Origin referer type: " + originType + "\n" +
"with typeName: " + typeName + " for type: " + originType);
}
} catch (SQLException sqle) {
throw new MetadataImportException("Error interacting with database!", sqle);
}
} | [
"private RelationshipType matchRelationshipType(List<RelationshipType> relTypes,\n String targetType, String originType, String originTypeName) {\n return RelationshipUtils.matchRelationshipType(relTypes, targetType, originType, originTypeName);\n }",
"public List<String> findTypeOfRelationships(HashMap origin, String tag) {\n Vertex o = findVertex(origin, tag);\n if (o != null) {\n List<String> types = new ArrayList<>();\n for (Map.Entry<String, AVLTreeSet<Edge>> e : o.getEgress().entrySet())\n types.add(e.getKey());\n return types;\n }\n return null;\n }",
"RelationshipType createRelationshipType();",
"private void validateExpressedRelations(Context c) throws MetadataImportException {\n for (String targetUUID : entityRelationMap.keySet()) {\n String targetType = null;\n try {\n // Get the type of reference. Attempt lookup in processed map first before looking in archive.\n if (entityTypeMap.get(UUID.fromString(targetUUID)) != null) {\n targetType = entityTypeService.\n findByEntityType(c,\n entityTypeMap.get(UUID.fromString(targetUUID)))\n .getLabel();\n } else {\n // Target item may be archived; check there.\n // Add to errors if Realtionship.type cannot be derived\n Item targetItem = null;\n if (itemService.find(c, UUID.fromString(targetUUID)) != null) {\n targetItem = itemService.find(c, UUID.fromString(targetUUID));\n List<MetadataValue> relTypes = itemService.\n getMetadata(targetItem, \"dspace\", \"entity\",\n \"type\", Item.ANY);\n String relTypeValue = null;\n if (relTypes.size() > 0) {\n relTypeValue = relTypes.get(0).getValue();\n targetType = entityTypeService.findByEntityType(c, relTypeValue).getLabel();\n } else {\n relationValidationErrors.add(\"Cannot resolve Entity type for target UUID: \" +\n targetUUID);\n }\n } else {\n relationValidationErrors.add(\"Cannot resolve Entity type for target UUID: \" +\n targetUUID);\n }\n }\n if (targetType == null) {\n continue;\n }\n // Get typeNames for each origin referer of this target.\n for (String typeName : entityRelationMap.get(targetUUID).keySet()) {\n // Resolve Entity Type for each origin referer.\n for (String originRefererUUID : entityRelationMap.get(targetUUID).get(typeName)) {\n // Evaluate row number for origin referer.\n String originRow = \"N/A\";\n if (csvRowMap.containsValue(UUID.fromString(originRefererUUID))) {\n for (int key : csvRowMap.keySet()) {\n if (csvRowMap.get(key).toString().equalsIgnoreCase(originRefererUUID)) {\n originRow = key + \"\";\n break;\n }\n }\n }\n String originType = \"\";\n // Validate target type and origin type pairing with typeName or add to errors.\n // Attempt lookup in processed map first before looking in archive.\n if (entityTypeMap.get(UUID.fromString(originRefererUUID)) != null) {\n originType = entityTypeMap.get(UUID.fromString(originRefererUUID));\n validateTypesByTypeByTypeName(c, targetType, originType, typeName, originRow);\n } else {\n // Origin item may be archived; check there.\n // Add to errors if Realtionship.type cannot be derived.\n Item originItem = null;\n if (itemService.find(c, UUID.fromString(targetUUID)) != null) {\n DSpaceCSVLine dSpaceCSVLine = this.csv.getCSVLines()\n .get(Integer.valueOf(originRow) - 1);\n List<String> relTypes = dSpaceCSVLine.get(\"dspace.entity.type\");\n if (relTypes == null || relTypes.isEmpty()) {\n dSpaceCSVLine.get(\"dspace.entity.type[]\");\n }\n\n if (relTypes != null && relTypes.size() > 0) {\n String relTypeValue = relTypes.get(0);\n relTypeValue = StringUtils.remove(relTypeValue, \"\\\"\").trim();\n originType = entityTypeService.findByEntityType(c, relTypeValue).getLabel();\n validateTypesByTypeByTypeName(c, targetType, originType, typeName, originRow);\n } else {\n originItem = itemService.find(c, UUID.fromString(originRefererUUID));\n if (originItem != null) {\n List<MetadataValue> mdv = itemService.getMetadata(originItem,\n \"dspace\",\n \"entity\", \"type\",\n Item.ANY);\n if (!mdv.isEmpty()) {\n String relTypeValue = mdv.get(0).getValue();\n originType = entityTypeService.findByEntityType(c, relTypeValue).getLabel();\n validateTypesByTypeByTypeName(c, targetType, originType, typeName,\n originRow);\n } else {\n relationValidationErrors.add(\"Error on CSV row \" + originRow + \":\" + \"\\n\" +\n \"Cannot resolve Entity type for reference: \" + originRefererUUID);\n }\n } else {\n relationValidationErrors.add(\"Error on CSV row \" + originRow + \":\" + \"\\n\" +\n \"Cannot resolve Entity type for reference: \"\n + originRefererUUID);\n }\n }\n\n } else {\n relationValidationErrors.add(\"Error on CSV row \" + originRow + \":\" + \"\\n\" +\n \"Cannot resolve Entity type for reference: \"\n + originRefererUUID + \" in row: \" + originRow);\n }\n }\n }\n }\n\n } catch (SQLException sqle) {\n throw new MetadataImportException(\"Error interacting with database!\", sqle);\n }\n\n } // If relationValidationErrors is empty all described relationships are valid.\n if (!relationValidationErrors.isEmpty()) {\n StringBuilder errors = new StringBuilder();\n for (String error : relationValidationErrors) {\n errors.append(error + \"\\n\");\n }\n throw new MetadataImportException(\"Error validating relationships: \\n\" + errors);\n }\n }",
"private AbstractRelationshipType searchRelationshipType(final QName type) {\r\n final Queue<AbstractDefinitions> definitionsToLookTrough = new LinkedList<>();\r\n definitionsToLookTrough.add(this.definitions);\r\n while (!definitionsToLookTrough.isEmpty()) {\r\n final AbstractDefinitions definitions = definitionsToLookTrough.poll();\r\n if (definitions.getRelationshipType(type) != null) {\r\n return definitions.getRelationshipType(type);\r\n } else {\r\n definitionsToLookTrough.addAll(definitions.getImportedDefinitions());\r\n }\r\n }\r\n // FIXME: this is cleary an error in definitions, but no mechanism to\r\n // handle this right now, e.g. NoRelationshipTypeFoundException\r\n return null;\r\n }",
"protected abstract void visitRelationship(String type, Target target, boolean generic);",
"@Nonnull\n EntityRelationships getRelatedEntities(\n String rawUrn,\n List<String> relationshipTypes,\n RelationshipDirection direction,\n @Nullable Integer start,\n @Nullable Integer count,\n String actor);",
"public static AnnotationMirror buildAnnotationMirrorByTypeName(List<? extends AnnotationMirror> annotationMirrors, String typeName) {\n AnnotationMirror annotationMirror = null;\n for (Object mirror : annotationMirrors) {\n if (mirror instanceof AnnotationMirror) {\n AnnotationMirror compound = (AnnotationMirror) mirror;\n if (compound.getAnnotationType().toString().equals(typeName)) {\n annotationMirror = compound;\n break;\n }\n }\n }\n return annotationMirror;\n }",
"private void parseRelations(List<Notion> notions) {\r\n\t\tint rcount = 0;\r\n\t\tfor (Notion source : notions) {\r\n\t\t\t// Reading and creating relations\r\n\t\t\t// System.out.println(\"-> Source: \" + source);\r\n\t\t\tfor (IAttribute attrib : astahClassMap.get(source.getId()).getAttributes()) {\r\n\t\t\t\tIAssociation assoc = attrib.getAssociation();\r\n\t\t\t\tif (assoc != null) { // it is an Association, not an Attribute\r\n\t\t\t\t\tIClass asource = assoc.getMemberEnds()[0].getType();\r\n\t\t\t\t\t// Selecting only the relations where this concept is source (not target).\r\n\t\t\t\t\tif (asource.equals(astahClassMap.get(source.getId()))) {\r\n\t\t\t\t\t\tNotion target = initiative.getNotionById(attrib.getType().getId());\r\n\t\t\t\t\t\t// Creating the Relation object\r\n\t\t\t\t\t\tif (target != null) {\r\n\t\t\t\t\t\t\tRelation relation = new Relation(source, target, assoc);\r\n\t\t\t\t\t\t\tsource.addRelation(relation);\r\n\t\t\t\t\t\t\ttarget.addRelation(relation);\r\n\t\t\t\t\t\t\trcount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// It is an attribute\r\n\t\t\t\t\t// System.out.println(\"# Attribute: \" + attrib.getName());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\taddResult(rcount + \" relations parsed.\\n\");\r\n\t}",
"private void populateEntityRelationMap(String refUUID, String relationField, String originId) {\n HashMap<String, ArrayList<String>> typeNames = null;\n if (entityRelationMap.get(refUUID) == null) {\n typeNames = new HashMap<>();\n ArrayList<String> originIds = new ArrayList<>();\n originIds.add(originId);\n typeNames.put(relationField, originIds);\n entityRelationMap.put(refUUID, typeNames);\n } else {\n typeNames = entityRelationMap.get(refUUID);\n if (typeNames.get(relationField) == null) {\n ArrayList<String> originIds = new ArrayList<>();\n originIds.add(originId);\n typeNames.put(relationField, originIds);\n } else {\n ArrayList<String> originIds = typeNames.get(relationField);\n originIds.add(originId);\n typeNames.put(relationField, originIds);\n }\n entityRelationMap.put(refUUID, typeNames);\n }\n }",
"private List<QName> getConvertibleTypeNames(final List<QName> typeNames) {\n final List<QName> result = new ArrayList<>();\n for (QName typeName : typeNames) {\n if (typeName.equals(RECORD_QNAME) && !result.contains(METADATA_QNAME)) {\n result.add(METADATA_QNAME);\n }\n result.add(typeName);\n }\n return result;\n }",
"public ArrayList<ClassRelationship> getClassRelationships(QueryType qType, String arg1, String arg2, boolean strictMatch) throws Exception\n {\n String matchOperator = \"=\";\n \n if (!strictMatch)\n {\n matchOperator = \"LIKE\";\n }\n \n // The query is complicated because we need to join the definitions table 3 times to get\n // all 3 relationship strings (from, relationship, to).\n String queryString = \"SELECT \" + // This is the outer table (relationship)\n \"stringTbl.fromString, \" +\n \"relationTbl.sty_rl AS relation, \" +\n \"stringTbl.toString, \" +\n \"stringTbl.fromId, \" +\n \"stringTbl.relationId, \" +\n \"stringTbl.toId, \" +\n \"stringTbl.fromDefinition, \" +\n \"stringTbl.toDefinition \" +\n \"FROM \" + // This is the middle table (to)\n \"( \" +\n \"SELECT fromTbl.fromId, \" +\n \"fromTbl.fromString, \" +\n \"fromTbl.fromDefinition, \" +\n \"fromTbl.relationId, \" +\n \"fromTbl.toId, \" +\n \"toTbl.sty_rl AS toString, \" +\n \"toTbl.def AS toDefinition \" +\n \"FROM \" + \n \"( \" + // This is the inner table (from)\n \"SELECT rel.ui_sty1 AS fromId, \" +\n \"def1.sty_rl AS fromString, \" +\n \"def1.def AS fromDefinition, \" +\n \"rel.ui_rl AS relationId, \" +\n \"rel.ui_sty2 AS toId \" +\n \"FROM srstre1 AS rel \" +\n \"INNER JOIN srdef AS def1 ON rel.ui_sty1 = def1.ui \" +\n \") \" +\n \"AS fromTbl \" +\n \"INNER JOIN srdef AS toTbl ON fromTbl.toId = toTbl.ui \" +\n \") \" +\n \"AS stringTbl \" +\n \"INNER JOIN srdef AS relationTbl ON stringTbl.relationId = relationTbl.ui \";\n\n switch (qType)\n {\n // Here we're looking for all of the verb-noun relationships that match a noun term.\n case NOUN:\n \n queryString += \"WHERE fromString \" + matchOperator + \" '\" + arg1 + \"' \" +\n \"OR toString \" + matchOperator + \" '\" + arg1 + \"' \";\n break;\n\n // Here we're looking for all of the verbs that relate to 2 noun terms.\n case NOUN_NOUN: \n queryString += \"WHERE (fromString \" + matchOperator + \" '\" + arg1 + \"' AND toString \" + matchOperator + \" '\" + arg2 + \"') \" +\n \t\t \"OR (toString \" + matchOperator + \" '\" + arg1 + \"' AND fromString \" + matchOperator + \" '\" + arg2 + \"')\";\n\n break;\n\n // Here we're looking for all of the nouns that are related to a noun-verb relationship.\n case NOUN_VERB:\n queryString += \"WHERE sty_rl \" + matchOperator + \" '\" + arg2 + \"' \" + \n \"AND (fromString \" + matchOperator + \" '\" + arg1 + \"' OR toString \" + matchOperator + \" '\" + arg1 + \"') \";\n\n break;\n\n // The synonym case is not related to class queries \n case NOUN_SYNONYM:\n LogUtil.traceLog(1, \"Synonyms are not supported for class queries:\" + qType);\n \n throw new Exception(\"Synonyms are not supported for class queries:\" + qType);\n \n \n default:\n LogUtil.traceLog(1, \"Unexpected QueryType of:\" + qType);\n \n throw new Exception(\"Unexpected QueryType of:\" + qType);\n }\n\n // Order the results\n queryString += \"ORDER BY stringTbl.fromString, relationTbl.sty_rl, stringTbl.toString\";\n \n // Get the term relationships\n ArrayList<ClassRelationship> myRelationships = this.queryClassRelationships(queryString);\n \n return myRelationships;\n }",
"public boolean relationshipToTyped(String rel_str) {\n StringTokenizer st = new StringTokenizer(rel_str, BundlesDT.DELIM);\n String fm_hdr = Utils.decFmURL(st.nextToken()), fm_ico = Utils.decFmURL(st.nextToken()); boolean fm_typed = st.nextToken().toLowerCase().equals(\"true\");\n String to_hdr = Utils.decFmURL(st.nextToken()), to_ico = Utils.decFmURL(st.nextToken()); boolean to_typed = st.nextToken().toLowerCase().equals(\"true\");\n String style = Utils.decFmURL(st.nextToken()); return to_typed; }",
"public FactType addObjectType(String typeName, List<String> constants,\r\n List<SubstitutionType> types, List<String> roleNames,\r\n List<Integer> roleNumbers, Source source)\r\n throws MismatchException, ChangeNotAllowedException, DuplicateException {\r\n\r\n String nameWithCapital = Naming.restyleWithCapital(typeName);\r\n if (!Naming.isTypeName(nameWithCapital)) {\r\n throw new RuntimeException(\"name doesn't satisfy rules of a type name\");\r\n }\r\n FactType.checkRoleNames(roleNames);\r\n FactType ft = getFactType(typeName);\r\n if (ft == null) {\r\n if (constants == null) { // abstract objecttype\r\n ft = new FactType(nameWithCapital, true, this, null);\r\n } else if (constants.size() == 1) { // singleton objecttype\r\n ft = new FactType(nameWithCapital, constants.get(0), this, null);\r\n } else { // normal objecttype\r\n ft = new FactType(nameWithCapital, constants, types, roleNames,\r\n true, this, null);\r\n }\r\n this.typeRepository.putFactType(ft);\r\n publisher.inform(this, \"newType\", null, ft);\r\n\r\n } else {\r\n // facttype with given name is already registered at the objectmodel\r\n ft.checkMatch(types, roleNames, false);\r\n if (ft.isObjectType()) {\r\n ft.getObjectType().getOTE().matches(constants);\r\n } else {\r\n ft.objectify(constants, roleNumbers);\r\n }\r\n }\r\n // fireListChanged();\r\n\r\n return ft;\r\n }",
"private void addRelationship(Context c, Item item, String typeName, String value)\n throws SQLException, AuthorizeException, MetadataImportException {\n if (value.isEmpty()) {\n return;\n }\n boolean left = false;\n\n // Get entity from target reference\n Entity relationEntity = getEntity(c, value);\n // Get relationship type of entity and item\n String relationEntityRelationshipType = itemService.getMetadata(relationEntity.getItem(),\n \"dspace\", \"entity\",\n \"type\", Item.ANY).get(0).getValue();\n String itemRelationshipType = itemService.getMetadata(item, \"dspace\", \"entity\",\n \"type\", Item.ANY).get(0).getValue();\n\n // Get the correct RelationshipType based on typeName\n List<RelationshipType> relType = relationshipTypeService.findByLeftwardOrRightwardTypeName(c, typeName);\n RelationshipType foundRelationshipType = matchRelationshipType(relType,\n relationEntityRelationshipType,\n itemRelationshipType, typeName);\n\n if (foundRelationshipType == null) {\n throw new MetadataImportException(\"Error on CSV row \" + rowCount + \":\" + \"\\n\" +\n \"No Relationship type found for:\\n\" +\n \"Target type: \" + relationEntityRelationshipType + \"\\n\" +\n \"Origin referer type: \" + itemRelationshipType + \"\\n\" +\n \"with typeName: \" + typeName);\n }\n\n if (foundRelationshipType.getLeftwardType().equalsIgnoreCase(typeName)) {\n left = true;\n }\n\n // Placeholder items for relation placing\n Item leftItem = null;\n Item rightItem = null;\n if (left) {\n leftItem = item;\n rightItem = relationEntity.getItem();\n } else {\n leftItem = relationEntity.getItem();\n rightItem = item;\n }\n\n // Create the relationship, appending to the end\n Relationship persistedRelationship = relationshipService.create(\n c, leftItem, rightItem, foundRelationshipType, -1, -1\n );\n relationshipService.update(c, persistedRelationship);\n }",
"private NodeRef getParentByType(final NodeRef currentNode, final QName targetType){\r\n\t\t// consider managing a cache of noderef-to-noderef relations per QName\r\n\t\t\r\n\t\tlogger.debug(\"Enter getParentByType\");\r\n\t\tNodeRef returnNode = null;\r\n\t\t \r\n\t\tif (currentNode!=null){\r\n\t\t\r\n\t\t\treturnNode = AuthenticationUtil.runAs(new RunAsWork<NodeRef>() {\r\n\t\t\t\tpublic NodeRef doWork() throws Exception {\r\n\t\t\t\t\t\r\n\t\t\t\t\tNodeRef rootNode = nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);\r\n\t\t\t\t\t\r\n\t\t\t\t\tlogger.debug(\"getParentByType: rootNode=\"+rootNode);\r\n\t\t\t\t\tlogger.debug(\"getParentByType: nodeRef=\"+currentNode);\r\n\t\t\t\t\t\r\n\t\t\t\t\tNodeRef returnNode = null;\r\n\t\t\t\t\tNodeRef loopRef = currentNode;\r\n\t\t\t\t\tboolean siteTypeFound = false;\r\n\t\t\t\t\twhile ( !loopRef.equals(rootNode) && !siteTypeFound){\r\n\t\t\t\t\t\t//logger.debug(\"getTypeForNode: voor loopRef=\"+loopRef);\r\n\t\t\t\t\t\tloopRef = nodeService.getPrimaryParent(loopRef).getParentRef();\r\n\t\t\t\t\t\t//logger.debug(\"getTypeForNode: na loopRef=\"+loopRef);\r\n\t\t\t\t\t\tsiteTypeFound = nodeService.getType(loopRef).equals(targetType);\r\n\t\t\t\t\t\tif (siteTypeFound){\r\n\t\t\t\t\t\t\treturnNode = loopRef;\r\n\t\t\t\t\t\t\tlogger.debug(\"getParentByType: Found QName node!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn returnNode;\r\n\t\t\t\t} // end do work\r\n\t\t\t}, AuthenticationUtil.getSystemUserName());\r\n\t\t \r\n\t\t} // end if nodeRef!=null\r\n\t\tlogger.debug(\"Exit getParentByType: \" + returnNode);\r\n\t\treturn returnNode;\r\n }",
"private String resolveRawTypeName(String typeName) {\n\t\tif (typeName == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tboolean isArray = typeName.startsWith(StringPool.LEFT_SQ_BRACKET);\n\t\tif (isArray) {\n\t\t\ttypeName = typeName.substring(1);\n\t\t}\n\n\t\tString rawTypeName;\n\n\t\tif (generics.containsKey(typeName)) {\n\t\t\trawTypeName = generics.get(typeName);\n\t\t}\n\t\telse {\n\t\t\trawTypeName = targetClassInfo.getGenerics().getOrDefault(typeName, typeName);\n\t\t}\n\n\t\tif (isArray) {\n\t\t\trawTypeName = '[' + rawTypeName;\n\t\t}\n\n\t\treturn rawTypeName;\n\t}",
"Collection<PropertyType> getTargetPropertyTypes(String target);",
"private boolean updateTypeList(String typeName) throws SQLException {\n // if meal not added into database\n if (!typeObservableList.contains(typeName) &&\n !typeName.equalsIgnoreCase(\"NA\") &&\n !typeName.equals(\"\")) {\n facadeDAO.createType(new Type(typeName));\n typeList = facadeDAO.findAllType();\n typeObservableList.add(typeName);\n }\n return true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all the field values in the given test object with their corresponding field names. | protected Map<Object, String> getFieldValuesAndNames(Object testedObject) {
Map<Object, String> result = new IdentityHashMap<Object, String>();
if (testedObject == null) {
return result;
}
Set<Field> fields = getAllFields(testedObject.getClass());
for (Field field : fields) {
Object value = getFieldValue(testedObject, field);
if (value != null) {
result.put(value, field.getName());
}
}
return result;
} | [
"java.lang.String getFields();",
"Map<String, String> getFields();",
"public List<PropertyField> getFields(String key);",
"private static <T> Field[] getFieldsObject(T object) {\n\t\treturn object.getClass().getDeclaredFields();\n\t}",
"java.util.List<edu.stanford.slac.archiverappliance.PB.EPICSEvent.FieldValue> \n getFieldvaluesList();",
"Expression<?, ?>[] getResultFields();",
"private Field[] getFields(Object obj) {\n Class<?> object = obj.getClass();\n\n Field[] fields = object.getDeclaredFields();\n for (Field field : fields) {\n field.setAccessible(true);\n }\n return fields;\n }",
"java.util.List<com.google.cloud.dataplex.v1.DataProfileResult.Profile.Field> getFieldsList();",
"java.util.List<org.zenoss.zing.proto.model.TypedEntityRecord.Field> \n getFieldsList();",
"private static String[] getAllFieldNamesFromObject(Object object) {\n\n\t\tMap<String, Field> allFields = ObjectManager.getAllFields(\n\t\t\t\tobject.getClass(), false);\n\t\tString[] keys = allFields.keySet().toArray(new String[0]);\n\t\tArrays.sort(keys);\n\t\treturn keys;\n\t}",
"DatabaseField[] getFields();",
"private static Field[] retrieveAllFields(final Object object) {\r\n\t\tField[] fieldsArray = null;\r\n\r\n\t\t// - Retrieve fields array from cache if exists.\r\n\t\tif (KerAnnotation.fieldsCache.containsKey(object.getClass())) {\r\n\t\t\tfieldsArray = KerAnnotation.fieldsCache.get(object.getClass());\r\n\t\t}\r\n\t\t// - Else get fields and cache them.\r\n\t\telse {\r\n\t\t\t// - Aggregate all annotated fields (declared, inherited, etc.).\r\n\t\t\tfinal Set<Field> fields = new HashSet<Field>();\r\n\r\n\t\t\tfor (final Field field : object.getClass().getFields()) {\r\n\t\t\t\tif (field.getAnnotations().length > 0) {\r\n\t\t\t\t\tfields.add(field);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (final Field field : object.getClass().getDeclaredFields()) {\r\n\t\t\t\tif (field.getAnnotations().length > 0) {\r\n\t\t\t\t\tfields.add(field);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// - Convert set to array.\r\n\t\t\tfieldsArray = fields.toArray(new Field[0]);\r\n\r\n\t\t\t// - Cache array.\r\n\t\t\tKerAnnotation.fieldsCache.put(object.getClass(), fieldsArray);\r\n\t\t}\r\n\r\n\t\treturn fieldsArray;\r\n\t}",
"public static Set<Field> getAllInstanceFields(Object object) {\n return findAllFieldsUsingStrategy(new AllFieldsMatcherStrategy(), object, true, true,\n getUnproxyType(object));\n }",
"public List<VariableElement> getFields(TypeElement te) {\n return getDocumentedItems(te, FIELD, VariableElement.class);\n }",
"com.sagas.meta.model.MetaFieldData getFields(int index);",
"@Test\n public void testGetFieldValue() {\n NameValueMap instance = new NameValueMap();\n instance.setFieldValue(\"fld1\", \"string value\");\n instance.setFieldValue(\"fld2\", 2);\n instance.setFieldValue(\"fld3\", 2.4);\n instance.setFieldValue(\"fld4\", 2.4);\n\n Object val = instance.getFieldValue(\"fld1\");\n assertNotNull(val);\n assertTrue(val instanceof String);\n assertEquals((String) val, \"string value\");\n\n val = instance.getFieldValue(\"Fld2\");\n assertNotNull(val);\n assertTrue(val instanceof Integer);\n int nval = (Integer) val;\n assertEquals(nval, 2);\n\n val = instance.getFieldValue(\"fld3\");\n assertNotNull(val);\n assertTrue(val instanceof Double);\n double dval = (Double) val;\n assertTrue(dval == 2.4);\n\n val = instance.getFieldValue(\"fld4\");\n assertNotNull(val);\n assertTrue(val instanceof Double);\n dval = (Double) val;\n assertTrue(dval == 2.4);\n\n val = instance.getFieldValue(\"fld5\");\n assertNull(val);\n }",
"public void testFields()\n {\n TestUtils.testNoAddedFields(getTestedClass(), null);\n }",
"public static List<Field> getFields(Object target) {\n return getFields(target == null ? null : target.getClass());\n }",
"edu.stanford.slac.archiverappliance.PB.EPICSEvent.FieldValue getFieldvalues(int index);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setPersonalDetail method. | @Test
public void testSetPersonalDetail() {
instance.setPersonalDetail(personalDetail4);
assertEquals(personalDetail4, instance.getPersonalDetail());
} | [
"@Test\r\n public void testGetPersonalDetail() {\r\n\r\n assertEquals(personalDetail, instance.getPersonalDetail());\r\n assertNull(instance15.getPersonalDetail());\r\n assertNull(instance16.getPersonalDetail());\r\n assertEquals(personalDetail, instance17.getPersonalDetail());\r\n assertNull(instance18.getPersonalDetail());\r\n }",
"@Test\r\n public void testSetPersonalDetails() {\r\n System.out.println(\"setPersonalDetails\");\r\n Set<PersonalDetailPojo> personalDetails = null;\r\n TelephonePojo instance = new TelephonePojo();\r\n instance.setPersonalDetails(personalDetails);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Test\r\n public void testGetPersonalDetails() {\r\n System.out.println(\"getPersonalDetails\");\r\n TelephonePojo instance = new TelephonePojo();\r\n Set<PersonalDetailPojo> expResult = null;\r\n Set<PersonalDetailPojo> result = instance.getPersonalDetails();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"public void setPersonalDetails(PersonalDetails details)\n\t{\n\t\taccountInformation = details;\n\t}",
"public void setPersonal(boolean value) {\n this.personal = value;\n }",
"@Test\n\tpublic void testEqualsPersonalData() {\n\t\tSystem.out.println(\"starting testEqualsPersonalData()\");\n\t\tPersonalData personalData1 = new PersonalData(\"Kelvin\", \"Huynh\", \"4081234567\", \"Kelvin_Huynh@email.com\");\n\t\tPersonalData personalData2 = new PersonalData(\"Kelvin\", \"Huynh\", \"4081234567\", \"Kelvin_Huynh@email.com\");\n\t\tassertTrue (\"personalData1 equals personalData2\", personalData1.equals(personalData2));\n\t System.out.println(\"testEqualsPersonalData PASSED\");\t\t\n\t}",
"public void fillUserPersonalInfo() {\n logger.writeLog(\"INFO\",\"Entering personal info\");\n ExplicitWaitUtils explicitWaitUtils=new ExplicitWaitUtils(driver);\n explicitWaitUtils.waitForVisibilityOfElement(AutomationPracticePageModel.getRdBtnMr());\n AutomationPracticePageModel.getRdBtnMr().click();\n AutomationPracticePageModel.getTxtBoxFirstName().sendKeys(properties.getProperty(\"FirstName\"));\n AutomationPracticePageModel.getTxtBoxLastName().sendKeys(properties.getProperty(\"LastName\"));\n AutomationPracticePageModel.getTxtBoxPassword().sendKeys(properties.getProperty(\"Password\"));\n PASSWORD = AutomationPracticePageModel.getTxtBoxPassword().getAttribute(\"value\");\n Select select = new Select(AutomationPracticePageModel.getDrpDwnDays());\n select.selectByIndex(3);\n select = new Select(AutomationPracticePageModel.getDrpDwnMonths());\n select.selectByIndex(3);\n select = new Select(AutomationPracticePageModel.getDrpDwnYears());\n select.selectByIndex(3);\n }",
"public void setDetail(String detail) {\r\n this.detail = detail;\r\n }",
"public void setDetail(String detail) {\n this.detail = detail;\n }",
"@Test\r\n public void testSetPermissionToStoreDetail() {\r\n System.out.println(\"setPermissionToStoreDetail\");\r\n Boolean permissionToStoreDetail = null;\r\n Referee instance = new Referee();\r\n instance.setPermissionToStoreDetail(permissionToStoreDetail);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Test \n\tpublic void testSetBusinessinformation() {\n\t\tBusinessInformation businessInformation = new BusinessInformation();\n\t\tbusinessInformation.setName(INFO_NAME);\n\t\tAdminAccount user = adminAccountService.setBusinessInformation(INFO_NAME, USERNAME1);\n\t\tassertNotNull(user);\n\t\tassertEquals(user.getUsername(), USERNAME1);\n\t}",
"@Test\n void setTest() {\n testAddressBook.add(testPerson);\n testAddressBook.set(0, testPerson2);\n List<Person> persons = testAddressBook.getList();\n\n Mockito.verify(testAddressBook).set(anyInt(), any(Person.class));\n Mockito.verify(persons).set(anyInt(), any(Person.class));\n Mockito.verify(testAddressBook).fireTableRowsUpdated(anyInt(), anyInt());\n }",
"public PersonalInfo getPersonalInfo() {\n\n return personalInfo;\n }",
"@Test(dataProvider = \"JoinerData\",dependsOnMethods ={\"clicnNewJoinerButton\"}) \r\npublic void setupPersonalSection(String firstname,String lastname,String email,String username,String activateLicense,String jobtitle,String employmentStatus,String manager,String startDate,String contineousServiceDate,String addr1,String postcode,String city,String addrCountry,String addrType,String nextOfKin,String emregencyContact,String regularPay,String regularPeriod) throws Throwable{\n\t\tboolean setupNewJoinerDisplayed = joiner.verifyJoinerFirstPage();\r\n\t\tlog.info(\"setup joiner text is displayed ====\"+setupNewJoinerDisplayed);\r\n\t\tAssert.assertEquals(setupNewJoinerDisplayed, true);\r\n\t\t\r\n\t\tif(setupNewJoinerDisplayed){\r\n\t\t\r\n\t\t\tjoiner.setupPersonalSectionOfJoinerFirstPage(firstname,lastname,email,username,activateLicense,jobtitle,employmentStatus,manager,startDate,contineousServiceDate,addr1,postcode,city,addrCountry,addrType,nextOfKin,emregencyContact,regularPay,regularPeriod);\r\n\t\t}\r\n\t\t\r\n\t\tendTest();\r\n\t\t\r\n\t}",
"@Test\r\n public void testSetMarritalstatus() {\r\n System.out.println(\"setMarritalstatus\");\r\n String marritalstatus = null;\r\n Interviewee instance = new Interviewee();\r\n instance.setMarritalstatus(marritalstatus);\r\n // TODO review the generated test code and remove the default call to fail.\r\n \r\n }",
"@Test\r\n public void testRetrieve() {\r\n\r\n PaymentDetailPojo expResult = instance.save(paymentDetail1);\r\n assertEquals(expResult, instance.retrieve(paymentDetail1));\r\n }",
"private void isUserDetailsModified() {\n\n\t\tif (currentDetails != null) {\n\t\t\tif (currentDetails.getFirstName() != null\n\t\t\t\t\t&& !currentDetails.getFirstName().equalsIgnoreCase(\n\t\t\t\t\t\t\tdetailDisplay.getFirstName().getValue())) {\n\t\t\t\tisPersonalInfoModified = true;\n\t\t\t} else if (currentDetails.getLastName() != null\n\t\t\t\t\t&& !currentDetails.getLastName().equalsIgnoreCase(\n\t\t\t\t\t\t\tdetailDisplay.getLastName().getValue())) {\n\t\t\t\tisPersonalInfoModified = true;\n\t\t\t} else if (currentDetails.getMiddleInitial() != null\n\t\t\t\t\t&& !currentDetails.getMiddleInitial().equalsIgnoreCase(\n\t\t\t\t\t\t\tdetailDisplay.getMiddleInitial().getValue())) {\n\t\t\t\tisPersonalInfoModified = true;\n\t\t\t} else if (currentDetails.getTitle() != null\n\t\t\t\t\t&& !currentDetails.getTitle().equalsIgnoreCase(\n\t\t\t\t\t\t\tdetailDisplay.getTitle().getValue())) {\n\t\t\t\tisPersonalInfoModified = true;\n\t\t\t} else if (currentDetails.getEmailAddress() != null\n\t\t\t\t\t&& !currentDetails.getEmailAddress().equalsIgnoreCase(\n\t\t\t\t\t\t\tdetailDisplay.getEmailAddress().getValue())) {\n\t\t\t\tisPersonalInfoModified = true;\n\t\t\t} else if (currentDetails.getPhoneNumber() != null\n\t\t\t\t\t&& !currentDetails.getPhoneNumber().equalsIgnoreCase(\n\t\t\t\t\t\t\tdetailDisplay.getPhoneNumber().getValue())) {\n\t\t\t\tisPersonalInfoModified = true;\n\t\t\t}\n\t\t}\n\t}",
"public void testGetSetOwner() {\n exp = new Experiment(\"10\");\n Profile owner = new Profile(\"id1\", \"owner\", \"contact\");\n exp.setOwner(owner);\n assertEquals(\"get/setOwner does not work\", \"owner\", exp.getOwner().getUsername());\n }",
"@Test\n public void testSetBio() {\n System.out.println(\"Setting biography\");\n String bio = \"Women\";\n user4.setBio(bio);\n assertEquals(\"Biography should not be null\", bio, user4.getBio());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the designated parameter to a Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database. | public void setInt(int parameterIndex, int x) throws java.sql.SQLException {
wrappedStatement.setInt(parameterIndex, x);
saveQueryParamValue(parameterIndex, new Integer(x));
} | [
"void setInt(int parameterIndex, int x) throws SQLException;",
"public void setInt(int parameterIndex, int x) throws SQLException {\n currentPreparedStatement.setInt(parameterIndex, x);\n\n }",
"public void setInt(String name, Integer value) {\n parameters.get(name).setValue(value);\n }",
"public void setInt(String name, int value);",
"public void setValue(int intValue);",
"public void setInteger(int value) {\n }",
"public void setIntegerValue(Integer value) {\r\n setTypeInteger(PROPERTY_IntegerValue , value);\r\n }",
"public native void setInteger(int aInteger);",
"public void setInt(String property, int value);",
"void setLong(int parameterIndex, long x) throws SQLException;",
"void setAsNumber(int asNumber);",
"void setInt(int attributeValue);",
"void setIntProperty(String name, int value);",
"public void setParamValue(int i, Object value);",
"private static void setValueInt(int value)\n {\n Util.valueInt = value;\n }",
"@OfMethod({\"setInt(java.lang.String,int)\", \"setInt(int,int)\"})\n public void testSetInt() throws Exception {\n CallableStatement instance = newClosedCall();\n\n try {\n instance.setInt(getParameterName(), 0);\n fail(\"Allowed set int by parameter name after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setInt(getParameterIndex(), 0);\n fail(\"Allowed set int by parameter index after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n }",
"public Parameter(int param) {\n setParameter(String.valueOf(param));\n }",
"private IntParam newIntParam (Object value, ColumnInfo colInfo)\n {\n IntParam param;\n \tif (colInfo == null)\n \t\treturn null;\n \t\n if (value != null)\n param = new IntParam (value.toString (),\n colInfo.getName(),\n colInfo.getUCD(),\n colInfo.getUnitString());\n else\n param = new IntParam (SedConstants.DEFAULT_STRING,\n colInfo.getName(),\n colInfo.getUCD(),\n colInfo.getUnitString());\n\n return param;\n }",
"public static void\tset(IntPar par, int val)\n\t{ if (par != NULL) par.value = val; }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a node into a specyfic father, return the number of the new child, if the number is less that zero, then any child has been added. | public int addChild(DefaultMutableTreeNode father, DefaultMutableTreeNode child){
if( (father==null)||(child==null))
return -1;
int count = father.getChildCount();
mModel.insertNodeInto(child, father, count);
return count;
} | [
"public void setfather(Person f) {\r\n\tif (this.father() != null) {\r\n\t\tPerson a= this.father();\r\n\t\ta.setnumChildren(a.numChildren()-1);\r\n\t}\r\n\tfather= f;\r\n\tf.setnumChildren(f.numChildren()+1);\r\n}",
"int getChildCount();",
"@Override\r\n public int attachChild(Spatial child) {\r\n childrenToAdd.add(child);\r\n Logger.outputToGUI(Logger.Type.DEBUG, \"Child \" + child.getName() + \" added to node \" + this.getName());\r\n return children.size() + childrenToAdd.size();\r\n }",
"private int getNextIndex(int fatherId) throws SQLException {\n \t\t// count the children of the category with id = fatherId and return the index for the next child to add\n \t\tint count = 0;\n \t\ttry {\n \t\t\tPreparedStatement pstatement = connection.prepareStatement(\"SELECT * FROM category WHERE father_id = ?\");\n \t\t\tpstatement.setInt(1, fatherId);\n \t\t\tResultSet result = pstatement.executeQuery();\n\t\t\twhile (result.next()) {\n\t\t\t\tcount++;\n\t\t\t}\n \t\t} catch (SQLException e) {\n \t\t\tthrow new SQLException(e);\n \t\t}\n \t\treturn count;\n \t}",
"public int getFather() {\n\t\treturn father;\n\t}",
"public int attachChild(Spatial child) {\n if (child == null) { return children.size(); }\n if (!children.contains(child)) {\n child.setParent(this);\n children.add(child);\n child.setForceCull(forceCull);\n child.setForceView(forceView);\n }\n LoggingSystem.getLogger().log(\n Level.INFO,\n \"Child (\" + child.getName() + \") attached to this\" + \" node (\"\n + name + \")\");\n \n return children.size();\n }",
"public int childCount() {\n return node.getChildren().size();\n }",
"public int getChildCount(Object parent)\n {\n return((Node)parent).populateChildren(m_fileSystemView);\n }",
"public int getChildCount(Object parent);",
"public void addChild()\r\n {\r\n children++; // Adding a child to the ticket.\r\n }",
"public GNode addNewChild() {\r\n\t\treturn null;\r\n\t}",
"public abstract int getUnhardenedChildNum(int index);",
"public int getNumChildren(){\n return numChildren;\n }",
"@Override\n public void incrementMandatoryChildCount() {\n }",
"public int getNoOfChildren()\r\n\t{\r\n\t\tif (this.getChild() == null) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tassert this.getChild().getNodes().size() > 0;\r\n\t\t\treturn this.getChild().getNodes().size();\r\n\t\t}\r\n\t}",
"public void setnumChildren(int nc) {\r\n\tchildren= nc;\r\n}",
"void insertChild(Node c, int pos);",
"@VTID(25)\n\tint fatherID();",
"void insertChild( int position, N root ) ;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
to get how many songs are there | public int getSongCount() {
return mSongs.size();
} | [
"public int getNumberOfSongs()\n {\n return songs.size();\n }",
"public int getNumberOfSongs() {\n return numberOfSongs;\n }",
"public int size()\n\t{\n\t\treturn numOfSongs;\n\t}",
"public int numberOfSongs(){\n\t\tint i = 0;\n\t\tfor(Playable ele : this.playableList){\n\t\t\tif(ele instanceof Song){\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tif(ele instanceof PlayList){ \n\t\t\t\tPlayList pl = (PlayList) ele;\n\t\t\t\ti += pl.getPlayableList().size();\n\t\t\t}\n\t\t}\n\t\treturn i;\n\t}",
"public int getSongLength();",
"int songLength();",
"int getTimesPlayed (String song_id);",
"public int getLength() {\n return songs.size();\n }",
"int getTrackCount();",
"public int getSharedSongs(){\n\t\treturn sharedSongs;\n\t}",
"@Override\r\n public int totalTrackCount() {\r\n\r\n return this.number_of_tracks;\r\n }",
"int getPlayEndTrackersCount();",
"public int size() {\n\t\treturn plays.size();\n\t}",
"public int getPlaylistCount()\r\n\t{\r\n\t\treturn this.playlistItems.size();\r\n\t}",
"int getPlayTimeTrackersCount();",
"@RequestMapping(value = \"/count\", method = RequestMethod.GET)\n int getSongCount() {\n String message = messageSource.getMessage(\"song.count\", null,\"locale not found\", Locale.getDefault());\n logger.info(message);\n return songService.getCount();\n }",
"public int getNumberOfWordsInSongs() throws SQLException{\n int count = 0;\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT COUNT(*) \"\n + \"AS number_of_words_in_songs\\n\" +\n \"FROM words_in_songs\");\n while (rs.next()) {\n count = rs.getInt(\"number_of_words_in_songs\");\n }\n\n return count;\n }",
"public int getNumPlays()\n\t{\n\t\treturn numPlays;\n\t}",
"void addSongLength();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new TSRowKeyToTSUID | public TSRowKeyToTSUID() {
super(PVarchar.INSTANCE, "TSUID");
} | [
"public TSRowKeyToBytes() {\n\t\t\tsuper(PVarbinary.INSTANCE, \"TSUIDBYTES\");\n\t\t}",
"public TSRowKeyToTSUID(final List<Expression> children) {\n\t\t\tsuper(PVarchar.INSTANCE, \"TSUID\", children);\n\t\t}",
"java.lang.String getNewKeyUid();",
"PrimaryKey createPrimaryKey();",
"public abstract EntityId fromKijiRowKey(byte[] kijiRowKey);",
"public abstract String generateFirstRowKey(final long id);",
"KeyIdPair createKeyIdPair();",
"private Key newResultKey(final Entry<Key,Document> from) {\n final Key key = from.getKey();\n final Text row = key.getRow();\n final Text cf = key.getColumnFamily();\n final Text cq = key.getColumnQualifier();\n final Text visibility = key.getColumnVisibility();\n long timestamp = from.getValue().getTimestamp();\n return new Key(row, cf, cq, visibility, timestamp);\n }",
"public TransRecordKey(java.sql.Timestamp transID) {\n\t\tthis.transID = transID;\n\t}",
"java.lang.String getKeyUid();",
"private Key newDocumentKey(final Key fieldKey, long timestamp) {\n final Text row = fieldKey.getRow();\n final Text cf = fieldKey.getColumnFamily();\n final Text cq = new Text();\n final Text visibility = new Text();\n return new Key(row, cf, cq, visibility, timestamp);\n }",
"public abstract EntityId fromHBaseRowKey(byte[] hbaseRowKey);",
"Object generateKey(Connection conn, String tableName, String primKeyName)\r\n throws PersistenceException;",
"private JdbcPrimaryKeyMeta createPrimaryKeyMeta(Table tbl) {\n String schemaName = getTblSchema(tbl.tableName());\n String tblName = getTblName(tbl.tableName());\n\n final String keyName = PK + tblName;\n\n SchemaRegistry registry = ((TableImpl)tbl).schemaView();\n\n List<String> keyColNames = Arrays.stream(registry.schema().keyColumns().columns())\n .map(Column::name)\n .collect(Collectors.toList());\n\n return new JdbcPrimaryKeyMeta(schemaName, tblName, keyName, keyColNames);\n }",
"public String mapToRowKey(Tuple tuple);",
"public abstract String generateLastRowKey(final long id);",
"public static native long TxCreationKeys_clone(long orig);",
"private void generateKeyUID(byte[] buffer, short offset) {\n short pubLen = masterPublic.getW(buffer, offset);\n crypto.sha256.doFinal(buffer, offset, pubLen, keyUID, (short) 0);\n Util.arrayCopyNonAtomic(keyUID, (short) 0, buffer, offset, KEY_UID_LENGTH);\n }",
"public NodeKey createNodeKey();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the specified page with the associated permissions. Will acquire a lock and may block if that lock is held by another transaction. The retrieved page should be looked up in the buffer pool. If it is present, it should be returned. If it is not present, it should be added to the buffer pool and returned. If there is insufficient space in the buffer pool, an page should be evicted and the new page should be added in its place. | public Page getPage(TransactionId tid, PageId pid, Permissions perm)
throws TransactionAbortedException, DbException {
Page ret = pageMap.get(pid);
if (ret == null) {
if (pageMap.size() == pageNumber) evictPage();
ret = Database.getCatalog().getDatabaseFile(pid.getTableId()).readPage(pid);
pageMap.put(pid, ret);
}
Lock lock = lockMap.computeIfAbsent(pid, p -> new Lock());
TL info = tlMap.computeIfAbsent(new TP(tid, pid), p -> new TL(tid, lock));
info.update(perm == Permissions.READ_WRITE);
return ret;
} | [
"public Page getPage(TransactionId tid, PageId pid, Permissions perm)\n throws TransactionAbortedException, DbException {\n // some code goes here\n if (bufferPool.containsKey(pid)) {\n return bufferPool.get(pid);\n } else {\n Page page = Database.getCatalog()\n .getDatabaseFile(pid.getTableId())\n .readPage(pid);\n\n if (bufferPool.size() == numPages) {\n evictPage();\n }\n\n assert bufferPool.size() < numPages;\n bufferPool.put(page.getId(), page);\n return page;\n }\n }",
"public Page getPage(TransactionId tid, PageId pid, Permissions perm)\n throws TransactionAbortedException, DbException {\n // some code goes here\n int lockType;\n if (perm == Permissions.READ_ONLY)\n lockType = 0;\n else\n lockType = 1;\n\n boolean lockAcquired = false;\n long start = System.currentTimeMillis();\n long timeOut = new Random().nextInt(2000) + 1000;\n while (!lockAcquired) {\n// try {\n// Thread.sleep(50);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n long now = System.currentTimeMillis();\n if (now - start > timeOut)\n throw new TransactionAbortedException();\n lockAcquired = lockManager.acquireLock(pid, tid, lockType);\n }\n\n if (pages.get(pid) != null)\n return pages.get(pid);\n else {\n int tabId = pid.getTableId();\n DbFile file = Database.getCatalog().getDatabaseFile(tabId);\n Page page = file.readPage(pid);\n\n if (numPages == pages.size()) {\n evictPage();\n }\n pages.put(pid, page);\n pageAge.put(pid, age++);\n return page;\n }\n }",
"public Page getPage(TransactionId tid, PageId pid, Permissions perm)\n throws TransactionAbortedException, DbException {\n // some code goes here\n //return null;\n\n //for new transactions, record time.\n if (!currentTransactions.containsKey(tid)) {\n long time = System.currentTimeMillis();\n currentTransactions.put(tid, time);\n }\n\n boolean isDenied = lockManager.grantLock(pid, tid, perm);\n //put on sleep if denied\n while(isDenied){\n if ((System.currentTimeMillis() - currentTransactions.get(tid))\n > ABORT_UPPER_TIME) {\n throw new TransactionAbortedException();\n }\n\n try {\n Thread.sleep(SLEEP_TIME);\n //attempt to get lock again.\n isDenied = lockManager.grantLock(pid, tid, perm);\n } catch (InterruptedException e){\n e.printStackTrace();\n System.exit(0);\n }\n }\n\n Page retrievedPage = null;\n if (!bufferedPages.containsKey(pid)) {\n if (bufferedPages.size() >= pageNum) {\n evictPage();\n }\n\n retrievedPage = Database.getCatalog().getDbFile(pid.getTableId())\n .readPage(pid);\n\n updateLruWithNewNode(pid, retrievedPage);\n } else {\n retrievedPage = bufferedPages.get(pid).page;\n // Node node = bufferedPages.get(pid);\n // removeNode(node);\n // changeHead(node);\n }\n\n return retrievedPage;\n }",
"public Page getPage(TransactionId tid, PageId pid, Permissions perm)\n throws TransactionAbortedException, DbException {\n // some code goes here\n\tPage pgNew;\n\n\tif(pool.containsKey(pid)){\n\t Frame frm = pool.get(pid);\n\t // do some lock check and permission check. Not necessary for pj1\n\t frm.addTransaction(tid, perm);\n\t frm.pinCount++;\n pgNew = frm.frame; \n\n \t} else {\n\t Page pgSwap;\n\t // If the buffer pool is full, maybe need replacing.\n\t if(BufferPool.capacity == pool.size()){\n\t pgSwap = clockReplacer();\n\t // if there is not a proper page to be replaced, just forget it.\n\t if(pgSwap != null){\n\t try{\n\t flushPage(pgSwap.getId());\n } catch (IOException ioe) {\n\t ioe.printStackTrace();\n } \n\t if(pool.remove(pgSwap.getId()) == null){\n\t Debug.log(\"!!!warning: PageId \\'\" + pgSwap.getId().toString()\n\t \t +\"\\' does not exist in the buffer poll, but need to be removed.\"); \n\t }\n\t \n\t // update state and slots info\n\t int i = 0;\n\t while(i < BufferPool.capacity){\n\t if(state[i] == CLOCKON){\n\t \t state[i] = REFERENCED;\n\t\t slots[i] = pid;\n\t\t break;\n\t }\n\t i++;\n\t } \n\t } else {\n\t return null;\n\t } \n\t } else {\n\t // update the state and slots info.\n\t int i = 0;\n\t while(i < BufferPool.capacity){\n\t if(state[i] == AVAILABLE){\n\t\tstate[i] = REFERENCED;\n\t\tslots[i] = pid;\n\t\tbreak;\n\t }\n\t i++;\n\t }\n\t }\n\t // Read the page.\n\t Catalog syscal = Database.getCatalog();\n\t pgNew = syscal.getDbFile(pid.getTableId()).readPage(pid);\n\t pool.put(pid, new Frame(pgNew, tid, perm)); \n\t}\n return pgNew; \n }",
"private ReadWriteLock getPageLock(PageId pageId) {\n return mPageLocks[getPageLockId(pageId)];\n }",
"public MappedPage acquirePage(final long index) {\n MappedPage mpi = cache.get(index);\n if (mpi == null)\n try {\n Object lock = null;\n synchronized (mapLock) {\n if (!pageCreationLockMap.containsKey(index))\n pageCreationLockMap.put(index, new Object());\n lock = pageCreationLockMap.get(index);\n }\n synchronized (lock) { // only lock the creation of page index\n mpi = cache.get(index); // double check\n if (mpi == null) {\n RandomAccessFile raf = null;\n FileChannel channel = null;\n try {\n final String fileName = this.getFileNameByIndex(index);\n raf = new RandomAccessFile(fileName, \"rw\");\n channel = raf.getChannel();\n final MappedByteBuffer mbb = channel.map(READ_WRITE, 0, this.pageSize);\n mpi = new MappedPage(mbb, fileName, index);\n cache.put(index, mpi, ttl);\n if (logger.isDebugEnabled())\n logger.debug(\"Mapped page for \" + fileName + \" was just created and cached.\");\n }\n catch (final IOException e) {\n throw new BigQueueException(e);\n }\n finally {\n if (channel != null)\n CloseCommand.close(channel);\n if (raf != null)\n CloseCommand.close(raf);\n }\n }\n }\n }\n finally {\n synchronized (mapLock) {\n pageCreationLockMap.remove(index);\n }\n }\n else if (logger.isDebugEnabled())\n logger.debug(\"Hit mapped page \" + mpi.getPageFile() + \" in cache.\");\n\n return mpi;\n }",
"protected abstract MemoryPage getPage(long addr);",
"@Nullable\n ReadableByteChannel get(PageId pageId);",
"public HeapPage readPage(int id) {\r\n\t\tbyte[] page = new byte[PAGE_SIZE];\r\n\t\tRandomAccessFile getpage = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tgetpage = new RandomAccessFile(f, \"r\");\r\n\t\t\tgetpage.seek(PAGE_SIZE * id);\r\n\t\t\tgetpage.read(page, 0, PAGE_SIZE);\r\n\t\t\tgetpage.close();\r\n\t\t\treturn new HeapPage(id, page, getId());\r\n\t\t\t} catch (IOException m) \r\n\t\t{m.printStackTrace();\r\n\t\t\t }\r\n\t\t//your code here\r\n\t\treturn null;\r\n\t}",
"public Content getPage(String path, String templateName) throws PathNotFoundException, RepositoryException,\r\n AccessDeniedException {\r\n Content page = getContent(path);\r\n if (page.getTemplate().equals(templateName)) {\r\n return page;\r\n }\r\n Content pageToBeFound = null;\r\n try {\r\n if (page.hasChildren()) {\r\n Collection children = page.getChildren(ItemType.CONTENT.getSystemName());\r\n Iterator iterator = children.iterator();\r\n while (iterator.hasNext()) {\r\n Content child = (Content) iterator.next();\r\n if (child.getTemplate().equals(templateName)) {\r\n return child;\r\n }\r\n if (child.hasChildren()) {\r\n pageToBeFound = getPage(child.getHandle(), templateName);\r\n }\r\n if (pageToBeFound != null) {\r\n return pageToBeFound;\r\n }\r\n }\r\n }\r\n }\r\n catch (Exception e) {\r\n log.error(\"Failed to get - \" + path); //$NON-NLS-1$\r\n log.error(e.getMessage(), e);\r\n }\r\n return pageToBeFound;\r\n }",
"public synchronized PageInstance getPage(String path) throws Exception {\r\n //File file = new File(path);\r\n //File parentDirectory = file.getParentFile();\r\n\r\n //String pageName = PathUtilities.extractPageName(path);\r\n //String pageType = PathUtilities.extractPageType(path);\r\n String pagePath = PathUtilities.extractPagePath(path);\r\n\r\n /*\r\n if(log.isDebugEnabled()){\r\n log.debug(\"Page name: \" + pageName);\r\n log.debug(\"Page type: \" + pageType);\r\n log.debug(\"Page path: \" + pagePath);\r\n }\r\n */\r\n\r\n File xmlFile = pathToFile(path);\r\n\r\n if (!xmlFile.exists()) {\r\n throw new FileNotFoundException(\"File not found: \" + xmlFile);\r\n }\r\n\r\n if (log.isDebugEnabled())\r\n log.debug(\"Looking for page:\" + xmlFile);\r\n\r\n // check the cache and load the page definition if necessary\r\n PageDefinitionCacheEntry cacheEntry =\r\n (PageDefinitionCacheEntry) cache.get(pagePath);\r\n\r\n PageInstance page = null;\r\n PageDefinition pageDefinition = null;\r\n FileInputStream in = null;\r\n try {\r\n if (cacheEntry == null) {\r\n if (log.isDebugEnabled())\r\n log.debug(\"Page definition (\" + pagePath + \") not found in cache.\");\r\n\r\n if (log.isDebugEnabled())\r\n log.debug(\"Loading page definition configuration: \" + xmlFile);\r\n\r\n in = new FileInputStream(xmlFile);\r\n\r\n pageDefinition = new PageDefinition(siteContext, pagePath);\r\n pageDefinition.loadConfiguration(in);\r\n\r\n cache.put(pagePath, new PageDefinitionCacheEntry(pageDefinition,\r\n xmlFile.lastModified()));\r\n } else {\r\n if (log.isDebugEnabled())\r\n log.debug(\"Page definition (\" + pagePath +\r\n \") found in cache.\");\r\n pageDefinition = cacheEntry.getPageDefinition();\r\n if (cacheEntry.getLastModified() != xmlFile.lastModified()) {\r\n log.debug(\"Page modification dates do not match.\");\r\n log.debug(\"Reloading page definition.\");\r\n long lastModified = xmlFile.lastModified();\r\n\r\n in = new FileInputStream(xmlFile);\r\n\r\n pageDefinition.loadConfiguration(in);\r\n\r\n cache.put(pagePath, new PageDefinitionCacheEntry(\r\n pageDefinition, lastModified));\r\n }\r\n }\r\n } catch (ConfigurationException e) {\r\n log.error(\"Error loading page [\" + pagePath + \"] definition: \" + e.getMessage());\r\n throw e;\r\n } finally {\r\n IOUtilities.close(in);\r\n }\r\n\r\n if (pageDefinition != null) {\r\n if (log.isDebugEnabled())\r\n log.debug(\"Getting page instance for \" + path);\r\n page = pageDefinition.getPageInstance(path);\r\n }\r\n\r\n return page;\r\n }",
"BPTreePage get(int idx) {\n if ( false && logging(log) ) {\n String leafOrNode = isLeaf ? \"L\" : \"N\";\n log(log, \"%d[%s].get(%d)\", id, leafOrNode, idx);\n }\n int subId = ptrs.get(idx);\n PageBlockMgr<? extends BPTreePage> pbm = getPageBlockMgr();\n // Always get a \"read\" block - it must be promoted to a \"write\" block\n // to update it. Getting a write block is unhelpful as many blocks\n // during a write operation are only read.\n return pbm.getRead(subId, this.getId());\n }",
"public int addPageLock(AccessDetailVO requestPage){\r\n \t\r\n \t//Check is Page is already locked\r\n \tsynchronized(pageAccess){\t// Synchronised to avoid race conditions \t\r\n \t\t if(!isPageLocked(requestPage)){ \r\n \t\t\tpageAccess.put(requestPage.getPage(), requestPage);\r\n \t\t\tlogger.info(\"Adding Lock Page: \" + requestPage.toString());\r\n \t\t\treturn 0;\r\n \t\t }else{\r\n \t\t\t return -1;\r\n \t\t }\r\n \t }\r\n }",
"public interface PageFetcher {\n public Page fetchPage(long pageBaseAddress, long numBytes);\n}",
"public ByteBuffer getAsByteBuffer() throws MemoryAccessException {\n\t\tint length = pages.stream().mapToInt(Pair::getValue).sum();\n\t\tByteBuffer buffer = ByteBuffer.allocate(length);\n\t\tbuffer.order(ByteOrder.LITTLE_ENDIAN);\n\t\tfor (Pair<Long, Integer> page : pages) {\n\t\t\t//TODO(Matrix89): add MemoryMaps.load(mm, add, len, bb)\n\t\t\tbyte[] tmpArray = new byte[page.getValue()];\n\t\t\tMemoryMaps.load(memoryMap, page.getKey(), tmpArray, 0, page.getValue());\n\t\t\tbuffer.put(tmpArray);\n\t\t}\n\t\tbuffer.flip();\n\t\treturn buffer;\n\t}",
"synchronized void accessPage( MyQueue queue, ConcurrentHashMap<Integer, Node> map, Integer pageNumber )\n\t{\n\t Node requestedPage =map.get(pageNumber);// hash->array[ pageNumber ];\n\t \n\t // the page is not in cache, bring it\n\t if ( requestedPage == null )\n\t Enqueue( queue, map, pageNumber );\n\t \n\t // page is there and not at front, change pointer\n\t else if (requestedPage != queue.front)\n\t {\n\t // Unlink requested page from its current location\n\t // in queue.\n\t if(requestedPage.prev!=null)\n\t\t\t\trequestedPage.prev.next = requestedPage.next;\n\t if (requestedPage.next!=null)\n\t requestedPage.next.prev = requestedPage.prev;\n\t \n\t // If the requested page is rear, then change rear\n\t // as this node will be moved to front\n\t if (requestedPage == queue.rear)\n\t {\n\t queue.rear = requestedPage.prev; \n\t queue.rear.next = null;\n\t }\n\t \n\t // Put the requested page before current front\n\t requestedPage.next = queue.front;\n\t requestedPage.prev = null;\n\t \n\t // Change prev of current front\n\t requestedPage.next.prev = requestedPage;\n\t \n\t // Change front to the requested page\n\t queue.front = requestedPage;\n\t }\n\t}",
"private P findEmptyPage() {\n\t\tP page = null;\n\t\tif (pageGatherStrategy == PageGatherStrategy.REPLACE_SOFT) {\n\t\t\tpage = findEmptyPageFromExisting();\n\t\t\tif (page == null) {\n\t\t\t\tpage = createNewEmptyPage();\n\t\t\t}\n\t\t} else if (pageGatherStrategy == PageGatherStrategy.FILL_FREE){\n\t\t\tpage = createNewEmptyPage();\n\t\t\tif (page == null) {\n\t\t\t\tpage = findEmptyPageFromExisting();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (page == null) {\n\t\t\tthrow new RuntimeException(\"No free pages left!\");\n\t\t}\n\t\treturn page;\n\t}",
"private PageMemoryEx getPageMemoryForCacheGroup(int grpId) throws IgniteCheckedException {\n if (grpId == MetaStorage.METASTORAGE_CACHE_ID)\n return (PageMemoryEx)dataRegion(METASTORE_DATA_REGION_NAME).pageMemory();\n\n // TODO IGNITE-7792 add generic mapping.\n if (grpId == TxLog.TX_LOG_CACHE_ID)\n return (PageMemoryEx)dataRegion(TxLog.TX_LOG_CACHE_NAME).pageMemory();\n\n // TODO IGNITE-5075: cache descriptor can be removed.\n GridCacheSharedContext sharedCtx = context();\n\n CacheGroupDescriptor desc = sharedCtx.cache().cacheGroupDescriptors().get(grpId);\n\n if (desc == null)\n return null;\n\n String memPlcName = desc.config().getDataRegionName();\n\n return (PageMemoryEx)sharedCtx.database().dataRegion(memPlcName).pageMemory();\n }",
"private Pair<ReadWriteLock, ReadWriteLock> getPageLockPair(PageId pageId1, PageId pageId2) {\n int lockId1 = getPageLockId(pageId1);\n int lockId2 = getPageLockId(pageId2);\n if (lockId1 < lockId2) {\n return new Pair<>(mPageLocks[lockId1], mPageLocks[lockId2]);\n } else {\n return new Pair<>(mPageLocks[lockId2], mPageLocks[lockId1]);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Generated Class Name' attribute. The default value is "software.amazon.awscdk.services.ec2.AmazonLinuxImage". | String getGeneratedClassName(); | [
"public String getClassnameToUse()\r\n {\r\n return getSemanticObject().getProperty(bsc_classnameToUse);\r\n }",
"@Override\n public com.gensym.util.Symbol getClassNameForClass() throws G2AccessException {\n java.lang.Object retnValue = getStaticAttributeValue (SystemAttributeSymbols.CLASS_NAME_);\n return (com.gensym.util.Symbol)retnValue;\n }",
"public String getGeneratedClass() {\n\tString pname = getPackageName(bean.getName());\n\tif(pname != null)\n\t return pname+\".\"+wrapperImpl;\n\telse \n\t return wrapperImpl;\n }",
"public String getClassname() {\n return class_;\n }",
"protected String getClassName() {\r\n return newName.getText();\r\n }",
"public final String getClassAttribute() {\n return getAttributeValue(\"class\");\n }",
"public final String getClassAttribute() {\n return getAttributeValue(\"class\");\n }",
"public java.lang.String getClassName() {\n\t\treturn _learningType.getClassName();\n\t}",
"public String getClassName() {\r\n\t\treturn \"GPApplication\";\r\n\t}",
"public String getClassName() {\n return _getClassName(cInst);\n }",
"private static String getClassName() {\r\n\t\tSystem.out.println(\"Please enter class name\");\r\n\t\tString className = scanner.next();\r\n\t\tlogger.info(\"CLASS:\" + className);\r\n\t\treturn className;\r\n\t}",
"public String getRandomClass() {\n return _randomClass;\n }",
"public String getProductClass() {\n return (String)getAttributeInternal(PRODUCTCLASS);\n }",
"String getClassName();",
"public String getJavaClassTypeString() {\r\n\t\treturn class_type;\r\n\t}",
"String getClassName()\n\t{\n\t\treturn className; // Return student class name\n\t}",
"public static void getClassName(){\n print(\"2. Class: CPT163 Java Programming 1\");\n }",
"public java.lang.String getClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(CLASSCODE$30);\n }\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String getResourceClassName()\r\n {\r\n return getSemanticObject().getProperty(swb_resourceClassName);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__DBServer__Group_12__0__Impl" $ANTLR start "rule__DBServer__Group_12__1" InternalMyDsl.g:12776:1: rule__DBServer__Group_12__1 : rule__DBServer__Group_12__1__Impl ; | public final void rule__DBServer__Group_12__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:12780:1: ( rule__DBServer__Group_12__1__Impl )
// InternalMyDsl.g:12781:2: rule__DBServer__Group_12__1__Impl
{
pushFollow(FOLLOW_2);
rule__DBServer__Group_12__1__Impl();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__DBServer__Group_12__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12753:1: ( rule__DBServer__Group_12__0__Impl rule__DBServer__Group_12__1 )\n // InternalMyDsl.g:12754:2: rule__DBServer__Group_12__0__Impl rule__DBServer__Group_12__1\n {\n pushFollow(FOLLOW_8);\n rule__DBServer__Group_12__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group_12__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group__12__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12360:1: ( ( ( rule__DBServer__Group_12__0 )* ) )\n // InternalMyDsl.g:12361:1: ( ( rule__DBServer__Group_12__0 )* )\n {\n // InternalMyDsl.g:12361:1: ( ( rule__DBServer__Group_12__0 )* )\n // InternalMyDsl.g:12362:2: ( rule__DBServer__Group_12__0 )*\n {\n before(grammarAccess.getDBServerAccess().getGroup_12()); \n // InternalMyDsl.g:12363:2: ( rule__DBServer__Group_12__0 )*\n loop67:\n do {\n int alt67=2;\n int LA67_0 = input.LA(1);\n\n if ( (LA67_0==RULE_COMA) ) {\n alt67=1;\n }\n\n\n switch (alt67) {\n \tcase 1 :\n \t // InternalMyDsl.g:12363:3: rule__DBServer__Group_12__0\n \t {\n \t pushFollow(FOLLOW_10);\n \t rule__DBServer__Group_12__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop67;\n }\n } while (true);\n\n after(grammarAccess.getDBServerAccess().getGroup_12()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12024:1: ( rule__DBServer__Group__0__Impl rule__DBServer__Group__1 )\n // InternalMyDsl.g:12025:2: rule__DBServer__Group__0__Impl rule__DBServer__Group__1\n {\n pushFollow(FOLLOW_13);\n rule__DBServer__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group__14() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12402:1: ( rule__DBServer__Group__14__Impl )\n // InternalMyDsl.g:12403:2: rule__DBServer__Group__14__Impl\n {\n pushFollow(FOLLOW_2);\n rule__DBServer__Group__14__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group_6__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12564:1: ( rule__DBServer__Group_6__1__Impl rule__DBServer__Group_6__2 )\n // InternalMyDsl.g:12565:2: rule__DBServer__Group_6__1__Impl rule__DBServer__Group_6__2\n {\n pushFollow(FOLLOW_3);\n rule__DBServer__Group_6__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group_6__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group_6__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12537:1: ( rule__DBServer__Group_6__0__Impl rule__DBServer__Group_6__1 )\n // InternalMyDsl.g:12538:2: rule__DBServer__Group_6__0__Impl rule__DBServer__Group_6__1\n {\n pushFollow(FOLLOW_6);\n rule__DBServer__Group_6__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group_6__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group__12() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12348:1: ( rule__DBServer__Group__12__Impl rule__DBServer__Group__13 )\n // InternalMyDsl.g:12349:2: rule__DBServer__Group__12__Impl rule__DBServer__Group__13\n {\n pushFollow(FOLLOW_9);\n rule__DBServer__Group__12__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group__13();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12198:1: ( ( ( rule__DBServer__Group_6__0 )? ) )\n // InternalMyDsl.g:12199:1: ( ( rule__DBServer__Group_6__0 )? )\n {\n // InternalMyDsl.g:12199:1: ( ( rule__DBServer__Group_6__0 )? )\n // InternalMyDsl.g:12200:2: ( rule__DBServer__Group_6__0 )?\n {\n before(grammarAccess.getDBServerAccess().getGroup_6()); \n // InternalMyDsl.g:12201:2: ( rule__DBServer__Group_6__0 )?\n int alt65=2;\n int LA65_0 = input.LA(1);\n\n if ( (LA65_0==74) ) {\n alt65=1;\n }\n switch (alt65) {\n case 1 :\n // InternalMyDsl.g:12201:3: rule__DBServer__Group_6__0\n {\n pushFollow(FOLLOW_2);\n rule__DBServer__Group_6__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getDBServerAccess().getGroup_6()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group_7__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12672:1: ( rule__DBServer__Group_7__1__Impl rule__DBServer__Group_7__2 )\n // InternalMyDsl.g:12673:2: rule__DBServer__Group_7__1__Impl rule__DBServer__Group_7__2\n {\n pushFollow(FOLLOW_3);\n rule__DBServer__Group_7__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group_7__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12186:1: ( rule__DBServer__Group__6__Impl rule__DBServer__Group__7 )\n // InternalMyDsl.g:12187:2: rule__DBServer__Group__6__Impl rule__DBServer__Group__7\n {\n pushFollow(FOLLOW_36);\n rule__DBServer__Group__6__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group__7();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group_6__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12591:1: ( rule__DBServer__Group_6__2__Impl rule__DBServer__Group_6__3 )\n // InternalMyDsl.g:12592:2: rule__DBServer__Group_6__2__Impl rule__DBServer__Group_6__3\n {\n pushFollow(FOLLOW_14);\n rule__DBServer__Group_6__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group_6__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group_7__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12645:1: ( rule__DBServer__Group_7__0__Impl rule__DBServer__Group_7__1 )\n // InternalMyDsl.g:12646:2: rule__DBServer__Group_7__0__Impl rule__DBServer__Group_7__1\n {\n pushFollow(FOLLOW_6);\n rule__DBServer__Group_7__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group_7__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group_6__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12618:1: ( rule__DBServer__Group_6__3__Impl )\n // InternalMyDsl.g:12619:2: rule__DBServer__Group_6__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__DBServer__Group_6__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12078:1: ( rule__DBServer__Group__2__Impl rule__DBServer__Group__3 )\n // InternalMyDsl.g:12079:2: rule__DBServer__Group__2__Impl rule__DBServer__Group__3\n {\n pushFollow(FOLLOW_3);\n rule__DBServer__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__DBServer__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__GenLnCodeStatement__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:29679:1: ( rule__GenLnCodeStatement__Group_1__1__Impl )\n // InternalDsl.g:29680:2: rule__GenLnCodeStatement__Group_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__GenLnCodeStatement__Group_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__DBServer__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12036:1: ( ( RULE_OBJECT_START ) )\n // InternalMyDsl.g:12037:1: ( RULE_OBJECT_START )\n {\n // InternalMyDsl.g:12037:1: ( RULE_OBJECT_START )\n // InternalMyDsl.g:12038:2: RULE_OBJECT_START\n {\n before(grammarAccess.getDBServerAccess().getOBJECT_STARTTerminalRuleCall_0()); \n match(input,RULE_OBJECT_START,FOLLOW_2); \n after(grammarAccess.getDBServerAccess().getOBJECT_STARTTerminalRuleCall_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Servidor_Impl__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:5659:1: ( rule__Servidor_Impl__Group__1__Impl rule__Servidor_Impl__Group__2 )\n // InternalCeffective.g:5660:2: rule__Servidor_Impl__Group__1__Impl rule__Servidor_Impl__Group__2\n {\n pushFollow(FOLLOW_4);\n rule__Servidor_Impl__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Servidor_Impl__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Contract__Group_12__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:3887:1: ( rule__Contract__Group_12__1__Impl )\n // InternalSymboleoide.g:3888:2: rule__Contract__Group_12__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Contract__Group_12__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Contract__Group_12_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:3941:1: ( rule__Contract__Group_12_1__1__Impl )\n // InternalSymboleoide.g:3942:2: rule__Contract__Group_12_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Contract__Group_12_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Discovers client connectors in the classpath. | private void discoverClientConnectors(ClassLoader classLoader)
throws IOException {
registerHelpers(classLoader, classLoader
.getResources(DESCRIPTOR_CLIENT_PATH), getRegisteredClients(),
Client.class);
} | [
"private void discoverConnectors() throws IOException {\n // Find the factory class name\n final ClassLoader classLoader = org.restlet.util.Engine\n .getClassLoader();\n\n // Register the client connector providers\n discoverClientConnectors(classLoader);\n\n // Register the server connector providers\n discoverServerConnectors(classLoader);\n\n // Register the default connectors that will be used if no\n // other connector has been found\n registerDefaultConnectors();\n }",
"public Connector[] findConnectors();",
"private void discoverServerConnectors(ClassLoader classLoader)\n throws IOException {\n registerHelpers(classLoader, classLoader\n .getResources(DESCRIPTOR_SERVER_PATH), getRegisteredServers(),\n Server.class);\n }",
"private static ArrayList<ServiceConnector> loadServiceConnectors(Config conf, boolean timingMode,\n\t\t\tboolean debugMode) {\n\t\tArrayList<ServiceConnector> connectors = new ArrayList<ServiceConnector>();\n\t\ttry {\n\t\t\tJSONArray apis = (JSONArray) conf.getParam(\"apis\");\n\t\t\tfor (Object api : apis) {\n\t\t\t\tif (api instanceof JSONObject && ((JSONObject) api).has(\"type\") && ((JSONObject) api).has(\"key\")) {\n\t\t\t\t\tString apiType = ((JSONObject) api).getString(\"type\");\n\t\t\t\t\tString apiKey = ((JSONObject) api).getString(\"key\");\n\t\t\t\t\tLOGGER.info(String.format(\"Loading connector type %s with API key %s\", apiType, apiKey));\n\t\t\t\t\tJSONObject params = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tparams = ((JSONObject) api).getJSONObject(\"params\");\n\t\t\t\t\t\tLOGGER.info(\"API has optional params: \" + params);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLOGGER.info(\"API has no optional params defined.\");\n\t\t\t\t\t}\n\t\t\t\t\tconnectors.add(\n\t\t\t\t\t\t\tServiceConnectorFactory.getServiceConnector(apiType, apiKey, timingMode, params, LOGGER));\n\t\t\t\t} else {\n\t\t\t\t\tLOGGER.warning(\"Invalid API specification: \" + api);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassCastException e) {\n\t\t\tString errorMsg = \"Invalid configuration of APIs: \" + e.getMessage();\n\t\t\tprintError(errorMsg, null, 1, debugMode, e);\n\t\t}\n\t\treturn connectors;\n\t}",
"Set<ConnectorType> discoverConnectors(ConnectorHostType hostType, OperationResult parentResult) throws CommunicationException;",
"public void registerDefaultConnectors() {\n getRegisteredClients().add(new StreamClientHelper(null));\n getRegisteredClients().add(new ClapClientHelper(null));\n getRegisteredClients().add(new FileClientHelper(null));\n getRegisteredServers().add(new StreamServerHelper(null));\n }",
"private void loadJarsFromClasspath() {\n\n loadedJarsMap.clear();\n\n ClassLoader classLoader = getClass().getClassLoader();\n URL[] urls = null;\n do {\n //check if the class loader is instance of URL and cast it\n if (classLoader instanceof URLClassLoader) {\n urls = ((URLClassLoader) classLoader).getURLs();\n } else {\n // if the ClassLoader is not instance of URLClassLoader we will break the cycle and log a message\n log.info(\"ClassLoader \" + classLoader\n + \" is not instance of URLClassLoader, so it will skip it.\");\n\n // if the ClassLoader is from JBoss, it is instance of BaseClassLoader,\n // we can take the ClassPath from a public method -> listResourceCache(), from JBoss-classloader.jar\n // this ClassLoader is empty, we will get the parent\n classLoader = classLoader.getParent();\n continue;\n }\n try {\n loadJarsFromManifestFile(classLoader);\n } catch (IOException ioe) {\n log.warn(\"MANIFEST.MF is loaded, so we will not search for duplicated jars!\");\n }\n\n // add all jars from ClassPath to the map\n for (int i = 0; i < urls.length; i++) {\n addJarToMap(urls[i].getFile());\n }\n\n // get the parent classLoader\n classLoader = classLoader.getParent();\n } while (classLoader != null);\n\n if (loadedJarsMap.isEmpty()) {\n // jars are not found, so probably no URL ClassLoaders are found\n throw new RuntimeException(\"Most probrably specific server is used without URLClassLoader instances!\");\n }\n }",
"static List getCommonClasspath(BaseManager mgr) throws IOException {\n\n InstanceEnvironment env = mgr.getInstanceEnvironment();\n String dir = env.getLibClassesPath();\n String jarDir = env.getLibPath();\n\n return ClassLoaderUtils.getUrlList(new File[] {new File(dir)}, \n new File[] {new File(jarDir)});\n }",
"public Vector getConnectors();",
"ConnectorReader getReadyConnectorReader(List<String> connectors, long maxWaitTime);",
"@Override\n public ProvisioningConnectorConfig[] getAllProvisioningConnectors()\n throws IdentityProviderManagementException {\n\n List<ProvisioningConnectorConfig> connectorConfigs = ProvisioningConnectorService\n .getInstance().getProvisioningConnectorConfigs();\n if (connectorConfigs != null && connectorConfigs.size() > 0) {\n return connectorConfigs.toArray(new ProvisioningConnectorConfig[0]);\n }\n return null;\n }",
"public static ArrayList getAllClients() {\r\n \ttry {\r\n\t\t\tConnection connection = getConnection();\r\n\t\t\ttry {\r\n\t\t\t\tStatement statement = connection.createStatement();\r\n\t\t\t\tResultSet results = statement.executeQuery(\"SELECT * FROM clients\");\r\n\t\t\t\t\r\n\t\t\t\tArrayList<Client> serverClients = new ArrayList();\r\n\t\t\t\t\r\n\t\t\t\twhile(results.next()) {\r\n\t\t\t\t\tClient client = resultsinterpreterClient(results);\r\n\t\t\t\t\tserverClients.add(client);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn serverClients;\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t \treturn null;\r\n\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tthrow new RuntimeException(\"Error: Connection lost after intitional connection test. Now Closeing.\", e);\r\n\t\t}\r\n \t\r\n }",
"private void downloadClients() {\n XMLParser parser = new XMLParser();\n String url = String.format(\"%1$s%2$s%3$s\",\n Utils.SERVER_URL, Utils.SERVER_FOLDER, ASPX_GET_ALL_CLIENTS);\n String xml = parser.getXmlFromUrl(url, true, null, null);\n\n try {\n Document doc = parser.getDomElement(xml);\n NodeList nl = doc.getElementsByTagName(Utils.XML_NODE_DOWNLOAD);\n Element e = (Element) nl.item(0);\n Boolean status = Boolean.valueOf(parser.getValue(e, Utils.XML_NODE_STATUS));\n\n if (status == Boolean.TRUE) {\n NodeList nl1 = doc.getElementsByTagName(Utils.XML_NODE_ROW);\n Element e1;\n Client client;\n\n // Looping through all item nodes <Row>\n for (int i = 0; i < nl1.getLength(); i++) {\n e1 = (Element) nl1.item(i);\n\n client = new Client();\n\n // Adding each child node to service object\n client.setClientId(Integer.parseInt(parser.getValue(e1, XML_NODE_CLIENT_ID)));\n client.setClientName(parser.getValue(e1, XML_NODE_CLIENT_NAME));\n\n clients.add(client);\n }\n\n clientDb = new ClientDbHelper(getContext());\n clientDb.deleteAllClients();\n clientDb.addAllClients(clients);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public List<IntegrationConnectorHandler> initialize()\n {\n List<IntegrationConnectorConfig> connectorConfigurationList = serviceConfig.getIntegrationConnectorConfigs();\n\n if (connectorConfigurationList != null)\n {\n for (IntegrationConnectorConfig connectorConfig : connectorConfigurationList)\n {\n if (connectorConfig != null)\n {\n if (connectorConfig.getPermittedSynchronization() == null)\n {\n connectorConfig.setPermittedSynchronization(serviceConfig.getDefaultPermittedSynchronization());\n }\n\n String userId = localServerUserId;\n\n if (connectorConfig.getConnectorUserId() != null)\n {\n userId = connectorConfig.getConnectorUserId();\n }\n IntegrationConnectorHandler connectorHandler = new IntegrationConnectorHandler(connectorConfig.getConnectorId(),\n null,\n connectorConfig.getConnectorName(),\n userId,\n null,\n null,\n connectorConfig.getRefreshTimeInterval(),\n connectorConfig.getMetadataSourceQualifiedName(),\n connectorConfig.getConnection(),\n connectorConfig.getUsesBlockingCalls(),\n connectorConfig.getPermittedSynchronization(),\n connectorConfig.getGenerateIntegrationReports(),\n serviceConfig.getIntegrationServiceFullName(),\n localServerName,\n contextManager,\n auditLog);\n\n connectorHandlers.add(connectorHandler);\n }\n }\n }\n\n if (connectorHandlers.isEmpty())\n {\n final String actionDescription = \"Initialize integration service\";\n\n auditLog.logMessage(actionDescription,\n IntegrationDaemonServicesAuditCode.NO_INTEGRATION_CONNECTORS.\n getMessageDefinition(serviceConfig.getIntegrationServiceFullName()));\n }\n\n return connectorHandlers;\n }",
"@Test\r\n public void testGetSupportedConnectorTopologies() throws Exception {\r\n TDataPrepDBInputDefinition fixture = new TDataPrepDBInputDefinition();\r\n\r\n Set<ConnectorTopology> result = fixture.getSupportedConnectorTopologies();\r\n\r\n assertNotNull(result);\r\n assertEquals(1, result.size());\r\n }",
"abstract InputStream openClassPath();",
"public ResourceSetDescription connectors() {\n return this.connectors;\n }",
"public Collection<IConnectionFactory> getAll();",
"public static void initilize() {\n\t\t// connector = new ZooKeeperConnector();\r\n\t\t// zkPool.add(connector);\r\n\t\t// connector = new ZooKeeperConnector();\r\n\t\t// zkPool.add(connector);\r\n\t\t// connector = new ZooKeeperConnector();\r\n\t\t// zkPool.add(connector);\r\n\t\t// connector = new ZooKeeperConnector();\r\n\t\t// zkPool.add(connector);\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the current value of firePeriod from preferences | public double getFirePeriod() {
firePeriod = firePeriodPrefAdapter.getDouble();
return firePeriod;
} | [
"public void setFirePeriod(double firePeriod) {\n double oldFirePeriod = getFirePeriod();\n this.firePeriod = firePeriod;\n firePeriodPrefAdapter.setDouble(firePeriod);\n firePropertyChange(PROPERTYNAME_FIREPERIOD, oldFirePeriod, firePeriod);\n }",
"long getPeriod();",
"public int getConfiguredPeriod() {\n return configuredPeriod;\n }",
"public int getPeriod() {\r\n return period;\r\n }",
"public double getPeriod() {\n return period;\n }",
"public Integer getPeriod() {\n return period;\n }",
"public int getGoalendPeriod() {\r\n return goalendPeriod;\r\n }",
"public int getGoalstartPeriod() {\r\n return goalstartPeriod;\r\n }",
"public EPPNameWatchPeriod getPeriod() {\n\t\treturn period;\n\t}",
"public float getPeriodicRateChange() {\n return periodicRateChange;\n }",
"Optional<ReportingPeriod> getCurrentReportingPeriod();",
"public int getFireRate() {\n return fireRate;\n }",
"public int getServicePeriod() {\n return servicePeriod;\n }",
"public int getTimePeriod() {\n return timePeriod;\n }",
"protected long getPeriod()\n {\n return 0;\n }",
"public static String getUpdateFrequency(Context context) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n String key_updateFrequency = context.getString(R.string.pref_key_updateFrequency);\n String default_updateFrequency = context.getResources().getString(R.string.pref_defaultValue_updateFrequency);\n return sp.getString(key_updateFrequency, default_updateFrequency);\n }",
"void getCurrentPeriodo();",
"static int getPeriod(Configuration conf) {\n return conf.getInt(QUOTA_OBSERVER_CHORE_PERIOD_KEY, QUOTA_OBSERVER_CHORE_PERIOD_DEFAULT);\n }",
"@Override\n\tpublic long getRefreshPeriod() {\n\t\treturn refreshPeriod;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show the composition of the function sin(10t) . | public static void main(String[] args) {
SlingFunction f = new Sin(
new Arithmetic('*', new Point(0, 10), new T()));
System.out.println(f);
} | [
"private static void sinPressed(String input) {\n\n Double tempValue = valueOf (input);\n System.out.println (tempValue);\n convertDecimalToString (Math.sin (tempValue));\n }",
"E sin(final E n);",
"public double sine()\n {\n return Math.sin( result );\n }",
"public double cos(double number);",
"private double getSin(int rot) {\r\n\t\treturn Math.sin(Math.toRadians(rot));\r\n\t}",
"@Test\n\tpublic void testSin() {\n\n\t\t// Case 1: Testing sin function from stored values on stack.\n\t\tm.addToEntry(\"0\");\n\t\tm.enterValue();\n\t\tm.enterHistory();\n\t\tassertEquals(m.sin(),\"0\");\n\t\t\n\t\t// Case 2: Number on screen.\n\t\tm.reset();\n\t\tm.addToEntry(\"0\");\n\t\tassertEquals(m.sin(), \"0\");\n\t\t\n\t\t// Case 3: real numbers followed by sin.\n\t\tm.reset();\n\t\tm.addToEntry(\"1.5\");\n\t\tassertEquals(m.sin(), \"0.9974949866040544\");\n\t\t\n\t\t\n\t}",
"public T cos(T value);",
"@Override\n public double f( double x ) {\n return Math.sin(x * (Math.PI / 180));\n }",
"private static void displayOutput( float t ) {\n\t\tfor (Output o: outputList) {\n\t\t\to.outputMe();\n\t\t}\n\t\tSystem.out.println();\n\n\t\t/*if (Simulator.moreEvents()) {\n\t\t\tSimulator.schedule(\n\t\t\t\tt + 1,\n\t\t\t\t(float time) -> displayOutput( time )\n\t\t\t);\n\t\t}*/\n\t}",
"@Override\n\tpublic double f(double x) {\n\t\treturn Math.sin(x);\n\t}",
"public static int sin(int num){\n return (int)Math.sin(num);\n }",
"private Double sin() {\n this.engineer.sin(this.firstArg);\n return this.engineer.getResult();\n }",
"private static void trigonometryMenu()\r\n {\r\n System.out.println(\"TRIGONOMETRY MENU\\n\"\r\n + \"1: Sine (Degrees)\\n\"\r\n + \"2: Cosine (Degrees)\\n\"\r\n + \"3: Tangent (Degrees)\\n\"\r\n + \"4: Sine (Radians)\\n\"\r\n + \"5: Cosine (Radians)\\n\"\r\n + \"6: Tangent (Radians)\\n\"\r\n + \"7: Convert Degrees to Radians\\n\"\r\n + \"8: Convert Radians to Degrees\\n\"\r\n + \"X: Exit Trigonometry Menu\");\r\n }",
"@Test\n public void testSinFunction() {\n UnivariateFunction f = new Sin();\n UnivariateIntegrator integrator = new SimpsonIntegrator();\n double min;\n double max;\n double expected;\n double result;\n double tolerance;\n\n min = 0; max = JdkMath.PI; expected = 2;\n tolerance = JdkMath.abs(expected * integrator.getRelativeAccuracy());\n result = integrator.integrate(1000, f, min, max);\n Assert.assertTrue(integrator.getEvaluations() < 100);\n Assert.assertTrue(integrator.getIterations() < 10);\n Assert.assertEquals(expected, result, tolerance);\n\n min = -JdkMath.PI/3; max = 0; expected = -0.5;\n tolerance = JdkMath.abs(expected * integrator.getRelativeAccuracy());\n result = integrator.integrate(1000, f, min, max);\n Assert.assertTrue(integrator.getEvaluations() < 50);\n Assert.assertTrue(integrator.getIterations() < 10);\n Assert.assertEquals(expected, result, tolerance);\n }",
"public Function(double coeff, String trigFunction, double p) {\r\n\t if(trigFunction.toLowerCase().equals(\"sin\")){\r\n //y = coeff * Math.sin(p*x);\r\n sinc[0] = coeff;\r\n sind[0] = p;\r\n sinindex = 1;\r\n }else if(trigFunction.toLowerCase().equals(\"cos\")){\r\n //y = coeff * Math.cos(p*x);\r\n if( p == 0){\r\n co[0]+= coeff;\r\n }else{\r\n cosc[0] = coeff;\r\n cosd[0] = p;\r\n cosindex = 1;\r\n } \r\n }else if(trigFunction.toLowerCase().equals(\"tan\")){\r\n //y = coeff * Math.tan(p*x);\r\n tanc[0] = coeff;\r\n tand[0] = p;\r\n tanindex = 1;\r\n }else{\r\n clear(); \r\n }\r\n\t}",
"public static final float sin(float angle) {\r\n if (angle < 0f) {\r\n return -sine[(int) -(angle * 10f)];\r\n }\r\n\r\n return sine[(int) (angle * 10f)];\r\n }",
"public static double mySin(double x) {\n int n = 0;\n int N = 20;\n double y = 0;\n for (; n <= N; n++) {\n double p1 = 1;\n for (int i = 1; i <= n; i++) {\n p1 *= (-1);\n }\n double p2 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p2*=i;\n }\n double p3 = 1;\n for (int i = 1; i <= (2 * n + 1); i++){\n p3*=x;\n }\n y = y + (p1/p2)*p3;\n }\n return y;\n }",
"public static int sin(int angle) {\n return cos((angle+270)%360);\n }",
"void draw(Graphics g, float interp) {\n float x = (float)(Math.sin(angle.x) * amplitude.x);\n //Oscillating on the y-axis\n float y = (float) (Math.sin(angle.y) * amplitude.y);\n \n // Translate (x + width/2)\n x += 250; \n y += 250;\n \n //Drawing the Oscillator as a line connecting a circle \n// g.setColor(Color.BLACK);\n// g.drawLine(250,250, (int)x + 8,(int) y + 8);\n g.setColor(bobColor);\n g.fillOval((int)x,(int) y, 20, 20);\n g.setColor(Color.black);\n g.drawOval((int)x,(int) y, 20, 20);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface of operations that an object that owns a log can perform on that log. Really just a convenience method for looking up the classlevel logger. | public interface LogOwner {
Logger getLogger();
} | [
"protected abstract Logger getMachineLog();",
"public interface Logger {\n\n /**\n * Logs a message string at the specified severity level.\n * \n * @param level This is the severity level at which the message should be\n * logged.\n * @param msg This is the message string which should be included in the log\n * file.\n */\n public void log(Level level, String msg);\n\n /**\n * Logs message string and accompanying exception information at the specified\n * severity level.\n * \n * @param level This is the severity level at which the message should be\n * logged.\n * @param msg This is the message string which should be included in the log\n * file.\n * @param thrown This is the exception which should be logged with the\n * accompanying message.\n */\n public void log(Level level, String msg, Throwable thrown);\n\n /**\n * Gets the unique logging identifier associated with a given logger instance.\n * \n * @return Returns the unique logging identifier for the logger instance.\n */\n public String getLoggerId();\n\n /**\n * Gets the current logging level associated with a given logger instance.\n * \n * @return Returns the current logging level for the logger instance.\n */\n public Level getLogLevel();\n\n /**\n * Sets the logging level to be used for a given logger instance. If the\n * underlying logging service supports hierarchical logging this will also set\n * the log level for all loggers below the current instance in the log\n * hierarchy.\n * \n * @param logLevel This is the log level to be used by the logger instance for\n * all future log messages.\n */\n public void setLogLevel(Level logLevel);\n\n}",
"public interface Logger {\n\n\t/**\n\t * Set the name for meaningful class names in log messages\n\t * \n\t * If your logger supports instantiating a logger with a class name, \n\t * the implementation should allow instantiation in this manner.\n\t * Otherwise, a NOOP implementation is acceptable.\n\t */\n\tpublic Logger setLoggerClass(String className);\n\t\n\t/** \n\t * Set the class for meaningful class names in log messages\n\t * \n\t * If your logger supports instantiating a logger with a class name, \n\t * the implementation should allow instantiation in this manner.\n\t * Otherwise, a NOOP implementation is acceptable.\n\t */\n\tpublic Logger setLoggerClass(Class<?> clazz);\n\t\n\t/**\n * Log a fatal event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void fatal(String message);\n\t\n\t/**\n * Log a fatal level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void fatal(String message, Throwable throwable);\n\n\t/**\n * Log an error level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void error(String message);\n\t\n\t/**\n * Log an error level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void error(String message, Throwable throwable);\n\n\t/**\n * Log a warning level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void warning(String message);\n\t\n\t/**\n * Log a warning level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void warning(String message, Throwable throwable);\n\n\t/**\n * Log an info level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void info(String message);\n\t\n\t/**\n * Log an info level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void info(String message, Throwable throwable);\n\n\t/**\n * Log a debug level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void debug(String message);\n\t\n\t/**\n * Log a debug level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void debug(String message, Throwable throwable);\n}",
"public MLogControl getLogControl();",
"public Logger getLogger(Class<?> clazz);",
"LoggerCaller getLoggerCaller();",
"public RevisorLogger getLogger();",
"Object createLogger(Class<?> clazz);",
"LogContext getLogContext();",
"private final Log getLogBase() {\r\n return this.logBase;\r\n }",
"public interface LogEntry {\n\n /**\n * Log level.\n */\n enum Level {\n FATAL,\n ERROR,\n WARN,\n INFO,\n DEBUG,\n TRACE\n }\n\n /**\n * Returns name of the logger.\n */\n String getLoggerName();\n\n /**\n * Returns hostname of where the log emitted.\n */\n String getHost();\n\n /**\n * Returns timestamp of the log.\n */\n long getTimestamp();\n\n /**\n * Returns the log {@link Level} of the log.\n */\n Level getLogLevel();\n\n /**\n * Returns the class name where the log emitted.\n */\n String getSourceClassName();\n\n /**\n * Returns the method name where the log emitted.\n */\n String getSourceMethodName();\n\n /**\n * Returns the source file name where the log emitted.\n */\n String getFileName();\n\n /**\n * Returns the line number in the source file where the log emitted.\n */\n int getLineNumber();\n\n /**\n * Returns the name of the thread where the log emitted.\n */\n String getThreadName();\n\n /**\n * Returns the log message.\n */\n String getMessage();\n\n /**\n * Returns the runnable name.\n */\n String getRunnableName();\n\n /**\n * Returns the {@link Throwable} information emitted with the log.\n *\n * @return A {@link LogThrowable} or {@code null} if {@link Throwable} information is not available.\n */\n LogThrowable getThrowable();\n\n /**\n * Returns the stack trace of the throwable information emitted with the log.\n *\n * @return the stack trace information or an empty array if {@link Throwable} information is not available.\n * @deprecated Use {@link #getThrowable()} instead.\n */\n @Deprecated\n StackTraceElement[] getStackTraces();\n}",
"ILoggingService getLoggingService();",
"public interface ILog {\n\n /**\n * Send an information level log message, used by time-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void info(String tag, String msg);\n\n\n /**\n * Send an warning level log message, used by exception-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void warn(String tag, String msg);\n}",
"public interface InstanceLogger {\n\n /**\n * Logs a message at the specified logging level. The message is prefixed\n * with an instance-dependent identifier.\n *\n * @param logLevel the logging level at which the message should be logged.\n * @param msg a string to be logged.\n */\n public void log(Level logLevel, String msg);\n}",
"@FunctionalInterface\n interface LogFacade {\n /**\n * Returns a method handle that can emit a logging event for a configuration class, its method type must be\n * {@link java.lang.invoke.MethodType#methodType(Class, Class[]) MethodType#methodType(void.class, String.class, Level.class, Throwable.class)}.\n * This method is not called for each event but more or less each time\n * the runtime detects that the configuration has changed.\n * \n * @return a method handle that can emit a logging event.\n */\n MethodHandle getLogMethodHandle();\n \n /**\n * Override the level of the underlying logger.\n * This method is not called for each event but more or less each time\n * the runtime detects that the configuration has changed.\n * \n * @param level the new level of the underlying logger.\n * @throws UnsupportedOperationException if overriding the level is not\n * supported by the underlying logger\n */\n default void overrideLevel(Level level) {\n throw new UnsupportedOperationException(\"SLF4J do not offer to change the log level dynamically\");\n }\n }",
"protected Log getLogger() {\n return log;\n }",
"Object createLogger(String name);",
"Logger createLogger(Class clazz, CelebrosExportData loggerData);",
"public interface ExtendedLogHandler extends Logging {\n\n /** Override to write a formatted LogRecord to the output stream.*/\n public abstract void publish(ExtendedLogRecord record);\n\n /** Override to return true if the supplied record is allowed.*/\n public boolean isLoggable(ExtendedLogRecord record);\n\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage | public static native long KeysInterface_sign_invoice(long this_arg, byte[] invoice_preimage); | [
"Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage);",
"public Result_RecoverableSignatureNoneZ sign_invoice(byte[] invoice_preimage) {\n\t\tlong ret = bindings.KeysInterface_sign_invoice(this.ptr, invoice_preimage);\n\t\tif (ret < 1024) { return null; }\n\t\tResult_RecoverableSignatureNoneZ ret_hu_conv = Result_RecoverableSignatureNoneZ.constr_from_ptr(ret);\n\t\treturn ret_hu_conv;\n\t}",
"public static native long SignedRawInvoice_signature(long this_arg);",
"public static native long SignedRawInvoice_raw_invoice(long this_arg);",
"public static native boolean SignedRawInvoice_check_signature(long this_arg);",
"public static native long CResult_RecoverableSignatureNoneZ_ok(byte[] arg);",
"public static native long CResult_SignedRawInvoiceNoneZ_ok(long o);",
"public static native void InvoiceSignature_free(long this_obj);",
"public static native byte[] Invoice_recover_payee_pub_key(long this_arg);",
"byte[] getSignatureImage();",
"public static native byte[] SignedRawInvoice_hash(long this_arg);",
"public static native long InMemorySigner_as_Sign(long this_arg);",
"public static native long InvoiceSignature_clone(long orig);",
"public static native byte[] RawInvoice_payment_secret(long this_arg);",
"public static native long PaymentPurpose_invoice_payment(byte[] payment_preimage, byte[] payment_secret, long user_payment_id);",
"public static native long InMemorySigner_as_BaseSign(long this_arg);",
"public static native long InMemorySigner_counterparty_pubkeys(long this_arg);",
"public static native byte[] HolderCommitmentTransaction_get_counterparty_sig(long this_ptr);",
"public static native byte[] InMemorySigner_get_payment_key(long this_ptr);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
retrieve metadata from frame handle \param[in] frame handle returned from a callback \param[in] frame_metadata the rs2_frame_metadata whose latest frame we are interested in \param[out] error if nonnull, receives any error that occurs during this call, otherwise, errors are ignored \return the metadata value Original signature : rs2_metadata_type rs2_get_frame_metadata(const rs2_frame, rs2_frame_metadata_value, rs2_error) native declaration : line 1217 | long rs2_get_frame_metadata(Realsense2Library.rs2_frame frame, int frame_metadata, PointerByReference error); | [
"int rs2_supports_frame_metadata(Realsense2Library.rs2_frame frame, int frame_metadata, PointerByReference error);",
"Pointer rs2_get_frame_data(Realsense2Library.rs2_frame frame, PointerByReference error);",
"PointerByReference rs2_get_frame_stream_profile(Realsense2Library.rs2_frame frame, PointerByReference error);",
"long rs2_get_frame_number(Realsense2Library.rs2_frame frame, PointerByReference error);",
"Pointer rs2_frame_metadata_to_string(int metadata);",
"double rs2_get_frame_timestamp(Realsense2Library.rs2_frame frame, PointerByReference error);",
"PointerByReference rs2_get_frame_sensor(Realsense2Library.rs2_frame frame, PointerByReference error);",
"Pointer rs2_frame_metadata_value_to_string(int metadata);",
"int rs2_get_frame_height(Realsense2Library.rs2_frame frame, PointerByReference error);",
"boolean IVS_User_GetMetaData(Pointer pFBuffer, ULONG ulFBLength, int eLayTwo, PointerByReference pstMetaData);",
"Realsense2Library.rs2_frame rs2_extract_frame(Realsense2Library.rs2_frame composite, int index, PointerByReference error);",
"int rs2_get_frame_data_size(Realsense2Library.rs2_frame frame, PointerByReference error);",
"com.cmpe275.grpcComm.MetaData getMetaData();",
"int rs2_get_frame_timestamp_domain(PointerByReference frameset, PointerByReference error);",
"void rs2_process_frame(PointerByReference block, PointerByReference frame, PointerByReference error);",
"public interface MetadataFrame extends Frame {\n\n /**\n * Returns the metadata as a UTF-8 {@link String}. If the Metadata flag is not set, returns {@link\n * Optional#empty()}.\n *\n * @return optionally, the metadata as a UTF-8 {@link String}\n */\n default Optional<String> getMetadataAsUtf8() {\n return Optional.ofNullable(getUnsafeMetadataAsUtf8());\n }\n\n /**\n * Returns the length of the metadata in the frame. If the Metadata flag is not set, returns\n * {@link Optional#empty()}.\n *\n * @return optionally, the length of the metadata in the frame\n */\n default Optional<Integer> getMetadataLength() {\n return Optional.ofNullable(getUnsafeMetadataLength());\n }\n\n /**\n * Returns the metadata directly. If the Metadata flag is not set, returns {@code null}.\n *\n * <p><b>Note:</b> this metadata will be outside of the {@link Frame}'s lifecycle and may be\n * released at any time. It is highly recommended that you {@link ByteBuf#retain()} the metadata\n * if you store it.\n *\n * @return the metadata directly, or {@code null} if the Metadata flag is not set\n * @see #getMetadataAsUtf8()\n * @see #mapMetadata(Function)\n */\n @Nullable\n ByteBuf getUnsafeMetadata();\n\n /**\n * Returns the metadata as a UTF-8 {@link String}. If the Metadata flag is not set, returns {@code\n * null}.\n *\n * @return the metadata as a UTF-8 {@link String} or {@code null} if the Metadata flag is not set.\n * @see #getMetadataAsUtf8()\n */\n default @Nullable String getUnsafeMetadataAsUtf8() {\n ByteBuf byteBuf = getUnsafeMetadata();\n return byteBuf == null ? null : byteBuf.toString(UTF_8);\n }\n\n /**\n * Returns the length of the metadata in the frame directly. If the Metadata flag is not set,\n * returns {@code null}.\n *\n * @return the length of the metadata in frame directly, or {@code null} if the Metadata flag is\n * not set\n * @see #getMetadataLength()\n */\n default @Nullable Integer getUnsafeMetadataLength() {\n ByteBuf byteBuf = getUnsafeMetadata();\n return byteBuf == null ? null : byteBuf.readableBytes();\n }\n\n /**\n * Exposes the metadata for mapping to a different type. If the Metadata flag is not set, returns\n * {@link Optional#empty()}.\n *\n * @param function the function to transform the metadata to a different type\n * @param <T> the different type\n * @return optionally, the metadata mapped to a different type\n * @throws NullPointerException if {@code function} is {@code null}\n */\n default <T> Optional<T> mapMetadata(Function<ByteBuf, T> function) {\n Objects.requireNonNull(function, \"function must not be null\");\n\n return Optional.ofNullable(getUnsafeMetadata()).map(function);\n }\n}",
"org.apache.calcite.avatica.proto.Responses.RpcMetadata getMetadata();",
"io.eigr.astreu.protocol.Metadata getMetadata();",
"@FunctionalInterface\npublic interface MetadataHandler\n{\n /**\n * Called when the metadata has been read. The buffer with this data should not be assumed to exist outside of the\n * lifetime of this callback. You should copy the data inside the callback if you want to to use it afterwards.\n *\n * If the status of the callback is not OK the length will be 0 and the read has resulted in an error.\n *\n * @param sessionId the id of the session that this metadata has been written\n * @param status whether the read has been successful or resulted in an error.\n * @param buffer buffer with the metadata in.\n * @param offset offset within the buffer.\n * @param length length of the data within the buffer.\n */\n void onMetaData(\n long sessionId,\n MetaDataStatus status,\n DirectBuffer buffer,\n int offset,\n int length);\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an aliased public.member table reference | public Member(Name alias) {
this(alias, MEMBER);
} | [
"private static TableRef createAliasedTableRef( final TableMeta table,\n final String alias ) {\n return new TableRef() {\n public String getColumnName( String rawName ) {\n return alias + \".\" + rawName;\n }\n public String getIntroName() {\n return table.getName() + \" AS \" + alias;\n }\n };\n }",
"public HaMembershipTable(String alias) {\n this(alias, HA_MEMBERSHIP);\n }",
"public void testMember(){\n\r\n parser.sqltext = \"select f from t1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_fake );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n parser.sqltext = \"select f from t as t1 join t2 on t1.f1 = t2.f1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_table );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t\") == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().getAliasClause().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join join b on a_join.f1 = b.f1;\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin = parser.sqlstatements.get(0).joins.getJoin(0);\r\n //System.out.println(lcJoin.getKind());\r\n assertTrue(lcJoin.getKind() == TBaseType.join_source_join );\r\n\r\n assertTrue(lcJoin.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n assertTrue(lcJoin.getJoin().getJoinItems().getJoinItem(0).getJoinType() == EJoinType.left);\r\n\r\n assertTrue(lcJoin.getJoinItems().getJoinItem(0).getJoinType() == EJoinType.join);\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin1 = parser.sqlstatements.get(0).joins.getJoin(0);\r\n assertTrue(lcJoin1.getKind() == TBaseType.join_source_join );\r\n assertTrue(lcJoin1.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin1.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n\r\n }",
"MemberCell createMemberCell();",
"private static TableRef createTableRef( final TableMeta table,\n String lang ) {\n if ( ! isAdql1( lang ) ) {\n return new TableRef() {\n public String getColumnName( String rawName ) {\n return rawName;\n }\n public String getIntroName() {\n return table.getName();\n }\n };\n }\n else {\n return createAliasedTableRef( table, getAlias( table ) );\n }\n }",
"void encodeTableAlias(final String raw, final StringBuilder sql);",
"public UcMemberCollege(Name alias) {\n this(alias, UC_MEMBER_COLLEGE);\n }",
"Member createMember();",
"public Mytable(String alias) {\n this(DSL.name(alias), MYTABLE);\n }",
"private static String getAlias( TableMeta table ) {\n String subname = table.getName().replaceFirst( \"^[^\\\\.]*\\\\.\", \"\" );\n char letter = '\\0';\n if ( subname.length() > 0 ) {\n letter = subname.charAt( 0 );\n }\n if ( ( letter >= 'a' && letter <= 'z' ) ||\n ( letter >= 'A' && letter <= 'Z' ) ) {\n return new String( new char[] { letter } );\n }\n else {\n return \"t\";\n }\n }",
"public UcMemberCollege(String alias) {\n this(DSL.name(alias), UC_MEMBER_COLLEGE);\n }",
"static final public void TableAliasVariable() throws ParseException {\n /*@bgen(jjtree) dbRelAliasName */\n SimpleNode jjtn000 = new SimpleNode(JJTDBRELALIASNAME);\n boolean jjtc000 = true;\n jjtree.openNodeScope(jjtn000);Token t;\n try {\n t = jj_consume_token(Identifier);\n jjtree.closeNodeScope(jjtn000, true);\n jjtc000 = false;\n jjtn000.setText(t.image);\n } finally {\n if (jjtc000) {\n jjtree.closeNodeScope(jjtn000, true);\n }\n }\n }",
"TableReference getTableReference();",
"public RenderedMemberStatementRecord() {\n\t\tsuper(de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.RenderedMemberStatement.RENDERED_MEMBER_STATEMENT);\n\t}",
"Member getLocalMember();",
"public Mytable(Name alias) {\n this(alias, MYTABLE);\n }",
"@Test\r\n public void testImpliedName() {\r\n FieldReference fr = new FieldReference(new TableReference(\"Agreement\"), \"Test1\");\r\n assertEquals(\"Field reference implied name defaults to source field name\", fr.getImpliedName(), \"Test1\");\r\n fr.as(\"testName\");\r\n assertEquals(\"Field reference implied name uses alias if available\", fr.getImpliedName(), \"testName\");\r\n }",
"void makeSponsorTable(Table table, String organizationName);",
"public AccessSymbol(Symbol base, Symbol member) {\n this.base = base;\n this.member = member;\n buildName();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows to user all synonyms of a given word. | public String showSearchSynonym(String searchWord, ArrayList<String> words) {
StringBuilder stringBuilder = new StringBuilder("Your word \"" + searchWord + "\" has " + words.size()
+ (words.size() == 1 ? " synonym:\n" : " synonyms:\n"));
for (int i = 0; i < words.size(); i++) {
stringBuilder.append(words.get(i) + "\n");
}
return stringBuilder.toString();
} | [
"public final ArrayList getSynonyms(final String word) {\n System.setProperty(\"wordnet.database.dir\", \"/commons/student/2014-2015/\"\n + \"Thema11/Mkslofstra/WordNet-3.0/dict\");\n ArrayList synonyms = new ArrayList<String>();\n if (word != null) {\n // Concatenate the command-line arguments\n StringBuilder buffer = new StringBuilder();\n buffer.append(word);\n String wordForm = buffer.toString();\n // Get the synsets containing the word form\n WordNetDatabase database = WordNetDatabase.getFileInstance();\n Synset[] synsets = database.getSynsets(wordForm);\n // Display the word forms and definitions for synsets retrieved\n if (synsets.length > 0) {\n for (Synset synset : synsets) {\n String[] wordForms = synset.getWordForms();\n if (synset.getTagCount(wordForm) > 3) {\n synonyms.addAll(Arrays.asList(wordForms));\n }\n }\n } else {\n System.err.println(\"No synset exists that resembles \"\n + \"the word '\" + wordForm + \"'\");\n }\n } else {\n System.err.println(\"You must specify \"\n + \"a word where the synsets are needed from.\");\n }\n return synonyms;\n }",
"String getSynonyms();",
"List<String> getSynonyms();",
"public Set<String> get(String word) {\n return synonymsCache.getUnchecked(word);\n }",
"@Override\n public Set<String> load(String word) {\n WordnikAPIHandler wordnikConnection = new WordnikAPIHandler();\n return wordnikConnection.getSynonyms(word);\n }",
"@GetMapping(\"/{name}\")\n public ResponseEntity getSynonyms(@PathVariable String name) {\n ResponseEntity responseEntity = null;\n\n try {\n\n List<String> words = synonymService.getAllSynonyms(name);\n\n responseEntity = new ResponseEntity(words, HttpStatus.OK);\n } catch (WordDoesNotExistsException exception) {\n\n responseEntity = new ResponseEntity(exception.getMessage(), HttpStatus.NOT_FOUND);\n\n }\n\n\n return responseEntity;\n }",
"public static LinkedList<String> getSynonym(String word) {\n\t\tLinkedList<String> res = new LinkedList<String>();\n\t\tif (dict.containsKey(word)) {\n\t\t\tres = dict.get(word);\n\t\t}\n\t\treturn res;\n\t}",
"public Vector getSynonyms() {\n return getSynonyms(false);\n }",
"public String findSynonyms(String w) {\n\t\tint row = getRow(w);\n\t\tfor(int col = 0; col < words[row].length; col++) {\n\t\t\tif(w.equals(words[row][col])) {\n\t\t\t\treturn \"Synonyms: \" + synonyms[row][col];\n\t\t\t}\n\t\t}\n\n\t\tfor(row = 0; row < synonyms.length; row++) {\n\t\t\tfor(int col = 0; col < synonyms[row].length; col++) {\n\t\t\t\tif(synonyms[row][col] != null && synonyms[row][col].indexOf(w) != -1) {\n\t\t\t\t\tString[] syns = synonyms[row][col].split(\",\");\n\t\t\t\t\tString output = \"Synonyms: \" + words[row][col] + \", \";\n\t\t\t\t\tfor(int i = 0; i < syns.length; i++) {\n\t\t\t\t\t\tif(!w.equals(syns[i])) {\n\t\t\t\t\t\t\toutput += syns[i].trim() + \", \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn output.substring(0, output.length() - 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn \"- Word not found -\";\n\t}",
"public Set<String> hyponyms(String word) {\n HashSet<String> set = new HashSet<String>();\n for (Integer id: synsets.keySet()) {\n TreeSet<String> hs = synsets.get(id);\n if (hs.contains(word)) {\n for (String s: hs) {\n set.add(s);\n }\n TreeSet<Integer> ids = new TreeSet<Integer>();\n ids.add(id);\n Set<Integer> desc = GraphHelper.descendants(dg, ids);\n for (Integer i: desc) {\n for (String s: synsets.get(i)) {\n set.add(s);\n }\n }\n }\n }\n return set;\n }",
"public List<String> getSynonyms() {\n return synonyms;\n }",
"public Set<String> hyponyms(String word) {\n Set<Integer> synIDs = new TreeSet<Integer>();\n Set<Integer> synKeys = synsetMap.keySet();\n for (Integer id : synKeys) {\n if (synsetMap.get(id).contains(word)) {\n synIDs.add(id);\n }\n }\n Set<Integer> hypIDs = GraphHelper.descendants(g, synIDs);\n Set<String> result = new TreeSet<String>();\n\n for (Integer i : hypIDs) {\n ArrayList<String> al = synsetMap.get(i);\n result.addAll(al);\n }\n return result;\n }",
"public Set<String> hyponyms(String word) {\n Set<String> hyponyms = new HashSet<String>();\n Set<Integer> ids = new HashSet<Integer>();\n for (Integer key: synsetNouns.keySet()) {\n if (synsetNouns.get(key).contains(word)) {\n ids.add(key);\n }\n }\n Set<Integer> descendants = GraphHelper.descendants(hyponym, ids);\n for (Integer j: descendants) {\n for (String value: synsetNouns.get(j)) {\n hyponyms.add(value);\n }\n }\n return hyponyms;\n }",
"public Set<String> hyponyms(String word) {\n HashSet<String> allhyponyms = new HashSet<String>();\n int maxV = synset.size();\n // int maxV = 0;\n // for (Integer i : synset.keySet()) {\n // if (maxV < i) {\n // maxV = i;\n // }\n // }\n // maxV += 1;\n Digraph digraph = new Digraph(maxV);\n\n // ArrayList<Integer> hypoKeys = new ArrayList<Integer>();\n // for (int i = 0; i < hyponym.size(); i++) {\n // hypoKeys.add(hyponym.get(0).get(i));\n // }\n \n for (ArrayList<Integer> a : hyponym) {\n int key = a.get(0);\n for (int j = 1; j < a.size(); j++) {\n digraph.addEdge(key, a.get(j));\n }\n }\n\n // get synonyms (in same synset), ex. given \"jump\", will get \"parachuting\" as well as \"leap\"\n ArrayList<String> strArray = new ArrayList<String>();\n for (Integer k : getSynsetKeys(word)) {\n strArray.addAll(synset.get(k));\n }\n for (String str : strArray) {\n allhyponyms.add(str);\n }\n\n // for each int from set<int> with all synset IDS\n for (Integer s : GraphHelper.descendants(digraph, getSynsetKeys(word))) {\n for (String t : synset.get(s)) {\n allhyponyms.add(t);\n }\n }\n return allhyponyms;\n }",
"public ArrayList<TermRelationship> getTermSynonyms(String lookupTerm, boolean strictMatch) throws Exception\n {\n ArrayList<TermRelationship> mySynonyms = this.getTermRelationships(QueryType.NOUN_SYNONYM, lookupTerm, \"\", strictMatch);\n \n return mySynonyms;\n }",
"public Vector <QueryTermVector> getTermsSynonyms (String queryStr, Analyzer analyzer){\n\t\t//Declare the vector containing the vector of synonyms\n\t\tVector <QueryTermVector> synonyms = new Vector <QueryTermVector>();\n\n\t\t//Parse the search query and retrieve its terms\n\t\tQueryTermVector queryTermsVector = new QueryTermVector( queryStr, analyzer );\n\t\tString [] termsText = queryTermsVector.getTerms();\n\n\t\t//Search for each term synonyms and append them\n\t\tStringBuffer synBuffer = new StringBuffer();\n\t\tfor (int i = 0; i < queryTermsVector.size(); i++) {\n\t\t\tString termText = termsText[i];\n\t\t\tString synonym = getSynonyms(termText, 1);\n\t\t\tsynBuffer.append(synonym + \" \");\n\t\t}\n\t\t//create synonym vector and add it to synonyms\n\t\tQueryTermVector synonymsVec = new QueryTermVector (synBuffer.toString(), analyzer);\n\t\tsynonyms.add(synonymsVec);\n\n\t\treturn synonyms;\n\t}",
"Collection<String> getSynonyms(String[] zw, String termType, boolean includeTerm);",
"public Set<String> getSynonyms() {\n Set<String> synonyms = new TreeSet<>();\n if (pos == null)\n return synonyms;\n POS wnPos = PosUtils.getWordNetPOS(pos);\n if (dict == null || wnPos == null)\n return synonyms;\n try {\n String lemma_ = getLemma();\n lemma_ = lemma_ != null ? lemma_ : this.token;\n final IndexWord word = dict.lookupIndexWord(wnPos, lemma_);\n PointerTargetNodeList synList = PointerUtils.getInstance().getSynonyms(word.getSense(1));\n for (Object o : synList) {\n PointerTargetNode node = (PointerTargetNode) o;\n for (net.didion.jwnl.data.Word hword : node.getSynset().getWords())\n synonyms.add(hword.getLemma());\n }\n } catch (JWNLException ex) {\n Logger.getLogger(Word.class.getName()).log(Level.SEVERE, null, ex);\n }\n return synonyms;\n }",
"private static List<String> getSynonyms(OWLOntology ontology, OWLEntity entity) {\n List<String> synonyms = new ArrayList<>();\n for (OWLAnnotationAssertionAxiom ax : ontology.getAnnotationAssertionAxioms(entity.getIRI())) {\n String apIRI = ax.getProperty().getIRI().toString();\n if (synonymProperties.contains(apIRI)) {\n OWLLiteral lit = ax.getValue().asLiteral().orNull();\n if (lit != null) {\n synonyms.add(lit.getLiteral());\n }\n }\n }\n Collections.sort(synonyms);\n return synonyms;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assigns rating to app given by a user. | public void rate(User user, short rating) throws IllegalArgumentException{
Iterator<AppRating> ratedApps = appRating.iterator();
//checks is the user has already rated the app
while(ratedApps.hasNext()) {
AppRating thisApp = ratedApps.next();
if(thisApp.getApp().equals(this)) {
if(thisApp.getUser().equals(user)){
throw new IllegalArgumentException("App already rated.");
}
}
}
appRating.add(new AppRating(this,user,rating));
appRated = true;
} | [
"public void setUserRating(String userRating) {\n this.userRating = userRating;\n }",
"public static void addRatingToUser(User user, double rating) {\n user.updateRating(rating);\n }",
"public void addRating(int userIndex, double rating) {\n if (!this.usersRatings.add(userIndex, rating))\n throw new IllegalArgumentException(\"Provided rating already exist in item: \" + id);\n\n min = Math.min(rating, min);\n max = Math.max(rating, max);\n average =\n (this.usersRatings.size() <= 1)\n ? rating\n : ((average * (this.usersRatings.size() - 1)) + rating) / this.usersRatings.size();\n }",
"public final boolean setUserRating(User user, PresentationShell pres, int userRating)\n\t{\n\t\tStatement userCommand = null;\n\t\tStatement presCommand = null;\n\t\tboolean hasSucceeded = true;\n\t\t\n\t\tint presID = SQLTools.checkPresID(presCon, pres);\n\t\t\n\t\tint currentUserRating = SQLTools.checkPreviousRating(presID, userTrackingCon, user);\n\t\tint newUserRating = 0;\n\t\t\n\t\tif(currentUserRating == -1)\n\t\t{\n\t\t\tswitch(userRating)\n\t\t\t{\n\t\t\t\tcase -1:\n\t\t\t\t\tnewUserRating = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\tnewUserRating = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tnewUserRating = 2;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse if(currentUserRating == 0)\n\t\t{\n\t\t\tswitch(userRating)\n\t\t\t{\n\t\t\tcase -1:\n\t\t\t\tnewUserRating = -1;\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\t\tnewUserRating = 0;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tnewUserRating = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse if(currentUserRating == 1)\n\t\t{\n\t\t\t\tswitch(userRating)\n\t\t\t\t{\n\t\t\t\tcase -1:\n\t\t\t\t\tnewUserRating = -2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\tnewUserRating = -1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tnewUserRating = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t\t\n\t\tString updateUserRating = \"UPDATE \" + user.getUsername() + userTrackingTable\n\t\t\t\t+ \" SET userrating = \" + userRating \n\t\t\t\t+ \" WHERE presentationid = \" + presID \n\t\t\t\t+ \" AND presentationname = '\" + pres.getTitle() + \"'\";\n\t\t\n\t\ttry {\n\t\t\tuserCommand = userTrackingCon.createStatement();\n\t\t\tuserCommand.executeUpdate(updateUserRating);\n\t\t\tSystem.out.println(\"Updated user tracking, now updating global rating...\");\n\t\t}\n\t\tcatch (SQLException e) \n\t\t{\n\t\t\te.printStackTrace();\n \t\thasSucceeded = false;\n\t\t}\n\t\tfinally \n\t\t{\n\t\t\tif (userCommand != null)\n\t {\n\t \ttry\n\t \t{\n\t \t\tuserCommand.close();\n\t \t} \n\t \tcatch (SQLException e) \n\t \t{\n\t \t\te.printStackTrace();\n\t \t} \n\t }\n\t\t}\n\t\t\n\t\tString updateGlobalRating = \"UPDATE \" + presTable + \" SET totalrating = totalrating+\" + newUserRating + \" WHERE id = \" + presID;\n\t\t\n\t\ttry \n\t\t{\n\t\t\tpresCommand = presCon.createStatement();\n\t\t\tpresCommand.executeUpdate(updateGlobalRating);\n\t\t\tSystem.out.println(\"Updated global rating\");\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n \t\thasSucceeded = false;\n\t\t}\n\t\tfinally \n\t\t{\n\t\t\tif (presCommand != null)\n {\n \ttry\n \t{\n \t\tpresCommand.close();\n \t} \n \tcatch (SQLException e) \n \t{\n \t\te.printStackTrace();\n \t} \n }\n\t\t}\n\t\treturn hasSucceeded;\n\t}",
"Integer rateSong(User user, Song toRate, Integer rating)\n\t\tthrows IllegalArgumentException, IndexOutOfBoundsException, NullPointerException;",
"public void setRating(int rating);",
"public void rateUser(String userId, final int rating) {\n // determine which user is submitting the rating, and which user is getting rated\n // set the database reference to the user which is getting rated\n if(userId.equals(userId1)) {\n user2TotalScore += Double.valueOf(rating);\n user2TotalRatings++;\n user1HasRated = true;\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"matches\").child(matchId);\n mDatabase.child(\"user1HasRated\").setValue(true);\n\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"users\").child(userId2);\n }\n else {\n user1TotalScore += Double.valueOf(rating);\n user1TotalRatings++;\n user2HasRated = true;\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"matches\").child(matchId);\n mDatabase.child(\"user2HasRated\").setValue(true);\n\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"users\").child(userId1);\n }\n // update the rating\n mDatabase.addListenerForSingleValueEvent(new ValueEventListener() {\n // add rating to the total rating score, and then increment the rating count\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // get the current values from the db\n double totalScore = dataSnapshot.child(\"totalScore\").getValue(Double.class);\n double totalReviews = dataSnapshot.child(\"totalReviews\").getValue(Double.class);\n\n // update\n totalScore += Double.valueOf(rating);\n totalReviews++;\n\n // add in the updated values to the db\n mDatabase.child(\"totalScore\").setValue(totalScore);\n mDatabase.child(\"totalReviews\").setValue(totalReviews);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"matches\").child(matchId);\n mDatabase.child(\"userRated\").setValue(true);\n }",
"public void askUserToRateApp(final Context context) {\n\t\tnew AlertDialog.Builder(context)\n\t\t\t\t.setTitle(\"Please Rate Me\")\n\t\t\t\t.setMessage(\"If you find this app useful, please support the developers by rating it 5 stars on Google Play.\")\n\t\t\t\t.setPositiveButton(\"Rate Now\", new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t\t\t\tlaunchAppInGooglePlay(context);\n\t\t\t\t\t}\n\t\t\t\t}).setNegativeButton(\"Rate Later\", null).show();\n\t}",
"public void setUserRating(User user, int activityId, int rating) {\n\t\tif (user == null) return;\n\t\ttry {\n\t\t\tString update = \"INSERT INTO users_activities_log(user_id, activity_id, rating) VALUES(\\\"\" + getUserId(user) + \"\\\", \" + \"\\\"\" + activityId + \"\\\", \\\"\" + rating + \"\\\")\"\n\t\t\t\t\t+ \" ON DUPLICATE KEY UPDATE rating=\"+rating+\";\";\n\t\t\tstmt.executeUpdate(update);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace(); \n\t\t}\n\t}",
"public void setRating(int rating)\n {\n this.rating = rating;\n }",
"public void setRating(int rating){\n this.rating = rating;\n }",
"public synchronized void addRating(Rating rating){\n boolean found = false;\n String userPk = rating.getUserPk();\n for(Rating r : ratings){\n if(r.getUserPk().equals(userPk)) {\n int diff = rating.getValue() - r.getValue();\n r.setValue(rating.getValue());\n averageRating = (averageRating * ratings.size() + diff ) / ratings.size();\n found = true;\n break ;\n }\n }\n if (!found) {\n averageRating = (averageRating * ratings.size() + rating.getValue()) / (ratings.size()+1);\n ratings.add(rating);\n }\n }",
"void setRating(float rating);",
"void addRatingToAsset(String userId,\n String assetGUID,\n StarRating starRating,\n String review,\n boolean isPublic) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;",
"private void updateUserRatingStars(Long currentKey) {\r\n\t\tSwagItemRating swagItemRatingForKey = loginInfo.getSwagItemRating(currentKey);\r\n\t\tInteger userRating = (swagItemRatingForKey==null) ? 0 : swagItemRatingForKey.getUserRating();\r\n\t\t\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tif (i<userRating) {\r\n\t\t\t\tstarImages.get(i).setSrc(\"/images/starOn.gif\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstarImages.get(i).setSrc(\"/images/starOff.gif\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void rateApp() {\n try {\n Intent rateIntent = rateIntentForUrl(\"market://details\");\n startActivity(rateIntent);\n }\n catch (ActivityNotFoundException e) {\n Intent rateIntent = rateIntentForUrl(\"https://play.google.com/store/apps/details\");\n startActivity(rateIntent);\n }\n }",
"private void rateMovie() {\n\t\tScanner sc= new Scanner(System.in);\n\n\t\tMovieManager mm = new MovieManager();\n\n\t\tSystem.out.println(\"Which movie would you like to rate/review?\");\n\t\tmm.listAll();\n\t\tint movieID = InputBoundary.getIntInput(\"Choose an option\");\n\n\t\tint rating;\n\t\tdo {\n\t\t\trating = InputBoundary.getIntInput(\"Please give your rating (between 1-5)\");\n\t\t} while (rating < 0 || rating > 5);\n\n\t\tSystem.out.println(\"Would you like to give a review?(Y/N)\");\n\t\tString reviewOption = sc.nextLine();\n\t\tString reviewInput = null;\n\n\t\tif (reviewOption.compareToIgnoreCase(\"y\") == 0) {\n\t\t\tSystem.out.println(\"Please enter your review:\");\n\t\t\treviewInput = sc.nextLine();\n\t\t}\n\t\tReview r = mm.addReviewToMovie(movieID, rating, account, reviewInput);\n\t\tSystem.out.println(\"Review Added.\");\n\t\tPrinter.printReviewInfo(r);\n\t}",
"public void setRating(Integer value)\n\t{\n\t}",
"public static void addRating(Vendor vendor, Rating rating, User user)\n throws EnvoyServletException\n {\n try\n {\n ServerProxy.getVendorManagement().addRating(user, vendor, rating);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the list of team member IDs | public List<String> getTeamMembers() {
return teamMembers;
} | [
"private List<Integer> getHuntersMemberId(final int gameid, final int memberid) {\n if (gameid < 1) {\n throw new IllegalArgumentException(\"Game id is incorrect\");\n }\n\n List<Integer> members = null;\n try {\n members = templGame.queryForList(sql71, new Object[] { gameid, memberid }, Integer.class);\n } catch (final Exception e) {\n LOGGER.error(e.getMessage());\n }\n return members;\n }",
"public ArrayList<Integer> getMemberIDs() {\n return memberIDs;\n }",
"public java.lang.String getTeamIds()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TEAMIDS$14);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public List<MemberDto> getMembersOfTeam( TeamDto team );",
"public List<String> getParticipantIDs() {\n List<String> ids = new ArrayList<String>();\n try {\n for (Participant p : getParticipants()) {\n ids.add(p.getID());\n }\n }\n catch (IOException ioe) {\n // nothing to do - returns empty list\n }\n return ids;\n }",
"public String getMemberLvIds() {\n return memberLvIds;\n }",
"public List<User> getTeamMembers() {\n try {\n return teamManager.getMembersOfTeam(teamId);\n } catch (SQLException sqlException) {\n ErrorDialogFactory.createErrorDialog(\n sqlException, frame, \"The members could not be displayed.\");\n }\n return null;\n }",
"int getTeamId();",
"public org.apache.xmlbeans.XmlString xgetTeamIds()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TEAMIDS$14);\n return target;\n }\n }",
"public static Collection<String> getTeamMembers(Object packet){\n try{\n @SuppressWarnings(\"unchecked\")\n Collection<String> identifiers = (Collection<String>) VERSION_DATA.getFieldPlayerNames().get(packet);\n\n if(identifiers == null){\n return Collections.emptyList();\n }\n\n return identifiers;\n } catch(IllegalAccessException e){\n // should not happen if the getting works\n throw new RuntimeException(\"Error getting players\", e);\n }\n }",
"List<Team> getTeamsFromApi(List<Long> teamIds);",
"protected List< String > getSteamIDsList() {\n\t\t\treturn steamIDs;\n\t\t}",
"java.util.List<java.lang.Long> getGiftIdsList();",
"java.util.List<java.lang.Long> getPlayerBagIdList();",
"List<Team> findByIds(List<Long> teamIds);",
"public Set<URI> getMemberIdentities() {\n\t\tSet<URI> result = new HashSet<>();\n\t\tfor (URI memberURI : members) {\n\t\t\tTopLevel member = this.getSBOLDocument().getTopLevel(memberURI);\n\t\t\tif(member != null) {\n\t\t\t\tresult.add(member.getIdentity());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public String memberList() {\n\treturn roomMembers.stream().map(id -> {\n\t try {\n\t\treturn api.getUserById(id).get().getNicknameMentionTag();\n\t } catch (InterruptedException | ExecutionException e) {\n\t\te.printStackTrace();\n\t }\n\t return \"\";\n\t}).collect(Collectors.joining(\"\\n\"));\n }",
"public com.google.protobuf.ProtocolStringList\n getInviteeIdsList() {\n return inviteeIds_;\n }",
"Collection<String> getListOfTenantIds();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ scenario : success scenario , customer list of same city returned successfully input : mock List class , stubbed list expectation : customer list having same city will be x displayed in postman | @Test
public void test_allCustomerByLocation() {
String city="Panji";
List<Customer> customerList = mock(List.class);
when(customerService.viewCustomerList(city)).thenReturn(customerList);
List<CustomerDetails> desiredList = mock(List.class);
when(util.toDetailList(customerList)).thenReturn(desiredList);
List<CustomerDetails> resultList = controller.allCustomerDetails(city);
Assertions.assertNotNull(resultList);
Assertions.assertSame(desiredList, resultList);
verify(customerService).viewCustomerList(city);
verify(util).toDetailList(customerList);
} | [
"@Test\n\t// @Disabled\n\tvoid testViewCustomerbyVehicleLocation() {\n\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"tom@gmail.com\");\n\t\tVehicle vehicle1 = new Vehicle(101, \"TN02J0666\", \"bus\", \"A/C\", \"prime\", \"chennai\", \"13\", 600.0, 8000.0);\n\t\tVehicle vehicle2 = new Vehicle(102, \"TN02J0776\", \"car\", \"nonA/C\", \"prime\", \"chennai\", \"13\", 600.0, 8000.0);\n\t\tList<Vehicle> vehicleList =new ArrayList<>();\n\t\tvehicleList.add(vehicle1);\n\t\tvehicleList.add(vehicle2);\n\t\tcustomer1.setVehicle(vehicleList);\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tMockito.when(custRep.findbyVehicleLocation(\"chennai\")).thenReturn(customerList);\n\t\tList<Customer> cust3 = custService.findbyVehicleLocation(\"chennai\");\n\t\tassertEquals(1, cust3.size());\n\t}",
"@Test\n void verify_getCustomers_return_with_2_customers() {\n Mockito.when(repositoryMock.findAll()).thenReturn(CustomerFixture.customersMarcAndMartin);\n\n //When\n List<Customer> result = serviceUnderTest.getCustomers();\n\n //Then i expect to get 2 customers\n assertThat(result).isNotNull();\n assertThat(result.size()).isEqualTo(2);\n\n }",
"@Test\n @DisplayName(\"Amount and regions test\")\n public void test6() {\n\n Response response= given().accept(\"application/json\").\n queryParam(\"region\",\"Turkey\").\n queryParam(\"amount\",\"3\").\n get();\n response.then().assertThat().statusCode(200).\n contentType(\"application/json; charset=utf-8\").\n\n log().all(true);\n\n\n\n List<Map<?,?>> collection = response.jsonPath().get();\n //set does not accept duplicates\n //HashSet is common implementation\n\n Set<String> names = new HashSet<>();\n for(int i= 0; i < collection.size();i++){\n names.add(collection.get(i).get(\"name\") + \" \" + collection.get(i).get(\"surname\"));\n\n }\n System.out.println(names);\n assertTrue(names.size() == 3,\"duplicated names\");\n }",
"@Test\n\tpublic void locationsSuccessResponseWithCityandCount() {\n\t\tResponse response = locationsLib.getLocations(user_key, \"Bengaluru\",\"\",\"\",\"2\");\n\t\tMap<String, String> locationMap = new HashMap<String, String>();\n\t\tassertThat(\"Did not get Success Response\", \n\t\t\t\tresponse.getStatusCode()==HTTPStatus.STATUS_OK.getValue());\n\t\t\n\t\tList<Object> locationsList = (List<Object>) response.jsonPath().getList(\"location_suggestions\");\n\t\tlocationMap = response.jsonPath().getMap(\"location_suggestions[0]\");\n\t\t\n\t\tassertThat(\"Locations count is not correct\", \n\t\t\t\tlocationsList.size()<=2);\n\t\t\n\t\tassertThat(\"entity_type should be city\", \n\t\t\t\tlocationMap.get(\"entity_type\").equals(\"city\"));\n\t\t\n\t\tassertThat(\"verify city_id: Failed\", response.jsonPath().get(\"location_suggestions.city_id[0]\").toString(), \n\t\t\t\tis(equalTo(\"4\")));\n\t\t\n\t\tassertThat(\"city_name should be Bengaluru\", \n\t\t\t\tlocationMap.get(\"city_name\").equals(\"Bengaluru\"));\n\t\t\n\t\tassertThat(\"country_name should be India\", \n\t\t\t\tlocationMap.get(\"country_name\").equals(\"India\"));\n\t\t\n\t\t\n\t}",
"@Test\n public void cityBetween200and400Test() throws CityNotFoundException {\n List<City> cityList = new ArrayList<>();\n City city1 = new City(1,\"mar del plata\", 223, null);\n City city2 = new City(1,\"mar chiquita\", 221, null);\n City city3 = new City(1,\"mar de las pampas\", 222, null);\n cityList.add(city1);\n cityList.add(city2);\n cityList.add(city3);\n \n when(service.getCityBetween200And400()).thenReturn(cityList);\n ResponseEntity<List<City>> response = cityController.getCityBetween200And400();\n \n assertEquals(200, response.getStatusCodeValue());\n assertEquals(cityList, response.getBody());\n assertTrue(!city1.toString().isEmpty());\n }",
"@Test\n public void test4() throws ApiException {\n LocationResponse locationResponse = locationsApi.getLocation(\"Lucknow\", 26.8467, 26.8467, 10);\n int cityId = locationResponse.getLocation_suggestions().get(0).getCity_id();\n\n EstablishmentResponse establishmentResponse = establismentsApi.getEstablishment(cityId,26.8467, 26.8467);\n int id = establishmentResponse.getEstablishments().get(0).getEstablishment().getId();\n String name = establishmentResponse.getEstablishments().get(0).getEstablishment().getName();\n\n RestaurantResponse restaurantResponse = searchApi.searchByEstablishment(\"city\",cityId,String.valueOf(id),26.8467, 26.8467,null,null);\n for (RestaurantRes rest: restaurantResponse.getRestaurants()) {\n System.out.println(\"Name : \"+name);\n System.out.println(rest.getRestaurant().getEstablishment());\n Assert.assertTrue(rest.getRestaurant().getEstablishment().contains(name));\n// Assert.assertEquals(name,rest.getRestaurant().getEstablishment().get(0));\n }\n }",
"@Test\n public void getPersonsListTest() {\n \tHelloWorldImpl hello=new HelloWorldImpl();\n \tPersonList personInputList=new PersonList();\n \tList<PersonRequest> pl=new ArrayList<PersonRequest>();\n \tPersonRequest pr1=new PersonRequest();\n \tpr1.setName(\"Satish\");\n \tpr1.setSurname(\"Namdeo\");\n \tpr1.setLocation(\"Servicesource\");\n \tPersonRequest pr2=new PersonRequest();\n \tpr2.setName(\"Rahul\");\n \tpr2.setSurname(\"Jain\");\n \tpr2.setLocation(\"Bigdata\");\n \tpl.add(pr1);\n \tpl.add(pr2);\n \tpersonInputList.setPersonList(pl);\n \tPersonList actualResult=hello.getPersonsList(personInputList);\n \t//check for result is not empty.\n \tassertNotNull(\"Result is not null\",actualResult);\n \t\n \tPersonRequest pr3=new PersonRequest();\n \tpr1.setName(\"Sakhshi\");\n \tpr1.setSurname(\"Jain\");\n \tpr1.setLocation(\"Servicesource\");\n \tpl.add(pr3);\n \t\n \t//check for equality\n \tPersonRequest[] actualResultArray = actualResult.getPersonList().toArray(new PersonRequest[actualResult.getPersonList().size()]);\n \tPersonRequest[] expectedArray = pl.toArray(new PersonRequest[pl.size()]);\n \tassertArrayEquals(\"list elements are not equal\",expectedArray, actualResultArray);\n \t//System.out.println(\"personsListDisplayTest result : \"+result.getPersonList().size());\n }",
"@Test\n\t// @Disabled\n\tvoid testViewCustomerbyVehicleType() {\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"tom@gmail.com\");\n\t\tVehicle vehicle1 = new Vehicle(101, \"TN02J0666\", \"car\", \"A/C\", \"prime\", \"goa\", \"13\", 600.0, 8000.0);\n\t\tVehicle vehicle2 = new Vehicle(102, \"TN02J0666\", \"car\", \"A/C\", \"prime\", \"goa\", \"13\", 600.0, 8000.0);\n\t\tList<Vehicle> vehicleList =new ArrayList<>();\n\t\tvehicleList.add(vehicle1);\n\t\tvehicleList.add(vehicle2);\n\t\tcustomer1.setVehicle(vehicleList);\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tMockito.when(custRep.findbyType(\"car\")).thenReturn(customerList);\n\t\tList<Customer> cust3 = custService.findbyType(\"car\");\n\t\tassertEquals(1, cust3.size());\n\t}",
"@Test\n public void testGetCitiesUSA() throws NotFoundException {\n System.out.println(\"getCities in USA\");\n List<CityDTO> cities = facade.getCities(23424977);\n assertEquals(78, cities.size());\n }",
"@Test\n\t// @Disabled\n\tvoid testViewAllCustomer() {\n\t\tCustomer customer1 = new Customer(1, \"tom\", \"son\", \"951771122\", \"tom@gmail.com\");\n\t\tCustomer customer2 = new Customer(2, \"jerry\", \"lee\", \"951998122\", \"jerry@gmail.com\");\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tcustomerList.add(customer2);\n\t\tMockito.when(custRep.findAll()).thenReturn(customerList);\n\t\tList<Customer> customer = custService.findAllCustomer();\n\t\tassertEquals(2, customer.size());\n\t}",
"@Test\n\tpublic void testGetEmailResidentsCityGiven_whenCityIsCulver_thenGetAllEmailsOfResidentsCulverCity() {\n\t\t// GIVEN\n\t\tString city = \"Culver\";\n\t\twhen(personDAOMock.getPersons()).thenReturn(mockList);\n\t\t// WHEN\n\t\tList<String> listEmailResidentsCityCulver = personServiceTest.getEmailResidents(city);\n\t\t// THEN\n\t\t// the list obtained contain 4 elements\n\t\tverify(personDAOMock, times(1)).getPersons();\n\t\tassertEquals(4, listEmailResidentsCityCulver.size());\n\t\tassertEquals(\"jaboyd@email.com\", listEmailResidentsCityCulver.get(0));\n\t\tassertEquals(\"drk@email.com\", listEmailResidentsCityCulver.get(3));\n\t}",
"@Test\n public void testFoodListSearch() throws Exception {\n BasicFoodService basicFoodService = new BasicFoodService(persistanceFoodService_MOCK);\n List<BasicFood> basicFoodList = new ArrayList<>();\n basicFoodList.add(new BasicFood(foodName, 1, 1, 1, 1, 1, foodName));\n when(persistanceFoodService_MOCK.searchForFoodList(any(String.class))).thenReturn(basicFoodList);\n List<Portion> portionList = basicFoodService.foodListSearch(foodName);\n assertFalse(\"testFoodListSearch: positive\", portionList.isEmpty());\n }",
"@Test\n public void testList() throws Exception {\n \n when(customerService.get()).thenReturn(new ArrayList<>());\n \n mockMvc.perform(get(\"/customers\"))\n .andExpect(status().isOk())\n .andExpect(content().json(\"[]\"));\n }",
"@Test\n public void Tcase3(){\n\n Response response = given().accept(ContentType.JSON)\n .and().queryParam(\"q\", \"{region_id:3}\")\n .when().get(\"countries/{q}\");\n\n assertEquals(response.statusCode(),200);\n List<Integer> regionsId = response.path(\"items.regions_id\");\n\n for (int regionsid : regionsId) {\n System.out.println(regionsid);\n assertEquals(regionsid,3);\n }\n\n boolean hasmore = response.path(\"hasMore\");\n assertEquals(hasmore,\"false\");\n\n\n List<String> countryName = response.path(\"Country_name\");\n assertEquals(countryName,\"Australia,China,India,Japan,Malaysia,Singapore\");\n\n\n }",
"@Test\n public void getAllOrdersForCustomer_happyPath() {\n when(orderRepository.getAllRecords()).thenReturn(Arrays.asList(order1, order2, order3));\n when(order1.getCustomerId()).thenReturn(1);\n when(order2.getCustomerId()).thenReturn(2);\n when(order3.getCustomerId()).thenReturn(1);\n\n assertThat(orderService.getAllOrdersForCustomer(1)).containsOnly(order1, order3);\n verify(customerService, times(1)).verifyIfCustomerExists(1);\n }",
"@Test\r\n\tpublic void testListReviewByCustomerValid() throws Exception {\r\n\r\n\t\tReview review = new Review();\r\n\t\tCustomer c = new Customer();\r\n\t\tArrayList<Review> list = new ArrayList<>();\r\n\t\tlist.add(review);\r\n\t\tMockito.when(iReviewService.listAllReviewsByCustomer(c)).thenReturn(list);\r\n\t\treview.setReviewId(1);\r\n\t\tmvc.perform(get(\"/review/customer\").accept(\"application/json\").content(objectMapper.writeValueAsString(c)).contentType(\"application/json\")).andExpect(status().isOk());\r\n\t}",
"@Test\n\tpublic void requestDataForCustomer12212_checkAddressCity_expectBeverlyHills() {\n\n\t\tgiven().\n\t\t\tspec(requestSpec).\n\t\twhen().\n\t\tthen();\n\t}",
"@Test\n\tpublic void testGetEmailResident_whenCityIsCulverAndExist__thenReturnListOfEmail() throws Exception {\n\t\t// GIVEN\n\t\t// WHEN\n\t\t// THEN\n\t\tmockMvc.perform(get(\"/communityEmail?city=Culver\")).andExpect(status().isOk())\n\t\t\t\t.andExpect(jsonPath(\"$\").isArray()).andExpect(jsonPath(\"$.[0]\", is(\"jaboyd@email.com\")))\n\t\t\t\t.andExpect(jsonPath(\"$.[2]\", is(\"tenz@email.com\"))).andDo(print());\n\t}",
"@Test\n void test_getReviewMappingbycourseid() throws Exception{\n List<ReviewMapping> reviewList=new ArrayList<>();\n\n for(long i=1;i<6;i++)\n {\n reviewList.add( new ReviewMapping(i,new Long(1),new Long(1),\"good\",3));\n }\n Mockito.when(reviewRepository.findmapbycourseid(1L)).thenReturn(reviewList);\n List<ReviewMapping> ans=reviewService.getReviewByCourseId(1L);\n assertThat(ans.get(0).getId(),equalTo(1l));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes the scene to the register cars form/menu | @FXML
private void loadRegisterView() throws Exception{
Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("registerCar.fxml"));
Scene scene = new Scene(root);
getPrimaryStage().setTitle("Welcome");
getPrimaryStage().setScene(scene);
} | [
"public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }",
"private void doEncounter() {\n ApplicationController.changeScene(\"GUI/Encounter.fxml\");\n }",
"private void vehiclesButtonClick()\r\n\t{\r\n\t\tItemPage obj = new ItemPage(\"Vehicles\");\r\n\t\tstage.getScene().setRoot(obj.getRootPane());\r\n\t}",
"public void setSceneToInventoryScreen(){\n stage.setScene(inventoryScreenScene);\n }",
"@FXML\n public void changeSceneToContactUs(ActionEvent event) throws IOException{\n Parent guestUser;\n guestUser = FXMLLoader.load(getClass().getResource(\"/menu/contactUsFXML.fxml\"));\n Scene guestUserScene = new Scene(guestUser);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n window.setTitle(\"Contact information\");\n window.setScene(guestUserScene);\n window.show();\n }",
"public void addGenreAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Genre\", ViewNavigator.ADD_GENRE_SCENE);\n\t}",
"@FXML\n public void changeSceneToServices(ActionEvent event) throws IOException{\n Parent guestUser;\n guestUser = FXMLLoader.load(getClass().getResource(\"/menu/serviceFXML.fxml\"));\n Scene guestUserScene = new Scene(guestUser);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n window.setTitle(\"Our services\");\n window.setScene(guestUserScene);\n window.show();\n }",
"public void gotoVerReserva() {\n try {\n FXMLDatosReservaController verReserva = (FXMLDatosReservaController) replaceSceneContent(\"FXMLDatosReserva.fxml\");\n verReserva.setApp(this);\n //setTipoReserva(verReserva); //Setea el tipo de reserva\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void initNewUserScene() {\n this.newUserScene = new NewUserScene(WINDOW_WIDTH, WINDOW_HEIGHT);\n this.newUserScene.setButtonHandler((ActionEvent e) -> {\n Button button = (Button) e.getSource();\n switch (button.getText()) { \n case NewUserScene.NEW_USER_BACK:\n this.changeScene(this.loginScene);\n break;\n case NewUserScene.NEW_USER_REGISTER:\n this.register();\n break;\n }\n });\n }",
"public void handleRegisterButtonClick(ActionEvent event) {\n ViewManager.switchView(ViewManager.viewsEnum.REGISTER);\n\n }",
"@FXML\n public void changeSceneToAboutUs(ActionEvent event) throws IOException{\n Parent guestUser;\n guestUser = FXMLLoader.load(getClass().getResource(\"/menu/aboutFXML.fxml\"));\n Scene guestUserScene = new Scene(guestUser);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n window.setTitle(\"About CDBL\");\n window.setScene(guestUserScene);\n window.show();\n }",
"public void changeSceneToAddBookScene(ActionEvent event) throws IOException {\r\n\t\tParent BookAddFacility = FXMLLoader.load(getClass().getResource(\"BookAdd.fxml\"));\r\n\t\tScene BookAddFacilityview = new Scene(BookAddFacility);\r\n\t\tStage window = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n\t\twindow.setScene(BookAddFacilityview);\r\n\t\twindow.show();\r\n\t}",
"public void showRegister() {\n try {\n start(primaryStage);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@FXML\n public void aboutUsButtonPushed() {\n loadNextScene(\"/sample/Scene/aboutUsScene.fxml\");\n }",
"public void gotoCreateUser(){\n try {\n FXMLCreateUserController verCreateUser = (FXMLCreateUserController) replaceSceneContent(\"FXMLCreateUser.fxml\");\n verCreateUser.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@FXML\n public void changeSceneToEServices(ActionEvent event) throws IOException{\n Parent guestUser;\n guestUser = FXMLLoader.load(getClass().getResource(\"/menu/eServiceFXML.fxml\"));\n Scene guestUserScene = new Scene(guestUser);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n window.setTitle(\"Our E-services\");\n window.setScene(guestUserScene);\n window.show();\n }",
"public static void changeScenePractice() {\n PracticeViewController controller = practiceLoader.getController();\n controller.names(HomeViewController.getNamesForPracticeObservableList());\n controller.settingUserListView(PracticeViewController.getCurrentName(false));\n PlayRecordings.stopPlayRecording();\n _primaryStage.setScene(_practiceMenu);\n }",
"public void ChangeScene() throws IOException\n {\n Parent root = FXMLLoader.load(MainGUI.class.getResource(\"StudentEnvironment.fxml\"));\n Scene scene = new Scene(root);\n MainGUI.primaryStage.setScene(scene);\n MainGUI.primaryStage.show();\n }",
"@FXML\r\n void returnStaffScreen(ActionEvent event) throws Exception {\r\n \tGeneralMethods.ChangeScene(\"StaffMenu\", \"StaffMenu\");\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns List of anomalies when 1. There is no usage of nozzles 2. There is no refuels on tanks. 3. There is delta on TotalCounter 4. There is delta on tankmeasures 5. if tankDelta == totalCounterDelta | public Map<Integer, Map<Date, Double>> checkPipes() {
systemOutputFile.println("*************************************");
systemOutputFile.println("Checking system leakages...");
systemOutputFile.println("*************************************");
Map<Integer, HashMap<Date, Double>> totalCounterVolumeChanges = nozzles.getVolumeChanges();
Map<Integer, HashMap<Date, Double>> tankVolumeChanges = tanks.getVolumeChanges();
Map<Integer, Map<Date, Double>> anomalies = new HashMap<>();
for (Integer tankID : tanks.getTanksIndexes()) {
systemOutputFile.println("Checking pipelines system related to tank #" + tankID + "...");
Map<Date, Double> forTank = new HashMap<>();
HashMap<Date, Double> volumeChangesOnSystem = totalCounterVolumeChanges.get(tankID);
HashMap<Date, Double> volumeChangesOnTank = tankVolumeChanges.get(tankID);
for (Date changeDate : volumeChangesOnSystem.keySet()) {
if (!nozzles.dateInUsagePeriod(changeDate, tankID) && !refuels.dateInRefuelPeriod(changeDate, tankID)) {
Date tankMeasureDate = tanks.getNextTankMeasureAfter(changeDate, tankID);
Double elem1 = volumeChangesOnTank.get(tankMeasureDate);
Double elem2 = volumeChangesOnSystem.get(changeDate);
Double delta = volumeChangesOnTank.get(tankMeasureDate) - volumeChangesOnSystem.get(changeDate);
if (delta.equals(0D)) {
systemOutputFile.println("Leakage on pipes system detected at " + changeDate
+ ". System related to tank #" + tankID
+ ". \nPipeline leakage: "+ volumeChangesOnSystem.get(changeDate));
} else if(delta > 0 && !delta.equals(volumeChangesOnTank.get(tankMeasureDate))) {
systemOutputFile.println("Leakage on pipes system & tank detected at " + changeDate
+ ". System related to tank #" + tankID+". \nPipeline leakage: "+ delta
+ " \nTank leakage: "+ (volumeChangesOnTank.get(tankMeasureDate) - delta));
} else if(delta.equals(volumeChangesOnTank.get(tankMeasureDate))) {
systemOutputFile.println("Leakage on tank detected at " + changeDate
+ ". System related to tank #" + tankID+". \nTank leakage: "+volumeChangesOnTank.get(tankMeasureDate));
}
forTank.put(changeDate, volumeChangesOnSystem.get(changeDate));
}
}
anomalies.put(tankID, forTank);
}
// System.out.println("*************************************");
// System.out.println("Checking tank leakages...");
// System.out.println("*************************************");
// for(Integer tankID : anomalies.keySet()) {
// if(anomalies.get(tankID).isEmpty()) {
// //czyli wyciek jest tylko na orurowaniu bo tankMeasures == totalCounter
// anomalies.put(tankID, checkSingleTank(tankID));
// } else {
// //obsluzyc sytuacje, gdy delta < 0 - bo wtedy wyciek jest i tu i tu
//
//
// }
//
// }
systemOutputFile.close();
return anomalies;
} | [
"public Map<Integer, Map<Times, Double>> checkNozzles() {\r\n\t\tnozzleOutputFile.println(\"*************************************\");\r\n\t\tnozzleOutputFile.println(\"Checking nozzles\");\r\n\t\tnozzleOutputFile.println(\"*************************************\");\r\n\t\tMap<Integer, HashMap<Times, Double>> nozzleUsages = nozzles.getTransactionTotals();\r\n\t\tMap<Integer, HashMap<Date, Double>> tankEntities = tanks.getVolumeChanges();\r\n\t\tMap<Integer, Map<Times, Double>> anomalies = new HashMap<>();\r\n\r\n\t\tfor (Integer nozzID : nozzleUsages.keySet()) {\r\n\t\t\tnozzleOutputFile.println(\"Checking nozzle #\" + nozzID + \"... (tank #\" + nozzles.getNozzleAssign(nozzID) + \")\");\r\n\t\t\tMap<Times, Double> tankMeasuresFromNozzles = nozzleUsages.get(nozzID);\r\n\t\t\tHashMap<Date, Double> tankMeasuresFromTanks = tankEntities.get(nozzles.getNozzleAssign(nozzID));\r\n\t\t\tHashMap<Times, Double> forNozzle = new HashMap<>();\r\n\r\n\t\t\ttankMeasuresFromNozzles = tankMeasuresFromNozzles.entrySet().stream()\r\n\t\t\t\t\t.filter(e1 -> nozzles.dateInMultipleUsagePeriod(e1.getKey()))\r\n\t\t\t\t\t.collect(Collectors.toMap(e1 -> e1.getKey(), e1 -> e1.getValue()));\r\n\t\t\tDouble val2 = 0D;\r\n\t\t\tfor (Times usageDate : tankMeasuresFromNozzles.keySet()) {\r\n\t\t\t\tfor (Date changeDate : tankMeasuresFromTanks.keySet()) {\r\n\t\t\t\t\tif (!refuels.dateInRefuelPeriod(usageDate.getTo(), nozzles.getNozzleAssign(nozzID))\r\n\t\t\t\t\t\t\t&& nozzles.dateInUsagePeriod(changeDate, nozzles.getNozzleAssign(nozzID))) {\r\n\t\t\t\t\t\tval2 = val2 + tankMeasuresFromTanks.get(changeDate);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tDouble val1 = tankMeasuresFromNozzles.get(usageDate);\r\n\t\t\t\t\tDouble delta = val1 - val2;\r\n\t\t\t\t\tif (delta != 0.0) {;\r\n\t\t\t\t\t\tforNozzle.put(usageDate, delta);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tMap<Times, Double> newMap = forNozzle.entrySet().stream().filter(StreamUtils.distinctByKey(e1 -> e1.getKey().getFrom())).collect(Collectors.toMap(e1 -> e1.getKey(), e1 -> e1.getValue()));\r\n\t\t\tfor(Times period : newMap.keySet()) {\r\n\t\t\t\tif (newMap.get(period) != 0.0) {\r\n\t\t\t\t\tnozzleOutputFile.println(\"Anomaly detected at \" + period + \" related to nozzle \" + nozzID);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tanomalies.put(nozzID, forNozzle);\r\n\t\t}\r\n\t\tnozzleOutputFile.close();\r\n\t\treturn anomalies;\r\n\t}",
"public void analysis()\n {\n\n if( !listContainsRole(blueTeam, 1))\n System.out.println(\"You team does not have a tank.\");\n if( !listContainsRole(blueTeam, 2))\n System.out.println(\"You team does not have an attacker.\");\n if( !listContainsRole(blueTeam, 3))\n System.out.println(\"You team does not have a healer.\");\n\n //check to see if red team counters anything on the blue team\n\n checkForCounters(blueTeam, redTeam);\n }",
"public static ArrayList<Float> plannedTestWrongMeasure(int anomaly, int amountAnomalies, float time) {\r\n ArrayList<Float> humChangePlanned = new ArrayList<>();\r\n\r\n int counter = 1;\r\n\r\n // set the values of the optimal room temperature depending on the specifie room\r\n setOptimumHumidity(\"a\");\r\n\r\n int simTime = (int) ((time * 3600) + 0.5);\r\n // calculate the start value of the simulation\r\n startHum = calcNextValue(optimumRHLL, optimumRHUL);\r\n humChangePlanned.add(startHum);\r\n\r\n // Calculate the list of increasing temperature\r\n while (humChangePlanned.size() < simTime) {\r\n while (nextValue <= optimumRHUL) {\r\n if (counter < simTime) {\r\n lowerLimNext = (float) humChangePlanned.get(counter - 1);\r\n upperLimNext = (float) humChangePlanned.get(counter - 1) + max_rateOfChange;\r\n nextValue = calcNextValue(lowerLimNext, upperLimNext);\r\n humChangePlanned.add(nextValue);\r\n counter++;\r\n } else {\r\n break;\r\n }\r\n\r\n }\r\n while (nextValue >= optimumRHLL) {\r\n\r\n if (counter < simTime) {\r\n upperLimNext = (float) humChangePlanned.get(counter - 1);\r\n lowerLimNext = (float) humChangePlanned.get(counter - 1) - max_rateOfChange;\r\n nextValue = calcNextValue(lowerLimNext, upperLimNext);\r\n humChangePlanned.add(nextValue);\r\n counter++;\r\n } else {\r\n break;\r\n }\r\n\r\n }\r\n }\r\n \r\n // Calculate a List of random Positions for the outliers\r\n Set randomPosList = calcRandomList(amountAnomalies, humChangePlanned);\r\n\r\n if (anomaly != 6) {\r\n humChangePlanned = manipulate(randomPosList, anomaly, humChangePlanned);\r\n\r\n }\r\n\r\n return humChangePlanned;\r\n\r\n }",
"@Override\n public SortedMap<Double, DoubleSummaryStatistics> getUtilizationHistory() {\n final Stream<Entry<Double, Double>> utilizationEntriesStream = this.vmCreatedList\n .stream().distinct()\n .map(Vm::getUtilizationHistory)\n .map(this::remapUtilizationHistory)\n .flatMap(vmUtilization -> vmUtilization.entrySet().stream());\n\n //Groups the CPU utilization entries by the time the values were collected\n SortedMap<Double, DoubleSummaryStatistics> utilizationDummys=utilizationEntriesStream\n .collect(\n groupingBy(Entry::getKey, TreeMap::new,\n \t\tsummarizingDouble(Entry::getValue))\n );\n for (Map.Entry<Double, DoubleSummaryStatistics> entry : utilizationDummys.entrySet()) {\n \tfinal double utilizationPercent = entry.getValue().getSum();\n \tif(utilizationPercent > 1.2) {// this is to check if utilization of a host exceeds the max\n \t\tSystem.out.println(\"Value is greater then 1\"+ utilizationPercent);\t\n \t}\n \t\n }\n return utilizationDummys;\n }",
"private void genAnomalies() {\n\t\tAnomalyGenerator ag = new AnomalyGenerator();\n\t\t//System.out.println(ag.listAnomaly.length);\n\t\tfor (int i = 0; i < randInt(1, 5); i++) {\n\t\t\tif (randInt(0, 1) == 1) {\n\t\t\t\tanomalies.add(ag.genAnom());\n\t\t\t}\n\t\t}\n\t}",
"@VisibleForTesting\n long getSkippedHealthChecks() {\n return skippedHealthChecks;\n }",
"public int[] coldM(ArrayList<LottoDay> list)\n\t{\n\t\tint counter=0; //counts occurrences\n\t\tint low=200; //sets low to 200\n\t\tint [] megaF = new int [28]; //creates an array to store occurrences of mega numbers\n\t\tint[] check = new int [5]; //creates an array to store lowest mega numbers\n\t\tfor(int i=0; i<list.size();i++)\n\t\t{\n\t\t\tone = list.get(i);//get object\n\t\t\tmega= one.getMega();//get the mega number of the object\n\t\t\tfor(int j=0; j<megaF.length;j++)\n\t\t\t{\n\t\t\t\t//if mega number equals index\n\t\t\t\tif(mega==j)\n\t\t\t\t{\n\t\t\t\t\tcounter++; //add one to count\n\t\t\t\t\tmegaF[j]=counter+megaF[j]; //add one to occurrence\n\t\t\t\t\tcounter=0; //reset counter\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\t\tlow=200;//resets low\n\t\t//looks for the lowest number in the mega number array\n\t\tfor(int j=0; j<check.length;j++)\n\t\t{\n\t\t\tfor(int i=0; i<megaF.length;i++)\n\t\t\t{\n\t\t\t\t//if mega number is not zero and the occurrence is lower than low\n\t\t\t\tif(megaF[i]<low &&megaF[i]!=0)\n\t\t\t\t{\n\t\t\t\t\tlow = megaF[i]; //occurrence becomes new low\n\t\t\t\t\tindex=i;//store index\n\t\t\t\t\tcheck[j]=i;//store the mega number\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tlow=200;//reset low\n\t\t\tmegaF[index]=0;//set occurrence of the number to zero\n\t\t}\n\t\t//return 5 lowest mega numbers\n\t\treturn check;\n\t}",
"Integer getMissedCleavages();",
"int getComparisons();",
"protected double[] getUtilizationHistory() {\n\t\tdouble[] utilizationHistory = new double[PowerVm.HISTORY_LENGTH];\n\t\tdouble hostMips = getTotalMips();\n\t\tfor (PowerVm vm : this.<PowerVm> getVmList()) {\n\t\t\tfor (int i = 0; i < vm.getUtilizationHistory().size(); i++) {\n\t\t\t\tutilizationHistory[i] += vm.getUtilizationHistory().get(i) * vm.getMips() / hostMips;\n\t\t\t}\n\t\t}\n\t\treturn MathUtil.trimZeroTail(utilizationHistory);\n\t}",
"public int[] hotM(ArrayList<LottoDay> list)\n\t{\n\t\tint [] megaF = new int [28]; //stores number of occurrences for each mega number\n\t\tint[] check = new int [5]; //stores the highest mega numbers\n\t\tint counter =0; //counts occurrences\n\t\tint high=0; //checks for the highest mega numbers\n\n\t\t//fill megaF with the number of occurrences\n\t\tfor(int i=0; i<list.size();i++)\n\t\t{\n\t\t\tone = list.get(i);//get the object\n\t\t\tmega= one.getMega();//get the mega number of that object\n\t\t\tfor(int j=0; j<megaF.length;j++)\n\t\t\t{\n\n\t\t\t\tif(mega==j)\n\t\t\t\t{\n\t\t\t\t\tcounter++; //add one to counter\n\t\t\t\t\tmegaF[j]=counter+megaF[j]; //store occurrence\n\t\t\t\t\tcounter=0; //reset counter\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\t\thigh=0;//reset high\n\t\tfor( int j=0; j<check.length;j++)\n\t\t{\n\t\t\tfor(int i=0; i<megaF.length;i++)\n\t\t\t{\n\t\t\t\t//if occurrence beats high\n\t\t\t\tif(megaF[i]>high)\n\t\t\t\t{\n\t\t\t\t\thigh = megaF[i];//occurrence becomes new high\n\t\t\t\t\tcheck[j]=i;//store the index of highest occurrence\n\t\t\t\t\tindex=i;//store index\n\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\thigh=0;//reset high\n\t\t\tmegaF[index]=0;//set highest index to zero \n\t\t}\n\n\n\t\treturn check; //return 5 highest mega numbers\n\n\n\t}",
"public static void printMissings(int[] numbers, int total){\n BitSet bs = new BitSet(numbers.length);\n for(int i : numbers){\n bs.set(i -1);\n }\n int diff = total - numbers.length;\n for(int i = 0; i < diff; i++ ){\n int missing = bs.nextClearBit(0);\n System.out.println(missing + 1);\n bs.set(missing);\n }\n \n }",
"@Override\n\tpublic Integer getMissedCleavages() {\n\t\treturn null;\n\t}",
"public int getMissedCleavages() {\n if (!psmList.isEmpty()) {\n return psmList.get(0).getMissedCleavages();\n }\n\n return -1;\n }",
"public static ArrayList<Float> plannedTestHumChange(String room, int event, int anomaly, float time,\r\n int amountEvents, int amountAnomalies) {\r\n ArrayList<Float> humChangePlanned = new ArrayList<>();\r\n float timeForEvent = timeForEvent(time, amountEvents);\r\n float tempChange = calcMaxHumChange(timeForEvent);\r\n int counter = 1;\r\n int simTimeOne = (int) (timeForEvent + 0.5);\r\n\r\n // set the values of the optimal room humidity depending on the specifie room\r\n setOptimumHumidity(room);\r\n\r\n // definiere, wo die Simulation beginnen soll --> Nach testfall entscheiden\r\n // Wenn HumAnstieg, dann Obergrenze - (humChange/2);\r\n // Wenn HumAbfall, dann Untergrenze + (HumChange/2);\r\n\r\n switch (event) {\r\n case 1:\r\n startHum = optimumRHUL - (tempChange / 2);\r\n\r\n humChangePlanned.add(0, startHum);\r\n // Calculate the list of increasing humidity\r\n tempForward = startHum;\r\n for (int j = 1; j < simTimeOne; j++) {\r\n valueNotRounded = tempForward + max_rateOfChange;\r\n tempForward = valueNotRounded;\r\n humChangePlanned.add((float) (Math.round(valueNotRounded * 100) / 100.0));\r\n counter++;\r\n }\r\n\r\n for (int i = 1; i < ((amountEvents * 2) - 1); i++) {\r\n if (i % 2 == 0) {\r\n for (int j = 0; j <= simTimeOne; j++) {\r\n humChangePlanned.add(humChangePlanned.get(j));\r\n }\r\n } else if (i % 2 == 1) {\r\n for (int j = 1; j < simTimeOne; j++) {\r\n humChangePlanned.add(humChangePlanned.get(simTimeOne - j));\r\n }\r\n }\r\n\r\n }\r\n break;\r\n case 2:\r\n float tempStartTemp = optimumRHLL + (tempChange / 2);\r\n startHum = (float) (Math.round((tempStartTemp * 100) / 100.0));\r\n\r\n humChangePlanned.add(0, startHum);\r\n // Calculate the list of increasing humidity\r\n\r\n tempForward = startHum;\r\n for (int j = 0; j < simTimeOne; j++) {\r\n valueNotRounded = tempForward - max_rateOfChange;\r\n humChangePlanned.add((float) (Math.round((valueNotRounded) * 100) / 100.0));\r\n counter++;\r\n }\r\n\r\n for (int i = 1; i < ((amountEvents * 2) - 1); i++) {\r\n if (i % 2 == 0) {\r\n for (int j = 0; j <= simTimeOne; j++) {\r\n humChangePlanned.add(humChangePlanned.get(j));\r\n }\r\n } else if (i % 2 == 1) {\r\n for (int j = 0; j <= simTimeOne; j++) {\r\n\r\n humChangePlanned.add(humChangePlanned.get(simTimeOne - j));\r\n }\r\n }\r\n\r\n }\r\n break;\r\n\r\n }\r\n if (anomaly != 6) {\r\n // Calculate a List of random Positions for the outliers\r\n Set manipulatePosList = calcRandomList(amountAnomalies, humChangePlanned);\r\n humChangePlanned = manipulate(manipulatePosList, anomaly, humChangePlanned);\r\n\r\n }\r\n\r\n return humChangePlanned;\r\n\r\n }",
"public int[] coldN(ArrayList<LottoDay> list)\n\t{ \n\t\tint low=200;//set low to 200\n\t\tint[] numF = new int [48]; //create array of occurrences\n\t\tint[] check = new int [5]; //create an array for the first five numbers and the five lowest numbers\n\t\tint counter =0; //counts number of occurrences\n\t\t//cold numbers for 1-47\n\t\tfor(int i=0; i<list.size();i++)\n\t\t{\n\t\t\tone = list.get(i);//get object\n\t\t\tcheck = one.getWNum();//store the 5 lotto numbers\n\t\t\tfor(int j=0; j<numF.length;j++)\n\t\t\t{\n\t\t\t\tfor(int k =0; k<check.length;k++)\n\t\t\t\t{\n\t\t\t\t\t//if lotto number equals the index\n\t\t\t\t\tif(check[k]==j)\n\t\t\t\t\t{\n\t\t\t\t\t\tcounter++; //add one to counter\n\t\t\t\t\t\tnumF[j]=counter+numF[j];//add one to occurrence\n\t\t\t\t\t\tcounter=0;//reset counter\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//check for lowest number\n\t\tfor(int j=0; j<check.length; j++)\n\t\t{\n\t\t\tfor(int i=0; i<numF.length;i++)\n\t\t\t{\n\t\t\t\t//occurrence isn't zero and is lower than low\n\t\t\t\tif(numF[i]<low &&numF[i]!=0)\n\t\t\t\t{\n\t\t\t\t\tlow = numF[i]; //set low to new low of occurrence\n\t\t\t\t\tcheck[j]=i; //store new low occurrence\n\t\t\t\t\tindex=i; //store index of occurrence\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tlow=200;//reset low\n\t\t\tnumF[index]=0;//sets the lowest occurrence to zero\n\n\t\t}\n\n\n\n\t\treturn check;//return 5 lowest numbers\n\n\n\t}",
"public void counters() \n {\n Card[] hanRay= new Card[hand.size()];\n hanRay = hand.toArray(hanRay);\n\n for (int i=0; i<hanRay.length; i++)\n {\n for (int j=0; j<hanRay.length; j++)\n {\n if (j==i) continue;\n if (hanRay[i].num==hanRay[j].num)\n {\n likeNumb.add(hanRay[i]);\n likeNumb.add(hanRay[j]);\n }\n\n if (hanRay[i].suit==hanRay[j].suit)\n {\n likeSuit.add(hanRay[i]);\n likeSuit.add(hanRay[j]); \n }\n }\n }\n \n sameCard(likeNumb);\n flushes(likeSuit);\n }",
"private List<DatanodeUsageInfo> determineExpectedUnBalancedNodes(\n double threshold) {\n double lowerLimit = averageUtilization - threshold;\n double upperLimit = averageUtilization + threshold;\n\n // use node utilizations to determine over and under utilized nodes\n List<DatanodeUsageInfo> expectedUnBalancedNodes = new ArrayList<>();\n for (int i = 0; i < numberOfNodes; i++) {\n if (nodeUtilizations.get(numberOfNodes - i - 1) > upperLimit) {\n expectedUnBalancedNodes.add(nodesInCluster.get(numberOfNodes - i - 1));\n }\n }\n for (int i = 0; i < numberOfNodes; i++) {\n if (nodeUtilizations.get(i) < lowerLimit) {\n expectedUnBalancedNodes.add(nodesInCluster.get(i));\n }\n }\n return expectedUnBalancedNodes;\n }",
"public int[] getFootnoted() {\n \treturn getStatInts(TextStat.miscFootnTo);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all the added emitters. | public List<Emitter> getEmitters()
{
return Collections.unmodifiableList(allEmitters);
} | [
"public Enumeration getAllAppenders() {\n synchronized (myAppenders) {\n return myAppenders.getAllAppenders();\n }\n }",
"public synchronized List<EventListener> getListeners() {\n \treturn listeners;\n }",
"public Enumeration getAllListeners() {\r\n return this.elements();\r\n }",
"public Iterator<Object> listeners() {\n return Arrays.asList(fListeners).iterator();\n }",
"public ArrayList<IObserver> getObservers() {\n ArrayList<IObserver> arlResult = new ArrayList<>();\n for (IObserver currObserver : this.observers) {\n arlResult.add(currObserver);\n }\n return arlResult;\n }",
"public List<T>\n\tgetListenersCopy()\n\t{\n\t\t\t\t\n\t\treturn( listeners );\n\t}",
"public List<Observer> getObservers() {\n return observers;\n }",
"public ArrayList<IObserver> getObservers(){\n ArrayList<IObserver> arlResult = new ArrayList<>();\n for (IObserver currObserver : observers){\n arlResult.add(currObserver);\n }\n return arlResult;\n }",
"public static ArrayList<HeadingListener> getListeners() {\n return _listeners;\n }",
"public List<IEventListener> getListeners() {\n \treturn _listeners;\n }",
"public final List<ItemContainerListener> getListeners() {\n return listeners;\n }",
"public IEventListener[] getListeners()\n\t\t{\n\t\t\tif (this.shouldRebuild())\n\t\t\t\tthis.buildCache();\n\t\t\treturn this.listeners;\n\t\t}",
"public synchronized List<ChangeEvent> allEvents() {\n try {\n return new ArrayList<ChangeEvent>(events);\n } finally {\n reset();\n }\n }",
"public List getListener() {\n return Collections.unmodifiableList(listeners);\n }",
"public ArrayList<Subscriber> getSubscribers() {\n ArrayList<Subscriber> subscribers = new ArrayList<>();\n subRep.findAll()\n .forEach(subscribers::add);\n return subscribers;\n }",
"public Emitter getEmitter()\n {\n return emit;\n }",
"public ArrayList<Node> getObservers() {\r\n\t\treturn observers;\r\n\t}",
"public List<LogEvent> getEvents() {\n return publicEvents;\n }",
"public List<Observer> getList() {\n return list;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new Additional models converter. | public AdditionalModelsConverter(ObjectMapperProvider springDocObjectMapper) {
this.springDocObjectMapper = springDocObjectMapper;
} | [
"@Bean\n\t@Lazy(false)\n\tAdditionalModelsConverter additionalModelsConverter() {\n\t\treturn new AdditionalModelsConverter();\n\t}",
"public UserConverter() {\n }",
"public ArtifactTechnologyConverter() {\n }",
"public CategoryConverter() {\r\n }",
"public IntegrationConverter() {\n entity = new Integration();\n }",
"public Converter newInstance() {\n\t\ttry {\n\t\t\treturn (converterClass==null) ? null : (Converter)converterClass.newInstance();\n\t\t} catch (InstantiationException ex) {\n\t\t\treturn null;\n\t\t} catch (IllegalAccessException ex) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public TipoProductoConverter() {\r\n }",
"public ConvertModel(Library in) {\n\t\tlibrary = in;\n\t\thold = new HashMap<String, DisplayFormat>();\n\t}",
"ModelNormalItem createModelNormalItem();",
"private void addConverter() {\n Map<String, String> ruleRegistry = (Map<String, String>) context.getObject(CoreConstants.PATTERN_RULE_REGISTRY);\n if (ruleRegistry == null) {\n ruleRegistry = new HashMap<String, String>();\n context.putObject(CoreConstants.PATTERN_RULE_REGISTRY, ruleRegistry);\n }\n ruleRegistry.putIfAbsent(CensorConstants.CENSOR_RULE_NAME, CensorConverter.class.getName());\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic Converter() {\n\t\tClass<?>[] generics = ClassUtil.getGenericArguments(Converter.class, getClass());\n\t\t\n\t\ttargetClass = (Class<T>) generics[0];\n\t\tformatType = (Class<F>) generics[1];\n\t}",
"public ModelConverter() {\n freemarkerConfig = new Configuration(Configuration.VERSION_2_3_23);\n freemarkerConfig.setWhitespaceStripping(true);\n freemarkerConfig.setDefaultEncoding(\"UTF-8\");\n freemarkerConfig.setLocale(Locale.US);\n freemarkerConfig.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\n }",
"private Converter() {\n // Nothing.\n }",
"public SourcesConverter() {\n }",
"private ConversionUtil() {\n super();\n }",
"Models createModels();",
"public XmlConverter() {\n\t\tinit();\t\t\t\n\t}",
"public interface ModelConverter {\n\n\tWorkingUnit convertFromDto(WorkingUnitDto workingUnitDto);\n\n\tWord convertFromDto(WordDto wordDto);\n\n\tWorkingUnitDto convertFromDomain(WorkingUnit workingUnit);\n\n\t// WordDto convertFromDomain (Word word);\n\tWordDtoImpl convertFromDomainImpl(Word word);\n\n\tPosAnnotation convertFromDto(PosAnnotationDto posDto);\n\n\tRectangleAnnotation convertFromDto(RectangleAnnotationDto raDto);\n\n\tFormAnnotation convertFromDto(FormAnnotationDto faDto);\n\n\tChapterRange convertFromDto(ChapterRangeDto crDto);\n\n\tLanguageRange convertFromDto(LanguageRangeDto lrDto);\n\n\tPosAnnotationDto convertFromDomain(PosAnnotation pos);\n\n}",
"public ConverterFactory() {\r\n\r\n _parserMap = new HashMap<>();\r\n _parserMap.put(FileFormats.TEXT.toString(), new TextParser());\r\n _parserMap.put(FileFormats.XML.toString(), new XmlParser());\r\n\r\n _writerMap = new HashMap<>();\r\n _writerMap.put(FileFormats.TEXT.toString(), new TextWriter());\r\n _writerMap.put(FileFormats.XML.toString(), new XmlWriter());\r\n\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the booelan value tapped to true. Units and Heroic support cards that are tapped cant interact this round. | public void tap() {
tapped = true;
} | [
"void setBrake(boolean isOn);",
"public void setBallTouched(Ball ball)\n {\n ballTouched = ball;\n }",
"public void setB(boolean bButton){\n\t\tif(Robot.getState() == State.AUTON)\n\t\t\tautonB = bButton;\n\t}",
"private void isKarakterBonusable() {\n try {\n Bonusable bonusable = (Bonusable) this.karakter;\n if (!bonusable.isBonusable()) {\n goudbutton.setDisable(true);\n }\n } catch (Exception e) {\n if (e instanceof ClassCastException) {\n goudbutton.setDisable(true); // Disable button\n } else {\n goudbutton.setDisable(false); // Enable button\n }\n }\n }",
"@Override\n public void switchHotTap() {\n\n if (bathTub.canTurnOnHotTap()) {\n bathTub.switchHotTap();\n\n if (bathTub.isHotTapON()) {\n fillHotWater();\n } else {\n stopHotTap();\n }\n }\n\n }",
"public void setFoodHit(boolean b) {\n this.foodHit = b;\n }",
"public void setBrake() {\n leftShooter.setNeutralMode(NeutralMode.Brake);\n rightShooter.setNeutralMode(NeutralMode.Brake);\n }",
"public void setBonus(boolean value) {\n bonus = value;\n }",
"public boolean getTap() {\n\t\treturn tapped;\n\t}",
"public void untap() {\n\t\ttapped = false;\n\t}",
"public void setIsToBeBilled(boolean value) {\n this.isToBeBilled = value;\n }",
"public void extraBounceTeamB(View view) {\n if (scoreTeamA == 1)\n extraBounceStateB = false;\n else {\n if (extraBounceStateB == true)\n scoreTeamA = scoreTeamA - 1;\n }\n displayForTeamA(scoreTeamA);\n check(scoreTeamA, scoreTeamB);\n }",
"public void setBomb(final boolean bombValue) {\n isBomb = bombValue;\n }",
"@Override\n public void activatePowerUp() {\n myBalls.get(0).ballPowerUp(MAKE_FIERY_BALL);\n }",
"public void setBakery (boolean b)\n {\n bakery = b;\n }",
"public static void betting()\n\t{\n\t\ttfBet.setEnabled(true);\n\t\tbtnPlay.setEnabled(true);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t}",
"public void extraBounceTeamA(View view) {\n if (scoreTeamB == 1)\n extraBounceStateA = false;\n else {\n if (extraBounceStateA == true)\n scoreTeamB = scoreTeamB - 1;\n }\n displayForTeamB(scoreTeamB);\n check(scoreTeamA, scoreTeamB);\n }",
"public void pickOrb(){\n onPillar = false;\n }",
"public void setHit(Boolean hit) {\n isHit = hit;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List triples = client.triples("test", 10); | @Test
public void test() {
List<Triple> triples2 = client.triplesSubject("wiki", "hossein", null, null, 10000);
} | [
"List<StringTriple> provideTriples(String propertyIri, int numberOfTriples);",
"ArrayList<Triple> getTriplesByType(String type);",
"public List<Tripulante> obtenerTripulantes();",
"public abstract String viewTrips(List<Trip> tripList);",
"default List<T> cloneTriples(List<T> triples) {\n var list = new java.util.ArrayList<T>();\n triples.forEach(triple -> list.add(cloneTriple(triple)));\n return list;\n }",
"public void testGetAllTrials() {\n exp = new Experiment(\"10\");\n ArrayList<Trial> toSet = this.createTrials();\n exp.setTrials(toSet);\n assertEquals(\"getAllTrials returns wrong amount\", 15, exp.getAllTrials().size());\n assertEquals(\"getAllTrials returns wrong trial\", \"0\", exp.getAllTrials().get(0).getId());\n assertEquals(\"getAllTrials returns wrong trial\", \"14\", exp.getAllTrials().get(exp.getAllTrials().size()-1).getId());\n\n }",
"List<ITrap> getAllTraps();",
"public List<TripDTO> findTripsByCountry(String country);",
"public static ArrayList<Trip> getTrips() {\r\n return trips;\r\n }",
"protected String[] getTriples() {\n\t\tString[] contents = new String[3];\n\t\tString message = \"\";\n\t\tint rowcount = tripleTable.getRowCount();\n\t\tlogger.log(Level.SEVERE, tripleTable.getText(0, 0));\n\t\twhile (rowcount > 1) {\n\t\t\tlogger.log(Level.SEVERE, \"Rowcount is: \" + rowcount);\n\n\t\t\tcontents[0] = (tripleTable.getText(rowcount - 1, 0));\n\t\t\tcontents[1] = (tripleTable.getText(rowcount - 1, 1));\n\t\t\tcontents[2] = (tripleTable.getText(rowcount - 1, 2));\n\t\t\tmessage += \"\\nSubject: \" + contents[0] + \"\\nPredicate: \" + contents[1] + \"\\nObject: \" + contents[2];\n\t\t\tlogger.log(Level.SEVERE, contents[1]);\n\t\t\ttripleTable.removeRow(rowcount - 1);\n\n\t\t\tfinal AsyncCallback<String[]> sendToTripleStore = new AsyncCallback<String[]>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tWindow.alert(\"FAILED TO UPLOAD\");\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(String[] result) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tWindow.alert(\"UPLOADED\");\n\t\t\t\t}\n\n\t\t\t};\n\t\t\tgreetingService.sendToTripleStore(contents, sendToTripleStore);\n\t\t\tlogger.log(Level.SEVERE, \"Uploaded a triple\");\n\t\t\trowcount = tripleTable.getRowCount();\n\t\t\t// logger.log(Level.SEVERE, \"rowcount= \" + rowcount);\n\t\t}\n\n\t\t// StringEscapeUtils seu = new StringEscapeUtils();\n\t\tHTML triples_sent = new HTML(message);\n\t\tdialogBoxContents.add(triples_sent);\n\t\tdialogBoxContents.add(close);\n\t\tdBox.setWidget(dialogBoxContents);\n\t\tdBox.center();\n\t\t// return new_triple_list;\n\t\treturn contents;\n\t}",
"public void testFindTripsByDestination() {\n em.getTransaction().begin();\n Trip trip1 = prepareTrip();\n trip1.setDestination(\"Greece\");\n tripDAOImpl.createTrip(trip1);\n Trip trip2 = prepareTrip();\n trip1.setDestination(\"Spain\");\n tripDAOImpl.createTrip(trip2);\n Trip trip3 = prepareTrip();\n trip1.setDestination(\"Greece\");\n tripDAOImpl.createTrip(trip3);\n em.getTransaction().commit();\n List<Trip> trips = tripDAOImpl.findTripsByDestination(\"Portugal\");\n assertEquals(0, trips.size());\n trips = tripDAOImpl.findTripsByDestination(\"Greece\");\n assertEquals(1, trips.size());\n trips = tripDAOImpl.findTripsByDestination(\"Spain\");\n assertEquals(2, trips.size());\n }",
"public void testGetTrip() {\n assertNull(tripDAOImpl.getTrip(Long.MIN_VALUE));\n em.getTransaction().begin();\n Trip trip = prepareTrip();\n tripDAOImpl.createTrip(trip);\n Long tripId = trip.getId();\n Trip result = tripDAOImpl.getTrip(tripId);\n em.getTransaction().commit();\n assertEquals(trip, result);\n assertTripDeepEquals(trip, result);\n }",
"public void testGetAllTrips() {\n em.getTransaction().begin();\n Trip trip1 = prepareTrip();\n Trip trip2 = prepareTrip(); \n tripDAOImpl.createTrip(trip1);\n tripDAOImpl.createTrip(trip2);\n em.getTransaction().commit();\n assertEquals(2, tripDAOImpl.getAllTrips().size());\n }",
"public Set<Triple> getTriplesForObject(DOReader reader)\n throws ResourceIndexException;",
"public static java.util.List<eu.strasbourg.service.gtfs.model.Trip>\n\t\tgetTrips(int start, int end) {\n\n\t\treturn getService().getTrips(start, end);\n\t}",
"@Test\n public void testW2WArrayList() throws Exception {\n HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, \"HelloServiceClientW2WComponent\");\n performTestArrayList(helloServiceClient);\n }",
"public static int getTripsCount() {\n\t\treturn getService().getTripsCount();\n\t}",
"public abstract int providedTriplesCount(TripleCollection base);",
"List<Client> getTousLesClients();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles expiring the session. | private void onExpire() {
if (isOpen()) {
LOGGER.debug("Expired session: {}", id);
this.id = 0;
this.state = State.EXPIRED;
closeListeners.forEach(l -> l.accept(this));
}
} | [
"void sessionExpired();",
"void expire(Session session);",
"void sessionInactivityTimerExpired(DefaultSession session, long now);",
"protected void processExpires() {\n\t\tlong timeNow = System.currentTimeMillis();\n\t\tString[] keys = null;\n\n\t\tif (!started) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tkeys = keys();\n\t\t} catch (IOException e) {\n\t\t\tlog(e.toString());\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = 0; i < keys.length; i++) {\n\t\t\ttry {\n\t\t\t\tStandardSession session = (StandardSession) this.load(keys[i]);\n\t\t\t\tif (!session.isValid()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint maxInactiveInterval = session.getMaxInactiveInterval();\n\t\t\t\tif (maxInactiveInterval < 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint timeIdle = (int) ((timeNow - session.getLastAccessedTime()) / 1000L);\n\t\t\t\tif (timeIdle >= maxInactiveInterval) {\n\t\t\t\t\tif (((PersistentManagerBase) manager).isLoaded(keys[i])) {\n\t\t\t\t\t\t// recycle old backup session\n\t\t\t\t\t\tsession.recycle();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// expire swapped out session\n\t\t\t\t\t\tsession.expire();\n\t\t\t\t\t}\n\t\t\t\t\tremove(session.getId());\n\t\t\t\t}\n\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tlog(e.toString());\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog(e.toString());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void invalidateSessions() {\n }",
"protected void doExpiration() {\n\t\tfinal Collection<Flow> expiredFlows = this.expire();\n\t\tif (!expiredFlows.isEmpty()) this.fireFlows(expiredFlows);\n\t}",
"public void invalidateSession(){\r\n\t\t// This will cause invalidation of the session by the ApplicationServlet\r\n\t\t// but not until all server messages are handled.\r\n\t\thttpSessionId = null;\r\n\t}",
"@Override\n public void run()\n {\n if(!m_oSession.isExpired())\n {\n m_oSession.remoteRenew();\n long lnInterval = Math.abs(System.currentTimeMillis()-m_oSession.getExpiry().getTime())/2;\n Application.getInstance().log(\n \"New session life [\" + m_oSession.getSessionID() + \"] ExpiryLength: \" + m_oSession.getExpiryLength() + \n \" NextExpiry: \" + m_oSession.getExpiry() + \" NextRenew: \" + lnInterval,\n LogType.TRACE());\n Application.getInstance().scheduleTask(new RenewSessionTask(m_oSession), lnInterval);\n }\n else\n {\n // TODO: need to check if this remove the task from memory\n this.cancel();\n m_oSession = null;\n }\n\n }",
"public int getSessionExpiration() {\n return sessionExpiration;\n }",
"public void onSessionDestroyed() {\n }",
"@Override\n public void handleTokenExpiration(){\n JWTToken.removeTokenSharedPref(this);\n }",
"void onTimerExpired();",
"@Override\n public void onSessionEnd(Context context, Date sessionEndDate, long sessionDurationInMinutes) {\n }",
"@RequestMapping(\"/sessionExpire\")\n\tpublic String getSessionExpirePage() {\n\t\treturn \"sessionExpire\";\n\t}",
"public int getSessionExpireRate();",
"public void removeExpiredSessions() {\r\n LOGGER.info(\"Cleaning up expired sessions...\");\r\n\r\n if (sessions != null) {\r\n long now = System.currentTimeMillis();\r\n sessions.keySet().forEach(key -> removeSession(key, now));\r\n }\r\n }",
"protected void notificationOnExpiration() {\n }",
"public Date getSessionExpiration() {\n return credentialsProvider.getSessionCredentitalsExpiration();\n }",
"void sessionResumed();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets feature extraction parameters vector | public final void setFeatureExtractionParams(Vector oParams)
{
setParams(oParams, FEATURE_EXTRACTION);
} | [
"public synchronized final void setFeatureExtractionParams(Vector poParams) {\n setParams(poParams, FEATURE_EXTRACTION);\n }",
"public synchronized final void addFeatureExtractionParams(Vector poParams) {\n addParams(poParams, FEATURE_EXTRACTION);\n }",
"public final void addFeatureExtractionParams(Vector oParams)\n\t{\n\t\taddParams(oParams, FEATURE_EXTRACTION);\n\t}",
"public synchronized final Vector getFeatureExtractionParams() {\n return getParams(FEATURE_EXTRACTION);\n }",
"void setFeatureExtraction(IFeatureExtraction fe);",
"public synchronized final void addFeatureExtractionParam(Object poParam) {\n addParam(poParam, FEATURE_EXTRACTION);\n }",
"protected abstract void setFeatures(Feature[] features);",
"public void setFeatureVector(double[][] featureVector) {\r\n\t\tthis.featureVector = featureVector;\r\n\t}",
"public final void addFeatureExtractionParam(Object oParam)\n\t{\n\t\taddParam(oParam, FEATURE_EXTRACTION);\n\t}",
"public ExtractionParameters(){\n\t\tif (!subset){\n\t\t\tstartFrame = 1;\n\t\t}\n\t}",
"public void setInstances(List<double[]> features) {\n\t\tthis.instances = features;\n\t}",
"public void setFeatures(java.lang.String features) {\r\n this.features = features;\r\n }",
"public void setFeature(vis.smart.webservice.ProteinFeaturesFeature[] feature) {\n this.feature = feature;\n }",
"public static native void Init_set_features(long this_ptr, long val);",
"public String getFeaturevector() {\n return featurevector;\n }",
"public DeftFeatureExtractor () {\n\t\tsuper();\n\t}",
"public FeatureVector(int numFeatures) {\n\t\tthis.features = new double[numFeatures]; \n\t}",
"private void createInstanceVector(){\n\t\tif(featureInstanceVectorListMap == null){\n\t\t\tfeatureInstanceVectorListMap = new HashMap<Feature, List<InstanceVector>>();\n\t\t}else{\n\t\t\tfeatureInstanceVectorListMap.clear();\n\t\t}\n\t\t\n\t\tif(featureAttributeNameListMap == null){\n\t\t\tfeatureAttributeNameListMap = new HashMap<Feature, List<String>>();\n\t\t}else{\n\t\t\tfeatureAttributeNameListMap.clear();\n\t\t}\n\t\t\n\t\t/*\n\t\t * FOR SEQUENCE FEATURES\n\t\t * For IE feature, it also run this code below, however it is overridden by the alphabet code following\n\t\t */\n\t\tList<InstanceVector> instanceVectorList;\n\t\tInstanceVector instanceVector;\n\t\tList<String> attributeNameList;\n\n\t\tSet<String> sequenceFeatureSet;\n\t\tList<String> sequenceFeatureList = new ArrayList<String>();\n\t\t\n\t\tfor (Feature feature : filteredActualFeatureSequenceFeatureSetMap.keySet()) {\n\t\t\tsequenceFeatureSet = filteredActualFeatureSequenceFeatureSetMap.get(feature);\n\t\t\t\n\t\t\tsequenceFeatureList.clear();\n\t\t\tsequenceFeatureList.addAll(sequenceFeatureSet);\n\t\t\t\n\t\t\tinstanceVectorList = new ArrayList<InstanceVector>();\n\t\t\t\n\t\t\tfor (InstanceProfile instanceProfile : instanceProfileList) {\n\t\t\t\tinstanceVector = new InstanceVector();\n\t\t\t\tinstanceVector.setLabel(instanceProfile.getLabel());\n\t\t\t\tinstanceVector.setName(instanceProfile.getName()); //Bruce 27.05.2014\n\t\t\t\tinstanceVector.setEncodedTrace(instanceProfile.getEncodedTrace()); //Bruce 27.05.2014\n\t\t\t\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Create instance vector based on encoded trace and the feature set\n\t\t\t\t */\n\t\t\t\tinstanceVector.setSequenceFeatureCountMap(featureExtraction\n\t\t\t\t\t\t.computeNonOverlapSequenceFeatureCountMap(encodingLength,\n\t\t\t\t\t\t\t\tinstanceProfile.getEncodedTrace(), sequenceFeatureSet));\n\t\t\t\t\n\t\t\t\tinstanceVector.standarizeNumericVector(sequenceFeatureList);\n\t\t\t\tinstanceVector.standarizeNominalVector(sequenceFeatureList);\n\t\t\t\tinstanceVectorList.add(instanceVector);\n\t\t\t}\n\t\t\tfeatureInstanceVectorListMap.put(feature, instanceVectorList);\n\t\t\tattributeNameList = new ArrayList<String>();\n\t\t\tattributeNameList.addAll(sequenceFeatureList);\n\t\t\tfeatureAttributeNameListMap.put(feature, attributeNameList);\n\t\t}\n\t\t\n\t\t/*\n\t\t * FOR ALPHABET FEATURES\n\t\t * For IE feature, this code below is run, thus overrides the above code for sequence feature.\n\t\t */\t\t\n\t\tMap<Set<String>, Set<String>> alphabetFeatureSetMap;\n\t\tList<Set<String>> alphabetFeatureList = new ArrayList<Set<String>>();\n\t\t\n\t\tfor(Feature feature : filteredActualFeatureAlphabetFeatureSetMap.keySet()){\n\t\t\talphabetFeatureSetMap = filteredActualFeatureAlphabetFeatureSetMap.get(feature);\n\t\t\talphabetFeatureList.clear();\n\t\t\talphabetFeatureList.addAll(alphabetFeatureSetMap.keySet());\n\t\t\t\n\t\t\tinstanceVectorList = new ArrayList<InstanceVector>();\n\t\t\tfor(InstanceProfile instanceProfile : instanceProfileList){\n\t\t\t\tinstanceVector = new InstanceVector();\n\t\t\t\tinstanceVector.setLabel(instanceProfile.getLabel());\n\t\t\t\tinstanceVector.setName(instanceProfile.getName()); //Bruce 27.05.2014\n\t\t\t\tinstanceVector.setEncodedTrace(instanceProfile.getEncodedTrace()); //Bruce 27.05.2014\n\n\t\t\t\tinstanceVector.setAlphabetFeatureCountMap(featureExtraction.computeNonOverlapAlphabetFeatureCountMap(encodingLength, instanceProfile.getEncodedTrace(), alphabetFeatureSetMap));\n\t\t\t\tinstanceVector.standarizeNumericVector(alphabetFeatureList);\n\t\t\t\tinstanceVector.standarizeNominalVector(alphabetFeatureList);\n\t\t\t\tinstanceVectorList.add(instanceVector);\n\t\t\t\t\n\t\t\t}\n\t\t\tfeatureInstanceVectorListMap.put(feature, instanceVectorList);\n\t\t\t\n\t\t\tattributeNameList = new ArrayList<String>();\n\t\t\tfor(Set<String> alphabet : alphabetFeatureList)\n\t\t\t\tattributeNameList.add(alphabet.toString());\n\n\t\t\t/*\n\t\t\t * Add the attribute names\n\t\t\t */\n\t\t\tfeatureAttributeNameListMap.put(feature, attributeNameList);\n\t\t}\n\t}",
"@Override\n public void setFeature(String feature) {\n this.exteriorFeature = feature;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the set of colors for the middle arc of the WiFi icon | private Color[] getMiddleArcColors()
{
return getColorsForState(this.iconPartStates[1]);
} | [
"private Color[] getInternalArcColors()\n {\n return getColorsForState(this.iconPartStates[2]);\n }",
"private Color[] getExternalArcColors()\n {\n return getColorsForState(this.iconPartStates[0]);\n }",
"private Color[] getCircleColors()\n {\n return getColorsForState(this.iconPartStates[3]);\n }",
"public static @ColorInt int getIconColor(float positionOffset,@ColorInt int startColor,@ColorInt int middleColor,@ColorInt int endColor,int step){\n\n if(startColor==Color.TRANSPARENT){\n if(positionOffset<0.5){\n if(middleColor==Color.TRANSPARENT)return middleColor;\n return Color.argb((int) (0xff*positionOffset*2),Color.red(middleColor),Color.green(middleColor),Color.blue(middleColor));\n }\n else if(positionOffset==0.5){\n return middleColor;\n }\n else {\n if(middleColor==Color.TRANSPARENT){\n if(endColor==Color.TRANSPARENT){\n return middleColor;\n }\n return Color.argb((int)(0xff-(2*0xff*positionOffset)),Color.red(endColor),Color.green(endColor),Color.blue(endColor));\n }\n else {\n if(endColor==Color.TRANSPARENT){\n return Color.argb((int) (0xff-(2*0xff*positionOffset)),Color.red(endColor),Color.green(endColor),Color.blue(endColor));\n }\n return BarUtils.getOffsetColor((float) ((positionOffset-0.5)*2),middleColor,endColor,step);\n }\n }\n }\n else if(middleColor==Color.TRANSPARENT){\n// if(positionOffset==0){\n// return\n// }\n if(positionOffset<0.5){\n //255->0\n return Color.argb((int) (0xff-(2*0xff*positionOffset)),Color.red(startColor),Color.green(startColor),Color.blue(startColor));\n }\n else if(positionOffset==0.5){\n return middleColor;\n }\n else {\n if(endColor==Color.TRANSPARENT){\n return Color.TRANSPARENT;\n }\n return Color.argb((int) (0xff-(2*0xff*positionOffset)),Color.red(endColor),Color.green(endColor),Color.blue(endColor));\n }\n }\n else if(endColor==Color.TRANSPARENT){\n if(positionOffset<0.5){\n return BarUtils.getOffsetColor(positionOffset*2,startColor,middleColor,step);\n }\n else if(positionOffset==0.5){\n return middleColor;\n }\n else {\n return Color.argb((int) (0xff-(2*0xff*positionOffset)),Color.red(middleColor),Color.green(middleColor),Color.blue(middleColor));\n }\n }\n else {\n if(positionOffset<0.5){\n return BarUtils.getOffsetColor(positionOffset*2,startColor,middleColor,step);\n }\n else if(positionOffset==0.5){\n return middleColor;\n }\n else {\n return BarUtils.getOffsetColor((float) ((positionOffset-0.5)*2),middleColor,endColor,step);\n }\n }\n }",
"private Color getCenterPixel(){\r\n\t\t//System.out.println(\"(\" + x + \", \" + y + \")\");\r\n\t\tint i = encrypted.getRGB(x, y);\r\n\t\tisAlreadyVisited[y][x] = true;\r\n\t\t//System.out.println(new Color(i));\r\n\t\treturn new Color(i);\r\n\t}",
"public String getIconHaloColor() {\n return iconHaloColor;\n }",
"public int getIconCustomColor() {\n int value;\n try {\n String[] splits = _icon.split(\"\\\\|\");\n value = Integer.valueOf(splits[3]);\n } catch (Exception e) {\n value = 0;\n }\n return value;\n }",
"public State getMiddleArcState()\n {\n return iconPartStates[1];\n }",
"public String getIconColor() {\n return iconColor;\n }",
"public void genColors() {\n int rInc = (255 - 96) / this.radius;\n int gInc = (255 - 63) / this.radius;\n int bInc = 31 / this.radius;\n for (int i = 0; i <= this.radius; i++) {\n Color color = new Color(255 - (rInc * i), 255 - (gInc * i), 0 + (bInc * i));\n this.lineColors.put(i, color);\n }\n }",
"private Color getMinimapDotColor(int typeIndex)\n\t{\n\t\tfinal int pixel = client.getMapDots()[typeIndex].getPixels()[1];\n\t\treturn new Color(pixel);\n\t}",
"private int getCurrentMainColor () {\n int translatedHue = 255 - ( int ) ( mCurrentHue * 255 / 360 );\n int index = 0;\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 0, ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255 - ( int ) i, 0, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, ( int ) i, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, 255, 255 - ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( ( int ) i, 255, 0 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 255 - ( int ) i, 0 );\n index++;\n }\n return Color.RED;\n }",
"String getStartColor();",
"public int getColor( int iC, int iR ) {\n \t return position >> ((6*(iR))+(2*(iC))) & 3;\r\n }",
"String getEndColor();",
"public static String[] getIcons() {\n String[] res = new String[crossbows.length];\n for (int i = 0; i < crossbows.length; i++) {\n res[i] = (String)crossbows[i][1];\n }\n return res;\n }",
"private int[] RGBManager() {\r\n\t\tint red, green, blue;\r\n\t\tred = getDec();\r\n\t\tgreen = (red%80)+60;\r\n\t\tblue = (red+green)/2;\r\n\t\treturn new int[] {red, green, blue};\r\n\t}",
"int[] getPossibleColors();",
"public String getPieceColor(){\n\t\t\n\t\tif(xPosition>=ColumnNumber.firstColumn.ordinal() && xPosition<=ColumnNumber.eightColumn.ordinal() && xPosition>=RowNumber.firstRow.ordinal() && xPosition<=RowNumber.eightRow.ordinal()){\n\t\t\t\n\t\t\tif(isIcon){\n\t\t\t\treturn piece.getColor();\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a collection of dudge.db.Language objects to a collection of String objects. | static public Collection<String> convertCollection(Collection<Language> langs) {
Collection<String> stringCollection = new ArrayList<>();
for (Language l : langs) {
stringCollection.add(l.getName());
}
return stringCollection;
} | [
"public static <T> List<String> stringList(Collection<? extends T> original ){\r\n\t\tList<String> rList = new ArrayList<String>();\r\n\t\tfor ( T t : original )\r\n\t\t\trList.add( t.toString() );\r\n\t\t\r\n\t\treturn rList;\t\t\r\n\t}",
"public List<String> getLtrLanguages();",
"@SuppressWarnings({ \"rawtypes\" })\r\n\tpublic static List<String> getListStrings(final AbstractCollection collection) {\r\n\t\tif ((null != collection) && (collection.size() > 0)) {\r\n\t\t\tfinal List<String> result = new ArrayList<String>();\r\n\t\t\tif (collection.iterator().next() instanceof Object) {\r\n\t\t\t\t// treat as an object\r\n\t\t\t\tfor (final Object o : collection) {\r\n\t\t\t\t\tif (null != o) {\r\n\t\t\t\t\t\tresult.add(o.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// treat as a primitive\r\n\t\t\t\tfinal Iterator it = collection.iterator();\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\tresult.add(String.valueOf(it.next()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"public static List findAllLanguages() {\n List results = null;\n\n try {\n results = new Chm62edtLanguageDomain().findOrderBy(\"NAME_EN\");\n if (null == results) {\n return new Vector(0);\n }\n } catch (Exception ex) {\n // If exception occurrs, return an empty list!\n ex.printStackTrace(System.err);\n results = new Vector(0);\n }\n return results;\n }",
"public static <T> Collection<String> toString(Collection<T> collection) {\n\t\tCollection<String> strings = new ArrayList<String>();\n\t\tfor (T item : collection)\n\t\t\tstrings.add(item.toString());\n\t\treturn strings;\n\t}",
"public String getLanguages() {\n\t\t// If nothing is yet on the list, english is used as default.\n\t\tif (mLanguagesList.size() == 0) {\n\t\t\taddLanguage(\"English\");\n\t\t\treturn \"English\";\n\t\t}\n\n\t\t// In any other case, we create the list with the whole list of\n\t\t// languages\n\t\tString languages = \"\";\n\t\tfor (int i = 0; i < mLanguagesList.size(); i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tlanguages = languages.concat(\",\");\n\t\t\t}\n\t\t\tlanguages = languages.concat(mLanguagesList.get(i));\n\t\t}\n\t\treturn languages;\n\t}",
"Set<String> listTranslations(String category);",
"private ArrayList<String> transformQueries() {\n\t\tArrayList<Query> blogQueries = mw.getQueries();\n\t\tArrayList<String> convQueries = new ArrayList<String>();\n\t\t\n\t\tfor (Query q: blogQueries) {\n\t\t\tString str = q.toString();\n\t\t\t// if the query contains a variable (e.g. 'hot(p25)'), we need to translate it.\t\t\t\n\t\t\tif (str.contains(\"(\") && str.contains(\")\")) {\n\t\t\t\tstr = translateObjectsInQuery(q);\n\t\t\t}\n\t\t\tconvQueries.add(str);\n\t\t}\n\t\treturn convQueries;\n\t}",
"List<String> getVoices(String lang);",
"public ArrayList<String> getLanguagesList(){\n \tif (languagesList != null){\n \t\treturn languagesList;\n \t}\n \t\n\t\tArrayList<String> results = new ArrayList<String>();\n\t \tString language;\n\t \tfor(FilmData film : films){\n\t \t\tIterator<String> it = film.getLanguages().iterator();\n\t \t\twhile(it.hasNext()){\n\t \t\t\tlanguage = it.next();\n\t \t\t\t\n\t \t\t\tresults.add(language);\n\t \t\t}\n\t \t}\n \treturn results;\n }",
"String[] getLanguageList(InputStream inputStream) throws CaptionConverterException;",
"public List<String> toStringList() {\n int tam = this.dic.size(); // Tamaño del diccionario.\n List<String> list = new ArrayList<String>(); // Objeto lista.\n Iterator<Word> q = this.dic.iterator(); // Objeto iterador.\n for (int i=0; i<tam; i++) {\n Word word = q.next(); // Devuelve el proximo objeto Word.\n String add_word = word.getWord(); // Lo transforma en String.\n list.add(add_word); // Lo agrega a la lista.\n }\n return list;\n }",
"private List<String> toStringList(List<Rule> ruleCollection) {\r\n\t\tList<String> stringCollection = new ArrayList<String>(ruleCollection.size());\r\n\t\tfor(int i = -1; ++i < ruleCollection.size();)\r\n\t\t\tstringCollection.add(ruleCollection.get(i).getId());\r\n\t\t\r\n\t\treturn stringCollection;\r\n\t}",
"List<Countrylanguage> selectAll();",
"public native void GetLoadedLanguagesAsVector(StringGenericVector langs);",
"public List<String> stringy() {\n\t\t\tList<String> temp = new ArrayList<>();\n\t\t\t// add all the file names\n\t\t\ttemp.addAll(getFileNames());\n\t\t\t// add all the directories [indicated by a \"-\"]\n\t\t\tfor (DirectoryObjects t : subdirectories) {\n\t\t\t\ttemp.add(t.name);\n\t\t\t}\n\n\t\t\treturn temp;\n\t\t}",
"public static String[] getLanguageList() {\n return languageList;\n }",
"private String getWebTranslations() {\n\n StringBuilder str = new StringBuilder(\"\\n\");\n for (String lang : app.getLanguages()) {\n\n str.append(\"$translateProvider.translations('\")\n .append(lang)\n .append(\"', {\\n\");\n\n // Construct a properties object with all language-specific values from all included dictionaries\n Properties langDict = dictionaryService.getDictionariesAsProperties(WEB_DICTIONARIES, lang);\n\n // Generate the javascript key-values\n langDict.stringPropertyNames().stream()\n .sorted()\n .forEach(key -> {\n String value = langDict.getProperty(key);\n str.append(String.format(\"'%s'\", key))\n .append(\" : \")\n .append(encodeValue(value))\n .append(\",\\n\");\n });\n\n str.append(\"});\\n\");\n }\n\n str.append(\"$translateProvider.preferredLanguage('\")\n .append(app.getDefaultLanguage())\n .append(\"');\\n\");\n\n return str.toString();\n }",
"private static List<MotherTongueLangData> generateListFromLangs(List<Lang> inLangs) {\n\t\tfinal List<MotherTongueLangData> langDataList = new ArrayList<MotherTongueLangData>();\n\n\t\tfor (final Lang tempLang : inLangs) {\n\t\t\tlangDataList.add(new MotherTongueLangData(tempLang));\n\t\t}\n\n\t\treturn Collections.unmodifiableList(langDataList);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ addEdible Adds an edible to the db Parameters: | String addEdible(Edible edible); | [
"String updateEdible(String edibleToUpdate, Edible edible);",
"public void addEducation(Education e) {\n ed.add(e);\n}",
"private void addArticle() {\n\t\tAdminComposite.display(\"\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\tQuotationDetailsDTO detail = new QuotationDetailsDTO();\n\t\ttry {\n\t\t\tdetail = createQuotationDetail(detail);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (validateMandatoryParameters(detail)) {\n\t\t\taddToArticleTable(detail);\n\t\t}\n\t}",
"public static void addExpert(expert e) {\n\t\tSession session = m_sf.openSession();\n\t\tsession.beginTransaction();\n\t\t// add expert\n\t\tSystem.out.println(\"start add expert...\\n\");\n\t\tsession.save(e);\n\t\tSystem.out.println(\"complete add expert...\\n\");\n\t\tsession.getTransaction().commit();\n\t\tsession.close();\n\t}",
"void add(@Nonnull Education education);",
"void addDegreeProgramme(DegreeProgramme degreeProgramme);",
"public abstract void addDietParameter(IDietParameter dietParameter);",
"public void addDesenhavel(Desenhavel novoElemento);",
"public void addEducation(EducationalInfo edu) {\n education.add(edu);\n }",
"public Builder addFlags(io.opencannabis.schema.product.EdibleProduct.EdibleFlag value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureFlagsIsMutable();\n flags_.add(value.getNumber());\n onChanged();\n return this;\n }",
"public void addbiboEdition(java.lang.String value) {\n\t\tBase.add(this.model, this.getResource(), EDITION, value);\n\t}",
"public void addExam(Exam e){\n\t\texams.add(e);\n\t\tthis.save();\n\t}",
"void addArticle(Article a);",
"void addExpense(Expense expense);",
"public void addExperience(int e);",
"au.gov.asic.types.fss.DebtorType addNewDebtor();",
"List<Edible> getEdibles();",
"public void addFortune(SQLiteDatabase db, String number, String description) {\n String query = \"INSERT INTO \" + TABLE_FORTUNES + \" ( \" + COLUMN_ID + \", \" + COLUMN_NUMBER + \", \" +\n COLUMN_DESCRIPTION + \" ) \" + \" VALUES ( \" + \"NULL\" + \", \" + \"\\'\" + number + \"\\'\" + \", \" +\n \"\\'\" + description + \"\\'\" + \" ) \";\n db.execSQL(query);\n\n }",
"public void addbiboEdition( org.ontoware.rdf2go.model.node.Node value) {\n\t\tBase.add(this.model, this.getResource(), EDITION, value);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add correct answer to the array list | public void correctAnswers(String answer) {
correctAnswers.add(answer);
} | [
"private void addAnswer(){\n experts.get(experts_turn).add(current_question,channel.getAnswer());\n\n }",
"public void addAnswer(Answer ans) {\n // TODO implement here\n }",
"public void answerQuestion(int answer)\n {\n answers[index] = answer;\n }",
"public abstract void addPossibleAnswer(String answer);",
"public void addRightAnswer(Question q, Integer index) throws IOException {\n\t\tint numOfAnswers = q.expectedNumOfAns;\n\t\tList<String> allAnswers = new ArrayList<String>();\n\t\t\n\t\tif(q.questiontype.equals(QuestionType.MultChoice)) {\n\t System.out.println(\"Please enter the corresponding letter of the right choices\");\n\t\t}else if(q.questiontype.equals(QuestionType.ShortAns)) {\n\t System.out.println(\"Please enter the answer(s):\");\n\t\t}else if(q.questiontype.equals(QuestionType.Matching)) {\n\t\t\tSystem.out.println(\"Please enter \" + numOfAnswers + \" pairs of correct answers of your question in the format of \\\"Letter Number\\\"\");\n\t\t}\n\t\telse if(q.questiontype.equals(QuestionType.Ranking)) {\n\t\t\tSystem.out.println(\"Please enter the numbers one by one in the right order:\");\n\t\t}\n\t\telse if(q.questiontype.equals(QuestionType.TrueFalse)) {\n\t\t\tSystem.out.println(\"Please enter A for True or B for False\");\n\t\t}\n\t\telse {\n\t\t\t//Essay. No answer needed. Just to take a space so the list of questions and answers are paired up\n\t\t\tallAnswers.add(\"\");\n\t\t\tcasheet.addAnswer(allAnswers, true, index);\n\t\t\treturn;\n\t\t}\n \n\t\t//Get the list of answers one by one\n for (int i = 0; i< numOfAnswers; i++) {\n \tif(numOfAnswers > 1) {\n \t\tSystem.out.println(\"Enter answer # \" + (i+1));\n \t}else {\n \t\tSystem.out.println(\"Enter answer: \");\n \t}\n \t\n \tString answer = Output.getNotNullInput(input);\n \tif(q.questiontype.equals(QuestionType.MultChoice)|| q.questiontype.equals(QuestionType.Matching)) {\n \t\tanswer = answer.toUpperCase();\n \t}else if(q.questiontype.equals(QuestionType.ShortAns)) {\n \t\tanswer = answer.toLowerCase();\n \t}else if(q.questiontype.equals(QuestionType.TrueFalse)) {\n \t\tif (answer.equals(\"a\") || answer.equals(\"A\")) {\n \t\t\tanswer = \"True\";\n \t\t}else if(answer.equals(\"b\") || answer.equals(\"B\")){\n \t\t\tanswer = \"False\";\n \t\t}\n \t}\n\n \t//Check if the answer is valid\n \twhile(!checkAnswerValid(answer, q)) {\n \t\tOutput.invalidInputWarning();\n \t\tanswer = Output.getNotNullInput(input);\n \t\tif(q.questiontype.equals(QuestionType.MultChoice)|| q.questiontype.equals(QuestionType.Matching)) {\n \t\tanswer = answer.toUpperCase();\n \t}else if(q.questiontype.equals(QuestionType.ShortAns)) {\n \t\tanswer = answer.toLowerCase();\n \t}else if(q.questiontype.equals(QuestionType.TrueFalse)) {\n \t\tif (answer.equals(\"a\") || answer.equals(\"A\")) {\n \t\t\tanswer = \"True\";\n \t\t}else if(answer.equals(\"b\") || answer.equals(\"B\")){\n \t\t\tanswer = \"False\";\n \t\t}\n \t}\n \t}\n \tif(q.questiontype.equals(QuestionType.MultChoice) || q.questiontype.equals(QuestionType.ShortAns) || q.questiontype.equals(QuestionType.Matching)) {\n\t\t\t\tCollections.sort(allAnswers);\n\t\t\t}\n \tallAnswers.add(answer);\n }\n //add the list of strings(answer) to the correct answer sheet \n casheet.addAnswer(allAnswers, true, index);\n\t}",
"public void addAnswer(Clause answer) {\r\n answers.add(answer);\r\n }",
"@Override\r\n public void addAnswer(String answer) {\r\n this.answers.add(answer);\r\n }",
"private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}",
"protected void generateAnswers() {\n createNewAnswerArray();\n polynomial = generatePolynomial();\n answers[getCorrectAnswerIndex()] = createNewAnswer(polynomial);\n\n for (int i = 0; i < answers.length; i++) {\n if (i != getCorrectAnswerIndex()) {\n answers[i] = createFakeAnswer();\n }\n }\n }",
"public void updateCorrectAnswer() {\n \tthis.CorrectAnswer = this.i1 + this.i2;\n }",
"private void correctAnswer() {\n\t\t// dedicated function for easy alterations in case scoring changes\n\t\t// for now, it's just + 1\n\t\t++this.score;\n\t}",
"public void addAnswer(Answer a){\n\t\tanswersList.add(a);\n\t}",
"public void addAnswer(T answer) {\n answerPool.add(answer);\n\n if (bestAnswer == null) {\n bestAnswer = answer;\n } else {\n bestAnswer = (comparator.compare(bestAnswer, answer) > 0 ? answer : bestAnswer);\n }\n\n }",
"public void AddAnswer(Answer a){}",
"private void arraySum(MyArrayList myArrayList, Results results) {\r\n int old_sum = myArrayList.sum();\r\n myArrayList.insertSorted(511);\r\n int new_sum = myArrayList.sum();\r\n if(old_sum < new_sum) {\r\n results.storeNewResult(\"ArraySum test case: PASSED\");\r\n }\r\n else { \r\n results.storeNewResult(\"ArraySum test case: FAILED\");\r\n }\r\n }",
"public void modify() {\n io.writeLine(\"Enter the new correct answer\");\n String newAnswer = io.readLine();\n while (!newAnswer.equals(\"T\") && !newAnswer.equals(\"F\")) {\n io.writeLine(\"Please put in T or F\");\n newAnswer = io.readLine();\n }\n rightAnswers.set(0, newAnswer);\n }",
"int evaluateAnswer(List<String> userAnswers);",
"public void incrementWrongAnswers(){\n\t\twrong ++;\n\t}",
"public void getAnswerFromStudent(String input){\n //Set the credit to 0 since it is a student answer and Not\n //part of the actual test\n //It is 0 because the actual answers are compared and then credit is given in\n //exam grader, all this does is add the answer to the array\n MCMAAnswer ans = new MCMAAnswer(input, 0);\n studentAnswers.add(ans);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for the COM property "ColorSynchronizationEditability" | @DISPID(1611006095) //= 0x6006008f. The runtime will prefer the VTID if present
@VTID(171)
void colorSynchronizationEditability(
boolean oActivated); | [
"@DISPID(1611006095) //= 0x6006008f. The runtime will prefer the VTID if present\n @VTID(170)\n boolean colorSynchronizationEditability();",
"@DISPID(1611006091) //= 0x6006008b. The runtime will prefer the VTID if present\n @VTID(166)\n boolean colorSynchronizationMode();",
"public boolean getColor2EditStatus() {\n return color2edit;\n }",
"@DISPID(1611006091) //= 0x6006008b. The runtime will prefer the VTID if present\n @VTID(167)\n void colorSynchronizationMode(\n boolean oActivated);",
"public Color getReadonlyColor()\n {\n return readOnlyColor;\n }",
"public void setCValueEditable(boolean status);",
"public boolean getColor1EditStatus() {\n return color1edit;\n }",
"public boolean getColor3EditStatus() {\n return color3edit;\n }",
"public boolean getColor4EditStatus() {\n return color4edit;\n }",
"public void\n\t setColorMaterialElt( boolean value )\n\t \n\t {\n//\t if (ivState.lightModel == LightModel.BASE_COLOR.getValue()) value = false;\n//\t ivState.colorMaterial = value;\n\t }",
"private void changeColorWheels() {\n if (rgbRdo.getSelection() == true) {\n upperColorWheel.showRgbSliders(true);\n lowerColorWheel.showRgbSliders(true);\n } else {\n upperColorWheel.showRgbSliders(false);\n lowerColorWheel.showRgbSliders(false);\n }\n }",
"public void setReadonlyColor(Color color)\n {\n readOnlyColor = color;\n\n // Update table\n\n table.repaint();\n }",
"public void continuousColor(boolean b) { cont_color_cbmi.setSelected(b); }",
"@Override\n\tprotected void setColor(ObjectColor color) {}",
"public void setReadOnly(boolean newStatus);",
"public void setBlendedColorCycling(boolean newValue);",
"public void setColor(int color);",
"public boolean isColorCyclingAvailable();",
"void setFalseColor(boolean falseColor);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the classes to be merged are in the same package, then we have no problem. | private boolean isSafeAccessAfterMerge(SootClass to, SootClass from){
if(to.getPackageName().equals(from.getPackageName())){
return true;
}
//Is the class to be merged package-private?
if(SootUtils.isPackagePrivate(from)){
return false;
}
//Are any of the fields package-private or are types that are package-private?
for(SootField sootField: from.getFields()){
if(SootUtils.isPackagePrivate(sootField)){
return false;
}
SootClass type = Scene.v().getSootClass(sootField.getType().toString());
if(SootUtils.isPackagePrivate(type)){
return false;
}
}
//Are any of the methods package-private?
for(SootMethod sootMethod : from.getMethods()){
if(SootUtils.isPackagePrivate(sootMethod)){
return false;
}
if(sootMethod.isAbstract() || sootMethod.isNative()){
continue;
}
//Does any method contain reference to a package-private class, method, or field?
Body b = sootMethod.retrieveActiveBody();
for(Unit unit : b.getUnits()) {
Stmt stmt = (Stmt) unit;
if (stmt.containsInvokeExpr()) {
InvokeExpr callExpr = stmt.getInvokeExpr();
SootMethodRef smf = callExpr.getMethodRef();
SootClass sootClass = smf.getDeclaringClass();
SootMethod invokedMethod = smf.tryResolve();
if(invokedMethod == null){
//At this level we cannot always resolve virtual methods unfortunately.
//I don't know as of yet how this may affect this check.
continue;
}
if (SootUtils.isPackagePrivate(invokedMethod)) {
return false;
}
if (SootUtils.isPackagePrivate(sootClass)) {
return false;
}
} else if(stmt.containsFieldRef()){
FieldRef fieldRef = stmt.getFieldRef();
SootField sootField = fieldRef.getField();
if(SootUtils.isPackagePrivate(sootField)){
return false;
}
}
}
}
return true;
} | [
"public void testMPSModulesAreNotLoadingSameClasses() throws InvocationTargetException, InterruptedException {\n final MPSProject project = loadProject(MPS_CORE_PROJECT);\n assertNotNull(\"Can't open project \" + MPS_CORE_PROJECT, project);\n waitForEDTTasksToComplete();\n\n final MultiMap<String, LoadEnvironment> loadedClasses = new MultiMap<String, LoadEnvironment>();\n\n ModelAccess.instance().runReadAction(new Runnable() {\n public void run() {\n List<IModule> modulesToCheck = new ArrayList<IModule>();\n modulesToCheck.addAll(MPSModuleRepository.getInstance().getAllLanguages());\n modulesToCheck.addAll(MPSModuleRepository.getInstance().getAllSolutions());\n modulesToCheck.removeAll(project.getProjectModules(Solution.class));\n\n //collect class2module info\n for (IModule m : modulesToCheck) {\n List<ModelRoot> stubs = ModelRootUtil.filterJava(m.getModuleDescriptor().getStubModelEntries());\n\n for (ModelRoot entry : stubs) {\n String path = entry.getPath();\n IClassPathItem pathItem = null;\n try {\n pathItem = ClassPathFactory.getInstance().createFromPath(path, \"Tests\");\n } catch (IOException e) {\n LOG.error(e);\n }\n if (pathItem == null) continue;\n\n // do not check libs\n if (pathItem instanceof JarFileClassPathItem) continue;\n\n for (String className : getAllClasses(pathItem)) {\n String namespace = m.getModuleFqName();\n if (!loadedClasses.containsKey(className)) {\n loadedClasses.put(className, new HashSet<LoadEnvironment>(1));\n }\n\n loadedClasses.get(className).add(new LoadEnvironment(namespace, pathItem.toString()));\n }\n }\n }\n }\n });\n\n ThreadUtils.runInUIThreadAndWait(new Runnable() {\n public void run() {\n project.dispose();\n\n IdeEventQueue.getInstance().flushQueue();\n System.gc();\n }\n });\n waitForEDTTasksToComplete();\n\n Set<Conflict> conflicts = new HashSet<Conflict>();\n for (String className : loadedClasses.keySet()) {\n Collection<LoadEnvironment> environments = loadedClasses.get(className);\n if (environments.size() > 1) {\n Conflict conflict = new Conflict(className);\n conflict.addLoadEnvironments(environments);\n conflicts.add(conflict);\n }\n }\n assertTrue(getConflictsDescription(conflicts), conflicts.isEmpty());\n }",
"private void merge() {\n\t\tsynchronized (root) {\n\t\t\tArrayList<ProgramNode> list = tree.getSortedSelection();\n\t\t\tCompoundCmd compCmd = new CompoundCmd(\"Merge with Parent\");\n\t\t\tString treeName = tree.getTreeName();\n\t\t\tfor (ProgramNode node : list) {\n\t\t\t\ttree.removeSelectionPath(node.getTreePath());\n\t\t\t\tProgramNode parentNode = (ProgramNode) node.getParent();\n\t\t\t\tif (node.isModule() && parentNode != null) {\n\t\t\t\t\tcompCmd.add(new MergeFolderCmd(treeName, node.getName(), parentNode.getName()));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!plugin.getTool().execute(compCmd, program)) {\n\t\t\t\tplugin.getTool().setStatusInfo(compCmd.getStatusMsg());\n\t\t\t}\n\t\t}\n\t}",
"public boolean hasMergedInto() {\n return hasExtension(MergedInto.class);\n }",
"boolean isMerged();",
"public void noteMerged(PythonClass candidate) {\n if (!isMerged() && getCandidate() == candidate) {\n next++;\n }\n }",
"public void merge(BundleClassLoadersContext other) {\n\n extensionDirs = ImmutableList.copyOf(Stream.concat(extensionDirs.stream(),\n other.extensionDirs.stream().filter((x) -> !extensionDirs.contains(x)))\n .collect(Collectors.toList()));\n bundles = ImmutableMap.copyOf(\n Stream.of(bundles, other.bundles).map(Map::entrySet).flatMap(Collection::stream)\n .collect(Collectors.toMap(Entry::getKey, Entry::getValue, (s, a) -> s)));\n }",
"Collection getInconsistentClasses();",
"private Collection<ClassMerger> initializeClassMergers(\n HorizontallyMergedClasses.Builder mergedClassesBuilder,\n HorizontalClassMergerGraphLens.Builder lensBuilder,\n FieldAccessInfoCollectionModifier.Builder fieldAccessChangesBuilder,\n Collection<Collection<DexProgramClass>> groups) {\n Collection<ClassMerger> classMergers = new ArrayList<>();\n\n // TODO(b/166577694): Replace Collection<DexProgramClass> with MergeGroup\n for (Collection<DexProgramClass> group : groups) {\n assert !group.isEmpty();\n\n DexProgramClass target = group.stream().findFirst().get();\n group.remove(target);\n\n ClassMerger merger =\n new ClassMerger.Builder(target)\n .addClassesToMerge(group)\n .build(appView, mergedClassesBuilder, lensBuilder, fieldAccessChangesBuilder);\n classMergers.add(merger);\n }\n\n return classMergers;\n }",
"private Set<OWLAxiom> getConflictingAxioms(OWLOntology mergedOntology,\n\t\t\tReasonerFactory reasonerFactory, Reasoner reasoner,\n\t\t\tOWLClass unsatClass) {\n\t\tBlackBoxExplanation exp = new BlackBoxExplanation(mergedOntology, reasonerFactory, reasoner);\n\t\tSet<OWLAxiom> expSet = exp.getExplanation(unsatClass);\n\t\tSet<OWLAxiom> conflictingAxioms = new HashSet<OWLAxiom>();\n\n\t\tSystem.out.println(\"\\n------------------------------ Unsatisfiable Class ------------------------------\");\n\t\tlog.info(\"The Unsatisfiable class is: \" + unsatClass);\n\n\t\tfor(OWLAxiom causingAxiom : expSet) {\n//\t\t\tlog.info(causingAxiom.getAxiomType());\n\t\t\tif(causingAxiom.getAxiomType() == AxiomType.EQUIVALENT_CLASSES) {\n\t\t\t\t//Get the Source and Target classes in the axiom signature.\n\t\t\t\tList<OWLClass> classList = new ArrayList<OWLClass>(causingAxiom.getClassesInSignature());\n\t\t\t\tString[] sourceURI = classList.get(0).getIRI().toString().split(\"#\");\n\t\t\t\tString[] targetURI = classList.get(1).getIRI().toString().split(\"#\");\n\n\t\t\t\t//Save the conflicting axiom (if its not a mapping between classes in same ontology).\n\t\t\t\tif(!sourceURI.equals(targetURI))\n\t\t\t\t\tconflictingAxioms.add(causingAxiom);\n\t\t\t}\n\t\t\telse if(causingAxiom.getAxiomType() == AxiomType.EQUIVALENT_DATA_PROPERTIES) {\n\t\t\t\t//Get the Source and Target classes in the axiom signature.\n\t\t\t\tList<OWLClass> classList = new ArrayList<OWLClass>(causingAxiom.getClassesInSignature());\n\t\t\t\tString[] sourceURI = classList.get(0).getIRI().toString().split(\"#\");\n\t\t\t\tString[] targetURI = classList.get(1).getIRI().toString().split(\"#\");\n\n\t\t\t\t//Save the conflicting axiom (if its not a mapping between classes in same ontology).\n\t\t\t\tif(!sourceURI.equals(targetURI))\n\t\t\t\t\tconflictingAxioms.add(causingAxiom);\n\t\t\t}\n\t\t\telse if(causingAxiom.getAxiomType() == AxiomType.EQUIVALENT_OBJECT_PROPERTIES) {\n\t\t\t\t//Get the Source and Target classes in the axiom signature.\n\t\t\t\tList<OWLClass> classList = new ArrayList<OWLClass>(causingAxiom.getClassesInSignature());\n\t\t\t\tString[] sourceURI = classList.get(0).getIRI().toString().split(\"#\");\n\t\t\t\tString[] targetURI = classList.get(1).getIRI().toString().split(\"#\");\n\n\t\t\t\t//Save the conflicting axiom (if its not a mapping between classes in same ontology).\n\t\t\t\tif(!sourceURI.equals(targetURI))\n\t\t\t\t\tconflictingAxioms.add(causingAxiom);\n\t\t\t}\n\t\t}\n\t\tfor(OWLAxiom confAx : conflictingAxioms)\n\t\t\tlog.info(\"The conflicting axiom: \" + confAx);\n\t\t\t\t\n\t\treturn conflictingAxioms;\n\t}",
"@Test\n public void testMergeNameConflict() throws Exception {\n Stream s1 = new Builder(\"default\").build();\n Stream s2 = new Builder(\"not_default\").build();\n\n Stream s3 = s1.merge(s2);\n Assert.assertNotSame(s3, s2);\n Assert.assertNotSame(s3, s1);\n // This check handles the equality, as we're not adding anything else\n // that could cause a hashCode conflict.\n Assert.assertEquals(s3, s2);\n }",
"void merge();",
"public void mergeClassesIntoTree(DefaultTreeModel model, boolean reset);",
"public void merge(){\r\n\t\tthis.setAnnotationSetMap( getMergedAnnotationMap(true)); \r\n\t}",
"public IClassifierProcessingBlock mergeWith(IClassifierProcessingBlock other, IProcessingGraph containingGraph, List<Pair<Integer>> outPortSources) throws MergeException;",
"@Test\n public void testMerge() throws RepositoryException, IOException, PackageException {\n Node tmp = admin.getRootNode().addNode(\"tmp\");\n Node foo = tmp.addNode(\"foo\");\n foo.addNode(\"old\");\n Node bar = foo.addNode(\"bar\");\n bar.setProperty(\"testProperty\", \"old\");\n admin.save();\n assertNodeExists(\"/tmp/foo/old\");\n assertNodeMissing(\"/tmp/foo/new\");\n\n JcrPackage pack = packMgr.upload(getStream(\"/test-packages/tmp_mode_merge.zip\"), false);\n pack.extract(getDefaultOptions());\n\n assertNodeExists(\"/tmp/foo/old\");\n assertNodeExists(\"/tmp/foo/bar\");\n assertNodeExists(\"/tmp/foo/new\");\n assertProperty(\"/tmp/foo/bar/testProperty\", \"old\");\n }",
"public boolean isMerge();",
"public boolean isMerged() {\n return merged;\n }",
"public void testNoInheritance() throws Throwable {\n Class.forName(\"java.lang.pkg3.Bogus\");\n Class.forName(\"java.lang.pkg3.pkg31.Bogus\");\n Package pkg3 = Package.getPackage(\"java.lang.pkg3\");\n assertNotNull(\"pkg3\", pkg3);\n Annotation[] an = pkg3.getAnnotations();\n assertNotNull(\"all in pkg3\", an);\n assertEquals(\"number of Annotations in pkg3\", 1, an.length);\n assertNotNull(\"annotation of pkg3\", pkg3.getAnnotation(Pkg3Antn.class));\n\n Package pkg31 = Package.getPackage(\"java.lang.pkg3.pkg31\");\n assertNotNull(\"pkg31\", pkg31);\n Annotation[] an2 = pkg31.getAnnotations();\n assertNotNull(\"all in pkg31\", an2);\n assertEquals(\"number of Annotations in pkg31\", 1, an2.length);\n assertTrue(\"annotation of pkg31\", pkg31.isAnnotationPresent(Pkg31Antn.class));\n }",
"private static boolean sameEnclosingClass(Class<?> a, Class<?> b) {\n while (true) {\n if (a.equals(b)) {\n return true;\n }\n Class<?> enclosingClass = a.getEnclosingClass();\n if (enclosingClass == null) {\n // found top-level type\n break;\n }\n a = enclosingClass;\n }\n while (true) {\n Class<?> enclosingClass = b.getEnclosingClass();\n if (enclosingClass == null) {\n // found top-level type\n break;\n }\n b = enclosingClass;\n }\n return a.equals(b);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .estafette.ci.manifest.v1.EstafetteRelease releases = 7; | public java.util.List<? extends com.estafette.ci.manifest.v1.EstafetteReleaseOrBuilder>
getReleasesOrBuilderList() {
return releases_;
} | [
"public java.util.List<com.estafette.ci.manifest.v1.EstafetteRelease> getReleasesList() {\n return releases_;\n }",
"public com.estafette.ci.manifest.v1.EstafetteRelease.Builder addReleasesBuilder() {\n return getReleasesFieldBuilder().addBuilder(\n com.estafette.ci.manifest.v1.EstafetteRelease.getDefaultInstance());\n }",
"public Builder addReleases(com.estafette.ci.manifest.v1.EstafetteRelease value) {\n if (releasesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureReleasesIsMutable();\n releases_.add(value);\n onChanged();\n } else {\n releasesBuilder_.addMessage(value);\n }\n return this;\n }",
"public com.estafette.ci.manifest.v1.EstafetteReleaseOrBuilder getReleasesOrBuilder(\n int index) {\n return releases_.get(index);\n }",
"public com.estafette.ci.manifest.v1.EstafetteVersionOrBuilder getVersionOrBuilder() {\n return getVersion();\n }",
"public com.estafette.ci.manifest.v1.EstafetteRelease getReleases(int index) {\n return releases_.get(index);\n }",
"@Test\n public void eveKitVersionTest() {\n // TODO: test eveKitVersion\n }",
"@LargeTest\n public void testVignetteFull() {\n TestAction ta = new TestAction(TestName.VIGNETTE_FULL);\n runTest(ta, TestName.VIGNETTE_FULL.name());\n }",
"@Test\n\tpublic void ebsad11654ScopeSpecificDeploy() throws Exception {\n\t\tApplicationVersion appVersion = setUpData(\"EBSAD-11654-scoped_deploy\");\n\t\t\n\t\tDeployer d = new Deployer();\n\t\tApplicationDeployment dep = d.deploy(appVersion, createEnvironmentName(), \"Magical Trevor\");\n\t\t\n\t\tETD[] t0 = new ETD[]{\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-core-features-fuse-application/ensure\",\"2.1.119-1\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-core-features-fuse-config/ensure\",\"2.1.119-1\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t};\n\t\tETD[] t1 = new ETD[] {new ETD(true,HieraData.ABSENT,\"system::packages/ssb-rpm-fuse-config/ensure\",\"2.0.294-1\",\"/st/st-dev1-ebs1/ssb1.yaml\")};\n\t\tETD[] t2 = new ETD[]{\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-core-features-lib-nexus/ensure\",\"2.1.41-release_2.1.41_1\",\"/st/st-dev1-ebs1/rma.yaml\")\n\t\t};\n\t\tETD[] t3 = new ETD[] {\n\t\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-rpm-nexus-baseline-config/ensure\",\"2.0.3-1\",\"/st/st-dev1-ebs1/rma.yaml\")\n\t\t};\n\t\tETD[] t4 = new ETD[]{\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-ldap-schema/ensure\",\"1.143-1\",\"/st/st-dev1-ebs1/ldp.yaml\"),\n\t\t};\n\t\tETD[] t5 = new ETD[]{\n\t\t\tnew ETD(true,HieraData.ABSENT,\"system::packages/ssb-db-schema/ensure\",\"1.376.293-1\",\"/st/st-dev1-ebs1/ldp.yaml\"),\n\t\t};\n\t\tETD[] t6 = new ETD[]{\n\t\t\tnew ETD(true,\"{ensure=1.376.298-1, require=[Package[jdk], Service[postgresql-9.2]], tag=mwdeploy}\",\"system::packages/ssb-db-schema\",null,\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t};\n\t\tETD[] t7 = new ETD[]{\n\t\t\tnew ETD(true,\"{require=Package[ssb_cfg_openldap], tag=mwconfig, ensure=1.143-1}\",\"system::packages/ssb-ldap-schema\",\"{ensure=absent, require=Package[ssb_cfg_openldap], tag=appdeploy}\",\"/st/st-dev1-ebs1/ldp.yaml\"),\n\t\t};\n\t\tETD[] t8 = new ETD[]{\n\t\t\tnew ETD(true,\"{require=[Package[gen_bin_nexus], Mount[/var/sonatype-work]], ensure=2.0.8-1}\",\"system::packages/ssb-rpm-nexus-baseline-config\",\"{ensure=absent, require=[Package[gen_bin_nexus], Mount[/var/sonatype-work]], tag=mwconfig}\",\"/st/st-dev1-ebs1/rma.yaml\"),\n\t\t\tnew ETD(true,\"{tag=appdeploy, require=[Package[ssb-rpm-nexus-baseline-config], Mount[/var/sonatype-work]], ensure=2.1.41-release_2.1.41_1}\",\"system::packages/ssb-core-features-lib-nexus\",\"{ensure=absent, tag=appdeploy, require=[Package[ssb-rpm-nexus-baseline-config], Package[gen_bin_nexus], Mount[/var/sonatype-work]]}\",\"/st/st-dev1-ebs1/rma.yaml\"),\n\t\t};\n\t\tETD[] t9 = new ETD[]{\n\t\t\tnew ETD(true,\"{require=[Package[gen-ins-jboss-fuse], File[/opt/fuse]], ensure=2.0.294-1}\",\"system::packages/ssb-rpm-fuse-config\",\"{ensure=absent, require=Package[gen-ins-jboss-fuse], tag=mwconfig}\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t\tnew ETD(true,\"{require=Package[ssb-rpm-fuse-config], tag=mwconfig, ensure=2.1.119-1}\",\"system::packages/ssb-core-features-fuse-config\",\"{ensure=absent, require=Package[ssb-rpm-fuse-config], tag=mwdeploy}\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t\tnew ETD(true,\"{tag=mwconfig, ensure=2.1.119-1}\",\"system::packages/ssb-core-features-fuse-application\",\"{ensure=absent, require=Package[ssb-core-features-fuse-config], tag=mwdeploy}\",\"/st/st-dev1-ebs1/ssb1.yaml\"),\n\t\t};\n\t\t\n\t\tString csv = \"ssb-core-features-fuse-application,2.1.119-1,groupid,ssb-core-features-fuse-application,2.1.119-1,war,\\n\"\n\t\t\t\t+ \"ssb-core-features-fuse-config,2.1.119-1,groupid,ssb-core-features-fuse-config,2.1.119-1,war,\\n\"\n\t\t\t\t+ \"ssb-core-features-lib-nexus,2.1.41-release_2.1.41_1,groupid,ssb-core-features-lib-nexus,2.1.41-release_2.1.41_1,war,\\n\"\n\t\t\t\t+ \"ssb-db-schema,1.376.298-1,groupid,ssb-db-schema,1.376.298-1,war,\\n\"\n\t\t\t\t+ \"ssb-ldap-schema,1.143-1,groupid,ssb-ldap-schema,1.143-1,war,\\n\"\n\t\t\t\t+ \"ssb-rpm-fuse-config,2.0.294-1,groupid,ssb-rpm-fuse-config,2.0.294-1,war,\\n\"\n\t\t\t\t+ \"ssb-rpm-nexus-baseline-config,2.0.8-1,groupid,ssb-rpm-nexus-baseline-config,2.0.8-1,war,\\n\";\n\t\tChainDeploymentVerification.verify(dep, csv, 10, new int[]{2, 1, 1, 1, 1, 1, 1, 1, 2, 3}, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);\n\t}",
"void setLatestVersion(VV version);",
"com.google.devtools.testing.v1.AndroidVersion getVersions(int index);",
"@Test\n\tpublic void ebsad11307UpgradeOneOfANumberOfSmallChains() throws Exception {\n\t\tApplicationVersion appVersion = setUpData(\"EBSAD-11307\");\n\t\t\n\t\tDeployer d = new Deployer();\n\t\tApplicationDeployment dep = d.deploy(appVersion, createEnvironmentName(), null);\n\t\t\n\t\tETD[] t1 = new ETD[]{ new ETD(true,\"absent\",\"system::packages/forumsentry-config-ssb-pkiss/ensure\",\"1.0.102-1\",\"/st/st-cit1-sec1/scg.yaml\")};\n\t\t\n\t\tETD[] t2 = new ETD[]{ new ETD(true,\"absent\",\"system::packages/forumsentry-policy-ssb-pkiss/ensure\", \"1.0.126-1\", \"/st/st-cit1-sec1/scg.yaml\")};\n\t\t\n\t\tETD[] t3 = new ETD[]{ new ETD(true,\"1.0.127-1\",\"system::packages/forumsentry-policy-ssb-pkiss/ensure\",\"absent\",\"/st/st-cit1-sec1/scg.yaml\"),\n\t\t\t\t\t\t\t new ETD(true,\"1.0.102-1\",\"system::packages/forumsentry-config-ssb-pkiss/ensure\",\"absent\",\"/st/st-cit1-sec1/scg.yaml\")};\n\t\t\n\t\tChainDeploymentVerification.verify(dep, \"forumsentry-config-ssb-pkiss,1.0.102-1,groupid,forumsentry-config-ssb-pkiss,1.0.102,war,\\n\"\n\t\t\t\t+ \"forumsentry-policy-ssb-pkiss,1.0.127-1,groupid,forumsentry-policy-ssb-pkiss,1.0.127,war,\\n\", 3, new int[]{1, 1, 2}, t1, t2, t3);\n\t}",
"@Test\n public void extensionExpectsPreRelease()\n {\n assertFalse(ExtensionVersionMatcher.matchExtensionVersion(\"2.0.0\", \"2.0.0-pre1\"));\n assertFalse(ExtensionVersionMatcher.matchExtensionVersion(\"2.0.1\", \"2.0.0-pre2\"));\n assertFalse(ExtensionVersionMatcher.matchExtensionVersion(\"2.0.1-pre2\", \"2.0.0-pre2\"));\n assertFalse(ExtensionVersionMatcher.matchExtensionVersion(\"2.0.2\", \"2.0.0-pre3\"));\n assertFalse(ExtensionVersionMatcher.matchExtensionVersion(\"2.0.20\", \"2.0.0-pre3\"));\n assertFalse(ExtensionVersionMatcher.matchExtensionVersion(\"2.0.20-pre3\", \"2.0.0-pre3\"));\n\n assertTrue(ExtensionVersionMatcher.matchExtensionVersion(\"2.0.0-pre3\", \"2.0.0-pre3\"));\n assertTrue(ExtensionVersionMatcher.matchExtensionVersion(\"2.0.20-pre3\", \"2.0.20-pre3\"));\n }",
"private String detectVersion(JsonArray versions, ApprendaClient ac) {\n\t\tint versionNumber = 1;\r\n\t\tString tempNewVersion;\r\n\t\tboolean forcedVersionExists = false;\r\n\t\tPattern pattern = Pattern.compile(\"\\\\d+\");\r\n\t\tboolean highestVersionPublished = false;\r\n\t\tfor (int i = 0; i < versions.size(); i++) {\r\n\t\t\t// get the version object and the alias\r\n\t\t\tJsonObject version = versions.getJsonObject(i);\r\n\t\t\tString alias = version.getString(\"alias\");\r\n\t\t\tif (advVersionAliasToBeForced == null && alias.matches(prefix + \"\\\\d+\")) {\r\n\t\t\t\tMatcher matcher = pattern.matcher(alias);\r\n\t\t\t\tmatcher.find();\r\n\t\t\t\tint temp = Integer.parseInt(alias.substring(matcher.start()));\r\n\t\t\t\tString versionStage = version.getString(\"stage\");\r\n\t\t\t\t// if the version we are looking at is in published state or we\r\n\t\t\t\t// are forcing a new version regardless,\r\n\t\t\t\t// get the greater of the two numeric versions and increment it.\r\n\t\t\t\t// so if the current version we found is v4 and its\r\n\t\t\t\t// published...if we already have found a v5 in sandbox do\r\n\t\t\t\t// nothing.\r\n\t\t\t\tif (temp >= versionNumber) {\r\n\t\t\t\t\t// use case v5 published, current is v1 (first run)\r\n\t\t\t\t\t// if published set to v6, else set to v5\r\n\t\t\t\t\tversionNumber = temp;\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif (versionStage.equals(\"Published\")) {\r\n\t\t\t\t\t\thighestVersionPublished = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thighestVersionPublished = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (advVersionAliasToBeForced != null && alias.matches(advVersionAliasToBeForced)){ //alias.matches(prefix + \"\\\\d+\")) {\r\n\t\t\t\tforcedVersionExists = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// now that we've traversed all versions, its time to determine whether\r\n\t\t// or not to create a new app version\r\n\t\tif (advVersionAliasToBeForced != null) {\r\n\t\t\tif (!forcedVersionExists) {\r\n\t\t\t\tac.newAppVersion(appAliasEx, advVersionAliasToBeForced, appDescriptionEx);\r\n\t\t\t}\r\n\t\t\ttempNewVersion = advVersionAliasToBeForced;\r\n\t\t} else if (forceNewVersion || highestVersionPublished) {\r\n\t\t\tversionNumber++;\r\n\t\t\ttempNewVersion = prefix + versionNumber;\r\n\t\t\tac.newAppVersion(appAliasEx, tempNewVersion, appDescriptionEx);\r\n\t\t} else {\r\n\t\t\ttempNewVersion = prefix + versionNumber;\r\n\t\t\tboolean thisVersionExists = false;\r\n\t\t\tfor (int i = 0; i < versions.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tJsonObject version = versions.getJsonObject(i);\r\n\t\t\t\tString alias = version.getString(\"alias\");\r\n\t\t\t\tif (alias.matches(tempNewVersion))\r\n\t\t\t\t{\r\n\t\t\t\t\tthisVersionExists = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (thisVersionExists == false)\r\n\t\t\t{\r\n\t\t\t\tac.newAppVersion(appAliasEx, tempNewVersion, appDescriptionEx);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn tempNewVersion;\r\n\t}",
"@Test\n public void testCreateNeededModelVersionsForManuallyDeployedApps() {\n List<Host> hosts = createHosts(7, \"7.0.0\");\n\n CountingModelFactory factory700 = createHostedModelFactory(Version.fromString(\"7.0.0\"), devZone);\n CountingModelFactory factory710 = createHostedModelFactory(Version.fromString(\"7.1.0\"), devZone);\n CountingModelFactory factory720 = createHostedModelFactory(Version.fromString(\"7.2.0\"), devZone);\n List<ModelFactory> modelFactories = List.of(factory700, factory710, factory720);\n\n DeployTester tester = createTester(hosts, modelFactories, devZone);\n // Deploy with version that does not exist on hosts, the model for this version should also be created\n tester.deployApp(\"src/test/apps/hosted/\", \"7.2.0\");\n assertEquals(7, tester.getAllocatedHostsOf(tester.applicationId()).getHosts().size());\n\n // Check >0 not ==0 as the session watcher thread is running and will redeploy models in the background\n // Nodes are on 7.0.0 (should be created), no nodes on 7.1.0 (should not be created), 7.2.0 should always be created\n assertTrue(factory700.creationCount() > 0);\n assertFalse(factory710.creationCount() > 0);\n assertTrue(\"Newest model for latest major version is always included\", factory720.creationCount() > 0);\n }",
"@Test\n public void testComputeMinSdkVersion_releasedPlatform() {\n verifyComputeMinSdkVersion(OLDER_VERSION, RELEASED, true, OLDER_VERSION);\n\n // Do allow same release minSdkVersion on released platform.\n // APP: Released API 20\n // DEV: Released API 20\n verifyComputeMinSdkVersion(PLATFORM_VERSION, RELEASED, true, PLATFORM_VERSION);\n\n // Don't allow newer release minSdkVersion on released platform.\n // APP: Released API 30\n // DEV: Released API 20\n verifyComputeMinSdkVersion(NEWER_VERSION, RELEASED, true, -1);\n\n // Don't allow older pre-release minSdkVersion on released platform.\n // APP: Pre-release API 10\n // DEV: Released API 20\n verifyComputeMinSdkVersion(OLDER_VERSION, OLDER_PRE_RELEASE, true, -1);\n verifyComputeMinSdkVersion(OLDER_VERSION, OLDER_PRE_RELEASE_WITH_FINGERPRINT, true, -1);\n\n // Don't allow same pre-release minSdkVersion on released platform.\n // APP: Pre-release API 20\n // DEV: Released API 20\n verifyComputeMinSdkVersion(PLATFORM_VERSION, PRE_RELEASE, true, -1);\n verifyComputeMinSdkVersion(PLATFORM_VERSION, PRE_RELEASE_WITH_FINGERPRINT, true, -1);\n\n\n // Don't allow newer pre-release minSdkVersion on released platform.\n // APP: Pre-release API 30\n // DEV: Released API 20\n verifyComputeMinSdkVersion(NEWER_VERSION, NEWER_PRE_RELEASE, true, -1);\n verifyComputeMinSdkVersion(NEWER_VERSION, NEWER_PRE_RELEASE_WITH_FINGERPRINT, true, -1);\n }",
"@Test\r\n \tpublic void testGetBaseVersion() {\n \t\tESPrimaryVersionSpec version = localProject.getBaseVersion();\r\n \t\tassertNull(version);\r\n \t}",
"public int getVersionOfFirstRelease(){\n \t\treturn 110; \n \t}",
"public void createEnvironments() {\n\n List<Environment> environments = new ArrayList<>();\n\n Environment dev = new Environment(\"Development\",\n \"exchange.nilepoint.com\",\n \"fhexchange\",\n \"mqdkkqwe3232139j2i3\",\n \"https://exchange.nilepoint.com/\",\n \"abc123\",\n \"https://beta-auth.fh.org/api/v1/auth\",\n \"beta-api2.fh.org\"\n );\n\n Environment alpha = new Environment(\"Alpha\",\n \"alpha-mq.fh.org\",\n \"fhexchange\",\n \"Micah68\",\n \"https://alpha-exchange.fh.org/\",\n \"abc123\",\n \"https://alpha-auth.fh.org/api/v1/auth\",\n \"alpha-api2.fh.org\"\n );\n\n Environment beta = new Environment(\"Beta\",\n \"beta-mq.fh.org\",\n \"fhexchange\",\n \"mqdkkqwe3232139j2i3\",\n \"https://beta-exchange.fh.org/\",\n \"abc123\",\n \"https://beta-auth.fh.org/api/v1/auth\",\n \"beta-api2.fh.org\"\n );\n\n Environment npbeta = new Environment(\"Beta-NP\",\n \"mq1.nilepoint.com\",\n \"fhexchange\",\n \"mqdkkqwe3232139j2i3\",\n \"https://exchange.nilepoint.com/\",\n \"abc123\",\n \"https://beta-auth.fh.org/api/v1/auth\",\n \"beta-api2.fh.org\"\n );\n\n Environment pgdev = new Environment(\"PG-Dev\",\n \"exchange-dev.nilepoint.com\",\n \"fhexchange\",\n \"mqdkkqwe3232139j2i3\",\n \"https://exchange-dev.nilepoint.com\",\n \"abc123\",\n\n \"https://exchange-dev.nilepoint.com/login/authenticate\",\n \"exchange-dev.nilepoint.com\"\n );\n\n\n Environment npStaging = new Environment(\"NP-Staging\",\n \"exchange-staging.nilepoint.com\",\n \"fhexchange\",\n \"mqdkkqwe3232139j2i3\",\n \"https://exchange-staging.nilepoint.com\",\n \"abc123\",\n\n \"https://exchange-staging.nilepoint.com/login/authenticate\",\n \"exchange-staging.nilepoint.com\"\n );\n environments.add(dev);\n environments.add(alpha);\n environments.add(beta);\n environments.add(npbeta);\n environments.add(pgdev);\n environments.add(npStaging);\n\n\n Paper.book().write(\"environments\", environments);\n Paper.book().write(\"environment\", pgdev);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes the model (document) region that is covered by the paint event's clipping region. If event is null, the model range covered by the visible editor area (viewport) is returned. | private IRegion computeClippingRegion(PaintEvent event) {
if (event == null) {
// trigger a repaint of the entire viewport
int vOffset= getInclusiveTopIndexStartOffset();
if (vOffset == -1)
return null;
// http://bugs.eclipse.org/bugs/show_bug.cgi?id=17147
int vLength= getExclusiveBottomIndexEndOffset() - vOffset;
return new Region(vOffset, vLength);
}
int widgetOffset;
try {
int widgetClippingStartOffset= fTextWidget.getOffsetAtLocation(new Point(0, event.y));
int firstWidgetLine= fTextWidget.getLineAtOffset(widgetClippingStartOffset);
widgetOffset= fTextWidget.getOffsetAtLine(firstWidgetLine);
} catch (IllegalArgumentException x) {
// should not happen
widgetOffset= 0;
}
int widgetEndOffset;
try {
int widgetClippingEndOffset= fTextWidget.getOffsetAtLocation(new Point(0, event.y + event.height));
int lastWidgetLine= fTextWidget.getLineAtOffset(widgetClippingEndOffset);
widgetEndOffset= fTextWidget.getOffsetAtLine(lastWidgetLine + 1);
} catch (IllegalArgumentException x) {
// happens if the editor is not "full", eg. the last line of the document is visible in the editor
// in that case, simply use the last character
widgetEndOffset= fTextWidget.getCharCount();
}
IRegion clippingRegion= getModelRange(widgetOffset, widgetEndOffset - widgetOffset);
return clippingRegion;
} | [
"public IRectangleBound getClipBound();",
"public Rectangle getClipBounds(){\n Shape c = getClip();\n if (c==null) {\n return null;\n }\n return c.getBounds();\n }",
"@Implement(VertexView.class)\r\n public Rectangle getRectangle ()\r\n {\r\n return section.getContourBox();\r\n }",
"Rectangle getBoundingRectange();",
"public Rectangle getEditorAreaBounds() {\n return editorAreaBounds;\n }",
"public BoundingRectangle getViewRegion() {\n return viewRegion;\n }",
"Rect getBounds();",
"public Rectangle getClipBounds()\r\n\t{\r\n\t\treturn _g2.getClipBounds();\r\n\t}",
"public Rectangle getDocumentBounds(){\n return document.getBounds();\n }",
"public VisibleRangeViewModel getVisibleRange() {\n return getParent().getVisibleRange();\n }",
"private LatLngBounds getMapVisibleRegion() {\n LatLngBounds region = null;\n if (map.getProjection() != null) {\n region = map.getProjection().getVisibleRegion().latLngBounds;\n }\n return region;\n }",
"public Object getRenderingBounds() {\r\n \tILayoutObject layoutObject = ModelUtils.getLayoutObject(getEObject());\r\n \tif (layoutObject == null)\r\n \t\treturn null;\r\n \tRectangle rect = layoutObject.getBounds();\r\n \treturn Context.javaToJS(new Rectangle(0, 0, rect.width, rect.height),\r\n \t\t\tthis);\r\n }",
"@ApiModelProperty(value = \"Rectangle area where searched original text.\")\n public Rectangle getRect() {\n return rect;\n }",
"public abstract Rectangle getSnapshotBounds();",
"public abstract IEmpBoundingArea getBoundingArea();",
"protected final Rectangle calculateClientArea () {\n return new Rectangle (editorPane.getPreferredSize ());\n }",
"private void catchupWithModel(AnnotationModelEvent event) {\n \n \t\tsynchronized (fDecorationMapLock) {\n \t\t\tif (fDecorationsMap == null)\n \t\t\t\treturn;\n \t\t}\n \n \t\tint highlightAnnotationRangeStart= Integer.MAX_VALUE;\n \t\tint highlightAnnotationRangeEnd= -1;\n \n \t\tif (fModel != null) {\n \n \t\t\tMap decorationsMap;\n \t\t\tMap highlightedDecorationsMap;\n \n \t\t\t// Clone decoration maps\n \t\t\tsynchronized (fDecorationMapLock) {\n \t\t\t\tdecorationsMap= new HashMap(fDecorationsMap);\n \t\t\t}\n \t\t\tsynchronized (fHighlightedDecorationsMapLock) {\n \t\t\t\thighlightedDecorationsMap= new HashMap(fHighlightedDecorationsMap);\n \t\t\t}\n \n \t\t\tboolean isWorldChange= false;\n \n \t\t\tIterator e;\n \t\t\tif (event == null || event.isWorldChange()) {\n \t\t\t\tisWorldChange= true;\n \n \t\t\t\tif (DEBUG && event == null)\n \t\t\t\t\tSystem.out.println(\"AP: INTERNAL CHANGE\"); //$NON-NLS-1$\n \n \t\t\t\tdecorationsMap.clear();\n \t\t\t\thighlightedDecorationsMap.clear();\n \n \t\t\t\te= fModel.getAnnotationIterator();\n \n \n \t\t\t} else {\n \n \t\t\t\t// Remove annotations\n \t\t\t\tAnnotation[] removedAnnotations= event.getRemovedAnnotations();\n \t\t\t\tfor (int i=0, length= removedAnnotations.length; i < length; i++) {\n \t\t\t\t\tAnnotation annotation= removedAnnotations[i];\n \t\t\t\t\tDecoration decoration= (Decoration)highlightedDecorationsMap.remove(annotation);\n \t\t\t\t\tif (decoration != null) {\n \t\t\t\t\t\tPosition position= decoration.fPosition;\n \t\t\t\t\t\tif (position != null) {\n \t\t\t\t\t\t\thighlightAnnotationRangeStart= Math.min(highlightAnnotationRangeStart, position.offset);\n \t\t\t\t\t\t\thighlightAnnotationRangeEnd= Math.max(highlightAnnotationRangeEnd, position.offset + position.length);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tdecorationsMap.remove(annotation);\n \t\t\t\t}\n \n \t\t\t\t// Update existing annotations\n \t\t\t\tAnnotation[] changedAnnotations= event.getChangedAnnotations();\n \t\t\t\tfor (int i=0, length= changedAnnotations.length; i < length; i++) {\n \t\t\t\t\tAnnotation annotation= changedAnnotations[i];\n \n \t\t\t\t\tObject annotationType= annotation.getType();\n \t\t\t\t\tboolean isHighlighting= shouldBeHighlighted(annotationType);\n \t\t\t\t\tboolean isDrawingSquiggles= shouldBeDrawn(annotationType);\n \n \t\t\t\t\tDecoration decoration= (Decoration)highlightedDecorationsMap.get(annotation);\n \n \t\t\t\t\tif (decoration != null) {\n \t\t\t\t\t\t// The call below updates the decoration - no need to create new decoration\n \t\t\t\t\t\tdecoration= getDecoration(annotation, decoration, isDrawingSquiggles, isHighlighting);\n \t\t\t\t\t\tif (decoration == null)\n \t\t\t\t\t\t\thighlightedDecorationsMap.remove(annotation);\n \t\t\t\t\t} else {\n \t\t\t\t\t\tdecoration= getDecoration(annotation, decoration, isDrawingSquiggles, isHighlighting);\n \t\t\t\t\t\tif (decoration != null && isHighlighting)\n \t\t\t\t\t\t\thighlightedDecorationsMap.put(annotation, decoration);\n \t\t\t\t\t}\n \n \t\t\t\t\tPosition position= null;\n \t\t\t\t\tif (decoration == null)\n \t\t\t\t\t\tposition= fModel.getPosition(annotation);\n \t\t\t\t\telse\n \t\t\t\t\t\tposition= decoration.fPosition;\n \n \t\t\t\t\tif (position != null && !position.isDeleted()) {\n \t\t\t\t\t\thighlightAnnotationRangeStart= Math.min(highlightAnnotationRangeStart, position.offset);\n \t\t\t\t\t\thighlightAnnotationRangeEnd= Math.max(highlightAnnotationRangeEnd, position.offset + position.length);\n \t\t\t\t\t} else {\n \t\t\t\t\t\thighlightedDecorationsMap.remove(annotation);\n \t\t\t\t\t}\n \n \t\t\t\t\tDecoration oldDecoration= (Decoration)decorationsMap.get(annotation);\n \t\t\t\t\tif (decoration != null && isDrawingSquiggles)\n \t\t\t\t\t\tdecorationsMap.put(annotation, decoration);\n \t\t\t\t\telse if (oldDecoration != null)\n \t\t\t\t\t\tdecorationsMap.remove(annotation);\n \t\t\t\t}\n \n \t\t\t\te= Arrays.asList(event.getAddedAnnotations()).iterator();\n \t\t\t}\n \n \t\t\t// Add new annotations\n \t\t\twhile (e.hasNext()) {\n \t\t\t\tAnnotation annotation= (Annotation) e.next();\n \n \t\t\t\tObject annotationType= annotation.getType();\n \t\t\t\tboolean isHighlighting= shouldBeHighlighted(annotationType);\n \t\t\t\tboolean isDrawingSquiggles= shouldBeDrawn(annotationType);\n \n \t\t\t\tDecoration pp= getDecoration(annotation, null, isDrawingSquiggles, isHighlighting);\n \n \t\t\t\tif (pp != null) {\n \n \t\t\t\t\tif (isDrawingSquiggles)\n \t\t\t\t\t\tdecorationsMap.put(annotation, pp);\n \n \t\t\t\t\tif (isHighlighting) {\n \t\t\t\t\t\thighlightedDecorationsMap.put(annotation, pp);\n \t\t\t\t\t\thighlightAnnotationRangeStart= Math.min(highlightAnnotationRangeStart, pp.fPosition.offset);\n \t\t\t\t\t\thighlightAnnotationRangeEnd= Math.max(highlightAnnotationRangeEnd, pp.fPosition.offset + pp.fPosition.length);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tsynchronized (fDecorationMapLock) {\n \t\t\t\tfDecorationsMap= decorationsMap;\n \t\t\t}\n \n \t\t\tsynchronized (fHighlightedDecorationsMapLock) {\n \t\t\t\tfHighlightedDecorationsMap= highlightedDecorationsMap;\n \t\t\t\tupdateHighlightRanges(highlightAnnotationRangeStart, highlightAnnotationRangeEnd, isWorldChange);\n \t\t\t}\n \t\t} else {\n \t\t\t// annotation model is null -> clear all\n \t\t\tsynchronized (fDecorationMapLock) {\n \t\t\t\tfDecorationsMap.clear();\n \t\t\t}\n \t\t\tsynchronized (fHighlightedDecorationsMapLock) {\n \t\t\t\tfHighlightedDecorationsMap.clear();\n \t\t\t}\n \t\t}\n \t}",
"@java.lang.Override\n public int getClippingAreaIndex() {\n return clippingAreaIndex_;\n }",
"@Override\n\tpublic BoundaryRectangle getBoundingBox() {\n\t\treturn new BoundaryRectangle(0, 0, drawView.getWidth(), drawView.getHeight());\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENFIRST:event_jLabel19KeyPressed TODO add your handling code here: | private void jLabel19KeyPressed(java.awt.event.KeyEvent evt) {
} | [
"private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {\n \n }",
"private void jLabel83MousePressed(java.awt.event.MouseEvent evt) {\n }",
"private void txtDniKeyReleased(java.awt.event.KeyEvent evt) {\n }",
"private void KeyActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void jTextField10KeyTyped(java.awt.event.KeyEvent evt) {\n }",
"private void txtNamaKeyPressed(java.awt.event.KeyEvent evt) {\n\n }",
"private void codigoProductoTBKeyPressed(java.awt.event.KeyEvent evt) {\n }",
"private void tb_TomasRealizadasKeyPressed(java.awt.event.KeyEvent evt) {\n \n \n }",
"private void jTextField1KeyTyped(java.awt.event.KeyEvent evt) {\n\n }",
"private void jLabel97MouseClicked(java.awt.event.MouseEvent evt) {\n }",
"public void keyPressed (KeyEvent e) {}",
"private void labpacktextboxKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_labpacktextboxKeyPressed\n int code = evt.getKeyCode();\n if (code== KeyEvent.VK_ESCAPE){\n System.out.print(code);\n listlabpacks.setVisible(false);\n }\n }",
"private void JBtnImportar1KeyPressed(java.awt.event.KeyEvent evt) {\n }",
"private void jTextField15MouseClicked(java.awt.event.MouseEvent evt) {\n }",
"public void keyPressed(KeyEvent e) {/* required for key listener */}",
"public void keyPressed(KeyEvent k){}",
"@Override\n public void keyReleased(KeyEvent event) {\n }",
"public void keyReleased(KeyEvent event) {}",
"private void mobileKeyReleased(java.awt.event.KeyEvent evt) {\n \n \n \n \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new TestRow RecordBuilder by copying an existing Builder | public static org.apache.gora.cascading.test.storage.TestRow.Builder newBuilder(org.apache.gora.cascading.test.storage.TestRow.Builder other) {
return new org.apache.gora.cascading.test.storage.TestRow.Builder(other);
} | [
"public static org.apache.gora.cascading.test.storage.TestRow.Builder newBuilder(org.apache.gora.cascading.test.storage.TestRow other) {\n return new org.apache.gora.cascading.test.storage.TestRow.Builder(other);\n }",
"public static org.apache.gora.cascading.test.storage.TestRow.Builder newBuilder() {\n return new org.apache.gora.cascading.test.storage.TestRow.Builder();\n }",
"private Builder(org.apache.gora.cascading.test.storage.TestRow other) {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n if (isValidValue(fields()[0], other.defaultLong1)) {\n this.defaultLong1 = (java.lang.Long) data().deepCopy(fields()[0].schema(), other.defaultLong1);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.defaultStringEmpty)) {\n this.defaultStringEmpty = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.defaultStringEmpty);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.columnLong)) {\n this.columnLong = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.columnLong);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.unionRecursive)) {\n this.unionRecursive = (org.apache.gora.cascading.test.storage.TestRow) data().deepCopy(fields()[3].schema(), other.unionRecursive);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.unionString)) {\n this.unionString = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.unionString);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.unionLong)) {\n this.unionLong = (java.lang.Long) data().deepCopy(fields()[5].schema(), other.unionLong);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.unionDefNull)) {\n this.unionDefNull = (java.lang.Long) data().deepCopy(fields()[6].schema(), other.unionDefNull);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.family2)) {\n this.family2 = (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>) data().deepCopy(fields()[7].schema(), other.family2);\n fieldSetFlags()[7] = true;\n }\n }",
"public static iodine.avro.TapRecord.Builder newBuilder(iodine.avro.TapRecord.Builder other) {\n return new iodine.avro.TapRecord.Builder(other);\n }",
"private Row.SimpleBuilder rowBuilder()\n {\n if (rowBuilder == null)\n {\n rowBuilder = updateBuilder.row();\n if (noRowMarker)\n rowBuilder.noPrimaryKeyLivenessInfo();\n }\n\n return rowBuilder;\n }",
"private Row(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Builder(com.epam.eco.commons.avro.data.TestJob other) {\n super(SCHEMA$, MODEL$);\n if (isValidValue(fields()[0], other.company)) {\n this.company = data().deepCopy(fields()[0].schema(), other.company);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.position)) {\n this.position = data().deepCopy(fields()[1].schema(), other.position);\n fieldSetFlags()[1] = true;\n }\n this.positionBuilder = null;\n if (isValidValue(fields()[2], other.previousJob)) {\n this.previousJob = data().deepCopy(fields()[2].schema(), other.previousJob);\n fieldSetFlags()[2] = true;\n }\n this.previousJobBuilder = null;\n }",
"private Rows(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public static iodine.avro.TapRecord.Builder newBuilder(iodine.avro.TapRecord other) {\n return new iodine.avro.TapRecord.Builder(other);\n }",
"public static com.maxpoint.cascading.avro.TestExtraLarge.Builder newBuilder(com.maxpoint.cascading.avro.TestExtraLarge.Builder other) {\n return new com.maxpoint.cascading.avro.TestExtraLarge.Builder(other);\n }",
"private Builder(iodine.avro.TapRecord other) {\n super(iodine.avro.TapRecord.SCHEMA$);\n if (isValidValue(fields()[0], other.bm_space_id)) {\n this.bm_space_id = data().deepCopy(fields()[0].schema(), other.bm_space_id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.tap_interface)) {\n this.tap_interface = data().deepCopy(fields()[1].schema(), other.tap_interface);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.tap_host)) {\n this.tap_host = data().deepCopy(fields()[2].schema(), other.tap_host);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.tap_interval)) {\n this.tap_interval = data().deepCopy(fields()[3].schema(), other.tap_interval);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.tap_time)) {\n this.tap_time = data().deepCopy(fields()[4].schema(), other.tap_time);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.tap_data)) {\n this.tap_data = data().deepCopy(fields()[5].schema(), other.tap_data);\n fieldSetFlags()[5] = true;\n }\n }",
"public static avro.Item.Builder newBuilder(avro.Item.Builder other) {\n return new avro.Item.Builder(other);\n }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"public static com.yshi.avro.InnerRecord.Builder newBuilder(com.yshi.avro.InnerRecord other) {\n return new com.yshi.avro.InnerRecord.Builder(other);\n }",
"public static schema.Revision.Builder newBuilder(schema.Revision.Builder other) {\n return new schema.Revision.Builder(other);\n }",
"public static com.epam.eco.commons.avro.data.TestJob.Builder newBuilder(com.epam.eco.commons.avro.data.TestJob.Builder other) {\n if (other == null) {\n return new com.epam.eco.commons.avro.data.TestJob.Builder();\n } else {\n return new com.epam.eco.commons.avro.data.TestJob.Builder(other);\n }\n }",
"public static io.confluent.developer.InterceptTest.Builder newBuilder(io.confluent.developer.InterceptTest.Builder other) {\n return new io.confluent.developer.InterceptTest.Builder(other);\n }",
"private TileRow(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public static Row copy(Row row) {\n\t\tfinal Row newRow = new Row(row.fields.length);\n\t\tSystem.arraycopy(row.fields, 0, newRow.fields, 0, row.fields.length);\n\t\treturn newRow;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints a table displaying specified columns, and checks the expected number of rows. | private void printTable(String table, String cols, String where,
int expected) throws SQLException {
int rows = 0;
ResultSet rs = stmt.executeQuery("SELECT " + cols + " FROM " + table + " " + where);
ResultSetMetaData rsmd = rs.getMetaData();
String result = "Table " + table + ", expecting " + expected
+ " rows total:\n";
while (rs.next()) {
for (int i = 0; i < rsmd.getColumnCount(); i++) {
result += rsmd.getColumnLabel(i + 1) + ":"
+ rs.getString(i + 1) + ":";
}
result += "\n";
rows++;
}
rs.close();
System.out.println(result);
assertEquals(expected, rows);
} | [
"public void printTable() {\n System.out.println(formatForPrint(Arrays.toString(conditionNames)));\n for (int row = 0; row < rowCount; row++) {\n System.out.println(formatForPrint(Arrays.toString(inputMatrix[row])) + \" | \" + resultArray[row]);\n }\n }",
"@Test\n public void checkTableHasRowsMatching1Sufficient() {\n browseTo(\"/checkTableHasRows-1.html\", \"checkTableHasRows - 1\");\n assertTrue(\"Table should have sufficient rows\",\n driverWrapper.checkTableHasRows(\"AAA\", 2));\n }",
"public void printDynamicTable() {\r\n\t\tfor (int i = 0; i < rows; i++) {\r\n\t\t\tfor (int j = 0; j < cols; j++) {\r\n\t\t\t\ttable[i][j].printout();\r\n\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t}//for j\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\t\t}//for i\r\n\t}",
"public void printTable() {\r\n \tif (table.size() == 0)\r\n Logger.error(\"Table \" + table.getType() + \" is empty!\");\r\n else {\r\n table.forEachRow(new EachRowListenerPrint());\r\n }\r\n }",
"@Test\n public void checkTableHasRowsMatching1Insufficient() {\n browseTo(\"/checkTableHasRows-1.html\", \"checkTableHasRows - 1\");\n assertFalse(\"Table should not have sufficient rows\",\n driverWrapper.checkTableHasRows(\"AAA\", 3));\n }",
"@Test\n public void checkTableHasRowsMatching2Sufficient() {\n browseTo(\"/checkTableHasRows-2.html\", \"checkTableHasRows - 2\");\n assertTrue(\"Table should have sufficient rows\",\n driverWrapper.checkTableHasRows(\"AAA\", 1));\n }",
"public void printTable() {\n System.out.print(\"\\033[H\\033[2J\"); // Clear the text in console\n System.out.println(getCell(0, 0) + \"|\" + getCell(0, 1) + \"|\" + getCell(0, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(1, 0) + \"|\" + getCell(1, 1) + \"|\" + getCell(1, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(2, 0) + \"|\" + getCell(2, 1) + \"|\" + getCell(2, 2));\n }",
"@Test\n public void checkTableHasRowsMatching2Insufficient() {\n browseTo(\"/checkTableHasRows-2.html\", \"checkTableHasRows - 2\");\n assertFalse(\"Table should not have sufficient rows\",\n driverWrapper.checkTableHasRows(\"AAA\", 4));\n }",
"@Test\n public void columns_number_assertion_examples() {\n Request request = new Request(dataSource, \"select * from albums\");\n\n assertThat(request).hasNumberOfColumns(6)\n .row().hasNumberOfColumns(6);\n }",
"public void printTable(){\n for (int i=0; i<seq1.length()+1; i++){\n for (int j=0; j<seq2.length()+1; j++){\n System.out.print(table[i][j]+\"\\t\");\n }\n System.out.println();\n }\n }",
"public void displayTimesTable(int table) {\n if (table >= TABLE_MIN && table <= TABLE_MAX) {\n System.out.println(table + \" times table:\");\n for (int i=1; i<=TABLE_MAX; ++i) {\n System.out.printf(\"%2d X %2d = %3d\\n\",\n i, table, timesTables[table][i]);\n } // close for\n } else\n System.out.println(table + \" is not between 1 and 12\");\n }",
"public static void printTable(DebugTable debugTable, PrintWriter printWriter) {\r\n // Determine width of each column\r\n int[] columnWidths = new int[debugTable.getColumnCount()] ;\r\n for (int column = 0; column < debugTable.getColumnCount(); column++) {\r\n String columnName = debugTable.getColumnTitle(column) ;\r\n int width = columnName.length() ;\r\n // Don't bother to pad the last column\r\n if (column != debugTable.getColumnCount()-1) {\r\n for (int row = 0; row < debugTable.getRowCount(); row++) {\r\n try {\r\n Object cell = debugTable.getTableCell(row, column) ;\r\n if (cell != null) {\r\n width = Math.max(width, cell.toString().length()) ;\r\n }\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n // Ok To Ignore\r\n }\r\n }\r\n }\r\n columnWidths[column] = width + COLUMN_PADDING ;\r\n }\r\n\r\n printWriter.println(debugTable.getTableName()) ;\r\n\r\n // column headings\r\n for (int column = 0; column < debugTable.getColumnCount(); column++) {\r\n printPaddedString(printWriter, debugTable.getColumnTitle(column), columnWidths[column], ' ') ;\r\n }\r\n printWriter.println() ;\r\n\r\n // Print the separator line\r\n for (int column = 0; column < debugTable.getColumnCount(); column++) {\r\n printPaddedString(printWriter, \"\", columnWidths[column] - COLUMN_PADDING, '-') ;\r\n printPaddedString(printWriter, \"\", COLUMN_PADDING, ' ') ;\r\n }\r\n printWriter.println() ;\r\n\r\n // print the table contents\r\n for (int row = 0; row < debugTable.getRowCount(); row++) {\r\n for (int column = 0; column < debugTable.getColumnCount(); column++) {\r\n Object cell = debugTable.getTableCell(row, column) ;\r\n if (cell == null) {\r\n cell = \"\" ;\r\n }\r\n printPaddedString(printWriter, cell.toString(), columnWidths[column], ' ') ;\r\n }\r\n printWriter.println() ;\r\n }\r\n }",
"private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.print(\"\\t\" + i + \"\\t|\");\n }\n System.out.println();\n // print body\n for(int i = 0; i < parseTable.size(); i++) {\n System.out.print(i + \"\\t|\");\n for(int j = 0; j < parseTable.get(i).size(); j++) {\n System.out.print(\"\\t\" + parseTable.get(i).get(j) + \"\\t|\");\n }\n System.out.println();\n }\n System.out.println();\n System.out.println(\"END OF SLR PARSE TABLE\");\n System.out.println();\n }",
"public void printTable() {\r\n System.out.println(frame+\") \");\r\n for (int y = 0; y < table.length; y++) {\r\n System.out.println(Arrays.toString(table[y]));\r\n }\r\n frame++;\r\n }",
"public static void displayTable()\n {\n \n \n System.out.println (\"\\n\\t********************* Table of Charges *************************\");\n System.out.println (\"\\t\\t\\t\\t\\t\\tRate per 1000 \");\n System.out.println (\"\\tWeight of Package(Kg)\\t\\t\\tMilesShipped \");\n System.out.println (\"\\t****************************************************************\");\n System.out.printf (\"\\n\\t%-20s%20.2f\",\"1 Kg or less: \\t\",1.70);\n System.out.printf (\"\\n\\t%-20s%20.2f\",\"Over 1 Kg and <= 5 Kg: \\t\",2.20);\n System.out.printf (\"\\n\\t%-20s%20.2f\",\"Over 5 Kg and <= 10 Kg:\\t\",6.70);\n System.out.printf (\"\\n\\t%-20s%20.2f\",\"Over 10 Kg: \\t\",9.80);\n }",
"public void displayTable() {\n\t\tSystem.out.println(\"Table: \");\n\t\tfor (int i = 0; i < arraySize; i++) {\n\t\t\tif (hashArray[i] != null) {\n\t\t\t\tSystem.out.println(hashArray[i]);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"*****\");\n\t\t\t}\n\t\t}\n\t}",
"private static void printTable(Game game) {\r\n\t\tint[][] table = game.getTable();\r\n\t\tint length = table.length;\r\n\t\tSystem.out.println(\"Current table:\");\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\tfor (int j = 0; j < length - 1; j++)\r\n\t\t\t\tSystem.out.print(table[i][j] + \" \\t\");\r\n\t\t\tSystem.out.println(table[i][length - 1]);\r\n\t\t}\r\n\t}",
"@Test\n public void checkTableHasRowsNonMatching2() {\n browseTo(\"/checkTableHasRows-2.html\", \"checkTableHasRows - 2\");\n assertFalse(\"Table should not be found\",\n driverWrapper.checkTableHasRows(\"CCC\", 1));\n }",
"static void dump(Table table, PrintStream out) {\n\n int col_count = table.getColumnCount();\n\n// if (table instanceof DataTable) {\n// DataTable data_tab = (DataTable) table;\n// out.println(\"Total Hits: \" + data_tab.getTotalHits());\n// out.println(\"File Hits: \" + data_tab.getFileHits());\n// out.println(\"Cache Hits: \" + data_tab.getCacheHits());\n// out.println();\n// }\n\n out.println(\"Table row count: \" + table.getRowCount());\n out.print(\" \"); // 6 spaces\n\n // First output the column header.\n for (int i = 0; i < col_count; ++i) {\n out.print(table.getResolvedVariable(i).toString());\n if (i < col_count - 1) {\n out.print(\", \");\n }\n }\n out.println();\n\n // Print out the contents of each row\n int row_num = 0;\n RowEnumeration r_enum = table.rowEnumeration();\n while (r_enum.hasMoreRows() && row_num < 250) {\n // Print the row number\n String num = Integer.toString(row_num);\n int space_gap = 4 - num.length();\n for (int i = 0; i < space_gap; ++i) {\n out.print(' ');\n }\n out.print(num);\n out.print(\": \");\n\n // Print each cell in the row\n int row_index = r_enum.nextRowIndex();\n for (int col_index = 0; col_index < col_count; ++col_index) {\n TObject cell = table.getCellContents(col_index, row_index);\n out.print(cell.toString());\n if (col_index < col_count - 1) {\n out.print(\", \");\n }\n }\n out.println();\n\n ++row_num;\n }\n out.println(\"Finished: \" + row_num + \"/\" + table.getRowCount());\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the list item id for file by server relative url. | public ListenableFuture<String> getListItemIdForFileByServerRelativeUrl(String serverRelativeUrl) {
final SettableFuture<String> result = SettableFuture.create();
String getListUrl = getSiteUrl() + "_api/Web/GetFileByServerRelativeUrl('%s')/ListItemAllFields?$select=id";
getListUrl = String.format(getListUrl, serverRelativeUrl);
try {
ListenableFuture<JSONObject> request = executeRequestJson(getListUrl, "GET");
Futures.addCallback(request, new FutureCallback<JSONObject>() {
@Override
public void onFailure(Throwable t) {
result.setException(t);
}
@Override
public void onSuccess(JSONObject json) {
try {
result.set(json.getJSONObject("d").getString("ID"));
} catch (JSONException e) {
result.setException(e);
}
}
});
} catch (Throwable t) {
result.setException(t);
}
return result;
} | [
"public long getIDfromItemwithURL(String url);",
"public long getFileId();",
"public int getIdFile()\n {\n return this.idFile;\n }",
"String getURL(FsItem f);",
"long getFileId(FileSystem fs, String path) throws IOException;",
"public int GetLocalLittleIdofActionitem(){\r\n\t\tint action_id = 0;\r\n\t\tFile file_path = mcontext.getFilesDir();\r\n\t\tList<ActionInfo> mlist = new ArrayList<ActionInfo>();\r\n\t\tfor(File mm :file_path.listFiles(new ActionFilefilter(\".actionitem\"))){\r\n\t\t\t\tif(action_id == 0){\r\n\t\t\t\t\taction_id = Integer.valueOf(mm.getName().split(\"\\\\.\")[0]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tint mid = Integer.valueOf(mm.getName().split(\"\\\\.\")[0]);\r\n\t\t\t\t\tif(action_id > mid)\r\n\t\t\t\t\t\taction_id = mid;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn action_id;\r\n\t}",
"public static int getBookId(String raw_path){\n String url = raw_path.substring(0, raw_path.indexOf(\"?\"));\n int index_put = url.lastIndexOf(\"/\");\n return Integer.parseInt(url.substring(index_put + 1));\n }",
"public static int getIdFromPath(String path, Context context) {\n ContentResolver cr = context.getContentResolver();\n Cursor cursor = null;\n int id = -1;\n try {\n // UNISOC added for bug 1104603, Modify the query conditions to solve the video playback problem\n cursor = cr.query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,\n new String[]{VideoColumns._ID},\n VideoColumns.DATA + \"='\" + path + \"'\", null, null);\n if (cursor != null && cursor.moveToFirst()) {\n id = cursor.getInt(0);\n }\n } catch (SQLiteException e) {\n e.printStackTrace();\n } catch (Exception e) {\n // TODO: handle exception\n e.printStackTrace();\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n return id;\n }",
"com.google.protobuf.ByteString getFileId();",
"public Integer getFileid() {\n return fileid;\n }",
"private String getFileIdByName(String name, String appFolder) throws IOException {\n\t\t\n\t\tString res = null;\n\t\t\n\t\tFileList flist = null;\n\t\tFiles.List request = null;\n\t\t\t\t\n\t\t\n\t\t\t\t\t\n\t\t// Get File By Name\n\t\trequest = mService.files().list();\n\t\tString q = \"title = '\" + name + \"' and '\" + appFolder + \"' in parents and trashed = false\";\n\t\trequest = request.setQ(q);\n\n\t\tflist = request.execute();\n\t\n\t\tif (flist.getItems().size() > 0) {\n\t\t\tres = flist.getItems().get(0).getId();\n\t\t} else {\n\t\t\tres = null;\n\t\t}\n\t\t\t\n\t\t\n\n\t\treturn res;\n\t}",
"private String getDocIdForFile(CloudFile file) throws FileNotFoundException {\n String path = file.getAbsolutePath();\n String clientId = file.getClientId();\n\n // Find the most-specific root file\n String mostSpecificId = null;\n String mostSpecificPath = null;\n\n synchronized (mRootsLock) {\n for (int i = 0; i < mRoots.size(); i++) {\n final String rootId = mRoots.keyAt(i);\n final String rootPath = mRoots.valueAt(i).file.getAbsolutePath();\n final String rootClientId = mRoots.valueAt(i).file.getClientId();\n if (clientId.startsWith(rootClientId) && path.startsWith(rootPath) && (mostSpecificPath == null\n || rootPath.length() > mostSpecificPath.length())) {\n mostSpecificId = rootId;\n mostSpecificPath = rootPath;\n }\n }\n }\n\n if (mostSpecificPath == null) {\n throw new FileNotFoundException(\"Failed to find root that contains \" + path);\n }\n\n // Start at first char of file under root\n final String rootPath = mostSpecificPath;\n if (rootPath.equals(path)) {\n path = \"\";\n } else if (rootPath.endsWith(\"/\")) {\n path = path.substring(rootPath.length());\n } else {\n path = path.substring(rootPath.length() + 1);\n }\n\n return mostSpecificId + ':' + path;\n }",
"public int getId() {\n // some code goes here\n \treturn m_f.getAbsoluteFile().hashCode();\n }",
"public int getFileFromID(int id) {\n for(int i = 0 ; i < files.size(); i++) {\n if(files.get(i).getFileID() == id)\n return i;\n }\n return -1;\n }",
"int getSrcId();",
"String getResourceId(HttpRequest request) {\n URI uri = request.getUri();\n String path = uri.getPath();\n return path.substring(path.lastIndexOf('/') + 1);\n }",
"public int getFileID() {\n\t\treturn fileID;\n\t}",
"@Override\n protected String getStationId(String filename) {\n Matcher matcher = stationIdPattern.matcher(filename);\n if (matcher.matches()) {\n return matcher.group(1);\n }\n return null;\n }",
"public int getId() {\n return f.getAbsoluteFile().hashCode();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Binds the right click event handler. | private native void bindEventHandler(ComponentRightClickListener self, Element target) /*-{
target.oncontextmenu = function(event) {
self.@twisted.client.events.ComponentRightClickListener::handleEvent(Lcom/google/gwt/dom/client/NativeEvent;)(event);
return(false);
};
}-*/; | [
"public void handleRightClick() {\r\n\t\tgetMatch().handleRightClickNear(player);\r\n\t\tuseRight();\r\n\t}",
"public abstract void onRightClick(double x, double y, boolean release);",
"abstract void onRightClick(int x, int y, boolean down);",
"public void rightClick();",
"default public void clickRight() {\n\t\tremoteControlAction(RemoteControlKeyword.RIGHT);\n\t}",
"public static void rightClick() {\r\n\t\tMinecraftForge.EVENT_BUS.register(playerUtil);\r\n\t}",
"public void mouseClick()\n {\n\t thisRobot.mousePress(RightClick);\n }",
"public void onRightArrowClick(ActionHandler handler)\n{\n\t_rightClick = handler;\n\tfor (ArrowButton i: _arrowRight)\n\t{\n\t\t(i).onMouseClick(handler);\n\t}\n}",
"public void addRightClickAction(final IRightClickAction rightClick) {\r\n\t\tif (rightClickActions.containsKey(rightClick)) {\r\n\t\t\treturn; // disallow multiple registrations of same listener.\r\n\t\t} else {\r\n\t\t\t// Handle right button clicks\r\n\t\t\tMouseListener listener = new MouseAdapter() {\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\tif (e.getButton() == 3) {\r\n\t\t\t\t\t\tPosition p = getWWD().getCurrentPosition();\r\n\t\t\t\t\t\t// HACK required to enable Position.getAltitude() to actually return the current eye point altitude\r\n\t\t\t\t\t\t// originally, Position.getAltitude() and Position.getElevation() both return the elevation.\r\n\t\t\t\t\t\trightClick.apply(new PositionWithAltitude(p, getCurrentAltitude()));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tgetWWD().addMouseListener(listener);\r\n\t\t\trightClickActions.put(rightClick, listener);\r\n\t\t}\r\n\t}",
"private void hookDoubleClickAction() {\n\t\tviewer.addDoubleClickListener(new IDoubleClickListener() {\n\t\t\tpublic void doubleClick(DoubleClickEvent event) {\n\t\t\t\tdoubleClickAction.run();\n\t\t\t}\n\t\t});\n\t}",
"public SceneState handleRightClick(PVector position) {\n \n mContext.mManager.fireBlackHole(position); \n return this;\n\n }",
"private void rightClick(boolean onlyMainScreen, int x, int y, HttpServletResponse resp) throws IOException {\r\n\t\ttry {\r\n\t\t\tlogger.info(String.format(\"right clic at %d,%d\", x, y));\r\n\t\t\tCustomEventFiringWebDriver.rightClicOnDesktopAt(onlyMainScreen, x, y, DriverMode.LOCAL, null);\r\n\t\t\tsendOk(resp, \"right clic ok\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tsendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, resp, e.getMessage());\r\n\t\t}\r\n\t}",
"@OnlyIn(Dist.CLIENT)\n @SubscribeEvent\n public void onRightClickBlock(PlayerInteractEvent.RightClickBlock event) {\n // Saving the last used hand in order to determine which hand caused the action\n // This fires before the EntityPlaceEvent and RightClickItem events\n lastUsedHand = event.getHand();\n }",
"public void onRightButtonClicked() {\r\n\t\t// Check whether the wordChanger has already been intitialized\r\n\t\tif (wordChanger == null) {\r\n\t\t\tinitializeWordChanger();\r\n\t\t}\r\n\t\twordChanger.changeWordManually(WordChanger.LEFT);\r\n\t}",
"public void onRightArrowPress(ActionHandler handler)\n{\n\t_rightPress = handler;\n\tfor (ArrowButton i: _arrowRight)\n\t{\n\t\t(i).onMousePress(handler);\n\t}\n}",
"@Override\r\n \tpublic void mouseReleased(MouseEvent e)\r\n \t{\r\n\t if (showDebug && e.isPopupTrigger()) {\r\n\t rightClickMenu.show(e.getComponent(),\r\n\t e.getX(), e.getY());\r\n\t }\r\n \t}",
"@EventHandler\n\tpublic void onRightClick(PlayerInteractEvent e){\n\t\t\n\t\tPlayer player = e.getPlayer();\n\t\tsetPlayer(player);\n\t\t\n\t}",
"public void mousePressed(MouseEvent e) {\n if (e.getButton() == MouseEvent.BUTTON3) {\n isRightPressed = true;\n }\n }",
"@Override\r\n protected void addListener() {\r\n menuItem.addActionListener(new ManualJMenuItemClickHandler());\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PropertyValueConstraint__ValueAssignment_2" $ANTLR start "rule__ConcreteType__TypeAssignment" ../org.iobserve.rac.constraint.ui/srcgen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:5073:1: rule__ConcreteType__TypeAssignment : ( ( RULE_ID ) ) ; | public final void rule__ConcreteType__TypeAssignment() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:5077:1: ( ( ( RULE_ID ) ) )
// ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:5078:1: ( ( RULE_ID ) )
{
// ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:5078:1: ( ( RULE_ID ) )
// ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:5079:1: ( RULE_ID )
{
if ( state.backtracking==0 ) {
before(grammarAccess.getConcreteTypeAccess().getTypeTypeCrossReference_0());
}
// ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:5080:1: ( RULE_ID )
// ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:5081:1: RULE_ID
{
if ( state.backtracking==0 ) {
before(grammarAccess.getConcreteTypeAccess().getTypeTypeIDTerminalRuleCall_0_1());
}
match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__ConcreteType__TypeAssignment10297); if (state.failed) return ;
if ( state.backtracking==0 ) {
after(grammarAccess.getConcreteTypeAccess().getTypeTypeIDTerminalRuleCall_0_1());
}
}
if ( state.backtracking==0 ) {
after(grammarAccess.getConcreteTypeAccess().getTypeTypeCrossReference_0());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void ruleConcreteType() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:662:2: ( ( ( rule__ConcreteType__TypeAssignment ) ) )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:663:1: ( ( rule__ConcreteType__TypeAssignment ) )\n {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:663:1: ( ( rule__ConcreteType__TypeAssignment ) )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:664:1: ( rule__ConcreteType__TypeAssignment )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getConcreteTypeAccess().getTypeAssignment()); \n }\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:665:1: ( rule__ConcreteType__TypeAssignment )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:665:2: rule__ConcreteType__TypeAssignment\n {\n pushFollow(FOLLOW_rule__ConcreteType__TypeAssignment_in_ruleConcreteType1360);\n rule__ConcreteType__TypeAssignment();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getConcreteTypeAccess().getTypeAssignment()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void ruleType() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:141:2: ( ( ( rule__Type__TypeAssignment ) ) )\n // InternalBrowser.g:142:2: ( ( rule__Type__TypeAssignment ) )\n {\n // InternalBrowser.g:142:2: ( ( rule__Type__TypeAssignment ) )\n // InternalBrowser.g:143:3: ( rule__Type__TypeAssignment )\n {\n before(grammarAccess.getTypeAccess().getTypeAssignment()); \n // InternalBrowser.g:144:3: ( rule__Type__TypeAssignment )\n // InternalBrowser.g:144:4: rule__Type__TypeAssignment\n {\n pushFollow(FOLLOW_2);\n rule__Type__TypeAssignment();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getTypeAccess().getTypeAssignment()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Property__TypeAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:13096:1: ( ( ( RULE_ID ) ) )\n // InternalMyDsl.g:13097:2: ( ( RULE_ID ) )\n {\n // InternalMyDsl.g:13097:2: ( ( RULE_ID ) )\n // InternalMyDsl.g:13098:3: ( RULE_ID )\n {\n before(grammarAccess.getPropertyAccess().getTypeTypeCrossReference_2_0()); \n // InternalMyDsl.g:13099:3: ( RULE_ID )\n // InternalMyDsl.g:13100:4: RULE_ID\n {\n before(grammarAccess.getPropertyAccess().getTypeTypeIDTerminalRuleCall_2_0_1()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getPropertyAccess().getTypeTypeIDTerminalRuleCall_2_0_1()); \n\n }\n\n after(grammarAccess.getPropertyAccess().getTypeTypeCrossReference_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Const__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:4731:1: ( ( ( rule__Const__TypeAssignment_1 ) ) )\n // InternalReflex.g:4732:1: ( ( rule__Const__TypeAssignment_1 ) )\n {\n // InternalReflex.g:4732:1: ( ( rule__Const__TypeAssignment_1 ) )\n // InternalReflex.g:4733:2: ( rule__Const__TypeAssignment_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getConstAccess().getTypeAssignment_1()); \n }\n // InternalReflex.g:4734:2: ( rule__Const__TypeAssignment_1 )\n // InternalReflex.g:4734:3: rule__Const__TypeAssignment_1\n {\n pushFollow(FOLLOW_2);\n rule__Const__TypeAssignment_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getConstAccess().getTypeAssignment_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Property__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:3174:1: ( ( ( rule__Property__TypeAssignment_2 ) ) )\n // InternalMyDsl.g:3175:1: ( ( rule__Property__TypeAssignment_2 ) )\n {\n // InternalMyDsl.g:3175:1: ( ( rule__Property__TypeAssignment_2 ) )\n // InternalMyDsl.g:3176:2: ( rule__Property__TypeAssignment_2 )\n {\n before(grammarAccess.getPropertyAccess().getTypeAssignment_2()); \n // InternalMyDsl.g:3177:2: ( rule__Property__TypeAssignment_2 )\n // InternalMyDsl.g:3177:3: rule__Property__TypeAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__Property__TypeAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPropertyAccess().getTypeAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Const__TypeAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:10246:1: ( ( ruleType ) )\n // InternalReflex.g:10247:2: ( ruleType )\n {\n // InternalReflex.g:10247:2: ( ruleType )\n // InternalReflex.g:10248:3: ruleType\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getConstAccess().getTypeTypeEnumRuleCall_1_0()); \n }\n pushFollow(FOLLOW_2);\n ruleType();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getConstAccess().getTypeTypeEnumRuleCall_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Conversion__TypeAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18260:1: ( ( ruleType ) )\r\n // InternalGo.g:18261:2: ( ruleType )\r\n {\r\n // InternalGo.g:18261:2: ( ruleType )\r\n // InternalGo.g:18262:3: ruleType\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getConversionAccess().getTypeTypeParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleType();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getConversionAccess().getTypeTypeParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__DefDtoSimpleTypeCollectionVariable__TypeAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDtoDsl.g:1398:1: ( ( ruleType ) )\r\n // InternalDtoDsl.g:1399:2: ( ruleType )\r\n {\r\n // InternalDtoDsl.g:1399:2: ( ruleType )\r\n // InternalDtoDsl.g:1400:3: ruleType\r\n {\r\n before(grammarAccess.getDefDtoSimpleTypeCollectionVariableAccess().getTypeTypeParserRuleCall_2_0()); \r\n pushFollow(FOLLOW_2);\r\n ruleType();\r\n\r\n state._fsp--;\r\n\r\n after(grammarAccess.getDefDtoSimpleTypeCollectionVariableAccess().getTypeTypeParserRuleCall_2_0()); \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__Declaration__TypeAssignment_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:4121:1: ( ( ruleType ) )\n // InternalBrowser.g:4122:2: ( ruleType )\n {\n // InternalBrowser.g:4122:2: ( ruleType )\n // InternalBrowser.g:4123:3: ruleType\n {\n before(grammarAccess.getDeclarationAccess().getTypeTypeParserRuleCall_0_0()); \n pushFollow(FOLLOW_2);\n ruleType();\n\n state._fsp--;\n\n after(grammarAccess.getDeclarationAccess().getTypeTypeParserRuleCall_0_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ChildNode__TypeAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAst.g:5273:1: ( ( RULE_ID ) )\n // InternalAst.g:5274:2: ( RULE_ID )\n {\n // InternalAst.g:5274:2: ( RULE_ID )\n // InternalAst.g:5275:3: RULE_ID\n {\n before(grammarAccess.getChildNodeAccess().getTypeIDTerminalRuleCall_1_0()); \n match(input,RULE_ID,FOLLOW_2); \n after(grammarAccess.getChildNodeAccess().getTypeIDTerminalRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Domain__TypesAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12886:1: ( ( ruleType ) )\n // InternalMyDsl.g:12887:2: ( ruleType )\n {\n // InternalMyDsl.g:12887:2: ( ruleType )\n // InternalMyDsl.g:12888:3: ruleType\n {\n before(grammarAccess.getDomainAccess().getTypesTypeParserRuleCall_2_0()); \n pushFollow(FOLLOW_2);\n ruleType();\n\n state._fsp--;\n\n after(grammarAccess.getDomainAccess().getTypesTypeParserRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Schema__TypeAssignment_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:2027:1: ( ( ruleType ) )\n // InternalMyDsl.g:2028:2: ( ruleType )\n {\n // InternalMyDsl.g:2028:2: ( ruleType )\n // InternalMyDsl.g:2029:3: ruleType\n {\n before(grammarAccess.getSchemaAccess().getTypeTypeParserRuleCall_4_0()); \n pushFollow(FOLLOW_2);\n ruleType();\n\n state._fsp--;\n\n after(grammarAccess.getSchemaAccess().getTypeTypeParserRuleCall_4_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__IntConst__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:8002:1: ( ( ( rule__IntConst__TypeAssignment_1 ) ) )\n // InternalSymboleoide.g:8003:1: ( ( rule__IntConst__TypeAssignment_1 ) )\n {\n // InternalSymboleoide.g:8003:1: ( ( rule__IntConst__TypeAssignment_1 ) )\n // InternalSymboleoide.g:8004:2: ( rule__IntConst__TypeAssignment_1 )\n {\n before(grammarAccess.getIntConstAccess().getTypeAssignment_1()); \n // InternalSymboleoide.g:8005:2: ( rule__IntConst__TypeAssignment_1 )\n // InternalSymboleoide.g:8005:3: rule__IntConst__TypeAssignment_1\n {\n pushFollow(FOLLOW_2);\n rule__IntConst__TypeAssignment_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIntConstAccess().getTypeAssignment_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__Result__TypeAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:16130:1: ( ( ruleType ) )\r\n // InternalGo.g:16131:2: ( ruleType )\r\n {\r\n // InternalGo.g:16131:2: ( ruleType )\r\n // InternalGo.g:16132:3: ruleType\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getResultAccess().getTypeTypeParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleType();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getResultAccess().getTypeTypeParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__RootNode__TypeAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAst.g:5134:1: ( ( ruleNodeType ) )\n // InternalAst.g:5135:2: ( ruleNodeType )\n {\n // InternalAst.g:5135:2: ( ruleNodeType )\n // InternalAst.g:5136:3: ruleNodeType\n {\n before(grammarAccess.getRootNodeAccess().getTypeNodeTypeParserRuleCall_2_0()); \n pushFollow(FOLLOW_2);\n ruleNodeType();\n\n state._fsp--;\n\n after(grammarAccess.getRootNodeAccess().getTypeNodeTypeParserRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__QObject__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:1200:1: ( ( ( rule__QObject__TypeAssignment_1 )? ) )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:1201:1: ( ( rule__QObject__TypeAssignment_1 )? )\n {\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:1201:1: ( ( rule__QObject__TypeAssignment_1 )? )\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:1202:1: ( rule__QObject__TypeAssignment_1 )?\n {\n before(grammarAccess.getQObjectAccess().getTypeAssignment_1()); \n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:1203:1: ( rule__QObject__TypeAssignment_1 )?\n int alt11=2;\n int LA11_0 = input.LA(1);\n\n if ( (LA11_0==RULE_ID) ) {\n alt11=1;\n }\n switch (alt11) {\n case 1 :\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:1203:2: rule__QObject__TypeAssignment_1\n {\n pushFollow(FOLLOW_rule__QObject__TypeAssignment_1_in_rule__QObject__Group__1__Impl2489);\n rule__QObject__TypeAssignment_1();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getQObjectAccess().getTypeAssignment_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__SigDefinitions__TypeAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:977:1: ( ( RULE_ID ) )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:978:1: ( RULE_ID )\n {\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:978:1: ( RULE_ID )\n // ../info.kwarc.elf.ui/src-gen/info/kwarc/ui/contentassist/antlr/internal/InternalElf.g:979:1: RULE_ID\n {\n before(grammarAccess.getSigDefinitionsAccess().getTypeIDTerminalRuleCall_2_0()); \n match(input,RULE_ID,FOLLOW_RULE_ID_in_rule__SigDefinitions__TypeAssignment_21904); \n after(grammarAccess.getSigDefinitionsAccess().getTypeIDTerminalRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__ProcessPropertyDef__TypeAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:36854:1: ( ( ruleVariableType ) )\n // InternalDsl.g:36855:2: ( ruleVariableType )\n {\n // InternalDsl.g:36855:2: ( ruleVariableType )\n // InternalDsl.g:36856:3: ruleVariableType\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getProcessPropertyDefAccess().getTypeVariableTypeEnumRuleCall_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleVariableType();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getProcessPropertyDefAccess().getTypeVariableTypeEnumRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public final void rule__RootNode__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAst.g:2673:1: ( ( ( rule__RootNode__TypeAssignment_2 )? ) )\n // InternalAst.g:2674:1: ( ( rule__RootNode__TypeAssignment_2 )? )\n {\n // InternalAst.g:2674:1: ( ( rule__RootNode__TypeAssignment_2 )? )\n // InternalAst.g:2675:2: ( rule__RootNode__TypeAssignment_2 )?\n {\n before(grammarAccess.getRootNodeAccess().getTypeAssignment_2()); \n // InternalAst.g:2676:2: ( rule__RootNode__TypeAssignment_2 )?\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( ((LA27_0>=13 && LA27_0<=15)) ) {\n alt27=1;\n }\n switch (alt27) {\n case 1 :\n // InternalAst.g:2676:3: rule__RootNode__TypeAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__RootNode__TypeAssignment_2();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getRootNodeAccess().getTypeAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback to notify that kernal is about to stop. | public void onKernalStop(boolean cancel); | [
"protected void on_stop()\n {\n }",
"@Override\n protected void onStop() {\n super.onStop();\n\n this.cb.onStop(this);\n }",
"void stop() throws ListenerException;",
"private void internalStop()\n {\n if (log.isDebugEnabled())\n {\n log.debug(m_logPrefix + \"internalStop\");\n }\n synchronized (m_mutex)\n {\n // clean things up so they can be garbage collected even while the\n // user has this session\n // Theoretically, the user could hold onto the session forever.\n if (m_cc != null)\n {\n CCData data = getCCData(m_cc);\n Vector sessions = data.sessions;\n sessions.remove(this);\n m_cc = null;\n }\n\n m_listener = null;\n m_ni = null;\n m_pidsVec = null;\n m_pids = null;\n m_recordingStore = null;\n m_storeChangeListener = null;\n setBufferStore(null);\n\n m_stopped = true;\n }\n }",
"@Override\n\tpublic void stopped() {\n\t\t\n\t}",
"public void onControllerStopBeingUsed();",
"@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tmSpiceManager.shouldStop();\n\t}",
"@Override\n protected void doStop()\n {\n }",
"public void stop() {\n if (0 != stopN()) {\n mLogger.logMsg(MdmLogLevel.ERROR, \"MdmEngine stop failed\");\n }\n }",
"@Override\n public void stop() throws Exception {\n\t\tconsumer.unregister();\n }",
"public void stopListener(){\r\n\t\tcontinueExecuting = false;\r\n\t\tglobalConsoleListener.interrupt();\r\n\t}",
"void stop() {\n\t\tif (worker != null){\r\n//\t\t\tSystem.out.println(\"stopping worker...\");\r\n\t\t\tworker.cancel();\r\n\t\t\tworker = null;\r\n\t\t}\r\n\r\n\t}",
"public void stop() {\r\n if (Status.STARTED.equals(this.status)) {\r\n this.to = TimeUtils.current();\r\n\r\n listener.onStop(this);\r\n\r\n PerformanceTiming timing = CONVERTER.createEndTiming(this);\r\n measurementHub.submit(timing);\r\n }\r\n this.status = Status.STOPPED;\r\n }",
"public synchronized void stop(){\n\t\tif (tickHandle != null){\n\t\t\ttickHandle.cancel(false);\n\t\t\ttickHandle = null;\n\t\t}\n\t}",
"private static synchronized void requestStop() {\n stopRequested = true;\n }",
"public void emergency_Stop() {\n cci.handleEvent(Event.EMMERGENCY_STOP);\n }",
"@Override\n public void stop() {\n buzz(STOP_FREQUENCY);\n }",
"public void stop_thread(){\r\n \t // to do implementation of this function\r\n }",
"public void onStopSimulation()\n {\n setStatus(\"STATUS\", \"Stopping simulation.\");\n ProcessSimulator.endThread = true;\n disableButtons(false);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets only the image filename (without the directory path) | public String getImageFilename() {
return imageFile.getName();
} | [
"public String getImageFileName()\r\n\t\t{\r\n\t\t\treturn imageFile.getFile().getName();\r\n\t\t}",
"private String getImageFileName()\n\t{\n\t\t// TODO test if we can use titles because of spacing and possible unicode input from users.\n\t\t// POI currentPoi = this.blogs.getCurrent();\n\t\t// if (currentPoi.getTitle().length() > 0)\n\t\t// {\n\t\t// return currentPoi.getTitle() + \".jpg\";\n\t\t// }\n\t\t// else\n\t\t// {\n\t\t// for now give it a number.\n\t\treturn String.valueOf( System.currentTimeMillis() ) + WPEnvironment.getImageExtension();\n\t\t// }\n\t}",
"private String getNameImage(String imagePath) {\n\t\treturn imagePath != null ? imagePath.replace(pathFileBase, \"\") : \"\";\n\t}",
"java.lang.String getFilename();",
"private String extractImageNameFromIdentifier(String image) {\n String[] tokens = image.split(\"/\");\n\n String imageName = tokens[tokens.length-1];\n if(imageName.contains(\":\")) {\n return imageName.split(\":\")[0];\n } else {\n return imageName;\n }\n }",
"public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }",
"public static String getImageFileName(String url) {\n if (url == null) return null;\n\n return url.substring(url.lastIndexOf('/') + 1);\n }",
"public String getPhotoFileName() {\n return \"IMG_\" + getId().toString() + \".jpg\";\n }",
"public String getPhotoFileName() {\n \n // The pictures/ folder should be inside same folder as hp.properties, jar etc.\n \n // Get the right slash to use.\n String slash = \"/\";\n if (DBHPInterface.getOS().equals(\"WINDOWS\")) {\n Debug.print(\"OS is detected as Windows.\");\n slash = \"\\\\\";\n }\n \n if (new File(\"pictures\"+slash+(this.personID)+\".jpg\").exists())\n return \"pictures/\"+(this.personID)+\".jpg\";\n \n else if (new File(\"pictures\"+slash+(this.personID)+\".png\").exists())\n return \"pictures/\"+(this.personID)+\".png\";\n \n else if (new File(\"pictures\"+slash+(this.personID)+\".gif\").exists())\n return \"pictures/\"+(this.personID)+\".gif\";\n \n else if (new File(\"pictures\"+slash+\"unknown.jpg\").exists())\n return \"pictures/unknown.jpg\";\n \n else \n return \"\";\n \n }",
"private String getImageName() {\n Date date = new Date();\n String name = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.US).format(date);\n\n return \"IMG_\" + name + \".jpeg\";\n\n }",
"String getOriginalName(Picture image) {\n if (logs.containsKey(image.getPath())) {\n if (logs.get(image.getPath()).size() != 0) {\n String[] record = (String[]) (logs.get(image.getPath()).get(0));\n return record[0];\n }\n }\n return image.getImageName();\n }",
"public String getFileName() {\n\t\treturn String.format(\"resources\\\\cardImages\\\\%s\\\\%s.png\", this.SUIT, this.RANK); // Return file name\r\n }",
"public String getFilename(){\n String filename = this.getName().replaceAll(\"[)('.]\", \"\").replace(\" \", \"-\");\n Affinity affinity = this.getAffinity();\n\n return (affinity==Affinity.Neutral ? filename : (filename+\"_\"+affinity.toString().toLowerCase())) + \".jpg\";\n }",
"public String getImageFileName() {\r\n String result;\r\n if (this.isAlive()) {\r\n result = getClass().getSimpleName().toLowerCase() + \".gif\";\r\n } else {\r\n result = getClass().getSimpleName().toLowerCase() + \"_dead.gif\";\r\n }\r\n return result;\r\n }",
"java.lang.String getImage();",
"public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}",
"java.lang.String getFileName();",
"public String fileName() {\n int ind = path.lastIndexOf('/');\n return path.substring(ind + 1, path.length());\n }",
"private String getFileName(URL url){\n String fName = url.getFile();\n return fName.substring(fName.lastIndexOf('/') + 1);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the rules property: The rules of the web application firewall rule group. | public List<ApplicationGatewayFirewallRule> rules() {
return this.rules;
} | [
"public ArrayList<NetworkSecurityRule> getRules() {\n return this.rules;\n }",
"public List<Rule> getRules() {\n return rules;\n }",
"public Collection<OpenstackSecurityGroupRule> rules() {\r\n return Collections.unmodifiableCollection(rules);\r\n }",
"public List<String> getRules() {\n return this.rules;\n }",
"public ArrayList<String> getRules() {\n return rules;\n }",
"public java.lang.String getRules() {\n if (null != this.rules) {\n return this.rules;\n }\n ValueBinding _vb = getValueBinding(\"rules\");\n if (_vb != null) {\n return (java.lang.String) _vb.getValue(getFacesContext());\n } else {\n return null;\n }\n }",
"public List<IPropertyValidationRule> getRules() {\n\t\treturn _rules;\n\t}",
"public Rules getRules() {\n return theRules;\n }",
"public List<ValidationRule<T, K>> getRules() {\n return rules;\n }",
"java.util.List<com.appscode.api.kubernetes.v1beta2.Rule> \n getRulesList();",
"public Rules getRules()\r\n {\r\n return rules;\r\n }",
"public List<FirewallPolicyRuleCollection> ruleCollections() {\n return this.ruleCollections;\n }",
"public int[] getRules() {\n\t\treturn rules.toArray();\n\t}",
"public String getRules()\r\n {\r\n return rules;\r\n }",
"public List<RulesEngineRule> rules() {\n return this.innerProperties() == null ? null : this.innerProperties().rules();\n }",
"java.util.List<? extends com.appscode.api.kubernetes.v1beta2.RuleOrBuilder> \n getRulesOrBuilderList();",
"java.util.List<com.google.ads.googleads.v14.common.UserListLogicalRuleInfo> \n getRulesList();",
"public RulesClient getRules() {\n return this.rules;\n }",
"public Collection<ExtractedRule> getRules()\r\n\t{\r\n\t\treturn rules;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the booking reference | @Override
public BookingEvent getReference() {
return this.reference;
} | [
"public java.lang.String getBookingReference() {\r\n return bookingReference;\r\n }",
"String getCustomerName(String bookingRef);",
"public void setBookingReference(java.lang.String bookingReference) {\r\n this.bookingReference = bookingReference;\r\n }",
"String getCcNr(String bookingRef);",
"String getVoucherRef();",
"public String getBookingId() {\n return bookingId;\n }",
"public String getREFERENCE()\r\n {\r\n\treturn REFERENCE;\r\n }",
"String getCcV(String bookingRef);",
"java.lang.String getBookFrom();",
"String getCardFirstName(String bookingRef);",
"java.lang.String getRef();",
"String getCustomerLastName(String bookingRef);",
"java.lang.String getBookingURL();",
"public java.lang.String getBookingURL() {\n java.lang.Object ref = bookingURL_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n bookingURL_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getBookingNo() {\n return bookingNo;\n }",
"public int getBookingId() {\n return booking_id;\n }",
"String getCardLastName(String bookingRef);",
"public int getBookingId() {\n return bookingId;\n }",
"public String getRef() {\r\n return this.ref;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of dropColumn method, of class Dataframe. | @Test (expected = BadArgumentException.class)
public void testDropColumnBadArgumentExeption() throws Exception {
emptyDf.dropColumn(0);
} | [
"@Test\n public void testDropColumn_String() throws Exception {\n Column col1 = new Column(\"testCol1\",\"Integer\", Arrays.asList(1, 2));\n Column col2 = new Column(\"testCol2\",\"Integer\", Arrays.asList(1, 2));\n \n emptyDf.insertColumn(col1);\n emptyDf.insertColumn(col2);\n \n emptyDf.dropColumn(\"testCol1\");\n assertEquals(emptyDf.getLabels().size(), 1);\n emptyDf.dropColumn(\"testCol2\");\n assertEquals(emptyDf.getLabels().size(), 0);\n \n }",
"@Test\n public void testDropColumn_int() throws Exception {\n Column col = new Column(\"testCol\",\"Integer\", Arrays.asList(1, 2));\n Column col2 = new Column(\"testCol2\",\"Integer\", Arrays.asList(1, 2));\n \n emptyDf.insertColumn(col);\n emptyDf.insertColumn(col2);\n \n emptyDf.dropColumn(0);\n assertEquals(emptyDf.getLabels().size(), 1);\n emptyDf.dropColumn(0);\n assertEquals(emptyDf.getLabels().size(), 0);\n }",
"@Test\n public void testDropColumn_int2() throws Exception {\n Column col = new Column(\"testCol\",\"Integer\", Arrays.asList(1, 2));\n Column col2 = new Column(\"testCol2\",\"Integer\", Arrays.asList(1, 2));\n \n emptyDf.insertColumn(col);\n emptyDf.insertColumn(col2);\n \n emptyDf.dropColumn(1);\n assertEquals(emptyDf.getLabels().size(), 1);\n emptyDf.dropColumn(0);\n assertEquals(emptyDf.getLabels().size(), 0);\n }",
"@Test (expected = BadArgumentException.class)\n public void testDropColumnBadArgumentExeption2() throws Exception {\n Column col = new Column(\"testCol\",\"Integer\", Arrays.asList(1, 2));\n emptyDf.insertColumn(col);\n assertEquals(emptyDf.getLabels().size(),1);\n emptyDf.dropColumn(0);\n emptyDf.dropColumn(0);\n }",
"public boolean supportsDropColumn() {\r\n return false;\r\n }",
"private void processAlterTableDropColumn(Table t) throws HsqlException {\n\n String token;\n int colindex;\n\n token = tokenizer.getName();\n colindex = t.getColumnNr(token);\n\n session.commit();\n\n TableWorks tableWorks = new TableWorks(session, t);\n\n tableWorks.dropColumn(colindex);\n }",
"public void doDropTable();",
"public void sendDrop(int pColumn) {\n this.send(\"DROP \" + pColumn);\n }",
"@Override\n public String[] getDropColumnSQL(Column column) {\n return new String[]{ \"ALTER TABLE \"\n + getFullName(column.getTable(), false) + \" DELETE \" +\n getColumnDBName(column) };\n }",
"public boolean supportsAlterTableWithDropColumn()\n throws SQLException\n {\n return false;\n }",
"public void deleteColumn()throws Exception{\n admin.deleteColumn(TableName.valueOf(\"t6\"), Bytes.toBytes(\"f1\"));\n\n }",
"public boolean supportsAlterTableWithDropColumn() throws SQLException {\n return true;\n }",
"@Test\n public void testOracleMultiColumnDrop() throws JSQLParserException {\n assertSqlCanBeParsedAndDeparsed(\"ALTER TABLE foo DROP (bar, baz) CASCADE\");\n }",
"String[] getColumnsToDrop();",
"Column removeColumnAt(int index);",
"@Test\n\tpublic void testEliminationByColumn(){\n\t\tsetBoardUp();\n\t\tColumn col = new Column(board, 1);\n\t\tint[] toBeRemoved = {1, 3, 4};\n\t\tint[] fromCesll = {1, 2, 3, 5, 6, 8};\n\t\talgorithm.applyEliminationInColumn(col);\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCesll.length; j++)\n\t\t\t\tcondition &= !col.cell[fromCesll[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\tassertTrue(condition);\n\t}",
"@Test\n public void testSetColumnContents() {\n DataframeColumn instance = new DataframeColumn();\n instance.setColumnContents(null);\n }",
"public static void dropColumn(Database adapter, DbTable table, DbField field) {\r\n if (table == null ||\r\n table.getT() == null || table.getT().length() == 0\r\n )\r\n return;\r\n\r\n if (field == null ||\r\n field.getName() == null || field.getName().length() == 0\r\n )\r\n return;\r\n\r\n String sql_ = \"ALTER TABLE \" + table.getT() + \" DROP COLUMN \" + field.getName();\r\n PreparedStatement ps = null;\r\n try {\r\n ps = adapter.getConnection().prepareStatement(sql_);\r\n ps.executeUpdate();\r\n }\r\n catch (SQLException e) {\r\n throw new DbRevisionException(e);\r\n }\r\n finally {\r\n DbUtils.close(ps);\r\n ps = null;\r\n }\r\n }",
"public boolean drop(int column, int player) {\n //check for vetoed column, reset veto if necesary\n if (column == veto) return false;\n if (vetocount > 0) {\n --vetocount;\n if (vetocount == 1) veto = -1;\n }\n for (int i = 4; i >= 0; i--) {\n if (grid[i][column] == VOID) {\n grid[i][column] = player;\n updateValidMoves();\n return true;\n }\n }\n return false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves a drawable from the book covers cache, identified by the specified id. If the drawable does not exist in the cache, it is loaded and added to the cache. If the drawable cannot be added to the cache, the specified default drwaable is returned. | public static FastBitmapDrawable getCachedCover(String id, FastBitmapDrawable defaultCover) {
FastBitmapDrawable drawable = null;
SoftReference<FastBitmapDrawable> reference = sArtCache.get(id);
if (reference != null) {
drawable = reference.get();
}
if (drawable == null) {
final Bitmap bitmap = loadCover(id);
if (bitmap != null) {
drawable = new FastBitmapDrawable(bitmap);
} else {
drawable = NULL_DRAWABLE;
}
sArtCache.put(id, new SoftReference<FastBitmapDrawable>(drawable));
}
return drawable == NULL_DRAWABLE ? defaultCover : drawable;
} | [
"private @Nullable Drawable getDrawableFromCache(@Nullable String key) {\n if (getDrawableLruCache() == null || key == null) {\n return null;\n }\n\n return getDrawableLruCache().get(key);\n }",
"public Bitmap get(String id) {\r\n Log.v(TAG, \"get() id = \" + id);\r\n if (!cache.containsKey(id)) return null;\r\n SoftReference<Bitmap> ref = cache.get(id);\r\n Bitmap bitmap = ref.get();\r\n if (bitmap != null && bitmap.isRecycled()) {\r\n bitmap = null;\r\n }\r\n return bitmap;\r\n }",
"private Drawable getDrawable() {\n synchronized (drawableCache) {\n if (drawableCache.containsKey(this.getTokenId())) {\n return drawableCache.get(this.getTokenId());\n }\n return this.mDrawable;\n }\n }",
"public static Drawable getResourceDrawable(int resourceId) {\n return Robolectric.application.getApplicationContext().getResources().getDrawable(resourceId);\n }",
"String retrieve(Integer id){\n if (!cache.containsKey(id)){\n // Item not in cache.\n return null;\n } else {\n // Item found in cache.\n // Update the LRU and return the item.\n lru.remove(id);\n lru.add(id);\n return cache.get(id);\n }\n }",
"public Drawable getDrawable(String source);",
"public Drawable findDrawableAt(int x, int y) {\r\n\t\tfor (Layer layer : layers) {\r\n\t\t\tDrawable drawable = layer.findDrawableAt(x, y);\r\n\t\t\tif (drawable != null) return drawable;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public ImageIcon get(String imageId) {\n ImageIcon ret = cache.get(imageId);\n if(ret==null) {\n URL url = this.getClass().getResource(PACKAGE_BASE+imageId);\n if(url!=null) {\n ret = new ImageIcon(url);\n cache.put(imageId, ret);\n }\n }\n return ret;\n }",
"public static Asset getAsset(MD5Key id) {\n \n \t\tif (id == null) {\n \t\t\treturn null;\n \t\t}\n \n \t\tAsset asset = assetMap.get(id);\n \n \t\tif (asset == null && usePersistentCache && assetIsInPersistentCache(id)) {\n \t\t\t// Guaranteed that asset is in the cache.\n \t\t\tasset = getFromPersistentCache(id);\n \t\t}\n \n \t\tif (asset == null && assetHasLocalReference(id)) {\n \n \t\t\tFile imageFile = getLocalReference(id);\n \n \t\t\tif (imageFile != null) {\n \n \t\t\t\ttry {\n \t\t\t\t\tString name = FileUtil.getNameWithoutExtension(imageFile);\n \t\t\t\t\tbyte[] data = FileUtils.readFileToByteArray(imageFile);\n \n \t\t\t\t\tasset = new Asset(name, data);\n \n \t\t\t\t\t// Just to be sure the image didn't change\n \t\t\t\t\tif (!asset.getId().equals(id)) {\n \t\t\t\t\t\tthrow new IOException(\"Image reference did not match the requested image\");\n \t\t\t\t\t}\n \n \t\t\t\t\t// Put it in the persistent cache so we'll find it faster next time\n \t\t\t\t\tputInPersistentCache(asset);\n \t\t\t\t} catch (IOException ioe) {\n \t\t\t\t\t// Log, but continue as if we didn't have a link\n \t\t\t\t\tioe.printStackTrace();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn asset;\n \t}",
"private Drawable getAvatarDrawable(String avatarId) {\n\t\tDrawable avatarDrawable = null;\n\t\tif (avatarId != null) {\n\t\t\tUri uri = AvatarProvider.CONTENT_URI.buildUpon()\n\t\t\t\t\t.appendPath(avatarId).build();\n\t\t\tInputStream in = null;\n\t\t\ttry {\n\t\t\t\ttry {\n\t\t\t\t\tin = getContentResolver().openInputStream(uri);\n\t\t\t\t\tavatarDrawable = Drawable.createFromStream(in, avatarId);\n\t\t\t\t} finally {\n\t\t\t\t\tif (in != null)\n\t\t\t\t\t\tin.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.w(TAG, \"Error while setting the avatar\", e);\n\t\t\t}\n\t\t}\n\t\tif (avatarDrawable == null)\n\t\t\tavatarDrawable = getResources().getDrawable(\n\t\t\t\t\tR.drawable.default_head_selector);\n\t\treturn avatarDrawable;\n\t}",
"public Bitmap getBitmapFromCache(String key)\n {\n return lruCache.get(key);\n }",
"private void putDrawableInCache(@Nullable String key, @Nullable Drawable drawable) {\n if (key != null && drawable != null && getDrawableLruCache() != null\n && getDrawableFromCache(key) == null) {\n getDrawableLruCache().put(key, drawable);\n }\n }",
"public List<DrawableHolder> getDrawablesInBoard(long boardId)\n\t\t\tthrows SharedPaintException;",
"public Bitmap getImageCache(Integer cacheKey)\n {\n synchronized (mLinkedHashMap)\n {\n Bitmap bitmap;\n // Get file from cache\n String file = mLinkedHashMap.get(cacheKey);\n if (file != null)\n {\n bitmap = BitmapFactory.decodeFile(file);\n Log.i(\"DiskLruCache\", \"DiskCacheHit for Image with CacheKey: \"+cacheKey.toString());\n return bitmap;\n }\n else\n {\n // Construct existing file path\n String cacheKeyStr = String.valueOf(cacheKey);\n String existingFile = createFilePath(cacheDirectory, cacheKeyStr);\n // Get the file using the constructed file path\n assert existingFile != null;\n File existFile = new File(existingFile);\n if (existFile.exists())\n {\n // If the file exists, we will store the the key in reference list\n referenceAdd(cacheKey, existingFile);\n return BitmapFactory.decodeFile(existingFile);\n }\n }\n return null;\n }//synchronized (mLinkedHashMap)\n }",
"public Drawable getD(String name) { \n\t\t\n\t int resourceId = activity.getResources().getIdentifier(name, \"drawable\", activity.getPackageName());\n\t return activity.getResources().getDrawable(resourceId);\n\t}",
"public Drawable getDrawable(String name){\r\n \tFileInputStream fis = null;\r\n \tDrawable img = null;\r\n \t\ttry {\r\n File file = new File(DataManager.getImageFolder(),name);\r\n \t fis = new FileInputStream(file);\r\n \t\t\timg = Drawable.createFromStream(fis, \"icon\");\r\n \t\t\tfis.close();\r\n \t\t} catch (FileNotFoundException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (IOException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t\t\r\n \t\treturn img;\r\n }",
"static synchronized Drawing getDrawing(int drawingId) {\r\n return drawings.get(drawingId);\r\n }",
"public Drawable getDrawable() {\n if (mResources != null && mIconId != 0) {\n return mResources.getDrawable(mIconId);\n }\n return null;\n }",
"Bitmap get(String key) {\n return memoryCache.get(key);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.