query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
assume matrix array a and b have same dimensions so make a same size new matrix array | private int[][] matrixSum(int[][] a, int[][]b) {
int row = a.length;
int col = a[0].length;
// creat a matrix array to store sum of a and b
int[][] sum = new int[row][col];
// Add elements at the same position in a matrix array
for (int r = 0; r < row; r++) {
for (int c = 0; c < col; c++) {
sum[r][c] = a[r][c] + b[r][c];
}
}
return sum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Matrix copy(Matrix a){\r\n \t if(a==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = a.getNrow();\r\n \t int nc = a.getNcol();\r\n \t double[][] aarray = a.getArrayReference();\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t double[][] barray = b.getArrayReference();\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=aarray[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = a.index[i];\r\n \t return b;\r\n \t}\r\n \t}",
"private static BigInteger[][] multiply (BigInteger a[][], BigInteger b[][])\n {\n BigInteger x = (a[0][0].multiply(b[0][0])).add(a[0][1].multiply(b[1][0]));\n BigInteger y = (a[0][0].multiply(b[0][1])).add(a[0][1].multiply(b[1][1]));\n BigInteger z = (a[1][0].multiply(b[0][0])).add(a[1][1].multiply(b[1][0]));\n BigInteger w = (a[1][0].multiply(b[0][1])).add(a[1][1].multiply(b[1][1]));\n \n return new BigInteger[][]{{x, y},{z, w}};\n }",
"public void copy(double a[], double b[]) {\n System.arraycopy(b, 0, a, 0, dimension);\n }",
"@Test\n public void testCreateTranspose2(){\n double[][] a = new double[5][5];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }",
"public static double[][] multiplicacaoMatriz(double[][] a, double[][] b) {\n\t\t// linha por coluna\n\n\t\tif (a == null || b == null)\n\t\t\tthrow new NullPointerException(\"Argumentos nulos\");\n\n\t\tif (a[0].length != b.length)\n\t\t\tthrow new IllegalArgumentException(\"Numero de linhas de \\\"A\\\" � diferente de colunas de \\\"B\\\"\");\n\n\t\tfinal double[][] resultado = new double[a.length][b[0].length];\n\n\t\tfor (int x = 0; x < resultado.length; x++)\n\t\t\tfor (int y = 0; y < resultado[0].length; y++) {\n\n\t\t\t\tdouble acomulador = 0;\n\t\t\t\tfor (int i = 0; i < a[0].length; i++)\n\t\t\t\t\tacomulador += a[x][i] * b[i][y];\n\n\t\t\t\tresultado[x][y] = acomulador;\n\t\t\t}\n\n\t\treturn resultado;\n\t}",
"@Test\n public void testCreateTranspose1(){\n double[][] a = new double[1][1];\n a[0][0] = Math.random();\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }",
"public static int[][] add(int[][] a, int[][] b) {\n\t\tint[][] C = new int[4][4];\n\t\t \n for (int q = 0; q < C.length; q++) {\n for (int w = 0; w < C[q].length; w++) {\n C[q][w] = a[q][w] + b[q][w];\n }\n }\n \n for (int q = 0; q < b.length; q++ ){\n for(int w = 0; w < C[q].length;w++){\n }\n }\n \n return C;\n \n \n }",
"public int[][] extraMatriz(int a, int b, int[][] mat) {\r\n\t\tint arra[] = new int[9];\r\n\t\tint cont = 0;\r\n\t\tint i2 = (a/3)*3;\r\n\t\tint j2 = (b/3)*3;\r\n\t\tfor (int i = (a/3)*3; i < i2+3; i++) {\r\n\t\t\tfor (int j = (b/3)*3; j < j2+3; j++) {\r\n\t\t\t\tarra[cont] = mat[i][j];\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.arrayToMatriz(arra);\r\n\t}",
"Matrix( Vector a, Vector b )\n {\n x = b.times(a.x);\n y = b.times(a.y);\n z = b.times(a.z);\n }",
"Matrix(Matrix first, Matrix second) {\n if (first.getColumns() == second.getRows()) {\n this.rows = first.getRows();\n this.columns = second.getColumns();\n matrix = new int[first.getRows()][second.getColumns()];\n for (int col = 0; col < this.getColumns(); col++) {\n int sum;\n int commonality = first.getColumns(); // number to handle summation loop\n for (int rw = 0; rw < this.getRows(); rw++) {\n sum = 0;\n // summation loop\n for (int x = 0; x < commonality; x++) {\n sum += first.getValue(rw, x) * second.getValue(x, col);\n }\n matrix[rw][col] = sum;\n }\n\n }\n } else {\n System.out.println(\"Matrices cannot be multiplied\");\n }\n }",
"public void resize(int a1, int b1, int a2, int b2)\n {\n this.a1 = a1;\n this.b1 = b1;\n this.a2 = a2;\n this.b2 = b2;\n\n n *= 2;\n\n int [] temp1;\n int [] temp2;\n\n temp1 = array1.clone();\n temp2 = array2.clone();\n\n array1 = new int[n];\n array2 = new int[n];\n\n for(int elem : temp1)\n insert(elem);\n for(int elem : temp2)\n insert(elem);\n\n }",
"@Test\n public void testCreateTranspose3(){\n double[][] a = new double[4][2];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }",
"public static int[] combine(int[] a, int[] b){\n if(a.length == 0 && b.length == 0)\n return new int[0];\n else if(a.length == 0)\n return b;\n else if(b.length == 0)\n return a;\n else {\n int[] combinedArray = new int[a.length + b.length];\n System.arraycopy(a, 0, combinedArray, 0, a.length);\n System.arraycopy(b, 0, combinedArray, a.length, b.length);\n\n return combinedArray;\n }\n }",
"public static double[][] multiply(double[][] a, double[][] b) {\n int m1 = a.length;\n int n1 = a[0].length;\n int m2 = b.length;\n int n2 = b[0].length;\n if (n1 != m2) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[][] c = new double[m1][n2];\n for (int i = 0; i < m1; i++)\n for (int j = 0; j < n2; j++)\n for (int k = 0; k < n1; k++)\n c[i][j] += a[i][k] * b[k][j];\n return c;\n }",
"private void copiarMatrices(int origen[], int destino[]) {\n for (int i = 0; i < n; i++) {\n destino[i] = origen[i];\n }\n }",
"Matrix timesT( Matrix b )\n {\n return new Matrix( b.timesV(x), b.timesV(y), b.timesV(z) );\n }",
"public Matriz punto(Matriz B) {\n\t\tMatriz A = this;\n\t\tif (A.getColumnas() != B.getFilas()) { throw new RuntimeException(\"Dimensiones no compatibles.\"); }\n\t\t\n\t\tMatriz C = new Matriz(A.getFilas(), B.getColumnas());\n\t\tfor (int i = 0 ; i < C.getFilas() ; i++) {\n\t\t\tfor (int j = 0 ; j < C.getColumnas() ; j++) {\n\t\t\t\tfor (int k = 0 ; k < A.getColumnas() ; k++) {\n\t\t\t\t\tC.setValor(i, j, C.getValor(i, j) + (A.getValor(i, k) * B.getValor(k, j)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn C;\n\t}",
"public static String[][][] holoport(String[][][] A, String[][][] B) {\n if (A.length <= B.length) {\n\n for (int i = 0; i < A.length; i++) {\n //B[i] = A[i];\n if (A[i].length <= B[i].length) {\n for (int j = 0; j < A[i].length; j++) {\n //B[i][j] = A[i][j];\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n }\n else {\n for (int j = 0; j < B[i].length; j++) {\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n\n }\n }\n }\n }\n }\n else {\n for (int i = 0; i < B.length; i++) {\n //B[i] = A[i];\n if (A[i].length <= B[i].length) {\n for (int j = 0; j < A[i].length; j++) {\n //B[i][j] = A[i][j];\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n }\n else {\n for (int j = 0; j < B[i].length; j++) {\n if (A[i][j].length < B[i][j].length) {\n for (int k = 0; k < A[i][j].length; k++) {\n B[i][j][k] = A[i][j][k];\n //System.out.println(B[i][j][k]);\n }\n }\n else {\n for (int k = 0; k < B[i][j].length; k++) {\n if (i <= A[i][j].length) {\n B[i][j][k] = A[i][j][k];\n }\n else {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n\n }\n }\n }\n }\n }\n //fill array with $ when nothing is put into those spots\n for (int i = 0; i < B.length; i++) {\n for (int j = 0; j < B[i].length; j++) {\n for (int k = 0; k < B[i][j].length; k++) {\n if (B[i][j][k] == null) {\n B[i][j][k] = \"$$$$$$\";\n }\n }\n }\n }\n //return filled array with old array and $\n return B;\n\n }",
"public static double[] solve(double[][] A, double[] b) {\n\t\t//TODO: Diese Methode ist zu implementieren\n\t\tdouble calc_b[] = new double[b.length];\n\t\tdouble calc_A[][] = new double[A.length][A[0].length];\n\t\t\t\t\n\t\t// check for valid array lengths\n\t\tif(A.length != b.length) {\n\t\t\tdouble error[] = {0};\n\t\t\treturn error;\n\t\t}\n\t\t\t\t\n\t\t// copy array values to their calc variables to\n\t\t// to not change the parameter values\n\t\t\t\t\n\t\tSystem.arraycopy(b,0,calc_b,0,b.length);\n\t\tSystem.arraycopy(A,0,calc_A,0,A.length);\n\t\t\n\t\tfor(int i = 0; i < b.length-1; i++) {\n\t\t\t// Pivot Suche\n\t\t\tint pivot_index = i;\n\t\t\tdouble pivot_element = calc_A[i][i];\n\t\t\tfor(int k = i; k < b.length; k++) {\n\t\t\t\tif(Math.abs(calc_A[i][k]) > Math.abs(pivot_element)) {\n\t\t\t\t\tpivot_index = k;\n\t\t\t\t\tpivot_element = calc_A[i][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(pivot_index != i) {\t// check if even necessary\n\n\t\t\t\t// switch pivot element line\n\t\t\t\tdouble buffer = 0D;\n\t\t\t\tfor(int k = 0; k < b.length; k++) {\n\t\t\t\t\tbuffer = calc_A[k][i];\n\t\t\t\t\tcalc_A[k][i] = calc_A[k][pivot_index]; \n\t\t\t\t\tcalc_A[k][pivot_index] = buffer;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// also switch values in b\n\t\t\t\tdouble b_buffer = 0D;\n\t\t\t\tb_buffer = calc_b[i];\n\t\t\t\tcalc_b[i] = calc_b[pivot_index];\n\t\t\t\tcalc_b[pivot_index] = b_buffer;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// subtracting every row j > i by a(j,i)/a(i,i)\n\t\t\tdouble divisor = calc_A[i][i];\n\t\t\tif(divisor == 0) {\n\t\t\t\tdouble error[] = {0};\n\t\t\t\treturn error;\n\t\t\t}\n\t\t\tfor(int j = i+1; j < b.length; j++) {\n\t\t\t\tdouble add = calc_A[i][j]/divisor;\n\t\t\t\tfor(int k = 0; k < b.length; k++) {\n\t\t\t\t\tif(add != 0D) {\n\t\t\t\t\t\tcalc_A[k][j] -= calc_A[k][i]*add;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcalc_b[j] -= calc_b[i]*add;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn backSubst(calc_A,calc_b);\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n double[] a = {1, 2, 5, 9, 0, 7}; //declare and initialize array\n int N = a.length; \n double[] b = new double[N];\n\n for(int i = 0; i < N; i++) {\n b[i] = a[i];\n }\n for(int i = 0; i < b.length; i++) {\n System.out.println(\"Array b is: \" +b[i]);\n }\n for(int i = 0; i < a.length; i++) {\n System.out.println(\"Array a is: \" +a[i]);\n }\n }",
"public Matrix arrayTimesEquals(Matrix B) throws JPARSECException {\n checkMatrixDimensions(B);\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n data[i][j] = data[i][j] * B.data[i][j];\n }\n }\n return this;\n }",
"public static int[][] transposeMatrix(int[][] A){\n //takes 2 D and returns 2D\n int newWidth=A.length;\n int newHeight=A[0].length;\n //get two dimensions for new matrix\n int[][] transposeA=new int[newHeight][newWidth];\n //switch dimensions\n //use for loop to reassign values\n for(int i=0; i<newHeight; i++){\n for(int k=0; k<newWidth; k++){\n //imbedded for loop for individual values\n transposeA[i][k]=A[k][i];\n System.out.print(transposeA[i][k]+\" \");\n \n }\n System.out.println();\n }\n return transposeA;\n \n }",
"public Matrix times(Matrix bmat){\r\n \tif(this.ncol!=bmat.nrow)throw new IllegalArgumentException(\"Nonconformable matrices\");\r\n\r\n \tMatrix cmat = new Matrix(this.nrow, bmat.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n \tdouble sum = 0.0D;\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<bmat.ncol; j++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int k=0; k<this.ncol; k++){\r\n \t\t\tsum += this.matrix[i][k]*bmat.matrix[k][j];\r\n \t\t}\r\n \t\tcarray[i][j]=sum;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"public static Matrix plus(Matrix amat, Matrix bmat){\r\n \tif((amat.nrow!=bmat.nrow)||(amat.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=amat.nrow;\r\n \tint nc=amat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=amat.matrix[i][j] + bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"static double[] getArrayb(double[][] matrix) {\n double[][] res1 = transMatrix(matrix);\n double[] b = new double[res1[res1.length - 1].length];\n for (int i = 0; i < b.length; i++) {\n b[i] = res1[res1.length - 1][i];\n }\n // we get b that is array of right parts\n return b;\n }",
"default void checkLengthOfArrays(double[] a, double[] b) throws IllegalArgumentException {\n if (a.length != b.length) {\n throw new IllegalArgumentException(\"Dimensions are not the same.\");\n }\n }",
"static int[] merge(int[] a, int[] b) {\n\t\tint m = a.length, n = b.length;\n\t\tint[] res = new int[m + n];\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < m || j < n) {\n\t\t\tif (i == m)\n\t\t\t\tres[k++] = b[j++];\n\t\t\telse if (j == n)\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse if (a[i] < b[j])\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse\n\t\t\t\tres[k++] = b[j++];\n\t\t}\n\t\treturn res;\n\t}",
"public static void main(String[] args) {\n\t\tint[][] a = {{1,2},{3,4,5}};\r\n\t\tint b[][] = {{1,1,1,1},{1}};\r\n//\t\tSystem.arraycopy(a, 2, b, 2, 3);\r\n//\t\tSystem.out.println(Arrays.toString(b));\r\n\t\tSystem.out.println(Arrays.deepEquals(a, b));\r\n\t}",
"public static int[][][] eval(int[][][] a, int b) {\n int[][][] dest = new int[a.length][a[0].length][a[0][0].length];\n return eval(dest, a, b);\n }",
"public static double[][] elementWiseMultiply(double[] a, double[][] b){\n\n \tif(a.length != b.length) throw new RuntimeException(\"Illegal vector dimensions.\");\n\n\t\t\tdouble[][] res = new double[b.length][b[0].length];\n\n\t\t\tfor(int i = 0; i < b.length; i++) for(int j = 0; j < b[0].length; j++)\n\t\t\t\tres[i][j] = (a[i] * b[i][j]);\n\n\t\t\treturn res;\n\n }",
"public static void main(String[] args) { \r\n int[][] a = new int[3][5]; // прямоугольный массив\r\n int size1 = a.length;\r\n int size2 = a[0].length;\r\n int[][] b = new int[3][]; // массив переменной длины (тут - треугольный)\r\n b[0] = new int[1];\r\n b[1] = new int[2];\r\n b[2] = new int[3];\r\n int c[] = new int[] {1,2,3,};\r\n c = new int[]{0,1,2,3}; // а вот так не сработает: c = {0,1,2,3};\r\n \r\n int[] array1D= {0,1,2,3}; \r\n int[][] array2D= {{0,1,5,10},{2,3,1,0,5,55,16},{0,1}};\r\n int[][][] array3D= {\r\n { {2,3,1,0},\r\n {2,3,1,0},\r\n {2,3,1,0}},\r\n \r\n { {2,3,1,0},\r\n {2,3,1,0},\r\n {2,3,1,0}},\r\n \r\n { {2,3,1,0},\r\n {2,3,1,0},\r\n {2,3,1,0}}};\r\n System.out.println(\"============array1D==========\");\r\n System.out.println(array1D);\r\n System.out.println(Arrays.toString(array1D)); //Работает на глубину одного измерения (для одномерных масивов)\r\n System.out.println(\"============array2D==========\");\r\n System.out.println(array2D);\r\n System.out.println(Arrays.toString(array2D)); \r\n System.out.println(Arrays.deepToString(array2D));\r\n System.out.println(\"============array3D==========\");\r\n System.out.println(array3D);\r\n System.out.println(Arrays.toString(array3D));\r\n System.out.println(Arrays.deepToString(array3D));\r\n }",
"public Matrix(Matrix bb){\r\n\t\tthis.nrow = bb.nrow;\r\n\t\tthis.ncol = bb.ncol;\r\n\t\tthis.matrix = bb.matrix;\r\n\t\tthis.index = bb.index;\r\n this.dswap = bb.dswap;\r\n \t}",
"public static float[] multiply(float[] a, float[] b) {\n float[] tmp = new float[16];\n glMultMatrixf(FloatBuffer.wrap(a), FloatBuffer.wrap(b), FloatBuffer.wrap(tmp));\n return tmp;\n }",
"void reshape(int newRows,int newCols) {\n if (rows * cols != newRows * newCols)\n throw new IllegalArgumentException(String.format(\"%d x %d matrix can't be reshaped to %d x %d\", rows, cols, newRows, newCols));\n this.cols = newCols;\n this.rows = newRows;\n double[][] tmp = this.asArray();\n int k = 0;\n for (int i = 0; i < cols; i++) {\n for (int j = 0; j < rows; j++) {\n this.data[k] = tmp[j][i];\n k++;\n }\n }\n }",
"public static int[][] copyArray(int[][] a) {\n\t\tint[][] returnArray = new int[a.length][a[0].length];\n\t\tfor (int row = 0; row < a.length; row++) {\n\t\t\tfor (int column = 0; column < a[row].length; column++) {\n\t\t\t\treturnArray[row][column] = a[row][column];\n\t\t\t}\n\t\t}\n\t\treturn returnArray;\n\t}",
"private static void multiply(float[] a, float[] b, float[] destination) {\r\n\t\tfor(int i = 0; i < 4; i++){\r\n\t\t\tfor(int j = 0; j < 4; j++){\r\n\t\t\t\tfor(int k = 0; k < 4; k++){\r\n\t\t\t\t\tset(destination, i, j, get(destination, i, j) + get(a, i, k) * get(b, k, j));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Matrix times(double[][] bmat){\r\n \t int nr=bmat.length;\r\n \tint nc=bmat[0].length;\r\n\r\n \tif(this.ncol!=nr)throw new IllegalArgumentException(\"Nonconformable matrices\");\r\n\r\n \tMatrix cmat = new Matrix(this.nrow, nc);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n \tdouble sum = 0.0D;\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int k=0; k<this.ncol; k++){\r\n \t\t\tsum += this.matrix[i][k]*bmat[k][j];\r\n \t\t}\r\n \t\tcarray[i][j]=sum;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"public static TransformMatrix multiplyMatrix(TransformMatrix a, TransformMatrix b) {\n\t\treturn new TransformMatrix(\n\t\t\t\ta.a * b.a,\n\t\t\t\ta.b * b.b,\n\t\t\t\ta.a * b.c + a.c,\n\t\t\t\ta.b * b.d + a.d\n\t\t\t\t);\n\t}",
"public Matrix plus(double[][] bmat){\r\n \t int nr=bmat.length;\r\n \tint nc=bmat[0].length;\r\n \tif((this.nrow!=nr)||(this.ncol!=nc)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] + bmat[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"public static double[][] matrixInversion(double[][] a) {\r\n\t\t// Code for this function and the functions it calls was adapted from\r\n\t\t// http://mrbool.com/how-to-use-java-for-performing-matrix-operations/26800\r\n\t\t\r\n\t\treturn (divideBy(transpose(cofactor(a)), determinant(a)));\r\n\t}",
"public static short[][] reducedProduct(short[][] a, short[][] b, short n) {\n\n int rowDimension = a.length;\n if (rowDimension == 0)\n return null;\n \n int middleDim = b.length;\n if (middleDim == 0)\n return null;\n \n if (a[0].length != middleDim) \n return null;\n \n int columnDimension = b[0].length;\n\n short[][] product = new short[rowDimension][columnDimension];\n short entry;\n\n for (int i = 0; i < rowDimension; i++) {\n for (int j = 0; j < columnDimension; j++) {\n entry = 0;\n for (int k = 0; k < middleDim; k++) {\n entry = Arithmetic.reducedSum(entry, Arithmetic.reducedProduct(a[i][k], b[k][j], n), n);\n }\n product[i][j] = entry;\n }\n }\n return product;\n }",
"public Matrix arrayTimes(Matrix B) throws JPARSECException {\n checkMatrixDimensions(B);\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = data[i][j] * B.data[i][j];\n }\n }\n return X;\n }",
"private static byte[] m5292a(byte[] bArr, byte[] bArr2) {\n int i = 0;\n byte[] bArr3 = new byte[(bArr2.length + 16)];\n while (i < bArr3.length) {\n bArr3[i] = i < 16 ? bArr[i] : bArr2[i - 16];\n i++;\n }\n return bArr3;\n }",
"public static int[][] merge(int[][] a,int[][] a11, int[][] a12, int[][] a21, int[][] a22){\n int i,j;\n int n = a11.length;\n for(i=0;i<n;i++)\n for(j=0;j<n;j++)\n {\n a[i][j]=a11[i][j];\n a[i][j+n]=a12[i][j];\n a[i+n][j]=a21[i][j];\n a[i+n][j+n]=a22[i][j];\n }\n return a;\n }",
"@Override\r\n\t@operator(value = IKeyword.APPEND_HORIZONTALLY,\r\n\t\tcontent_type = ITypeProvider.BOTH,\r\n\t\tcategory = { IOperatorCategory.MATRIX })\r\n\tpublic IMatrix opAppendHorizontally(final IScope scope, final IMatrix b) {\r\n\t\tif ( this instanceof GamaIntMatrix && b instanceof GamaIntMatrix ) { return ((GamaIntMatrix) this)\r\n\t\t\t._opAppendHorizontally(scope, b); }\r\n\t\tif ( this instanceof GamaFloatMatrix && b instanceof GamaFloatMatrix ) { return ((GamaFloatMatrix) this)\r\n\t\t\t._opAppendHorizontally(scope, b); }\r\n\t\tif ( this instanceof GamaIntMatrix && b instanceof GamaFloatMatrix ) { return new GamaFloatMatrix(\r\n\t\t\t((GamaIntMatrix) this).getRealMatrix())._opAppendHorizontally(scope, b); }\r\n\t\tif ( this instanceof GamaFloatMatrix && b instanceof GamaIntMatrix ) { return ((GamaFloatMatrix) this)\r\n\t\t\t._opAppendHorizontally(scope, new GamaFloatMatrix(((GamaIntMatrix) b).getRealMatrix())); }\r\n\t\tif ( this instanceof GamaObjectMatrix && b instanceof GamaObjectMatrix ) { return ((GamaObjectMatrix) this)\r\n\t\t\t._opAppendHorizontally(scope, b); }\r\n\t\t/*\r\n\t\t * IMatrix a=this;\r\n\t\t * IMatrix aprime = new GamaObjectMatrix(a.getRows(scope), a.getCols(scope));\r\n\t\t * aprime = a._reverse(scope);\r\n\t\t * // System.out.println(\"aprime = \" + aprime);\r\n\t\t * IMatrix bprime = new GamaObjectMatrix(b.getRows(scope), b.getCols(scope));\r\n\t\t * bprime = b._reverse(scope);\r\n\t\t * // System.out.println(\"bprime = \" + bprime);\r\n\t\t * IMatrix c = opAppendVertically(scope, (GamaObjectMatrix) aprime, (GamaObjectMatrix) bprime);\r\n\t\t * // System.out.println(\"c = \" + c);\r\n\t\t * IMatrix cprime = ((GamaObjectMatrix) c)._reverse(scope);\r\n\t\t * // System.out.println(\"cprime = \" + cprime);\r\n\t\t */\r\n\t\treturn this;\r\n\t}",
"public static int[] RandomizeArray(int a, int b){\n\t\tRandom rgen = new Random(); \t\n\t\tint size = b-a+1;\n\t\tint[] array = new int[size];\n \n\t\tfor(int i=0; i< size; i++){\n\t\t\tarray[i] = a+i;\n\t\t}\n \n\t\tfor (int i=0; i<array.length; i++) {\n\t\t int randomPosition = rgen.nextInt(array.length);\n\t\t int temp = array[i];\n\t\t array[i] = array[randomPosition];\n\t\t array[randomPosition] = temp;\n\t\t}\n \n\t\t\n \n\t\treturn array;\n\t}",
"int[][] copyBoard(){\n\t\tint[][] copyB = new int[boardSize][boardSize];\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tcopyB[i] = board[i].clone();\n\t\t}\n\t\treturn copyB;\n\t}",
"private static int[] merge( int[] a, int[] b )\n {\n int[] ans = new int[(a.length + b.length)]; //create new array with the combined lengths\n int a1 = 0; //counter for a's position\n int b1 = 0; //counter for b's position\n while (a1 < a.length || b1 < b.length) { //iterates while either counter is not at the end of each array\n\t if (a1 == a.length) { //if you finished with all of a add the remaining b elements\n\t ans[a1 + b1] = b[b1]; \n\t b1 += 1;\n\t }\n\t else if (b1 == b.length) { //if you finished with all of b add the remaining a elements\n\t ans[a1 + b1] = a[a1];\n\t a1 += 1;\n\t }\n\t else if (a[a1] > b[b1]) { //if the current element at position a1 is larger than the one at b1, add the lower b1 to the new array and move to next b position\n\t ans[a1 + b1] = b[b1];\n\t b1 += 1;\n\t }\n\t else {\n\t ans[a1 + b1] = a[a1]; //otherwise add the element at a1 and move to next a position \n\t a1 += 1;\n\t }\n }\n return ans; //return the sorted merged array\t \t \n }",
"public static Matrix constructWithCopy(double[][] A) throws JPARSECException {\n int m = A.length;\n int n = A[0].length;\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n if (A[i].length != n) {\n throw new JPARSECException\n (\"All rows must have the same length.\");\n }\n for (int j = 0; j < n; j++) {\n C[i][j] = A[i][j];\n }\n }\n return X;\n }",
"public void plusEquals(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tthis.matrix[i][j] += bmat.matrix[i][j];\r\n\t \t}\r\n \t}\r\n \t}",
"private static int[] merge( int[] a, int[] b ) \n { \n\tint[] retArr = new int[a.length + b.length];\n\tint aCounter = 0;\n\tint bCounter = 0;\n\tint index = 0;\n while (aCounter < a.length && bCounter < b.length){\n\t if (a[aCounter] < b[bCounter]){\n\t\tretArr[index] = a[aCounter];\n\t\tindex++;\n\t\taCounter++;\n\t }\n\t else {\n\t\tretArr[index] = b[bCounter];\n\t\tindex++;\n\t\tbCounter++;\n\t }\n\t}\n\tif (aCounter < a.length){\n\t for (int x = aCounter; x < a.length; x++){\n\t\tretArr[index] = a[x];\n\t\tindex++;\n\t }\n\t}\n\telse if (bCounter < b.length){\n\t for (int x = bCounter; x < b.length; x++){\n\t\tretArr[index] = b[x];\n\t\tindex++;\n\t }\n\t}\n\tprintArray(retArr);\n\tSystem.out.println();\n\treturn retArr;\n }",
"public Matrix copy(){\r\n \t if(this==null){\r\n \t return null;\r\n \t }\r\n \t else{\r\n \t int nr = this.nrow;\r\n \t int nc = this.ncol;\r\n \t Matrix b = new Matrix(nr,nc);\r\n \t double[][] barray = b.getArrayReference();\r\n \t b.nrow = nr;\r\n \t b.ncol = nc;\r\n \t for(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tbarray[i][j]=this.matrix[i][j];\r\n \t\t}\r\n \t }\r\n \t for(int i=0; i<nr; i++)b.index[i] = this.index[i];\r\n \t return b;\r\n \t}\r\n \t}",
"public static double[] elementWiseMultiply(double[] a, double[] b){\n\n \tif(a.length != b.length) throw new RuntimeException(\"Illegal vector dimensions.\");\n\n\t\t\tdouble[] res = new double[a.length];\n\n\t\t\tfor(int i = 0; i < a.length; i++)\n\t\t\t\tres[i] = (a[i] * b[i]);\n\n\t\t\treturn res;\n\n }",
"public static Matrix minus(Matrix amat, Matrix bmat){\r\n \tif((amat.nrow!=bmat.nrow)||(amat.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=amat.nrow;\r\n \tint nc=amat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=amat.matrix[i][j] - bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"public static short[][] transpose(short[][] a) {\n if (a.length==0)\n return null;\n if (a[0].length==0)\n return null;\n short[][] transpose = new short[a[0].length][a.length];\n for (int i = 0; i < a[0].length; i++) {\n for (int j = 0; j < a.length; j++) {\n transpose[i][j] = a[j][i];\n }\n }\n return transpose;\n }",
"public void minusEquals(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tthis.matrix[i][j] -= bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \t}",
"public Matrix( int a ) {\n\tmatrix = new Object[a][a];\n }",
"private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}",
"public GameBoard(GameBoard b)\n\t{\n\t\tboard = new int[9][9];\n\t\tfor(int r = 0; r < board.length; r++)\n\t\t{\n\t\t\tfor(int c = 0; c < board[0].length; c++)\n\t\t\t{\n\t\t\t\tboard[r][c] = b.get(r,c);\n\t\t\t}\n\t\t}\n\t}",
"private void copyArray(Object [] targetArray, Object [] sourceArray) {\n if (targetArray.length < sourceArray.length) {\n for (int i = 0; i < targetArray.length; i++) {\n targetArray[i] = sourceArray[i];\n }\n }\n else {\n for (int i = 0; i < sourceArray.length; i++) {\n targetArray[i] = sourceArray[i];\n }\n }\n }",
"public static int[][] remDupli(int[] a)\n {\n \tArrays.sort(a);\n \tprint1D(a);\n \tint[] b=new int[a.length];\n \tint j=0;\n \tfor(int i=0;i<a.length-1;i++)\n \t{\n \t\tif(a[i]==a[i+1]) continue;\n \t\telse {\n \t\t\tb[j]=a[i];\n \t\t\tif(i+1==a.length-1 && b[j]!=a[i+1])\n \t\t\t{\n \t\t\t\tj++;\n \t\t\t\tb[j]=a[i+1];\n \t\t\t}\n \t\t\tj++;\n \t\t}\n \t}\n \t//print1D(b);\n \tint[][] x=new int[2][];\n \tx[0]=b;\n \tint[] y= {j};\n \tx[1]= y;\n \treturn x;\n }",
"public static int[][] matrixMultiply(int[][] matA, int[][] matB)\n {\n if(isRect(matA)== false || isRect(matB)== false || matA[0].length != matB.length)\n {\n System.out.println(\"You cant not multiply these matrices\");\n int[][] matC = {{}};\n return matC;\n }\n else\n {\n int[][] matC = new int[matA.length][matB[0].length];\n for(int i = 0; i < matA.length; i++)\n for(int j = 0; j < matB[0].length; j++)\n for(int k = 0; k < matA[0].length; k++)\n {\n matC[i][j] += matA[i][k] * matB[k][j];\n }\n return matC;\n }\n }",
"public static byte[] mergeByteArrays(byte[] a,byte[] b){\r\n\t\treturn mergeByteArrays(a, b, new byte[0], new byte[0], new byte[0], new byte[0], new byte[0]);\r\n\t}",
"@Test\n public void testSetA() {\n final double expected[] = getMatrix().getA();\n final Matrix33d m = new Matrix33d();\n m.setA(Arrays.copyOf(expected, expected.length));\n for (int i = 0; i < expected.length; i++) {\n assertEquals(m.getA()[i], expected[i]);\n }\n }",
"public Matrix plus(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] + bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"private int[] add(int[] a, int[] b)\n {\n int tI = a.length - 1;\n int vI = b.length - 1;\n long m = 0;\n\n while (vI >= 0)\n {\n m += (((long)a[tI]) & IMASK) + (((long)b[vI--]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }",
"private int[] add(int[] a, int[] b)\n {\n int tI = a.length - 1;\n int vI = b.length - 1;\n long m = 0;\n\n while (vI >= 0)\n {\n m += (((long)a[tI]) & IMASK) + (((long)b[vI--]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }",
"static public double[][] MatrixMult( double [][] A , double [][] B) {\n\t// A [NxK] * B[KxZ] = M[NxZ]\n\tif ( A.length == 0 || B.length == 0 || A[0].length != B.length ) {\n\t System.out.println( \"Matrix Mult Error, Invalid Input Matricies\" );\n\t return new double[1][1];\n\t}\n\tint Rows = A.length , Cols = B[0].length;\n\tdouble [][] M = new double[Rows][Cols];\n\tfor( int i = 0; i < Rows ; i++ ) {\n\t for( int j = 0; j < Cols ; j++ ) {\n\t\tM[i][j] = multRowByCol( A , B , i , j );\n\t }\n\t}\n\treturn M;\n }",
"private static int[][] sparseMatrixMultiplyBruteForce (int[][] A, int[][] B) {\n int[][] result = new int[A.length][B[0].length];\n\n for(int i = 0; i < result.length; i++) {\n for(int j = 0; j < result[0].length; j++) {\n int sum = 0;\n for(int k = 0; k < A[0].length; k++) {\n sum += A[i][k] * B[k][j];\n }\n result[i][j] = sum;\n }\n }\n return result;\n }",
"private Student[] doubler(Student[] a){\n Student[] newArray = new Student[2*(a.length)];\n for(int i = 0; i<a.length; i++){\n newArray[i] = a[i];\n }\n return newArray;\n }",
"@Override\r\n\t@operator(value = IKeyword.APPEND_VERTICALLY,\r\n\t\tcontent_type = ITypeProvider.BOTH,\r\n\t\tcategory = { IOperatorCategory.MATRIX })\r\n\tpublic IMatrix opAppendVertically(final IScope scope, final IMatrix b) {\r\n\t\tif ( this instanceof GamaIntMatrix && b instanceof GamaIntMatrix ) { return ((GamaIntMatrix) this)\r\n\t\t\t._opAppendVertically(scope, b); }\r\n\t\tif ( this instanceof GamaFloatMatrix && b instanceof GamaFloatMatrix ) { return ((GamaFloatMatrix) this)\r\n\t\t\t._opAppendVertically(scope, b); }\r\n\t\tif ( this instanceof GamaIntMatrix && b instanceof GamaFloatMatrix ) { return new GamaFloatMatrix(\r\n\t\t\t((GamaIntMatrix) this).getRealMatrix())._opAppendVertically(scope, b); }\r\n\t\tif ( this instanceof GamaFloatMatrix && b instanceof GamaIntMatrix ) { return ((GamaFloatMatrix) this)\r\n\t\t\t._opAppendVertically(scope, new GamaFloatMatrix(((GamaIntMatrix) b).getRealMatrix())); }\r\n\t\tif ( this instanceof GamaObjectMatrix && b instanceof GamaObjectMatrix ) { return ((GamaObjectMatrix) this)\r\n\t\t\t._opAppendVertically(scope, b); }\r\n\t\t/*\r\n\t\t * Object[] ma = this.getMatrix();\r\n\t\t * Object[] mb = b.getMatrix();\r\n\t\t * Object[] mab = ArrayUtils.addAll(ma, mb);\r\n\t\t * \r\n\t\t * GamaObjectMatrix fl = new GamaObjectMatrix(a.getCols(scope), a.getRows(scope) + b.getRows(scope), mab);\r\n\t\t */\r\n\t\t// throw GamaRuntimeException.error(\"ATTENTION : Matrix additions not implemented. Returns nil for the moment\");\r\n\t\treturn this;\r\n\t}",
"private int[] transformHelper(double[][] tranformationMat, int[] rGB) {\n int[] rGBNew = new int[3];\n for (int i = 0; i < rGB.length; i++) {\n for (int j = 0; j < tranformationMat[0].length; j++) { // tranformationMat size\n rGBNew[i] += tranformationMat[i][j] * rGB[j];\n }\n }\n\n return rGBNew;\n }",
"private static int[] merge( int[] a, int[] b )\n {\n int[] retList = new int[a.length + b.length];\n\t int aPos = 0, bPos = 0;\n\t for(int x = 0; x < retList.length; x ++) {\n\t\t if(aPos < a.length && bPos < b.length) {\n\t\t\t if(a[aPos] < b[bPos]) {\n\t\t\t\t retList[x] = a[aPos];\n\t\t\t\t aPos ++;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t retList[x] = b[bPos];\n\t\t\t\t bPos ++;\n\t\t\t }\n\t\t }\n\t\t else if(aPos < a.length) {\n\t\t\t retList[x] = a[aPos];\n\t\t\t aPos ++;\n\t\t }\n\t\t else {\n\t\t\t retList[x] = b[bPos];\n\t\t\t bPos ++;\n\t\t }\n\t }\n return retList;\n }",
"public static BigFraction[] vectorAddition(BigFraction[] a, BigFraction[] b) {\n a = a.clone();\n b = b.clone();\n if (a.length != b.length) throw new RuntimeException(\"Illegal vector dimensions.\");\n for (int i = 0; i < a.length; i++) {\n a[i] = a[i].add(b[i]);\n }\n return a;\n }",
"public static double [] solveNR(double a[][], double[] b) {\n int N = b.length;\n int [] idxs = new int[N];\n double [][] ac = Common.copy(a);\n double d = ludcmp(ac, idxs);\n double [] bc = Common.copy(b);\n \n lubksb(ac, idxs, bc);\n return bc;\n }",
"private static boolean isValidMultiplication(int[][] A, int[][] B) {\n if(A.length != A[0].length || B.length != B[0].length) {\n return false;\n }\n\n //check same size\n if(A.length != B.length) {\n return false;\n }\n\n //check size is power of 2\n if((A.length & (A.length - 1)) != 0) {\n return false;\n }\n\n return true;\n }",
"public static int[] mergeTwoSortedArrays(int[] a, int[] b){\n System.out.println(\"Merging these two arrays \");\n System.out.print(\"left array -> \");\n print(a);\n System.out.print(\"right array -> \");\n print(b);\n int i = 0, j =0, k = 0;\n int[] ans = new int[a.length + b.length];\n while(i < a.length && j < b.length){\n if(a[i] <= b[j]){\n ans[k] = a[i];\n i++;\n k++;\n }else{\n ans[k] = b[j];\n j++;\n k++;\n }\n }\n\n while(i < a.length){\n ans[k] = a[i];\n k++;\n i++;\n }\n\n while(j < b.length){\n ans[k] = b[j];\n k++;\n j++;\n }\n\n return ans;\n}",
"public void reAllocate() {\n\t\tmat_ = new double[n_][hbw_ + 1];\n\t}",
"public int[][] denseMatrixMult(int[][] A, int[][] B, int size)\n {\n\t int[][] matrix = initMatrix(size);\n\t \n\t // base case\n\t // Just multiply the two numbers in the matrix.\n\t if (size==1) {\n\t\t matrix[0][0] = A[0][0]*B[0][0];\n\t\t return matrix;\n\t }\n\t \n\t // If the base case is not satisfied, we must do strassens. \n\t // Get M0-M6\n\t //a00: x1 = 0, y1 = 0\n\t //a01: x1 = 0; y1 = size/2\n\t //a10: x1 = size/2, y1 = 0\n\t //a11: x1 = size/2,. y1 = size/2\n\t \n\t // (a00+a11)*(b00+b11)\n\t int[][] m0 = denseMatrixMult(sum(A,A,0,0,size/2,size/2,size/2), sum(B,B, 0,0,size/2,size/2,size/2), size/2);\n\t // (a10+a11)*(B00)\n\t int[][] m1 = denseMatrixMult(sum(A,A,size/2,0,size/2,size/2,size/2), sum(B, initMatrix(size/2), 0,0,0,0,size/2), size/2);\n\t //a00*(b01-b11)\n\t int[][] m2 = denseMatrixMult(sum(A, initMatrix(size/2), 0,0,0,0,size/2), sub(B, B, 0, size/2, size/2, size/2, size/2), size/2);\n\t //a11*(b10-b00)\n\t int[][] m3 = denseMatrixMult(sum(A,initMatrix(size/2), size/2, size/2, 0,0,size/2), sub(B,B,size/2,0,0,0,size/2), size/2);\n\t //(a00+a01)*b11\n\t int[][] m4 = denseMatrixMult(sum(A,A,0,0,0,size/2,size/2), sum(B, initMatrix(size/2), size/2, size/2,0,0,size/2), size/2);\n\t //(a10-a00)*(b00+b01)\n\t int[][] m5 = denseMatrixMult(sub(A,A,size/2,0,0,0,size/2), sum(B,B,0,0,0,size/2,size/2), size/2);\n\t //(a01-a11)*(b10-b11)\n\t int[][] m6 = denseMatrixMult(sub(A,A,0,size/2,size/2,size/2,size/2), sum(B,B,size/2,0,size/2,size/2,size/2), size/2);\n\t \n\t // Now that we have these, we can get C00 to C11\n\t // m0+m3 + (m6-m4)\n\t int[][] c00 = sum(sum(m0,m3,0,0,0,0,size/2), sub(m6,m4,0,0,0,0,size/2), 0,0,0,0, size/2);\n\t // m2 + m4\n\t int[][] c01 = sum(m2,m4,0,0,0,0,size/2);\n\t // m1 + m3\n\t int[][] c10 = sum(m1,m3,0,0,0,0,size/2);\n\t // m0-m1 + m2 + m5\n\t int[][] c11 = sum(sub(m0,m1,0,0,0,0,size/2), sum(m2,m5,0,0,0,0,size/2), 0,0,0,0,size/2);\n\t \n\t // Load the results into the return array.\n\t // We are \"stitching\" the four subarrays together. \n\t for (int i = 0; i< size; i++) {\n\t\t for (int j = 0; j<size; j++) {\n\t\t\t if (i<size/2) {\n\t\t\t\t if (j<size/2) {\n\t\t\t\t\t matrix[i][j] = c00[i][j];\n\t\t\t\t } else {\n\t\t\t\t\t matrix[i][j] = c01[i][j-size/2];\n\t\t\t\t }\n\t\t\t } else {\n\t\t\t\t if (j<size/2) {\n\t\t\t\t\t matrix[i][j] = c10[i-size/2][j];\n\t\t\t\t } else {\n\t\t\t\t\t matrix[i][j] = c11[i-size/2][j-size/2];\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t }\n\t \n\t // return the matrix we made.\n\t return matrix;\n }",
"Matrix copy() {\n Matrix newMatrix = new Matrix(matrixSize);\n for (int i = 0; i < matrixSize; i++) {\n if (!rows[i].isEmpty()) {\n rows[i].moveFront();\n while (rows[i].index() != -1) {\n Entry entry = (Entry)rows[i].get();\n newMatrix.changeEntry(i + 1, entry.column, entry.value);\n rows[i].moveNext();\n }\n }\n }\n return newMatrix;\n }",
"public static short[][] reducedSum(short[][] a, short[][] b, short n) {\n \n int rowDimension = a.length;\n if (rowDimension != b.length || rowDimension == 0)\n return null;\n int columnDimension = a[0].length;\n if (columnDimension != b[0].length || columnDimension==0) \n return null;\n\n short[][] sum = new short[rowDimension][columnDimension];\n\n for (int i = 0; i < rowDimension; i++) {\n for (int j = 0; j < columnDimension; j++) {\n sum[i][j] = Arithmetic.reducedSum(a[i][j], b[i][j], n);\n }\n }\n return sum;\n }",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public void setTwoDarray(double[][] aarray){\r\n\t\tif(this.nrow != aarray.length)throw new IllegalArgumentException(\"row length of this Matrix differs from that of the 2D array argument\");\r\n\t\tif(this.ncol != aarray[0].length)throw new IllegalArgumentException(\"column length of this Matrix differs from that of the 2D array argument\");\r\n\t\tfor(int i=0; i<nrow; i++){\r\n\t\t \tif(aarray[i].length!=ncol)throw new IllegalArgumentException(\"All rows must have the same length\");\r\n \t\t\tfor(int j=0; j<ncol; j++){\r\n \t\t \t\tthis.matrix[i][j]=aarray[i][j];\r\n \t\t\t}\r\n\t\t}\r\n\t}",
"private static void merge(int[] a, int[] b) {\n\t\tint aI = a.length-1;\r\n\t\tint bI = b.length-1;\r\n\t\tint posI=a.length-b.length-1;\r\n\t\t\r\n\t\r\n\t\twhile (aI>=0 ) {\r\n\t\t\tif(a[posI]> b[bI]) {//missing the test for posI>=0 see mergeInPlace(int a[],int b[])\r\n\t\t\t\ta[aI]=a[posI];\r\n\t\t\t\tposI--;\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\r\n\t\t\t\ta[aI]=b[bI];\r\n\t\t\t\tbI--;\r\n\r\n\t\t\t}\r\n\t\t\taI--;\r\n\t\t}\r\n\t\t\r\n\t\tfor (int x:a) {\r\n\t\t\tSystem.out.println(x);\r\n\t\t}\r\n\t}",
"public static int[] middleWay(int[] a, int[] b) {\n int[] c = new int[2];\n int temp = 0;\n c[0] = a[a.length / 2];\n c[1] = b[b.length / 2];\n return c;\n\n }",
"int[ ][ ] findSum(int a[][],int b[][])\n {\n int temp[][]=new int[r][c];\n for(int i=0;i<r;i++)\n for(int j=0;i<j;i++)\n temp[i][j]=a[i][j]+b[i][j];\n\n return temp;\n }",
"private void aretes_aB(){\n\t\tthis.cube[22] = this.cube[12]; \n\t\tthis.cube[12] = this.cube[48];\n\t\tthis.cube[48] = this.cube[39];\n\t\tthis.cube[39] = this.cube[3];\n\t\tthis.cube[3] = this.cube[22];\n\t}",
"public Matrix minus(double[][] bmat){\r\n \t int nr=bmat.length;\r\n \tint nc=bmat[0].length;\r\n \tif((this.nrow!=nr)||(this.ncol!=nc)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n\r\n \tMatrix cmat = new Matrix(nr,nc);\r\n \tdouble[][] carray = cmat.getArrayReference();\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tcarray[i][j]=this.matrix[i][j] - bmat[i][j];\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}",
"private boolean compareMatrix(int[][] result , int[][] expected){\n if(result.length != expected.length || result[0].length != expected[0].length){\n return false;\n }\n for(int i=0;i<result.length;i++){\n for(int j=0;j<result[0].length;j++){\n\n if(result[i][j] != expected[i][j]){\n return false;\n }\n }\n }\n return true;\n }",
"public Matrix times(Matrix B) {\n Matrix A = this;\n if (A.columnCount != B.rowCount) throw new RuntimeException(\"Illegal matrix dimensions.\");\n Matrix C = new Matrix(A.rowCount, B.columnCount);\n for (int i = 0; i < C.rowCount; i++)\n for (int j = 0; j < C.columnCount; j++)\n for (int k = 0; k < A.columnCount; k++)\n C.data[i][j] += (A.data[i][k] * B.data[k][j]);\n return C;\n }",
"public Matrix add(Matrix b, BigInteger modulo) {\n Matrix a = this;\n if (a.getColumns() != b.getColumns() ||\n a.getRows() != b.getRows()) {\n throw new MalformedMatrixException(\"Matrix with dimensions \" + nrOfRows + \"x\" + nrOfCols +\n \" cannot be added to matrix with dimensions \" + b.nrOfRows + \"x\" + b.nrOfCols);\n }\n\n IntStream outerStream = IntStream.range(0, a.getRows());\n if (concurrent) {\n outerStream = outerStream.parallel();\n }\n\n BigInteger[][] res = outerStream\n .mapToObj(i -> rowAddition(a.getRow(i), b.getRow(i), modulo))\n .toArray(BigInteger[][]::new);\n\n return new Matrix(res);\n }",
"@SuppressWarnings(\"UnnecessaryLocalVariable\")//Readability\n public Matrix multiply(Matrix b, BigInteger modulo) {\n if (nrOfCols != b.nrOfRows) {\n throw new MalformedMatrixException(\"Matrix with dimensions \" + nrOfRows + \"x\" + nrOfCols +\n \" cannot be multiplied with matrix with dimensions \" + b.nrOfRows + \"x\" + b.nrOfCols);\n }\n Matrix a = this;\n\n int m = a.nrOfRows;\n int p = b.nrOfCols;\n\n final BigInteger[][] result = new BigInteger[m][p];\n\n //Compute the resulting row, using a parallel stream to properly utilize multi-core CPU\n IntStream range = IntStream.range(0, m);\n if (concurrent) {\n range = range.parallel();\n }\n range.forEach(computeRowMultiplication(result, a, b, modulo));\n\n return new Matrix(result);\n }",
"private static int[] merge( int[] a, int[] b ) \n {\n\tint[] c = new int[a.length+b.length];\n\n\tint x=0;\n\tint y=0;\n\tint z=0;\n\n\twhile (x < a.length || y < b.length){\n\t if (x>=a.length) {\n\t\tc[z]=b[y];\n\t\ty++;\n\t }\n\t else if (y>=b.length) {\n\t\tc[z]=a[x];\n\t\tx++;\n\t }\n\n\t else if (a[x] >= b[y]) {\n\t\tc[z] = b[y];\n\t\ty++;\t\t\n\t }\n\t else if (a[x] < b[y]) {\n\t\tc[z] = a[x];\n\t\tx++;\t\t\n\t }\n\t z++;\n\t}\n\treturn c;\n\n }",
"public static String[] concatenateArray(String[] a, String[] b) {\n String[] r = new String[a.length + b.length];\n\n for (int i = 0; i < a.length; i++) {\n r[i] = a[i];\n }\n\n for (int i = 0; i < b.length; i++) {\n r[a.length + i] = b[i];\n }\n\n return r;\n }",
"public static void MergeArrayZigZagWay(int a[] , int b[]){\n int na[] = new int[a.length + b.length];\n\t\tint k = 0;\n\t\tfor(int i = 0; i < a.length; i++){\n\t\t\tna[k++] = a[i];\n\t\t}\n\t\tfor(int i = 0; i < b.length; i++){\n\t\t\tna[k++] = b[i];\n\t\t}\n\t\tArrays.sort(na);\n\t\tint j = na.length - 1;\n\t\tint i = 0;\n\t\twhile(i < j){\n\t\t\tint temp = na[i];\n\t\t\tna[i] = na[j];\n\t\t\tna[j] = temp;\n\t\t\ti++;\n\t\t\tj--;\n\t\t}\n\t\tfor(Integer x : na) {\n\t\t\tSystem.out.print(x + \" \");\n\t\t}\n \n }",
"public static Matrix transpose(Matrix amat){\r\n \tMatrix tmat = new Matrix(amat.ncol, amat.nrow);\r\n \tdouble[][] tarray = tmat.getArrayReference();\r\n \tfor(int i=0; i<amat.ncol; i++){\r\n \t\tfor(int j=0; j<amat.nrow; j++){\r\n \t\ttarray[i][j]=amat.matrix[j][i];\r\n \t\t}\r\n \t}\r\n \treturn tmat;\r\n \t}",
"public void multiplyOtherMatrixToEnd(Matrix other){\n Matrix output = Matrix(other.rows, columns);\n for (int a = 0; a < other.rows; a++)\n {\n for (int b = 0; b < columns; b++)\n {\n for (int k = 0; k < other.columns; k++)\n {\n output[a][b] = output[a][b] + output[a][k] * other.output[k][b];\n }\n }\n }\n return output;\n }",
"@Test\r\n\tvoid deepArrayCopyElementsMultiDim() {\r\n\t\tInteger[][] intArr = new Integer[10][];\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\tintArr[i] = new Integer[4];\r\n\t\t\tfor (int j = 0; j < 4; j++) {\r\n\t\t\t\tintArr[i][j] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tInteger[][] clone = ArrayUtil.deepArrayCopy(intArr);\r\n\t\tassertTrue(Arrays.deepEquals(intArr, clone));\r\n\t}",
"public static int[] twoToOne(int[][] two_board){\n int[] one_board = new int[24];\n int i=0;\n for(int row=0; row<ROW; row++){\n for(int column = 0; column < COLUMN; column++){\n one_board[i] = two_board[row][column];\n i++;\n }\n }\n return one_board;\n }",
"private void resizeBs() {\n int newSize = (buildingXs.length * 2);\n int[] newXs = new int[newSize];\n int[] newYs = new int[newSize];\n int[] newEnt = new int[newSize];\n int[] newFloors = new int[newSize];\n int[] newTypes = new int[newSize];\n int[][][] newApi = new int[newSize][][];\n System.arraycopy(buildingXs, 0, newXs, 0, buildingCount);\n System.arraycopy(buildingYs, 0, newYs, 0, buildingCount);\n System.arraycopy(buildingEntrances, 0, newEnt, 0, buildingCount);\n System.arraycopy(buildingFloors, 0, newFloors, 0, buildingCount);\n System.arraycopy(buildingTypes, 0, newTypes, 0, buildingCount);\n for (int i = 0; i < buildingCount; i++)\n newApi[i] = buildingApi[i];\n\n buildingXs = newXs;\n buildingYs = newYs;\n buildingEntrances = newEnt;\n buildingFloors = newFloors;\n buildingTypes = newTypes;\n buildingApi = newApi;\n }"
] | [
"0.63096976",
"0.6228771",
"0.6162055",
"0.60840786",
"0.59279466",
"0.5920086",
"0.5908467",
"0.58514",
"0.5820452",
"0.5785649",
"0.5782648",
"0.56260514",
"0.56221277",
"0.554129",
"0.55020905",
"0.54914874",
"0.5457102",
"0.5455682",
"0.5431774",
"0.5413106",
"0.53374636",
"0.5317581",
"0.5298344",
"0.52873963",
"0.52801234",
"0.52770853",
"0.5276135",
"0.52687305",
"0.5261902",
"0.52434325",
"0.52404016",
"0.52377504",
"0.5231029",
"0.52255005",
"0.52198964",
"0.52190095",
"0.5217938",
"0.52163965",
"0.5181649",
"0.51727045",
"0.51721275",
"0.51587737",
"0.5145451",
"0.51353616",
"0.51335245",
"0.51315683",
"0.51260215",
"0.5124834",
"0.5123446",
"0.51166666",
"0.51132673",
"0.51111776",
"0.51032674",
"0.50883603",
"0.50752765",
"0.507425",
"0.5072671",
"0.50711644",
"0.50610566",
"0.50601006",
"0.5059455",
"0.5057899",
"0.5057539",
"0.5056542",
"0.50440794",
"0.5032156",
"0.5032156",
"0.503132",
"0.50282425",
"0.50214523",
"0.50213593",
"0.5019766",
"0.50183254",
"0.50120306",
"0.5006523",
"0.49925664",
"0.49885845",
"0.49759486",
"0.49736512",
"0.49731582",
"0.4966022",
"0.49611276",
"0.49530467",
"0.4950304",
"0.49373242",
"0.49370092",
"0.49334013",
"0.49270752",
"0.49262506",
"0.49229032",
"0.49148855",
"0.4909523",
"0.4908497",
"0.49059328",
"0.49057132",
"0.49054798",
"0.4898743",
"0.48918542",
"0.48898366",
"0.48861042"
] | 0.6052478 | 4 |
/ Device interface methods. | @Override
public void setup(IOIO ioio) throws ConnectionLostException {
this.ioio = ioio;
uart = ioio.openUart(rxPin, txPin, baud, parity, stopbits);
in = new PacketInputStream(uart.getInputStream(), Packet.START_BYTES, MAX_DATA_LENGTH);
out = new PacketOutputStream(uart.getOutputStream(), Packet.START_BYTES);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Device createDevice();",
"Reference getDevice();",
"public device() {\n\t\tsuper();\n\t}",
"public void initDevice() {\r\n\t\t\r\n\t}",
"@Override\r\n public void onDeviceConnecting(GenericDevice mDeviceHolder,\r\n PDeviceHolder innerDevice) {\n\r\n }",
"private DisplayDevice(){\t\t\r\n\t\t\r\n\t}",
"@Override\n public int targetDevice() {\n return 0;\n }",
"public IDevice[] getDevices() { return devices; }",
"public abstract void addDevice(Context context, NADevice device);",
"public Device() {\n }",
"public void deviceLoaded(Device device);",
"DeviceSensor createDeviceSensor();",
"@Override\r\n public void onDeviceDescription(GenericDevice dev, PDeviceHolder devh,\r\n String desc) {\n\r\n }",
"public interface IDeviceInfo\r\n{\r\n public DeviceInfo GetDeviceInfo();\r\n}",
"public interface IDeviceManager {\n\n //디바이스 제어시 사용\n ResultMessage deviceExecute(String commandId, String deviceId, String deviceCommand);\n}",
"DeviceClass getDeviceClass();",
"DeviceState createDeviceState();",
"@Override\n public int getDeviceId() {\n return 0;\n }",
"final int getDeviceNum() {\n return device.getDeviceNum();\n }",
"private void initDevice() {\n device = new Device();\n device.setManufacture(new Manufacture());\n device.setInput(new Input());\n device.setPrice(new Price());\n device.getPrice().setCurrency(\"usd\");\n device.setCritical(DeviceCritical.FALSE);\n }",
"public abstract List<NADevice> getDevices(Context context);",
"public interface IRobotDeviceRequest {\n\n /**\n * Returns the device name.\n * \n * @return the device name\n */\n String getDeviceName();\n\n /**\n * Returns the priority of the request.\n * \n * @return the priority of the request\n */\n int getPriority();\n\n /**\n * Returns the time-stamp of this request.\n * \n * @return the time-stamp of this request\n */\n long getTimeStamp();\n\n /**\n * Uid to differentiate the device requests.\n * \n * @return\n */\n long getUID();\n}",
"public Device getDevice() {\n\t\treturn this.device;\n\t}",
"@Override\r\n public void onDeviceStatusChange(GenericDevice dev, PDeviceHolder devh,\r\n PHolderSetter status) {\n\r\n }",
"public interface ElectronicsDevice {\n}",
"public DeviceInfo() {}",
"public interface DeviceInformationManager {\n\n /**\n * This method will manage the storing of the device information as key value pairs.\n * @param deviceInfo - Device info object.\n * @throws DeviceDetailsMgtException\n */\n //void addDeviceInfo(DeviceInfo deviceInfo) throws DeviceDetailsMgtException;\n void addDeviceInfo(DeviceIdentifier deviceId, DeviceInfo deviceInfo) throws DeviceDetailsMgtException;\n\n /**\n * This method will return the device information.\n * @param deviceIdentifier - Device identifier, device type.\n * @return - Device information object.\n * @throws DeviceDetailsMgtException\n */\n DeviceInfo getDeviceInfo(DeviceIdentifier deviceIdentifier) throws DeviceDetailsMgtException;\n\n /**\n * This method will return device information for the supplied devices list.\n * @param deviceIdentifiers\n * @return List of device info objects\n * @throws DeviceDetailsMgtException\n */\n List<DeviceInfo> getDevicesInfo(List<DeviceIdentifier> deviceIdentifiers) throws DeviceDetailsMgtException;\n\n /**\n * This method will manage storing the device location as latitude, longitude, address, zip, country etc..\n * @param deviceLocation - Device location object.\n * @throws DeviceDetailsMgtException\n */\n void addDeviceLocation(DeviceLocation deviceLocation) throws DeviceDetailsMgtException;\n\n /**\n * This method will return the device location with latitude, longitude, address etc..\n * @param deviceIdentifier - Device identifier, device type.\n * @return Device location object.\n * @throws DeviceDetailsMgtException\n */\n DeviceLocation getDeviceLocation(DeviceIdentifier deviceIdentifier) throws DeviceDetailsMgtException;\n\n /**\n * This method will return the device location with latitude, longitude, address etc.. of supplied devices.\n * @param deviceIdentifiers - List of Device identifier and device type.\n * @return Device Location list.\n * @throws DeviceDetailsMgtException\n */\n List<DeviceLocation> getDeviceLocations(List<DeviceIdentifier> deviceIdentifiers) throws DeviceDetailsMgtException;\n\n// /**\n// * This method will manage the storing of device application list.\n// * @param deviceApplication - Device application list.\n// * @throws DeviceDetailsMgtException\n// */\n// void addDeviceApplications(DeviceApplication deviceApplication) throws DeviceDetailsMgtException;\n//\n// /**\n// * This method will return the application list of the device.\n// * @param deviceIdentifier - Device identifier, device type.\n// * @return - Device application list with device identifier.\n// * @throws DeviceDetailsMgtException\n// */\n// DeviceApplication getDeviceApplication(DeviceIdentifier deviceIdentifier) throws DeviceDetailsMgtException;\n}",
"public DeviceLocator getDeviceLocator();",
"public String getDevice() {\r\n return device;\r\n }",
"@Override\n IDeviceFactory getFactory();",
"public interface DeviceBasedTask {\n\n\tpublic Device getDevice();\n\n\tpublic void setDevice(Device device);\n}",
"private DeviceManager() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public interface Message {\n Device getTargetDevice();\n Device getSourceDevice();\n}",
"Device_Resource createDevice_Resource();",
"@Override\n public String getDeviceName() {\n return null;\n }",
"public String getName() {\n\t\treturn \"Device\";\r\n\t}",
"public interface DeviceService extends BaseService<PDevice,String> {\n\n int checkDeviceName(String dname);\n List<String> getallIp();\n int count();\n String authDevice(String msg1);\n void updateDeviceCon(String eid,String conStatue);\n ReType showCon(PDevice pDevice, int page, int limit);\n\n\n List<PDevice> getAlldevice();\n\n void addDevice(PDevice pDevice);\n\n void updateDeviceIp(String eid, String inetAddress);\n\n PDevice selectDevicebyeid(String eid);\n\n JsonUtil deletebydeviceId(String eid, boolean flag);\n\n void updateDevice(PDevice pDevice);\n\n\n List<HashMap<String,String>> getDeviceConnect(List<String> deviceids);\n}",
"public TestDevice getDevice() {\n return mDevice;\n }",
"public interface PeripheralSoftwareDriverInterface extends DriverBaseDataEventListener {\r\n\r\n /**\r\n * Is set in the BaseDriver, you can overwrite it, but for debugging\r\n * purposes not handy\r\n */\r\n public final static String DriverBaseName = \"driver:port\";\r\n\r\n /**\r\n * Returns the driver DB id.\r\n * @return \r\n */\r\n public int getId();\r\n \r\n /**\r\n * Starts the driver and runs the thread\r\n */\r\n public void startDriver();\r\n\r\n /**\r\n * Stops the driver and the thread the driver is running in\r\n */\r\n public void stopDriver();\r\n\r\n /**\r\n * Returns the Hardware driver which belongs to the given running software\r\n * driver.\r\n *\r\n * @return\r\n */\r\n public Peripheral getHardwareDriverFromSoftwareDriver();\r\n\r\n \r\n /**\r\n * Returns the hardware driver.\r\n * @return \r\n */\r\n public PeripheralHardwareDriverInterface getHardwareDriver();\r\n \r\n /**\r\n * Returns the amount of active devices attached to this driver.\r\n *\r\n * @return\r\n */\r\n public int getRunningDevicesCount();\r\n\r\n /**\r\n * Returns a list of running devices whom belong to this driver.\r\n *\r\n * @return\r\n */\r\n public List<Device> getRunningDevices();\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay. this function\r\n * should create a batch with a default name (anonymous)\r\n *\r\n * @param batchData Strings with commands\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData);\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay.\r\n *\r\n * @param batchData Strings with commands\r\n * @param batchName String with the name of the batch to use later on with\r\n * runBatch()\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData, String batchName);\r\n\r\n /**\r\n * Runs the batch previously set with the anonymous addBatch\r\n */\r\n public void runBatch();\r\n\r\n /**\r\n * Runs the batch previously set with addBatch with a batchName\r\n *\r\n * @param batchName Name of the batch to run\r\n */\r\n public void runBatch(String batchName);\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @param prefix When having multiple devices supported by the hardware a\r\n * prefix can distinct the device in your hardware\r\n * @return result of the send command\r\n * @throws java.io.IOException\r\n * @Obsolete Use writeBytes.\r\n */\r\n public boolean sendData(String data, String prefix) throws IOException;\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @return the result of the command\r\n * @throws java.io.IOException\r\n * @Obsolete Use WriteBytes.\r\n */\r\n public boolean sendData(String data) throws IOException;\r\n\r\n /**\r\n * Retrieves the name of the class.\r\n *\r\n * @return the name of the class\r\n */\r\n public String getName();\r\n\r\n /**\r\n * For adding an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void setPeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * for removing an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void removePeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * Handles data received from the hardware driver to be used by overwriting\r\n * classes.\r\n *\r\n * @param oEvent\r\n */\r\n @Override\r\n public void driverBaseDataReceived(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Driver proxy for hardware data.\r\n *\r\n * @param oEvent\r\n */\r\n public void driverBaseDataReceivedProxy(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Returns the package name of the driver as used in the database.\r\n *\r\n * @return The package name of this class\r\n */\r\n public String getPackageName();\r\n\r\n /**\r\n * Adds a device to the listers for whom data can exist.\r\n *\r\n * @param device\r\n */\r\n public void addDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Removes a device from the listeners list.\r\n *\r\n * @param device\r\n */\r\n public void removeDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Handle the data coming from a device driver to dispatch to the hardware\r\n * driver. With this function you can do stuff with the data. For example if\r\n * needed change from string to byte array?\r\n *\r\n * @param device\r\n * @param group\r\n * @param set\r\n * @param deviceData\r\n * @return A string which represents a result, human readable please.\r\n * @throws java.io.IOException\r\n */\r\n public boolean handleDeviceData(Device device, String group, String set, String deviceData) throws IOException;\r\n\r\n /**\r\n * Handles data coming from a device as is in the request!\r\n * @param device\r\n * @param request\r\n * @return\r\n * @throws IOException \r\n */\r\n public boolean handleDeviceData(Device device, DeviceCommandRequest request) throws IOException;\r\n \r\n /**\r\n * Sets the driver DB id.\r\n * @param driverDBId \r\n */\r\n public void setId(int driverDBId);\r\n \r\n /**\r\n * Sets the named id\r\n * @param dbNameId\r\n */\r\n public void setNamedId(String dbNameId);\r\n \r\n /**\r\n * Gets the named id\r\n * @return \r\n */\r\n public String getNamedId();\r\n \r\n /**\r\n * Returns if the driver supports custom devices.\r\n * @return \r\n */\r\n public boolean hasCustom();\r\n \r\n /**\r\n * Set if a driver has custom devices.\r\n * @param hasCustom\r\n * @return \r\n */\r\n public void setHasCustom(boolean hasCustom);\r\n \r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @param softwareId\r\n */\r\n public void setSoftwareDriverId(String softwareId);\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @param softwareIdVersion\r\n */\r\n public void setSoftwareDriverVersion(String softwareIdVersion);\r\n\r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverId();\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverVersion();\r\n\r\n /**\r\n * Returns true if there is a web presentation present.\r\n *\r\n * @return\r\n */\r\n public boolean hasPresentation();\r\n\r\n /**\r\n * Sets a web presentation;\r\n *\r\n * @param pres\r\n */\r\n public void addWebPresentationGroup(WebPresentationGroup pres);\r\n\r\n /**\r\n * Returns the web presentation.\r\n *\r\n * @return\r\n */\r\n public List<WebPresentationGroup> getWebPresentationGroups();\r\n\r\n /**\r\n * Sets the friendlyname.\r\n * @param name \r\n */\r\n public void setFriendlyName(String name);\r\n \r\n /**\r\n * Returns the friendlyname.\r\n * @return \r\n */\r\n public String getFriendlyName();\r\n \r\n /**\r\n * Sets a link with the device service.\r\n * @param deviceServiceLink \r\n */\r\n public void setDeviceServiceLink(PeripheralDriverDeviceMutationInterface deviceServiceLink);\r\n \r\n /**\r\n * Removes a device service link.\r\n */\r\n public void removeDeviceServiceLink();\r\n \r\n /**\r\n * Indicator to let know a device is loaded.\r\n * @param device \r\n */\r\n public void deviceLoaded(Device device);\r\n \r\n}",
"public PuppetIdracServerDevice() { }",
"public interface SerialHelper {\n\n interface DeviceReadyListener{\n void OnDeviceReady(boolean deviceReadyStatus);\n }\n\n ArrayList<String> enumerateDevices();\n void connectDevice(String id, DeviceReadyListener deviceReadyListener);\n void disconnect();\n boolean isDeviceConnected();\n boolean writeString(String data);\n boolean writeBytes(byte[] data);\n byte readByte();\n}",
"DeviceActuator createDeviceActuator();",
"interface DeviceAPI {\n /**\n * Get the children of the device.\n *\n * @param device the device\n *\n * @return the children\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getChildrenOfDevice/{device}\")\n List<JsonDevice> childrenOf(@PathParam(\"device\") int device);\n\n /**\n * Get the SensorML description of the device.\n *\n * @param id the id\n *\n * @return the SensorML description\n */\n @GET\n @Produces(MediaType.APPLICATION_XML)\n @Path(\"getDeviceAsSensorML/{device}\")\n String getSensorML(@PathParam(\"device\") int id);\n\n /**\n * Get the list of all devices.\n *\n * @return the devices\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllActiveDevicesFast\")\n List<JsonDevice> all();\n\n /**\n * Get the device.\n *\n * @param device the id\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDevice/{device}\")\n JsonDevice byId(@PathParam(\"device\") int device);\n\n /**\n * Get all device categories.\n *\n * @return the device categories\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();\n\n /**\n * Get the device.\n *\n * @param urn the URN\n *\n * @return the device\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getDeviceByUrn/{urn}\")\n JsonDevice byURN(@PathParam(\"urn\") String urn);\n }",
"public String getDeviceName(){\n\t return deviceName;\n }",
"@Override\n public Object getData() {\n return devices;\n }",
"public interface IDeviceListener {\n /**\n * 获取设备成功\n */\n void onDeviceSuccess(List<DeviceBean.DevicesBean> devicesList);\n\n /**\n * 获取设备失败\n */\n void onDeviceFail(String message);\n\n /**\n * 获取设备错误\n */\n void onDeviceError(String message);\n}",
"public static interface thDevice\n{\n\n public abstract void C_();\n\n public abstract boolean a(BluetoothDevice bluetoothdevice, int i, byte abyte0[]);\n}",
"public interface DeviceContextChangeListener {\n\n /**\n * Notification about start phase in device context, right after successful handshake\n * @param nodeId\n * @param success or failure\n */\n void deviceStartInitializationDone(final NodeId nodeId, final boolean success);\n\n /**\n * Notification about start phase in device context, after all other contexts initialized properly\n * @param nodeId\n * @param success\n */\n void deviceInitializationDone(final NodeId nodeId, final boolean success);\n\n}",
"@Override\r\n public void onUserSet(GenericDevice dev, PDeviceHolder devh, PUserHolder us) {\n\r\n }",
"@Path(\"device\")\n DeviceAPI devices();",
"DeviceId deviceId();",
"DeviceId deviceId();",
"private void setupPhisicalDevice() {\n try (MemoryStack memstack = MemoryStack.stackPush();) {\n IntBuffer buffer = buffer = memstack.mallocInt(1);\n\n\n long result = vkEnumeratePhysicalDevices(instance, buffer, null);\n int count = buffer.get();\n if (count == 0) {\n throw new RuntimeException(\"No physical support for vulcan available!\");\n }\n\n System.out.println(count);\n buffer = memstack.mallocInt(1);\n buffer.put(buffer.position(), 1);\n PointerBuffer deviceBuffer = memstack.mallocPointer(1);\n vkEnumeratePhysicalDevices(instance, buffer, deviceBuffer);\n //TODO: select the best one\n physicalDevice = new VkPhysicalDevice(deviceBuffer.get(), instance);\n }\n }",
"public interface CommunicationDevice {\n String getAddress();\n\n CommunicationSocket createCommunicationSocket(UUID uuid) throws IOException;\n}",
"public interface IDevicesModel {\n /**\n * action = addDevice\n userid = 12\n username = yuan\n devicename = demo\n deviceaddre = 00:00:00:00\n addtime = 152355660000\n * @param iDevicesListener\n */\n void addDevice(String userid,String username,String devicename,String deviceaddre,Long addtime,\n IDevicesListener iDevicesListener);\n\n void updateDevice(String deviceid,String userid,String username,String devicename,\n String deviceaddre,Long addtime,IDevicesListener iDevicesListener);\n\n void deleteDevice(String deviceid,String userid,String username,IDeleteDeviceListener iDeleteDeviceListener);\n}",
"public Device() {\n isFaceUp = null;\n isFaceDown = null;\n isCloseProximity = null;\n isDark = null;\n }",
"@Override\n\t\tpublic void onDeviceEventReceived(DeviceEvent ev, String client) {\n\t\t\t\n\t\t}",
"On_Device_Resource createOn_Device_Resource();",
"private void initHardware(){\n }",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"public Device findDeviceById(int id);",
"public List getDevices() {\n return devices;\n }",
"public interface DeviceFactory {\n Mouse getMouse();\n Keyboard getKeyboard();\n Touchpad getTouchpad();\n}",
"public interface Allocator {\n\n /**\n * Consume and apply configuration passed in as argument\n *\n * @param configuration configuration bean to be applied\n */\n void applyConfiguration(Configuration configuration);\n\n /**\n * This method allows you to exclude specific device from being used for calculations\n *\n * Please note: you can call this method multiple times, to ban multiple devices\n *\n * @param deviceId deviceId to be banned\n */\n void banDevice(Integer deviceId);\n\n /**\n * Set active CUDA environment\n *\n * @param environment\n */\n void setEnvironment(CudaEnvironment environment);\n\n /**\n * This method returns CudaContext for current thread\n *\n * @return\n */\n CudaContext getCudaContext();\n\n /**\n * This methods specifies Mover implementation to be used internally\n *\n * @param mover\n */\n void setMover(Mover mover);\n\n /**\n * Returns current Allocator configuration\n *\n * @return current configuration\n */\n Configuration getConfiguration();\n\n /**\n * This method registers buffer within allocator instance\n */\n // Long pickupSpan(BaseCudaDataBuffer buffer, AllocationShape shape);\n\n /**\n * This method registers array's buffer within allocator instance\n * @param array INDArray object to be picked\n */\n Long pickupSpan(INDArray array);\n\n /**\n * This method hints allocator, that specific object was accessed on host side.\n * This includes putRow, putScalar;\n *\n * @param array\n */\n void tickHost(INDArray array);\n\n\n /**\n * This methods hints allocator, that specific object was accessed on device side.\n *\n * @param array\n */\n @Deprecated\n void tickDevice(INDArray array);\n\n\n /**\n * This method hints allocator, that specific object was released on device side\n *\n * @param array\n */\n void tackDevice(INDArray array);\n\n /**\n * This method notifies allocator, that specific object was changed on device side\n *\n * @param array\n */\n void tickDeviceWrite(INDArray array);\n\n /**\n * This method notifies allocator, that specific object was changed on host side\n *\n * @param array\n */\n void tickHostWrite(INDArray array);\n\n /**\n * This method returns actual device pointer valid for current object\n *\n * @param buffer\n */\n @Deprecated\n Pointer getDevicePointer(DataBuffer buffer);\n\n /**\n * This method returns actual device pointer valid for specified shape of current object\n *\n * @param buffer\n * @param shape\n */\n @Deprecated\n Pointer getDevicePointer(DataBuffer buffer, AllocationShape shape, boolean isView);\n\n\n /**\n * This method returns actual device pointer valid for specified INDArray\n */\n Pointer getDevicePointer(INDArray array);\n\n\n /**\n * This method returns actual host pointer, valid for specified shape of current object\n *\n * @param array\n * @return\n */\n Pointer getHostPointer(INDArray array);\n\n /**\n * This method should be callsd to make sure that data on host side is actualized\n *\n * @param array\n */\n void synchronizeHostData(INDArray array);\n\n /**\n * This method should be calls to make sure that data on host side is actualized\n *\n * @param buffer\n */\n void synchronizeHostData(DataBuffer buffer);\n\n /**\n * This method should be callsd to make sure that data on host side is actualized.\n * However, this method only tries to lock data before synchronization.\n *\n * PLEASE NOTE: This methos is considered non-safe.\n *\n * @param buffer\n */\n void trySynchronizeHostData(DataBuffer buffer);\n\n /**\n * This method returns current host memory state\n *\n * @param array\n * @return\n */\n SyncState getHostMemoryState(INDArray array);\n\n /**\n * This method returns the number of top-level memory allocation.\n * No descendants are included in this result.\n *\n * @return number of allocated top-level memory chunks\n */\n int tableSize();\n\n\n /**\n * This method returns CUDA deviceId for specified array\n *\n * @param array\n * @return\n */\n Integer getDeviceId(INDArray array);\n\n /**\n * This method returns CUDA deviceId for current thread\n *\n * @return\n */\n Integer getDeviceId();\n}",
"public interface ICpMemory extends ICpDeviceProperty {\n\n\tfinal static char READ_ACCESS \t\t= 'r';\n\tfinal static char WRITE_ACCESS\t\t= 'w';\n\tfinal static char EXECUTE_ACCESS\t= 'x';\n\tfinal static char SECURE_ACCESS\t\t= 's';\n\tfinal static char NON_SECURE_ACCESS\t= 'n';\n\tfinal static char CALLABLE_ACCESS\t= 'c';\n\tfinal static char PERIPHERAL_ACCESS\t= 'p';\n\t\n\t/**\n\t * Checks if the memory shall be used for the startup by linker\n\t * @return true if startup memory\n\t */\n\tboolean isStartup();\n\t\n\t/**\n\t * Returns access string corresponding following regular expression pattern: \"[rwxpsnc]+\"\n\t * @return \"access\" attribute value if present or default derived from ID for deprecated elements \n\t */\n\tString getAccess();\n\n\t/**\n\t * Checks if the memory region represents RAM (\"rwx\")\n\t * @return true if RAM\n\t */\n\tboolean isRAM();\n\n\t/**\n\t * Checks if the memory region represents ROM (\"rx\")\n\t * @return true if ROM\n\t */\n\tboolean isROM();\n\n\t\n\t/**\n\t * Checks if memory has specified access\n\t * @param access : one of <code>rwxpsnc</code> characters\n\t * @return true if memory provides specified access\n\t */\n\tboolean isAccess(char access);\n\t\n\t/**\n\t * Checks if memory has read access\n\t * @return true if memory has read access\n\t */\n\tboolean isReadAccess();\n\t\n\t/**\n\t * Checks if memory has write access\n\t * @return true if memory has write access\n\t */\n\tboolean isWriteAccess();\n\n\t/**\n\t * Checks if memory has execute access\n\t * @return true if memory has execute access\n\t */\n\tboolean isExecuteAccess();\n\n\t\n\t/**\n\t * Checks if memory has secure access\n\t * @return true if memory has secure access\n\t */\n\tboolean isSecureAccess();\n\t\n\t/**\n\t * Checks if memory has non-secure access\n\t * @return true if memory has non-secure access\n\t */\n\tboolean isNonSecureAccess();\n\t\n\t/**\n\t * Checks if memory has callable access\n\t * @return true if memory has callable access\n\t */\n\tboolean isCallableAccess();\n\n\t/**\n\t * Checks if memory has peripheral access\n\t * @return true if memory has peripheral access\n\t */\n\tboolean isPeripheralAccess(); \n\n\t\n}",
"abstract protected void setDeviceName(String deviceName);",
"DeviceCapabilitiesProvider getDeviceCapabilitiesProvider();",
"@Override\n\tpublic void onDeviceChangeInfoSuccess(FunDevice funDevice) {\n\n\t}",
"String getDeviceName();",
"public DeviceData() {\r\n this.rtAddress = 0;\r\n this.subAddress = 0;\r\n this.txRx = 0;\r\n this.data = new short[32];\r\n }",
"boolean hasDevice();",
"public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);",
"public static ElectronicDevice getDevice(){\n\t\treturn new Television();\n\t\t\n\t}",
"public BizFallDevice() {\n super();\n }",
"public Integer getDevices() {\r\n return devices;\r\n }",
"public DeviceInformation getDeviceInformation() {\n if (deviceInformation == null) {\n deviceInformation = deviceManager.generateDeviceInformation();\n }\n return deviceInformation;\n }",
"private native void nGetDevices(Vector deviceList);",
"public abstract UPnPDeviceNode GetDeviceNode(String name);",
"public String getDeviceName() {\n return this.deviceName;\n }",
"@Override\n public void onDeviceStateChange(VirtualDevice virtualDevice, int returncode) {\n\n }",
"default public int getControlToDevicePort()\t\t\t\t{ return 2226; }",
"@Override\n\tpublic String getDeviceName() {\n\t\treturn null;\n\t}",
"public interface DeviceResource extends GpoResource, GpiResource {\n\n public String getId();\n}",
"public void show() throws DeviceException;",
"public void setDevice(String device) {\r\n this.device = device;\r\n }",
"public interface OnDeviceSelectedListener {\n\n /**\n * Method used to send the address of a selected bluetooth device.\n * @param address the MAC address of the bluetooth device.\n */\n void onDeviceSelected(String address);\n}",
"public interface IDiscoveryListener {\r\n\t/**\r\n\t * Called when a device is discovered.\r\n\t * \r\n\t * @param _discoverer the discoverer that found the device\r\n\t * @param _device the device that was found\r\n\t */\r\n\tpublic void deviceDiscovered(IDiscoverer _discoverer, IDevice _device);\r\n}",
"@GET(\"device\")\n Call<DevicesResponse> getDevice();",
"public void onPrepareDevice(ConnectDevice device);",
"Integer getDeviceId();",
"private void deviceUpdated() {\n if (!mIsCreate) {\n mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);\n }\n }",
"public interface I_DevOBJ {\n\n\t/**\n\t * get:deviceId\n\t * \n\t * @return the deviceId\n\t */\n\tpublic String getDeviceId();\n\n\t/**\n\t * get:oui\n\t * \n\t * @return the oui\n\t */\n\tpublic String getOui();\n\n\t/**\n\t * get:device_serialnumber\n\t * \n\t * @return the device_serialnumber\n\t */\n\tpublic String getSn();\n\n\t/**\n\t * set:deviceId\n\t * \n\t * @param deviceId\n\t * the deviceId to set\n\t */\n\tpublic void setDeviceId(String deviceId);\n\n\t/**\n\t * set:oui\n\t * \n\t * @param oui\n\t * the oui to set\n\t */\n\tpublic void setOui(String oui);\n\n\t/**\n\t * set:device_serialnumber\n\t * \n\t * @param device_serialnumber\n\t * the device_serialnumber to set\n\t */\n\tpublic void setSn(String sn);\n\n}",
"public void openUsbDevice() {\n tryGetUsbPermission();\n }",
"public String getDeviceDescription() {\r\n return deviceDesc;\r\n }",
"public interface USBPort {\n void workWithUSB();\n}",
"public interface DeviceRegistry {\n void registerRS232Device(RS232Device device);\n}",
"public com.google.protobuf.Empty setDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.Device request);",
"public void deviceDiscovered(IDiscoverer _discoverer, IDevice _device);",
"interface DmaRequestRead extends DmaRequest\n{\n\t/**\n\t * Set the value from memory to the peripheral.\n\t */\n\tpublic void setDmaValue(int value);\n}",
"public Device findById(Long id) throws Exception;"
] | [
"0.7581337",
"0.7476219",
"0.7267232",
"0.724411",
"0.6878045",
"0.6877951",
"0.6846929",
"0.67785335",
"0.6732243",
"0.67075276",
"0.66806436",
"0.66349065",
"0.66346514",
"0.6600811",
"0.65665025",
"0.656249",
"0.6559653",
"0.6518945",
"0.64866674",
"0.64741147",
"0.64670646",
"0.64537054",
"0.6444966",
"0.64427525",
"0.64388096",
"0.6378475",
"0.63771677",
"0.6373463",
"0.63681835",
"0.63637626",
"0.6347678",
"0.63450235",
"0.63317615",
"0.6311274",
"0.63069594",
"0.6287511",
"0.6274438",
"0.624093",
"0.6223853",
"0.62236243",
"0.62226325",
"0.6204291",
"0.6186699",
"0.61671656",
"0.6156765",
"0.61528796",
"0.6151607",
"0.61369556",
"0.6124656",
"0.61223334",
"0.61158127",
"0.61158127",
"0.6115281",
"0.6107478",
"0.61064625",
"0.6097436",
"0.60961133",
"0.60957754",
"0.60806596",
"0.60732603",
"0.60732603",
"0.60670316",
"0.60509557",
"0.6042283",
"0.6031414",
"0.60309196",
"0.6022984",
"0.60221523",
"0.6004668",
"0.5993227",
"0.59849024",
"0.5967327",
"0.59530485",
"0.593395",
"0.59328693",
"0.59129995",
"0.5900305",
"0.58941805",
"0.58939046",
"0.589227",
"0.586538",
"0.586146",
"0.58598727",
"0.5847444",
"0.5837684",
"0.58363396",
"0.5822651",
"0.5817483",
"0.58090997",
"0.58068633",
"0.58045477",
"0.57959795",
"0.5788707",
"0.5786585",
"0.57824343",
"0.5774425",
"0.5772738",
"0.57720214",
"0.5770597",
"0.57705694",
"0.5765603"
] | 0.0 | -1 |
Construct a packet whit the information that a vpn is ready | private void sendNotificationPacketConnectionComplete(PlatformComponentProfile destinationPlatformComponentProfile, PlatformComponentProfile remotePlatformComponentProfile){
System.out.println(" WsCommunicationVPNServer - sendNotificationPacketConnectionComplete = " + destinationPlatformComponentProfile.getIdentityPublicKey());
/*
* Construct the content of the msj
*/
Gson gson = new Gson();
JsonObject packetContent = new JsonObject();
packetContent.addProperty(JsonAttNamesConstants.JSON_ATT_NAME_REMOTE_PARTICIPANT_VPN, remotePlatformComponentProfile.toJson());
/*
* Get the connection client of the destination
* IMPORTANT: No send by vpn connection, no support this type of packet
*/
WebSocket clientConnectionDestination = wsCommunicationCloudServer.getRegisteredClientConnectionsCache().get(destinationPlatformComponentProfile.getCommunicationCloudClientIdentity());
/*
* Construct a new fermat packet whit the same message and different destination
*/
FermatPacket fermatPacketRespond = FermatPacketCommunicationFactory.constructFermatPacketEncryptedAndSinged(destinationPlatformComponentProfile.getCommunicationCloudClientIdentity(), //Destination
wsCommunicationCloudServer.getServerIdentityByClientCache().get(clientConnectionDestination.hashCode()).getPublicKey(), //Sender
gson.toJson(packetContent), //Message Content
FermatPacketType.COMPLETE_COMPONENT_CONNECTION_REQUEST, //Packet type
wsCommunicationCloudServer.getServerIdentityByClientCache().get(clientConnectionDestination.hashCode()).getPrivateKey()); //Sender private key
/*
* Send the encode packet to the destination
*/
clientConnectionDestination.send(FermatPacketEncoder.encode(fermatPacketRespond));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MAVLinkPacket pack(){\n MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH);\n packet.sysid = 255;\n packet.compid = 190;\n packet.msgid = MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION;\n \n packet.payload.putUnsignedInt(time_boot_ms);\n \n packet.payload.putUnsignedInt(firmware_version);\n \n packet.payload.putFloat(tilt_max);\n \n packet.payload.putFloat(tilt_min);\n \n packet.payload.putFloat(tilt_rate_max);\n \n packet.payload.putFloat(pan_max);\n \n packet.payload.putFloat(pan_min);\n \n packet.payload.putFloat(pan_rate_max);\n \n packet.payload.putUnsignedShort(cap_flags);\n \n \n for (int i = 0; i < vendor_name.length; i++) {\n packet.payload.putUnsignedByte(vendor_name[i]);\n }\n \n \n \n for (int i = 0; i < model_name.length; i++) {\n packet.payload.putUnsignedByte(model_name[i]);\n }\n \n \n return packet;\n }",
"public MAVLinkPacket pack(){\n MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH);\n packet.sysid = 1;\n packet.compid = 1;\n packet.msgid = MAVLINK_MSG_ID_BATTERY_batterySTATUS;\n \n packet.payload.putInt(time_total);\n \n packet.payload.putInt(time_remaining);\n \n packet.payload.putByte(battery_remaining);\n \n packet.payload.putUnsignedByte(charge_state);\n \n return packet;\n }",
"public MAVLinkPacket pack() {\n MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH);\n packet.sysid = 255;\n packet.compid = 190;\n packet.msgid = MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS;\n\n packet.payload.putUnsignedLong(time_usec);\n\n packet.payload.putUnsignedInt(uptime);\n\n packet.payload.putUnsignedInt(ram_usage);\n\n packet.payload.putUnsignedInt(ram_total);\n\n\n for (int i = 0; i < storage_type.length; i++) {\n packet.payload.putUnsignedInt(storage_type[i]);\n }\n\n\n for (int i = 0; i < storage_usage.length; i++) {\n packet.payload.putUnsignedInt(storage_usage[i]);\n }\n\n\n for (int i = 0; i < storage_total.length; i++) {\n packet.payload.putUnsignedInt(storage_total[i]);\n }\n\n\n for (int i = 0; i < link_type.length; i++) {\n packet.payload.putUnsignedInt(link_type[i]);\n }\n\n\n for (int i = 0; i < link_tx_rate.length; i++) {\n packet.payload.putUnsignedInt(link_tx_rate[i]);\n }\n\n\n for (int i = 0; i < link_rx_rate.length; i++) {\n packet.payload.putUnsignedInt(link_rx_rate[i]);\n }\n\n\n for (int i = 0; i < link_tx_max.length; i++) {\n packet.payload.putUnsignedInt(link_tx_max[i]);\n }\n\n\n for (int i = 0; i < link_rx_max.length; i++) {\n packet.payload.putUnsignedInt(link_rx_max[i]);\n }\n\n\n for (int i = 0; i < fan_speed.length; i++) {\n packet.payload.putShort(fan_speed[i]);\n }\n\n\n packet.payload.putUnsignedByte(type);\n\n\n for (int i = 0; i < cpu_cores.length; i++) {\n packet.payload.putUnsignedByte(cpu_cores[i]);\n }\n\n\n for (int i = 0; i < cpu_combined.length; i++) {\n packet.payload.putUnsignedByte(cpu_combined[i]);\n }\n\n\n for (int i = 0; i < gpu_cores.length; i++) {\n packet.payload.putUnsignedByte(gpu_cores[i]);\n }\n\n\n for (int i = 0; i < gpu_combined.length; i++) {\n packet.payload.putUnsignedByte(gpu_combined[i]);\n }\n\n\n packet.payload.putByte(temperature_board);\n\n\n for (int i = 0; i < temperature_core.length; i++) {\n packet.payload.putByte(temperature_core[i]);\n }\n\n\n return packet;\n }",
"RS3PacketBuilder buildPacket(T node);",
"protected abstract void createPacketData();",
"FJPacket( AutoBuffer ab, int ctrl ) { _ab = ab; _ctrl = ctrl; }",
"public String rplysetpkt(byte []p1,byte[] id1,byte[] T1,byte[] ip1,byte[] no1)\r\n\t{\n\t\treturn \"hi\";\r\n\t}",
"@Override\n public ByteBuffer buildRequestPacket() {\n\n ByteBuffer sendData = ByteBuffer.allocate(128);\n sendData.putLong(this.connectionId); // connection_id - can't change (64 bits)\n sendData.putInt(getActionNumber()); // action we want to perform - connecting with the server (32 bits)\n sendData.putInt(getTransactionId()); // transaction_id - random int we make (32 bits)\n\n return sendData;\n }",
"public Packet(int PCKT_RI_, int PCKT_SRC_ID_, int pcktNr_, int sizeInBits_, double tCreation_){\r\n\t\tPCKT_RI=PCKT_RI_;\r\n\t\tPCKT_SRC_ID=PCKT_SRC_ID_;\r\n\t\tpcktNr=pcktNr_;\r\n\t\tsizeInBits=sizeInBits_;\r\n\t\ttCreation=tCreation_;\r\n\t}",
"public static String createAliveMessage(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(\"NOTIFY * HTTP/1.1\").append(\"\\n\");\n\t\tsb.append(\"HOST: 239.255.255.250:1900\").append(\"\\n\");\n\t\tsb.append(\"NT: urn:schemas-upnp-org:service:ContentDirectory:1\").append(\"\\n\");\n\t\tsb.append(\"NTS: ssdp:alive\").append(\"\\n\");\n\t\tsb.append(\"LOCATION: http://142.225.35.55:5001/description/fetch\").append(\"\\n\");\n\t\tsb.append(\"USN: uuid:9dcf6222-fc4b-33eb-bf49-e54643b4f416::urn:schemas-upnp-org:service:ContentDirectory:1\").append(\"\\n\");\n\t\tsb.append(\"CACHE-CONTROL: max-age=1800\").append(\"\\n\");\n\t\tsb.append(\"SERVER: Windows_XP-x86-5.1, UPnP/1.0, PMS/1.11\").append(\"\\n\");\n\t\t\n\t\t\n\t\treturn sb.toString();\n\t}",
"public Packet createPacket() {\n\t\treturn new Packet((ByteBuffer) buffer.flip());\n\t}",
"protected void buildPacket() throws IOException {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\t\n\t\t// write packet\n\t\tbaos.write(SPInstr.USER.getByte()); // username\n\t\tbaos.write(username.getBytes());\n\t\tbaos.write(SPInstr.EOM.getByte());\n\t\tbaos.write(SPInstr.PASS.getByte()); // password\n\t\tbaos.write(password.getBytes());\n\t\tbaos.write(SPInstr.EOM.getByte());\n\t\tbaos.write(SPInstr.EOP.getByte()); // no action required since it is sent from the client\n\t\t\n\t\t// save packet\n\t\tpacket = baos.toByteArray();\n\t}",
"public Packet() {\n\t}",
"public static byte[] stageAPacket(ServerValuesHolder values) {\t\t\n\t\tbyte[] payload = new byte[ServerValuesHolder.HEADER_LENGTH + 4]; \n\t\tSystem.arraycopy(values.getNum_byte(), 0, payload, 0, 4);\n\t\tSystem.arraycopy(values.getLen_byte(), 0, payload, 4, 4);\n\t\tSystem.arraycopy(values.getUdp_port_byte(), 0, payload, 8, 4); // udp_port\n\t\tSystem.arraycopy(values.getSecretA_byte(), 0, payload, 12, 4); // secretA\n\t\t\n\t\treturn createPacket(ServerValuesHolder.secretInit, 2, values.getStudentID(), payload);\n\t}",
"private static void prepareAdvData() {\n ADV_DATA.add(createDateTimePacket());\n ADV_DATA.add(createDeviceIdPacket());\n ADV_DATA.add(createDeviceSettingPacket());\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutTimePacket(i));\n }\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutDatePacket(i));\n }\n }",
"public PingWebSocketFrame(boolean finalFragment, int rsv, ByteBuf binaryData) {\n/* 54 */ super(finalFragment, rsv, binaryData);\n/* */ }",
"public String reqsetpkt(byte []p,byte[] id,byte[] T,byte[] ip,byte[] no)\r\n\t{\n\t\treturn \"hi\";\r\n\t}",
"public MAVLinkPacket pack() {\n\t\tMAVLinkPacket packet = new MAVLinkPacket();\n\t\tpacket.len = MAVLINK_MSG_LENGTH;\n\t\tpacket.sysid = 255;\n\t\tpacket.compid = 190;\n\t\tpacket.msgid = MAVLINK_MSG_ID_PROPELLER;\n\t\tpacket.payload.putFloat(propeller1);\n\t\tpacket.payload.putFloat(propeller2);\n\t\tpacket.payload.putFloat(propeller3);\n\t\tpacket.payload.putFloat(propeller4);\n\n\t\treturn packet;\n\t}",
"private static byte[] createPacket(byte[] data, int destinationPort) {\n\n byte[] send = new byte[28];\n\n send[0] = (byte) ((4 << 4) + 5); // Version 4 and 5 words\n send[1] = 0; // TOS (Don't implement)\n send[2] = 0; // Total length\n send[3] = 22; // Total length\n send[4] = 0; // Identification (Don't implement)\n send[5] = 0; // Identification (Don't implement)\n send[6] = (byte) 0b01000000; // Flags and first part of Fragment offset\n send[7] = (byte) 0b00000000; // Fragment offset\n send[8] = 50; // TTL = 50\n send[9] = 0x11; // Protocol (UDP = 17)\n send[10] = 0; // CHECKSUM\n send[11] = 0; // CHECKSUM\n send[12] = (byte) 127; // 127.0.0.1 (source address)\n send[13] = (byte) 0; // 127.0.0.1 (source address)\n send[14] = (byte) 0; // 127.0.0.1 (source address)\n send[15] = (byte) 1; // 127.0.0.1 (source address)\n send[16] = (byte) 0x2d; // (destination address)\n send[17] = (byte) 0x32; // (destination address)\n send[18] = (byte) 0x5; // (destination address)\n send[19] = (byte) 0xee; // (destination address)\n\n short length = (short) (28 + data.length); // Quackulate the total length\n byte right = (byte) (length & 0xff);\n byte left = (byte) ((length >> 8) & 0xff);\n send[2] = left;\n send[3] = right;\n\n short checksum = calculateChecksum(send); // Quackulate the checksum\n\n byte second = (byte) (checksum & 0xff);\n byte first = (byte) ((checksum >> 8) & 0xff);\n send[10] = first;\n send[11] = second;\n\n /*\n * UDP Header\n * */\n short udpLen = (short) (8 + data.length);\n byte rightLen = (byte) (udpLen & 0xff);\n byte leftLen = (byte) ((udpLen >> 8) & 0xff);\n\n send[20] = (byte) 12; // Source Port\n send[21] = (byte) 34; // Source Port\n send[22] = (byte) ((destinationPort >> 8) & 0xff); // Destination Port\n send[23] = (byte) (destinationPort & 0xff); // Destination Port\n send[24] = leftLen; // Length\n send[25] = rightLen; // Length\n send[26] = 0; // Checksum\n send[27] = 0; // Checksum\n\n /*\n * pseudoheader + actual header + data to calculate checksum\n * */\n byte[] checksumArray = new byte[12 + 8]; // 12 = pseudoheader, 8 = UDP Header\n checksumArray[0] = send[12]; // Source ip address\n checksumArray[1] = send[13]; // Source ip address\n checksumArray[2] = send[14]; // Source ip address\n checksumArray[3] = send[15]; // Source ip address\n checksumArray[4] = send[16]; // Destination ip address\n checksumArray[5] = send[17]; // Destination ip address\n checksumArray[6] = send[18]; // Destination ip address\n checksumArray[7] = send[19]; // Destination ip address\n checksumArray[8] = 0; // Zeros for days\n checksumArray[9] = send[9]; // Protocol\n checksumArray[10] = send[24]; // Udp length\n checksumArray[11] = send[25]; // Udp length\n // end pseudoheader\n checksumArray[12] = send[20]; // Source Port\n checksumArray[13] = send[21]; // Source Port\n checksumArray[14] = send[22]; // Destination Port\n checksumArray[15] = send[23]; // Destination Port\n checksumArray[16] = send[24]; // Length\n checksumArray[17] = send[25]; // Length\n checksumArray[18] = send[26]; // Checksum\n checksumArray[19] = send[27]; // Checksum\n // end actual header\n checksumArray = concatenateByteArrays(checksumArray, data); // Append data\n\n short udpChecksum = calculateChecksum(checksumArray);\n byte rightCheck = (byte) (udpChecksum & 0xff);\n byte leftCheck = (byte) ((udpChecksum >> 8) & 0xff);\n\n send[26] = leftCheck; // Save checksum\n send[27] = rightCheck; // Save checksum\n\n send = concatenateByteArrays(send, data);\n\n return send;\n }",
"public DatagramPacket readyPacket() throws IOException {\n\t\tbyte[] data = new byte[PACKET_SIZE];\n\t\tint bytesRead;\n\t\tboolean ready = false;\n\t\tDatagramPacket dp = null;\n\t\tif (!doneReading && (bytesRead = this.fp.read(data, 2, DATA_BUF)) > 0) {\n\t\t\tdata[0] = (byte) this.packetNumber; // set the packet number\n\t\t\tdata[1] = (byte) bytesRead; //send number of bytes read\n\t\t\tthis.totalBytesRead += bytesRead; // update for output info\n\t\t\tdp = new DatagramPacket(data, data.length, this.ia, receiverPort);\n\t\t\tready = true;\n\t\t} else {\n\t\t\tthis.doneReading = true;\n\t\t}\n\t\treturn dp;\n\t}",
"private FullExtTcpPacket createPacket(\n long dataSizeByte,\n long sequenceNumber,\n long ackNumber,\n boolean ACK,\n boolean SYN,\n boolean ECE\n ) {\n return new FullExtTcpPacket(\n flowId, dataSizeByte, sourceId, destinationId,\n 100, 80, 80, // TTL, source port, destination port\n sequenceNumber, ackNumber, // Seq number, Ack number\n false, false, ECE, // NS, CWR, ECE\n false, ACK, false, // URG, ACK, PSH\n false, SYN, false, // RST, SYN, FIN\n congestionWindow, 0 // Window size, Priority\n );\n }",
"public PacketBuilder() {\n\t\tthis(1024);\n\t}",
"public static byte[] createPacket(byte[] data) {\r\n byte[] header = createHeader(seqNo);\r\n byte[] packet = new byte[data.length + header.length]; // data + header\r\n System.arraycopy(header, 0, packet, 0, header.length);\r\n System.arraycopy(data, 0, packet, header.length, data.length);\r\n seqNo = seqNo + 1;\r\n return packet;\r\n }",
"abstract void GetInfoPacket() ;",
"public ResponsePacket() {\n MacAddr = new ArrayList<String>();\n content = new ArrayList<String>();\n }",
"private void sendACKPacket()\n{\n \n //the values are unpacked into bytes and stored in outBufScratch\n //outBufScrIndex is used to load the array, start at position 0\n \n outBufScrIndex = 0;\n \n outBufScratch[outBufScrIndex++] = Notcher.ACK_CMD;\n \n //the byte is placed right here in this method\n outBufScratch[outBufScrIndex++] = lastPacketTypeHandled;\n \n //send header, the data, and checksum\n sendByteArray(outBufScrIndex, outBufScratch);\n \n}",
"void finishPacket(ByteBuffer buffer) {\n addTlv(buffer, DHCP_MESSAGE_TYPE, DHCP_MESSAGE_TYPE_DISCOVER);\n addTlv(buffer, DHCP_CLIENT_IDENTIFIER, getClientId());\n addCommonClientTlvs(buffer);\n addTlv(buffer, DHCP_PARAMETER_LIST, mRequestedParams);\n addTlvEnd(buffer);\n }",
"public LSRPacket() {\n linkID = \"\";\n adv_router = \"\";\n }",
"public PBFTPrepare createPrepareMessage(PBFTPrePrepare pp){\n PBFTPrepare p = new PBFTPrepare(pp, getLocalServerID());\n return p;\n }",
"public void sendBindResponse(Pdu packet);",
"public static void constructStartupMessage(final ByteBuf buffer) {\n /*\n * Requests headers - according to https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec\n * section #1\n *\n * 0 8 16 24 32 40\n * +---------+---------+---------+---------+---------+\n * | version | flags | stream | opcode |\n * +---------+---------+---------+---------+---------+\n */\n\n buffer.writeByte(0x04); //request\n buffer.writeBytes(new byte[]{0x00}); // flag\n buffer.writeShort(incrementAndGet()); //stream id\n buffer.writeBytes(new byte[]{0x01}); // startup\n\n /*\n * Body size - int - 4bytes.\n * Body of STARTUP message contains MAP of 1 entry, where key and value is [string]\n *\n * Size = (map size) + (key size) + (key string length) + (value size) + (value string length)\n */\n short size = (short) (2 + 2 + CQL_VERSION_KEY.length() + 2 + CQL_VERSION_VALUE.length());\n\n buffer.writeInt(size);\n\n /*\n * Write body itself, lets say that is it Map.of(\"CQL_VERSION\",\"3.0.0\") in CQL version.\n */\n\n //map sie\n buffer.writeShort(1);\n\n //key\n buffer.writeShort(CQL_VERSION_KEY.length());\n buffer.writeBytes(CQL_VERSION_KEY.getBytes());\n\n //value\n buffer.writeShort(CQL_VERSION_VALUE.length());\n buffer.writeBytes(CQL_VERSION_VALUE.getBytes());\n }",
"@Override\r\n\t\t\tpublic Object construct() {\n\t\t\t\ttextArea_1.setText(\"\\n Now Capturing on Interface \"+index+ \".... \"+\"\\n --------------------------------------------\"+\r\n\t\t\t\t\t\t\"---------------------------------------------\\n\\n \");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tCAP=JpcapCaptor.openDevice(NETWORK_INTERFACES[index], 65535, true, 20);\r\n\t\t\t\t\twhile(captureState)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tCAP.processPacket(1, new PkPirate_packetContents());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCAP.close();\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\tSystem.out.println(e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\treturn 0;\r\n\t\t\t}",
"public MAVLinkPacket pack() {\n MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH);\n packet.sysid = 255;\n packet.compid = 190;\n packet.msgid = MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA;\n\n packet.payload.putFloat(p1x);\n\n packet.payload.putFloat(p1y);\n\n packet.payload.putFloat(p1z);\n\n packet.payload.putFloat(p2x);\n\n packet.payload.putFloat(p2y);\n\n packet.payload.putFloat(p2z);\n\n packet.payload.putUnsignedByte(frame);\n\n return packet;\n }",
"private static DatagramPacket createPacket(byte[] data, SocketAddress remote) {\r\n\t\tDatagramPacket packet = new DatagramPacket(data, data.length, remote);\r\n\t\treturn packet;\r\n\t}",
"public PcapPktHdr() {\n\t\tthis.seconds = System.currentTimeMillis() / 1000; // In seconds\n\t\tthis.useconds = (int) (System.nanoTime() / 1000); // Microseconds\n\n\t\tthis.caplen = 0;\n\t\tthis.len = 0;\n\t}",
"public NbMessage(short[] packet) {\n /**\n * Parse using shorts\n */\n this.packet = packet;\n byte header = (byte) ((packet[0] & 0b1111000000000000) >> 12);\n this.isValid = (header == DATA_HEADER);\n this.subheader = (packet[0] & 0b0000111000000000) >> 9;\n this.channel = (packet[0] & 0b0000000111000000) >> 6;\n this.header = (packet[0] & 0b1111000000000000) >> 12;\n this.data = packet[1];\n }",
"private void makePacket() throws PacketMappingNotFoundException {\r\n\t\tfinal PacketIdMapping mapping = mapCon.getMappingFor(packetId); //Mapping for id\r\n\t\tif(mapping == null)\r\n\t\t\tthrow new PacketMappingNotFoundException(\"mapping not found for id while constructing packet\", packetId);\r\n\t\tfinal Packet newPacket = mapping.getNewInstance(); //make a packet\r\n\t\tfinal ReadableArrayData packetData = new ReadableArrayData(tempData, false);\r\n\t\tnewPacket.readData(packetData); //read the packet data\r\n\t\tfinishedPacketReceiver.accept(newPacket); //send the packet to the connection\r\n\t}",
"public static byte[] stageCPacket(ServerValuesHolder values) {\n\t\tbyte[] payload = new byte[13];\n\t\tSystem.arraycopy(values.getNum2_byte(), 0, payload, 0, 4);\n\t\tSystem.arraycopy(values.getLen2_byte(), 0, payload, 4, 4);\n\t\tSystem.arraycopy(values.getSecretC_byte(), 0, payload, 8, 4);\n\t\tpayload[12] = (byte) values.getC();\n\t\t\n\t\treturn createPacket(values.getSecretB(), 2, values.getStudentID(), payload);\n\t}",
"public RtpPacketTest() {\n\n\t}",
"private SourceRconPacketFactory() {\n }",
"void generateALIVE(UDPAddress sender, int aliveNum) {\n // PRAGMA [DEBUG] Debug.out.println(\"Sending ALIVE message to \" + sender + \" with val \" + aliveNum);\n generateControlMessage(sender, aliveNum, UDPTransportLayer.MESSAGE_TYPE_ALIVE);\n }",
"private synchronized void create_head(){\n\t\t// Take current time\n\t\thead_time = System.currentTimeMillis();\n\t\tdouble lcl_head_time = head_time/1000.0;\n\t\tString time = Double.toString(lcl_head_time);\n\t\t \n\t\theader.append(\"protocol: 1\\n\");\n\t\theader.append(\"experiment-id: \" + oml_exp_id + \"\\n\");\n\t\theader.append(\"start_time: \" + time + \"\\n\");\n\t\theader.append(\"sender-id: \" + oml_name + \"-sender\\n\");\n\t\theader.append(\"app-name: \" + oml_app_name + \"\\n\");\n\t}",
"public PValuePacket(PValuePacket pvalue) {\n\t\tsuper(pvalue);\n\t\tthis.ballot = pvalue.ballot;\n\t\tthis.medianCheckpointedSlot = pvalue.medianCheckpointedSlot;\n\t\tthis.packetType = pvalue.getType();\n\t\tthis.recovery = false; // true only when created from json\n\t}",
"ComplicationOverlayWireFormat() {}",
"void generateControlMessage(UDPAddress sender, int missingNum, int type) {\n DatagramPacket outPacket = null;\n byte[] outData = new byte[UDPTransportLayer.PACKET_SIZE];\n\n // Write out message header\n writeByte(outData, 0, type);\n writeInt (outData, 1, missingNum);\n\n // Create new packet\n outPacket = new DatagramPacket(outData, UDPTransportLayer.PACKET_SIZE, sender.hostAddr, sender.hostPort);\n try {\n socket.send(outPacket);\n } catch (IOException e) {\n Debug.exit(e.toString());\n }\n// toResend.enqueue(outPacket);\n\n // Now wake up the sending thread if it isn't already\n// synchronized (msgsToSend) {\n// msgsToSend.notifyAll();\n// }\n }",
"protected void bInit()\r\n {\r\n \tSystem.out.println(\"|bInit| : expected_seq_num is: \"+expected_seq_num+\".\"); \r\n \tfor(int i=0;i<5;i++)\r\n \t\t{\r\n \t\t\tisAckedWindow[i] =ACK_NAKed;\r\n \t\t}\r\n \texpected_seq_num = FirstSeqNo;\r\n \tint check = makeCheckSum(FirstSeqNo,ACK_ACKed,DATA_EMPTY);\r\n \tpacketBuffer = new Packet (-1,ACK_ACKed,check,DATA_EMPTY);\r\n \tSystem.out.println(\"|bInit| : packet with seq number:\"+Integer.toString(packetBuffer.getSeqnum())+\" is stored in Buffer\"); \r\n \t//\tstate_receiver = STATE_WAIT_FOR_0_FROM_BELOW;\r\n }",
"public static byte[] createPacket(int psecret, int step, int studentID, byte[] payload) {\n\t\tbyte[] data = new byte[(int) (4*(Math.ceil((ServerValuesHolder.HEADER_LENGTH + payload.length)/4.0)))];\n\t\tbyte[] header = createHeader(payload.length, psecret, step, studentID);\n\t\t\n\t\tSystem.arraycopy(header, 0, data, 0, header.length);\n\t\tSystem.arraycopy(payload, 0, data, header.length, payload.length);\n\t\t\n\t\treturn data;\n\t}",
"public static String createDiscoverResponseMessage(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(\"HTTP/1.1 200 OK\").append(\"\\n\");\n\t\tsb.append(\"CACHE-CONTROL: max-age=1200\").append(\"\\n\");\n\t\tsb.append(\"DATE: Tue, 05 May 2009 13:31:51 GMT\").append(\"\\n\");\n\t\tsb.append(\"LOCATION: http://142.225.35.55:5001/description/fetch\").append(\"\\n\");\n\t\tsb.append(\"SERVER: Windows_XP-x86-5.1, UPnP/1.0, PMS/1.11\").append(\"\\n\");\n\t\tsb.append(\"ST: upnp:rootdevice\").append(\"\\n\");\n\t\tsb.append(\"EXT: \").append(\"\\n\");\n\t\tsb.append(\"USN: uuid:9dcf6222-fc4b-33eb-bf49-e54643b4f416::upnp:rootdevice\").append(\"\\n\");\n\t\tsb.append(\"Content-Length: 0\").append(\"\\n\");\n\t\t\n\t\treturn sb.toString();\n\t}",
"private void init() {\n\t\tsendPacket(new Packet01Login(\"[you have connected to \"+UPnPGateway.getMappedAddress()+\"]\", null));\n\t}",
"@Test\n public void httpGetPacket() throws Exception {\n int[] receivedData = Utils.stringToHexArr(\"600000000018fd3e2001067c2564a170\"\n + \"020423fffede4b2c2001067c2564a125a190bba8525caa5f\"\n + \"1e1e244cf8b92650000000026012384059210000020405a0\");\n Packet receivedPacket = new Packet(receivedData);\n\n packet.setSeqNumber(receivedPacket.getAckNumber());\n packet.setAckNumber(receivedPacket.getSeqNumber());\n packet.setFlag(Flag.ACK);\n String requestURI = String.format(\"http://[%s]:%d/%s\", DEST_ADDR, DEST_PORT, STUDENT_NUMBER);\n int [] getRequestData = createGETrequest(requestURI);\n packet.setData(getRequestData);\n\n assertEquals(Utils.arrayToString(getRequestData),packet.getData());\n assertEquals(60 + getRequestData.length, packet.getSize());\n assertEquals(Flag.ACK.value, packet.getFlags());\n assertEquals(2,packet.getSeqNumber());\n assertEquals(3,packet.getNextSeqNumber());\n assertEquals(4172883536L + 1, packet.getNextAckNumber());\n\n //Build expected packet\n String ipv6Header = \"6\" +\"00\" + Utils.HexToString(0,20/4)\n + Utils.HexToString(20 + getRequestData.length,16/4) + \"fd\" + \"ff\"\n + Utils.parseAddress(SOURCE_ADDR) + Utils.parseAddress(DEST_ADDR);\n String tcpHeader = \"244c\" + \"1e1e\" + Utils.HexToString(2,8) + Utils.HexToString(4172883536L,8) + \"50\"\n + Utils.HexToString(Flag.ACK.value,2) + \"1000\" + \"0000\" + \"0000\";\n String dataAsString = Utils.arrayToString(getRequestData);\n //Same ipv6Header\n assertEquals(ipv6Header , Utils.arrayToString(packet.getPkt()).substring(0,ipv6Header.length()));\n //Same tcp header\n assertEquals(tcpHeader , Utils.arrayToString(packet.getPkt()).substring(ipv6Header.length(),ipv6Header.length() + tcpHeader.length()));\n //Same data\n assertEquals(dataAsString , Utils.arrayToString(packet.getPkt()).substring(ipv6Header.length() + tcpHeader.length(),\n ipv6Header.length() + tcpHeader.length() + dataAsString.length()));\n\n\n }",
"@Test\n public void firstPacket() throws Exception {\n int[] data = Utils.textToHexArr(\"Test\");\n packet.setFlag(Flag.SYN);\n packet.setData(data);\n\n assertEquals(Flag.SYN.value,packet.getFlags());\n assertEquals(0,packet.getSeqNumber());\n assertEquals(1,packet.getNextSeqNumber());\n assertEquals(0,packet.getAckNumber());\n assertEquals(Utils.arrayToString(data),packet.getData());\n assertEquals(60 + data.length, packet.getSize());\n\n //Build expected packet\n String ipv6Header = \"6\" +\"00\" + Utils.HexToString(0,20/4)\n + Utils.HexToString(24,16/4) + \"fd\" + \"ff\"\n + Utils.parseAddress(SOURCE_ADDR) + Utils.parseAddress(DEST_ADDR);\n String tcpHeader = \"244c\" + \"1e1e\" + \"00000000\" + \"00000000\" + \"50\"\n + Utils.HexToString(Flag.SYN.value,2) + \"1000\" + \"0000\" + \"0000\";\n String dataAsString = Utils.arrayToString(data);\n assertEquals(ipv6Header + tcpHeader + dataAsString, Utils.arrayToString(packet.getPkt()));\n\n int pkt[] = Utils.stringToHexArr(ipv6Header + tcpHeader + dataAsString);\n assertArrayEquals(pkt,packet.getPkt());\n }",
"public interface Packet {\n /**\n * Read body from byte buffer\n * @param bb \n * @throws java.lang.Exception \n */\n void readBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Write body to byte buffer\n * @param bb \n * @param context \n * @throws java.lang.Exception \n */\n void writeBody(ByteBuf bb, TranscoderContext context) throws Exception;\n \n /**\n * Calculate and return body size in bytes\n * @param context\n * @return \n */\n int calculateBodyLength(TranscoderContext context);\n \n /**\n * Calculate and set field with body length\n * @param context\n */\n void calculateAndSetBodyLength(TranscoderContext context);\n \n /**\n * Get body length from field\n * @return \n */\n int getBodyLength();\n\n /**\n * Get sequence number field value\n * @return \n */\n int getSequenceNumber();\n \n /**\n * Set sequence number field value\n * @param sequenceNumber \n */\n void setSequenceNumber(int sequenceNumber); \n}",
"private void formWriteBegin() {\n\t\tsendData = new byte[4];\n\t\tsendData[0] = 0;\n\t\tsendData[1] = 4;\n\t\tsendData[2] = 0;\n\t\tsendData[3] = 0;\n\t\t\n\t\t// Now that the data has been set up, let's form the packet.\n\t\tsendPacket = new DatagramPacket(sendData, 4, receivePacket.getAddress(),\n\t\t\t\treceivePacket.getPort());\t\n\t}",
"public VipInfoPrepaid(int n) {\r\n\t\tvalue = n;\r\n\t\tinitialize();\r\n\t}",
"public PacketHandler() {}",
"public String toString() {\n return \"(PingContent: \" + pingReqUID + \", \" + timeout + \")\";\n }",
"void onCreateNewNetSuccess();",
"public byte[] createRegistrationRequestPacket(RegistrationType regoType){\n byte[] header = createHeader(REGISTRATION_REQUEST);\n byte[] body = new byte[REGISTRATION_REQUEST.getLength()];\n addFieldToByteArray(body, REGISTRATION_REQUEST_TYPE, regoType.value());\n return generatePacket(header, body);\n }",
"public void sendResponse(Pdu packet);",
"public Packet(int packetNumber) {\n\t\tthis.packetNumber = packetNumber;\n\t}",
"private static DatagramPacket craftAck(int sequenceNumber) {\n\n HipsterPacket hipster = new HipsterPacket();\n hipster.setPayload(new byte[0]); // Empty payload\n hipster.setDestinationAddress(sourceAddress); // Source address\n hipster.setDestinationPort(hipsterSendPort); // Source port number\n hipster.setCode(HipsterPacket.ACK);\n hipster.setSequenceNumber(sequenceNumber);\n\n return hipster.toDatagram();\n }",
"public abstract void onPingReceived(byte[] data);",
"public ByteBuffer buildPacket(int encap, short destUdp, short srcUdp) {\n ByteBuffer result = ByteBuffer.allocate(MAX_LENGTH);\n fillInPacket(encap, INADDR_BROADCAST, INADDR_ANY, destUdp,\n srcUdp, result, DHCP_BOOTREQUEST, mBroadcast);\n result.flip();\n return result;\n }",
"public DiscoveryPacket(BigInteger networkId) {\n this.networkId = networkId;\n }",
"public void sendRequest(Pdu packet);",
"protected void bInit()\n {\n \tb_expect_seqnum=1;\n //\tMessage m=new Message(String.valueOf(new char[20]));\n //\tb_sndpkt=make_pkt(0,m,0);//make a package\n }",
"public abstract Object getVanillaPacket();",
"public Packet1Login () { \n }",
"public PingWebSocketFrame(ByteBuf binaryData) {\n/* 40 */ super(binaryData);\n/* */ }",
"public PCEPNotification createNotificationMessage(ComputingResponse resp,long timer ){\n\t\tlog.info(\"Timer \"+timer);\n\t\tPCEPNotification notificationMsg = new PCEPNotification();\n\t\tNotify notify=new Notify();\n\t\tNotification notif=new Notification();\n\t\tnotif.setNotificationType(ObjectParameters.PCEP_NOTIFICATION_TYPE_PRERESERVE);\n\t\tLinkedList<Notification> notificationList=new LinkedList<Notification>();\n\t\tPathReservationTLV pathReservationTLV=new PathReservationTLV();\t\t\t\n\t\tpathReservationTLV.setERO(resp.getResponseList().getFirst().getPathList().getFirst().geteRO());\t\t\t\t\t\n\t\tboolean bidirect = resp.getResponseList().getFirst().getRequestParameters().isBidirect();\t\t\n\t\tpathReservationTLV.setTime(timer);\n\t\tpathReservationTLV.setBidirectional(bidirect);\n\t\tnotif.setNotificationTLV(pathReservationTLV);\n\t\tnotificationList.add(notif);\n\t\tnotify.setNotificationList(notificationList);\n\t\tnotificationMsg.addNotify(notify);\n\t\treturn notificationMsg;\t\n\t}",
"private PingMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public void sentInitInfo()\n\t{\n\t\ttry\n\t\t{\n\t\t\tJSONObject initInfo = new JSONObject();\n\t\t\tinitInfo.put(\"type\", \"init\");\n\t\t\tinitInfo.put(\"name\", name);\n\t\t\t\n\t\t\tos.println(initInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tString rcvStr = is.readLine();\n\t\t\tJSONObject response = new JSONObject(rcvStr);\n\t\t\tint dataPort = response.getInt(\"port\");\n\t\t\tmyController.setDataPort(dataPort);\n\t\t\t\n\t\t\tSystem.out.println(\"send init info : \" + initInfo.toString());\n\t\t}\n\t\tcatch (JSONException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void sendArpResponse(Packet packet) {\n Packet p = new Packet();\n Ethernet e = Ethernet.makeArpEthernet();\n e.setSrcMac(this.getMacAddress());\n e.setDestMac(packet.getSrcMac());\n p.setL2(e);\n\n Arp arp = Arp.makeArpResponse();\n arp.setSendIp(((Arp) packet.getL3()).getRecvIp());\n arp.setRecvIp(((Arp) packet.getL3()).getSendIp());\n arp.setSendMac(this.getMacAddress());\n arp.setRecvMac(packet.getSrcMac());\n p.setL3(arp);\n this.handleOut(packet);\n }",
"public NPCI(Address source) {\n version = 1;\n control = BigInteger.valueOf(0);\n\n control = control.setBit(5);\n destinationNetwork = 0xFFFF;\n hopCount = 0xFF;\n\n setSourceAddress(source);\n }",
"public byte[] createPacket(short packetid, byte[] packetdata){\r\n\t\tshort s = 0;\r\n\t\tbyte[] packet;\r\n\t\tint size = packetdata.length;\r\n\t\t\r\n\t\tif (size < 1){\r\n\t\t\tpacket = new byte[12];\r\n\t\t}else{\r\n\t\t\tpacket = new byte[12+size];\r\n\t\t}\r\n\t\tif (packetid == 2 || packetid == 5 || packetid == 6){\r\n\t\t\tpacket[0] = (byte) 0x00;\r\n\t\t} else packet[0] = (byte) 0x14;\r\n\t\t//Reserved\r\n\t\tpacket[1] = (byte) 0x00;\r\n\t\tpacket[2] = (byte) 0x00;\r\n\t packet[3] = (byte) 0x00;\r\n\t //PacketId\r\n\t s = (byte) packetid;\r\n\t byte[] packet_2 = Util.shortTobyte(s);\r\n\t packet[4] = packet_2[0];\r\n\t packet[5] = packet_2[1];\r\n\t\t//Reserved2\r\n\t\tpacket[6] = (byte) 0x00;\r\n\t packet[7] = (byte) 0x00;\r\n\t //DataSize\r\n\t byte[] packet2 = Util.intTobyte(size);\r\n\t packet[8] = packet2[0];\r\n\t packet[9] = packet2[1];\r\n\t packet[10] = packet2[2];\r\n\t packet[11] = packet2[3];\r\n\t for (int x = 0; x < size; x++){\r\n\t \tpacket[12+x] = packetdata[x];\r\n\t }\r\n\t \r\n\t return packet;\r\n\t}",
"public CapsPacketExtension()\n {\n }",
"private void serializeHeader(ByteBuffer buffer){\n buffer.putShort(msgType); //2B\n if(srcIP==null) srcIP=\"\";\n String srcIP_temp = srcIP;\n for(int i=0; i<15-srcIP.length(); i++) {\n srcIP_temp = srcIP_temp + \" \";\n }\n buffer.put(srcIP_temp.getBytes()); //15B\n buffer.putInt(srcPort); //4B\n buffer.putFloat(desCost); //4B\n\n String desIP_temp = desIP;\n for(int i=0; i<15-desIP.length(); i++) {\n desIP_temp = desIP_temp + \" \";\n }\n buffer.put(desIP_temp.getBytes()); //15B\n buffer.putInt(desPort);\n }",
"public PingResponseCommand(long startTime, long oneWayTime) {\n super();\n this.startTime = startTime;\n this.oneWayTime = oneWayTime;\n }",
"private PushParkingResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private byte[][] buildDataPackets(int nextSeqNum, byte[] rawData) {\n int curSeqNum = nextSeqNum;\n int currentDataLoc = 0;\n byte[][] returnArray;\n int numRawPackets;\n int toCopy;\n\n // Figure out how many packets we'll need total\n numRawPackets = rawData.length / UDPTransportLayer.RAW_DATA_SIZE;\n if ((rawData.length % UDPTransportLayer.RAW_DATA_SIZE) > 0) \n numRawPackets++;\n\n // Build the return array\n returnArray = new byte[numRawPackets][UDPTransportLayer.PACKET_SIZE];\n\n // Now start building packets\n for(int i=0; i<numRawPackets; i++, currentDataLoc += UDPTransportLayer.RAW_DATA_SIZE) {\n\n // Write out message header\n writeByte (returnArray[i], 0, UDPTransportLayer.MESSAGE_TYPE_DATA);\n writeInt (returnArray[i], 1, curSeqNum);\n writeShort(returnArray[i], 5, i);\n writeShort(returnArray[i], 7, numRawPackets);\n writeShort(returnArray[i], 9, rawData.length);\n curSeqNum++;\n\n // Fill the rest of this packet with data\n toCopy = UDPTransportLayer.PACKET_SIZE - 11;\n if (toCopy > (rawData.length - currentDataLoc))\n\ttoCopy = rawData.length - currentDataLoc;\n System.arraycopy(rawData, currentDataLoc, returnArray[i], 11, toCopy);\n }\n\n // Finally, return the array of packets to the caller\n return returnArray;\n }",
"public RSVP(Connection connection, Header type, String keySource, String keyTarget) {\r\n\t\tsuper(type,keySource,keyTarget,Packet.Priority.HIGH,0,(connection.size() + 1));\r\n\t\tthis.setFlowLabel(connection.getID());\r\n\t\tobject = connection;\t\t\r\n\t}",
"public ArtPollPacket() {\n this((byte) 0b00000110, ArtNetPriorityCodes.DP_CRITICAL);\n }",
"public packetizer(int id){\n packet_num_sent = 0;\n last_packet_received = 0;\n packets_lost = 0;\n this.id = id;\n journey_time =0;\n packet_ack = 0;\n our_packs_lost = 0;\n }",
"public PacketAssembler()\n {\n \tthis.theTreeMaps = new TreeMap<Integer, TreeMap<Integer,String>>();\n \tthis.countPerMessage = new TreeMap<Integer,Integer>();\n }",
"public Packet(final long unique) {\r\n\t\ttype = EvidenceType.NONE;\r\n\t\tcommand = EvidenceBuilder.LOG_CREATE;\r\n\t\tid = unique;\r\n\t\tdata = null;\r\n\t}",
"public void getPackByte(DataPacket packet) {\n\t\t\tint limit = 10;\r\n\t\t\tint newFrameSep = 0x3c;\r\n\t\t\t// bytes avail = packet.getDataSize() - limit;\r\n\t\t\t// write(lbuf, limit, 32)\r\n\t\t\t// write(newFrame)\r\n\t\t\t// limit += 32;\r\n\t\t\t// check packet.getDataSize() - limit > 31\r\n\t\t\tbyte[] lbuf = new byte[packet.getDataSize()];\r\n\t\t\ttry {\r\n\t\t\tif ( packet.getDataSize() > 0)\r\n\r\n\t\t\t\tlbuf = packet.getDataAsArray();\r\n\t\t\t//first frame includes the 1 byte frame header whose value should be used \r\n\t\t\t// to write subsequent frame separators \r\n\r\n\r\n\t\t\t\t\tobuff.write(lbuf, limit, 32);\r\n\r\n\t\t\t\tlimit += 32;\r\n\t\t\t\r\n\t\t do {\r\n\r\n\t\t \t\t obuff.write(newFrameSep); \r\n\t\t\t\t\tobuff.write(lbuf, limit, 31);\r\n\t\t\t\t\tlimit += 31;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t \t \r\n\t\t } while (packet.getDataSize() - limit > 31);\t\t\t\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"@Override\n public void messageArrived(String topic, MqttMessage msg) throws Exception {\n System.out.println(\"-------------------------------------------------\");\n System.out.println(\"| Topic:\" + topic);\n System.out.println(\"| Message: \" + new String(msg.getPayload()));\n System.out.println(\"-------------------------------------------------\");\n\n Integer status = Integer.valueOf(msg.toString());\n\n if(topic.equals(poolController.STATUS_TOPIC))\n {\n /*\n ** Status bits for remote device\n ** Bit Pos.| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |\n ** Device. |Filter|Cleaner|Solar|Spare|Spare|Spare|Spare|Auto/Man|Zone1|Zone2|Zone3|Spare|Spare|Spare|Spare|Auto/Man|\n ** Group. |<====================== Pool =======================>|<================== Irrigation ==================>|\n */\n for(int i=0;i<16;i++)\n {\n switch(i)\n {\n case 7:\n poolCtrl.nAutoMode = getBit(status, i);\n break;\n case 1:\n poolCtrl.nCleaning = getBit(status, i);\n break;\n case 2:\n poolCtrl.nSolar = getBit(status, i);\n break;\n case 0:\n poolCtrl.nFilter = getBit(status, i);\n break;\n case 8:\n poolCtrl.nIrrZone_1 = getBit(status, i);\n break;\n case 9:\n poolCtrl.nIrrZone_2 = getBit(status, i);\n break;\n case 10:\n poolCtrl.nIrrZone_3 = getBit(status, i);\n break;\n case 15:\n poolCtrl.nIrrAutoMode = getBit(status, i);\n break;\n default:\n break; \n }\n }\n }\n\n }",
"public byte[] getNetworkPacket() {\n /*\n The packet layout will be:\n byte(datatype)|int(length of name)|byte[](name)|int(length of value)|byte[](value)|...\n */\n byte[] data = new byte[2];\n int currentPosition = 0;\n \n if(STRINGS.size() > 0) {\n Enumeration enumer = STRINGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x73;\n currentPosition++;\n\n SimpleMessageObjectStringItem item = (SimpleMessageObjectStringItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue().getBytes();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(INTS.size() > 0) {\n Enumeration enumer = INTS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x69;\n currentPosition++;\n\n SimpleMessageObjectIntItem item = (SimpleMessageObjectIntItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(LONGS.size() > 0) {\n Enumeration enumer = LONGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x6C;\n currentPosition++;\n\n SimpleMessageObjectLongItem item = (SimpleMessageObjectLongItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(DOUBLES.size() > 0) {\n Enumeration enumer = DOUBLES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x64;\n currentPosition++;\n\n SimpleMessageObjectDoubleItem item = (SimpleMessageObjectDoubleItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(FLOATS.size() > 0) {\n Enumeration enumer = FLOATS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x66;\n currentPosition++;\n\n SimpleMessageObjectFloatItem item = (SimpleMessageObjectFloatItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(CHARS.size() > 0) {\n Enumeration enumer = CHARS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x63;\n currentPosition++;\n\n SimpleMessageObjectCharItem item = (SimpleMessageObjectCharItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(BYTES.size() > 0) {\n Enumeration enumer = BYTES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x62;\n currentPosition++;\n\n SimpleMessageObjectByteArrayItem item = (SimpleMessageObjectByteArrayItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n\n return data;\n }",
"public static void sendTerminationPacket(){\r\n ProfilingPacketType packet = new ProfilingPacketType();\r\n //sendSpecialPacket(packet);\r\n }",
"public byte[] buildPacket() throws BeCommunicationEncodeException {\r\n\t\tif (apMac == null) {\r\n\t\t\tthrow new BeCommunicationEncodeException(\"ApMac is a necessary field!\");\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tbyte[] requestData = prepareRequestData();\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * AP identifier 's length = 6 + 1 + apSerialNum.length()<br>\r\n\t\t\t * query's length = 6 + 12\r\n\t\t\t */\r\n\t\t\tint apIdentifierLen = 7 + apMac.length();\r\n\t\t\tint queryLen = 12 + requestData.length;\r\n\t\t\tint bufLength = apIdentifierLen + queryLen;\r\n\t\t\tByteBuffer buf = ByteBuffer.allocate(bufLength);\r\n\t\t\t// set value\r\n\t\t\tbuf.putShort(BeCommunicationConstant.MESSAGEELEMENTTYPE_APIDENTIFIER);\r\n\t\t\tbuf.putInt(apIdentifierLen - 6);\r\n\t\t\tbuf.put((byte) apMac.length());\r\n\t\t\tbuf.put(apMac.getBytes());\r\n\t\t\tbuf.putShort(BeCommunicationConstant.MESSAGEELEMENTTYPE_INFORMATIONQUERY);\r\n\t\t\tbuf.putInt(6 + requestData.length);\r\n\t\t\tbuf.putShort(queryType);\r\n\t\t\tbuf.putInt(requestData.length); // data length\r\n\t\t\tbuf.put(requestData);\r\n\t\t\tsetPacket(buf.array());\r\n\t\t\treturn buf.array();\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new BeCommunicationEncodeException(\r\n\t\t\t\t\t\"BeTeacherViewStudentInfoEvent.buildPacket() catch exception\", e);\r\n\t\t}\r\n\t}",
"public void ping() {\n\t\tHeader.Builder hb = Header.newBuilder();\n\t\thb.setNodeId(999);\n\t\thb.setTime(System.currentTimeMillis());\n\t\thb.setDestination(-1);\n\n\t\tCommandMessage.Builder rb = CommandMessage.newBuilder();\n\t\trb.setHeader(hb);\n\t\trb.setPing(true);\n\n\t\ttry {\n\t\t\t// direct no queue\n\t\t\t// CommConnection.getInstance().write(rb.build());\n\n\t\t\t// using queue\n\t\t\tCommConnection.getInstance().enqueue(rb.build());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[13];\n }\n this._sendData[0] = 0;\n if (this.isMenu) {\n byte[] bArr = this._sendData;\n bArr[0] = (byte) (bArr[0] | 1);\n }\n if (this.isPlayback) {\n byte[] bArr2 = this._sendData;\n bArr2[0] = (byte) (bArr2[0] | 2);\n }\n if (this.isRecord) {\n byte[] bArr3 = this._sendData;\n bArr3[0] = (byte) (bArr3[0] | 4);\n }\n BytesUtil.arraycopy(generateChannelByte(), this._sendData, 1);\n this._sendData[11] = 0;\n if (this.isButton) {\n byte[] bArr4 = this._sendData;\n bArr4[11] = (byte) (bArr4[11] | 1);\n }\n byte[] bArr5 = this._sendData;\n bArr5[11] = (byte) (bArr5[11] | (this.buttonData << 1));\n byte[] bArr6 = this._sendData;\n bArr6[11] = (byte) (bArr6[11] | (this.symbol << 6));\n byte[] bArr7 = this._sendData;\n bArr7[11] = (byte) (bArr7[11] | (this.change << 7));\n byte[] bArr8 = this._sendData;\n bArr8[12] = (byte) (bArr8[12] | this.shutter);\n byte[] bArr9 = this._sendData;\n bArr9[12] = (byte) (bArr9[12] | (this.focus << 1));\n byte[] bArr10 = this._sendData;\n bArr10[12] = (byte) (bArr10[12] | (this.mode_sw << 2));\n byte[] bArr11 = this._sendData;\n bArr11[12] = (byte) (bArr11[12] | (this.transform_sw << 4));\n byte[] bArr12 = this._sendData;\n bArr12[12] = (byte) (bArr12[12] | (this.gohome << 6));\n }",
"public void prepareSender(View view) {\n if (ready) {\n bleHandler.writePrepareSenderCharacteristic(ConfigSetter.config);\n writeGPSDataToDB(locationHandler.getLatitude(), locationHandler.getLongitude(), locationHandler.getAltitude());\n Toast.makeText(this, \"senders GPS data logged\", Toast.LENGTH_SHORT).show();\n isPrepared = true;\n\n prepareSenderButton.setVisibility(View.GONE);\n findViewById(R.id.cancel_prep_button).setVisibility(View.VISIBLE);\n ConfigSetter.enableSpinners(false);\n } else {\n Toast.makeText(this, \"devices not ready\", Toast.LENGTH_SHORT).show();\n }\n }",
"public static KarelPacket createPacket(ConnectionId id,\n SequenceNumber sq,\n AcknowledgeNumber ack,\n FlagNumber flag,\n PacketData data) {\n return new KarelPacket(id, sq, ack, flag, data);\n }",
"private Datagram makeACK(Datagram datagram) {\n Datagram dataToSend = new Datagram();\n dataToSend.setSrcaddr(datagram.getDstaddr());\n dataToSend.setSrcport(datagram.getDstport());\n dataToSend.setDstaddr(datagram.getSrcaddr());\n dataToSend.setDstport(datagram.getSrcport());\n PayLoad data = new PayLoad();\n data.setACK(true);\n dataToSend.setData(data);\n\n // Calculate checksum for the data to send to client.\n short checkSum = CheckSumService.generateCheckSum(dataToSend);\n dataToSend.setChecksum(checkSum);\n\n return dataToSend;\n }",
"public SyncFluidPacket() {\n }",
"public RoutePacket() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }",
"public void processPacket(String packet) {\n try {\n Log.e(\"info\", packet);\n JSONObject obj = new JSONObject(packet);\n JSONObject toSend = new JSONObject();\n String id = obj.getString(\"packet\");\n\n\n\n if (id.equals(\"acknowledge\")) {\n LocalPlayer ply = new LocalPlayer(activity);\n ply.identifier = socket.toString();\n ply.socket = socket;\n activity.playerMap.put(ply.identifier, ply);\n ply.latitude = 0;\n ply.longitude = 0;\n ply.bomb = false;\n ply.name = obj.getString(\"name\");\n ply.update();\n\n JSONObject playerObj = new JSONObject();\n\n playerObj.put(\"identifier\", ply.identifier);\n playerObj.put(\"latitude\", ply.latitude);\n playerObj.put(\"longitude\", ply.longitude);\n playerObj.put(\"name\", ply.name);\n playerObj.put(\"bomb\", ply.bomb);\n toSend.put(\"player\", playerObj);\n\n server.sendPacket(socket, \"initialize\", toSend);\n }\n else if (id.equals(\"bomb\")) {\n for (HashMap.Entry<String, LocalPlayer> entry : activity.playerMap.entrySet()) {\n entry.getValue().bomb = false;\n }\n LocalPlayer ply = activity.playerMap.get(obj.getString(\"identifier\"));\n if (ply.identifier.equals(activity.selfPlayer))\n Toast.makeText(activity, \"You got the bomb\", Toast.LENGTH_LONG).show();\n\n if (ply != null) {\n ply.bomb = true;\n }\n }\n else if (id.equals(\"location\")) {\n LocalPlayer ply = activity.playerMap.get(socket.toString());\n if (ply != null) {\n ply.longitude = obj.getDouble(\"longitude\");\n ply.latitude = obj.getDouble(\"latitude\");\n ply.update();\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Test\n public void firstReceivedPacket() throws Exception {\n int[] receivedPacket = Utils.stringToHexArr(\"600000000018fd3e2001067c2564a170\"\n + \"020423fffede4b2c2001067c2564a125a190bba8525caa5f\"\n + \"1e1e244cf8b92650000000016012384059210000020405a0\");\n packet = new Packet(receivedPacket);\n String expectedData = \"020405a0\";\n long expectedSeqNumber = 4172883536L;\n\n assertEquals(expectedData,packet.getData());\n assertEquals(60 + expectedData.length()/2,packet.getSize());\n assertEquals(Flag.SYN.value + Flag.ACK.value, packet.getFlags());\n assertEquals(expectedSeqNumber,packet.getSeqNumber());\n assertEquals(expectedSeqNumber + 1, packet.getNextSeqNumber());\n assertEquals(1,packet.getAckNumber());\n\n assertArrayEquals(receivedPacket,packet.getPkt());\n }",
"void prepare(ConnectionInfo info,byte[] reqXml) throws TransportException;"
] | [
"0.63744324",
"0.6200962",
"0.5769856",
"0.57669115",
"0.56937945",
"0.5552864",
"0.55173105",
"0.55003744",
"0.5492365",
"0.5474304",
"0.5469371",
"0.5430934",
"0.5405329",
"0.5389872",
"0.5387169",
"0.5347576",
"0.52999675",
"0.52859616",
"0.52735627",
"0.52563787",
"0.52334017",
"0.5217473",
"0.5209905",
"0.5201834",
"0.51737523",
"0.5161186",
"0.51474595",
"0.51062894",
"0.509652",
"0.5089638",
"0.50765604",
"0.5071026",
"0.50698304",
"0.5055448",
"0.50272393",
"0.5014091",
"0.5000226",
"0.49861673",
"0.49792263",
"0.4965756",
"0.4934039",
"0.49231833",
"0.49223897",
"0.49166864",
"0.4908744",
"0.49012798",
"0.48440468",
"0.4842427",
"0.48404142",
"0.4827853",
"0.4819494",
"0.4817516",
"0.4813906",
"0.4810272",
"0.48079625",
"0.48056942",
"0.4798952",
"0.47962794",
"0.47849652",
"0.4782797",
"0.47790655",
"0.4775008",
"0.47735488",
"0.4772313",
"0.47627047",
"0.47616395",
"0.4759522",
"0.47513777",
"0.4751289",
"0.47459048",
"0.47402632",
"0.4722961",
"0.47193334",
"0.47143474",
"0.470837",
"0.4689758",
"0.46885225",
"0.46883684",
"0.4685973",
"0.4684015",
"0.4675339",
"0.4671767",
"0.4658814",
"0.46442434",
"0.4636317",
"0.46341977",
"0.4623421",
"0.46193647",
"0.46107692",
"0.46074948",
"0.4605519",
"0.46050945",
"0.45956326",
"0.45903352",
"0.45896307",
"0.45776632",
"0.45765963",
"0.45748436",
"0.45733082",
"0.45674652"
] | 0.5009177 | 36 |
Indicate is active this vpn | public boolean isActive(){
return (registeredParticipants.size() == connections().size());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isActive() {\n\t\treturn (active_status);\n\t}",
"int isActive();",
"boolean isActive();",
"boolean isActive();",
"boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"public boolean isActive();",
"@Override\n\tpublic Boolean isActve() {\n\t\treturn active;\n\t}",
"public Boolean isActive();",
"public boolean active(){\r\n\t\treturn active;\r\n\t}",
"public boolean isActive(){\r\n\t\treturn active_;\r\n\t}",
"public boolean getVIP();",
"public boolean isActive(){\n\t\treturn active;\n\t}",
"public boolean getActive();",
"public boolean getActive();",
"boolean hasActive();",
"public boolean isActive()\r\n\t{\r\n\t\treturn active;\r\n\t}",
"public boolean isActiv(){\r\n\t\treturn this.activ;\r\n\t}",
"public boolean isActive( ) {\n\t\treturn active;\n\t}",
"public Boolean isActive(){return status;}",
"public boolean isActive()\n {\n return active;\n }",
"public boolean hasActiveInternetConnection()\n {\n Runtime runtime = Runtime.getRuntime();\n try {\n Process ipProcess = runtime.exec(\"/system/bin/ping -c 1 8.8.8.8\");\n int exitValue = ipProcess.waitFor();\n return (exitValue == 0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return false;\n }",
"public boolean isActive(){\n return active;\n }",
"public boolean isActive(){\n return active;\n }",
"public boolean getActive()\n {\n return this.active;\n }",
"public boolean isActive() \n {\n return this.active;\n }",
"public int isActive() {\n return isActive;\n }",
"public boolean getStatus(){\n return activestatus;\n }",
"public static boolean isActive(){\n return active;\n }",
"public boolean isActive() {\r\n return active;\r\n }",
"public boolean isActive() {\r\n return active;\r\n }",
"public boolean isActive() {\r\n return active;\r\n }",
"public boolean isActive() {\n\t\treturn active;\n\t}",
"public boolean isActive() {\r\n\t\treturn active;\r\n\t}",
"public boolean isActive() {\n return active;\n }",
"public boolean isActive() {\n return active;\n }",
"public boolean isActive() {\n return active;\n }",
"public boolean isActive() {\n return active;\n }",
"public boolean isActive() {\n return active;\n }",
"public boolean isActive() {\n return active;\n }",
"public Boolean getActive() {\n return this.active;\n }",
"public Boolean getActive() {\n return this.active;\n }",
"public void setActiveStatus(Boolean active){ this.status = active; }",
"public boolean isConnectionActive(){\n return this.connectionActive;\n }",
"public Boolean isActive() {\n return this.active;\n }",
"public boolean activate(){\n mIsActive = true;\n return mIsActive;\n }",
"public int active() {\n return this.active;\n }",
"public boolean isActive() {\n return this.active;\n }",
"public boolean isInactive();",
"public boolean isActive() { return true; }",
"public boolean isPing()\n {\n return _isPing;\n }",
"public boolean isActive() {\n return this.active;\n }",
"public boolean isActive() {\n return this.active;\n }",
"public boolean isActivated()\n {\n return this.activated;\n }",
"public Boolean getActive() {\n\t\treturn this.Active;\n\t}",
"public boolean isActive() {\n\t\treturn this.state;\n\t}",
"public boolean activate();",
"public boolean checkActive() {\n\t\treturn active;\n\t}",
"public boolean isActive() {\n return (m_state != INACTIVE_STATE);\n }",
"public java.lang.Boolean getActive() {\n return active;\n }",
"public boolean getPingOnIdle()\n {\n return _isPing;\n }",
"public void active(boolean value) {\n\t\tactive = value;\n\t}",
"public boolean hasActive() {\n return active_ != null;\n }",
"public boolean isAlive() {\n\t\treturn aliveStatus;\n\t}",
"public boolean isActive()\r\n {\r\n return isActive;\r\n }",
"public static boolean isActive() {\n\t\treturn activated;\n\t}",
"public boolean isConnectionActive ()\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\treturn _bbCanSend;\r\n\t\t}\r\n\t}",
"public boolean isIsActive() {\r\n return isActive;\r\n }",
"public void setActive(boolean value) {\n this.active = value;\n }",
"public boolean isActiveValue() {\n\n\t\tint tmp = getValue();\n\t\tif (tmp == 25)\n\t\t\tdetectStatus = true;\n\t\telse // Getting 24 here\n\t\t\tdetectStatus = false;\n\n\t\treturn detectStatus;\n\t}",
"public boolean isActived() {\r\n\t\treturn isActived;\r\n\t}",
"public Boolean getActiveflag() {\n return activeflag;\n }",
"public Boolean getActive()\r\n/* */ {\r\n/* 200 */ return this.active;\r\n/* */ }",
"public Byte getIsActive() {\n return isActive;\n }",
"public boolean isIsActive() {\n return isActive;\n }",
"public abstract boolean isActive();",
"public boolean isActive() {\n return isActive;\n }",
"public boolean isActive() {\n return isActive;\n }",
"public boolean isActive() {\n return isActive;\n }",
"public boolean isAlive(){\n \treturn alive;\r\n }",
"public boolean isActive() \n {\n return mIsActive;\n }",
"public boolean getIsActive() {\n return isActive_;\n }",
"public boolean estOuvert(){\n\n return netLinkIp.isOpen();\n\n }",
"boolean getAlive();",
"public boolean isActive() {\n/* 165 */ DatagramChannel ch = javaChannel();\n/* 166 */ return (ch.isOpen() && ((((Boolean)this.config\n/* 167 */ .getOption(ChannelOption.DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION)).booleanValue() && isRegistered()) || ch\n/* 168 */ .socket().isBound()));\n/* */ }",
"public boolean isAlive(){\n \t\treturn alive;\n \t}",
"public boolean isThisThingOn(){\r\n return isActive;\r\n }",
"public final boolean isActive() {\n return isActive;\n }"
] | [
"0.65837663",
"0.6546203",
"0.6528115",
"0.6528115",
"0.6528115",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.6519503",
"0.64940405",
"0.64482206",
"0.6425771",
"0.63750196",
"0.6352166",
"0.63328207",
"0.63303614",
"0.63303614",
"0.63263",
"0.6324497",
"0.6272169",
"0.6265291",
"0.6251663",
"0.623662",
"0.62359405",
"0.62352663",
"0.62352663",
"0.6214147",
"0.62033284",
"0.6195168",
"0.61940056",
"0.6187457",
"0.61861795",
"0.61781746",
"0.61781746",
"0.61619985",
"0.6154679",
"0.614319",
"0.614319",
"0.614319",
"0.614319",
"0.614319",
"0.614319",
"0.6122723",
"0.6122723",
"0.6121666",
"0.61207604",
"0.61178213",
"0.6115208",
"0.6111686",
"0.61005616",
"0.60966647",
"0.6095403",
"0.6074124",
"0.6070094",
"0.6070094",
"0.60656905",
"0.60625035",
"0.60606945",
"0.605111",
"0.6046691",
"0.6031921",
"0.60278875",
"0.6023382",
"0.60003215",
"0.59981996",
"0.5996873",
"0.5988001",
"0.597008",
"0.5940085",
"0.59376574",
"0.5937398",
"0.5936109",
"0.59358853",
"0.59260225",
"0.5916",
"0.59053904",
"0.59001046",
"0.58986557",
"0.5895312",
"0.5895312",
"0.5895312",
"0.5885311",
"0.5883736",
"0.5881589",
"0.58807766",
"0.5879935",
"0.5876402",
"0.5873395",
"0.5873093",
"0.5860764"
] | 0.0 | -1 |
/ method paintComponent() called automatically and creates stats for post game pre: class extends JPanel post: draws text | public void paintComponent(Graphics g) {
super.paintComponent(g);
g.setFont(new Font("Times", Font.PLAIN, 30));
//draw the stats
g.drawString(hitPercent+"%", 220, 132);
g.drawString(hits+"/"+clicks, 220, 201);
g.drawString(inner+"/"+hits, 220, 271);
g.drawString(middle+"/"+hits, 220, 341);
g.drawString(outer+"/"+hits, 220, 411);
//displays the achievement
switch(achievement) {
case 1:
g.drawImage(bronze, 410, 160, 100, 100, this);
break;
case 2:
g.drawImage(silver, 395, 160, 120, 100, this);
break;
case 3:
g.drawImage(gold, 410, 160, 100, 100, this);
break;
case 4:
g.drawImage(max, 395, 160, 110, 100, this);
break;
}
//add perfect score medal
if(hitPercent==100) {
g.drawImage(perfect, 360, 270, 200, 180, this);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void draw_text() {\n\t\tcopy_text_into_buffer();\n\t\tVoteVisApp.instance().image(text_buffer_, frame_height_ / 2,\n\t\t\t-text_graphics_.height / 2);\n\t}",
"@Override\n public void paintComponent(Graphics g) {\n loadScore();\n stage = Board.getStage();\n super.paintComponent(g);\n Font font = loadFont();\n ArrayList<Image> tankList = new ArrayList<>(\n Arrays.asList(imageInstance.getTankBasic(),\n imageInstance.getTankFast(),\n imageInstance.getTankPower(),\n imageInstance.getTankArmor()));\n\n // Display High totalScore\n g.setFont(font);\n g.setColor(Color.WHITE);\n g.drawString(\"STAGE \" + String.valueOf(stage), 230 + SHIFT, 200);\n\n g.setColor(Color.RED);\n g.drawString(\"1-PLAYER\", 235 + SHIFT, 240);\n\n g.setColor(Color.orange);\n g.drawString(\"Total points\", 180 + SHIFT, 270);\n\n g.setColor(Color.orange);\n g.drawString(String.valueOf(totalScore), 385 + SHIFT, 272);\n\n for (int i = 0; i < 4; i++) {\n g.drawImage(tankList.get(i), 380 + SHIFT, 290 + (i * 45), this);\n g.drawImage(imageInstance.getArrow(), 350 + SHIFT, 300 + (i * 45),\n this);\n }\n for (int i = 0; i < 4; i++) {\n g.setColor(Color.WHITE);\n g.drawString(String.valueOf(tankScoreList[i]), 185 + SHIFT,\n 312 + (i * 45));\n g.drawString(\"PTS\", 250 + SHIFT, 312 + (i * 45));\n }\n\n for (int i = 0; i < 4; i++) {\n g.setColor(Color.WHITE);\n g.drawString(String.valueOf(tankNumList[i]), 320 + SHIFT,\n 312 + (i * 45));\n }\n\n // total underline\n g.drawLine(270, 480, 500, 480);\n\n g.drawString(\"TOTAL killed\", 200 + SHIFT, 500);\n g.drawString(String.valueOf(totalTankNum), 400 + SHIFT, 500);\n g.setFont(font);\n g.setColor(Color.WHITE);\n }",
"@Override\r\n\tprotected void draw(PGraphics pg) {\r\n\t\tif(font == null) {\r\n\t\t\tfont = rootContainer.getPApplet().createFont(\"Arial\", ((int)this.height * 0.8F));\r\n\t\t}\r\n\t\tpg.stroke(0);\r\n\t\tpg.strokeWeight(3);\r\n\t\tpg.noFill();\r\n\t\tif(activated == false) {\r\n\t\t}else {\r\n\t\t\tpg.line(x, y, x+height, y+height);\r\n\t\t\tpg.line(x+height, y, x, y+height);\r\n\t\t}\r\n\t\tpg.rect(x, y, height, height);\r\n\t\tpg.textAlign(PApplet.LEFT, PApplet.CENTER);\r\n\t\tpg.textFont(font);\r\n\t\tpg.fill(this.textColor.red, textColor.green, textColor.blue, textColor.alpha);\r\n\t\tpg.text(this.text, x+height+(height/2), y-3, width-height, height);\r\n\t}",
"private void draw(){\n\t\t\t Point level = new Point(txtBoard_top_left.x, txtBoard_top_left.y);\n\t\t\t level_info = new TextInfo(g, level, txt_width, size*4, LEVEL, this.level);\n\t\t\t level_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 2nd text info\n\t\t\t Point lines = new Point(level.x, level.y+size*2);\n\t\t\t lines_info = new TextInfo(g, lines, txt_width, size*4, LINES, this.lines);\n\t\t\t lines_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 3rd text info\n\t\t\t Point score = new Point(lines.x, lines.y+size*2);\n\t\t\t score_info = new TextInfo(g, score, txt_width, size*4, SCORE, this.score);\n\t\t\t score_info.drawTextInfo();\t\t\n\t\t}",
"@Override\r\n public void paint (Graphics g)\r\n {\r\n super.repaint();\r\n g.setFont(new java.awt.Font(\"Brush Script MT\", Font.BOLD, 80));\r\n g.drawImage (hauntedHouse.getImage(), 0, 0, 1024, 590, null);\r\n g.setColor(Color.white);\r\n g.drawString(\"EduGames\", 360, 550 - count*2);\r\n g.drawString(\"Created and designed by\", 130, 640 - count*2);\r\n g.drawString(\"Jessica and Hannah\", 220, 730- count*2);\r\n g.drawString(\"Instructions - Hannah\", -1140+count*2, 150);\r\n g.drawString(\"Levels Menu - Jessica\", -1140+count*2, 250);\r\n g.drawString(\"High Scores - Hannah\", -1140+count*2, 350);\r\n g.drawString(\"Goodbye Screen - Hannah\", -1190+count*2, 450);\r\n g.drawString(\"Level 1 - Jessica\", 250, -1980 + count*2);\r\n g.drawString(\"Level 2 - Jessica\", 250, -1890 + count*2);\r\n g.drawString(\"Level 3 - Hannah\", 230, -1800 + count*2);\r\n g.drawString(\"Splashscreen - Jessica\", 3300 - count*2,90 );\r\n g.drawString(\"Character Graphics - Jessica and Hannah\", 3300 - count*2, 190);\r\n g.drawString(\"Background Graphics - Hannah and Jessica\", 3300- count*2, 290 );\r\n g.drawString(\"Introduction Animation - Jessica\", 3300- count *2, 390);\r\n g.drawString(\"Ending Animation - Hannah\", 3300 - count*2, 490);\r\n }",
"public void draw(SpriteBatch batch, String text, float x, float y, GameContainer c, StyledText style);",
"public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }",
"public void paint (Graphics g) {\n text.setText(perfweb.genReport());\n super.paint(g);\n }",
"public void paint (Graphics g) {\n text.setText(perfweb.genReport());\n super.paint(g);\n }",
"public void paintComponent(Graphics page)//MAIN METHOD FOR ADDING ALL GRAPHICS TO THE FRAME\n\t\t{\n\t\tsuper.paintComponent(page);//passing the graphics object to the constructor of super(mother) class\n\t\t\n\t\t\tpage.drawImage(background, 0, 0, WIDTH, HEIGHT, this); //Places the background image on the background\n\t \n\t \n\t page.drawImage(flappy, bird.x, bird.y, bird.width, bird.height, this); //Places the flappy image on the character\n\t \n\t page.drawImage(foreground, 0, HEIGHT-100, WIDTH, 200, this);\n\t \n\t for(Rectangle box : obstacles)\n\t {\n\t \tpaintbox(page, box);\n\t }\n\t \n\t page.setColor(Color.black); //Sets the font to orange\n\t \n\t page.setFont(new Font(\"Monospaced\", 3, 60));\n\t if(!start)\n\t {\n\t \tpage.drawString(\"ENTER SPACE\", 250, HEIGHT/4);\n\t \tpage.drawString(\"OR\", 450, HEIGHT/2-100);\n\t \tpage.drawString(\"Press to Play\", 200, HEIGHT/2 -50);\n\t }\n\t \n\t page.setFont(new Font(\"Helvitica\", 4, 100));\n\t if(gameOver)\n\t {\n\t \tpage.drawString(\"GAME OVER!\", 100, HEIGHT/2 - 50); //Displays \"GAME OVER!\"\n\t \t\n\t \tpage.setFont(new Font(\"Arial\",1,30));\n\t \tpage.drawString(\"HIT SPACE TO BEGIN AGAIN\", 170, HEIGHT/2+50);\n\t \t\n\t }\n\t page.setFont(new Font(\"Arial\", 1, 30));//SETS FONT AND SIZE FOR CURRENT SCORE\n\t if(!gameOver && start)\n\t {\n\t \tpage.setColor(Color.BLACK); //Font color for score\n\t \tpage.drawString(\"Your Score: \"+score, 100, HEIGHT/15); //Displays the score in the game\n\t }\n\t page.setFont(new Font(\"Arial\", 1, 30));\n\t if(gameOver || (!gameOver && start))\n\t {\n\t \tpage.setColor(Color.orange); //Sets the font to back to orange for the high score \n\t \tpage.drawString(\"HighScore: \", 550, HEIGHT/15); //Displays the \"HighScore: \"\n\t \t \t\t\t\n\t \tpage.drawString(String.valueOf(highScore), 725, HEIGHT/15); //Displays the number for high score\n\t }\n\t \n\t \n\t\t}",
"public DrawTextPanel() {\n\t\tfileChooser = new SimpleFileChooser();\n\t\tundoMenuItem = new JMenuItem(\"Remove Item\");\n\t\tundoMenuItem.setEnabled(false);\n\t\tmenuHandler = new MenuHandler();\n\t\tsetLayout(new BorderLayout(3,3));\n\t\tsetBackground(Color.BLACK);\n\t\tsetBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\n\t\tcanvas = new Canvas();\n\t\tadd(canvas, BorderLayout.CENTER);\n\t\tJPanel bottom = new JPanel();\n\t\tbottom.add(new JLabel(\"Text to add: \"));\n\t\tinput = new JTextField(\"Hello World!\", 40);\n\t\tbottom.add(input);\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tJButton button = new JButton(\"Generate Random\");\n\t\tbottom.add(button);\n\t\t\n\t\tcanvas.addMouseListener( new MouseAdapter() {\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tdoMousePress( e.getX(), e.getY() ); \n\t\t\t}\n\t\t} );\n\t\t\n\t\tbutton.addActionListener(new ActionListener() { \n\t\t\tpublic void actionPerformed(ActionEvent e) { \n\t\t\t\tfor (int i = 0; i < 150; i++) { \n\t\t\t\t\tint X = new Random().nextInt(800); \n\t\t\t\t\tint Y = new Random().nextInt(600);\n\t\t\t\t\tdoMousePress(X, Y); \n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}",
"private void drawStuff() {\n //Toolkit.getDefaultToolkit().sync();\n g = bf.getDrawGraphics();\n bf.show();\n Image background = window.getBackg();\n try {\n g.drawImage(background, 4, 24, this);\n\n for(i=12; i<264; i++) {\n cellKind = matrix[i];\n\n if(cellKind > 0)\n g.drawImage(tile[cellKind], (i%12)*23-3, (i/12)*23+17, this);\n }\n\n drawPiece(piece);\n drawNextPiece(pieceKind2);\n\n g.setColor(Color.WHITE);\n g.drawString(\"\" + (level+1), 303, 259);\n g.drawString(\"\" + score, 303, 339);\n g.drawString(\"\" + lines, 303, 429);\n\n } finally {bf.show(); g.dispose();}\n }",
"@Override\r\n\tpublic void render(GameContainer gc, Renderer r) {\n\t\tr.drawTextInBox(posX, posY, width, height, color1, text);\r\n\t\t//r.noiseGen();\r\n\t}",
"@Override\n\tprotected void draw() {\n\t\tif(p != null) {\n\t\t\tp.pushStyle();\n\t\t\tp.noStroke();\n\t\t\tp.textAlign(PApplet.CENTER,PApplet.CENTER);\n\t\t\tp.textSize(12);\n\t\t\tif(this.isPressed) {\n\t\t\t\tp.fill(122, 138, 153);\n\t\t\t\tp.rect(x,y,width,height);\n\t\t\t\tp.fill(181, 206, 228);\n\t\t\t\tp.rect(x+2,y+2,width-4,height-4);\n\t\t\t\tp.fill(Color.BLACK.getRGB());\n\t\t\t\tp.text(text, x, y,width,height);\n\t\t\t}else {\n\t\t\t\tif(this.isHovered) {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+2,y+2,width-5,height-5,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}else {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+1,y+1,width-3,height-3,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.popStyle();\n\t\t}\n\t}",
"public void paintComponent(Graphics g){\n super.paintComponent(g);\n\n //casting the Graphics g to Graphics2D which is the updated version\n Graphics2D g2d = (Graphics2D)g;\n g2d.setFont(new Font(\"Times new Roman,\", Font.PLAIN,20));\n g2d.setColor(Color.white);\n //class rendering hints attribute to specify whether you want objects to be rendered as quickly as possible\n g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n\n int y = textY;\n\n for(String line : text.split(\"\\n\")){\n int stringLength = (int)g2d.getFontMetrics().getStringBounds(line,g2d).getWidth();\n int x = getWidth()/2 - stringLength/2;\n g2d.drawString(line,x, y +=28);\n }\n }",
"public void paint(Graphics g)\r\n/* 79: */ {\r\n/* 80: 78 */ super.paint(g);\r\n/* 81: 79 */ int w = getWidth();\r\n/* 82: 80 */ int h = getHeight();\r\n/* 83: 81 */ Font f = g.getFont();\r\n/* 84: 82 */ int fontSize = w / 10;\r\n/* 85: 83 */ g.setFont(new Font(f.getName(), f.getStyle(), fontSize));\r\n/* 86: 84 */ FontMetrics fontMetrics = g.getFontMetrics();\r\n/* 87: 85 */ int fOffset = fontMetrics.getDescent();\r\n/* 88: 86 */ int wActor = fontMetrics.stringWidth(this.actor);\r\n/* 89: 87 */ int wAction = fontMetrics.stringWidth(this.action);\r\n/* 90: 88 */ g.drawString(this.actor, 5, h - fOffset);\r\n/* 91: 89 */ g.drawString(this.action, w - wAction - 5, h - fOffset);\r\n/* 92: */ }",
"@Override\n\tpublic void render(Canvas canvas) {\n\t\tPaint paint = new Paint();\n\t\tpaint.setColor(Color.parseColor(\"#D95B43\"));\n\t\tpaint.setTextSize(50 * Globals.scaleY);\n\t\tint width = (int)paint.measureText(this.toString(), 0, this.toString().length());\n\t\t\n\t\tthis.x = (int) ((gamePanel.width - width) / 2.0f);\n\t\t\n\t\tcanvas.drawText(this.toString(), x, y, paint);\n\t}",
"public void paint(Graphics g)\r\n {\r\n // place content of current note in the text area\r\n text.setText(snp.getNote());\r\n }",
"public void updateGraphics() {\n\t\t// Draw the background. DO NOT REMOVE!\n\t\tthis.clear();\n\t\t\n\t\t// Draw the title\n\t\tthis.displayTitle();\n\n\t\t// Draw the board and snake\n\t\t// TODO: Add your code here :)\n\t\tfor(int i = 0; i < this.theData.getNumRows(); i++) {\n\t\t\tfor (int j = 0; j < this.theData.getNumColumns(); j++) {\n\t\t\t\tthis.drawSquare(j * Preferences.CELL_SIZE, i * Preferences.CELL_SIZE,\n\t\t\t\t\t\tthis.theData.getCellColor(i, j));\n\t\t\t}\n\t\t}\n\t\t// The method drawSquare (below) will likely be helpful :)\n\n\t\t\n\t\t// Draw the game-over message, if appropriate.\n\t\tif (this.theData.getGameOver())\n\t\t\tthis.displayGameOver();\n\t}",
"@Override\n\tpublic void paint(Graphics e) {\n\t\tsuper.paint(e);\n\t\te.drawString(text, 20, 20);\n\t}",
"@Override\n\tpublic void render() {\n\t\tif (this.hidden) {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper.render();\n\n\t\tthis.font.draw(Graphics.batch, this.label, this.getX(),\n\t\t\tthis.getY() + (this.getHeight() - this.font.getLineHeight()) / 2);\n\t}",
"@Override\n public void updateDrawState(TextPaint ds) {\n }",
"public void render(Graphics2D g){\n if(game.gameState == Game.AppState.MENU){\n Font fnt0 = new Font(\"Serif\", Font.BOLD,45);\n Font fnt1 = new Font(\"Serif\", Font.BOLD,25);\n\n g.setFont(fnt0);\n g.setColor(Color.BLACK);\n g.drawString(\"DYNA BLASTER\", 122, 100);\n\n g.setFont(fnt1);\n g.fillRect(190,200,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"PLAY\", 268, 235);\n\n g.setColor(Color.BLACK);\n g.fillRect(190,300,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"BEST RESULTS\", 205, 335);\n\n g.setColor(Color.BLACK);\n g.fillRect(190,400,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"HELP\", 268, 435);\n\n g.setColor(Color.BLACK);\n g.fillRect(190,500,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"EXIT\", 272, 535);\n }\n else if(game.gameState == Game.AppState.RESULTS){\n Font fnt0 = new Font(\"Serif\", Font.BOLD, 35);\n Font fnt1 = new Font(\"Serif\", Font.BOLD, 25);\n Font fnt2 = new Font(\"Serif\", Font.BOLD, 20);\n\n g.setFont(fnt0);\n g.setColor(Color.BLACK);\n g.drawString(\"LIST\", 255, 80);\n g.setFont(fnt2);\n g.drawString(\"Place Nick Score\", 70, 120);\n for(int i=0;i<10;i++) {\n g.drawString(i+1+\" \"+handler.scores.getScores(i), 90, 150+30*i);\n }\n g.setFont(fnt1);\n g.setColor(Color.BLACK);\n g.fillRect(190,500,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"BACK\", 265, 535);\n }\n else if(game.gameState == Game.AppState.HELP){\n Font fnt0 = new Font(\"Serif\", Font.BOLD, 35);\n Font fnt1 = new Font(\"Serif\", Font.BOLD, 25);\n Font fnt2 = new Font(\"Serif\", Font.BOLD, 20);\n Font fnt3 = new Font(\"Serif\", Font.PLAIN, 16);\n\n g.setFont(fnt0);\n g.setColor(Color.BLACK);\n g.drawString(\"HELP\", 255, 100);\n String []command=helpconfig.gethelpstring();\n g.setFont(fnt2);\n g.drawString(command[0], 70, 150);\n g.setFont(fnt3);\n g.drawString(command[1], 70, 170);\n g.drawString(command[2], 70, 190);\n g.setFont(fnt2);\n g.drawString(command[3], 70, 230);\n g.setFont(fnt3);\n for(int i=4;i<helpconfig.get_length_of_commands();i++) {\n g.drawString(command[i], 70, 250+(i-4)*20);\n\n }\n g.setFont(fnt1);\n g.setColor(Color.BLACK);\n g.fillRect(190,500,220,54);\n g.setColor(Color.cyan);\n g.drawString(\"BACK\", 265, 535);\n }\n }",
"@Override\r\n\tpublic void onCustomDraw(Graphics2D g) {\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(x, y, width, height);\r\n\t\tg.setColor(Color.green);\r\n\t\tfor(int i = 0; i < 50; i++){\r\n\t\t\tif(text[i] != null){\r\n\t\t\t\tg.drawString(text[i], 11, (i*10)+20);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void draw() { \n\t\tbackground(255); // Clear the screen with a white background\n\t\tfill(0);\n\t\ttextAlign(LEFT);\n\t\ttextSize(12);\n\t\t\n\t\tif (runCount == 0) {\n\t\t\tboard.onClick();\n\t\t} else if (runCount > 0) {\n\t\t\trunCount--;\n\t\t}\n\t\t\n\t\tif (board != null) {\n\t\t\tboard.draw(this, 0, 0, height, height);\n\t\t}\n\t\t\n\t}",
"public void drawPokemon() {\n setAttackText();\n drawImage();\n }",
"@Override\r\n\tpublic void paint(Object g) {\n\t\tGraphics2D graphics = (Graphics2D) g;\r\n\t\t\r\n\t\t\r\n\t\tlargeFontMetrics = graphics.getFontMetrics(largeFont);\r\n\t\tmediumFontMetrics = graphics.getFontMetrics(mediumFont);\r\n\t\tsmallFontMetrics = graphics.getFontMetrics(smallFont);\t\r\n\t\tlargeHeight = largeFontMetrics.getHeight();\r\n\t\tmediumHeight = mediumFontMetrics.getHeight();\r\n\t\tsmallHeight = smallFontMetrics.getHeight();\t\r\n\t\tint firstLineYBase = largeHeight + FIRST_LINE_Y_OFFSET;\r\n\t\tint secondLineYBase = firstLineYBase + mediumHeight;\r\n\t\tint thirdLineYBase = secondLineYBase + smallHeight;\r\n\t\tint fourthLineYBase = thirdLineYBase + smallHeight;\t\t\r\n\t\tgraphics.setColor(ABOUT_BACKGROUND);\r\n\t\tgraphics.fillRect(BORDER_OFFSET,BORDER_OFFSET, drawComponent.getWidth() -BORDER_OFFSET*2, OBJECT_EDITOR_HEIGHT);\r\n\t\tgraphics.setColor(ABOUT_FOREGROUND);\r\n\t\tgraphics.setFont(largeFont);\r\n\t\tgraphics.drawString(OBJECT_EDITOR_NAME, LINE_X_OFFSET, OBJECT_EDITOR_Y + firstLineYBase);\t\r\n\t\tgraphics.setFont(mediumFont);\r\n//\t\tgraphics.drawString(\"(\" + objectEditorVersion + \": \" + objectEditorBuildTime + \")\", 90, 20);\r\n\t\tgraphics.drawString(versionDetails, LINE_X_OFFSET, OBJECT_EDITOR_Y + secondLineYBase );\t\r\n\t\tgraphics.setFont(smallFont);\r\n\t\tgraphics.drawString(AboutManager.getObjectEditorDescription().getCopyRight(), LINE_X_OFFSET, OBJECT_EDITOR_Y + thirdLineYBase);\r\n\t\tgraphics.drawString(AboutManager.getObjectEditorDescription().getPatent(), LINE_X_OFFSET, OBJECT_EDITOR_Y + fourthLineYBase);\r\n\t\tgraphics.setColor(STATUS_BACKGROUND);\r\n\t\tgraphics.fillRect(BORDER_OFFSET, STATUS_Y, drawComponent.getWidth() -BORDER_OFFSET*2, STATUS_HEIGHT);\r\n//\t\tgraphics.setColor(Color.DARK_GRAY);\r\n\t\tgraphics.setColor(STATUS_FOREGROUND);\r\n//\t\tgraphics.drawLine(0, 32, drawComponent.getWidth(), 33);\r\n\t\tgraphics.setFont(largeFont);\r\n//\t\tSystem.out.println(\"Drawstring edited object:\" + editedObject);\r\n//\r\n//\t\tSystem.out.println(\"Drawstring edited object toSTring:\" + editedObject.toString());\r\n//\t\tSystem.out.println(\"Drawstring firstLine Base:\" + firstLineYBase);\r\n\r\n//\t\tif (mainHeader != null)\r\n//\t\tgraphics.drawString( mainHeader.toString(), LINE_X_OFFSET, STATUS_Y + firstLineYBase);\r\n//\t\tSystem.out.println(\" Painting main header to string \");\r\n\r\n\t\tif (mainHeaderToString != null)\r\n\t\t\tgraphics.drawString( mainHeaderToString, LINE_X_OFFSET, STATUS_Y + firstLineYBase); // this will deadlock\r\n//\t\t\tgraphics.drawString( mainHeader.toString(), LINE_X_OFFSET, STATUS_Y + firstLineYBase);\r\n\r\n\r\n//\t\tgraphics.drawString( \"\" + editedObject + \"(\" + editorGenerationMessage + \")\", 5, 80);\r\n\t\tgraphics.setFont(mediumFont);\r\n\t\tgraphics.drawString( majorStepMessage, LINE_X_OFFSET, STATUS_Y + secondLineYBase);\r\n\t\tgraphics.setFont(smallFont);\t\t\r\n\t\tgraphics.drawString(statusMessage, LINE_X_OFFSET, STATUS_Y + thirdLineYBase);\r\n\t\tString timeString = \"(\" + numSeconds +\"s)\";\r\n\t\tgraphics.drawString( timeString, LINE_X_OFFSET, STATUS_Y + fourthLineYBase);\r\n\t\tint timeStringLength = smallFontMetrics.stringWidth(timeString);\r\n\t\tgraphics.setColor(PROGRESS_COLOR);\r\n\t\tgraphics.fillRect(LINE_X_OFFSET + timeStringLength + 3, STATUS_Y + fourthLineYBase -10, numSeconds*5, 12);\r\n\t\tgraphics.setColor(DEFINITION_BACKGROUND);\r\n\t\tgraphics.fillRect(BORDER_OFFSET, DEFINITION_Y, drawComponent.getWidth()-BORDER_OFFSET*2, drawComponent.getHeight()- DEFINITION_Y - BORDER_OFFSET);\t\r\n\t\tgraphics.setFont(largeFont);\r\n\t\tgraphics.setColor(DEFINITION_FOREGROUND);\r\n\t\tif (computerDefinition != null) {\r\n\t\tgraphics.drawString(computerDefinition.getWord(), LINE_X_OFFSET, DEFINITION_Y + firstLineYBase);\r\n\t\tgraphics.setFont(mediumFont);\r\n\t\tgraphics.drawString(computerDefinition.getMeaning(), LINE_X_OFFSET, DEFINITION_Y + secondLineYBase);\r\n\t\tgraphics.setFont(smallFont);\r\n\t\tgraphics.drawString(DEFINITIONS_BEHAVIOR_MESSAGE, LINE_X_OFFSET, DEFINITION_Y + thirdLineYBase);\r\n\t\t} else {\r\n\t\t\tgraphics.drawString(\"Missing definition file:\" + ComputerDefinitionsGenerator.DICTIONARY_FILE, LINE_X_OFFSET, DEFINITION_Y + firstLineYBase);\r\n\r\n\t\t}\r\n\t\t\r\n\t\tif (logoImage != null) {\r\n\t\t\tgraphics.drawImage(logoImage, LOGO_X, LOGO_Y, LOGO_WIDTH, LOGO_HEIGHT, drawComponent);\r\n//\t\t\tgraphics.drawImage(logoImage, LOGO_X, LOGO_Y, drawComponent);\r\n\r\n\t\t}\r\n//\t\tSystem.out.println(\"End Paint start view\");\r\n\r\n\r\n\r\n//\t\tgraphics.drawString(ComputerDefinitions.definitions[0], LINE_X_OFFSET, DEFINITION_Y + firstLineYBase);\r\n\r\n\r\n//\t\tgraphics.drawString(editorGenerationMessage, 10, 40);\r\n//\t\tgraphics.drawString(\"\" + numSeconds +\"s\", 50, 80);\r\n//\t\tgraphics.drawString(lastTraceable, 100, 100);\r\n\t}",
"public void paintComponent(Graphics g) {\r\n\t\tg.setColor(Color.yellow);\r\n\t\tg.fillRect(0, 0, 500, 100);\r\n\r\n\t\t// Sets the font and colour\r\n\t\tg.setColor(Color.black);\r\n\t\tFont font = new Font(\"Monospaced\", Font.BOLD | Font.ITALIC, 20);\r\n\t\tg.setFont(font);\r\n\t\t\r\n\t\t// Prints the player part\r\n\t\tg.drawString(ownName, 300, 30);\r\n\t\tg.drawString(\"\" + ownScore, 450, 30);\r\n\r\n\t\t// Prints the enemy part\r\n\t\tg.drawString(enemyName, 300, 70);\r\n\t\tg.drawString(\"\" + enemyScore, 450, 70);\r\n\r\n\t\t// Current word value\r\n\t\tg.drawString(\"Current word value:\", 15, 30);\r\n\t\tg.drawString(\"\" + wordValue, 15, 70);\r\n\r\n\t}",
"public void screenText(Canvas canvas){\n Paint paint = new Paint();\n paint.setColor(Color.WHITE);\n paint.setTextSize(30);\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n canvas.drawText(\"Score: \"+ (newPlayer.getScore()), 10, height-10, paint);\n canvas.drawText(\"Best Score: \"+ getRecord(), width-215, height-10, paint);\n canvas.drawText(\"Level: \" + level, 10, height-550, paint);\n\n //If the game is reset will run a seperate screen text\n if (!newPlayer.getRunning()&&gamenew&&reset){\n Paint newPaint = new Paint();\n newPaint.setTextSize(40);\n newPaint.setColor(Color.WHITE);\n newPaint.setTypeface(Typeface.create(Typeface.DEFAULT,Typeface.BOLD));\n canvas.drawText(\"Click to start!\", width/2-50, height/2, newPaint);\n\n newPaint.setTextSize(20);\n canvas.drawText(\"Press and hold for the ship to hover up\", width/2-50,height/2+20,newPaint);\n canvas.drawText(\"Release to let the ship go down!\", width/2-50,height/2+40,newPaint);\n }\n\n }",
"@Override\n public void paintComponent(final Graphics theGraphics) {\n super.paintComponent(theGraphics);\n \n this.myLineCleared.setText(\"Cleared Lines : \" + Integer.toString(this.myClearedLines));\n this.myScoreLabel.\n setText(\"Current Score : \" + Integer.toString(this.myCurrentScoreInt));\n this.myHighScoreLabel.\n setText(\"High Score: \" + Integer.toString(this.myHighScoreInt));\n this.myCurrentLevel.\n setText(\"Current Level : \" + Integer.toString(this.myLevel));\n this.myNextLevelDistance.\n setText(\"Lines To Go : \" + Integer.toString(this.myLinesToGo));\n this.myNextPiece.repaint();\n }",
"@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawString(str, 10, 10);\r\n\t\tg.drawLine(10, 20, 110, 20);\r\n\t\tg.drawRect(pX, 30, 100, 100);\r\n\t\t\r\n\t}",
"@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.red);\n\t\t\tg.fillRoundRect(30, 30, 240, 140, 30, 30);\n\t\t\tg.setColor(Color.gray);\n\t\t\tg.setFont(new Font(\"Monospaced\", Font.BOLD, 48));\n\t\t\tg.drawString(\"Hallo! Was wenn ich mehr Text habe?\", 65, 110);\n\t\t}",
"@Override\n public void paintComponent(Graphics g)\n {\n m_g = g;\n // Not sure what our parent is doing, but this seems safe\n super.paintComponent(g);\n // Setup, then blank out with white, so we always start fresh\n g.setColor(Color.white);\n g.setFont(null);\n g.clearRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.fillRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.setColor(Color.red);\n //g.drawRect(10,10,0,0);\n //drawPoint(20,20);\n \n // Call spiffy functions for the training presentation\n m_app.drawOnTheCanvas(new ExposedDrawingCanvas(this));\n m_app.drawOnTheCanvasAdvanced(g);\n \n // ADVANCED EXERCISE: YOU CAN DRAW IN HERE\n \n // END ADVANCED EXERCISE SPACE\n \n // Clear the special reference we made - don't want to abuse this\n m_g = null;\n \n \n // Schedule the next repaint\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n m_app.repaint();\n try\n {\n Thread.sleep(100);\n }\n catch (Exception e)\n { \n \n }\n }\n }); \n }",
"@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }",
"public void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\tcheckCollision(g);\n\t\tif (names_set) {\n\t\t\tdrawStartCountdown(g);\n\t\t\tif (start) {\n\t\t\t\tnames_set = false;\n\t\t\t}\n\t\t}\n\t\tif (gameOver) {\n\t\t\tdrawGameOver(g);\n\t\t} else {\n\t\t\tdrawObjects(g);\n\t\t\tdrawScores(g);\n\t\t\tif (dispTime){\n\t\t\t\t drawCountdown(g);\n\t\t\t}\n\t\t\tif (computer.isPowerup()) {\n\t\t\t\tdrawPowerupAI(g);\n\t\t\t}\n\n\t\t\tif (hero.isPowerup()) {\n\t\t\t\tdrawPowerupHero(g);\n\t\t\t}\n\t\t\tif(explodet1){\n\t\t\t\ttimer3.start();\n\t\t\t\tdrawExplosion(g, posxt1, posyt1);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(explodet2){\n\t\t\t\ttimer3.start();\n\t\t\t\tdrawExplosion(g, posxt2, posyt2);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"void draw() {\n\t\t// display debug information\n\t\t// if (debugMode)\n\t\t// displayDebugInformation();\n\n\t\tupdate();\n\t\trender(); // display freetransform points, lines and colorings\n\n\t\t// display opposite objects\n\t\t// displayOppositeObject();\n\t}",
"public void paint (Graphics g)\n { \n //The following is the Title Screen\n if (numClicks == 0)\n {\n \t g.drawImage (titleScreen, 65, 130, this);\t//draws the Paper Airplane\n \t \t\t\t\t\t\t\t\t\t\t\t//GIF on the title Screen.\n \t //The following makes the text \"PAPER AIRPLANE GAME\" with red text\n \t //and with the fTitle font.\n \t g.setColor (Color.red);\n \t g.setFont (fTitle);\n \t g.drawString (\"PAPER AIRPLANE GAME\", 100, 270);\n \t \n \t //The following creates the illusion of the words \"CLICK YOUR MOUSE\n \t //TO START\" flashing.\n \t if (timePassed > 50 && timePassed <= 80)\n \t \tg.setColor (Color.white);\t//sets the text to white (makes it\n \t \t\t\t\t\t\t\t\t//visible in the black photo.\n \t else if (timePassed <= 50)\n \t \tg.setColor (Color.black);\t//sets the text to black (makes it\n \t \t\t\t\t\t\t\t\t//invisible in the black photo.\n \t else\n \t \ttimePassed = 20;\t//resets the time to 20 if the timePassed value\n \t \t\t\t\t\t\t//exceeds 80 (mainly done to waste space, since\n \t \t\t\t\t\t\t//the timePassed value would eventually reach a\n \t \t\t\t\t\t\t//really high value.\n \t g.setFont (fPressAny);\n \t g.drawString (\"CLICK YOUR MOUSE TO START\", 160, 430);\n \t \n \t //The following creates the Credits Button at the bottom of the\n \t //screen.\n \t g.setColor (Color.blue);\t//Sets the color to blue.\n \t g.drawRoundRect (200, 540, 100, 50, 10, 10);\t//creates the box/.\n \t g.drawString (\"CREDITS\", 225, 570);\t//creates the \"CREDITS\" text.\n }\n //The following is the Credits Screen\n else if (numClicks == -2)\n {\n \t//Draws the sky background\n \tg.drawImage (gameClouds1, xClouds1, 0, this);\n \tg.drawImage (gameClouds2, xClouds2, 0, this);\n \t\n \t//List the credit titles\n \tg.setColor (Color.red);\n \tg.setFont (fTitle);\n \tg.drawString (\"PRODUCER\", 180, 100);\n \tg.drawString (\"ARTIST\", 203, 180);\n \tg.drawString (\"PROGRAMMING TEAM\", 120, 260);\n \tg.drawString (\"ORIGINAL CONCEPT BY\", 105, 340);\n \t\n \t//List the people under the credit titles\n \tg.setColor (Color.black);\n \tg.setFont (fCreditNames);\n \tg.drawString (\"Alvin Tran\", 200, 130);\n \tg.drawString (\"Alvin Tran\", 200, 210);\n \tg.drawString (\"Alvin Tran\", 200, 290);\n \tg.drawString (\"NINTENDO\", 200, 370);\n }\n //The following is the actual game\n else\n {\n \t //Draws the sky behind the brick background\n \t g.drawImage (gameClouds1, xClouds1, 0, this);\n \t g.drawImage (gameClouds2, xClouds2, 0, this);\n \t //Draws the brick background\n\t \t g.drawImage (gameBkg1, 0, yBkg1, this);\n\t g.drawImage (gameBkg2, 0, yBkg2, this);\n\t \n\t //Draws PaperAirplane\n\t \n\t //The following drew the beta image of the PaperAirplane created with\n\t //the fillPolygon method. It is only here to show how it was once\n\t //rendered. It used the xPoints [] and yPoints [] from the\n\t //PaperAirplane class to draw the PaperAirplane\n\t \n\t //g.setColor (Color.red);\n\t //g.fillPolygon (p.getXPoints (), p.getYPoints (), 3);\n\t \n\t \n\t //The following is how the final PaperAirplane image is created in\n\t //the game. It draws different images of the plane depending on its\n\t //hSpeed. The range of the speed is -5 to 5, and from 1 to 5, the\n\t //PaperAirplane faces right, while when it is from -1 to -5, it faces\n\t //left (angle of the plane varies according to hSpeed). When the speed\n\t //is at 0, the PaperAirplane faces staright down.\n\t \n\t\t if (p.getHSpeed () >= -5 && p.getHSpeed () < 0)\n\t\t \tg.drawImage (planeAngle [p.getHSpeed () + 5], p.getXD3 (), p.getYD2 (), this);\n\t\t else if (p.getHSpeed () == 0)\n\t\t \tg.drawImage (planeAngle [p.getHSpeed () + 5], p.getXD1 (), p.getYD1 (), this);\n\t\t else\n\t\t \tg.drawImage (planeAngle [p.getHSpeed () + 5], p.getXD1 (), p.getYD2 (), this);\n\t\t \t\n\t \t //Draws Wall obstacles using the fillRoundRect () method.\n\t \t g.setColor (Color.gray);\t//Sets the walls to be gray.\n\t \t for (int i = 0; i < w.length; i++)\n\t\t \t g.fillRoundRect (w[i].getX_Pos (), w[i].getY_Pos (), w[i].getWidth (), w[i].getHeight (), w[i].getArcWidth (), w[i].getArcHeight ());\n\t\t \n\t\t //Draws SideWalls\n\t\t \n\t\t //The following was the method of drawing the walls earlier in\n\t\t //development. The method to do this was similar to how the Walls\n\t\t //were drawn.\n\t\t \n\t\t //g.fillRoundRect (sW[0].getX_Pos (), sW[0].getY_Pos (), sW[0].getWidth (), sW[0].getHeight (), sW[0].getArcWidth (), sW[0].getArcHeight ());\n\t\t //g.fillRoundRect (sW[1].getX_Pos (), sW[1].getY_Pos (), sW[1].getWidth (), sW[1].getHeight (), sW[1].getArcWidth (), sW[1].getArcHeight ());\n\t\t //g.fillRoundRect (sW[2].getX_Pos (), sW[2].getY_Pos (), sW[2].getWidth (), sW[2].getHeight (), sW[2].getArcWidth (), sW[2].getArcHeight ());\n\t\t //g.fillRoundRect (sW[3].getX_Pos (), sW[3].getY_Pos (), sW[3].getWidth (), sW[3].getHeight (), sW[3].getArcWidth (), sW[3].getArcHeight ());\n\t\t \n\t\t \n\t\t //The following draws the SideWalls by using GIFs of drawn walls.\n\t\t //Left walls and right walls have different GIFs.\t\n\t\t g.drawImage (leftWall, sW[0].getX_Pos (), sW[0].getY_Pos(), this);\n\t\t g.drawImage (rightWall, sW[1].getX_Pos (), sW[1].getY_Pos(), this);\n\t\t g.drawImage (leftWall, sW[2].getX_Pos (), sW[2].getY_Pos(), this);\n\t\t g.drawImage (rightWall, sW[3].getX_Pos (), sW[3].getY_Pos(), this);\n\t }\n\t //The following is the Game Over screen\n if (numClicks == -1)\n {\n \tg.setColor (Color.red);\t//Sets color to red\n \tg.setFont (fGameOver);\t//Sets font to fGameOver\n \tg.drawString (\"GAME\", 170, 240);//draws the word \"GAME\"\n \tg.drawString (\"OVER\", 170, 300);//draws the word \"OVER below \"GAME\"\n }\n \n //The following make the current score display and the current time\n //display, which is always present.\n strScore = \"SCORE: \" + String.valueOf(score.getScore ());\n strTime = \"TIME: \"+ String.valueOf (time.getMinutes()) + \":\" + String.valueOf (time.getDisplayedSeconds () / 10) + String.valueOf (time.getDisplayedSeconds () % 10);\n \n //if (numClicks == 0)\n \tg.setColor (Color.green);\n //else\n //\tg.setColor (Color.white);\n g.setFont (fScore);\n g.drawString (strScore, 116, 50);\n g.drawString (strTime, 310, 50);\n \n //The following makes the high score display and the best time display,\n //which is always present.\n strHighScore = \"HIGH SCORE: \" + String.valueOf (highScore.getScore ());\n strBestTime = \"BEST TIME: \" + String.valueOf (bestTime.getMinutes ()) + \":\" + String.valueOf (bestTime.getDisplayedSeconds () / 10) + String.valueOf (bestTime.getDisplayedSeconds () % 10);\n \n g.setColor (Color.green);\n g.drawString (strHighScore, 74, 65);\n g.drawString (strBestTime, 310, 65);\n \n //The following makes the level display for the game.\n strLevel = \"Level: \" + String.valueOf (level);\n \n g.setColor (Color.red);\n g.drawString (strLevel, 220, 20);\n \n //The following makes the music on/off button for the game\n g.fillRoundRect (460, 560, 40, 40, 5, 5);\n //The following makes the text within the music on/off button in the game\n //(it's either \"ON\" or \"OFF\")\n g.setColor (Color.white);\n if (musicOn ())\t//If musicOn () is true, the text will say \"ON\"\n \tg.drawString (\"ON\", 465, 585);\n else\t\t\t\t//Otherwise, it will say \"OFF\"\n \tg.drawString (\"OFF\", 465, 585);\n }",
"public void render(Graphics g){\n\t\tg.setColor(Color.BLACK);\n\t\tg.setFont(JudokaComponent.bigFont);\n\t\tJudokaComponent.drawTextBox(170, 160, 350, 35, g);\n\t\t\t\n\t\tg.drawImage(JudokaComponent.judokaMatte, 640, 120, 160, 240, null);\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tg.drawString(name, 175, 187);\n\t\tif(timer % 60 < 30 && selectedItem == -1)g.drawRect(175 + name.length() * 21, 165, 1, 27);\n\t\t\n\t\tg.setColor(Color.DARK_GRAY);\n\t\tg.setFont(new Font(\"Courier new\", 1, 45));\n\t\tg.drawString(\"Techniques\", 190, 235);\n\t\tg.drawString(\"Name\", 190, 150);\n\t\tg.drawRect(185, 236, 280, 1);\n\t\tg.drawRect(185, 151, 116, 1);\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tg.setFont(JudokaComponent.stdFont);\n\t\tfor(int i = 0; i < techniqueTitle.length * 35; i += 35){\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.setFont(JudokaComponent.stdFont);\n\t\t\tg.drawString(techniqueTitle[i / 35], 450, 270 + i);\n\t\t\tg.drawRect(150, 250 + i, 280, 24);\n\t\t\tg.drawRect(150, 250 + i, 24, 24);\n\t\t\tg.setColor(Color.WHITE);\n\t\t\tg.fillRect(175, 251 + i, 255, 22);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawImage(JudokaComponent.pen, 150, 250 + i, 24, 24, null);\n\t\t\tif(i / 35 == selectedItem && selectedItem != -1){\n\t\t\t\tg.drawString(\">\", 130, 270 + i);\n\t\t\t}\n\t\t\tg.setFont(JudokaComponent.bigFont);\n\t\t\tif(selectedItem == 8) g.drawString(\"> Save <\", 640, 390);\n\t\t\telse g.drawString(\"Save\", 682, 390);\n\t\t\t\n\t\t\tg.setFont(JudokaComponent.stdFont);\n\t\t\tif(techniques[i / 35] != null) g.drawString(techniques[i / 35].NAME, 177, 270 + i);\n\t\t\telse{\n\t\t\t\tg.setColor(Color.RED);\n\t\t\t\tg.drawString(\"NONE\", 177, 270 + i);\n\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif(saveTimer < 180) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tg.fillRect(700, JudokaComponent.HEIGHT - 100, 145, 200);\n\t\t\tg.setColor(Color.WHITE);\n\t\t\tg.setFont(JudokaComponent.stdFont);\n\t\t\tg.drawString(\"Saved!\", 730, JudokaComponent.HEIGHT - 60);\n\t\t\tg.setColor(Color.BLACK);\n\t\t}\n\t}",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"public void draw()\r\n {\r\n\tfinal GraphicsLibrary g = GraphicsLibrary.getInstance();\r\n\t_level.draw(g);\r\n\t_printText.draw(\"x\" + Mario.getTotalCoins(), 30, _height - 36, false);\r\n\t_printText.draw(\"C 000\", _width - 120, _height - 36, false);\r\n\t_printText.draw(Mario.getLives() + \"UP\", 240, _height - 36, false);\r\n\t_printText.draw(Mario.getPoints() + \"\", 400, _height - 36, false);\r\n\t_coin.draw();\r\n\t_1UP.draw();\r\n }",
"private synchronized void paint() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tBufferStrategy bs;\n\t\tbs = this.getBufferStrategy();\n\t\t\n\t\tGraphics2D g = (Graphics2D) bs.getDrawGraphics();\n\t\tg.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillRect(0, 0, this.getWidth(), this.getHeight());\n\t\t\n\t\tif(this.reiniciar == true){\n\t\t\tString ca = \"\" + cuentaAtras;\n\t\t\tg.setColor(Color.WHITE); \n\t\t\tg.setFont(new Font (\"Consolas\", Font.BOLD, 80));\n\t g.drawString(\"Puntuación: \" + puntuacion, 100, 200);\n\t \n\t g.setColor(Color.WHITE); \n\t\t\tg.setFont(new Font (\"Consolas\", Font.BOLD, 300));\n\t g.drawString(ca, 400, 500);\n\t \n\t g.setColor(Color.WHITE); \n\t\t\tg.setFont(new Font (\"Consolas\", Font.BOLD, 40));\n\t\t\tg.drawString(\"Pulsa enter para volver a jugar\", 150, 600);\n\t\t}\n\t\t\n\t\telse if(this.reiniciar == false){\n\t\t\tfor(int i=0;i<numDisparos;i++){ \n\t\t\t\t disparos[i].paint(g);\n\t\t\t}\n\t\t\tfor(int i=0;i<numAsteroides;i++){\n\t\t\t\t asteroides[i].paint(g);\n\t\t\t}\n\t\t\t\n\t\t\tif(this.isNaveCreada()==true && nave!=null){\n\t\t\t\tnave.paint(g);\n\t\t\t}\n\t\t\t\n\t\t\tif(enemigo.isVivo()==true){\n\t\t\t\tenemigo.paint(g);\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<numDisparosE;i++){ \n\t\t\t\t\t disparosE[i].paint(g);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tg.setColor(Color.WHITE); \n\t\t\tg.drawString(\"Puntuacion \" + puntuacion,20,20); \n\t\t\t\n\t\t\tg.setColor(Color.WHITE); \n\t\t\tg.drawString(\"Vida \" + this.getVidas(),20,40);\n\t\t}\n\t\t\n\t\tg.dispose();\n\t\tbs.show();\n\t}",
"public void draw() {\n\t\tGL11.glColor3f(0.5f,0.5f,1.0f);\n\t\n\t\t// draw quad\n\t\tGL11.glBegin(GL11.GL_QUADS);\n\t\t\tGL11.glVertex2f(x,y);\n\t\t\tGL11.glVertex2f(x+width,y);\n\t\t\tGL11.glVertex2f(x+width,y+height);\n\t\t\tGL11.glVertex2f(x,y+height);\n\t\tGL11.glEnd();\n\t\t\n\t\tif(text != null || !text.equals(\"\"))\n\t\t\tfont.drawString(text, x, y);\n\t\n\t}",
"public void render() {\n stroke(color(50, 50, 50));\n fill(color(50, 50, 50));\n rect(0, 0, getWidth(), getTopHeight());\n int tempX = this.x;\n int fontSize = 150 / (this.players.size() * 2);\n\n this.messages = new ArrayList();\n int count = 0;\n for (Player player : this.players) {\n\n StringBuilder bar = new StringBuilder();\n // max lives = 3\n bar.append(player.name() + \" \");\n for (int i=0; i<3; i++) {\n if (i < player.lives()) {\n bar.append('\\u25AE'); // http://jrgraphix.net/r/Unicode/?range=25A0-25FF\n } else {\n bar.append('\\u25AF');\n }\n }\n\n String message = bar.toString();\n messages.add(message);\n\n textAlign(LEFT);\n textFont(f, fontSize);\n fill(player.getColor());\n text(message, tempX, this.y);\n\n int newX = (int) textWidth(message) + 10;\n tempX += newX;\n count++;\n }\n }",
"private void draw() {\n Graphics2D g2 = (Graphics2D) image.getGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);\n\n AffineTransform transform = AffineTransform.getTranslateInstance(0, height);\n transform.concatenate(AffineTransform.getScaleInstance(1, -1));\n g2.setTransform(transform);\n\n int width = this.width;\n int height = this.height;\n if (scale != 1) {\n g2.scale(scale, scale);\n width = (int) Math.round(width / scale);\n height = (int) Math.round(height / scale);\n }\n AbstractGraphics g = new GraphicsSWT(g2);\n\n g.setScale(scale);\n if (background != null) {\n g.drawImage(background, 0, 0, width, height);\n }\n\n synchronized (WFEventsLoader.GLOBAL_LOCK) {\n for (Widget widget : widgets) {\n if (widget != null) widget.paint(g, width, height);\n }\n }\n // draw semi-transparent pixel in top left corner to workaround famous OpenGL feature\n g.drawRect(0, 0, 1, 1, Color.WHITE, .5, PlateStyle.RectangleType.SOLID);\n\n g2.dispose();\n }",
"@Override\r\n public void draw(Canvas canvas) {\r\n if (text == null) {\r\n throw new IllegalStateException(\"Attempting to draw a null text.\");\r\n }\r\n\r\n // Draws the bounding box around the TextBlock.\r\n RectF rect = new RectF(text.getBoundingBox());\r\n rect.left = translateX(rect.left);\r\n rect.top = translateY(rect.top);\r\n rect.right = translateX(rect.right);\r\n rect.bottom = translateY(rect.bottom);\r\n canvas.drawRect(rect, rectPaint);\r\n\r\n // Log.d(\"area\", \"text: \" + text.getText() + \"\\nArea: \" + Area);\r\n /**Here we are defining a Map which takes a string(Text) and a Integer X_Axis.The text will act as key to the X_Axis.\r\n Once We Got the X_Axis we will pass its value to a SparseIntArray which will Assign X Axis To Y Axis\r\n .Then We might Create another Map which will Store Both The text and the coordinates*/\r\n int X_Axis = (int) rect.left;\r\n int Y_Axis = (int) rect.bottom;\r\n\r\n // Renders the text at the bottom of the box.\r\n Log.d(\"PositionXY\", \"x: \"+X_Axis +\" |Y: \"+ Y_Axis);\r\n canvas.drawText(text.getText(), rect.left, rect.bottom, textPaint); // rect.left and rect.bottom are the coordinates of the text they can be used for mapping puposes\r\n\r\n\r\n }",
"public void render (DrawingCanvas canvas){\n //System.out.println(\"drawing \"+wd+\"*\"+ht+\" at (\"+x+\",\"+y+\")\");\n canvas.setForeground(col);\n canvas.drawString(str, x, y, false);\n canvas.setForeground(Color.lightGray);\n canvas.drawRect(x,y-13,(str.length()*8),16);\n }",
"protected void paint(Graphics g) {\n\n switch (gameStatus) {\n\t case notInitialized: {\n\t gBuffer.setColor(0xffffff);gBuffer.fillRect(0, 0, scrwidth,scrheight);\n\t\t gBuffer.setColor(0x00000); // drawin' flyin' text\n\t\t\t Font f = Font.getDefaultFont();\n\t\t\t gBuffer.setFont(Font.getFont(Font.FACE_MONOSPACE, Font.STYLE_BOLD, Font.SIZE_SMALL));\n\t gBuffer.drawString(loadString/*\"Loading ...[\"+LoadingNow+\"/\"+LoadingTotal+\"]\"*/ ,scrwidth>>1, (scrheight>>1)-13,Graphics.TOP|Graphics.HCENTER);\n//\t gBuffer.drawString(\"Loading ...[\"+Runtime.getRuntime().freeMemory()+\"/\"+Runtime.getRuntime().totalMemory()+\"]\" ,scrwidth>>1, (scrheight>>1)-14,Graphics.TOP|Graphics.HCENTER);\n\t gBuffer.drawRect((scrwidth-40)>>1,((scrheight-15)>>1)+10, 40,6);\n\t gBuffer.fillRect((scrwidth-40)>>1,((scrheight-15)>>1)+10, 40*LoadingNow/Math.max(1,LoadingTotal),6);\n\t\t\t gBuffer.setFont(f);\n\t\t g.drawImage(Buffer,0,0,Graphics.TOP|Graphics.LEFT);\n\n\t } break;\n\n case titleStatus : g.setColor(0xffffff);g.fillRect(0, 0, scrwidth,scrheight);\n\t g.drawImage(Title,scrwidth>>1,scrheight>>1,Graphics.HCENTER|Graphics.VCENTER);\n\t\t\t g.drawImage(MenuIcon,scrwidth-2,scrheight-1, Graphics.BOTTOM|Graphics.RIGHT);\n\t\t\t break;\n\n\t case Finished: //if (LostWon == null) LostWon = pngresource.getImage(pngresource.IMG_WON);\n\t case gameOver: //if (LostWon == null) LostWon = pngresource.getImage(pngresource.IMG_LOST);\n\t\t\t if (ticks>FINAL_PICTURE_OBSERVING_TIME) {\n\t\t\t\tg.setColor(0xffffff);g.fillRect(0, 0, scrwidth,scrheight);\n\t\t\t\tg.setColor(0x00000); // drawin' flyin' text\n\t\t\t Font f = Font.getDefaultFont();\n\t\t\t g.setFont(Font.getFont(Font.FACE_PROPORTIONAL , Font.STYLE_BOLD, Font.SIZE_SMALL));\n\t\t\t\tg.drawString(YourScore+client_sb.getGameStateRecord().getPlayerScores() ,scrwidth>>1, scrheight>>1,Graphics.TOP|Graphics.HCENTER);\n \t } else {\n\t\t \tg.setColor(0xffffff);g.fillRect(0, 0, scrwidth,scrheight);\n\t \tg.drawImage((gameStatus==gameOver?Lost:Won),scrwidth>>1,scrheight>>1,Graphics.HCENTER|Graphics.VCENTER);\n\t \tg.drawImage(MenuIcon,scrwidth-2,scrheight-1, Graphics.BOTTOM|Graphics.RIGHT);\n\t\t\t } break;\n\n\t //case demoPlay:\n default : if (this.isDoubleBuffered())\n\t\t\t {\n\t\t DoubleBuffer(g);\n\t\t\t }\n\t\t\t else {\n\t\t DoubleBuffer(gBuffer);\n\t\t g.drawImage(Buffer,0,0,Graphics.TOP|Graphics.LEFT); break;\n\t\t\t }\n\t\t\t g.drawImage(MenuIcon,scrwidth-2,scrheight-1, Graphics.BOTTOM|Graphics.RIGHT);\n }\n }",
"public void paint(Graphics g) {\n\t\t\tif(!winning&&!losing){\n\t\t\t\t//System.out.println(\"IN PAINT\");\n\t\t\t\tsuper.paint(g);\n\t\t\t\tImage background;\n\t\t\t\tURL loc = this.getClass().getResource(\"sky.jpg\");\n\t\t\t\tImageIcon o = new ImageIcon(loc);\n\t\t\t\tbackground = o.getImage();\n\t\t\t\tg.drawImage(background,0, 0, this.getWidth(), this.getHeight(),null);\n\t\t\t\tlevel.addLevel();\n\t\t\t\tString chosen= level.getLevel(Level);\n\t\t\t\tlimit= level.getTime(Level);\n\t\t\t\t//\tg.drawRect (50, 50, 100, 100);\n\t\t\t\t//System.out.println(chosen);\n\n\t\t\t\tfor(int i=0;i<chosen.length();i++){\n\t\t\t\t\tchar c = chosen.charAt(i);\n\t\t\t\t\t//System.out.println(c);\n\t\t\t\t\tif(c==' '){\n\t\t\t\t\t\tside+=20;//add up to the x-position \n\t\t\t\t\t}\n\t\t\t\t\telse if(c=='#'){\n\t\t\t\t\t\tside+=20;\n\t\t\t\t\t\tif(number==0)//if it is the first time print out\n\t\t\t\t\t\t\twalls.add(new wall(side,upper));//add to the wall list\n\t\t\t\t\t}\n\t\t\t\t\telse if(c=='$'){\n\t\t\t\t\t\tside+=20;\n\t\t\t\t\t\tif(number==0)\n\t\t\t\t\t\t\tboxes.add(new box(side, upper));\n\n\n\t\t\t\t\t}\n\t\t\t\t\telse if(c=='\\n'){\n\t\t\t\t\t\tside=0;\n\t\t\t\t\t\tupper+=20;\n\t\t\t\t\t}\n\t\t\t\t\telse if (c=='.'){\n\t\t\t\t\t\tside+=20;\n\t\t\t\t\t\tif(number==0)\n\t\t\t\t\t\t\tareas.add(new area(side, upper));//add to the areas list\n\t\t\t\t\t}\n\t\t\t\t\telse if(c=='a'){\n\t\t\t\t\t\tside+=20;\n\t\t\t\t\t\th= new player(side+velX,upper+velY);//change the position of the player\n\t\t\t\t\t\tg.drawRect (h.getX(), h.getY(), 20, 20);\n\t\t\t\t\t\tg.drawImage(h.getP(), h.getX(),h.getY(),20,20, null);//draw the player\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tnumber++;// the number of paint times add\n\t\t\t\tside=40;//reset the initial x position\n\t\t\t\tupper=80;//reset the initial y position\n\t\t\t\t//\t\t\tSystem.out.println(\"here\");\n\t\t\t\tfor(int i=0;i<walls.size();i++){\n\t\t\t\t\t//System.out.println(\"HERE\");\n\t\t\t\t\twall a= walls.get(i);\n\t\t\t\t\t//\t\t\t\tSystem.out.println(\"X: \"+a.getX());\n\t\t\t\t\t//\t\t\t\tSystem.out.println(\"Y: \"+a.getY());\n\t\t\t\t\tg.drawRect (a.getX(), a.getY(), 20, 20);\n\t\t\t\t\t//g.drawRect(30, 30, 100, 100);\n\t\t\t\t\tg.drawImage(a.getP(), a.getX(),a.getY(), 20, 20,null);\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t * This section is used to draw the boxes\n\t\t\t\t */\n\t\t\t\tfor(int i=0;i<boxes.size();i++){\n\t\t\t\t\tbox a= boxes.get(i);\n\t\t\t\t\tg.drawRect (a.getX(), a.getY(), 20, 20);\n\t\t\t\t\tg.drawImage(a.getP(), a.getX(),a.getY(),20,20, null);\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t * This section is used to draw the areas\n\t\t\t\t */\n\t\t\t\tfor(int i=0; i<areas.size();i++){\n\t\t\t\t\tarea a = areas.get(i);\n\t\t\t\t\tg.drawRect (a.getX(), a.getY(), 20, 20);\n\t\t\t\t\tg.drawImage(null, a.getX(),a.getY(),20,20, null);\n\t\t\t\t}\n\t\t\t\t//System.out.println(m.getTime());\n\t\t\t\tg.drawString (\"Steps: \" + steps, 300, 400);\n\t\t\t\tg.drawString (\"Remaining steps: \" + (limit-steps), 300, 420);//show the remaining steps \n\t\t\t}\n\t\t\telse if(losing){//change the screen if you lose\n\t\t\t\tImage background;\n\t\t\t\tURL loc = this.getClass().getResource(\"over.jpg\");\n\t\t\t\tImageIcon o = new ImageIcon(loc);\n\t\t\t\tbackground = o.getImage();\n\t\t\t\tg.drawImage(background,0, 0, this.getWidth(), this.getHeight(),null);\n\t\t\t}\n\t\t\telse if(winning){//change the screen if you win\n \n\t\t\t\tImage background;\n\t\t\t\tURL loc = this.getClass().getResource(\"win.jpg\");\n\t\t\t\tImageIcon o = new ImageIcon(loc);\n\t\t\t\tbackground = o.getImage();\n\t\t\t\tg.drawImage(background,0, 0, this.getWidth(), this.getHeight(),null);\n\t\t\t}\n\n\n\t\t\n\n\n\t\t}",
"protected void paintComponent(Graphics g)\n\t\t{\n\t\t\tsuper.paintComponent(g); \n\t\t\t//drawing the background\n\t\t\tg.drawImage(BackGround, 0, 0, null); \n\t\t\n\t\t\t//if(GameOn == true)\n\t\t\t//{\n\t\t\t//calling the paint function of the game characters\n\t\t\tpl.paint(g);\n\t\t\n\t\t\t\n\t\t\tfor(int i = 0 ; i < EnemyList.size(); i++)\n\t\t\t{\n\t\t\t\tEnemyList.get(i).paint(g);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//drawing the explosions\n\t\t\tg.drawImage(Explosion, enExplosionX, enExplosionY, null); \n\t\t\tg.drawImage(Explosion, plExplosionX, plExplosionY, null); \n\t\t\n\t\t\tfont = new Font(\"LCD\", Font.BOLD, 25);\n\t\t\tg.setFont(font);\n\t\t\t\n\t\t\t//g.drawString(\"Time: \" + formatTime(gameTime),\t\t\t0, 615);\n\t\t g.drawString(\"Rockets Remaining: \" + pl.NumRockets, \t0, 635);\n\t\t g.drawString(\"Bullets Remaining: \" + pl.NumBullets, \t0, 655);\n\t\t g.drawString(\"Enemies Destroyed: \" + DestroyedEnemies, 0, 675);\n\t\t g.drawString(\"Runaway Enemies: \" + RunAwayEnemies, 0, 695); \n\t\t//}\n\t\t \n\t\t\tif(BulletFired = true)\n\t\t {\n\t\t \tfor(int i = 0; i < BulletList.size();i++)\n\t\t \t{\n\t\t \t\tBulletList.get(i).paint(g); \n\t\t \t}\n\t\t }\n\t\t \n\t\t \t\t \n\t\t if(RocketFired = true)\n\t\t {\n\t\t \tfor(int i = 0; i < RocketList.size();i++)\n\t\t \t{\n\t\t \t\tRocketList.get(i).paint(g); \n\t\t \t}\n\t\t }\n\t\t\tif(GameOn == false){\n\t\t \tg.drawImage(GameOver, 200, 0, null);\n\t\t \t//g.drawString(\"Enemies Destroyed: \" + DestroyedEnemies, 250, 10);\n\t\t }\n\t\t else if (WinsState == true )\n\t\t {\n\t\t \tg.drawImage(GameWin, 200, 0, null);\n\t\t \n\t\t }\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t}",
"@Override\n public void render(float delta) {\n // Faire clignoter le texte\n if (frame_count == 0) {\n sign = 1;\n } else if (frame_count == 60) {\n sign = -1;\n }\n frame_count += sign;\n layout.setText(font, \"Appuyez sur une touche pour commencer !\", new Color(1f, 1f, 1f, frame_count / 60f), layout.width, 0, false);\n\n batch.begin();\n // J'affiche le background\n batch.draw(background, 0, 0, background_width, background_height);\n //batch.end();\n\n // J'affiche soit le texte d'accueil, soit les boutons\n if (!triggered) {\n // J'affiche le texte centré\n font.draw(batch, layout, background_width * 0.5f - layout.width * 0.5f, 100);\n batch.end();\n }\n else {\n batch.end();\n // J'affiche la table de boutons\n //stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f));\n stage.draw();\n\n }\n\n }",
"private void displayAbout(JPanel panel) {\n JLabel aboutText1 = new JLabel(), aboutText2 = new JLabel();\n aboutText1.setText(\"<html>\" + \n \"<p> Minesweeper is a puzzle game, where the objective is to clear all mines from a board<br>\" +\n \"of tiles without touching one. Typically playable with one player only, the game presents<br>\" +\n \"with a timer, a counter that determines the number of flags and mines, a button that contains<br>\" +\n \"a smiley face, and a board. Once the user clicks on the board, the game commences and the timer<br>\" +\n \"activates. The user can flag a tile where there may be a mine, but once a tile with a mine has been<br>\" +\n \"detonated, the game is over. The first click is always never a mine, and using flags is not required!<br></p>\"\n + \"</html>\");\n aboutText2.setText(\"<html>\" +\n \"<b>About the Creator</b><br>\" +\n \"<p>  My name is <u>Stephen Hullender</u>.  I am a Computer Science student attending Temple<br>\" +\n \"University. This project was programmed using Java, utilizing several libraries such as<br>\" +\n \"the SWING library, Abstract Window Toolkit, socket programming, and other related libraries.<br>\" +\n \"This project was first brainstormed in May 2021 when I had developed a habit of playing <br>\" +\n \"of Minesweeper to pass the time following an ardenous semester of Zoom University. Production began <br>\" +\n \"shortly after, but was halted until it was completely revamped and improved on July 2021. Since<br>\" +\n \"then, I've developed new skills in understanding how to create Java applications, as well as finding<br>\" +\n \"some knowledge in how to develop games. My goal is to create a simple and fun puzzle game, and to<br>\" +\n \"recreate it with some additional tools such as multiplayer interaction and customizable controls, along<br>\"+\n \"with implementing a database to keep scores, hopefully via SQL. </p>\"\n + \"</html>\");\n\n panel.add(aboutText1);\n panel.add(aboutText2);\n helppanel.add(panel);\n }",
"public void paintComponent(Graphics g) {\n \n super.paintComponent(g); // call superclass's paint method\n\n //this.setBackground(Color.GRAY); \n \n // Iterators & misc. variables\n int i;\n int j;\n char tempchar;\n String tempstring = null;\n \n // Length of the lines\n int rowlinelength = numcols*boxsize;\n int collinelength = numrows*boxsize;\n \n // Draw the row lines\n int yloc;\n for(i = 0;i<numrows+1;i++){\n yloc = i*boxsize;\n g.drawLine(0, yloc, rowlinelength, yloc); \n }\n \n // Draw the column lines\n int xloc;\n for(i = 0;i<numcols+1;i++){\n xloc = i*boxsize;\n g.drawLine(xloc, 0, xloc, collinelength);\n }\n \n // Set the font\n g.setFont(new Font(\"SansSerif\", Font.PLAIN, 24));\n \n // Draw the text\n for(i = 0;i<numrows;i++){\n yloc = (boxsize*i) + (int)Math.floor(boxsize/2); \n for(j = 0;j<numcols;j++){\n xloc = (boxsize*j) + (int)Math.floor(boxsize/2);\n tempchar = chargrid[i][j];\n tempstring = Character.toString(tempchar);\n g.drawString(tempstring, xloc, yloc);\n }\n }\n \n \n }",
"@Override\r\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\r\n\r\n // draw the notes, black and green\r\n for (INote n : no.getNotes()) {\r\n int x = (n.getStartBeat() + 2) * beatWidth;\r\n int y = ((no.highestNote().getNoteNumber() - n.getNoteNumber()) * lineHeight)\r\n + (lineHeight * 2);\r\n\r\n g.setColor(Color.BLACK);\r\n g.fillRect(x, y, beatWidth, lineHeight);\r\n\r\n for (int ii = 1; ii < n.getDuration(); ii++) {\r\n g.setColor(Color.GREEN);\r\n g.fillRect(x + (ii * beatWidth), y, beatWidth, lineHeight);\r\n }\r\n }\r\n\r\n g.setColor(Color.BLACK);\r\n\r\n //draw the row labels and lines\r\n int y1 = (lineHeight * 3) / 2;\r\n int y2 = lineHeight;\r\n\r\n g.drawLine((beatWidth * 2) - 1, (lineHeight * 2) - 1,\r\n (totalBeats + 2) * beatWidth, (lineHeight * 2) - 1);\r\n\r\n for (String row : this.rows()) {\r\n g.drawString(row, 0, y1 + g.getFontMetrics().getHeight());\r\n y1 += lineHeight;\r\n g.drawLine(beatWidth * 2, y2 + lineHeight, (totalBeats + 2) * beatWidth, y2 + lineHeight);\r\n y2 += lineHeight;\r\n g.drawLine(beatWidth * 2, y2 + lineHeight - 1,\r\n (totalBeats + 2) * beatWidth, y2 + lineHeight - 1);\r\n }\r\n g.drawLine((beatWidth * 2) - 1, y2 + lineHeight,\r\n (totalBeats + 2) * beatWidth, y2 + lineHeight);\r\n\r\n //draw the column labels and lines\r\n int x1 = -(beatWidth * 2);\r\n int x2 = -(beatWidth * 2);\r\n\r\n g.drawLine((beatWidth * 2) - 1, lineHeight * 2, (beatWidth * 2) - 1, y2 + lineHeight - 1);\r\n\r\n for (int value : this.columns()) {\r\n g.drawString(Integer.toString(value), x1 + (beatWidth * 4), g.getFontMetrics().getHeight());\r\n x1 += (beatWidth * 4);\r\n g.drawLine(x2 + (beatWidth * 4), lineHeight * 2, x2 + (beatWidth * 4), y2 + lineHeight - 1);\r\n x2 += (beatWidth * 4);\r\n g.drawLine(x2 + (beatWidth * 4) - 1, lineHeight * 2,\r\n x2 + (beatWidth * 4) - 1, y2 + lineHeight - 1);\r\n }\r\n g.drawLine(x2 + (beatWidth * 4), lineHeight, x2 + (beatWidth * 4), y2 + lineHeight - 1);\r\n\r\n // useful numbers or drawing the piano\r\n int leftMargin = (beatWidth * 4) / 5;\r\n int keyWidth = leftMargin / 2;\r\n int pianoY = y2 + lineHeight;\r\n\r\n //draw the gray piano background\r\n g.setColor(Color.LIGHT_GRAY);\r\n g.fillRect(0, pianoY,\r\n (totalBeats + 2) * beatWidth, pianoY + (lineHeight * 15) + leftMargin);\r\n\r\n //draw white piano base\r\n g.setColor(Color.WHITE);\r\n g.fillRect(leftMargin, pianoY, keyWidth * 80, lineHeight * 15);\r\n\r\n //draw white piano keys\r\n g.setColor(Color.BLACK);\r\n for (int ii = leftMargin; ii < leftMargin + (keyWidth * 80); ii += keyWidth) {\r\n g.drawRect(ii, pianoY, keyWidth, lineHeight * 15);\r\n }\r\n\r\n // draw black piano keys\r\n for (int ii = leftMargin; ii < leftMargin + (keyWidth * 80); ii += keyWidth * 8) {\r\n g.fillRect(ii + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + keyWidth + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + (keyWidth * 3) + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + (keyWidth * 4) + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + (keyWidth * 5) + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n }\r\n\r\n // draw line at beat\r\n g.setColor(Color.RED);\r\n g.drawLine((beatWidth * 2) - 1 + (beatWidth * currentBeat), lineHeight * 2,\r\n (beatWidth * 2) - 1 + (beatWidth * currentBeat), y2 + lineHeight - 1);\r\n\r\n }",
"public void display() {\n float dRadial = reactionRadialMax - reactionRadial;\n if(dRadial != 0){\n noStroke();\n reactionRadial += abs(dRadial) * radialEasing;\n fill(255,255,255,150-reactionRadial*(255/reactionRadialMax));\n ellipse(location.x, location.y, reactionRadial, reactionRadial);\n }\n \n // grow text from point of origin\n float dText = textSizeMax - textSize;\n if(dText != 0){\n noStroke();\n textSize += abs(dText) * surfaceEasing;\n textSize(textSize);\n }\n \n // draw agent (point)\n fill(255);\n pushMatrix();\n translate(location.x, location.y);\n float r = 3;\n ellipse(0, 0, r, r);\n popMatrix();\n noFill(); \n \n // draw text \n textSize(txtSize);\n float lifeline = map(leftToLive, 0, lifespan, 25, 255);\n if(mouseOver()){\n stroke(229,28,35);\n fill(229,28,35);\n }\n else {\n stroke(255);\n fill(255);\n }\n \n text(word, location.x, location.y);\n \n // draw connections to neighboars\n gaze();\n }",
"public void drawInstructions(Graphics art)\n\t{\n\t\tart.setColor(Color.green);\n\t\tart.setFont(newFont3);\n\t\tart.drawString(\"The goal of this game is to pop 20 balloons as fast as you can.\", 100, 100);\n\t\tart.drawString(\"A timer will be counting to see how fast you are.\", 150, 200);\n\t\tart.drawString(\"Click on the balloon that matches the color of the ballon in the upper right corner.\",5,300);\n\t\tart.drawString(\"If you click on the right one, your score will go up.\", 100, 400);\n\t\tart.drawString(\"If you click on the wrong one, your score will go down.\", 100, 500);\n\t\tart.drawString(\"Press B to go back\", 300, 600);\n\t\t\n\t}",
"@Override\n protected void drawTask(Graphics g) {\n Graphics2D g2 = (Graphics2D) g;\n\n g2.setStroke(PetriNetUtils.defaultStroke);\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n Rectangle2D outline = new Rectangle2D.Float(getPos().x - (getSize().width / 2),\n getPos().y - (getSize().height / 2)+5, getSize().width-5, getSize().height-5);\n\n // Draw shadow\n Rectangle2D shadow = new Rectangle2D.Float(getPos().x - (getSize().width / 2) + 5,\n getPos().y - (getSize().height / 2), getSize().width-5, getSize().height-5);\n if (subNetOk) { \n g2.setPaint(Color.WHITE);\n } else {\n g2.setPaint(Color.RED);\n }\n g2.fill(shadow); \n g2.setPaint(Color.BLACK);\n g2.draw(shadow);\n\n g2.setPaint(Color.WHITE);\n if (isEnabledHighlight()) {\n g2.setPaint(Color.GREEN);\n }\n g2.fill(outline);\n\n // Render remaining time if > 0\n if (getRemainingTime() > 0) {\n int duration = 1;\n try {\n duration = Integer.parseInt(getProperty(PROP_DURATION));\n if (duration == 0) {\n duration = 1;\n }\n } catch (NumberFormatException e) {\n }\n ;\n g2.setPaint(Color.GREEN);\n int barHeight = (int) ((double) getSize().height * ((double) getRemainingTime() / (double) duration));\n Rectangle2D bar = new Rectangle2D.Float(getPos().x - (getSize().width / 2),\n (getPos().y - (getSize().height / 2)) + (getSize().height - barHeight),\n getSize().width, barHeight);\n g2.fill(bar);\n }\n\n // Render instance count if > 0\n if (getInstanceCount() > 0) {\n g2.setPaint(Color.GRAY);\n g2.setFont(new Font(\"Arial Narrow\", Font.BOLD, 12));\n g2.drawString(\"\" + getInstanceCount(),\n getPos().x - ((getSize().width / 2) - 3),\n getPos().y - ((getSize().height / 2) - 12));\n }\n\n g2.setPaint(Color.BLACK);\n g2.draw(outline);\n\n // Set font\n g2.setFont(new Font(\"Arial Narrow\", Font.BOLD, 12));\n\n // Draw text\n if (getText() != null) {\n PetriNetUtils.drawText(g2, getPos().x, getPos().y + (getSize().height / 2),\n 70, getText(), PetriNetUtils.Orientation.TOP);\n }\n\n String metaData = \"\";\n\n // Show cost (if applicable)\n if (getProperty(PROP_COST).length() > 0) {\n metaData += getProperty(PROP_COST) + \"€\";\n }\n\n // Show duration (if applicable)\n if (getProperty(PROP_DURATION).length() > 0) {\n metaData += \" \" + getProperty(PROP_DURATION) + \"s\";\n }\n\n PetriNetUtils.drawText(g2, getPos().x, getPos().y + (getSize().height / 2) + 12,\n 70, metaData, PetriNetUtils.Orientation.TOP);\n\n // Show probability (if applicable)\n if (getProperty(PROP_PROBABILITY).length() > 0) {\n // Don't show 100% probability!\n if (!getProperty(PROP_PROBABILITY).equals(\"100\")) {\n PetriNetUtils.drawText(g2, getPos().x, getPos().y, getSize().width,\n getProperty(PROP_PROBABILITY) + \"%\", PetriNetUtils.Orientation.CENTER);\n }\n }\n }",
"private void draw() {\n\t\tgsm.draw(g);\n\t\tg.setColor(Color.WHITE);\n\t\tif (fps < 25)\n\t\t\tg.setColor(Color.RED);\n\t\tg.drawString(\"FPS: \" + fps, 10, 15);\n\t}",
"@Override\n\tpublic void draw(Graphics g, JPanel panel) {\n\t\t\n\t}",
"private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}",
"@Override\r\n public void draw() {\n }",
"private void paintStats(Graphics g) {\n\t\tg.setColor(Color.GRAY);\n\t\tg.fillRect(DIMENSIONS_SIZE, 0, DIMENSIONS_SIZE + 150, DIMENSIONS_SIZE);\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tFont textFont = new Font(\"Times New Roman\", Font.PLAIN, 20);\n\t\tg.setFont(textFont);\n\t\tg.drawString(\"Games Won: \" + playerWins, DIMENSIONS_SIZE + 10, DIMENSIONS_SIZE/3);\n\t\tg.drawString(\"Games Tied: \" + tieGames, DIMENSIONS_SIZE + 10, DIMENSIONS_SIZE/2);\n\t\tg.drawString(\"Games Lost: \" + aiWins, DIMENSIONS_SIZE + 10, 2*DIMENSIONS_SIZE/3);\n\t}",
"@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\n\t\tint length = cont.getLength();\n\t\tint start = cont.getStart();\n\t\tint stop = cont.getStop();\n\n\t\tg.drawString(String.valueOf(length)+\"bp\",(int)(this.getSize().getWidth()/2),15); // tekend de lengte in baseparen in het midden van de panel\n\t\tg.fillRect(5,40,(int)(this.getSize().getWidth()-10),5);\n\n\t\tint stepSize = calculateStepSize(length);\n\t\tint first = (start - (start % stepSize)) + stepSize - 1;\t// de waarde van first is gelijk aan de positie in de sequentie van de\n\t\t// eerste nucleotide waarboven de eerste ruler lijn getekend word\n\n\t\tfor (int j = first; j < stop; j+= stepSize){\n\n\n\t\t\tint pos = (int) DrawingTools.calculateLetterPosition(this.getWidth(), length,Double.valueOf(j-start)); //schaald de posities in sequentie naar de breedte van de panel\n\t\t\tg.drawLine(pos,40,pos,30);\t\t\t\t\t\t\t\t// draws line on the ruler\n\t\t\tg.drawString(String.valueOf(j + 1) , pos, 30);\t\t// draws the nucleotide position(in sequence) above the line\n\n\t\t}\n\n\t\tint alpha = 127; // 50% transparent/\n\t\tColor myColour = new Color(255, 0, 0, alpha);\n\t\tg.setColor(myColour);\n\n\t\tif (x < x2){\n\t\t\tg.fillRect(x,0,x2-x,getHeight()); //selectie rechthoek\n\t\t}\n\t\telse{\n\t\t\tg.fillRect(x2,0,x-x2,getHeight()); //inverse rechthoek.\n\t\t}\n\t}",
"void buildLayout(){\n\t\tsetText(\"Score: \" + GameModel.instance().getPoints());\n\t\tsetX(10);\n\t\tsetY(10);\n\t\tsetFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n\t\t\n\t}",
"@Override\n public void draw()\n {\n }",
"@Override\n\tpublic void draw() {\n\t\t\n\t}",
"@Override\n\tpublic void draw() {\n\t\t\n\t}",
"@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }",
"@Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n Graphics2D g2d = (Graphics2D) g;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n // ab hier kann man zeichen\n g.setColor(new Color(250, 230, 204));\n g.fillRect(0, 0, 1050, 1050);\n g.setColor(Color.BLACK);\n \n //Vertical\n g.drawLine(175, 50, 175, 950);\n g.drawLine(325, 50, 325, 950);\n g.drawLine(475, 50, 475, 950);\n g.drawLine(625, 50, 625, 950);\n g.drawLine(775, 50, 775, 950);\n g.drawLine(925, 50, 925, 950);\n //Horizontal\n g.drawLine(175, 50, 925, 50);\n g.drawLine(175, 200, 925, 200);\n g.drawLine(175, 350, 925, 350);\n g.drawLine(175, 500, 925, 500);\n g.drawLine(175, 650, 925, 650);\n g.drawLine(175, 800, 925, 800);\n g.drawLine(175, 950, 925, 950);\n\n // Spieler Anzeigen\n g.setColor(Color.BLACK);\n if (GUI.player == 0) {\n g.drawString(\"Player X\", 25, 50);\n } else if (GUI.player == 1) {\n g.drawString(\"Player 0\", 25, 50);\n }\n //draw gewinner\n if (GUI.gewinner == 1) {\n g.drawString(\"Gewinne: X\", 25, 100);\n } else if (GUI.gewinner == 2) {\n g.drawString(\"Gewinne: 0\", 25, 100);\n }\n //Reihe 1\n if (GUI.state[0] == 1) {\n g.drawImage(ImagerLoader.imgX, 175, 50, 150, 150, null);\n } else if (GUI.state[0] == 2) {\n g.drawImage(ImagerLoader.imgO, 175, 50, 150, 150, null);\n }\n if (GUI.state[1] == 1) {\n g.drawImage(ImagerLoader.imgX, 325, 50, 150, 150, null);\n } else if (GUI.state[1] == 2) {\n g.drawImage(ImagerLoader.imgO, 325, 50, 150, 150, null);\n }\n if (GUI.state[2] == 1) {\n g.drawImage(ImagerLoader.imgX, 475, 50, 150, 150, null);\n } else if (GUI.state[2] == 2) {\n g.drawImage(ImagerLoader.imgO, 475, 50, 150, 150, null);\n }\n if (GUI.state[3] == 1) {\n g.drawImage(ImagerLoader.imgX, 625, 50, 150, 150, null);\n } else if (GUI.state[3] == 2) {\n g.drawImage(ImagerLoader.imgO, 625, 50, 150, 150, null);\n }\n if (GUI.state[4] == 1) {\n g.drawImage(ImagerLoader.imgX, 775, 50, 150, 150, null);\n } else if (GUI.state[4] == 2) {\n g.drawImage(ImagerLoader.imgO, 775, 50, 150, 150, null);\n }\n\n //Reihe 2\n if (GUI.state[5] == 1) {\n g.drawImage(ImagerLoader.imgX, 175, 200, 150, 150, null);\n } else if (GUI.state[5] == 2) {\n g.drawImage(ImagerLoader.imgO, 175, 200, 150, 150, null);\n }\n if (GUI.state[6] == 1) {\n g.drawImage(ImagerLoader.imgX, 325, 200, 150, 150, null);\n } else if (GUI.state[6] == 2) {\n g.drawImage(ImagerLoader.imgO, 325, 200, 150, 150, null);\n }\n if (GUI.state[7] == 1) {\n g.drawImage(ImagerLoader.imgX, 475, 200, 150, 150, null);\n } else if (GUI.state[7] == 2) {\n g.drawImage(ImagerLoader.imgO, 475, 200, 150, 150, null);\n }\n if (GUI.state[8] == 1) {\n g.drawImage(ImagerLoader.imgX, 625, 200, 150, 150, null);\n } else if (GUI.state[8] == 2) {\n g.drawImage(ImagerLoader.imgO, 625, 200, 150, 150, null);\n }\n if (GUI.state[9] == 1) {\n g.drawImage(ImagerLoader.imgX, 775, 200, 150, 150, null);\n } else if (GUI.state[9] == 2) {\n g.drawImage(ImagerLoader.imgO, 775, 200, 150, 150, null);\n }\n\n //Reihe 3\n if (GUI.state[10] == 1) {\n g.drawImage(ImagerLoader.imgX, 175, 350, 150, 150, null);\n } else if (GUI.state[10] == 2) {\n g.drawImage(ImagerLoader.imgO, 175, 350, 150, 150, null);\n }\n if (GUI.state[11] == 1) {\n g.drawImage(ImagerLoader.imgX, 325, 350, 150, 150, null);\n } else if (GUI.state[11] == 2) {\n g.drawImage(ImagerLoader.imgO, 325, 350, 150, 150, null);\n }\n if (GUI.state[12] == 1) {\n g.drawImage(ImagerLoader.imgX, 475, 350, 150, 150, null);\n } else if (GUI.state[12] == 2) {\n g.drawImage(ImagerLoader.imgO, 475, 350, 150, 150, null);\n }\n if (GUI.state[13] == 1) {\n g.drawImage(ImagerLoader.imgX, 625, 350, 150, 150, null);\n } else if (GUI.state[13] == 2) {\n g.drawImage(ImagerLoader.imgO, 625, 350, 150, 150, null);\n }\n if (GUI.state[14] == 1) {\n g.drawImage(ImagerLoader.imgX, 775, 350, 150, 150, null);\n } else if (GUI.state[14] == 2) {\n g.drawImage(ImagerLoader.imgO, 775, 350, 150, 150, null);\n }\n\n //Reihe 4\n if (GUI.state[15] == 1) {\n g.drawImage(ImagerLoader.imgX, 175, 500, 150, 150, null);\n } else if (GUI.state[15] == 2) {\n g.drawImage(ImagerLoader.imgO, 175, 500, 150, 150, null);\n }\n if (GUI.state[16] == 1) {\n g.drawImage(ImagerLoader.imgX, 325, 500, 150, 150, null);\n } else if (GUI.state[16] == 2) {\n g.drawImage(ImagerLoader.imgO, 325, 500, 150, 150, null);\n }\n if (GUI.state[17] == 1) {\n g.drawImage(ImagerLoader.imgX, 475, 500, 150, 150, null);\n } else if (GUI.state[17] == 2) {\n g.drawImage(ImagerLoader.imgO, 475, 500, 150, 150, null);\n }\n if (GUI.state[18] == 1) {\n g.drawImage(ImagerLoader.imgX, 625, 500, 150, 150, null);\n } else if (GUI.state[18] == 2) {\n g.drawImage(ImagerLoader.imgO, 625, 500, 150, 150, null);\n }\n if (GUI.state[19] == 1) {\n g.drawImage(ImagerLoader.imgX, 775, 500, 150, 150, null);\n } else if (GUI.state[19] == 2) {\n g.drawImage(ImagerLoader.imgO, 775, 500, 150, 150, null);\n }\n\n //Reihe 5\n if (GUI.state[20] == 1) {\n g.drawImage(ImagerLoader.imgX, 175, 650, 150, 150, null);\n } else if (GUI.state[20] == 2) {\n g.drawImage(ImagerLoader.imgO, 175, 650, 150, 150, null);\n }\n if (GUI.state[21] == 1) {\n g.drawImage(ImagerLoader.imgX, 325, 650, 150, 150, null);\n } else if (GUI.state[21] == 2) {\n g.drawImage(ImagerLoader.imgO, 325, 650, 150, 150, null);\n }\n if (GUI.state[22] == 1) {\n g.drawImage(ImagerLoader.imgX, 475, 650, 150, 150, null);\n } else if (GUI.state[22] == 2) {\n g.drawImage(ImagerLoader.imgO, 475, 650, 150, 150, null);\n }\n if (GUI.state[23] == 1) {\n g.drawImage(ImagerLoader.imgX, 625, 650, 150, 150, null);\n } else if (GUI.state[23] == 2) {\n g.drawImage(ImagerLoader.imgO, 625, 650, 150, 150, null);\n }\n if (GUI.state[24] == 1) {\n g.drawImage(ImagerLoader.imgX, 775, 650, 150, 150, null);\n } else if (GUI.state[24] == 2) {\n g.drawImage(ImagerLoader.imgO, 775, 650, 150, 150, null);\n }\n //Reihe 6\n if (GUI.state[25] == 1) {\n g.drawImage(ImagerLoader.imgX, 175, 800, 150, 150, null);\n } else if (GUI.state[25] == 2) {\n g.drawImage(ImagerLoader.imgO, 175, 800, 150, 150, null);\n }\n if (GUI.state[26] == 1) {\n g.drawImage(ImagerLoader.imgX, 325, 800, 150, 150, null);\n } else if (GUI.state[26] == 2) {\n g.drawImage(ImagerLoader.imgO, 325, 800, 150, 150, null);\n }\n if (GUI.state[27] == 1) {\n g.drawImage(ImagerLoader.imgX, 475, 800, 150, 150, null);\n } else if (GUI.state[27] == 2) {\n g.drawImage(ImagerLoader.imgO, 475, 800, 150, 150, null);\n }\n if (GUI.state[28] == 1) {\n g.drawImage(ImagerLoader.imgX, 625, 800, 150, 150, null);\n } else if (GUI.state[28] == 2) {\n g.drawImage(ImagerLoader.imgO, 625, 800, 150, 150, null);\n }\n if (GUI.state[29] == 1) {\n g.drawImage(ImagerLoader.imgX, 775, 800, 150, 150, null);\n } else if (GUI.state[29] == 2) {\n g.drawImage(ImagerLoader.imgO, 775, 800, 150, 150, null);\n }\n repaint();\n }",
"@Override\n\tpublic void render(Canvas c) {\n\t\tc.drawText(text,(float)x+width,(float)y+height , paint);\n\t\t\n\t}",
"@Override\n public void paint(Graphics g) {\n g.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 200));\n\n g.setColor(Color.cyan);\n String GameName = \"BALLAND BAR\";\n int x_pos = 150;\n int y_pos = 300;\n int alpha = 8;\n for (int i = 0; i < GameName.length(); i++) {\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n\n g.setColor(Color.orange);\n GameName = \"GAME\";\n x_pos = 700;\n y_pos = 550;\n for (int i = 0; i < GameName.length(); i++) {\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n /*\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"G\", 650, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"A\", 800, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"M\", 950, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"E\", 1150, 300);\n\n g.setColor(Color.cyan);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"N\", 650, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"A\", 800, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"M\", 950, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"E\", 1150, 500);\n */\n }",
"public void draw() {\n \n // TODO\n }",
"public void paint(Graphics g)\r\n {\r\n \r\n super.paint(g);\r\n g.drawImage(backgroundImage, 0, 0, null); //Draws Background image in background of panel\r\n \r\n if(mode == 0)\r\n {\r\n g.setColor(Color.magenta); \r\n g.setFont(new Font(\"Copperplate Gothic Bold\", Font.BOLD, 50));\r\n g.drawString(\"Yeet Fighter\",37,300); //Draws Title in magenta in font specified\r\n \r\n \r\n g.setColor(Color.gray);\r\n g.setFont(new Font(\"Impact\", Font.ITALIC, 20));\r\n g.drawString(\"Press any key to start\",700,550); //Draws prompt to start specification in gray in font specified\r\n }\r\n else if(mode == 1)\r\n {\r\n\r\n g.setColor(Color.white);\r\n g.fillRect(0,yMin, 1000, 10); //rectangle platform is drawn\r\n Color healthbar1 = new Color(255-(int)((dFs[0].getHealth()/totalH) * 255),(int)((dFs[0].getHealth()/totalH) * 255),0);\r\n g.setColor(healthbar1); \r\n g.fillRect(10,10,(int)((dFs[0].getHealth()/totalH) * 465),10); // health bar is drawn with color in spectrum of red through green based on red fighter health\r\n Color healthbar2 = new Color(255-(int)((dFs[1].getHealth()/totalH) * 255),(int)((dFs[1].getHealth()/totalH) * 255),0);\r\n g.setColor(healthbar2);\r\n g.fillRect(480+(465-(int)((dFs[1].getHealth()/totalH) * 465)),10,(int)((dFs[1].getHealth()/totalH) * 465),10); \r\n // health bar is drawn with color in spectrum of red through green based on red fighter health with x coordinates so that health bar moves away from center\r\n\r\n g.setColor(Color.red);\r\n \r\n \r\n if(dFs[0].getAttacking() == 2)\r\n {\r\n g.setColor(new Color(150, 0, 0)); //the fighter is drawn darker if they are in cooldown\r\n }else\r\n {\r\n g.setColor(new Color(255, 0, 0));\r\n }\r\n\r\n g.fillRect((int)dFs[0].getPos()[0],(int)dFs[0].getPos()[1],dFs[0].getSize(),dFs[0].getSize()); //red fighter is drawn\r\n //sets color of fighter to darker color if attack is in cooldown method else in norml state\r\n\r\n if(dFs[0].getAttacking() == 1)\r\n {\r\n g.setColor(Color.red);\r\n \r\n int[] i = new int[4];\r\n i = attackHitBox(dFs[0]);\r\n\r\n g.fillRect(i[0],i[1],i[2],i[3]); //draws the attack onto the screen\r\n }\r\n\r\n if(dFs[0].getBlocking() != 0)\r\n {\r\n if(dFs[0].getBlocking() == 1)\r\n {\r\n g.setColor(new Color(255, 255, 255)); //draws a white box if blocking\r\n }else\r\n {\r\n g.setColor(new Color(150, 150, 150)); //draws a gray box if in cooldown\r\n }\r\n g.fillRect((int) (dFs[0].getPos()[0] + 10) ,(int) (dFs[0].getPos()[1] + 10), dFs[0].getSize() -20 , dFs[0].getSize() - 20); \r\n //draws square used to indicate blocking on fighter that is blocking and in color based on whether block is in active state\r\n }\r\n\r\n\r\n if(dFs[1].getAttacking() == 2)\r\n {\r\n g.setColor(new Color(0, 150, 150));\r\n }else\r\n {\r\n g.setColor(new Color(0, 255, 255));\r\n }\r\n\r\n g.fillRect((int)dFs[1].getPos()[0],(int)dFs[1].getPos()[1],dFs[1].getSize(),dFs[1].getSize()); //blue fighter is drawn\r\n //sets color of fighter to darker color if attack is in cooldown method else in norml state\r\n\r\n if(dFs[1].getAttacking() == 1)\r\n {\r\n g.setColor(new Color(0, 255, 255));\r\n \r\n int[] i = new int[4];\r\n i = attackHitBox(dFs[1]);\r\n\r\n g.fillRect(i[0],i[1],i[2],i[3]);\r\n }\r\n\r\n if(dFs[1].getBlocking() != 0)\r\n {\r\n if(dFs[1].getBlocking() == 1)\r\n {\r\n g.setColor(new Color(255, 255, 255));\r\n }else\r\n {\r\n g.setColor(new Color(150, 150, 150));\r\n }\r\n g.fillRect((int) (dFs[1].getPos()[0] + 10) ,(int) (dFs[1].getPos()[1] + 10), dFs[1].getSize() -20 , dFs[1].getSize() - 20);\r\n //draws square used to indicate blocking on fighter that is blocking and in color based on whether block is in active state\r\n }\r\n\r\n\r\n\r\n\r\n }else if(mode == 2)\r\n {\r\n \r\n g.setFont(new Font(\"Agency FB\", Font.BOLD, 30)); \r\n g.setColor(Color.white);\r\n g.drawString(\"Developed By Joseph Rother & Akshan Sameullah\",200,570); //draws author label with color white and specified font\r\n \r\n if(dFs[0].getHealth() > 0)\r\n {\r\n g.setFont(new Font(\"Agency FB\", Font.BOLD, 190));\r\n g.setColor(Color.red);\r\n g.drawString(\"Red\",500,200);\r\n g.drawString(\"Wins\",500,400); //Draws Red Wins in specified font and in red if Red wins\r\n \r\n \r\n }else\r\n {\r\n \r\n \r\n g.setColor(Color.cyan);\r\n g.setFont(new Font(\"Agency FB\", Font.BOLD, 190));\r\n g.drawString(\"Blue\",500,200);\r\n g.drawString(\"Wins\",500,400); //Draws Blue Wins in specified font if red health is 0\r\n \r\n \r\n }\r\n Graphics2D g2 = (Graphics2D) g;\r\n AffineTransform at = new AffineTransform();\r\n at.setToRotation(Math.toRadians(270), 440, 380);\r\n g2.setTransform(at);\r\n g2.setColor(Color.magenta);\r\n g2.setFont(new Font(\"Magneto\", Font.BOLD, 170));\r\n g2.drawString(\"Game\",250,80);\r\n g2.drawString(\"Over\",300,250); //draws game over in vertical position in font specified and in pink (same color as title)\r\n }\r\n \r\n g.dispose();\r\n }",
"@Override\n protected void paintForeground(Graphics2D g) {\n g.setColor(Color.MAGENTA);\n g.setFont(new Font(\"Calibri\", Font.BOLD,20));\n g.drawString(\"Villain Carnage\",5,30);\n g.setFont(new Font(\"Calibri\", Font.BOLD, 15));\n g.drawString((\"Level 1\"),20,60);\n \n \n \n //g.drawImage(ballIcon, 2,2, this);\n \n g.drawString(\"Ball Count :\" + villain.getBallCount(), 20,120 );\n \n //g.drawImage(heartIcon, 20,40, this);\n g.drawString(\"Lives left : \" + villain.getLives(),20,150);\n \n // Sets all the appropriate GUI components for this level, including ball count and \n // lives count which will be incremented/decremented as the player collides with it's\n // respective object\n \n }",
"public void paintComponent (Graphics g){\r\n\t\tsuper.paintComponent(g);\r\n\t\t//MAIN MENU SCREEN (RULES)\r\n\t\tif (screen == 0) {\r\n\t\t\tg.clearRect (0, 0, this.getWidth (), this.getHeight ());\r\n\t\t\tg.setColor((Color.BLACK));\r\n\t\t\tg.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n\t\t\tg.drawImage(rulesImage, 185, 10, this);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"A game of memory skill!\",150,245);\r\n\t\t\tg.setFont (ARIAL_TEXT);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"The game will show you a colour pattern.\", 160, 270);\r\n\t\t\tg.drawString(\"Remember which colours were lit up. Once the \", 140, 300); \r\n\t\t\tg.drawString(\"pattern is finished, repeat it to pass to the next level.\", 130, 330);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"PLAY\", 250, 390);\t\r\n\t\t}\r\n\t\t//ORIGINAL COLOURS\r\n\t\telse if (screen == 1){\r\n\t\t\t//Draws Game Titles (Text)\r\n\t\t\tg.drawImage (logoImage, 5, 30, this);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n//\t\t\tg.setColor(Color.WHITE);\r\n//\t\t\tString scoreTitle = \"Score: \" + score;\r\n//\t\t\tString highestTitle = \"Highest: \" + highest;\r\n//\t\t\tg.drawString(scoreTitle, 420, 50);\r\n//\t\t\tg.drawString(highestTitle, 420, 80);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"Press to Start\", 12, 100);\r\n\t\t\t\r\n\t\t\t//Draws Colours \r\n\t\t\tg.setColor(REDFADE);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t\tg.setColor(GREENFADE);\r\n\t\t\tg.fillArc(150, 100, 300, 300, 90, 90);\r\n\t\t\tg.setColor(YELLOWFADE);\r\n\t\t\tg.fillArc(150, 110, 300, 300, 180, 90);\r\n\t\t\tg.setColor(BLUEFADE);\r\n\t\t\tg.fillArc(160, 110, 300, 300, 270, 90);\r\n\t\t}\r\n\t\t//MONOCHROMATIC COLOURS\r\n\t\telse if (screen == 2){\r\n\t\t\t//Draws Game Titles (Text)\r\n\t\t\tg.drawImage (logoImage, 5, 30, this);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n//\t\t\tg.setColor(Color.WHITE);\r\n//\t\t\tString scoreTitle = \"Score: \" + score;\r\n//\t\t\tString highestTitle = \"Highest: \" + highest;\r\n//\t\t\tg.drawString(scoreTitle, 420, 50);\r\n//\t\t\tg.drawString(highestTitle, 420, 80);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"Press to Start\", 12, 100);\r\n\t\t\t\r\n\t\t\t//Draws Colours\r\n\t\t\tg.setColor(PURPLE_1);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t\tg.setColor(PURPLE_2);\r\n\t\t\tg.fillArc(150, 100, 300, 300, 90, 90);\r\n\t\t\tg.setColor(PURPLE_3);\r\n\t\t\tg.fillArc(150, 110, 300, 300, 180, 90);\r\n\t\t\tg.setColor(PURPLE_4);\r\n\t\t\tg.fillArc(160, 110, 300, 300, 270, 90);\r\n\t\t}\r\n\t\t//TROPICAL COLOURS\r\n\t\telse if (screen == 3){\r\n\t\t\t//Draws Game Titles (Text)\r\n\t\t\tg.drawImage (logoImage, 5, 30, this);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n//\t\t\tg.setColor(Color.WHITE);\r\n//\t\t\tString scoreTitle = \"Score: \" + score;\r\n//\t\t\tString highestTitle = \"Highest: \" + highest;\r\n//\t\t\tg.drawString(scoreTitle, 420, 50);\r\n//\t\t\tg.drawString(highestTitle, 420, 80);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"Press to Start\", 12, 100);\r\n\t\t\t\r\n\t\t\t//Draws Colours\r\n\t\t\tg.setColor(PINK_TROP);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t\tg.setColor(GREEN_TROP);\r\n\t\t\tg.fillArc(150, 100, 300, 300, 90, 90);\r\n\t\t\tg.setColor(ORANGE_TROP);\r\n\t\t\tg.fillArc(150, 110, 300, 300, 180, 90);\r\n\t\t\tg.setColor(BLUE_TROP);\r\n\t\t\tg.fillArc(160, 110, 300, 300, 270, 90);\r\n\t\t}\r\n\t\t//GAME OVER\r\n\t\telse if (screen == 4){\r\n\t\t\tg.drawImage (gameoverImage, 40, 50, this);\r\n\t\t\tg.setFont(ARIAL_BOLD);\r\n\t\t\tg.setColor(Color.YELLOW);\r\n\t\t\tg.drawString(\"BETTER LUCK NEXT TIME\", 135, 270);\r\n\t\t\tString scoreTitle = \"Your Score: \" + score;\r\n\t\t\tString highestTitle = \"Highest Score: \" + highest;\r\n\t\t\tg.drawString(scoreTitle, 200, 300);\r\n\t\t\tg.drawString(highestTitle, 180, 330);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"PLAY\", 250, 390);\r\n\t\t}\r\n\t\t//YOU WIN\r\n\t\telse if (screen == 5){\r\n\t\t\tg.drawImage (winnerImage, 0, 0, this);\r\n\t\t\tg.setFont(ARIAL_BOLD);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tString scoreTitle = \"Your Score: \" + score;\r\n\t\t\tString highestTitle = \"Highest Score: \" + highest;\r\n\t\t\tg.drawString(scoreTitle, 205, 330);\r\n\t\t\tg.drawString(highestTitle, 185, 360);\r\n\t\t\tg.drawString(\"PLAY\", 250, 390);\r\n\t\t}\r\n\r\n\t}",
"void RenderString(GameContainer gameContainer, Graphics graphics)\r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void draw() {\n\t}",
"@Override\n public void paintComponent(Graphics g) {\n // always clear the screen first!\n g.clearRect(0, 0, WIDTH, HEIGHT);\n\n // GAME DRAWING GOES HERE\n \n \n // draw the blocks\n g.setColor(Color.black);\n for(int i = 0; i < blocks.length; i++){\n g.fillRect(blocks[i].x, blocks[i].y, blocks[i].width, blocks[i].height);\n }\n \n // middle ref (no longer needed)\n //g.setColor(Color.black);\n //g.drawRect(WIDTH/2 - 1, 0, 1, HEIGHT);\n \n // scores\n g.setFont(biggerFont);\n g.setColor(Color.blue);\n g.drawString(\"\" + tobyScore, WIDTH/2-100, 75);\n if(tobyWin){\n g.drawString(\"Toby Wins!\", WIDTH/2-115, 120);\n }\n g.setColor(Color.red);\n if(maxWin){\n g.drawString(\"Max Wins!\", WIDTH/2-115, 120);\n }\n g.drawString(\"\" + maxScore, WIDTH/2+100, 75);\n g.setColor(Color.white);\n g.setFont(titleFont);\n g.drawString(\"Toby N' Max: Capture the Flag!\", 25, 20);\n \n // draw the player\n g.setColor(Color.red);\n g.fillRect(max.x, max.y, max.width, max.height);\n g.setColor(Color.blue);\n g.fillRect(toby.x, toby.y, toby.width, toby.height);\n \n // draw the flag\n g.setColor(brown);\n for(int i = 0; i < flagPole.length; i++){\n g.fillRect(flagPole[i].x, flagPole[i].y, flagPole[i].width, flagPole[i].height);\n }\n \n g.setColor(purple);\n for(int i = 0; i < flag.length; i++){\n g.fillRect(flag[i].x, flag[i].y, flag[i].width, flag[i].height);\n }\n \n g.setColor(Color.white);\n for(int i = 0; i < flagLogo.length; i++){\n g.fillRect(flagLogo[i].x, flagLogo[i].y, flagLogo[i].width, flagLogo[i].height);\n }\n \n //g.setColor(Color.gray);\n // for(int i = 0; i < bombs.length; i++){\n // g.fillRect(bombs[i].x, bombs[i].y, bombs[i].width, bombs[i].height); \n //}\n \n \n // GAME DRAWING ENDS HERE\n }",
"private void render() {\n if (game.isEnded()) {\n if (endGui == null) {\n drawEndScreen();\n }\n\n return;\n }\n\n drawScore();\n drawSnake();\n drawFood();\n }",
"public void draw() {\n\t\tsuper.repaint();\n\t}",
"@Override\n public void render(Painter g) {\n g.setColor(Color.rgb(53, 156, 253));\n g.fillRect(0, 0, GameMainActivity.GAME_WIDTH, GameMainActivity.GAME_HEIGHT);\n g.setColor(Color.WHITE);\n g.setFont(Typeface.DEFAULT_BOLD, 50);\n g.drawString(\"The ALL-Time High Score\", 120, 175);\n g.setFont(Typeface.DEFAULT_BOLD, 70);\n g.drawString(\"\"+LoadPlayState.getEXP(), 370, 260);\n g.setFont(Typeface.DEFAULT_BOLD, 50);\n g.drawString(\"Touch the screen\", 220, 350);\n }",
"@Override\n public void draw() {\n }",
"@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}",
"@Override\n\tpublic void draw() {\n\n\t}",
"@Override\n\tpublic void draw() {\n\n\t}",
"public void draw() {\n //Grey background, which removes the tails of the moving elements\n background(0, 0, 0);\n //Running the update function in the environment class, updating the positions of stuff in environment\n //update function is a collection of the methods needing to be updated\n if(stateOfProgram == 0) { startTheProgram.update(); }\n if(stateOfProgram == 1) {\n theEnvironment.update();\n //update function is a collection of the methods needing to be updated\n //Running the update function in the Population class, updating the positions and states of the rabbits.\n entitiesOfRabbits.update();\n entitiesOfGrass.update();\n entitiesOfFoxes.update();\n\n entitiesOfRabbits.display();\n entitiesOfGrass.display();\n entitiesOfFoxes.display();\n openGraph.update();\n }\n }",
"@Override\n public void paint(Graphics g) {\n super.paint(g);\n\n // update the text area lenght\n updateTextAreaLenght();\n\n // update tha number of bars\n updateBars();\n \n // draw internal borders\n drawBorders(g);\n\n // draw the text area\n drawTextArea(g);\n\n // draw the content area\n drawContentArea(g);\n\n // draw bars\n drawBars(g);\n\n }",
"public void update(){\n infoBar = new GreenfootImage (960, 50);\n infoBar.setFont(textFont);\n infoBar.setColor(textColor);\n String output = (\"Trees: \" + numTrees + \" Bushes: \" + numBushes + \" Prey: \" + numPrey + \" Predators: \" + numPredators);\n\n //centres the output on the bar.\n int centre = (960/2) - ((output.length() * 14)/2);\n\n infoBar.drawString(output, centre, 22); //draw the bar.\n this.setImage(infoBar);\n }",
"void game_text_setup() {\n // Game screen\n score_text = new Text(\"Score: \" + score);\n score_text.setFont(Font.font (\"Arial\", 20));\n score_text.setFill(Color.WHITE);\n score_text.setTranslateX(Dimensions.SCORE_X);\n score_text.setTranslateY(Dimensions.TEXT_Y);\n game_pane.getChildren().add(score_text);\n\n lives_text = new Text(\"Lives: \" + lives);\n lives_text.setFont(Font.font (\"Arial\", 20));\n lives_text.setFill(Color.WHITE);\n lives_text.setTranslateX(Dimensions.LIVES_X);\n lives_text.setTranslateY(Dimensions.TEXT_Y);\n game_pane.getChildren().add(lives_text);\n\n level_text = new Text(\"Level: \" + level);\n level_text.setFont(Font.font (\"Arial\", 20));\n level_text.setFill(Color.WHITE);\n level_text.setTranslateX(Dimensions.LEVEL_X);\n level_text.setTranslateY(Dimensions.TEXT_Y);\n game_pane.getChildren().add(level_text);\n\n Line line = new Line(0.0, Dimensions.LINE_Y,\n scene_width, Dimensions.LINE_Y);\n line.setStroke(Color.WHITE);\n game_pane.getChildren().add(line);\n\n // End game\n end_game_polygon.getPoints().addAll(Dimensions.END_GAME_RECT_COORDS);\n end_game_polygon.setTranslateX(Dimensions.END_GAME_RECT_X);\n end_game_polygon.setTranslateY(Dimensions.END_GAME_RECT_Y);\n end_game_polygon.setStroke(Color.WHITE);\n end_game_polygon.setFill(Color.BLACK);\n\n end_game_text = new Text(\"\"); // Later set as You win! or Game over!\n end_game_text.setFont(Font.font (\"Verdana\", 50));\n\n end_game_info_text = new Text(\"\"); // Later set as score + restart/quit text\n end_game_info_text.setFont(Font.font (\"Arial\", 30));\n end_game_info_text.setFill(Color.WHITE);\n end_game_info_text.setTextAlignment(TextAlignment.CENTER);\n }",
"public void display()\n\t{\n\t\tfor(Character characher : characterAdded)\n\t\t{\t\n\t\t\tif(!characher.getIsDragging())\n\t\t\t{ \n\t\t\t\t//when dragging, the mouse has the exclusive right of control\n\t\t\t\tcharacher.x = (float)(circleX + Math.cos(Math.PI * 2 * characher.net_index/net_num) * radius);\n\t\t\t\tcharacher.y = (float)(circleY + Math.sin(Math.PI * 2 * characher.net_index/net_num) * radius);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint lineWeight = 0;\n\t\t//draw the line between the characters on the circle\n\t\tif(characterAdded.size() > 0)\n\t\t{\n\t\t\tfor(Character characher : characterAdded)\n\t\t\t{\n\t\t\t\tfor(Character ch : characher.getTargets())\n\t\t\t\t{\n\t\t\t\t\tif(ch.net_index != -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int i = 0; i < links.size(); i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJSONObject tem = links.getJSONObject(i);\n\t\t\t\t\t\t\tif((tem.getInt(\"source\") == characher.index) && \n\t\t\t\t\t\t\t\t\t\t\t\t(tem.getInt(\"target\") == ch.index))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlineWeight = tem.getInt(\"value\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tparent.strokeWeight(lineWeight/4 + 1);\t\t\n\t\t\t\t\t\tparent.noFill();\n\t\t\t\t\t\tparent.stroke(0);\n\t\t\t\t\t\tparent.line(characher.x, characher.y, ch.x, ch.y);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}",
"public void display() {\t\t\n\t\tparent.pushStyle();\n\t\t\n\t\t//parent.noStroke();\n\t\t//parent.fill(255);\n\t\tparent.noFill();\n\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\tnodeSpin.drawNode(pos.x, pos.y, diam);\n\t\t\n\t\t//This should match what happens in the hover animation\n\t\tif (focused && userId >= 0) {\n\t\t\tparent.fill(Sequencer.colors[userId]);\n\t\t\tparent.ellipse(pos.x, pos.y, diam, diam);\n\t\t}\n\t\t\n\t\trunAnimations();\n\t\t\n\t\tparent.popStyle();\n\t}",
"@Override\n public void paint(Graphics g) {\n\n g2d = (Graphics2D) g; //Casting the Grahpics object to an Graphics2D object.\n\n /**\n * Setting RenderingHints.\n */\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);\n g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_DEFAULT);\n\n /**\n * Initializing of board.\n * Call to method drawGrid().\n * Drawing all Grids from 0 to 15 in a for()-loop.\n */\n paintGrid();\n\n /**\n * Call to method drawNumbers().\n * Writing numbers in field for easier recognition.\n */\n paintNumbers();\n\n /**\n * Checks if a game is initialized.\n * If it is, it will paint the tokens, if not, it won't paint the tokens.\n */\n if(game != null) {\n\n game.paint(g2d);\n }\n }",
"private void drawTitleScreen(Graphics g) {\n \t\tg.setColor(new Color(0, 0x66, 0xcc, 150));\n \t\tg.fillRect(0, 60, getWidth(), getHeight() - 120);\n \t\tg.setColor(Color.WHITE);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 30));\n \t\tg.drawString(\"POP UP QUIZ!\", 50, 100);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 18));\n \t\tg.drawString(\"Where you answer questions whilst cleaning your desktop!\",\n \t\t\t\t50, 120);\n \t\tg.drawString(\"Q LAM, V TONG, A VIJAYARAGAVAN\", 50, 140);\n \n \t\tg.drawString(\"Use the arrow keys to move the recycle bin.\", 50, 180);\n \t\tg.drawString(\"<Space> pauses, and <Esc> quits.\", 50, 200);\n \n \t\tg.drawImage(sprites.get(\"junk\"), 4, 200, null);\n \t\tg.drawString(\"Polish your computer by trashing junk falling \"\n \t\t\t\t+ \"from the sky!\", 50, 220);\n \n \t\tg.drawImage(sprites.get(\"sysfileLarge\"), 4, 330, null);\n \t\tg.drawImage(sprites.get(\"sysfileMedium\"), 8, 390, null);\n \t\tg.drawImage(sprites.get(\"sysfileSmall\"), 16, 440, null);\n \t\tg.drawString(\"You'll mess up your computer if you collect system files.\",\n \t\t\t\t50, 360);\n \t\tg.drawString(\"Note that they fall from the sky at different speeds.\",\n \t\t\t\t50, 390);\n \n \t\tg.drawString(\"The CPU gauge will tell you how well you're doing!\",\n \t\t\t\t50, 420);\n \t\tg.drawString(\"If your CPU usage goes over 100%, your computer goes kaput\"\n \t\t\t\t+ \" and you lose! How long can you clean?\", 50, 450);\n \n \t\tg.drawString(\"By the way, you'll have to answer questions from a barrage\"\n \t\t\t\t+ \" of pop-up as you do this.\", 50, 500);\n \t\tg.drawString(\"Serves you right for not being clean!!!\", 50, 530);\n \n \t\tg.drawString(\"PUSH START TO BEGIN_\", 50, 600);\n \t}",
"private static void draw() {\r\n\t\tclearDoc();\r\n\t\twrite(\"score: \" + score + \"\\n\", null);\r\n\t\twrite(\"+\", null);\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\twrite(\"-\", null);\r\n\t\t}\r\n\t\twrite(\"+\\n\", null);\r\n\t\tfor (int i = 0; i < ROWS; i++) {\r\n\t\t\twrite(\"|\", null);\r\n\t\t\tfor (int j = 0; j < COLUMNS; j++) {\r\n\t\t\t\tif (field[i][j] == SNAKE) {\r\n\t\t\t\t\twrite(\"S\", green);\r\n\t\t\t\t} else if (field[i][j] == APPLE) {\r\n\t\t\t\t\twrite(\"A\", red);\r\n\t\t\t\t} else if (field[i][j] == POISON) {\r\n\t\t\t\t\twrite(\"P\", magenta);\r\n\t\t\t\t} else if (field[i][j] == MOUSE) {\r\n\t\t\t\t\twrite(\"M\", grey);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twrite(\"~\", null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twrite(\"|\\n\", null);\r\n\t\t}\r\n\t\twrite(\"+\", null);\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\twrite(\"-\", null);\r\n\t\t}\r\n\t\twrite(\"+\", null);\r\n\t\tframe.pack();\r\n\t}",
"public BasicTextUI() {\n painted = false;\n }",
"private void drawGame(){\n drawBackGroundImage();\n drawWalls();\n drawPowerups();\n drawBullet();\n }",
"@Override\n\tpublic void draw() {\n\t\tbg.draw();\n\t\tfor(Test2 t : test)\n\t\t\tt.draw();\n\t\tfor(Test2 t : test2)\n\t\t\tt.draw();\n\t\t\n\t\tfor(Test2 t : test3)\n\t\t\tt.draw();\n\t\tobj.draw();\n\t\tEffect().drawEffect(1);\n\t}",
"@Override\n public void render() {\n sortEntities(Entity.getEntities());\n renderBackground();\n renderBattleState();\n if(selectedPc != null){\n MyGL2dRenderer.drawLabel(getSelectedPc().getCollisionBox().left - 4 * GameView.density() + cameraX,\n getSelectedPc().getCollisionBox().bottom - getSelectedPc().getCollisionBox().width() / 5 + cameraY,\n getSelectedPc().getCollisionBox().width() + 8 * GameView.density(),\n getSelectedPc().getCollisionBox().width() * 2 / 5,\n TextureData.selected_character_visual, 255);\n }\n if(!win){\n renderSpells();\n renderGold();\n }\n }",
"public void paint() {\r\n\t\tBufferStrategy bf = base.frame.getBufferStrategy();\r\n\t\ttry {\r\n\t\t\tg = bf.getDrawGraphics();\r\n\t\t\tg.clearRect(0, 0, 1024, 768);\r\n\t\t\tg.setFont(normal);\r\n\t\t\tif (gameState == 1) {\r\n\t\t\t\tg.drawImage(playButton, playButtonXM, playButtonYM, playButtonWidthM, playButtonHeightM, this);\t\t\t\t\r\n\t\t\t}else if (gameState == 3){\r\n\t\t\t\tint weaponPosX = ((arrow2X-arrowX) /2) + arrowX - 20;\r\n\t\t\t\tint weaponPosY = arrowY - 15;\r\n\t\t\t\tg.drawImage(Arrow, arrowX, arrowY, arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrow2X, arrowY, -arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrowX, arrowY2ndRow, arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrow2X, arrowY2ndRow, -arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrowX, arrowY3rdRow, arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrow2X, arrowY3rdRow, -arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrowX, arrowY4thRow, arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrow2X, arrowY4thRow, -arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(playButton, playButtonX, playButtonY, playButtonWidth, playButtonHeight, this);\r\n\r\n\t\t\t\t//text boxes above choices\r\n\t\t\t\tg.setColor(Color.black);\r\n\t\t\t\tg.drawString(\"Weapon\", weaponPosX, weaponPosY);\r\n\t\t\t\tg.drawString(\"Difficulty\", weaponPosX, (arrowY2ndRow - 15));\r\n\t\t\t\tg.drawString(\"Number of AI\", weaponPosX - 12, (arrowY3rdRow - 15));\r\n\t\t\t\tg.drawString(\"Number of players\", weaponPosX - 20, (arrowY4thRow - 15));\r\n\r\n\t\t\t\tif (getDifficulty() == 1){\r\n\t\t\t\t\tg.drawImage(Easy, difficultyXPos, arrowY2ndRow, difficultyWidth , arrowHeight, this);\r\n\t\t\t\t}else if (getDifficulty() == 2) {\r\n\t\t\t\t\tg.drawImage(Normal, difficultyXPos, arrowY2ndRow, difficultyWidth, arrowHeight, this);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tg.drawImage(Hard, difficultyXPos, arrowY2ndRow, difficultyWidth, arrowHeight, this);\r\n\t\t\t\t}\r\n\t\t\t\tif (getAttackStyle() == 2) {\r\n\t\t\t\t\tg.drawImage(Arrowr, weaponPosX -85, weaponPosY + 15, (arrow2X - arrowX) - 280, arrowHeight, this);\r\n\t\t\t\t}else {\r\n\t\t\t\t\t//due to the sword using all of the x positions the width is slightly different\r\n\t\t\t\t\tg.drawImage(SwordL, weaponPosX -85, weaponPosY + 15, (arrow2X - arrowX) - 300, arrowHeight, this);\r\n\t\t\t\t}\r\n\t\t\t\tint AIXPos = weaponPosX;\r\n\t\t\t\tif (AINum >= 10 && AINum<100) {\r\n\t\t\t\t\tAIXPos -=25;\r\n\t\t\t\t} else if (AINum >= 100 && AINum < 1000) {\r\n\t\t\t\t\t//the reason why this grows by 40 instead of an additional 20 is because we are not storing the variable\r\n\t\t\t\t\t//of current position anywhere so we just add another 20 onto the decrease\r\n\t\t\t\t\tAIXPos-=50;\r\n\t\t\t\t} else if (AINum >= 1000) {\r\n\t\t\t\t\tAIXPos-=75;\r\n\t\t\t\t}\r\n\t\t\t\tg.setFont(numbers);\r\n\t\t\t\tString currentNum = Integer.toString(AINum);\r\n\t\t\t\tString currentPlayerString = Integer.toString(currentPlayer);\r\n\t\t\t\tg.drawString(currentNum, AIXPos, arrowY3rdRow + 72);\r\n\t\t\t\tg.drawString(currentPlayerString, weaponPosX, arrowY4thRow + 72);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif ((!escape) && (!dead) &&(!allAIDead)) {\r\n\t\t\t\t\tg.drawImage(picture, 0, 0, base.frame.getWidth(), base.frame.getHeight(), this);\r\n\t\t\t\t\tfor (int i = 0; i < playerObject.length; i++) {\r\n\t\t\t\t\t\tint playerX = (int) playerObject[i].getX();\r\n\t\t\t\t\t\tint playerY = (int) playerObject[i].getY();\r\n\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t// health bar\r\n\t\t\t\t\t\tg.fillRect(playerX, playerY - 30, 100, healthY);\r\n\t\t\t\t\t\tg.setColor(Color.red);\r\n\t\t\t\t\t\tg.fillOval(playerX, playerY, 20, 20);\r\n\t\t\t\t\t\tg.fillRect(playerX, playerY - 30, (int) (playerObject[i].getHealth()/2) , healthY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//AI\r\n\t\t\t\t\tfor (int i = 0; i < AIObject.length; i++) {\r\n\t\t\t\t\t\tif (!AIObject[i].isDead()) {\r\n\t\t\t\t\t\t\tint AIRoundedX = (int) AIObject[i].getAIX();\r\n\t\t\t\t\t\t\tint AIRoundedY = (int) AIObject[i].getAIY();\r\n\t\t\t\t\t\t\tif (AIObject[i].getColor() == null) {\r\n\t\t\t\t\t\t\t\tint red = generator.nextInt(256);\r\n\t\t\t\t\t\t\t\tint green = generator.nextInt(256);\r\n\t\t\t\t\t\t\t\tint blue = generator.nextInt(256);\r\n\t\t\t\t\t\t\t\tColor newColor = new Color(red,green,blue);\r\n\t\t\t\t\t\t\t\tg.setColor(newColor);\r\n\t\t\t\t\t\t\t\tAIObject[i].setColor(newColor);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tg.setColor(AIObject[i].getColor());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillOval(AIRoundedX, AIRoundedY, 20, 20);\r\n\t\t\t\t\t\t\tAIDeadCount = 0;\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tg.fillRect(AIRoundedX, AIRoundedY - 40, AI_ORIG_HEALTH/AI_HEALTH_WIDTH_SCALE, healthY);\r\n\t\t\t\t\t\t\tg.setColor(AIObject[i].getColor());\r\n\t\t\t\t\t\t\tg.fillRect(AIRoundedX, AIRoundedY - 40, (int) AIObject[i].getAIHealth()/AI_HEALTH_WIDTH_SCALE, healthY);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tAIDeadCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// early access banner\r\n\t\t\t\t\tg.drawImage(earlyAccess, 0, 24, this);\r\n\r\n\t\t\t\t\tif (attackStyle == 2) {\r\n\t\t\t\t\t\tif (drawArrow == true) {\r\n\t\t\t\t\t\t\tinFlight = true;\r\n\t\t\t\t\t\t\tshouldPlaySound = true;\r\n\t\t\t\t\t\t\tif ((fireLeft) && (currentlyDrawingArrow != 2)) {\r\n\t\t\t\t\t\t\t\tgoingLeft = true;\r\n\t\t\t\t\t\t\t\tgoingRight = false;\r\n\t\t\t\t\t\t\t\tcurrentlyDrawingArrow = 1;\r\n\t\t\t\t\t\t\t\tg.drawImage(Arrowl, Math.round(aX), Math.round(aY), this);\r\n\r\n\t\t\t\t\t\t\t} else if ((fireRight) && (currentlyDrawingArrow != 1)) {\r\n\t\t\t\t\t\t\t\tgoingRight = true;\r\n\t\t\t\t\t\t\t\tgoingLeft = false;\r\n\t\t\t\t\t\t\t\tcurrentlyDrawingArrow = 2;\r\n\t\t\t\t\t\t\t\tg.drawImage(Arrowr, Math.round(aX), Math.round(aY), this);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((aX >= 1024) || (!drawArrow) || (aX <= 0)) {\r\n\t\t\t\t\t\t\tinFlight = false;\r\n\t\t\t\t\t\t\taX = playerObject[0].getX();\r\n\t\t\t\t\t\t\taY = playerObject[0].getY();\r\n\t\t\t\t\t\t\tcurrentlyDrawingArrow = 0;\r\n\t\t\t\t\t\t\tdrawArrow = false;\r\n\t\t\t\t\t\t\tshouldPlaySound = false;\r\n\t\t\t\t\t\t\tnotPlayingSound = false;\r\n\t\t\t\t\t\t\talreadyShot = false;\r\n\t\t\t\t\t\t\tif (wasReleased) {\r\n\t\t\t\t\t\t\t\tlClick = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tint roundedX = Math.round(playerObject[0].getX());\r\n\t\t\t\t\t\tint roundedY = Math.round(playerObject[0].getY());\r\n\t\t\t\t\t\tif (drawSword) {\r\n\t\t\t\t\t\t\tswordCount++;\r\n\t\t\t\t\t\t\tif (mouseLeft) {\r\n\t\t\t\t\t\t\t\tif (swordCount < 5) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX - 2, roundedY - 45, this);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if (swordCount > 5 && swordCount <=15) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(Sword45L, roundedX - 45, roundedY - 30, this);\r\n\t\t\t\t\t\t\t\t}else if (swordCount >15 && swordCount<30) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordL, roundedX - 63, roundedY, this);\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if (swordCount >30 || !drawSword){\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX - 2, roundedY - 45, this);\r\n\t\t\t\t\t\t\t\t\tswordCount = 0;\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\tif (swordCount < 5) {\r\n\t\t\t\t\t\t\t\t\t//image flip g.drawImage(SwordHorizontalL, Math.round(x) - 2, Math.round(y) - 45, -SwordHorizontalL.getWidth(this),SwordHorizontalL.getHeight(this),this);\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX + 20, roundedY - 45,\r\n\t\t\t\t\t\t\t\t\t\t\t-swordHorizontalLWidth,swordHorizontalLWidth,this);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if (swordCount > 5 && swordCount <=15) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(Sword45L, roundedX + 80, roundedY - 30,\r\n\t\t\t\t\t\t\t\t\t\t\t-sword45LWidth, sword45LHeight, this);\r\n\t\t\t\t\t\t\t\t}else if (swordCount >15 && swordCount<30) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordL, roundedX +90, roundedY, -swordLWidth, swordLHeight, this);\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if (swordCount >30 || !drawSword){\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX + 20, roundedY - 45,\r\n\t\t\t\t\t\t\t\t\t\t\t-swordHorizontalLWidth, swordHorizontalLHeight, this);\r\n\t\t\t\t\t\t\t\t\tswordCount = 0;\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (shield) {\r\n\t\t\t\t\t\t\tif (mouseLeft) {\r\n\t\t\t\t\t\t\t\tg.drawImage(shieldImage, roundedX - 5, roundedY - 5, shieldWidth, scaledShieldHeight, this);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tg.drawImage(shieldImage, roundedX + 5, roundedY - 5, shieldWidth, scaledShieldHeight, this);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif(mouseLeft) {\r\n\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX - 2, roundedY - 45, this);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX + 20, roundedY - 45,\r\n\t\t\t\t\t\t\t\t\t\t-SwordHorizontalL.getWidth(this), SwordHorizontalL.getHeight(this), this);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tswordCount = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (wasReleased) {\r\n\t\t\t\t\t\t\tlClick = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if (escape) {\r\n\t\t\t\t\tg.setColor(Color.white);\r\n\t\t\t\t\tg.drawRect(0, 0, 1024, 768);\r\n\t\t\t\t\tg.setColor(Color.black);\r\n\t\t\t\t\tg.drawString(\"PAUSED\", 512, 389);\r\n\t\t\t\t}\r\n\t\t\t\telse if (dead) {\r\n\t\t\t\t\tg.setColor(Color.black);\r\n\t\t\t\t\tg.drawRect(0, 0, 1024, 768);\r\n\t\t\t\t\tg.drawString(\"Dead\", 512, 389);\r\n\t\t\t\t} else if(allAIDead) {\r\n\t\t\t\t\tg.setColor(Color.black);\r\n\t\t\t\t\tg.drawRect(0, 0, 1024, 768);\r\n\t\t\t\t\tg.drawString(\"You win\", 512, 389);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tg.dispose();\r\n\t\t}\r\n\t\t// Shows the contents of the backbuffer on the screen.\r\n\t\tbf.show();\r\n\t}"
] | [
"0.7117555",
"0.69077957",
"0.67782617",
"0.6757868",
"0.6697335",
"0.6673638",
"0.65874213",
"0.65851146",
"0.6573355",
"0.65397525",
"0.6501058",
"0.64992297",
"0.64808893",
"0.6479183",
"0.64745325",
"0.6472103",
"0.6443235",
"0.64344937",
"0.6413964",
"0.63937",
"0.63906217",
"0.63660234",
"0.6365873",
"0.63424355",
"0.63364685",
"0.63353986",
"0.6330304",
"0.63237643",
"0.63057363",
"0.6292469",
"0.6292086",
"0.628899",
"0.6286955",
"0.6279163",
"0.62617886",
"0.6257902",
"0.62572724",
"0.6255326",
"0.62544966",
"0.62544966",
"0.623957",
"0.6214545",
"0.6203351",
"0.6197502",
"0.6195285",
"0.6186539",
"0.61811787",
"0.6180862",
"0.61793137",
"0.617759",
"0.61747086",
"0.61716914",
"0.6168788",
"0.6163936",
"0.61621755",
"0.61609745",
"0.6154542",
"0.61545056",
"0.6147007",
"0.6139953",
"0.61331266",
"0.61235315",
"0.61231995",
"0.6117281",
"0.6116621",
"0.61156803",
"0.61156803",
"0.61086166",
"0.61073464",
"0.6105426",
"0.6100666",
"0.6095468",
"0.609302",
"0.6092052",
"0.6086251",
"0.608103",
"0.6076585",
"0.6063534",
"0.60618454",
"0.6060002",
"0.605488",
"0.60546213",
"0.60542077",
"0.60540974",
"0.60540974",
"0.60535383",
"0.6053355",
"0.60487795",
"0.6047309",
"0.60441095",
"0.6042185",
"0.6033877",
"0.6033589",
"0.603002",
"0.6027401",
"0.6023475",
"0.60203904",
"0.6017359",
"0.6011884",
"0.6004752"
] | 0.6033316 | 93 |
/ method actionPerformed() automatically called by ActionPerformed pre: an element with actionListener is used post: changes variable values | public void actionPerformed(ActionEvent e) {
//enable buttons
if(e.getActionCommand().equals("Play Again")) {
playAgain = true;
}
else if(e.getActionCommand().equals("Main Menu")) {
mainMenu = true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void actionPerformed(ActionEvent e) {\r\n\t\t\tmode = InputMode.CHANGE_VALUE;\r\n\t\t\tinstr.setText(\"Click an array element to change its value.\");\r\n\t\t\tdefaultVar(canvas);\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t}",
"@Override\n public void actionPerformed (ActionEvent e) {\n fireChanged();\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) \n\t\t{\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) \n\t\t{\n\t\t\t\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\r\n \t\tpublic void actionPerformed(ActionEvent e) {\n \t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public void actionPerformed(ActionEvent event)\n\t\t\t{\n\t\t\t\tgetText();\n\t\t\t\tsetString();\n\n\t\t\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(\n\t\t\tActionEvent e)\n\t\t{\n\t\t\t\n\t\t}",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}",
"@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e)\n\t{\n\t\t\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\r\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0)\n\t{\n\t\t\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\t}",
"public void actionPerformed(ActionEvent e) {\r\n\t\t\t}",
"@Override\n\t public void actionPerformed(ActionEvent e){\n\t }",
"private void ValorActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t}"
] | [
"0.7578621",
"0.75623333",
"0.75401056",
"0.7507435",
"0.7507435",
"0.7502033",
"0.7472687",
"0.7472687",
"0.7471197",
"0.7471197",
"0.7471197",
"0.7471197",
"0.7464283",
"0.7463565",
"0.74399537",
"0.7439847",
"0.7439847",
"0.7439847",
"0.73907816",
"0.73865736",
"0.73807687",
"0.7372499",
"0.73639184",
"0.7346792",
"0.7327212",
"0.73256165",
"0.7316057",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7302763",
"0.7294302",
"0.7294302",
"0.7294302",
"0.7294302",
"0.7294302",
"0.7294302",
"0.7294302",
"0.7294302",
"0.7294302",
"0.729271",
"0.7288347",
"0.7288347",
"0.7288347",
"0.7288347",
"0.7288347",
"0.7288347",
"0.726533",
"0.726533",
"0.726533",
"0.726533",
"0.726533",
"0.726533",
"0.726533",
"0.726533",
"0.726533",
"0.726533",
"0.72577995",
"0.7247285",
"0.72186977",
"0.72174394",
"0.7207431",
"0.7206853",
"0.7206853",
"0.7206853",
"0.7206853",
"0.7206853",
"0.7206853",
"0.7206853",
"0.7206853",
"0.7206853",
"0.7206853",
"0.7206853",
"0.7206374",
"0.7196513",
"0.7196513",
"0.7196513",
"0.7196513",
"0.7196513",
"0.7196513",
"0.7196513",
"0.7196513",
"0.71934795",
"0.71881914",
"0.71881914"
] | 0.0 | -1 |
/ method JTextArea() called main and creates text pre: JText area name, string text to be displayed, font, int x and y boundary, int x and y location post: text will be created | public JTextArea createText(JTextArea a, String name, Font newFont, int boundX, int boundY, int x, int y) {
a = new JTextArea(name);
a.setFont(newFont);
a.setBounds(boundX, boundY, x, y);
a.setBackground(Color.lightGray);
return a;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void generateTextArea()\n {\n //Clear the textArea\n textArea.selectAll();\n textArea.replaceSelection(\"\");\n\n MyCircle circle = panel.getCircle();\n\n //Add all of the required information to the textarea\n textArea.append(String.format(\"AREA: %.2f %n\", circle.getArea()));\n textArea.append(\"RADIUS: \"+circle.getRadius()+\"\\n\");\n textArea.append(\"DIAMETER: \"+circle.getDiameter()+\"\\n\");\n textArea.append(String.format(\"CIRCUMFERENCE: %.2f %n\", circle.getCircumference()));\n }",
"public TextDisplay(){\n // Default values for all TextDisplays \n fontSize = 20.0f;\n fontColor = new Color(0, 0, 0);\n fieldWidth = 100;\n fieldHeight = 30;\n drawStringX = 0;\n drawStringY = 15;\n input = \"\";\n hasBackground = false;\n \n // TextDisplays' TextArea specifics\n borderWidth = 5;\n borderHeight = 5;\n borderColor = new Color(0, 0, 0, 128);\n backgroundColor = new Color (255, 255, 255, 128);\n }",
"TEXTAREA createTEXTAREA();",
"public static void GenerateTextArea(int id)\n\t{\n\t\tareaHeight += 210;\n\t\tHome.createArticle.setPreferredSize(new Dimension(800, areaHeight));\n\t\ti++; \n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = i;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.insets = new Insets(10, 0, 0, 5);\n\t\tgbc.anchor = GridBagConstraints.LINE_END;\n\t\tHome.createArticle.add(textLabels.get(id), gbc);\n\t\t\n\t\tgbc.gridx = 1;\n\t\tgbc.gridwidth = 3;\n\t\tgbc.insets = new Insets(10, 0, 0, 0);\n\t\tgbc.anchor = GridBagConstraints.LINE_START;\n\t\tgbc.weighty = 10;\n\t\tHome.createArticle.add(textAreas.get(id), gbc);\n\t}",
"public void createTextBox(){\n // Check if theGreenFootImage was set, otherwise create a blanco image\n // with the specific heights.\n if(theGreenfootImage != null){\n image = new GreenfootImage(theGreenfootImage);\n }else{\n image = new GreenfootImage(fieldWidth, fieldHeight);\n }\n \n if(hasBackground){\n if(borderWidth == 0 || borderHeight == 0){\n createAreaWithoutBorder();\n } else{\n createAreaWithBorder(borderWidth, borderHeight);\n }\n }\n \n // Create the default dont with given fontsize and color.\n font = image.getFont();\n font = font.deriveFont(fontSize);\n image.setFont(font);\n image.setColor(fontColor);\n \n // Draw the string in the image with the input, on the given coordinates.\n image.drawString(input, drawStringX, drawStringY);\n \n setImage(image); // Place the image\n }",
"public static TextArea createTextArea() {\n\t\tTextArea txt = new TextArea();\n\t\ttxt.setText(\" \");\n\t\ttxt.setPrefWidth(350);\n\t\ttxt.setPrefHeight(50);\n\t\treturn txt;\n\t}",
"public MarcoAreaTexto() {\r\n \r\n super(\"Demostración JTextArea\");\r\n Box cuadro = Box.createHorizontalBox();\r\n String demo = \"Texto de ejemplo\\npara mostrar como\\n\" +\r\n \"se copia texto por\\neventoexterno (Salu2)\";\r\n \r\n areaTexto1 = new JTextArea(demo, 10, 15); \r\n cuadro.add(new JScrollPane(areaTexto1) );\r\n copiar = new JButton(\"Copiar >>> \");\r\n cuadro.add(copiar);\r\n copiar.addActionListener(\r\n \r\n new ActionListener() {\r\n \r\n public void actionPerformed(ActionEvent event) {\r\n \r\n areaTexto2.setText(areaTexto1.getSelectedText() );\r\n } //Fin del método actionPerformed\r\n } //Clase interna anónima\r\n ); //Clase interna anónima\r\n \r\n areaTexto2 = new JTextArea(10, 15);\r\n areaTexto2.setEditable(false);\r\n cuadro.add(new JScrollPane(areaTexto2) );\r\n add(cuadro);\r\n }",
"public OzTextArea()\n{\n\tsetLayout(new BorderLayout());\n\tJScrollPane jsp = new JScrollPane(textArea);\n\tjsp.setBorder(\n\t\tBorderFactory.createCompoundBorder(\n\t\t\tBorderFactory.createRaisedBevelBorder(),\n\t\t\tBorderFactory.createEmptyBorder(5, 5, 5, 5)));\n\tadd(jsp, \"Center\");\n}",
"protected void createOutputTextArea() {\r\n\t\tthis.outputTextArea = new JTextArea(80, 30);\r\n\t\tthis.outputTextArea.setRows(2);\r\n\t\tthis.outputTextArea.setEditable(false);\r\n\t\tthis.outputTextArea.setLineWrap(false);\r\n\t\tthis.outputScrollPane = new JScrollPane(this.outputTextArea,\r\n\t\t\t\tVERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_AS_NEEDED);\r\n\t\t// outputTA.setBackground( Color.gray );\r\n\t\tthis.outputScrollPane.setMinimumSize(new Dimension(60, 30));\r\n\t\tthis.outputScrollPane.setPreferredSize(new Dimension(100, 30));\r\n\t}",
"private void createMessageArea() {\n\t\tthis.message = new JTextArea(\"Message\");\n\t\tthis.message.setRows(1);\n\t\tthis.message.setBorder(BorderFactory.createTitledBorder(\"Message\"));\n\t\tthis.message.setLineWrap(true);\n\t\tthis.message.setWrapStyleWord(true);\n\n\t\t// maximum lenght of the message\n\t\tfinal int MAX_LENGTH = 140;\n\t\tfinal int MAX_NEWLN = 4;\n\t\tthis.message.setDocument(new PlainDocument() {\n\t\t\t@Override\n\t\t\tpublic void insertString(int offs, String str, AttributeSet a) throws BadLocationException {\n\t\t\t\tint lines = message.getText().split(\"\\r\\n|\\r|\\n\", -1).length;\n\t\t\t\tif (str == null || message.getText().length() >= MAX_LENGTH || lines >= MAX_NEWLN) {\n\t \treturn;\n\t \t}\n\t\t\t\tsuper.insertString(offs, str, a);\n\t \t}\n\t\t});\n\t}",
"private void writeTextArea(){\r\n try\r\n {\r\n //Fill in \"textArea\" with club names and results\r\n textArea.appendText(\"OK: \" + choiceHomeTeam.getValue() + \" - \" + choiceAwayTeam.getValue() + \" \" \r\n + Integer.valueOf(finalTimeHomeScore.getText()) + \":\"\r\n + Integer.valueOf(finalTimeAwayScore.getText()) + \"(\" \r\n + Integer.valueOf(halfTimeHomeScore.getText()) + \":\" \r\n + Integer.valueOf(halfTimeAwayScore.getText()) + \")\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be green\r\n textArea.setStyle(\"-fx-text-fill: #4F8A10;\"); \r\n }\r\n //Fill in \"textArea\" with erros\r\n catch(NumberFormatException e)\r\n {\r\n textArea.appendText(\"Error: \" + e.getMessage() + \"\\n\");\r\n textArea.setWrapText(true);\r\n //the letters will be red\r\n textArea.setStyle(\"-fx-text-fill: RED;\"); \r\n } \r\n }",
"private void buildGui() {\r\n mainPanel = \r\n new JPanel(new BorderLayout()) {\r\n public void updateUI() {\r\n super.updateUI();\r\n BorderLayout layout = (BorderLayout) getLayout();\r\n int gap = 1 + getFont().getSize() / 2;\r\n layout.setHgap(gap);\r\n layout.setVgap(gap);\r\n setBorder(BorderFactory.createEmptyBorder(gap, gap,\r\n gap, gap));\r\n }\r\n };\r\n displayPanel = \r\n new JPanel() {\r\n public Dimension getPreferredSize() {\r\n return new Dimension(0, 0);\r\n }\r\n \r\n public void paintComponent(final Graphics g) {\r\n paintDisplay(g);\r\n }\r\n };\r\n displayPanel.addMouseMotionListener(\r\n new MouseMotionAdapter() {\r\n public void mouseMoved(final MouseEvent e) {\r\n handleMouseMove(e.getX(), e.getY());\r\n }\r\n });\r\n displayPanel.addMouseListener(\r\n new MouseAdapter() {\r\n public void mouseExited(final MouseEvent e) {\r\n mouseOut = true;\r\n if (topBounds == null) {\r\n textArea.setText(\"\");\r\n }\r\n else {\r\n textArea.setText(topBounds.toString());\r\n }\r\n }\r\n });\r\n JSplitPane splitPane = new JSplitPane();\r\n splitPane.setResizeWeight(.5);\r\n mainPanel.add(splitPane, \"Center\");\r\n splitPane.setTopComponent(displayPanel);\r\n textArea = new JTextArea();\r\n textArea.setEditable(false);\r\n splitPane.setBottomComponent(textArea);\r\n \r\n GridBagConstraints constraints = new GridBagConstraints();\r\n Insets insets = constraints.insets;\r\n int spacing = 4;\r\n constraints.weightx = .001;\r\n constraints.weighty = .001;\r\n insets.top = spacing;\r\n insets.bottom = spacing;\r\n insets.right = spacing;\r\n insets.left = spacing;\r\n constraints.gridwidth = GridBagConstraints.REMAINDER;\r\n constraints.fill = GridBagConstraints.NONE;\r\n //constraints.anchor = GridBagConstraints.WEST;\r\n \r\n if (topBounds != null) {\r\n textArea.setText(topBounds.toString());\r\n }\r\n }",
"public void addTextArea(String text) throws BadLocationException {\n\t\tcurrentTextArea = new JTextArea(text == null ? \"\" : text);\n AbstractDocument document = (AbstractDocument) currentTextArea.getDocument();\n document.setDocumentFilter(new Filter());\n\t\tcurrentTextArea.setBorder(BorderFactory.createLineBorder(Color.white));\n\t\tcurrentTextArea.setSize(750,2);\n\t\tcontainer.add(currentTextArea);\n\t\tcurrentTextArea.requestFocusInWindow();\n\t\tcurrentTextArea.setCaretPosition(currentTextArea.getDocument().getLength());\n\n\t\tcurrentTextArea.addKeyListener(new java.awt.event.KeyAdapter() {\n\t\t\tpublic void keyPressed(java.awt.event.KeyEvent evt) {\n\t\t\t\ttry {\n\t\t\t\t\tjTextArea1WriteCommand(evt);\n\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\trefreshView();\n\t}",
"private void setupTextArea() {\n\t\tcourseInfo = new JTextPane();\n\t\tinfoScrollPane = new JScrollPane(courseInfo);\n\t\tinfoScrollPane.setPreferredSize(new Dimension(350, 175));\n\t\tcourseInfo.setEditable(false);\n\t\tdisplay.add(infoScrollPane);\n\t}",
"public JTextArea createInstructions() {\n\t\tJTextArea instructions = new JTextArea(\n\t\t\t\t\"Hello. Thank you for being a wonderful and engaged volunteer. Befor you start your journey with your\"\n\t\t\t\t\t\t+ \"Youth Leader, it is essential that you have your Magic Stone. \");\n\t\t// instructions not editable\n\t\tinstructions.setEditable(false);\n\n\t\t// allows words to go to next line\n\t\tinstructions.setLineWrap(true);\n\n\t\t// prevents words from splitting\n\t\tinstructions.setWrapStyleWord(true);\n\n\t\t// change font\n\t\tinstructions.setFont(new Font(\"SANS_SERIF\", Font.PLAIN, 17));\n\n\t\t// change font color\n\t\tinstructions.setForeground(Color.white);\n\n\t\t// Insets constructor summary: (top, left, bottom, right)\n\t\tinstructions.setMargin(new Insets(30, 30, 30, 30));\n\n\t\t// Set background color\n\t\tinstructions.setOpaque(true);\n\t\tinstructions.setBackground(new Color(#00aeef));\n\n\t\treturn instructions;\n\t}",
"private void setupFeedbackDisplayTextArea(){\n\t\tfeedback_display = new JTextArea();\n\t\tfeedback_display.setFont(new Font(\"Calibri Light\", Font.PLAIN, 25));\n\t\tfeedback_display.setEditable(false);\n\t\tfeedback_display.setLineWrap(true);\n\t\tfeedback_display.setWrapStyleWord(true);\n\t\tfeedback_display.setOpaque(true);\n\n\t\tJScrollPane scrolling_pane = new JScrollPane(feedback_display);\n\t\tadd(scrolling_pane);\n\t\tscrolling_pane.setBounds(32, 222, 1284, 252);\n\t\tscrolling_pane.setBackground(Color.WHITE);\n\t}",
"private JTextArea Tekstas() {\n\t JTextArea detailTA = new JTextArea();\n\t detailTA.setFont(new Font(\"Monospaced\", Font.PLAIN, 14));\n\t detailTA.setTabSize(3);\n\t detailTA.setLineWrap(true);\n\t detailTA.setWrapStyleWord(false);\n\t return (detailTA);\n\t}",
"public TextArea()\n {\n super(AreaId.TEXT, new AsciiByteFormatter());\n }",
"private void initFrame()\r\n\t{\n\t\tthis.setLocationRelativeTo(null);\r\n\t\t\r\n\t\ttextArea.setText(\"Mit dem JTextArea-Steuerelement kann der Benutzer Text in einer Anwendung eingeben. \"\r\n\t\t\t\t+ \"Dieses Steuerelement bietet eine Funktionalität, die über das Standard-JTextField-Steuerelement von Java hinausgeht. \"\r\n\t\t\t\t+ \"Dazu gehören Mehrzeilenbearbeitung und Zeichenmaskierung für Kennwörter. \"\r\n\t\t\t\t+ \"Normalerweise wird ein JTextField-Steuerelement für die Anzeige oder Eingabe einer einzelnen Textzeile verwendet.\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"Text createText();",
"public Info(String text) {\n //new JTextArea(text);\n super(text, SwingConstants.CENTER);\n setFont(Scheme.getFont());\n setOpaque(true);\n setSize(getFontMetrics(Scheme.getFont()).stringWidth(getText()) + 13, 25);\n setBackground(Scheme.getBackgroundColor());\n setForeground(Scheme.getForegroundColor());\n setBorder(BorderFactory.createLineBorder(Color.GRAY));\n }",
"private void addText(Graphics g, Font font, Color frontColor, Rectangle rectangle, Color backColor, String str, int xPos, int yPos) {\n g.setFont(font);\n g.setColor(frontColor);\n if (rectangle != null) {\n g.drawRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(backColor);\n if (rectangle != null) {\n g.fillRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(frontColor);\n g.drawString(str, xPos, yPos);\n }",
"public void drawCenteredText(String text, int x, int y);",
"public TextFrame(String title, String text) {\n super(title);\n initComponents();\n area.setText(text);\n }",
"private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"FrameDemo\");\n frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n\n //main input TextArea\n JTextArea mainIn = new JTextArea(\"Type your Command here.\", 3, 1);\n \n //main Output Display Displays htmlDocuments\n JTextPane mainOut = new JTextPane(new HTMLDocument());\n mainOut.setPreferredSize(new Dimension(800, 600));\n \n //add components to Pane\n frame.getContentPane().add(mainOut);\n frame.getContentPane().add(mainIn);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }",
"private void draw_text() {\n\t\tcopy_text_into_buffer();\n\t\tVoteVisApp.instance().image(text_buffer_, frame_height_ / 2,\n\t\t\t-text_graphics_.height / 2);\n\t}",
"private void createTextPanel()\n\t{\t\t\n\t\ttextPanel.setLayout (new BorderLayout());\n\t\ttextPanel.add(entry, BorderLayout.CENTER);\n\t\t\n\t}",
"public TextPanel(String text) {\n\t\tthis.setLayout(new MigLayout());\n\t\tthis.text = text;\n\t\tjta = new JTextArea(text);\n\t\tjta.setEditable(false);\n\t\tjta.setLineWrap(true);\n\t\tjsp = new JScrollPane(jta);\n\n\t\tthis.add(jsp, \"push,grow\");\n\t}",
"public DrawTextPanel() {\n\t\tfileChooser = new SimpleFileChooser();\n\t\tundoMenuItem = new JMenuItem(\"Remove Item\");\n\t\tundoMenuItem.setEnabled(false);\n\t\tmenuHandler = new MenuHandler();\n\t\tsetLayout(new BorderLayout(3,3));\n\t\tsetBackground(Color.BLACK);\n\t\tsetBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\n\t\tcanvas = new Canvas();\n\t\tadd(canvas, BorderLayout.CENTER);\n\t\tJPanel bottom = new JPanel();\n\t\tbottom.add(new JLabel(\"Text to add: \"));\n\t\tinput = new JTextField(\"Hello World!\", 40);\n\t\tbottom.add(input);\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tJButton button = new JButton(\"Generate Random\");\n\t\tbottom.add(button);\n\t\t\n\t\tcanvas.addMouseListener( new MouseAdapter() {\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tdoMousePress( e.getX(), e.getY() ); \n\t\t\t}\n\t\t} );\n\t\t\n\t\tbutton.addActionListener(new ActionListener() { \n\t\t\tpublic void actionPerformed(ActionEvent e) { \n\t\t\t\tfor (int i = 0; i < 150; i++) { \n\t\t\t\t\tint X = new Random().nextInt(800); \n\t\t\t\t\tint Y = new Random().nextInt(600);\n\t\t\t\t\tdoMousePress(X, Y); \n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}",
"@Override\r\n public void writeText(String text) {\n String[] lines = text.split(\"\\n\");\r\n JLabel[] labels = new JLabel[lines.length];\r\n for (int i = 0; i < lines.length; i++) {\r\n labels[i] = new JLabel(lines[i]);\r\n labels[i].setFont(new Font(\"Monospaced\", Font.PLAIN, 20));\r\n }\r\n JOptionPane.showMessageDialog(null, labels);\r\n }",
"public static void main(String[] args) {\n\t\tnew TextArea2(\"Text 테스트\");\n\t}",
"public Ventana() {\n initComponents();\n this.tipos.add(GD_C);\n this.tipos.add(GD_S);\n this.tipos.add(GND_C);\n this.tipos.add(GND_S);\n this.panel.setArea_text(text);\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextPane1 = new javax.swing.JTextPane();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton3 = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenuItem2 = new javax.swing.JMenuItem();\n jMenuItem3 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n jMenuItem4 = new javax.swing.JMenuItem();\n jMenuItem7 = new javax.swing.JMenuItem();\n jMenu3 = new javax.swing.JMenu();\n jMenuItem6 = new javax.swing.JMenuItem();\n jMenuItem5 = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jTextPane1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Texto de Entrada\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n jScrollPane1.setViewportView(jTextPane1);\n\n jButton1.setText(\"Generar Automatas\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Analizar Entradas\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jTextArea1.setEditable(false);\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jTextArea1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Salida\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));\n jScrollPane2.setViewportView(jTextArea1);\n\n jButton3.setText(\"Cargar Imagen\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 501, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 220, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 404, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton1)\n .addComponent(jButton3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n jMenu1.setText(\"Archivo\");\n\n jMenuItem1.setText(\"Abrir\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem1);\n\n jMenuItem2.setText(\"Guardar\");\n jMenuItem2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem2ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem2);\n\n jMenuItem3.setText(\"Guardar Como\");\n jMenuItem3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem3ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem3);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Reportes\");\n\n jMenuItem4.setText(\"Generar Reporte Lexico\");\n jMenuItem4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem4ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem4);\n\n jMenuItem7.setText(\"Generar Reporte Errores\");\n jMenuItem7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem7ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem7);\n\n jMenuBar1.add(jMenu2);\n\n jMenu3.setText(\"Otros\");\n\n jMenuItem6.setText(\"Limpiar \");\n jMenuItem6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem6ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem6);\n\n jMenuItem5.setText(\"Salir\");\n jMenuItem5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem5ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem5);\n\n jMenuBar1.add(jMenu3);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }",
"public void showInfo(String data) {\r\n\t \r\n\t \r\n\ttextArea.append(data);\r\n\t try{\r\n\t\t int len=textArea.getText().length();\r\n\t\t textArea.setCaretPosition(len);\r\n\t\t }\r\n\t\t catch(Exception E){\r\n\t\t\t E.printStackTrace();\r\n\t\t }\r\n\t\r\n this.getContentPane().validate();\r\n }",
"void init(RichTextArea textArea, Config config);",
"@Override\r\n public void draw(Canvas canvas) {\r\n if (text == null) {\r\n throw new IllegalStateException(\"Attempting to draw a null text.\");\r\n }\r\n\r\n // Draws the bounding box around the TextBlock.\r\n RectF rect = new RectF(text.getBoundingBox());\r\n rect.left = translateX(rect.left);\r\n rect.top = translateY(rect.top);\r\n rect.right = translateX(rect.right);\r\n rect.bottom = translateY(rect.bottom);\r\n canvas.drawRect(rect, rectPaint);\r\n\r\n // Log.d(\"area\", \"text: \" + text.getText() + \"\\nArea: \" + Area);\r\n /**Here we are defining a Map which takes a string(Text) and a Integer X_Axis.The text will act as key to the X_Axis.\r\n Once We Got the X_Axis we will pass its value to a SparseIntArray which will Assign X Axis To Y Axis\r\n .Then We might Create another Map which will Store Both The text and the coordinates*/\r\n int X_Axis = (int) rect.left;\r\n int Y_Axis = (int) rect.bottom;\r\n\r\n // Renders the text at the bottom of the box.\r\n Log.d(\"PositionXY\", \"x: \"+X_Axis +\" |Y: \"+ Y_Axis);\r\n canvas.drawText(text.getText(), rect.left, rect.bottom, textPaint); // rect.left and rect.bottom are the coordinates of the text they can be used for mapping puposes\r\n\r\n\r\n }",
"public GraphicsText(String text, float x, float y){\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n textColor = Color.BLACK;\r\n font = new Font(\"SanSerif\", Font.PLAIN, 14);\r\n }",
"private void drawTextBox(Graphics g, int x, int y, int width, int height) {\n\n\t// draw a rectangle\n\tg.setColor(Color.BLACK);\n\tg.drawRect(x, y, width, height);\n\n\t// determine the text size\n\tint textSize = (int) (height * TEXT_RATIO);\n\n\t// determine the text margins\n\tint textMargin = (int) (width * TEXT_MARGIN_RATIO);\n\n\t// coordinates to print message\n\tint xCoord = x + textMargin;\n\tint yCoord = y + height - textMargin;\n\n\t// set up the font\n\tg.setColor(Color.BLACK);\n\tg.setFont(new Font(\"Times New Roman\", Font.BOLD, textSize));\n\n\t// print the text\n\tg.drawString(MESSAGE, xCoord, yCoord);\n }",
"protected void createComponents() {\n sampleText = new JTextField(20);\n displayArea = new JLabel(\"\");\n displayArea.setPreferredSize(new Dimension(200, 75));\n displayArea.setMinimumSize(new Dimension(200, 75));\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttextArea.setText(textArea.getText()+\"\\n\"+s);\n\t\t\t}",
"protected JTextComponent createDefaultEditor() {\n JTextComponent textComponent = new JTextPane() {\n private static final long serialVersionUID = 6954176332471863456L;\n\n /**\n * Set some rendering hints - if we don't then the rendering can be inconsistent. Also, Swing doesn't work correctly with fractional metrics.\n */\n public void paint(Graphics g) {\n Graphics2D g2 = (Graphics2D) g;\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_OFF);\n\n super.paint(g);\n }\n\n /**\n * If the standard scroll rect to visible is on, then you can get weird behaviors if the canvas is put in a scroll pane.\n */\n @SuppressWarnings(\"unused\")\n public void scrollRectToVisible() {\n }\n };\n textComponent.setBorder(new CompoundBorder(new LineBorder(Color.black), new EmptyBorder(3, 3, 3, 3)));\n\n Font newFont = textComponent.getFont().deriveFont(Font.PLAIN, fontSize);\n textComponent.setFont(newFont);\n return textComponent;\n }",
"public ExtractTextByArea() throws IOException {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}",
"protected void createContents() {\n\t\tsetText(\"Termination\");\n\t\tsetSize(340, 101);\n\n\t}",
"JTextArea getDisplay();",
"public static void main(String args[]) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {\n\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\tJFrame frame = new JFrame(\"Text Editor\");\n\t\tframe.setVisible(true);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setLayout(new BorderLayout());\n\t\tDimension dimension = new Dimension(1100, 500);\n\t\tframe.setPreferredSize(dimension);\n\n\t\tJLabel tabLabel = new JLabel(\"Untitled\");\n\t\tJButton closeButton = new JButton(\"X\");\n\n\t\tJPanel tabLabelPanel = new JPanel();\n\t\ttabLabelPanel.add(tabLabel);\n\t\ttabLabelPanel.add(closeButton);\n\n\t\tJTabbedPane tabbedPane = new JTabbedPane();\n\n\t\tJTextArea textArea = new JTextArea();\n\t\tJScrollPane scrollPane = new JScrollPane(textArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\ttabbedPane.addTab(\"tab\", scrollPane);\n\t\ttabbedPane.setTabComponentAt(0, tabLabelPanel);\n\t\ttabbedPane.setSelectedIndex(0);\n\n\t\tJPanel tabbedPanel = new JPanel(new BorderLayout());\n\t\ttabbedPanel.add(tabbedPane, BorderLayout.CENTER);\n\t\tframe.add(tabbedPanel, BorderLayout.CENTER);\n\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT));\n\n\t\tcloseButton.addActionListener(new ButtonAction(tabbedPane, TextEditorConfig.CLOSE));\n\n\t\tJButton newButton = new JButton(\"new\");\n\t\tnewButton.addActionListener(new ButtonAction(tabbedPane, frame, TextEditorConfig.NEW));\n\n\t\tJButton saveButton = new JButton(\"save\");\n\t\tsaveButton.addActionListener(new ButtonAction(tabbedPane, TextEditorConfig.SAVE));\n\n\t\tJButton saveAsButton = new JButton(\"save as\");\n\t\tsaveAsButton.addActionListener(new ButtonAction(tabbedPane, TextEditorConfig.SAVE_AS));\n\n\t\tJButton openButton = new JButton(\"open\");\n\t\topenButton.addActionListener(new ButtonAction(tabbedPane, frame, TextEditorConfig.OPEN));\n\n\t\tJButton clearButton = new JButton(\"clear\");\n\t\tclearButton.addActionListener(new ButtonAction(tabbedPane, TextEditorConfig.CLEAR));\n\n\t\tJLabel searchLabel = new JLabel(\"search\");\n\t\tJTextField searchEnterField = new JTextField(20);\n\t\tsearchEnterField.addActionListener(new ButtonAction(tabbedPane, searchEnterField, TextEditorConfig.SEARCH));\n\n\t\tbuttonPanel.add(newButton);\n\t\tbuttonPanel.add(saveButton);\n\t\tbuttonPanel.add(saveAsButton);\n\t\tbuttonPanel.add(openButton);\n\t\tbuttonPanel.add(clearButton);\n\t\tbuttonPanel.add(searchLabel);\n\t\tbuttonPanel.add(searchEnterField);\n\n\t\tframe.add(buttonPanel, BorderLayout.SOUTH);\n\t\tframe.pack();\n\n\t}",
"public abstract double drawString(AEColor clr, double font_size, String str, double mid_x, double mid_y);",
"public void bilan_zone() {\n\n JLabel lbl_Bilan = new JLabel(\"BILAN :\");\n lbl_Bilan.setBounds(40, 170, 119, 16);\n add(lbl_Bilan);\n\n bilan_content = new JTextArea();\n bilan_content.setBounds(100, 170, 200, 150);\n bilan_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[3]);\n bilan_content.setLineWrap(true);\n bilan_content.setWrapStyleWord(true);\n bilan_content.setEditable(false);\n add(bilan_content);\n\n\n }",
"public abstract void drawString(String str, int x, int y);",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pn_mostrar = new javax.swing.JScrollPane();\n txt_mostrar = new javax.swing.JTextArea();\n\n setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n setClosable(true);\n setMaximizable(true);\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n txt_mostrar.setEditable(false);\n txt_mostrar.setBackground(new java.awt.Color(51, 51, 51));\n txt_mostrar.setColumns(20);\n txt_mostrar.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n txt_mostrar.setForeground(new java.awt.Color(255, 255, 255));\n txt_mostrar.setRows(5);\n txt_mostrar.setSelectionColor(new java.awt.Color(51, 255, 0));\n pn_mostrar.setViewportView(txt_mostrar);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pn_mostrar, javax.swing.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pn_mostrar, javax.swing.GroupLayout.DEFAULT_SIZE, 222, Short.MAX_VALUE)\n );\n\n pack();\n }",
"private Painter newPlainText() {\r\n\t\treturn p.textOutline(text, surface, fontSize, bold, italic, \r\n\t\t\t\tshade, null);\r\n\t}",
"public void setGUIMode (final TextArea text)\n {\n this.text = text;\n }",
"private JTextArea getJTextArea1() {\r\n\t\tif (jTextArea1 == null) {\r\n\t\t\tjTextArea1 = new JTextArea();\r\n\t\t\tjTextArea1.setBounds(new Rectangle(21, 331, 185, 94));\r\n\t\t\tjTextArea1.setText(\"You can use '*' or '?'.\\n If you type 'ma*' ,\" +\r\n\t\t\t\t\t\" will appear\\n all the words wich start with 'ma'.\" +\r\n\t\t\t\t\t\"\\n If you type 'm?' ,\" +\r\n\t\t\t\t\t\" will appear\\n all the words with two letters\\nwich start with 'm'.\");\r\n\t\t\tjTextArea1.setBackground(Color.green);\r\n\t\t\tjTextArea1.setEditable(false);\r\n\t\t}\r\n\t\treturn jTextArea1;\r\n\t}",
"@Override\n\tpublic JComponent createWithAlignment(String text,String font, int x, int y, int w, int h,int Alignment) {\n\t\tJLabel label = new JLabel(text);\n\t\tlabel.setHorizontalAlignment(Alignment);\n\t label.setBounds(x,y,w,h);\n\t return label;\n\t}",
"public void fillString(float x, float y, String text);",
"private void initComponents() {\n\n //initialization of the components\n aboutUsLabel = new JLabel();\n aboutUsPane = new JScrollPane();\n aboutUsTextArea = new JTextArea();\n background = new JLabel();\n\n // size of the panel and layout adjusted\n setPreferredSize(new Dimension(1280, 700));\n setLayout(null);\n\n // about us label font, size and content adjusted\n aboutUsLabel.setFont(new Font(\"Calibri\", 1, 48));\n aboutUsLabel.setForeground(new Color(255, 255, 255));\n aboutUsLabel.setText(\"ABOUT US\");\n add(aboutUsLabel);\n aboutUsLabel.setBounds(535, 80, 210, 60);\n\n // text label and components are adjusted\n aboutUsTextArea.setEditable(false);\n aboutUsTextArea.setBackground(new Color(88, 78, 69));\n aboutUsTextArea.setColumns(20);\n aboutUsTextArea.setFont(new Font(\"Arial\", 0, 16));\n aboutUsTextArea.setForeground(new Color(255, 255, 255));\n aboutUsTextArea.setRows(5);\n aboutUsTextArea.setText(\" Carbometer is a desktop application that utilizes information about the consumption of users to \\n measure environmental damage and gives recommendations based on the information. The program \\n gets the user data with a series of questions depending on their user type. As the user answers \\n the questions, Carbometer makes calculations to calculate users' environmental damage. After the \\n calculations,Carbometer shows their carbopoint and gives recommendations todiminish their Carbopoint\\n level, and directs users to donateto payback their environmental damage if they want to. With this\\n project, our aim is to make people aware of the damage they gave to the environment, and help them\\n to reduce their harm by giving recommendations or directing them to donate any non-governmental \\n\\t\\t environmental organizations.\\n\\n\\n\\t\\t Creators of the Carbometer \\n\\t\\t\\t Alper Mumcular \\n\\t\\t Mustafa Çağrı Durgut \\t\\n\\t\\t\\t Onur Ertunç \\n\\t\\t Şeyhmus Eren Özen \\n\\t\\t\\t Uygar Onat Erol\");\n aboutUsTextArea.setBorder(null);\n aboutUsPane.setViewportView(aboutUsTextArea);\n\n // added to the panel\n add(aboutUsPane);\n aboutUsPane.setBounds(255, 240, 770, 360);\n\n // background adjusted and added\n background.setIcon(new ImageIcon(getClass().getResource(\"/gui/icons and backgrounds/final.jpg\")));\n add(background);\n background.setBounds(0, 0, 1280, 700);\n }",
"private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.MIN |SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(WordWatermarkDialog.class, \"/com/yc/ui/1.jpg\"));\n\t\tshell.setSize(436, 321);\n\t\tshell.setText(\"设置文字水印\");\n\t\t\n\t\tLabel label_font = new Label(shell, SWT.NONE);\n\t\tlabel_font.setBounds(38, 80, 61, 17);\n\t\tlabel_font.setText(\"字体名称:\");\n\t\t\n\t\tLabel label_style = new Label(shell, SWT.NONE);\n\t\tlabel_style.setBounds(232, 77, 61, 17);\n\t\tlabel_style.setText(\"字体样式:\");\n\t\t\n\t\tLabel label_size = new Label(shell, SWT.NONE);\n\t\tlabel_size.setBounds(38, 120, 68, 17);\n\t\tlabel_size.setText(\"字体大小:\");\n\t\t\n\t\tLabel label_color = new Label(shell, SWT.NONE);\n\t\tlabel_color.setBounds(232, 120, 68, 17);\n\t\tlabel_color.setText(\"字体颜色:\");\n\t\t\n\t\tLabel label_word = new Label(shell, SWT.NONE);\n\t\tlabel_word.setBounds(38, 38, 61, 17);\n\t\tlabel_word.setText(\"水印文字:\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(115, 35, 278, 23);\n\t\t\n\t\tButton button_confirm = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_confirm.setBounds(313, 256, 80, 27);\n\t\tbutton_confirm.setText(\"确定\");\n\t\t\n\t\tCombo combo = new Combo(shell, SWT.NONE);\n\t\tcombo.setItems(new String[] {\"宋体\", \"黑体\", \"楷体\", \"微软雅黑\", \"仿宋\"});\n\t\tcombo.setBounds(115, 77, 93, 25);\n\t\tcombo.setText(\"黑体\");\n\t\t\n\t\tCombo combo_1 = new Combo(shell, SWT.NONE);\n\t\tcombo_1.setItems(new String[] {\"粗体\", \"斜体\"});\n\t\tcombo_1.setBounds(300, 74, 93, 25);\n\t\tcombo_1.setText(\"粗体\");\n\t\t\n\t\tCombo combo_2 = new Combo(shell, SWT.NONE);\n\t\tcombo_2.setItems(new String[] {\"1\", \"3\", \"5\", \"8\", \"10\", \"12\", \"16\", \"18\", \"20\", \"24\", \"30\", \"36\", \"48\", \"56\", \"66\", \"72\"});\n\t\tcombo_2.setBounds(115, 117, 93, 25);\n\t\tcombo_2.setText(\"24\");\n\t\t\n\t\tCombo combo_3 = new Combo(shell, SWT.NONE);\n\t\tcombo_3.setItems(new String[] {\"红色\", \"绿色\", \"蓝色\"});\n\t\tcombo_3.setBounds(300, 117, 93, 25);\n\t\tcombo_3.setText(\"红色\");\n\t\t\n\t\tButton button_cancle = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_cancle.setBounds(182, 256, 80, 27);\n\t\tbutton_cancle.setText(\"取消\");\n\t\t\n\t\tLabel label_X = new Label(shell, SWT.NONE);\n\t\tlabel_X.setBounds(31, 161, 68, 17);\n\t\tlabel_X.setText(\"X轴偏移值:\");\n\t\t\n\t\tCombo combo_4 = new Combo(shell, SWT.NONE);\n\t\tcombo_4.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_4.setBounds(115, 158, 93, 25);\n\t\tcombo_4.setText(\"50\");\n\t\t\n\t\tLabel label_Y = new Label(shell, SWT.NONE);\n\t\tlabel_Y.setText(\"Y轴偏移值:\");\n\t\tlabel_Y.setBounds(225, 161, 68, 17);\n\t\t\n\t\tCombo combo_5 = new Combo(shell, SWT.NONE);\n\t\tcombo_5.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_5.setBounds(300, 158, 93, 25);\n\t\tcombo_5.setText(\"50\");\n\t\t\n\t\tLabel label_alpha = new Label(shell, SWT.NONE);\n\t\tlabel_alpha.setBounds(46, 204, 53, 17);\n\t\tlabel_alpha.setText(\"透明度:\");\n\t\t\n\t\tCombo combo_6 = new Combo(shell, SWT.NONE);\n\t\tcombo_6.setItems(new String[] {\"0\", \"0.1\", \"0.2\", \"0.3\", \"0.4\", \"0.5\", \"0.6\", \"0.7\", \"0.8\", \"0.9\", \"1.0\"});\n\t\tcombo_6.setBounds(115, 201, 93, 25);\n\t\tcombo_6.setText(\"0.8\");\n\t\t\n\t\t//取消按钮\n\t\tbutton_cancle.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t//确认按钮\n\t\tbutton_confirm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tif(text.getText().trim()==null || \"\".equals(text.getText().trim())\n\t\t\t\t\t\t||combo.getText().trim()==null || \"\".equals(combo.getText().trim()) \n\t\t\t\t\t\t\t||combo_1.getText().trim()==null || \"\".equals(combo_1.getText().trim())\n\t\t\t\t\t\t\t\t|| combo_2.getText().trim()==null || \"\".equals(combo_2.getText().trim())\n\t\t\t\t\t\t\t\t\t|| combo_3.getText().trim()==null || \"\".equals(combo_3.getText().trim())\n\t\t\t\t\t\t\t\t\t\t||combo_4.getText().trim()==null || \"\".equals(combo_4.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t||combo_5.getText().trim()==null || \"\".equals(combo_5.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t\t||combo_6.getText().trim()==null || \"\".equals(combo_6.getText().trim())){\n\t\t\t\t\tMessageDialog.openError(shell, \"错误\", \"输入框不能为空或输入空值,请确认后重新输入!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString word=text.getText().trim();\n\t\t\t\tString wordName=getFontName(combo.getText().trim());\n\t\t\t\tint wordStyle=getFonStyle(combo_1.getText().trim());\n\t\t\t\tint wordSize=Integer.parseInt(combo_2.getText().trim());\n\t\t\t\tColor wordColor=getFontColor(combo_3.getText().trim());\n\t\t\t\tint word_X=Integer.parseInt(combo_4.getText().trim());\n\t\t\t\tint word_Y=Integer.parseInt(combo_5.getText().trim());\n\t\t\t\tfloat word_Alpha=Float.parseFloat(combo_6.getText().trim());\n\t\t\t\t\n\t\t\t\tis=MeituUtils.waterMarkWord(EditorUi.filePath,word, wordName, wordStyle, wordSize, wordColor, word_X, word_Y,word_Alpha);\n\t\t\t\tCommon.image=new Image(display,is);\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tcombo.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t\tcombo_1.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_2.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_3.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\t\n\t\t\n\t\tcombo_4.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_5.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_6.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\".[0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t}",
"public Text(int x, int y, String text, int size) {\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n this.font = Font.SANS_SERIF;\r\n this.size = size;\r\n \r\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFrame frame = new JFrame();\r\n\t\t\t\tframe.setLayout(null);\r\n\t\t\t\tJTextArea area = new JTextArea();\r\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(area);\r\n\t\t\t\tscrollPane.setBounds(10, 10, 410, 560);\r\n\t\t\t\tscrollPane.setHorizontalScrollBarPolicy(\r\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tscrollPane.setVerticalScrollBarPolicy(\r\n\t\t\t\tJScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tframe.add(scrollPane);\r\n\t\t\t\tarea.setBounds(10, 10, 1000, 1000);\r\n//\t\t\t\tframe.add(area);\r\n\t\t\t\t// 设置窗体参数\r\n\t\t\t\tframe.setResizable(false);// 窗体大小固定\r\n\t\t\t\tframe.setTitle(\"Note\");\r\n\t\t\t\tframe.setSize(430, 600);\r\n\t\t\t\tframe.setLocation(300, 100);// 初始位置\r\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\t\tframe.setVisible(true);\r\n\t\t\t\tString inPut = insertFileName.getText();\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t\tconn = DriverManager.getConnection(URL, USERNAME, PASSWORD);\r\n\t\t\t\t\tstmt = conn.createStatement();\r\n\t\t\t\t\tString sql = null;\r\n\t\t\t\t\tif(numb==1) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlTable where sqlTableName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==2) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlSelect where sqlSelectName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==3) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlInsert where sqlInsertName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==4) {\r\n\t\t\t\t\t\tsql = \"select codeText from sqlDelete where sqlDeleteName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==5) {\r\n\t\t\t\t\t\tsql = \"select codeText from signIn where signInName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else if(numb==6) {\r\n\t\t\t\t\t\tsql = \"select codeText from MyJPanel where JPanelName = '\"+inPut+\"'\";\r\n\t\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\t\tstr_show += rs.getString(\"codeText\") + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tarea.setText(str_show);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void createWindow(){\n JFrame frame = new JFrame(\"Baser Aps sick leave prototype\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(screenSize.width,screenSize.height);\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n /**\n * Setting up the main layout\n */\n Container allContent = frame.getContentPane();\n allContent.setLayout(new BorderLayout()); //main layout is BorderLayout\n\n /**\n * Stuff in the content pane\n */\n JButton button = new JButton(\"Press\");\n JTextPane text = new JTextPane();\n text.setText(\"POTATO TEST\");\n text.setEditable(false);\n JMenuBar menuBar = new JMenuBar();\n JMenu file = new JMenu(\"File\");\n JMenu help = new JMenu(\"Help\");\n JMenuItem open = new JMenuItem(\"Open...\");\n JMenuItem saveAs = new JMenuItem(\"Save as\");\n open.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n fileChooser.showOpenDialog(frame);\n }\n\n @Override\n public void mousePressed(MouseEvent e) {\n\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n\n }\n });\n file.add(open);\n file.add(saveAs);\n menuBar.add(file);\n menuBar.add(help);\n\n allContent.add(button, LINE_START); // Adds Button to content pane of frame at position LINE_START\n allContent.add(text, LINE_END); // Adds the text to the frame, at position LINE_END\n allContent.add(menuBar, PAGE_START);\n\n\n\n frame.setVisible(true);\n }",
"public Text(double x, double y, String text, TextStyle style, Accent accent)\n {\n super(x, y, text);\n this.style = style;\n this.accent = accent;\n initialize();\n }",
"public TextArea makeInputArea (double height, double width) {\r\n TextArea cmdBox = new TextArea();\r\n cmdBox.setPrefColumnCount(INPUT_FIELD_WIDTH);\r\n cmdBox.setPrefHeight(height);\r\n cmdBox.setPrefWidth(width);\r\n return cmdBox;\r\n }",
"private JTextArea getJTextArea() {\r\n\t\tif (jTextArea == null) {\r\n\t\t\tjTextArea = new JTextArea();\r\n\t\t\tjTextArea.setBounds(new Rectangle(11, 5, 139, 127));\r\n\t\t\tjTextArea.setText(\"This is the stroy\\nof the hare who\\nlost his spectacles.\");\r\n\t\t}\r\n\t\treturn jTextArea;\r\n\t}",
"public void centerText() {\r\n int theHeight = window.getGraphPanelHeight() / 2;\r\n int theWidth = window.getGraphPanelWidth() / 2;\r\n int writingHeight = textShape.getHeight() / 2;\r\n int writingWidth = textShape.getWidth() / 2;\r\n textShape.setY(theHeight - writingHeight);\r\n textShape.setX(theWidth - writingWidth);\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jLabel11 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jLabel13 = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n setClosable(true);\n setTitle(\"致谢\");\n try {\n setSelected(true);\n } catch (java.beans.PropertyVetoException e1) {\n e1.printStackTrace();\n }\n setVisible(true);\n\n jLabel2.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 102, 0));\n jLabel2.setText(\"可以肯定的是这门课终将在不经意的某一天发挥其作用!\");\n\n jLabel9.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel9.setForeground(new java.awt.Color(255, 102, 0));\n jLabel9.setText(\"也许未来我不一定会从事相关的行业,\");\n\n jLabel10.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(255, 102, 0));\n jLabel10.setText(\"最后非常感谢曹老师和助教学长一学期来的辛勤授课以及陪伴!\");\n\n jLabel11.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel11.setForeground(new java.awt.Color(255, 102, 51));\n jLabel11.setText(\"这门课让我对开发这一领域有了初步的涉猎,\");\n\n jLabel12.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(255, 102, 0));\n jLabel12.setText(\"但是这对于拓宽我的互联网视野大有好处,\");\n\n jLabel13.setFont(new java.awt.Font(\"华文行楷\", 0, 24)); // NOI18N\n jLabel13.setForeground(new java.awt.Color(255, 102, 0));\n jLabel13.setText(\"万分感谢!!!\");\n\n jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/view/icons/thanks1.jpg\"))); // NOI18N\n\n jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/view/icons/thanks2.jpg\"))); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel13)\n .addComponent(jLabel11)\n .addComponent(jLabel12)\n .addComponent(jLabel9)\n .addComponent(jLabel2)\n .addComponent(jLabel10))\n .addGap(15, 15, 15)\n .addComponent(jLabel4))\n .addGroup(layout.createSequentialGroup()\n .addGap(100, 100, 100)\n .addComponent(jLabel15)\n .addGap(119, 119, 119)\n .addComponent(jLabel14)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel11)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel9)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addGap(380, 380, 380))\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel13)\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel15)\n .addComponent(jLabel14))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n );\n\n pack();\n }",
"public Text(java.awt.Frame parent, boolean modal, int x1, int y1) {\n super(parent, modal);\n x = x1; /*FAULT:: x = y1; */\n y = y1;\n\n this.setTitle(\"Text\");\n\n\n this.setSize(375, 50);\n initComponents();\n addSizes();\n addFamilies();\n families.setSelectedIndex(letterTool.currentFont);\n underline.setSelected(letterTool.underlineness);\n bold.setSelected(letterTool.boldness);\n italics.setSelected(letterTool.italicness);\n size.setSelectedIndex(letterTool.currentSize);\n\n ok_action = false;\n }",
"public Shape(int x, int y, int deltaX, int deltaY, int width, int height,String text) {\n\t\t_x = x;\n\t\t_y = y;\n\t\t_deltaX = deltaX;\n\t\t_deltaY = deltaY;\n\t\t_width = width;\n\t\t_height = height;\n\t\tthis.text = text;\n\t}",
"public Text(double x, double y, String text)\n {\n super(x, y, text);\n initialize();\n }",
"public static void main(String[] args)\n {\n String dataDir = RunExamples.getDataDir_Text();\n\n // Create an instance of Presentation class\n Presentation presentation = new Presentation();\n\n // Access the first slide \n ISlide slide = presentation.getSlides().get_Item(0);\n\n // Add an AutoShape of Rectangle type\n IAutoShape ashp = slide.getShapes().addAutoShape(ShapeType.Rectangle, 150, 75, 350, 350);\n\n // Add TextFrame to the Rectangle\n ashp.addTextFrame(\" \");\n ashp.getFillFormat().setFillType(FillType.NoFill);\n\n // Accessing the text frame\n ITextFrame txtFrame = ashp.getTextFrame();\n txtFrame.getTextFrameFormat().setAutofitType(TextAutofitType.Shape);\n\n // Create the Paragraph object for text frame\n IParagraph para = txtFrame.getParagraphs().get_Item(0);\n\n // Create Portion object for paragraph\n IPortion portion = para.getPortions().get_Item(0);\n portion.setText(\"A quick brown fox jumps over the lazy dog. A quick brown fox jumps over the lazy dog.\");\n portion.getPortionFormat().getFillFormat().setFillType(FillType.Solid);\n portion.getPortionFormat().getFillFormat().getSolidFillColor().setColor(Color.BLACK);\n\n // Save Presentation\n presentation.save(dataDir + \"formatText_out.pptx\", SaveFormat.Pptx);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n\n setTitle(\"الفصل الثانى\");\n setResizable(false);\n getContentPane().setLayout(null);\n\n jPanel1.setLayout(null);\n\n jTextArea1.setEditable(false);\n jTextArea1.setBackground(new java.awt.Color(255, 153, 153));\n jTextArea1.setColumns(20);\n jTextArea1.setFont(new java.awt.Font(\"Courier New\", 0, 24)); // NOI18N\n jTextArea1.setRows(5);\n jTextArea1.setText(\"ثانيا اللغة المنطوقة / المسموعة :-\\nتعريف :\\nتعد اللغة المنطوقة من أكثر مكونات بنية الوسائط المتعددة التفاعلية \\nاستخداما ويقصد بها أحاديث مسموعة \\nومنطوقة بلغة ما تنبعث من السماعة الملحقة \\nبالجهاز بغرض إعطاء توجيهات \\nأو إرشادات للمتعلم أو توصيل معلومة أو مهارة معينة و وبذلك \\nفهي تزيد من الفهم والتفاعل وتشد الانتباه.\\n\\nمراحل انتاج الصوت :\\n1- مرحلة ما قبل الانتاج:\\nويقصد بها عملية الاعدادوالتجهيز قبل البدء في التسجيل وتشمل تحديد \\nالاهداف المطلوبة والوقت اللازم للتسجيل أو الكتابة أو اختيار الموسيقى \\n2- مرحلة ما بعد الإنتاج :\\nحيث إنها عملية تجهيز وإعداد العناصر الصوتية \\nفي شكل وسائط قابلة للتوزيع والاستخدام \\n\\nمعايير توطيف اللغه المنطوقه فى برامج الوسائط المتعدده التفاعليه:\\nالا يكرر التعليق نفس محتوى النص المكتوب-\\nتجنب استخدام نغمات صوتية متقاربة حتي يستطيع المتعلم أن يميز بينهما .-\\nيجب أن يتكامل الصوت المستخدم في أي موضع بوجهات التفاعل مع المستخدم-\\n\\n\");\n jTextArea1.setToolTipText(\"الفصل الثانى\");\n jScrollPane1.setViewportView(jTextArea1);\n\n jPanel1.add(jScrollPane1);\n jScrollPane1.setBounds(0, 0, 940, 650);\n\n jButton1.setText(\"jButton1\");\n jPanel1.add(jButton1);\n jButton1.setBounds(128, 806, 73, 23);\n\n jButton2.setBackground(new java.awt.Color(102, 255, 255));\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/courcelab/back1.png\"))); // NOI18N\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton2);\n jButton2.setBounds(360, 690, 70, 20);\n\n jButton3.setBackground(new java.awt.Color(102, 255, 255));\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/courcelab/forward1.png\"))); // NOI18N\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton3);\n jButton3.setBounds(580, 690, 70, 20);\n\n jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/courcelab/home-.png\"))); // NOI18N\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton4);\n jButton4.setBounds(470, 660, 70, 70);\n\n getContentPane().add(jPanel1);\n jPanel1.setBounds(0, 0, 950, 750);\n\n pack();\n }",
"private void initializeIntroString()\r\n {\r\n introString = new JTextArea(problem.getIntroduction());\r\n introString.setFont(new Font(Font.MONOSPACED, Font.BOLD, 14));\r\n introString.setPreferredSize(new Dimension(\r\n calculateTextWidth(problem.getIntroduction().split(\"\\\\n\"), // string array\r\n introString.getFontMetrics(introString.getFont())),// font metric\r\n calculateTextHeight(problem.getIntroduction().split(\"\\\\n\"),// string array\r\n introString.getFontMetrics(introString.getFont())))); // font metric\r\n // wrap it in a label\r\n stringLabel = new JLabel();\r\n stringLabel.setLayout(new FlowLayout(FlowLayout.CENTER));\r\n stringLabel.add(introString);\r\n stringLabel.setPreferredSize(introString.getPreferredSize());\r\n }",
"void draw_text(int x, int y, char[][] _display, String txt) {\n for (int i = 0; i < txt.length(); i++)\n {\n draw_char(x + i, y, _display, txt.charAt(i));\n }\n }",
"public TextAreaEntropy(String text) {\r\n super(text);\r\n initComponents();\r\n }",
"private JLabel makeText(String text, Font font) {\n JLabel label = new JLabel(text, JLabel.CENTER);\n label.setFont(font);\n label.setForeground(RRConstants.BORDER_COLOR);\n return label;\n }",
"private ModelInstance newText(String text)\n {\n BufferedImage onePixelImage = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n Graphics2D awtGraphics2D = onePixelImage.createGraphics();\n awtGraphics2D.setFont(awtFont != null ? awtFont : DEFAULT_FONT);\n FontMetrics awtFontMetrics = awtGraphics2D.getFontMetrics();\n int textWidthPixels = text.isEmpty() ? 1 : awtFontMetrics.stringWidth(text);\n int textHeightPixels = awtFontMetrics.getHeight();\n awtGraphics2D.dispose();\n\n // Create image for use in texture\n BufferedImage bufferedImageRGBA8 = new BufferedImage(textWidthPixels, textHeightPixels, BufferedImage.TYPE_INT_ARGB);\n awtGraphics2D = bufferedImageRGBA8.createGraphics();\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);\n awtGraphics2D.setFont(awtFont != null ? awtFont : DEFAULT_FONT);\n awtFontMetrics = awtGraphics2D.getFontMetrics();\n awtGraphics2D.setColor(awtColor);\n int x = 0;\n int y = awtFontMetrics.getAscent();\n if (!text.isEmpty())\n awtGraphics2D.drawString(text, x, y);\n awtGraphics2D.dispose();\n\n Pixmap pixmap = new Pixmap(textWidthPixels, textHeightPixels, Pixmap.Format.RGBA8888);\n BytePointer rgba8888BytePointer = new BytePointer(pixmap.getPixels());\n DataBuffer dataBuffer = bufferedImageRGBA8.getRaster().getDataBuffer();\n for (int i = 0; i < dataBuffer.getSize(); i++)\n {\n rgba8888BytePointer.putInt(i * Integer.BYTES, dataBuffer.getElem(i));\n }\n\n Texture libGDXTexture = new Texture(new PixmapTextureData(pixmap, null, false, false));\n Material material = new Material(TextureAttribute.createDiffuse(libGDXTexture),\n ColorAttribute.createSpecular(1, 1, 1, 1),\n new BlendingAttribute(GL41.GL_SRC_ALPHA, GL41.GL_ONE_MINUS_SRC_ALPHA));\n long attributes = VertexAttributes.Usage.Position | VertexAttributes.Usage.Normal | VertexAttributes.Usage.TextureCoordinates;\n\n float textWidthMeters = textHeightMeters * (float) textWidthPixels / (float) textHeightPixels;\n\n float x00 = 0.0f;\n float y00 = 0.0f;\n float z00 = 0.0f;\n float x10 = textWidthMeters;\n float y10 = 0.0f;\n float z10 = 0.0f;\n float x11 = textWidthMeters;\n float y11 = textHeightMeters;\n float z11 = 0.0f;\n float x01 = 0.0f;\n float y01 = textHeightMeters;\n float z01 = 0.0f;\n float normalX = 0.0f;\n float normalY = 0.0f;\n float normalZ = 1.0f;\n Model model = modelBuilder.createRect(x00, y00, z00, x10, y10, z10, x11, y11, z11, x01, y01, z01, normalX, normalY, normalZ, material, attributes);\n return new ModelInstance(model);\n }",
"public face2(){\r\n\tsuper(\"library\");\r\n\tface1.any1();\r\n\t//y=new GridLayout(face1.b,0);\r\n\tsetLayout(new BorderLayout());\r\n\tString s=\"\";\r\n\t//d=new JLabel[face1.b];\r\n\t\r\n\tfor(int i=0;i<face1.b;i++)\r\n\t{//d[i]=new JLabel(face1.a[i]);\r\n\t//add (d[i]);\r\n\ts=s+face1.a[i]+\"\\n\";\r\n\t}\r\n\tJTextArea f=new JTextArea(s,5,5);\r\n\t\t\tf.setEditable(false);\r\n\t\t\tadd(new JScrollPane(f), BorderLayout.CENTER);\r\n\t\t\r\n\t}",
"public TextArea getInputPane();",
"private void makeLabels() {\n infoPanel = new JPanel();\n\n infoText = new JTextArea(30,25);\n\n infoPanel.add(infoText);\n }",
"public FontFrame(JTextArea txtWorkplace) {\n initComponents();\n Font[] fontList = new Font[]{};\n fontList = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();\n for (int i = 0; i < fontList.length; i++) {\n cbbFont.addItem(fontList[i].getFontName());\n }\n fontName = (String) cbbFont.getSelectedItem();\n fontSize = (int) spinnerSize.getValue();\n fontStyle = (int) cbbStyle.getSelectedIndex();\n lblTest.setFont(new Font(fontName,fontSize,fontSize));\n this.txtWorkplace = txtWorkplace;\n }",
"public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }",
"private void designGUI() {\n\t\tmnb= new JMenuBar();\r\n\t\tFileMenu=new JMenu(\"file\");\r\n\t\tEditMenu=new JMenu(\"edit\");\r\n\t\timg1=new ImageIcon(\"s.gif\");\r\n\t\tNew=new JMenuItem(\"new\",img1);\r\n\t\topen=new JMenuItem(\"open\");\r\n\t\tsave=new JMenuItem(\"save\");\r\n\t\tquit=new JMenuItem(\"quit\");\r\n\t\tcut=new JMenuItem(\"cut\");\r\n\t\tcopy=new JMenuItem(\"copy\");\r\n\t\tpaste=new JMenuItem(\"paste\");\r\n\t\t\r\n\t\tFileMenu.add(New);\r\n\t\tFileMenu.add(save);\r\n\t\tFileMenu.add(open);\r\n\t\tFileMenu.add(new JSeparator());\r\n\t\tFileMenu.add(quit);\r\n\t\tEditMenu.add(cut);\r\n\t\tEditMenu.add(copy);\r\n\t\tEditMenu.add(paste);\r\n\t\t\r\n\t\tmnb.add(FileMenu);\r\n\t\tmnb.add(EditMenu);\r\n\t\tsetJMenuBar(mnb);\r\n\t\t\r\n\t\t//to add shortcut\r\n\t\tquit.setMnemonic('q');\r\n\t\t//quit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W,ActionEvent.CTRL_MASK));\r\n\t\tquit.addActionListener((ActionEvent e)->\r\n\t\t\t\t{\r\n\t\t\tSystem.exit(0);\r\n\t\t\t\t});\r\n\t\t\r\n\t\t//moving the mouse near to it we get this\r\n\t\tcut.setToolTipText(\"cut the text\");\r\n\t\t//new way fro get domension\r\n\t\tdim=getToolkit().getScreenSize();\r\n\t\tint x=(int) dim.getHeight();\r\n\t\tint y=(int) dim.getWidth();\r\n\t\tc=getContentPane();\r\n\t\tc.setLayout(new BorderLayout());\r\n\t\tmainpanel=new JPanel();\r\n\t\tta1=new JTextArea(x/18,y/12);\r\n\t\tmainpanel.add(new JScrollPane(ta1));\r\n\t\tc.add(mainpanel,BorderLayout.CENTER);\r\n\t\tmymethods();\r\n\t\topen.addActionListener(this);\r\n\t\tsave.addActionListener(this);\r\n\t\tcut.addActionListener(this);\r\n\t\tcopy.addActionListener(this);\r\n\t\tpaste.addActionListener(this);\r\n\t\t\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblTitle = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n txtGioiThieu = new javax.swing.JTextPane();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"CÔNG TY NƯỚC GIẢI KHÁT TIENLONG\");\n\n lblTitle.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/edu/poly/images/logo_1.png\"))); // NOI18N\n lblTitle.setMaximumSize(new java.awt.Dimension(512, 331));\n lblTitle.setMinimumSize(new java.awt.Dimension(512, 331));\n lblTitle.setPreferredSize(new java.awt.Dimension(512, 331));\n getContentPane().add(lblTitle, java.awt.BorderLayout.CENTER);\n\n txtGioiThieu.setEditable(false);\n txtGioiThieu.setText(\"Đây là phần mềm cung cấp giải pháp cho doanh nghiệp TIENLONG. Phần mềm giúp giảm\\ntải nhanh chóng các công việc thủ công dẫn dễ đến sai xót từ khâu bán hàng đến khâu\\nchiết rót, kiểm tra …, giúp người bán hàng nhanh và thuận tiện hơn, giúp các lãnh đạo\\ncó thể quản lý một cách hiệu quả.\\n\\nPhần mềm ngoài các chức năng cập nhật thông tin, phân quyền người sử dụng, sao lưu\\nvà phục hồi cơ sở dữ liệu, quản lý phòng ban, nhân viên, quản lý các loại bia và nước\\ngiải khát, quản lý các dụng cụ chứa… Phần mềm còn có thể xuất các báo cáo để in hay\\ndưới dạng word, excel, pdf.. theo từng loại hàng hóa, từng nhân viên, theo doanh thu…\\n\\nPhần mềm còn hướng tới tiêu chí gần gũi và thân thiện hơn với người sử dụng để giúp\\nngười sử dụng có thể sử dụng phần mềm một cách nhanh chóng và đầy hiệu quả.\\n\\nPhần mềm có thể tùy biến theo các yêu cầu mới của khách hàng.\"); // NOI18N\n txtGioiThieu.setMinimumSize(new java.awt.Dimension(43, 118));\n jScrollPane1.setViewportView(txtGioiThieu);\n\n getContentPane().add(jScrollPane1, java.awt.BorderLayout.PAGE_END);\n\n pack();\n }",
"private void initialize() {\n\t\t\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJTextArea txtrPleaseCreateAn = new JTextArea();\n\t\ttxtrPleaseCreateAn.setBackground(SystemColor.window);\n\t\ttxtrPleaseCreateAn.setText(\" Please create an account to use baby Amazon\");\n\t\ttxtrPleaseCreateAn.setFont(new Font(\"Times New Roman\", Font.BOLD, 15));\n\t\ttxtrPleaseCreateAn.setBounds(77, 26, 311, 16);\n\t\tframe.getContentPane().add(txtrPleaseCreateAn);\n\t\t\n//\t\tJTextArea txtrName = new JTextArea();\n//\t\ttxtrName.setText(\"Name\");\n//\t\ttxtrName.setBounds(18, 102, 142, 27);\n//\t\tframe.getContentPane().add(txtrName);\n\t\t\n\t\tJTextArea txtrUsername = new JTextArea();\n\t\ttxtrUsername.setBackground(SystemColor.window);\n\t\ttxtrUsername.setEditable(false);\n\t\ttxtrUsername.setText(\"Username:\");\n\t\ttxtrUsername.setBounds(103, 108, 80, 16);\n//\t\ttxtrUsername.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tframe.getContentPane().add(txtrUsername);\n\t\t\n\t\tJTextArea txtrPassword = new JTextArea();\n\t\ttxtrPassword.setBackground(SystemColor.window);\n\t\ttxtrPassword.setEditable(false);\n\t\ttxtrPassword.setText(\"Password:\");\n\t\ttxtrPassword.setBounds(103, 163, 78, 16);\n//\t\ttxtrPassword.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tframe.getContentPane().add(txtrPassword);\n\t\t\n//\t\ttextField = new JTextField();\n//\t\ttextField.setBounds(236, 103, 130, 26);\n//\t\tframe.getContentPane().add(textField);\n//\t\ttextField.setColumns(10);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\ttextField_1.setColumns(10);\n\t\ttextField_1.setBounds(103, 124, 164, 26);\n\t\tframe.getContentPane().add(textField_1);\n\t\t\n\t\ttextField_2 = new JTextField();\n\t\ttextField_2.setColumns(10);\n\t\ttextField_2.setBounds(103, 179, 164, 26);\n\t\tframe.getContentPane().add(textField_2);\n\t\t\n\t\t\n\t\t\n\t\tJRadioButton rdbtnNewRadioButton = new JRadioButton(\"Employee\");\n\t\trdbtnNewRadioButton.setBounds(103, 73, 141, 23);\n\t\tframe.getContentPane().add(rdbtnNewRadioButton);\n\t\t\n\t\tJRadioButton rdbtnUser = new JRadioButton(\"User\");\n\t\trdbtnUser.setBounds(247, 72, 141, 23);\n\t\tframe.getContentPane().add(rdbtnUser);\n\t\t\n\t\tButtonGroup bgroup = new ButtonGroup();\n\t\tbgroup.add(rdbtnNewRadioButton);\n\t\tbgroup.add(rdbtnUser);\n\t\t\n\t\t\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Create Account\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t\t\t\tString password = textField_2.getText();\n\t\t\t\tString name = textField_1.getText();\n\t\t\t\tBoolean userBtn = false;\n\t\t\t\tBoolean empBtn = false;\n\t\t\t\t\n\t\t\t\tif(rdbtnUser.isSelected()) {\n\t\t\t\t\t\n\t\t\t\t\tuserBtn = true;\n\t\t\t\t}\n\t\t\t\tif(rdbtnNewRadioButton.isSelected()) {\n\t\t\t\t\t\n\t\t\t\t\t empBtn = true;\n\t\t\t\t}\n\t\t\t\tcreateUser(name, password, userBtn, empBtn);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tbtnNewButton.setBounds(211, 217, 144, 29);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tnew TextAreaFrameTemplate();\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttextPane.insertIcon(new ImageIcon(\"images/yuzz.PNG\"));\n\t\t\t\ttry {\n\t\t\t\t\tdoc.insertString(doc.getLength(), \" \\n \", left);\n\t\t\t\t} catch (BadLocationException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t//\tpanel1_design();\n\n\t\t\t}",
"@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawString(str, 10, 10);\r\n\t\tg.drawLine(10, 20, 110, 20);\r\n\t\tg.drawRect(pX, 30, 100, 100);\r\n\t\t\r\n\t}",
"public void run()\n {\n //Generate text, pack and show the frame\n generateTextArea();\n pack();\n setMinimumSize(getSize());\n setVisible(true);\n }",
"private void initGUI() {\n\t\tJPanel mainPanel = new JPanel(new BorderLayout());\n\t\t// This is the story we took from Wikipedia.\n\t\tString story = \"The Internet Foundation Classes (IFC) were a graphics \"\n\t\t\t\t+ \"library for Java originally developed by Netscape Communications \"\n\t\t\t\t+ \"Corporation and first released on December 16, 1996.\\n\\n\"\n\t\t\t\t+ \"On April 2, 1997, Sun Microsystems and Netscape Communications\"\n\t\t\t\t+ \" Corporation announced their intention to combine IFC with other\"\n\t\t\t\t+ \" technologies to form the Java Foundation Classes. In addition \"\n\t\t\t\t+ \"to the components originally provided by IFC, Swing introduced \"\n\t\t\t\t+ \"a mechanism that allowed the look and feel of every component \"\n\t\t\t\t+ \"in an application to be altered without making substantial \"\n\t\t\t\t+ \"changes to the application code. The introduction of support \"\n\t\t\t\t+ \"for a pluggable look and feel allowed Swing components to \"\n\t\t\t\t+ \"emulate the appearance of native components while still \"\n\t\t\t\t+ \"retaining the benefits of platform independence. This feature \"\n\t\t\t\t+ \"also makes it easy to have an individual application's appearance \"\n\t\t\t\t+ \"look very different from other native programs.\\n\\n\"\n\t\t\t\t+ \"Originally distributed as a separately downloadable library, \"\n\t\t\t\t+ \"Swing has been included as part of the Java Standard Edition \"\n\t\t\t\t+ \"since release 1.2. The Swing classes are contained in the \"\n\t\t\t\t+ \"javax.swing package hierarchy.\\n\\n\";\n\t\t// We create the TextArea and pass the story in as an argument.\n\t\tJTextArea storyArea = new JTextArea(story);\n\t\tstoryArea.setEditable(true);\n\t\tstoryArea.setWrapStyleWord(true);\n\t\t// We create the ScrollPane and instantiate it with the TextArea as an argument\n\t\tJScrollPane area = new JScrollPane(storyArea);\t\t\t\n\t\tmainPanel.add(area);\t\n\t\tthis.setContentPane(mainPanel);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setSize(350, 300);\n\t\tthis.setVisible(true);\n\t}",
"public void addText(String text) {\n\t\tNodeList frameList = maNoteElement.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), \"frame\");\n\t\tif (frameList.getLength() > 0) {\n\t\t\tDrawFrameElement frame = (DrawFrameElement) frameList.item(0);\n\t\t\tNodeList textBoxList = frame.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), \"text-box\");\n\t\t\tif (textBoxList.getLength() > 0) {\n\t\t\t\tDrawTextBoxElement textBox = (DrawTextBoxElement) textBoxList.item(0);\n\t\t\t\tTextPElement newPara = textBox.newTextPElement();\n\t\t\t\tnewPara.setTextContent(text);\n\t\t\t}\n\t\t}\n\t}",
"public static void tweakTipEditorPane(JEditorPane textArea) {\n\n // Jump through a few hoops to get things looking nice in Nimbus\n if (UIManager.getLookAndFeel().getName().equals(\"Nimbus\")) {\n Color selBG = textArea.getSelectionColor();\n Color selFG = textArea.getSelectedTextColor();\n textArea.setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());\n textArea.setSelectedTextColor(selFG);\n textArea.setSelectionColor(selBG);\n }\n\n textArea.setEditable(false); // Required for links to work!\n textArea.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\n\n // Make selection visible even though we are not (initially) focusable.\n textArea.getCaret().setSelectionVisible(true);\n\n // Make it use the \"tool tip\" background color.\n textArea.setBackground(TipUtil.getToolTipBackground());\n\n // Force JEditorPane to use a certain font even in HTML.\n // All standard LookAndFeels, even Nimbus (!), define Label.font.\n Font font = UIManager.getFont(\"Label.font\");\n if (font == null) { // Try to make a sensible default\n font = new Font(\"SansSerif\", Font.PLAIN, 12);\n }\n HTMLDocument doc = (HTMLDocument) textArea.getDocument();\n doc.getStyleSheet().addRule(\n \"body { font-family: \" + font.getFamily() + \"; font-size: \"\n + font.getSize() + \"pt; }\");\n\n }",
"public Text(double x, double y, String text, TextStyle style)\n {\n super(x, y, text);\n this.style = style;\n initialize();\n }",
"private void buildGUI() {\r\n textArea = new JTextArea(20, 50);\r\n textArea.setEditable(false);\r\n textArea.setLineWrap(true);\r\n add(new JScrollPane(textArea), BorderLayout.CENTER);\r\n\r\n Box box = Box.createHorizontalBox();\r\n add(box, BorderLayout.SOUTH);\r\n inputTextField = new JTextField();\r\n sendButton = new JButton(\"Send\");\r\n box.add(inputTextField);\r\n box.add(sendButton);\r\n\r\n // Action for the inputTextField and the goButton\r\n ActionListener sendListener = new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n String str = inputTextField.getText();\r\n if (str != null && str.trim().length() > 0) {\r\n chatAccess.send(str);\r\n }\r\n inputTextField.selectAll();\r\n inputTextField.requestFocus();\r\n inputTextField.setText(\"\");\r\n }\r\n };\r\n inputTextField.addActionListener(sendListener);\r\n sendButton.addActionListener(sendListener);\r\n\r\n this.addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n chatAccess.close();\r\n }\r\n });\r\n }",
"protected JComponent makeTextPanel(String text)\n\t{\n\t\tJPanel panel = new JPanel(false);\n\t\tpanel.setBackground(new Color(55, 55, 55));\n\t\tpanel.setLayout(null);\n\t\treturn panel;\n\t}",
"public static void fillTextArea() {\r\n\t\tString choice = (String) comboBox.getSelectedItem();\r\n\t\tStatement statement;\r\n\t\ttry {\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\tresults = statement\r\n\t\t\t\t\t.executeQuery(\"Select People.PeopleName,paragraph.text \"\r\n\t\t\t\t\t\t\t+ \"From People \" + \"inner join paragraph \"\r\n\t\t\t\t\t\t\t+ \"on People.peopleKey=paragraph.peopleKey \"\r\n\t\t\t\t\t\t\t+ \"where PeopleName = '\" + choice + \"'\");\r\n\r\n\t\t\tparagraphtextArea.setText(\"\");\r\n\t\t\tparagraphtextArea.setEditable(true);\r\n\t\t\twhile (results.next()) {\r\n\t\t\t\tparagraphtextArea.append(results.getString(\"text\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void setUpTextArea() {\n noteContent.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n int remaining = NoteText.NOTE_MAX_CHARACTER_LIMIT - newValue.length();\n feedbackLabel.setStyle(\"-fx-font-size: 12; -fx-text-fill: white;\");\n feedbackLabel.setText(\"Characters remaining: \" + remaining);\n }\n });\n\n noteContent.setTextFormatter(new TextFormatter<String>(text ->\n text.getControlNewText().length() <= NoteText.NOTE_MAX_CHARACTER_LIMIT\n ? text : null));\n }",
"public interface IText extends ISinglePoint {\n\n /**\n * Defines whether the text rotation is relative to the screen or geographic\n * north\n * \n * @author sgilbert\n * \n */\n public static enum TextRotation {\n SCREEN_RELATIVE, NORTH_RELATIVE\n }\n\n /**\n * Defines the text justification options\n * \n * @author sgilbert\n * \n */\n public static enum TextJustification {\n LEFT_JUSTIFY, CENTER, RIGHT_JUSTIFY\n }\n\n /**\n * Defines available font styles\n * \n * @author sgilbert\n * \n */\n public static enum FontStyle {\n REGULAR, BOLD, ITALIC, BOLD_ITALIC\n }\n\n public static enum DisplayType {\n NORMAL, BOX, UNDERLINE, OVERLINE\n }\n\n /**\n * Gets the text to draw\n * \n * @return Array of text strings\n */\n public String[] getString();\n\n /**\n * Gets the name of the font to use\n * \n * @return font name\n */\n public String getFontName();\n\n /**\n * Gets the size of the font\n * \n * @return font size\n */\n public float getFontSize();\n\n /**\n * Gets the font style to use\n * \n * @return font style\n */\n public FontStyle getStyle();\n\n /**\n * Gets the lat/lon refernce position for the text display\n * \n * @return lat/lon coordinate\n */\n public Coordinate getPosition();\n\n /**\n * Gets the color to use for the text\n * \n * @return text color\n */\n public Color getTextColor();\n\n /**\n * Gets the specified justification\n * \n * @return the text justification\n */\n public TextJustification getJustification();\n\n /**\n * Gets the rotation angle to use\n * \n * @return rotation angle\n */\n public double getRotation();\n\n /**\n * Gets how the rotation angle is applied\n * \n * @return the rotation relativity\n */\n public TextRotation getRotationRelativity();\n\n /**\n * Determines whether the text should be displayed with an outline box\n * \n * @return true, if outline box should be displayed\n */\n public DisplayType getDisplayType();\n\n /**\n * Determines whether text background should be masked out.\n * \n * @return true, if background is to be masked\n */\n public Boolean maskText();\n\n /**\n * Gets the offset in the x direction for the text location. The offset is\n * specified in half-characters.\n * \n * @return The x direction offset\n */\n public int getXOffset();\n\n /**\n * Gets the offset in the y direction for the text location. The offset is\n * specified in half-characters.\n * \n * @return The y direction offset\n */\n public int getYOffset();\n\n public Boolean getHide();\n\n public Boolean getAuto();\n\n public int getIthw();\n\n public int getIwidth();\n\n}",
"private void textInfoBottom(JPanel panel_TextInfo) {\n\t\tcontentPane.setLayout(gl_contentPane_1);\n\t\ttxtrPreparing = new JTextArea();\n\t\ttxtrPreparing.setBackground(Color.WHITE);\n\t\ttxtrPreparing.setText(\"Preparing... \");\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setBackground(Color.WHITE);\n\t\ttextArea.setText(\" $10\");\n\t\tGroupLayout gl_panel_TextInfo = new GroupLayout(panel_TextInfo);\n\t\tgl_panel_TextInfo.setHorizontalGroup(\n\t\t\tgl_panel_TextInfo.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_TextInfo.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addComponent(txtrPreparing, GroupLayout.PREFERRED_SIZE, 232, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(18)\n\t\t\t\t\t.addComponent(textArea, GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE))\n\t\t);\n\t\tgl_panel_TextInfo.setVerticalGroup(\n\t\t\tgl_panel_TextInfo.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_panel_TextInfo.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_panel_TextInfo.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(txtrPreparing, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textArea, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t);\n\t\tpanel_TextInfo.setLayout(gl_panel_TextInfo);\n\t}",
"private void drawJavaString(JComponent frame) {\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\t// opens test.java\n\t\t\tbr = new BufferedReader(new FileReader(\"test.java\"));\n\t\t\t// variables to keep track of message\n\t\t\t//String message = \"<html>\";\n\t\t\tString message = \"\";\n\t\t\tString sCurrentLine;\n\t\t\t// loops through each line to read file\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\tmessage += sCurrentLine + \"\\r\";\n\t\t\t}\n\t\t\t//message += \"</html>\";\n\t\t\t// sets JTextPane codeLabel attributes\n\t\t\tcodeLabel.setContentType(\"text/plain\");\n\t\t\tcodeLabel.setText(message);\n\t\t\tcodeLabel.setOpaque(false);\n\t\t\tcodeLabel.setEditable(true);\n\t\t\tcodeLabel.setText(message);\n\t\t\tcodeLabel.setFont(new Font(\"Monospaced\", Font.PLAIN, 12));\n\t\t\tcodeLabel.setForeground(Color.MAGENTA);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public print() {\n initComponents();\n jTextArea1.setEditable(false);\n jTextArea2.setEditable(false);\n jTextArea6.setEditable(false);\n jTextArea5.setEditable(false);\n\n }"
] | [
"0.7171199",
"0.68995863",
"0.67319757",
"0.6699822",
"0.66764903",
"0.6627435",
"0.65464455",
"0.649321",
"0.6475411",
"0.6366971",
"0.6328126",
"0.63064295",
"0.62885237",
"0.62480783",
"0.6245128",
"0.623272",
"0.6230215",
"0.62112856",
"0.61783445",
"0.6173275",
"0.6170884",
"0.6162699",
"0.6160211",
"0.61482024",
"0.613236",
"0.6044086",
"0.60284144",
"0.60120535",
"0.600847",
"0.6007824",
"0.5975144",
"0.5971959",
"0.59383696",
"0.59360003",
"0.59346414",
"0.5918529",
"0.5873384",
"0.58618075",
"0.5852319",
"0.58502895",
"0.58500284",
"0.58356404",
"0.583504",
"0.58304465",
"0.5816628",
"0.5811446",
"0.58028924",
"0.5794961",
"0.57885474",
"0.57798934",
"0.5775545",
"0.5773865",
"0.5771142",
"0.5750977",
"0.5730735",
"0.57284886",
"0.5726464",
"0.5725168",
"0.571643",
"0.571143",
"0.57074124",
"0.569844",
"0.5695675",
"0.5684821",
"0.5680038",
"0.5674503",
"0.56735134",
"0.5666545",
"0.56648",
"0.5655198",
"0.56495196",
"0.5646848",
"0.5639723",
"0.5634822",
"0.56282735",
"0.56213003",
"0.561909",
"0.56057066",
"0.56056017",
"0.5605167",
"0.5590865",
"0.55861974",
"0.5582428",
"0.5581565",
"0.5577326",
"0.5575213",
"0.557514",
"0.5572027",
"0.55704725",
"0.55661786",
"0.5562112",
"0.5561782",
"0.55609757",
"0.5559437",
"0.55493844",
"0.5542663",
"0.55422366",
"0.55328965",
"0.55265766",
"0.5523146"
] | 0.74366945 | 0 |
/ method getHitPercent() assigns hitPercent a value pre: called by class post: hitPercent is set a value | public void getHitPercent(double hitPer) {
hitPercent = hitPer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double calculateHpPercent();",
"public double getPercent() { return this.percentage; }",
"public double getPercentThreshold()\n {\n return percentThreshold;\n }",
"float getPercentHealth();",
"public float getPercent() {\n return percent;\n }",
"float getBonusPercentHP();",
"public double getPercent() {\r\n\t\treturn percent;\r\n\t}",
"public double getHitsPercentual()\n\t{\n\t\t//Convert int to double values\n\t\tdouble doubleHits = hits;\n\t\tdouble doubleTotalProcessedStops = totalProcessedStops;\n\t\t\n\t\t//Hits percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (doubleHits / doubleTotalProcessedStops));\n\t}",
"public int getPercentage() {\r\n return Percentage;\r\n }",
"java.lang.String getPercentage();",
"public Long get_cachepercenthit() throws Exception {\n\t\treturn this.cachepercenthit;\n\t}",
"public Long get_cacherecentpercenthit() throws Exception {\n\t\treturn this.cacherecentpercenthit;\n\t}",
"public abstract double getPercentDead();",
"public void setPercent(float value) {\n this.percent = value;\n }",
"public Double getProgressPercent();",
"public void setPercentThreshold(double d)\n {\n percentThreshold = d;\n }",
"double getHitRate();",
"double getHitRate();",
"public double getMainPercentage(){return mainPercentage;}",
"public Long get_cacherecentpercentbytehit() throws Exception {\n\t\treturn this.cacherecentpercentbytehit;\n\t}",
"int getPercentageHeated();",
"public abstract void setPercentDead(double percent);",
"public Number getPercentage() {\n return (Number) getAttributeInternal(PERCENTAGE);\n }",
"public Long get_cachepercentbytehit() throws Exception {\n\t\treturn this.cachepercentbytehit;\n\t}",
"public void setHitCount(int count) {\nthis.hitpoints = count;\n}",
"public void setPercent(double percent) {\r\n\t\tthis.percent = percent;\r\n\t}",
"public float getPercentage() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn percentage;\r\n\t}",
"double getpercentage() {\n return this.percentage;\n }",
"public float getBonusPercentHP() {\n return bonusPercentHP_;\n }",
"public double getPercentage() {\n\t\treturn this.percentage;\n\t}",
"public double getHitSpeed() {\n return hitSpeed;\n }",
"public float getBonusPercentHP() {\n return bonusPercentHP_;\n }",
"public void setPercentage() {\n\t\tif (this.winnumber == 0) {\n\t\t\tthis.percentage = 0;\n\t\t} else {\n\t\t\tthis.percentage = (double) this.winnumber * 100 / (double) this.gamenumber;\n\t\t}\n\t}",
"public Float completionPercent() {\n return this.completionPercent;\n }",
"protected int hit() {\r\n\t\treturn hits;\r\n\t}",
"public int percent() {\n\t\tdouble meters = meters();\n\t\tif (meters < MIN_METERS) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn (int) (Math.pow((meters - MIN_METERS)\n\t\t\t\t/ (MAX_METERS - MIN_METERS) * Math.pow(100, CURVE),\n\t\t\t\t1.000d / CURVE));\n\t}",
"public double getOverhitDamage()\n\t{\n\t\treturn overhitDamage;\n\t}",
"public void setPercent(int percent) {\n\t\tdouble multiplier = Math.pow((double) percent, CURVE)\n\t\t\t\t/ Math.pow(100.00d, CURVE);\n\t\tLog.v(TAG, \"setting percent to: \" + percent + \" via multiplier: \"\n\t\t\t\t+ multiplier);\n\t\tsetMeters(((MAX_METERS - MIN_METERS) * multiplier) + MIN_METERS);\n\t}",
"private static void updateHitrate(String s) {\n long _missCountSum = getCounterResult(\"missCount\");\n long _opCountSum = getCounterResult(\"opCount\");\n if (_opCountSum == 0L) {\n return;\n }\n double _hitRate = 100.0 - _missCountSum * 100.0 / _opCountSum;\n System.err.println(Thread.currentThread() + \" \" + s + \", opSum=\" + _opCountSum + \", missSum=\" + _missCountSum + \", hitRate=\" + _hitRate);\n setResult(\"hitrate\", _hitRate, \"percent\", AggregationPolicy.AVG);\n }",
"public void countHits() {\nif (this.hitpoints <= 0) {\nreturn;\n}\nthis.hitpoints = this.hitpoints - 1;\n}",
"public double getCourseworkPercentage(){return courseworkPercentage;}",
"private double calcScorePercent() {\n\t\tdouble adjustedLab = totalPP * labWeight;\n\t\tdouble adjustedProj = totalPP * projWeight;\n\t\tdouble adjustedExam = totalPP * examWeight;\n\t\tdouble adjustedCodeLab = totalPP * codeLabWeight;\n\t\tdouble adjustedFinal = totalPP * finalWeight;\n\n\t\tlabScore = (labScore / labPP) * adjustedLab;\n\t\tprojScore = (projScore / projPP) * adjustedProj;\n\t\texamScore = (examScore / examPP) * adjustedExam;\n\t\tcodeLabScore = (codeLabScore / codeLabPP) * adjustedCodeLab;\n\t\tfinalExamScore = (finalExamScore / finalExamPP) * adjustedFinal;\n\n//\t\tdouble labPercent = labScore / adjustedLab;\n//\t\tdouble projPercent = projScore / adjustedProj;\n//\t\tdouble examPercent = examScore / adjustedExam;\n//\t\tdouble codeLabPercent = codeLabScore / adjustedCodeLab;\n//\t\tdouble finalPercent = finalExamScore / adjustedFinal;\n\n\t\tdouble totalPercent = (labScore + projScore + examScore + codeLabScore + finalExamScore) / totalPP;\n\t\t\n\t\tscorePercent = totalPercent;\n\t\t\n\t\treturn totalPercent;\n\t}",
"public void setOverallProgressPercent(int value) {\n this.overallProgressPercent = value;\n }",
"public int getOverallProgressPercent() {\n return overallProgressPercent;\n }",
"Float getFedAnimalsPercentage();",
"public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }",
"public int getHitPoints() {\n return hitPoints;\n }",
"protected float getHealthPoint() {\n\t\treturn healthPoint;\n\t}",
"public Float percentComplete() {\n return this.percentComplete;\n }",
"public java.lang.String getPercentage() {\n java.lang.Object ref = percentage_;\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 percentage_ = s;\n }\n return s;\n }\n }",
"public Long get_cachepercent304hits() throws Exception {\n\t\treturn this.cachepercent304hits;\n\t}",
"public java.lang.String getPercentage() {\n java.lang.Object ref = percentage_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n percentage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getHitPoints() {\n return this.counter;\n }",
"public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}",
"@Override\n public void hit(int atk) {\n hp = hp - atk;\n }",
"public double getPercentComplete() {\n\t\tthis.percent_complete = ((double) lines_produced / (double) height) * 100.0;\n\t\treturn this.percent_complete;\n\t}",
"void spray(double percent)\n {\n roaches = (int) (roaches - (roaches * percent / 100));\n }",
"public Number getPercentageComplete()\r\n {\r\n return (m_percentageComplete);\r\n }",
"public Double percentComplete() {\n return this.percentComplete;\n }",
"public int getHitsLeft(){\n return hitsLeft;\n }",
"public final void mPERCENT() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = PERCENT;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:433:8: ( '%' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:433:16: '%'\n\t\t\t{\n\t\t\tmatch('%'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public int attack()\n {\n int percent = Randomizer.nextInt(100) + 1;\n int baseDamage = super.attack();\n if(percent <= 5)\n {\n baseDamage *= 2;\n baseDamage += 50;\n }\n return baseDamage;\n }",
"private float calculateTip( float amount, int percent, int totalPeople ) {\n\t\tfloat result = (float) ((amount * (percent / 100.0 )) / totalPeople);\n\t\treturn result;\n\t}",
"public final float getMovementPercent() {\r\n\t\treturn movementPercent;\r\n\t}",
"int getRemainderPercent();",
"public com.google.protobuf.ByteString\n getPercentageBytes() {\n java.lang.Object ref = percentage_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n percentage_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Long get_cacherecentpercent304hits() throws Exception {\n\t\treturn this.cacherecentpercent304hits;\n\t}",
"public void setPercentComplete(double percentComplete) {\n\t\t\n\t}",
"public double getProgress()\n {\n return ((double)getCount() / (double)getGoal());\n }",
"private double fillPercent() {\n\t\tdouble percent = 0;\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tif (ll.size() != 0) percent++;\n\t\t}\n\t\treturn (percent / myBuckets.size()) * 100;\n\t}",
"public BigDecimal getUsagePercentage() {\n return this.usagePercentage;\n }",
"private void setProgressPercent(Integer integer) {\n\t\t\n\t}",
"public Long get_cacherecentpercentparameterizedhits() throws Exception {\n\t\treturn this.cacherecentpercentparameterizedhits;\n\t}",
"@ApiModelProperty(value = \"Percentage for the Detailed Estimate Deduction\")\n\n\t@Min(0)\n\tpublic Integer getPercentage() {\n\t\treturn percentage;\n\t}",
"public Long get_cachepercentparameterized304hits() throws Exception {\n\t\treturn this.cachepercentparameterized304hits;\n\t}",
"public T setTargetPercentage(float perc)\n\t{\n\t\tif (isStarted())\n\t\t{\n\t\t\tLttl.Throw(\"Can't change target percentage after tween has started.\");\n\t\t}\n\t\ttargetPercentage = LttlMath.Clamp01(perc);\n\t\treturn (T) this;\n\t}",
"public double getHealthRelative() {\n\t\treturn getHealth() / (double) getMaxHealth();\n\t}",
"public float getPercentZoom() {\r\n return percentZoom;\r\n }",
"public com.google.protobuf.ByteString\n getPercentageBytes() {\n java.lang.Object ref = percentage_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n percentage_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public double usagePercentage() {\n return 1.0 * (this.rectangleCount() - 1) / (this.M * this.nodeCount()); // -1 in order to ignore de root\n }",
"public static float calculatePercent(float numOfSpecificTrees, float totalTrees){\n\t\tfloat percent= numOfSpecificTrees/totalTrees*100;\n\t\treturn percent;\n\t\t\n\t}",
"public Long get_cachepercentpethits() throws Exception {\n\t\treturn this.cachepercentpethits;\n\t}",
"public double getValueAsPercentInPage(double fltValueAsPercentInTimeline) {\n double fltTimeLineRangeInRmsFrames = intPageAmount * intPageSizeInRmsFrames;\n double fltPageHorStartPositionInTimeline = ((pageValue.fltPageNum - 1) * intPageSizeInRmsFrames);\n double fltPageHorEndPositionInTimeline = (pageValue.fltPageNum * intPageSizeInRmsFrames);\n double fltItemPositionInTimeline = (fltValueAsPercentInTimeline/100.0f) * fltTimeLineRangeInRmsFrames;\n\n double fltValue = 0;\n if ((fltItemPositionInTimeline >= fltPageHorStartPositionInTimeline) && (fltItemPositionInTimeline <= fltPageHorEndPositionInTimeline)) {\n // Selected position is inside display page\n fltValue = ((fltItemPositionInTimeline - fltPageHorStartPositionInTimeline) * 100.0f)/intPageSizeInRmsFrames;\n } else if (fltItemPositionInTimeline < fltPageHorStartPositionInTimeline){\n // Selected position is outside on left of page\n fltValue = 0;\n } else if (fltItemPositionInTimeline > fltPageHorEndPositionInTimeline){\n // Selected position is outside on right of page\n fltValue = 100;\n }\n return fltValue;\n }",
"public HitStatus hit() {\r\n\t\tnumHits++;\r\n\t\tif (type.length() <= numHits) {\r\n\t\t\treturn HitStatus.SUNK;\r\n\t\t}\r\n\t\treturn HitStatus.HIT;\r\n\t}",
"com.google.protobuf.ByteString\n getPercentageBytes();",
"public int getPercentage() {\r\n\r\n\t\treturn (getAmount() - offeredQuantity) / 100;\r\n\r\n\t}",
"public void setExecutionPercentage(double percentage);",
"public float getProgress() {\r\n if (start == end) {\r\n return 0.0f;\r\n } else {\r\n return Math.min(1.0f, (pos - start) / (float)(end - start));\r\n }\r\n }",
"public void testGetPercentToSample()\n {\n this.testSetPercentToSample();\n }",
"public int getHardHits(){\n\t\treturn hardhit;\n\t}",
"public final void mRULE_PERCENT() throws RecognitionException {\n try {\n int _type = RULE_PERCENT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12835:14: ( '%' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:12835:16: '%'\n {\n match('%'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public static String percentBar(double hpPercent) {\r\n\t\tif (hpPercent > 0 && hpPercent <= 5) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"|\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||||||||||\";\r\n\t\t} else if (hpPercent > 5 && hpPercent <= 10) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||||||||||\";\r\n\t\t} else if (hpPercent > 10 && hpPercent <= 15) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"|||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||||||||\";\r\n\t\t} else if (hpPercent > 15 && hpPercent <= 20) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||||||||\";\r\n\t\t} else if (hpPercent > 20 && hpPercent <= 25) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"|||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||||||\";\r\n\t\t} else if (hpPercent > 25 && hpPercent <= 30) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||||||\";\r\n\t\t} else if (hpPercent > 30 && hpPercent <= 35) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"|||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||||\";\r\n\t\t} else if (hpPercent > 35 && hpPercent <= 40) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||||\";\r\n\t\t} else if (hpPercent > 40 && hpPercent <= 45) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"|||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||\";\r\n\t\t} else if (hpPercent > 45 && hpPercent <= 50) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||\";\r\n\t\t} else if (hpPercent > 50 && hpPercent <= 55) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"|||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||\";\r\n\t\t} else if (hpPercent > 55 && hpPercent <= 60) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||\";\r\n\t\t} else if (hpPercent > 60 && hpPercent <= 65) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"|||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||\";\r\n\t\t} else if (hpPercent > 65 && hpPercent <= 70) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||\";\r\n\t\t} else if (hpPercent > 70 && hpPercent <= 75) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"|||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||\";\r\n\t\t} else if (hpPercent > 75 && hpPercent <= 80) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||\";\r\n\t\t} else if (hpPercent > 80 && hpPercent <= 85) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"|||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||\";\r\n\t\t} else if (hpPercent > 85 && hpPercent <= 90) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"||||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||\";\r\n\t\t} else if (hpPercent > 90 && hpPercent <= 95) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"||||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||\";\r\n\t\t} else if (hpPercent > 95 && hpPercent <= 100) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"|||||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|\";\r\n\t\t} else {\r\n\t\t\treturn ChatColor.GRAY + \"\" + ChatColor.BOLD + \"||||||||||||||||||||\";\r\n\t\t}\r\n\t}",
"public static boolean hit(int percent) {\n return generator.nextInt(100) <= percent ? true : false;\n }",
"public double getHealth() { return health; }",
"public int getScorePoints() {\n/* 75 */ return this.scorePoints;\n/* */ }",
"public void setHitsLeft(int hits){\n hitsLeft = hits;\n }",
"@Override\n\tpublic void getHit(int damage) {\n\t\tsuper.getHit(damage);\n\t}",
"public final int getHitPoints () {\n return this.currentHitPoints;\n }",
"public void setReputation(double reputation) {\n if(reputation >= 0.0 && reputation <= 100.0){\n this.reputation = reputation;\n }\n else if(reputation > 100.0){\n this.reputation = 100.0;\n }\n else{\n this.reputation = 0.0;\n }\n}",
"Float getHealth();"
] | [
"0.6972018",
"0.68417776",
"0.67818373",
"0.67780143",
"0.67321914",
"0.67294395",
"0.6702303",
"0.66648656",
"0.66647875",
"0.663237",
"0.6623012",
"0.65433013",
"0.651998",
"0.6495054",
"0.64480823",
"0.6368477",
"0.6362327",
"0.6362327",
"0.63171333",
"0.6300407",
"0.6289822",
"0.6210125",
"0.620846",
"0.6204543",
"0.62032974",
"0.6182769",
"0.6177555",
"0.61649895",
"0.61594725",
"0.61535543",
"0.6083809",
"0.6059357",
"0.6012348",
"0.60021645",
"0.5991513",
"0.59400594",
"0.5926978",
"0.5925972",
"0.5917514",
"0.5915215",
"0.58985335",
"0.5884437",
"0.5871095",
"0.5855784",
"0.58412945",
"0.5834492",
"0.58344245",
"0.582496",
"0.58189034",
"0.581474",
"0.58070195",
"0.57744586",
"0.57670945",
"0.57657063",
"0.57599205",
"0.5750027",
"0.5746696",
"0.57304764",
"0.57266235",
"0.57222897",
"0.57109195",
"0.57051677",
"0.56991184",
"0.56982416",
"0.5696025",
"0.56902754",
"0.5689743",
"0.5687464",
"0.5673216",
"0.56720805",
"0.5666937",
"0.5664394",
"0.56568104",
"0.5643891",
"0.56370217",
"0.5636799",
"0.5636042",
"0.56222063",
"0.561275",
"0.56119144",
"0.56057817",
"0.5603805",
"0.5589907",
"0.55805075",
"0.5577811",
"0.55753285",
"0.556692",
"0.5554739",
"0.55451596",
"0.5542508",
"0.55369294",
"0.55320084",
"0.55303925",
"0.5528123",
"0.5525033",
"0.55095863",
"0.55066764",
"0.55031174",
"0.54996073",
"0.5494166"
] | 0.85336 | 0 |
/ method getHits() assigns hits a new value pre: called by class post: hits is set a value | public void getHits(int newHits) {
hits = newHits;
//set achievement number
if(hits >=25 && hits<50) {
achievement = 1;
}
else if(hits >=50 && hits<100) {
achievement = 2;
}
else if(hits >=100 && hits<200) {
achievement = 3;
}
else if(hits > 200) {
achievement = 4;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getHits();",
"public void setHits(Hits hits) {\n this.hits = hits;\n }",
"protected int hit() {\r\n\t\treturn hits;\r\n\t}",
"public Hits getHits() {\n return this.hits;\n }",
"public int getTotalHits() { return totalHits; }",
"public void setHits(String hits) {\n\t\tthis.hits = hits;\n\t}",
"protected long hit() {\n return numHits.incrementAndGet();\n }",
"public String getHits() {\n\t\treturn hits;\n\t}",
"public void countHits() {\nif (this.hitpoints <= 0) {\nreturn;\n}\nthis.hitpoints = this.hitpoints - 1;\n}",
"final int numHits() {\n return numHits;\n }",
"public void increaseNumHits() {\n\t\tthis.numHits += 1;\n\t}",
"public int getWrapperHits();",
"public void setHitCount(int count) {\nthis.hitpoints = count;\n}",
"public int getHitsLeft(){\n return hitsLeft;\n }",
"public HitStatus hit() {\r\n\t\tnumHits++;\r\n\t\tif (type.length() <= numHits) {\r\n\t\t\treturn HitStatus.SUNK;\r\n\t\t}\r\n\t\treturn HitStatus.HIT;\r\n\t}",
"Map<String, Long> hits();",
"public int numHits() {\r\n\t\treturn hits;\r\n\t}",
"public long getTotalHits()\r\n\t{\r\n\t\treturn this.totalHits;\r\n\t}",
"long getCacheHits();",
"public void setHitsLeft(int hits){\n hitsLeft = hits;\n }",
"public HitCounter() {\n q = new ArrayDeque();\n map = new HashMap();\n PERIOD = 300;\n hits = 0;\n }",
"public int getSoftHits(){\n\t\treturn softhit;\n\t}",
"public void increseHitCount() {\n\r\n\t}",
"public int getNumHits() {\n\t\treturn numHits;\n\t}",
"public int getHardHits(){\n\t\treturn hardhit;\n\t}",
"public SearchResult withHits(Hits hits) {\n setHits(hits);\n return this;\n }",
"public int getHitPoints() {\n return this.counter;\n }",
"default void hit() {\n\t\tcount(1);\n\t}",
"public HitCounter() {\n hits = new int[300];\n times = new int[300];\n }",
"public HitCounter() {\n hits = new int[300];\n times = new int[300];\n }",
"public long numHits() {\n return numHits.longValue();\n }",
"public HitCounter() {\n map = new HashMap<Integer, Integer>();\n }",
"public void setTotalHits(long totalHits)\r\n\t{\r\n\t\tthis.totalHits = totalHits;\r\n\t}",
"public void incrMetaCacheHit() {\n metaCacheHits.inc();\n }",
"public String getHitcounter() {\r\n return hitcounter;\r\n }",
"public static int getPageHits() {\r\n return _count;\r\n }",
"boolean allHits();",
"@Override\n public final void onHit(final K key) {\n if (!freqHitMap.containsKey(key)) {\n freqHitMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqHitMap.put(key, freqHitMap.get(key) + 1);\n }",
"protected int extraHits(Conveyer info, Combatant striker, Combatant victim) {\n return 0;\n }",
"@Override\n public void hit(int atk) {\n hp = hp - atk;\n }",
"public interface IHitQuery {\n long getHitCount();\n}",
"@Basic\n\tpublic int getHitpoints() {\n\t\treturn hitpoints;\n\t}",
"public int getHitPoints() {\n return hitPoints;\n }",
"@Basic\n\tpublic int getHitpoints() {\n\t\treturn this.hitpoints;\n\t}",
"public HitCounter() {\n map = new TreeMap<>();\n }",
"double getHitRate();",
"double getHitRate();",
"public int getMaxHits() {\n\t\treturn maxHits;\n\t}",
"public static void keywordHit()\r\n\t{\r\n\t\tkeywordHits++;\r\n\t}",
"public int getHumanPlayerHits() {\n return humanPlayerHits;\n }",
"public interface Hit {\r\n\t\r\n\t/** @return ID of the search result (post ID, topic ID,...). */\r\n\tlong getResultId();\r\n\t\r\n\t/** @return Score of the search result. */\r\n\tfloat getScore();\r\n\r\n}",
"public void getHitPercent(double hitPer) {\r\n\t\thitPercent = hitPer;\r\n\t}",
"int hit();",
"public Long get_cachecurhits() throws Exception {\n\t\treturn this.cachecurhits;\n\t}",
"public HitCounter() {\n q = new LinkedList<>();\n }",
"public int getScore() { return score; }",
"private void elementHit(K key) {\n\t\tint i = hitMap.get(key);\n\t\ti++;\n\t\thitMap.put(key, i);\n\t}",
"public HitCounter() {\n q = new ArrayDeque();\n PERIOD = 300;\n }",
"public int getScore(){ return this.score; }",
"public HitCounterReadWriteLock() {\r\n hits = new int[300];\r\n times = new int[300];\r\n }",
"@Override\n public int getScore() {\n return score;\n }",
"public int getHits(int timestamp) {\n int i=0;\n int res = 0;\n while(i<300){\n // if(map.containsKey(timestamp-i)) \n // res += map.get(timestamp-i);\n res+=map.getOrDefault(timestamp-i, 0);\n i++;\n }\n return res;\n }",
"public int getScore() {return score;}",
"public int getScore(){\n \treturn 100;\n }",
"public final long incrementNearCacheHitCount() {\n\t\tm_nearLastAccess = System.currentTimeMillis();\n\t\treturn ++m_nearCacheHits;\n\t}",
"private void adjustHits(Node winner, String string) {\n\t\tIterator<HitHolder> ite = winner.hitList.iterator();\n\t\tHitHolder temp = null;\n\t\tboolean exists = false;\n\t\t\n\t\t\n\t\twhile(ite.hasNext())\n\t\t{\n\t\t\ttemp = ite.next();\n\t\t\t\n\t\t\tif(temp.element.equalsIgnoreCase(string))\n\t\t\t{\n\t\t\t\tif(temp.getFirstIteration() == -1)\n\t\t\t\t{\n\t\t\t\t\ttemp.firstIteration = CURRENT_ITERATION;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttemp.lastIteration = CURRENT_ITERATION;\n\t\t\t\ttemp.numberOfHits++;\n\t\t\t\texists = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!exists)\n\t\t{\n\t\t\twinner.hitList.add(new HitHolder(string, CURRENT_ITERATION));\n\t\t}\n\t}",
"public int getHits(int timestamp) {\n map = map.tailMap(timestamp - delta, false);\n int result = 0;\n for (int cnt : map.values()) {\n result += cnt;\n }\n return result;\n }",
"public int getScore()\n {\n return score; \n }",
"public int getScore ()\r\n {\r\n\treturn score;\r\n }",
"private int getSearchHitCount()\r\n {\r\n return ( mFilteringSearchTerm != null ) ? mFilteringSearchTerm.getHitCount() : 0;\r\n }",
"public int getScorePoints() {\n/* 75 */ return this.scorePoints;\n/* */ }",
"public int getScore(){return score;}",
"public int getScore(){return score;}",
"public void inscreaseHits(Object obj) {\n\t\tdao.updateHits(obj);\n\t}",
"@Override\n public int getScore() {\n return totalScore;\n }",
"public Long get_cachepercenthit() throws Exception {\n\t\treturn this.cachepercenthit;\n\t}",
"public int maxHit() {\n\t\treturn maxHit;\n\t}",
"public Integer endpointHitsCount() {\n return this.endpointHitsCount;\n }",
"public double getHitsPercentual()\n\t{\n\t\t//Convert int to double values\n\t\tdouble doubleHits = hits;\n\t\tdouble doubleTotalProcessedStops = totalProcessedStops;\n\t\t\n\t\t//Hits percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (doubleHits / doubleTotalProcessedStops));\n\t}",
"public int getHomeScore();",
"public final long getNearCacheHitCount() {\n\t\treturn m_nearCacheHits;\n\t}",
"public int getScore(){\n return this.score;\n }",
"public void setMatches() {\r\n this.matches++;\r\n\r\n }",
"public void resetHitsLeft(){\n int count = 0;\n for(Ship ship: ships){\n count += ship.getLocation().size();\n }\n hitsLeft = count;\n }",
"public int getHomeScore() {\n return homeScore;\n }",
"public int getScore () {\n return mScore;\n }",
"public int getHp(){\r\n return hp;\r\n }",
"public int getScore()\n {\n return score;\n }",
"public int getHits(int timestamp) {\n int count = 0;\n for(int i = 0; i < 300; i++){\n if(timestamp - times[i] < 300) count += hits[i];\n }\n return count;\n }",
"public int getScore() {\r\n return score;\r\n }",
"public int getScore() {\r\n return score;\r\n }",
"public int getScore() {\r\n return score;\r\n }",
"int getScore() {\n return score;\n }",
"public int getScore(){\r\n\t\treturn score;\r\n\t}",
"public int getScore(){\r\n\t\treturn score;\r\n\t}",
"public boolean getHit() {\r\n\t\treturn hit;\r\n\t}",
"public void setScore(int score) {this.score = score;}",
"private void logHitResult() {\n if (hitResult){\n targets--;\n if (targets == 0){\n taskComplete = true;\n }\n\n hitList[hitCount] = new Point(shotList[shotCount].x, shotList[shotCount].y);\n hitCount++;\n\n } else {\n missList[missCount]= new Point(shotList[shotCount].x, shotList[shotCount].y);\n missCount++;\n }\n }",
"public final int getHitPoints () {\n return this.currentHitPoints;\n }",
"public void setScore(int score) { this.score = score; }"
] | [
"0.8030795",
"0.8014527",
"0.8012211",
"0.7666918",
"0.75827223",
"0.75111866",
"0.7324839",
"0.72640026",
"0.7107536",
"0.7099019",
"0.7044796",
"0.68921417",
"0.6872437",
"0.6819104",
"0.67668855",
"0.6755972",
"0.67529947",
"0.668677",
"0.6678271",
"0.66750634",
"0.66716975",
"0.66409487",
"0.6640571",
"0.6636437",
"0.6556129",
"0.6442931",
"0.63732123",
"0.6360911",
"0.635152",
"0.635152",
"0.63365805",
"0.6332848",
"0.6300308",
"0.62863487",
"0.6280075",
"0.61950153",
"0.61355525",
"0.61193264",
"0.6096575",
"0.6046597",
"0.6013572",
"0.59901",
"0.59873056",
"0.5983759",
"0.59800035",
"0.5973336",
"0.5973336",
"0.59216934",
"0.58983856",
"0.5878465",
"0.58778507",
"0.58616453",
"0.5835563",
"0.58304363",
"0.57964563",
"0.57625425",
"0.5749637",
"0.57460755",
"0.5735071",
"0.5707907",
"0.56842524",
"0.5671172",
"0.5653564",
"0.56448275",
"0.5643816",
"0.56389385",
"0.5636391",
"0.5622472",
"0.5615329",
"0.5613305",
"0.56128144",
"0.5608929",
"0.5608929",
"0.55880237",
"0.5587898",
"0.5575044",
"0.55542",
"0.55496365",
"0.55481714",
"0.55437464",
"0.5536845",
"0.549228",
"0.54858476",
"0.5462675",
"0.5456813",
"0.54561484",
"0.5454168",
"0.54483926",
"0.5427096",
"0.5417731",
"0.5417731",
"0.5417731",
"0.5414435",
"0.54112566",
"0.54112566",
"0.54106754",
"0.5392669",
"0.53906476",
"0.5381906",
"0.53747994"
] | 0.6964608 | 11 |
/ method getClicks() assigns clicks a value pre: called by class post: clicks is set a value | public void getClicks(int newClicks) {
clicks = newClicks;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setClicks(Integer clicks) {\r\n this.clicks = clicks;\r\n }",
"public Integer getClicks() {\r\n return clicks;\r\n }",
"public int getClicks() {\n return clicks;\n }",
"public static void clickEvent() {\n counterClicks += 1;\n }",
"public final int getClickCount() {\n return clickCount;\n }",
"public Integer getClickCount() {\n return clickCount;\n }",
"public Integer getClickcount() {\n return clickcount;\n }",
"public static int totalClicks() {\n return counterClicks;\n }",
"public void clickAction(int clickCount);",
"public Integer getClickNum() {\n return clickNum;\n }",
"public void setClickcount(Integer clickcount) {\n this.clickcount = clickcount;\n }",
"public void setClickCount(Integer clickCount) {\n this.clickCount = clickCount;\n }",
"protected void initClicks() {\n\t\tclick = new int[7][];\n\t\tfor (int i = 0; i < GUI.percussionCount; i++)\n\t\t\tclick[i] = new AudioFile(gui.getPercussionSound(i)).read();\n\t}",
"public ClickCounter() {\n System.out.println(\"Click constructor: \" + count);\n \n }",
"public Integer getConvertedClicks() {\r\n return convertedClicks;\r\n }",
"@Override\n\tpublic void set() {\n\t\tlog.info(\"Clicked: {}\", count);\n\t}",
"public void setClickNum(Integer clickNum) {\n this.clickNum = clickNum;\n }",
"@ApiModelProperty(value = \"Count of clicked emails\")\r\n public Integer getClickCount() {\r\n return clickCount;\r\n }",
"public String getClickType() {\r\n return clickType;\r\n }",
"public boolean getIsClick() {return isClick;}",
"public Object getOnclick() {\r\n\t\treturn getOnClick();\r\n\t}",
"public void setConvertedClicks(Integer convertedClicks) {\r\n this.convertedClicks = convertedClicks;\r\n }",
"public ClickType getClickType() {\r\n\t\treturn clickType;\r\n\t}",
"public String getClickUrl() {\n return clickUrl;\n }",
"@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif(this.chance==1)\r\n\t\t{\r\n\t\t\tmouseX = arg0.getX();\r\n\t\t\tmouseY= arg0.getY();\r\n\t\t\tclick=1;\r\n\t\t}\r\n\t}",
"public void setValuePerConvertedClick(Double valuePerConvertedClick) {\r\n this.valuePerConvertedClick = valuePerConvertedClick;\r\n }",
"@Override\r\n\tpublic void clickSub(int count) {\n\t\t\r\n\t}",
"public Double getClickConversionRate() {\r\n return clickConversionRate;\r\n }",
"public void funcUIObjectClicks(int intTimesClick, int intClickType, UiObject obj) throws Exception {\n int intCnt = 0;\n while (intCnt < intTimesClick) {\n switch (intClickType) {\n case 0:\n obj.click();\n break;\n case 1:\n obj.longClick();\n break;\n default:\n obj.click();\n }\n intCnt++;\n }\n \n }",
"public void setClickType(String clickType) {\r\n this.clickType = clickType;\r\n }",
"public String getOnclick()\r\n\t{\r\n\t\treturn _onClick;\r\n\t}",
"@Override\r\n\tpublic void clickAdd(int count) {\n\t\t\r\n\t}",
"public void setClicked(){\n\t\tclicked=true;\n\t}",
"public void click() {\n\t\tif(toggles) {\n\t\t\tvalue = (value == 0) ? 1 : 0;\t// flip toggle value\n\t\t}\n\t\tupdateStore();\n\t\tif(delegate != null) delegate.uiButtonClicked(this);\t// deprecated\n\t}",
"void mo15854a(int i, DynamicClickInfo iVar);",
"public void click(){\n\t\t\n\tfor(MouseListener m: listeners){\n\t\t\t\n\t\t\tm.mouseClicked();\n\t\t}\n\t\t\n\t}",
"private void updateClickCount(int[] ID) {\r\n\t\tif (gameBoard.getIdValue(ID) != 0) {\r\n\t\t\tclickCounter += 1;\r\n\t\t} // do nothing\r\n\t}",
"void setClickURL(java.lang.String clickURL);",
"protected void onClick() {\n for(Runnable action : onClick) action.run();\n }",
"@RestrictTo(RestrictTo.Scope.LIBRARY)\n public void setClickInfo(int[] info) {\n mClickInfo = info;\n }",
"public boolean isClicked() { return clicked; }",
"int getClicksNumber() throws SQLException;",
"public void buttonClickTiming() {\n //Prevention of button mushing by using threshold of 1000 ms between clicks\n if (SystemClock.elapsedRealtime() - lastClickTime < 1000) {\n return;\n }\n lastClickTime = SystemClock.elapsedRealtime();\n }",
"com.google.ads.googleads.v6.resources.ClickView getClickView();",
"@Override\n\tpublic void setOnClick() {\n\n\t}",
"public boolean getMouseClick () {\r\n return myMouseClick;\r\n }",
"@Override // com.bytedance.sdk.openadsdk.core.p362a.ClickListener\n /* renamed from: a */\n public ClickEventModel mo24954a(int i, int i2, int i3, int i4, long j, long j2, View view, View view2) {\n int i5;\n int i6;\n int i7;\n int i8;\n int i9;\n int i10;\n long j3;\n int i11;\n long j4;\n this.f14653x = 1;\n this.f14654y = 0;\n this.f14655z = 0;\n int[] a = UIUtils.m18769a(view);\n if (a == null || a.length != 2) {\n i8 = i;\n i7 = i2;\n i6 = i3;\n i5 = i4;\n i10 = 0;\n i9 = 0;\n } else {\n i10 = a[0];\n i9 = a[1];\n i8 = ((int) UIUtils.m18751a(this.f14625c, (float) i)) + i10;\n i7 = ((int) UIUtils.m18751a(this.f14625c, (float) i2)) + i9;\n i6 = ((int) UIUtils.m18751a(this.f14625c, (float) i3)) + i10;\n i5 = ((int) UIUtils.m18751a(this.f14625c, (float) i4)) + i9;\n }\n int[] iArr = new int[2];\n int[] iArr2 = new int[2];\n DynamicClickInfo iVar = this.f15264a;\n if (iVar != null) {\n j3 = iVar.f14811e;\n j4 = this.f15264a.f14812f;\n iArr[0] = ((int) UIUtils.m18751a(this.f14625c, (float) this.f15264a.f14813g)) + i10;\n iArr[1] = ((int) UIUtils.m18751a(this.f14625c, (float) this.f15264a.f14814h)) + i9;\n iArr2[0] = (int) UIUtils.m18751a(this.f14625c, (float) this.f15264a.f14815i);\n i11 = 1;\n iArr2[1] = (int) UIUtils.m18751a(this.f14625c, (float) this.f15264a.f14816j);\n } else {\n i11 = 1;\n j3 = j;\n j4 = j2;\n }\n ClickEventModel.C3460a h = new ClickEventModel.C3460a().mo25050e(i8).mo25048d(i7).mo25046c(i6).mo25043b(i5).mo25044b(j3).mo25039a(j4).mo25045b(a).mo25041a(iArr).mo25047c(UIUtils.m18779b(view)).mo25049d(iArr2).mo25051f(this.f14653x).mo25052g(this.f14654y).mo25053h(this.f14655z);\n if (!GlobalInfo.m16289c().mo25351b()) {\n i11 = 2;\n }\n return h.mo25038a(i11).mo25040a(this.f14646B).mo25042a();\n }",
"public Flowable<Point2D> readMouseClick() {\n return mouseClick;\n }",
"public Integer getClickAssistedConversions() {\r\n return clickAssistedConversions;\r\n }",
"public void click() {\n this.lastActive = System.nanoTime();\n }",
"public boolean getClicked(){\n return this.isPressed;\n }",
"@Override\n protected void clickAction(int numClicks) {\n exit(true);\n }",
"public boolean didUserClick(){\n return userClick;\n }",
"private void handleClicksAndMoves(Tile t, JLabel moves, JLabel remainingBombs) {\r\n this.add(t);\r\n t.addMouseListener(new MouseAdapter() {\r\n public void mouseClicked(MouseEvent e) {\r\n if (e.getModifiers() == MouseEvent.BUTTON1_MASK) {\r\n if (gameRunning) {\r\n if (!t.getFlagged()) {\r\n if (t.isHidden()) {\r\n totalMoves++;\r\n moves.setText(\"\" + totalMoves);\r\n } \r\n handleGame(t);\r\n }\r\n }\r\n } else if (e.getModifiers() == MouseEvent.BUTTON3_MASK) { \r\n if (gameRunning) {\r\n if (t.isHidden()) {\r\n if (t.getFlagged()) {\r\n flaggedBombs--;\r\n } else {\r\n flaggedBombs++;\r\n }\r\n t.flag();\r\n }\r\n }\r\n }\r\n remainingBombs.setText(\"\" + (numBombs - flaggedBombs));\r\n }\r\n });\r\n }",
"public void setClickConversionRate(Double clickConversionRate) {\r\n this.clickConversionRate = clickConversionRate;\r\n }",
"public List<cn.edu.kmust.flst.domain.flst.tables.pojos.Article> fetchByArticleClicks(Integer... values) {\n return fetch(Article.ARTICLE.ARTICLE_CLICKS, values);\n }",
"@Test\n public void click() {\n Counter counter = new Counter();\n counter.click(); // should increment by 1\n int expected = 1;\n int actual = counter.getCount();\n assertEquals(expected, actual);\n }",
"public void mouseClicked(MouseEvent mouseClick)\r\n\t{\r\n\t\tmouseClickX = mouseClick.getX();\r\n\t\tmouseClickY = mouseClick.getY();\r\n\t\tmouseClickedFlag = true;\r\n\t\tmouseClickedFlagForWeapon = true;\r\n\t\tmouseClickCount = mouseClick.getClickCount();\r\n\t\tmouseButtonNumber = mouseClick.getButton();\r\n\t\t//System.out.println(\"MouseClickX: \" + mouseClickX);\r\n\t\t//System.out.println(\"MouseClickY: \" + mouseClickY);\r\n\t\t\r\n\t\t\r\n\t}",
"public Point getclickedPoint() {\r\n return clickedPoint;\r\n }",
"public void nativeMouseClicked(NativeMouseEvent e) {\r\n\t\tSystem.out.println(\"Mouse Clicked: \" + e.getClickCount());\r\n\t\twriteFile(2, valueButton, e.getClickCount());\r\n\t}",
"java.lang.String getClickURL();",
"public void setClick(boolean b) {\n\t\tclickable = b;\n\t}",
"public Double getValuePerConvertedClick() {\r\n return valuePerConvertedClick;\r\n }",
"public void setIsClick(boolean isClick) {\n this.isClick = isClick;\n }",
"@Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) {\n getDoubleClick();\n }\n }",
"public BigDecimal getCostPerConvertedClick() {\r\n return costPerConvertedClick;\r\n }",
"public Double getClickAssistedConversionValue() {\r\n return clickAssistedConversionValue;\r\n }",
"public static void mouseClick (Console c){\r\n\t\t//wait for mouse click\r\n\t\tc.addMouseListener(new MouseAdapter() { \r\n \t\t\tpublic void mousePressed(MouseEvent me) {\r\n \t\t\t\tx = me.getX();\r\n \t\t\t\ty = me.getY();\r\n \t\t\t} \r\n \t\t});\r\n\t\t\r\n\t}",
"public void click() {\n System.out.println(\"Click\");\n }",
"@Override\n\tpublic void tick() {\n\t\twhile (clicks.size() > 0)\n\t\t{\n\t\t\tClick click = clicks.remove(0);\n\t\t\tSystem.out.println(click.posX + \" \" + click.posY);\n\t\t}\n\t\twhile (presses.size() > 0)\n\t\t{\n\t\t\tPress press = presses.remove(0);\n\t\t}\n\t}",
"Rectangle getClickArea() {\n return clickArea;\n }",
"public void setClickEvent(String clickEvent) {\r\r\n\t\tthis.clickEvent = clickEvent;\r\r\n\t}",
"public void onClicked();",
"public Integer getConversionsManyPerClick() {\r\n return conversionsManyPerClick;\r\n }",
"public void setOnClickListeners(){\n\n biegeAlien.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n normalizeImages();\n Constants.CHOSEN_CHARACTER = 0;\n biegeAlien.setImageResource(R.drawable.alienbeige_jump);\n biegeAlien.setBackgroundColor(getResources().getColor(R.color.colorMarker));\n }\n });\n\n blueAlien.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n normalizeImages();\n Constants.CHOSEN_CHARACTER = 1;\n blueAlien.setImageResource(R.drawable.alienblue_jump);\n blueAlien.setBackgroundColor(getResources().getColor(R.color.colorMarker));\n }\n });\n\n greenAlien.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n normalizeImages();\n Constants.CHOSEN_CHARACTER = 2;\n greenAlien.setImageResource(R.drawable.aliengreen_jump);\n greenAlien.setBackgroundColor(getResources().getColor(R.color.colorMarker));\n }\n });\n\n pinkAlien.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n normalizeImages();\n Constants.CHOSEN_CHARACTER = 3;\n pinkAlien.setImageResource(R.drawable.alienpink_jump);\n pinkAlien.setBackgroundColor(getResources().getColor(R.color.colorMarker));\n }\n });\n\n yellowAlien.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n normalizeImages();\n Constants.CHOSEN_CHARACTER = 4;\n yellowAlien.setImageResource(R.drawable.alienyellow_jump);\n yellowAlien.setBackgroundColor(getResources().getColor(R.color.colorMarker));\n }\n });\n }",
"void onClick(ButtonEvent[] events) {\n for (ButtonEvent event : events) {\n event.state = ClickState.valueOf(event.clickIntState);\n }\n\n if (mDelegate != null && mDelegate.get() != null) {\n mDelegate.get().onClick(new ArrayList<ButtonEvent>(Arrays.asList(events)));\n }\n }",
"@Override\n\tprotected void OnClick() {\n\t\t\n\t}",
"@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }",
"void issuedClick(String item);",
"com.google.ads.googleads.v6.resources.ClickViewOrBuilder getClickViewOrBuilder();",
"public boolean isClickEnabled(int id)\n {\n return id < clicks.length && id >= 0 && clicks[id];\n }",
"public void mouseClicked() {\n\t\tif(gameState==0 && mouseX >= 580 && mouseX <=580+140 && mouseY>=650 && mouseY<=700){\r\n\t\t\tLOGGER.info(\"Detected click on Play, sending over to gameDriver\");\r\n\t\t\t//Changes the game state from start menu to running\r\n\t\t\tgameState = 1;\r\n\t\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t\t//if on menu n click instructions\r\n\t\tif(gameState==0 && mouseX >= 100 && mouseX <=450 && mouseY>=650 && mouseY<=700){\r\n\t\t\tLOGGER.info(\"Detected click on Instructions, sending over to gameDriver\");\r\n\t\t\t//Changes the game state from start menu to instructions\r\n\t\t\tgameState = 3 ;\r\n\t\t}\r\n\t\t\r\n\t\t//if user clicks on back change game state while on map select or instructions\r\n\t\tif((gameState == 3||gameState == 1)&& mouseX >= 50 && mouseX <=50+125 && mouseY>=650 && mouseY<=700 )\r\n\t\t\tgameState = 0;\r\n\t\t\r\n\t\t\r\n\t\t//if they are on mapSelect and they click\r\n\t\tif(gameState==1 && mouseX > 70 && mouseX <420 && mouseY> 100 && mouseY<470){\r\n\t\t\tLOGGER.info(\"selected map1, sending over to game driver\");\r\n\t\t\tmapSelected=1;\r\n\t\t\tMAP=new Map(this, mapSelected);\r\n\t\t\tgame = new gameDriver(this, MAP);\r\n\t\t\tgameState=2;\r\n\t\t}\r\n\t\t\r\n\t\t//if they click quit while on the main menu\r\n\t\tif(gameState==0 && mouseX >= 950 && mouseX <=950+130 && mouseY>=650 && mouseY<=700 ){\r\n\t\t\tLOGGER.info(\"Detected quit button, now closing window\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\t//if they click on play agagin button while at the game overscrren\r\n\t\tif(gameState==4 && mouseX>680 && mouseX<1200 && mouseY>520 && mouseY<630){\r\n\t\t\t//send them to the select menu screen\r\n\t\t\tgameState=1;\r\n\t\t}\r\n\t\t\r\n\t\t//displays rgb color values when click, no matter the screen\r\n//\t\tprintln(\"Red: \"+red(get().pixels[mouseX + mouseY * width]));\r\n// println(\"Green: \"+green(get().pixels[mouseX + mouseY * width]));\r\n// println(\"Blue: \"+blue(get().pixels[mouseX + mouseY * width]));\r\n//\t\tprintln();\r\n\t}",
"@ApiModelProperty(value = \"Count of clicked emails, formatted\")\r\n public String getClickCountFormatted() {\r\n return clickCountFormatted;\r\n }",
"@Override\n public void nativeMouseClicked(NativeMouseEvent nme) {\n// System.out.println(\"Mouse Clicked: \" + nme.getClickCount());\n if (Var.timerStart) {\n txtMouse.setText(\"Mouse Clicked: \" + nme.getClickCount());\n }\n }",
"public void setClickAssistedConversions(Integer clickAssistedConversions) {\r\n this.clickAssistedConversions = clickAssistedConversions;\r\n }",
"public boolean isSetClickcount() {\n return __isset_bit_vector.get(__CLICKCOUNT_ISSET_ID);\n }",
"public Double getClickAssistedConversionsOverLastClickConversions() {\r\n return clickAssistedConversionsOverLastClickConversions;\r\n }",
"public void clickOnFile(String file, int clickCount) {\n clickOnFile(file, getComparator(), clickCount);\n }",
"@Override\r\n public void beforeClickOn(final WebElement arg0, final WebDriver arg1) {\n\r\n }",
"public boolean isClicked() {\n\t\treturn clicked;\n\t}",
"private void setUpClickListerns ()\n\t{\n\t\tLinearLayout temp_layout ;\n\t\tButton temp_button ;\n\t\tfor (int i = 0 ; i<numPad.getChildCount() ; i++)\n\t\t{\n\t\t\ttemp_layout = (LinearLayout) numPad.getChildAt(i);\n\t\t\tfor (int j = 0;j< temp_layout.getChildCount() ; j++)\n\t\t\t{\n\t\t\t\ttemp_button = (Button) temp_layout.getChildAt(j);\n\t\t\t\ttemp_button.setOnClickListener(this);\n\t\t\t}\n\t\t}\n\t\t\n\t\tchangePass.setOnClickListener(this);\n\t\tclear.setOnClickListener(this);\n\t\tpassField.setFocusable(false);\n\t}",
"@Override\n\tpublic void initListeners() {\n\t\tmClick.setOnClickListener(this);\n\t}",
"@SuppressLint(\"CheckResult\")\n private void initializeClickEvents() {\n //create the onlick event for the add picture button\n Disposable pictureClick = RxView.clicks(mAddPictureBtn)\n .subscribe(new Consumer<Unit>() {\n @Override\n public void accept(Unit unit) {\n if (mImages.size() < MAX_NUM_IMAGES) {\n displayPictureMethodDialog();\n } else {\n Toast.makeText(AddListingView.this, R.string.maximum_images, Toast.LENGTH_LONG).show();\n }\n }\n });\n mCompositeDisposable.add(pictureClick);\n\n\n //create the on click event for the save button\n final Disposable save = RxView.clicks(mSaveButton)\n .subscribe(new Consumer<Unit>() {\n @Override\n public void accept(Unit unit) {\n saveData();\n }\n });\n mCompositeDisposable.add(save);\n\n\n //create onclick for the property status image\n Disposable statusChange = RxView.clicks(mSaleStatusImage)\n .subscribe(new Consumer<Unit>() {\n @Override\n public void accept(Unit unit) {\n switch (mSaleStatusImage.getTag().toString()) {\n case FOR_SALE_TAG:\n updateListingSoldStatus(true);\n break;\n case SOLD_TAG:\n updateListingSoldStatus(false);\n }\n }\n });\n mCompositeDisposable.add(statusChange);\n }",
"@DISPID(-2147412104)\n @PropGet\n java.lang.Object onclick();",
"void click(int slot, ClickType type);",
"public void setCostPerConvertedClick(BigDecimal costPerConvertedClick) {\r\n this.costPerConvertedClick = costPerConvertedClick;\r\n }",
"public boolean getClickSort() {\r\n\t\treturn _clickSort;\r\n\t}",
"void clickSomewhereElse();",
"public void mousePressed(MouseEvent click) {\r\n\t\tif (gameState == 2) {\r\n\t\t\tif ((SwingUtilities.isLeftMouseButton(click))) {\r\n\t\t\t\tlClick = true;\r\n\t\t\t\twasReleased = false;\r\n\t\t\t\tif (!alreadyShot) {\r\n\t\t\t\t\tarrowMech();\r\n\t\t\t\t\taY = playerObject[0].getY();\r\n\t\t\t\t}\r\n\t\t\t\talreadyShot = true;\r\n\t\t\t}\r\n\t\t\telse if (SwingUtilities.isRightMouseButton(click)) {\r\n\t\t\t\trClick = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private WXClick convertXClickParameters(FinancialTransactionVO ft, InvoiceXClickParametersVO xClickParameters, Long specialFlags) throws CTConverterException {\n // Generate the basic WXClick object with the major fields filled-in!\n WXClick wxClick = generateBasicWXClickFromFinancialTransaction(ft, xClickParameters);\n\n if (ft.getContext() instanceof PaymentContextVO) {\n wxClick.setCounterpartyAliasType((char) xClickParameters.getCounterpartyAliasType().byteValue());\n wxClick.setShippingAddressId(xClickParameters.getShippingAddressId().longValue());\n }\n wxClick.setInvoice(xClickParameters.getInvoice());\n wxClick.setSalesTax(xClickParameters.getSalesTax());\n wxClick.setSalesTaxPercentage(xClickParameters.getSalesTaxPercentage());\n\n if (xClickParameters.getCustomize() != null) {\n List<OptionCustomizationVO> optionCustomizationList = xClickParameters.getCustomize();\n if (optionCustomizationList.size() >= 1) {\n wxClick.setOptionName1(optionCustomizationList.get(0).getOptionName());\n wxClick.setOptionSelection1(optionCustomizationList.get(0).getOptionSelection());\n }\n if (optionCustomizationList.size() >= 2) {\n wxClick.setOptionName2(optionCustomizationList.get(1).getOptionName());\n wxClick.setOptionSelection2(optionCustomizationList.get(1).getOptionSelection());\n }\n }\n\n wxClick.setItemNumber(xClickParameters.getItemNumber());\n wxClick.setItemName(xClickParameters.getItemName());\n wxClick.setQuantity(xClickParameters.getQuantity());\n wxClick.setItemAmount(xClickParameters.getItemAmount());\n wxClick.setShippingAmount(xClickParameters.getShippingAmount());\n wxClick.setHandlingAmount(xClickParameters.getHandlingAmount());\n wxClick.setFlags(\n (xClickParameters.getFlags() == null ? 0 : xClickParameters.getFlags())\n | specialFlags\n );\n wxClick.setCustom(xClickParameters.getCustom());\n wxClick.setButtonSource(xClickParameters.getButtonSource());\n wxClick.setSavings(xClickParameters.getSavings());\n wxClick.setAdjustmentAmount(xClickParameters.getAdjustmentAmount());\n wxClick.setCharset(xClickParameters.getCharset());\n\n MerchantCallbackVO merchantCallback = xClickParameters.getMerchantCallback();\n if (merchantCallback != null) {\n wxClick.setGiftWrapName(merchantCallback.getGiftWrapName());\n wxClick.setGiftMessage(merchantCallback.getGiftMessage());\n wxClick.setGiftWrapAmount(merchantCallback.getGiftWrapAmount());\n wxClick.setPromotionalEmailAddress(merchantCallback.getBuyerEmailOptIn());\n wxClick.setSurveyQuestion(merchantCallback.getSurveyQuestion());\n wxClick.setSurveyAnswer(merchantCallback.getSurveyChoice());\n wxClick.setInsuranceAmount(merchantCallback.getInsuranceAmount());\n }\n\n return wxClick;\n }"
] | [
"0.7563132",
"0.7365638",
"0.73367035",
"0.67573786",
"0.6756522",
"0.6753837",
"0.6702234",
"0.6605848",
"0.65964866",
"0.6488016",
"0.64605343",
"0.6416191",
"0.64075816",
"0.63384235",
"0.62288916",
"0.61413777",
"0.6065179",
"0.59557676",
"0.59528637",
"0.5927348",
"0.5846964",
"0.58058125",
"0.5795029",
"0.5717393",
"0.56116295",
"0.5590313",
"0.5581439",
"0.55447704",
"0.5530457",
"0.5511934",
"0.5456596",
"0.5442946",
"0.54191595",
"0.54111516",
"0.537751",
"0.53739107",
"0.5368932",
"0.5358082",
"0.53390336",
"0.5304862",
"0.52931213",
"0.5290128",
"0.52860385",
"0.52796036",
"0.5270459",
"0.52630836",
"0.5239241",
"0.52233547",
"0.5214665",
"0.5205325",
"0.5197161",
"0.5191399",
"0.51814574",
"0.5175366",
"0.517194",
"0.5159131",
"0.51315403",
"0.5092306",
"0.50921965",
"0.50878054",
"0.50671744",
"0.5054207",
"0.5053372",
"0.50483745",
"0.5041778",
"0.5020893",
"0.49885195",
"0.4985032",
"0.49713433",
"0.49693495",
"0.49643284",
"0.49530873",
"0.49337688",
"0.49241272",
"0.49223137",
"0.49208945",
"0.49197552",
"0.4918636",
"0.49099305",
"0.49071735",
"0.49059835",
"0.49056572",
"0.4901985",
"0.48840284",
"0.48820838",
"0.48809427",
"0.48789892",
"0.4877814",
"0.48659188",
"0.48576012",
"0.48474014",
"0.4847256",
"0.4831999",
"0.48165116",
"0.48157588",
"0.48156935",
"0.48154712",
"0.48059064",
"0.48025537",
"0.48014098"
] | 0.7160273 | 3 |
/ method getInner() assigns inner a value pre: called by class post: inner is set a value | public void getInner(int newIn) {
inner = newIn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Inner getInner(){\n Outer.this.toString();\n return this.new Inner();\n }",
"@Override\n public long get() {\n return (long) inner.get();\n }",
"public void callInner() {\n Inner inner = new Inner();\n inner.go();\n int f = inner.private_int; //private inner fields visible to Outer class\n }",
"private SqlContainerCreateUpdateProperties innerProperties() {\n return this.innerProperties;\n }",
"DimensionInner innerModel();",
"public void getOuter(int newOut) {\r\n\t\touter = newOut;\r\n\t}",
"public void makeInnerObject()\n\t{\n\t\tInnerClass_firstInnerClass objCreationInnerByMethod1=new InnerClass_firstInnerClass();\n\t\tobjCreationInnerByMethod1.accessOuterClassFields();\n\t}",
"public T getValue(){\n \treturn element;\n }",
"private EntityHierarchyItemProperties innerProperties() {\n return this.innerProperties;\n }",
"RepoInner innerModel();",
"LabInner innerModel();",
"public Type<Object> getValueInnerType()\n\t{\n\t\treturn this.getProperty().getValueType().getInnerType();\n\t}",
"public Inner(Inner other) {\n __isset_bitfield = other.__isset_bitfield;\n if (other.isSetInner_str()) {\n this.inner_str = other.inner_str;\n }\n this.inner_double = other.inner_double;\n }",
"private RulesEngineProperties innerProperties() {\n return this.innerProperties;\n }",
"SnapshotInner innerModel();",
"private VirtualNetworkProperties innerProperties() {\n return this.innerProperties;\n }",
"ContentItemContractInner innerModel();",
"inner(int y) {\r\n\t\t\t\r\n\t\t\tthis.y = y;\r\n\t\t}",
"public IClassHolder getOuterClass() {\n return m_outerClass;\n }",
"void outerMethod() {\n\t\n\tclass Inner {\n\t \n\t protected Inner() { }\n\t public int publicInner = 100;\n\t int privateInner = Outer.this.privateOuter; \n\t \n\t Object foo = Outer.this.foo();\n\t \n\t void printOuterObjectFromInner() {\n\t\tSystem.out.println(\"Hello from inner: \" + foo);\n\t }\n\t \n\t}\n\tInner in2 = new Inner();\n\tin2.printOuterObjectFromInner();\n }",
"void displayInner(){\r\n\t\t\tInnerClass inner = new InnerClass();\r\n\t\t\tinner.print();\r\n\t\t}",
"private DefaultCniNetworkProperties innerProperties() {\n return this.innerProperties;\n }",
"private NotebookWorkspaceProperties innerProperties() {\n return this.innerProperties;\n }",
"public T get() {\n return element;\n }",
"@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}",
"@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}",
"private PipelineJobPropertiesUpdate innerProperties() {\n return this.innerProperties;\n }",
"private ApiReleaseContractProperties innerProperties() {\n return this.innerProperties;\n }",
"private ProductProperties innerProperties() {\n return this.innerProperties;\n }",
"@Test\n\tpublic final void testGetInnerIterator() {\n\t\tFieldIterator iterator = block.getInnerIterator();\n\t\t// Verify type\n\t\tassertEquals(ValueFieldIterator.class, iterator.getClass());\n\t\t// Verify size\n\t\tfor (int i=0; i<DIMENSIONALITY; i++) {\n\t\t\tassertEquals(elementsPerDim, iterator.size(i));\n\t\t}\n\t\t// Verify (first) value\n\t\titerator.first();\n\t\tassertEquals(values[0], iterator.currentValue(), 4*Math.ulp(values[0]));\n\t}",
"private WorkspacePatchProperties innerProperties() {\n return this.innerProperties;\n }",
"ProductInner innerModel();",
"public static void innerClassUsage() {\n final SimpleInterface.InnerClass<String> inner =\n new SimpleInterface.InnerClass<String>();\n }",
"private DeepCreatedOriginGroupProperties innerProperties() {\n return this.innerProperties;\n }",
"RolloutInner innerModel();",
"void m1() {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(outer); // can access the outer CLASS context elements\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(finalVariable); // can access to the outer METHOD context elements if FINAL\n\t\t\t\t\tSystem.out.println(effectivellyFinal); // can access to the outer METHOD context elements if EFFECTIVELY FINAL\n\t\t\t\t}",
"DppBaseResourceInner innerModel();",
"@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}",
"private NetworkDevicePatchParametersProperties innerProperties() {\n return this.innerProperties;\n }",
"PreconfiguredEndpointInner innerModel();",
"public Object get()\n {\n return m_internalValue;\n }",
"public Element getElement() {\n/* 78 */ return this.e;\n/* */ }",
"java.lang.String getNested();",
"public InnerAnimal createInnerClass() {\n\t\tInnerAnimal ianimal = new InnerAnimal();\n\t\treturn ianimal;\n\t}",
"public E getElement() { return element; }",
"private VirtualNetworkPeeringPropertiesFormat innerProperties() {\n return this.innerProperties;\n }",
"public T get() {\n return value;\n }",
"public <E> E getE(E e){\n return e;\n }",
"protected Object doGetValue() {\n\t\treturn value;\n\t}",
"public A getValue() { return value; }",
"@Override public void visitInnerClass(\n String name,\n String outerName,\n String innerName,\n int access) {\n }",
"Object getContainedValue();",
"public E value()\r\n\t// post: returns value associated with this node\r\n\t{\r\n\t\treturn val;\r\n\t}",
"public T get() {\n return value;\n }",
"public T get() {\n return value;\n }",
"private FederatedIdentityCredentialProperties innerProperties() {\n return this.innerProperties;\n }",
"public Object getInternalValue()\n {\n return m_internalValue;\n }",
"private Scanner getOuterType() {\r\n\t\t\treturn Scanner.this;\r\n\t\t}",
"OperationResponseInner innerModel();",
"private NrtAlertRuleProperties innerProperties() {\n return this.innerProperties;\n }",
"public interface InnerClass {\n int getNumber();\n}",
"public Iterator<ElementType> iterator(){\n return new InnerIterator();\n }",
"@Override // Runnable hat nur eine Methode => run()\n public void run() {\n System.out.println(localVariable);\n System.out.println(Excursus.this.outerAttribute);\n Excursus.this.outerMethod(localVariable);\n\n }",
"@Override\n public C get() {\n return content;\n }",
"public E getValue()\n {\n return value;\n }",
"public E getValue() {\r\n return value;\r\n }",
"private SlotDifferenceProperties innerProperties() {\n return this.innerProperties;\n }",
"boolean isInner();",
"@Override\n Derived get();",
"boolean ignoreInner();",
"public T get() {\n return this.elemento;\n }",
"public E peek(){\n\t\treturn top.element;\n\t}",
"Elem getElem();",
"public V get() {\n return value;\n }",
"public Value makeGetter() {\n Value r = new Value(this);\n r.getters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }",
"@Override public Padding calcPadding(Dim outer, Dim inner) {\n if (outer.lte(inner)) { return null; }\n double dx = (outer.getWidth() - inner.getWidth()) / 2;\n// System.out.println(\"\\t\\t\\tcalcPadding() dx=\" + dx);\n // Like HTML it's top, right, bottom, left\n// System.out.println(\"\\t\\t\\tcalcPadding() outer.y() - inner.y()=\" + (outer.y() - inner.y()));\n return Padding.of(outer.getHeight() - inner.getHeight(), dx, 0, dx);\n }",
"public S getValue() { return value; }",
"AccountInner innerModel();",
"protected final void validateNotBuildingInner()\n {\n Validate.stateIsNull(myInner,What.INNERBLOCK);\n }",
"public E getValue() {\n\t\treturn value;\n\t}",
"public final void mT__72() throws RecognitionException {\r\n try {\r\n int _type = T__72;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:69:7: ( 'inner' )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:69:9: 'inner'\r\n {\r\n match(\"inner\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"public T getValue() {\r\n return value;\r\n }",
"VirtualMachineExtensionImageInner innerModel();",
"@Override\n\tpublic T somme() {\n\t\treturn val;\n\t}",
"public Object getValue(){\n \treturn this.value;\n }",
"public Object getValue() { return this.value; }",
"public T getValue() \n\t{\n\t\treturn value;\n\t}",
"public T getValue()\n {\n return value;\n }",
"protected DecoratedFastTreeItem(Element outer, Element inner) {\n super(outer);\n \n assert DOM.isOrHasChild(outer, inner);\n \n wrappedElement = createLeafElement();\n \n setStyleName(wrappedElement, STYLENAME_WRAPPED);\n setStyleName(STYLENAME_LEAF_DEFAULT);\n DOM.appendChild(inner, wrappedElement);\n }",
"SourceControlInner innerModel();",
"public Object getValue() { return _value; }",
"Elem getPointedElem();",
"Tag getInternal();",
"public String getEl() {\r\n\t\treturn el;\r\n\t}",
"public final /* synthetic */ Object m1459unboximpl() {\n return this.holder;\n }",
"E getValue();",
"public T peek() {\r\n\t\tT ele = top.ele;\r\n\t\treturn ele;\r\n\t}",
"public VBox get() {\n\t\treturn root;\n\t}",
"protected E eval()\n\t\t{\n\t\tE e=this.e;\n\t\tthis.e=null;\n\t\treturn e;\n\t\t}",
"public B getSecond() {return second; }"
] | [
"0.7578771",
"0.6266505",
"0.6190851",
"0.5972468",
"0.59223294",
"0.5878079",
"0.58094937",
"0.5784473",
"0.57815784",
"0.5764427",
"0.5749928",
"0.5738386",
"0.57214135",
"0.5688878",
"0.5660172",
"0.56565666",
"0.5618866",
"0.5604169",
"0.56006646",
"0.5597678",
"0.5595262",
"0.5562839",
"0.55600643",
"0.55581427",
"0.5550098",
"0.5550098",
"0.55451566",
"0.5534035",
"0.5526829",
"0.54923964",
"0.5471494",
"0.54712933",
"0.54614127",
"0.54605514",
"0.5446628",
"0.54404444",
"0.5436966",
"0.54281145",
"0.5405022",
"0.53839403",
"0.5369179",
"0.5303862",
"0.52990395",
"0.52918667",
"0.5289568",
"0.5284129",
"0.52806437",
"0.5278582",
"0.5269673",
"0.5267244",
"0.52608263",
"0.52593243",
"0.5253786",
"0.5251559",
"0.5251559",
"0.5250734",
"0.5246302",
"0.5242603",
"0.5232481",
"0.5219695",
"0.5217972",
"0.52109355",
"0.520646",
"0.5201338",
"0.5197267",
"0.51812613",
"0.517239",
"0.5163982",
"0.5162224",
"0.5148235",
"0.51460713",
"0.5141177",
"0.5126572",
"0.51252824",
"0.51222897",
"0.51218355",
"0.51173264",
"0.5109473",
"0.5096225",
"0.50853646",
"0.50761384",
"0.5065748",
"0.5065489",
"0.5062217",
"0.50481844",
"0.504297",
"0.5034279",
"0.5031763",
"0.5028201",
"0.50275326",
"0.50175154",
"0.50170225",
"0.50048107",
"0.5002538",
"0.5002309",
"0.5000927",
"0.49940586",
"0.49920434",
"0.49896058",
"0.4989171"
] | 0.68464607 | 1 |
/ method getMiddle() assigns middle a value pre: called by class post: middle is set a value | public void getMiddle(int newMid) {
middle = newMid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TreeNode getMiddle() {\n\t\treturn middle;\n\t}",
"public String getMiddleInitial(){\r\n\t\treturn middleInitial;\r\n\t}",
"public String getMiddleInitial() {\r\n return middleInitial;\r\n }",
"public int getMid() {\r\n return mid;\r\n }",
"public String getMiddleName()\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the middleName.\n\t\treturn middleName;\n\n\t}",
"public String getMiddleName()\n\t{\n\t\treturn middleName;\n\t}",
"public String getMiddleName() {\r\n\t\treturn middleName;\t\t\r\n\t}",
"public java.lang.String getMiddleNm() {\n return middleNm;\n }",
"public int getMiddleValue(){\n\tint nodeValue=0, llSize=0, brojac=0,middle;\n\tNode current=head;\n\twhile(current!=null){\n\t\tllSize++;\n\t\tcurrent=current.next;\n\t}\n\tmiddle=llSize/2;\n\tcurrent=head;\n\twhile(brojac!=middle){\n\t\tcurrent=current.next;\n\t\tbrojac++;\n\t}\n\tnodeValue=current.value;\n\treturn nodeValue;\n}",
"public void setMiddle(TreeNode middle) {\n\t\tthis.middle = middle;\n\t}",
"public void setMiddleInitial(String middleInitial){\r\n\t\tthis.middleInitial = middleInitial;\r\n\t}",
"public String getMiddleName() {\n\t\treturn middleName;\n\t}",
"public String getMiddleName() {\n\t\treturn middleName;\n\t}",
"public String getMiddleName() {\n return middleName;\n }",
"public Point middle() {\r\n Point middlePoint = new Point(((this.end.getX() + this.start.getX()) / 2),\r\n ((this.end.getY() + this.start.getY()) / 2));\r\n return middlePoint;\r\n }",
"HasValue<String> getMiddleInitial();",
"public long getMid() {\n return mid_;\n }",
"public long getMid() {\n return mid_;\n }",
"public int getMiddle() {\n if (this.head == null) {\n return -1;\n }\n\n Node slowPointer = this.head;\n Node fastPointer = this.head;\n while (fastPointer.getNext() != null && fastPointer.getNext().getNext() != null) {\n fastPointer = fastPointer.getNext().getNext();\n slowPointer = slowPointer.getNext();\n }\n\n return slowPointer.getData();\n }",
"private int getmiddle() {\n Node slow = this;\n Node fast = this;\n Boolean slow_move = false;\n while (fast != null) {\n if (slow_move) {\n fast = fast.nextNode;\n slow = slow.nextNode;\n slow_move = false;\n } else {\n fast = fast.nextNode;\n slow_move = true;\n }\n }\n return slow.value;\n }",
"public double getMiddleNumber()\n {\n double min = getMinimumValue();\n double max = getMaximumValue();\n return (min + max) / 2;\n }",
"public long getMid() {\n return mid_;\n }",
"public long getMid() {\n return mid_;\n }",
"public int getMiddle() {\n\t\treturn sobelMatrixLength / 2;\n\t}",
"private View getMiddleItem()\n\t{\n\t\tsynchronized (this)\n\t\t{\n\t\t\tint count = getChildCount();\n\t\t\tif (count!= 0)\n\t\t\t{\n\t\t\t\tint width = getWidth();\n\t\t\t\tint childNumber =0;\n\t\t\t\tView child = null;\n\t\t\t\t// take next child starting from left until one is reached whose right edge is over the middle\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tchild = getChildAt(childNumber);\n\t\t\t\t\tchildNumber++;\n\t\t\t\t}\n\t\t\t\twhile (childNumber < count && child.getRight()<width/2);\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public void setMid(int value) {\r\n this.mid = value;\r\n }",
"void setMiddle(T data) {\n\t\tthis.middle = new TreeNode<T>(data, null, null, null, this);\n\t}",
"public void setMiddleName(String middleName) {\n if(middleName.length()>0)\n this.middleName = middleName;\n else this.middleName =\"undefined\";\n\n }",
"public void setMiddleInitial(String middleInitial) {\r\n this.middleInitial = doTrim(middleInitial);\r\n }",
"public void setMiddleName(String middleName);",
"public void getMiddle(){\n\t\t/*Node slow_ptr = head;\n\t\tNode fast_ptr = head;\n\t\tif(head != null){\n\t\t\twhile(fast_ptr != null && slow_ptr != null){\n\t\t\t\tfast_ptr = fast_ptr.next.next;\n\t\t\t\tslow_ptr = slow_ptr.next;\n\t\t\t}\n logger.info(\"Middle element is:: \"+slow_ptr.getData());\n\t\t}*/\n\t\t\n\t\tNode current = head;\n\t\tint length = 0;\n\t\t\n\t\tNode middle = head;\n\t\t\n\t\twhile(current.next != null){\n\t\t\tlength++;\n\t\t\tif(length % 2 == 0){\n\t\t\t\tmiddle = middle.next;\n\t\t\t}\n\t\t\t\n\t\t\tcurrent = current.next;\n\t\t\t\n\t\t}\n\t\t\n\t\tif(length %2 == 1){\n\t\t\tmiddle = middle.next;\n\t\t}\n\t\t//logger.debug(\"length of the list:: \"+length+1);\n\t\t//logger.info(\"middle element of the linkedlist:: \"+middle.data);\n\t\t\n\t\t\n\t}",
"@Test\n\tpublic void testMiddleTwo() {\n\t\t\n\t\tStringMiddle strMiddle = new StringMiddle();\n\t\tString result = strMiddle.middleTwo(\"string\");\n\t\tassertEquals(\"ri\", result);\n\t\t\n\t}",
"private Point middleLeft() {\n return this.topLeft.add(0, this.height / 2).asPoint();\n }",
"private int getMiddlePositon()\n\t{\n\t\tint count = getChildCount();\n\t\tif (count!= 0)\n\t\t{\n\t\t\tint width = getWidth();\n\t\t\tint childNumber =0;\n\t\t\tView child = null;\n\t\t\t// take next child starting from left until one is reached whose right edge is over the middle\n\t\t\tdo\n\t\t\t{\n\t\t\t\tchild = getChildAt(childNumber);\n\t\t\t\tchildNumber++;\n\t\t\t}\n\t\t\twhile (childNumber < count && child.getRight()<width/2);\n\t\t\treturn getAdapterIndexNumber(mLeftViewIndex + childNumber);\n\t\t}\n\t\treturn 0;\n\t}",
"public Point topMiddle() {\n return this.topLeft.add(new Vector2D(getWidth() / 2, 0)).asPoint();\n }",
"long getMid();",
"long getMid();",
"public void setMiddleName(String inMiddle)\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Set the middleName to inMiddle.\n\t\tmiddleName = inMiddle;\n\n\t}",
"@Override\n\tpublic java.lang.String getMiddleName() {\n\t\treturn _candidate.getMiddleName();\n\t}",
"public static Node getMiddle(Node head)\n\t{\n\t\tif (head == null) \n\t\t\treturn head; \n\t\tNode hare = head, tortoise = head;\n\n\t\twhile (hare.next != null && hare.next.next != null) {\n\t\t\ttortoise = tortoise.next;\n\t\t\thare = hare.next.next;\n\t\t} \n\t\treturn tortoise;\n\t}",
"@AutoEscape\n\tpublic String getMiddleName();",
"public static EquationExpression middle(EquationExpression end1,\n\t\t\tEquationExpression end2, EquationExpression middle) {\n\t\treturn diff(middle, mid(end1, end2));\n\t}",
"public static EquationExpression middle(EquationExpression end1, EquationExpression end2, EquationExpression middle) {\n return diff(middle, mid(end1, end2));\n }",
"public void setMiddleNm(java.lang.String middleNm) {\n this.middleNm = middleNm;\n }",
"public int getMiddle(int i) {\n int middle = Game.TILE_SIZE / 2 - curAnimation.getCurFrame().getWidth() / 2;\n return middle + i*Game.TILE_SIZE;\n }",
"private Line getMiddleTrajectory() {\n Point startPoint;\n if (movingRight()) {\n startPoint = middleRight();\n } else if (movingLeft()) {\n startPoint = middleLeft();\n } else {\n return null;\n }\n\n return new Line(startPoint, this.velocity);\n }",
"private Point middleRight() {\n return this.topLeft.add(this.width, this.height / 2).asPoint();\n }",
"public void setMiddleName(String middleName)\n\t{\n\t\tthis.middleName = middleName;\n\t}",
"public String middleThree(String str) {\r\n int middlePoint = str.length() / 2;\r\n\r\n return str.length() > 2 ? str.substring(middlePoint - 1, middlePoint + 2) : str;\r\n }",
"public E middleElement(){\n\r\n Node <E> slowPointer = head;\r\n Node <E> fastPointer = head;\r\n\r\n if(head != null){\r\n while(fastPointer != null && fastPointer.getNext() != null){\r\n fastPointer = fastPointer.getNext().getNext();\r\n slowPointer = slowPointer.getNext();\r\n }\r\n\r\n return slowPointer.getItem();\r\n\r\n }\r\n\r\n\r\n return null;\r\n\r\n }",
"public void setMiddleName(String middleName) {\n\t\tthis.middleName = middleName;\n\t}",
"public Position getMidPoint() {\n return midPoint;\n }",
"public void setMiddleName(String s) {\r\n\t\tmiddleName = s;\t\t\r\n\t}",
"public int findMiddleNode2() {\n\t\tif (this.head!=null) {\n\t\t\tint len = 0;\n\t\t\tNode temp1 = this.head;\n\t\t\t// calculating the length. 0 based index for len\n\t\t\twhile (temp1.next != null) {\n\t\t\t\ttemp1 = temp1.next;\n\t\t\t\tlen++;\n\t\t\t}\n\t\t\t//System.out.println(\"length: \"+len);\n\t\t\t// temp2 to iterate once\n\t\t\tNode temp2 = this.head;\n\t\t\t/*\n\t\t\t * // temp3 travels twice as faster than temp2 (hare and tortoise approach). \n\t\t\t * while temp3 travels the entire LL, temp2 will be reaching exactly the middle of the LL\n\t\t\t */\n\t\t\tNode temp3 = this.head;\n\t\t\twhile (temp3!=null && temp3.next!=null && temp3.next.next!=null) {\n\t\t\t\ttemp2 = temp2.next;\n\t\t\t\ttemp3 = temp3.next.next;\n\t\t\t}\n\t\t\t// for even len -> middle is (len/2)+1 th index\n\t\t\tif ((len+1)%2 == 0) {\n\t\t\t\treturn temp2.next.data;\n\t\t\t}\n\t\t\t// for odd len -> middle is (len/2) th index\n\t\t\telse {\n\t\t\t\treturn temp2.data;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\treturn -1;\n\t\t}\n\n\t\t\n\t}",
"@Test\n\tpublic void testMiddleTwoThird() {\n\t\t\n\t\tStringMiddle strMiddle = new StringMiddle();\n\t\tString result = strMiddle.middleTwo(\"Practice\");\n\t\tassertEquals(\"ct\", result);\n\t\t\n\t}",
"public Point getPointMiddle()\n {\n Point temp = new Point();\n temp.x = Math.round((float)(rettangoloX + larghezza/2));\n temp.y = Math.round((float)(rettangoloY + altezza/2)); \n return temp;\n }",
"@Test\n\tpublic void testMiddleTwoSecond() {\n\t\t\n\t\tStringMiddle strMiddle = new StringMiddle();\n\t\tString result = strMiddle.middleTwo(\"code\");\n\t\tassertEquals(\"od\", result);\n\t\t\n\t}",
"@ApiModelProperty(value = \"The middle band value of the Keltner Channel calculation\")\n public Float getMiddleBand() {\n return middleBand;\n }",
"public void setMiddleName(String middleName) {\n String old = this.middleName;\n this.middleName = middleName;\n firePropertyChange(MIDDLE_NAME_PROPERTY, old, middleName);\n }",
"public static Node middleNode(Node start, Node last) { \n if (start == null) \n return null; \n \n Node slow = start; \n Node fast = start.next; \n \n while (fast != last) \n { \n fast = fast.next; \n if (fast != last) \n { \n slow = slow.next; \n fast = fast.next; \n } \n } \n return slow; \n }",
"public static String middle(String s) {\n\treturn s.substring(1, s.length() - 1);\n\t}",
"private Alien2 shootmiddle() {\n\t\tAlien2 shooter = alien2[choose()];\n\t\tif (shooter == null) return shootmiddle();\n\t\telse if (shooter.Destroyed) return shootmiddle();\n\t\telse return shooter;\n\t}",
"public State getMiddleArcState()\n {\n return iconPartStates[1];\n }",
"public String middleTwo(String str) {\r\n return str.length() > 1 ? str.substring(str.length() / 2 - 1, str.length() / 2 + 1) : str;\r\n }",
"public double getMidLongitude() {\n\t\treturn midLongitude;\n\t}",
"@ApiModelProperty(value = \"When present, this field contains recipient's middle initial\")\n public String getRecipientMiddleInitial() {\n return recipientMiddleInitial;\n }",
"public Set<Card> getMiddleCards(){\r\n\t\treturn middleCards;\r\n\t}",
"public static String cutMiddleStr(String origin, String middle) {\n String[] strs = origin.split(middle);\n return strs[strs.length - 1];\n }",
"public static ListNode getMiddle(ListNode head) {\r\n\tListNode fast = head.next;\r\n \tListNode slow = head;\r\n \t\r\n \twhile (fast != null && fast.next != null) {\r\n \t fast = fast.next.next;\r\n \t slow = slow.next;\r\n \t}\r\n \t\r\n \treturn slow;\r\n }",
"public double getMidLatitude() {\n\t\treturn midLatitude;\n\t}",
"int getMid(int s, int e) {\n return s + (e - s) / 2;\n }",
"public static String stringMiddle(String str) {\r\n boolean isEven = (str.length() % 2 == 1);\r\n int begin = (str.length() - 1) / 2;\r\n int end = isEven ? 1 : 2;\r\n return str.substring(begin, begin + end);\r\n }",
"public static String middle(String s) {\n return s.substring(1, s.length() - 1);\n }",
"public ListNode findMiddle(ListNode head) {\n\t\tListNode fast,slow;\n\t\tfast=slow=head;\n\t\twhile(fast!=null & fast.next()!=null) {\n\t\t\tfast=fast.next().next();\n\t\t\tslow=slow.next();\t\t\n\t\t}\n\t\treturn slow;\n\t}",
"public static LLNode findMiddleNode(LLNode head) {\n\t\t\tLLNode currentNode = head;\n\t\t\tint length = 0;\n\t\t\twhile(currentNode != null) {\n\t\t\t\t++length;\n\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t}\n\t\t\tint mid = (length/2)+1;\n\t\t\tcurrentNode = head;\n\t\t\twhile(--mid>0) {\n\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t}\n\n\t\t\treturn currentNode;\n\t\t}",
"public int getMidPos ()\r\n {\r\n if (getLine()\r\n .isVertical()) {\r\n // Fall back value\r\n return (int) Math.rint((getFirstPos() + getLastPos()) / 2.0);\r\n } else {\r\n return (int) Math.rint(\r\n getLine().yAt((getStart() + getStop()) / 2.0));\r\n }\r\n }",
"public static int alwaysPickMiddle(int[] arr, int left, int right) {\n return (left + right) / 2;\n }",
"Node getMiddleNode(Node head){\n if(head == null || head.next == null){\n return head;\n }\n\n Node slowRunner = head;\n Node fastRunner = head;\n\n while(fastRunner != null && fastRunner.next != null){\n slowRunner=slowRunner.next;\n fastRunner=fastRunner.next.next;\n }\n return slowRunner;\n }",
"public ListNode middleNode(ListNode head) {\n List<ListNode> array = new ArrayList<>();\n\n ListNode list = head;\n while (list != null) {\n array.add(list);\n list = list.next;\n }\n\n return array.get(array.size() / 2);\n }",
"@Override\n\tpublic void setMiddleName(java.lang.String middleName) {\n\t\t_candidate.setMiddleName(middleName);\n\t}",
"public int getMiddle() {\n // searching just the middle\n for (int row = 1; row < board.length - 1; row++) {\n for (int col = 1; col < board.length - 1; col++) {\n if (board[row][col - 1] != null && board[row][col + 1] != null && board[row - 1][col] != null\n && board[row + 1][col] != null && board[row][col] != null)\n if (board[row][col - 1].getPlayerNumber() == board[row][col + 1].getPlayerNumber()\n && board[row - 1][col].getPlayerNumber() == board[row][col - 1].getPlayerNumber() &&\n board[row - 1][col].getPlayerNumber() == board[row + 1][col].getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n return board[row][col - 1].getPlayerNumber();\n }\n\n }\n return -1;\n }",
"public Point middle(Point p) {\n\t\treturn new Point(this.getX() - ((this.getX() - p.getX()) / 2), this.getY() - ((this.getY() - p.getY()) / 2));\n\t}",
"public ListNode middleNode3(ListNode head) {\n ListNode slow = head, fast = head;\n while (fast != null && fast.next != null) {\n fast = fast.next.next;\n slow = slow.next;\n }\n return slow;\n }",
"public void addMiddle(String val, int index)\n {\n if (head != null)\n {\n ListNode newNode = new ListNode();\n newNode.setData(val);\n if (index <= size)\n {\n ListNode indexNode = findIndexNode(index);\n newNode.setNext(indexNode.getNext());\n indexNode.setNext(newNode);\n size++;\n } \n }\n else\n {\n addFirst(val);\n }\n }",
"public Builder setMid(long value) {\n bitField0_ |= 0x00000001;\n mid_ = value;\n onChanged();\n return this;\n }",
"public Builder setMid(long value) {\n bitField0_ |= 0x00000001;\n mid_ = value;\n onChanged();\n return this;\n }",
"public ListNode middleNode(ListNode head) {\n ListNode fastCursor = head;\n ListNode slowCursor = head;\n\n while (fastCursor != null && fastCursor.next != null) {\n slowCursor = slowCursor.next;\n fastCursor = fastCursor.next.next;\n }\n return slowCursor;\n }",
"final public Vector2 getCenter()\n\t{\n\t\treturn center;\n\t}",
"public ArrayList<String> middle(ArrayList<String> values) {\n\t\tArrayList<String> empty = new ArrayList<String>();\n\t\tif(values == null) {\n\t\t\treturn empty;\n\t\t} else if (values.size() < 3 || values.size() % 2 == 0) {\n\t\t\treturn empty;\n\t\t}\n\t\tString first = values.get((int) Math.floor(values.size() / 2) - 1);\n\t\tString middle = values.get((int) Math.floor(values.size() / 2));\n\t\tString last = values.get((int) Math.floor(values.size() / 2) + 1);\n\t\tArrayList<String> returnArrayList = new ArrayList<String>();\n\t\treturnArrayList.add(first);\n\t\treturnArrayList.add(middle);\n\t\treturnArrayList.add(last);\n\t\treturn returnArrayList;\t// default return value to ensure compilation\n\t}",
"abstract public void setName(String first, String middle, String last);",
"public ListNode findTheMiddleNode(ListNode head) {\n\n ListNode slow = head;\n ListNode fast = head;\n if (head == null) {\n return null;\n } else {\n while (fast != null && fast.next != null) {\n fast = (fast.next).next;\n slow = slow.next;\n }\n\n }\n return slow;\n }",
"private static ListNode findPreMiddle(ListNode head) {\n\t\t\n\t\tif(head.next == null){return head;}\n\t\t\n\t\tListNode fast = head.next;\n\t\tListNode slow = head;\n\t\t\n\t\twhile(fast.next != null && fast.next.next != null){\n\t\t\tfast = fast.next.next;\n\t\t\tslow = slow.next;\n\t\t}\n\t\t\n\t\treturn slow;\n\t}",
"public double getCenter() {\n return 0.5 * (lo + hi);\n }",
"public static int getCenter() {\n\t\treturn Center;\n\t}",
"private boolean isMiddle(int middle, int time1, int time2) {\n int[] distanceFromTime1 = leftRightDistance(middle, time1);\n int[] distanceFromTime2 = leftRightDistance(middle, time2);\n return Arrays.equals(distanceFromTime1, distanceFromTime2);\n }",
"public static int getMid(int low, int high) \r\n\t{\r\n\t\treturn ((low + high + 1) / 2);\r\n\t}",
"private void readjustScrollToMiddleItem()\n\t{\n\t\tif (mSnappingToCenter)\n\t\t{\n\t\t\tView middleChild = getMiddleItem();\n\t\t\tif (middleChild != null)\n\t\t\t{\n\t\t\t\tmSelectedIndex = getMiddlePositon();\n\t\t\t\tint width = getWidth();\n\t\t\t\tint center = width/2;\n\t\t\t\tint childwidth = middleChild.getMeasuredWidth();\n\t\t\t\tint middleItemCenter = middleChild.getLeft() + childwidth /2;\n\t\t\t\tint moveDx = middleItemCenter-center;\n\t\t\t\tif (mAdjustAnimation!=null)\n\t\t\t\t{\n\t\t\t\t\tmAdjustAnimation.stop();\n\t\t\t\t}\n\t\t\t\tmAdjustAnimation = new AdjustPositionAnimation(moveDx);\n\t\t\t\tsetAnimation(mAdjustAnimation);\n\t\t\t\tstartAnimation(mAdjustAnimation);\n\t\t\t}\n\t\t}\n\t}",
"private static double middleValueElementInArray(int[] arr) {\n double sum = sumElementArray(arr);\n return sum /arr.length;\n }",
"public java.lang.String getMID() {\r\n return MID;\r\n }",
"public int getCenter() {\n\t\t\treturn center;\n\t\t}"
] | [
"0.7793654",
"0.7509473",
"0.74406743",
"0.70218664",
"0.7011225",
"0.70102924",
"0.70042545",
"0.69779897",
"0.695652",
"0.6878973",
"0.6877037",
"0.6876031",
"0.6876031",
"0.6868402",
"0.68632925",
"0.67465025",
"0.67262113",
"0.67262113",
"0.67128795",
"0.67016685",
"0.668867",
"0.6653049",
"0.6653049",
"0.66242194",
"0.65465915",
"0.65175736",
"0.6492537",
"0.64914167",
"0.6448278",
"0.6444183",
"0.6434113",
"0.6423515",
"0.6418074",
"0.6415255",
"0.6344248",
"0.63335437",
"0.63335437",
"0.6333251",
"0.6323293",
"0.6287856",
"0.6286796",
"0.62462455",
"0.6235375",
"0.6227159",
"0.6212592",
"0.618531",
"0.6153704",
"0.6107388",
"0.60655844",
"0.604762",
"0.6030865",
"0.59925234",
"0.59533244",
"0.5934839",
"0.59209204",
"0.5882551",
"0.5879964",
"0.5855732",
"0.58460796",
"0.5783956",
"0.5758476",
"0.57363665",
"0.5729122",
"0.5695326",
"0.56931925",
"0.56668407",
"0.5640391",
"0.56315506",
"0.5628521",
"0.55818635",
"0.55732656",
"0.557321",
"0.5562726",
"0.5551805",
"0.5548744",
"0.5496398",
"0.54925424",
"0.54556453",
"0.543104",
"0.5416794",
"0.5411073",
"0.5408176",
"0.53957427",
"0.53784275",
"0.53752345",
"0.53752345",
"0.5366085",
"0.53513247",
"0.5333706",
"0.5299857",
"0.52816844",
"0.5260282",
"0.52573156",
"0.5246974",
"0.521559",
"0.521488",
"0.52049214",
"0.5193724",
"0.5189214",
"0.5183015"
] | 0.7781274 | 1 |
/ method getOuter() assigns outer a value pre: called by class post: outer is set a value | public void getOuter(int newOut) {
outer = newOut;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Inner getInner(){\n Outer.this.toString();\n return this.new Inner();\n }",
"public IClassHolder getOuterClass() {\n return m_outerClass;\n }",
"private Scanner getOuterType() {\r\n\t\t\treturn Scanner.this;\r\n\t\t}",
"public void getInner(int newIn) {\r\n\t\tinner = newIn;\r\n\t}",
"public int Parent() { return this.Parent; }",
"public String getOuterClass(){\n\t\treturn targetClass.outerClass;\n\t}",
"void outerMethod() {\n\t\n\tclass Inner {\n\t \n\t protected Inner() { }\n\t public int publicInner = 100;\n\t int privateInner = Outer.this.privateOuter; \n\t \n\t Object foo = Outer.this.foo();\n\t \n\t void printOuterObjectFromInner() {\n\t\tSystem.out.println(\"Hello from inner: \" + foo);\n\t }\n\t \n\t}\n\tInner in2 = new Inner();\n\tin2.printOuterObjectFromInner();\n }",
"ClassType outer();",
"@Override // Runnable hat nur eine Methode => run()\n public void run() {\n System.out.println(localVariable);\n System.out.println(Excursus.this.outerAttribute);\n Excursus.this.outerMethod(localVariable);\n\n }",
"String getOuter_id();",
"public Foo getParent() {\n return parent;\n }",
"public @Nullable\n JFrame getOuterFrame() {\n if (null == outerFrame) {\n outerFrame = searchForOuterFrame();\n }\n return outerFrame;\n }",
"public CompoundExpression getParent (){\n return _parent;\n }",
"public CompoundExpression getParent()\r\n\t\t{\r\n\t\t\treturn _parent;\r\n\t\t}",
"void m1() {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(outer); // can access the outer CLASS context elements\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(finalVariable); // can access to the outer METHOD context elements if FINAL\n\t\t\t\t\tSystem.out.println(effectivellyFinal); // can access to the outer METHOD context elements if EFFECTIVELY FINAL\n\t\t\t\t}",
"public void callInner() {\n Inner inner = new Inner();\n inner.go();\n int f = inner.private_int; //private inner fields visible to Outer class\n }",
"public XMLElement getParent()\n/* */ {\n/* 323 */ return this.parent;\n/* */ }",
"public IRubyObject getTopSelf() {\n return topSelf;\n }",
"public Scope getOuterMostEnclosingScope() {\n\t\tScope s = this;\n\t\twhile (s.getEnclosingScope() != null) {\n\t\t\ts = s.getEnclosingScope();\n\t\t}\n\t\treturn s;\n\t}",
"public BinomialTree<KEY, ITEM> parent()\n\t{\n\t\treturn _parent;\n\t}",
"public String getOuterUserId() {\n return outerUserId;\n }",
"public OwObject getParent()\r\n {\r\n return m_Parent;\r\n }",
"public Loop getRoot() {\n\t\tfor (Loop lp : parent.keySet()) {\n\t\t\tif (parent.get(lp)==null) return lp;\n\t\t}\n\t\treturn null;\n\t}",
"private Node outerNode(Node node) {\n Node outerNode = centeredNode(node);\n outerNode.setOnScroll(e -> {\n e.consume();\n onScroll(e.getDeltaY(), new Point2D(e.getX(), e.getY()));\n });\n return outerNode;\n }",
"public static Class<?> getOuterClass(Class<?> cl) {\n \t\tClass<?> enclosingClass;\n \t\twhile ((enclosingClass = cl.getEnclosingClass()) != null) {\n \t\t\tcl = enclosingClass;\n \t\t}\n \t\treturn cl;\n \t}",
"public void makeInnerObject()\n\t{\n\t\tInnerClass_firstInnerClass objCreationInnerByMethod1=new InnerClass_firstInnerClass();\n\t\tobjCreationInnerByMethod1.accessOuterClassFields();\n\t}",
"protected LambdaTerm getParent() { return parent; }",
"private SqlContainerCreateUpdateProperties innerProperties() {\n return this.innerProperties;\n }",
"private NotebookWorkspaceProperties innerProperties() {\n return this.innerProperties;\n }",
"public Peak getParent() {\n\t\treturn parent;\n\t}",
"public TypeJavaSymbol outermostClass() {\n JavaSymbol symbol = this;\n JavaSymbol result = null;\n while (symbol.kind != PCK) {\n result = symbol;\n symbol = symbol.owner();\n }\n return (TypeJavaSymbol) result;\n }",
"public SeleniumQueryObject parent() {\n\t\treturn ParentFunction.parent(this);\n\t}",
"Reference owner();",
"private void fixInnerParent(BaleElement be)\n{\n BaleAstNode sn = getAstChild(be);\n while (cur_parent != cur_line && sn == null) {\n cur_parent = cur_parent.getBaleParent();\n cur_ast = cur_parent.getAstNode();\n sn = getAstChild(be);\n }\n\n // now see if there are any internal elements that should be used\n while (sn != null && sn != cur_ast && sn.getLineLength() == 0) {\n BaleElement.Branch nbe = createInnerBranch(sn);\n if (nbe == null) break;\n addElementNode(nbe,0);\n nbe.setAstNode(sn);\n cur_parent = nbe;\n cur_ast = sn;\n sn = getAstChild(be);\n }\n}",
"public AscriptionVisitor pop() {\n return outer;\n }",
"@DerivedProperty\n\tCtElement getParent() throws ParentNotInitializedException;",
"private DefaultCniNetworkProperties innerProperties() {\n return this.innerProperties;\n }",
"public Instance getParent() {\r\n \t\treturn parent;\r\n \t}",
"boolean isInner();",
"TMNodeModelComposite getParent() {\n return parent;\n }",
"public SimServerMenuOuter getMenuOuter() {\n return menuOuter;\n }",
"public MiniMap getParent() {\n \t\treturn parent;\n \t}",
"public TreeNode getParent ()\r\n {\r\n return parent;\r\n }",
"public Object getParent() {\r\n return this.parent;\r\n }",
"Node<T> parent();",
"Object getParent();",
"public Node getParent(){\n return parent;\n }",
"private WorkspacePatchProperties innerProperties() {\n return this.innerProperties;\n }",
"<E extends CtElement> E setParent(E parent);",
"public Object getParent() {\n return this.parent;\n }",
"public Object getParent() {\n return this.parent;\n }",
"public Object getParent() {\n return this.parent;\n }",
"public IPSComponent peekParent();",
"public static OuterLayout getLayout(SectionInfo info)\n\t{\n\t\tOuterLayout layout = info.getAttribute(OUTER_LAYOUT_KEY);\n\t\tif( layout == null )\n\t\t{\n\t\t\tlayout = OuterLayout.STANDARD;\n\t\t\tsetLayout(info, layout);\n\t\t}\n\t\treturn layout;\n\t}",
"EObject getLeft();",
"public PafDimMember getParent() {\r\n\t\treturn parent;\r\n\t}",
"public T peek() {\r\n\t\tT ele = top.ele;\r\n\t\treturn ele;\r\n\t}",
"public TopoDS_Shape Ancestor( TopoDS_Edge E) {\n TopoDS_Shape ret = new TopoDS_Shape(OCCwrapJavaJNI.BRepAlgo_NormalProjection_Ancestor(swigCPtr, this, TopoDS_Edge.getCPtr(E), E), true);\n return ret;\n }",
"@Override public Padding calcPadding(Dim outer, Dim inner) {\n if (outer.lte(inner)) { return null; }\n double dx = (outer.getWidth() - inner.getWidth()) / 2;\n// System.out.println(\"\\t\\t\\tcalcPadding() dx=\" + dx);\n // Like HTML it's top, right, bottom, left\n// System.out.println(\"\\t\\t\\tcalcPadding() outer.y() - inner.y()=\" + (outer.y() - inner.y()));\n return Padding.of(outer.getHeight() - inner.getHeight(), dx, 0, dx);\n }",
"public E peek(){\n\t\treturn top.element;\n\t}",
"private RulesEngineProperties innerProperties() {\n return this.innerProperties;\n }",
"public abstract Object top();",
"SemanticRegion<T> outermost();",
"public Ent getParent(){\n\t\treturn (Ent)bound.getParent();\n\t}",
"private DeepCreatedOriginGroupProperties innerProperties() {\n return this.innerProperties;\n }",
"public HtmlMap<T> getParent()\n\t{\n\t\treturn this.m_parent;\n\t}",
"public KDNode CompNode() {\n\t\t\n\t\tKDNode ptr = this;\n\t\twhile(ptr.parent_ptr != null) {\n\t\t\t\n\t\t\tif(ptr.is_node_set == true) {\n\t\t\t\treturn ptr;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.parent_ptr;\n\t\t}\n\t\t\n\t\treturn ptr;\n\t}",
"public UpTreeNode<E> getParent() {\n\t\t\treturn parent;\n\t\t}",
"public int getParentOne()\n\t{\n\t\treturn parentSetOne;\n\t}",
"public abstract OperatorImpl getParent();",
"private SchemaComponent findOutermostParentElement(){\n SchemaComponent element = null;\n //go up the tree and look for the last instance of <element>\n\tSchemaComponent sc = getParent();\n while(sc != null){\n if(sc instanceof Element){\n element = sc;\n }\n\t sc = sc.getParent();\n }\n return element;\n }",
"TreeNodeValueModel<T> parent();",
"Window getParent();",
"IGLProperty getParent();",
"public E top() {\n\t\tif (this.top == null) {\n\t\t\tthrow new EmptyStackException( );\n\t\t}\n\t\treturn this.top.data;\n\t\t\t\n\t}",
"public Control getControl() {\n\t\treturn tableLeft.getParent();\n\t}",
"@VTID(9)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject getParent();",
"private NetworkDevicePatchParametersProperties innerProperties() {\n return this.innerProperties;\n }",
"public Tree<T> getParent()\n {\n return this.parent;\n }",
"private BaleElement.Branch createOuterBranch(BaleAstNode sn)\n{\n switch (sn.getNodeType()) {\n case FILE :\n\t return new BaleElement.CompilationUnitNode(for_document,cur_parent);\n case CLASS :\n\t return new BaleElement.ClassNode(for_document,cur_parent);\n case METHOD :\n\t return new BaleElement.MethodNode(for_document,cur_parent);\n case FIELD :\n\t return new BaleElement.FieldNode(for_document,cur_parent);\n case ANNOTATION :\n\t return new BaleElement.AnnotationNode(for_document,cur_parent);\n case STATEMENT :\n\t return new BaleElement.SplitStatementNode(for_document,cur_parent);\n case EXPRESSION :\n\t return new BaleElement.SplitExpressionNode(for_document,cur_parent);\n case BLOCK :\n\t return new BaleElement.BlockNode(for_document,cur_parent);\n case SWITCH_BLOCK :\n\t return new BaleElement.SwitchBlockNode(for_document,cur_parent);\n case INITIALIZER :\n\t return new BaleElement.InitializerNode(for_document,cur_parent);\n case SET :\n\t // return new BaleElement.DeclSet(for_document,cur_parent);\n\t break;\n default:\n\t break;\n }\n return null;\n}",
"public CompositeObject getParent(\n )\n {return (parentLevel == null ? null : (CompositeObject)parentLevel.getCurrent());}",
"private EntityHierarchyItemProperties innerProperties() {\n return this.innerProperties;\n }",
"public Kit getParent() {\n return this.parent;\n }",
"@NoProxy\n @NoWrap\n @NoDump\n public BwEvent getParent() {\n return parent;\n }",
"public String getParent() {\n return _theParent;\n }",
"private boolean getLeftOuter() throws IOException {\n while(true) {\n if(rightTuple == nullPad) {\n found = false;\n leftTuple = leftChild.getNextTuple();\n if (leftTuple == null) {\n done = true;\n return false;\n }\n }\n rightTuple = rightChild.getNextTuple();\n if (rightTuple == null) {\n if (!found) {\n rightTuple = nullPad;\n rightChild.initialize();\n return true;\n }\n leftTuple = leftChild.getNextTuple();\n if (leftTuple == null) {\n done = true;\n return false;\n }\n found = false;\n rightChild.initialize();\n }\n else\n return true;\n }\n }",
"Spring getParent() {\n return parent;\n }",
"private VirtualNetworkProperties innerProperties() {\n return this.innerProperties;\n }",
"RolloutInner innerModel();",
"public TreeNode getParent() { return par; }",
"public TestResultTable.TreeNode getParent() {\n return parent;\n }",
"boolean ignoreInner();",
"public CommitNode parent() {\r\n\t\treturn parentCommit;\r\n\t}",
"LabInner innerModel();",
"public GitCommit getParent() { return _par!=null? _par : (_par=getParentImpl()); }",
"@Override\n public long get() {\n return (long) inner.get();\n }",
"CoreParentNode coreGetParent();",
"@Override\n\tpublic WhereNode getParent() {\n\t\treturn parent;\n\t}",
"private int parent(int i){return (i-1)/2;}",
"public PApplet getParent() {\n\t\treturn this.parent;\n\t}"
] | [
"0.75382566",
"0.676651",
"0.62820154",
"0.6227598",
"0.6131806",
"0.59936464",
"0.59682494",
"0.5886827",
"0.58778876",
"0.5845333",
"0.57694024",
"0.5729968",
"0.5696503",
"0.56574744",
"0.5642751",
"0.5633338",
"0.5596269",
"0.55450606",
"0.55350953",
"0.55323535",
"0.55282897",
"0.5495098",
"0.5474726",
"0.54621565",
"0.54559225",
"0.5455812",
"0.5455131",
"0.54461855",
"0.54382557",
"0.5405686",
"0.5399899",
"0.5395372",
"0.53939867",
"0.5393932",
"0.5392455",
"0.5390886",
"0.5382145",
"0.53743577",
"0.53458786",
"0.53445995",
"0.5332724",
"0.5329887",
"0.5323736",
"0.5314127",
"0.531229",
"0.5304501",
"0.52913105",
"0.5285417",
"0.52622885",
"0.5261006",
"0.5261006",
"0.5261006",
"0.5260679",
"0.52590764",
"0.5254027",
"0.5248892",
"0.52482545",
"0.52414453",
"0.52335507",
"0.52334124",
"0.52301776",
"0.52234936",
"0.5221237",
"0.5220993",
"0.5218105",
"0.5211383",
"0.5189247",
"0.5185467",
"0.5184145",
"0.51768094",
"0.51734954",
"0.5170774",
"0.516941",
"0.5168168",
"0.5163123",
"0.51594394",
"0.51590645",
"0.5157668",
"0.51543707",
"0.51540434",
"0.51471645",
"0.5141238",
"0.5141215",
"0.51333195",
"0.5132699",
"0.5132639",
"0.5111059",
"0.51094645",
"0.5105793",
"0.51056004",
"0.51043946",
"0.5099221",
"0.5093787",
"0.5088693",
"0.50871843",
"0.5083667",
"0.50820243",
"0.5080761",
"0.5080686",
"0.507449"
] | 0.69249517 | 1 |
/ method getPlayAgain() returns boolean playAgain pre: called by class post: playAgain returned | public boolean getPlayAgain() {
return playAgain;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void playAgain();",
"private boolean PlayAgain() {\n int choice = Main.HandleInput(\"Play Again\", 2);\n if (choice == 1){\n ResetGame();\n return true;\n }\n else{\n return false;\n }\n }",
"public static boolean playAgain() {\n\t\t// Have the system ask the user if they want to play again.\n\t\tSystem.out.print(\"Play again? y = yes: \");\n\t\tScanner manualInput = new Scanner(System.in);\n\t\tString playAgain = manualInput.nextLine();\n\t\t// Create an if statement that runs if the playAgain variable is equal to y.\n\t\tif(playAgain.equals(\"y\")) {\n\t\t\t// Have the function return true.\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\r\n public void testGetPlayAgain() {\r\n System.out.println(\"getPlayAgain\");\r\n WinnerScreen instance = new WinnerScreen();\r\n boolean expResult = false;\r\n boolean result = instance.getPlayAgain();\r\n assertEquals(expResult, result);\r\n }",
"public boolean getContinueFlag()\r\n {\r\n if (curTurn > 1) return false;\r\n return true;\r\n }",
"public static Boolean playBtn() { \n\t\tboolean startGame= false;\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"secondepage\\\"]/center/button[1]\")).click();\n\t\tif (driver.getPageSource().contains(QandA.getQuestion(0))||driver.getPageSource().contains(QandA.getQuestion(1))||driver.getPageSource().contains(QandA.getQuestion(2))){\n\t\t\tstartGame=true;\n\t\t}\n\t\treturn startGame; \n\t}",
"@SuppressWarnings(\"static-access\")\n\tpublic boolean isPlay(){\n\t\treturn this.isPlay;\n\t}",
"public boolean playAgain(Players players) {\n boolean decide = false;\n if (getLastPlayer().equals(players.getPlayerName())) {\n decide = true;\n }\n resetPass();\n return decide;\n }",
"public void playAgain() {\r\n\t\t\r\n\t\tscreen.reset();\r\n\t\t\r\n\t}",
"boolean play();",
"public boolean doPause() {\n return false;\n }",
"private void replay(){\r\n System.out.println(\"Do you want to play again? (Y/N)\");\r\n guess = input.next();\r\n if (Character.toLowerCase(guess.charAt(0)) == 'y'){\r\n reset();\r\n start();\r\n } else if(Character.toLowerCase(guess.charAt(0)) == 'n'){\r\n System.out.println(\"Thanks for playing!\");\r\n System.exit(0);\r\n } else {\r\n System.out.println(\"Invalid input!\");\r\n replay();\r\n }\r\n }",
"public Boolean getInplay(){\n return inplay;\n }",
"boolean isPlaying() { return playing; }",
"private boolean canResumeGame() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n && isGamePaused();\n }",
"public static void resume()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(true);\n\t\tbtnStay.setEnabled(true);\n\t\tbtnDouble.setEnabled(false);\n\t}",
"public boolean playAnotherGame(Scanner keyboardIn) {\n boolean playAgain = false;\n boolean playAgainLoopCondition = false;\n\n do {\n System.out.print(\"Would you like to play again? Y/N: \");\n String playAgainStr = keyboardIn.next();\n\n System.out.println(\"\"); // extra line for console formatting\n\n if (playAgainStr.equalsIgnoreCase(\"Y\")) {\n playAgain = true;\n playAgainLoopCondition = true;\n\n } else if (playAgainStr.equalsIgnoreCase(\"N\")) {\n playAgain = false;\n playAgainLoopCondition = true;\n\n }\n } while (!playAgainLoopCondition);\n\n return playAgain;\n }",
"private static boolean getReplayResponse() {\n Scanner scan = new Scanner(System.in);\n // Keep looping until a non-zero-length string is entered\n while (true) {\n System.out.print(\"Play again (Yes or No)? \");\n String response = scan.nextLine().trim();\n if (response.length() > 0) {\n return response.toUpperCase().charAt(0) == 'Y';\n }\n }\n }",
"void pauseGame() {\n myShouldPause = true;\n }",
"void pauseGame() {\n myShouldPause = true;\n }",
"public boolean isRestartNextLoop() {\n return restartNextLoop;\n }",
"@Override\n\t\tpublic boolean wasRetried()\n\t\t{\n\t\t\treturn false;\n\t\t}",
"public void togglePlay() { }",
"boolean isPause();",
"protected abstract boolean pause();",
"@Override\n public boolean isPlaying()\n {\n final String funcName = \"isPlaying\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%s\", Boolean.toString(playing));\n }\n\n return playing;\n }",
"public void continueRun() {\n pause = false;\n }",
"public boolean isPaused();",
"public void resumeGame() {\n\t\t\tif (extended)\n\t\t\t\textendTimer.start();//restart timer if thats relevant\n\t\t\tpause=false;//turn off all flags for pause/stop\n\t\t\tstopped = false;\n\t\t}",
"boolean hasPlayready();",
"protected abstract boolean resume();",
"public boolean needTryAgain() {\n boolean z = this.mRetryConnectCallAppAbilityCount < 6;\n this.mRetryConnectCallAppAbilityCount++;\n return z;\n }",
"@Override\n public final boolean doesGuiPauseGame() {\n return shouldPauseGame;\n }",
"public boolean isRetried ()\r\n {\r\n return hasFailed () && retried_;\r\n }",
"public boolean gameWon(){\n return false;\n }",
"public boolean isRepeatRewind()\n\t{\n\t\treturn isRepeat();\n\t}",
"boolean playing() {\n return _playing;\n }",
"public boolean nextState() {\n\t\treturn false;\n\t}",
"public boolean doesGuiPauseGame()\n {\n return !this.doesGuiPauseGame;\n }",
"void goToNext(boolean isCorrect);",
"public void cantPlayGoNext() {\n\t switchTurn();\n }",
"boolean isTurnedFaceUp();",
"protected abstract boolean isGameFinished();",
"public static Boolean tryAgainBtn() throws Exception {\n\t\tboolean checkPage=false;\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"markpage\\\"]/center/button[1]\")).click();\n\t\tif (driver.getPageSource().contains(QandA.getQuestion(0))||driver.getPageSource().contains(QandA.getQuestion(1))||driver.getPageSource().contains(QandA.getQuestion(2))){\n\t\t\tcheckPage=true;\n\t\t}\n\t\treturn checkPage;\n\t}",
"public boolean doesGuiPauseGame()\n {\n return false;\n }",
"boolean isGameComplete();",
"public boolean stillPlaying(){\r\n\t\treturn stillPlaying;\r\n\t}",
"boolean CanFinishTurn();",
"@Override\n\tpublic boolean doesGuiPauseGame() {\n\t\treturn super.doesGuiPauseGame();\n\t}",
"boolean hasFairplay();",
"@Override\r\n\tpublic boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}",
"public abstract boolean nextOrFinishPressed();",
"@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }",
"@Override\n protected void result(Object object) {\n gamePaused = false;\n }",
"@Override\n protected void result(Object object) {\n gamePaused = false;\n }",
"public void startPlayAgain() throws InterceptionException, TimeoutException {\n\t\tif (waitForPictures(Pictures.playAgain, Pictures.levelUp) == Pictures.levelUp) {\n\t\t\tclickPicture(Pictures.levelUp);\n\t\t\tSystem.out.println(\"Level up!\");\n\t\t\tlevelUp++;\n\t\t}\n\t\twait(500);\n\t\tif (findImageLocation(Pictures.victory) != null) {\n\t\t\tvictory++;\n\t\t} else if (findImageLocation(Pictures.defeat) != null) {\n\t\t\tdefeat++;\n\t\t} else {\n\t\t\tSystem.out.println(\"Victory/defeat not found!\");\n\t\t}\n\t\twaitAndClickPicture(Pictures.playAgain);\n\t\twhile (waitForPictures(Pictures.clickToContinue, Pictures.endTurn) == Pictures.clickToContinue) {\n\t\t\tclickPicture(Pictures.clickToContinue);\n\t\t}\n\n\t}",
"public boolean isTurned(){\n\treturn IS_TURNED;\n }",
"synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }",
"synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }",
"@Override\r\n\tpublic boolean canPlay() {\n\t\treturn false;\r\n\t}",
"public void RestartGame()\n {\n \n }",
"void togglePlay();",
"public boolean resume() {\n try {\n controller.resume();\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }",
"public void resume() {\n playing = true;\n gameThread = new Thread(this);\n gameThread.start();\n }",
"@java.lang.Override\n public boolean hasPlayready() {\n return playready_ != null;\n }",
"public boolean advance() {\n currentFrame ++;\n if(currentFrame >= frames.size()) {\n return false;\n }\n// LogU.d(\" advance 222 \"+ currentFrame);\n return true;\n }",
"public boolean getPause() {\r\n return pause;\r\n }",
"public void playTurn() {\r\n\r\n }",
"public boolean isPaused(){\r\n\t\tif (this.pauseGame(_p)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}",
"boolean addEasyGamePlayed();",
"@Test\n void pauseAndRestart() {\n getGame().start();\n assertThat(getGame().isInProgress()).isTrue();\n getGame().stop();\n assertThat(getGame().isInProgress()).isFalse();\n // we resume\n getGame().start();\n assertThat(getGame().isInProgress()).isTrue();\n verifyZeroInteractions(observer);\n }",
"@Override\n public boolean anotherPlayIsPossible()\n {\n \t\n List<Integer> test = cardIndexes();\n return containsSum13(test) || containsK(test);\n \n }",
"public static void resultOfPlayAllCorrect() {\n\t\tString mark=\"null\";\n\t\ttry {\n\t\t\tmark=PlayTrivia.playAllRightAnswers();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tif(mark==\"Sucsses\") {\n\t\t\tSystem.out.println(\"Test end page has:\" + mark + \" Test pass\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Test end page - failed\");\n\t\t}\n\t}",
"void pauseGame() {\n myGamePause = true;\n }",
"@Override\n\tpublic void resume() {\n\t\tif (mPlayId == mPlayTotal) {\n\t\t\tmPlayId = 0;\n\t\t}\n\t\tsetChange();\n\t}",
"public boolean doesGuiPauseGame()\r\n\t{\r\n\t\treturn false;\r\n\t}",
"public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }",
"public void resume() {\n playing = true;\n gameThread = new Thread(this);\n gameThread.start();\n }",
"public synchronized boolean proceed() {\n if (started && !stopped && pause.availablePermits() == 0) {\n pause.release();\n return true;\n }\n return false;\n }",
"public boolean pause();",
"public boolean pause();",
"@Override\n\t\tpublic void setWasRetried(boolean wasRetried) {\n\t\t\t\n\t\t}",
"public void isPaused() { \r\n myGamePaused = !myGamePaused; \r\n repaint(); \r\n }",
"public void checkPause();",
"synchronized void resumeGame() {\n myGamePause = false;\n this.notify();\n }",
"public boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}",
"@Override\n public boolean isRunning() {\n return !paused;\n }",
"private void transport_resume() {\n timerResume();\n playing = true;\n now_playing_play_button.setForeground(getDrawable(R.drawable.ic_pause_50dp));\n }",
"public void restart() {\n\t\tmadeMove = false;\n\t\tcurrentPit = -1;\n\t\tnewGame(player1.getName(), player2.getName(), originalCount); \n\t}",
"private boolean turnIfNeeded() {\n\t\tif (needToTurn()) {\n\t\t\tturnToDesiredDirection();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean endChk() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tif ( rowChoice == 0 || totalPebbles == 0 ){\n\t\t\trunGame = false;\n\t\t}\n\t\treturn runGame;\n\t}",
"private void allowContinueOrStop(){\r\n\t\troll.setEnabled(false);\r\n\t\tsubmit.setEnabled(false);\r\n\t\tagain.setEnabled(true);\r\n\t\tnoMore.setEnabled(true);\r\n\t\tstatusLabel.setText(\"Feeling lucky?\");\r\n\t\tupdate();\r\n\t}",
"boolean endOfGame() {\n return false;\n }",
"public boolean isRunning(){\n return !paused;\n }",
"boolean isPlayable();",
"public boolean doesGuiPauseGame() {\n\t\treturn false;\n\t}",
"boolean turnFaceDown();",
"boolean isPlayableInGame();",
"@Override\r\n\tpublic boolean canPause() {\n\t\treturn true;\r\n\t}",
"public abstract boolean doTurn(Deck theDeck);"
] | [
"0.7569369",
"0.7324762",
"0.7053484",
"0.7006865",
"0.6849424",
"0.6672835",
"0.6585011",
"0.652804",
"0.6512537",
"0.6448473",
"0.63522893",
"0.63388336",
"0.6245762",
"0.62193525",
"0.6213829",
"0.62094766",
"0.61875427",
"0.6186188",
"0.6184382",
"0.6184382",
"0.6184274",
"0.61792266",
"0.6173174",
"0.6172104",
"0.61420155",
"0.6129456",
"0.61058366",
"0.6069001",
"0.606886",
"0.606633",
"0.603596",
"0.60262334",
"0.6019967",
"0.6018231",
"0.6015315",
"0.6004584",
"0.5998959",
"0.59983724",
"0.59837425",
"0.59807897",
"0.5978724",
"0.59758145",
"0.5971605",
"0.5964988",
"0.5964882",
"0.59609157",
"0.5957301",
"0.59537494",
"0.59513336",
"0.59477735",
"0.59473497",
"0.5943158",
"0.59421086",
"0.5940775",
"0.5940775",
"0.5937743",
"0.5931022",
"0.5885223",
"0.5885223",
"0.58820134",
"0.58772075",
"0.58763754",
"0.58671844",
"0.58594066",
"0.5859281",
"0.5857442",
"0.58493173",
"0.58468",
"0.5845085",
"0.5839667",
"0.5838261",
"0.58366984",
"0.58275753",
"0.5820779",
"0.5820636",
"0.58190864",
"0.58186555",
"0.5816052",
"0.58159184",
"0.58071643",
"0.58071643",
"0.5805579",
"0.5802442",
"0.5799748",
"0.5777761",
"0.5770557",
"0.5761481",
"0.57539886",
"0.5753668",
"0.57509506",
"0.57480294",
"0.5743561",
"0.5742346",
"0.5740413",
"0.57392955",
"0.57379615",
"0.5736307",
"0.57273585",
"0.5719404",
"0.5719375"
] | 0.8676839 | 0 |
/ method getMain() returns boolean mainMenu pre: called by class post: mainMenu returned | public boolean getMain() {
return mainMenu;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isMainEntry() {\n return mainEntry;\n }",
"public boolean isMainEntry() {\n return mainEntry;\n }",
"public boolean isMainEntry() {\n return mainEntry;\n }",
"public boolean isMainEntry() {\n return mainEntry;\n }",
"public MainMenu getMainMenu() {\n return mainMenu;\n }",
"public boolean hasMain() {\n\t\treturn main;\n\t}",
"public boolean isOnMenu ();",
"public boolean isMainline();",
"IMenu getMainMenu();",
"public MenuSection getMainMenu() {\n\t\treturn mainMenu;\n\t}",
"private JMenu getMMain() {\n\t\tif (mMain == null) {\n\t\t\tmMain = new JMenu();\n\t\t\tmMain.setText(\"Dosya\");\n\t\t\tmMain.add(getMiConfigure());\n\t\t\tmMain.add(getMiExit());\n\t\t}\n\t\treturn mMain;\n\t}",
"public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}",
"private static void returnMenu() {\n\t\t\r\n\t}",
"public Boolean getMainFlag() {\n return mainFlag;\n }",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"private JMenuBar getMbMain() {\n\t\tif (mbMain == null) {\n\t\t\tmbMain = new JMenuBar();\n\t\t\tmbMain.add(getMMain());\n\t\t\tmbMain.add(getMActions());\n\t\t}\n\t\treturn mbMain;\n\t}",
"public boolean isMainProject() {\n return this.mIsMainProject;\n }",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"public void setMainEntry(boolean value) {\n this.mainEntry = value;\n }",
"public void setMainEntry(boolean value) {\n this.mainEntry = value;\n }",
"public void setMainEntry(boolean value) {\n this.mainEntry = value;\n }",
"public void setMainEntry(boolean value) {\n this.mainEntry = value;\n }",
"boolean getIsMainFrame();",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main_gui, menu);\t// main\n\t\treturn true;\n\t}",
"private static boolean backToMenu() {\n boolean exit = false;\n System.out.println(\"Return to Main Menu? Type Yes / No\");\n Scanner sc2 = new Scanner(System.in);\n if (sc2.next().equalsIgnoreCase(\"no\"))\n exit = true;\n return exit;\n }",
"public boolean isMainProgram() {\n return this.getName() == null;\n }",
"public boolean getShowMenu() {\n\t\treturn showMenu;\n\t}",
"public static void updateMainMenu() {\n instance.updateMenu();\n }",
"private static void mainMenuLogic() {\n\n\t\twhile(true) {\n\n\t\t\tmenuHandler.clrscr();\n\t\t\tint maxChoice = menuHandler.mainMenu();\n\n\t\t\tint userChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t\tswitch(userChoice) {\n\t\t\tcase 1:\n\t\t\t\t// User menu\n\t\t\t\tuserMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// Printer menu\n\t\t\t\tprinterMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// Network menu\n\t\t\t\tnetworkMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t public boolean onCreateOptionsMenu(Menu menu) {\n\t \n\t getMenuInflater().inflate(R.menu.main, menu);\n\t \n\t return true;\n\t }",
"public void pressMainMenu() {\n }",
"public org.parosproxy.paros.view.MainMenuBar getMainMenuBar() {\r\n\t\tif (mainMenuBar == null) {\r\n\t\t\tmainMenuBar = new org.parosproxy.paros.view.MainMenuBar();\r\n\t\t}\r\n\t\treturn mainMenuBar;\r\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (isLoggedIn()) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n } else {\n return false;\n }\n }",
"@Override\n\t public boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.main, menu);\n\t return true;\n\t }",
"@Override\n\t public boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.main, menu);\n\t return true;\n\t }",
"@Override public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"static void mainmenu() {\n\t\t\n\t\tSystem.out.println(\"Welcome. This is a rogue-like text-based RPG game.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"You control your character by entering your desired action when prompted.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"Do you want to start your journey?\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" y: yes \t\tn: no\t\t\");\n\t\tresponse = Engine.request();\n\t\tif(response == false) {\n\t\t\tSystem.out.println(\"W-What are you doing here then? If you're not here to play the game then what do you even want to do?\");\n\t\t\tSystem.out.println(\"To start, write \\\"Y\\\" or \\\"y\\\" in the console \");\n\t\t\tSystem.out.println(\"I won't ask again. Do you want to start your journey?\");\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == false) {\n\t\t\t\tSystem.out.println(\"I am not here to judge your decision. Farewell.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Glad you came to your senses.\");\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Very well.\");\n\t\t}\n\t\tSystem.out.println();\t\t\n\t\tif(Engine.devmode == true) System.out.println(\"\tDebug: StartMenu passed\");\n\t\t\n\t\t\t// Cadet dungeon check\n\t\tif(Progresslog.cadetplaytime < 3) {\n\t\t\tSystem.out.println(\"You seem to be new at the game. Would you like to play through a more tailored experience,\\n\"\n\t\t\t\t\t+ \"which is designed for inexperienced players and introduces you to the game's mechanics?\");\n\t\t\tif(Engine.devmode == true) System.out.println(\"Cadet playtime: \" + Progresslog.cadetplaytime);\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == true) {\n\t\t\t\tSystem.out.println(\"Alright then.\");\n\t\t\t\tDungeoncadet();\n\t\t\t} else DungeonGen();\t\t\t\n\t\t} else DungeonGen();\t\t\n\t}",
"private Boolean setUp() {\n\t\twhile(!this.menu());\n\t\treturn true;\n\t}",
"boolean isMenuShowing() {\n return game.r != null;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_mainpage, menu);\n return true;\n }",
"public String getMain() {\n\t\treturn main;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(android.view.Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }",
"public boolean useInternalMenu() {\n return _use_internal_menu;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu paramMenu) {\n getMenuInflater().inflate(R.menu.main, paramMenu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_page, menu);\n return true;\n }",
"public void readTheMenu();",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(final Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"public static void main(String[] args){\n\n main_menu();\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n // inflate the menu and return true\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu( Menu menu ) {\n getMenuInflater().inflate( R.menu.menu_main, menu );\n return true;\n }",
"public static void main(String[] args) {\n Graphics.graphicsMainMenu();\r\n //Print main menu\r\n Menu.mainMenu();\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu){\n //populate option menu\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\tgetMenuInflater().inflate(R.menu.menu_main, menu);\n\treturn true;\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\r\n return true;\r\n }",
"public static void openMainMenu() {\r\n\t\tif(!STATUS.equals(Gamestatus.STOPPED)) return;\r\n\t\tgui.setMenu(new MainMenu(), true);\r\n\t}",
"public void initMenu(){\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }",
"public MainMenuScreen getMainMenuScreen() {\n return mainMenuScreen;\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_new_main, menu);\r\n return true;\r\n }",
"public Menus( Main mainApp ) {\n this(); // call the default constructor, which must always be called first\n this.mainApp = mainApp; // save the reference to the Main application\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }"
] | [
"0.72580534",
"0.72580534",
"0.72580534",
"0.72580534",
"0.71366125",
"0.7016086",
"0.69500875",
"0.68440884",
"0.68361807",
"0.6832889",
"0.67070824",
"0.6596803",
"0.6530401",
"0.651915",
"0.6466039",
"0.63584286",
"0.6263848",
"0.6221437",
"0.6218691",
"0.62167376",
"0.62167376",
"0.62167376",
"0.62167376",
"0.61721396",
"0.61675465",
"0.61658865",
"0.6154976",
"0.61522436",
"0.6125825",
"0.6077458",
"0.6070122",
"0.6068108",
"0.606521",
"0.60639584",
"0.60639584",
"0.60639584",
"0.60608816",
"0.6060528",
"0.6053609",
"0.6053609",
"0.60484195",
"0.6046428",
"0.6044159",
"0.6030862",
"0.6028908",
"0.60163397",
"0.60154635",
"0.60134566",
"0.6011268",
"0.60025734",
"0.5996828",
"0.5991798",
"0.59916866",
"0.5991046",
"0.5986404",
"0.59763867",
"0.59763867",
"0.59763867",
"0.59763867",
"0.59763867",
"0.59763867",
"0.59763867",
"0.59763867",
"0.59763867",
"0.59763867",
"0.59763867",
"0.59763867",
"0.5975848",
"0.59733063",
"0.5972711",
"0.5971425",
"0.5960535",
"0.59604096",
"0.59604096",
"0.59604096",
"0.5955688",
"0.5946752",
"0.59441084",
"0.59422815",
"0.59422815",
"0.5941249",
"0.59400755",
"0.59360033",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437",
"0.593437"
] | 0.88325834 | 0 |
/ method reset() resets variables pre: called by class post: variables reset | public void reset() {
playAgain = false;
mainMenu = false;
achievement = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void reset() {\n errors.clear();\n variables.clear();\n }",
"public void reset() {\n\t\tvar.clear();\n\t\tname.clear();\n\t}",
"protected void reset() {\n\t\t}",
"void reset(){\n if (vars!=null){\n vars.clear();\n }\n if (gVars!=null){\n gVars.clear();\n }\n }",
"private void reset() {\n }",
"public void resetVariables(){\n\t\tthis.queryTriplets.clear();\n\t\tthis.variableList.clear();\n\t\tthis.prefixMap.clear();\n\t}",
"public void resetVariables() {\n\t\tArrays.fill(variables, 0.0);\n\t}",
"public void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public void reset()\n\t{\n\t}",
"public void reset()\n\t{\n\t}",
"public void reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }",
"final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}",
"public void reset() {\n\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"public void reset () {}",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"protected abstract void reset();",
"public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}",
"private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}",
"public void reset() {\n\r\n\t}",
"public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }",
"@Override\r\n\tpublic void reset()\r\n\t{\r\n\t}",
"public void reset() {\n\n }",
"public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"abstract void reset();",
"@Override\n\tpublic void reset() {\n\t\tthis.prepare();\n\t\tsuper.reset();\n\t}",
"public void reset(){\n }",
"public void reset ()\n\t{\n\t\t//The PaperAirplane and the walls (both types) use their reconstruct ()\n\t\t//method to set themselves back to their starting points.\n\t\tp.reconstruct ();\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i].reconstruct ();\n\t\t\n\t\tfor (int i = 0; i < sW.length; i++)\n\t\t\tsW[i].reconstruct ();\n\t\t\t\n\t\t//the time is reset using the resetTime () method from the Timer class.\n\t\ttime.resetTime ();\n\t\t\n\t\t//the score is reset using the reconstruct method from the Score class.\n\t\tscore.reconstruct ();\n\t\t\n\t\t//The following variables are set back to their original values set in\n\t\t//the driver class.\n\t\ttimePassed = 0;\t\n\t\tnumClicks = 0;\n\t\teventFrame = 0;\n\t\tlevel = 1;\n\t\txClouds1 = 0;\n\t\txClouds2 = -500;\n\t\tyBkg1 = 0;\n\t\tyBkg2 = 600;\t\t\n\t}",
"public synchronized void reset() {\n }",
"@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}",
"public void reset() {\n super.reset();\n }",
"public static void variableReset() {\n\t\tLogic.pieceJumped = 0;\n\t\tLogic.bool = false;\n\t\tLogic.curComp = null;\n\t\tLogic.prevComp = null;\n\t\tLogic.jumpedComp = null;\n\t\tLogic.ydiff = 0;\n\t\tLogic.xdiff = 0;\n\t\tLogic.jumping = false;\n\t\tmultipleJump = false;\n\t\t\n\t}",
"@Override\n public void reset() \n {\n\n }",
"@Override\r\n\tpublic void reset() {\n\t}",
"public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}",
"public void resetVariables() {\n this.name = \"\";\n this.equipLevel = 0;\n this.cpuCost = 0;\n this.bankDamageModifier = 1.0f;\n this.redirectDamageModifier = 1.0f;\n this.attackDamageModifier = 1.0f;\n this.ftpDamageModifier = 1.0f;\n this.httpDamageModifier = 1.0f;\n this.attackDamage = 0.0f;\n this.pettyCashReducePct = 1.0f;\n this.pettyCashFailPct = 1.0f;\n this.dailyPayChangeFailPct = 1.0f;\n this.dailyPayChangeReducePct = 1.0f;\n this.stealFileFailPct = 1.0f;\n this.installScriptFailPct = 1.0f;\n }",
"public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}",
"void reset() ;",
"@Override\n\tpublic void reset() {\n\t\t\n\t}",
"@Override\n\tpublic void reset() {\n\t\t\n\t}",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"void reset();",
"@Override\n\tpublic void reset() {\n\n\t}",
"@Override\n public void reset() {\n }",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"public abstract void reset();",
"@Override\n\tpublic void reset() {\n\t}",
"public void reset() {\n sum1 = 0;\n sum2 = 0;\n }"
] | [
"0.8190714",
"0.8164207",
"0.8137544",
"0.81208813",
"0.80716777",
"0.80097675",
"0.79915035",
"0.7990787",
"0.79784364",
"0.79784364",
"0.79710186",
"0.795908",
"0.7956982",
"0.794809",
"0.794809",
"0.794809",
"0.794809",
"0.79474676",
"0.7911503",
"0.7911503",
"0.7911503",
"0.7911503",
"0.78917056",
"0.7888999",
"0.78826004",
"0.78621",
"0.78621",
"0.78621",
"0.78621",
"0.7860521",
"0.78474975",
"0.7844394",
"0.78234357",
"0.7794448",
"0.7791579",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.77893686",
"0.777379",
"0.77627015",
"0.77621436",
"0.77582943",
"0.77567947",
"0.7754483",
"0.77485424",
"0.774557",
"0.7735254",
"0.7730001",
"0.7726763",
"0.77224654",
"0.77180415",
"0.7705014",
"0.7684062",
"0.7684062",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.7681054",
"0.76766086",
"0.766319",
"0.76594263",
"0.76594263",
"0.76594263",
"0.76594263",
"0.76594263",
"0.76594263",
"0.76594263",
"0.76594263",
"0.76594263",
"0.76594263",
"0.76594263",
"0.76511216",
"0.76306957"
] | 0.0 | -1 |
Register a new patient | public void registerPatientMethod1(Patient p); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void AddPatiant(Patient p) throws Exception;",
"public Long addPatient(long pid, String name, Date dob, int age) throws PatientExn;",
"public void addNewPatient(View v) {\n\tDataHandler dh;\n\ttry {\n\t dh = new DataHandler(this.getApplicationContext().getFilesDir(),\n\t\t DataHandler.PATIENT_DATA);\n\t vitalSigns\n\t\t .put(new Date(),\n\t\t\t new VitalSigns(\n\t\t\t\t Double.parseDouble(((EditText) findViewById(R.id.temperature_field))\n\t\t\t\t\t .getText().toString()),\n\t\t\t\t Double.parseDouble(((EditText) findViewById(R.id.heartRate_field))\n\t\t\t\t\t .getText().toString()),\n\t\t\t\t new BloodPressure(\n\t\t\t\t\t Integer.parseInt(((EditText) findViewById(R.id.bloodpressure_systolic_field))\n\t\t\t\t\t\t .getText().toString()),\n\t\t\t\t\t Integer.parseInt(((EditText) findViewById(R.id.bloodpressure_diastolic_field))\n\t\t\t\t\t\t .getText().toString()))));\n\t Patient pat = new Patient(personalData, vitalSigns, symptoms,\n\t\t new Date(), new Prescription());\n\n\t dh.appendNewPatient(pat);\n\t try {\n\t\tdh.savePatientsToFile(this\n\t\t\t.getApplicationContext()\n\t\t\t.openFileOutput(DataHandler.PATIENT_DATA, MODE_PRIVATE));\n\t } catch (FileNotFoundException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t }\n\t} catch (NumberFormatException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (IOException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t} catch (ParseException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t}\n\n\tIntent newIntent = new Intent(this, DisplayActivityNurse.class);\n\tstartActivity(newIntent);\n }",
"public void createNewPatient(String firstName, String lastName, String tz, String diagnosis, final Context context){\n final DocumentReference myDocPatient = db.collection(Constants.PATIENTS_COLLECTION_FIELD).document();\n final Patient patientToAdd = new Patient(firstName, lastName, myDocPatient.getId(), diagnosis, tz, localUser.getId());\n myDocPatient.set(patientToAdd);\n localUser.addPatientId(patientToAdd.getId());\n updateUserInDatabase(localUser);\n }",
"@POST\n @Path(\"patients\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(\"application/json\")\n public Patient newPatient(Patient pat){\n serv.editPatient(pat);\n return pat;\n }",
"public void registerPatient(String firstName, String lastName, String ssn, String generalPractitioner, String diagnosis) throws IllegalArgumentException {\n if (patients.stream().anyMatch(c -> c.getSsn().equals(ssn))) {\n throw new IllegalArgumentException(\"Patient already exists\");\n } else {\n patients.add(new Patient(firstName, lastName, ssn, generalPractitioner, diagnosis));\n }\n }",
"protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}",
"public void register(RegistrationData d) {}",
"public org.hl7.fhir.ResourceReference addNewPatient()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.ResourceReference target = null;\n target = (org.hl7.fhir.ResourceReference)get_store().add_element_user(PATIENT$2);\n return target;\n }\n }",
"@PostMapping(value = \"/insert\", produces = \"application/json\")\n void insert(@RequestBody Patient patient);",
"private Patient setPatientIdentifier(Patient patient){\n\t\tUUID u = new UUID(1,0);\n\t\ttry{\n\t\t\tUUID randomUUID = u.randomUUID();\n\t\t\tPatientIdentifier pi = new PatientIdentifier();\n\t\t\tpi.setIdentifier(randomUUID.toString());\n\t\t\tpatient.addIdentifier(pi);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn patient;\n\t}",
"private void saveNewPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Save new Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), \"Passwort\", \"te@te.te\", \"Vorname\",\r\n\t\t\t\t\t\"Nachname\", \"Organisation\", \"Abteilung\", \"Fachrichtung\",\r\n\t\t\t\t\t\"Strasse\", \"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"New Patient saved!!\");\r\n\t}",
"void register() {\n Thread patientLoaderThread = new Thread(new RegistrationRunnable(true));\n patientLoaderThread.start();\n }",
"public void insertPatient(Patient p) {\n String query = \"INSERT INTO PATIENTS(patient_id, name, gender, birth, dpi, phone, weight, blood, email, password) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n try (PreparedStatement pst = this.transaction.prepareStatement(query)) {\n pst.setInt(1, p.getPatientId());\n pst.setString(2, p.getName());\n pst.setBoolean(3, p.isGender());\n pst.setDate(4, p.getBirth());\n pst.setString(5, p.getDpi());\n pst.setString(6, p.getPhone());\n pst.setDouble(7, p.getWeight());\n pst.setString(8, p.getBlood());\n pst.setString(9, p.getEmail());\n pst.setString(10, p.getPass());\n pst.executeUpdate();\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n }\n }",
"@Override\n @Transactional\n public void addPatient(Patient patient) {\n patientDAO.addPatient(patient);\n }",
"private void onAddPatient() {\n\t\tGuiManager.openFrame(GuiManager.FRAME_ADD_PATIENT);\n\t}",
"@Override\n\tpublic void addPatients(String name, int id, Long mobilenumber, int age) {\n\t\t\n\t}",
"private void storePatient(final Patient patient) {\n\n\t\ttry {\n\t\t\tpatients.put(patient.getIdentifierFirstRep().getValue(), patient);\n\t\t\t// if storing is successful the notify the listeners that listens on\n\t\t\t// any patient => patient/*\n\n\t\t\tfinal String bundleToString = currentPatientsAsJsonString();\n\n\t\t\tbroadcaster\n\t\t\t\t\t.broadcast(new OutboundEvent.Builder().name(\"patients\").data(String.class, bundleToString).build());\n\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"Patient save(Patient patient);",
"@Insert(\"INSERT into patients(id_patient, first_name, last_name, PESEL, id_address, email, phone_number, \" +\n \"id_firstcontact_doctor, password) VALUES (#{id}, #{firstName}, #{lastName}, #{pesel}, #{address.addressId},\" +\n \"#{email}, #{phoneNumber}, #{firstContactDoctor.id}, #{password})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\", keyColumn = \"id_patient\")\n void addPatient(Patient patient);",
"public Patient(String n, String type){\n name =\"Brendan\";\n pid = \"01723-X72312-7123\";\n birthDate = new Date();\n nationalID = n;\n sex =\"Female\";\n mothersName = \"Mary\";\n fathersName = \"John\";\n enrolledSchema = new Schema();\n doctype = 1;\n }",
"public boolean addPaient(Patient patient) throws TooManyExceptions;",
"private void savePatientToDatabase(Patient patient){\n DatabaseAdapter cateDB = new DatabaseAdapter(AddPatientActivity.this);\n try {\n cateDB.openDatabaseForRead();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n patient.printPatient();\n cateDB.insertPatient(patient);\n\n cateDB.closeDatabase();\n }",
"public void careForPatient(Patient patient);",
"public void registerPatient(String firstName, String lastName, String ssn, String generalPractitioner) throws IllegalArgumentException {\n if (patients.stream().anyMatch(c -> c.getSsn().equals(ssn))) {\n throw new IllegalArgumentException(\"Patient already exists\");\n } else {\n patients.add(new Patient(firstName, lastName, ssn, generalPractitioner));\n }\n }",
"public int createNewPatient(Patient p) {\n int id = 0;\n String query = \"INSERT INTO PATIENTS(name, gender, birth, dpi, phone, weight, blood, email, password) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n try (PreparedStatement pst = this.transaction.prepareStatement(query, PreparedStatement.RETURN_GENERATED_KEYS)) {\n pst.setString(1, p.getName());\n pst.setBoolean(2, p.isGender());\n pst.setDate(3, p.getBirth());\n pst.setString(4, p.getDpi());\n pst.setString(5, p.getPhone());\n pst.setDouble(6, p.getWeight());\n pst.setString(7, p.getBlood());\n pst.setString(8, p.getEmail());\n pst.setString(9, p.getPass());\n pst.executeUpdate();\n \n ResultSet rs = pst.getGeneratedKeys();\n if(rs.next()) {\n id = rs.getInt(1);\n }\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n }\n return id;\n }",
"@RequestMapping(path = \"/patient\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)\r\n\t@ApiOperation(value = \"To create new Patient Entry into Database\")\r\n\tpublic PatientRecord insertPatientRecord(@RequestBody PatientRecord patientRecord) {\r\n\t\tPatientRecord patient = patientService.insertPatientDetails(patientRecord);\r\n\t\tlogger.info(\"addNewRecord {}\", patient);\r\n\t\t// kafkaTemplate.send(\"kafkaExample\", patient);\r\n\t\t//template.convertAndSend(MessagingConfig.EXCHANGE, MessagingConfig.ROUTING_KEY, patient);\r\n\t\treturn patient;\r\n\t}",
"private static void changePatient(){\r\n // opretter ny instans af tempPatinet som overskriver den gamle\r\n Patient p = new Patient(); // det her kan udskiftes med en nulstil funktion for at forsikre at der altid kun er en patient.\r\n Patient.setCprNumber((Long) null);\r\n }",
"private void addPatient(Patient patient) {\n Location location = mLocationTree.findByUuid(patient.locationUuid);\n if (location != null) { // shouldn't be null, but better to be safe\n if (!mPatientsByLocation.containsKey(location)) {\n mPatientsByLocation.put(location, new ArrayList<Patient>());\n }\n mPatientsByLocation.get(location).add(patient);\n }\n }",
"void register(RegisterData data) throws Exception;",
"public void register(RegistrationDTO p) throws UserExistException {\n userLogic.register((Person) p);\n }",
"@Test\n public void testTegisterPatient(){\n register.registerPatient(\"Donald\", \"Trump\",\"16019112345\", \"Doctor Proctor\");\n assertEquals(1, register.getRegisterSize());\n }",
"public void createNew(PatientBO patient)\n {\n _dietTreatment = new DietTreatmentBO();\n _dietTreatment.setPatient(patient);\n setPatient(patient);\n }",
"public Patient (String patientID) {\n this.patientID = patientID;\n this.associatedDoctor = new ArrayList<>();\n }",
"@Override\n public Patient savePatient(Patient patient) {\n return patientRepository.save(patient);\n }",
"public Patient() {\r\n\r\n\t}",
"public void addPatient()\n {\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Enter name of patient\");\n String name=sc.nextLine();\n int pos,id;\n\n do\n {\n System.out.println(\"Enter doctor id to assign to\");\n id=sc.nextInt();\n pos=checkDoctor(id);\n if(pos==-1)\n System.out.println(\"Invalid doctor id\");\n }\n while(pos==-1);\n String docname=doc.get(pos).getName();\n Patient p=new Patient(name,id,docname);\n pt.add(p);\n\n }",
"public Patient(String iD, String addLine1, String city, String postcode, String givenName, String surName, String sex, int age, String password) {\n super(iD, givenName, surName, sex, age, password);\n this.addLine1 = addLine1;\n this.city = city;\n this.postcode = postcode;\n }",
"public void addNewPatient(Date birthday, String province, String profession, String medic, int riskFactor, String description) {\n patientDao = new PatientDaoImpl();\n\n String idPatient = province + birthday.toString().replace(\"-\", \"\")\n + profession.substring(0 , 3).toUpperCase();\n\n patientDao.createPatient(idPatient, birthday, province, profession, medic,riskFactor, description);\n }",
"public Patient (){\r\n }",
"public Patient() {\n\t\t\n\t}",
"public long addPatient(Patient pat) throws PatientExn{\n\t\tlong pid = pat.getPatientId();\n\t\tTypedQuery<Patient> query = \n\t\t\t\tem.createNamedQuery(\"SearchPatientByPatientID\", Patient.class).setParameter(\"pid\", pid);\n\t\tList<Patient> patients = query.getResultList();\n\t\tif (patients.size() < 1) {\n\t\t\tem.persist(pat);\n\t\t\tpat.setTreatmentDAO(this.treatmentDAO);\n\t\t\treturn pat.getId();\n\t\t}\n\t\telse {\n\t\t\tPatient pat2 = patients.get(0);\n\t\t\tthrow new PatientExn(\"\\nInsertion: Patient with patient id (\"+ pid \n\t\t\t\t\t+\") already exists.\\n** Name: \"+ pat2.getName());\n\t\t}\n\t}",
"public Patient() {\n }",
"public void setPatientId(String patientId)\n {\n this.patientId = patientId;\n }",
"public void register() {\n int index = requestFromList(getUserTypes(), true);\n if (index == -1) {\n guestPresenter.returnToMainMenu();\n return;\n }\n UserManager.UserType type;\n if (index == 0) {\n type = UserManager.UserType.ATTENDEE;\n } else if (index == 1) {\n type = UserManager.UserType.ORGANIZER;\n } else {\n type = UserManager.UserType.SPEAKER;\n }\n String name = requestString(\"name\");\n char[] password = requestString(\"password\").toCharArray();\n boolean vip = false;\n if(type == UserManager.UserType.ATTENDEE) {\n vip = requestBoolean(\"vip\");\n }\n List<Object> list = guestManager.register(type, name, password, vip);\n int id = (int)list.get(0);\n updater.addCredentials((byte[])list.get(1), (byte[])list.get(2));\n updater.addUser(id, type, name, vip);\n guestPresenter.printSuccessRegistration(id);\n }",
"public Patient(String iD, String givenName, String surName)\n {\n super(iD, givenName, surName); \n }",
"public Patient() {\n this(DSL.name(\"patient\"), null);\n }",
"public boolean createPatient(Patient patient,PatientRecord patientRecord) {\r\n\t\tboolean isCreated= false;\r\n\t\tString[] row= new String[9];\r\n\t\ttry {\r\n\t\t\tString query = \"INSERT INTO patients VALUES (?,?,?,?,?,?,?,?,?,?,?,?)\";\r\n\t\t\tPreparedStatement pStatement= super.getConnection().prepareStatement(query);\r\n\t\t\tpStatement.setInt(1, patient.getId());\r\n\t\t\tpStatement.setString(2, patient.getFirstName());\r\n\t\t\tpStatement.setString(3, patient.getLastName());\r\n\t\t\tpStatement.setString(4, patient.getGender());\r\n\t\t\tpStatement.setInt(5, patient.getAge());\r\n\t\t\tpStatement.setString(6, patient.getPhone());\r\n\t\t\tpStatement.setString(7, patient.getAddress().getVillege());\r\n\t\t\tpStatement.setString(8, patient.getAddress().getCommune());\r\n\t\t\tpStatement.setString(9, patient.getAddress().getCity());\r\n\t\t\tpStatement.setString(10, patient.getAddress().getProvince());\r\n\t\t\tpStatement.setString(11, patient.getAddress().getCountry());\r\n\t\t\tpStatement.setString(12, patient.getType());\r\n\t\t\t\r\n\t\t\tif(pStatement.executeUpdate() > 0) {\r\n\t\t\t\tpatientID.add(patient.getId());\r\n\t\t\t\trow[0]= patient.getId()+\"\";\r\n\t\t\t\trow[1]= patient.getFirstName();\r\n\t\t\t\trow[2]= patient.getLastName();\r\n\t\t\t\trow[3]= patient.getGender();\r\n\t\t\t\trow[4]= patient.getAge()+\"\";\r\n\t\t\t\trow[5]= patientRecord.getDate()+\"\";\r\n\t\t\t\trow[6]= patient.getPhone();\r\n\t\t\t\tmodelPatient.addRow(row);\r\n\t\t\t\tisCreated= true;\r\n\t\t\t\tSystem.out.println(\"You have insert a patient record\");\r\n\t\t\t\t\r\n\t\t\t};\r\n\t\t}catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn isCreated;\r\n\t}",
"protected void register(String data){\n }",
"public Patient(String userID, String fullName, String address, String telephone){\n super(userID, fullName, address, telephone);\n }",
"public boolean add(Patient p) {\n\t\tif (currentTimeOccupied.plus(p.timeToHealth()).toMillis() <= timeLeftInDay.toMillis()) {\n\t\t\tpatients.add(p);\n\t\t\t//currentTimeOccupied = currentTimeOccupied.plus(p.timeToHealth());\n\t\t\ttimeLeftInDay = timeLeftInDay.minus(p.timeToHealth());\n\t\t\t\n\t\t\tif (patients.size() < MAX_PATIENTS) {\n\t\t\t\tSystem.out.println(\"Patient added to list! \" + p.timeToHealth().toMinutes() + \" minutes!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"A patient has been booted to add this one!\");\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"This doctor can't take this patient due to time constraints.\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t}",
"@GetMapping(\"/patientRegister\")\n public String patientRegister(Model model){\n model.addAttribute(\"patient\", new User());\n model.addAttribute(\"info\", new PatientInfo());\n return \"views/patient/patientRegister\";\n }",
"int insert(PersonRegisterDo record);",
"int insert(Register record);",
"public void requirePatientId() {\n hasPatientIdParam = true;\n }",
"public Patient(String firstName, String lastName, String birthdate, String gender,\n\t\t\tString address1, String address2, String city, String state, String zipcode, String country,\n\t\t\tString insuranceProvider, String insuranceNumber) {\n this.patientID = -1;\n this.firstName = firstName;\n this.lastName = lastName;\n this.birthdate = birthdate;\n this.gender = gender;\n this.address1 = address1;\n this.address2 = address2;\n this.city = city;\n this.state = state;\n this.zipcode = zipcode;\n this.country = country;\n this.insuranceProvider = insuranceProvider;\n this.insuranceNumber = insuranceNumber;\n }",
"public void addPatient(Patient p){\r\n if (counter ==0){\r\n NodeP newNode = new NodeP(p);\r\n front = newNode;\r\n back = newNode;\r\n counter++;\r\n }\r\n else{\r\n NodeP newNode = new NodeP(p);\r\n back.setNext(newNode);\r\n back = back.getNext();\r\n counter++;\r\n }\r\n }",
"public void setPatient(org.hl7.fhir.ResourceReference patient)\n {\n generatedSetterHelperImpl(patient, PATIENT$2, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }",
"public void patientPost(String firstName, String lastName, String facility, String dob, String sex){\n\n Callback<Users> callback = new Callback<Users>() {\n\n @Override\n public void success(Users serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceServerEvent(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postData(firstName, lastName, dob, facility, sex, callback);\n }",
"void register();",
"public abstract void register();",
"public static void regPerson(){\n\t\tSystem.out.println(\"Skriv inn navnet, trykk enter, skriv så inn alder, trykk enter, og til slutt skriv inn bosted og trykk enter!\");\n\t}",
"private void setThePatient() {\n String ppsn = mPPSN.getText().toString();\n thePatient.set_id(ppsn.substring(ppsn.indexOf(\":\")+1).trim());\n\n String name = mName.getText().toString();\n thePatient.setName(name.substring(name.indexOf(\":\")+1).trim());\n\n String illness = mCondition.getText().toString();\n thePatient.setIllness(illness.substring(illness.indexOf(\":\")+1).trim());\n\n Address a = new Address();\n String addressLine1 = mAddressLine1.getText().toString();\n a.setAddressLine1(addressLine1.substring(addressLine1.indexOf(\":\")+1).trim());\n\n String addressLine2 = mAddressLine2.getText().toString();\n a.setAddressLine2(addressLine2.substring(addressLine2.indexOf(\":\")+1).trim());\n\n String city = mCity.getText().toString();\n a.setCity(city.substring(city.indexOf(\":\")+1).trim());\n\n String county = mCounty.getText().toString();\n a.setCounty(county.substring(county.indexOf(\":\")+1).trim());\n\n String country = mCountry.getText().toString();\n a.setCountry(country.substring(country.indexOf(\":\")+1).trim());\n\n String postcode = mPostCode.getText().toString();\n a.setPostCode(postcode.substring(postcode.indexOf(\":\")+1).trim());\n\n thePatient.setAddress(a);\n }",
"public void setPatientName(String patientName)\n {\n this.patientName = patientName;\n }",
"@Override\n\tpublic Paciente registrar(Paciente t) {\n\t\treturn dao.save(t);\n\t}",
"public void register(T t);",
"@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}",
"public void setPatientId(String patientId){\n\t\tthis.patientId = patientId;\n\t}",
"public void insertPatientShortInfo(PatientShortInfo patient) throws DataAccessException {\n\t\tjdbcTemplate.update(\n\t\t \"INSERT INTO patient (id, name, second_name, surname, born_date, id_number, \"\n\t\t\t\t+ \"sex, phone_number, nationality, insurance_number, home_address, health_status, \"\n\t\t\t\t+ \"disease, medicines, allergies) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\",\n\t\t\t\tpatient.getId(), patient.getName(), patient.getSecondName(), patient.getSurname(),\n\t\t\t\tpatient.getBornDate(), patient.getIdNumber(), patient.getSex(), patient.getPhoneNumber(),\n\t\t\t\tpatient.getNationality(), patient.getInsuranceNumber(), patient.getHomeAddress(),\n\t\t\t\tpatient.getHealthStatus(), patient.getDisease(), patient.getMedicines(), patient.getAllergies());\n\t}",
"public void createResident(Resident resident);",
"public Patient(String alias) {\n this(DSL.name(alias), PATIENT);\n }",
"Patient update(Patient patient);",
"public void setPatientID(java.lang.String param){\n \n this.localPatientID=param;\n \n\n }",
"public void setPatientID(java.lang.String param){\n \n this.localPatientID=param;\n \n\n }",
"public void regimenPost(String patient, String notes, String[] drugs, String dateStarted,\n String dateEnded){\n Callback<Regimen> callback = new Callback<Regimen>() {\n\n @Override\n public void success(Regimen serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceRegimenServerResponse(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postRegimen(patient, notes, drugs, dateStarted, dateEnded, callback);\n }",
"public void registerNewPatients(int numberPatients, List<String> secondaryNames,\n BeanItemContainer<NewIvacSampleBean> samplesToRegister, String space, String description,\n Map<String, List<String>> hlaTyping) {\n String projectPrefix = spaceToProjectPrefixMap.get(space);\n\n // extract to function for that\n List<Integer> projectCodes = new ArrayList<Integer>();\n for (Project p : getOpenBisClient().getProjectsOfSpace(space)) {\n // String maxValue = Collections.max(p.getCode());\n String maxValue = p.getCode().replaceAll(\"\\\\D+\", \"\");\n int codeAsNumber;\n try {\n codeAsNumber = Integer.parseInt(maxValue);\n } catch (NumberFormatException nfe) {\n // bad data - set to sentinel\n codeAsNumber = 0;\n }\n\n projectCodes.add(codeAsNumber);\n }\n\n int numberOfProject;\n\n if (projectCodes.size() == 0) {\n numberOfProject = 0;\n } else {\n numberOfProject = Collections.max(projectCodes);\n }\n\n for (int i = 0; i < numberPatients; i++) {\n Map<String, Object> projectMap = new HashMap<String, Object>();\n Map<String, Object> firstLevel = new HashMap<String, Object>();\n\n numberOfProject += 1;\n int numberOfRegisteredExperiments = 1;\n int numberOfRegisteredSamples = 1;\n\n // register new patient (project), project prefixes differ in length\n String newProjectCode =\n projectPrefix + Utils.createCountString(numberOfProject, 5 - projectPrefix.length());\n\n projectMap.put(\"code\", newProjectCode);\n projectMap.put(\"space\", space);\n projectMap.put(\"desc\", description + \" [\" + secondaryNames.get(i) + \"]\");\n projectMap.put(\"user\", PortalUtils.getUser().getScreenName());\n\n // call of ingestion service to register project\n this.getOpenBisClient().triggerIngestionService(\"register-proj\", projectMap);\n // helpers.Utils.printMapContent(projectMap);\n\n String newProjectDetailsCode =\n projectPrefix + Utils.createCountString(numberOfProject, 3) + \"E_INFO\";\n String newProjectDetailsID = \"/\" + space + \"/\" + newProjectCode + \"/\" + newProjectDetailsCode;\n\n String newExperimentalDesignCode = projectPrefix + Utils.createCountString(numberOfProject, 3)\n + \"E\" + numberOfRegisteredExperiments;\n String newExperimentalDesignID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newExperimentalDesignCode;\n numberOfRegisteredExperiments += 1;\n\n // String newBiologicalEntitiyCode =\n // newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"H\";\n // String newBiologicalEntitiyID =\n // \"/\" + space + \"/\" + newBiologicalEntitiyCode\n // + helpers.BarcodeFunctions.checksum(newBiologicalEntitiyCode);\n String newBiologicalEntitiyID =\n String.format(\"/\" + space + \"/\" + \"%sENTITY-1\", newProjectCode);\n\n numberOfRegisteredSamples += 1;\n\n // register first level of new patient\n firstLevel.put(\"lvl\", \"1\");\n firstLevel.put(\"projectDetails\", newProjectDetailsID);\n firstLevel.put(\"experimentalDesign\", newExperimentalDesignID);\n firstLevel.put(\"secondaryName\", secondaryNames.get(i));\n firstLevel.put(\"biologicalEntity\", newBiologicalEntitiyID);\n firstLevel.put(\"user\", PortalUtils.getUser().getScreenName());\n\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", firstLevel);\n\n // helpers.Utils.printMapContent(firstLevel);\n\n Map<String, Object> fithLevel = new HashMap<String, Object>();\n\n List<String> newHLATypingIDs = new ArrayList<String>();\n List<String> newHLATypingSampleIDs = new ArrayList<String>();\n List<String> hlaClasses = new ArrayList<String>();\n List<String> typings = new ArrayList<String>();\n List<String> typingMethods = new ArrayList<String>();\n\n // TODO choose parent sample for hlaTyping\n String parentHLA = \"\";\n\n\n for (Iterator iter = samplesToRegister.getItemIds().iterator(); iter.hasNext();) {\n\n NewIvacSampleBean sampleBean = (NewIvacSampleBean) iter.next();\n\n for (int ii = 1; ii <= sampleBean.getAmount(); ii++) {\n Map<String, Object> secondLevel = new HashMap<String, Object>();\n Map<String, Object> thirdLevel = new HashMap<String, Object>();\n Map<String, Object> fourthLevel = new HashMap<String, Object>();\n\n List<String> newSamplePreparationIDs = new ArrayList<String>();\n List<String> newTestSampleIDs = new ArrayList<String>();\n List<String> testTypes = new ArrayList<String>();\n\n List<String> newNGSMeasurementIDs = new ArrayList<String>();\n List<String> newNGSRunIDs = new ArrayList<String>();\n List<Boolean> additionalInfo = new ArrayList<Boolean>();\n List<String> parents = new ArrayList<String>();\n\n List<String> newSampleExtractionIDs = new ArrayList<String>();\n List<String> newBiologicalSampleIDs = new ArrayList<String>();\n List<String> primaryTissues = new ArrayList<String>();\n List<String> detailedTissue = new ArrayList<String>();\n List<String> sequencerDevice = new ArrayList<String>();\n\n String newSampleExtractionCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n newSampleExtractionIDs\n .add(\"/\" + space + \"/\" + newProjectCode + \"/\" + newSampleExtractionCode);\n numberOfRegisteredExperiments += 1;\n\n String newBiologicalSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"B\";\n String newBiologicalSampleID = \"/\" + space + \"/\" + newBiologicalSampleCode\n + BarcodeFunctions.checksum(newBiologicalSampleCode);\n\n parentHLA = newBiologicalSampleID;\n\n newBiologicalSampleIDs.add(newBiologicalSampleID);\n numberOfRegisteredSamples += 1;\n\n primaryTissues.add(sampleBean.getTissue());\n detailedTissue.add(sampleBean.getType());\n\n // register second level of new patient\n secondLevel.put(\"lvl\", \"2\");\n secondLevel.put(\"sampleExtraction\", newSampleExtractionIDs);\n secondLevel.put(\"biologicalSamples\", newBiologicalSampleIDs);\n\n if (sampleBean.getSecondaryName() == null) {\n secondLevel.put(\"secondaryNames\", \"\");\n } else {\n secondLevel.put(\"secondaryNames\", sampleBean.getSecondaryName());\n }\n secondLevel.put(\"parent\", newBiologicalEntitiyID);\n secondLevel.put(\"primaryTissue\", primaryTissues);\n secondLevel.put(\"detailedTissue\", detailedTissue);\n secondLevel.put(\"user\", PortalUtils.getUser().getScreenName());\n\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", secondLevel);\n // helpers.Utils.printMapContent(secondLevel);\n\n if (sampleBean.getDnaSeq()) {\n String newSamplePreparationCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newSamplePreparationID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newSamplePreparationCode;\n newSamplePreparationIDs.add(newSamplePreparationID);\n numberOfRegisteredExperiments += 1;\n\n String newTestSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"B\";\n String newTestSampleID = \"/\" + space + \"/\" + newTestSampleCode\n + BarcodeFunctions.checksum(newTestSampleCode);\n newTestSampleIDs.add(newTestSampleID);\n numberOfRegisteredSamples += 1;\n testTypes.add(\"DNA\");\n\n String newNGSMeasurementCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newNGSMeasurementID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newNGSMeasurementCode;\n newNGSMeasurementIDs.add(newNGSMeasurementID);\n numberOfRegisteredExperiments += 1;\n\n String newNGSRunCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"R\";\n String newNGSRunID = \"/\" + space + \"/\" + newNGSRunCode\n + BarcodeFunctions.checksum(newNGSRunCode);\n newNGSRunIDs.add(newNGSRunID);\n numberOfRegisteredSamples += 1;\n\n additionalInfo.add(false);\n sequencerDevice.add(sampleBean.getSeqDevice());\n parents.add(newTestSampleID);\n\n }\n\n if (sampleBean.getRnaSeq()) {\n String newSamplePreparationCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newSamplePreparationID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newSamplePreparationCode;\n newSamplePreparationIDs.add(newSamplePreparationID);\n numberOfRegisteredExperiments += 1;\n\n String newTestSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"B\";\n String newTestSampleID = \"/\" + space + \"/\" + newTestSampleCode\n + BarcodeFunctions.checksum(newTestSampleCode);\n newTestSampleIDs.add(newTestSampleID);\n numberOfRegisteredSamples += 1;\n testTypes.add(\"RNA\");\n\n String newNGSMeasurementCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newNGSMeasurementID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newNGSMeasurementCode;\n newNGSMeasurementIDs.add(newNGSMeasurementID);\n numberOfRegisteredExperiments += 1;\n\n String newNGSRunCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"R\";\n String newNGSRunID = \"/\" + space + \"/\" + newNGSRunCode\n + BarcodeFunctions.checksum(newNGSRunCode);\n newNGSRunIDs.add(newNGSRunID);\n numberOfRegisteredSamples += 1;\n\n additionalInfo.add(false);\n sequencerDevice.add(sampleBean.getSeqDevice());\n parents.add(newTestSampleID);\n }\n\n if (sampleBean.getDeepSeq()) {\n String newSamplePreparationCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newSamplePreparationID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newSamplePreparationCode;\n newSamplePreparationIDs.add(newSamplePreparationID);\n numberOfRegisteredExperiments += 1;\n\n String newTestSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"B\";\n String newTestSampleID = \"/\" + space + \"/\" + newTestSampleCode\n + BarcodeFunctions.checksum(newTestSampleCode);\n newTestSampleIDs.add(newTestSampleID);\n numberOfRegisteredSamples += 1;\n testTypes.add(\"DNA\");\n\n String newNGSMeasurementCode = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n String newNGSMeasurementID =\n \"/\" + space + \"/\" + newProjectCode + \"/\" + newNGSMeasurementCode;\n newNGSMeasurementIDs.add(newNGSMeasurementID);\n numberOfRegisteredExperiments += 1;\n\n String newNGSRunCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"R\";\n String newNGSRunID = \"/\" + space + \"/\" + newNGSRunCode\n + BarcodeFunctions.checksum(newNGSRunCode);\n newNGSRunIDs.add(newNGSRunID);\n numberOfRegisteredSamples += 1;\n\n additionalInfo.add(true);\n sequencerDevice.add(sampleBean.getSeqDevice());\n parents.add(newTestSampleID);\n }\n\n // register third and fourth level of new patient\n thirdLevel.put(\"lvl\", \"3\");\n thirdLevel.put(\"parent\", newBiologicalSampleID);\n thirdLevel.put(\"experiments\", newSamplePreparationIDs);\n thirdLevel.put(\"samples\", newTestSampleIDs);\n thirdLevel.put(\"types\", testTypes);\n thirdLevel.put(\"user\", PortalUtils.getUser().getScreenName());\n\n fourthLevel.put(\"lvl\", \"4\");\n fourthLevel.put(\"experiments\", newNGSMeasurementIDs);\n fourthLevel.put(\"samples\", newNGSRunIDs);\n fourthLevel.put(\"parents\", parents);\n fourthLevel.put(\"types\", testTypes);\n fourthLevel.put(\"info\", additionalInfo);\n fourthLevel.put(\"device\", sequencerDevice);\n fourthLevel.put(\"user\", PortalUtils.getUser().getScreenName());\n\n // TODO additional level for HLA typing\n\n // call of ingestion services for differeny levels\n // helpers.Utils.printMapContent(thirdLevel);\n // helpers.Utils.printMapContent(fourthLevel);\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", thirdLevel);\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", fourthLevel);\n }\n }\n\n for (Entry<String, List<String>> entry : hlaTyping.entrySet()) {\n\n String newHLATyping = newProjectCode + \"E\" + numberOfRegisteredExperiments;\n\n newHLATypingIDs.add(\"/\" + space + \"/\" + newProjectCode + \"/\" + newHLATyping);\n\n numberOfRegisteredExperiments += 1;\n\n String newHLATypingSampleCode =\n newProjectCode + Utils.createCountString(numberOfRegisteredSamples, 3) + \"H\";\n\n String newHLATypingSampleID = \"/\" + space + \"/\" + newHLATypingSampleCode\n + BarcodeFunctions.checksum(newHLATypingSampleCode);\n\n newHLATypingSampleIDs.add(newHLATypingSampleID);\n numberOfRegisteredSamples += 1;\n\n hlaClasses.add(entry.getKey());\n typings.add(entry.getValue().get(0));\n typingMethods.add(entry.getValue().get(1));\n }\n\n fithLevel.put(\"lvl\", \"5\");\n fithLevel.put(\"experiments\", newHLATypingIDs);\n fithLevel.put(\"samples\", newHLATypingSampleIDs);\n fithLevel.put(\"typings\", typings);\n fithLevel.put(\"classes\", hlaClasses);\n fithLevel.put(\"methods\", typingMethods);\n fithLevel.put(\"parent\", parentHLA);\n\n this.getOpenBisClient().triggerIngestionService(\"register-ivac-lvl\", fithLevel);\n\n }\n }",
"protected void contructPatientInstance() {\r\n\t\tResources resources = getApplicationContext().getResources();\r\n\t\r\n \t// constuct the patient instance\r\n try {\r\n \tsetPatientAssessment((new PatientHandlerUtils()).populateCcmPatientDetails(resources, getReviewItems()));\t\r\n\t\t} catch (ParseException e) {\r\n\t\t\tLoggerUtils.i(LOG_TAG, \"Parse Exception thrown whilst constructing patient instance\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void register(HttpServletRequest req, HttpServletResponse resp) {\n\t\tString nickname=req.getParameter(\"nickname\");\n\t\tString password=req.getParameter(\"password\");\n\t\tString gender=req.getParameter(\"gender\");\n\t\tdouble salary=Double.parseDouble(req.getParameter(\"salary\"));\n\t\t\n\t\t//可以首先怕段昵称是否已经被使用,如果已经被使用,则不允许注册\n\t\t\t//获取服务对象\n\t\tIEmpService service =new EmpService();\n\t\t\t//调用判断用户名是否存在的方法\n\t\tif(service.findEmpByNickname(nickname)==1) {\n\t\t\t//把提示信息调入请求域中\n\t\t\t\treq.setAttribute(\"RegistFail\", \"用户名已经被注册\");\n\t\t\t//请求转发\n\t\t\ttry {\n\t\t\t\treq.getRequestDispatcher(\"/register\").forward(req, resp);\n\t\t\t} catch (ServletException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}else {\n\t\t\t//调用注册的方法\n\t\t\ttry{\n\t\t\t\tEmp emp =new Emp(null,nickname,password,gender,salary);\n\t\t\t\tservice.regist(emp);\n\t\t\t\tresp.getWriter().write(\"注册成功, 即将跳转到登录页面\");\n\t\t\t\tresp.setHeader(\"refresh\", \"3;url=/zjj/Login.jsp\");\n\n\t\t\t}catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\t\n\t}",
"public void setPatientId(int patientId) {\n\t\t\t\n\t\tthis.patientId=patientId;\t\t\n\t}",
"public void patientsCredentials() {\n\t\tutil.ClickElement(prop.getValue(\"locators.register.click\"));\n\t\tlogreport.info(\"Patient registration is clicked\");\n\t}",
"public void beginRegister() {}",
"@Test\n public void testRegisterExistingPatient(){\n register.registerPatient(\"Mikke\",\"Mus\",\"24120012345\", \"Doctor Proctor\");\n assertThrows(IllegalArgumentException.class,\n () -> { register.registerPatient(\"Donald\", \"Duck\", \"24120012345\", \"Doctor Proctor\") ;});\n assertEquals(1, register.getRegisterSize());\n }",
"@Transactional\n\tpublic void addPatientByAdminOrEmployee(Patient patient) throws Exception {\n\t\tString password = passwordService.createPassword();\n\t\tString passwordEncode = passwordEncoder.encode(password);\n\t\tUser user = patient.getUser();\n\t\tuser.setEnabled(true);\n\t\tuser.setPassword(passwordEncode);\n\t\tOptional<Role> role = roleRepository.findById(2L);\n List<Role> roles = new ArrayList<>();\n roles.add(role.get());\n user.setRoles(roles);\n patient.setRegisterDateTime(LocalDateTime.now());\n final User userFromRequest = getUserFromRequest();\n patient.setUserRegister(userFromRequest);\n\t\tpatientRepository.save(patient);\n String emailSubject = messageSource.getMessage(\"patient.add.email.subject\", null, new Locale(patient.getUser().getLanguage()));\n String emailContent = messageSource.getMessage(\"patient.add.email.content.admin\",\n new String[]{patient.getUser().getFirstName(), patient.getUser().getLastName(), patient.getUser().getUsername(), \n \t\tpassword, emailService.getMailFrom()},\n new Locale(patient.getUser().getLanguage()));\n emailService.sendEmail(patient.getUser().getEmail(), emailSubject, emailContent);\n\t}",
"@Override\n public Patient editPatient(Patient patient) {\n return patientRepository.save(patient);\n }",
"@Override\n public void doRegister(RegisterData registerData) throws DuplicatedRecordException {\n }",
"private void registrarResidencia(Residencias residencia) {\n\t\t\t\t\t\t\t\t\n\t\tResidenciasobservaciones observacion = residencia.getResidenciasobservaciones();\t\n\t\t\t\t\n\t\tif(observacion==null) {\t\t\t\n\t\t\thibernateController.insertResidencia(residencia);\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\thibernateController.insertResidenciaObservacion(residencia, observacion);\t\t\n\t\t}\n\t\t\n\t\tupdateContent();\t\n\t\t\n\t}",
"public Patient(int patientID, String firstName, String lastName, String birthdate,\n\t\t\tString gender, String address1, String address2, String city, String state, String zipcode,\n\t\t\tString country, String insuranceProvider, String insuranceNumber) {\n\t\tthis.patientID = patientID;\n\t\tthis.firstName = firstName;\n\t\tthis.lastName = lastName;\n\t\tthis.birthdate = birthdate;\n\t\tthis.gender = gender;\n\t\tthis.address1 = address1;\n\t\tthis.address2 = address2;\n\t\tthis.city = city;\n\t\tthis.state = state;\n\t\tthis.zipcode = zipcode;\n\t\tthis.country = country;\n\t\tthis.insuranceProvider = insuranceProvider;\n\t\tthis.insuranceNumber = insuranceNumber;\n\t}",
"@PostMapping(value = \"/registerPharmacist\",consumes = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<?> registerPharmacist(@RequestBody PharmacistDTO pharmacistDTO){\n try {\n pharmacistService.registerPharmacist(pharmacistDTO);\n } catch (Exception e) {\n e.printStackTrace();\n return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);\n }\n\n return new ResponseEntity<>(HttpStatus.OK);\n }",
"public synchronized void addPatientToStack(String idStack, String idPatient) throws SQLException {\n statement.execute(\"INSERT INTO \" + idStack + \" (id) VALUES ('\" + idPatient + \"')\");\r\n }",
"public void addPatient(Patient P)\r\n {\r\n\t int age =0;\r\n\t String secQ =\"What is your favorite food?\";\r\n\t String newPat = \"INSERT INTO PATIENTDATA (FIRSTNAME,LASTNAME,AGE,USERNAME,PASSWORD,SECURITYQN,SECURITYANS,\"+\r\n\t\t\t \t\t \"SYMPTOM1,SYMPTOM2,SYMPTOM3,SYMPTOM4,SYMPTOM5,SYMPTOM6,SYMPTOM7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM1_1,PrevSYMPTOM1_2,PrevSYMPTOM1_3,PrevSYMPTOM1_4,PrevSYMPTOM1_5,PrevSYMPTOM1_6,PrevSYMPTOM1_7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM2_1,PrevSYMPTOM2_2,PrevSYMPTOM2_3,PrevSYMPTOM2_4,PrevSYMPTOM2_5,PrevSYMPTOM2_6,PrevSYMPTOM2_7,\"+\r\n\t\t\t \t\t \"SYMPTOM1Thresh,SYMPTOM2Thresh,SYMPTOM3Thresh,SYMPTOM4Thresh,SYMPTOM5Thresh,SYMPTOM6Thresh,SYMPTOM7Thresh, DOCTORSNAME, NOTIFICATION ) \"; //added notification\r\n\t newPat = newPat+\"VALUES ('\"+P.firstName+\"', '\"+P.lastName+\"', \"+age+\", '\"+P.userName+\"', '\"+P.password+\"', '\"+secQ+\"', '\"+P.securityQuestionAnswer+\"',\"\r\n\t\t\t \t\t +P.getEnterSymptomLevel()[0]+\",\"+P.getEnterSymptomLevel()[1]+\",\"+P.getEnterSymptomLevel()[2]+\",\"+P.getEnterSymptomLevel()[3]+\",\"+P.getEnterSymptomLevel()[4]+\",\"+P.getEnterSymptomLevel()[5]+\",\"+P.getEnterSymptomLevel()[6]+\r\n\t\t\t \t\t\t\",\" +P.getPreviousSymptomLevel1()[0]+\",\"+P.getPreviousSymptomLevel1()[1]+\",\"+P.getPreviousSymptomLevel1()[2]+\",\"+P.getPreviousSymptomLevel1()[3]+\",\"+P.getPreviousSymptomLevel1()[4]+\",\"+P.getPreviousSymptomLevel1()[5]+\",\"+P.getPreviousSymptomLevel1()[6]+\",\"\r\n\t\t\t \t\t\t+P.getPreviousSymptomLevel2()[0]+\",\"+P.getPreviousSymptomLevel2()[1]+\",\"+P.getPreviousSymptomLevel2()[2]+\",\"+P.getPreviousSymptomLevel2()[3]+\",\"+P.getPreviousSymptomLevel2()[4]+\",\"+P.getPreviousSymptomLevel2()[5]+\",\"+P.getPreviousSymptomLevel2()[6]+\",\"\r\n\t\t\t \t\t\t+P.getSymptomsThreshold()[0]+\",\"+P.getSymptomsThreshold()[1]+\",\"+P.getSymptomsThreshold()[2]+\",\"+P.getSymptomsThreshold()[3]+\",\"+P.getSymptomsThreshold()[4]+\",\"+P.getSymptomsThreshold()[5]+\",\"+P.getSymptomsThreshold()[6]+\",'\"+P.getPatientsDoctor()+\"',0);\";\r\n\t \r\n\t try {\r\n\t\tstmt.executeUpdate(newPat);\r\n\t} catch (SQLException e) {\r\n\t\t\r\n\t\te.printStackTrace();\r\n\t}\r\n }",
"@Override\n\tpublic Patient save(Patient patient) {\n\t\t// setting logger info\n\t\tlogger.info(\"save the details of the patient\");\n\t\treturn patientRepo.save(patient);\n\t}",
"public Patient(String name, String organ, int age, BloodType bloodtype,\r\n\t\t\tint patientID, boolean isDonor) {\r\n\t\tthis.name = name;\r\n\t\tthis.organ = organ.toUpperCase();\r\n\t\tthis.age = age;\r\n\t\tthis.bloodtype = bloodtype;\r\n\t\tthis.patientID = patientID;\r\n\t\tthis.isDonor = isDonor;\r\n\t\tthis.numOfConnections = 0;\r\n\t}",
"public static Patient createPatient(String givenName, String familyName, String gender, String birthdate,\n String line, String city, String postalCode, String country,\n String birthplaceCity, String birthplaceCountry){\n // Create a patient object\n Patient patient = new Patient();\n\n // Set Identifier of the patient object\n patient.addIdentifier()\n .setSystem(\"http://www.kh-uzl.de/fhir/patients\")\n .setValue(UUID.randomUUID().toString());\n\n // Set official name of the patient object\n patient.addName()\n .setUse(HumanName.NameUse.OFFICIAL)\n .setFamily(familyName)\n .addGiven(givenName);\n\n // Set gender of the patient object\n if(gender.equals(\"MALE\")){\n patient.setGender(Enumerations.AdministrativeGender.MALE);\n }\n else if(gender.equals(\"FEMALE\")){\n patient.setGender(Enumerations.AdministrativeGender.FEMALE);\n }\n else if(gender.equals(\"OTHER\")){\n patient.setGender(Enumerations.AdministrativeGender.OTHER);\n }\n else{\n patient.setGender(Enumerations.AdministrativeGender.UNKNOWN);\n }\n\n // Set birth date of the patient object\n patient.setBirthDateElement(new DateType(birthdate));\n\n // Set address date of the patient object\n patient.addAddress()\n .setUse(Address.AddressUse.HOME)\n .setType(Address.AddressType.BOTH)\n .addLine(line)\n .setCity(city)\n .setPostalCode(postalCode)\n .setCountry(country);\n\n // Set birthplace of the patient object\n Extension ext = new Extension();\n ext.setUrl(\"http://hl7.org/fhir/StructureDefinition/patient-birthPlace\");\n Address birthplace = new Address();\n birthplace.setCity(birthplaceCity).setCountry(birthplaceCountry);\n ext.setValue(birthplace);\n patient.addExtension(ext);\n\n return patient;\n }",
"public static Long createPregnancy(Connection conn, Map queries, EncounterData vo, Long patientId, Date dateVisit, String userName, Long siteId) throws ServletException, SQLException {\r\n Long pregnancyId;\r\n String sqlCreatePregnancy = (String) queries.get(\"SQL_CREATE_PREGNANCY\");\r\n Pregnancy pregnancy = vo.getPregnancy();\r\n String pregnancyUuid = null;\r\n if (pregnancy != null) {\r\n pregnancyUuid = pregnancy.getUuid();\r\n } else {\r\n \tUUID uuid = UUID.randomUUID();\r\n pregnancyUuid = uuid.toString();\r\n }\r\n ArrayList pregnancyValues = new ArrayList();\r\n // add patient_id to pregnancyValues\r\n pregnancyValues.add(patientId);\r\n // add date_visit to pregnancyValues\r\n pregnancyValues.add(dateVisit);\r\n FormDAO.AddAuditInfo(vo, pregnancyValues, userName, siteId);\r\n // adds uuid\r\n pregnancyValues.add(pregnancyUuid);\r\n pregnancyId = (Long) DatabaseUtils.create(conn, sqlCreatePregnancy, pregnancyValues.toArray());\r\n return pregnancyId;\r\n }",
"public Patient(String myLast, String myFirst, int age) {\n this.lastname = myLast;\n this.firstname = myFirst;\n this.age = age;\n }",
"public void setPatientName(String patientName){\n\t\tthis.patientName = patientName;\n\t}",
"public void register()\n {\n String n = nameProperty.getValue();\n if (n == null || n.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String p = passwordProperty.getValue();\n if (p == null || p.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String e = emailProperty.getValue();\n if (e == null || e.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String ph = phoneProperty.getValue();\n if (ph == null || ph.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (ph.length() != 8)\n {\n throw new IllegalArgumentException(\"Invalid phone number\");\n }\n try\n {\n Integer.parseInt(ph);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid phone number\", ex);\n }\n String t = titleProperty.getValue();\n if (t == null || t.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String a = authorProperty.getValue();\n if (a == null || a.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String y = yearProperty.getValue();\n if (y == null || y.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (y.length() != 4)\n {\n throw new IllegalArgumentException(\"Invalid year\");\n }\n try\n {\n Integer.parseInt(y);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid year\", ex);\n }\n\n try\n {\n\n model.registerUser(n, p, e, ph, t, a, y);\n\n }\n catch (Exception e1)\n {\n\n e1.printStackTrace();\n }\n\n }",
"private void registerDevice(String deviceRegistrationId, User user) {\n Device device = Device.createDevice(deviceRegistrationId, user);\n ofy().save().entity(device).now();\n }",
"public Patient(String id, String givenName, String familyName){\n this.id = id;\n this.givenName = givenName;\n this.familyName = familyName;\n }",
"public Patient(String iD, String password) {\n super(iD, password);\n }"
] | [
"0.70644003",
"0.7027657",
"0.6833302",
"0.68289465",
"0.6783486",
"0.67359453",
"0.67004746",
"0.66841096",
"0.66819596",
"0.66763794",
"0.6633236",
"0.66066146",
"0.6550695",
"0.6531763",
"0.65305924",
"0.65281767",
"0.6439206",
"0.64058465",
"0.6397144",
"0.6394249",
"0.63818043",
"0.6326062",
"0.6312662",
"0.62679046",
"0.62646973",
"0.62568974",
"0.61738116",
"0.6170185",
"0.6160039",
"0.61561924",
"0.6131646",
"0.61305994",
"0.6115949",
"0.61113226",
"0.6111266",
"0.6098509",
"0.60978574",
"0.6086875",
"0.60640514",
"0.6062097",
"0.60609156",
"0.60554874",
"0.6044255",
"0.60082984",
"0.60033005",
"0.59996784",
"0.5999166",
"0.5992644",
"0.5953181",
"0.59384304",
"0.59215385",
"0.59107465",
"0.5905922",
"0.5863969",
"0.5860925",
"0.5860668",
"0.5846074",
"0.58332753",
"0.5833245",
"0.5828268",
"0.58279985",
"0.5813056",
"0.5812395",
"0.58092993",
"0.5805522",
"0.5803027",
"0.58016586",
"0.5801643",
"0.579636",
"0.5781156",
"0.57782847",
"0.57630944",
"0.57618713",
"0.57618713",
"0.57570946",
"0.57499295",
"0.57468027",
"0.574443",
"0.5743598",
"0.5740153",
"0.5716523",
"0.57105875",
"0.5707848",
"0.57026404",
"0.56959534",
"0.5692764",
"0.56900847",
"0.5683546",
"0.56815004",
"0.5676108",
"0.56750864",
"0.56717676",
"0.5662376",
"0.5654998",
"0.56470656",
"0.564705",
"0.5646038",
"0.56352204",
"0.56305414",
"0.5629633"
] | 0.75117075 | 0 |
Insert many doctors. Demonstrates using prepared statements | public void insertDoctors(List<Doctor> drlist); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }",
"public void insert(T... entity) throws NoSQLException;",
"public void insert(List<T> entity) throws NoSQLException;",
"private static void insertListsInDataBase () throws SQLException {\n //Create object ActionsWithRole for working with table role\n ActionsCRUD<Role,Integer> actionsWithRole = new ActionsWithRole();\n for (Role role : roles) {\n actionsWithRole.create(role);\n }\n //Create object ActionsWithUsers for working with table users\n ActionsCRUD<User,Integer> actionsWithUsers = new ActionsWithUsers();\n for (User user : users) {\n actionsWithUsers.create(user);\n }\n //Create object ActionsWithAccount for working with table account\n ActionsCRUD<Account,Integer> actionsWithAccount = new ActionsWithAccount();\n for (Account account : accounts) {\n actionsWithAccount.create(account);\n }\n //Create object ActionsWithPayment for working with table payment\n ActionsCRUD<Payment,Integer> actionsWithPayment = new ActionsWithPayment();\n for (Payment payment : payments) {\n actionsWithPayment.create(payment);\n }\n }",
"@Override\r\n public void insert(List<DetalleCotizacion> listdetc, long idco) {\n Connection c =null;\r\n PreparedStatement ps= null;\r\n ResultSet rs= null;\r\n \r\n try{\r\n\tc = Conexion.Connect();\r\n \r\n for (DetalleCotizacion detc : listdetc){\r\n ps = c.prepareStatement(\"SELECT * from sp_insertdetallecotizacion(?,?,?,?,?)\");\r\n ps.setLong(1,idco);\r\n ps.setLong(2, detc.getIdmaq());\r\n ps.setInt(3, detc.getCantidad());\r\n ps.setInt(4,detc.getDias());\r\n ps.setBigDecimal(5, new BigDecimal(detc.getValordia()));\r\n rs=ps.executeQuery();\r\n \r\n }\r\n \r\n \r\n \r\n// \r\n// while (rs.next()){\r\n// id= rs.getLong(\"vid\");\r\n// }\r\n//\t\r\n } catch(Exception e)\r\n {\r\n JOptionPane.showMessageDialog(null, e.getMessage());\r\n }finally{\r\n if (c != null){\r\n try {\r\n c.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAODetalleCotizacion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if(ps!= null){\r\n try {\r\n ps.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAODetalleCotizacion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if(rs != null){\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAODetalleCotizacion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n } \r\n }",
"private void insertIntoIncidentTicketTables(Connection conn) {\n\n\tPreparedStatement pst = null;\n\tString insertIntoIncidentTicketQuery = \"INSERT INTO Incidentticket VALUES \" + \"(?, ?, ?, ?, ?, ?, ?);\";\n\n\ttry {\n\n\t\tfor (IncidentTicket IncidentTicket : this.getIncidentTicketObjects()) {\n\t\t\tpst = conn.prepareStatement(insertIntoIncidentTicketQuery);\n\t\t\tpst.setInt(1, IncidentTicket.getId());\n\t\t\tpst.setInt(2, IncidentTicket.getInapuserid());\n\t\t\tpst.setInt(3, IncidentTicket.getInappostid());\n\t\t\tpst.setInt(4, IncidentTicket.getAssignedTechnicianid());\n\t\t\tpst.setString(5, IncidentTicket.getDate());\n\t\t\tpst.setString(6, IncidentTicket.getTime());\n\t\t\tpst.setNString(7, IncidentTicket.getIssue());\n\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"\\n\\nRecords Inserted into IncidentTicket Table Successfully\\n\");\n\n\t\t}\n\t\t//System.out.println(\"Abhinav\");\n\t} catch (SQLException e) {\n\t\tSystem.out.println(\"\\n---------Please Check Error Below for inserting values into Incident Ticket Table---------\\n\");\n\t\te.printStackTrace();\n\t}\n\n}",
"protected void insertDataIntoPersons(Collection<User> users) {\n\t\t\ttry {\n\t\t\t\topenConnection();\n\t\t\t\tPreparedStatement prep = conn.prepareStatement(\"INSERT INTO Persons VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);\");\n\t\t\t\t//HUGEST IF STATEMENT EVAAAAAAH\n\t\t\t\tfor (User u : users) {\n\t\t\t\t\tif\n\t\t\t\t\t(\n\t\t\t\t\t\t\tu.getName() != null && u.getCountry() != null && \n\t\t\t\t\t\t\tu.getLanguage() != null && u.getGender() != null && \n\t\t\t\t\t\t\tu.getRegisteredDate() != null && u.getRealname() != null && \n\t\t\t\t\t\t\tu.getPlaycount() != 0 && u.getAge() != 0 && u.getNumPlaylists() != 0\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tprep.setString(1, u.getName());\n\t\t\t\t\t\tprep.setInt(2, u.getAge());\n\t\t\t\t\t\tprep.setString(3, u.getCountry());\n\t\t\t\t\t\tprep.setString(4, u.getLanguage());\n\t\t\t\t\t\tprep.setString(5, u.getGender());\n\t\t\t\t\t\tprep.setString(6, u.getRegisteredDate().toString());\n\t\t\t\t\t\tprep.setString(7, u.getRealname());\n\t\t\t\t\t\tprep.setInt(8, u.getPlaycount());\n\t\t\t\t\t\tprep.setInt(9, u.getNumPlaylists());\t\n\t\t\t\t\t\tprep.addBatch();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconn.setAutoCommit(false);\n\t \tprep.executeBatch();\n\t \tconn.setAutoCommit(true);\n\t \t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Something went wrong with inserting batched data into Persons\");\n\t\t\t\tSystem.out.println(\"Check System.err for details\");\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t}\n\t}",
"public void insert(String champs,String valeur) throws SQLException {\n\t\t///Cette partie pour créer un string = \"?, ?; ?...\"\n\t\t///tel que le nombre des points d'interrogation égale au nombre des champs.\n\t\t///Pour l'utiliser dans la syntaxe \"INSERT\" du SQL. \n\t\t//Tableau de champs et valeur .\n String[] champsTab = champs.split(\", \");\n String[] valeurTab = valeur.split(\", \");\n\t\tArrayList<String> valueQST = new ArrayList<String>();\n\t\tfor(int i=0; i<(champs.split(\", \")).length; i++) {\n\t\t\tvalueQST.add(\"?\");\n\t\t}\n\t\t//valueQSTStr = \"?, ?, ?...\"\n\t\tString valueQSTStr = valueQST.toString().replaceAll(\"\\\\[|\\\\]\", \"\");\n\t\t/////////////////////////////////////////////////////////////////////\n String sql = \"INSERT INTO personnel(\"+champs+\") VALUES(\"+valueQSTStr+\")\"; \n Connection conn = connecter(); \n PreparedStatement pstmt = conn.prepareStatement(sql);\n int j=0;\n for(int i=0 ; i<champsTab.length;i++) {\n \tj=i+1;\n \tif(!champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv|salaire\")) {\n \tif(champsTab.length>valeurTab.length) {\n \t\tif(champsTab[i].matches(\"Date_Fin_Contract\")){\n \t\tpstmt.setString(j,\"\");\t\n \t\t}else pstmt.setString(j,valeurTab[i]);\n \t}else pstmt.setString(j,valeurTab[i]);\n \t}\n \tif(champsTab[i].matches(\"salaire\")) {\n \t\tpstmt.setFloat(j,Float.parseFloat(valeurTab[i]));\n \t}\n \tif(champsTab[i].matches(\"nombre_Enfant|iD_Departement|iD_Cv\")) {\n \t\tpstmt.setInt(j,Integer.parseInt(valeurTab[i]));\n \t}\n }\n pstmt.executeUpdate();\n\t\tconn.close();\n }",
"public void insertBillFood(Bill billFood) {\nString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n \ntry {\n\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t \n\t\n\t\tps.setInt(1, billFood.getIdF());\n\t\tps.setString(2,null);\n\t ps.setInt(3, billFood.getIdE());\n\t\tps.setDouble(4, billFood.getPrice());\n\t\tps.setString(5, billFood.getSerialNumber());\n\t\tps.setDouble(6, billFood.getTotal());\n\t\tps.execute();\n\t\t\n\t\n\t \n} catch (SQLException e) {\n\t// TODO Auto-generated catch block\n\te.printStackTrace();\n}\n\n\t\n\t\n}",
"WriteRequest insert(Iterable<? extends PiEntity> entities);",
"public void createDespesaDetalhe(ArrayList<PagamentoDespesasDetalhe> listaDespesasInseridas, int idDespesa) throws Exception {\n\r\n for(int i=0; i < listaDespesasInseridas.size(); i++){\r\n \r\n open(); //abre conexão com o banco de dados\r\n\r\n //define comando para o banco de dados\r\n stmt = con.prepareStatement(\"INSERT INTO pagamentoDespesasDetalhe(valor, dataPagamento, status, idDespesas, idFormaPagamento) VALUES (?,?,?,?,?)\");\r\n\r\n //atribui os valores das marcações do comando acima \r\n stmt.setFloat(1, listaDespesasInseridas.get(i).getValor());\r\n stmt.setString(2, listaDespesasInseridas.get(i).getDataPagamento());\r\n stmt.setInt(3, listaDespesasInseridas.get(i).getStatus());\r\n stmt.setInt(4, idDespesa);\r\n stmt.setInt(5, listaDespesasInseridas.get(i).getIdFormaPagamento());\r\n\r\n stmt.execute();//executa insert no banco de dados\r\n\r\n close();//fecha conexão com o banco de dados\r\n \r\n } \r\n\r\n }",
"public void insertBillDrink(Bill billDrink) {\n\tString sql = \"INSERT INTO bills ( Id_food, Id_drink, Id_employees, Price, Serial_Number_Bill, TOTAL ) VALUES (?,?,?,?,?,?)\";\n\n\ttry {\n\t\tPreparedStatement ps = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\t\tps.setString(1, null);\n\t\t\tps.setInt(2, billDrink.getIdD());\n\t\t ps.setInt(3, billDrink.getIdE());\n\t\t\tps.setDouble(4, billDrink.getPrice());\n\t\t\tps.setString(5, billDrink.getSerialNumber());\n\t\t\tps.setDouble(6, billDrink.getTotal());\n\t\t\tps.execute();\n\t\t \n\t\t \n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t\n}\n\t\n}",
"@Override\n public void insert(Iterator<Object[]> batch) {\n while (batch.hasNext()) {\n BoundStatement boundStatement = statement.bind(batch.next());\n ResultSetFuture future = session.executeAsync(boundStatement);\n Futures.addCallback(future, callback, executor);\n }\n }",
"public static void insertEmployees() {\n Connection con = getConnection();\n\n String insertString1, insertString2, insertString3, insertString4;\n insertString1 = \"insert into Employees values(6323, 'Hemanth')\";\n insertString2 = \"insert into Employees values(5768, 'Bob')\";\n insertString3 = \"insert into Employees values(1234, 'Shawn')\";\n insertString4 = \"insert into Employees values(5678, 'Michaels')\";\n\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(insertString1);\n stmt.executeUpdate(insertString2);\n stmt.executeUpdate(insertString3);\n stmt.executeUpdate(insertString4);\n\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Data Inserted into Employees Table\");\n }",
"public void insertMovesToDB(String gameType, Vector<Moves> allMovesForAGame) {\n int lastIndex = 0;\n try {\n\n DriverManager.registerDriver(new com.mysql.cj.jdbc.Driver());\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/xogames\", \"root\", \"Jrqr541&\");\n\n PreparedStatement pstmt = con.prepareStatement(\"INSERT INTO games(gameType) VALUE (?)\");\n pstmt.setString(1, gameType);\n int rowsAffected = pstmt.executeUpdate();\n pstmt.close();\n\n Statement stmt = con.createStatement();\n String queryString = new String(\"SELECT MAX(ID) FROM games\");\n ResultSet rs = stmt.executeQuery(queryString);\n\n while (rs.next()) {\n lastIndex = rs.getInt(1);\n }\n\n stmt.close();\n\n for (Moves move : allMovesForAGame) {\n\n PreparedStatement pstmt1 = con.prepareStatement(\"INSERT INTO steps(player,x,y,ID,step,finalState) VALUE (?,?,?,?,?,?)\");\n if (move.isPlayer()) {\n pstmt1.setInt(1, 1);\n } else {\n pstmt1.setInt(1, 0);\n }\n pstmt1.setInt(2, move.getX());\n pstmt1.setInt(3, move.getY());\n pstmt1.setInt(4, lastIndex);\n pstmt1.setInt(5, move.getStep());\n pstmt1.setInt(6, move.getFinalState());\n\n int rowsAffected1 = pstmt1.executeUpdate();\n pstmt1.close();\n\n }\n con.close();\n // System.out.println(\"elmafrood kda closed\");\n } catch (SQLException ex) {\n System.out.println(\"error in executing insert in toDB fn in SinglePlayerController 2 \" + ex);\n // ex.printStackTrace();\n }\n\n }",
"public void insertPersonnelUnit(PersonnelUnit personnelUnit) throws SQLException {\n PreparedStatement preparedStatement = null;\n MysqlDbManager mysqlDb = MysqlDbManager.getInstance();\n try {\n if (personnelUnit.getClass() == Employee.class) {\n Employee employee = (Employee) personnelUnit;\n String SQL = \"INSERT INTO employees (surname, name, gender, marital_status, salary, dob) VALUES (?, ?, ?, ?, ?, ?)\";\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, employee.getSurname());\n preparedStatement.setString(2, employee.getName());\n preparedStatement.setString(3, employee.getGender());\n preparedStatement.setString(4, employee.getMaritalStatus());\n preparedStatement.setInt(5, employee.getSalary());\n preparedStatement.setDate(6, new Date(employee.getDob().getTime()));\n mysqlDb.executePreparedUpdate(preparedStatement);\n LOGGER.log(Level.WARNING, \"The new employee was added to a database!\");\n }\n\n if (personnelUnit.getClass() == Technology.class) {\n Technology technology = (Technology) personnelUnit;\n String SQL = \"INSERT INTO technologies (name, description, rate) VALUES (?, ?, ?)\";\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, technology.getName());\n preparedStatement.setString(2, technology.getDescription());\n preparedStatement.setInt(3, technology.getRate());\n mysqlDb.executePreparedUpdate(preparedStatement);\n LOGGER.log(Level.WARNING, \"The new technology was added to a database!\");\n }\n\n if (personnelUnit.getClass() == Affair.class) {\n Affair affair = (Affair) personnelUnit;\n String SQL = \"INSERT INTO affair (idEmployee, idTechnology) VALUES (?, ?)\";\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setInt(1, affair.getEmployee().getId());\n preparedStatement.setInt(2, affair.getTechnology().getId());\n mysqlDb.executePreparedUpdate(preparedStatement);\n LOGGER.log(Level.WARNING, \"The new affair was added to a database!\");\n }\n } catch (ClassCastException e) {\n LOGGER.log(Level.SEVERE, \"ClassCastException: \" + e.toString());\n } catch (NullPointerException e) {\n LOGGER.log(Level.SEVERE, \"There is no access to the mysql database: \" + e.toString());\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n } finally {\n try {\n if (preparedStatement != null) {\n preparedStatement.close();\n }\n if (!mysqlDb.getConnection().isClosed()) {\n mysqlDb.getConnection().close();\n }\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n }\n }\n }",
"public void insertDummies() {\r\n\t\tinsertPersoner();\r\n\t\tinsertAnsatte();\r\n\t\tinsertEmner();\r\n\t\tinsertForfattere();\r\n\t\tinsertBoger();\r\n\t\tinsertBogEksemplare();\r\n\t\tinsertReservation();\r\n\t\tinsertLecture();\r\n\t\tinsertPlannedLectures();\r\n\t}",
"public void insertValuesToTables(Connection conn) {\n\t// insert queries\n\n\t\n\tthis.insertIntoAccountTables(conn);\n\tthis.insertIntoIncidentTicketTables(conn);\n\t\n\n\t\n}",
"@Insert\n void insert(Course... courses);",
"protected abstract void fillInsertStatement (final PreparedStatement statement, final T obj)\n \t\t\tthrows SQLException;",
"public static void insertOrders() {\n Connection con = getConnection();\n\n String insertString1, insertString2, insertString3, insertString4;\n insertString1 = \"insert into Orders values(543, 'Belt', 6323)\";\n insertString2 = \"insert into Orders values(432, 'Bottle', 1234)\";\n insertString3 = \"insert into Orders values(876, 'Ring', 5678)\";\n\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(insertString1);\n stmt.executeUpdate(insertString2);\n stmt.executeUpdate(insertString3);\n\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Data Inserted into Orders Table\");\n }",
"public int combinedInsert(DalHints hints, List<Person> daoPojos) throws SQLException {\n\t\tif(null == daoPojos || daoPojos.size() <= 0)\n\t\t\treturn 0;\n\t\thints = DalHints.createIfAbsent(hints);\n\t\treturn client.combinedInsert(hints, daoPojos);\n\t}",
"private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }",
"void insertBatch(List<Customer> customers);",
"@Override\n\tpublic long insertObjs(T... t) {\n\t\tList<T> list = new ArrayList<T>();\n\t\tfor (T obj : t) {\n\t\t\tlist.add(obj);\n\t\t}\n\t\treturn insertObjs(list);\n\t\t// int optNum = 0;\n\t\t// for(T obj : t){\n\t\t// InsertBuider<T> buider = insertBuider();\n\t\t// buider.addValue(obj);\n\t\t// helper.getDatabase(false).insert(buider.tableInfo.tableName, null,\n\t\t// buider.cvs);\n\t\t// optNum++;\n\t\t// }\n\t\t// return optNum;\n\t}",
"public void testInsert2() throws Exception {\n\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n\n // insert another using same command\n insert.setParameter(1, \"BBB Rental\");\n insert.execute();\n\n // Verify insert\n // Verify\n Command select = das.createCommand(\"Select ID, NAME from COMPANY\");\n DataObject root = select.executeQuery();\n\n assertEquals(5, root.getList(\"COMPANY\").size());\n\n }",
"public int combinedInsert(DalHints hints, KeyHolder keyHolder, List<Person> daoPojos) throws SQLException {\n\t\tif(null == daoPojos || daoPojos.size() <= 0)\n\t\t\treturn 0;\n\t\thints = DalHints.createIfAbsent(hints);\n\t\treturn client.combinedInsert(hints, keyHolder, daoPojos);\n\t}",
"public void CrearBDatos(Connection conn, String sNombreBDatos) {\r\n\t\tString \tsqlDB=consultas.CrearBDatos(sNombreBDatos),\r\n\t\t\t\tsqlUsarDB=consultas.UsarBDatos(sNombreBDatos),\r\n\t\t\t\tsqlTablaCliente=consultas.CrearTablaCliente(),\r\n\t\t\t\tsqlTablaDepartamento=consultas.CrearTablaDepartamentos(),\r\n\t\t\t\tsqlTablaFuncionarios=consultas.CrearTablaFuncionarios(),\r\n\t\t\t\tsqlTablaHorasFun=consultas.CrearTablaHorasFunc(),\r\n\t\t\t\tsqltablaServicios=consultas.CrearTablaServicios();\r\n\t\ttry\r\n\t\t{\r\n\t\t\tStatement stmt=conn.createStatement();\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tstmt.executeUpdate(sqlDB);\r\n\t\t\t\tstmt.executeUpdate(sqlUsarDB);\r\n\t\t\t\tstmt.executeUpdate(sqlTablaCliente);\r\n\t\t\t\tstmt.executeUpdate(sqlTablaDepartamento);\t\t\t\t\r\n\t\t\t\tstmt.executeUpdate(sqlTablaFuncionarios);\r\n\t\t\t\tstmt.executeUpdate(sqltablaServicios);\r\n\t\t\t\tstmt.executeUpdate(sqlTablaHorasFun);\r\n\t\t\t\tstmt.close();\r\n\t\t\t\r\n\t\t\t}catch (SQLException e){stmt.close(); e.getStackTrace();}\r\n\t\t}catch (SQLException e){\te.getStackTrace();}\r\n\t\tAgregarDepartamentos(conn);\r\n\r\n\t}",
"public void insertData() throws SQLException {\n pst=con.prepareStatement(\"insert into employee values(?,?,?)\");\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(1,id);\n System.out.println(\"Enter Name: \");\n String name=sc.next();\n pst.setString(2,name);\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(3,city);\n pst.execute();\n System.out.println(\"Data inserted successfully\");\n }",
"public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}",
"@Override\n\tpublic <T> void insertMany(List<T> list) throws Exception {\n\t\t\n\t}",
"public void run(Statement state) throws SQLException {\n\n System.out.println(\"INFO: -= Inserting data via dummy table ...\");\n state.execute(multipleRowInsertDummySQL);\n System.out.println(\"INFO: -= The data are inserted via dummy table:\");\n selectAllFromTable(state, tableName, 10);\n\n System.out.println(\"INFO: -= Inserting data using INSERT INTO statement ...\");\n state.execute(multipleRowInsertIntoSQL);\n System.out.println(\"INFO: -= The data are inserted via INSERT INTO statement:\");\n selectAllFromTable(state, tableName, 20);\n }",
"private void inseredados() {\n // Insert Funcionários\n\n FuncionarioDAO daoF = new FuncionarioDAO();\n Funcionario func1 = new Funcionario();\n func1.setCpf(\"08654683970\");\n func1.setDataNasc(new Date(\"27/04/1992\"));\n func1.setEstadoCivil(\"Solteiro\");\n func1.setFuncao(\"Garcom\");\n func1.setNome(\"Eduardo Kempf\");\n func1.setRg(\"10.538.191-3\");\n func1.setSalario(1000);\n daoF.persisteObjeto(func1);\n\n Funcionario func2 = new Funcionario();\n func2.setCpf(\"08731628974\");\n func2.setDataNasc(new Date(\"21/08/1992\"));\n func2.setEstadoCivil(\"Solteira\");\n func2.setFuncao(\"Caixa\");\n func2.setNome(\"Juliana Iora\");\n func2.setRg(\"10.550.749-6\");\n func2.setSalario(1200);\n daoF.persisteObjeto(func2);\n\n Funcionario func3 = new Funcionario();\n func3.setCpf(\"08731628974\");\n func3.setDataNasc(new Date(\"03/05/1989\"));\n func3.setEstadoCivil(\"Solteiro\");\n func3.setFuncao(\"Gerente\");\n func3.setNome(\"joão da Silva\");\n func3.setRg(\"05.480.749-2\");\n func3.setSalario(3000);\n daoF.persisteObjeto(func3);\n\n Funcionario func4 = new Funcionario();\n func4.setCpf(\"01048437990\");\n func4.setDataNasc(new Date(\"13/04/1988\"));\n func4.setEstadoCivil(\"Solteiro\");\n func4.setFuncao(\"Garçon\");\n func4.setNome(\"Luiz Fernandodos Santos\");\n func4.setRg(\"9.777.688-1\");\n func4.setSalario(1000);\n daoF.persisteObjeto(func4);\n\n TransactionManager.beginTransaction();\n Funcionario func5 = new Funcionario();\n func5.setCpf(\"01048437990\");\n func5.setDataNasc(new Date(\"13/04/1978\"));\n func5.setEstadoCivil(\"Casada\");\n func5.setFuncao(\"Cozinheira\");\n func5.setNome(\"Sofia Gomes\");\n func5.setRg(\"3.757.688-8\");\n func5.setSalario(1500);\n daoF.persisteObjeto(func5);\n\n // Insert Bebidas\n BebidaDAO daoB = new BebidaDAO();\n Bebida bebi1 = new Bebida();\n bebi1.setNome(\"Coca Cola\");\n bebi1.setPreco(3.25);\n bebi1.setQtde(1000);\n bebi1.setTipo(\"Refrigerante\");\n bebi1.setDataValidade(new Date(\"27/04/2014\"));\n daoB.persisteObjeto(bebi1);\n\n Bebida bebi2 = new Bebida();\n bebi2.setNome(\"Cerveja\");\n bebi2.setPreco(4.80);\n bebi2.setQtde(1000);\n bebi2.setTipo(\"Alcoolica\");\n bebi2.setDataValidade(new Date(\"27/11/2013\"));\n daoB.persisteObjeto(bebi2);\n\n Bebida bebi3 = new Bebida();\n bebi3.setNome(\"Guaraná Antatica\");\n bebi3.setPreco(3.25);\n bebi3.setQtde(800);\n bebi3.setTipo(\"Refrigerante\");\n bebi3.setDataValidade(new Date(\"27/02/2014\"));\n daoB.persisteObjeto(bebi3);\n\n Bebida bebi4 = new Bebida();\n bebi4.setNome(\"Água com gás\");\n bebi4.setPreco(2.75);\n bebi4.setQtde(500);\n bebi4.setTipo(\"Refrigerante\");\n bebi4.setDataValidade(new Date(\"27/08/2013\"));\n daoB.persisteObjeto(bebi4);\n\n Bebida bebi5 = new Bebida();\n bebi5.setNome(\"Whisky\");\n bebi5.setPreco(3.25);\n bebi5.setQtde(1000);\n bebi5.setTipo(\"Alcoolica\");\n bebi5.setDataValidade(new Date(\"03/05/2016\"));\n daoB.persisteObjeto(bebi5);\n\n // Insert Comidas\n ComidaDAO daoC = new ComidaDAO();\n Comida comi1 = new Comida();\n comi1.setNome(\"Batata\");\n comi1.setQuantidade(30);\n comi1.setTipo(\"Kilograma\");\n comi1.setDataValidade(new Date(\"27/04/2013\"));\n daoC.persisteObjeto(comi1);\n\n Comida comi2 = new Comida();\n comi2.setNome(\"Frango\");\n comi2.setQuantidade(15);\n comi2.setTipo(\"Kilograma\");\n comi2.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi2);\n\n Comida comi3 = new Comida();\n comi3.setNome(\"Mussarela\");\n comi3.setQuantidade(15000);\n comi3.setTipo(\"Grama\");\n comi3.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi3);\n\n Comida comi4 = new Comida();\n comi4.setNome(\"Presunto\");\n comi4.setQuantidade(10000);\n comi4.setTipo(\"Grama\");\n comi4.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi4);\n\n Comida comi5 = new Comida();\n comi5.setNome(\"Bife\");\n comi5.setQuantidade(25);\n comi5.setTipo(\"Kilograma\");\n comi5.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi5);\n\n\n // Insert Mesas\n MesaDAO daoM = new MesaDAO();\n Mesa mes1 = new Mesa();\n mes1.setCapacidade(4);\n mes1.setStatus(true);\n daoM.persisteObjeto(mes1);\n\n Mesa mes2 = new Mesa();\n mes2.setCapacidade(4);\n mes2.setStatus(true);\n daoM.persisteObjeto(mes2);\n\n Mesa mes3 = new Mesa();\n mes3.setCapacidade(6);\n mes3.setStatus(true);\n daoM.persisteObjeto(mes3);\n\n Mesa mes4 = new Mesa();\n mes4.setCapacidade(6);\n mes4.setStatus(true);\n daoM.persisteObjeto(mes4);\n\n Mesa mes5 = new Mesa();\n mes5.setCapacidade(8);\n mes5.setStatus(true);\n daoM.persisteObjeto(mes5);\n\n // Insert Pratos\n PratoDAO daoPr = new PratoDAO();\n Prato prat1 = new Prato();\n List<Comida> comI = new ArrayList<Comida>();\n comI.add(comi1);\n prat1.setNome(\"Porção de Batata\");\n prat1.setIngredientes(comI);\n prat1.setQuantidadePorcoes(3);\n prat1.setPreco(13.00);\n daoPr.persisteObjeto(prat1);\n\n Prato prat2 = new Prato();\n List<Comida> comII = new ArrayList<Comida>();\n comII.add(comi2);\n prat2.setNome(\"Porção de Frango\");\n prat2.setIngredientes(comII);\n prat2.setQuantidadePorcoes(5);\n prat2.setPreco(16.00);\n daoPr.persisteObjeto(prat2);\n\n Prato prat3 = new Prato();\n List<Comida> comIII = new ArrayList<Comida>();\n comIII.add(comi1);\n comIII.add(comi3);\n comIII.add(comi4);\n prat3.setNome(\"Batata Recheada\");\n prat3.setIngredientes(comIII);\n prat3.setQuantidadePorcoes(3);\n prat3.setPreco(13.00);\n daoPr.persisteObjeto(prat3);\n\n Prato prat4 = new Prato();\n List<Comida> comIV = new ArrayList<Comida>();\n comIV.add(comi2);\n comIV.add(comi3);\n comIV.add(comi4);\n prat4.setNome(\"Lanche\");\n prat4.setIngredientes(comIV);\n prat4.setQuantidadePorcoes(3);\n prat4.setPreco(13.00);\n daoPr.persisteObjeto(prat4);\n\n Prato prat5 = new Prato();\n prat5.setNome(\"Porção especial\");\n List<Comida> comV = new ArrayList<Comida>();\n comV.add(comi1);\n comV.add(comi3);\n comV.add(comi4);\n prat5.setIngredientes(comV);\n prat5.setQuantidadePorcoes(3);\n prat5.setPreco(13.00);\n daoPr.persisteObjeto(prat5);\n\n // Insert Pedidos Bebidas\n PedidoBebidaDAO daoPB = new PedidoBebidaDAO();\n PedidoBebida pb1 = new PedidoBebida();\n pb1.setPago(false);\n List<Bebida> bebI = new ArrayList<Bebida>();\n bebI.add(bebi1);\n bebI.add(bebi2);\n pb1.setBebidas(bebI);\n pb1.setIdFuncionario(func5);\n pb1.setIdMesa(mes5);\n daoPB.persisteObjeto(pb1);\n\n PedidoBebida pb2 = new PedidoBebida();\n pb2.setPago(false);\n List<Bebida> bebII = new ArrayList<Bebida>();\n bebII.add(bebi1);\n bebII.add(bebi4);\n pb2.setBebidas(bebII);\n pb2.setIdFuncionario(func4);\n pb2.setIdMesa(mes4);\n daoPB.persisteObjeto(pb2);\n\n TransactionManager.beginTransaction();\n PedidoBebida pb3 = new PedidoBebida();\n pb3.setPago(false);\n List<Bebida> bebIII = new ArrayList<Bebida>();\n bebIII.add(bebi2);\n bebIII.add(bebi3);\n pb3.setBebidas(bebIII);\n pb3.setIdFuncionario(func2);\n pb3.setIdMesa(mes2);\n daoPB.persisteObjeto(pb3);\n\n PedidoBebida pb4 = new PedidoBebida();\n pb4.setPago(false);\n List<Bebida> bebIV = new ArrayList<Bebida>();\n bebIV.add(bebi2);\n bebIV.add(bebi5);\n pb4.setBebidas(bebIV);\n pb4.setIdFuncionario(func3);\n pb4.setIdMesa(mes3);\n daoPB.persisteObjeto(pb4);\n\n PedidoBebida pb5 = new PedidoBebida();\n pb5.setPago(false);\n List<Bebida> bebV = new ArrayList<Bebida>();\n bebV.add(bebi1);\n bebV.add(bebi2);\n bebV.add(bebi3);\n pb5.setBebidas(bebV);\n pb5.setIdFuncionario(func1);\n pb5.setIdMesa(mes5);\n daoPB.persisteObjeto(pb5);\n\n // Insert Pedidos Pratos\n PedidoPratoDAO daoPP = new PedidoPratoDAO();\n PedidoPrato pp1 = new PedidoPrato();\n pp1.setPago(false);\n List<Prato> praI = new ArrayList<Prato>();\n praI.add(prat1);\n praI.add(prat2);\n praI.add(prat3);\n pp1.setPratos(praI);\n pp1.setIdFuncionario(func5);\n pp1.setIdMesa(mes5);\n daoPP.persisteObjeto(pp1);\n\n PedidoPrato pp2 = new PedidoPrato();\n pp2.setPago(false);\n List<Prato> praII = new ArrayList<Prato>();\n praII.add(prat1);\n praII.add(prat3);\n pp2.setPratos(praII);\n pp2.setIdFuncionario(func4);\n pp2.setIdMesa(mes4);\n daoPP.persisteObjeto(pp2);\n\n PedidoPrato pp3 = new PedidoPrato();\n pp3.setPago(false);\n List<Prato> praIII = new ArrayList<Prato>();\n praIII.add(prat1);\n praIII.add(prat2);\n pp3.setPratos(praIII);\n pp3.setIdFuncionario(func2);\n pp3.setIdMesa(mes2);\n daoPP.persisteObjeto(pp3);\n\n PedidoPrato pp4 = new PedidoPrato();\n pp4.setPago(false);\n List<Prato> praIV = new ArrayList<Prato>();\n praIV.add(prat1);\n praIV.add(prat3);\n pp4.setPratos(praIV);\n pp4.setIdFuncionario(func3);\n pp4.setIdMesa(mes3);\n daoPP.persisteObjeto(pp4);\n\n PedidoPrato pp5 = new PedidoPrato();\n pp5.setPago(false);\n List<Prato> praV = new ArrayList<Prato>();\n praV.add(prat1);\n praV.add(prat2);\n praV.add(prat3);\n praV.add(prat4);\n pp5.setPratos(praV);\n pp5.setIdFuncionario(func1);\n pp5.setIdMesa(mes5);\n daoPP.persisteObjeto(pp5);\n\n }",
"int insertCoefficients(String first, String nobody, String second, String firstOrNobody, String firsOrSecond, String secondOrNobody) throws DAOException;",
"public interface BugsActivityDAO {\n\n @Insert(\"insert into firefox_bugs_activity \" +\n \"(`bugId`,`who`,`when`,`what`,`removed`,`added`,`crawledTime`) \" +\n \"values (#{bugId},#{who},#{when},#{what},#{removed},#{added},#{crawledTime})\")\n public int add(BugsActivity fireFoxBugsActivity);\n\n @Insert(\"insert into firefox_bugs_activity_html (`bugId`,`html`) \" +\"values (#{bugId},#{html})\")\n public int addHtml(BugsActivity fireFoxBugsActivity);\n}",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }",
"public static void insertDemoData() throws SQLException\n {\n insertAccount(new Account(0, \"John Doe\", \"Marvin Gardens\", false));\n insertAccount(new Account(0, \"Robert Roe\", \"Louisiana Avenue\", false));\n }",
"private void insertData() {\n \n for (int i = 0; i < 3; i++) {\n ClienteEntity editorial = factory.manufacturePojo(ClienteEntity.class);\n em.persist(editorial);\n ClienteData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoPaseoEntity paseo = factory.manufacturePojo(ContratoPaseoEntity.class);\n em.persist(paseo);\n contratoPaseoData.add(paseo);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoHotelEntity editorial = factory.manufacturePojo(ContratoHotelEntity.class);\n em.persist(editorial);\n contratoHotelData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n PerroEntity perro = factory.manufacturePojo(PerroEntity.class);\n //perro.setCliente(ClienteData.get(0));\n //perro.setEstadias((List<ContratoHotelEntity>) contratoHotelData.get(0));\n //perro.setPaseos((List<ContratoPaseoEntity>) contratoPaseoData.get(0));\n em.persist(perro);\n Perrodata.add(perro);\n }\n\n }",
"@Insert({\n \"insert into dept (id, dept_name)\",\n \"values (#{id,jdbcType=INTEGER}, #{deptName,jdbcType=VARCHAR})\"\n })\n int insert(Dept record);",
"@Override\n\tpublic void insert(Object connectionHandle, ColumnList cols, \n\t\t\tArrayList<VariableList> valueLists, String table, boolean trxStarted\n\t\t\t, PostContext context, VariableRepository provider)\n\t\t\t\t\t\t\tthrows DataSourceException, ExecutionException\n\t{\n\t\tif(usePrecompileUpdate && context != null && context.getPrecompile().getSqlSentence() != null\n\t\t\t\t&& valueLists.size() == 1\n\t\t\t\t&& context.getPrecompile().getSqlSentence().isPrecompilable()){\n\t\t\tinsertPrecompile(connectionHandle, cols, valueLists, table, trxStarted, context, provider);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(context != null){\n\t\t\tcontext.getPrecompile().setCompile(false);\n\t\t}\n\t\t\n\t\tInsertSentence sentence = new InsertSentence();\n\t\tsentence.setCols(cols);\n\t\tTableIdentifier tbl = new TableIdentifier(table);\n\t\tsentence.setTbl(tbl);\n\t\t\n\t\tTypeHelper helper = this.typeHelper.newHelper(false, sentence);\n\t\t\t\t\n\t\tStringBuffer sql = new StringBuffer();\n\t\t\n\t\tsql.append(\"INSERT INTO \");\n\t\tsql.append(table);\n\t\t\n\t\t// col definition\n\t\tif(cols != null && cols.isReady(context, provider, null)){\n\t\t\tsql.append(\" ( \");\n\t\t\t\n\t\t\tboolean first = true;\n\t\t\tIterator<SelectColumnElement> it = cols.iterator();\n\t\t\twhile(it.hasNext()){\n\t\t\t\tSelectColumnElement element = it.next();\n\t\t\t\t\n\t\t\t\tif(first){\n\t\t\t\t\tfirst = false;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tsql.append(\", \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tsql.append(element.extract(context, provider, null, null, helper));\n\t\t\t\t} catch (RedirectRequestException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tString columnName = element.getColumnName().extract(context, provider, null, null, helper);\n\t\t\t\t\n\t\t\t\tString fldType = helper.getDataFieldType(table + \".\" + columnName, context);\n\t\t\t\t\n\t\t\t\t// debug\n\t\t\t\t// AlinousDebug.debugOut(\"********* Type helper : \" + columnName + \" -> \" + fldType);\n\t\t\t\t\n\t\t\t\thelper.addListType(fldType);\n\t\t\t}\n\t\t\tsql.append(\" ) \");\n\t\t}\n\t\telse{\n\t\t\t// setup cols\n\t\t\tDataTable dt = getDataTable(connectionHandle, table);\n\t\t\t\n\t\t\tIterator<DataField> it = dt.iterator();\n\t\t\twhile(it.hasNext()){\n\t\t\t\tDataField fld = it.next();\n\t\t\t\thelper.addListType(fld.getType());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// values\n\t\tsql.append(\" VALUES \");\n\t\t\n\t\thelper.resetCount();\n\t\tboolean first = true;\n\t\tIterator<VariableList> valListIt = valueLists.iterator();\n\t\twhile(valListIt.hasNext()){\n\t\t\tVariableList valList = valListIt.next();\n\t\t\t\n\t\t\tif(first){\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsql.append(\", \");\n\t\t\t}\n\t\t\t\n\t\t\t//helper.resetCount();\n\t\t\t\n\t\t\tsql.append(valList.extract(context, provider, null, null, helper));\n\t\t}\n\t\t\n\t\tif(this.outSql){\n\t\t\tAlinousDebug.debugOut(core, sql.toString());\n\t\t}\n\t\t\n\t\texecuteUpdateSQL(connectionHandle, sql.toString(), trxStarted);\n\t}",
"public void WriteDatas(Vector<Products> products)\n {\n auditService.writeLog(\"ENTER ProductServiceIO WriteDatas\");\n\n try {\n for( Products p : products) {\n if(p instanceof Food){\n\n String sqlAdd = \"INSERT INTO products (`type`, `Name`, `Price`, `ExpireDate`) VALUES (?,?,?,?)\";\n PreparedStatement statement = connection.prepareStatement(sqlAdd);\n\n statement.setString(1, \"Food\");\n statement.setString(2, p.getProductName());\n statement.setDouble(3, p.getProductPrice());\n\n java.sql.Date x = new Date(((Food) p).getExpireDate().getTime());\n statement.setDate(4, x);\n\n statement.executeUpdate();\n\n }\n if(p instanceof Electronics){\n\n String sqlAdd = \"INSERT INTO products (`type`, `Name`, `Price`, `WarrentyTime`, `DeliveryPrice`) VALUES (?,?,?,?,?)\";\n PreparedStatement statement = connection.prepareStatement(sqlAdd);\n\n statement.setString(1, \"Electronics\");\n statement.setString(2, p.getProductName());\n statement.setDouble(3, p.getProductPrice());\n statement.setInt(4, ((Electronics) p).getWarrantyTime());\n statement.setDouble(5, ((Electronics) p).getDeliveryPrice());\n\n statement.executeUpdate();\n\n }\n if(p instanceof Furniture){\n\n String sqlAdd = \"INSERT INTO products (`type`, `Name`, `Price`, `DeliveryPrice`, `Wantdelivery`) VALUES (?,?,?,?,?)\";\n PreparedStatement statement = connection.prepareStatement(sqlAdd);\n\n statement.setString(1, \"Furniture\");\n statement.setString(2, p.getProductName());\n statement.setDouble(3, p.getProductPrice());\n statement.setDouble(4, ((Furniture) p).getDeliveryPrice());\n statement.setString(5, String.valueOf(((Furniture) p).isWantDelivery()));\n\n statement.executeUpdate();\n\n }\n }\n\n auditService.writeLog(\"EXIT ProductServiceIO WriteDatas\");\n }\n catch ( SQLException e) {\n e.printStackTrace();\n }\n }",
"int insertSelective(Assist_table record);",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }",
"public void addCustomerSQL(Connection connection) throws SQLException {\r\n String sql1 = \"INSERT INTO Customers (first_name, last_name, age, gender, money)\"\r\n + \" VALUES (?,?,?,?,?)\";\r\n PreparedStatement statement1 = connection.prepareStatement(sql1);\r\n for(int i = 0; i < customers.size();i++) {\r\n statement1.setString(1,customers.get(i).getF_Name());\r\n statement1.setString(2,customers.get(i).getL_Name());\r\n statement1.setInt(3,customers.get(i).getAge());\r\n statement1.setInt(4,customers.get(i).getGender());\r\n statement1.setDouble(5,customers.get(i).getMoney());\r\n int rows = statement1.executeUpdate();\r\n if (rows > 0) {\r\n System.out.println(\"new user added\");\r\n }\r\n }\r\n }",
"void insertSelective(CTipoComprobante record) throws SQLException;",
"public static void insertFournisseur(Fournisseur unFournisseur ) {\n Bdd uneBdd = new Bdd(\"localhost\", \"paruline \", \"root\", \"\");\n\n String checkVille = \"CALL checkExistsCity('\" + unFournisseur.getVille() + \"','\" + unFournisseur.getCp() + \"');\";\n try {\n uneBdd.seConnecter();\n Statement unStat = uneBdd.getMaConnection().createStatement();\n\n ResultSet unRes = unStat.executeQuery(checkVille);\n\n int nb = unRes.getInt(\"nb\");\n\n if (nb == 0) {\n String ajoutVille = \"CALL InsertCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"');\";\n\n try {\n Statement unStatAjout = uneBdd.getMaConnection().createStatement();\n\n unStatAjout.executeQuery(ajoutVille);\n unStatAjout.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + ajoutVille);\n }\n }\n\n String id = \"CALL GetCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"')\";\n\n try {\n Statement unStatId = uneBdd.getMaConnection().createStatement();\n\n ResultSet unResId = unStatId.executeQuery(id);\n\n int id_city = unResId.getInt(\"id_city\");\n\n\n\n String insertFournisseur = \"INSERT INTO fournisseur(id_city, name_f, adresse_f, phoneFour) VALUES (\" + id_city + \", '\" + unFournisseur.getNom() + \"', \" +\n \"'\" + unFournisseur.getAdresse() + \"', '\" + unFournisseur.getTelephone() + \"')\";\n\n try {\n Statement unStatFourn = uneBdd.getMaConnection().createStatement();\n unStatFourn.executeQuery(insertFournisseur);\n\n unStatFourn.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + insertFournisseur);\n }\n\n unResId.close();\n unStatId.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + id);\n }\n\n unRes.close();\n unStat.close();\n uneBdd.seDeConnecter();\n } catch (SQLException exp) {\n System.out.println(\"Erreur : \" + checkVille);\n }\n }",
"@Insert\n void insertAll(Measurement... measurements);",
"private void insertData() {\n for (int i = 0; i < 3; i++) {\n RecipeEntity books = factory.manufacturePojo(RecipeEntity.class);\n em.persist(books);\n data.add(books);\n }\n }",
"private void insertData() {\n for (int i = 0; i < 3; i++) {\n PodamFactory factory = new PodamFactoryImpl();\n VisitaEntity entity = factory.manufacturePojo(VisitaEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n }",
"public PreparedStatement genersateStatement(Record<?> record) throws SQLException\n\t{\n\t\tfinal Object[] representations = record.toSQL();\n\t\t\n\t\t// Generate the statement\n\t\tString query = \"INSERT INTO \\\"\" + record.getTableName() + \"\\\" VALUES (\";\n\t\tfor(int i = 0; i < representations.length; i++)\n\t\t{\n\t\t\tif(i != 0)\n\t\t\t{\n\t\t\t\tquery += \",\";\n\t\t\t}\n\t\t\tquery += \"?\";\n\t\t}\n\t\t\n\t\tquery += \")\";\n\t\t\n\t\t\n\t\t// Get and fill the statement\n\t\tPreparedStatement ps = getPreparedStatement(query);\n\t\tfor(int i = 0; i < representations.length; i++)\n\t\t{\n\t\t\tps.setObject(i + 1, representations[i]);\n\t\t}\n\t\t\n\t\treturn ps;\n\t}",
"@Override\n\tpublic void insert(String... args) throws SQLException {\n\t\t\n\t}",
"public void addDoctor(String name, String lastname, String userName, String pass, String secAns)\r\n {\r\n\t try{\r\n\t\t // command to Insert is called with parameters\r\n\t String command = \"INSERT INTO DOCTORDATA (FIRSTNAME,LASTNAME,USERNAME,PASSWORD,SECURITYQN,SECURITYANS)\"+\r\n\t\t\t \"VALUES ('\"+name+\"', '\"+lastname+\"', '\"+userName+\"', '\"+pass+\"', '\"+\"What is Your favorite food?\"+\"', '\"+secAns+\"');\";\r\n\t stmt.executeUpdate(command);\r\n\t \r\n\t \r\n\t } catch (SQLException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t}\r\n\t \r\n }",
"@Insert({\n \"insert into `category` (`cate_id`, `cate_name`)\",\n \"values (#{cateId,jdbcType=INTEGER}, #{cateName,jdbcType=VARCHAR})\"\n })\n int insert(Category record);",
"private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n MonitoriaEntity entity = factory.manufacturePojo(MonitoriaEntity.class);\r\n\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }",
"public static void Generalinsert(int id,String FQN,String name, String container,int potincy,String directtype,String label,\n\t\t String kind,String table)\n\t { \n\t \n\t \ttry \n\t { \n\t Statement stmt=null; \n\t ResultSet res=null; \n\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t stmt = (Statement)conn.createStatement(); \n\t res= stmt.executeQuery(\"SELECT * from generalconnection \"); \n\n\n\t // 增加数据\n\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t String sql = \"select * from generalconnection\";\n\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t \n\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,potincy,direct_type,label,kind) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"\n\t +\",\"+\"'\"+potincy+\"'\"+\",\"+\"'\"+directtype+\"'\"+\",\"+\"'\"+label+\"'\"+\",\"+\"'\"+kind+\"'\"+\")\"); // 增加数据 \n\t if (n > 0) {\n//\t JOptionPane.showMessageDialog(null, \"成功\");\n\t \n\t \n\t } else {\n//\t JOptionPane.showMessageDialog(null, \"失败\");\n\t }\n\t //增加数据结束\n\n\t while (res.next()) \n\t { \n\t \n\t } \n\t } \n\t \n\t catch(Exception ex) \n\t { \n\t ex.printStackTrace(); \n\t } \n\t}",
"int insertSelective(@Param(\"record\") TbSerdeParams record, @Param(\"selective\") TbSerdeParams.Column ... selective);",
"final public static PreparedStatement createPstmtInsert(Connection conn, DotProjectObject obj)\n\t{\n\t\tClass<? extends DotProjectObject> clazz = obj.getClass();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tString table = null;\n\t\tField[] beanFields = null;\n\t\tString[] dbFields = null;\n\t\tObject[] dbValues = null;\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\ttable = AnnotationUtil.getAnnotationValue(clazz, DbAnnotations.TABLE_ANNOTATION);\n\t\tsb.append(\"INSERT INTO \");\n\t\tsb.append(table);\n\t\t\n\t\tbeanFields = AnnotationUtil.getAnnotatedFields(clazz, DbAnnotations.PROPERTY_ANNOTATION);\n\t\tdbFields = new String[beanFields.length];\n\t\tdbValues = new Object[beanFields.length];\n\t\tfor (int i = 0; i < beanFields.length; i++) {\n\t\t\t// Identificator fields are automatically set by the database.\n\t\t\tif (beanFields[i].isAnnotationPresent(DbAnnotations.IDENTIFICATOR_ANNOTATION)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdbFields[i] = AnnotationUtil.getAnnotationValue(beanFields[i], DbAnnotations.PROPERTY_ANNOTATION);\n\t\t\ttry {\n\t\t\t\tdbValues[i] = beanFields[i].get(obj);\n\t\t\t\tif (dbValues[i] == null) {\n\t\t\t\t\tdbFields[i] = null;\n\t\t\t\t\tdbValues[i] = null;\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (Exception iae) {\n\t\t\t\tdbFields[i] = null;\n\t\t\t\tdbValues[i] = null;\n\t\t\t}\n\t\t}\n\t\tdbFields = ArrayUtil.clean(dbFields);\n\t\tdbValues = ArrayUtil.clean(dbValues);\n\t\t\t\n\t\tsb.append(\" (\");\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t\tsb.append(dbFields[i]);\n\t\t}\n\t\t\n\t\tsb.append(\") values (\");\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t\tsb.append(\"?\");\n\t\t}\n\t\tsb.append(\")\");\n\n\t\ttry {\n\t\t\tstmt = conn.prepareStatement(sb.toString());\n\t\t\tfor (int i = 1; i <= dbValues.length; i++) {\n\t\t\t\tstmt.setObject(i, dbValues[i - 1]);\n\t\t\t}\n\t\t} catch (SQLException se) {\n\t\t\tstmt = null;\n\t\t}\n\t\t\n\t\treturn stmt;\n\t}",
"public static void Enitityinsert (int id,String name,String FQN, String container,int potincy,String directtype,String table )\n { \n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n res= stmt.executeQuery(\"SELECT * from entity \"); \n\n\n // 增加数据\n Statement stm = (Statement) conn.createStatement();// 提交查巡\n String sql = \"select * from entity\";\n ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n// sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n \n int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name,container,potincy,direct_type) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+potincy+\"'\"+\",\"+\"'\"+directtype+\"'\"+\")\"); // 增加数据 \n if (n > 0) {\n// JOptionPane.showMessageDialog(null, \"成功\");\n \n \n } else {\n// JOptionPane.showMessageDialog(null, \"失败\");\n }\n //增加数据结束\n\n while (res.next()) \n { \n\n } \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}",
"private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }",
"int insertSelective(Commet record);",
"public void insert(taxi ta)throws ClassNotFoundException,SQLException\r\n {\n String taxino=ta.getTaxino();\r\n String drivername=ta.getDrivername();\r\n String driverno=ta.getDriverno();\r\n String taxitype=ta.getTaxitype();\r\n String state=ta.getState();\r\n String priority=ta.getPriority();\r\n connection= dbconnection.createConnection();\r\nString sqlString=\"INSERT INTO taxi (taxino,drivername,driverno,taxitype,state,priority) VALUES ('\"+taxino+\"','\"+drivername+\"','\"+driverno+\"','\"+taxitype+\"','\"+state+\"','\"+priority+\"')\";\r\n PreparedStatement preparedStmt = connection.prepareStatement(sqlString); \r\n preparedStmt.execute(); \r\n connection.close();\r\n \r\n }",
"public void insertDoctor() {\n\t\tScanner sc = new Scanner(System.in);\n\t\ttry {\n\t\t\tDoctorDto doctorDto = new DoctorDto();\n\n\t\t\tSystem.out.println(\"\\n\\n--Insert doctor details--\");\n\t\t\tSystem.out.print(\"Enter Name: \");\n\t\t\tString dname = sc.nextLine();\n\t\t\tdoctorDto.setName(dname);\n\n\t\t\tSystem.out.print(\"\\nEnter Username: \");\n\t\t\tString username = sc.nextLine();\n\t\t\tdoctorDto.setUsername(username);\n\n\t\t\tSystem.out.print(\"\\nEnter Password: \");\n\t\t\tString password = sc.nextLine();\n\t\t\tdoctorDto.setPassword(password);\n\n\t\t\tSystem.out.print(\"\\nEnter Speciality: \");\n\t\t\tString speciality = sc.nextLine();\n\t\t\tdoctorDto.setSpeciality(speciality);\n\n\t\t\tif (validateDoctor(doctorDto)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tint i = doctorDao.insert(dname, username, password, speciality);\n\t\t\tif (i > 0) {\n\t\t\t\tlogger.info(\"Data Inserted Successfully...\");\n\t\t\t} else {\n\t\t\t\tlogger.info(\"Data Insertion Unsucessful!\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t}",
"public void addEmployee(Person person, ArrayList<Integer> paidBy, ArrayList<Integer> takes, ArrayList<JobHistory> history,\n ArrayList<Integer> skills, HashMap<String, String> phoneNumbers) {\n try{\n // insert person\n PreparedStatement pStmt = conn.prepareStatement(\"INSERT INTO person\\n\" +\n \"VALUES(?, ?, ?, ?, ?, ?, ?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, person.getName());\n pStmt.setString(3, person.getCity());\n pStmt.setString(4, person.getStreet());\n pStmt.setString(5, person.getState());\n pStmt.setString(6, person.getZipCode() + \"\");\n pStmt.setString(7, person.getEmail());\n pStmt.setString(8, person.getGender());\n ResultSet rset = pStmt.executeQuery();\n\n // insert phone numbers\n pStmt = conn.prepareStatement(\"INSERT INTO phone_number \" +\n \"VALUES (?, ?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, phoneNumbers.get(\"home\"));\n pStmt.setString(3, phoneNumbers.get(\"mobile\"));\n rset = pStmt.executeQuery();\n\n // insert skills\n for(Integer skill : skills) {\n pStmt = conn.prepareStatement(\"INSERT INTO person_skill VALUES (?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, skill + \"\");\n rset = pStmt.executeQuery();\n }\n\n // insert job histories\n for(JobHistory job : history) {\n pStmt = conn.prepareStatement(\"INSERT INTO job_history VALUES (?, ?, ?, ?)\");\n\n pStmt.setString(1, job.getStartDate());\n pStmt.setString(2, job.getEndDate());\n pStmt.setString(3, job.getJobListing() + \"\");\n pStmt.setString(4, person.getPerId() + \"\");\n rset = pStmt.executeQuery();\n }\n\n // insert sections taken\n for(Integer section : takes) {\n pStmt = conn.prepareStatement(\"INSERT INTO takes VALUES (?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, section + \"\");\n rset = pStmt.executeQuery();\n }\n\n // add job a person is paid by\n for(Integer jobListing : paidBy) {\n pStmt = conn.prepareStatement(\"INSERT INTO paid_by VALUES (?, ?)\");\n\n pStmt.setString(1, person.getPerId() + \"\");\n pStmt.setString(2, jobListing + \"\");\n rset = pStmt.executeQuery();\n }\n\n employees.add(person);\n System.out.println(\"\\n\" + person.getName() + \" added successfully to company \" + getCompName());\n\n } catch(Exception e){\n System.out.println(\"\\nError in method addEmployee: \" + e);\n }\n\n }",
"public void insertarCargo() {\n ContentValues values = new ContentValues();\n for (int i = 0; i <= 3; i++) {\n values.put(\"NOMBRE_CARGO\", \"nombre \" + i);\n values.put(\"DESCRIPCION_CARGO\", \"Descripcion \" + i);\n db.insert(\"CARGO\", null, values);\n }\n }",
"public void create(CategoriaDTO dto) throws SQLException{\n getConnection();\n CallableStatement callableStatement = null;\n \n try {\n callableStatement = (CallableStatement) connection.prepareCall(SQL_INSERT);\n callableStatement.setString(1, dto.getEntidad().getNombreCategoria());\n callableStatement.setString(2, dto.getEntidad().getDescripcionCategoria());\n callableStatement.executeUpdate(); // review\n } finally {\n if(callableStatement != null){\n callableStatement.close();\n }\n if(connection != null){\n connection.close();\n }\n }\n }",
"public void exe(Connection conn,String sql,List<OrderDetails> detailList)throws Exception{\r\n\t\t//insert into ORDER_DETAIL(ORDER_ID,PRODUCT_ID,QUANTITY) values(?,?,?);\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\r\n\t\tfor(int i=0;i<detailList.size();i++){\r\n\t\t\tOrderDetails od=detailList.get(i);\r\n\t\t\tpstmt.setInt(1, od.getOrderId());\r\n\t\t\tpstmt.setInt(2, od.getProductId());\r\n\t\t\tpstmt.setInt(3, od.getQuantity());\r\n\t\t\t\r\n\t\t\tpstmt.addBatch();\r\n\t\t}\r\n\t\tpstmt.executeBatch();\r\n\t}",
"public void insert() throws SQLException;",
"public static void Attributeinsert (int id,String FQN,String name, String container,String duribility,String type,String value,String mutability,String table )\n { \n \n \ttry \n { \n Statement stmt=null; \n ResultSet res=null; \n Class.forName(\"com.mysql.jdbc.Driver\"); \n Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n stmt = (Statement)conn.createStatement(); \n res= stmt.executeQuery(\"SELECT * from attribute \"); \n\n\n // 增加数据\n Statement stm = (Statement) conn.createStatement();// 提交查巡\n String sql = \"select * from attribute\";\n ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n// sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n \n int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,duribility,type,value,mutability) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"\n +\",\"+\"'\"+duribility+\"'\"+\",\"+\"'\"+type+\"'\"+\",\"+\"'\"+value+\"'\"+\",\"+\"'\"+mutability+\"'\"+\")\"); // 增加数据 \n if (n > 0) {\n// JOptionPane.showMessageDialog(null, \"成功\");\n \n \n } else {\n// JOptionPane.showMessageDialog(null, \"失败\");\n }\n //增加数据结束\n\n while (res.next()) \n { \n \n } \n } \n \n catch(Exception ex) \n { \n ex.printStackTrace(); \n } \n}",
"private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }",
"public boolean insertarNuevoClienteCA(Cliente cliente, List<Cuenta> listaCuentas) {\n String queryDividido1 = \"INSERT INTO Usuario(Codigo, Nombre, DPI, Direccion, Sexo, Password, Tipo_Usuario) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?)\";\n\n String queryDividido2 = \"INSERT INTO Cliente(Usuario_Codigo, Nombre, Nacimiento, DPI_Escaneado, Estado) \"\n + \"VALUES(?,?,?,?,?)\";\n \n String queryDividido3 = \"INSERT INTO Cuenta(No_Cuenta, Fecha_Creacion, Saldo_Cuenta, Cliente_Usuario_Codigo) \"\n + \"VALUES(?,?,?,?)\";\n int codigoCliente = cliente.getCodigo();\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos Principales del cliente a la Tabla Usuario\n enviarDividido1.setInt(1, cliente.getCodigo());\n enviarDividido1.setString(2, cliente.getNombre());\n enviarDividido1.setString(3, cliente.getDPI());\n enviarDividido1.setString(4, cliente.getDireccion());\n enviarDividido1.setString(5, cliente.getSexo());\n enviarDividido1.setString(6, cliente.getPassword());\n enviarDividido1.setInt(7, 3);\n enviarDividido1.executeUpdate();\n\n //Envia los Datos Complementarios del Usuario a la tabla cliente\n PreparedStatement enviarDividido2 = Conexion.conexion.prepareStatement(queryDividido2);\n enviarDividido2.setInt(1, cliente.getCodigo());\n enviarDividido2.setString(2, cliente.getNombre());\n enviarDividido2.setString(3, cliente.getNacimiento());\n enviarDividido2.setBlob(4, cliente.getDPIEscaneado());\n enviarDividido2.setBoolean(5, cliente.isEstado());\n enviarDividido2.executeUpdate();\n \n //Envia los Datos de la Cuenta Adjudicada al Cliente\n PreparedStatement enviarDividido3 = Conexion.conexion.prepareStatement(queryDividido3);\n\n //Envio de los Datos Principales de una Cuenta a la Tabla Cuenta, perteneciente a un cliente en Especifico\n //Considerando que el cliente puede tener mas de una cuenta\n for (Cuenta cuenta : listaCuentas) {\n \n enviarDividido3.setInt(1, cuenta.getNoCuenta());\n enviarDividido3.setString(2, cuenta.getFechaCreacion());\n enviarDividido3.setDouble(3, cuenta.getSaldo());\n enviarDividido3.setInt(4, codigoCliente);\n enviarDividido3.executeUpdate();\n }\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }",
"protected abstract void prepareStatementForInsert(PreparedStatement statement, T object)\n throws PersistException;",
"public static void main(String[] args) {\n\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"please enter id\");\r\n\t\tint id=sc.nextInt();\r\n\t\tSystem.out.println(\"enter name\");\r\n\t\tString name=sc.next();\r\n\t\t//System.out.println(\"enter contact\");//\r\n\t\t//String contact=sc.next();//\r\n\t\tSystem.out.println(\"enter address\");\r\n\t\tString address=sc.next();\r\n\t\tSystem.out.println(\"enter city\");\r\n\t\tString city=sc.next();\r\n\t\t\r\n\t\t\r\n\t\ttry{\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\r\n\t\t\r\n\t\ttry{\r\n\t\t\tConnection con=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/abhi\",\"root\",\"root\");\r\n\t//PreparedStatement p=con.prepareStatement(\"create table cusbio(id int,name varchar(20),contact varchar(10),address varchar(20),city varchar(10))\");//\t\r\n\t/*PreparedStatement pd=con.prepareStatement(\"insert into cusbio (id,name,contact,address,city) values(?,?,?,?,?)\");\r\n\tpd.setInt(1,1);\r\n\tpd.setString(2, \"Alfreds F\");\r\n\tpd.setString(3, \"Maria \");\r\n\tpd.setString(4, \"Obere Str. 57\");\r\n pd.setString(5,\"Berlin\");\r\n\tpd.executeUpdate();\t\r\n\tpd.close();*/\r\n\t/*\r\n\t\r\n\tPreparedStatement pd1=con.prepareStatement(\"insert into cusbio (id,name,contact,address,city) values(?,?,?,?,?)\");\r\n\tpd1.setInt(1,2);\r\n\tpd1.setString(2, \"Ana Trujillo \");\r\n\tpd1.setString(3, \"Trujillo\");\r\n\tpd1.setString(4, \"Avda. de la 2222\");\r\n pd1.setString(5,\"Mexico\");\r\n\tpd1.executeUpdate();\t\r\n\tpd1.close();\r\n\t\r\n\t\r\n\tPreparedStatement pd2=con.prepareStatement(\"insert into cusbio (id,name,contact,address,city) values(?,?,?,?,?)\");\r\n\tpd2.setInt(1,3);\r\n\tpd2.setString(2, \"Moreno Taquería \");\r\n\tpd2.setString(3, \"Moreno\");\r\n\tpd2.setString(4, \"Mataderos 2312\");\r\n pd2.setString(5,\"Mexico\");\r\n\tpd2.executeUpdate();\t\r\n\tpd2.close();\r\n\t\r\n\t\r\n\tPreparedStatement pd3=con.prepareStatement(\"insert into cusbio (id,name,contact,address,city) values(?,?,?,?,?)\");\r\n\tpd3.setInt(1,4);\r\n\tpd3.setString(2, \"Around the Horn \");\r\n\tpd3.setString(3, \"Thomas\");\r\n\tpd3.setString(4, \"120 Hanover Sq.\");\r\n pd3.setString(5,\"London\");\r\n\tpd3.executeUpdate();\t\r\n\tpd3.close();\r\n\t*/\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t/*\tPreparedStatement pd4=con.prepareStatement(\"update cusbio set name=? where id=?\");\r\n\tpd4.setString(1,\"Around the house \");\r\npd4.setInt(2,4);\t\t\t\r\n\tpd4.executeUpdate();*/\r\n\t\r\n\t\t\tPreparedStatement pd5=con.prepareStatement(\"update cusbio set name=?,address=?,city=? where id=?\");\r\n\t\t\tpd5.setString(1,name);\r\n\t\t\tpd5.setString(2,address);\r\n\t\t\tpd5.setString(3,city);\r\n\t\t\tpd5.setInt(4,id);\r\n\t\t\tpd5.executeUpdate();\r\n\t\t\tcon.close();\r\n\t\r\n\t\t\r\n\t\t\r\n\t}catch(SQLException e){\r\n\t\te.printStackTrace();\r\n\t}\r\n\t\r\n\t}catch(ClassNotFoundException e){\r\n\te.printStackTrace();\r\n}\r\n\t}",
"int insert(Assist_table record);",
"public void createAll() {\n SQLFormater SQLFormaterMoods = new SQLFormater(MOODS_TABLE_NAME, ID_FIELD); // objects help to form sql strings for creating tables\n SQLFormater SQLFormaterAnswers = new SQLFormater(ANSWERS_TABLE_NAME, ID_FIELD);\n\n String[] answersTableFields = {ANSWERS_FIELD, ID_MOODS_FIELD}; // ordered fields\n String[] moodsTableFields = {MOODS_FIELD, HI_FIELD, BYBY_FIELD};\n\n SQLFormaterMoods.setNewField(MOODS_FIELD, STRING_TYPE, \"NOT NULL\"); // creating tables\n SQLFormaterMoods.setNewField(HI_FIELD, STRING_TYPE, null);\n SQLFormaterMoods.setNewField(BYBY_FIELD, STRING_TYPE, null);\n dbConnection.execute(SQLFormaterMoods.getStringToCreateDB(null));\n\n SQLFormaterAnswers.setNewField(ANSWERS_FIELD, STRING_TYPE, \"NOT NULL\");\n SQLFormaterAnswers.setNewField(ID_MOODS_FIELD, INTEGER_TYPE, null);\n String reference = \"FOREIGN KEY (\" + ID_MOODS_FIELD + \")\" +\n \" REFERENCES \" + MOODS_TABLE_NAME +\n \"(\" + ID_FIELD + \")\";\n dbConnection.execute(SQLFormaterAnswers.getStringToCreateDB(reference)); // create table with reference\n\n insertTableValues(SQLFormaterMoods, moodsTableFields, getMoodsTableValues()); // inserting ordered values into tables\n insertTableValues(SQLFormaterAnswers, answersTableFields, getAnswersTableValues());\n }",
"int insertBatch(List<Basicinfo> list);",
"@Override\n\tpublic void insert(Categoria cat) throws SQLException {\n\t\t\n\t}",
"@Override\n public void save(String[] params) throws SQLException {\n String query = \"INSERT INTO coach(user_name,team,pageID,training,job,name)\" + \"values(?,?,?,?,?,?);\";\n Connection conn = dBconnector.getConnection();\n if (conn != null) {\n PreparedStatement stmt = null;\n try {\n conn.setCatalog(\"manageteams\");\n stmt = conn.prepareStatement(query);\n stmt.setString(1, params[0]);\n stmt.setString(2, params[1]);\n stmt.setInt(3, Integer.valueOf(params[2]));\n stmt.setString(4, params[3]);\n stmt.setString(5, params[4]);\n stmt.setString(6, params[5]);\n stmt.execute();\n stmt.close();\n conn.close();\n logger.info(\"coach \" + params[0] + \"successfuly saved\");\n }\n catch (SQLException e)\n {\n logger.error(e.getMessage());\n throw new SQLException(DaoSql.getException(e.getMessage()));\n }\n }\n }",
"public void processInsertar() {\n }",
"void insertSelective(CTipoPersona record) throws SQLException;",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }",
"public void testInsert() throws Exception {\n\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n\n // Verify insert\n // Verify\n Command select = das.createCommand(\"Select ID, NAME from COMPANY\");\n DataObject root = select.executeQuery();\n\n assertEquals(4, root.getList(\"COMPANY\").size());\n assertTrue(root.getInt(\"COMPANY[1]/ID\") > 0);\n\n }",
"private void insertData() {\n\n for (int i = 0; i < 3; i++) {\n ProveedorEntity proveedor = factory.manufacturePojo(ProveedorEntity.class);\n BonoEntity entity = factory.manufacturePojo(BonoEntity.class);\n int noOfDays = 8;\n Date dateOfOrder = new Date();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n Date date = calendar.getTime();\n entity.setExpira(date);\n noOfDays = 1;\n calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n date = calendar.getTime();\n entity.setAplicaDesde(date);\n entity.setProveedor(proveedor);\n em.persist(entity);\n ArrayList lista=new ArrayList<>();\n lista.add(entity);\n proveedor.setBonos(lista);\n em.persist(proveedor);\n pData.add(proveedor);\n data.add(entity); \n }\n }",
"public static void insertTreatment(String trtName,int cost,String date,String start,String partner){\r\n\t\ttry{\r\n\t\t\t// this is how you connect\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"INSERT INTO Treatment VALUES(?,?,?,?,?);\");\r\n\t\t\tstmt.setString(1, trtName);\r\n\t\t\tstmt.setString(2, String.valueOf(cost));\r\n\t\t\tstmt.setString(3, date);\r\n\t\t\tstmt.setString(4, start);\r\n\t\t\tstmt.setString(5, partner);\r\n\t\t\tstmt.executeUpdate();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"void insertBatch(List<TABLE41> recordLst);",
"public static void main(String[] args) throws SQLException {\n\t\tConnection myConn = getConnection();\n\t\tStatement stmt = myConn.createStatement();\n\t\t//String insertQuery = \"INSERT INTO EmployeeDetails VALUES ('6666','Bruce',24,'SE')\";\n\t\tString insertQuery = \"INSERT INTO EmployeeDetails VALUES(\"+\n\t\t\t\t \"'\"+\"6666\"+\"',\"+\n\t\t\t\t \"'\"+\"BOSS\"+\"',\"+\n\t\t\t\t \t 24+\",\"+\n\t\t\t\t \"'\"+\"SE\"+\"')\";\n\t\t\n\t\tstmt.executeUpdate(insertQuery);\n\n\t\tSystem.out.println(\"Data insersted\");\n\t\t\n\t}",
"void insertSelective(Providers record);",
"int insert(CityDO record);",
"public void create(Personne pers) {\n\t\ttry{\n\t\t\tString req = \"INSERT INTO PERSONNE_1 (ID, Nom ,Prenom)\" + \"VALUES(?,?,?)\";\n\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\tps.setInt(1,ID);\n\t\t\tps.setString(2,pers.getNom());\n\t\t\tps.setString(3,pers.getPrenom());\n\t\t\tps.executeUpdate();\n\t\t\tID++;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void insert(CTipoComprobante record) throws SQLException;",
"public static void insertData(UserDetail detail, Connection con) {\n\tString city=\"\";\n\tString[] cities=detail.getCities();\n\tif(cities!=null) {\n\tfor(int i=0;i<cities.length;i++) {\n\t\tcity=city+\",\"+cities[i];\n\t\n\t}\n}\n\t\n\tString sql= \"inser into db26.UserDetail values(?,?,?)\";\n\t\n\ttry {\n\t\tPreparedStatement p= con.prepareStatement(sql);\n\t\tp.setString(1, detail.getName());\n\t\tp.setString(2, detail.getGender());\n\t\tp.setString(3, city);\n\t\tp.executeUpdate();\n\t\tp.close();\n\t}catch(SQLException e) {\n\t\te.printStackTrace();\n\t}\n\t\n\t\t\n\t\t\n\t}",
"public static void insertSingly(List<AuxiliaryTestOutcome> auxOutcomeList, Connection conn)\n throws SQLException\n {\n for (AuxiliaryTestOutcome auxOutcome : auxOutcomeList) {\n try {\n auxOutcome.insert(conn);\n } catch (SQLException ignore) {\n // ignore\n }\n }\n \n }",
"int insert(TblMotherSon record);",
"public static int insertAll(Connection connection, List<CLRequestHistory> cls) {\n PreparedStatement statement = null;\n\n try {\n // commit at once.\n final boolean ac = connection.getAutoCommit();\n connection.setAutoCommit(false);\n\n // execute statement one by one\n int numUpdate = 0;\n statement = connection.prepareStatement(INSERT);\n for (CLRequestHistory cl : cls) {\n statement.setInt(1, cl.mCL);\n statement.setInt(2, cl.mState);\n numUpdate += statement.executeUpdate();\n }\n\n // commit all changes above\n connection.commit();\n\n // restore previous AutoCommit setting\n connection.setAutoCommit(ac);\n\n // Close Statement to release all resources\n statement.close();\n return numUpdate;\n } catch (SQLException e) {\n Utils.say(\"Not able to insert for CLs : \" + cls.size());\n } finally {\n try {\n if (statement != null)\n statement.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return 0;\n }",
"private String createInsertQuery()\n {\n int i = 0;\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \");\n sb.append(type.getSimpleName());\n sb.append(\" (\");\n for(Field field:type.getDeclaredFields()) {i++; if(i != type.getDeclaredFields().length)sb.append(field.getName() +\", \"); else sb.append(field.getName());}\n sb.append(\")\");\n sb.append(\" VALUES (\");\n i = 0;\n for(Field field:type.getDeclaredFields()) {i++; if(i!= type.getDeclaredFields().length)sb.append(\"?, \"); else sb.append(\"?\");}\n sb.append(\");\");\n return sb.toString();\n }",
"public static void insertActividad(Actividad actividad) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n int diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin;\n int[] fechaInicio = getFechaInt(actividad.getFechaInicio());\n diaInicio = fechaInicio[0];\n mesInicio = fechaInicio[1];\n anoInicio = fechaInicio[2];\n int[] fechaFin = getFechaInt(actividad.getFechaFin());\n diaFin = fechaFin[0];\n mesFin = fechaFin[1];\n anoFin = fechaFin[2];\n String query = \"INSERT INTO Actividades (login, descripcion, rol, duracionEstimada, diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin, duracionReal, estado, idFase) VALUES ('\"\n + actividad.getLogin() + \"','\"\n + actividad.getDescripcion() + \"','\"\n + actividad.getRolNecesario() + \"',\"\n + actividad.getDuracionEstimada() + \",\"\n + diaInicio + \",\"\n + mesInicio + \",\"\n + anoInicio + \",\"\n + diaFin + \",\"\n + mesFin + \",\"\n + anoFin + \",\"\n + actividad.getDuracionReal() + \",'\"\n + actividad.getEstado() + \"',\"\n + actividad.getIdFase() + \")\";\n try {\n ps = connection.prepareStatement(query);\n ps.executeUpdate();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"int insertSelective(Tourst record);",
"public void addtoDB(String plate,String date,double km,ObservableList<Service> serv){\n \n plate = convertToDBForm(plate);\n \n try {\n stmt = conn.createStatement();\n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n if(!checkTableExists(plate)){ \n try {\n stmt.execute(\"CREATE TABLE \" + plate + \"(DATA VARCHAR(12),QNT DOUBLE,DESC VARCHAR(50),PRICE DOUBLE,KM DOUBLE);\");\n }catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n \n for(int i=0;i<serv.size();i++){\n \n double qnt = serv.get(i).getQnt();\n String desc = serv.get(i).getDesc();\n double price = serv.get(i).getPrice();\n \n try {\n stmt.executeUpdate(\"INSERT INTO \" + plate + \" VALUES('\" + date + \"',\" + Double.toString(qnt) + \",'\" + desc + \"',\" + Double.toString(price) + \",\" + Double.toString(km) + \");\");\n }catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n \n try {\n stmt.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n\n }",
"public int[] batchInsert(DalHints hints, List<Person> daoPojos) throws SQLException {\n\t\tif(null == daoPojos || daoPojos.size() <= 0)\n\t\t\treturn new int[0];\n\t\thints = DalHints.createIfAbsent(hints);\n\t\treturn client.batchInsert(hints, daoPojos);\n\t}",
"int insertSelective(GoodsPo record);",
"void insert(CTipoPersona record) throws SQLException;"
] | [
"0.63936657",
"0.6237307",
"0.6204289",
"0.61939675",
"0.61651635",
"0.6045778",
"0.60406345",
"0.60139024",
"0.59982926",
"0.5960285",
"0.5959605",
"0.59392685",
"0.5939246",
"0.593446",
"0.59234166",
"0.5921692",
"0.5911409",
"0.58744514",
"0.5844942",
"0.58441424",
"0.5837154",
"0.58332974",
"0.5795846",
"0.57483894",
"0.5745066",
"0.5741888",
"0.57244796",
"0.57171",
"0.57135856",
"0.5697457",
"0.5694685",
"0.5692469",
"0.56918335",
"0.56891334",
"0.56855035",
"0.5685121",
"0.56850004",
"0.5680499",
"0.56713927",
"0.5665535",
"0.5663264",
"0.56576747",
"0.56549245",
"0.5654689",
"0.5654001",
"0.5653029",
"0.56529826",
"0.5632138",
"0.56254995",
"0.5624608",
"0.562376",
"0.5619281",
"0.5615193",
"0.56088984",
"0.5603767",
"0.56004554",
"0.5599554",
"0.55945385",
"0.5592724",
"0.5584662",
"0.55834544",
"0.55781144",
"0.5578015",
"0.5576566",
"0.5569925",
"0.5554773",
"0.55540377",
"0.5550309",
"0.554766",
"0.554652",
"0.5545569",
"0.55407894",
"0.5535232",
"0.55324787",
"0.5526898",
"0.5526778",
"0.5526097",
"0.5520108",
"0.55150616",
"0.55136853",
"0.5499954",
"0.5499744",
"0.5490699",
"0.5489317",
"0.548356",
"0.54805326",
"0.5476264",
"0.54755324",
"0.5463818",
"0.5459311",
"0.5453851",
"0.5453225",
"0.54476464",
"0.544092",
"0.5430704",
"0.54303557",
"0.5429718",
"0.54272544",
"0.5423576",
"0.54138833"
] | 0.6845483 | 0 |
Get or insert on specialty term | public int getOrInsertSpecialty(String specialty); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSpecialty() {\r\n\t\treturn specialty;\r\n\t}",
"public String getTerm(){\n return this.term;\n }",
"public String getTerm() {\n return term;\n }",
"public String getSpeciality() {\n return this.speciality;\n }",
"Term getTerm();",
"public Expression getTerm() {\n return term;\n }",
"public String getTermText() {\n return termText;\n }",
"public String getTerm() {\r\n return (String) getAttributeInternal(TERM);\r\n }",
"public Concept getConcept(Term term) {\r\n String n = term.getName();\r\n Concept concept = concepts.get(n);\r\n if (concept == null)\r\n concept = new Concept(term, this); // the only place to make a new Concept\r\n return concept;\r\n }",
"public void setTerm(Expression term) {\n this.term = term;\n }",
"public int getTermIndex() {return termIndex;}",
"TermType getTermType();",
"SingleTerm(Term t)\n {\n term = t;\n }",
"public SpecialKey getSpecialType()\n {\n return mySpecialType;\n }",
"public List<Doctor> acceptingNewPatients(String specialty);",
"public Rule termBase()\n \t{\n \t\treturn firstOf(idExprReq(), litteral(), typeBase(), id());\n \t}",
"GeneralTerm createGeneralTerm();",
"public Term nameToListedTerm(String name) {\r\n Concept concept = concepts.get(name);\r\n if (concept != null)\r\n return concept.getTerm(); // Concept associated Term\r\n return operators.get(name);\r\n }",
"String legalTerms();",
"public Optional<String> getSpecial()\n {\n return m_special;\n }",
"@Override\r\n\t\t\tpublic boolean containsTerm(Document document, String term) {\n\t\t\t\treturn false;\r\n\t\t\t}",
"public void addTerm(Term newTerm)\r\n\t{\r\n\t\tArrayList<Term> terms = new ArrayList<Term>(Arrays.asList(this.terms));\r\n\t\tif(!terms.contains(newTerm))\r\n\t\t{\r\n\t\t\tterms.add(newTerm);\r\n\t\t\tthis.terms = terms.toArray(new Term[0]);\r\n\t\t}\r\n\t}",
"QuoteTermAttribute createQuoteTermAttribute();",
"QuoteTerm createQuoteTerm();",
"public String getAuthorPseudonym() {\r\n return author.getPseudonym();\r\n }",
"@Override\n public String getTermByIndex(int index) {\n return null;\n }",
"public void referToSpecialist(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"public TermCriteria get_term_crit()\n {\n \n TermCriteria retVal = new TermCriteria(get_term_crit_0(nativeObj));\n \n return retVal;\n }",
"public String getTermweig() {\r\n return (String) getAttributeInternal(TERMWEIG);\r\n }",
"public java.lang.Integer getTerm() {\n return term;\n }",
"public void addTerm(Term term) throws PreExistingTermException {\n ArrayList<String> temp = new ArrayList<>();\n\n for (Term t: listOfTerms) {\n String termName = t.getTermName();\n temp.add(termName);\n }\n\n String newTermName = term.getTermName();\n\n if (!temp.contains(newTermName)) {\n this.listOfTerms.add(term);\n } else {\n throw new PreExistingTermException();\n }\n }",
"public String getTermCode() {\n return termCode;\n }",
"public String getTermcat() {\r\n return (String) getAttributeInternal(TERMCAT);\r\n }",
"public final XmlSpecialForm specialForm ()\r\n {\r\n return _value.specialForm();\r\n }",
"String getAuthor();",
"String getAuthor();",
"void AddTerm(String name, byte arity){\n\t\tglterm[gltermcard].arity = arity;\n\t\tglterm[gltermcard].name = name;\n\t\tgltermcard++;\n\t\tif(arity == 0) {//terminal\n\t\t\tglterminal[gltcard].arity = arity;\n\t\t\tglterminal[gltcard].name = name;\n\t\t\tgltcard++;\n\t\t} else {// function\n\t\t\tglfunction[glfcard].arity = arity;\n\t\t\tglfunction[glfcard].name = name;\n\t\t\tglfcard++;\n\t\t}\n\t}",
"public SuggestedTerm(String term, int editDistance){\n this.term = term;\n this.editDistance = editDistance;\n }",
"String getConcept();",
"public void getWord() {\n\t\t\n\t}",
"@Override\n protected void register(ExtensionContext ctxt) {\n ctxt.appendModifier(prim);\n ctxt.appendModifier(sec);\n }",
"public java.lang.Integer getTerm() {\n return term;\n }",
"private String getTerm(ITermbase p_tb, long p_entryId) throws Exception\n {\n String entryXml = p_tb.getEntry(p_entryId);\n XmlParser parser = XmlParser.hire();\n Document dom = parser.parseXml(entryXml);\n Element root = dom.getRootElement();\n List langGrps = root\n .selectNodes(\"/conceptGrp/languageGrp/termGrp/term\");\n Element firstTerm = (Element) langGrps.get(0);\n String termText = firstTerm.getText();\n XmlParser.fire(parser);\n return termText;\n }",
"public String getTerms_Modifier_Check() {\n return (String) getAttributeInternal(TERMS_MODIFIER_CHECK);\n }",
"public List<BasicString> getTermsAlternative() {\n return termsAlternative;\n }",
"String getAuthorName();",
"public java.lang.String getRndSpecialInstituteName() {\n return rndSpecialInstituteName;\n }",
"@Override\n public boolean addTerm(String term) {\n boolean isAddTerm=false;\n try{\n connection = connexion.getConnection();\n PreparedStatement sentenceTerm = connection.prepareStatement(\"INSERT INTO Term (term) VALUES (?)\");\n sentenceTerm.setString(1, term);\n sentenceTerm.executeUpdate();\n isAddTerm=true;\n }catch(SQLException exception){\n new Exception().log(exception);\n TelegramBot.sendToTelegram(exception.getMessage());\n }finally{\n connexion.closeConnection();\n }\n return isAddTerm;\n }",
"public TreeItem(Symbol term) {\n\t\tsuper(term);\n\t\tdecideNorm = true;\n\t\tisNorm = true;\n\t}",
"public abstract Set<String> getTerms(Document doc);",
"public void getTerm()\n\t\t{\n\t\t\t//Open SciencePhrases.txt\n\t\t\tFile f1 = new File(\"SciencePhrases.txt\");\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tspIn = new Scanner(f1);\n\t\t\t}\n\t\t\tcatch(FileNotFoundException e)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Cannot create SciencePhrases.txt to be written \"\n\t\t\t\t\t\t+ \"to.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\t//Storing term at curTerm in the variables term and picTerm\n\t\t\tString cur = new String(\"\");\n\t\t\tfor(int i = 0; i<curTerm; i++)\n\t\t\t{\n\t\t\t\tterm = \"\";\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tpicTerm = cur;\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t{\n\t\t\t\t\tterm += cur;\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\t}\n\t\t\t}\t\n\t\t}",
"public boolean getSpecial() {\n return isSpecial;\n }",
"public String getAuthor();",
"protected Float additionalTransformation(String term, Float value){\n\t\tif(!ENABLE_ADD_NORMALIZATION) return value;\n\t\t\n\t\tFloat result = value;\n\t\t//result *= this.weightTermUniqeness(term); \n\t\tresult = this.sigmoidSmoothing(result);\n\t\t\n\t\treturn result;\n\t}",
"public AcademicTerm(int termIndex, Term term) {\n this.termIndex = termIndex;\n this.term = term;\n }",
"public abstract String getAuthor();",
"default String getAuthor() {\r\n\t\treturn \"unknown\";\r\n\t}",
"public T caseTerm(Term object)\n {\n return null;\n }",
"public void insertTerm(Term term) {\n ProgressTrackerDatabase.databaseWriteExecutor.execute(() -> {\n mTermDao.insert(term);\n });\n }",
"private LiteralAnnotationTerm appendLiteralArgument(Node bme, Tree.Term literal) {\n if (spread) {\n bme.addError(\"Spread static arguments not supported\");\n }\n LiteralAnnotationTerm argument = new LiteralAnnotationTerm();\n argument.setTerm(literal);\n this.term = argument;\n return argument;\n }",
"String getPersonality();",
"public TreeItem(Symbol term, double w) {\n\t\tsuper(term, w);\n\t\tdecideNorm = true;\n\t\tisNorm = true;\n\t}",
"@Override\n public void handleSpecialChar(\n com.globalsight.ling.docproc.extractor.html.HtmlObjects.Text t)\n {\n\n }",
"@Override\r\n\t\t\tpublic String[] getTerms(Document doc) {\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getRegBasedAuthority() {\n return m_regAuthority;\n }",
"@Override\n public int getIndexByTerm(String term) {\n return 0;\n }",
"public Concept termToConcept(Term term) {\r\n return nameToConcept(term.getName());\r\n }",
"ReagentSynonym getSearchedReagentSynonym();",
"public StreamTerm term() {\n return term;\n }",
"SettlementTerm getSettlementTerm();",
"public Optional<Term> getMatchingTerm(Term nextTerm) {\n\t\treturn Optional.ofNullable(terms.get(nextTerm.tag));\n\t}",
"Term getBody();",
"public void addEntityTf(int docID , int termID , int tf){\n this.docToEntities.get(docID).add(new Pair(termID,tf));\n }",
"public String getAuthor(){return author;}",
"java.lang.String getWord();",
"public org.apache.xmlbeans.XmlAnySimpleType addNewSearchTerms()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlAnySimpleType target = null;\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().add_attribute_user(SEARCHTERMS$6);\n return target;\n }\n }",
"public Term[] getTerms() { return terms; }",
"public void addResponseToResult(String term){\n\t\tResult result = this.getResult();\n\t\tif(result==null){\n\t\t\tresult = new Result();\n\t\t\tresult.setResponse(term);\n\t\t\tthis.setResult(result);\n\t\t}\n\t\telse{\n\t\t\tString s = result.getResponse();\n\t\t\ts += \",\" + term;\n\t\t\tresult.setResponse(s);\n\t\t}\t\n\t}",
"public String getDenotation(){\n return this.denotation;\n }",
"private boolean searchOntology(String term) {\n boolean found;\n if (ontologyOwlClassVocabulary.containsKey(term)\n || ontologyOWLDataPropertyVocabulary.containsKey(term)\n || ontologyOWLNamedIndividualVocabulary.containsKey(term)\n || ontologyOWLObjectPropertylVocabulary.containsKey(term)) {\n found = true;\n } else {\n found = false;\n }\n return found;\n }",
"public String getUtterance();",
"String getKeyword();",
"public Literal getLiteral();",
"public Literal getLiteral();",
"@Id\n @Column(name=\"term_key\")\n public int getTermKey() {\n\treturn termKey;\n }",
"public String getAutor(){\n return autorsText;\n }",
"String getGlJournalName();",
"public String getTaxcopy() {\r\n return taxcopy;\r\n }",
"public String getTaxcopy() {\r\n\t\treturn taxcopy;\r\n\t}",
"User setUserSpeciality(User user,Long specialityId,HashMap<String,String> parameters) throws LogicException;",
"public boolean isSpecial()\r\n\t{\r\n\t\t\r\n\t\treturn special;\r\n\t}",
"public String getAuthor(){\n return author;\n \n }",
"public String getResearchteachername() {\r\n\t\treturn researchteachername;\r\n\t}",
"@Override\r\n\tprotected void getIntentWord() {\n\t\tsuper.getIntentWord();\r\n\t}",
"public String getAuthorisor()\n\t{\n\t\treturn authorisor;\n\t}",
"@Override\n public String getWord(){\n return word;\n }",
"Astro namedTerm(String tagName, AstroArg args);",
"public PlotSpecialism getSpecialism(){\r\n\t\treturn specialism;\r\n\t}",
"public String getAcronym();",
"public static String getTermFromDsDwcaJson(DigitalObject ds , Term term){\n String value=null;\n JsonObject dwcaContent = ds.attributes.getAsJsonObject(\"content\").getAsJsonObject(\"dwcaContent\");\n if (dwcaContent.getAsJsonObject(\"core\").getAsJsonObject(\"content\").has(term.prefixedName())){\n value = dwcaContent.getAsJsonObject(\"core\").getAsJsonObject(\"content\").get(term.prefixedName()).getAsString();\n }\n\n if (StringUtils.isBlank(value) && dwcaContent.has(\"extensions\")){\n //Look in the extension files\n JsonArray extensions = dwcaContent.getAsJsonArray(\"extensions\");\n for (JsonElement extension: extensions) {\n if (extension.getAsJsonObject().has(\"content\")){\n JsonArray extensionRecords = extension.getAsJsonObject().getAsJsonArray(\"content\");\n for (JsonElement extensionRecord:extensionRecords) {\n if (extensionRecord.getAsJsonObject().has(term.prefixedName())){\n value = extensionRecord.getAsJsonObject().get(term.prefixedName()).getAsString();\n if (StringUtils.isNotBlank(value)) break;\n }\n }\n if (StringUtils.isNotBlank(value)) break;\n }\n }\n }\n return value;\n }"
] | [
"0.656113",
"0.60758215",
"0.5817956",
"0.5733004",
"0.53925717",
"0.53815633",
"0.5254206",
"0.52165467",
"0.5203848",
"0.5194837",
"0.51529324",
"0.51493514",
"0.51408464",
"0.5122484",
"0.5112357",
"0.5089048",
"0.5068993",
"0.5036579",
"0.5034051",
"0.50214237",
"0.50195175",
"0.49990734",
"0.4997753",
"0.48812243",
"0.48654982",
"0.48385322",
"0.48380932",
"0.48357087",
"0.4824399",
"0.4790111",
"0.47896105",
"0.47875252",
"0.47674045",
"0.47609934",
"0.4750433",
"0.4750433",
"0.47457537",
"0.47392565",
"0.47146943",
"0.47134048",
"0.47113672",
"0.4706699",
"0.47066864",
"0.4702704",
"0.4698475",
"0.46909547",
"0.46603346",
"0.4646781",
"0.46444815",
"0.464325",
"0.46400937",
"0.46321777",
"0.4628063",
"0.46226892",
"0.46212354",
"0.46153435",
"0.45998147",
"0.45942664",
"0.45922217",
"0.45874703",
"0.45855075",
"0.45791712",
"0.45767626",
"0.45694593",
"0.45678565",
"0.45551",
"0.45509407",
"0.45476198",
"0.45471743",
"0.4530059",
"0.4527399",
"0.45253783",
"0.45221177",
"0.4516794",
"0.4514967",
"0.44952342",
"0.4494263",
"0.4479687",
"0.44795448",
"0.44761932",
"0.44734403",
"0.4472746",
"0.44703978",
"0.44703978",
"0.44653854",
"0.44569415",
"0.4455673",
"0.44500008",
"0.4449444",
"0.44483268",
"0.44468775",
"0.44416946",
"0.4440609",
"0.44399938",
"0.4436974",
"0.44362554",
"0.44236016",
"0.4421907",
"0.442144",
"0.4415243"
] | 0.6600441 | 0 |
Find doctors accepting new patients for a given patient | public List<Doctor> acceptingNewPatients(String specialty); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Patient (String patientID) {\n this.patientID = patientID;\n this.associatedDoctor = new ArrayList<>();\n }",
"@GET(DOCTOR_PATIENTS_PATH)\n\tCollection<Patient> getPatients(\n\t\t\t@Path(DOCTOR_ID_PARAM) long doctorId);",
"@Override\n @Transactional\n public List<Patient> selectPatientsByAttendingDoctor(String doctorFullname) {\n return patientDAO.getByAttendingDoctor(doctorFullname);\n }",
"public void careForPatient(Patient patient);",
"public abstract List<ClinicalDocumentDto> findClinicalDocumentDtoByPatientId(Long patientId);",
"@Override\n public Set PatientsWithCaughingAndFever() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>coughingAndFever = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getPatientMedicalRecord().getSymptoms().equals(\"Coughing\") || patient.getPatientMedicalRecord().getSymptoms().equals(\"Fever\")){\n coughingAndFever.add(patient);\n }else {\n System.out.println(\"No older patients with symptoms such as caughing and fever\");\n }\n });\n }\n\n return coughingAndFever;\n }",
"List<Patient> findPatients(Employee nurse_id);",
"public void addPatient()\n {\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Enter name of patient\");\n String name=sc.nextLine();\n int pos,id;\n\n do\n {\n System.out.println(\"Enter doctor id to assign to\");\n id=sc.nextInt();\n pos=checkDoctor(id);\n if(pos==-1)\n System.out.println(\"Invalid doctor id\");\n }\n while(pos==-1);\n String docname=doc.get(pos).getName();\n Patient p=new Patient(name,id,docname);\n pt.add(p);\n\n }",
"public abstract List<ClinicalDocument> findByPatientId(long patientId);",
"@Override\n public PatientCaseDto getByDoctorPatient(Long patientId, Long doctorId) {\n return null;\n }",
"List<Patient> findAllPatients();",
"@CrossOrigin(origins = \"http//localhost:4200\")\n\t@RequestMapping(value = \"/api/availableDoctors\", method = RequestMethod.POST)\n\tpublic List<Doctor> getAvailableDoctors(@RequestBody SurgeryDTO surgeryDTO) throws ParseException {\n\t\tSurgery surgery = ss.findById(surgeryDTO.getId());\n\t\tList<Doctor> doctors = this.ds.findByClinicId(surgery.getClinic().getId());\n\t\tList<Doctor> availableDoctors = new ArrayList<>();\n\t\tfor (Doctor doctor : doctors) {\n\t\t\tboolean available = true;\n\t\t\tfor (Surgery s : doctor.getSurgeries()) {\n\t\t\t\tif (surgeryDTO.getDate().equals(s.getDate())) {\n\t\t\t\t\tavailable = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Appointment appointment : doctor.getAppointments()) {\n\t\t\t\tif (available == true) {\n\t\t\t\t\tif (surgeryDTO.getDate().equals(appointment.getDate())) {\n\t\t\t\t\t\tavailable = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (available)\n\t\t\t\tavailableDoctors.add(doctor);\n\t\t}\n\t\treturn availableDoctors;\n\t}",
"@Override\n public List<PatientCaseDto> getAllByPatient(Long patientId) {\n return null;\n }",
"public ArrayList<MedicalRecord> getPatientRecords(String patient) {\n if (database.containsKey(patient)) {\n return database.get(patient);\n } else {\n System.out.println(\"No such patient found\");\n return null;\n }\n }",
"public boolean addPaient(Patient patient) throws TooManyExceptions;",
"public List<Patient> readParticularDoctorPatients(Doctor doctor) throws SystemException, BusinessException {\n\t\tList<Patient> patients = new ArrayList<>();\n\t\ttry {\n\n\t\t\tpatients = patientDb.readParticularDoctorPatients(doctor);\n\n\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\tthrow new BusinessException(e);\n\t\t} catch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t\t\n\t\treturn patients;\n\n\t}",
"List<Admission> findPAdmissionBYpatientNumber(String patientNumber, Long hospitalId);",
"public void patientadder (String index, String email){\n String test2 = email;\n for(int i = 0; i < doctorsList.size(); i++){\n String test = doctorsList.get(i).getEmail();\n if(test.equals(test2)){\n patients.add(index);\n }\n }\n }",
"public void clickOnPatients() {\n\t\twait.waitForStableDom(250);\n\t\tisElementDisplayed(\"link_patients\");\n\t\twait.waitForElementToBeClickable(element(\"link_patients\"));\n\t\twait.waitForStableDom(250);\n\t\texecuteJavascript(\"document.getElementById('doctor-patients').click();\");\n\t\tlogMessage(\"user clicks on Patients\");\n\t}",
"private void addPatient(Patient patient) {\n Location location = mLocationTree.findByUuid(patient.locationUuid);\n if (location != null) { // shouldn't be null, but better to be safe\n if (!mPatientsByLocation.containsKey(location)) {\n mPatientsByLocation.put(location, new ArrayList<Patient>());\n }\n mPatientsByLocation.get(location).add(patient);\n }\n }",
"public Patient[] findID(String sv)\r\n\t{\r\n\t\tPatient[] foundPatients = new Patient[999];//Creates a blank array\r\n\t\tint count = 0;\r\n\r\n\t\tfor(int i=0; arrayPatients[i]!=null ;i++)//loops through the array\r\n\t\t{\r\n\t\t\tif(arrayPatients[i].forename.contains(sv)||arrayPatients[i].surname.contains(sv))//sees if either surname or firstname contain the search term allowing for partieal searching\r\n\t\t\t{\r\n\t\t\t\tfoundPatients[count] = arrayPatients[i];//if found it adds the patient to an array\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn foundPatients;//that array is then returned\r\n\t}",
"private void patientSetBtnActionPerformed(java.awt.event.ActionEvent evt) {\n patientArr[patientI] = new patient(patientNameBox.getText(),\n Integer.parseInt(patientAgeBox.getText()),\n patientDiseaseBox.getText(),\n Integer.parseInt(patientIDBox.getText()));\n try {\n for (int i = 0; i < doc.length; i++) {\n if (patientDiseaseBox.getText().equalsIgnoreCase(doc[i].expertise)) {\n doc[i].newPatient(patientArr[patientI]);\n patientArr[patientI].docIndex = i;\n break;\n }\n }\n } catch (NullPointerException e) {\n for (int i = 0; i < doc.length; i++) {\n if (doc[i].expertise.equalsIgnoreCase(\"medicine\")) {\n doc[i].newPatient(patientArr[patientI]);\n\n }\n }\n }\n\n patientArr[patientI].due += 1000;\n\n patientI++;\n \n }",
"VerificationToken findByPatient(Patient patient);",
"@Override\n public List<PatientCaseDto> getAllByDoctor(Long doctorId) {\n return null;\n }",
"public int serve(Person patient) {\n for (int i = 0; i < listOfRooms.size(); i++) {\n if (listOfRooms.get(i).isReadyToServe()) {\n listOfRooms.get(i).serve(patient);\n return i;\n }\n }\n return 0;\n }",
"Collection<Patient> findAll();",
"public Doctor createDoctor(int numOfDoctors) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint newID = numOfDoctors+1;\n\n\t System.out.println(\"Please enter the doctor's name:\");\n \t\tString doctorName = input.nextLine();\n \t\twhile (!doctorName.matches(\"([a-zA-Z.\\\\s]+)\")) {\n \t\t\tSystem.out.println(\"\\n** Incorrect input. Please try again. **\");\n\t \t\tSystem.out.println(\"Please enter new doctor name: \");\n\t \t\tdoctorName = input.nextLine();\n \t\t}\t \n\t \n \tSystem.out.println(\"Please enter birthday: (in the form YYYY-MM-DD)\");\n\t String doctorBirthDate = input.nextLine();\t\n //add error checking for making sure dates are current\n while (!doctorBirthDate.matches(\"(\\\\d{4}-\\\\d{2}-\\\\d{2})\")) {\n \tSystem.out.println(\"\\n** Incorrect input. Please try again. **\");\n \t\tSystem.out.println(\"Please enter birthday: (in the form YYYY-MM-DD)\");\n \t\tdoctorBirthDate = input.nextLine();\n }\n \n \tSystem.out.println(\"Please enter SSN: (in the following format '###-##-####')\");\n\t String doctorSSN = input.nextLine();\t\n\t while (!doctorSSN.matches(\"(\\\\d{3}-\\\\d{2}-\\\\d{4})\")){\n \tSystem.out.println(\"\\n** Incorrect input. Please try again. **\");\n\t \tSystem.out.println(\"Please enter SSN: (in the following format '###-##-####')\");\n\t \tdoctorSSN = input.next();\n\t }\n\n\t\tDoctor newDoctor = new Doctor(newID, doctorName, doctorBirthDate, doctorSSN);\n\t\treturn newDoctor;\n\t}",
"@Override\n public Set PatientsOlderThenEnlistedAfter() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>olderThanEnlistedSince = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getAge() > 21 && patient.getEnlistmentDate().after(new Date(01-01-2020))){\n olderThanEnlistedSince.add(patient);\n }else {\n System.out.println(\"No patients older than 21 enlisted after 1.1.2020.\");\n }\n });\n }\n\n return olderThanEnlistedSince;\n }",
"public void addVerificationRequest(Patient patient)\n {\n accountsToVerify.add(patient);\n }",
"public void readPatient() {\n\t\tBufferedReader br;\n\t\tString s;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"patients.txt\"));\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\tString[] fields = s.split(\", \");\n\n\t\t\t\tString ssn = fields[0];\n\t\t\t\tString name = fields[1];\n\t\t\t\tString address = fields[2];\n\t\t\t\tString phoneNum = fields[3];\n\t\t\t\tString insurance = fields[4];\n\t\t\t\tString currentMeds = fields[5];\n\t\t\t\tPatient patient = new Patient(ssn, name, address, phoneNum, insurance, currentMeds);\n\t\t\t\tpat.add(patient);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}",
"public Long addPatient(long pid, String name, Date dob, int age) throws PatientExn;",
"public List<Patient> getPatients() {\n List<Patient> patients = new ArrayList<>();\n String query = \"SELECT * FROM PATIENTS\";\n try (PreparedStatement ps = this.transaction.prepareStatement(query); ResultSet rs = ps.executeQuery()) {\n while (rs.next()) {\n patients.add(new Patient(rs));\n }\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n }\n\n return patients;\n }",
"@Override\n\tpublic void addPatients(String name, int id, Long mobilenumber, int age) {\n\t\t\n\t}",
"public Patient chercherPatientId(int id_patient) {\r\n Patient p = null;\r\n int i = 0;\r\n while (i != patients.size() && patients.get(i).getIdPatient() != id_patient) {\r\n i++;\r\n }\r\n if (i != patients.size()) {\r\n p = patients.get(i);\r\n }\r\n return p;\r\n }",
"@Transactional(value = \"cleia-txm\")\n public List<Patient> findPatientsByMedicalId(Long id) throws Exception {\n Medical medical = entityManager.find(Medical.class, id);\n \n if (medical == null) {\n throw new Exception(\"Error. El medico no existe\");\n }\n \n medical.getPatients().size();\n \n return medical.getPatients();\n }",
"public PatientExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public static List<NewPatient> checkrepeatition(List<NewPatient> patientsList, NewPatient selectedPatient) {\n\n if (!isPatientExist(patientsList, selectedPatient)) {\n patientsList.add(selectedPatient);\n }\n\n return patientsList;\n }",
"ObservableList<Patient> getFilteredPatientList();",
"@Override\n\tpublic List<PatientTelephone> fetchAll(Patient patient) {\n\t\treturn this.sessionFactory.getCurrentSession()\n\t\t\t\t.createCriteria(PatientTelephone.class)\n\t\t\t\t.add(Restrictions.eq(\"patient\", \"patient\"))\n\t\t\t\t.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY)\n\t\t\t\t.list();\n\t\t\n\t}",
"@Override\n\tpublic List<Patient> listOfPatients() {\n\t\treturn null;\n\t}",
"ObservableList<Doctor> getFilteredDoctorList();",
"private void searchPatient() {\r\n String lName, fName;\r\n lName = search_lNameField.getText();\r\n fName = search_fNameField.getText();\r\n // find patients with the Last & First Name entered\r\n patientsFound = MainGUI.pimsSystem.search_patient(lName, fName);\r\n\r\n // more than one patient found\r\n if (patientsFound.size() > 1) {\r\n\r\n // create String ArrayList of patients: Last, First (DOB)\r\n ArrayList<String> foundList = new ArrayList<String>();\r\n String toAdd = \"\";\r\n // use patient data to make patient options to display\r\n for (patient p : patientsFound) {\r\n toAdd = p.getL_name() + \", \" + p.getF_name() + \" (\" + p.getDob() + \")\";\r\n foundList.add(toAdd);\r\n }\r\n int length;\r\n // clear combo box (in case this is a second search)\r\n while ((length = selectPatient_choosePatientCB.getItemCount()) > 0) {\r\n selectPatient_choosePatientCB.removeItemAt(length - 1);\r\n }\r\n // add Patient Options to combo box\r\n for (int i = 0; i < foundList.size(); i++) {\r\n selectPatient_choosePatientCB.addItem(foundList.get(i));\r\n }\r\n\r\n // display whether patients found or not\r\n JOptionPane.showMessageDialog(this, \"Found More than 1 Result for Last Name, First Name: \" + lName + \", \" + fName\r\n + \".\\nPress \\\"Ok\\\" to select a patient.\",\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n\r\n selectPatientDialog.setVisible(true);\r\n }\r\n\r\n // one patient found\r\n else if (patientsFound.size() == 1) {\r\n\r\n JOptionPane.showMessageDialog(this, \"Found one match for Last Name, First Name: \" + lName + \", \" + fName,\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n // display patient data\r\n currentPatient = patientsFound.get(0);\r\n search_fillPatientFoundData(currentPatient);\r\n }\r\n // no patient found\r\n else {\r\n\r\n JOptionPane.showMessageDialog(this, \"No Results found for Last Name, First Name:\" + lName + \", \" + fName,\r\n \"Search Failed\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"private Collection<String[]> getPatientIds(String subjectCid) throws Throwable {\n\t\tXmlDocMaker doc = new XmlDocMaker(\"args\");\n\t\tdoc.add(\"size\", \"infinity\");\n\t\tdoc.add(\"action\", \"get-meta\");\n\t\tdoc.add(\"where\", \"cid starts with '\" + subjectCid\n\t\t\t\t+ \"' and model='om.pssd.study' and mf-dicom-study has value\");\n\t\tdoc.add(\"pdist\", 0); // Force local\n\t\tXmlDoc.Element r = executor().execute(\"asset.query\", doc.root());\n\t\tCollection<String> dicomStudyCids = r.values(\"asset/cid\");\n\t\tif (dicomStudyCids == null) {\n\t\t\treturn null;\n\t\t}\n\t\tVector<String[]> patientIds = new Vector<String[]>();\n\t\tfor (String dicomCid : dicomStudyCids) {\n\t\t\tString[] patientId = getPatientIdFromDicomStudy(dicomCid);\n\t\t\tif (patientId != null) {\n\t\t\t\tboolean exists = false;\n\t\t\t\tfor (String[] patientId2 : patientIds) {\n\t\t\t\t\tif (patientId2[0].equals(patientId[0])\n\t\t\t\t\t\t\t&& patientId2[1].equals(patientId[1])\n\t\t\t\t\t\t\t&& patientId2[2].equals(patientId[2])) {\n\t\t\t\t\t\texists = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!exists) {\n\t\t\t\t\tpatientIds.add(patientId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn patientIds;\n\n\t}",
"Doctor getDoctor();",
"void AddPatiant(Patient p) throws Exception;",
"public boolean add(Patient p) {\n\t\tif (currentTimeOccupied.plus(p.timeToHealth()).toMillis() <= timeLeftInDay.toMillis()) {\n\t\t\tpatients.add(p);\n\t\t\t//currentTimeOccupied = currentTimeOccupied.plus(p.timeToHealth());\n\t\t\ttimeLeftInDay = timeLeftInDay.minus(p.timeToHealth());\n\t\t\t\n\t\t\tif (patients.size() < MAX_PATIENTS) {\n\t\t\t\tSystem.out.println(\"Patient added to list! \" + p.timeToHealth().toMinutes() + \" minutes!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"A patient has been booted to add this one!\");\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"This doctor can't take this patient due to time constraints.\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t}",
"public Collection<IPatient> searchPatients(String text) throws BadConnectionException, CriticalClassException, CriticalDatabaseException, InvalidSearchParameterException\n {\n _model = Model.getInstance();\n\n return _model.getSearchPatientController().searchPatients(text);\n }",
"@Override\n public PatientCaseDto createByDoctor(PatientCaseDto patientCaseDto) {\n return null;\n }",
"@POST\n @Path(\"patients\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(\"application/json\")\n public Patient newPatient(Patient pat){\n serv.editPatient(pat);\n return pat;\n }",
"public ArrayList<Patient> chercherPatient(String recherche) {\r\n ArrayList<Patient> p=new ArrayList();\r\n for (int i = 0; i < patients.size(); i++) {\r\n if ((patients.get(i).getNomUsuel()+patients.get(i).getPrenom()).toLowerCase().contains(recherche.trim().toLowerCase())) {\r\n p.add(patients.get(i));\r\n }\r\n }\r\n return p;\r\n }",
"public void cleanPatient(Patient patient);",
"public void insertDoctors(List<Doctor> drlist);",
"public abstract List<Patient> getAllPatientNode();",
"private boolean searchPersonNew(Register entity) {\n\t\tboolean res = false;\n\t\tfor(Person ele : viewAll()) {\n\t\t\tif(ele.getName().equals(entity.getName()) && ele.getSurname().equals(entity.getSurname())) {\n\t\t\t\tres = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"@Override\n public PatientCaseDto getByPatient(Long patientId) {\n return null;\n }",
"public void setPatientId(String patientId)\n {\n this.patientId = patientId;\n }",
"PatientInfo getPatientInfo(int patientId);",
"public void readDoctors() {\n\t\tBufferedReader br;\n\t\tString s;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"doctors.txt\"));\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\tString[] fields = s.split(\", \");\n\n\t\t\t\tString name = fields[0];\n\t\t\t\tString address = fields[1];\n\t\t\t\tString phoneNum = fields[2];\n\t\t\t\tString specialty = fields[3];\n\t\t\t\tString watchlistDrug = fields[4];\n\t\t\t\tint watchlistNum = Integer.parseInt(fields[5]);\n\t\t\t\tDoctors doctor = new Doctors(name, address, phoneNum, specialty, watchlistDrug, watchlistNum);\n\t\t\t\tdoc.add(doctor);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t}",
"public Collection<IPatient> searchPatients(String svn, String fname, String lname){\n _model = Model.getInstance();\n Collection<IPatient> searchresults = null;\n\n try {\n searchresults = _model.getSearchPatientController().searchPatients(svn, fname, lname);\n } catch (BadConnectionException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"BadConnectionException - Please contact support\");\n } catch (at.oculus.teamf.persistence.exception.search.InvalidSearchParameterException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"FacadeException - Please contact support\");\n } catch (CriticalDatabaseException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"CriticalDatabaseException - Please contact support\");\n } catch (CriticalClassException e) {\n e.printStackTrace();\n DialogBoxController.getInstance().showExceptionDialog(e, \"CriticalClassException - Please contact support\");\n }\n\n return searchresults;\n }",
"@Override\n\tpublic Collection<Patient> searchByName(String query) {\n\t\treturn null;\n\t}",
"public static ArrayList<Patient> getPatientsFromMedic(Medic medic) {\n ArrayList<Patient> tempPatientList = new ArrayList<>();\n for (Patient patient :\n patients\n ) {\n for (Consultation consultation :\n patient.getMedicalFile().getConsultationsList()\n ) {\n if (consultation.getMedicId() == medic.getMedicDetails().getMedicId()) {\n tempPatientList.add(patient);\n break;\n }\n }\n }\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(new Object() {\n }.getClass().getEnclosingMethod().getName()).append(\",\").append(new Timestamp(System.currentTimeMillis()));\n writeToAudit(stringBuilder);\n return tempPatientList;\n }",
"@Override\n\tpublic List<Patientstreatments> getallpatienttreat() {\n\t\treturn patreatrep.findAll();\n\t}",
"@Override\n\tpublic List<Patient> findAll() {\n\t\t// setting logger info\n\t\tlogger.info(\"Find the details of the patient\");\n\t\treturn patientRepo.findAll();\n\t}",
"public void consultDentist() {\n\t\tSystem.out.println(\"Patient \" + id + \" is consulting the dentist.\"); \n\t}",
"boolean hasPatientInAppointmentSchedule(Patient patient);",
"public UserPatientExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"List<Doctor> getAvailableDoctors(java.util.Date date, String slot) throws CliniqueException;",
"@Override\n public PatientCaseDto getByDoctor(Long doctorId) {\n return null;\n }",
"public Patient(String name, String organ, int age, BloodType bloodtype,\r\n\t\t\tint patientID, boolean isDonor) {\r\n\t\tthis.name = name;\r\n\t\tthis.organ = organ.toUpperCase();\r\n\t\tthis.age = age;\r\n\t\tthis.bloodtype = bloodtype;\r\n\t\tthis.patientID = patientID;\r\n\t\tthis.isDonor = isDonor;\r\n\t\tthis.numOfConnections = 0;\r\n\t}",
"@Test\r\n\tpublic void testGetNonDischargedPatients() {\r\n\t\tsessionController.login(testC1Doctor1, getCampus(0));\r\n\t\tdoctorController.consultPatientFile(testPatient5);\r\n\t\tdoctorController.dischargePatient();\r\n\t\tassertEquals(testPatient5.isDischarged(), true);\r\n\t\tdoctorController.consultPatientFile(testPatient4);\r\n\t\tdoctorController.dischargePatient();\r\n\t\tassertEquals(testPatient4.isDischarged(), true);\r\n\t\tList<Patient> nonDischargedPatients = new ArrayList<Patient>();\r\n\t\tnonDischargedPatients.add(testC1Patient1);\r\n\t\tnonDischargedPatients.add(testPatient2);\r\n\t\tnonDischargedPatients.add(testPatient3);\r\n\t\tnonDischargedPatients.add(testC2Patient1);\r\n\t\tassertEquals(doctorController.getNonDischargedPatients(), nonDischargedPatients);\r\n\t}",
"public Papers beginConsult(String date, Long medicId, String personName, String personCnp, String personBirthDate) {\n Medic medic = medicalOfficeService.getMedicService().getMedicById(medicId);\n if(medic==null) throw new RuntimeException(\"The medic \"+medicId+\" does not exist!\");\n\n if(medic.getAppointments().contains(date)) throw new RuntimeException(\"The medic \"+medic.getName()+\" is busy at \"+date+\" !\");\n\n Patient patient = getMedicalOfficeService().getMedicalOffice().getPatients().get(personCnp);\n if(patient == null) {\n patient = new Patient();\n patient.setName(personName);\n patient.setCnp(personCnp);\n patient.setBirthDate(personBirthDate);\n Long id = reception.getMedicalOffice().getIdGenerator().getPatientId();\n patient.setId(id);\n medicalOfficeService.getPatientService().addPatient(patient);\n }\n Long id = reception.getMedicalOffice().getIdGenerator().getConsultId();\n Consult consult = new Consult();\n consult.setId(id);\n consult.setDate(date);\n consult.setMedic(medic);\n consult.setPatient(patient);\n\n return medicalOfficeService.getMedicService().doConsult(consult);\n }",
"public void setNumberOfPatients(int numberOfPatients) {\n this.numberOfPatients = numberOfPatients;\n }",
"public Person[] getPatientsByStateOfHealth(int state) {\n int count = 0;\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getStateOfHealth() == state)\n count++;\n }\n \n if(count == 0)\n return null;\n\n int index = 0;\n Person[] patientsByStateOfHealth = new Person[count];\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getStateOfHealth() == state)\n patientsByStateOfHealth[index++] = listOfPatients[i];\n }\n\n return patientsByStateOfHealth;\n }",
"List<String> getAttendingDoctorNames();",
"private boolean patientNameCheck( List<Patient> databasePatients, String newID , String oldID)\n {\n for( Patient temp : databasePatients )\n {\n if( temp.getPatientReference().equals(newID)) {\n if (newID.equals(oldID)) {\n return true;\n } else {\n return false;\n }\n }\n }\n return true;\n }",
"@RequestMapping(method = RequestMethod.GET, path = \"/patients\")\n @Secured({\"ROLE_DOCTOR\"})\n @ResponseStatus(HttpStatus.OK)\n public List<User> fetchAllPatients(Principal principal) {\n log.info(\"Fetching all patients using user with Id [{}]\", principal.getName());\n return userService.fetchAllPatients(\"ROLE_PATIENT\");\n }",
"public Patient() {\n\t\tsuper();\n\t\t/*\n\t\t * TODO initialize lists\n\t\t */\n\t\ttreatments = Collections.emptyList();\n\t}",
"@Override\n public void returnDevices(RegisterDTO dto) throws NoActiveRentalsFoundException {\n List<Rental> rentals = Arrays.stream(dto.getDevices().split(RENTAL_DEVICE_SEPARATOR))\n .map(deviceRepository::findDeviceByIdent)\n .filter(Objects::nonNull)\n .collect(Collectors.toSet())\n .stream()\n .map(e -> rentalRepository.findByDeviceIdentAndIsReturned(e.getIdent(), false))\n .filter(Objects::nonNull)\n .collect(Collectors.toList());\n\n\n // Find all rentals regarding user\n if (rentals.isEmpty()) throw new NoActiveRentalsFoundException();\n\n // Mark rentals as returned\n DeviceUser user = userRepository.findByPin(dto.getPersonInformation().trim()).orElse(null);\n LocalDateTime timestamp = LocalDateTime.now();\n\n for (Rental rental : rentals) {\n if (user != null) rental.setReturner(user);\n\n rental.setReturnTime(timestamp);\n rental.setIsReturned(true);\n rentalRepository.save(rental);\n }\n }",
"public List<Patient> listAllPatient() {\n\t\treturn null;\n\t}",
"private List<Obs> getEncountersOfPatient(Patient patient, List<Obs> patientObsList, Integer pid){\n\t\tpatientObsList = getFinalObsList(patient, patientObsList, pid);\t\t\n\t\tList<Encounter> randomizedEncounterList = randomizeEncounterDates(patientObsList);\n\t\tList<Date> randomizedEncounterDateList= new ArrayList<Date>();\n\t\tfor(Encounter e : randomizedEncounterList){\n\t\t\trandomizedEncounterDateList.add(e.getEncounterDatetime());\n\t\t}\n\t\tfor(int i=0; i<randomizedEncounterDateList.size();i++){\n\t\t\tEncounter e = patientObsList.get(i).getEncounter();\n\t\t\te.setEncounterDatetime(randomizedEncounterDateList.get(i));\n\t\t\tpatientObsList.get(i).setEncounter(e);\n\t\t}\n\t\tfor(int i=0; i<patientObsList.size();i++){\n\t\t\tLocation loc = new Location();\n\t\t\tloc.setAddress1(accessLocationPropFile());\n\t\t\tpatientObsList.get(i).setLocation(loc);\n\t\t}\n\t\treturn patientObsList;\n\t}",
"boolean hasDoctorInAppointmentSchedule(Doctor doctor);",
"List<MedicalRecord> getAllPatientMedicalRecords(HttpSession session, int patientId);",
"List<CustDataNotesResponseDTO> searchForCustDataNotes(CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;",
"@Override\r\n\tpublic List<Person> meetCriteria(List<Person> persons) {\n\t\tList<Person> firstCriteriaItem = criteria.meetCriteria(persons);\r\n\t\tList<Person> otherCriteriaItem = otherCriteria.meetCriteria(persons);\r\n\t\t\r\n\t\tfor(Person person: otherCriteriaItem)\r\n\t\t{\r\n\t\t\tif(!(firstCriteriaItem.contains(person)))\r\n\t\t\t\tfirstCriteriaItem.add(person);\r\n\t\t}\r\n\t\t\r\n\t\treturn firstCriteriaItem;\r\n\t\t\r\n\t\t}",
"public Person[] getDoctors() {\n\t\treturn _doctors;\n\t}",
"Collection<Patient> findByName(String name, int id);",
"@Override public ArrayList<Sample> getAllPatientSamples(Patient patient)\n {\n try\n {\n return clientDoctor.getAllPatientSamples(patient);\n }\n catch (RemoteException e)\n {\n throw new RuntimeException(\"Error while fetching samples. Please try again.\");\n }\n }",
"private void searchedByDirectors(ArrayList<Movie> movies)\n {\n boolean valid = false;\n Scanner console = new Scanner(System.in);\n String dir1=\"\";\n ArrayList<String> dirSearch = new ArrayList<String>();\n ArrayList<Movie> filmByDir = new ArrayList<Movie>();\n ArrayList<Movie> listMovieNew = new ArrayList<Movie>();\n dir1 = insertDirector();\n dirSearch.add(dir1.toLowerCase());\n \n if (dir1.length() != 0)\n {\n for(int index = 2 ; index > 0 ; index++)\n {\n System.out.print(\"\\t\\tInsert the directors' name(\" + index + \")- press enter to leave blank: \");\n String dirs = console.nextLine().trim().toLowerCase();\n \n if (dirs.length() != 0)\n dirSearch.add(dirs);\n else\n if (dirs.length() == 0)\n break;\n }\n }\n \n for (int index = 0; index < movies.size(); index++)\n {\n listMovieNew.add(movies.get(index));\n }\n \n for (int order = 0; order < dirSearch.size() ; order++)\n {\n for (int sequence = 0; sequence < listMovieNew.size() ; sequence++)\n {\n if ((listMovieNew.get(sequence).getDirector().toLowerCase().contains(dirSearch.get(order).toLowerCase())))\n {\n filmByDir.add(listMovieNew.get(sequence)); \n listMovieNew.remove(sequence);\n }\n }\n }\n \n displayExistanceResultByDir(filmByDir);\n }",
"List<String> getResponsibleDoctorNames();",
"private void storePatient(final Patient patient) {\n\n\t\ttry {\n\t\t\tpatients.put(patient.getIdentifierFirstRep().getValue(), patient);\n\t\t\t// if storing is successful the notify the listeners that listens on\n\t\t\t// any patient => patient/*\n\n\t\t\tfinal String bundleToString = currentPatientsAsJsonString();\n\n\t\t\tbroadcaster\n\t\t\t\t\t.broadcast(new OutboundEvent.Builder().name(\"patients\").data(String.class, bundleToString).build());\n\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void checkExamination() {\n\t\tprint(\"Checking examination-waiting-list...\");\n\t\tList l = getWaitingDoctors();\n\t\tfor (int i = 0; i < l.size(); ++i) {\n\t\t\tPerson d = (Person) l.get(i);\n\t\t\tboolean done = false;\n\t\t\tprint(\"Checking if doctor \" + d + \" can take a patient...\");\n\n\t\t\t// check backFromXrayWaiters first\n\t\t\tfor (int j = 0; !done && j < _backFromXrayWaiters.size(); ++j) {\n\t\t\t\tPerson p = (Person) _backFromXrayWaiters.get(j);\n\t\t\t\tprint(\n\t\t\t\t\t\"Back from xray-shooting: \"\n\t\t\t\t\t\t+ p\n\t\t\t\t\t\t+ \", preferred doctor: \"\n\t\t\t\t\t\t+ p.getPreferredDoctor()\n\t\t\t\t\t\t+ \"...\");\n\t\t\t\tif (p.getPreferredDoctor() == d) {\n\t\t\t\t\t// preferred doctor is waiting. \n\t\t\t\t\tint t = computeExaminationTime(Event.SECOND_EXAMINATION);\n\t\t\t\t\t_eventQueue.insert(\n\t\t\t\t\t\tnew Event(Event.SECOND_EXAMINATION, time + t, p, d));\n\t\t\t\t\t_backFromXrayWaiters.remove(j);\n\t\t\t\t\tp.stopWaiting();\n\t\t\t\t\td.stopWaiting();\n\t\t\t\t\tdone = true;\n\t\t\t\t\tprint(\"2nd examination start: \" + p + \", \" + d);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// none of the xrayWaiters could be served by this doctor.\n\t\t\t// so take the first of the incoming, if there is any\n\t\t\tif (!done && _examinationWaiters.size() > 0) {\n\t\t\t\tPerson p = (Person) _examinationWaiters.removeFirst();\n\t\t\t\tprint(\n\t\t\t\t\t\"waiting for examination: \"\n\t\t\t\t\t\t+ p\n\t\t\t\t\t\t+ \", preferred doctor: \"\n\t\t\t\t\t\t+ p.getPreferredDoctor()\n\t\t\t\t\t\t+ \"...\");\n\t\t\t\tif (p.getPreferredDoctor() == null) {\n\t\t\t\t\t// 1st examination. \n\t\t\t\t\tprint(\"1st examination start: \" + p + \", \" + d);\n\t\t\t\t\tint t = computeExaminationTime(Event.FIRST_EXAMINATION);\n\t\t\t\t\t_eventQueue.insert(\n\t\t\t\t\t\tnew Event(Event.FIRST_EXAMINATION, time + t, p, d));\n\t\t\t\t} else {\n\t\t\t\t\t// 2nd examination\n\t\t\t\t\tprint(\"2nd examination start: \" + p + \", \" + d);\n\t\t\t\t\tint t = computeExaminationTime(Event.SECOND_EXAMINATION);\n\t\t\t\t\t_eventQueue.insert(\n\t\t\t\t\t\tnew Event(Event.SECOND_EXAMINATION, time + t, p, d));\n\t\t\t\t}\n\t\t\t\tp.stopWaiting();\n\t\t\t\td.stopWaiting();\n\t\t\t}\n\t\t}\n\t}",
"private SortedMap searchByPID(Person person, IcsTrace trace) {\n\t\tProfile.begin(\"PersonIdServiceBean.searchByPID\");\n\n\t\tTreeMap ret = new TreeMap();\n\t\tDatabaseServices dbServices = DatabaseServicesFactory.getInstance();\n\n\t\ttry {\n\t\t\tList matches = null;\n\n\t\t\tIterator ids = person.getPersonIdentifiers().iterator();\n\n\t\t\tQueryParamList params = new QueryParamList(QueryParamList.OR_LIST);\n\t\t\twhile (ids.hasNext()) {\n\t\t\t\tQueryParamList inner = new QueryParamList(\n\t\t\t\t\t\tQueryParamList.AND_LIST);\n\t\t\t\tPersonIdentifier pid = (PersonIdentifier) ids.next();\n\t\t\t\tinner.add(AttributeType.PERSON_IDENTIFIER, pid.getId());\n\t\t\t\tinner.add(AttributeType.AA_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningAuthority().getNameSpaceID());\n\t\t\t\tinner.add(AttributeType.AF_NAMESPACE_ID, pid\n\t\t\t\t\t\t.getAssigningFacility().getNameSpaceID());\n\t\t\t\tparams.add(inner);\n\t\t\t}\n\t\t\tmatches = dbServices.query(params);\n\n\t\t\tif (trace.isEnabled()) {\n\t\t\t\ttrace.add(\"Persons that match PIDS:\");\n\t\t\t\tIterator i = matches.iterator();\n\t\t\t\twhile (i.hasNext())\n\t\t\t\t\ttrace.add((Person) i.next());\n\t\t\t}\n\n\t\t\tIterator i = matches.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t\tPerson match = (Person) i.next();\n\t\t\t\tret.put(new Double(1.0), match);\n\t\t\t}\n\t\t} catch (DatabaseException dbEx) {\n\t\t\tlog.error(dbEx, dbEx);\n\t\t} finally {\n\t\t\tProfile.end(\"PersonIdServiceBean.searchByPID\");\n\t\t}\n\n\t\treturn ret;\n\t}",
"@GetMapping(\"/patient\")\r\n\t@ApiOperation(value = \"To list Patient Directory\")\r\n\t// @Cacheable(value = \"getRecordWithDat\", key = \"#root.methodName\")\r\n\tpublic List<PatientRecord> getAllPatientRecords() {\r\n\t\tlogger.info(\"listAllPatient {}\", patientService.getAll());\r\n\t\t// kafkaTemplate.send(\"kafkaExample\",\r\n\t\t// patientService.getAll().stream().findAny());\r\n\t\treturn patientService.getAll();\r\n\t}",
"@Override\n public Patient findByPatientName(String patient) {\n return null;\n }",
"public Papers beginConsult(String appointmentKey, String personName, String personCnp, String personBirthDate) {\n Appointment appointment = reception.getAppointments().get(appointmentKey);\n\n Patient patient = getMedicalOfficeService().getMedicalOffice().getPatients().get(personCnp);\n if(patient == null) {\n patient = new Patient();\n patient.setName(personName);\n patient.setCnp(personCnp);\n patient.setBirthDate(personBirthDate);\n Long id = reception.getMedicalOffice().getIdGenerator().getPatientId();\n patient.setId(id);\n medicalOfficeService.getPatientService().addPatient(patient);\n }\n Long id = reception.getMedicalOffice().getIdGenerator().getConsultId();\n Consult consult = new Consult();\n consult.setId(id);\n consult.setDate(appointment.getDate());\n consult.setMedic(appointment.getMedic());\n consult.setPatient(patient);\n removeAppointment(appointmentKey);\n //de la medic il scoatem la sfarsitul consultului\n\n return medicalOfficeService.getMedicService().doConsult(consult);\n }",
"public void setPatientId(String patientId){\n\t\tthis.patientId = patientId;\n\t}",
"public ArrayList<Patient> getPatients() {\n return this.patients;\n }",
"@PreAuthorize(\"hasAnyRole('PATIENT','EMPLOYEE')\")\n\t@PostMapping(path = \"/getPatientVisits\")\n\tpublic ResponseEntity<MappingJacksonValue> getPatientVisits(@RequestBody VisitData visitData) {\n\t\ttry {\n\t\t\tSimpleBeanPropertyFilter userFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"photo\");\n\t\t\tSimpleBeanPropertyFilter patientFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"medicalDocumentList\");\n\t\t\tSimpleBeanPropertyFilter doctorFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"workingWeek\");\n\t SimpleBeanPropertyFilter visitFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"employee\", \"diagnosis\");\n\t FilterProvider filterProvider = new SimpleFilterProvider()\n\t \t\t.addFilter(\"userFilter\", userFilter)\n\t \t\t.addFilter(\"patientFilter\", patientFilter)\n\t\t\t .addFilter(\"doctorFilter\", doctorFilter)\n\t\t\t .addFilter(\"visitFilter\", visitFilter);\n\t\t\tList<Visit> patientVisits = visitService.getPatientVisits(visitData);\n\t\t\tMappingJacksonValue mappingJacksonValue = new MappingJacksonValue(patientVisits);\n\t\t\tmappingJacksonValue.setFilters(filterProvider);\n\t\t\treturn ResponseEntity.ok(mappingJacksonValue);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"ERROR get patient visits\", e);\n\t\t\treturn new ResponseEntity<MappingJacksonValue>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}",
"@Override\n\tpublic void takeAppointment() {\n\t\tsearchByMobile();\n\t\tif (count == 0) {\n\t\t\tnew ManagerServiceImplementation().addPatient();\n\t\t}\n\t\tnew DoctorServiceImplementation().showDoctorDetails();\n\t\tSystem.out.println(\"Enter doctor's ID:\");\n\t\tString dID = UtilityClinic.readString();\n\t\tfor (int i = 0; i < UtilityClinic.docJson.size(); i++) {\n\t\t\tJSONObject obj = (JSONObject) UtilityClinic.docJson.get(i);\n\t\t\tif (obj.get(\"Doctor's ID\").toString().equals(dID)) {\n\t\t\t\tif (UtilityClinic.docWisePatCounter.isEmpty()) {\n\t\t\t\t\tfor (int j = 0; j < UtilityClinic.docJson.size(); j++) {\n\t\t\t\t\t\tUtilityClinic.docWisePatCounter.add(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (UtilityClinic.docWisePatCounter.get(i) < 5) {\n\t\t\t\t\tnew Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tUtilityClinic.docWisePatCounter.add(i, UtilityClinic.docWisePatCounter.get(i) + 1);\n\n\t\t\t\t\tif (UtilityClinic.appFile == null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tutil.accessExistingAppJson();\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\t\tutil.createAppJson();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tutil.readFromAppJson(util.appFile);\n\t\t\t\t\tJSONObject appObject = new JSONObject();\n\t\t\t\t\tAppointment app = new Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tappObject.put(\"Patient's name\", app.getPatientName());\n\t\t\t\t\tappObject.put(\"Patient's ID\", app.getPatientId());\n\t\t\t\t\tappObject.put(\"Doctor's name\", app.getDoctorName());\n\t\t\t\t\tappObject.put(\"Doctor's ID\", app.getDoctorId());\n\t\t\t\t\tappObject.put(\"Time stamp\", app.getTime());\n\t\t\t\t\tUtilityClinic.appJson.add(appObject);\n\t\t\t\t\tutil.writetoJson(UtilityClinic.appJson, util.getAppFileName());\n\t\t\t\t\tutil.readFromAppJson(util.getAppFileName());\n\t\t\t\t\tSystem.out.println(\"Appointment done.....\\n\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Sorry!!! Doctor is not available....Please try on next day.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void ShowPatientsActionPerformed(java.awt.event.ActionEvent evt) {\n String s = \"\";\n int c = 0;\n try {\n while (c < doc.length) {\n if (docNameBox.getText().equalsIgnoreCase(doc[c].name)) {\n s = doc[c].name + \" has these patients under him/her: \\n\" + doc[c].printPatientName(frame);\n break;\n } else {\n c++;\n }\n }\n } catch (NullPointerException e) {\n s = \"Doctor name not found, please add name\";\n }\n JOptionPane.showMessageDialog(null, s);\n }"
] | [
"0.6065035",
"0.6060606",
"0.6003099",
"0.6002306",
"0.5956571",
"0.5760411",
"0.5759971",
"0.56301725",
"0.55534244",
"0.5449157",
"0.54232925",
"0.5412584",
"0.5357848",
"0.53300506",
"0.5314103",
"0.5287179",
"0.52531147",
"0.52060544",
"0.51999307",
"0.51540375",
"0.51502836",
"0.51480323",
"0.51381886",
"0.50967485",
"0.5079115",
"0.50737387",
"0.5069865",
"0.50435823",
"0.50402075",
"0.50244147",
"0.50225234",
"0.50110584",
"0.5009333",
"0.49850583",
"0.4978238",
"0.497796",
"0.49775913",
"0.497344",
"0.49620008",
"0.49439174",
"0.49426928",
"0.4936552",
"0.4932672",
"0.49214768",
"0.49092814",
"0.49014297",
"0.48918918",
"0.48906314",
"0.48881072",
"0.4866117",
"0.4857841",
"0.48532724",
"0.48366052",
"0.48316747",
"0.48248807",
"0.4821109",
"0.4812011",
"0.48042443",
"0.47991338",
"0.47980934",
"0.47807646",
"0.47701743",
"0.47688633",
"0.47651026",
"0.47562125",
"0.47508928",
"0.47461838",
"0.47429097",
"0.47359568",
"0.47094315",
"0.47055858",
"0.47022563",
"0.47008744",
"0.46997336",
"0.4693902",
"0.4688451",
"0.4676314",
"0.46753848",
"0.46625847",
"0.46615583",
"0.4656554",
"0.4653975",
"0.465061",
"0.4649439",
"0.4646771",
"0.46406177",
"0.46309757",
"0.46245828",
"0.46245316",
"0.46198392",
"0.46133363",
"0.46086514",
"0.4605919",
"0.4604429",
"0.4597062",
"0.45968288",
"0.4590116",
"0.45827144",
"0.45806402",
"0.45791"
] | 0.69306606 | 0 |
Close the connection when application finishes | public void closeConnection(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void close() {\n connection.close();\n running = false;\n }",
"private void closeConnection() {\n\t\t\tSystem.out.println(\"\\nTerminating connection \" + myConID + \"\\n\");\n\t\t\ttry {\n\t\t\t\toutput.close(); // close output stream\n\t\t\t\tinput.close(); // close input stream\n\t\t\t\tconnection.close(); // close socket\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"Exception occured in closing connection\"\n\t\t\t\t\t\t+ ioException);\n\t\t\t}\n\t\t}",
"private void endConnection(){\n\t\tif(this.connection != null){\n\t\t\ttry {\n\t\t\t\tthis.connection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}",
"private void close() {\n\t\ttry {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog(e);\n\t\t} finally {\n\t\t\tisConnected = false;\n\t\t}\n\t}",
"public void close()\n {\n getConnectionManager().shutdown();\n }",
"private void closeConnection() {\n\t\t_client.getConnectionManager().shutdown();\n\t}",
"protected void connectionClosed() {}",
"private void closeConnection () {\n setConnection (null);\n }",
"@Override\n\tprotected void onClose() {\n\t\tcloseConnections();\n\t}",
"private void close() {\n\t\ttry {\n\t\t\tsendCommand(\"end\\n\");\n\t\t\tout.close();\n\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (MossException e) {\n\t\t} catch (IOException e2) {\n\t\t} finally {\n\t\t\tcurrentStage = Stage.DISCONNECTED;\n\t\t}\n\n\t}",
"public void terminate() {\n config.closeConnection();\n }",
"@Override\n public void close()\n {\n this.disconnect();\n }",
"@Override\n\tpublic void finish() {\n\t\ttry {\n\t\t\tif(muc!=null){\n\t\t\t\t\n\t\t\t\tmuc.leave();\n\t\t\t}\n\t\t\tif(connection!=null){\n\t\t\t\t\n\t\t\t\tconnection.disconnect();\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\n\t\tsuper.finish();\n\t}",
"private void closeConnection() {\r\n try {\r\n socket.close();\r\n } catch (IOException ex) {\r\n // Ex on close\r\n }\r\n }",
"void handleConnectionClosed();",
"@OnClose\n public void end() {\n listener.connectionTerminated();\n Logger.getGlobal().info(\"Connection with \" \n + nickname + \" terminated.\\n\"); //$NON-NLS-1$ //$NON-NLS-2$\n }",
"public synchronized void close() {\n\t\t/**\n\t\t * DISCONNECT FROM SERVER\n\t\t */\n\t\tsrvDisconnect();\n\t}",
"protected void close() {\n\t\tthis.connection.close();\n\t\tthis.connection = null;\n\t}",
"public void closeConnection() {\n try {\n stdIn.close();\n socketIn.close();\n socketOut.close();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }",
"private void exit()\n {\n try\n {\n connect.close();\n }\n catch (javax.jms.JMSException jmse)\n {\n jmse.printStackTrace();\n }\n\n System.exit(0);\n }",
"final public void closeConnection() throws IOException {\n\n readyToStop = true;\n closeAll();\n }",
"@Override\r\n\tpublic void closeConnection() {\n\t\t\r\n\t}",
"private void closeConnection()\n\t{\n\t\tif(result != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult.close();\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t\tif(con != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcon.close();\n\t\t\t\tcon = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t}",
"public void closeConnection() {\n try {\n dis.close();\n dos.close();\n socket.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void closeConnection(){\n report(\"Close connection\");\n try{\n if(socket != null && !socket.isClosed()) {\n report(\"Client: Close socket\");\n socket.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n report(\"End\");\n }",
"public void closeConnection() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {\n\t\t\tlogger.warning(\"problem closing socket connection with JSON-RPC server at \" + serverIP + \":\" + serverPort);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\r\n\tpublic void close() {\n\t \t if (conn != null) {\r\n\t \t\t try {\r\n\t \t\t\t conn.close();\r\n\t \t\t } catch (Exception e) {\r\n\t \t\t\t e.printStackTrace();\r\n\t \t\t }\r\n\t \t }\r\n\t}",
"public void closeConnection() {\n try {\n if (connection != null) {\n connection.close();\n connection = null;\n }\n } catch (Exception e) {\n System.out.print(e.getMessage());\n }\n }",
"public void closeIdleConnections()\n {\n \n }",
"@Override\n public synchronized void close() {\n disconnect();\n mClosed = true;\n }",
"public void end()\n {\n keepingAlive = false;\n if (channel == null)\n {\n channel = connectFuture.getChannel();\n connectFuture.cancel();\n }\n if (channel != null)\n {\n channel.close();\n }\n }",
"public void closeConnection() {\n try {\n socket.close();\n oStream.close();\n } catch (Exception e) { }\n }",
"public static void close() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch(Exception e) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage());\n\t\t}\n\n\t}",
"private void close() {\r\n closeListener.run();\r\n }",
"@Override\n\tpublic void closeConnection() {\n\t\t\n\t}",
"public static void closeConnection() {\n if(connection != null) {\n try {\n connection.close();\n connection = null;\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n }\n }",
"public static void closeHttpConn(){ \n\t\thttpUrl.disconnect(); \n\t}",
"void setCloseConnection();",
"public void closeConnection() {\n System.out.println(\"Closing connection\");\n\n try {\n reader.close();\n \n if (connectionSocket != null) {\n connectionSocket.close();\n connectionSocket = null;\n }\n System.out.println(\"Connection closed\");\n } catch (IOException e) {\n System.out.println(\"IOException at closeConnection()\");\n } catch (NullPointerException e) {\n System.out.println(\"NullPointerException at closeConnection()\");\n } catch (Exception e) {\n System.out.println(\"Exception at closeConnection()\");\n System.out.println(e.toString());\n }\n }",
"public void closeConnection() {\n client.close();\n System.out.println(\"Connection to db closed.\");\n }",
"public void ExitConection(){\n try {\n resultSet.close();\n preparedStatement.close();\n conection.close();\n } catch (Exception e) {\n// MessageEmergent(\"Fail ExitConection(): \"+e.getMessage());\n }\n }",
"public static void close() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Chiusura connessione\");\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CLOSE;\n\t\t\tsend(rp);\n\t\t\tClient.LoggedUser.anagrafica = null;\n\t\t\tois.close();\n\t\t\toos.close();\n\t\t\ts.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore close client connection\");\n\t\t}\n\t}",
"public void close() {\n if (this.client != null && this.client.isConnected()) {\n this.client.close();\n }\n this.running = false;\n }",
"private void close(){\n try {\n socket.close();\n objOut.close();\n line.close();\n audioInputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void disconnect()\r\n\t{\r\n\t\ttry {\r\n\t\t\tconnection_.close();\r\n\t\t} catch (IOException e) {} // How can closing a connection fail?\r\n\t\t\r\n\t}",
"void close()\n {\n DisconnectInfo disconnectInfo = connection.getDisconnectInfo();\n if (disconnectInfo == null)\n {\n disconnectInfo = connection.setDisconnectInfo(\n new DisconnectInfo(connection, DisconnectType.UNKNOWN, null, null));\n }\n\n // Determine if this connection was closed by a finalizer.\n final boolean closedByFinalizer =\n ((disconnectInfo.getType() == DisconnectType.CLOSED_BY_FINALIZER) &&\n socket.isConnected());\n\n\n // Make sure that the connection reader is no longer running.\n try\n {\n connectionReader.close(false);\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n outputStream.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n socket.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n if (saslClient != null)\n {\n try\n {\n saslClient.dispose();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n finally\n {\n saslClient = null;\n }\n }\n\n debugDisconnect(host, port, connection, disconnectInfo.getType(),\n disconnectInfo.getMessage(), disconnectInfo.getCause());\n if (closedByFinalizer && debugEnabled(DebugType.LDAP))\n {\n debug(Level.WARNING, DebugType.LDAP,\n \"Connection closed by LDAP SDK finalizer: \" + toString());\n }\n disconnectInfo.notifyDisconnectHandler();\n }",
"public void exit() {\r\n\t\tsendReceiveSocket.close();\r\n\t}",
"public void closeUp(){\n\t\ttry{\n\t\t\tif (socket!=null){\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\tif (input!=null){\n\t\t\t\tinput.close();\n\t\t\t}\n\t\t\tif (output!=null){\n\t\t\t\toutput.close();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tmainDialog.dispose();\n\t\tmainDialog.dispose();\n\t\tSystem.exit(0);\n\t}",
"protected void finalize(){\n \ttry {\n\t\t\tdatabase.doDisconnect();\n\t\t} catch (SQLException e) {\n\t\t}\n }",
"public void connectionClose() {\n try {\n conn.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n public void close() throws Exception {\r\n if (connection != null){\r\n connection.close();\r\n }\r\n }",
"public void close() {\n try {\n socket.close();\n outputStream.close();\n inputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n protected Void doInBackground(Void... args) {\n try{\n Socket echoSocket = SplashScreen.PrefetchData.getEchoSocket();\n PrintWriter out = new PrintWriter(echoSocket.getOutputStream(),true);\n //input stream of the socket\n BufferedReader in = new BufferedReader(new InputStreamReader(echoSocket.getInputStream()));\n\n out.println(\"Close Connection\");\n System.out.println(\"Client : Close Connection\");\n if(in.readLine().equals(\"Communication done!! Ciao...\")) {\n finish();\n }\n else\n {\n Context context = getApplicationContext();\n CharSequence text = \"There was an error closing the application!\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n System.exit(0);\n }\n\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return null;\n }",
"@Override\n public void closeConnection() {\n\n System.out.println(\"[CLIENT] Closing socket connection...\");\n try {\n socket.close();\n in.close();\n out.close();\n System.out.println(\"[CLIENT] Closed socket connection.\");\n } catch (IOException e) {\n System.out.println(\"[CLIENT] Error occurred when closing socket\");\n }\n System.exit(0);\n\n }",
"public void disconnect() {\n\t\tif (_connection != null) {\n\t\t\ttry {\n\t\t\t\twhile (!_connection.isClosed()) {\n\t\t\t\t\t_connection.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) { /* ignore close errors */\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private void shutdown() {\n clientTUI.showMessage(\"Closing the connection...\");\n try {\n in.close();\n out.close();\n serverSock.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void closeConnection () {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\tconnection = null;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void close() {\n // Don't close anything, leave the GeoPackage connection open\n }",
"private synchronized void closeConnection() {\n/* 212 */ if (this.conn != null) {\n/* 213 */ this.log.debug(\"Closing connection\");\n/* */ try {\n/* 215 */ this.conn.close();\n/* 216 */ } catch (IOException iox) {\n/* 217 */ if (this.log.isDebugEnabled()) {\n/* 218 */ this.log.debug(\"I/O exception closing connection\", iox);\n/* */ }\n/* */ } \n/* 221 */ this.conn = null;\n/* */ } \n/* */ }",
"@Override\n\tpublic void connectionClosed() {\n\t}",
"private void close() {\n // try to close the connection\n try {\n if (sOutput != null)\n sOutput.close();\n } catch(Exception e) {\n //handle exception\n }\n try {\n if (sInput != null)\n sInput.close();\n } catch(Exception e) {\n //handle exception\n }\n try {\n if (socket != null)\n socket.close();\n } catch (Exception e) {\n //handle exception\n }\n //save the chatlist array\n chatSave();\n }",
"public void onConnectionClosed() {\r\n\t\tcurrentConnections.decrementAndGet();\r\n\t}",
"private void closeConnection() {\n try {\n fromClient.close();\n toClient.close();\n client.close();\n } catch (IOException e) {\n System.err.println(\"Unable to close connection:\" + e.getMessage());\n }\n }",
"@Override\n public synchronized void close() {\n mOpenConnections--;\n if (mOpenConnections == 0) {\n super.close();\n }\n }",
"@Override\n public synchronized void close() {\n mOpenConnections--;\n if (mOpenConnections == 0) {\n super.close();\n }\n }",
"private void close()\n {\n try\n {\n if (outputStream != null)\n {\n outputStream.close();\n }\n } catch (Exception e)\n {\n\n }\n try\n {\n if (inputStream != null)\n {\n inputStream.close();\n }\n } catch (Exception e)\n {\n\n }\n try\n {\n if (socket != null)\n {\n socket.close();\n }\n } catch (Exception e)\n {\n\n }\n }",
"public void close() {}",
"public void close() {\n\n\t\tdebug();\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"=== CLOSE === \");\n\t\t}\n\n\t\ttry {\n\n\t\t\tif (connection != null) {\n\n\t\t\t\tlog.debug(\"Antes Connection Close\");\n\t\t\t\tconnection.close();\n\t\t\t\tlog.debug(\"Pos Connection Close\");\n\t\t\t}\n\n\t\t\tif (m_dbConn != null) {\n\t\t\t\tm_dbConn.close();\n\t\t\t}\n\n\t\t\tif (isDebug == true) {\n\t\t\t\tlog.debug(\"Connection Close\");\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlog.debug(\"ERRO Connection Close\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tconnection = null;\n\t\tm_dbConn = null;\n\n\t}",
"protected void end() {\n \t//claw.close();\n }",
"@Override\n\tpublic void close() {\n\t\t\n\t\t\t\n\t\t\t\n\t\n\t\tif(flightGear!=null)\n\t\t\ttry {\n\t\t\t\tflightGear.getInputStream().close();\n\t\t\t\tflightGear.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\tif(server!=null)\n\t\t\ttry {\n\t\t\t\tserver.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\tif(telnetConnection!=null)\n\t\t\ttry {\n\t\t\t\ttelnetConnection.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t}",
"private void closeConnection() throws IOException {\n\t\tclientSocket.close();\n\t}",
"public void destroy(){\n\n if(myConnection !=null){\n\n try{\n myConnection.close();\n }\n catch(Exception e){\n System.out.println(\"failed to destroy\");\n }\n\n\n }\n return;\n }",
"public void quit()throws IOException {\n if(s.isConnected()) {\n reader.close();\n writer.close();\n s.close();\n System.out.println(\"Disconnected from the server.\");\n }\n }",
"public void closeConnection() {\n\t\tthis.serialPort.close();\n\t}",
"public void close() {\n try {\n closeConnection(socket);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }",
"public void closeConnection() {\r\n\t\ttry {\r\n\t\t\tthis.store.close();\r\n\t\t} catch (MessagingException e) {\r\n\t\t\tLog.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t}",
"@Override\n public final boolean close() {\n if(this.connectThread != null) this.connectThread.close();\n this.connectThread = null;\n this.disconnectFromServer();\n if(this.receiveThread != null) this.receiveThread.waitExited();\n this.receiveThread = null;\n this.dos = null;\n this.dis = null;\n return true;\n }",
"private void fecharConexao() {\n\t\t\n\t\tmanager.close();\n\t\t\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t\t\t\t\tmDelegateConnected.onConnect(false);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (mBluetoothGatt != null) {\n\t\t\t\t\t\t\t\t\t\tmBluetoothGatt.close();\n\t\t\t\t\t\t\t\t\t\tmBluetoothGatt = null;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Let the user launch a new connection request\n\t\t\t\t\t\t\t\t\twaitingForConnResp = false;\n\t\t\t\t\t\t\t\t}",
"@Override\r\n\tpublic void close()\r\n {\r\n\t\ttry\r\n {\r\n\t connection.close();\r\n }\r\n\t\tcatch (final SQLException e)\r\n {\r\n\t\t\t// Ignore, shutting down anyway\r\n }\r\n }",
"@Override\n \tpublic void connectionClosed() {\n \t\t\n \t}",
"private void closeDataConnection() {\n try {\n dataOutWriter.close();\n dataConnection.close();\n if (dataSocket != null) {\n dataSocket.close();\n }\n\n debugOutput(\"Data connection was closed\");\n } catch (IOException e) {\n debugOutput(\"Could not close data connection\");\n e.printStackTrace();\n }\n dataOutWriter = null;\n dataConnection = null;\n dataSocket = null;\n }",
"public void closeConnection() {\r\n\t\tjava.util.Date connClosedDate = new java.util.Date();\r\n\t\ttry {\r\n\t\t\tpeerNode.peer2PeerOutStream.close();\r\n\t\t\tpeerNode.peer2PeerInStream.close();\r\n\t\t\tpeerNode.peer2Peer.close();\r\n\t\t\toutStream.close();\r\n\t\t\tinStream.close();\r\n\t\t\tpeerToPeerSocket.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(connClosedDate + \": Could not close connection\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"private void cleanUp() {\n System.out.println(\"ConnectionHandler: ... cleaning up and exiting ...\");\n try {\n br.close();\n is.close();\n conn.close();\n log.close();\n } catch (IOException ioe) {\n System.err.println(\"ConnectionHandler:cleanup: \" + ioe.getMessage());\n }\n }",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();"
] | [
"0.7643529",
"0.7517283",
"0.7517047",
"0.74412906",
"0.7434357",
"0.74200165",
"0.7323317",
"0.72711265",
"0.72571474",
"0.7247032",
"0.71815896",
"0.7161029",
"0.71319157",
"0.71157753",
"0.7112255",
"0.7102967",
"0.7076734",
"0.70654297",
"0.7045493",
"0.70327955",
"0.7019535",
"0.6998662",
"0.69937736",
"0.69917107",
"0.69779414",
"0.6948163",
"0.69190365",
"0.69168895",
"0.6913349",
"0.69008756",
"0.6899724",
"0.6893806",
"0.6892531",
"0.68703985",
"0.68675774",
"0.6845202",
"0.683886",
"0.68293643",
"0.6819016",
"0.6801497",
"0.67920053",
"0.6786132",
"0.6777339",
"0.67719847",
"0.67590076",
"0.67570126",
"0.6749789",
"0.67409223",
"0.6739919",
"0.67390174",
"0.67331743",
"0.6730226",
"0.6723988",
"0.67213047",
"0.671889",
"0.67154956",
"0.67126936",
"0.6699801",
"0.669502",
"0.6694436",
"0.66942775",
"0.669424",
"0.66858655",
"0.6678762",
"0.6660277",
"0.6660277",
"0.6659159",
"0.66546595",
"0.66531724",
"0.665194",
"0.6642385",
"0.66404116",
"0.66343486",
"0.6634064",
"0.66305923",
"0.6622759",
"0.6622455",
"0.6619163",
"0.6617498",
"0.6612226",
"0.6611975",
"0.6611022",
"0.66091573",
"0.6584533",
"0.6580043",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589",
"0.6571589"
] | 0.71307695 | 13 |
TODO use examples from the book and from other references to ensure the correctness of these examples. | @Test
public void test() {
testBookExample();
// testK5();
// testK3_3();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void smell() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void method_4270() {}",
"private static void oneUserExample()\t{\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public int describeContents() { return 0; }",
"private test5() {\r\n\t\r\n\t}",
"public static void listing5_14() {\n }",
"private void strin() {\n\n\t}",
"private void kk12() {\n\n\t}",
"private void test() {\n\n\t}",
"public static void main(String[] args)\r\t{",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void mo21792Q() {\n }",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"@Override\n public void perish() {\n \n }",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"private static void cajas() {\n\t\t\n\t}",
"@Override public int describeContents() { return 0; }",
"public void mo21877s() {\n }",
"private void m50366E() {\n }",
"public static void example1() {\n // moved to edu.jas.application.Examples\n }",
"public void verliesLeven() {\r\n\t\t\r\n\t}",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"public void gored() {\n\t\t\n\t}",
"public static void example2() {\n // moved to edu.jas.application.Examples\n }",
"public static void main(String[] args) {\n \n \n \n\t}",
"public void test5() {\n\t\t\n\t}",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public void mo97908d() {\n }",
"protected boolean func_70814_o() { return true; }",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}",
"abstract int pregnancy();",
"public static void listing5_16() {\n }",
"@Test\n public void example13 () throws Exception {\n Map<String, Stmt> inputs = example2setup();\n conn.setNamespace(\"ex\", \"http://example.org/people/\");\n conn.setNamespace(\"ont\", \"http://example.org/ontology/\");\n String prefix = \"PREFIX ont: \" + \"<http://example.org/ontology/>\\n\";\n \n String queryString = \"select ?s ?p ?o where { ?s ?p ?o} \";\n TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"SELECT result:\", inputs.values(),\n statementSet(tupleQuery.evaluate()));\n \n assertTrue(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"Alice\\\" } \").evaluate());\n assertFalse(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"NOT Alice\\\" } \").evaluate());\n \n queryString = \"construct {?s ?p ?o} where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery constructQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Construct result\",\n mapKeep(new String[] {\"an\"}, inputs).values(),\n statementSet(constructQuery.evaluate()));\n \n queryString = \"describe ?s where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery describeQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Describe result\",\n mapKeep(new String[] {\"an\", \"at\"}, inputs).values(),\n statementSet(describeQuery.evaluate()));\n }",
"public static void main(String[] args) {\n \n \n \n \n }",
"private Rekenhulp()\n\t{\n\t}",
"public static void main(String[] args) {\n \r\n\t}",
"public static void doExercise3() {\n // TODO: Complete Exercise 3 Below\n\n }",
"public static void main(String[] args) {\t\n\t\t\n\t}",
"void mo57277b();",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Test\r\n\tpublic void contents() throws Exception {\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args)\r\n {\n \r\n \r\n }",
"private void poetries() {\n\n\t}",
"public static void doExercise4() {\n // TODO: Complete Exercise 4 Below\n\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void doExercise5() {\n // TODO: Complete Exercise 5 Below\n\n }",
"public static void listing5_15() {\n }",
"@Override\n public int describeContents()\n {\n return 0;\n }",
"private void returnBook(String string) {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}",
"public static void thisDemo() {\n\t}"
] | [
"0.57029736",
"0.5651054",
"0.5640278",
"0.5599577",
"0.5598459",
"0.5588469",
"0.55635494",
"0.5544989",
"0.55401856",
"0.55197203",
"0.5507415",
"0.547445",
"0.5449551",
"0.542113",
"0.5417415",
"0.54154116",
"0.5400605",
"0.53862154",
"0.5385174",
"0.5372707",
"0.53396595",
"0.5338481",
"0.53112507",
"0.5298742",
"0.52926713",
"0.5220182",
"0.5217759",
"0.5214129",
"0.52132696",
"0.52091175",
"0.52063155",
"0.51987666",
"0.51987666",
"0.51987666",
"0.51987666",
"0.51987666",
"0.51987666",
"0.5196934",
"0.519418",
"0.51877564",
"0.5185333",
"0.51803505",
"0.51801896",
"0.51801896",
"0.5164477",
"0.5158714",
"0.51526934",
"0.51495796",
"0.51470673",
"0.5142789",
"0.513738",
"0.5133568",
"0.5112042",
"0.5103888",
"0.51027685",
"0.51027685",
"0.50999004",
"0.50987595",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.50962067",
"0.5091123",
"0.5088414",
"0.50880694",
"0.50870794",
"0.5080088",
"0.5080088",
"0.5080088",
"0.5080088",
"0.5069011",
"0.5066871",
"0.50658756",
"0.50588286",
"0.50576323",
"0.50527066",
"0.50523144"
] | 0.0 | -1 |
example graph from "graph drawing" book of the orthogonalization chapter. | private void testBookExample() {
PGraph pgraph = createBookExample();
for (PNode node : pgraph.getNodes()) {
if (node.id == 4) {
PEdge edge = node.getEdge(10);
node.getEdges().remove(edge);
node.getEdges().add(edge);
}
}
System.out.println(pgraph.toString());
Util.storeGraph(pgraph, 0, false);
System.out.println(pgraph.getFaceCount() + " faces after step " + 0);
// checks if the implementation of BoyerMyrvold approach generates correct planar subgraphs.
final PGraph bmSubgraph = testSubgraphBuilder(new BoyerMyrvoldPlanarSubgraphBuilder(),
pgraph, 1);
// checks if the implementation of BoyerMyrvold approach generates correct planar subgraphs.
// final PGraph lrSubgraph = testSubgraphBuilder(new LRPlanarSubgraphBuilder(), createK5(),
// 1);
System.out.println(bmSubgraph.toString());
System.out.println(bmSubgraph.getFaceCount() + " faces after step " + 1);
Util.storeGraph(bmSubgraph, 1, false);
testEdgeInserter(bmSubgraph, 1);
Util.storeGraph(bmSubgraph, 2, false);
System.out.println(bmSubgraph.toString());
System.out.println(bmSubgraph.getFaceCount() + " faces after step " + 2);
// testEdgeInserter(lrSubgraph, 1);
// Util.storeGraph(bmSubgraph, 0, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void printGraph();",
"void makeSampleGraph() {\n\t\tg.addVertex(\"a\");\n\t\tg.addVertex(\"b\");\n\t\tg.addVertex(\"c\");\n\t\tg.addVertex(\"d\");\n\t\tg.addVertex(\"e\");\n\t\tg.addVertex(\"f\");\n\t\tg.addVertex(\"g\");\n\t\tg.addEdge(\"a\", \"b\");\n\t\tg.addEdge(\"b\", \"c\");\n\t\tg.addEdge(\"b\", \"f\");\n\t\tg.addEdge(\"c\", \"d\");\n\t\tg.addEdge(\"d\", \"e\");\n\t\tg.addEdge(\"e\", \"f\");\n\t\tg.addEdge(\"e\", \"g\");\n\t}",
"public void drawGraph(Graph graph);",
"void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}",
"public static void DrawIt (Graph<Integer,String> g) {\n\t\tISOMLayout<Integer,String> layout = new ISOMLayout<Integer,String>(g);\r\n\t\t// The Layout<V, E> is parameterized by the vertex and edge types\r\n\t\tlayout.setSize(new Dimension(650,650)); // sets the initial size of the space\r\n\t\t// The BasicVisualizationServer<V,E> is parameterized by the edge types\r\n\t\tBasicVisualizationServer<Integer,String> vv =\r\n\t\tnew BasicVisualizationServer<Integer,String>(layout);\r\n\t\tvv.setPreferredSize(new Dimension(650,650)); //Sets the viewing area size\r\n\t\tJFrame frame = new JFrame(\"Simple Graph View\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().add(vv);\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\r\n\t}",
"public static void main(String [] args){\n\t\tSystem.out.println(\"Code by github: Vinay26k\");\n\t\t // create the graph given in above figure\n int V = 5;\n Graph graph = new Graph(V);\n addEdge(graph, 0, 1);\n addEdge(graph, 0, 4);\n addEdge(graph, 1, 2);\n addEdge(graph, 1, 3);\n addEdge(graph, 1, 4);\n addEdge(graph, 2, 3);\n addEdge(graph, 3, 4);\n \n // print the adjacency list representation of \n // the above graph\n printGraph(graph);\n\t}",
"static void showGraph(ArrayList<ArrayList<Integer>> graph) {\n for(int i=0;i< graph.size(); i++ ){\n System.out.print(\"Vertex : \" + i + \" : \");\n for(int j = 0; j < graph.get(i).size(); j++) {\n System.out.print(\" -> \"+ graph.get(i).get(j));\n }\n }\n }",
"void graph4() {\n\t\tconnect(\"8\", \"9\");\n\t\tconnect(\"3\", \"1\");\n\t\tconnect(\"3\", \"2\");\n\t\tconnect(\"3\", \"9\");\n\t\tconnect(\"4\", \"3\");\n\t\t//connect(\"4\", \"5\");\n\t\t//connect(\"4\", \"7\");\n\t\t//connect(\"5\", \"7\");\t\t\n\t}",
"public OrientGraph getGraph();",
"void graph3() {\n\t\tconnect(\"0\", \"0\");\n\t\tconnect(\"2\", \"2\");\n\t\tconnect(\"2\", \"3\");\n\t\tconnect(\"3\", \"0\");\n\t}",
"Graph testGraph();",
"public void buildGraph(){\n\t}",
"TripleGraph createTripleGraph();",
"public Graph getGraph();",
"public void testaGraph() {\n\t\tEstacaoDAO a = new EstacaoDAO();\n\t\ta.carregarEstacoes();\n\t\tLinha b = new Linha(\"a\");\n\t\tb.loadAllStations(a);\n\t\tb.shortestPath(a,\"Curado\",\"Recife\");\n\t}",
"private static void printGraph(ArrayList<Vertex> graph) {\n\t\tSystem.out.print(\"---GRAPH PRINT START---\");\n\t\tfor (Vertex vertex: graph) {\n\t\t\tSystem.out.println(\"\\n\\n\" + vertex.getValue());\n\t\t\tSystem.out.print(\"Adjacent nodes: \");\n\t\t\tfor (Vertex v: vertex.getAdjacencyList()) {\n\t\t\t\tSystem.out.print(v.getValue() + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---GRAPH PRINT END---\\n\\n\");\n\t}",
"public void drawGraph()\n\t{\n\t\tMatrixStack transformStack = new MatrixStack();\n\t\ttransformStack.getTop().mul(getWorldTransform());\n\t\tdrawSelfAndChildren(transformStack);\n\t}",
"public interface IUndirectedGraph extends IGraph{\n\n /**\n * Check the presence of an edge between two nodes.\n *\n * @param x the source node\n * @param y the destination node\n * @return true if there is an edge between x and y\n */\n default boolean isEdge(int x, int y) {\n return getNeighbors(x).contains(y);\n }\n\n /**\n * Remove the edge between two nodes if exist.\n * @param x the source node\n * @param y the destination node\n */\n void removeEdge(int x, int y);\n\n /**\n * Add an edge between two nodes, if not already present.\n * The two nodes must be distincts.\n * @param x the source node\n * @param y the destination node\n */\n void addEdge(int x, int y);\n\n /**\n * Get the neighboors of a node\n * @param x the node\n * @return a new int array representing the neighbors\n */\n List<Integer> getNeighbors(int x);\n\n @Override\n default int[][] getGraph() {\n int order = getOrder();\n int[][] adjencyMatrix = new int[order][order];\n for (int i = 0; i < order; i++) {\n List<Integer> succ = getNeighbors(i);\n for (Integer s : succ) {\n adjencyMatrix[i][s] = 1;\n }\n }\n return adjencyMatrix;\n }\n\n @Override\n default boolean isDirected(){\n return false;\n }\n}",
"private static void simpleGraphDemo() throws CALExecutorException {\r\n \r\n // Construct a graph by starting with an empty graph and adding edges and vertices to it.\r\n final ImmutableDirectedGraph<String> graph1 = ImmutableDirectedGraph\r\n .<String>emptyGraph(executionContext)\r\n .addEdge(Pair.make(\"one\", \"two\"))\r\n .addVertex(\"three\");\r\n \r\n // graph2 is graph1 with one more edge - this does not modify graph1\r\n final ImmutableDirectedGraph<String> graph2 = graph1.addEdge(Pair.make(\"two\", \"three\"));\r\n \r\n // Let's look at graph2, both via its toString() implementation\r\n System.out.println(graph2);\r\n // ...and via the support to show the structure of a CalValue\r\n System.out.println(DebugSupport.showInternal(graph2.getCalValue()));\r\n \r\n // removeEdge does not modify graph1\r\n System.out.println(graph1.removeEdge(Pair.make(\"one\", \"two\")));\r\n // ...as can be witnessed by displaying graph1\r\n System.out.println(graph1);\r\n }",
"public Vertex[] createGraph(){\n\t\t /* constructing a graph using matrices\n\t\t * If there is a connection between two adjacent LETTERS, the \n\t * cell will contain a num > 1, otherwise a 0. A value of -1 in the\n\t * cell denotes that the cities are not neighbors.\n\t * \n\t * GRAPH (with weights b/w nodes):\n\t * E+---12-------+B--------18-----+F----2---+C\n\t * +\t\t\t\t+\t\t\t\t +\t\t +\n\t * |\t\t\t\t|\t\t\t\t/\t\t |\n\t * |\t\t\t\t|\t\t\t |\t\t |\n\t * |\t\t\t\t|\t\t\t |\t\t 10\n\t * 24\t\t\t\t8\t\t\t 8\t |\n\t * |\t\t\t\t|\t\t\t |\t\t +\n\t * |\t\t\t\t|\t\t\t | H <+---11---I\n\t * |\t\t\t\t|\t\t\t /\n\t * +\t\t\t\t+\t\t\t +\n\t * G+---12----+A(start)+---10--+D\n\t * \n\t * NOTE: I is the only unidirectional node\n\t */\n\t\t\n\t\tint cols = 9;\n\t\tint rows = 9;\n\t\t//adjacency matrix\n\t\t\t\t //A B C D E F G H I\n\t int graph[][] = { {0,8,0,10,0,0,12,0,0}, //A\n\t {8,0,0,0,12,18,0,0,0}, //B\n\t {0,0,0,0,0,2,0,10,0}, //C\n\t {10,0,0,0,0,8,0,0,0}, //D\n\t {0,12,0,0,0,0,24,0,0}, //E\n\t {0,18,2,8,0,0,0,0,0}, //F\n\t {12,0,0,0,0,0,24,0,0}, //G\n\t {0,0,10,0,0,0,0,0,11}, //H\n\t {0,0,0,0,0,0,0,11,0}}; //I\n\t \n\t //initialize stores vertices\n\t Vertex[] vertices = new Vertex[rows]; \n\n\t //Go through each row and collect all [i,col] >= 1 (neighbors)\n\t int weight = 0; //weight of the neighbor\n\t for (int i = 0; i < rows; i++) {\n\t \tVector<Integer> vec = new Vector<Integer>(rows);\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tif (graph[i][j] >= 1) {\n\t\t\t\t\tvec.add(j);\n\t\t\t\t\tweight = j;\n\t\t\t\t}//is a neighbor\n\t\t\t}\n\t\t\tvertices[i] = new Vertex(Vertex.getVertexName(i), vec);\n\t\t\tvertices[i].state = weight;\n\t\t\tvec = null; // Allow garbage collection\n\t\t}\n\t return vertices;\n\t}",
"public static strictfp void main(String... args) {\n\t\tArrayList<Vertex> graph = new ArrayList<>();\r\n\t\tHashMap<Character, Vertex> map = new HashMap<>();\r\n\t\t// add vertices\r\n\t\tfor (char c = 'a'; c <= 'i'; c++) {\r\n\t\t\tVertex v = new Vertex(c);\r\n\t\t\tgraph.add(v);\r\n\t\t\tmap.put(c, v);\r\n\t\t}\r\n\t\t// add edges\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tif (v.getNodeId() == 'a') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'b') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'c') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'd') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'e') {\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'f') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t} else if (v.getNodeId() == 'g') {\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'h') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'i') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t// graph created\r\n\t\t// create disjoint sets\r\n\t\tDisjointSet S = null, V_S = null;\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tchar c = v.getNodeId();\r\n\t\t\tif (c == 'a' || c == 'b' || c == 'd' || c == 'e') {\r\n\t\t\t\tif (S == null) {\r\n\t\t\t\t\tS = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (V_S == null) {\r\n\t\t\t\t\tV_S = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(V_S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Disjoint sets created\r\n\t\tfor (Vertex u: graph) {\r\n\t\t\tfor (Vertex v: u.getAdjacents()) {\r\n\t\t\t\tif (DisjointSet.findSet((DisjointSet) u.getDisjointSet()) == \r\n\t\t\t\t DisjointSet.findSet((DisjointSet) v.getDisjointSet())) {\r\n\t\t\t\t\tSystem.out.println(\"The cut respects (\" + u.getNodeId() + \", \" + v.getNodeId() + \").\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tVertex v1, v2, v3, v4, v5, v6, v7;\n\t\tv1 = new Vertex(\"v1\");\n\t\tv2 = new Vertex(\"v2\");\n\t\tv3 = new Vertex(\"v3\");\n\t\tv4 = new Vertex(\"v4\");\n\t\tv5 = new Vertex(\"v5\");\n\t\tv6 = new Vertex(\"v6\");\n\t\tv7 = new Vertex(\"v7\");\n\n\t\tv1.addAdjacency(v2, 2);\n\t\tv1.addAdjacency(v3, 4);\n\t\tv1.addAdjacency(v4, 1);\n\n\t\tv2.addAdjacency(v1, 2);\n\t\tv2.addAdjacency(v4, 3);\n\t\tv2.addAdjacency(v5, 10);\n\n\t\tv3.addAdjacency(v1, 4);\n\t\tv3.addAdjacency(v4, 2);\n\t\tv3.addAdjacency(v6, 5);\n\n\t\tv4.addAdjacency(v1, 1);\n\t\tv4.addAdjacency(v2, 3);\n\t\tv4.addAdjacency(v3, 2);\n\t\tv4.addAdjacency(v5, 2);\n\t\tv4.addAdjacency(v6, 8);\n\t\tv4.addAdjacency(v7, 4);\n\n\t\tv5.addAdjacency(v2, 10);\n\t\tv5.addAdjacency(v4, 2);\n\t\tv5.addAdjacency(v7, 6);\n\n\t\tv6.addAdjacency(v3, 5);\n\t\tv6.addAdjacency(v4, 8);\n\t\tv6.addAdjacency(v7, 1);\n\n\t\tv7.addAdjacency(v4, 4);\n\t\tv7.addAdjacency(v5, 6);\n\t\tv7.addAdjacency(v6, 1);\n\n\t\tArrayList<Vertex> weightedGraph = new ArrayList<Vertex>();\n\t\tweightedGraph.add(v1);\n\t\tweightedGraph.add(v2);\n\t\tweightedGraph.add(v3);\n\t\tweightedGraph.add(v4);\n\t\tweightedGraph.add(v5);\n\t\tweightedGraph.add(v6);\n\t\tweightedGraph.add(v7);\n\t\t\n\t\tdijkstra( weightedGraph, v7 );\n\t\tprintPath( v1 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v2 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v3 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v4 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v5 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v6 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v7 );\n\t\tSystem.out.println(\"\");\n\t}",
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}",
"public static void main(String[] args) throws IOException {\n\n // read in graph\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt(), m = scanner.nextInt();\n ArrayList<Integer>[] graph = new ArrayList[n];\n for (int i = 0; i < n; i++)\n graph[i] = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n scanner.nextLine();\n int u = scanner.nextInt() - 1, v = scanner.nextInt() - 1; // convert to 0 based index\n graph[u].add(v);\n graph[v].add(u);\n }\n\n int[] dist = new int[n];\n Arrays.fill(dist, -1);\n // partition the vertices in each of the components of the graph\n for (int u = 0; u < n; u++) {\n if (dist[u] == -1) {\n // bfs\n Queue<Integer> queue = new LinkedList<>();\n queue.add(u);\n dist[u] = 0;\n while (!queue.isEmpty()) {\n int w = queue.poll();\n for (int v : graph[w]) {\n if (dist[v] == -1) { // unvisited\n dist[v] = (dist[w] + 1) % 2;\n queue.add(v);\n } else if (dist[w] == dist[v]) { // visited and form a odd cycle\n System.out.println(-1);\n return;\n } // otherwise the dist will not change\n }\n }\n }\n\n }\n\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));\n // vertices with the same dist are in the same group\n List<Integer>[] groups = new ArrayList[2];\n groups[0] = new ArrayList<>();\n groups[1] = new ArrayList<>();\n for (int u = 0; u < n; u++) {\n groups[dist[u]].add(u + 1);\n }\n for (List<Integer> g: groups) {\n writer.write(String.valueOf(g.size()));\n writer.newLine();\n for (int u: g) {\n writer.write(String.valueOf(u));\n writer.write(' ');\n }\n writer.newLine();\n }\n\n writer.close();\n\n\n }",
"public void drawTreeOfPythagoras(Graphics g, Point2F A, Point2F B)\r\n {\r\n // Quit if distance is <= 2\r\n if(A.distanceSq(B) <= pSize)\r\n return;\r\n // Calculate C and D\r\n // Find vector AB\r\n Point2F AB = B.subtract(A);\r\n // Rotate by 90 degrees CCW\r\n Point2F ABrotated = new Point2F(-AB.y, AB.x);\r\n\r\n Point2F C = B.add(ABrotated);\r\n Point2F D = A.add(ABrotated);\r\n\r\n // Calculate E\r\n Point2F E = new Point2F((C.x + D.x) / 2, (C.y + D.y) / 2).add(ABrotated.scale(.5f));\r\n\r\n // Fill the square and triangle\r\n g.fillPolygon(new int[] {iX(A.x), iX(B.x), iX(C.x), iX(D.x)}, new int[] {iY(A.y), iY(B.y), iY(C.y), iY(D.y)}, 4);\r\n g.fillPolygon(new int[] {iX(D.x), iX(C.x), iX(E.x)}, new int[] {iY(D.y), iY(C.y), iY(E.y)}, 3);\r\n\r\n // Draw the square and triangle\r\n g.drawLine(iX(A.x), iY(A.y), iX(B.x), iY(B.y));\r\n g.drawLine(iX(B.x), iY(B.y), iX(C.x), iY(C.y));\r\n g.drawLine(iX(C.x), iY(C.y), iX(D.x), iY(D.y));\r\n g.drawLine(iX(D.x), iY(D.y), iX(A.x), iY(A.y));\r\n g.drawLine(iX(D.x), iY(D.y), iX(C.x), iY(C.y));\r\n g.drawLine(iX(C.x), iY(C.y), iX(E.x), iY(E.y));\r\n g.drawLine(iX(E.x), iY(E.y), iX(D.x), iY(D.y));\r\n\r\n //And back to the top\r\n drawTreeOfPythagoras(g, D, E);\r\n drawTreeOfPythagoras(g, E, C);\r\n }",
"public static void runTest() {\n Graph mnfld = new Graph();\n float destTank = 7f;\n\n // Adding Tanks\n mnfld.addPipe( new Node( 0f, 5.0f ) );\n mnfld.addPipe( new Node( 1f, 5.0f ) );\n mnfld.addPipe( new Node( 7f, 5.0f ) );\n\n // Adding Pipes\n mnfld.addPipe( new Node( 2f, 22f, 100f ) );\n mnfld.addPipe( new Node( 3f, 33f, 150f ) );\n mnfld.addPipe( new Node( 4f, 44f, 200f ) );\n mnfld.addPipe( new Node( 5f, 55f, 250f ) );\n mnfld.addPipe( new Node( 6f, 66f, 300f ) );\n mnfld.addPipe( new Node( 8f, 88f, 200f ) );\n mnfld.addPipe( new Node( 9f, 99f, 150f ) );\n mnfld.addPipe( new Node( 10f, 1010f, 150f ) );\n mnfld.addPipe( new Node( 20f, 2020f, 150f ) );\n\n // Inserting Edges to the graph\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 3f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 22f ), mnfld.getPipe( 4f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 7f ), 500f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 55f ), mnfld.getPipe( 6f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 7f ), 100f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 8f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 88f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 9f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 99f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 1010f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1010f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 20f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 2020f ), mnfld.getPipe( 3f ), 1f ) );\n\n // -- Running Dijkstra & Finding shortest Paths -- //\n// Dijkstra.findPaths( mnfld, 10, \"0.0\", destTank );\n//\n// mnfld.restoreDroppedConnections();\n//\n// System.out.println( \"\\n\\n\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( 0f ) );\n Dijkstra.mergePaths( mnfld, 1f, mnfld.getPipe( destTank ).getPath(), mnfld.getPipe( destTank ) );\n\n }",
"public Graph(){\n\t\tthis.sizeE = 0;\n\t\tthis.sizeV = 0;\n\t}",
"public static void main(String[] args) {\n Graph g = new Graph(4);\n\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n System.out.println(\"Transitive closure \" +\n \"matrix is\");\n\n g.transitiveClosure();\n\n }",
"public static void main(String[] args) {\n\n G g = new G(6, true, new int[][] { {0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 0}, {3, 5} });\n\n g.print();\n g.dfs();\n g.bfs();\n\n System.out.println();\n System.out.println();\n\n // 1 -> 2\n // 0 / \\/\n // \\ 4 -> 3 -> 5\n\n G gDirected = new G(6, false, new int[][] { {0, 1}, {1, 2}, {2, 3}, {3, 5}, {0, 4}, {4, 3} });\n\n gDirected.print();\n gDirected.dfs();\n gDirected.bfs();\n gDirected.topoSort();\n }",
"public interface Graph {\n\n\t/**\n\t * Method to add the edge from start to end to the graph.\n\t * Adding self-loops is not allowed.\n\t * @param start start vertex\n\t * @param end end vertex\n\t */\n\tpublic void addEdge(int start, int end);\n\n\t/**\n\t * Method to add the edge with the given weight to the graph from start to end.\n\t * Adding self-loops is not allowed.\n\t * @param start number of start vertex\n\t * @param end number of end vertex\n\t * @param weight weight of edge\n\t */\n\tpublic void addEdge(int start, int end, double weight);\n\n\t/**\n\t * Method to add a vertex to the graph.\n\t */\n\tpublic void addVertex();\n\t\n\t/**\n\t * Method to add multiple vertices to the graph.\n\t * @param n number of vertices to add\n\t */\n\tpublic void addVertices(int n);\n\n\t/**\n\t * Returns all neighbors of the given vertex v (all vertices i with {i,v} in E or (i,v) or (v,i) in E).\n\t * @param v vertex whose neighbors shall be returned\n\t * @return List of vertices adjacent to v\n\t */\n\tpublic List<Integer> getNeighbors(int v);\n\n\t/**\n\t * Returns a list containing all predecessors of v. In an undirected graph all neighbors are returned.\n\t * @param v vertex id\n\t * @return list containing all predecessors of v\n\t */\n\tpublic List<Integer> getPredecessors(int v);\n\n\t/**\n\t * Returns a list containing all successors v. In an undirected graph all neighbors are returned.\n\t * @param v vertex id\n\t * @return list containing all edges starting in v\n\t */\n\tpublic List<Integer> getSuccessors(int v);\n\n\t/**\n\t * Method to get the number of vertices.\n\t * @return number of vertices\n\t */\n\tpublic int getVertexCount();\n\n\t/**\n\t * Method to get the weight of the edge {start, end} / the arc (start, end).\n\t * @param start start vertex of edge / arc\n\t * @param end end vertex of edge / arc\n\t * @return Double.POSITIVE_INFINITY, if the edge does not exist, c_{start, end} otherwise\n\t */\n\tpublic double getEdgeWeight(int start, int end);\n\n\t/**\n\t * Method to test whether the graph contains the edge {start, end} / the arc (start, end).\n\t * @param start start vertex of the edge\n\t * @param end end vertex of the edge\n\t */\n\tpublic boolean hasEdge(int start, int end);\n\n\t/**\n\t * Method to remove an edge from the graph, defined by the vertices start and end.\n\t * @param start start vertex of the edge\n\t * @param end end vertex of the edge\n\t */\n\tpublic void removeEdge(int start, int end);\n\n\t/**\n\t * Method to remove the last vertex from the graph.\n\t */\n\tpublic void removeVertex();\n\n\t/**\n\t * Returns whether the graph is weighted.\n\t * A graph is weighted if an edge with weight different from 1.0 has been added to the graph.\n\t * @return true if the graph is weighted\n\t */\n\tpublic boolean isWeighted();\n\n\t/**\n\t * Returns whether the graph is directed.\n\t * @return true if the graph is directed\n\t */\n\tpublic boolean isDirected();\n\n}",
"public static void printGraph(Graph g) {\r\n\t\tfor (int i = 0; i < g.V; i++) {\r\n\t\t\tSystem.out.print(\"Vertex \" + i + \": \");\r\n\t\t\t\r\n\t\t\tif (g.L.get(i).size() > 0) {\r\n\t\t\t\tSystem.out.print(g.L.get(i).get(0).printEdge());\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (int r = 1; r < g.L.get(i).size(); r++) {\r\n\t\t\t\tSystem.out.print(\", \" + g.L.get(i).get(r).printEdge());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}",
"public static void main(String[] args) {\n\n Graph myGraph = new Graph();\n myGraph.addNode(\"8\");\n myGraph.addNode(\"1\");\n myGraph.addNode(\"2\");\n myGraph.addNode(\"9\");\n myGraph.addNode(\"7\");\n myGraph.addNode(\"5\");\n myGraph.addEdge(\"8\" , \"1\" , 50);\n myGraph.addEdge(\"5\" , \"1\" , 70);\n myGraph.addEdge(\"7\" , \"5\", 20);\n myGraph.addEdge(\"8\" , \"9\", 100);\n myGraph.addEdge(\"8\" , \"2\", 40);\n String[] trip = {\"8\" , \"1\" , \"5\"};\n String[] trip2 = {\"8\" , \"5\"};\n String[] trip3 = {\"8\" , \"1\" , \"5\" , \"7\" , \"5\" , \"1\" , \"8\" , \"9\"};\n String[] trip4 = {\"8\" , \"9\" , \"5\" };\n String[] trip5 = {\"8\"};\n String[] trip6 = {\"8\" , \"2\"};\n// System.out.println(myGraph);\n// System.out.println(myGraph.getNodes());\n// System.out.println(myGraph.getNeighbors(\"8\"));\n// System.out.println(myGraph.getNeighbors(\"7\"));\n// System.out.println(myGraph.getNeighbors(\"5\"));\n// System.out.println(myGraph.size());\n// System.out.println(myGraph.breadthFirst(\"8\"));\n// System.out.println(myGraph.weightList);\n// System.out.println(myGraph.breadthFirst(\"7\"));\n// System.out.println(myGraph.breadthFirst(\"5\"));\n// System.out.println(myGraph.businessTrip(\"8\",trip));\n// System.out.println(myGraph.businessTrip(\"8\",trip2));\n// System.out.println(myGraph.businessTrip(\"8\",trip3));\n// System.out.println(myGraph.businessTrip(\"8\",trip4));\n// System.out.println(myGraph.businessTrip(\"8\",trip5));\n// System.out.println(myGraph.businessTrip(\"8\",trip6));\n System.out.println(myGraph.depthFirst(\"8\"));\n }",
"public void drawGraph(Graph graph, GraphPalette palette);",
"public static void main(String[] args) {\n\t\tGraph g = new Graph(5, false);\r\n\t\tg.addConnection(1, 2, 15);\r\n\t\tg.addConnection(1, 3, 5);\r\n\t\tg.addConnection(1, 4, 1);\r\n\t\t\r\n\t\tg.addConnection(2, 3, 5);\r\n\t\t//g.addConnection(2, 5, 1);\r\n\t\t\r\n\t\t//g.addConnection(4, 5, 1);\r\n\r\n\t\tSystem.out.println(g);\r\n\t\tg.dijkstra(1);\r\n\t\tg.prim(1);\r\n\t\t\r\n\t}",
"public static void exampleGraph() {\n\t\t// create a simple FNSS topology\n\t\tTopology topology = new Topology();\n\t\ttopology.addEdge(\"1\", \"2\", new Edge());\n\t\ttopology.addEdge(\"2\", \"3\", new Edge());\n\t\t\n\t\t// convert to JGraphT\n\t\tGraph<String, Edge> graph = JGraphTConverter.getGraph(topology);\n\t\t\n\t\t// Find shortest paths\n\t\tString source = \"3\";\n\t\tString destination = \"1\";\n\t\tList<Edge> sp = DijkstraShortestPath.findPathBetween(graph, source, destination);\n\t\t\n\t\t// Print results\n\t\tSystem.out.println(\"Shortest path from \" + source + \" to \" + destination + \":\");\n\t\tfor (Edge e : sp) {\n\t\t\tSystem.out.println(graph.getEdgeSource(e) + \" -> \" + graph.getEdgeTarget(e));\n\t\t}\n\t}",
"public void printAdjacencyMatrix();",
"@Override\n\tpublic void paint(Graphics g) {\n\t\tGraphics2D g2d = (Graphics2D) g;\n\t\tg2d.setColor(Color.RED);\n\t\t\n\t\t // Compute Nodes\n\t\t float inc = (float) ((180*2.0)/size);\n\t\t int x[] = new int[size];\n\t\t int y[] = new int[size];\n\t\t float d= 0;\n\t\t d= 180 - inc/2;\n\t\t for (int i=0; i<size; i++){//$d=M_PI-$inc/2.0; $i<$k; $i++, $d+=$inc) {\n\t\t x[i] = (int) ((width/2) - (Math.sin(Math.toRadians(d))*(width/2)*(0.8)));\n\t\t y[i] = (int) (high - ((high/2) - (Math.cos(Math.toRadians(d)))*(high/2)*(0.8)));\n\t\t d+= inc;\n\t\t }\n\t\t for (int i=0; i<size; i++){\n\t\t g2d.fillOval(x[i], y[i], 2*rad, 2*rad);\n\t\t }\n\t\t \n\t\t \n\t\t for (int i=0; i<size; i++)\n\t\t\t for (int j=0; j<size; j++)\n\t\t\t {\n\t\t\t \t if (i != j && adj[i*size + j] == '1') {\n\t\t\t \t\t if(directed)\n\t\t\t \t\t {\n\t\t\t \t\t\t //Line2D lin = new Line2D.Float(x[i]+rad, y[i]+rad,x[j]+rad, y[j]+rad);\n\t\t\t\t \t \t//\tg2d.draw(lin);\n\t\t\t \t\t\t \n\t\t\t \t\t\t DrawArrow(g2d, x[i]+rad, y[i]+rad,x[j]+rad, y[j]+rad);\n\t\t\t \t\t\t \n\t\t\t \t\t }\n\t\t\t \t\t else\n\t\t\t \t\t {\n\t\t\t \t\t\t Line2D lin = new Line2D.Float(x[i]+rad, y[i]+rad,x[j]+rad, y[j]+rad);\n\t\t\t\t \t \t\tg2d.draw(lin);\n\t\t\t \t\t }\n\t\t\t \t\t \n\t\t\t \t }\n\t\t\t }\n\t\t \n\t\t \n\t\t/*\n\t\tg2d.fillOval(0, 0, 30, 30);\n\t\tg2d.drawOval(0, 50, 30, 30);\t\t\n\t\tg2d.fillRect(50, 0, 30, 30);\n\t\tg2d.drawRect(50, 50, 30, 30);\n\n\t\tg2d.draw(new Ellipse2D.Double(0, 100, 30, 30));*/\n\t}",
"public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public abstract String rawGraphToString();",
"public void printDGraph(){\n System.out.println(this.toString());\n }",
"public static void main(String[] args) {\nDGraph g=new DGraph();\r\nDirectedDFS d=new DirectedDFS(g);\r\nfor(Iterator<Integer> i=d.preorder.iterator();i.hasNext();)\r\n{\r\n\tSystem.out.print(i.next()+\" \");\r\n}\r\nSystem.out.println();\r\nfor(Iterator<Integer> i=d.postorder.iterator();i.hasNext();)\r\n{\r\n\tSystem.out.print(i.next()+\" \");\r\n}\r\nSystem.out.println();\r\n\r\n/*for(Iterator i=d.topologicalorder.iterator();i.hasNext();)\r\n{\r\n\tSystem.out.print(i.next()+\" \");\r\n}\r\nSystem.out.println();*/\r\n\r\n\r\n\tfor(int w:d.reversepost())\r\n\t\tSystem.out.print(w+\" \");\r\n\t//System.out.println(d.topologicalorder.pop());\r\n\t}",
"public Graph(){\r\n this.listEdges = new ArrayList<>();\r\n this.listNodes = new ArrayList<>();\r\n this.shown = true;\r\n }",
"public void displayGraph() {\r\n\t\tgraph.display();\r\n\t}",
"@Test\n public void tae0()\n {\n Graph g = new Graph(2);\n g.addEdge(0, 1);\n System.out.println(g);\n assertEquals(g.toString(), \"numNodes: 2\\nedges: [[false, true], [false, false]]\");\n }",
"String targetGraph();",
"public static void main(String[] args) {\n\tGraph g = new Graph(9);\n\tg.addEdge(0,2);\n\tg.addEdge(0,5);\n\tg.addEdge(2,3);\n\tg.addEdge(2,4);\n\tg.addEdge(5,3);\n\tg.addEdge(5,6);\n\tg.addEdge(3,6);\n\tg.addEdge(6,7);\n\tg.addEdge(6,8);\n\tg.addEdge(6,4);\n\tg.addEdge(7,8);\n\t \n\tg.printGraph();\n\tSystem.out.println(\"Number of edges: \" + numEdges(g));\n\t\n }",
"public static void main(String args[])\n{\n\t// Create a graph\n\tGraph newGraph = new Graph(5);\n\t\n\t// Add each of the edges\n\tnewGraph.addEdge(0, 1);\n\tnewGraph.addEdge(0, 2);\n\tnewGraph.addEdge(1, 2);\n\tnewGraph.addEdge(2, 0);\n\tnewGraph.addEdge(2, 3);\n\t\n\t\n}",
"public interface Graph extends Container {\n\n /**\n * returns how many elements are in the container.\n *\n * @return int = number of elements in the container.\n */\n public int size();\n\n /**\n * returns true if the container is empty, false otherwise.\n *\n * @return boolean true if container is empty\n */\n public boolean isEmpty();\n\n /**\n * return the number of vertices in the graph\n * \n * @return number of vertices in the graph\n */\n public int numVertices();\n\n /**\n * returns the number for edges in the graph\n * \n * @return number of edges in the graph\n */\n public int numEdges();\n\n /**\n * returns an Enumeration of the vertices in the graph\n * \n * @return vertices in the graph\n */\n public Enumeration vertices();\n\n \n /**\n * returns an Enumeration of the edges in the graph\n * \n * @return edges in the graph\n */\n public Enumeration edges();\n\n\n /**\n * Returns an enumeration of the directed edges in the Graph\n * \n * @return an enumeration of the directed edges in the Graph\n */\n public Enumeration directedEdges();\n\n /**\n * Returns an enumeration of the directed edges in the Graph\n * \n * @return an enumeration of the directed edges in the Graph\n */\n public Enumeration undirectedEdges();\n\n /**\n * returns the degree of the passed in Vertex vp\n * \n * @param vp Vertex to return the degree of\n * @return degree of Vertex vp\n * @exception InvalidPositionException\n * thrown when vp is invalid for Vertex container V\n */\n public int degree(Position vp) throws InvalidPositionException;\n\n /**\n * returns the in degree of the passed in Vertex vp\n * \n * @param vp Vertex to return the in degree of\n * @return in degree of Vertex vp\n * @exception InvalidPositionException\n * thrown when vp is invalid for Vertex container V\n */\n public int inDegree(Position vp) throws InvalidPositionException;\n\n /**\n * returns the out degree of the passed in Vertex vp\n * \n * @param vp Vertex to return the out degree of\n * @return out degree of Vertex vp\n * @exception InvalidPositionException\n * thrown when vp is invalid for Vertex container V\n */\n public int outDegree(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an enumeration of vertices adjacent to Vertex vp\n * \n * @param vp Position of Vertex to return the adjacent vertices of\n * @return enumeration of vertices adjacent to Vertex vp\n * @exception InvalidPositionException\n * thrown if vp is not a valid Vertex for this Graph\n */\n public Enumeration adjacentVertices(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an enumeration of vertices in adjacent to Vertex vp\n * \n * @param vp Position of Vertex to return the in adjacent vertices of\n * @return enumeration of vertices in adjacent to Vertex vp\n * @exception InvalidPositionException\n * thrown if vp is not a valid Vertex for this Graph\n */\n public Enumeration inAdjacentVertice(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an enumeration of vertices out adjacent to Vertex vp\n * \n * @param vp Position of Vertex to return the out adjacent vertices of\n * @return enumeration of vertices out adjacent to Vertex vp\n * @exception InvalidPositionException\n * thrown if vp is not a valid Vertex for this Graph\n */\n public Enumeration outAdjacentVertices(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an Enumeration of the edges incident upon the\n * Vertex in Position vp\n * \n * @param vp the Position to holding the Vertex to return the\n * Enumeration of\n * @return the Enumeration of edges incident upon vp\n * @exception InvalidPositionException\n */\n public Enumeration incidentEdges(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an Enumeration of the edges in incident upon the\n * Vertex in Position vp\n * \n * @param vp the Position to holding the Vertex to return the\n * Enumeration of\n * @return the Enumeration of edges in incident upon vp\n * @exception InvalidPositionException\n */\n public Enumeration inIncidentEdges(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an Enumeration of the edges out incident upon the\n * Vertex in Position vp\n * \n * @param vp the Position to holding the Vertex to return the\n * Enumeration of\n * @return the Enumeration of edges out incident upon vp\n * @exception InvalidPositionException\n */\n public Enumeration outIncidentEdges(Position vp) throws InvalidPositionException;\n\n public Position[] endVertices(Position ep) throws InvalidPositionException;\n\n /**\n * Returns the Vertex on Edge ep opposite from Vertex vp\n * \n * @param vp Vertex to find opposite of\n * @param ep Edge containing the vertices\n * @return \n * @exception InvalidPositionException\n */\n public Position opposite(Position vp, Position ep) throws InvalidPositionException;\n\n /**\n * Determine whether or not two vertices are adjacent\n * \n * @param vp Position of one Vertex to check\n * @param wp Position of other Vertex to check\n * @return true if they are adjacent, false otherwise\n * @exception InvalidPositionException\n * thrown if either Position is invalid for this container\n */\n public boolean areAdjacent(Position vp, Position wp) throws InvalidPositionException;\n\n /**\n * Returns the destination Vertex of the given Edge Position\n * \n * @param ep Edge Position to return the destination Vertex of\n * @return the destination Vertex of the given Edge Position\n * @exception InvalidPositionException\n * thrown if the Edge Position is invalid\n */\n public Position destination(Position ep) throws InvalidPositionException;\n\n /**\n * Returns the origin Vertex of the given Edge Position\n * \n * @param ep Edge Position to return the origin Vertex of\n * @return the origin Vertex of the given Edge Position\n * @exception InvalidPositionException\n * thrown if the Edge Position is invalid\n */\n public Position origin(Position ep) throws InvalidPositionException;\n\n /**\n * Returns true if the given Edge Position is directed,\n * otherwise false\n * \n * @param ep Edge Position to check directed on\n * @return true if directed, otherwise false\n * @exception InvalidPositionException\n */\n public boolean isDirected(Position ep) throws InvalidPositionException;\n\n /**\n * Inserts a new undirected Edge into the graph with end\n * Vertices given by Positions vp and wp storing Object o,\n * returns a Position object for the new Edge\n * \n * @param vp Position holding one Vertex endpoint\n * @param wp Position holding the other Vertex endpoint\n * @param o Object to store at the new Edge\n * @return Position containing the new Edge object\n * @exception InvalidPositionException\n * thrown if either of the given vertices are invalid for\n * this container\n */\n public Position insertEdge(Position vp,Position wp, Object o) throws InvalidPositionException;\n\n /**\n * Inserts a new directed Edge into the graph with end\n * Vertices given by Positions vp, the origin, and wp,\n * the destination, storing Object o,\n * returns a Position object for the new Edge\n * \n * @param vp Position holding the origin Vertex\n * @param wp Position holding the destination Vertex\n * @param o Object to store at the new Edge\n * @return Position containing the new Edge object\n * @exception InvalidPositionException\n * thrown if either of the given vertices are invalid for\n * this container\n */\n public Position insertDirectedEdge(Position vp, Position wp, Object o) throws InvalidPositionException;\n\n /**\n * Inserts a new Vertex into the graph holding Object o\n * and returns a Position holding the new Vertex\n * \n * @param o the Object to hold in this Vertex\n * @return the Position holding the Vertex\n */\n public Position insertVertex(Object o);\n\n /**\n * This method removes the Vertex held in the passed in\n * Position from the Graph\n * \n * @param vp the Position holding the Vertex to remove\n * @exception InvalidPositionException\n * thrown if the given Position is invalid for this container\n */\n public void removeVertex(Position vp) throws InvalidPositionException;\n\n /**\n * Used to remove the Edge held in Position ep from the Graph\n * \n * @param ep the Position holding the Edge to remove\n * @exception InvalidPositionException\n * thrown if Position ep is invalid for this container\n */\n public void removeEdge(Position ep) throws InvalidPositionException;\n\n /**\n * This routine is used to change a directed Edge into an\n * undirected Edge\n * \n * @param ep a Position holding the Edge to change from directed to\n * undirected\n * @exception InvalidPositionException\n */\n public void makeUndirected(Position ep) throws InvalidPositionException;\n\n /**\n * This routine can be used to reverse the diretion of a \n * directed Edge\n * \n * @param ep a Position holding the Edge to reverse\n * @exception InvalidPositionException\n * thrown if the given Position is invalid for this container\n */\n public void reverseDirection(Position ep) throws InvalidPositionException;\n\n /**\n * Changes the direction of the given Edge to be out incident\n * upone the Vertex held in the given Position\n * \n * @param ep the Edge to change the direction of\n * @param vp the Position holding the Vertex that the Edge is going\n * to be out incident upon\n * @exception InvalidPositionException\n * thrown if either of the given positions are invalid for this container\n */\n public void setDirectionFrom(Position ep, Position vp) throws InvalidPositionException;\n\n\n /**\n * Changes the direction of the given Edge to be in incident\n * upone the Vertex held in the given Position\n * \n * @param ep the Edge to change the direction of\n * @param vp the Position holding the Vertex that the Edge is going\n * to be in incident upon\n * @exception InvalidPositionException\n * thrown if either of the given positions are invalid for this container\n */\n public void setDirectionTo(Position ep, Position vp) throws InvalidPositionException;\n\n}",
"public void drawGraph(Graphics g) \n\t{\n\t\tNode<T> n = start;\n\t\tint count = 0;\t//loop counter variable\n\t\twhile((n.next != start && count == 0) || count < 1) //while not at end of list and hasnt looped\n\t\t{\n\t\t\tint[] pos = n.computeXY();\t\t\t\t\t\t//compute coordinates of the current node\n\t\t\tint[] nextPos = n.next.computeXY();\t\t\t\t//compute coordinates of the next node\n\n\t\t\t//System.out.println(\"--\\nval: \" + n.value + \" position: \" + pos[0] + \", \" + pos[1]);\n\n\t\t\tg.setColor(Color.BLACK); //set draw color to black\n\t\t\tg.drawLine(pos[0], pos[1], nextPos[0], nextPos[1]); //draw line between current \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// and next node\n\t\t\tif(n.isCurrent) //if the node n is the current node in the list\n\t\t\t{\n\t\t\t\tg.setColor(new Color(100, 200, 100));\t\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tg.setColor(new Color(130, 225, 235));\t\n\t\t\t}\n\n\t\t\tg.fillOval(pos[0] - 25, pos[1] - 25, 50, 50);\t//fill the oval\n\t\t\tg.setColor(Color.BLACK);\t\t\t\t\t\t//set the color of the oval\n\t\t\tif(n == start) \t\t\t\t\t\t\t\t\t//if n is the starting node\n\t\t\t{\n\t\t\t\tg.drawOval(pos[0] - 20, pos[1] - 20, 40, 40);\n\t\t\t}\n\t\t\tg.drawOval(pos[0] - 25, pos[1] - 25, 50, 50);\n\t\t\tg.drawString(n.value.toString(), pos[0], pos[1] + 5);\n\t\t\t\n\t\t\tif(n.next == start) //if we are at the end\n\t\t\t{\n\t\t\t\tcount++;\t\t//increment loop counter\n\t\t\t}\n\t\t\tn = n.next;\n\t\t}\n\t}",
"public static void printEntireGraph(Graph g){\n \t\n \tfor(String v :g.vertexMap.keySet()){\n \t\t\n \t\tSystem.out.println(v+ ((g.vertexMap.get(v).isDown)?\" DOWN\":\"\"));\n \t\t\n \t\tfor (Edge adj :g.vertexMap.get(v).adjEdge.values()){\n \t\t\t\tSystem.out.print('\\t');\n \t\t\t\tSystem.out.print(adj.adjVertex.name+\" \");\n \t\t\t\tSystem.out.print(adj.dist+ ((adj.isDown)?\" DOWN\":\"\"));\n \t\t\t\tSystem.out.println();\n \t\t}\n \t\t\n \t}\n \t\n \t\n }",
"public void constructGraph() {\n graph = new double[array.length][array.length];\n for (int i = 0; i < graph.length; i++) {\n Crime c1 = array[i];\n for (int j = 0; j < graph.length; j++) {\n Crime c2 = array[j];\n graph[i][j] = ((c1.getX() - c2.getX()) * (c1.getX() - c2.getX()) +\n (c1.getY() - c2.getY()) * (c1.getY() - c2.getY()));\n }\n }\n }",
"@Test\n public void tae3()\n {\n Graph graph = new Graph(3);\n graph.addEdge(0,0);\n graph.addEdge(0,1);\n graph.addEdge(1,1);\n System.out.println(graph);\n assertEquals(graph.toString(), \"numNodes: 3\\nedges: [[true, true, false], [false, true, false], \" +\n \"[false, false, false]]\");\n }",
"void printGraph() {\n for (Vertex u : this) {\n System.out.print(u + \": \");\n for (Edge e : u.Adj) {\n System.out.print(e);\n }\n System.out.println();\n }\n }",
"private void printGraph() {\r\n\t\tSortedSet<String> keys = new TreeSet<String>(vertexMap.keySet());\r\n\t\tIterator it = keys.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tVertex v = vertexMap.get(it.next());\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tSystem.out.println(v.getName());\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(v.getName() + \" DOWN\");\r\n\t\t\tsortEdges(v.adjacent);\r\n\t\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\t\t// v.adjacent.sort();\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus())\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost());\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\" \" + edge.getDestination() + \" \" + edge.getCost() + \" DOWN\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}",
"public void printGraph()\n {\n Iterator<T> nodeIterator = nodeList.keySet().iterator();\n \n while (nodeIterator.hasNext())\n {\n GraphNode curr = nodeList.get(nodeIterator.next());\n \n while (curr != null)\n {\n System.out.print(curr.nodeId+\"(\"+curr.parentDist+\")\"+\"->\");\n curr = curr.next;\n }\n System.out.print(\"Null\");\n System.out.println();\n }\n }",
"private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }",
"public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}",
"public static void main( String[] args ){\n AdjListsGraph<String> a = new AdjListsGraph<String>( \"Sample-Graph.tgf\" );\n System.out.println( a );\n System.out.println( \"Number of vertices (5):\" + a.getNumVertices());\n System.out.println( \"Number of arcs (7):\" + a.getNumArcs());\n System.out.println( \"isEdge A<-->B (TRUE):\" + a.isEdge(\"A\", \"B\"));\n System.out.println( \"isArc A-->C (TRUE):\" + a.isArc( \"A\",\"C\"));\n System.out.println( \"isEdge D<-->E (FALSE):\" + a.isEdge( \"D\",\"E\" ));\n System.out.println( \"isArc D -> E (TRUE):\" + a.isArc( \"D\",\"E\" ));\n System.out.println( \"isArc E -> D (FALSE):\" + a.isArc( \"E\",\"D\" ));\n System.out.println( \"Removing vertex A.\");\n a.removeVertex( \"A\" );\n System.out.println( \"Adding edge B<-->D\");\n a.addEdge( \"B\",\"D\" );\n System.out.println( \"Number of vertices (4):\" + a.getNumVertices());\n System.out.println( \"Number of arcs (5):\" + a.getNumArcs());\n System.out.println( a );\n System.out.println( \"Adj to B ([C,D]):\" + a.getSuccessors( \"B\" ) );\n System.out.println( \"Adj to C ([B]):\" + a.getSuccessors( \"C\" ));\n System.out.println( \"Adding A (at the end of vertices).\" );\n a.addVertex( \"A\" ); \n System.out.println( \"Adding B (should be ignored).\" );\n a.addVertex( \"B\" );\n System.out.println( \"Saving the graph into BCDEA.tgf\" );\n a.saveToTGF( \"BCDEA.tgf\" );\n System.out.println( \"Adding F->G->H->I->J->K->A.\" );\n a.addVertex( \"F\" );\n a.addVertex( \"G\" );\n a.addArc( \"F\", \"G\" );\n a.addVertex( \"H\" );\n a.addArc( \"G\", \"H\" );\n a.addVertex( \"I\" );\n a.addArc( \"H\", \"I\" );\n a.addVertex( \"J\" );\n a.addArc( \"I\", \"J\" );\n a.addVertex( \"K\" );\n a.addArc( \"J\", \"K\" );\n a.addArc( \"K\", \"A\" );\n System.out.println( a );\n System.out.println( \"Saving the graph into A-K.tgf\" );\n a.saveToTGF( \"A-K.tgf\" );\n }",
"public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}",
"private void transPose(graph g) {\n\t\tIterator it = g.getV().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tnode_data temp = (node_data) it.next();\n\t\t\tif(g.getE(temp.getKey())!=null) {\n\t\t\t\tIterator it1 = g.getE(temp.getKey()).iterator();\n\t\t\t\twhile (it1.hasNext()) {\n\t\t\t\t\tedge_data temp1 = (edge_data) it1.next();\n\t\t\t\t\tif (temp1 != null && temp1.getTag() == 0) {\n\t\t\t\t\t\tif (g.getEdge(temp1.getDest(), temp1.getSrc()) != null) {\n\t\t\t\t\t\t\tEdge temps = new Edge((Edge)g.getEdge(temp1.getSrc(),temp1.getDest()));\n\t\t\t\t\t\t\tdouble weight1 = g.getEdge(temp1.getSrc(),temp1.getDest()).getWeight();\n\t\t\t\t\t\t\tdouble weight2 = g.getEdge(temp1.getDest(),temp1.getSrc()).getWeight();\n\t\t\t\t\t\t\tg.connect(temp1.getSrc(),temp1.getDest(),weight2);\n\t\t\t\t\t\t\tg.connect(temps.getDest(),temps.getSrc(),weight1);\n\t\t\t\t\t\t\tg.getEdge(temps.getDest(), temps.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.getEdge(temps.getSrc(),temps.getDest()).setTag(1);\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tg.connect(temp1.getDest(), temp1.getSrc(), temp1.getWeight());\n\t\t\t\t\t\t\tg.getEdge(temp1.getDest(), temp1.getSrc()).setTag(1);\n\t\t\t\t\t\t\tg.removeEdge(temp1.getSrc(), temp1.getDest());\n\t\t\t\t\t\t\tit1 = g.getE(temp.getKey()).iterator();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n graph.addEdge(\"Mumbai\",\"Warangal\");\n graph.addEdge(\"Warangal\",\"Pennsylvania\");\n graph.addEdge(\"Pennsylvania\",\"California\");\n //graph.addEdge(\"Montevideo\",\"Jameka\");\n\n\n String sourceNode = \"Pennsylvania\";\n\n if(graph.isGraphConnected(sourceNode)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}",
"public static Graph buildGraph1() {\n Graph g = new Graph(\"Undirected graph For Kruskal Algorithm\");\n g.addEdge(\"A\", \"E\", 5);\n g.addEdge(\"A\", \"D\", 3);\n g.addEdge(\"A\", \"H\", 7);\n g.addEdge(\"A\", \"B\", 6);\n g.addEdge(\"D\", \"E\", 9);\n g.addEdge(\"D\", \"C\", 12);\n g.addEdge(\"C\", \"B\", 20);\n g.addEdge(\"B\", \"F\", 15);\n g.addEdge(\"F\", \"G\", 17);\n g.addEdge(\"G\", \"H\", 1);\n\n g.sortEdgesByIncreasingWeights();\n\n System.out.println(g);\n\n return g;\n }",
"private static String representacaoAL(Graph grafo) {\r\n\t\tString retorno = \"\";\r\n\r\n\t\tfor (int i = 0; i < grafo.getVerticesGraph().size(); i++) {\r\n\t\t\tretorno += grafo.getVerticesGraph().get(i).getValor() + \" \";\r\n\r\n\t\t\tfor (int j = 0; j < grafo.getVerticesGraph().get(i).getArestas().size(); j++) {\r\n\t\t\t\tretorno += proxVertice(grafo.getVerticesGraph().get(i), grafo.getVerticesGraph().get(i).getArestas().get(j)) + \" \";\r\n\t\t\t}\r\n\r\n\t\t\tretorno += \"/n\";\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}",
"public static void main(String argv[]) {\n\n\tRandomIntGenerator rand = new RandomIntGenerator(5,10);\n\tRandomIntGenerator rand2 = new RandomIntGenerator(10,15);\n\tRandomIntGenerator rand3 = new RandomIntGenerator(1,2);\n\n\tint vertices = rand.nextInt();\n\tSystem.out.println(\"vertices=\"+vertices);\n\t\n\tRandomIntGenerator rand4 = new RandomIntGenerator(0,vertices-1);\n\n\tTrAnchor[] vertex = new TrAnchor[vertices];\n\tfor (int i=0;i<vertices;i++) {\n\t int t=rand3.nextInt();\n\t if (t==1) {\n\t\tvertex[i] = new Statename(\"S\"+i);\n\t } else if (t==2) {\n\t\tvertex[i] = new Conname(\"C\"+i);\n\t } else {\n\t\tvertex[i] = new UNDEFINED();\n\t }\n\t}\n\n\tint edges = rand2.nextInt();\n\tSystem.out.println(\"edges=\"+edges);\n\t\n\tTr[] transition = new Tr[edges];\n\tfor (int i=0;i<edges;i++) {\n\t int si = rand4.nextInt();\n\t int ti = rand4.nextInt();\n\t \n\t TrAnchor source = vertex[si];\n\t TrAnchor target = vertex[ti];\n\t transition[i] = new Tr(source,target,null);\n\t}\n\t \n\tSystem.out.println();\n\tSystem.out.println(\"Ausgabe:\");\n\n\tfor (int i=0;i<edges;i++) \n\t new PrettyPrint().start(transition[i]);\n\t\n\ttesc2.ProperMap properMap = new tesc2.ProperMap(vertex,transition);\n\n\tfor (int i=0;i<properMap.getHeight();i++) {\n\t System.out.print(properMap.getWidthOfRow(i));\n\t \n\t for (int j=0;j<properMap.getWidthOfRow(i);j++) {\n\t\tSystem.out.print(properMap.getElement(i,j)+\" \");\n\t }\n\t System.out.println();\n\t}\n\n\ttesc2.MapTransition[] mt = properMap.getMapTransitions();\n\tfor (int i=0;i<mt.length;i++)\n\t System.out.println(mt[i]);\n\n }",
"@Test\n public void helloGraph() {\n skynetMedium.SkyNet.Input.GameInput in=new skynetMedium.SkyNet.Input.GameInput(4,4,1);\n in.addLinkDescr(1,2);\n //in.addLinkDescr(0, 2);\n in.addLinkDescr(1, 0);\n //in.addLinkDescr(2, 3);\n in.addGateWay(2);\n in.setAgent(1);\n \n List<SkyNet.Input.PathToGate> path=in.pathToGates();\n for(SkyNet.Input.PathToGate ptg : path){\n System.err.println(\"= \"+ptg);\n }\n }",
"public static void printGraph( Graph graph ){\n\t\tint size = graph.getGraph().size();\n\t\tStringBuilder sb = new StringBuilder(); \n\t\tint weight = 0;\n\t\tfor( String start: graph.getGraph().keySet() ) {\n\t\t\tfor( String end : graph.getGraph().get(start).keySet() ) {\n\t\t\t\tweight = graph.getGraph().get(start).get(end);\n\t\t\t\tsb.append( start + end + String.valueOf(weight) + \", \" );\n\t\t\t}\n\t\t}\n\t\tsb.delete(sb.length()-2, sb.length());\n\t\tSystem.out.println(sb.toString());\n\t}",
"public void generateGraph() {\n\t\tMap<Integer, MovingFObject> map = sc.getInitPos();\r\n\t\tgraph = new boolean[map.size()][map.size()];\r\n\t\tfor(int i = 0; i < map.size(); i++) {\r\n\t\t\tMovingFObject cloned = map.get(i).duplicate();\r\n\t\t\tArrayList<Location> locs = sc.traceLinearMotion(i,sc.getMaxVelocity(),cloned.getGoal());\r\n\t\t\tfor(int j = 0; j < map.size(); j++) {\r\n\t\t\t\tif(j != i) {\r\n\t\t\t\t\tfor(int k = 0; k < locs.size(); k++) {\r\n\t\t\t\t\t\tcloned.setLocation(locs.get(k));\r\n\t\t\t\t\t\tif(cloned.locationTouchingLocation(1, map.get(j), 2)) {\r\n\t\t\t\t\t\t\tgraph[i][j] = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(cloned.locationTouchingLocation(1, map.get(j), 0)) {\r\n\t\t\t\t\t\t\tgraph[j][i] = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main (String[] args){\n\n Graph test = new Graph(30,\"/main/graphs/test30\");\n Graph test2 = new Graph(5,\"/main/graphs/graph5\");\n Graph g1 = new Graph(30,\"/main/graphs/graph30\");\n Graph g2 = new Graph(50,\"/main/graphs/graph50\");\n Graph g3 = new Graph(55,\"/main/graphs/graph55\");\n Graph g4 = new Graph(60,\"/main/graphs/graph60\");\n Graph g5 = new Graph(65,\"/main/graphs/graph65\");\n Graph g6 = new Graph(70,\"/main/graphs/graph70\");\n Graph g7 = new Graph(75,\"/main/graphs/graph75\");\n Graph g8 = new Graph(80,\"/main/graphs/graph80\");\n Graph g9 = new Graph(85,\"/main/graphs/graph85\");\n Graph g10 = new Graph(90,\"/main/graphs/graph90\");\n Graph g11= new Graph(100,\"/main/graphs/graph100\");\n Graph g12= new Graph(200,\"/main/graphs/graph200\");\n Graph g13= new Graph(200,\"/main/graphs/graph200_2\");\n\n Algo algo = new Algo(test);\n System.out.println(\"Graphe test : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g1);\n System.out.println(\"Graphe a 30 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g2);\n System.out.println(\"Graphe a 50 sommets : \" +algo.runNtimes((int) (10*Math.pow(2,50/2))));\n\n algo = new Algo(g3);\n System.out.println(\"Graphe a 55 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,55/2))));\n\n algo = new Algo(g4);\n System.out.println(\"Graphe a 60 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,60/2))));\n\n algo = new Algo(g5);\n System.out.println(\"Graphe a 65 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,65/2))));\n\n algo = new Algo(g6);\n System.out.println(\"Graphe a 70 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,70/2))));\n\n algo = new Algo(g7);\n System.out.println(\"Graphe a 75 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,75/2))));\n\n algo = new Algo(g8);\n System.out.println(\"Graphe a 80 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,80/2))));\n\n algo = new Algo(g9);\n System.out.println(\"Graphe a 85 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,85/2))));\n\n algo = new Algo(g10);\n System.out.println(\"Graphe a 90 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,90/2))));\n\n algo = new Algo(g11);\n System.out.println(\"Graphe a 100 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,100/2))));\n\n algo = new Algo(g12);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n algo = new Algo(g13);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n }",
"public interface Graph<V> {\n /**\n * F??gt neuen Knoten zum Graph dazu.\n * @param v Knoten\n * @return true, falls Knoten noch nicht vorhanden war.\n */\n boolean addVertex(V v);\n\n /**\n * F??gt neue Kante (mit Gewicht 1) zum Graph dazu.\n * @param v Startknoten\n * @param w Zielknoten\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist oder Knoten identisch sind.\n * @return true, falls Kante noch nicht vorhanden war.\n */\n boolean addEdge(V v, V w);\n\n /**\n * F??gt neue Kante mit Gewicht weight zum Graph dazu.\n * @param v Startknoten\n * @param w Zielknoten\n * @param weight Gewicht\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist oder Knoten identisch sind.\n * @return true, falls Kante noch nicht vorhanden war.\n */\n boolean addEdge(V v, V w, double weight);\n\n /**\n * Pr??ft ob Knoten v im Graph vorhanden ist.\n * @param v Knoten\n * @return true, falls Knoten vorhanden ist.\n */\n boolean containsVertex(V v);\n\n /**\n * Pr??ft ob Kante im Graph vorhanden ist.\n * @param v Startknoten\n * @param w Endknoten\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist.\n * @return true, falls Kante vorhanden ist.\n */\n boolean containsEdge(V v, V w);\n \n /**\n * Liefert Gewicht der Kante zur??ck.\n * @param v Startknoten\n * @param w Endknoten\n * @throws IllegalArgumentException falls einer der Knoten\n * nicht im Graph vorhanden ist.\n * @return Gewicht, falls Kante existiert, sonst 0.\n */\n double getWeight(V v, V w);\n\n /**\n * Liefert Anzahl der Knoten im Graph zur??ck.\n * @return Knotenzahl.\n */\n int getNumberOfVertexes();\n\n /**\n * Liefert Anzahl der Kanten im Graph zur??ck.\n * @return Kantenzahl.\n */\n int getNumberOfEdges();\n\n /**\n * Liefert Liste aller Knoten im Graph zur??ck.\n * @return Knotenliste\n */\n List<V> getVertexList();\n \n /**\n * Liefert Liste aller Kanten im Graph zur??ck.\n * @return Kantenliste.\n */\n List<Edge<V>> getEdgeList();\n\n /**\n * Liefert eine Liste aller adjazenter Knoten zu v.\n * Genauer: g.getAdjacentVertexList(v) liefert eine Liste aller Knoten w,\n * wobei (v, w) eine Kante des Graphen g ist.\n * @param v Knoten\n * @throws IllegalArgumentException falls Knoten v\n * nicht im Graph vorhanden ist.\n * @return Knotenliste\n */\n List<V> getAdjacentVertexList(V v);\n\n /**\n * Liefert eine Liste aller inzidenten Kanten.\n * Genauer: g.getIncidentEdgeList(v) liefert\n * eine Liste aller Kanten im Graphen g mit v als Startknoten.\n * @param v Knoten\n * @throws IllegalArgumentException falls Knoten v\n * nicht im Graph vorhanden ist.\n * @return Kantenliste\n */\n List<Edge<V>> getIncidentEdgeList(V v);\n}",
"public interface InformationGraph {\r\n\t\r\n\tpublic int getNVertex();\r\n\tpublic int getDistanza();\r\n\tpublic int getLarghezzaX();\r\n\tpublic int getLarghezzaY();\r\n\tpublic int getWidth();\r\n\tpublic int getHeight();\r\n}",
"public static void main(String[] args) throws IOException {\n\n\t\tArrayList<Node> nodes = new ArrayList<Node>();\n\n\t\tStringBuilder graphVis = new StringBuilder();\n\t\t\n\t\tfloat edgeProb = 0.001f;\n\t\tgenerateNodesAndEdges(nodes, graphVis, edgeProb, // GraphConfig.EDGE_PROHABILITY\n\t\t\t\tGraphConfig.EDGE_LEVEL_LIMIT, GraphConfig.EDGE_LEVEL_FUNCTION);\n\t\t//generateNodesAndEdgesRecursiv(nodes, graphVis);\n\t\taddColocations(nodes);\n\n\t\t// do the visualization string creation after setting colocation\n\t\t// constraints, if not colocation constraints are not set correctly\n\t\tString graphPath = \"../../Sample_Data/Graph/Evaluation/\" + nodes.size() + \"n_\"\n\t\t\t\t+ m + \"_\" + Util.currentTime();\n\t\t/*\n\t\t * StringBuilder content = new StringBuilder();\n\t\t * \n\t\t * for (Node node : nodes) { content.append(node.toString()); }\n\t\t * \n\t\t * GraphWriter writer = new GraphWriter();\n\t\t * writer.write(content.toString(), graphPath);\n\t\t * if(shallCreateGraphVisualization){\n\t\t * writer.writeVisualisation(graphVis.toString(), graphPath); }\n\t\t */\n\t\tFile file = new File(graphPath + \".csv\");\n\n\t\t// if file doesnt exists, then create it\n\t\tif (!file.exists()) {\n\t\t\tfile.createNewFile();\n\t\t}\n\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.write(GraphConfig.configToString() + \"\\n\");\n\t\tbw.write(\n\t\t\t\t\"Id,(Outgoing) node,(Incoming) node,Colocation nodes,#tensorSize, #operations, RAM storage,Device constraint ,name\\n\");\n\t\tfor (Node node : nodes) {\n\t\t\tbw.write(node.toString());\n\t\t}\n\t\tbw.close();\n\t\tfw.close();\n\t\t// now change properties of the graph\n\n\t\t// String[] edge_probability = {\"0.025\",\"0.05\",\"0.\",\"0.1\", \"0.2\",\"0.4\",\n\t\t// \"0.6\", \"0.8\",\"1\"};\n\t\t/*\n\t\t * String[] edge_probability = { \"0.05\", \"0.1\", \"0.2\", \"0.3\", \"0.4\" };\n\t\t * int nodeLevelDistance = -1; // watch out that all nodes are reachable\n\t\t * -> need sink node // ode sink = new Node(0, \"SINK\"); // not problem\n\t\t * anymore for (String factor : edge_probability) { content = new\n\t\t * StringBuilder(); // remove all edges for (Node nodeToRemoveEdges :\n\t\t * nodes) { nodeToRemoveEdges.removeAllEdges(); } for (Node node :\n\t\t * nodes) { // könnte man beschleunigen da es sich um eine Arraylist\n\t\t * handelt for (Node possibleEdge : nodes) { // To avoid cycles, would\n\t\t * be faster to exploid properties of // the arraylist if (node.level <\n\t\t * possibleEdge.level) { if (Math.random() < Float.parseFloat(factor)) {\n\t\t * if (nodeLevelDistance < 0 || (possibleEdge.level - node.level <\n\t\t * nodeLevelDistance)) { node.getOutgoingNodes().add(possibleEdge);\n\t\t * possibleEdge.getIncomingNodes().add(node);\n\t\t * \n\t\t * } } } } } // koennte man auch schon vorher hinzufuegen, aber um\n\t\t * Fehler // auszuschließen for (Node node : nodes) {\n\t\t * content.append(node.toString()); } writer.write(content.toString(),\n\t\t * graphPath + \"_\" + factor); }\n\t\t */\n\t\t// System.out.println(\"isReachable:\" +\n\t\t// isEveryNodeReachable(sink,numberOfNodes));\n\t\t\n\t\tif(shallCreateGraphVisualization){\n\t\t\tSystem.out.println(graphVis.toString());\n\t\t}\n\t}",
"public interface Graph<V> {\n\t/** Return the number of vertices in the graph */\n\tpublic int getSize();\n\n\t/** Return the vertices in the graph */\n\tpublic java.util.List<V> getVertices();\n\n\t/** Return the object for the specified vertex index */\n\tpublic V getVertex(int index);\n\n\t/** Return the index for the specified vertex object */\n\tpublic int getIndex(V v);\n\n\t/** Return the neighbors of vertex with the specified index */\n\tpublic java.util.List<Integer> getNeighbors(int index);\n\n\t/** Return the degree for a specified vertex */\n\tpublic int getDegree(int v);\n\n\t/** Return the adjacency matrix */\n\tpublic int[][] getAdjacencyMatrix();\n\n\t/** Print the adjacency matrix */\n\tpublic void printAdjacencyMatrix();\n\n\t/** Print the edges */\n\tpublic void printEdges();\n\n\t/** Obtain a depth-first search tree */\n\tpublic AbstractGraph<V>.Tree dfs(int v);\n\n\t/** Obtain a breadth-first search tree */\n\tpublic AbstractGraph<V>.Tree bfs(int v);\n\n\t/**\n\t * Return a Hamiltonian path from the specified vertex Return null if the\n\t * graph does not contain a Hamiltonian path\n\t */\n\tpublic java.util.List<Integer> getHamiltonianPath(V vertex);\n\n\t/**\n\t * Return a Hamiltonian path from the specified vertex label Return null if\n\t * the graph does not contain a Hamiltonian path\n\t */\n\tpublic java.util.List<Integer> getHamiltonianPath(int inexe);\n}",
"@Override protected void onPreExecute() { g = new UndirectedGraph(10); }",
"public static void main(String args[])\n\t{\n\t\tList<Vertex> v = new LinkedList<Vertex>();\n\t\tVertex v1 = new Vertex(1);\n\t\tVertex v2 = new Vertex(2);\n\t\tVertex v3 = new Vertex(3);\n \t\tVertex v4 = new Vertex(4);\n\t\t\n \t\t//Setting adjList for each vertex\n \t\tList<Vertex> adjList = new LinkedList<Vertex>();\n\t\tadjList.add(v2);\n\t\tadjList.add(v3);\n\t\tv1.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v4);\n\t\tv2.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v2);\n\t\tv3.setAdjList(adjList);\n\t\t\n\t\tadjList = new LinkedList<Vertex>();\n\t\tadjList.add(v3);\n\t\tv4.setAdjList(adjList);\n\t\t\n\t\tv.add(v1);\n\t\tv.add(v2);\n \t\tv.add(v3);\n\t\tv.add(v4);\n\n\t\tEdge e1 = new Edge(1, 2);\n\t\tList<Edge> e = new LinkedList<Edge>();\n\t\te.add(e1);\n\t\te1 = new Edge(1, 3);\n\t\te.add(e1);\n\t\te1 = new Edge(2, 4);\n\t\te.add(e1);\n\t\te1 = new Edge(4, 3);\n\t\te.add(e1);\n\t\te1 = new Edge(3, 2);\n\t\te.add(e1);\n\t\t\n\t\t\n\t\tGraph g = new Graph(v, e);\n\t\tg.bfs(v4);\n\t\t\n\t\t//v has all vertices\n\t\tg.unconnected(v2, v);\n\t}",
"public static void main(String[] args) {\n final GraphNode root=new GraphBuilderConcurentV0().build(XOField.Figure.X,new XOField(),0);\n\n System.out.println(root.getNode());\n// GraphHelper.show(root,0);\n System.out.println(GraphHelper.countNodes(root));\n }",
"public Graph()\r\n\t{\r\n\t\tthis.adjacencyMap = new HashMap<String, HashMap<String,Integer>>();\r\n\t\tthis.dataMap = new HashMap<String,E>();\r\n\t}",
"void visualizeGraph(double input, double dvallog) {\n synchronized (this) {\n graph.beginDraw();\n graph.stroke(50);\n graph.strokeWeight(2);\n graph.clear();\n float py = graph.height;\n for (int a = 1; a < graph.width; a++) {\n double db = graphSize * ((double)a / graph.width - 1) / 20;\n float cy = -graph.height * 20 * (float)getOutput(db, db) / graphSize;\n graph.line(a - 1, py, a, cy);\n py = cy;\n }\n graph.noFill();\n //if (sideChain != null) {\n graph.ellipse(graph.width * Math.min(1, 20 * (float)dvallog / graphSize + 1), -graph.height * 20 * (float)getOutput(dvallog, dvallog) / graphSize, 10, 10);\n //graph.ellipse(graph.width * Math.min(1, 20 * (float)Math.log10(input) / graphSize + 1), -graph.height * 20 * (float)Math.log10(getRMS(bufOut)) / graphSize, 10, 10);\n graph.endDraw();\n }\n }",
"public void printEdges(){\n System.out.print(\" |\");\n for(int i=0;i<size;i++)\n System.out.print(\" \"+i+\" \");\n System.out.print(\"\\n\");\n for(int i=0;i<size+1;i++)\n System.out.print(\"-------\");\n System.out.print(\"\\n\");\n for(int i=0;i<size;i++){\n System.out.print(\" \"+i+\" |\");\n for(int j=0;j<size;j++){\n System.out.print(\" \"+Matrix[i][j]+\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public static Graph makeMeAGraph(Set<Operation> operations, State init){\n Graph graph = new implementGraph(operations , init) ;\n return graph;\n\n\t //\t throw new NotImplementedException();\n }",
"@Test\n public void tae4()\n {\n Graph graph = new Graph(4);\n graph.addEdge(0,0);\n graph.addEdge(0,1);\n graph.addEdge(0,2);\n graph.addEdge(0,3);\n graph.addEdge(1,0);\n graph.addEdge(1,1);\n graph.addEdge(1,2);\n graph.addEdge(1,3);\n graph.addEdge(2,0);\n graph.addEdge(2,1);\n graph.addEdge(2,2);\n graph.addEdge(2,3);\n graph.addEdge(3,0);\n graph.addEdge(3,1);\n graph.addEdge(3,2);\n graph.addEdge(3,3);\n System.out.println(graph);\n assertEquals(graph.toString(), \"numNodes: 4\\nedges: [[true, true, true, true], [true, true, true, true], \" +\n \"[true, true, true, true], [true, true, true, true]]\");\n }",
"public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }",
"@Test\n public void graphfromBoggleBoard_mn() {\n Graph testgraph = new AdjacencyMatrixGraph();\n BoggleBoard board = new BoggleBoard(20,20);\n Permeate.boggleGraph(board, testgraph);\n /*System.out.println(testgraph.getVertices());\n for (Vertex vertex : testgraph.getVertices()) {\n System.out.println(vertex + \": \" + testgraph.getNeighbors(vertex));\n }*/\n }",
"public static void main(String[] args) {\n\n Node n1 = new Node(1);\n Node n2 = new Node(2);\n Node n3 = new Node(3);\n Node n4 = new Node(4);\n\n n1.neighbors.add(n2);\n n1.neighbors.add(n4);\n n2.neighbors.add(n1);\n n2.neighbors.add(n4);\n n3.neighbors.add(n2);\n n3.neighbors.add(n4);\n n4.neighbors.add(n1);\n n4.neighbors.add(n3);\n\n for (Node n : n1.neighbors) {\n System.out.print(n.val + \" \");\n }\n for (Node n : n2.neighbors) {\n System.out.print(n.val + \" \");\n }\n for (Node n : n3.neighbors) {\n System.out.print(n.val + \" \");\n }\n for (Node n : n4.neighbors) {\n System.out.print(n.val + \" \");\n }\n\n System.out.println();\n Node result = Solution.cloneGraph(n1);\n printGraph(result, 4);\n\n }",
"public void test4_c() {/*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0},\n\t\t\t\t{ 0, 1, -1},\n\t\t\t\t{ 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(2, 0, new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0},\n\t\t\t\t{ 0, 1, -1}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + 7) \n\t\t\t\t{ 1, 0, -1},\n\t\t\t\t{ 0, 1, 7},\n\t\t\t\t{ 0, 0, 1}\n });\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(2, 0, new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, -1},\n\t\t\t\t{ 0, 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(2, 0, new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, -1},\n\t\t\t\t{ 0, 1, -1}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(false);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}",
"public static void main(String[] args) {\n Graph graph = new Graph();\n graph.addEdge(0, 1);\n graph.addEdge(0, 4);\n\n graph.addEdge(1,0);\n graph.addEdge(1,5);\n graph.addEdge(1,2);\n graph.addEdge(2,1);\n graph.addEdge(2,6);\n graph.addEdge(2,3);\n\n graph.addEdge(3,2);\n graph.addEdge(3,7);\n\n graph.addEdge(7,3);\n graph.addEdge(7,6);\n graph.addEdge(7,11);\n\n graph.addEdge(5,1);\n graph.addEdge(5,9);\n graph.addEdge(5,6);\n graph.addEdge(5,4);\n\n graph.addEdge(9,8);\n graph.addEdge(9,5);\n graph.addEdge(9,13);\n graph.addEdge(9,10);\n\n graph.addEdge(13,17);\n graph.addEdge(13,14);\n graph.addEdge(13,9);\n graph.addEdge(13,12);\n\n graph.addEdge(4,0);\n graph.addEdge(4,5);\n graph.addEdge(4,8);\n graph.addEdge(8,4);\n graph.addEdge(8,12);\n graph.addEdge(8,9);\n graph.addEdge(12,8);\n graph.addEdge(12,16);\n graph.addEdge(12,13);\n graph.addEdge(16,12);\n graph.addEdge(16,17);\n graph.addEdge(17,13);\n graph.addEdge(17,16);\n graph.addEdge(17,18);\n\n graph.addEdge(18,17);\n graph.addEdge(18,14);\n graph.addEdge(18,19);\n\n graph.addEdge(19,18);\n graph.addEdge(19,15);\n LinkedList<Integer> visited = new LinkedList();\n List<ArrayList<Integer>> paths = new ArrayList<ArrayList<Integer>>();\n int currentNode = START;\n visited.add(START);\n new searchEasy().findAllPaths(graph, visited, paths, currentNode);\n for(ArrayList<Integer> path : paths){\n for (Integer node : path) {\n System.out.print(node);\n System.out.print(\" \");\n }\n System.out.println();\n }\n }",
"void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }",
"private void paintGraph() {\n if(graph) {\n for (MapFeature street : mapFStreets) {\n if (!(street instanceof Highway)) continue;\n Highway streetedge = (Highway) street;\n Iterable<Edge> edges = streetedge.edges();\n if (edges == null) continue;\n Iterator<Edge> it = edges.iterator();\n g.setStroke(new BasicStroke(0.0001f));\n g.setPaint(Color.CYAN);\n while (it.hasNext()) {\n Edge e = it.next();\n if (e.isOneWay())\n g.setPaint(Color.orange);\n else if (e.isOneWayReverse())\n g.setPaint(Color.PINK);\n g.draw(e);\n }\n\n\n }\n for (MapFeature street : mapFStreets) {\n if (!(street instanceof Highway)) continue;\n Highway streetedge = (Highway) street;\n List<Point2D> points = streetedge.getPoints();\n for(Point2D p : points){\n g.setPaint(Color.yellow);\n g.draw(new Rectangle2D.Double(p.getX(), p.getY(), 0.000005, 0.000005));\n }\n\n }\n }\n }",
"public void drawEdges(IEdgeDrawerGraph graph);",
"public static void printGraph(Model aGraph) {\r\n\t\tStmtIterator triples;\t\t\t\t\t//To loop through the triples\r\n\t\tStatement triple;\t\t\t\t\t\t//One of the triples\r\n\r\n\t\ttriples = aGraph.listStatements();\r\n\t\twhile (triples.hasNext()) {\r\n\t\t\ttriple = triples.next();\r\n//\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\tprintTriple(triple);\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public interface TestData {\n NumberVertex[] VERTICES = {new NumberVertex(0), new NumberVertex(1), new NumberVertex(2), new NumberVertex(3),\n new NumberVertex(4), new NumberVertex(5), new NumberVertex(6), new NumberVertex(7), new NumberVertex(8)};\n\n DirectedEdge[] DIRECTED_EDGES ={\n new DirectedEdge(VERTICES[0], VERTICES[7]),\n new DirectedEdge(VERTICES[1], VERTICES[0]),\n new DirectedEdge(VERTICES[0], VERTICES[2]),\n new DirectedEdge(VERTICES[0], VERTICES[3]),\n new DirectedEdge(VERTICES[2], VERTICES[4]),\n new DirectedEdge(VERTICES[2], VERTICES[5]),\n new DirectedEdge(VERTICES[2], VERTICES[0]),\n new DirectedEdge(VERTICES[4], VERTICES[6]),\n new DirectedEdge(VERTICES[4], VERTICES[7]),\n new DirectedEdge(VERTICES[6], VERTICES[0]),\n new DirectedEdge(VERTICES[6], VERTICES[8]),\n new DirectedEdge(VERTICES[8], VERTICES[1])};\n\n UndirectedEdge[] UNDIRECTED_EDGES ={\n new UndirectedEdge(VERTICES[1], VERTICES[0]),\n new UndirectedEdge(VERTICES[0], VERTICES[2]),\n new UndirectedEdge(VERTICES[0], VERTICES[3]),\n new UndirectedEdge(VERTICES[2], VERTICES[4]),\n new UndirectedEdge(VERTICES[2], VERTICES[4]),\n new UndirectedEdge(VERTICES[2], VERTICES[5]),\n new UndirectedEdge(VERTICES[4], VERTICES[6]),\n new UndirectedEdge(VERTICES[4], VERTICES[6]),\n new UndirectedEdge(VERTICES[4], VERTICES[7]),\n new UndirectedEdge(VERTICES[6], VERTICES[0]),\n new UndirectedEdge(VERTICES[6], VERTICES[8]),\n new UndirectedEdge(VERTICES[8], VERTICES[1])};\n}",
"public interface Graph\n{\n int getNumV();\n boolean isDirected();\n void insert(Edge edge);\n boolean isEdge(int source, int dest);\n Edge getEdge(int source, int dest);\n Iterator<Edge> edgeIterator(int source);\n}",
"public static boolean Util(Graph<V, DefaultEdge> g, ArrayList<V> set, int colors, HashMap<String, Integer> coloring, int i, ArrayList<arc> arcs, Queue<arc> agenda)\n {\n /*if (i == set.size())\n {\n System.out.println(\"reached max size\");\n return true;\n }*/\n if (set.isEmpty())\n {\n System.out.println(\"Set empty\");\n return true;\n }\n //V currentVertex = set.get(i);\n\n /*System.out.println(\"vertices and mrv:\");\n V start = g.vertexSet().stream().filter(V -> V.getID().equals(\"0\")).findAny().orElse(null);\n Iterator<V> iterator = new DepthFirstIterator<>(g, start);\n while (iterator.hasNext()) {\n V v = iterator.next();\n System.out.println(\"vertex \" + v.getID() + \" has mrv of \" + v.mrv);\n }*/\n\n // Find vertex with mrv\n V currentVertex;\n int index = -1;\n int mrv = colors + 10;\n for (int it = 0; it < set.size(); it++)\n {\n if (set.get(it).mrv < mrv)\n {\n mrv = set.get(it).mrv;\n index = it;\n }\n }\n currentVertex = set.remove(index);\n\n //System.out.println(\"Got vertex: \" + currentVertex.getID());\n\n\n // Try to assign that vertex a color\n for (int c = 0; c < colors; c++)\n {\n currentVertex.color = c;\n if (verifyColor(g, currentVertex))\n {\n\n // We can assign color c to vertex v\n // See if AC3 is satisfied\n /*currentVertex.domain.clear();\n currentVertex.domain.add(c);*/\n if (!agenda.isEmpty()) numAgenda++;\n while(!agenda.isEmpty())\n {\n arc temp = agenda.remove();\n\n // Make sure there exists v1, v2, in V1, V2, such that v1 != v2\n V v1 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.x)).findAny().orElse(null);\n V v2 = g.vertexSet().stream().filter(V -> V.getID().equals(temp.y)).findAny().orElse(null);\n\n\n\n // No solution exists in this branch if a domain is empty\n //if ((v1.domain.isEmpty()) || (v2.domain.isEmpty())) return false;\n\n if (v2.color == -1) continue;\n else\n {\n Boolean[] toRemove = new Boolean[colors];\n Boolean domainChanged = false;\n for (Integer it : v1.domain)\n {\n if (it == v2.color)\n {\n toRemove[it] = true;\n }\n }\n for (int j = 0; j < toRemove.length; j++)\n {\n if ((toRemove[j] != null))\n {\n v1.domain.remove(j);\n domainChanged = true;\n }\n }\n // Need to check constraints with v1 on the right hand side\n if (domainChanged)\n {\n for (arc it : arcs)\n {\n // Add arc back to agenda to check constraints again\n if (it.y.equals(v1.getID()))\n {\n agenda.add(it);\n }\n }\n }\n }\n if ((v1.domain.isEmpty()) || (v2.domain.isEmpty()))\n {\n System.out.println(\"returning gfalse here\");\n return false;\n }\n }\n\n // Reset agenda to check arc consistency on next iteration\n for (int j = 0; j < arcs.size(); j++)\n {\n agenda.add(arcs.get(i));\n }\n\n\n //System.out.println(\"Checking if vertex \" + currentVertex.getID() + \" can be assigned color \" + c);\n coloring.put(currentVertex.getID(), c);\n updateMRV(g, currentVertex);\n if (Util(g, set, colors, coloring, i + 1, arcs, agenda))\n {\n\n return true;\n }\n\n //System.out.println(\"Assigning vertex \" + currentVertex.getID() + \" to color \" + currentVertex.color + \" did not work\");\n coloring.remove(currentVertex.getID());\n currentVertex.color = -1;\n }\n }\n return false;\n }",
"private static void simplify (GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph) {\n \t\tfinal Iterator<NodeCppOSMDirected> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSMDirected node = iteratorNodes.next();\n \t\t\t// one in one out\n \t\t\tif (node.getInDegree() == 1 && node.getOutDegree() == 1) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSMDirected> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSMDirected edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSMDirected edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge2.getNode1().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge2.getNode2().getId();\n \t\t\t\tif (node2id == node1id){\n \t\t\t\t\t// we are in a deadend and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t// two in two out\n \t\t\tif (node.getInDegree() == 2 && node.getOutDegree() == 2) {\n \t\t\t\tfinal long currentNodeId = node.getId();\n \t\t\t\t//check the connections\n \t\t\t\tArrayList<EdgeCppOSMDirected> incomingEdges = new ArrayList<>();\n \t\t\t\tArrayList<EdgeCppOSMDirected> outgoingEdges = new ArrayList<>();\n \t\t\t\tfor(EdgeCppOSMDirected edge : node.getEdges()) {\n \t\t\t\t\tif(edge.getNode1().getId() == currentNodeId){\n \t\t\t\t\t\toutgoingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tincomingEdges.add(edge);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t//TODO make this condition better\n \t\t\t\tif(outgoingEdges.get(0).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t//out0 = in0\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t//out0 should be in1\n \t\t\t\t\t//therefore out1 = in0\n \t\t\t\t\tif(!outgoingEdges.get(0).getNode2().equals(incomingEdges.get(1).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(!outgoingEdges.get(1).getNode2().equals(incomingEdges.get(0).getNode1())){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(0).getWeight() != incomingEdges.get(1).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t\tif(outgoingEdges.get(1).getWeight() != incomingEdges.get(0).getWeight()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal NodeCppOSMDirected node1 = incomingEdges.get(0).getNode1();\n \t\t\t\tfinal NodeCppOSMDirected node2 = incomingEdges.get(1).getNode1();\n \t\t\t\t// \t\t\tif (node1.equals(node2)){\n \t\t\t\t// \t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t// \t\t\t\tcontinue;\n \t\t\t\t// \t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> metaNodes1 = incomingEdges.get(0).getMetadata().getNodes();\n \t\t\t\tList<WayNodeOSM> metaNodes2 = incomingEdges.get(1).getMetadata().getNodes();\n \t\t\t\tdouble weight = incomingEdges.get(0).getWeight() +incomingEdges.get(1).getWeight();\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(metaNodes1, metaNodes2, currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\tnode1.connectWithNodeWeigthAndMeta(node2, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\tnode2.connectWithNodeWeigthAndMeta(node1, weight,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, \"unknown\", newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}",
"public void printGraph() {\n System.out.println( );\n // the cell number corresponding to a location on a GameBoard\n String cell = \"\"; \n // the distance a cell is from the starting location\n String dist = \"\"; \n\n // for every cell in the graph\n for ( int i = 0; i < graph.length; i++ ) {\n\n // format graph by prefixing a 0 if the number is less\n // than 10. this will ensure output is uniform\n if ( graph[i].graphLoc < 10 )\n cell = \"0\" + graph[i].graphLoc;\n else\n cell = graph[i].graphLoc + \"\";\n\n // format distance by prefixing a space if the number\n // is between 0 and 9 inclusive\n if ( graph[i].dist < 10 && graph[i].dist >= 0 )\n dist = graph[i].dist + \" \";\n // give red color if the cell was never checked\n else if ( graph[i].dist == -1 )\n dist = ANSI_RED + graph[i].dist + \"\" + ANSI_RESET;\n else\n dist = graph[i].dist + \"\";\n\n // print the cell and distance\n // an example output is [13: 5]\n System.out.print(\"[\"+cell+\":\"+dist+\"]\");\n\n // create a new line for the next row\n if ( (i+1) % GameBoard.COLUMNS == 0 )\n System.out.println(\"\\n\");\n }\n }",
"public GraphImpl(int[][] g) {\n\t\tanzKnoten = g.length;\n\t\tgraph = g;\n\t}",
"public Graph() {\n\t\ttowns = new HashSet<Town>();\n\t\troads = new HashSet<Road>();\n\t\tprevVertex = new HashMap<String, Town>();\n\t}",
"private static int[][] graph(){\n int[][] graph = new int[6][6];\n graph[0][1] = 7;\n graph[1][0] = 7;\n\n graph[0][2] = 2;\n graph[2][0] = 2;\n\n graph[1][2] = 3;\n graph[2][1] = 3;\n\n graph[1][3] = 4;\n graph[3][1] = 4;\n\n graph[2][3] = 8;\n graph[3][2] = 8;\n\n graph[4][2] = 1;\n graph[2][4] = 1;\n\n graph[3][5] = 5;\n graph[5][3] = 5;\n\n graph[4][5] = 3;\n graph[5][4] = 3;\n return graph;\n }",
"IGraphEngine graphEngineFactory();"
] | [
"0.70059246",
"0.6521915",
"0.6461034",
"0.6359892",
"0.62959903",
"0.6237567",
"0.6218009",
"0.6180514",
"0.6174828",
"0.61141837",
"0.6048778",
"0.6032969",
"0.6009366",
"0.60064286",
"0.598867",
"0.5972979",
"0.59000725",
"0.5898913",
"0.5883828",
"0.5874535",
"0.5864865",
"0.5852131",
"0.5840704",
"0.5839275",
"0.5819728",
"0.58106065",
"0.58100086",
"0.5791376",
"0.5791172",
"0.57876194",
"0.5785973",
"0.5781689",
"0.5762277",
"0.5761533",
"0.57567656",
"0.5756301",
"0.57542145",
"0.5743154",
"0.57149935",
"0.57011056",
"0.5687499",
"0.566135",
"0.5659036",
"0.56545126",
"0.564962",
"0.5648906",
"0.56411",
"0.56339526",
"0.5629701",
"0.5609905",
"0.5602835",
"0.5596448",
"0.5593928",
"0.5585485",
"0.5583959",
"0.55835533",
"0.5574449",
"0.55688363",
"0.5567325",
"0.5560032",
"0.5546887",
"0.5544507",
"0.5544109",
"0.55438906",
"0.55426556",
"0.5532379",
"0.55291426",
"0.5523295",
"0.55210173",
"0.5518471",
"0.55164",
"0.55045",
"0.54964215",
"0.5488498",
"0.5483811",
"0.5482738",
"0.5480289",
"0.54798794",
"0.547911",
"0.5479094",
"0.5473592",
"0.54711586",
"0.54701674",
"0.54683083",
"0.5464719",
"0.5455734",
"0.5447034",
"0.54466325",
"0.54445124",
"0.543201",
"0.5431799",
"0.54281425",
"0.54259694",
"0.54218906",
"0.54113907",
"0.5411056",
"0.5410585",
"0.54079556",
"0.5407317",
"0.5404813",
"0.5403167"
] | 0.0 | -1 |
checks if the implementation of BoyerMyrvold approach generates correct planar subgraphs. | private void testK5() {
final PGraph bmSubgraph = testSubgraphBuilder(new BoyerMyrvoldPlanarSubgraphBuilder(),
createK5(), 1);
// checks if the implementation of BoyerMyrvold approach generates correct planar subgraphs.
final PGraph lrSubgraph = testSubgraphBuilder(new LRPlanarSubgraphBuilder(), createK5(), 1);
testEdgeInserter(bmSubgraph, 1);
testEdgeInserter(lrSubgraph, 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isDynamicGraph();",
"@Test public void testPublic12() {\n Graph<Integer> graph= new Graph<Integer>();\n int i;\n\n // note this adds the adjacent vertices in the process\n for (i= 0; i < 10; i++)\n graph.addEdge(i, i + 1, 1);\n graph.addEdge(10, 0, 1);\n\n for (Integer vertex : graph.getVertices())\n assertTrue(graph.isInCycle(vertex));\n }",
"private void testBuildGraph() {\n\t\t// All test graphs have a node 8 with children [9, 10]\n\t\tSet<Node> expectedChildren = new HashSet<>();\n\t\texpectedChildren.add(new Node(9));\n\t\texpectedChildren.add(new Node(10));\n\n\t\tStudySetGraph disconnectedGraphWithoutCycle = new StudySetGraph(Edges.disconnectedGraphWithoutCycle);\n\t\tNode node = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph disconnectedGraphWithCycle = new StudySetGraph(Edges.disconnectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph connectedGraphWithCycle = new StudySetGraph(Edges.connectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\n\t\tStudySetGraph connectedGraphWithoutCycle = new StudySetGraph(Edges.connectedGraphWithoutCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t}",
"@Test public void testPublic13() {\n Graph<Integer> graph= TestGraphs.testGraph4();\n int i;\n\n for (i= 0; i < 4; i++)\n assertTrue(graph.isInCycle(i));\n\n assertFalse(graph.isInCycle(4));\n }",
"@Test\n public void testSimplify2() {\n ControlFlowGraph graph = new ControlFlowGraph();\n\n ControlFlowNode branch1 = new ControlFlowNode(null, graph, BRANCH);\n ControlFlowNode branch2 = new ControlFlowNode(null, graph, BRANCH);\n ControlFlowNode node1 = new ControlFlowNode(null, graph, STATEMENT);\n ControlFlowNode node2 = new ControlFlowNode(null, graph, STATEMENT);\n ControlFlowNode fictitious = new ControlFlowNode(null, graph, CONVERGE);\n ControlFlowNode fictitious2 = new ControlFlowNode(null, graph, CONVERGE);\n\n\n\n graph.addEdge(branch1, branch2);\n graph.addEdge(branch1, fictitious);\n graph.addEdge(branch2, node1);\n graph.addEdge(branch2, fictitious);\n graph.addEdge(node1, fictitious);\n graph.addEdge(fictitious, fictitious2);\n graph.addEdge(fictitious2, node2);\n\n graph.simplifyConvergenceNodes();\n\n assertTrue(graph.containsEdge(branch1, node2));\n assertTrue(graph.containsEdge(branch2, node2));\n assertTrue(graph.containsEdge(node1, node2));\n assertFalse(graph.containsVertex(fictitious));\n assertFalse(graph.containsVertex(fictitious2));\n }",
"protected boolean canPaintGraph() {\r\n\t\treturn pv.canPaintGraph;\r\n\t}",
"public boolean isMultiGraph();",
"@Test\n public void shouldOptimizeVisualizationOfThePipelineDependencyGraph() {\n\n String acceptance = \"acceptance\";\n String plugins = \"plugins\";\n String gitPlugins = \"git-plugins\";\n String cruise = \"cruise\";\n String gitTrunk = \"git-trunk\";\n String hgTrunk = \"hg-trunk\";\n String deployGo03 = \"deploy-go03\";\n String deployGo02 = \"deploy-go02\";\n String deployGo01 = \"deploy-go01\";\n String publish = \"publish\";\n\n ValueStreamMap graph = new ValueStreamMap(acceptance, null);\n graph.addUpstreamNode(new PipelineDependencyNode(plugins, plugins), null, acceptance);\n graph.addUpstreamNode(new PipelineDependencyNode(gitPlugins, gitPlugins), null, plugins);\n graph.addUpstreamNode(new PipelineDependencyNode(cruise, cruise), null, plugins);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(gitTrunk, gitTrunk, \"git\"), null, cruise, new MaterialRevision(null));\n graph.addUpstreamMaterialNode(new SCMDependencyNode(hgTrunk, hgTrunk, \"hg\"), null, cruise, new MaterialRevision(null));\n graph.addUpstreamNode(new PipelineDependencyNode(cruise, cruise), null, acceptance);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(hgTrunk, hgTrunk, \"hg\"), null, acceptance, new MaterialRevision(null));\n\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo03, deployGo03), acceptance);\n graph.addDownstreamNode(new PipelineDependencyNode(publish, publish), deployGo03);\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo01, deployGo01), publish);\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo02, deployGo02), acceptance);\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo01, deployGo01), deployGo02);\n\n List<List<Node>> nodesAtEachLevel = graph.presentationModel().getNodesAtEachLevel();\n\n assertThat(nodesAtEachLevel.size(), is(7));\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(0), 0, gitTrunk, hgTrunk);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(1), 1, gitPlugins, cruise);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(2), 2, plugins);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(3), 0, acceptance);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(4), 0, deployGo03, deployGo02);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(5), 1, publish);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(6), 0, deployGo01);\n\n MatcherAssert.assertThat(graph.findNode(gitTrunk).getDepth(), is(2));\n MatcherAssert.assertThat(graph.findNode(hgTrunk).getDepth(), is(3));\n MatcherAssert.assertThat(graph.findNode(gitPlugins).getDepth(), is(1));\n MatcherAssert.assertThat(graph.findNode(cruise).getDepth(), is(2));\n MatcherAssert.assertThat(graph.findNode(deployGo03).getDepth(), is(1));\n MatcherAssert.assertThat(graph.findNode(deployGo02).getDepth(), is(2));\n MatcherAssert.assertThat(graph.findNode(publish).getDepth(), is(1));\n MatcherAssert.assertThat(graph.findNode(deployGo01).getDepth(), is(1));\n }",
"int isCycle( Graph graph){\n int parent[] = new int[graph.V]; \n \n // Initialize all subsets as single element sets \n for (int i=0; i<graph.V; ++i) \n parent[i]=-1; \n \n // Iterate through all edges of graph, find subset of both vertices of every edge, if both subsets are same, then there is cycle in graph. \n for (int i = 0; i < graph.E; ++i){ \n int x = graph.find(parent, graph.edge[i].src); \n int y = graph.find(parent, graph.edge[i].dest); \n \n if (x == y) \n return 1; \n \n graph.Union(parent, x, y); \n } \n return 0; \n }",
"private PGraph testSubgraphBuilder(ILayoutProcessor subgraphBuilder, PGraph testGraph,\n int removeEdgeCount) {\n subgraphBuilder.process(testGraph);\n Object insertable_edges = testGraph.getProperty(Properties.INSERTABLE_EDGES);\n // checks also against null\n if (insertable_edges instanceof LinkedList) {\n @SuppressWarnings(\"unchecked\")\n LinkedList<PEdge> missingEdges = (LinkedList<PEdge>) insertable_edges;\n if (missingEdges.size() != removeEdgeCount) {\n fail(\"The planar subgraph builder should remove exactly \" + removeEdgeCount\n + \" edges, but does \" + missingEdges.size() + \".\");\n }\n } else {\n fail(\"The planar subgraph builder should remove exactly \" + removeEdgeCount\n + \" edges, but does \" + 0 + \".\");\n }\n return testGraph;\n }",
"public boolean reducible() {\n if (dfsTree.back.isEmpty()) {\n return true;\n }\n int size = controlFlow.transitions.length;\n boolean[] loopEnters = dfsTree.loopEnters;\n TIntHashSet[] cycleIncomings = new TIntHashSet[size];\n // really this may be array, since dfs already ensures no duplicates\n TIntArrayList[] nonCycleIncomings = new TIntArrayList[size];\n int[] collapsedTo = new int[size];\n int[] queue = new int[size];\n int top;\n for (int i = 0; i < size; i++) {\n if (loopEnters[i]) {\n cycleIncomings[i] = new TIntHashSet();\n }\n nonCycleIncomings[i] = new TIntArrayList();\n collapsedTo[i] = i;\n }\n\n // from whom back connections\n for (Edge edge : dfsTree.back) {\n cycleIncomings[edge.to].add(edge.from);\n }\n // from whom ordinary connections\n for (Edge edge : dfsTree.nonBack) {\n nonCycleIncomings[edge.to].add(edge.from);\n }\n\n for (int w = size - 1; w >= 0 ; w--) {\n top = 0;\n // NB - it is modified later!\n TIntHashSet p = cycleIncomings[w];\n if (p == null) {\n continue;\n }\n TIntIterator iter = p.iterator();\n while (iter.hasNext()) {\n queue[top++] = iter.next();\n }\n\n while (top > 0) {\n int x = queue[--top];\n TIntArrayList incoming = nonCycleIncomings[x];\n for (int i = 0; i < incoming.size(); i++) {\n int y1 = collapsedTo[incoming.getQuick(i)];\n if (!dfsTree.isDescendant(y1, w)) {\n return false;\n }\n if (y1 != w && p.add(y1)) {\n queue[top++] = y1;\n }\n }\n }\n\n iter = p.iterator();\n while (iter.hasNext()) {\n collapsedTo[iter.next()] = w;\n }\n }\n\n return true;\n }",
"@Override\n public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context)\n throws AlgebricksException {\n\n boolean cboMode = this.getCBOMode(context);\n boolean cboTestMode = this.getCBOTestMode(context);\n\n if (!(cboMode || cboTestMode)) {\n return false;\n }\n\n // If we reach here, then either cboMode or cboTestMode is true.\n // If cboTestMode is true, then we use predefined cardinalities for datasets for asterixdb regression tests.\n // If cboMode is true, then all datasets need to have samples, otherwise the check in doAllDataSourcesHaveSamples()\n // further below will return false.\n ILogicalOperator op = opRef.getValue();\n if (!(joinClause(op) || ((op.getOperatorTag() == LogicalOperatorTag.DISTRIBUTE_RESULT)))) {\n return false;\n }\n\n // if this join has already been seen before, no need to apply the rule again\n if (context.checkIfInDontApplySet(this, op)) {\n return false;\n }\n\n //joinOps = new ArrayList<>();\n allJoinOps = new ArrayList<>();\n newJoinOps = new ArrayList<>();\n leafInputs = new ArrayList<>();\n varLeafInputIds = new HashMap<>();\n outerJoinsDependencyList = new ArrayList<>();\n assignOps = new ArrayList<>();\n assignJoinExprs = new ArrayList<>();\n buildSets = new ArrayList<>();\n\n IPlanPrettyPrinter pp = context.getPrettyPrinter();\n printPlan(pp, (AbstractLogicalOperator) op, \"Original Whole plan1\");\n leafInputNumber = 0;\n boolean canTransform = getJoinOpsAndLeafInputs(op);\n\n if (!canTransform) {\n return false;\n }\n\n convertOuterJoinstoJoinsIfPossible(outerJoinsDependencyList);\n\n printPlan(pp, (AbstractLogicalOperator) op, \"Original Whole plan2\");\n int numberOfFromTerms = leafInputs.size();\n\n if (LOGGER.isTraceEnabled()) {\n String viewInPlan = new ALogicalPlanImpl(opRef).toString(); //useful when debugging\n LOGGER.trace(\"viewInPlan\");\n LOGGER.trace(viewInPlan);\n }\n\n if (buildSets.size() > 1) {\n buildSets.sort(Comparator.comparingDouble(o -> o.second)); // sort on the number of tables in each set\n // we need to build the smaller sets first. So we need to find these first.\n }\n joinEnum.initEnum((AbstractLogicalOperator) op, cboMode, cboTestMode, numberOfFromTerms, leafInputs, allJoinOps,\n assignOps, outerJoinsDependencyList, buildSets, varLeafInputIds, context);\n\n if (cboMode) {\n if (!doAllDataSourcesHaveSamples(leafInputs, context)) {\n return false;\n }\n }\n\n printLeafPlans(pp, leafInputs, \"Inputs1\");\n\n if (assignOps.size() > 0) {\n pushAssignsIntoLeafInputs(pp, leafInputs, assignOps, assignJoinExprs);\n }\n\n printLeafPlans(pp, leafInputs, \"Inputs2\");\n\n int cheapestPlan = joinEnum.enumerateJoins(); // MAIN CALL INTO CBO\n if (cheapestPlan == PlanNode.NO_PLAN) {\n return false;\n }\n\n PlanNode cheapestPlanNode = joinEnum.allPlans.get(cheapestPlan);\n\n generateHintWarnings();\n\n if (numberOfFromTerms > 1) {\n getNewJoinOps(cheapestPlanNode, allJoinOps);\n if (allJoinOps.size() != newJoinOps.size()) {\n return false; // there are some cases such as R OJ S on true. Here there is an OJ predicate but the code in findJoinConditions\n // in JoinEnum does not capture this. Will fix later. Just bail for now.\n }\n buildNewTree(cheapestPlanNode, newJoinOps, new MutableInt(0));\n opRef.setValue(newJoinOps.get(0));\n\n if (assignOps.size() > 0) {\n for (int i = assignOps.size() - 1; i >= 0; i--) {\n MutableBoolean removed = new MutableBoolean(false);\n removed.setFalse();\n pushAssignsAboveJoins(newJoinOps.get(0), assignOps.get(i), assignJoinExprs.get(i), removed);\n if (removed.isTrue()) {\n assignOps.remove(i);\n }\n }\n }\n\n printPlan(pp, (AbstractLogicalOperator) newJoinOps.get(0), \"New Whole Plan after buildNewTree 1\");\n ILogicalOperator root = addRemainingAssignsAtTheTop(newJoinOps.get(0), assignOps);\n printPlan(pp, (AbstractLogicalOperator) newJoinOps.get(0), \"New Whole Plan after buildNewTree 2\");\n printPlan(pp, (AbstractLogicalOperator) root, \"New Whole Plan after buildNewTree\");\n\n // this will be the new root\n opRef.setValue(root);\n\n if (LOGGER.isTraceEnabled()) {\n String viewInPlan = new ALogicalPlanImpl(opRef).toString(); //useful when debugging\n LOGGER.trace(\"viewInPlanAgain\");\n LOGGER.trace(viewInPlan);\n String viewOutPlan = new ALogicalPlanImpl(opRef).toString(); //useful when debugging\n LOGGER.trace(\"viewOutPlan\");\n LOGGER.trace(viewOutPlan);\n }\n\n if (LOGGER.isTraceEnabled()) {\n LOGGER.trace(\"---------------------------- Printing Leaf Inputs\");\n printLeafPlans(pp, leafInputs, \"Inputs\");\n // print joins starting from the bottom\n for (int i = newJoinOps.size() - 1; i >= 0; i--) {\n printPlan(pp, (AbstractLogicalOperator) newJoinOps.get(i), \"join \" + i);\n }\n printPlan(pp, (AbstractLogicalOperator) newJoinOps.get(0), \"New Whole Plan\");\n printPlan(pp, (AbstractLogicalOperator) root, \"New Whole Plan\");\n }\n\n // turn of this rule for all joins in this set (subtree)\n for (ILogicalOperator joinOp : newJoinOps) {\n context.addToDontApplySet(this, joinOp);\n }\n\n } else {\n buildNewTree(cheapestPlanNode);\n }\n\n return true;\n }",
"@Test\n public void testSimplify() {\n ControlFlowGraph graph = new ControlFlowGraph();\n\n ControlFlowNode branch1 = new ControlFlowNode(null, graph, BRANCH);\n ControlFlowNode branch2 = new ControlFlowNode(null, graph, BRANCH);\n ControlFlowNode node1 = new ControlFlowNode(null, graph, STATEMENT);\n ControlFlowNode node2 = new ControlFlowNode(null, graph, STATEMENT);\n ControlFlowNode fictitious = new ControlFlowNode(null, graph, CONVERGE);\n\n graph.addEdge(branch1, branch2);\n graph.addEdge(branch1, fictitious);\n graph.addEdge(branch2, node1);\n graph.addEdge(branch2, fictitious);\n graph.addEdge(node1, fictitious);\n graph.addEdge(fictitious, node2);\n\n graph.simplifyConvergenceNodes();\n\n assertTrue(graph.containsEdge(branch1, node2));\n assertTrue(graph.containsEdge(branch2, node2));\n assertTrue(graph.containsEdge(node1, node2));\n assertFalse(graph.containsVertex(fictitious));\n }",
"@Test public void testPublic11() {\n Graph<Character> graph= TestGraphs.testGraph3();\n\n for (Character ch : graph.getVertices())\n assertFalse(graph.isInCycle(ch));\n }",
"public static void main(String[] args) {\n /* *************** */\n /* * QUESTION 7 * */\n /* *************** */\n /* *************** */\n\n for(double p=0; p<1; p+=0.1){\n for(double q=0; q<1; q+=0.1){\n int res_1 = 0;\n int res_2 = 0;\n for(int i=0; i<100; i++){\n Graph graph_1 = new Graph();\n graph_1.generate_full_symmetric(p, q, 100);\n //graph_2.setVertices(new ArrayList<>(graph_1.getVertices()));\n Graph graph_2 = (Graph) deepCopy(graph_1);\n res_1+=graph_1.resolve_heuristic_v1().size();\n res_2+=graph_2.resolve_heuristic_v2();\n }\n res_1/=100;\n System.out.format(\"V1 - f( %.1f ; %.1f) = %s \\n\", p, q, res_1);\n res_2/=100;\n System.out.format(\"V2 - f( %.1f ; %.1f) = %s \\n\", p, q, res_2);\n }\n }\n\n }",
"@Test\n public void testDataStructuresWithSubnetwork() {\n if (!PhreakBuilder.isEagerSegmentCreation()) return;\n\n InternalKnowledgeBase kbase1 = buildKnowledgeBase(\"r\",\n \" a : A() B() exists ( C() and C(1;) ) E() X()\\n\");\n\n InternalWorkingMemory wm = (InternalWorkingMemory) kbase1.newKieSession();\n ObjectTypeNode aotn = getObjectTypeNode(kbase1.getRete(), A.class);\n ObjectTypeNode botn = getObjectTypeNode(kbase1.getRete(), B.class);\n\n LeftInputAdapterNode lian = (LeftInputAdapterNode) aotn.getSinks()[0];\n\n insertAndFlush(wm);\n\n SegmentPrototype smemProto0 = kbase1.getSegmentPrototype(lian);\n\n PathEndNode endNode0 = smemProto0.getPathEndNodes()[0];\n assertThat(endNode0.getType()).isEqualTo(NodeTypeEnums.RightInputAdapterNode);\n assertThat(endNode0.getPathMemSpec().allLinkedTestMask()).isEqualTo(2);\n assertThat(endNode0.getPathMemSpec().smemCount()).isEqualTo(2);\n\n PathEndNode endNode1 = smemProto0.getPathEndNodes()[1];\n assertThat(endNode1.getType()).isEqualTo(NodeTypeEnums.RuleTerminalNode);\n assertThat(endNode1.getPathMemSpec().allLinkedTestMask()).isEqualTo(3);\n assertThat(endNode1.getPathMemSpec().smemCount()).isEqualTo(2);\n }",
"private static boolean isCycle(Graph graph) {\n for (int i = 0; i < graph.edges.length; ++i) {\n int x = graph.find(graph.edges[i][0]);\n int y = graph.find(graph.edges[i][1]);\n\n // if both subsets are same, then there is cycle in graph.\n if (x == y) {\n // for edge 2-0 : parent of 0 is 2 == 2 and so we detected a cycle\n return true;\n }\n // keep doing union/merge of sets\n graph.union(x, y);\n }\n return false;\n }",
"@Test\n public void tr1()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n assertFalse(graph.reachable(sources, targets));\n }",
"public final boolean isAcyclic() {\n return this.topologicalSort().size() == this.sizeNodes();\n }",
"private boolean isLeafStage(DispatchablePlanMetadata dispatchablePlanMetadata) {\n return dispatchablePlanMetadata.getScannedTables().size() == 1;\n }",
"public void testContainsEdge() {\n System.out.println(\"containsEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n } else {\n Assert.assertTrue(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }\n\n }",
"@Test\n public void testAdaptivePruningWithAdjacentBadEdges() {\n final int goodMultiplicity = 1000;\n final int variantMultiplicity = 50;\n final int badMultiplicity = 5;\n\n final SeqVertex source = new SeqVertex(\"source\");\n final SeqVertex sink = new SeqVertex(\"sink\");\n final SeqVertex A = new SeqVertex(\"A\");\n final SeqVertex B = new SeqVertex(\"B\");\n final SeqVertex C = new SeqVertex(\"C\");\n final SeqVertex D = new SeqVertex(\"D\");\n final SeqVertex E = new SeqVertex(\"E\");\n\n\n for (boolean variantPresent : new boolean[] {false, true}) {\n final SeqGraph graph = new SeqGraph(20);\n\n graph.addVertices(source, A, B, C, D, sink);\n graph.addEdges(() -> new BaseEdge(true, goodMultiplicity), source, A, B, C, sink);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), A, D, C);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, B);\n\n if (variantPresent) {\n graph.addVertices(E);\n graph.addEdges(() -> new BaseEdge(false, variantMultiplicity), A, E, C);\n }\n\n final ChainPruner<SeqVertex, BaseEdge> pruner = new AdaptiveChainPruner<>(0.01, 2.0,\n ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n Assert.assertFalse(graph.containsVertex(D));\n if (variantPresent) {\n Assert.assertTrue(graph.containsVertex(E));\n }\n }\n }",
"private static boolean subBandsMatch(int[] sourceBands, int[] destinationBands) {\n/* 108 */ if (sourceBands == null && destinationBands == null)\n/* 109 */ return true; \n/* 110 */ if (sourceBands != null && destinationBands != null) {\n/* 111 */ if (sourceBands.length != destinationBands.length)\n/* */ {\n/* 113 */ return false;\n/* */ }\n/* 115 */ for (int i = 0; i < sourceBands.length; i++) {\n/* 116 */ if (sourceBands[i] != destinationBands[i]) {\n/* 117 */ return false;\n/* */ }\n/* */ } \n/* 120 */ return true;\n/* */ } \n/* */ \n/* 123 */ return false;\n/* */ }",
"@Test\n\t\tpublic void test2() {\n\t\t\tConvertGraphToBinaryTree tester=new ConvertGraphToBinaryTree();\n\t\t\tGraphNode n1=tester.new GraphNode(1);GraphNode n2=tester.new GraphNode(2);\n\t\t\tGraphNode n3=tester.new GraphNode(3);GraphNode n4=tester.new GraphNode(4);\n\t\t\tGraphNode n5=tester.new GraphNode(5);GraphNode n6=tester.new GraphNode(6);\n\t\t\tGraphNode n7=tester.new GraphNode(7);GraphNode n8=tester.new GraphNode(8);\n\t\t\tGraphNode n9=tester.new GraphNode(9);\n\t\t\tn1.neighbor.add(n2);n1.neighbor.add(n5);n1.neighbor.add(n6);n1.neighbor.add(n9);\n\t\t\tn2.neighbor.add(n1);n2.neighbor.add(n3);n2.neighbor.add(n7);\n\t\t\tn3.neighbor.add(n2);n3.neighbor.add(n4);n3.neighbor.add(n8);\n\t\t\tn4.neighbor.add(n3);n5.neighbor.add(n1);n6.neighbor.add(n1);\n\t\t\tn7.neighbor.add(n2);n8.neighbor.add(n3);n9.neighbor.add(n1);\n\t\t\tn7.neighbor.add(n6);n6.neighbor.add(n7);n7.neighbor.add(n8);\n\t\t\tn8.neighbor.add(n7);\n\t\t\tassertTrue(!tester.isBinaryTree(n1));\n\t\t\tGraphNode root=tester.convertToBinaryTree(n1);\n\t\t\tGraphNode last=null;\n\t\t\tGraphNode curr=root;\n\t\t\twhile(curr!=null){\n\t\t\t\tSystem.out.print(curr.val+\"->\");\n\t\t\t\tif(curr.neighbor.size()<=1&&root!=curr){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<curr.neighbor.size();i++){\n\t\t\t\t\tGraphNode next=curr.neighbor.get(i);\n\t\t\t\t\tif(next!=last){\n\t\t\t\t\t\tlast=curr;\n\t\t\t\t\t\tcurr=next;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}",
"@Test\n public void randomSymmetricCollapseTest() {\n List<MethodGraph> mGraphs = getAllMethodGraphs(MAX_V, MAX_E);\n mGraphs.sort((x, y) -> x.getID().compareTo(y.getID()));\n for (int run = 0; run < RUNS; run++) {\n mGraphs.sort((x, y) -> x.getID().compareTo(y.getID()));\n MethodGraph randomTestGraph = mGraphs.get(randomGenerator.nextInt(mGraphs.size()));\n \n Map<Integer, List<Integer>> adjList = createAdjacenceList(randomTestGraph);\n // printAdjList(adjList);\n List<JoanaCollapsedVertex> collapsed = new LinkedList<>();\n int maxCollapse = randomGenerator.nextInt(randomTestGraph.getVertexSet().size() / 3);\n for (int i = 0; i < maxCollapse && randomTestGraph.getVertexSet().size() > 1; i++) {\n int vertexCount = randomGenerator.nextInt(randomTestGraph.getVertexSet().size() - 2) + 1;\n Set<JoanaVertex> toCollapse = randomSample(randomTestGraph.getVertexSet(), vertexCount);\n Set<ViewableVertex> subset = toCollapse.stream().collect(Collectors.toSet());\n collapsed.add(collapse(randomTestGraph, subset));\n\n }\n Collections.reverse(collapsed);\n for (JoanaCollapsedVertex cVertex : collapsed) {\n randomTestGraph.expand(cVertex);\n //printAdjList(createAdjacenceList(randomTestGraph));\n }\n \n //printAdjList(createAdjacenceList(randomTestGraph));\n Assert.assertTrue(compareAdjList(adjList, createAdjacenceList(randomTestGraph)));\n }\n }",
"@Test\n public void testShortestPathEstacoes() {\n completeMap = new Graph(false);\n incompleteMap = new Graph(false);\n\n completeMap.insertVertex(porto);\n Company.getParkRegistry().getParkMap().put(porto, portoL);\n completeMap.insertVertex(braga);\n Company.getParkRegistry().getParkMap().put(braga, bragaL);\n completeMap.insertVertex(vila);\n Company.getParkRegistry().getParkMap().put(vila, vilaL);\n completeMap.insertVertex(aveiro);\n Company.getParkRegistry().getParkMap().put(aveiro, aveiroL);\n completeMap.insertVertex(coimbra);\n Company.getParkRegistry().getParkMap().put(coimbra, coimbraL);\n completeMap.insertVertex(leiria);\n Company.getParkRegistry().getParkMap().put(leiria, leiriaL);\n\n completeMap.insertVertex(viseu);\n Company.getParkRegistry().getParkMap().put(viseu, viseuL);\n completeMap.insertVertex(guarda);\n Company.getParkRegistry().getParkMap().put(guarda, guardaL);\n completeMap.insertVertex(castelo);\n Company.getParkRegistry().getParkMap().put(castelo, casteloL);\n completeMap.insertVertex(lisboa);\n Company.getParkRegistry().getParkMap().put(lisboa, lisboaL);\n completeMap.insertVertex(faro);\n Company.getParkRegistry().getParkMap().put(faro, faroL);\n\n completeMap.insertEdge(porto, aveiro, c, 75);\n completeMap.insertEdge(porto, braga, c2, 60);\n completeMap.insertEdge(porto, vila, c3, 100);\n completeMap.insertEdge(viseu, guarda, c4, 75);\n completeMap.insertEdge(guarda, castelo, c5, 100);\n completeMap.insertEdge(aveiro, coimbra, c6, 60);\n completeMap.insertEdge(coimbra, lisboa, c7, 200);\n completeMap.insertEdge(coimbra, leiria, c8, 80);\n completeMap.insertEdge(aveiro, leiria, c9, 120);\n completeMap.insertEdge(leiria, lisboa, c10, 150);\n\n completeMap.insertEdge(aveiro, viseu, c11, 85);\n completeMap.insertEdge(leiria, castelo, c12, 170);\n completeMap.insertEdge(lisboa, faro, c13, 280);\n\n incompleteMap = completeMap.clone();\n\n incompleteMap.removeEdge(aveiro, viseu);\n incompleteMap.removeEdge(leiria, castelo);\n incompleteMap.removeEdge(lisboa, faro);\n\n System.out.println(\"Test of shortest path\");\n\n LinkedList<String> shortPath = new LinkedList<>();\n double lenpath = 0;\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(completeMap, porto, l, shortPath);\n assertTrue(\"Length path should be 0 if vertex does not exist\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(incompleteMap, porto, faro, shortPath);\n assertTrue(\"Length path should be 0 if there is no path\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPath(completeMap, porto, porto, shortPath);\n assertTrue(\"Number of nodes should be 1 if source and vertex are the same\", lenpath == 0);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPath(incompleteMap, porto, lisboa, shortPath);\n assertTrue(\"Path between Porto and Lisboa should be 335 Km\", lenpath == 335);\n\n Iterator<String> it = shortPath.iterator();\n assertTrue(\"First in path should be Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Coimbra\", it.next().equals(coimbra));\n assertTrue(\"then Lisboa\", it.next().equals(lisboa));\n completeMap.insertEdge(porto, lisboa, c, 10);\n\n Company.getParkRegistry().setGraph(incompleteMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(incompleteMap, braga, leiria, shortPath);\n assertEquals(\"Path between Braga and Leiria should be close to 152.89\", lenpath, 152, 1);\n\n it = shortPath.iterator();\n\n assertTrue(\"First in path should be Braga\", it.next().equals(braga));\n assertTrue(\"then Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Coimbra\", it.next().equals(coimbra));\n assertTrue(\"then Leiria\", it.next().equals(leiria));\n\n shortPath.clear();\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPathEnergySpent(completeMap, porto, castelo, shortPath);\n assertEquals(\"Path between Porto and Castelo Branco should be close to 202.86\", lenpath, 202, 1);\n assertTrue(\"N. cities between Porto and Castelo Branco should be 5 \", shortPath.size() == 5);\n\n it = shortPath.iterator();\n\n assertTrue(\"First in path should be Porto\", it.next().equals(porto));\n assertTrue(\"then Aveiro\", it.next().equals(aveiro));\n assertTrue(\"then Viseu\", it.next().equals(viseu));\n assertTrue(\"then Viseu\", it.next().equals(guarda));\n assertTrue(\"then Castelo Branco\", it.next().equals(castelo));\n\n //Changing Edge: aveiro-viseu with Edge: leiria-C.Branco \n //should change shortest path between porto and castelo Branco\n completeMap.removeEdge(aveiro, viseu);\n completeMap.insertEdge(leiria, castelo, c12, 170);\n shortPath.clear();\n\n Company.getParkRegistry().setGraph(completeMap);\n lenpath = GraphAlgorithms.shortestPath(completeMap, porto, castelo, shortPath);\n assertTrue(\"Path between Porto and Castelo Branco should now be 330 Km\", lenpath == 330);\n assertTrue(\"Path between Porto and Castelo Branco should be 4 cities\", shortPath.size() == 4);\n\n }",
"@Test\n\t\t\t\tpublic void test4() {\n\t\t\t\t\tConvertGraphToBinaryTree tester=new ConvertGraphToBinaryTree();\n\t\t\t\t\tGraphNode n1=tester.new GraphNode(1);GraphNode n2=tester.new GraphNode(2);\n\t\t\t\t\tGraphNode n3=tester.new GraphNode(3);GraphNode n4=tester.new GraphNode(4);\n\t\t\t\t\tGraphNode n5=tester.new GraphNode(5);GraphNode n6=tester.new GraphNode(6);\n\t\t\t\t\tGraphNode n7=tester.new GraphNode(7);GraphNode n8=tester.new GraphNode(8);\n\t\t\t\t\tGraphNode n9=tester.new GraphNode(9);\n\t\t\t\t\tn1.neighbor.add(n2);n1.neighbor.add(n6);\n\t\t\t\t\tn2.neighbor.add(n1);n2.neighbor.add(n3);n2.neighbor.add(n7);\n\t\t\t\t\tn3.neighbor.add(n2);n3.neighbor.add(n4);n3.neighbor.add(n8);\n\t\t\t\t\tn4.neighbor.add(n3);n6.neighbor.add(n1);\n\t\t\t\t\tn7.neighbor.add(n2);n8.neighbor.add(n3);\n\t\t\t\t\tassertTrue(tester.isBinaryTree(n1));\n\t\t\t\t\tGraphNode root=tester.convertToBinaryTree(n1);\n\t\t\t\t\tGraphNode last=null;\n\t\t\t\t\tGraphNode curr=root;\n\t\t\t\t\twhile(curr!=null){\n\t\t\t\t\t\tSystem.out.print(curr.val+\"->\");\n\t\t\t\t\t\tif(curr.neighbor.size()<=1&&root!=curr){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int i=0;i<curr.neighbor.size();i++){\n\t\t\t\t\t\t\tGraphNode next=curr.neighbor.get(i);\n\t\t\t\t\t\t\tif(next!=last){\n\t\t\t\t\t\t\t\tlast=curr;\n\t\t\t\t\t\t\t\tcurr=next;\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\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}",
"public GraphObs generatePlanlikeGraph(GraphGenSettings gs)\n {\n if(gs.type != GraphGenSettings.PLANLIKEGRAPH)\n System.err.println(\"Not correct (planlike) type of settings\");\n return generatePlanlikeGraph(gs.numLines, gs.lineLengthLB, gs.lineLengthUB,\n gs.maxInterLineConnect, gs.maxLineVertConnect, \n gs.numObservations, gs.observationLength, gs.difference, \n gs.timeSyncT0);\n }",
"public boolean canReproduce() {\r\n ArrayList<Cell> neighbours = getNeighbours(FIRSTLAYER);\r\n\r\n int numOfSameT = 0;\r\n int numOfEmpty = 0;\r\n int numOfFoodC = 0;\r\n\r\n for (Cell cell : neighbours) {\r\n if (isSameType(cell.getInhabit())) {\r\n numOfSameT++;\r\n } else if (cell.getInhabit() == null && isTerrainAccessiable(cell)) {\r\n numOfEmpty++;\r\n } else if (isEdible(cell.getInhabit())) {\r\n numOfFoodC++;\r\n }\r\n }\r\n\r\n return (numOfSameT >= numOfSameTypeNeighbourToReproduce() \r\n && numOfEmpty >= numOfEmptyToReproduce()\r\n && numOfFoodC >= numOfFoodCellToReproduce());\r\n }",
"public static void main(String[] args) {\n\t\tString[][] graph = new String[][] { { \"a\", \"b\", \"1\" }, { \"a\", \"c\", \"6\" }, { \"b\", \"c\", \"2\" }, { \"b\", \"d\", \"5\" },\r\n\t\t\t\t{ \"b\", \"e\", \"4\" }, { \"c\", \"d\", \"2\" }, { \"c\", \"e\", \"3\" }, { \"d\", \"e\", \"1\" }, { \"d\", \"f\", \"4\" },\r\n\t\t\t\t{ \"e\", \"f\", \"7\" } };\r\n\t\tPrimAlgorithm pa = new PrimAlgorithm();\r\n\t\tpa.prim(graph, \"a\");\r\n\t\tSystem.out.println();\r\n\t\tString[][]\tgraph2 = new String[][] { { \"a\", \"b\", \"8\" }, { \"a\", \"c\", \"1\" }, { \"a\", \"d\", \"7\" }, { \"b\", \"c\", \"5\" },\r\n\t\t\t{ \"b\", \"e\", \"3\" }, { \"c\", \"d\", \"6\" }, { \"c\", \"e\", \"4\" }, { \"c\", \"f\", \"3\" }, { \"d\", \"f\", \"2\" },\r\n\t\t\t{ \"e\", \"f\", \"5\" } };\r\n\t\t\tpa.prim(graph2, \"a\");\r\n\t\t\tSystem.out.println();\r\n\t\tString[][]\tgraph3 = new String[][] { { \"a\", \"b\", \"5\" }, { \"a\", \"c\", \"3\" }, { \"a\", \"d\", \"7\" }, \r\n\t\t\t{ \"b\", \"e\", \"2\" }, { \"c\", \"e\", \"1\" }, { \"d\", \"f\", \"4\" },\r\n\t\t\t{ \"e\", \"f\", \"6\" } };\r\n\t\t\tpa.prim(graph3, \"a\");\r\n\t\t\tSystem.out.println();\r\n\r\n\t}",
"@Test\n public void testAdaptivePruningWithBadBubble() {\n final int goodMultiplicity = 1000;\n final int variantMultiplicity = 50;\n final int badMultiplicity = 5;\n\n final SeqVertex source = new SeqVertex(\"source\");\n final SeqVertex sink = new SeqVertex(\"sink\");\n final SeqVertex A = new SeqVertex(\"A\");\n final SeqVertex B = new SeqVertex(\"B\");\n final SeqVertex C = new SeqVertex(\"C\");\n final SeqVertex D = new SeqVertex(\"D\");\n final SeqVertex E = new SeqVertex(\"E\");\n final SeqVertex F = new SeqVertex(\"F\");\n final SeqVertex G = new SeqVertex(\"G\");\n final SeqVertex H = new SeqVertex(\"H\");\n\n\n for (boolean variantPresent : new boolean[] {false, true}) {\n final SeqGraph graph = new SeqGraph(20);\n\n graph.addVertices(source, A, B, C, D, E, F, G, sink);\n graph.addEdges(() -> new BaseEdge(true, goodMultiplicity), source, A, B, C, sink);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), A, D);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, F, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), D, G, E);\n graph.addEdges(() -> new BaseEdge(false, badMultiplicity), E, C);\n\n if (variantPresent) {\n graph.addVertices(H);\n graph.addEdges(() -> new BaseEdge(false, variantMultiplicity), A, H, C);\n }\n\n final ChainPruner<SeqVertex, BaseEdge> pruner = new AdaptiveChainPruner<>(0.01, ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_LOG_ODDS_THRESHOLD,\n ReadThreadingAssemblerArgumentCollection.DEFAULT_PRUNING_SEEDING_LOG_ODDS_THRESHOLD, 50);\n pruner.pruneLowWeightChains(graph);\n\n Assert.assertFalse(graph.containsVertex(D));\n if (variantPresent) {\n Assert.assertTrue(graph.containsVertex(H));\n }\n }\n }",
"public final AstValidator.foreach_plan_return foreach_plan() throws RecognitionException {\n AstValidator.foreach_plan_return retval = new AstValidator.foreach_plan_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree FOREACH_PLAN_SIMPLE348=null;\n CommonTree FOREACH_PLAN_COMPLEX350=null;\n AstValidator.generate_clause_return generate_clause349 =null;\n\n AstValidator.nested_blk_return nested_blk351 =null;\n\n\n CommonTree FOREACH_PLAN_SIMPLE348_tree=null;\n CommonTree FOREACH_PLAN_COMPLEX350_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:557:14: ( ^( FOREACH_PLAN_SIMPLE generate_clause ) | ^( FOREACH_PLAN_COMPLEX nested_blk ) )\n int alt100=2;\n int LA100_0 = input.LA(1);\n\n if ( (LA100_0==FOREACH_PLAN_SIMPLE) ) {\n alt100=1;\n }\n else if ( (LA100_0==FOREACH_PLAN_COMPLEX) ) {\n alt100=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 100, 0, input);\n\n throw nvae;\n\n }\n switch (alt100) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:557:16: ^( FOREACH_PLAN_SIMPLE generate_clause )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n FOREACH_PLAN_SIMPLE348=(CommonTree)match(input,FOREACH_PLAN_SIMPLE,FOLLOW_FOREACH_PLAN_SIMPLE_in_foreach_plan2908); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n FOREACH_PLAN_SIMPLE348_tree = (CommonTree)adaptor.dupNode(FOREACH_PLAN_SIMPLE348);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(FOREACH_PLAN_SIMPLE348_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_generate_clause_in_foreach_plan2910);\n generate_clause349=generate_clause();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, generate_clause349.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 2 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:558:16: ^( FOREACH_PLAN_COMPLEX nested_blk )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n FOREACH_PLAN_COMPLEX350=(CommonTree)match(input,FOREACH_PLAN_COMPLEX,FOLLOW_FOREACH_PLAN_COMPLEX_in_foreach_plan2931); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n FOREACH_PLAN_COMPLEX350_tree = (CommonTree)adaptor.dupNode(FOREACH_PLAN_COMPLEX350);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(FOREACH_PLAN_COMPLEX350_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_nested_blk_in_foreach_plan2933);\n nested_blk351=nested_blk();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, nested_blk351.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"private int[][] make_minimal_graph() {\n\n int[][] subs = new int[_subtypes.length][];\n for( int i=0; i<subs.length; i++ )\n subs[i] = _subtypes[i].clone();\n \n // For all types\n for( int i=0; i<subs.length; i++ ) {\n int[] subis = subs[i];\n // For all 'i' subtypes\n for( int j=0; j<subis.length && subis[j] != -1; j++ ) {\n int[] subjs = subs[subis[j]];\n // Pull out of subis all things found in subjs. We have a subtype isa\n // path from i->j by design of _subtypes, and the j->k list in subjs.\n // Remove any i->k as being redundant.\n int ix = j+1, ixx = j+1; // Index to read, index to keep non-dups\n int jx = 0; // Index to read the k's\n while( ix<subis.length && jx<subjs.length ) {\n int six = subis[ix];\n int sjx = subjs[jx];\n assert sjx != -1;\n if( six==-1 ) break; // Hit end-of-array sentinel\n if( six==sjx ) { ix++; jx++; } // i->j and j->sjx and i->sjx, skip both forward\n else if( six < sjx ) subis[ixx++] = subis[ix++]; // Keep and advance\n else jx++; // Advance\n }\n while( ixx < ix ) subis[ixx++] = -1; // Sentinel remaining unused elements\n }\n int ix = Util.find(subs[i],-1);\n if( ix != -1 ) subs[i] = Arrays.copyOfRange(subs[i],0,ix); // Compress extra elements\n }\n \n return subs;\n }",
"private boolean isAcyclic() {\n boolean visited[] = new boolean[getNumNodes()];\n boolean noCycle = true;\n int list[] = new int[getNumNodes() + 1];\n int index = 0;\n int lastIndex = 1;\n list[0] = randomParent;\n visited[randomParent] = true;\n while (index < lastIndex && noCycle) {\n int currentNode = list[index];\n int i = 1;\n\n // verify parents of current node\n while ((i < parentMatrix[currentNode][0]) && noCycle) {\n if (!visited[parentMatrix[currentNode][i]]) {\n if (parentMatrix[currentNode][i] != randomChild) {\n list[lastIndex] = parentMatrix[currentNode][i];\n lastIndex++;\n }\n else {\n noCycle = false;\n }\n visited[parentMatrix[currentNode][i]] = true;\n } // end of if(visited)\n i++;\n }\n index++;\n }\n //System.out.println(\"\\tnoCycle:\"+noCycle);\n return noCycle;\n }",
"@Test\n public void cyclicalGraphs1Test() throws Exception {\n // NOTE: we can't use the parser to create a circular graph because\n // vector clocks are partially ordered and do not admit cycles. So we\n // have to create circular graphs manually.\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"a\",\n \"a\" });\n // Create a loop in g1, with 3 nodes\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g1, 0);\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"a\" });\n // Create a loop in g2, with 2 nodes\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g2, 1);\n\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 3);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 4);\n\n ChainsTraceGraph g3 = new ChainsTraceGraph();\n List<EventNode> g3Nodes = addNodesToGraph(g2, new String[] { \"a\" });\n // Create a loop in g3, from a to itself\n g3Nodes.get(0).addTransition(g3Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g3, 2);\n\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 3);\n\n ChainsTraceGraph g4 = new ChainsTraceGraph();\n List<EventNode> g4Nodes = addNodesToGraph(g2, new String[] { \"a\" });\n exportTestGraph(g4, 2);\n\n testKEqual(g4Nodes.get(0), g2Nodes.get(0), 1);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 2);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 3);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 4);\n }",
"private boolean isSpanningTree() {\n BFSZeroEdge bfsZero = new BFSZeroEdge(graph, source);\n return bfsZero.isSpanningTree();\n }",
"private void testBookExample() {\n PGraph pgraph = createBookExample();\n for (PNode node : pgraph.getNodes()) {\n if (node.id == 4) {\n PEdge edge = node.getEdge(10);\n node.getEdges().remove(edge);\n node.getEdges().add(edge);\n }\n }\n System.out.println(pgraph.toString());\n Util.storeGraph(pgraph, 0, false);\n System.out.println(pgraph.getFaceCount() + \" faces after step \" + 0);\n // checks if the implementation of BoyerMyrvold approach generates correct planar subgraphs.\n final PGraph bmSubgraph = testSubgraphBuilder(new BoyerMyrvoldPlanarSubgraphBuilder(),\n pgraph, 1);\n // checks if the implementation of BoyerMyrvold approach generates correct planar subgraphs.\n // final PGraph lrSubgraph = testSubgraphBuilder(new LRPlanarSubgraphBuilder(), createK5(),\n // 1);\n System.out.println(bmSubgraph.toString());\n System.out.println(bmSubgraph.getFaceCount() + \" faces after step \" + 1);\n Util.storeGraph(bmSubgraph, 1, false);\n testEdgeInserter(bmSubgraph, 1);\n Util.storeGraph(bmSubgraph, 2, false);\n System.out.println(bmSubgraph.toString());\n System.out.println(bmSubgraph.getFaceCount() + \" faces after step \" + 2);\n // testEdgeInserter(lrSubgraph, 1);\n // Util.storeGraph(bmSubgraph, 0, false);\n\n }",
"@Test\n public void equalDagGraphsTest() throws Exception {\n // Generate two identical DAGs\n String traceStr = \"1,0 a\\n\" + \"2,1 b\\n\" + \"1,2 c\\n\" + \"2,3 d\\n\"\n + \"--\\n\" + \"1,0 a\\n\" + \"2,1 b\\n\" + \"1,2 c\\n\" + \"2,3 d\\n\";\n\n TraceParser parser = genParser();\n ArrayList<EventNode> parsedEvents = parser.parseTraceString(traceStr,\n testName.getMethodName(), -1);\n DAGsTraceGraph g1 = parser.generateDirectPORelation(parsedEvents);\n exportTestGraph(g1, 0);\n\n List<Transition<EventNode>> initNodeTransitions = g1\n .getDummyInitialNode().getAllTransitions();\n EventNode firstA = initNodeTransitions.get(0).getTarget();\n EventNode secondA = initNodeTransitions.get(1).getTarget();\n for (int k = 1; k < 4; k++) {\n testKEqual(firstA, secondA, k);\n }\n }",
"boolean hasIsVertexOf();",
"@Test\n public void tr3()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(1,0);\n assertFalse(graph.reachable(sources, targets));\n }",
"@Test\n public void tr2()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(0,1);\n assertTrue(graph.reachable(sources, targets));\n\n\n }",
"Collection<? extends Subdomain_group> getIsVertexOf();",
"@Test\n\tpublic void test1() {\n\t\tConvertGraphToBinaryTree tester=new ConvertGraphToBinaryTree();\n\t\tGraphNode n1=tester.new GraphNode(1);GraphNode n2=tester.new GraphNode(2);\n\t\tGraphNode n3=tester.new GraphNode(3);GraphNode n4=tester.new GraphNode(4);\n\t\tGraphNode n5=tester.new GraphNode(5);GraphNode n6=tester.new GraphNode(6);\n\t\tGraphNode n7=tester.new GraphNode(7);GraphNode n8=tester.new GraphNode(8);\n\t\tGraphNode n9=tester.new GraphNode(9);\n\t\tn1.neighbor.add(n2);n1.neighbor.add(n5);n1.neighbor.add(n6);n1.neighbor.add(n9);\n\t\tn2.neighbor.add(n1);n2.neighbor.add(n3);n2.neighbor.add(n7);\n\t\tn3.neighbor.add(n2);n3.neighbor.add(n4);n3.neighbor.add(n8);\n\t\tn4.neighbor.add(n3);n5.neighbor.add(n1);n6.neighbor.add(n1);\n\t\tn7.neighbor.add(n2);n8.neighbor.add(n3);n9.neighbor.add(n1);\n\t\tassertTrue(!tester.isBinaryTree(n1));\n\t\tGraphNode root=tester.convertToBinaryTree(n1);\n\t\tGraphNode last=null;\n\t\tGraphNode curr=root;\n\t\twhile(curr!=null){\n\t\t\tSystem.out.print(curr.val+\"->\");\n\t\t\tif(curr.neighbor.size()<=1&&root!=curr){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i=0;i<curr.neighbor.size();i++){\n\t\t\t\tGraphNode next=curr.neighbor.get(i);\n\t\t\t\tif(next!=last){\n\t\t\t\t\tlast=curr;\n\t\t\t\t\tcurr=next;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println();\n\t}",
"@Test\n\t\t\tpublic void test3() {\n\t\t\t\tConvertGraphToBinaryTree tester=new ConvertGraphToBinaryTree();\n\t\t\t\tGraphNode n1=tester.new GraphNode(1);GraphNode n2=tester.new GraphNode(2);\n\t\t\t\tGraphNode n3=tester.new GraphNode(3);GraphNode n4=tester.new GraphNode(4);\n\t\t\t\tGraphNode n5=tester.new GraphNode(5);GraphNode n6=tester.new GraphNode(6);\n\t\t\t\tGraphNode n7=tester.new GraphNode(7);GraphNode n8=tester.new GraphNode(8);\n\t\t\t\tGraphNode n9=tester.new GraphNode(9);\n\t\t\t\tn1.neighbor.add(n2);n1.neighbor.add(n6);\n\t\t\t\tn2.neighbor.add(n1);n2.neighbor.add(n3);n2.neighbor.add(n7);\n\t\t\t\tn3.neighbor.add(n2);n3.neighbor.add(n4);n3.neighbor.add(n8);\n\t\t\t\tn4.neighbor.add(n3);n6.neighbor.add(n1);\n\t\t\t\tn6.neighbor.add(n7);n7.neighbor.add(n6);\n\t\t\t\tn7.neighbor.add(n2);n8.neighbor.add(n3);\n\t\t\t\tassertTrue(!tester.isBinaryTree(n1));\n\t\t\t\tGraphNode root=tester.convertToBinaryTree(n1);\n\t\t\t\tGraphNode last=null;\n\t\t\t\tGraphNode curr=root;\n\t\t\t\twhile(curr!=null){\n\t\t\t\t\tSystem.out.print(curr.val+\"->\");\n\t\t\t\t\tif(curr.neighbor.size()<=1&&root!=curr){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int i=0;i<curr.neighbor.size();i++){\n\t\t\t\t\t\tGraphNode next=curr.neighbor.get(i);\n\t\t\t\t\t\tif(next!=last){\n\t\t\t\t\t\t\tlast=curr;\n\t\t\t\t\t\t\tcurr=next;\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\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}",
"void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }",
"public void test4_b_parametric() { // Schedule found: (m + 1)i + j + (-m - 2)\n\t\t/* RelTrafo1: (i, j) - (i, j - 1) = (0, 1)\n\t\t * RelTrafo2: (i, j) - (i - 1, j + m) = (1, -m)\n\t\t * (m + 1) - m + (-m - 2) = -m - 1\n\t\t *//*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1},\n\t\t\t\t{ 0, 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + m) \n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 1, 0},\n\t\t\t\t{ 0, 0, 0, 1}\n });\t\t\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, 0}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(true, true);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}",
"@Test \r\n void add_mutiple_edges_check_size(){\r\n for(int i = 0; i < 20; i++) {\r\n graph.addEdge(\"\" + i, \"\" + (i + 1));\r\n } \r\n List<String> adjacent;\r\n for(int i = 0; i < 20; i++) {\r\n adjacent = graph.getAdjacentVerticesOf(\"\"+i);\r\n if(!adjacent.contains(\"\" + (i+1))) {\r\n fail();\r\n }\r\n }\r\n if(graph.size() != 20 | graph.order() != 21) {\r\n fail();\r\n }\r\n \r\n }",
"public boolean percolates(){\n\t\tif(isPathological)\n\t\t\treturn isOpen(1,1);\n\t\t//System.out.println(\"Root top: \"+ quickUnion.find(N+2));\n\t\t\n\t\treturn (quickUnion.find(N*N+1) == quickUnion.find(0)); \t\n\t}",
"@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}",
"@Override\r\n public boolean isSatisfied(Configuration cfg) {\r\n Set<Node> firstNodes = new HashSet<Node>();\r\n Set<Node> secondNodes = new HashSet<Node>();\r\n if (getFirstSet().size() == 0 || getSecondSet().size() == 0) {\r\n //FIXME debug log VJob.logger.error(this.toString() + \": Some sets of virtual machines are empty\");\r\n return false;\r\n }\r\n\r\n for (VirtualMachine vm : getFirstSet()) {\r\n if (cfg.isRunning(vm)) {\r\n firstNodes.add(cfg.getLocation(vm));\r\n }\r\n }\r\n for (VirtualMachine vm : getSecondSet()) {\r\n if (cfg.isRunning(vm)) {\r\n secondNodes.add(cfg.getLocation(vm));\r\n }\r\n }\r\n\r\n for (Node n : firstNodes) {\r\n if (secondNodes.contains(n)) {\r\n \tManagedElementList<Node> ns = new SimpleManagedElementList<Node>();\r\n ns.addAll(firstNodes);\r\n ns.retainAll(secondNodes);\r\n //FIXME debug log VJob.logger.error(this.toString() + \": Nodes host VMs of the two groups: \" + ns);\r\n return false;\r\n }\r\n }\r\n for (Node n : secondNodes) {\r\n if (firstNodes.contains(n)) {\r\n \tManagedElementList<Node> ns = new SimpleManagedElementList<Node>();\r\n ns.addAll(secondNodes);\r\n ns.retainAll(firstNodes);\r\n //FIXME debug log VJob.logger.error(this.toString() + \": Nodes host VMs of the two groups: \" + ns);\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public boolean checkSubGrids(int[][] solutiongrid){ \n //Number of subgrids\n final int numgrids = solutiongrid.length;\n final int squareroot = (int)Math.sqrt(numgrids);\n \n for (int i = 0; i < solutiongrid.length; i += squareroot){ \n for (int j = 0; j < solutiongrid[i].length; j += squareroot){\n // creating N subgrids \n int[][] newArray = new int[squareroot][squareroot];\n int newRow = 0;\n for (int k = i; k < (i + squareroot); k++){\n int newColumn = 0;\n for (int l = j; l < (j + squareroot); l++){ \n newArray[newRow][newColumn] = solutiongrid[k][l];\n newColumn++; \n }\n newRow++;\n }\n if(!containsDuplicate(newArray))\n return true;\n }\n }\n \n return false;\n }",
"boolean containsPyramid(Graph<V, E> g)\n {\n /*\n * A pyramid looks like this:\n * \n * b2-(T2)-m2-(S2)-s2 / | \\ b1---(T1)-m1-(S1)-s1--a \\ | / b3-(T3)-m3-(S3)-s3\n * \n * Note that b1, b2, and b3 are connected and all names in parentheses are paths\n * \n */\n Set<Set<V>> visitedTriangles = new HashSet<>();\n for (V b1 : g.vertexSet()) {\n for (V b2 : g.vertexSet()) {\n if (b1 == b2 || !g.containsEdge(b1, b2))\n continue;\n for (V b3 : g.vertexSet()) {\n if (b3 == b1 || b3 == b2 || !g.containsEdge(b2, b3) || !g.containsEdge(b1, b3))\n continue;\n\n // Triangle detected for the pyramid base\n Set<V> triangles = new HashSet<>();\n triangles.add(b1);\n triangles.add(b2);\n triangles.add(b3);\n if (visitedTriangles.contains(triangles)) {\n continue;\n }\n visitedTriangles.add(triangles);\n\n for (V aCandidate : g.vertexSet()) {\n if (aCandidate == b1 || aCandidate == b2 || aCandidate == b3 ||\n // a is adjacent to at most one of b1,b2,b3\n g.containsEdge(aCandidate, b1) && g.containsEdge(aCandidate, b2)\n || g.containsEdge(aCandidate, b2) && g.containsEdge(aCandidate, b3)\n || g.containsEdge(aCandidate, b1) && g.containsEdge(aCandidate, b3))\n {\n continue;\n }\n\n // aCandidate could now be the top of the pyramid\n for (V s1 : g.vertexSet()) {\n if (s1 == aCandidate || !g.containsEdge(s1, aCandidate) || s1 == b2\n || s1 == b3\n || s1 != b1 && (g.containsEdge(s1, b2) || g.containsEdge(s1, b3)))\n {\n continue;\n }\n\n for (V s2 : g.vertexSet()) {\n if (s2 == aCandidate || !g.containsEdge(s2, aCandidate)\n || g.containsEdge(s1, s2) || s1 == s2 || s2 == b1 || s2 == b3\n || s2 != b2\n && (g.containsEdge(s2, b1) || g.containsEdge(s2, b3)))\n {\n continue;\n }\n\n for (V s3 : g.vertexSet()) {\n if (s3 == aCandidate || !g.containsEdge(s3, aCandidate)\n || g.containsEdge(s3, s2) || s1 == s3 || s3 == s2\n || g.containsEdge(s1, s3) || s3 == b1 || s3 == b2\n || s3 != b3\n && (g.containsEdge(s3, b1) || g.containsEdge(s3, b2)))\n {\n continue;\n }\n\n // s1, s2, s3 could now be the closest vertices to the top\n // vertex of the pyramid\n Set<V> M = new HashSet<>();\n M.addAll(g.vertexSet());\n M.remove(b1);\n M.remove(b2);\n M.remove(b3);\n M.remove(s1);\n M.remove(s2);\n M.remove(s3);\n\n Map<V, GraphPath<V, E>> S1 = new HashMap<>(),\n S2 = new HashMap<>(), S3 = new HashMap<>(),\n T1 = new HashMap<>(), T2 = new HashMap<>(),\n T3 = new HashMap<>();\n\n // find paths which could be the edges of the pyramid\n for (V m1 : M) {\n Set<V> validInterior = new HashSet<>();\n validInterior.addAll(M);\n validInterior.removeIf(\n i -> g.containsEdge(i, b2) || g.containsEdge(i, s2)\n || g.containsEdge(i, b3) || g.containsEdge(i, s3));\n\n validInterior.add(m1);\n validInterior.add(s1);\n Graph<V, E> subg = new AsSubgraph<>(g, validInterior);\n S1.put(\n m1, new DijkstraShortestPath<>(subg).getPath(m1, s1));\n validInterior.remove(s1);\n validInterior.add(b1);\n subg = new AsSubgraph<>(g, validInterior);\n T1.put(\n m1, new DijkstraShortestPath<>(subg).getPath(b1, m1));\n\n }\n for (V m2 : M) {\n Set<V> validInterior = new HashSet<>();\n validInterior.addAll(M);\n validInterior.removeIf(\n i -> g.containsEdge(i, b1) || g.containsEdge(i, s1)\n || g.containsEdge(i, b3) || g.containsEdge(i, s3));\n validInterior.add(m2);\n validInterior.add(s2);\n Graph<V, E> subg = new AsSubgraph<>(g, validInterior);\n S2.put(\n m2, new DijkstraShortestPath<>(subg).getPath(m2, s2));\n validInterior.remove(s2);\n validInterior.add(b2);\n subg = new AsSubgraph<>(g, validInterior);\n T2.put(\n m2, new DijkstraShortestPath<>(subg).getPath(b2, m2));\n\n }\n for (V m3 : M) {\n Set<V> validInterior = new HashSet<>();\n validInterior.addAll(M);\n validInterior.removeIf(\n i -> g.containsEdge(i, b1) || g.containsEdge(i, s1)\n || g.containsEdge(i, b2) || g.containsEdge(i, s2));\n validInterior.add(m3);\n validInterior.add(s3);\n\n Graph<V, E> subg = new AsSubgraph<>(g, validInterior);\n S3.put(\n m3, new DijkstraShortestPath<>(subg).getPath(m3, s3));\n validInterior.remove(s3);\n validInterior.add(b3);\n subg = new AsSubgraph<>(g, validInterior, null);\n T3.put(\n m3, new DijkstraShortestPath<>(subg).getPath(b3, m3));\n }\n\n // Check if all edges of a pyramid are valid\n Set<V> M1 = new HashSet<>();\n M1.addAll(M);\n M1.add(b1);\n for (V m1 : M1) {\n GraphPath<V, E> P1 = P(\n g, S1.get(m1), T1.get(m1), m1, b1, b2, b3, s1, s2, s3);\n if (P1 == null)\n continue;\n Set<V> M2 = new HashSet<>();\n M2.addAll(M);\n M2.add(b2);\n for (V m2 : M) {\n GraphPath<V,\n E> P2 = P(\n g, S2.get(m2), T2.get(m2), m2, b2, b1, b3, s2,\n s1, s3);\n if (P2 == null)\n continue;\n Set<V> M3 = new HashSet<>();\n M3.addAll(M);\n M3.add(b3);\n for (V m3 : M3) {\n GraphPath<V,\n E> P3 = P(\n g, S3.get(m3), T3.get(m3), m3, b3, b1, b2,\n s3, s1, s2);\n if (P3 == null)\n continue;\n if (certify) {\n if ((P1.getLength() + P2.getLength())\n % 2 == 0)\n {\n Set<V> set = new HashSet<>();\n set.addAll(P1.getVertexList());\n set.addAll(P2.getVertexList());\n set.add(aCandidate);\n BFOddHoleCertificate(\n new AsSubgraph<>(g, set));\n } else if ((P1.getLength() + P3.getLength())\n % 2 == 0)\n {\n Set<V> set = new HashSet<>();\n set.addAll(P1.getVertexList());\n set.addAll(P3.getVertexList());\n set.add(aCandidate);\n BFOddHoleCertificate(\n new AsSubgraph<>(g, set));\n } else {\n Set<V> set = new HashSet<>();\n set.addAll(P3.getVertexList());\n set.addAll(P2.getVertexList());\n set.add(aCandidate);\n BFOddHoleCertificate(\n new AsSubgraph<>(g, set));\n }\n }\n return true;\n\n }\n\n }\n\n }\n\n }\n }\n\n }\n\n }\n\n }\n }\n }\n\n return false;\n }",
"private static boolean checkEulerCicleGraph() {// es cycle o es tour\r\n\t\tfor (int i = 0; i < V; i++) {\r\n\t\t\tif (outdeg[i] % 2 == 1) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private boolean routine2(Graph<V, E> g)\n {\n return containsPyramid(g) || containsJewel(g) || hasConfigurationType1(g)\n || hasConfigurationType2(g) || hasConfigurationType3(g);\n }",
"public static void runTest() {\n Graph mnfld = new Graph();\n float destTank = 7f;\n\n // Adding Tanks\n mnfld.addPipe( new Node( 0f, 5.0f ) );\n mnfld.addPipe( new Node( 1f, 5.0f ) );\n mnfld.addPipe( new Node( 7f, 5.0f ) );\n\n // Adding Pipes\n mnfld.addPipe( new Node( 2f, 22f, 100f ) );\n mnfld.addPipe( new Node( 3f, 33f, 150f ) );\n mnfld.addPipe( new Node( 4f, 44f, 200f ) );\n mnfld.addPipe( new Node( 5f, 55f, 250f ) );\n mnfld.addPipe( new Node( 6f, 66f, 300f ) );\n mnfld.addPipe( new Node( 8f, 88f, 200f ) );\n mnfld.addPipe( new Node( 9f, 99f, 150f ) );\n mnfld.addPipe( new Node( 10f, 1010f, 150f ) );\n mnfld.addPipe( new Node( 20f, 2020f, 150f ) );\n\n // Inserting Edges to the graph\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 3f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 22f ), mnfld.getPipe( 4f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 7f ), 500f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 55f ), mnfld.getPipe( 6f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 7f ), 100f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 8f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 88f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 9f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 99f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 1010f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1010f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 20f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 2020f ), mnfld.getPipe( 3f ), 1f ) );\n\n // -- Running Dijkstra & Finding shortest Paths -- //\n// Dijkstra.findPaths( mnfld, 10, \"0.0\", destTank );\n//\n// mnfld.restoreDroppedConnections();\n//\n// System.out.println( \"\\n\\n\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( 0f ) );\n Dijkstra.mergePaths( mnfld, 1f, mnfld.getPipe( destTank ).getPath(), mnfld.getPipe( destTank ) );\n\n }",
"boolean bpm(boolean bpGraph[][], int u, boolean seen[],\n\t\t\t\tint matchR[])\n\t{\n\t\tfor (int v = 0; v < N; v++)\n\t\t{\n\t\t\tif (bpGraph[u][v] && !seen[v])\n\t\t\t{\n\t\t\t\tseen[v] = true;\n\t\t\t\tif (matchR[v] < 0 || bpm(bpGraph, matchR[v],\n\t\t\t\t\t\t\t\t\t\tseen, matchR))\n\t\t\t\t{\n\t\t\t\t\tmatchR[v] = u;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean createMonetizationPlan(SubscriptionPolicy subPolicy) throws APIManagementException {\n\n Monetization monetizationImplementation = getMonetizationImplClass();\n if (monetizationImplementation != null) {\n try {\n return monetizationImplementation.createBillingPlan(subPolicy);\n } catch (MonetizationException e) {\n APIUtil.handleException(\"Failed to create monetization plan for : \" + subPolicy.getPolicyName(), e);\n }\n }\n return false;\n }",
"public static void test02() {\n TreeNode n1 = new TreeNode(1);\n TreeNode n2 = new TreeNode(2);\n TreeNode n3 = new TreeNode(2);\n TreeNode n4 = new TreeNode(4);\n TreeNode n5 = new TreeNode(5);\n TreeNode n6 = new TreeNode(6);\n TreeNode n7 = new TreeNode(4);\n TreeNode n8 = new TreeNode(8);\n TreeNode n9 = new TreeNode(9);\n TreeNode n10 = new TreeNode(10);\n TreeNode n11 = new TreeNode(11);\n TreeNode n12 = new TreeNode(11);\n TreeNode n13 = new TreeNode(10);\n TreeNode n14 = new TreeNode(9);\n TreeNode n15 = new TreeNode(8);\n assemble(n1, n2, n3);\n assemble(n2, n4, n5);\n assemble(n3, n6, n7);\n assemble(n4, n8, n9);\n assemble(n5, n10, n11);\n assemble(n6, n12, n13);\n assemble(n7, n14, n15);\n assemble(n8, null, null);\n assemble(n9, null, null);\n assemble(n10, null, null);\n assemble(n11, null, null);\n assemble(n12, null, null);\n assemble(n13, null, null);\n assemble(n14, null, null);\n assemble(n15, null, null);\n System.out.println(isSymmetrical(n1));\n }",
"private boolean subGridCheck() {\n\t\tint sqRt = (int)Math.sqrt(dimension);\n\t\tfor(int i = 0; i < sqRt; i++) {\n\t\t\tint increment = i * sqRt;\n\t\t\tfor(int val = 1; val <= dimension; val++) {\n\t\t\t\tint valCounter = 0;\n\t\t\t\tfor(int row = 0 + increment; row < sqRt + increment; row++) {\n\t\t\t\t\tfor(int col = 0 + increment; col < sqRt + increment; col++) {\n\t\t\t\t\t\tif(puzzle[row][col] == val)\n\t\t\t\t\t\t\tvalCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(valCounter >= 2)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private boolean revisar(GrafoAristaPonderada G) {\n\n // check peso\n double pesoTotal = 0.0;\n for (Arista a : aristas()) {\n pesoTotal += a.peso();\n }\n if (Math.abs(pesoTotal - peso()) > EPSILON_PUNTO_FLOTANTE) {\n System.err.printf(\n \"Peso de la aristas no es igual a peso(): %f vs. %f\\n\",\n pesoTotal, peso());\n return false;\n }\n\n // check that it is acyclic\n UF uf = new UF(G.V());\n for (Arista e : aristas()) {\n int v = e.unVertice(), w = e.otroVertice(v);\n if (uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque\");\n return false;\n }\n uf.union(v, w);\n }\n\n // check that it is a spanning forest\n for (Arista a : G.aristas()) {\n int v = a.unVertice(), w = a.otroVertice(v);\n if (!uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque de expansion\");\n return false;\n }\n }\n\n // check that it is a minimal spanning forest (cut optimality conditions)\n for (Arista a : aristas()) {\n\n // all aristas in MST except a\n uf = new UF(G.V());\n for (Arista o : aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (o != a) uf.union(x, y);\n }\n\n // check that e is min peso edge in crossing cut\n for (Arista o : G.aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (!uf.estanConectados(x, y)) {\n if (o.peso() < a.peso()) {\n System.err.println(\"Arista \" + o + \n \" viola las condiciones de optimalidad\"\n + \"del corte\");\n return false;\n }\n }\n }\n\n }\n\n return true;\n }",
"public boolean isDAG() {\n return false;\n }",
"@Test\n public void partitionCorrectness() {\n List<Integer> ns = new Node<>(5, new Node<>(3,\n new Node<>(7, new Node<>(1, new Empty<>()))));\n List<Integer> empty = new Empty<>();\n assertFalse(DP.bupartition(ns, 2));\n assertTrue(DP.bupartition(ns, 8));\n assertTrue(DP.bupartition(ns, 6));\n assertTrue(DP.bupartition(ns,4));\n assertTrue(DP.bupartition(ns,11));\n assertFalse(DP.bupartition(empty, 6));\n }",
"public String canWalkExactly(int N, int[] from, int[] to) {\n isVisited = new boolean[N];\n steps = new int[N];\n minSteps = new int[N];\n path = new Stack<>();\n adj = new ArrayList<>(N);\n allSCC = new ArrayList<>();\n for (int i = 0; i < N; i++)\n adj.add(new ArrayList<>());\n\n // populate adj based on from, to\n for (int i = 0; i < from.length; i++) {\n adj.get(from[i]).add(to[i]);\n }\n\n totalSteps = 0;\n Arrays.fill(isVisited, false);\n Arrays.fill(steps, UNVISITED);\n Arrays.fill(minSteps, UNVISITED);\n tarjanSCC(0);\n\n // check if 0 and 1 are in the same scc\n System.out.println(\"CHECKING\");\n boolean found = false;\n for (List<Integer> scc : allSCC) {\n if (scc.contains(0) && scc.contains(1)) {\n found = true;\n break;\n }\n }\n if (!found) return NO;\n// if(minSteps[0] != minSteps[1]) return NO;\n System.out.println(\"0 and 1 in the same scc\");\n /*\n Check if gcd of the length of all simple cycles is 1\n by checking if it is an aperiodic graph\n https://en.wikipedia.org/wiki/Aperiodic_graph\n */\n depths = new int[N];\n Arrays.fill(depths, UNVISITED);\n depths[0] = 0;\n findDepths(0);\n\n int res = -1;\n for (int i = 0; i < from.length; i++) {\n int s = from[i];\n int t = to[i];\n if (depths[s] == UNVISITED || depths[t] == UNVISITED) continue;\n int len = depths[t] - depths[s] - 1;\n if (len == 0) continue;\n if (len < 0) len *= -1;\n if (res == -1) res = len;\n else res = gcd(res, len);\n }\n\n return res == 1 ? YES : NO;\n }",
"public interface TestData {\n NumberVertex[] VERTICES = {new NumberVertex(0), new NumberVertex(1), new NumberVertex(2), new NumberVertex(3),\n new NumberVertex(4), new NumberVertex(5), new NumberVertex(6), new NumberVertex(7), new NumberVertex(8)};\n\n DirectedEdge[] DIRECTED_EDGES ={\n new DirectedEdge(VERTICES[0], VERTICES[7]),\n new DirectedEdge(VERTICES[1], VERTICES[0]),\n new DirectedEdge(VERTICES[0], VERTICES[2]),\n new DirectedEdge(VERTICES[0], VERTICES[3]),\n new DirectedEdge(VERTICES[2], VERTICES[4]),\n new DirectedEdge(VERTICES[2], VERTICES[5]),\n new DirectedEdge(VERTICES[2], VERTICES[0]),\n new DirectedEdge(VERTICES[4], VERTICES[6]),\n new DirectedEdge(VERTICES[4], VERTICES[7]),\n new DirectedEdge(VERTICES[6], VERTICES[0]),\n new DirectedEdge(VERTICES[6], VERTICES[8]),\n new DirectedEdge(VERTICES[8], VERTICES[1])};\n\n UndirectedEdge[] UNDIRECTED_EDGES ={\n new UndirectedEdge(VERTICES[1], VERTICES[0]),\n new UndirectedEdge(VERTICES[0], VERTICES[2]),\n new UndirectedEdge(VERTICES[0], VERTICES[3]),\n new UndirectedEdge(VERTICES[2], VERTICES[4]),\n new UndirectedEdge(VERTICES[2], VERTICES[4]),\n new UndirectedEdge(VERTICES[2], VERTICES[5]),\n new UndirectedEdge(VERTICES[4], VERTICES[6]),\n new UndirectedEdge(VERTICES[4], VERTICES[6]),\n new UndirectedEdge(VERTICES[4], VERTICES[7]),\n new UndirectedEdge(VERTICES[6], VERTICES[0]),\n new UndirectedEdge(VERTICES[6], VERTICES[8]),\n new UndirectedEdge(VERTICES[8], VERTICES[1])};\n}",
"public static boolean checkPath(int[][] bs, int i) {\n ArrayList<Integer> temp_cP = new ArrayList<Integer>();\r\n Set<Integer> temp_setcP = new HashSet<Integer>();\r\n boolean denoter = true;\r\n while (i == 3) {\r\n for (int k = 0; k < i; k++) {\r\n for (int e = 0; e < 3; e++) {\r\n temp_cP.add(e, bs[k][e]);\r\n }\r\n }\r\n temp_setcP = new HashSet<Integer>(temp_cP);\r\n if (temp_cP.size() > temp_setcP.size()) {\r\n denoter = false;\r\n break;\r\n\r\n } else {\r\n temp_cP.clear();\r\n temp_setcP.clear();\r\n\r\n for (int k = 0; k < i; k++) {\r\n for (int e = 3; e < 6; e++) {\r\n temp_cP.add(bs[k][e]);\r\n }\r\n }\r\n temp_setcP = new HashSet<Integer>(temp_cP);\r\n if (temp_cP.size() > temp_setcP.size()) {\r\n denoter = false;\r\n break;\r\n\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n while (i == 6) {\r\n\r\n for (int k = 3; k < i; k++) {\r\n for (int e = 0; e < 3; e++) {\r\n temp_cP.add(e, bs[k][e]);\r\n }\r\n }\r\n temp_setcP = new HashSet<Integer>(temp_cP);\r\n if (temp_cP.size() > temp_setcP.size()) {\r\n denoter = false;\r\n break;\r\n\r\n } else {\r\n temp_cP.clear();\r\n temp_setcP.clear();\r\n\r\n for (int k = 3; k < i; k++) {\r\n for (int e = 3; e < 6; e++) {\r\n temp_cP.add(bs[k][e]);\r\n }\r\n }\r\n temp_setcP = new HashSet<Integer>(temp_cP);\r\n if (temp_cP.size() > temp_setcP.size()) {\r\n denoter = false;\r\n break;\r\n\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n }\r\n return denoter;\r\n }",
"private boolean isPathH(Board B, Move M, Graph G, int row, int column, Tile tile) {\n\n Tile t = tile;\n\n boolean result = true;\n boolean tempa = true;\n\n int sourceid = 0;\n\n\n int c = M.getX(), r = M.getY();\n\n if (r <= 0 && c <= 0) {\n\n\n } else if (r <= 0 && c >= 0) {\n\n\n } else if (r >= 0 && c >= 0) {\n\n for (int y = 0; y != 2; y++) {\n\n sourceid = (row * B.width) + column;\n\n // System.out.println(\"source id: \" + sourceid);\n\n if (y == 0) {\n\n\n //aab\n for (int i = 0; i != r; i++) {\n\n System.out.println(G.adj(sourceid).toString());\n\n if (G.adj.get(sourceid).contains(sourceid + B.width)) {\n\n // System.out.println(\"row artı\");\n\n } else {\n\n result = false;\n\n }\n\n sourceid += B.width;\n\n }\n\n for (int i = 0; i != c; i++) {\n\n\n if (G.adj.get(sourceid).contains(sourceid + 1)) {\n\n // System.out.println(\"okk\");\n\n } else {\n\n //return false;\n\n }\n\n sourceid += 1;\n\n System.out.println(\"b\");\n\n }\n } else {\n\n sourceid = row * B.width + column;\n\n for (int i = 0; i != c; i++) {\n // System.out.println(\"a\");\n\n }\n for (int i = 0; i != r; i++) {\n // System.out.println(\"b\");\n\n }\n }\n\n\n }\n\n\n }\n\n\n return result;\n }",
"private boolean isExplodedGraphTooBig(ProgramState programState) {\n return steps + workList.size() > MAX_STEPS / 2 && programState.constraintsSize() > 75;\n }",
"private boolean discrimPaths(Graph graph) {\n List<Node> nodes = graph.getNodes();\n\n for (Node b : nodes) {\n\n //potential A and C candidate pairs are only those\n // that look like this: A<-oBo->C or A<->Bo->C\n List<Node> possAandC = graph.getNodesOutTo(b, Endpoint.ARROW);\n\n //keep arrows and circles\n List<Node> possA = new LinkedList<>(possAandC);\n possA.removeAll(graph.getNodesInTo(b, Endpoint.TAIL));\n\n //keep only circles\n List<Node> possC = new LinkedList<>(possAandC);\n possC.retainAll(graph.getNodesInTo(b, Endpoint.CIRCLE));\n\n for (Node a : possA) {\n for (Node c : possC) {\n if (!graph.isParentOf(a, c)) {\n continue;\n }\n\n LinkedList<Node> reachable = new LinkedList<>();\n reachable.add(a);\n if (reachablePathFindOrient(graph, a, b, c, reachable)) {\n return true;\n }\n }\n }\n }\n return false;\n }",
"public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}",
"private ScheduleGrph initializeIdenticalTaskEdges(ScheduleGrph input) {\n\n\t\tScheduleGrph correctedInput = (ScheduleGrph) SerializationUtils.clone(input);\n\t\t// FORKS AND TODO JOINS\n\t\t/*\n\t\t * for (int vert : input.getVertices()) { TreeMap<Integer, List<Integer>> sorted\n\t\t * = new TreeMap<Integer, List<Integer>>(); for (int depend :\n\t\t * input.getOutNeighbors(vert)) { int edge = input.getSomeEdgeConnecting(vert,\n\t\t * depend); int weight = input.getEdgeWeightProperty().getValueAsInt(edge); if\n\t\t * (sorted.get(weight) != null) { sorted.get(weight).add(depend); } else {\n\t\t * ArrayList<Integer> a = new ArrayList(); a.add(depend); sorted.put(weight, a);\n\t\t * }\n\t\t * \n\t\t * } int curr = -1; for (List<Integer> l : sorted.values()) { for (int head : l)\n\t\t * {\n\t\t * \n\t\t * if (curr != -1) { correctedInput.addDirectedSimpleEdge(curr, head); } curr =\n\t\t * head; }\n\t\t * \n\t\t * } }\n\t\t */\n\n\t\tfor (int vert : input.getVertices()) {\n\t\t\tfor (int vert2 : input.getVertices()) {\n\t\t\t\tint vertWeight = input.getVertexWeightProperty().getValueAsInt(vert);\n\t\t\t\tint vert2Weight = input.getVertexWeightProperty().getValueAsInt(vert2);\n\n\t\t\t\tIntSet vertParents = input.getInNeighbors(vert);\n\t\t\t\tIntSet vert2Parents = input.getInNeighbors(vert2);\n\n\t\t\t\tIntSet vertChildren = input.getOutNeighbors(vert);\n\t\t\t\tIntSet vert2Children = input.getOutNeighbors(vert2);\n\n\t\t\t\tboolean childrenEqual = vertChildren.containsAll(vert2Children)\n\t\t\t\t\t\t&& vert2Children.containsAll(vertChildren);\n\n\t\t\t\tboolean parentEqual = vertParents.containsAll(vert2Parents) && vert2Parents.containsAll(vertParents);\n\n\t\t\t\tboolean inWeightsSame = true;\n\t\t\t\tfor (int parent : vertParents) {\n\t\t\t\t\tfor (int parent2 : vert2Parents) {\n\t\t\t\t\t\tif (parent == parent2 && input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(parent, vert)) == input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(parent2, vert2))) {\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinWeightsSame = 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 (!inWeightsSame) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tboolean outWeightsSame = true;\n\t\t\t\tfor (int child : vertChildren) {\n\t\t\t\t\tfor (int child2 : vert2Children) {\n\t\t\t\t\t\tif (child == child2 && input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(vert, child)) == input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(vert2, child2))) {\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toutWeightsSame = 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 (!outWeightsSame) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboolean alreadyEdge = correctedInput.areVerticesAdjacent(vert, vert2)\n\t\t\t\t\t\t|| correctedInput.areVerticesAdjacent(vert2, vert);\n\n\t\t\t\tif (vert != vert2 && vertWeight == vert2Weight && parentEqual && childrenEqual && inWeightsSame\n\t\t\t\t\t\t&& outWeightsSame && !alreadyEdge) {\n\t\t\t\t\tint edge = correctedInput.addDirectedSimpleEdge(vert, vert2);\n\t\t\t\t\tcorrectedInput.getEdgeWeightProperty().setValue(edge, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn correctedInput;\n\t}",
"@Test\n public void cyclicalGraphs3Test() throws Exception {\n // Test graphs with multiple loops. g1 has two different loops, which\n // have to be correctly matched to g2 -- which is build in a different\n // order but is topologically identical to g1.\n\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop1 in g1, with the first 4 nodes.\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(3), Event.defTimeRelationStr);\n g1Nodes.get(3).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop2 in g1, with the last 2 nodes, plus the initial node.\n g1Nodes.get(0).addTransition(g1Nodes.get(4), Event.defTimeRelationStr);\n g1Nodes.get(4).addTransition(g1Nodes.get(5), Event.defTimeRelationStr);\n g1Nodes.get(5).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g1, 0);\n\n // //////////////////\n // Now create g2, by generating the two identical loops in the reverse\n // order.\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop2 in g2, with the last 2 nodes, plus the initial node.\n g2Nodes.get(0).addTransition(g2Nodes.get(4), Event.defTimeRelationStr);\n g2Nodes.get(4).addTransition(g2Nodes.get(5), Event.defTimeRelationStr);\n g2Nodes.get(5).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop1 in g2, with the first 4 nodes.\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(2), Event.defTimeRelationStr);\n g2Nodes.get(2).addTransition(g2Nodes.get(3), Event.defTimeRelationStr);\n g2Nodes.get(3).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g2, 1);\n\n // //////////////////\n // Now test that the two graphs are identical for all k starting at the\n // initial node.\n\n for (int k = 1; k < 7; k++) {\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), k);\n }\n }",
"public static void main(String[] args) {\n // write your code here\n initialize();\n\n\n Sort(profile.getProfile());\n Integer[][][] mas = new Integer[11][11][1];\n\n R.add(Q.pollFirst());\n\n for (Integer[] e : Q) {\n if (DiskCover(e, R, Rant)) {\n R.add(e);\n // Rtmp.add(Q.pollFirst());\n }\n }\n\n FindMaxAngle(R, 0);\n\n Rg = R;\n //Rtmp-R add Q\n list_r.add(R);\n int j = 0;\n boolean flag = false;\n while (!Q.isEmpty()) {\n\n\n list_r.add(FindMaxPolygonCover(Rg));\n\n }\n\n MakePolygon(list_r);\n\n boolean work = true;\n\n do {\n R.clear();\n Gr.getEdge().clear();\n // algorithmConnectivity.setMarketVertexFirst();\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n\n AlgorithmConnectivity algorithmConnectivity = new AlgorithmConnectivity();\n algorithmConnectivity.initializated(Gr.getVertex().size());\n algorithmConnectivity.setMarketVertexFirst();\n algorithmConnectivity.setMarketVertexSecond(i);\n while (algorithmConnectivity.findSecond() != 100) {\n //int a= iterator.next();\n int index = algorithmConnectivity.findSecond();\n algorithmConnectivity.setMarketVertexThird(index);\n algorithmConnectivity = MakeConnection(index, algorithmConnectivity);\n }\n R.add(algorithmConnectivity.getMarket());\n }\n if (!checkConnectionGraf(R)) {\n //MakeConnection(Gr);\n ArrayList<Integer[]> result = new ArrayList<Integer[]>();\n ArrayList<Integer> ver = new ArrayList<Integer>();\n ArrayList<ArrayList<Integer>> v = new ArrayList<ArrayList<Integer>>();\n for (Integer[] p : R) {\n ArrayList<Integer> res = new ArrayList<Integer>();\n ver.clear();\n for (int i = 0; i < p.length; i++) {\n if (p[i] != 1) {\n ver.add(Gr.getVertex().get(i));\n }\n }\n if (ver.size() != 1) {\n // result.add(AddNewRoute(ver));\n // v.add(ver);\n result.addAll(AddNewRoute(ver));\n }\n }\n int minumum = 1000;\n Integer[] place = new Integer[3];\n for (int i = 0; i < result.size(); i++) {\n Integer[] ma = result.get(i);\n if (ma[2] == null) {\n System.out.print(\"\");\n }\n if ((minumum > ma[2]) && (ma[2]) != 0) {\n minumum = ma[2];\n place = ma;\n }\n }\n if (minumum == 1000) {\n for (Integer[] p : R) {\n ver.clear();\n for (int i = 0; i < p.length - 1; i++) {\n if (p[i] == 1) {\n ver.add(Gr.getVertex().get(i));\n }\n }\n result.addAll(AddNewRoute(ver));\n // result.add(AddNewRoute(ver));\n for (int i = 0; i < result.size(); i++) {\n Integer[] ma = result.get(i);\n if (ma[2] == null) {\n System.out.print(\"\");\n }\n if ((minumum > ma[2]) && (ma[2]) != 0) {\n minumum = ma[2];\n place = ma;\n }\n }\n AddNewVertex(place);\n }\n } else {\n AddNewVertex(place);\n }\n } else {\n work = false;\n }\n\n } while (work);\n\n MobileProfile prof = new MobileProfile();\n prof.initialization(Gr.getVertex().size());\n int sum = 0;\n int[][][] massive = profile.getProfile();\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n // sum=sum+massive;\n }\n\n\n zcd = new ZCD();\n\n zcd.setGraphR(Gr);\n\n Iterator<Edges> it = Gr.getEdgeses().iterator();\n boolean fla = false;\n while (it.hasNext()) {\n Edges d = it.next();\n LinkedList<Integer[]> graph_edges = g.getSort_index();\n\n for (int i = 0; i < graph_edges.size(); i++) {\n Integer[] mass = graph_edges.get(i);\n if (checkLine(g.getCoordinate().get(mass[0]), g.getCoordinate().get(mass[1]), Gr.getCoordinate().get(d.getX()), Gr.getCoordinate().get(d.getY()))) {\n if (!fla) {\n Integer[] wr = new Integer[3];\n wr[0] = d.getX();\n wr[1] = d.getY();\n wr[2] = mass[2];\n fla = true;\n zcd.addWrEdges(wr);\n }\n }\n }\n if (!fla) {\n\n Integer[] wr = new Integer[3];\n wr[0] = d.getX();\n wr[1] = d.getY();\n wr[2] = 2;\n\n zcd.addWrEdges(wr);\n\n }\n fla = false;\n }\n\n Edges e = null;\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n int sumwr = 0;\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n for (int k = 0; k < zcd.getWrEdges().size(); k++) {\n\n e = iterator.next();\n if (e.checkEdge(i)) {\n Integer[] m = zcd.getWrEdges().get(k);\n sumwr = sumwr + m[2];\n\n }\n\n }\n wr.add(sumwr);\n\n }\n\n int max = 0;\n int count = 0;\n for (int i = 0; i < wr.size(); i++) {\n if (max < wr.get(i)) {\n max = wr.get(i);\n count = i;\n }\n }\n Integer[] a = new Integer[2];\n a[0] = count;\n a[1] = max;\n zcd.setRoot_vertex(a);\n\n\n int number_vertex = 5;\n //ZTC ztc = new ZTC();\n neig = new int[Gr.getVertex().size()][Gr.getVertex().size()];\n for (int i = 0; i < Gr.getVertex().size(); i++) {\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n while (iterator.hasNext()) {\n e = iterator.next();\n if (e.checkEdge(i)) {\n\n neig[i][e.getY()] = 1;\n }\n }\n }\n ztc.setNeigboor(neig);\n ztc.addTVertex(a[0]);\n Integer[] zero = new Integer[3];\n zero[0] = a[0];\n zero[1] = 0;\n zero[2] = 0;\n verLmtest.add(zero);\n vertex_be = new boolean[Gr.getVertex().size()];\n int root_number = 5;\n while (ztc.getTvertex().size() != Gr.getVertex().size()) {\n\n LinkedList<Edges> q = new LinkedList<Edges>();\n\n\n count_tree++;\n\n\n LinkedList<Integer> vertext_t = new LinkedList<Integer>(ztc.getTvertex());\n while (vertext_t.size() != 0) {\n // for(int i=0; i<count_tree;i++){\n\n number_vertex = vertext_t.pollFirst();\n weight_edges.clear();\n if (!vertex_be[number_vertex]) {\n vertex_be[number_vertex] = true;\n } else {\n continue;\n }\n\n // if(i<vertext_t.size())\n\n\n HashSet<Edges> item = Gr.getEdgeses();\n Iterator<Edges> iterator = item.iterator();\n // while (iterator.hasNext()) {\n for (int k = 0; k < item.size(); k++) {\n e = iterator.next();\n\n if (e.checkEdge(number_vertex)) {\n\n weight_edges.add(zcd.getWrEdges().get(k));\n q.add(e);\n }\n\n if (q.size() > 1)\n q = sort(weight_edges, q);\n\n\n while (!q.isEmpty()) {\n e = q.pollFirst();\n Integer[] lm = new Integer[3];\n\n\n lm[0] = e.getY();\n lm[1] = 1;\n lm[2] = 0;\n boolean add_flag = true;\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getY() == mess[0]) {\n add_flag = false;\n }\n }\n if (add_flag) {\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getX() == mess[0]) {\n mess[2] = mess[2] + 1;\n /* if (e.getX() == root_number) {\n mess[1] = 1;\n } else {\n mess[1] = mess[1] + 1;\n lm[1]=mess[1];\n\n }*/\n verLmtest.set(i, mess);\n break;\n }\n\n }\n for (int i = 0; i < verLmtest.size(); i++) {\n Integer[] mess = verLmtest.get(i);\n if (e.getX() == mess[0]) {\n lm[1] = mess[1] + 1;\n }\n\n }\n\n verLmtest.add(lm);\n } else {\n continue;\n }\n // }\n if (ztc.getTvertex().size() == 1) {\n edgesesTestHash.add(e);\n int x = e.getX();\n int y = e.getY();\n Edges e1 = new Edges(y, x);\n edgesesTestHash.add(e1);\n\n ztc.addEdges(e);\n ztc.addEdges(e1);\n\n ztc.addTVertex(lm[0]);\n // q.removeFirst();\n\n\n } else {\n // edgesTest.add(e);\n int x = e.getX();\n int y = e.getY();\n Edges e1 = new Edges(y, x);\n // disable.add(e);\n // disable.add(e1);\n\n edgesesTestHash.add(e1);\n edgesesTestHash.add(e);\n\n int[][] ad = getNeighboor();\n\n\n if (checkLegal(e, ad)) {\n ztc.addEdges(e);\n ztc.addEdges(e1);\n\n ztc.addTVertex(lm[0]);\n\n // if(q.size()!=0)\n // q.removeFirst();\n } else {\n // q.removeFirst();\n\n Iterator<Edges> edgesIterator = edgesesTestHash.iterator();\n while (edgesIterator.hasNext()) {\n Edges eo = edgesIterator.next();\n if ((eo.getY() == e.getY()) && (eo.getX() == e.getX())) {\n edgesIterator.remove();\n }\n if ((eo.getY() == e1.getY()) && (eo.getX() == e1.getX())) {\n edgesIterator.remove();\n }\n }\n\n verLmtest.removeLast();\n }\n\n\n }\n\n\n }\n\n\n }\n }\n }\n\n ztc.setEdgesesTree(edgesesTestHash);\n ztc.setGr(Gr);\n ConvertDataToJs convertDataToJs=new ConvertDataToJs();\n try {\n convertDataToJs.save(ztc);\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n }\n\n System.out.print(\"\");\n\n }",
"@Test\n public void badChoicePunisher() {\n Edge[] edgelist = {new Edge(new int[] {1, 7}), new Edge(new int[] {1, 8}),\n new Edge(new int[] {7, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist, 8, 2);\n\n\n Edge[] edgelist1 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist1, 7, 1);\n\n Edge[] edgelist2 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5}), new Edge(new int[] {2, 8})};\n timeMethod(edgelist2, 8, 2);\n\n Edge[] edgelist3 = {new Edge(new int[] {1, 6}), new Edge(new int[] {1, 7}),\n new Edge(new int[] {6, 3}), new Edge(new int[] {3, 2}), new Edge(new int[] {2, 4}),\n new Edge(new int[] {2, 5})};\n timeMethod(edgelist3, 7, 1);\n }",
"@FixFor( \"MODE-869\" )\n @Test\n public void shouldProducePlanWhenUsingTwoSubqueries() {\n schemata = schemataBuilder.addTable(\"someTable\", \"column1\", \"column2\", \"column3\")\n .addTable(\"otherTable\", \"columnA\", \"columnB\").addTable(\"stillOther\", \"columnX\", \"columnY\")\n .build();\n // Define the first subquery command ...\n QueryCommand subquery1 = builder.select(\"columnA\").from(\"otherTable\").where().propertyValue(\"otherTable\", \"columnB\")\n .isEqualTo(\"winner\").end().query();\n builder = new QueryBuilder(typeSystem);\n\n // Define the second subquery command ...\n QueryCommand subquery2 = builder.select(\"columnY\").from(\"stillOther\").where().propertyValue(\"stillOther\", \"columnX\")\n .isLessThan().cast(3).asLong().end().query();\n builder = new QueryBuilder(typeSystem);\n\n // Define the query command (which uses the subquery) ...\n query = builder.selectStar().from(\"someTable\").where().path(\"someTable\").isLike(subquery2).and()\n .propertyValue(\"someTable\", \"column3\").isInSubquery(subquery1).end().query();\n initQueryContext();\n plan = planner.createPlan(queryContext, query);\n // print = true;\n print(plan);\n assertThat(problems.hasErrors(), is(false));\n assertThat(problems.isEmpty(), is(true));\n\n // The top node should be the dependent query ...\n assertThat(plan.getType(), is(Type.DEPENDENT_QUERY));\n assertThat(plan.getChildCount(), is(2));\n\n // The first child of the top node should be the plan for subquery1 ...\n PlanNode subqueryPlan1 = plan.getFirstChild();\n assertProjectNode(subqueryPlan1, \"columnA\");\n assertThat(subqueryPlan1.getProperty(Property.VARIABLE_NAME, String.class), is(Subquery.VARIABLE_PREFIX + \"1\"));\n assertThat(subqueryPlan1.getChildCount(), is(1));\n assertThat(subqueryPlan1.getSelectors(), is(selectors(\"otherTable\")));\n PlanNode criteriaNode1 = subqueryPlan1.getFirstChild();\n assertThat(criteriaNode1.getType(), is(PlanNode.Type.SELECT));\n assertThat(criteriaNode1.getChildCount(), is(1));\n assertThat(criteriaNode1.getSelectors(), is(selectors(\"otherTable\")));\n assertThat(criteriaNode1.getProperty(Property.SELECT_CRITERIA),\n is((Object)equals(property(\"otherTable\", \"columnB\"), literal(\"winner\"))));\n PlanNode subquerySource1 = criteriaNode1.getFirstChild();\n assertSourceNode(subquerySource1, \"otherTable\", null, \"columnA\", \"columnB\");\n assertThat(subquerySource1.getChildCount(), is(0));\n\n // The second child of the top node should be a dependent query ...\n PlanNode depQuery2 = plan.getLastChild();\n assertThat(depQuery2.getType(), is(PlanNode.Type.DEPENDENT_QUERY));\n assertThat(depQuery2.getChildCount(), is(2));\n\n // The first child of the second dependent should be the plan for the 2nd subquery (since it has to be executed first) ...\n PlanNode subqueryPlan2 = depQuery2.getFirstChild();\n assertProjectNode(subqueryPlan2, \"columnY\");\n assertThat(subqueryPlan2.getProperty(Property.VARIABLE_NAME, String.class), is(Subquery.VARIABLE_PREFIX + \"2\"));\n assertThat(subqueryPlan2.getChildCount(), is(1));\n assertThat(subqueryPlan2.getSelectors(), is(selectors(\"stillOther\")));\n PlanNode criteriaNode2 = subqueryPlan2.getFirstChild();\n assertThat(criteriaNode2.getType(), is(PlanNode.Type.SELECT));\n assertThat(criteriaNode2.getChildCount(), is(1));\n assertThat(criteriaNode2.getSelectors(), is(selectors(\"stillOther\")));\n assertThat(criteriaNode2.getProperty(Property.SELECT_CRITERIA),\n is((Object)lessThan(property(\"stillOther\", \"columnX\"), literal(3L))));\n PlanNode subquerySource2 = criteriaNode2.getFirstChild();\n assertSourceNode(subquerySource2, \"stillOther\", null, \"columnX\", \"columnY\");\n assertThat(subquerySource2.getChildCount(), is(0));\n\n // The second child of the second dependent node should be the plan for the regular query ...\n PlanNode queryPlan = depQuery2.getLastChild();\n assertProjectNode(queryPlan, \"column1\", \"column2\", \"column3\");\n assertThat(queryPlan.getType(), is(PlanNode.Type.PROJECT));\n assertThat(queryPlan.getChildCount(), is(1));\n assertThat(queryPlan.getSelectors(), is(selectors(\"someTable\")));\n PlanNode criteriaNode3 = queryPlan.getFirstChild();\n assertThat(criteriaNode3.getType(), is(PlanNode.Type.SELECT));\n assertThat(criteriaNode3.getChildCount(), is(1));\n assertThat(criteriaNode3.getSelectors(), is(selectors(\"someTable\")));\n assertThat(criteriaNode3.getProperty(Property.SELECT_CRITERIA),\n is((Object)like(nodePath(\"someTable\"), var(Subquery.VARIABLE_PREFIX + \"2\"))));\n PlanNode criteriaNode4 = criteriaNode3.getFirstChild();\n assertThat(criteriaNode4.getProperty(Property.SELECT_CRITERIA),\n is((Object)in(property(\"someTable\", \"column3\"), var(Subquery.VARIABLE_PREFIX + \"1\"))));\n\n PlanNode source = criteriaNode4.getFirstChild();\n assertSourceNode(source, \"someTable\", null, \"column1\", \"column2\", \"column3\");\n assertThat(source.getChildCount(), is(0));\n }",
"@Test\n void findCycle() {\n Map<String, Set<String>> nonCyclicGraph = Map.of(\n \"0\", Set.of(\"a\", \"b\", \"c\"),\n \"a\", Set.of(\"0\", \"a2\", \"a3\"),\n \"a2\", Set.of(\"a\"),\n \"a3\", Set.of(\"a\"),\n \"b\", Set.of(\"0\", \"b2\"),\n \"b2\", Set.of(\"b\"),\n \"c\", Set.of(\"0\")\n );\n assertThat(solution.findCycle(nonCyclicGraph)).isFalse();\n\n // 0\n // / | \\\n // a b c\n // /\\ | /\n // a2 a3 b2\n Map<String, Set<String>> cyclicGraph = Map.of(\n \"0\", Set.of(\"a\", \"b\", \"c\"),\n \"a\", Set.of(\"0\", \"a2\", \"a3\"),\n \"a2\", Set.of(\"a\"),\n \"a3\", Set.of(\"a\"),\n \"b\", Set.of(\"0\", \"b2\"),\n \"b2\", Set.of(\"b\"),\n \"c\", Set.of(\"0\", \"b2\")\n );\n assertThat(solution.findCycle(cyclicGraph)).isTrue();\n }",
"public GraphObs generatePlanlikeGraph(int line, int linelb, int lineub, \n int maxLineCon, int maxVertCon, int observations, int obsLength, \n int diff, boolean zeroPoint)\n {\n if(line < 1)\n {\n System.out.println(\"Cant have negative # paths\");\n line = 1;\n }\n if(linelb < 1)\n {\n System.out.println(\"Cant have negative # nodes\");\n linelb = 1;\n }\n if(lineub < linelb)\n {\n System.out.println(\"Upperbound on # nodes per path cant \"\n + \"be less than lowerbound\");\n lineub = linelb;\n }\n if(maxLineCon < 0)\n {\n System.out.println(\"# path connections can't be negative\");\n maxLineCon = 0;\n }\n if(maxVertCon < 0)\n {\n System.out.println(\"# Vertex connections per path can't be negative\");\n maxVertCon = 0;\n }\n //init\n Random rand = new Random();\n GraphObs grOb = new GraphObs();\n int orLine = line;\n int orObs = observations;\n \n id = 0;\n numEdges = 0;\n Graph gr = new Graph(); \n LinkedList<Vertex>[] lines = new LinkedList[line];\n \n int randNod = lineub - linelb;\n int lineVertices, ub, lb;\n while(line > 0)\n {\n // add a line\n lineVertices = linelb + rand.nextInt(randNod+1);\n Vertex firstV = new Vertex(id);\n gr.addVertex(firstV);\n id++;\n Vertex prevV = firstV;\n lineVertices--;\n lines[line-1] = new LinkedList(); // so from arrayIndex = line -> 0\n lines[line-1].add(firstV);\n while(lineVertices > 0)\n {\n // add a vertex\n Vertex nextV = new Vertex(id);\n gr.addVertex(nextV);\n id++;\n lines[line-1].add(nextV);\n \n gr.addEdge(nextV, prevV, 0, 0); // WARNING!! from next to prev again!\n \n // onto the next\n prevV = nextV;\n lineVertices--;\n }\n line--;\n }\n // Connect the different plans\n for(int l = 0; l < lines.length; l++)\n {\n int lineConnects = rand.nextInt(maxLineCon) + 1;\n LinkedList<Vertex> conLine = lines[l];\n while(lineConnects > 0)\n {\n int linePick = rand.nextInt(lines.length);\n if(linePick == l)\n continue;\n int vertConnect = rand.nextInt(maxVertCon) + 1;\n while(vertConnect > 0)\n {\n int vertStart = rand.nextInt(conLine.size());\n int usedSpace = conLine.size() - vertStart;\n int space = lines[linePick].size() - (usedSpace + 1); \n // 3 room extra in between\n if(space < 1)\n continue;\n int vertEnd = rand.nextInt(space);\n \n lb = 0;\n ub = rand.nextInt(30);\n gr.addEdge(conLine.get(vertStart),\n (lines[linePick].get(vertEnd)), lb, ub);\n vertConnect--;\n }\n lineConnects--;\n }\n }\n \n // Store settings\n GraphGenSettings gs = new GraphGenSettings();\n gs.planlikeGraph(orLine, linelb, lineub, maxLineCon, maxVertCon, orObs, \n obsLength, diff, zeroPoint);\n \n // init the bounds randomly\n grOb.graph = initializeBounds(gr);\n \n // Add some bounds to grOb\n addErrors(grOb, gs);\n \n grOb.success = true;\n \n grOb.settings = gs;\n \n return grOb;\n }",
"public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }",
"@Test\r\n public void testOutboundEdges() {\r\n System.out.println(\"outboundEdges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n Object v3Element = 3;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n Vertex v3 = instance.insertVertex(v3Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e1 = instance.insertEdge(v1, v2, edgeElement);\r\n Edge e2 = instance.insertEdge(v1, v3, edgeElement);\r\n Edge e3 = instance.insertEdge(v2, v3, edgeElement);\r\n\r\n Collection e1OutboundEdges = instance.outboundEdges(v2);\r\n Collection e2OutboundEdges = instance.outboundEdges(v3);\r\n Collection e3OutboundEdges = instance.outboundEdges(v3);\r\n\r\n boolean e1Result = e1OutboundEdges.contains(e1);\r\n boolean e2Result = e2OutboundEdges.contains(e2);\r\n boolean e3Result = e3OutboundEdges.contains(e3);\r\n\r\n Object expectedResult = true;\r\n assertEquals(expectedResult, e1Result);\r\n assertEquals(expectedResult, e2Result);\r\n assertEquals(expectedResult, e3Result);\r\n }",
"public int[][] isAnyPath(/*int [] Start, int[] End,*/Board B) {\r\n \t//Trace Moveset, determine if moveset is valid for current position [Exceptions are knight, which can move OVER pieces\r\n \t//As long as knight's ending position is not taken.\r\n \t//If Pawn\r\n \t\r\n \t//8X8 Board\r\n \t//int BoundR = 8;\r\n \t//int BoundC = 8;\r\n \t\r\n \t//int[][]Seq = null;\r\n \t\r\n \t//int[][]C_ = null;\r\n \t\r\n \t//LinkedList<int[]> L = new LinkedList<int []>();\r\n \t\r\n \tint Max_Mv_ln = 0;\r\n \tfor(int k=0;k<this.Movesets.length;k++) {\r\n \t\tSystem.out.printf(\"Compare Mx %s\\n\",this.Movesets[k]);\r\n \t\tif(this.Movesets[k]!=null)\r\n \t\tif(this.Movesets[k].toCharArray().length>Max_Mv_ln) {\r\n \t\t\tMax_Mv_ln = this.Movesets[k].toCharArray().length;\r\n \t\t}\r\n \t}\r\n \t\r\n \tSystem.out.printf(\"Maximum Move Size for Piece:%c,%d:\",this.type,Max_Mv_ln);\r\n \t\r\n \t//Each row is a moveset, each column is sets of two integers corresponding \r\n \t//to each move position\r\n \t\r\n \t//List of Path Sequence freedoms for each moveset of this PIECE \r\n \tLinkedList<int[][]> LAll = new LinkedList<int[][]>();\r\n \t\r\n \t//int Ct = 0;\r\n \t\r\n \tfor(int i=0;i<this.Movesets.length;i++) { \r\n \t//Found MoveSet[ith]\r\n \t\tif(this.Movesets[i]!=null) {\r\n \tchar []Mv = this.Movesets[i].toCharArray();\r\n \tint [] C2 = null;\r\n \tint[][]C = new int[Mv.length][1];\r\n \tSystem.out.printf(\"\\n\\nAnalyze Moveset:%s\\n\\n\", this.Movesets[i]);\r\n \tfor(int j=0;j<Mv.length;j++) {\r\n \t//Iterate through each movement pattern\r\n //Return Collision list of endpoints for pieces\r\n \tif(Mv[j]=='R'||Mv[j]=='D'||Mv[j]=='L'||Mv[j]=='U') {\r\n \t\t\r\n \t\tchar v = Character.toLowerCase(Mv[j]);\r\n \t\r\n \t}\r\n \t\r\n \telse {\r\n \t\tif(this.type=='k'&&j<Mv.length-2) {\r\n \t\t\tif(j>0)\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,true,C[j-1]);\r\n \t\t\telse\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,true,null);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tif(j>0)\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,false,C[j-1]);\r\n \t\t\telse\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,false,null);\r\n \t\t\t\r\n \t\t}\r\n \t\tj++;\r\n \t\r\n \t}\r\n \t\r\n \tif(C2==null) {\r\n \t\t//MoveSet failed, on to next moveset for piece...\r\n \t\tC=null;\r\n \t\tbreak;\r\n \t}\r\n \telse {\r\n \t\t\r\n \t\tif(C2[0]<0) {\r\n \t\t\tC = null;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\tC[j] = C2;//ReSize(C2,LengthMvSet(this.Movesets[i]));\r\n \t\t//Ct++;\r\n \t\t//System.out.println(\"Add Moveset:\\n\");\r\n \t\t//PrintAll(C2,(C2.length/2));\r\n \t\t//PrintAll(C2,LengthMvSet(this.Movesets[i]));\r\n \t\t//C[j].length = (C[j].length/2)+6;\r\n \t\t//Ct++;\r\n \t}\r\n \t\r\n \t}\r\n \t//Add Path seq possibilities to list\r\n \tLAll.add(C);\r\n \t//System.out.println(\"Add Moveset:\\n\");\r\n \t/*\r\n \tif(C2!=null)\r\n \tPrintAll(C2,(C2.length/2)//+6//);\r\n \t*/\r\n \t}\r\n \t}\r\n \t\r\n \tSystem.out.printf(\"\\nALL possible paths for piece %c in position [%d,%d]\\n\",this.type,this.Position[0],this.Position[1]);\r\n \t\r\n \t//Object[] A = LAll.toArray();\r\n \tSystem.out.printf(\"LENGTH Of LIST:%d\", LAll.toArray().length);\r\n \t\r\n \tint [] E = new int[2];\r\n \t\r\n \tint[][] EAll = new int[this.Movesets.length][1];\r\n \t\r\n \tfor(int i=0;i<LAll.toArray().length;i++) {\r\n \t\tSystem.out.printf(\"Player %c Possibilities for %d Moveset:%s\\n\",super.Player,i,this.Movesets[i]);\r\n \t\tint[][]C2 = LAll.get(i);\r\n \t\tif(C2!=null) {\r\n \t\t\tfor(int k=0; k<C2.length;k++) {\r\n \t\t\t//System.out.printf(\"Length of this moveset: %d\\n\",LengthMvSet(this.Movesets[i]));\r\n \t\t\tif(C2[k]!=null) {\r\n \t\t\tfor(int l=0; l<(C2[k].length/2);l=l+2) {\r\n \t\t\t\tSystem.out.printf(\"[%d,%d]\\n\", C2[k][l], C2[k][l+1]);\r\n \t\t\t\tif(l==0) {\r\n \t\t\t\t\t//System.out.printf(\"Effective position to Traverse to: [%d,%d]\\n\", LastElem(C2)[l],LastElem(C2)[l+1]);\r\n \t\t\t\t\tE = C2[k];\r\n \t\t\t\t\t//E[0] = C2[k][0];\r\n \t\t\t\t\t//E[1] = C2[k][1];\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t//PrintAll(C2[k],(C2[k].length/2));\r\n \t\t\t}\r\n \t\t}\r\n \t\t\tEAll[i] = E;\r\n \t\t\tSystem.out.printf(\"Effective position to Traverse to: [%d,%d]\\n\",E[0],E[1]);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tSystem.out.println(\"NO Effective Position to Traverse to!\");\r\n \t\t}\r\n \t}\r\n \t\r\n \t//System.out.printf(\"Effective Position to Traverse to: [%d,%d]\", LAll.get(LAll.size()-1)[LAll.get(LAll.size()-1).length-1][0],LAll.get(LAll.size()-1)[LAll.get(LAll.size()-1).length-1][1]);\r\n \t\r\n \t\r\n \treturn EAll;\r\n }",
"public static boolean checkPath(int[][] bs, int i) {\n\t\tArrayList<Integer> temp_cP = new ArrayList<Integer>();\n\t\tSet<Integer> temp_setcP = new HashSet<Integer>();\n\t\tboolean denoter = true;\n\t\twhile (i == 3) {\n\t\t\tfor (int k = 0; k < i; k++) {\n\t\t\t\tfor (int e = 0; e < 3; e++) {\n\t\t\t\t\ttemp_cP.add(e, bs[k][e]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttemp_setcP = new HashSet<Integer>(temp_cP);\n\t\t\tif (temp_cP.size() > temp_setcP.size()) {\n\t\t\t\tdenoter = false;\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\t\t\t\ttemp_cP.clear();\n\t\t\t\ttemp_setcP.clear();\n\n\t\t\t\tfor (int k = 0; k < i; k++) {\n\t\t\t\t\tfor (int e = 3; e < 6; e++) {\n\t\t\t\t\t\ttemp_cP.add(bs[k][e]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp_setcP = new HashSet<Integer>(temp_cP);\n\t\t\t\tif (temp_cP.size() > temp_setcP.size()) {\n\t\t\t\t\tdenoter = false;\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twhile (i == 6) {\n\n\t\t\tfor (int k = 3; k < i; k++) {\n\t\t\t\tfor (int e = 0; e < 3; e++) {\n\t\t\t\t\ttemp_cP.add(e, bs[k][e]);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttemp_setcP = new HashSet<Integer>(temp_cP);\n\t\t\tif (temp_cP.size() > temp_setcP.size()) {\n\t\t\t\tdenoter = false;\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\t\t\t\ttemp_cP.clear();\n\t\t\t\ttemp_setcP.clear();\n\n\t\t\t\tfor (int k = 3; k < i; k++) {\n\t\t\t\t\tfor (int e = 3; e < 6; e++) {\n\t\t\t\t\t\ttemp_cP.add(bs[k][e]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp_setcP = new HashSet<Integer>(temp_cP);\n\t\t\t\tif (temp_cP.size() > temp_setcP.size()) {\n\t\t\t\t\tdenoter = false;\n\t\t\t\t\tbreak;\n\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn denoter;\n\t}",
"public Tuple2<PhysicalPlan, Map<Integer, CheckpointPlan>> generate() {\n CopyOnWriteArrayList<PassiveCompletableFuture<PipelineStatus>>\n waitForCompleteBySubPlanList = new CopyOnWriteArrayList<>();\n\n Map<Integer, CheckpointPlan> checkpointPlans = new HashMap<>();\n final int totalPipelineNum = pipelines.size();\n Stream<SubPlan> subPlanStream =\n pipelines.stream()\n .map(\n pipeline -> {\n this.pipelineTasks.clear();\n this.startingTasks.clear();\n this.subtaskActions.clear();\n final int pipelineId = pipeline.getId();\n final List<ExecutionEdge> edges = pipeline.getEdges();\n\n List<SourceAction<?, ?, ?>> sources = findSourceAction(edges);\n\n List<PhysicalVertex> coordinatorVertexList =\n getEnumeratorTask(\n sources, pipelineId, totalPipelineNum);\n coordinatorVertexList.addAll(\n getCommitterTask(edges, pipelineId, totalPipelineNum));\n\n List<PhysicalVertex> physicalVertexList =\n getSourceTask(\n edges, sources, pipelineId, totalPipelineNum);\n\n physicalVertexList.addAll(\n getShuffleTask(edges, pipelineId, totalPipelineNum));\n\n CompletableFuture<PipelineStatus> pipelineFuture =\n new CompletableFuture<>();\n waitForCompleteBySubPlanList.add(\n new PassiveCompletableFuture<>(pipelineFuture));\n\n checkpointPlans.put(\n pipelineId,\n CheckpointPlan.builder()\n .pipelineId(pipelineId)\n .pipelineSubtasks(pipelineTasks)\n .startingSubtasks(startingTasks)\n .pipelineActions(pipeline.getActions())\n .subtaskActions(subtaskActions)\n .build());\n return new SubPlan(\n pipelineId,\n totalPipelineNum,\n initializationTimestamp,\n physicalVertexList,\n coordinatorVertexList,\n jobImmutableInformation,\n executorService,\n runningJobStateIMap,\n runningJobStateTimestampsIMap);\n });\n\n PhysicalPlan physicalPlan =\n new PhysicalPlan(\n subPlanStream.collect(Collectors.toList()),\n executorService,\n jobImmutableInformation,\n initializationTimestamp,\n runningJobStateIMap,\n runningJobStateTimestampsIMap);\n return Tuple2.tuple2(physicalPlan, checkpointPlans);\n }",
"@Test\n public void testBuildGraph_FactorArr_booleanArrArr() {\n\n char[][] adjacency = new char[][]{\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},\n };\n\n CostFunction[][] factors = new CostFunction[][]{\n {factory.buildCostFunction( new Variable[]{v[0],v[7]}, 0 )},\n {},\n {factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[3]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3],v[4]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[1],v[5]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[6]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[6],v[7]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[6]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[7]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[4],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[5],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[6],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[4],v[7],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8],v[9]}, 0 )},\n };\n\n GdlFactory gf = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(gf, factors, adjacency);\n //System.out.println(result);\n }",
"@Test\n public void shouldDetectCycleWhenUpstreamLeavesAreAtDifferentLevels() {\n\n String g1 = \"g1\";\n String g2 = \"g2\";\n String p1 = \"p1\";\n String p2 = \"p2\";\n String p3 = \"p3\";\n String p4 = \"p4\";\n String p5 = \"p5\";\n String p6 = \"p6\";\n String current = \"current\";\n\n ValueStreamMap valueStreamMap = new ValueStreamMap(current, null);\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p4, p4), null, current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p3, p3), null, p4);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p2, p2), null, p3);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p1, p1), null, p2);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g1, g1, \"git\"), null, p1, new MaterialRevision(null));\n\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,2,\"2\"), current);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p6, p6), new PipelineRevision(p6,1,\"1\"), p5);\n valueStreamMap.addUpstreamNode(new PipelineDependencyNode(p5, p5), new PipelineRevision(p5,1,\"1\"), p6);\n valueStreamMap.addUpstreamMaterialNode(new SCMDependencyNode(g2,g2,\"git\"), null, p5, new MaterialRevision(null));\n\n assertThat(valueStreamMap.hasCycle(), is(true));\n }",
"@Test\n public void cyclicalGraphs2Test() throws Exception {\n // Test history tracking -- the \"last a\" in g1 and g2 below and\n // different kinds of nodes topologically. At k=4 this becomes apparent\n // with kTails, if we start at the first 'a'.\n\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"b\",\n \"c\", \"d\" });\n // Create a loop in g1, with 4 nodes\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(3), Event.defTimeRelationStr);\n g1Nodes.get(3).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g1, 0);\n\n // g1.a is k-equivalent to g1.a for all k\n for (int k = 1; k < 6; k++) {\n testKEqual(g1Nodes.get(0), g1Nodes.get(0), k);\n }\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"a\" });\n // Create a chain from a to a'.\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(2), Event.defTimeRelationStr);\n g2Nodes.get(2).addTransition(g2Nodes.get(3), Event.defTimeRelationStr);\n g2Nodes.get(3).addTransition(g2Nodes.get(4), Event.defTimeRelationStr);\n exportTestGraph(g2, 1);\n\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 3);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 4);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 5);\n\n testNotKEqual(g1Nodes.get(0), g2Nodes.get(0), 6);\n testNotKEqual(g1Nodes.get(0), g2Nodes.get(0), 7);\n }",
"private void buildNewTree(PlanNode plan, List<ILogicalOperator> joinOps, MutableInt totalNumberOfJoins)\n throws AlgebricksException {\n // we have to move the inputs in op around so that they match the tree structure in pn\n // we use the existing joinOps and switch the leafInputs appropriately.\n List<PlanNode> allPlans = joinEnum.getAllPlans();\n int leftIndex = plan.getLeftPlanIndex();\n int rightIndex = plan.getRightPlanIndex();\n //System.out.println(\"allPlansSize \" + allPlans.size() + \" leftIndex \" + leftIndex + \" rightIndex \" + rightIndex); // put in trace statements\n //System.out.println(\"allPlansSize \" + allPlans.size());\n PlanNode leftPlan = allPlans.get(leftIndex);\n PlanNode rightPlan = allPlans.get(rightIndex);\n\n ILogicalOperator joinOp = joinOps.get(totalNumberOfJoins.intValue()); // intValue set to 0 initially\n\n if (plan.IsJoinNode()) {\n fillJoinAnnotations(plan, joinOp);\n }\n\n if (leftPlan.IsScanNode()) {\n // leaf\n ILogicalOperator leftInput = leftPlan.getLeafInput();\n skipAllIndexes(leftPlan, leftInput);\n ILogicalOperator selOp = findSelectOrDataScan(leftInput);\n if (selOp != null) {\n addCardCostAnnotations(selOp, leftPlan);\n }\n joinOp.getInputs().get(0).setValue(leftInput);\n addCardCostAnnotations(findDataSourceScanOperator(leftInput), leftPlan);\n } else {\n // join\n totalNumberOfJoins.increment();\n ILogicalOperator leftInput = joinOps.get(totalNumberOfJoins.intValue());\n joinOp.getInputs().get(0).setValue(leftInput);\n buildNewTree(leftPlan, joinOps, totalNumberOfJoins);\n }\n\n if (rightPlan.IsScanNode()) {\n // leaf\n ILogicalOperator rightInput = rightPlan.getLeafInput();\n skipAllIndexes(rightPlan, rightInput);\n ILogicalOperator selOp = findSelectOrDataScan(rightInput);\n if (selOp != null) {\n addCardCostAnnotations(selOp, rightPlan);\n }\n joinOp.getInputs().get(1).setValue(rightInput);\n addCardCostAnnotations(findDataSourceScanOperator(rightInput), rightPlan);\n } else {\n // join\n totalNumberOfJoins.increment();\n ILogicalOperator rightInput = joinOps.get(totalNumberOfJoins.intValue());\n joinOp.getInputs().get(1).setValue(rightInput);\n buildNewTree(rightPlan, joinOps, totalNumberOfJoins);\n }\n }",
"@Test\n public void differentLinearGraphsTest() throws Exception {\n EventNode[] g1Nodes = getChainTraceGraphNodesInOrder(new String[] {\n \"a\", \"b\", \"c\", \"d\" });\n\n EventNode[] g2Nodes = getChainTraceGraphNodesInOrder(new String[] {\n \"a\", \"b\", \"c\", \"e\" });\n\n // ///////////////////\n // g1 and g2 are k-equivalent at first three nodes for k=1,2,3\n // respectively, but no further. Subsumption follows the same pattern.\n\n // \"INITIAL\" not at root:\n testKEqual(g1Nodes[0], g2Nodes[0], 1);\n testKEqual(g1Nodes[0], g2Nodes[0], 2);\n testKEqual(g1Nodes[0], g2Nodes[0], 3);\n testKEqual(g1Nodes[0], g2Nodes[0], 4);\n testNotKEqual(g1Nodes[0], g2Nodes[0], 5);\n testNotKEqual(g1Nodes[0], g2Nodes[0], 6);\n\n // \"a\" node at root:\n testKEqual(g1Nodes[1], g2Nodes[1], 1);\n testKEqual(g1Nodes[1], g2Nodes[1], 2);\n testKEqual(g1Nodes[1], g2Nodes[1], 3);\n testNotKEqual(g1Nodes[1], g2Nodes[1], 4);\n testNotKEqual(g1Nodes[1], g2Nodes[1], 5);\n\n // \"b\" node at root:\n testKEqual(g1Nodes[2], g2Nodes[2], 1);\n testKEqual(g1Nodes[2], g2Nodes[2], 2);\n testNotKEqual(g1Nodes[2], g2Nodes[2], 3);\n\n // \"c\" node at root:\n testKEqual(g1Nodes[3], g2Nodes[3], 1);\n testNotKEqual(g1Nodes[3], g2Nodes[3], 2);\n\n // \"d\" and \"e\" nodes at root:\n testNotKEqual(g1Nodes[4], g2Nodes[4], 1);\n }",
"public void visualiseSubgraphsOverGraph(IGraph graph, GraphOnDriveHandler initialGraphHandler, ExtendedMiningParameters miningParameters)\n\t\t\tthrows VisualisationException\t{\n\t\tSystem.out.println(\"WARNING: Visualising graph substructure is not supported in \"+visualisationDescription.getMethod()+\" visualisation mode.\");\n\t}",
"public static <V> boolean isGraphAcyclic(Graph<V> graph) {\n V[] arrayValores = graph.getValuesAsArray();\n if (arrayValores.length > 1) { // Un grafo con solo un vertice no puede tener ciclos.\n Set<V> conjuntoRevisados = new LinkedListSet<>();\n return profPrimeroCiclos(graph, arrayValores[0], null, conjuntoRevisados);\n }\n return false;\n }",
"private void testPillars(Grid grid){\n\t\tfor (int j=0; j<grid.getSize().height; j+=2){\n\t\t\tfor (int i=0; i<grid.getSize().width; i+=2){\n\t\t\t\tassertHasPillar(grid, new Point(i, j), false);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int j=1; j<grid.getSize().height; j+=2){\n\t\t\tfor (int i=1; i<grid.getSize().width; i+=2){\n\t\t\t\tassertHasPillar(grid, new Point(i, j), true);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n Graph myGraph = new Graph();\n myGraph.addNode(\"8\");\n myGraph.addNode(\"1\");\n myGraph.addNode(\"2\");\n myGraph.addNode(\"9\");\n myGraph.addNode(\"7\");\n myGraph.addNode(\"5\");\n myGraph.addEdge(\"8\" , \"1\" , 50);\n myGraph.addEdge(\"5\" , \"1\" , 70);\n myGraph.addEdge(\"7\" , \"5\", 20);\n myGraph.addEdge(\"8\" , \"9\", 100);\n myGraph.addEdge(\"8\" , \"2\", 40);\n String[] trip = {\"8\" , \"1\" , \"5\"};\n String[] trip2 = {\"8\" , \"5\"};\n String[] trip3 = {\"8\" , \"1\" , \"5\" , \"7\" , \"5\" , \"1\" , \"8\" , \"9\"};\n String[] trip4 = {\"8\" , \"9\" , \"5\" };\n String[] trip5 = {\"8\"};\n String[] trip6 = {\"8\" , \"2\"};\n// System.out.println(myGraph);\n// System.out.println(myGraph.getNodes());\n// System.out.println(myGraph.getNeighbors(\"8\"));\n// System.out.println(myGraph.getNeighbors(\"7\"));\n// System.out.println(myGraph.getNeighbors(\"5\"));\n// System.out.println(myGraph.size());\n// System.out.println(myGraph.breadthFirst(\"8\"));\n// System.out.println(myGraph.weightList);\n// System.out.println(myGraph.breadthFirst(\"7\"));\n// System.out.println(myGraph.breadthFirst(\"5\"));\n// System.out.println(myGraph.businessTrip(\"8\",trip));\n// System.out.println(myGraph.businessTrip(\"8\",trip2));\n// System.out.println(myGraph.businessTrip(\"8\",trip3));\n// System.out.println(myGraph.businessTrip(\"8\",trip4));\n// System.out.println(myGraph.businessTrip(\"8\",trip5));\n// System.out.println(myGraph.businessTrip(\"8\",trip6));\n System.out.println(myGraph.depthFirst(\"8\"));\n }",
"@Override\n\tpublic void run() {\n\t\tMap<Integer, Integer> roots = new TreeMap<Integer, Integer>();\n\t\t\n\t\tEdge[] edges = new Edge[this.edges.length];\n\t\tint n, weight, relevantEdges, root, lowerBound = 0;\n\t\n\t\t// Sort edges by weight.\n\t\tquickSort(0, this.edges.length - 1);\n\t\n\t\t// Compute initial lower bound (best k - 1 edges).\n\t\t// Choosing the cheapest k - 1 edges is not very intelligent. There is no guarantee\n\t\t// that this subset of edges even induces a subgraph over the initial graph.\n\t\t// TODO: Find a better initial lower bound.\n\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\tlowerBound += this.edges[i].weight;\n\t\t}\n\t\n\t\t// Iterate over all nodes in the graph and run Prim's algorithm\n\t\t// until k - 1 edges are fixed.\n\t\t// As all induced subgraphs have k nodes and are connected according to Prim, they\n\t\t// are candidate solutions and thus submitted.\n\t\tfor (root = 0; root < taken.length; root++) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\n\t\t\ttaken[root] = true;\n\t\t\tn = 0;\n\t\t\tweight = 0;\n\t\t\trelevantEdges = this.edges.length;\n\n\t\t\twhile (n < solution.length) { \n\t\t\t\tfor (int i = 0; i < relevantEdges; i++) {\n\t\t\t\t\t// XOR to check if connected and no circle.\n\t\t\t\t\tif (taken[edges[i].node1] ^ taken[edges[i].node2]) {\n\t\t\t\t\t\ttaken[taken[edges[i].node1] ? edges[i].node2 : edges[i].node1] = true;\n\t\t\t\t\t\tsolution[n++] = edges[i];\n\t\t\t\t\t\tweight += edges[i].weight;\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t// Check for circle.\n\t\t\t\t\telse if (taken[edges[i].node1]) {\n\t\t\t\t\t\tSystem.arraycopy(edges, i + 1, edges, i, --relevantEdges - i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Sum up what we've just collected and submit this\n\t\t\t// solution to the framework.\n\t\t\tHashSet<Edge> set = new HashSet<Edge>(solution.length);\n\t\t\tfor (int i = 0; i < solution.length; i++) {\n\t\t\t\tset.add(solution[i]);\n\t\t\t}\n\t\t\tsetSolution(weight, set);\n\t\t\troots.put(weight, root);\n\t\t}\n\n\t\t// Now for the real business, let's do some Branch-and-Bound. Roots of \"k Prim Spanning Trees\"\n\t\t// are enumerated by weight to increase our chances to obtain the kMST earlier.\n\t\tfor (int item : roots.values()) {\n\t\t\ttaken = new boolean[taken.length];\n\t\t\tSystem.arraycopy(this.edges, 0, edges, 0, this.edges.length);\n\t\t\ttaken[item] = true;\n\t\t\tbranchAndBound(edges, solution.length, 0, lowerBound);\n\t\t}\n\t}",
"public static void test01() {\n TreeNode n1 = new TreeNode(1);\n TreeNode n2 = new TreeNode(2);\n TreeNode n3 = new TreeNode(2);\n TreeNode n4 = new TreeNode(4);\n TreeNode n5 = new TreeNode(6);\n TreeNode n6 = new TreeNode(6);\n TreeNode n7 = new TreeNode(4);\n TreeNode n8 = new TreeNode(8);\n TreeNode n9 = new TreeNode(9);\n TreeNode n10 = new TreeNode(10);\n TreeNode n11 = new TreeNode(11);\n TreeNode n12 = new TreeNode(11);\n TreeNode n13 = new TreeNode(10);\n TreeNode n14 = new TreeNode(9);\n TreeNode n15 = new TreeNode(8);\n assemble(n1, n2, n3);\n assemble(n2, n4, n5);\n assemble(n3, n6, n7);\n assemble(n4, n8, n9);\n assemble(n5, n10, n11);\n assemble(n6, n12, n13);\n assemble(n7, n14, n15);\n assemble(n8, null, null);\n assemble(n9, null, null);\n assemble(n10, null, null);\n assemble(n11, null, null);\n assemble(n12, null, null);\n assemble(n13, null, null);\n assemble(n14, null, null);\n assemble(n15, null, null);\n System.out.println(isSymmetrical(n1));\n }",
"void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}",
"@Test\n public void baseCaseTriviallyIdenticalGraphsTest() {\n Event a1 = new Event(\"label1\");\n Event a2 = new Event(\"label1\");\n\n EventNode e1 = new EventNode(a1);\n EventNode e2 = new EventNode(a2);\n // If k exceeds the depth of the graph, if they are equivalent to max\n // existing depth then they are equal. Regardless of subsumption.\n testKEqual(e1, e2, 100);\n // A node should always be k-equivalent to itself.\n testKEqual(e1, e1, 100);\n }",
"@Test\r\n\tpublic void test_Big_Graph() {\n\t\tweighted_graph g = new WGraph_DS();\r\n\t\tint size = 1000*1000;\r\n\t\tint ten=1;\r\n\t\tfor (int i = 0; i <size; i++) {\r\n\t\t\tg.addNode(i);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i <size; i++) {\r\n\t\t\tint dest=i;\r\n\t\t\tg.connect(size-2, i, 0.23); \r\n\r\n\t\t\tif(i<size-1){\r\n\t\t\t\tg.connect(i,++dest,0.78);\r\n\t\t\t}\r\n\t\t\tif(i%2==0&&i<size-2) {\r\n\t\t\t\tg.connect(i,2+dest,0.94);\r\n\t\t\t}\t\r\n\r\n\t\t\tif(ten==i&&(i%2==0)) {\r\n\t\t\t\tfor (int j =0 ; j <size; j++) {\r\n\t\t\t\t\tg.connect(ten, j,0.56);\r\n\t\t\t\t\tg.connect(ten-2, j, 0.4);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tten=ten*10;\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\r\n\r\n\t\tweighted_graph_algorithms algo = new WGraph_Algo();\r\n\t\talgo.init(g);\r\n\t\tassertTrue(algo.isConnected());\r\n\t\tassertEquals(algo.shortestPathDist(0, 999998),0.23);\r\n\t\tassertEquals(algo.shortestPathDist(0, 8),0.46);\r\n\t\tint expected2 []= {6,999998,8};\r\n\t\tint actual2 [] = new int [3];\r\n\t\tint i=0;\r\n\t\tfor(node_info n :algo.shortestPath(6, 8)) {\r\n\t\t\tactual2[i++]=n.getKey();\r\n\t\t}\r\n\t\tassertArrayEquals(expected2,actual2);\r\n\r\n\t}",
"boolean checkForShortCircuit(CaveGen g) {\n int i = g.placedMapUnits.size() - 1;\n MapUnit m = g.placedMapUnits.get(i);\n if (i >= Parser.scUnitTypes.length) return false;\n if (Parser.scUnitTypes[i] != -1) {\n String targetName = g.spawnMapUnitsSorted.get(Parser.scUnitTypes[i]).name;\n if (!targetName.equals(m.name))\n return true;\n } \n if (Parser.scRots[i] != -1) {\n if (m.rotation != Parser.scRots[i])\n return true;\n } \n if (Parser.scUnitIdsFrom[i] != -1 \n && Parser.scDoorsFrom[i] != -1\n && Parser.scDoorsTo[i] != -1) {\n Door d = m.doors.get(Parser.scDoorsTo[i]);\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n return true;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n return true;\n if (o.doors.indexOf(d.adjacentDoor) != Parser.scDoorsFrom[i])\n return true;\n }\n else {\n if (Parser.scDoorsTo[i] != -1) {\n Door d = m.doors.get(Parser.scDoorsTo[i]);\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n return true;\n }\n if (Parser.scUnitIdsFrom[i] != -1 \n && Parser.scDoorsFrom[i] != -1) {\n boolean isGood = false;\n for (Door d: m.doors) {\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n continue;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n continue;\n if (o.doors.indexOf(d.adjacentDoor) != Parser.scDoorsFrom[i])\n continue;\n isGood = true;\n }\n if (!isGood) return true;\n }\n else if (Parser.scUnitIdsFrom[i] != -1) {\n boolean isGood = false;\n for (Door d: m.doors) {\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n continue;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n continue;\n isGood = true;\n }\n if (!isGood) return true;\n }\n }\n return false;\n }",
"@FixFor( \"MODE-869\" )\n @Test\n public void shouldProducePlanWhenUsingSubquery() {\n schemata = schemataBuilder.addTable(\"someTable\", \"column1\", \"column2\", \"column3\")\n .addTable(\"otherTable\", \"columnA\", \"columnB\").build();\n // Define the subquery command ...\n QueryCommand subquery = builder.select(\"columnA\").from(\"otherTable\").query();\n builder = new QueryBuilder(typeSystem);\n\n // Define the query command (which uses the subquery) ...\n query = builder.selectStar().from(\"someTable\").where().path(\"someTable\").isLike(subquery).end().query();\n initQueryContext();\n plan = planner.createPlan(queryContext, query);\n // print = true;\n print(plan);\n assertThat(problems.hasErrors(), is(false));\n assertThat(problems.isEmpty(), is(true));\n\n // The top node should be the dependent query ...\n assertThat(plan.getType(), is(Type.DEPENDENT_QUERY));\n assertThat(plan.getChildCount(), is(2));\n\n // The first child should be the plan for the subquery ...\n PlanNode subqueryPlan = plan.getFirstChild();\n assertProjectNode(subqueryPlan, \"columnA\");\n assertThat(subqueryPlan.getProperty(Property.VARIABLE_NAME, String.class), is(Subquery.VARIABLE_PREFIX + \"1\"));\n assertThat(subqueryPlan.getChildCount(), is(1));\n assertThat(subqueryPlan.getSelectors(), is(selectors(\"otherTable\")));\n PlanNode subquerySource = subqueryPlan.getFirstChild();\n assertSourceNode(subquerySource, \"otherTable\", null, \"columnA\", \"columnB\");\n assertThat(subquerySource.getChildCount(), is(0));\n\n // The second child should be the plan for the regular query ...\n PlanNode queryPlan = plan.getLastChild();\n assertProjectNode(queryPlan, \"column1\", \"column2\", \"column3\");\n assertThat(queryPlan.getType(), is(PlanNode.Type.PROJECT));\n assertThat(queryPlan.getChildCount(), is(1));\n assertThat(queryPlan.getSelectors(), is(selectors(\"someTable\")));\n PlanNode criteriaNode = queryPlan.getFirstChild();\n assertThat(criteriaNode.getType(), is(PlanNode.Type.SELECT));\n assertThat(criteriaNode.getChildCount(), is(1));\n assertThat(criteriaNode.getSelectors(), is(selectors(\"someTable\")));\n assertThat(criteriaNode.getProperty(Property.SELECT_CRITERIA),\n is((Object)like(nodePath(\"someTable\"), var(Subquery.VARIABLE_PREFIX + \"1\"))));\n\n PlanNode source = criteriaNode.getFirstChild();\n assertSourceNode(source, \"someTable\", null, \"column1\", \"column2\", \"column3\");\n assertThat(source.getChildCount(), is(0));\n }",
"@FixFor( \"MODE-869\" )\n @Test\n public void shouldProducePlanWhenUsingSubqueryInSubquery() {\n schemata = schemataBuilder.addTable(\"someTable\", \"column1\", \"column2\", \"column3\")\n .addTable(\"otherTable\", \"columnA\", \"columnB\").addTable(\"stillOther\", \"columnX\", \"columnY\")\n .build();\n // Define the innermost subquery command ...\n QueryCommand subquery2 = builder.select(\"columnY\").from(\"stillOther\").where().propertyValue(\"stillOther\", \"columnX\")\n .isLessThan().cast(3).asLong().end().query();\n builder = new QueryBuilder(typeSystem);\n\n // Define the outer subquery command ...\n QueryCommand subquery1 = builder.select(\"columnA\").from(\"otherTable\").where().propertyValue(\"otherTable\", \"columnB\")\n .isEqualTo(subquery2).end().query();\n builder = new QueryBuilder(typeSystem);\n\n // Define the query command (which uses the subquery) ...\n query = builder.selectStar().from(\"someTable\").where().path(\"someTable\").isLike(subquery1).end().query();\n initQueryContext();\n plan = planner.createPlan(queryContext, query);\n // print = true;\n print(plan);\n assertThat(problems.hasErrors(), is(false));\n assertThat(problems.isEmpty(), is(true));\n\n // The top node should be the dependent query ...\n assertThat(plan.getType(), is(Type.DEPENDENT_QUERY));\n assertThat(plan.getChildCount(), is(2));\n\n // The first child of the top node should be a dependent query ...\n PlanNode depQuery1 = plan.getFirstChild();\n assertThat(depQuery1.getType(), is(PlanNode.Type.DEPENDENT_QUERY));\n assertThat(depQuery1.getChildCount(), is(2));\n\n // The first child should be the plan for the 2nd subquery (since it has to be executed first) ...\n PlanNode subqueryPlan2 = depQuery1.getFirstChild();\n assertProjectNode(subqueryPlan2, \"columnY\");\n assertThat(subqueryPlan2.getProperty(Property.VARIABLE_NAME, String.class), is(Subquery.VARIABLE_PREFIX + \"2\"));\n assertThat(subqueryPlan2.getChildCount(), is(1));\n assertThat(subqueryPlan2.getSelectors(), is(selectors(\"stillOther\")));\n PlanNode criteriaNode2 = subqueryPlan2.getFirstChild();\n assertThat(criteriaNode2.getType(), is(PlanNode.Type.SELECT));\n assertThat(criteriaNode2.getChildCount(), is(1));\n assertThat(criteriaNode2.getSelectors(), is(selectors(\"stillOther\")));\n assertThat(criteriaNode2.getProperty(Property.SELECT_CRITERIA),\n is((Object)lessThan(property(\"stillOther\", \"columnX\"), literal(3L))));\n PlanNode subquerySource2 = criteriaNode2.getFirstChild();\n assertSourceNode(subquerySource2, \"stillOther\", null, \"columnX\", \"columnY\");\n assertThat(subquerySource2.getChildCount(), is(0));\n\n // The second child of the dependent query should be the plan for the subquery ...\n PlanNode subqueryPlan1 = depQuery1.getLastChild();\n assertProjectNode(subqueryPlan1, \"columnA\");\n assertThat(subqueryPlan1.getProperty(Property.VARIABLE_NAME, String.class), is(Subquery.VARIABLE_PREFIX + \"1\"));\n assertThat(subqueryPlan1.getChildCount(), is(1));\n assertThat(subqueryPlan1.getSelectors(), is(selectors(\"otherTable\")));\n PlanNode criteriaNode1 = subqueryPlan1.getFirstChild();\n assertThat(criteriaNode1.getType(), is(PlanNode.Type.SELECT));\n assertThat(criteriaNode1.getChildCount(), is(1));\n assertThat(criteriaNode1.getSelectors(), is(selectors(\"otherTable\")));\n assertThat(criteriaNode1.getProperty(Property.SELECT_CRITERIA),\n is((Object)equals(property(\"otherTable\", \"columnB\"), var(Subquery.VARIABLE_PREFIX + \"2\"))));\n PlanNode subquerySource1 = criteriaNode1.getFirstChild();\n assertSourceNode(subquerySource1, \"otherTable\", null, \"columnA\", \"columnB\");\n assertThat(subquerySource1.getChildCount(), is(0));\n\n // The second child of the top node should be the plan for the regular query ...\n PlanNode queryPlan = plan.getLastChild();\n assertProjectNode(queryPlan, \"column1\", \"column2\", \"column3\");\n assertThat(queryPlan.getType(), is(PlanNode.Type.PROJECT));\n assertThat(queryPlan.getChildCount(), is(1));\n assertThat(queryPlan.getSelectors(), is(selectors(\"someTable\")));\n PlanNode criteriaNode = queryPlan.getFirstChild();\n assertThat(criteriaNode.getType(), is(PlanNode.Type.SELECT));\n assertThat(criteriaNode.getChildCount(), is(1));\n assertThat(criteriaNode.getSelectors(), is(selectors(\"someTable\")));\n assertThat(criteriaNode.getProperty(Property.SELECT_CRITERIA),\n is((Object)like(nodePath(\"someTable\"), var(Subquery.VARIABLE_PREFIX + \"1\"))));\n\n PlanNode source = criteriaNode.getFirstChild();\n assertSourceNode(source, \"someTable\", null, \"column1\", \"column2\", \"column3\");\n assertThat(source.getChildCount(), is(0));\n }",
"@Test\n public void youCanCreateALoopFromPlatesFromACount() {\n // inputs\n VertexLabel runningTotalLabel = new VertexLabel(\"runningTotal\");\n VertexLabel stillLoopingLabel = new VertexLabel(\"stillLooping\");\n VertexLabel valueInLabel = new VertexLabel(\"valueIn\");\n\n // intermediate\n VertexLabel oneLabel = new VertexLabel(\"one\");\n VertexLabel conditionLabel = new VertexLabel(\"condition\");\n\n // outputs\n VertexLabel plusLabel = new VertexLabel(\"plus\");\n VertexLabel loopLabel = new VertexLabel(\"loop\");\n VertexLabel valueOutLabel = new VertexLabel(\"valueOut\");\n\n // base case\n DoubleVertex initialSum = ConstantVertex.of(0.);\n BooleanVertex tru = ConstantVertex.of(true);\n DoubleVertex initialValue = ConstantVertex.of(0.);\n\n int maximumLoopLength = 100;\n\n Plates plates = new PlateBuilder<Integer>()\n .withInitialState(SimpleVertexDictionary.backedBy(ImmutableMap.of(\n plusLabel, initialSum,\n loopLabel, tru,\n valueOutLabel, initialValue)))\n .withTransitionMapping(ImmutableMap.of(\n runningTotalLabel, plusLabel,\n stillLoopingLabel, loopLabel,\n valueInLabel, valueOutLabel\n ))\n .count(maximumLoopLength)\n .withFactory((plate) -> {\n // inputs\n DoubleVertex runningTotal = new DoubleProxyVertex(runningTotalLabel);\n BooleanVertex stillLooping = new BooleanProxyVertex(stillLoopingLabel);\n DoubleVertex valueIn = new DoubleProxyVertex(valueInLabel);\n plate.addAll(ImmutableSet.of(runningTotal, stillLooping, valueIn));\n\n // intermediate\n DoubleVertex one = ConstantVertex.of(1.);\n BooleanVertex condition = new BernoulliVertex(0.5);\n plate.add(oneLabel, one);\n plate.add(conditionLabel, condition);\n\n // outputs\n DoubleVertex plus = runningTotal.plus(one);\n BooleanVertex loopAgain = stillLooping.and(condition);\n DoubleVertex result = If.isTrue(loopAgain).then(plus).orElse(valueIn);\n plate.add(plusLabel, plus);\n plate.add(loopLabel, loopAgain);\n plate.add(valueOutLabel, result);\n })\n .build();\n\n\n DoubleVertex previousPlus = initialSum;\n BooleanVertex previousLoop = tru;\n DoubleVertex previousValueOut = initialValue;\n\n for (Plate plate : plates) {\n DoubleVertex runningTotal = plate.get(runningTotalLabel);\n BooleanVertex stillLooping = plate.get(stillLoopingLabel);\n DoubleVertex valueIn = plate.get(valueInLabel);\n\n DoubleVertex one = plate.get(oneLabel);\n BooleanVertex condition = plate.get(conditionLabel);\n\n DoubleVertex plus = plate.get(plusLabel);\n BooleanVertex loop = plate.get(loopLabel);\n DoubleVertex valueOut = plate.get(valueOutLabel);\n\n assertThat(runningTotal.getParents(), contains(previousPlus));\n assertThat(stillLooping.getParents(), contains(previousLoop));\n assertThat(valueIn.getParents(), contains(previousValueOut));\n\n assertThat(one.getParents(), is(empty()));\n assertThat(condition, hasParents(contains(allOf(\n hasNoLabel(),\n instanceOf(ConstantDoubleVertex.class)\n ))));\n\n assertThat(plus.getParents(), containsInAnyOrder(runningTotal, one));\n assertThat(loop.getParents(), containsInAnyOrder(condition, stillLooping));\n assertThat(valueOut.getParents(), containsInAnyOrder(loop, valueIn, plus));\n\n previousPlus = plus;\n previousLoop = loop;\n previousValueOut = valueOut;\n }\n\n\n DoubleVertex output = plates.asList().get(maximumLoopLength - 1).get(valueOutLabel);\n\n for (int firstFailure : new int[]{0, 1, 2, 10, 99}) {\n for (Plate plate : plates) {\n BooleanVertex condition = plate.get(conditionLabel);\n condition.setAndCascade(true);\n }\n BooleanVertex condition = plates.asList().get(firstFailure).get(conditionLabel);\n condition.setAndCascade(false);\n Double expectedOutput = new Double(firstFailure);\n assertThat(output, VertexMatchers.hasValue(expectedOutput));\n }\n }",
"public static void main(String[] args) throws IOException {\n\n // read in graph\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt(), m = scanner.nextInt();\n ArrayList<Integer>[] graph = new ArrayList[n];\n for (int i = 0; i < n; i++)\n graph[i] = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n scanner.nextLine();\n int u = scanner.nextInt() - 1, v = scanner.nextInt() - 1; // convert to 0 based index\n graph[u].add(v);\n graph[v].add(u);\n }\n\n int[] dist = new int[n];\n Arrays.fill(dist, -1);\n // partition the vertices in each of the components of the graph\n for (int u = 0; u < n; u++) {\n if (dist[u] == -1) {\n // bfs\n Queue<Integer> queue = new LinkedList<>();\n queue.add(u);\n dist[u] = 0;\n while (!queue.isEmpty()) {\n int w = queue.poll();\n for (int v : graph[w]) {\n if (dist[v] == -1) { // unvisited\n dist[v] = (dist[w] + 1) % 2;\n queue.add(v);\n } else if (dist[w] == dist[v]) { // visited and form a odd cycle\n System.out.println(-1);\n return;\n } // otherwise the dist will not change\n }\n }\n }\n\n }\n\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));\n // vertices with the same dist are in the same group\n List<Integer>[] groups = new ArrayList[2];\n groups[0] = new ArrayList<>();\n groups[1] = new ArrayList<>();\n for (int u = 0; u < n; u++) {\n groups[dist[u]].add(u + 1);\n }\n for (List<Integer> g: groups) {\n writer.write(String.valueOf(g.size()));\n writer.newLine();\n for (int u: g) {\n writer.write(String.valueOf(u));\n writer.write(' ');\n }\n writer.newLine();\n }\n\n writer.close();\n\n\n }"
] | [
"0.5747842",
"0.56819826",
"0.5638937",
"0.56014264",
"0.55720377",
"0.5563345",
"0.5485057",
"0.546339",
"0.5458359",
"0.54581505",
"0.5450792",
"0.5445831",
"0.5418821",
"0.53952235",
"0.5346343",
"0.53298753",
"0.5321523",
"0.5317895",
"0.53115535",
"0.53101015",
"0.52920574",
"0.52902603",
"0.5284479",
"0.52844644",
"0.52787435",
"0.52687377",
"0.52579546",
"0.524861",
"0.52335757",
"0.5209213",
"0.51823056",
"0.5152173",
"0.51437986",
"0.5134388",
"0.5131909",
"0.51288533",
"0.5099721",
"0.50978065",
"0.50833696",
"0.50817883",
"0.5078397",
"0.50758743",
"0.50755787",
"0.50711554",
"0.50691485",
"0.5066421",
"0.50610894",
"0.50565827",
"0.50489557",
"0.5044639",
"0.5043689",
"0.5041667",
"0.5031215",
"0.50262696",
"0.50223535",
"0.50220007",
"0.50168985",
"0.50137514",
"0.50126135",
"0.5009025",
"0.50060076",
"0.5004151",
"0.5001366",
"0.49990842",
"0.49985102",
"0.49839905",
"0.49811164",
"0.49763426",
"0.49736074",
"0.49582908",
"0.49537575",
"0.49494198",
"0.49448782",
"0.494304",
"0.4941595",
"0.4934393",
"0.49301714",
"0.49255618",
"0.49218228",
"0.49183372",
"0.4916889",
"0.49135393",
"0.49115458",
"0.4910854",
"0.49035785",
"0.49011067",
"0.4901012",
"0.4899555",
"0.48944718",
"0.48907784",
"0.48599172",
"0.4854861",
"0.48548535",
"0.48526335",
"0.48512396",
"0.48493198",
"0.48306805",
"0.48301739",
"0.48284182",
"0.48268524"
] | 0.6047083 | 0 |
Take a look in the used subgraph builder to get more information. | private PGraph testSubgraphBuilder(ILayoutProcessor subgraphBuilder, PGraph testGraph,
int removeEdgeCount) {
subgraphBuilder.process(testGraph);
Object insertable_edges = testGraph.getProperty(Properties.INSERTABLE_EDGES);
// checks also against null
if (insertable_edges instanceof LinkedList) {
@SuppressWarnings("unchecked")
LinkedList<PEdge> missingEdges = (LinkedList<PEdge>) insertable_edges;
if (missingEdges.size() != removeEdgeCount) {
fail("The planar subgraph builder should remove exactly " + removeEdgeCount
+ " edges, but does " + missingEdges.size() + ".");
}
} else {
fail("The planar subgraph builder should remove exactly " + removeEdgeCount
+ " edges, but does " + 0 + ".");
}
return testGraph;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public SubGraph(){\r\n\t\tsuper();\r\n\t}",
"public String doBigGraph(){\n NodoAvl tmp = root;\n StringBuilder sb = new StringBuilder();\n sb.append(\"subgraph {\");\n sb.append(\"node [shape = record];\\n\");\n sb.append(getLabelNodeAvl());\n sb.append(\"}\");\n Log.logger.info(sb.toString());\n return sb.toString();\n }",
"public String getSubgraph() {\r\n\t\treturn subgraph;\r\n\t}",
"public void buildGraph(){\n\t}",
"public void printGraph(){\n\t\tSystem.out.println(\"[INFO] Graph: \" + builder.nrNodes + \" nodes, \" + builder.nrEdges + \" edges\");\r\n\t}",
"void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }",
"private void buildInternalRepresentations() {\n new DAGBuilder(data).buildMethods(this);//.dump();\n }",
"public void visualiseSubgraphsOverGraph(IGraph graph, GraphOnDriveHandler initialGraphHandler, ExtendedMiningParameters miningParameters)\n\t\t\tthrows VisualisationException\t{\n\t\tSystem.out.println(\"WARNING: Visualising graph substructure is not supported in \"+visualisationDescription.getMethod()+\" visualisation mode.\");\n\t}",
"public boolean provideGraphInfo() { return node_size == NodeSize.GRAPHINFO; }",
"public void buildSubInterfacesInfo() {\n\t\twriter.writeSubInterfacesInfo();\n\t}",
"public void setSubgraph(String subgraph) {\r\n\t\tthis.subgraph = subgraph;\r\n\t}",
"public Vector<Node> GetAdditionalSubNodes();",
"private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}",
"public void summarize () {\n\n TreeNodeVisitor visitor = new TreeNodeVisitor();\n traversal (visitor);\n visitor.log();\n \n }",
"public void buildSubClassInfo() {\n\t\twriter.writeSubClassInfo();\n\t}",
"private String generateSubGraphCode(HashMap<IconMain, Set<IconMain>> connections, int tabIndex) {\n Set<String> visitedConnections = new HashSet<>();\n StringBuilder subGraph = new StringBuilder();\n for (IconMain iconFrom : connections.keySet()) {\n Set<IconMain> set = connections.get(iconFrom);\n for (IconMain iconTo : set) {\n if (iconFrom.getIconName().startsWith(\"open\")) {\n subGraph.append(\"start ->\").append(iconFrom.getIconName()).append(\";\\n\");\n }\n if (iconTo.getIconName().startsWith(\"close\")) {\n subGraph.append(iconTo.getIconName()).append(\" -> end;\\n\");\n }\n }\n }\n subGraph.append(\"subgraph cluster_\").append(tabIndex).append(\" {\");\n for (IconMain iconFrom : connections.keySet()) {\n Set<IconMain> set = connections.get(iconFrom);\n for (IconMain iconTo : set) {\n visitedConnections.add(iconFrom.getIconName() + \"->\" + iconTo.getIconName() + \";\");\n }\n }\n for (String graphCode : visitedConnections) {\n subGraph.append(\"\\n\").append(graphCode);\n }\n subGraph.append(\"\\n}\\n\");\n return subGraph.toString();\n }",
"public void printGraphStructure() {\n\t\tSystem.out.println(\"Vector size \" + nodes.size());\n\t\tSystem.out.println(\"Nodes: \"+ this.getSize());\n\t\tfor (int i=0; i<nodes.size(); i++) {\n\t\t\tSystem.out.print(\"pos \"+i+\": \");\n\t\t\tNode<T> node = nodes.get(i);\n\t\t\tSystem.out.print(node.data+\" -- \");\n\t\t\tIterator<EDEdge<W>> it = node.lEdges.listIterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEDEdge<W> e = it.next();\n\t\t\t\tSystem.out.print(\"(\"+e.getSource()+\",\"+e.getTarget()+\", \"+e.getWeight()+\")->\" );\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void getInfo() {\n System.out.println(\"INFO Node : \"+address+ \" connected to nodes \");\n for(Node node : getConnectedNodes()){\n System.out.print(\"Node :\"+node.getAddress()+\" with edge : \");\n getEdge(this, node).printEdge();\n }\n \n }",
"public abstract String describe(int depth);",
"public void printDGraph(){\n System.out.println(this.toString());\n }",
"void showSublist()\n {\n System.out.println(subs);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn level+\":\"+title + \":\"+refId+\"::\"+childElems;\n\t}",
"public SubGeneHitGraphInfo(SubGeneHit theHit) throws RetroTectorException {\n\t\tSUBGENENAME = theHit.PARENTSUBGENE.SUBGENENAME;\n\t\tSUBGENEGENUS = theHit.RVGENUS;\n\t\tHITSCORE = Math.round(theHit.SCORE);\n HITHOTSPOT = theHit.SGHITHOTSPOT;\n\t\tTHETRANSLATOR = theHit.SOURCEDNA.TRANSLATOR;\n\t\tmotifhitinfo = new MotifHitGraphInfo[theHit.MOTIFHITS.length];\n\t\tfor (int m=0; m<motifhitinfo.length; m++) {\n\t\t\tmotifhitinfo[m] = new MotifHitGraphInfo(theHit.getMotifHit(m));\n\t\t}\n\t}",
"@Override\n public Graph getGraph() {\n return graph;\n }",
"public String toString() {\r\n\t\tStringBuilder buffer = new StringBuilder();\r\n\t\t\r\n\t\tbuffer.append(\"<\" + xmltag + \" subgraph=\\\"\" + subgraph + \"\\\">\" + newline);\r\n\t\t\r\n\t\tfor (Variable currentVariable : variables) {\r\n\t\t\tbuffer.append(\"\\t\\t\\t\\t\\t\" + currentVariable);\r\n\t\t}\r\n\t\t\r\n\t\tbuffer.append(\"\\t\\t\\t\\t</\" + xmltag + \">\" + newline);\r\n\t\t\r\n\t\treturn buffer.toString();\r\n\t}",
"public String apGraph() {\n if(root != null){\n root.nameAvl();\n return doBigGraph();\n }else{\n return \"\";\n }\n }",
"public void buildSuperInterfacesInfo() {\n\t\twriter.writeSuperInterfacesInfo();\n\t}",
"void printGraph() {\n for (Vertex u : this) {\n System.out.print(u + \": \");\n for (Edge e : u.Adj) {\n System.out.print(e);\n }\n System.out.println();\n }\n }",
"String targetGraph();",
"@Override\n\tpublic void grandDetails() {\n\t\tsuper.grandDetails();\n\t}",
"public void structureChanged(GraphEvent e);",
"public void buildGraph() {\n //System.err.println(\"Build Graph \"+this);\n if (node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).restoreSceneGraphObjectReferences( control.getSymbolTable() );\n }",
"public GraphInfo(){}",
"public void dotGraph(BufferedWriter out) throws IOException {\n out.write(\"digraph \\\"\"+this.method+\"\\\" {\\n\");\n IndexMap m = new IndexMap(\"MethodCallMap\");\n for (Iterator i=nodeIterator(); i.hasNext(); ) {\n Node n = (Node) i.next();\n out.write(\"n\"+n.id+\" [label=\\\"\"+n.toString_short()+\"\\\"];\\n\");\n }\n for (Iterator i=getCalls().iterator(); i.hasNext(); ) {\n ProgramLocation mc = (ProgramLocation) i.next();\n int k = m.get(mc);\n out.write(\"mc\"+k+\" [label=\\\"\"+mc+\"\\\"];\\n\");\n }\n for (Iterator i=nodeIterator(); i.hasNext(); ) {\n Node n = (Node) i.next();\n for (Iterator j=n.getNonEscapingEdges().iterator(); j.hasNext(); ) {\n Map.Entry e = (Map.Entry) j.next();\n String fieldName = \"\"+e.getKey();\n Iterator k;\n if (e.getValue() instanceof Set) k = ((Set)e.getValue()).iterator();\n else k = Collections.singleton(e.getValue()).iterator();\n while (k.hasNext()) {\n Node n2 = (Node) k.next();\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"\"+fieldName+\"\\\"];\\n\");\n }\n }\n for (Iterator j=n.getAccessPathEdges().iterator(); j.hasNext(); ) {\n Map.Entry e = (Map.Entry) j.next();\n String fieldName = \"\"+e.getKey();\n Iterator k;\n if (e.getValue() instanceof Set) k = ((Set)e.getValue()).iterator();\n else k = Collections.singleton(e.getValue()).iterator();\n while (k.hasNext()) {\n Node n2 = (Node) k.next();\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"\"+fieldName+\"\\\",style=dashed];\\n\");\n }\n }\n if (n.getPassedParameters() != null) {\n for (Iterator j=n.getPassedParameters().iterator(); j.hasNext(); ) {\n PassedParameter pp = (PassedParameter) j.next();\n int k = m.get(pp.m);\n out.write(\"n\"+n.id+\" -> mc\"+k+\" [label=\\\"p\"+pp.paramNum+\"\\\",style=dotted];\\n\");\n }\n }\n if (n instanceof ReturnedNode) {\n ReturnedNode rn = (ReturnedNode) n;\n int k = m.get(rn.m);\n out.write(\"mc\"+k+\" -> n\"+n.id+\" [label=\\\"r\\\",style=dotted];\\n\");\n }\n }\n for (Iterator i=castMap.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry) i.next();\n Node n = (Node)((Pair)e.getKey()).left;\n Node n2 = (Node)e.getValue();\n if (nodes.containsKey(n2))\n out.write(\"n\"+n.id+\" -> n\"+n2.id+\" [label=\\\"(cast)\\\"];\\n\");\n }\n out.write(\"}\\n\");\n }",
"public void displayGraph() {\r\n\t\tgraph.display();\r\n\t}",
"@Override\n public int getDepth() {\n return 680;\n }",
"@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n Iterator<Node<E>> it = iterator();\n\n //Node display\n while(it.hasNext()){\n Node n = it.next();\n\n str += \"\\n\\tnode [\";\n str += \"\\n\\t\\tid \" + n;\n str += \"\\n\\t]\";\n }\n\n //Edge display\n it = iterator();\n\n while(it.hasNext()){\n Node n = it.next();\n\n Iterator<Node<E>> succsIt = n.succsOf();\n while(succsIt.hasNext()){\n Node succN = succsIt.next();\n\n str += \"\\n\\tedge [\";\n str += \"\\n\\t\\tsource \" + n;\n str += \"\\n\\t\\ttarget \" + succN;\n str += \"\\n\\t\\tlabel \\\"Edge from node \" + n + \" to node \" + succN + \" \\\"\";\n str += \"\\n\\t]\";\n }\n }\n\n str += \"\\n]\";\n\n return str;\n }",
"public interface InformationGraph {\r\n\t\r\n\tpublic int getNVertex();\r\n\tpublic int getDistanza();\r\n\tpublic int getLarghezzaX();\r\n\tpublic int getLarghezzaY();\r\n\tpublic int getWidth();\r\n\tpublic int getHeight();\r\n}",
"public void printDetails() \r\n\t{\r\n\t\t// Print cells in path\r\n\t\tSystem.out.print(\"Path:\");\r\n\t\tfor(Cell c: path)\r\n\t\t\tSystem.out.print(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\t// Print path length\r\n\t\tSystem.out.println(\"\\nLength of path: \" + path.size());\r\n\t\t\r\n\t\t// Print visited cell amount\r\n\t\tint lastCell = path.size() - 1;\r\n\t\tint visitedCells = path.get(lastCell).getDiscoveryTime() + 1;\r\n\t\tSystem.out.println(\"Visited cells: \" + visitedCells + '\\n');\r\n\t}",
"public Graph getGraph();",
"private void printGraphModel() {\n System.out.println(\"Amount of nodes: \" + graphModel.getNodes().size() +\n \" || Amount of edges: \" + graphModel.getEdges().size());\n System.out.println(\"Nodes:\");\n int i = 0;\n for (Node n : graphModel.getNodes()) {\n System.out.println(\"#\" + i + \" \" + n.toString());\n i++;\n }\n System.out.println(\"Edges:\");\n i = 0;\n for (Edge e : graphModel.getEdges()) {\n System.out.println(\"#\" + i + \" \" + e.toString());\n i++;\n }\n }",
"public void printGraph() {\n\t\tSystem.out.println(\"-------------------\");\n\t\tSystem.out.println(\"Printing graph...\");\n\t\tSystem.out.println(\"Vertex=>[Neighbors]\");\n\t\tIterator<Integer> i = vertices.keySet().iterator();\n\t\twhile(i.hasNext()) {\n\t\t\tint name = i.next();\n\t\t\tSystem.out.println(name + \"=>\" + vertices.get(name).printNeighbors());\n\t\t}\n\t\tSystem.out.println(\"-------------------\");\n\t}",
"@Override\n public Graph getGraphModel() {\n return this.graph;\n }",
"@Test\n public void testDataStructuresWithSubnetwork() {\n if (!PhreakBuilder.isEagerSegmentCreation()) return;\n\n InternalKnowledgeBase kbase1 = buildKnowledgeBase(\"r\",\n \" a : A() B() exists ( C() and C(1;) ) E() X()\\n\");\n\n InternalWorkingMemory wm = (InternalWorkingMemory) kbase1.newKieSession();\n ObjectTypeNode aotn = getObjectTypeNode(kbase1.getRete(), A.class);\n ObjectTypeNode botn = getObjectTypeNode(kbase1.getRete(), B.class);\n\n LeftInputAdapterNode lian = (LeftInputAdapterNode) aotn.getSinks()[0];\n\n insertAndFlush(wm);\n\n SegmentPrototype smemProto0 = kbase1.getSegmentPrototype(lian);\n\n PathEndNode endNode0 = smemProto0.getPathEndNodes()[0];\n assertThat(endNode0.getType()).isEqualTo(NodeTypeEnums.RightInputAdapterNode);\n assertThat(endNode0.getPathMemSpec().allLinkedTestMask()).isEqualTo(2);\n assertThat(endNode0.getPathMemSpec().smemCount()).isEqualTo(2);\n\n PathEndNode endNode1 = smemProto0.getPathEndNodes()[1];\n assertThat(endNode1.getType()).isEqualTo(NodeTypeEnums.RuleTerminalNode);\n assertThat(endNode1.getPathMemSpec().allLinkedTestMask()).isEqualTo(3);\n assertThat(endNode1.getPathMemSpec().smemCount()).isEqualTo(2);\n }",
"@Override\n\tpublic void visit(SubSelect arg0) {\n\t\t\n\t}",
"Subp getSubp();",
"public void displayPaths() {\r\n\t\tlog.debug(\"startPaths\");\r\n\t\tfor ( Map.Entry<Integer, Vector<Edge>> entry: startPaths.entrySet()) {\r\n\t\t\tfor ( Edge edge: entry.getValue()) {\r\n\t\t\t\tlog.debug( entry.getKey() + \": \" + edge.StartRoom + \"->\" + edge.door + \"->\" + edge.DestinationRoom );\r\n\t\t\t}\r\n\t\t}\r\n\t\tlog.debug(\"destinationPaths\");\r\n\t\tfor ( Map.Entry<Integer, Vector<Edge>> entry: destinationPaths.entrySet()) {\r\n\t\t\tfor ( Edge edge: entry.getValue()) {\r\n\t\t\t\tlog.debug( entry.getKey() + \": \" + edge.StartRoom + \"->\" + edge.door + \"->\" + edge.DestinationRoom );\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void printInfo() {\n\t\tString nodeType = \"\";\n\t\tif (nextLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Output Node\";\n\t\t} else if (prevLayerNodes.size() == 0) {\n\t\t\tnodeType = \"Input Node\";\n\t\t} else {\n\t\t\tnodeType = \"Hidden Node\";\n\t\t}\n\t\tSystem.out.printf(\"%n-----Node Values %s-----%n\", nodeType);\n\t\tSystem.out.printf(\"\tNumber of nodes in next layer: %d%n\", nextLayerNodes.size());\n\t\tSystem.out.printf(\"\tNumber of nodes in prev layer: %d%n\", prevLayerNodes.size());\n\t\tSystem.out.printf(\"\tNext Layer Node Weights:%n\");\n\t\tNode[] nextLayer = new Node[nextLayerNodes.keySet().toArray().length];\n\t\tfor (int i = 0; i < nextLayer.length; i++) {\n\t\t\tnextLayer[i] = (Node) nextLayerNodes.keySet().toArray()[i];\n\t\t}\n\t\tfor (int i = 0; i < nextLayerNodes.size(); i++) {\n\t\t\tSystem.out.printf(\"\t\t# %f%n\", nextLayerNodes.get(nextLayer[i]));\n\t\t}\n\t\tSystem.out.printf(\"%n\tPartial err partial out = %f%n%n\", getPartialErrPartialOut());\n\t}",
"@SyntheticMember\n @Pure\n protected void toString(final ToStringBuilder builder) {\n super.toString(builder);\n builder.add(\"path\", this.path);\n builder.add(\"pathLength\", this.pathLength);\n }",
"public void outputForGraphviz() {\n\t\tString label = \"\";\n\t\tfor (int j = 0; j <= lastindex; j++) {\n\t\t\tif (j > 0) label += \"|\";\n\t\t\tlabel += \"<p\" + ptrs[j].myname + \">\";\n\t\t\tif (j != lastindex) label += \"|\" + String.valueOf(keys[j+1]);\n\t\t\t// Write out any link now\n\t\t\tBTree.writeOut(myname + \":p\" + ptrs[j].myname + \" -> \" + ptrs[j].myname + \"\\n\");\n\t\t\t// Tell your child to output itself\n\t\t\tptrs[j].outputForGraphviz();\n\t\t}\n\t\t// Write out this node\n\t\tBTree.writeOut(myname + \" [shape=record, label=\\\"\" + label + \"\\\"];\\n\");\n\t}",
"public void printSubNodes(int depth) {\r\n super.printSubNodes(depth);\r\n\r\n if (orderByList != null) {\r\n printLabel(depth, \"orderByList: \");\r\n orderByList.treePrint(depth + 1);\r\n }\r\n if (offset != null) {\r\n printLabel(depth, \"offset: \");\r\n offset.treePrint(depth + 1);\r\n }\r\n if (fetchFirst != null) {\r\n printLabel(depth, \"fetchFirst: \");\r\n fetchFirst.treePrint(depth + 1);\r\n }\r\n }",
"public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }",
"public abstract String rawGraphToString();",
"@Override\n \t\t\t\tpublic String getGraphName() {\n \t\t\t\t\treturn \"http://opendata.cz/data/namedGraph/3\";\n \t\t\t\t}",
"@Override\n\tpublic void visit(SubSelect arg0) {\n\n\t}",
"@Override\n public String toString(){\n return \"the node has: \" + children.size()\n + \" the counter is \" + counter; \n }",
"public void printStats() {\n\t\t\n\t\tif(grafo==null) {\n\t\t\t\n\t\t\tthis.createGraph();\n\t\t}\n\t\t\n\t\tConnectivityInspector <Airport, DefaultWeightedEdge> c = new ConnectivityInspector<>(grafo);\n\t\t\n\t\tSystem.out.println(c.connectedSets().size());\n\n\t}",
"void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }",
"void printMST(int[] parent) {\n System.out.println(\"Edge \\tWeight\");\n for (int i = 1; i < VERTICES; i++)\n System.out.println(parent[i] + \" - \" + i + \"\\t\" + graph[i][parent[i]]);\n }",
"public void testaGraph() {\n\t\tEstacaoDAO a = new EstacaoDAO();\n\t\ta.carregarEstacoes();\n\t\tLinha b = new Linha(\"a\");\n\t\tb.loadAllStations(a);\n\t\tb.shortestPath(a,\"Curado\",\"Recife\");\n\t}",
"public boolean isShowGraph() {\n return showGraph;\n }",
"public String getSubcollectionInfo () throws SDLIPException {\r\n XMLObject subcolInfo = new sdlip.xml.dom.XMLObject();\r\n tm.getSubcollectionInfo(subcolInfo);\r\n// return postProcess (subcolInfo, \"subcolInfo\", false);\r\n return subcolInfo.getString();\r\n }",
"public Boolean getShowNodes() {\n return showNodes;\n }",
"private static void outputVertex(RootedTree tree, StringBuffer sb, Object v) {\r\n\t\tif (!tree.isLeaf(v)) {\r\n\t\t\tsb.append('(');\r\n\t\t\tList l = tree.getChildrenOf(v);\r\n\t\t\tfor (int i = 0; i < l.size(); i++) {\r\n\t\t\t\toutputVertex(tree, sb, l.get(i));\r\n\t\t\t\tif (i != l.size() - 1) sb.append(',');\r\n\t\t\t}\r\n\t\t\tsb.append(')');\r\n\t\t}\r\n\t\t// Call this to make the vertex's label nicely formatted for Nexus\r\n\t\t// output.\r\n\t\tString s = getNexusCompliantLabel(tree, v);\r\n\t\tif (s.length() != 0) sb.append(s);\r\n\t\tObject p = tree.getParentOf(v);\r\n\t\tif (p != null) {\r\n\t\t\tdouble ew = tree.getEdgeWeight(tree.getEdge(p, v));\r\n\t\t\tif (ew != 1.0) sb.append(\":\" + Double.toString(ew));\r\n\t\t}\r\n\t}",
"public abstract String getChildTitle();",
"public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}",
"@Override\n \t\t\t\tpublic Collection<String> getAttachedGraphNames() {\n \t\t\t\t\treturn null;\n \t\t\t\t}",
"@SyntheticMember\r\n @Pure\r\n protected void toString(final ToStringBuilder builder) {\r\n super.toString(builder);\r\n builder.add(\"totalWeight\", this.totalWeight);\r\n builder.add(\"refinementLevel\", this.refinementLevel);\r\n builder.add(\"compositionOfTheProduct\", this.compositionOfTheProduct);\r\n builder.add(\"maxPollution\", this.maxPollution);\r\n builder.add(\"cost\", this.cost);\r\n }",
"private void testBookExample() {\n PGraph pgraph = createBookExample();\n for (PNode node : pgraph.getNodes()) {\n if (node.id == 4) {\n PEdge edge = node.getEdge(10);\n node.getEdges().remove(edge);\n node.getEdges().add(edge);\n }\n }\n System.out.println(pgraph.toString());\n Util.storeGraph(pgraph, 0, false);\n System.out.println(pgraph.getFaceCount() + \" faces after step \" + 0);\n // checks if the implementation of BoyerMyrvold approach generates correct planar subgraphs.\n final PGraph bmSubgraph = testSubgraphBuilder(new BoyerMyrvoldPlanarSubgraphBuilder(),\n pgraph, 1);\n // checks if the implementation of BoyerMyrvold approach generates correct planar subgraphs.\n // final PGraph lrSubgraph = testSubgraphBuilder(new LRPlanarSubgraphBuilder(), createK5(),\n // 1);\n System.out.println(bmSubgraph.toString());\n System.out.println(bmSubgraph.getFaceCount() + \" faces after step \" + 1);\n Util.storeGraph(bmSubgraph, 1, false);\n testEdgeInserter(bmSubgraph, 1);\n Util.storeGraph(bmSubgraph, 2, false);\n System.out.println(bmSubgraph.toString());\n System.out.println(bmSubgraph.getFaceCount() + \" faces after step \" + 2);\n // testEdgeInserter(lrSubgraph, 1);\n // Util.storeGraph(bmSubgraph, 0, false);\n\n }",
"Object visitSubtype(SubtypeNode node, Object state);",
"public abstract String beginGraphString();",
"@Override\n\tpublic String toString() {\n StringBuffer buf = new StringBuffer();\n\n// for (int i = 0; i < units.size(); i++) {\n// buf.append(\"\\nUnit \" + i + \": \" + units.get(i));\n// }\n\n buf.append(\"Connected components: \" );\n List<List<Node>> components = GraphUtils.connectedComponents(graph);\n\n for (int i = 0; i < components.size(); i++) {\n buf.append(\"\\n\" + i + \": \");\n buf.append(components.get(i));\n }\n\n buf.append(\"\\nGraph = \" );\n buf.append(graph);\n\n return buf.toString();\n }",
"private String getName()\r\n\t{\r\n\t return edgeType.getName();\r\n\t}",
"public void dumpChildren ()\r\n {\r\n dumpChildren(0);\r\n }",
"Package getSubp();",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"void printGraph();",
"public String getSubObjectType() {\n return subObjectType;\n }",
"@Override\n\tpublic void getDetail() {\n\t\t\n\t}",
"protected NodePart getHelmetMoreDetails() {\n\t\treturn instance.nodes.get(0).parts.get(0);\n\t}",
"public interface Graph extends Container {\n\n /**\n * returns how many elements are in the container.\n *\n * @return int = number of elements in the container.\n */\n public int size();\n\n /**\n * returns true if the container is empty, false otherwise.\n *\n * @return boolean true if container is empty\n */\n public boolean isEmpty();\n\n /**\n * return the number of vertices in the graph\n * \n * @return number of vertices in the graph\n */\n public int numVertices();\n\n /**\n * returns the number for edges in the graph\n * \n * @return number of edges in the graph\n */\n public int numEdges();\n\n /**\n * returns an Enumeration of the vertices in the graph\n * \n * @return vertices in the graph\n */\n public Enumeration vertices();\n\n \n /**\n * returns an Enumeration of the edges in the graph\n * \n * @return edges in the graph\n */\n public Enumeration edges();\n\n\n /**\n * Returns an enumeration of the directed edges in the Graph\n * \n * @return an enumeration of the directed edges in the Graph\n */\n public Enumeration directedEdges();\n\n /**\n * Returns an enumeration of the directed edges in the Graph\n * \n * @return an enumeration of the directed edges in the Graph\n */\n public Enumeration undirectedEdges();\n\n /**\n * returns the degree of the passed in Vertex vp\n * \n * @param vp Vertex to return the degree of\n * @return degree of Vertex vp\n * @exception InvalidPositionException\n * thrown when vp is invalid for Vertex container V\n */\n public int degree(Position vp) throws InvalidPositionException;\n\n /**\n * returns the in degree of the passed in Vertex vp\n * \n * @param vp Vertex to return the in degree of\n * @return in degree of Vertex vp\n * @exception InvalidPositionException\n * thrown when vp is invalid for Vertex container V\n */\n public int inDegree(Position vp) throws InvalidPositionException;\n\n /**\n * returns the out degree of the passed in Vertex vp\n * \n * @param vp Vertex to return the out degree of\n * @return out degree of Vertex vp\n * @exception InvalidPositionException\n * thrown when vp is invalid for Vertex container V\n */\n public int outDegree(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an enumeration of vertices adjacent to Vertex vp\n * \n * @param vp Position of Vertex to return the adjacent vertices of\n * @return enumeration of vertices adjacent to Vertex vp\n * @exception InvalidPositionException\n * thrown if vp is not a valid Vertex for this Graph\n */\n public Enumeration adjacentVertices(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an enumeration of vertices in adjacent to Vertex vp\n * \n * @param vp Position of Vertex to return the in adjacent vertices of\n * @return enumeration of vertices in adjacent to Vertex vp\n * @exception InvalidPositionException\n * thrown if vp is not a valid Vertex for this Graph\n */\n public Enumeration inAdjacentVertice(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an enumeration of vertices out adjacent to Vertex vp\n * \n * @param vp Position of Vertex to return the out adjacent vertices of\n * @return enumeration of vertices out adjacent to Vertex vp\n * @exception InvalidPositionException\n * thrown if vp is not a valid Vertex for this Graph\n */\n public Enumeration outAdjacentVertices(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an Enumeration of the edges incident upon the\n * Vertex in Position vp\n * \n * @param vp the Position to holding the Vertex to return the\n * Enumeration of\n * @return the Enumeration of edges incident upon vp\n * @exception InvalidPositionException\n */\n public Enumeration incidentEdges(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an Enumeration of the edges in incident upon the\n * Vertex in Position vp\n * \n * @param vp the Position to holding the Vertex to return the\n * Enumeration of\n * @return the Enumeration of edges in incident upon vp\n * @exception InvalidPositionException\n */\n public Enumeration inIncidentEdges(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an Enumeration of the edges out incident upon the\n * Vertex in Position vp\n * \n * @param vp the Position to holding the Vertex to return the\n * Enumeration of\n * @return the Enumeration of edges out incident upon vp\n * @exception InvalidPositionException\n */\n public Enumeration outIncidentEdges(Position vp) throws InvalidPositionException;\n\n public Position[] endVertices(Position ep) throws InvalidPositionException;\n\n /**\n * Returns the Vertex on Edge ep opposite from Vertex vp\n * \n * @param vp Vertex to find opposite of\n * @param ep Edge containing the vertices\n * @return \n * @exception InvalidPositionException\n */\n public Position opposite(Position vp, Position ep) throws InvalidPositionException;\n\n /**\n * Determine whether or not two vertices are adjacent\n * \n * @param vp Position of one Vertex to check\n * @param wp Position of other Vertex to check\n * @return true if they are adjacent, false otherwise\n * @exception InvalidPositionException\n * thrown if either Position is invalid for this container\n */\n public boolean areAdjacent(Position vp, Position wp) throws InvalidPositionException;\n\n /**\n * Returns the destination Vertex of the given Edge Position\n * \n * @param ep Edge Position to return the destination Vertex of\n * @return the destination Vertex of the given Edge Position\n * @exception InvalidPositionException\n * thrown if the Edge Position is invalid\n */\n public Position destination(Position ep) throws InvalidPositionException;\n\n /**\n * Returns the origin Vertex of the given Edge Position\n * \n * @param ep Edge Position to return the origin Vertex of\n * @return the origin Vertex of the given Edge Position\n * @exception InvalidPositionException\n * thrown if the Edge Position is invalid\n */\n public Position origin(Position ep) throws InvalidPositionException;\n\n /**\n * Returns true if the given Edge Position is directed,\n * otherwise false\n * \n * @param ep Edge Position to check directed on\n * @return true if directed, otherwise false\n * @exception InvalidPositionException\n */\n public boolean isDirected(Position ep) throws InvalidPositionException;\n\n /**\n * Inserts a new undirected Edge into the graph with end\n * Vertices given by Positions vp and wp storing Object o,\n * returns a Position object for the new Edge\n * \n * @param vp Position holding one Vertex endpoint\n * @param wp Position holding the other Vertex endpoint\n * @param o Object to store at the new Edge\n * @return Position containing the new Edge object\n * @exception InvalidPositionException\n * thrown if either of the given vertices are invalid for\n * this container\n */\n public Position insertEdge(Position vp,Position wp, Object o) throws InvalidPositionException;\n\n /**\n * Inserts a new directed Edge into the graph with end\n * Vertices given by Positions vp, the origin, and wp,\n * the destination, storing Object o,\n * returns a Position object for the new Edge\n * \n * @param vp Position holding the origin Vertex\n * @param wp Position holding the destination Vertex\n * @param o Object to store at the new Edge\n * @return Position containing the new Edge object\n * @exception InvalidPositionException\n * thrown if either of the given vertices are invalid for\n * this container\n */\n public Position insertDirectedEdge(Position vp, Position wp, Object o) throws InvalidPositionException;\n\n /**\n * Inserts a new Vertex into the graph holding Object o\n * and returns a Position holding the new Vertex\n * \n * @param o the Object to hold in this Vertex\n * @return the Position holding the Vertex\n */\n public Position insertVertex(Object o);\n\n /**\n * This method removes the Vertex held in the passed in\n * Position from the Graph\n * \n * @param vp the Position holding the Vertex to remove\n * @exception InvalidPositionException\n * thrown if the given Position is invalid for this container\n */\n public void removeVertex(Position vp) throws InvalidPositionException;\n\n /**\n * Used to remove the Edge held in Position ep from the Graph\n * \n * @param ep the Position holding the Edge to remove\n * @exception InvalidPositionException\n * thrown if Position ep is invalid for this container\n */\n public void removeEdge(Position ep) throws InvalidPositionException;\n\n /**\n * This routine is used to change a directed Edge into an\n * undirected Edge\n * \n * @param ep a Position holding the Edge to change from directed to\n * undirected\n * @exception InvalidPositionException\n */\n public void makeUndirected(Position ep) throws InvalidPositionException;\n\n /**\n * This routine can be used to reverse the diretion of a \n * directed Edge\n * \n * @param ep a Position holding the Edge to reverse\n * @exception InvalidPositionException\n * thrown if the given Position is invalid for this container\n */\n public void reverseDirection(Position ep) throws InvalidPositionException;\n\n /**\n * Changes the direction of the given Edge to be out incident\n * upone the Vertex held in the given Position\n * \n * @param ep the Edge to change the direction of\n * @param vp the Position holding the Vertex that the Edge is going\n * to be out incident upon\n * @exception InvalidPositionException\n * thrown if either of the given positions are invalid for this container\n */\n public void setDirectionFrom(Position ep, Position vp) throws InvalidPositionException;\n\n\n /**\n * Changes the direction of the given Edge to be in incident\n * upone the Vertex held in the given Position\n * \n * @param ep the Edge to change the direction of\n * @param vp the Position holding the Vertex that the Edge is going\n * to be in incident upon\n * @exception InvalidPositionException\n * thrown if either of the given positions are invalid for this container\n */\n public void setDirectionTo(Position ep, Position vp) throws InvalidPositionException;\n\n}",
"public SubgraphGenerator(GraphDatabaseService graphDb, int totalGraphNodes, Random random, int endSize, double complete, int rooted, int numMex, int numVAttrs, int numEAttrs, int resSize){\r\n\r\n\t\t//Set the graphdb and the random number generator\r\n\t\tthis.graphDb = graphDb;\r\n\t\tthis.totalGraphNodes = totalGraphNodes;\r\n\t\tthis.random = random;\r\n\r\n\t\t//Set the parameters\r\n\t\tthis.endSize = endSize;\r\n\t\tthis.rooted = rooted;\r\n\t\tthis.complete = complete;\r\n\t\tthis.numMex = numMex;\r\n\t\tthis.numVAttrs = numVAttrs;\r\n\t\tthis.numEAttrs = numEAttrs;\r\n\t\tthis.resSize = resSize;\r\n\r\n\t\t//initialize the lists\r\n\t\tthis.rels = new ArrayList<Relationship>();\r\n\t\tthis.allNodes = new ArrayList<Node>();\r\n\t\tnodesMap = new HashMap<Node, MyNode>();\r\n\t\trelsMap = new HashMap<Relationship, MyRelationship>();\r\n\r\n\t}",
"private void drawGraphInfo(Graphics2D g2d, RenderContext myrc, Set<String> sel) {\n if (sel.size() == 1) { // Draw distances to... probably less than 4 to be useful\n // Make sure the selection equals a node in the graph\n String node = sel.iterator().next(); if (entity_to_wxy.containsKey(node) == false) return;\n\n // Run the algorithm\n DijkstraSingleSourceShortestPath ssp;\n if (last_ssp != null && node.equals(last_ssp_source)) ssp = last_ssp;\n else ssp = new DijkstraSingleSourceShortestPath(graph, graph.getEntityIndex(node));\n\n // Draw a number next to those numbers that are within 4 edges (arbitrary number...)\n for (int i=0;i<graph.getNumberOfEntities();i++) {\n int dist = (int) ssp.getDistanceTo(i);\n if (dist > 0 && dist <= 4) {\n\t Color color;\n\t switch (dist) {\n\t case 1: color = RTColorManager.getColor(\"linknode\", \"nbor\");\n\t case 2: color = RTColorManager.getColor(\"linknode\", \"nbor+\");\n\t case 3: color = RTColorManager.getColor(\"linknode\", \"nbor++\");\n\t case 4: \n\t default: color = RTColorManager.getColor(\"linknode\", \"nbor+++\");\n\t }\n String entity = graph.getEntityDescription(i);\n\t int x = entity_to_sx.get(entity),\n\t y = entity_to_sy.get(entity);\n String str = \"\" + dist;\n clearStr(g2d, str, x - Utils.txtW(g2d,str)/2, y + Utils.txtH(g2d,str)/2, color, RTColorManager.getColor(\"label\", \"defaultbg\"));\n\t}\n }\n\n // Cache the results so that repaints are faster... need to worry about tears\n last_ssp = ssp; last_ssp_source = node;\n } else if (sel.size() == 2) { // Draw shortest path between two nodes\n // Make sure the selection equals a node in the graph\n String node0,node1;\n Iterator<String> it = sel.iterator(); node0 = it.next(); node1 = it.next();\n if (entity_to_wxy.containsKey(node0) == false || entity_to_wxy.containsKey(node1) == false) return;\n\n // Run the algorithm\n DijkstraSingleSourceShortestPath ssp;\n if (last_ssp != null && last_ssp_source.equals(node0)) { ssp = last_ssp; }\n else if (last_ssp != null && last_ssp_source.equals(node1)) { ssp = last_ssp; String tmp = node0; node0 = node1; node1 = tmp; }\n else ssp = new DijkstraSingleSourceShortestPath(graph, graph.getEntityIndex(node0));\n\n // Get the path\n int path[] = ssp.getPathTo(graph.getEntityIndex(node1));\n if (path != null && path.length > 1) {\n Stroke orig_stroke = g2d.getStroke(); g2d.setColor(RTColorManager.getColor(\"annotate\", \"cursor\")); g2d.setStroke(new BasicStroke(3.0f));\n for (int i=0;i<path.length-1;i++) {\n String graph_linkref = graph.getLinkRef(path[i],path[i+1]),\n\t graph_linkref2 = graph.getLinkRef(path[i+1],path[i]);\n\t String gui_linkref = myrc.graphedgeref_to_link.get(graph_linkref),\n\t gui_linkref2 = myrc.graphedgeref_to_link.get(graph_linkref2);\n\t Line2D line = myrc.link_to_line.get(gui_linkref),\n\t line2 = myrc.link_to_line.get(gui_linkref2);\n\t if (line != null) g2d.draw(line); \n\t else if (line2 != null) g2d.draw(line2);\n\t else System.err.println(\"No Line Between \\\"\" + graph.getEntityDescription(path[i]) + \"\\\" and \\\"\" + graph.getEntityDescription(path[i+1]) + \"\\\"\");\n\t}\n\tg2d.setStroke(orig_stroke);\n }\n\n // Cache the results so that repaints are faster... need to worry about tears\n last_ssp = ssp; last_ssp_source = node0;\n } else if (sel.size() >= 3) { // Draw common neighbors\n }\n }",
"public String getSubTypeDesc() {\n\t\treturn subTypeDesc;\n\t}",
"public void printTree() {\n\t\tSystem.out.println(printHelp(root));\r\n\t\t\r\n\t}",
"private void testBuildGraph() {\n\t\t// All test graphs have a node 8 with children [9, 10]\n\t\tSet<Node> expectedChildren = new HashSet<>();\n\t\texpectedChildren.add(new Node(9));\n\t\texpectedChildren.add(new Node(10));\n\n\t\tStudySetGraph disconnectedGraphWithoutCycle = new StudySetGraph(Edges.disconnectedGraphWithoutCycle);\n\t\tNode node = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph disconnectedGraphWithCycle = new StudySetGraph(Edges.disconnectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph connectedGraphWithCycle = new StudySetGraph(Edges.connectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\n\t\tStudySetGraph connectedGraphWithoutCycle = new StudySetGraph(Edges.connectedGraphWithoutCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t}",
"public void show() {\n\n\t\tNode n = head;\n\t\twhile (n.next != null) {\n\t\t\t//logger.info(n.data);\n\t\t\tn = n.next;\n\t\t}\n\t\t//logger.info(n.data);\n\n\t}",
"public VBox getGraph(){\n\t\treturn graph.getGraph();\n\t}",
"public interface IASTPathPart {\n\t/**\n\t * The node child index at its parent\n\t * \n\t * @return\n\t */\n\tint index();\n\n\t/**\n\t * The unique node identifier\n\t * \n\t * @return\n\t */\n\tString id();\n}",
"public boolean getHaveSub() { return haveSub;}",
"@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"node:\\n\").append(nodeJo);\n\t\tsb.append(\"\\nedges:\\n\").append(edgesJa);\n\t\treturn sb.toString();\n\t}",
"public String toString() {\n\t\tcheckRep();\n\t\treturn (this.getLabel() + \" pointing to \" + this.getChild());\n\t}",
"public static void displaySubTitles()\r\n {\n }",
"private void printPath( Vertex dest )\n {\n if( dest.prev != null )\n {\n printPath( dest.prev );\n // System.out.print( \" to \" );\n }\n System.out.print( dest.name +\" \" );\n }",
"public String getSub() {\n return sub;\n }",
"@Override\n public String toString() {\n return \"GraphModelNode: \" + getText(); //$NON-NLS-1$\n }",
"public static void main(String[] args) {\n\n Graph myGraph = new Graph();\n myGraph.addNode(\"8\");\n myGraph.addNode(\"1\");\n myGraph.addNode(\"2\");\n myGraph.addNode(\"9\");\n myGraph.addNode(\"7\");\n myGraph.addNode(\"5\");\n myGraph.addEdge(\"8\" , \"1\" , 50);\n myGraph.addEdge(\"5\" , \"1\" , 70);\n myGraph.addEdge(\"7\" , \"5\", 20);\n myGraph.addEdge(\"8\" , \"9\", 100);\n myGraph.addEdge(\"8\" , \"2\", 40);\n String[] trip = {\"8\" , \"1\" , \"5\"};\n String[] trip2 = {\"8\" , \"5\"};\n String[] trip3 = {\"8\" , \"1\" , \"5\" , \"7\" , \"5\" , \"1\" , \"8\" , \"9\"};\n String[] trip4 = {\"8\" , \"9\" , \"5\" };\n String[] trip5 = {\"8\"};\n String[] trip6 = {\"8\" , \"2\"};\n// System.out.println(myGraph);\n// System.out.println(myGraph.getNodes());\n// System.out.println(myGraph.getNeighbors(\"8\"));\n// System.out.println(myGraph.getNeighbors(\"7\"));\n// System.out.println(myGraph.getNeighbors(\"5\"));\n// System.out.println(myGraph.size());\n// System.out.println(myGraph.breadthFirst(\"8\"));\n// System.out.println(myGraph.weightList);\n// System.out.println(myGraph.breadthFirst(\"7\"));\n// System.out.println(myGraph.breadthFirst(\"5\"));\n// System.out.println(myGraph.businessTrip(\"8\",trip));\n// System.out.println(myGraph.businessTrip(\"8\",trip2));\n// System.out.println(myGraph.businessTrip(\"8\",trip3));\n// System.out.println(myGraph.businessTrip(\"8\",trip4));\n// System.out.println(myGraph.businessTrip(\"8\",trip5));\n// System.out.println(myGraph.businessTrip(\"8\",trip6));\n System.out.println(myGraph.depthFirst(\"8\"));\n }",
"@Override\n\tpublic int graphSize() {\n\t\treturn edges.size();\n\t}",
"private void stats ( ) {\n\n nodes = 0;\n depth = 0;\n\n parse(((GPIndividual)program).trees[0].child);\n\n }",
"@Override\n public String toString(int depth) {\n if (depth <= 0) return \"\";\n String sEO = \"\" ;\n if (this.subExpressionOf != null) {\n sEO = Strings.indent(2,\n \"\\nsubExpressionOf: \" +\n Strings.indent(2, this.subExpressionOf.toString(1))) ;} ;\n return \"\\n*OpApplNode: \" + operator.getName() + \" \" + super.toString(depth+1)\n + \" errors: \" + (errors != null ? \"non-null\" : \"null\")\n + toStringBody(depth) + sEO ;\n }",
"public interface GraphListener extends java.util.EventListener {\n /**\n * An edge's head has been changed in a registered\n * graph or one of its subgraphs. The added edge\n * is the \"source\" of the event. The previous head\n * is accessible via e.getOldValue().\n */\n public void edgeHeadChanged(GraphEvent e);\n\n /**\n * An edge's tail has been changed in a registered\n * graph or one of its subgraphs. The added edge\n * is the \"source\" of the event. The previous tail\n * is accessible via e.getOldValue().\n */\n public void edgeTailChanged(GraphEvent e);\n\n /**\n * A node has been been added to the registered\n * graph or one of its subgraphs. The added node\n * is the \"source\" of the event.\n */\n public void nodeAdded(GraphEvent e);\n\n /**\n * A node has been been deleted from the registered\n * graphs or one of its subgraphs. The deleted node\n * is the \"source\" of the event. The previous parent\n * graph is accessible via e.getOldValue().\n */\n public void nodeRemoved(GraphEvent e);\n\n /**\n * The structure of the event's \"source\" graph has\n * been drastically changed in some way, and this\n * event signals the listener to refresh its view\n * of that graph from model.\n */\n public void structureChanged(GraphEvent e);\n}"
] | [
"0.67612696",
"0.67568165",
"0.6472118",
"0.61966455",
"0.598429",
"0.5863176",
"0.584798",
"0.5811537",
"0.57554245",
"0.5726763",
"0.56953007",
"0.56698054",
"0.55934775",
"0.5589485",
"0.5581307",
"0.55568665",
"0.5551044",
"0.5548653",
"0.551327",
"0.5511818",
"0.55105436",
"0.54960966",
"0.54913795",
"0.54199576",
"0.540045",
"0.53783613",
"0.5357813",
"0.5347672",
"0.53289604",
"0.53126234",
"0.53065157",
"0.5301374",
"0.52912134",
"0.5290035",
"0.5266292",
"0.5262336",
"0.5221654",
"0.5219933",
"0.5215655",
"0.51993835",
"0.5183384",
"0.515748",
"0.5155184",
"0.51508945",
"0.51491845",
"0.513757",
"0.5135406",
"0.5134058",
"0.5130449",
"0.51291496",
"0.51191163",
"0.5117115",
"0.51082736",
"0.5096084",
"0.5092784",
"0.50858015",
"0.5070125",
"0.506706",
"0.5052436",
"0.5043041",
"0.5037303",
"0.5034862",
"0.50338024",
"0.5026915",
"0.5020347",
"0.5015639",
"0.50145984",
"0.5012615",
"0.5011051",
"0.50101364",
"0.5004557",
"0.50037986",
"0.49962664",
"0.49910915",
"0.49894345",
"0.4982933",
"0.49801475",
"0.49743003",
"0.49691355",
"0.49644032",
"0.49643233",
"0.49551657",
"0.49531057",
"0.495026",
"0.49476257",
"0.4940911",
"0.49363413",
"0.49276564",
"0.4925974",
"0.49230364",
"0.49201035",
"0.49186844",
"0.4917776",
"0.49143195",
"0.49132732",
"0.49113086",
"0.49091035",
"0.49071825",
"0.4906427",
"0.49044913",
"0.48996854"
] | 0.0 | -1 |
Sorts the nodes by their index. | public void sort(final Collection<PNode> theNodes) {
// TODO complete this function as a supporter for the component spliter problem!
// Check for empty or null array
if (theNodes == null || theNodes.size() == 0) {
return;
}
this.nodes = (PNode[]) theNodes.toArray();
nodeLength = theNodes.size();
int id = 0;
PNode smallestNode = null;
boolean stopLoop = false;
while (true) {
if (nodeLength == id) {
break;
}
while (!stopLoop) {
stopLoop = false;
for (PNode node : nodes) {
if (smallestNode == null) {
smallestNode = node;
}
if (node.id < smallestNode.id) {
smallestNode = node;
stopLoop = true;
}
}
}
smallestNode.id += 1;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sortIndices() {\n sortImpl(this.indices, this.values, 0, this.indices.length - 1);\n }",
"void orderNodes(Comparator<N> comparator);",
"public void sort() {\n compares = 0;\n shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length);\n }",
"private void sort() {\n final Comparator<Slave> c = Comparator.comparing(Slave::getNodeName);\n this.slaves.sort(c);\n }",
"private void sort() {\n ObservableList<Node> workingCollection = FXCollections.observableArrayList(\n this.getChildren()\n );\n\n Collections.sort(workingCollection, new Comparator<Node>() {\n @Override\n public int compare(Node o1, Node o2) {\n CardView c1 = (CardView) o1;\n CardView c2 = (CardView) o2;\n return c1.getCard().compareTo(c2.getCard());\n }\n });\n\n this.getChildren().setAll(workingCollection);\n }",
"public void sortIntermediateNodes() {\n\t\tfor (FTNonLeafNode intermediateNode : intermediateNodes.values()) {\n\t\t\tdeclareBeforeUse(intermediateNode);\n\t\t}\n\t}",
"public void sortList() {\n Node3 current = front, index = null;\n student temp;\n\n if(front == null) {\n return;\n }\n else {\n while(current != null) {\n //Node index will point to node next to current\n index = current.getNext();\n\n while(index != null) {\n //If current node's data is greater than index's node data, swap the data between them\n if(current.getData().getRoll()> index.getData().getRoll()) {\n temp = current.getData();\n current.setData(index.getData());\n index.setData(temp);\n }\n index = index.getNext();\n }\n current = current.getNext();\n }\n }\n }",
"public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}",
"@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private static List<Widget> orderWidgetsByIndex(final List<Widget> widgets)\n {\n final List<Widget> sorted = new ArrayList<>(widgets);\n sorted.sort((a, b) -> ChildrenProperty.getParentsChildren(a).getValue().indexOf(a) -\n ChildrenProperty.getParentsChildren(b).getValue().indexOf(b));\n return sorted;\n }",
"public void sort()\n {\n\tstrack.sort((Node n1, Node n2) ->\n\t{\n\t if (n1.getCost() < n2.getCost()) return -1;\n\t if (n1.getCost() > n2.getCost()) return 1;\n\t return 0;\n\t});\n }",
"public void sort(){\n ListNode t, x, b = new ListNode(null, null);\n while (firstNode != null){\n t = firstNode; firstNode = firstNode.nextNode;\n for (x = b; x.nextNode != null; x = x.nextNode) //b is the first node of the new sorted list\n if (cmp.compare(x.nextNode.data, t.data) > 0) break;\n t.nextNode = x.nextNode; x.nextNode = t;\n if (t.nextNode==null) lastNode = t;\n }\n firstNode = b.nextNode;\n }",
"private Vector<Node> sortCodes()\n\t{\n\t\tVector<Node> nodes = new Vector<Node>();\n\t\tfor(int i = 0; i < prioQ.size(); i++)\n\t\t{\n\t\t\tNode n = new Node(prioQ.get(i).getData(),\n\t\t\t\t\tprioQ.get(i).getCount());\n\t\t\tnodes.add(n);\n\t\t}\n\t\n\t\tCollections.sort(nodes, new Comparator() {\n\t public int compare(Object o1, Object o2) {\n\t Integer x1 = ((Node) o1).getCount();\n\t Integer x2 = ((Node) o2).getCount();\n\t int sComp = x1.compareTo(x2);\n\n\t if (sComp != 0) {\n\t return sComp;\n\t } else {\n\t Integer a1 = ((Node) o1).getData();\n\t Integer a2 = ((Node) o2).getData();\n\t return a1.compareTo(a2);\n\t }\n\t }\n\t });\n\t\t\n\t\treturn nodes;\n\t}",
"public abstract List<TreeNode> orderNodes(List<? extends TreeNode> nodes);",
"entities.Torrent.NodeId getNodes(int index);",
"public void moveSort() {\r\n\t\trefX = 0;\r\n\t\tmoveSort(root);\r\n\t}",
"public List topologicalSort( Vertex startat ){\r\n return this.topologicalsorting.traverse( startat );\r\n }",
"void topologicalSort() {\n\n\t\tfor (SimpleVertex vertice : allvertices) {\n\n\t\t\tif (vertice.isVisited == false) {\n\t\t\t\tlistset.add(vertice.Vertexname);\n\t\t\t\ttopologicalSortUtil(vertice);\n\n\t\t\t}\n\t\t}\n\n\t}",
"public void treeOrder ()\n {\n treeOrder (root, 0);\n }",
"public long getNodeIndex();",
"protected List topologicalSort() {\r\n LinkedList order = new LinkedList();\r\n HashSet knownNodes = new HashSet();\r\n LinkedList nextNodes = new LinkedList();\r\n\r\n for (Iterator i = graph.getNodes().iterator(); i.hasNext(); ) {\r\n BBNNode node = (BBNNode) i.next();\r\n if (node.getChildren().size() == 0) {\r\n nextNodes.addAll(node.getParents());\r\n knownNodes.add(node);\r\n order.addFirst(node);\r\n }\r\n }\r\n\r\n while (nextNodes.size() > 0) {\r\n BBNNode node = (BBNNode) nextNodes.removeFirst();\r\n if (knownNodes.contains(node)) continue;\r\n\r\n List children = node.getChildren();\r\n if (knownNodes.containsAll(children)) {\r\n order.addFirst(node);\r\n nextNodes.addAll(node.getParents());\r\n knownNodes.add(node);\r\n }\r\n }\r\n return order;\r\n }",
"@Override\r\n\tpublic int compareTo(Object o) {\n\t\tNode other=(Node)o;\r\n\t\t\r\n\t\t\r\n\t\treturn this.getWeight()-other.getWeight();//正序,\r\n\t}",
"public final List<Node<N>> topologicalSort() {\n final TreeSet<Node<N>> sinks = new TreeSet<Node<N>>(this.getSinks());\n // initialise a map with the number of predecessors (value) for each node (key);\n final TreeMap<Node<N>, Integer> size = new TreeMap<Node<N>, Integer>();\n for (final Node<N> node : this.getNodes()) {\n size.put(node, this.getPredecessorNodes(node).size());\n }\n final List<Node<N>> sort = new ArrayList<Node<N>>();\n while (!sinks.isEmpty()) {\n final Node<N> node = sinks.pollFirst();\n sort.add(node);\n // updating of the set min by considering the successors of node\n for (final Node<N> successor : this.getSuccessorNodes(node)) {\n final int newSize = size.get(successor) - 1;\n size.put(successor, newSize);\n if (newSize == 0) {\n sinks.add(successor);\n }\n }\n }\n return sort;\n }",
"public static Node<Integer> sortUsingCounter(Node<Integer> root)\r\n\t{\r\n\t\tint[] cnt = new int[3];\t\r\n\t\tNode<Integer> curr = root;\t\t\r\n\t\twhile(curr != null)\r\n\t\t{\r\n\t\t\tcnt[curr.data] = cnt[curr.data] + 1;\t\r\n\t\t\tcurr = curr.next;\r\n\t\t}\r\n\t\t\r\n\t\tcurr = root;\r\n\t\tfor (int i =0 ;i <= 2;i++)\r\n\t\t{\r\n\t\t\tint count = cnt[i];\r\n\t\t\twhile(count != 0 && curr != null)\r\n\t\t\t{\r\n\t\t\t\tcurr.data = i;\r\n\t\t\t\tcount --;\r\n\t\t\t\tcurr = curr.next;\r\n\t\t\t}\r\n\t\t}\r\n \t\t\r\n\t\treturn root;\r\n\t}",
"@Override\r\n public int compare(Node x, Node y)\r\n {\n if (x.getD() < y.getD())\r\n {\r\n return -1;\r\n }\r\n else if (x.getD() > y.getD())\r\n {\r\n return 1;\r\n }\r\n return 0;\r\n }",
"io.netifi.proteus.admin.om.Node getNodes(int index);",
"private void SortListEdge(Node<E> gNode) {\n sort<E> eSort = new sort<>();\n eSort.QuickSortTraditionalMethodNonRecursion(gNode.Edges);\n }",
"public void topologicalSort() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\t\tStack<Vertex> stack = new Stack<Vertex>();\r\n\r\n\t\t// Call the helper function starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\ttopologicalSort(this.vertices[i], visited, stack);\r\n\r\n\t\twhile (!stack.isEmpty()) {\r\n\t\t\tSystem.out.print(stack.pop() + \" \");\r\n\t\t}\r\n\t}",
"public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n position1 = start;\n position2 = position1.previous;\n // Checks if previous is null and keeps swapping elements backwards till there\n // is an element that is bigger than the original element\n while (position2 != null && (position1.data < position2.data)) {\n swap(position1, position2);\n numberComparisons++;\n position1 = position2;\n position2 = position1.previous;\n }\n }\n }",
"public void sort() {\n documents.sort();\n }",
"private void updateOrder() {\n Arrays.sort(positions);\n }",
"public void topologicalSort() {\n\t\tboolean[] visited = new boolean[edges.length];\n\n\t\tfor (int i = 0; i < visited.length; i++) {\n\t\t\tif (visited[i] == false) {\n\t\t\t\tdfs(i, visited);\n\t\t\t}\n\t\t}\n\n\t}",
"public void radixSorting() {\n\t\t\n\t}",
"public void sort() {\n }",
"private void setup() {\r\n final int gsz = _g.getNumNodes();\r\n if (_k==2) {\r\n\t\t\tNodeComparator2 comp = new NodeComparator2();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t} else { // _k==1\r\n\t\t\tNodeComparator4 comp = new NodeComparator4();\r\n\t\t\t_origNodesq = new TreeSet(comp);\r\n\t\t}\r\n for (int i=0; i<gsz; i++) {\r\n _origNodesq.add(_g.getNodeUnsynchronized(i)); // used to be _g.getNode(i)\r\n }\r\n _nodesq = new TreeSet(_origNodesq);\r\n //System.err.println(\"done sorting\");\r\n }",
"void sortV();",
"private void reIndex()\n {\n for(int i = 0; i < NodeList.size(); i++)\n NodeList.get(i).setID(i);\n ID = NodeList.size();\n }",
"public void sort(){\r\n\t\t\t// we pass this doubly linked list's head to merge sort it\r\n\t\t\tthis.head = mergeSort(this.head);\r\n\t\t}",
"public void sortN(int n, int i) throws IOException{\n if((n&(MASK<<i))==0) //We shift our mask to match the position of interes\n {\n zero.writeInt(n);\n zeroCount++;\n }else{\n onePointer.writeInt(n);\n oneCount++;\n }\n }",
"private static void sortFriends() {\n friends.postValue(friends.getValue());\n }",
"public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }",
"public void topologicalSort() {\n\t\t\n\t\tvisited = new boolean[n];\n reverseDfs = new Stack<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (!visited[i]) {\n\t\t\t\tdfs(i);\n\t\t\t}\n\t\t}\n\t}",
"public void sort() {\n Collections.sort(jumpers, new SortJumperByPoints()); \n }",
"@Override\n\tpublic int compareTo(Node o) {\n\t\treturn (int) (this.value - o.value);\n\t}",
"private void sortLeaves() {\r\n\r\n\t\tboolean swapOccured;\r\n\r\n\t\tdo {\r\n\t\t\tswapOccured = false;\r\n\r\n\t\t\tfor(int index=0; index < this.treeNodes.length - 1; index++) {\r\n\t\t\t\tint currentLeaf = index;\r\n\t\t\t\tint nextLeaf = currentLeaf + 1;\r\n\t\t\t\tif(this.treeNodes[currentLeaf].getFrequency() > this.treeNodes[nextLeaf].getFrequency()) {\r\n\t\t\t\t\tswapLeaves(currentLeaf, nextLeaf);\r\n\t\t\t\t\tswapOccured=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(swapOccured);\r\n\t}",
"void sort();",
"void sort();",
"private void sortEntities(){\n for (int i = 1; i < sorted.size; i++) {\n for(int j = i ; j > 0 ; j--){\n \tEntity e1 = sorted.get(j);\n \tEntity e2 = sorted.get(j-1);\n if(getRL(e1) < getRL(e2)){\n sorted.set(j, e2);\n sorted.set(j-1, e1);\n }\n }\n }\n }",
"protected void sort() {\n\n\t\tCollections.sort(this.myRRList);\n\t}",
"private void sortRequiredVertices() {\n\t\tIterator<Integer> it = instance.getGraph().getVerticesIterator();\n\t\twhile (it.hasNext())\n\t\t\tsortRequiredVertices(it.next());\n\t}",
"public int compareTo(Node otherNode) { \r\n if (TotalDistance < otherNode.TotalDistance) {\r\n return -1;\r\n } else if (TotalDistance > otherNode.TotalDistance) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }",
"private static void sortEventsByTokenIndex(Row row) {\n Collections.sort(row.getEvents(), new Comparator<GridEvent>() {\n @Override\n public int compare(GridEvent o1, GridEvent o2) {\n if (o1 == o2) {\n return 0;\n }\n if (o1 == null) {\n return -1;\n }\n if (o2 == null) {\n return +1;\n }\n\n return ((Integer) o1.getLeft()).compareTo(o2.getLeft());\n }\n });\n }",
"public void topologicalSort() {\n HashMap<Integer, Integer> inDegrees = new HashMap<>();\n Queue<Integer> queue = new LinkedList<>();\n int numTotalNodes = 0;\n\n // Build the inDegree HashMap\n for (Entry<Integer, LinkedList<Edge<Integer>>> entry : g.adj.entrySet()) {\n LinkedList<Edge<Integer>> vList = entry.getValue();\n int currentVertex = entry.getKey();\n\n inDegrees.put(currentVertex, inDegrees.getOrDefault(currentVertex, 0));\n for (Edge<Integer> e : vList) {\n inDegrees.put(e.dest, inDegrees.getOrDefault(e.dest, 0) + 1);\n numTotalNodes++;\n }\n }\n\n // Add Elements with inDegree zero toe the queue\n for (int v : inDegrees.keySet()) {\n if (inDegrees.get(v) > 0)\n continue;\n queue.add(v);\n }\n\n int visitedNodes = 0;\n\n while (!queue.isEmpty()) {\n int v = queue.remove();\n System.out.print(v + \" \");\n for (int u : g.getNeighbors(v)) {\n int inDeg = inDegrees.get(u) - 1;\n if (inDeg == 0)\n queue.add(u);\n inDegrees.put(u, inDeg);\n }\n visitedNodes++;\n }\n\n if (visitedNodes != numTotalNodes) {\n System.out.println(\"Graph is not a DAG\");\n }\n }",
"private void sort() {\n Collections.sort(mEntries, new Comparator<BarEntry>() {\n @Override\n public int compare(BarEntry o1, BarEntry o2) {\n return o1.getX() > o2.getX() ? 1 : o1.getX() < o2.getX() ? -1 : 0;\n }\n });\n }",
"public static void bubbleSort() {\r\n\t\tfor(int i = nodeArrList.size() -1; i > 0; i--) {\r\n\t\t\tfor(int j = 0; j < i; j++) {\r\n\t\t\t\tif(nodeArrList.get(j).frequency > nodeArrList.get(j +1).frequency) {\r\n\t\t\t\t\tHuffmanNode temp = nodeArrList.get(j);\r\n\t\t\t\t\tnodeArrList.set(j, nodeArrList.get(j + 1));\r\n\t\t\t\t\tnodeArrList.set(j + 1, temp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }",
"public void sortElements(){\n\t\tgetInput();\n\t\tPeople[] all = countAndSort(people, 0, people.length-1);\n\t\t//PrintArray(all);\n\t\tSystem.out.println(InversionCount);\n\t}",
"public void listSort() {\n\t\tCollections.sort(cd);\n\t}",
"public void changeSortOrder();",
"public String doSort();",
"public void sort() {\n\t\tArrays.sort(contactList, 0, contactCounter);\n\t}",
"public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }",
"public OrderByNode() {\n super();\n }",
"public void alphabetize() {\n\t\t// write you code for alphabetize using the specifications above\n\t\tif (numElements==0){\n\t\t\treturn;\n\t\t}\n\t\tNode nodref = head;\n\t\tNode nodref1 = head.next;\n\t\tint count = 0;\n\t\tboolean x1 = false;\n\t\t\n\t\twhile(nodref!=null){\n\t\t\tnodref1=nodref.next;\n\t\t\tx1 = false;\n\t\t\twhile(nodref1!=null){\n\t\t\t\tint boo = nodref.data.compareTo(nodref1.data);\n\t\t\t\tSystem.out.println(this + \"\\n\" + nodref + \" \" + nodref1+ \" \" + boo +\"\\n\");\n\t\t\t\t\n\t\t\t\tif (boo>0){\n\t\t\t\t\tthis.add(nodref1.data);\n\t\t\t\t\tnumElements--;\n\t\t\t\t\tNode x = head;\n\t\t\t\t\tfor(int counter=0; counter<=count; counter++){\n\t\t\t\t\t\tx=x.next;\n\t\t\t\t\t}\n\t\t\t\t\tnodref.next = nodref.next.next;\n\t\t\t\t\tx1 = true;\n\t\t\t\t}\n\t\t\t\tnodref1 = nodref1.next;\n\t\t\t}\n\t\t\tSystem.out.println(count + \" \" + head + \" \" + x1);\n\t\t\tcount++;\n\t\t\tif(x1!=true){\n\t\t\t\tnodref = nodref.next;\n\t\t\t}\n\t\t\telse\n\t\t\t\tnodref = head;\n\t\t}\n\t}",
"@Test\n public void testSetSortNode() {\n writeBanner(getMethodName());\n }",
"public int compare(int index)\n\t{\n\t\tif (begin.getOffset() > index)\n\t\t\treturn -1 ;\n\t\telse if (end.getOffset() < index)\n\t\t\treturn 1 ;\n\t\telse\n\t\t\treturn 0 ;\n\t}",
"public static void sortEdges(LinkedList<Edge> edges){\n Collections.sort(edges, Comparator.comparingInt(Edge::getV_weight));\r\n }",
"@Override\n public int compare(Integer index1, Integer index2) {\n if (array[index1] < array[index2]) {\n return -1;\n } else if (array[index1] > array[index2]) {\n return 1;\n }\n return 0;\n }",
"public List<T> sort() {\n final ArrayList<Node<T>> L = new ArrayList<>();\n\n // S <- Set of all nodes with no incoming edges\n final HashSet<Node<T>> S = new HashSet<>();\n nodes.stream().filter(n -> n.inEdges.isEmpty()).forEach(S::add);\n\n // while S is non-empty do\n while (!S.isEmpty()) {\n // remove a node n from S\n final Node<T> n = S.iterator().next();\n S.remove(n);\n\n // insert n into L\n L.add(n);\n\n // for each node m with an edge e from n to m do\n for (Iterator<Edge<T>> it = n.outEdges.iterator(); it.hasNext();) {\n // remove edge e from the graph\n final Edge<T> e = it.next();\n final Node<T> m = e.to;\n it.remove(); // Remove edge from n\n m.inEdges.remove(e); // Remove edge from m\n\n // if m has no other incoming edges then insert m into S\n if (m.inEdges.isEmpty()) S.add(m);\n }\n }\n // Check to see if all edges are removed\n for (Node<T> n : nodes) {\n if (!n.inEdges.isEmpty()) {\n return die(\"Cycle present, topological sort not possible: \"+n.thing.toString()+\" <- [\"+n.inEdges.stream().map(e->e.from.thing.toString()).collect(Collectors.joining(\", \"))+\"]\");\n }\n }\n return L.stream().map(n -> n.thing).collect(Collectors.toList());\n }",
"public List topologicalSort( ){\r\n return this.topologicalsorting.traverse();\r\n }",
"void topologicalSort(Vertex vertex) {\n if (vertex.visited == false) {\n vertex.visited = true;\n for (Vertex neighbor : vertex.neighbors) {\n topologicalSort(neighbor);\n }\n stack.add(vertex);\n }\n }",
"@Override\n public int compareTo(Node<T> other) {\n if (this == other) {\n return 0;\n }\n\n return this.data.compareTo(other.data);\n }",
"private void sort() {\n\t\tCollections.sort(this.entities, comparator);\n\t}",
"public <T extends Comparable<T>> void sortList(int size) {\n\n Node<T> currentNode = (Node<T>) head;\n Node<T> nextNode = currentNode.next;\n\n for (int i = 0; i < size - 1; i++) {\n\n for (int j = 0; j < size - 1 - i ; j++) {\n\n if (currentNode.data.compareTo(nextNode.data) > 0) {\n T tempNode = currentNode.data;\n currentNode.data = nextNode.data;\n nextNode.data = tempNode;\n }\n\n nextNode = nextNode.next;\n\n }\n currentNode = currentNode.next;\n nextNode = currentNode.next;\n }\n }",
"public void treeSort() {\n MyTree tree = new MyTree((Comparable) array[0]);\n for (int i = 1; i < array.length; i++) {\n tree = MyTree.insert(tree, (Comparable) array[i]);\n }\n Object[] treeArray = MyTree.inorder(tree).toArray();\n for (int i = 0; i < array.length; i++) {\n array[i] = (T) treeArray[i];\n }\n\n }",
"public void sort () {\n\t\t\n\t\t// Clear iterator\n\t\titer = null;\n\t\t\n\t\tCollections.sort(this.pathObjects, new Comparator<PathObject>() {\n\t\t @Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t // -1 - less than, 1 - greater than, 0 - equal, all inversed for descending\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }\n\t\t});\n\t\t\n\t\titer = this.pathObjects.iterator();\n\t}",
"public int compareTo(Node other) {\n if (dist == other.dist)\n return label.compareTo(other.label);\n return Integer.compare(dist, other.dist);\n }",
"void topologicalSort() {\n Stack stack = new Stack();\n\n // Mark all the vertices as not visited\n Boolean visited[] = new Boolean[V];\n for (int i = 0; i < V; i++)\n visited [i] = false;\n\n // Call the recursive helper function to store Topological\n // Sort starting from all vertices one by one\n for (int i = 0; i < V; i++)\n if (visited [i] == false)\n topologicalSortUtil(i, visited, stack);\n\n // Print contents of stack\n while (stack.empty() == false)\n System.out.print(stack.pop() + \" \");\n }",
"public void sortSubstrateSwitch() {\n\t\tCollections.sort(this.listNode, new Comparator<SubstrateSwitch>() {\n\t\t\t@Override\n\t\t\tpublic int compare(SubstrateSwitch o1, SubstrateSwitch o2) {\n\n\t\t\t\tif (o1.getType() > o2.getType())\n\t\t\t\t\treturn -1;\n\t\t\t\tif (o1.getType() < o2.getType())\n\t\t\t\t\treturn 1;\n\t\t\t\tif (o1.getType() == o2.getType()) {\n\t\t\t\t\tif (o1.getCpu() < o2.getCpu()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (o1.getCpu() > o2.getCpu()) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t}",
"private void swap(int index1, int index2) {\n \t\tNode node1 = getNode(index1);\n \t\tNode node2 = getNode(index2);\n \t\tthis.contents.set(index1, node2);\n \t\tthis.contents.set(index2, node1);\n \t}",
"public void visit(Node node) {\n if (this.labelling[node.vertexIndex] == -1) {\n this.labelling[node.vertexIndex] = this.currentLabel;\n this.currentLabel++;\n }\n if (comparator != null) {\n Collections.sort(node.children, comparator);\n }\n for (Node child : node.children) {\n child.accept(this);\n }\n }",
"public int compare(Node n, Node m) {\n if (m.value > n.value){\n return -1;\n }\n else if (m.value < n.value){\n return 1;\n }\n else\n return 0;\n }",
"public String getIdxSearchSort() {\n Preferences prefs = getPreferences();\n return prefs.get(PROP_SEARCH_SORT, \"A\"); // NOI18N\n }",
"public void sortPageList()\r\n {\r\n if (log.isDebugEnabled())\r\n {\r\n log.debug(\"[\" + this.id + \"] sorting page list\");\r\n }\r\n sortRowList(this.getRowListPage());\r\n\r\n }",
"public static void sort(Comparable[] pq) {\n int n = pq.length;\n \n /*\n * Fill in this method! Use the code on p. 324 of the book as a model,\n * but change it so each node in the heap has 3 children instead of 2.\n */\n }",
"public Integer getSortIndex() {\r\n return sortIndex;\r\n }",
"public static Node<Integer> sort(Node<Integer> root)\r\n\t{\r\n\t\t// No nodes or single node present no sorting required.\r\n\t\tif (root == null || root.next == null)\r\n\t\t{\r\n\t\t\treturn root;\r\n\t\t}\r\n\t\t\r\n\t\tNode<Integer> sortedRoot = null,\r\n\t\tzeroPointerTail = null, zeroPointerHead = null,\r\n\t\tonePointerTail = null, onePointerHead = null,\r\n\t\ttwoPointerTail = null, twoPointerHead = null;\r\n\t\t\r\n\t\twhile (root != null)\r\n\t\t{\t\r\n\t\t\tif (root.data == 0)\r\n\t\t\t{\r\n\t\t\t\tzeroPointerTail = unlinkOrigNode(zeroPointerTail,root);\t\t\r\n\t\t\t\tzeroPointerHead = zeroPointerHead != null ? zeroPointerHead : zeroPointerTail;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (root.data == 1)\r\n\t\t\t{\r\n\t\t\t\tonePointerTail = unlinkOrigNode(onePointerTail,root);\t\r\n\t\t\t\tonePointerHead = onePointerHead != null ? onePointerHead : onePointerTail;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (root.data == 2)\r\n\t\t\t{\r\n\t\t\t\ttwoPointerTail = unlinkOrigNode(twoPointerTail,root);\r\n\t\t\t\ttwoPointerHead = twoPointerHead != null ? twoPointerHead : twoPointerTail;\r\n\t\t\t}\t\r\n\t\t\troot = root.next;\r\n\t\t}\r\n\t\t\r\n\t\tzeroPointerTail.next = onePointerHead;\r\n\t\tonePointerTail.next = twoPointerHead;\r\n\t\r\n\t\tsortedRoot = \r\n\t\t\tzeroPointerHead != null ? \r\n\t\t\t\tzeroPointerHead :\r\n\t\t\t\t(onePointerHead != null ? \r\n\t\t\t\t\tonePointerHead :\r\n\t\t\t\t\ttwoPointerHead);\r\n\t\treturn sortedRoot;\r\n\t}",
"private static void changeSubjectOrder(ArrayList<Integer> index_order) {\n for(Subject subject: subjects) {\n subject.setIndex(index_order.indexOf(subject.getIndex()));\n }\n }",
"public void sortAllRows(){\n\t\t/* code goes here */ \n\t\t\n\t\t\n\t\t//WHY SHOULD THEY BE SORTED LIKE THE EXAMPLE SAYS???????\n\t\t\n\t}",
"void topologicalSort(){ \n Stack<Integer> stack = new Stack<Integer>(); \n \n // Mark all the vertices as not visited \n boolean visited[] = new boolean[V]; \n for (int i = 0; i < V; i++) \n visited[i] = false; \n \n // Call the recursive helper function to store Topological Sort starting from all vertices one by one \n for (int i = 0; i < V; i++) \n if (visited[i] == false) \n topologicalSortUtil(i, visited, stack); \n \n // Print contents of stack \n while (stack.empty()==false) \n System.out.print(stack.pop() + \" \"); \n }",
"public int compareTo(Node k){\n Integer thisValue = this.number;\n Integer otherValue = k.getNumber();\n return thisValue.compareTo(otherValue);\n }",
"static int[] topoSort(int V, ArrayList<ArrayList<Integer>> adj)\n {\n int indegree[] = new int[V];\n for(ArrayList<Integer> v : adj){\n for(Integer c : v){\n indegree[c]++;\n }\n }\n Queue<Integer> q = new LinkedList();\n for(int i=0;i<V;i++){\n if(indegree[i]==0){\n q.add(i);\n }\n }\n List<Integer> top = new ArrayList();\n int c = 0;\n while (!q.isEmpty()){\n Integer node = q.poll();\n top.add(node);\n c++;\n for(int child : adj.get(node)){\n indegree[child]--;\n if(indegree[child]==0){\n q.add(child);\n }\n }\n }\n if(c==V){\n int ans[] = new int[top.size()];\n for(int i=0;i<top.size();i++){\n ans[i] = top.get(i);\n }\n return ans;\n }\n// System.out.println(\"Cycle exists\");\n return null;\n }",
"private void sortByX() {\n\t\tCollections.sort(pointList, getXComparator());\n\t}",
"public int compare(int a, int b) {\n //System.err.println(\"compare \" + a + \" with \" + b);\n return comparer.compare((NodeInfo)sequence.itemAt(a),\n (NodeInfo)sequence.itemAt(b));\n }",
"public Integer getSortindex() {\n return sortindex;\n }",
"public static int[] indexSort(Comparable[] a){\n int N=a.length;\n int[] index=new int[N];\n for(int i=0;i<N;i++)\n index[i]=i;\n int[] aux=new int[N];\n sort(a,index,aux,0,N-1);\n return index;\n }",
"public void jsort() {\n\tArrays.sort(data);\n }",
"public abstract void sort() throws RemoteException;",
"private void sortArticleByViews() {\n final DatabaseReference database;\n database = FirebaseDatabase.getInstance().getReference();\n\n database.child(\"Views\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Map<Integer,ArrayList<Article>> articlesTreeMap;\n articlesTreeMap = new TreeMap<>(Collections.reverseOrder());\n for(Article a : articles) {\n DataSnapshot viewArticleSnapShot = null;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if (a.getLink() != null && a.getLink() != \"\" && snapshot.child(\"Link\").getValue().equals(a.getLink())) {\n viewArticleSnapShot = snapshot;\n break;\n }\n }\n int views = 0;\n if (viewArticleSnapShot != null) {\n views = Integer.parseInt(viewArticleSnapShot.child(\"Count\").getValue().toString());\n }\n if(!articlesTreeMap.containsKey(views)) {\n articlesTreeMap.put(views, new ArrayList<Article>());\n }\n articlesTreeMap.get(views).add(a);\n }\n\n articles.clear();\n for(Map.Entry<Integer,ArrayList<Article>> entry : articlesTreeMap.entrySet()) {\n ArrayList<Article> list = entry.getValue();\n articles.addAll(list);\n }\n mSectionsPagerAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(DatabaseError d) {\n Log.d(\"Login DbError Msg ->\", d.getMessage());\n Log.d(\"Login DbError Detail ->\", d.getDetails());\n }\n });\n }",
"public void SortByPrice() {\n for (int i = 1; i < LastIndex; i++) {\n int x = i;\n while (x >= 1) {\n if (ForChild[x - 1].getPrice() > ForChild[x].getPrice()) {\n Confectionery sweets = ForChild[x - 1];\n ForChild[x - 1] = ForChild[x];\n ForChild[x] = sweets;\n\n }\n x -= 1;\n }\n }\n }"
] | [
"0.6724477",
"0.6685008",
"0.6548342",
"0.64317197",
"0.62294775",
"0.61837023",
"0.6148574",
"0.59560126",
"0.5939735",
"0.59365857",
"0.5910011",
"0.59021336",
"0.58808994",
"0.5843028",
"0.5807833",
"0.58008176",
"0.5774695",
"0.5771916",
"0.57518953",
"0.5741561",
"0.5730034",
"0.57099813",
"0.56322646",
"0.562367",
"0.557214",
"0.5568204",
"0.5561155",
"0.5555818",
"0.5551483",
"0.5545244",
"0.5506824",
"0.5494523",
"0.5477049",
"0.54723185",
"0.546815",
"0.54666257",
"0.5447161",
"0.5445517",
"0.54354936",
"0.54327214",
"0.54281133",
"0.5365452",
"0.5364613",
"0.5354428",
"0.53540397",
"0.5351454",
"0.5351454",
"0.5342701",
"0.5326458",
"0.5323277",
"0.5319738",
"0.53014445",
"0.5301215",
"0.5300629",
"0.5295802",
"0.52861464",
"0.52859753",
"0.5283971",
"0.5276919",
"0.5275705",
"0.52756584",
"0.52749527",
"0.5274061",
"0.52711296",
"0.5267047",
"0.5265213",
"0.5264733",
"0.5255366",
"0.5247399",
"0.5245917",
"0.5240998",
"0.52373874",
"0.5230834",
"0.5229631",
"0.5227276",
"0.52186674",
"0.52113837",
"0.5210611",
"0.52102077",
"0.51912326",
"0.51813084",
"0.51714724",
"0.5163723",
"0.5163002",
"0.515887",
"0.5149573",
"0.514955",
"0.5135887",
"0.5115305",
"0.5111984",
"0.51090235",
"0.51010203",
"0.51006466",
"0.50953716",
"0.5089284",
"0.508757",
"0.5080768",
"0.5072638",
"0.5066362",
"0.506221"
] | 0.57426894 | 19 |
TODO Autogenerated method stub | public static void main(String[] args) {
try {
// get URL string from command line or use default
String urlString;
if(args.length>0) urlString=args[0];
else urlString="https://www.oracle.com/technetwork/java/index.html";
// open reader for URL
InputStreamReader in=new InputStreamReader(new URL(urlString).openStream());
// read contents into string builder
StringBuilder input=new StringBuilder();
int ch;
while((ch=in.read())!=-1) {
input.append((char)ch);
}
// search for all occurrences of pattern
String patternString="<a\\s+href\\s*=\\s*(\"[^\"]*\"|[^\\s>]*)\\s*>";
Pattern pattern=Pattern.compile(patternString,Pattern.CASE_INSENSITIVE);
Matcher matcher=pattern.matcher(input);
while(matcher.find()) {
int start=matcher.start();
int end=matcher.end();
String match=input.substring(start-end);
System.out.println(match);
}
} catch (IOException e) {
// TODO: handle exception
e.printStackTrace();
}catch (PatternSyntaxException e) {
// TODO: handle exception
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
React to state change | @Override
public void onStateChanged(@NonNull View bottomSheet, int newState) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void stateChanged(STATE state);",
"@Override\n\tpublic void stateChanged() {\n\t\t\n\t}",
"public void updateState();",
"protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"abstract public void updateState();",
"@Override\n\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t}",
"void changed(State state, Exception e);",
"public void stateChanged(ChangeEvent e) {\n }",
"public void stateChanged( ChangeEvent event )\n {\n \n }",
"@Override\r\n public void stateChanged(ChangeEvent e) {\n }",
"public void stateChanged (ChangeEvent e)\n {\n }",
"public void stateChanged(ChangeEvent e) {\n isChanged = true;\n refreshComponents();\n }",
"void setState(int state);",
"public void setState(State newState) {this.state = newState;}",
"void stateChanged( final GameState oldState, final GameState newState );",
"protected abstract int newState();",
"public void setState(int state);",
"public void setState(int state);",
"public void updateState(boolean state);",
"void update( State state );",
"void currentStateChanged();",
"public void stateChanged(ChangeEvent event)\r\n {\r\n fireChangeEvent(event);\r\n }",
"void setState(Object sender, ConditionT condition, Params params, StateT state);",
"@Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n }",
"public void setState(State state) { model.setState(state); }",
"void stateUpdate(String msg);",
"@Override\n protected void incrementStates() {\n\n }",
"void setState(Object state);",
"long getStateChange();",
"public void stateChanged(ChangeEvent e) {\n\t\tupdatePits();\n\t\tSystem.out.println(\"Player 0 score: \" + model.getMancalas()[0]);\n\t\tSystem.out.println(\"Player 1 score: \" + model.getMancalas()[1]);\n\t\tleftScore.setText( Integer.toString(model.getMancalas()[1]));\n\t\trightScore.setText( Integer.toString(model.getMancalas()[0]));\n\t\tSystem.out.println(\"It is now player: \" + model.getPlayer() + \"'s turn\");\n\t\t\n\t}",
"@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}",
"@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}",
"@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}",
"@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}",
"Update withState(String state);",
"void setState(State state);",
"@Override\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case Constants.MESSAGE_STATE_CHANGE:\n\n break;\n\n }\n }",
"@Override\r\n\tpublic void updateState(int id, int state) {\n\t}",
"protected void changeStatus(String state)\n { call_state=state;\n printLog(\"state: \"+call_state,Log.LEVEL_MEDIUM); \n }",
"protected synchronized void setChanged() {\n changed = true;\n }",
"private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}",
"@Override\n\tpublic void adjust() {\n\t\tstate = !state;\n\t}",
"@Override\n\tpublic void setState(STATE state) {\n\n\t}",
"void setState(String state);",
"public void getState();",
"public void update(String state) {\n\t\tSystem.out.println(\"收到状态---\"+state);\n\t\tthis.state = state;\n\t}",
"private void setState(State newState) {\n state = newState;\n switch (newState) {\n case IDLE:\n toggleReco.setText(\"Tap to speak.\");\n break;\n case LISTENING:\n toggleReco.setText(getResources().getString(R.string.listening));\n break;\n case PROCESSING:\n toggleReco.setText(getResources().getString(R.string.processing));\n break;\n }\n }",
"void setState(boolean state);",
"public void setState(String state);",
"public void changeState(ClientStateName clientStateName)\n {\n this.currentState = clientStateName;\n setChanged();\n notifyObservers(currentState);\n }",
"@Override\n public void setState(String s)\n {\n state = s;\n nbChanges++;\n }",
"private void setState( int state )\n {\n m_state.setState( state );\n }",
"protected void stateChanged(final SpacecraftState state) {\n final AbsoluteDate date = state.getDate();\n final boolean forward = date.durationFrom(getStartDate()) >= 0.0;\n for (final DoubleArrayDictionary.Entry changed : state.getAdditionalStatesValues().getData()) {\n final TimeSpanMap<double[]> tsm = unmanagedStates.get(changed.getKey());\n if (tsm != null) {\n // this is an unmanaged state\n if (forward) {\n tsm.addValidAfter(changed.getValue(), date, false);\n } else {\n tsm.addValidBefore(changed.getValue(), date, false);\n }\n }\n }\n }",
"@Override\r\n\tpublic void updateState() {\r\n\t\tState<A> result = null;\r\n\t\tif(events.size() > 0){\r\n\t\t\tfor(Event<A> a : events){\r\n\t\t\t\tstate = (result = state.perform(this,a)) == null ? state : result;\r\n\t\t\t}\r\n\t\t\tevents.removeAllElements();\r\n\t\t}\r\n\t\tstate = (result = state.perform(this, null)) == null ? state : result;\r\n\t\trequestInput();\r\n\t\t\r\n\t}",
"public void stateChanged(ChangeEvent e)\r\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGridView.showWalkTiles(showWalkTilesButton.isSelected());\r\n\t\t\t\t\t}",
"public void stateChanged(ChangeEvent e) {\n\t\tif (!_receive) {\r\n\t\t\t// jesli nastapila zmiana na suwaku nastepuej odczyt wart z\r\n\t\t\t// wszystkich suwakow, utworzenie koloru i umieszczenie go w kolejce\r\n\t\t\tColor col = new Color(canvas.getBackground().getRed(), canvas.getBackground().getGreen(),\r\n\t\t\t\t\tcanvas.getBackground().getBlue());\r\n\t\t\tColorQueue.getInstance().putColor(col);\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}",
"public abstract void setState(String sValue);",
"@Override\n\t\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t\tif (!updating && button.isSelected()) {\n\t\t\t\t\t\tmodel.set(db);\n\t\t\t\t\t}\n\t\t\t\t\tif (!useRadioButtons) {\n\t\t\t\t\t\tlabel.setForeground(button.isSelected() ? selectedForeground : unselectedForeground);\n\t\t\t\t\t}\n\t\t\t\t}",
"public void stateChanged (ChangeEvent event)\n {\n ((GroupItem)gbox.getSelectedItem()).configChanged();\n }",
"public void update(){\r\n\r\n // update curState based on inputs\r\n // Perform state-transition actions \r\n switch(curState) {\r\n${nextstatecases}\r\n default:\r\n reset();\r\n break;\r\n }",
"public void changeState() {\n if (!isDead) {\n Bitmap temp = getBitmap();\n setBitmap(stateBitmap);\n stateBitmap = temp;\n }\n }",
"public synchronized void setChanged() {\n super.setChanged();\n }",
"public void updateState(String key, Object value)\n {\n stateChangeRequest(key, value);\n }",
"private void stateChange(int state) {\n Log.d(TAG, String.format(\"stateChange: %d ++++\", state));\n\n if (mCurrentSyncRequest != null) {\n if (state <= SyncListener.SYNC_STATE_SUCCESS) {\n switch (state) {\n case SyncListener.SYNC_STATE_SUCCESS:\n mCurrentSyncRequest\n .notifyState(SyncRequest.SyncNotify.SYNC_STATE_SUCCESS);\n /*\n * we'll not update the version on\n * SyncRequest.CHECK_RESTORE_RESULT to avoid saving an\n * unbackuped version.\n */\n if (mCurrentSyncRequest.mSyncType != SyncRequest.CHECK_RESTORE_RESULT) {\n SyncService.ContactsChecker.getInstance(mService)\n .updateVersion();\n }\n break;\n case SyncListener.SYNC_STATE_ERROR:\n mCurrentSyncRequest\n .notifyState(SyncRequest.SyncNotify.SYNC_STATE_ERROR);\n break;\n case SyncListener.SYNC_STATE_SUCCESS_DONOTHING:\n mCurrentSyncRequest\n .notifyState(SyncRequest.SyncNotify.SYNC_STATE_SUCCESS_DONOTHING);\n break;\n default:\n break;\n }\n mIsSyncing = false;\n mSyncRequestQueue.completeRequest(mCurrentSyncRequest);\n mCurrentSyncRequest = null;\n /*sync next*/\n syncNext();\n }\n } else {\n Log.e(TAG, \"receive state change while the current request is null\");\n }\n Log.d(TAG, \"stateChange -----\");\n }",
"public void stateChanged() {\r\n if (nextBigStepButton != null) {\r\n nextBigStepButton.setEnabled(!automata.isAtEnd());\r\n }\r\n if (prevBigStepButton != null) {\r\n prevBigStepButton.setEnabled(!automata.isAtStart());\r\n }\r\n\r\n nextStepButton.setEnabled(!automata.isAtEnd());\r\n prevStepButton.setEnabled(!automata.isAtStart());\r\n restartButton.setEnabled(!automata.isAtStart());\r\n\r\n autoButton.setState(controller.getExecutionMode());\r\n autoButton.setEnabled(!automata.isAtEnd());\r\n }",
"@Override\r\n\tpublic void config() {\n\t\tinter.setState(inter.getConfig());\r\n\t}",
"void onChange( T newValue );",
"@Override\n public void onChanged() {\n }",
"protected void setState(int value) {\r\n\t\tdState = value;\r\n\t\tstateChanged();\r\n\t\t\r\n\t\t// System debug\r\n\t\tSystem.out.println(\"State changed: \" + STATUS[dState]);\r\n\t}",
"public void stateChanged(ChangeEvent e)\r\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGridView.showNogoTiles(showNogoTilesButton.isSelected());\r\n\t\t\t\t\t}",
"@Override\n public void onRestate() {\n }",
"public void stateChanged(ChangeEvent e) {\n\n (model.getInterpol()).setBezierIterationen(((JSlider) e.getSource()).getValue());\n }",
"private void changed() {\n // Ok to have a race here, see the field javadoc.\n if (!changed)\n changed = true;\n }",
"public void setState(final State state);",
"void changeState(Spreadable spreadable, State from, State to, int count);",
"@Override\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tsuper.onChange(selfChange);\n\t\t}",
"public void changeState()\r\n\t{\r\n\t\tfailedNumber=0;\r\n\t\tif(state.equalsIgnoreCase(\"IN PREPARATION\"))\r\n\t\t\tsetState(\"IN TRANSIT\");\r\n\t\telse if(state.equalsIgnoreCase(\"IN TRANSIT\"))\r\n\t\t{\r\n\t\t\tfailedNumber=Math.random();\r\n\t\t\tif(failedNumber<=0.2) setState(\"FAILED\");\r\n\t\t\telse setState(\"RECEIVED\");\r\n\t\t}\r\n\t}",
"public abstract void updateState(ENodeState state);",
"@Override\n public void updateState(Perception p) {\n \n //TODO: Complete Method\n }",
"public void setModified(boolean state) {\n //System.out.println(\"setting modified to \" + state);\n //new Exception().printStackTrace();\n current.setModified(state);\n calcModified();\n }",
"public void markChanged()\n \t{\n \t\tbChanged=true;\n \t}",
"@Override\n public void onChange(boolean selfChange) {\n onChange(selfChange, null);\n }",
"void beforeState();",
"public interface StateChangeListener {\n public void onStateChange(int oldState, int newState);\n}",
"private void setState(State newState) {\n mStateStartTime = System.currentTimeMillis();\n\n // Update the UI with the name of the current state\n mCurrentStateTextView.setText(newState.name());\n\n // Opportunity to do stuff when a new state is set.\n switch (newState) {\n case READY:\n break;\n case RUNNING_A_SCRIPT:\n runScript();\n break;\n case SEEKING_HOME:\n break;\n case SUCCESS:\n break;\n }\n mState = newState;\n }",
"@Override protected void setState(State s) {\n session.setState(s);\n super.setState(s);\n }",
"public IServerState changeState(ServerEvents serverEvent);",
"@Override\n\tpublic void setChanged() {\n\t\tthis.changed = true;\n\t}",
"@Override\n public void setChanged() {\n set(getItem());\n }",
"public void stateChanged(SensorPort arg0, int arg1, int arg2) {\n\t\t\n\t}",
"public void stateChanged(ChangeEvent e)\n {\n simulation.setSpeed(speedSlider.getValue());\n }",
"public final synchronized void setChanged() {\n\t\tsuper.setChanged ();\n }",
"public interface OnStateChangeListener {\n void onStateChange(boolean active);\n }",
"public void stateChanged(ChangeEvent param1ChangeEvent) {\n/* 1503 */ if (param1ChangeEvent == null) {\n/* 1504 */ throw new NullPointerException();\n/* */ }\n/* 1506 */ firePropertyChange(\"AccessibleVisibleData\", \n/* 1507 */ Boolean.valueOf(false), \n/* 1508 */ Boolean.valueOf(true));\n/* */ }",
"void stateSelected(State state);",
"protected void changeValue() {\n \tif(value == null)\n \t\tvalue = true;\n \telse if(!value) { \n \t\tif (mode == Mode.THREE_STATE)\n \t\t\tvalue = null;\n \t\telse\n \t\t\tvalue = true;\n \t}else\n \t\tvalue = false;\n \t\n \tsetStyle();\n \t\n \tValueChangeEvent.fire(this, value);\n }",
"protected void updateState(IParticleSystemState state) {\n this.state = state;\n }",
"public void stateChanged(ChangeEvent e){\n\n\t\t Component selected = fTabs.getSelectedComponent();\n\n\t\t if (selected == fConnective) {\n\t\t if (!fConnectiveRunning) {\n\t\t fConnective.run();\n\t\t fConnectiveRunning = true;\n\t\t }\n\t\t }\n\t\t else {\n\t\t if (selected == fTT) {\n\t\t if (!fTTRunning) {\n\t\t fTT.run();\n\t\t fTTRunning = true;\n\t\t }\n\t\t }\n\t\t else {\n\t\t if (selected == fSatis) {\n\t\t if (!fSatisRunning) {\n\t\t fSatis.run();\n\t\t fSatisRunning = true;\n\t\t }\n\n\t\t }\n\t\t else {\n\t\t if (selected == fCons) {\n\t\t if (!fConsRunning) {\n\t\t fCons.run();\n\t\t fConsRunning = true;\n\t\t }\n\n\t\t }\n\t\t else {\n\t\t if (selected == fInvalid) {\n\t\t if (!fInvalidRunning) {\n\t\t fInvalid.run();\n\t\t fInvalidRunning = true;\n\t\t }\n\n\t\t }\n\t\t else {\n\t\t if (selected == fFinishPanel) {\n\t\t \trefreshFinishPanel();\n\t\t \n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t}",
"private void updateState() {\n\t while(!isGoodState()) {\n\t\t updateStateOnce();\n\t }\n }"
] | [
"0.7640883",
"0.75034285",
"0.73792136",
"0.7274405",
"0.7243841",
"0.7236525",
"0.7137217",
"0.7123092",
"0.71131146",
"0.7106299",
"0.7065245",
"0.706245",
"0.70414823",
"0.6923407",
"0.68358827",
"0.6804058",
"0.6795121",
"0.6761252",
"0.6761252",
"0.6734164",
"0.6729744",
"0.67258245",
"0.67181355",
"0.6711995",
"0.6702504",
"0.6698161",
"0.6683763",
"0.66825897",
"0.66740936",
"0.66019183",
"0.6595216",
"0.6586615",
"0.6586615",
"0.6586615",
"0.6586615",
"0.65518785",
"0.65491396",
"0.65407354",
"0.6512142",
"0.65002215",
"0.64856994",
"0.6485167",
"0.6476335",
"0.647536",
"0.6466316",
"0.6428868",
"0.64068323",
"0.6405686",
"0.63968885",
"0.6386056",
"0.63802654",
"0.6378653",
"0.63629395",
"0.63297814",
"0.6327929",
"0.63238746",
"0.6308009",
"0.6270219",
"0.6261766",
"0.62598085",
"0.62489986",
"0.62368447",
"0.6232963",
"0.62202674",
"0.62186646",
"0.6213452",
"0.62098575",
"0.62095714",
"0.62038517",
"0.62038255",
"0.6196876",
"0.6192896",
"0.6192592",
"0.61910045",
"0.61826503",
"0.6182324",
"0.6178716",
"0.6176949",
"0.61754566",
"0.6167497",
"0.6160268",
"0.6158803",
"0.61580867",
"0.61577374",
"0.61362505",
"0.6129506",
"0.61247444",
"0.6124532",
"0.61216587",
"0.6117221",
"0.61101353",
"0.610901",
"0.6107891",
"0.6107191",
"0.6084113",
"0.60789627",
"0.607756",
"0.60691494",
"0.606348",
"0.60536927",
"0.60510945"
] | 0.0 | -1 |
React to dragging events | @Override
public void onSlide(@NonNull View bottomSheet, float slideOffset) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onDragged();",
"public void mouseDragged(MouseEvent e) {}",
"public void mouseDragged(MouseEvent e){}",
"public void mouseDragged (MouseEvent e) {}",
"public void mouseDragged( MouseEvent event ){}",
"public void mouseDragged(MouseEvent event) { }",
"@Override\r\n public void mouseDragged(MouseEvent e) {\n }",
"@Override\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t}",
"@Override\n public void mouseDragged(MouseEvent e) {\n\n }",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"public void mouseDragged(MouseEvent e) {\n }",
"@Override\n public void mouseDragged(MouseEvent arg0) {\n \n }",
"@Override\n \tpublic void mouseDragged(MouseEvent e) {\n \t}",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\n\t\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\r\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\n\r\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\n\t}",
"public void mouseDragged(MouseEvent e)\n {}",
"public void mouseDragged( MouseEvent e ) {\n }",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n public void mouseDragged(java.awt.event.MouseEvent e) {\n }",
"public void mouseDragged(MouseEvent e) {\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t}",
"public void mouseDragged(MouseEvent e) {\n\n }",
"@Override\n\t\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\t\n\t\t}",
"public void mouseDragged(MouseEvent e) {\n\t\t\n\t}",
"@Override\n public void drag(int x, int y)\n {\n }",
"protected abstract boolean dragged();",
"public void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"public void mouseDragged(MouseEvent e) {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent arg0) {\n\r\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\r\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tco.mouseDragged(e);\n\t}",
"public abstract void mouseDragged(MouseDraggedEvent mp);",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0) {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void mouseDragged(MouseEvent arg0) {\n\r\n\t\t\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent arg0)\n\t{\n\t\t\n\t}",
"void mouseDragged(double x, double y, MouseEvent e );",
"public void mouseDragged(MouseEvent e) {\n\t \t\t\n\t \t}",
"public void mouseDragged(MouseEvent event)\n\t\t{}",
"@Override\n public void onDragStarted(int position) {\n }",
"public void mouseDragged(MouseEvent event) {\n painterJPanelMouseDragged(event);\n }",
"public void mouseDragged(MouseEvent mEvent) \n {\n /* don't do anything while game is running */\n if(GAME_RUNNING)\n return;\n\n /* TODO: remove debug msg */\n statusMsg = new String(\"mouseDragged @ \" + mEvent.getX() + \", \" + mEvent.getY() + \" on \" + mEvent.getComponent().getClass().getName());\n\n if(mEvent.getComponent() instanceof GameCanvas)\n {\n /* handle mouse dragging on gamecanvas while game is not running */\n switch(SELECT_MODE)\n {\n //=================\n case NONE:\n case SELECTED:\n /* mouse is being dragged but we aren't in drag mode, did this drag start on an unlocked widget? */\n Widget startWidget = timWorld.grabWidget(pressX,pressY); //TODO: add a flag/check so we don't have to continually try to grab in case of failure\n if(startWidget != null && startWidget.isLocked() == false)\n {\n /* mouse dragging started over an unlocked widget, pick it up and begin dragging */\n selectedWidget = startWidget;\n SELECT_MODE = SelectMode.DRAGGING;\n DRAG_TYPE = DragType.PRESS;\n \n clickOffsetX = selectedWidget.getPosition().getX() - pressX;\n clickOffsetY = selectedWidget.getPosition().getY() - pressY;\n \n canvas.repaint();\n }\n break;\n //=================\n case DRAGGING:\n case ADDING:\n /* update mouseX and mouseY for bounding box drawing of the widget being dragged or added */\n mouseX = mEvent.getX();\n mouseY = mEvent.getY();\n canvas.repaint();\n break;\n }\n }\n else if(mEvent.getComponent() instanceof WidgetScroller)\n {\n /* dragging on widget scroller */\n\n /* make sure we aren't already in adding or dragging mode */\n if(SELECT_MODE != SelectMode.ADDING)\n {\n String pressedWidget = ws.getWidgetAt(pressX, pressY);\n if(pressedWidget != null)\n {\n /* pressed on an actual widget, create an instance of it and commence dragging */\n \n // TODO: check for nulls\n addedWidget = pressedWidget;\n selectedWidget = WidgetFactory.createWidget(pressedWidget);\n SELECT_MODE = SelectMode.ADDING;\n DRAG_TYPE = DragType.PRESS;\n\n /* set widget to 0,0 so its boundary will be drawn properly while dragging */\n selectedWidget.setPositionX(0.0f);\n selectedWidget.setPositionY(0.0f);\n\n clickOffsetX = 0;\n clickOffsetY = 0;\n\n canvas.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));\n\n /* TODO: remove debug msg */\n //System.out.println(\"Picked up \" + pressedWidget + \" from widgetscroller\");\n }\n }\n else\n {\n mouseX = mEvent.getX();\n mouseY = mEvent.getY() + 465;\n canvas.repaint();\n }\n }\n\t}",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\n\t\tmouseClicked(e);\n\t\t\n\t}",
"public boolean onDragStarted();",
"public void mouseDragged(MouseEvent e) {\r\n redispatchMouseEvent(e);\r\n }",
"public void mouseDragged(MouseEvent e) {\n if (mouseDraggedCmd != null) {\n mouseDraggedCmd.execute();\n }\n }",
"@Override\r\n\tpublic void mouseDragged(MouseEvent me) {\r\n\t\tdrag(me.getX(), me.getY());\r\n\t}",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\r\n\t\tLOG.fine(\"Dragged [\" + e.getX() + \", \" + e.getY() + \"]...\");\r\n\t\t\r\n\t\tif (shapeManipulator != null) {\r\n\t\t\tshapeManipulator.mouseDragged(e);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void nativeMouseDragged(NativeMouseEvent e) {\n\t\t\n\t}",
"@Override\n\tpublic void mouseDragged(int arg0, int arg1, int arg2, int arg3) {\n\n\t}",
"@DISPID(-2147412077)\n @PropGet\n java.lang.Object ondragstart();",
"@Override\n \tpublic void roiDragged(ROIEvent evt) {\n \t\t\n \t}",
"public void onDragEnded();",
"public synchronized void mouseDragged(MouseEvent event) {\n if (_pressedCard != null) {\n _display.drag(event.getX(), event.getY(), _pressedCard);\n }\n _display.repaint();\n }",
"@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tdx=dx+(e.getX()-x);\n\t\tdy=dy+(e.getY()-y);\n\t\t\n\t\tx=e.getX();\n\t\ty=e.getY();\n\t}",
"void dragDetected(DragDetectEvent e);",
"public void mouseDragged(MouseEvent me) {\n\n\t\t\t}",
"@Override\n public void componentMoved(ComponentEvent e)\n {\n \n }",
"@DISPID(-2147412077)\n @PropPut\n void ondragstart(\n java.lang.Object rhs);",
"void onDragStart(View view);",
"public void mouseDragged (MouseEvent e) { if(task!=null) task.mouseDragged(e); }",
"@FXML\n private void mouseDown(MouseEvent event) {\n preDragX = event.getX();\n preDragY = event.getY();\n }",
"@Override\n\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t_gridPanel.dragged(e.getX(), e.getY());\n\t\t}",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(x-gameObject.getWidth()/2, 0);\n\t\t\t\t}",
"@Override\r\n public void componentMoved(ComponentEvent e) {\n }",
"@Override\n public void componentMoved(ComponentEvent e) {\n }",
"public void mouseDragged( MouseEvent e ){\n\t\t\t\t\tint xValue, yValue;// comments similar to mousePressed method\n\t\t\t\t\tCoordinate currentMousePosition;\n\t\t\t\t\txValue = e.getX();\n\t\t\t\t\tyValue = e.getY();\n\t\t\t\t\tcurrentMousePosition = new Coordinate(xValue, yValue);\n\t\t\t\t\tmousePositionOnBoard(currentMousePosition);\n\t\t\t\t\trepaint();\n\t\t\t\t}",
"public void nativeMouseDragged(NativeMouseEvent e) {\n\t}",
"@Override\r\n public void mousePressed(MouseEvent e) {\n startDrag = new Point(e.getX(), e.getY());\r\n endDrag = startDrag;\r\n repaint();\r\n\r\n }",
"@Override\n\tpublic void touchDragged(int screenX, int screenY, int pointer) {\n\t\t\n\t}",
"public void mouseDragged(MouseEvent me) {\n updateDrag(me.getPoint());\n }",
"private void setEvents() {\n \n // On drag detected event (the start of a drag and drop)\n this.setOnDragDetected( e-> {\n if(this.dragEnabled) {\n Dragboard db;\n \n // if on board transfer mode is move, if from the pieces box, copy\n if(this.isOnBoard) { db = startDragAndDrop(TransferMode.MOVE); }\n else { db = startDragAndDrop(TransferMode.COPY); }\n \n ClipboardContent content = new ClipboardContent();\n content.putString(toString());\n db.setContent(content);\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) { System.out.print(\"Drag started on \"); }\n this.startFullDrag();\n }\n e.consume();\n });\n \n // Mouse dragover event handler (for accepting a drag and drop)\n this.setOnDragOver(new EventHandler<DragEvent>() {\n @Override\n public void handle(DragEvent event) {\n if(dropEnabled) {\n Dragboard db = event.getDragboard();\n if (db.hasString()) {\n event.acceptTransferModes(TransferMode.COPY_OR_MOVE);\n }\n event.consume();\n }\n }\n });\n \n // Drag over entered event ( mouse is dragging over this)\n this.setOnDragEntered(e -> {\n if(dropEnabled) {\n\n // setting color to \"highlight\" square mouse is over\n Color c = Color.MAGENTA;\n setBorderColor(c);\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) { System.out.print(\"Drag entered \");}\n }\n });\n\n // Drag over exited event ( mouse is no longer dragging over this)\n this.setOnDragExited(e -> {\n if(dropEnabled) {\n\n // reseting to stored color value (mouse drag no longer over)\n setBorderColor(this.borderColor);\n e.consume();\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) { System.out.print(\"Drag exited \"); }\n }\n });\n \n // Drag over dropped event (the drag and drop event is completed)\n this.setOnDragDropped(e -> {\n Dragboard db = e.getDragboard();\n boolean success = false;\n int toPieceIndex = pieceIndex; // saving previous piece\n if(db.hasString() && this.dropEnabled) {\n \n //TODO check with controller for valid position\n \n boolean moved = false;\n \n String rawInfo = db.getString();\n String[] info = rawInfo.split(\" \");\n this.playerColor = Color.web(info[5]);\n isVisible = (info[6].substring(0, 4).equals(\"true\"));\n int fromPieceIndex = Integer.parseInt(info[0]);\n int fromRow = StrategoView.translate(Integer.parseInt(info[1]));\n int fromCol = StrategoView.translate(Integer.parseInt(info[2]));\n int toRow = StrategoView.translate(row);\n int toCol = StrategoView.translate(col);\n // getting whether the moved piece came from the board (true) or the pieces box (false)\n boolean fromBoard = (info[4].substring(0, 4).equals(\"true\"));\n if(fromBoard) {\n \n // requesting movement from controller\n if(Piece.isMoveValid(fromRow, fromCol, toRow, toCol, PieceView.convertPieceIndexToType(fromPieceIndex))) {\n // piece will move\n //this.show();\n //controller.getPosition(fromRow, fromCol);\n \n }\n moved = controller.movePiece(fromRow, fromCol, toRow, toCol);\n \n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) {\n if(!moved) {\n System.out.println(\"Not moved (from controller)\");\n }\n System.out.printf(\"From Piece index: %d \", fromPieceIndex);\n System.out.printf(\"To Piece index: %d \", toPieceIndex);\n }\n \n \n }else { // Not from board (placed during setup)\n moved = true;\n this.pieceIndex = fromPieceIndex;\n update();\n if(toPieceIndex != pieceIndex){ // if pieced placed is not the same piece already there\n StrategoView.updateLabels(pieceIndex, -1); // decrement count of new piece\n \n if(toPieceIndex >= 0) { // If position on board was occupied by another piece\n StrategoView.updateLabels(toPieceIndex, 1); // increment count of old piece\n }\n }\n // Changing border color value (drag over exit event will actually set the border color)\n this.borderColor = Color.web(info[3]);\n\n }\n if(moved) {\n success = true;\n }\n \n if(StrategoView.ENABLE_CONSOLE_DEBUG) {\n System.out.print(\"Drag ended on \");\n System.out.printf(\"String: %s %s %s\\n\", info[0], info[1], info[2]);\n System.out.printf(\"Dropped on row %d and col %d\\n\", row, col);\n }\n \n }\n e.setDropCompleted(success);\n \n e.consume();\n \n });\n }",
"void onDrag(float elasticOffset,\n float elasticOffsetPixels,\n float rawOffset,\n float rawOffsetPixels);",
"private void moved(MouseEvent e)\r\n {\n }",
"@Override\r\npublic void componentMoved(ComponentEvent arg0) {\n\t\r\n}",
"public void handle(DragEvent event) {\n // if (currentlyDraggedType == draggableType) {\n n.setOpacity(1);\n // }\n\n event.consume();\n }",
"public void handle(DragEvent event) {\n Integer cIndex = GridPane.getColumnIndex(n);\n Integer rIndex = GridPane.getRowIndex(n);\n int x = cIndex == null ? 0 : cIndex;\n int y = rIndex == null ? 0 : rIndex;\n\n int nodeX = GridPane.getColumnIndex(currentlyDraggedImage);\n int nodeY = GridPane.getRowIndex(currentlyDraggedImage);\n\n if (currentlyDraggedType == draggableType) {\n // The drag-and-drop gesture entered the target\n // show the user that it is an actual gesture target\n if (!draggableType.equals(DRAGGABLE_TYPE.ITEM)) {\n if (canBuildingPlace(nodeX, nodeY, x, y))\n n.setOpacity(0.7);\n } else if (event.getGestureSource() != n && event.getDragboard().hasImage()) {\n n.setOpacity(0.7);\n }\n }\n event.consume();\n }",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void mouseDragged(MouseEvent evt) {\n setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\n }",
"@Override\n\tpublic void componentMoved(ComponentEvent e) {\n\n\t}",
"@Override\n\t\t\t\tpublic void drag(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer) {\n\t\t\t\t\tgameObject.moveBy(x-gameObject.getWidth()/2, y-gameObject.getHeight()/2);\n\t\t\t\t}"
] | [
"0.82378274",
"0.80062884",
"0.79744625",
"0.79481834",
"0.793329",
"0.78801113",
"0.7836185",
"0.78199464",
"0.77997386",
"0.77965105",
"0.77965105",
"0.77965105",
"0.77716553",
"0.77716553",
"0.7742438",
"0.7737011",
"0.7732139",
"0.7714472",
"0.77050674",
"0.77050674",
"0.77036947",
"0.77008617",
"0.7698707",
"0.76902354",
"0.76902354",
"0.76902354",
"0.76902354",
"0.76902354",
"0.76583976",
"0.76552314",
"0.7618354",
"0.761155",
"0.7596898",
"0.7593929",
"0.75924146",
"0.7591333",
"0.759057",
"0.759057",
"0.7569616",
"0.7566389",
"0.75411",
"0.75411",
"0.7537434",
"0.75296915",
"0.7527276",
"0.7527276",
"0.752487",
"0.752487",
"0.752487",
"0.752487",
"0.752487",
"0.752487",
"0.752487",
"0.7510742",
"0.7501744",
"0.74968773",
"0.7466587",
"0.73949283",
"0.734528",
"0.7329101",
"0.7289149",
"0.7288269",
"0.72454715",
"0.7219213",
"0.7205949",
"0.71939903",
"0.7183203",
"0.7154636",
"0.71482223",
"0.7139257",
"0.71285224",
"0.7101276",
"0.7062174",
"0.7031573",
"0.7018075",
"0.70172256",
"0.7008127",
"0.7007964",
"0.70070136",
"0.6999319",
"0.6987375",
"0.69739574",
"0.6972155",
"0.6952736",
"0.69476",
"0.69474435",
"0.69287497",
"0.6925621",
"0.6922192",
"0.692047",
"0.6916174",
"0.69067246",
"0.6900019",
"0.6898948",
"0.68967575",
"0.6887458",
"0.6886967",
"0.6886967",
"0.6886132",
"0.68845654",
"0.68836355"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void statusVomMenschen() {
System.out.println("Sie wurden getroffen nun können Sie nicht mehr so schnell laufen!");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Represents the result of testing one or more handlers. | public interface HandlingResult {
/**
* The response body, as bytes.
* <p>
* This does not include file or rendered responses.
* See {@link #getSentFile()} and {@link #rendered(Class)}.
*
* @return the response body, as bytes, or {@code null} if no response was sent.
*/
@Nullable
byte[] getBodyBytes();
/**
* The response body, interpreted as a utf8 string.
* <p>
* This does not include file or rendered responses.
* See {@link #getSentFile()} and {@link #rendered(Class)}.
*
* @return the response body, interpreted as a utf8 string, or {@code null} if no response was sent.
*/
@Nullable
String getBodyText();
/**
* The cookies to be set as part of the response.
* <p>
* Cookies are set during request processing via the {@link ratpack.http.Response#cookie(String, String)} method,
* or via directly modifying {@link ratpack.http.Response#getCookies()}.
*
* @return the cookies to be set as part of the response
* @since 1.3
*/
@Nullable
Set<Cookie> getCookies();
/**
* The client error raised if any, unless a custom client error handler is in use.
* <p>
* If no client error was “raised”, will be {@code null}.
* <p>
* If a custom client error handler is used (either by specification in the request fixture or insertion by an upstream handler), this will always be {@code null}.
* In such a case, this result effectively indicates what the custom client error handler did as its implementation.
*
* @return the client error code, or {@code null}.
*/
@Nullable
Integer getClientError();
/**
* The throwable thrown or given to {@link ratpack.handling.Context#error(Throwable)}, unless a custom error handler is in use.
* <p>
* If no throwable was “raised”, a new {@link ratpack.test.handling.HandlerExceptionNotThrownException} is raised.
* <p>
* If a custom error handler is used (either by specification in the request fixture or insertion by an upstream handler),
* this will always raise a new {@link ratpack.test.handling.HandlerExceptionNotThrownException}
* In such a case, this result effectively indicates what the custom error handler did as its implementation.
*
* @param type The expected type of the exception captured.
* @param <T> The expected type of the exception captured.
* @return the “unhandled” throwable that occurred, or raise {@link ratpack.test.handling.HandlerExceptionNotThrownException}
*/
@Nullable
<T extends Throwable> T exception(Class<T> type);
/**
* The final response headers.
*
* @return the final response headers
*/
Headers getHeaders();
/**
* The final state of the context registry.
*
* @return the final state of the context registry
*/
Registry getRegistry();
/**
* The final state of the request registry.
*
* @return the final state of the reqest registry
*/
Registry getRequestRegistry();
/**
* Indicates whether the result of invoking the handler was that it invoked one of the {@link ratpack.http.Response#sendFile} methods.
* <p>
* This does not include files rendered with {@link ratpack.handling.Context#render(Object)}.
*
* @return the file given to one of the {@link ratpack.http.Response#sendFile} methods, or {@code null} if none of these methods were called
*/
@Nullable
Path getSentFile();
/**
* The response status information.
* <p>
* Indicates the state of the context's {@link ratpack.http.Response#getStatus()} after invoking the handler.
* If the result is a sent response, this indicates the status of the response.
*
* @return the response status
*/
Status getStatus();
/**
* Indicates whether the result of invoking the handler was that it delegated to a downstream handler.
*
* @return whether the handler delegated to a downstream handler
*/
boolean isCalledNext();
/**
* Indicates the the handler(s) invoked one of the {@link ratpack.http.Response#send} methods.
*
* @return whether one of the {@link ratpack.http.Response#send} methods was invoked
*/
boolean isSentResponse(); // This is not named right, as it doesn't include sending files
/**
* The object that was rendered to the response.
* <p>
* The exact object that was given to {@link ratpack.handling.Context#render(Object)}.
* The value must be assignment compatible with given type token.
* If it is not, an {@link AssertionError} will be thrown.
*
* @param type the expect type of the rendered object
* @param <T> the expect type of the rendered object
* @return the rendered object, or {@code null} if no object was rendered
* @throws AssertionError if the rendered object cannot be cast to the given type
*/
@Nullable
<T> T rendered(Class<T> type) throws AssertionError;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<FlowHandleResult> getHanResultList() {\n\t\treturn mFlowHandleResults;\r\n\t}",
"private static void verifyMultipleSingleScanResults(InOrder handlerOrder, Handler handler,\n int requestId1, ScanResults results1, int requestId2, ScanResults results2,\n int listenerRequestId, ScanResults listenerResults) {\n ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);\n handlerOrder.verify(handler, times(listenerResults == null ? 4 : 5))\n .handleMessage(messageCaptor.capture());\n int firstListenerId = messageCaptor.getAllValues().get(0).arg2;\n assertTrue(firstListenerId + \" was neither \" + requestId2 + \" nor \" + requestId1,\n firstListenerId == requestId2 || firstListenerId == requestId1);\n if (firstListenerId == requestId2) {\n assertScanResultsMessage(requestId2,\n new WifiScanner.ScanData[] {results2.getScanData()},\n messageCaptor.getAllValues().get(0));\n assertSingleScanCompletedMessage(requestId2, messageCaptor.getAllValues().get(1));\n assertScanResultsMessage(requestId1,\n new WifiScanner.ScanData[] {results1.getScanData()},\n messageCaptor.getAllValues().get(2));\n assertSingleScanCompletedMessage(requestId1, messageCaptor.getAllValues().get(3));\n if (listenerResults != null) {\n assertScanResultsMessage(listenerRequestId,\n new WifiScanner.ScanData[] {listenerResults.getScanData()},\n messageCaptor.getAllValues().get(4));\n }\n } else {\n assertScanResultsMessage(requestId1,\n new WifiScanner.ScanData[] {results1.getScanData()},\n messageCaptor.getAllValues().get(0));\n assertSingleScanCompletedMessage(requestId1, messageCaptor.getAllValues().get(1));\n assertScanResultsMessage(requestId2,\n new WifiScanner.ScanData[] {results2.getScanData()},\n messageCaptor.getAllValues().get(2));\n assertSingleScanCompletedMessage(requestId2, messageCaptor.getAllValues().get(3));\n if (listenerResults != null) {\n assertScanResultsMessage(listenerRequestId,\n new WifiScanner.ScanData[] {listenerResults.getScanData()},\n messageCaptor.getAllValues().get(4));\n }\n }\n }",
"Map<String, Handler> handlers();",
"public HandlerDescription[] getHandlers() {\n return m_handlers;\n }",
"@Override\n public HandlerList getHandlers() {\n return handlers;\n }",
"@Override\n public HandlerList getHandlers() {\n return handlers;\n }",
"public void evaluate(Handler<AsyncResult<Double>> resultHandler) { \n delegate.evaluate(resultHandler);\n }",
"@Test\n public void testGetSynchronousResponseHandler() {\n System.out.println(\"getSynchronousResponseHandler\");\n String sa = \"testhandler\";\n SynchronousResponseHandler expResult = (SpineSOAPRequest r) -> {\n };\n instance.addSynchronousResponseHandler(sa, expResult);\n SynchronousResponseHandler result = instance.getSynchronousResponseHandler(sa);\n assertEquals(expResult, result);\n }",
"public IStatus getResult();",
"public AuthenticationResultHandler[] getAuthenticationResultHandlers()\n {\n return this.authenticationResultHandlers;\n }",
"public AuthenticationResultHandler[] getAuthenticationResultHandlers()\n {\n return this.authenticationResultHandlers;\n }",
"@Test\n public void TestHandleEmptyHandler() {\n final HandlerExecutor handlerExecutor = getExecutor();\n\n final HandlerResult result = handlerExecutor.handle(new VoiceRequest(\"123456789\", 99L, \"whatever\", \"\"));\n assertEquals(result.handlerType, HandlerType.NONE);\n }",
"@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t\t\n\t\tSystem.out.println(\"All test casee passed and i m the listener class\");\n\t}",
"@Override\n public final HandlerList getHandlers(){\n return handlers;\n }",
"default Future<T> onResult(Consumer<T> resultHandler) {\n return then(resultHandler);\n }",
"@Test\n\tpublic void testShowResult() {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tInvertedIndex index = new InvertedIndex();\n\t\tFileManager manager = new FileManager(config.getConfig().getFileName(), index);\n\t\tHashMap<String, String> parameters = new HashMap<String, String>();\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"ABCD\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"B00002243X\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 10);\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"ASDAJKSDJHKASJK\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"jumpers\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 8);\n\t}",
"public void setAuthenticationResultHandlers(\n final AuthenticationResultHandler[] handlers)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting authenticationResultHandlers: \" + handlers);\n }\n this.authenticationResultHandlers = handlers;\n }",
"public void setAuthenticationResultHandlers(\n final AuthenticationResultHandler[] handlers)\n {\n checkImmutable();\n if (this.logger.isTraceEnabled()) {\n this.logger.trace(\"setting authenticationResultHandlers: \" + handlers);\n }\n this.authenticationResultHandlers = handlers;\n }",
"public interface Result {\n public void onResult(Object object, String function, boolean IsSuccess, int RequestStatus, String MessageStatus);\n\n\n\n}",
"@Test\n public void testHandle() {\n Response response = TestHelp.testForHandle(handler,\n \"eis essen\", PhrasesAndConstants.ACTIVITY_SLOT,\n null);\n assertTrue(response.getOutputSpeech().toString().contains(PhrasesAndConstants.NO_ACTIVITIES_YET));\n\n Map<String, Object> persistentAttributes = new HashMap<>();\n persistentAttributes.put(\"zumba\", \"name: zumba; inside: true; minutes: 30\");\n\n // no hobby by that name\n response = TestHelp.testForHandle(handler,\n \"billard\", PhrasesAndConstants.ACTIVITY_SLOT,\n persistentAttributes);\n assertTrue(response.getOutputSpeech().toString().contains(PhrasesAndConstants.NO_HOBBY_BY_THAT_NAME));\n\n // delete successful\n response = TestHelp.testForHandle(handler,\n \"zumba\", PhrasesAndConstants.ACTIVITY_SLOT,\n persistentAttributes);\n assertTrue(response.getOutputSpeech().toString().contains(String.format(PhrasesAndConstants.DELETED_SUCCESSFULL, \"zumba\")));\n\n\n persistentAttributes.put(\"sport\", \"name: sport; inside: true; minutes: 30\");\n response = TestHelp.testForHandle(handler,\n \"alle\", PhrasesAndConstants.ACTIVITY_SLOT,\n persistentAttributes);\n assertTrue(response.getOutputSpeech().toString().contains(String.format(PhrasesAndConstants.DELETED_ALL_SUCCESSFULL, \"alle\")));\n }",
"@Override\n public void onResult(final AIResponse result) {\n DobbyLog.i(\"Action: \" + result.getResult().getAction());\n }",
"@Test\n\tpublic void testPassThroughHandler_EmptyResult() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"NotExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\tAssertions.assertEquals(Lists.newArrayList(\"person\", \"interest\"), bindingNames);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t}\n\t}",
"void onResult(T result);",
"void onResult(T result);",
"@Override\r\n\tpublic void onTestSuccess(ITestResult Result) {\n\t\tSystem.out.println(\"onTestSuccess :\"+ Result.getName());\r\n\t}",
"@Override\r\n\tpublic int getResult() {\n\t\treturn 0;\r\n\t}",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public Result getResults()\r\n {\r\n return result;\r\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"public com.rpg.framework.database.Protocol.ResponseCode getResult() {\n return result_;\n }",
"@Test\n public void testGetEbXmlHandler() {\n System.out.println(\"getEbXmlHandler\");\n String sa = \"testhandler\";\n SpineEbXmlHandler expResult = (EbXmlMessage m) -> {\n };\n instance.addHandler(sa, expResult);\n SpineEbXmlHandler result = instance.getEbXmlHandler(sa);\n assertEquals(expResult, result);\n }",
"@Override\n\t\tpublic void onTestSuccess(ITestResult result) {\n\t\t\tSystem.out.println((result.getMethod().getMethodName() + \" passed!\"));\n\t test.get().pass(\"Test passed\");\n\t\t\t\n\t\t}",
"@Test\n public void shouldReturnNonEmptyTriggerEntries() throws Exception {\n //given\n when(resultMap.get(TRIGGERS_KEY + 0)).thenReturn(\"my entry value 0\");\n when(resultMap.get(TRIGGERS_KEY + 1)).thenReturn(\"my entry value 1\");\n givenNoHandleErrorMap(resultMap);\n when(resultMap2.get(TRIGGERS_KEY + 0)).thenReturn(\"my entry2 value 0\");\n when(resultMap2.get(TRIGGERS_KEY + 1)).thenReturn(\"my entry2 value 1\");\n when(resultMap2.get(TRIGGERS_KEY + 2)).thenReturn(\"my entry2 value 2\");\n givenNoHandleErrorMap(resultMap2);\n //when\n List<ITriggerEntry> triggerEntries = triggersDelegator.getTriggerEntries();\n //then\n assertThat(triggerEntries.size(), is(5));\n assertThat(triggerEntries.get(1).getOrder(), is(1));\n assertThat(triggerEntries.get(4).getOrder(), is(2));\n }",
"public Map<String, StepResult> getResults()\n {\n return results;\n }",
"Single<WebClientServiceResponse> whenResponseReceived();",
"Single<WebClientServiceResponse> whenResponseReceived();",
"@Override\r\n\tpublic boolean results()\r\n\t{\r\n\t\treturn this.results(this.getRobot());\r\n\t}",
"@NotNull\n @Contract(pure = true)\n @Override\n public HandlerList getHandlers() {\n return HANDLERS;\n }",
"IHandler next();",
"void onResult(int ret);",
"public TestMatchmakingHandler() {\r\n\t\tchecks = new AtomicInteger[3];\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tchecks[i] = new AtomicInteger(0);\r\n\t\t}\r\n\t}",
"public ResultType getResult() {\r\n return result;\r\n }",
"@Test\n @Override\n public void testHandleEapSuccessNotification() throws Exception {\n EapSuccess msChapV2Success = new EapSuccess(MSCHAP_V2_MSK, MSCHAP_V2_EMSK);\n EapMessage eapMessage = new EapMessage(EAP_CODE_SUCCESS, ID_INT, null);\n\n when(mMockInnerEapStateMachine.process(eq(EAP_SUCCESS_PACKET))).thenReturn(msChapV2Success);\n when(mMockTlsSession.generateKeyingMaterial())\n .thenReturn(mMockTlsSession.new EapTtlsKeyingMaterial(MSK, EMSK));\n\n EapResult result = mStateMachine.process(eapMessage);\n EapSuccess eapSuccess = (EapSuccess) result;\n assertArrayEquals(MSK, eapSuccess.msk);\n assertArrayEquals(EMSK, eapSuccess.emsk);\n assertTrue(mStateMachine.getState() instanceof FinalState);\n verify(mMockInnerEapStateMachine).process(eq(EAP_SUCCESS_PACKET));\n verify(mMockTlsSession).generateKeyingMaterial();\n }",
"public void receiveResultAmbitosHijo(\r\n es.mitc.redes.urbanismoenred.serviciosweb.v1_86.UrbrWSServiceStub.AmbitosHijoResponseE result\r\n ) {\r\n }",
"@Test\n public void testAddSynchronousResponseHandler() {\n System.out.println(\"addSynchronousResponseHandler\");\n String sa = \"testhandler\";\n SynchronousResponseHandler h = (SpineSOAPRequest r) -> {\n };\n instance.addSynchronousResponseHandler(sa, h);\n }",
"void onResult(AIResponse result);",
"public interface Results {\n\n\tboolean resultsOk();\n\n\tResultsPanel getResultPanel();\n\n\tString getAnalysisName();\n}",
"public void onTestSuccess(ITestResult result) {\n\t\t\r\n\t}",
"public void onTestSuccess(ITestResult result) {\n\t\t\n\t}",
"Handler<Q, R> handler();",
"public int getResult() {return resultCode;}",
"public void onResult(boolean[] results, String errorMsg);",
"@Override\n\tpublic BaseResponse testResponse() {\n\t\treturn setResultSuccess();\n\t}",
"public static HandlerList getHandlerList() {\n return handlers;\n }",
"public static HandlerList getHandlerList() {\n return handlers;\n }",
"public void testDispatchTypes() {\n startActivity();\n \n Log.v(TAG,\"testDispatchTypes\");\n SystemDispatcher.Listener listener = new SystemDispatcher.Listener() {\n\n public void onDispatched(String type , Map message) {\n Log.v(TAG,\"testDispatchTypes - received: \" + type);\n\n if (!type.equals(\"Automater::response\")) {\n return;\n }\n\n Payload payload = new Payload();\n payload.name = type;\n payload.message = message;\n\n lastPayload = payload;\n }\n };\n\n SystemDispatcher.addListener(listener);\n\n Map message = new HashMap();\n message.put(\"field1\",\"value1\");\n message.put(\"field2\",10);\n message.put(\"field3\",true);\n message.put(\"field4\",false);\n \n List field5 = new ArrayList(3);\n field5.add(23);\n field5.add(true);\n field5.add(\"stringValue\");\n message.put(\"field5\",field5);\n field5 = new ArrayList(10);\n\n Map field6 = new HashMap();\n field6.put(\"sfield1\", \"value1\");\n field6.put(\"sfield2\", 10);\n field6.put(\"sfield3\", true);\n field6.put(\"sfield4\", false);\n message.put(\"field6\", field6);\n \n assertTrue(lastPayload == null);\n\n SystemDispatcher.dispatch(\"Automater::echo\",message);\n sleep(500);\n\n assertTrue(lastPayload != null);\n assertTrue(lastPayload.message.containsKey(\"field1\"));\n assertTrue(lastPayload.message.containsKey(\"field2\"));\n assertTrue(lastPayload.message.containsKey(\"field3\"));\n assertTrue(lastPayload.message.containsKey(\"field4\"));\n assertTrue(lastPayload.message.containsKey(\"field5\"));\n assertTrue(lastPayload.message.containsKey(\"field6\"));\n\n String field1 = (String) lastPayload.message.get(\"field1\");\n assertTrue(field1.equals(\"value1\"));\n\n int field2 = (int) (Integer) lastPayload.message.get(\"field2\");\n assertEquals(field2,10);\n\n boolean field3 = (boolean)(Boolean) lastPayload.message.get(\"field3\");\n assertEquals(field3,true);\n\n boolean field4 = (boolean)(Boolean) lastPayload.message.get(\"field4\");\n assertEquals(field4,false);\n \n List list = (List) lastPayload.message.get(\"field5\");\n assertEquals(list.size(),3);\n assertEquals(list.get(0), 23);\n assertEquals(list.get(1), true);\n assertTrue((((String) list.get(2)).equals(\"stringValue\")));\n\n Map map = (Map) lastPayload.message.get(\"field6\");\n assertTrue(map.containsKey(\"sfield1\"));\n assertTrue(((String) map.get(\"sfield1\")).equals(\"value1\"));\n assertTrue(map.containsKey(\"sfield2\"));\n assertEquals(map.get(\"sfield2\"), 10);\n assertTrue(map.containsKey(\"sfield3\"));\n assertTrue(map.containsKey(\"sfield4\"));\n \n SystemDispatcher.removeListener(listener);\n }",
"void completed(TestResult tr);",
"public void onTestSuccess(ITestResult result) {\n \tSystem.out.println(\"The test case is passed :\"+result.getName());\n }",
"@JsonProperty(value = \"Handler\")\n public String getHandler() {\n return this.Handler;\n }",
"@Override\n public void verifyResult() {\n assertThat(calculator.getResult(), is(4));\n }",
"@Test\n public void testGetExpiryHandler() {\n System.out.println(\"getExpiryHandler\");\n String sa = \"testhandler\";\n instance.addExpiryHandler(sa, expiredMessageHandler);\n ExpiredMessageHandler expResult = expiredMessageHandler;\n ExpiredMessageHandler result = instance.getExpiryHandler(sa);\n assertEquals(expResult, result);\n }",
"@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}",
"public E getResult(){\r\n\t\treturn this.result;\r\n\t}",
"<H extends ResponseHandler<Result[]>> H nextBatch(H handler);",
"protected SimulatorValue giveResult() {\n\tthis.evalExpression();\n\treturn value;\n }",
"@Override\r\n\tpublic void onTestSuccess(ITestResult result) {\n\t\tSystem.out.println(\"onTestSuccess -> Test Name: \"+result.getName());\r\n\t}",
"void SetupMockRequestHandler2(RequestHandler2 mockHandler, int attemptCount, MockRequestOutcome outcome) {\n\n HttpResponse testResponse = EasyMock.createMock(HttpResponse.class);\n\n // beforeRequest\n EasyMock.reset(mockHandler);\n mockHandler.beforeRequest(EasyMock.<Request<?>>anyObject());\n EasyMock.expectLastCall().once();\n\n for(int i = 0; i < attemptCount; ++i) {\n // beforeAttempt\n mockHandler.beforeAttempt(EasyMock.<HandlerBeforeAttemptContext>anyObject());\n EasyMock.expectLastCall().once();\n\n if (outcome == MockRequestOutcome.Success && i + 1 == attemptCount) {\n // beforeUnmarshalling, requires success-based test\n EasyMock.expect(mockHandler.beforeUnmarshalling(EasyMock.<Request<?>>anyObject(), EasyMock.<HttpResponse>anyObject()))\n .andReturn(testResponse)\n .once();\n }\n\n // afterAttempt\n mockHandler.afterAttempt(EasyMock.<HandlerAfterAttemptContext>anyObject());\n EasyMock.expectLastCall().once();\n }\n\n if(outcome == MockRequestOutcome.Success) {\n // afterResponse, requires success\n mockHandler.afterResponse(EasyMock.<Request<?>>anyObject(), EasyMock.<Response<?>>anyObject());\n EasyMock.expectLastCall().once();\n } else if (outcome == MockRequestOutcome.FailureWithAwsClientException){\n // afterError, only called if exception was an AwsClientException\n mockHandler.afterError(EasyMock.<Request<?>>anyObject(), EasyMock.<Response<?>>anyObject(), EasyMock.<Exception>anyObject());\n EasyMock.expectLastCall().once();\n }\n EasyMock.replay(mockHandler);\n }",
"void onTestSuccess(ITestResult result);",
"protected abstract void handleOk();",
"public void onTestSuccess(ITestResult result) {\n\t\tSystem.out.println(result.getName()+\"**********Test Success.............This is result.getName\");\r\n\t\t\r\n\t}",
"public interface GenericHandler\n{\n\n\tvoid handle(Object returnValue);\n\n}",
"public final static HandlerList getHandlerList(){\n return handlers;\n }",
"ResultSummary getActualResultSummary();",
"@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t\t\n\t}",
"public void handleSimStatusCompleted() {\n }",
"public com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index) {\n if (imagesByHandlerBuilder_ == null) {\n return imagesByHandler_.get(index);\n } else {\n return imagesByHandlerBuilder_.getMessage(index);\n }\n }",
"protected abstract void runHandler();",
"public void onTestSuccess(ITestResult result) {\n\t\tSystem.out.println(\"*********Test onTestSuccess :\"+result.getName());\r\n\t\t\r\n\t}",
"public PhaseHandler[] getAllHandlers() {\r\n return this.delegate.getAllHandlers();\r\n }",
"@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t}",
"public int getResult() {\r\n\t\t\treturn result_;\r\n\t\t}",
"public Result getResult() {\n return result;\n }",
"public MatchResult getResult() {\n return result;\n }",
"public Map<HandlerRegistryInfo, PhaseHandler> getHandlers() {\r\n return this.delegate.getHandlers();\r\n }",
"@Test\n public void dispatchToBaseTypes() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n final List<Object> objectHandlerReceived = new ArrayList<>();\n Object objectHandler = new Object() {\n @Subscriber\n public void onEvent(Object event) {\n objectHandlerReceived.add(event);\n }\n };\n\n final List<Comparable<?>> comparableHandlerReceived = new ArrayList<>();\n Object comparableHandler = new Object() {\n @Subscriber\n public void onEvent(Comparable<?> event) {\n comparableHandlerReceived.add(event);\n }\n };\n\n final List<CharSequence> charSequenceHandlerReceived = new ArrayList<>();\n Object charSequenceHandler = new Object() {\n @Subscriber\n public void onEvent(CharSequence event) {\n charSequenceHandlerReceived.add(event);\n }\n };\n\n final List<CharSequence> stringHandlerReceived = new ArrayList<>();\n Object stringHandler = new Object() {\n @Subscriber\n public void onEvent(String event) {\n stringHandlerReceived.add(event);\n }\n };\n eventBus.register(objectHandler);\n eventBus.register(charSequenceHandler);\n eventBus.register(stringHandler);\n eventBus.register(comparableHandler);\n\n eventBus.post(\"event 1\");\n assertThat(objectHandlerReceived, is(asList(\"event 1\")));\n assertThat(comparableHandlerReceived, is(asList(\"event 1\")));\n assertThat(charSequenceHandlerReceived, is(asList(\"event 1\")));\n assertThat(stringHandlerReceived, is(asList(\"event 1\")));\n\n eventBus.post(Integer.MAX_VALUE);\n assertThat(objectHandlerReceived, is(asList(\"event 1\", Integer.MAX_VALUE)));\n assertThat(comparableHandlerReceived, is(asList(\"event 1\", Integer.MAX_VALUE)));\n assertThat(charSequenceHandlerReceived, is(asList(\"event 1\")));\n assertThat(stringHandlerReceived, is(asList(\"event 1\")));\n }",
"public Result getResult() {\n return result;\n }",
"public String getTestHandlerKey() {\n return null;\n }",
"public void onTestSuccess(ITestResult arg0) {\n\t\t\r\n\t}",
"public interface Handler {\n void handleProductCreated(CommerceProtos.Message message, CommerceProtos.ProductCreated e);\n void handleSiteCreated(CommerceProtos.Message message, CommerceProtos.SiteCreated e);\n void handleCartCreated(CommerceProtos.Message message, CommerceProtos.CartCreated e);\n void handleCustomerCreated(CommerceProtos.Message message, CommerceProtos.CustomerCreated e);\n\t\tvoid handleProductAddToCart(CommerceProtos.Message message, CommerceProtos.ProductAddToCart e);\n\t\tvoid handleCartSuccessfulCheckout(CommerceProtos.Message message, CommerceProtos.CartSuccessfulCheckout e);\n }",
"public int getResult() {\r\n\t\t\t\treturn result_;\r\n\t\t\t}",
"public List<Integer> Result()\n\t{\n\t\treturn result;\n\t}",
"public TestResult getResult() {\n List<TestResult> allTestResults = getCurrentTestResults();\n\n if (allTestResults.contains(FAILURE)) {\n return FAILURE;\n }\n\n if (allTestResults.contains(PENDING)) {\n return PENDING;\n }\n\n if (containsOnly(allTestResults, IGNORED)) {\n return IGNORED;\n }\n\n return SUCCESS;\n }",
"private MockInvocationHandler(int i) {\n states = i;\n }"
] | [
"0.53805846",
"0.53247833",
"0.52996194",
"0.5244342",
"0.51906663",
"0.51906663",
"0.5164781",
"0.5160276",
"0.5148366",
"0.51398504",
"0.51398504",
"0.50938743",
"0.5089222",
"0.5083862",
"0.5067938",
"0.50415283",
"0.5020819",
"0.5020819",
"0.50061625",
"0.50025624",
"0.49649417",
"0.4958054",
"0.49449486",
"0.49449486",
"0.4936755",
"0.4935209",
"0.49156642",
"0.49156642",
"0.49144918",
"0.49144918",
"0.49144918",
"0.49001104",
"0.4895652",
"0.48952535",
"0.48952535",
"0.4893481",
"0.4893481",
"0.48925373",
"0.48860857",
"0.48848945",
"0.4874866",
"0.48690292",
"0.48690292",
"0.48656455",
"0.48597994",
"0.48559162",
"0.48340684",
"0.48234096",
"0.4820083",
"0.4813281",
"0.48011336",
"0.4796383",
"0.47955763",
"0.4793613",
"0.47813073",
"0.4777104",
"0.47717094",
"0.47641426",
"0.4762173",
"0.47576424",
"0.4752161",
"0.4752161",
"0.47505096",
"0.47503808",
"0.4740721",
"0.47393838",
"0.47315636",
"0.47251585",
"0.47199607",
"0.47183153",
"0.4717191",
"0.47162625",
"0.4713438",
"0.47056252",
"0.4692879",
"0.4680456",
"0.4680454",
"0.46764314",
"0.46725976",
"0.46709386",
"0.46612534",
"0.46555796",
"0.4648301",
"0.46475765",
"0.4646233",
"0.46456528",
"0.46447754",
"0.46381462",
"0.46381313",
"0.463493",
"0.4634555",
"0.46339205",
"0.46237946",
"0.4622825",
"0.46190414",
"0.461764",
"0.4613525",
"0.4612865",
"0.46127862",
"0.4611186"
] | 0.6098465 | 0 |
The final response headers. | Headers getHeaders(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public HttpResponseHeaders getHeaders() {\n return mHeaders;\n }",
"protected HeaderGroup getResponseHeaderGroup() {\n return responseHeaders;\n }",
"public Vector<YANG_Header> getHeaders() {\n\t\treturn headers;\n\t}",
"public VersionedMap getHeaders ()\n {\n return headers;\n }",
"public Map<String, String> headers() {\n return this.header.headers();\n }",
"public Header[] getResponseHeaders() {\n return getResponseHeaderGroup().getAllHeaders();\n }",
"public Map<String, List<String>> getResponseHeaders() {\n return responseHeaders == null ? Collections.EMPTY_MAP : responseHeaders;\n }",
"public Map<String, List<String>> getHeaders(){\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders;\n }",
"@ZAttr(id=1074)\n public String[] getResponseHeader() {\n return getMultiAttr(Provisioning.A_zimbraResponseHeader);\n }",
"public abstract HttpHeaders headers();",
"protected Map<String, String> getRequiredResponseHeaders()\n {\n if (requiredHttpHeaders != null)\n {\n return requiredHttpHeaders;\n }\n if (scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders() != null)\n {\n return scimHttpClient.getScimClientConfig().getExpectedHttpResponseHeaders();\n }\n Map<String, String> requiredHttpHeaders = new HashMap<>();\n requiredHttpHeaders.put(HttpHeader.CONTENT_TYPE_HEADER, HttpHeader.SCIM_CONTENT_TYPE);\n return requiredHttpHeaders;\n }",
"@Override public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }",
"public MultiMap getHeaders() {\n return headers;\n }",
"public Map<String, List<String>> getHeaders() {\n\t\t\treturn headers;\n\t\t}",
"private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return authenticator.getVolleyHttpHeaders();\n }",
"@Override\n\t\t\tpublic Map<String, String> getHeaders() throws AuthFailureError {\n\t\t\t\tHashMap<String, String> headers = new HashMap<String, String>();\n\t\t\t\theaders.put(\"Content-Type\", \"application/json;charset=UTF-8\");\n\t\t\t\treturn headers;\n\t\t\t}",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return httpClientRequest.getHeaders();\n }",
"public Map<String, AbstractHeader> getHeaders()\n\t{\n\t\treturn headers;\n\t}",
"public interface HttpResponseHeaders {\n\n /**\n * Http status code\n */\n int statusCode();\n\n /**\n * all commons headers(exclude request line)\n */\n List<Header> headers();\n}",
"public List<HttpHeaderOption> getResponseHeadersToAddList() {\n return responseHeadersToAdd;\n }",
"public List<HttpHeaderOption> getResponseHeadersToAddList() {\n return responseHeadersToAdd;\n }",
"@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"public Set<String> getHeaderNames() {\n return headers.keySet();\n }",
"public String[] getParticularResponseHeaders() {\n return null;\n }",
"public Map<String, HeaderInfo> getHeaders() {\n\t\treturn headers;\n\t}",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"content-type\", \"application/json\");\n params.put(\"cache-control\", \"no-cache\");\n\n return params;\n }",
"public List<Header> nextHeader(JSONResponse response){\n\t\tList<Header> headers = getHeaders();\n if(response.token == null){\n return headers;\n } else {\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + response.token));\n return headers;\n }\n }",
"public Map getHeaders() {\r\n if (headers == null) {\r\n headers = new HashMap();\r\n }\r\n\r\n return headers;\r\n }",
"private HttpHeaders prepareLoginHeaders() {\n ResponseEntity<TokenLoginResponse> loginResponse = requestLoginResponse();\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(\"Authorization\", \"Bearer \" + loginResponse.getBody().getToken());\n return httpHeaders;\n }",
"public Header[] getResponseFooters() {\n return getResponseTrailerHeaderGroup().getAllHeaders();\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return (mHeaders != null && mHeaders.size() > 3) ? mHeaders : NetworkUtils.this.getHeaders();\n }",
"Map<String, List<String>> getHeaders();",
"@Override\n public Enumeration<String> getHeaderNames() {\n List<String> names = new ArrayList<String>();\n names.addAll(Collections.list(super.getHeaderNames()));\n names.add(\"Authorization\");\n return Collections.enumeration(names);\n }",
"Map<String, String> getHeaders();",
"public Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }",
"public final Map<String, String> getHeaders() {\n return Collections.unmodifiableMap(headers);\n }",
"public String[] getHeaders(){\n String[] headers={\"Owner Unit ID\",\"Origin Geoloc\",\"Origin Name\",\"Number of Assets\",};\n return headers;\n }",
"public static Map<String, String> getHeaders() {\n if (headers == null) {\n headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"X-Custom-Header\", \"application/json\");\n }\n return headers;\n }",
"protected HeaderGroup getResponseTrailerHeaderGroup() {\n return responseTrailerHeaders;\n }",
"@Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map headers = new HashMap();\r\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\r\n return headers;\r\n }",
"protected ResponseHeader getHeader() {\n return this.header;\n }",
"public HttpHeaders getHeaders()\r\n/* 63: */ {\r\n/* 64: 93 */ if (this.headers == null)\r\n/* 65: */ {\r\n/* 66: 94 */ this.headers = new HttpHeaders();\r\n/* 67: */ Enumeration headerValues;\r\n/* 68: 95 */ for (Enumeration headerNames = this.servletRequest.getHeaderNames(); headerNames.hasMoreElements(); \r\n/* 69: 98 */ headerValues.hasMoreElements())\r\n/* 70: */ {\r\n/* 71: 96 */ String headerName = (String)headerNames.nextElement();\r\n/* 72: 97 */ headerValues = this.servletRequest.getHeaders(headerName);\r\n/* 73: 98 */ continue;\r\n/* 74: 99 */ String headerValue = (String)headerValues.nextElement();\r\n/* 75:100 */ this.headers.add(headerName, headerValue);\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:104 */ return this.headers;\r\n/* 79: */ }",
"String getResponseHeader();",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/json\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/json\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }",
"public Set<QName> getHeaders() {\n\t\treturn headers;\n\t}",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }",
"public ResponseMessageDefinition endResponseHeader() {\n return response;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError\n {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError\n {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n headers.put(\"Authorization\", \"Bearer \" + TOKEN);\n return headers;\n }",
"@Override\n\tpublic Collection<String> getHeaderNames() {\n\t\treturn null;\n\t}",
"public Map<String,List<String>> getHeaderMap() {\n\n\t\treturn headers;\n\t}",
"@Override\n\t\tpublic Enumeration getHeaderNames() {\n\t\t\treturn null;\n\t\t}",
"RequestHeaders headers();",
"public Headers getHeaders() {\n if (headers == null) {\n headers = new DefaultHeaders();\n }\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Authorization\", loggedInUser.getToken_type()+\" \"+loggedInUser.getAccess_token());\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"Accept\", \"application/json\");\n return headers;\n }",
"@Override\n public Collection<String> getRestHeaders() {\n return Arrays.asList(KerberosRealm.AUTHENTICATION_HEADER, KrbConstants.WWW_AUTHENTICATE );\n }",
"public ListIterator getHeaders()\n { return headers.listIterator(); }",
"public HeaderSet getReceivedHeaders() throws IOException {\n ensureOpen();\n\n return replyHeaders;\n }",
"private HashMap<String, String> getHeaders() {\n mHeaders = new HashMap<>();\n // set user'token if user token is not set\n if ((this.mToken == null || this.mToken.isEmpty()) && mProfile != null)\n this.mToken = mProfile.getToken();\n\n if (this.mToken != null && !this.mToken.isEmpty()) {\n mHeaders.put(\"Authorization\", \"Token \" + this.mToken);\n Log.e(\"TOKEN\", mToken);\n }\n\n mHeaders.put(\"Content-Type\", \"application/form-data\");\n mHeaders.put(\"Accept\", \"application/json\");\n return mHeaders;\n }",
"public String[] getHeaders()\n\t{\n\t\tString[] lines = this.header.split(\"\\\\r\\\\n\");\n\t\treturn lines;\n\t}",
"public static HeaderHolder getResponseHeaderHolder() {\n return responseHeaderHolder;\n }",
"public List<String> getResponseHeadersToRemoveList() {\n return responseHeadersToRemove;\n }",
"public List<String> getHeaders() {\n try {\n return load().getHeaderNames();\n } catch (IOException ex) {\n Logger.getLogger(IntelligentSystem.class.getName()).log(Level.SEVERE, null, ex);\n }\n return Collections.EMPTY_LIST;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n return headers;\n }",
"public List<String> getResponseHeadersToRemoveList() {\n return responseHeadersToRemove;\n }",
"@Override\r\n\tpublic Set<QName> getHeaders() {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Set<QName> getHeaders() {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n public String[] headers() {\n return new String[]{\"فاکتور\", \"تاریخ\", \"شناسه مخاطب\", \"نام مخاطب\", \"نوع\", \"شناسه کالا\", \"شرح کالا\", \"مقدار کل\", \"واحد\", \"فی\", \"مقدار جزء\", \"مبلغ کل\", \"مانده\"};\r\n }",
"public Map<String, List<String>> getInitialHeaders() {\n return mInitialHeaders;\n }",
"List<Header> headers();",
"public Optional<List<Headers>> headers() {\n return Codegen.objectProp(\"headers\", TypeShape.<List<Headers>>builder(List.class).addParameter(Headers.class).build()).config(config).get();\n }",
"protected void setHttpHeaders (\n HttpServletRequest request, HttpServletResponse response)\n {\n response.setHeader(\"Expires\", \"0\");\n }",
"protected void addDynamicHeaders() {\n }",
"@Override\n public Map<String, String> getHeaders(){\n AndroidApplication app = (AndroidApplication)getApplication();\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Accept\", \"application/json\" );\n headers.put(\"Cookie\", \"session-cookie=\" + app.getCookie() );\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"x-access-token\", AppConstants.ACCESS_TOKEN);\n return headers;\n }",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"x-access-token\", AppConstants.ACCESS_TOKEN);\n return headers;\n }",
"@Nonnull @NonnullElements @NotLive @Unmodifiable public List<Pair<String,String>> getHeaders() {\n return headerList;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }",
"@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/json\"); // header format wysłanej wiadomości - JSON\n params.put(\"Accept\", \"application/json\"); // header format otrzymanej wiadomości -JSON\n params.put(\"Consumer\", C.HEDDER_CUSTOMER); // header Consumer\n params.put(\"Authorization\", C.HEDDER_BEARER + shar.getString(C.KEY_FOR_SHAR_TOKEN, \"\")); // header Authorization\n return params;\n }",
"public Header[] getRequestHeaders();",
"private void generateHeader() throws IOException {\r\n\t\tcharset = Charset.forName(encoding);\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\t//first line\r\n\t\tsb.append(\"HTTP/1.1 \");\r\n\t\tsb.append(statusCode);\r\n\t\tsb.append(\" \");\r\n\t\tsb.append(statusText);\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\t//second line\r\n\t\tsb.append(\"Content-type: \");\r\n\t\tsb.append(mimeType);\r\n\t\tif (mimeType.startsWith(\"text/\")) {\r\n\t\t\tsb.append(\" ;charset= \");\r\n\t\t\tsb.append(encoding);\r\n\t\t}\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\t//third line\r\n\t\tif (contentLength > 0) {\r\n\t\t\tsb.append(\"Content-Length: \");\r\n\t\t\tsb.append(contentLength);\r\n\t\t\tsb.append(\"\\r\\n\");\r\n\t\t}\r\n\t\t\r\n\t\t//fourth line\r\n\t\tgetOutputCookies(sb);\r\n\t\tsb.append(\"\\r\\n\");\r\n\t\t\r\n\t\toutputStream.write(sb.toString().getBytes(Charset.forName(\"ISO_8859_1\")));\r\n\t\t\r\n\t\theaderGenerated = true;\r\n\t}",
"@Override\n\tpublic FileItemHeaders getHeaders()\n\t{\n\t\treturn headers;\n\t}",
"@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headerMap = new HashMap<String, String>();\n headerMap.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n headerMap.put(\"Authorization\", \"Bearer \" + token);\n return headerMap;\n }",
"public List<Div> getHeaders()\n {\n if (headers == null)\n {\n headers = new ArrayList<>();\n }\n return headers;\n }",
"public java.lang.String getReqHeaders() {\n return req_headers;\n }"
] | [
"0.7362144",
"0.7170935",
"0.7089766",
"0.70409113",
"0.702655",
"0.701431",
"0.6985092",
"0.6984869",
"0.69823295",
"0.6941798",
"0.6928004",
"0.6899503",
"0.68098736",
"0.6803463",
"0.6800377",
"0.67673355",
"0.67368793",
"0.6736237",
"0.6708187",
"0.67011744",
"0.6695958",
"0.6693813",
"0.66927963",
"0.66927963",
"0.66927963",
"0.6677496",
"0.6671669",
"0.66600144",
"0.66505885",
"0.66505885",
"0.6606013",
"0.65970796",
"0.6583109",
"0.6560601",
"0.65602463",
"0.654366",
"0.65299547",
"0.6522618",
"0.6498085",
"0.64893043",
"0.64841914",
"0.6475599",
"0.6423736",
"0.6416764",
"0.6410108",
"0.6391746",
"0.6387531",
"0.63758874",
"0.63758874",
"0.6371962",
"0.63717496",
"0.63717496",
"0.63717496",
"0.63717496",
"0.63717496",
"0.63713604",
"0.6367852",
"0.6367852",
"0.6367852",
"0.6367852",
"0.63616884",
"0.63616884",
"0.63590145",
"0.63431144",
"0.63380307",
"0.63341415",
"0.6327517",
"0.6300564",
"0.6294548",
"0.6284176",
"0.6282088",
"0.62727857",
"0.62720126",
"0.6265465",
"0.625862",
"0.624626",
"0.6246135",
"0.6238229",
"0.6229096",
"0.62285596",
"0.6219518",
"0.6219518",
"0.6209716",
"0.6199977",
"0.6197004",
"0.6184809",
"0.61781263",
"0.61614",
"0.6160074",
"0.61434114",
"0.61434114",
"0.6136281",
"0.6134419",
"0.6134419",
"0.61152166",
"0.6097514",
"0.60949767",
"0.60799533",
"0.606104",
"0.60608983"
] | 0.65695 | 33 |
The final state of the context registry. | Registry getRegistry(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Context() {\n\t\tstates = new ObjectStack<>();\n\t}",
"public State getfinalState(){\n\t\t\treturn finalState;\n\t\t}",
"protected void storeCurrentValues() {\n }",
"@Override\r\n\t\t\tprotected void restoreContext() {\n\t\t\t\t\r\n\t\t\t}",
"public static Object contextToHold () {\n\n return Lists.list ( Reflection.contextToHold (),\n Annotations.contextToHold());\n }",
"public cl_context getContext() {\r\n return context;\r\n }",
"public ContextTypeRegistry getContextTypeRegistry() {\n \t\treturn fContextTypeRegistry;\n \t}",
"@Override\n public Map<String, Object> currentState() {\n\n return new HashMap<>();\n }",
"public Map<String, Object> context() {\n return unmodifiableMap(context);\n }",
"ContextBucket getContext() {\n\treturn context;\n }",
"protected S state() {\n return state;\n }",
"public interface Context {\n\n\tvoid goNext();\n\tvoid setState(State state);\n\tvoid execute();\n\tState getCurrent();\n}",
"public com.google.protobuf.ByteString getContext() {\n return context_;\n }",
"public Map<String, Object> state() {\n return Collections.unmodifiableMap(values);\n }",
"public State() {\r\n this.root = Directory.createRoot();\r\n this.setExit(false);\r\n this.directoryStack = new Stack<>();\r\n this.returnObject = new ReturnObject();\r\n workingDirectory = this.root;\r\n\r\n // Create a new ArrayList for the command history\r\n commandHistory = new ArrayList<>();\r\n }",
"public com.google.protobuf.ByteString getContext() {\n return context_;\n }",
"public T getState() {\r\n\t\treturn state;\r\n\t}",
"@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}",
"CtxState getInitialState();",
"public void initialState() {\n\t\t//empty\n\t}",
"@java.lang.Override public int getContextValue() {\n return context_;\n }",
"@java.lang.Override public int getContextValue() {\n return context_;\n }",
"RegistrationContextImpl(RegistrationContext ctx) {\n this.messageLayer = ctx.getMessageLayer();\n this.appContext = ctx.getAppContext();\n this.description = ctx.getDescription();\n this.isPersistent = ctx.isPersistent();\n }",
"public void saveState() {\n\t\tsuper.saveState();\n\t}",
"public void getState();",
"public final Object getContextInfo() {\n return this.info;\n }",
"@Override\r\n\tpublic Context getContext() {\r\n\t\treturn this.context;\r\n\t}",
"public ImmutableContextSet getContext() {\n return new ImmutableContextSet(this.contextSet);\n }",
"public IRuntimeContext getContext() {\n return fContext;\n }",
"public void pushContext() {\n super.pushContext();\n if (fCurrentContext + 1 == fValidContext.length) {\n boolean[] contextarray = new boolean[fValidContext.length * 2];\n System.arraycopy(fValidContext, 0, contextarray, 0, fValidContext.length);\n fValidContext = contextarray;\n }\n\n fValidContext[fCurrentContext] = true;\n }",
"public Object saveState(FacesContext context) {\n return null;\n }",
"private State getState()\n {\n return state;\n }",
"String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }",
"public List<State> getFinalStates() {\n\t\tif (cachedFinalStates == null) {\n\t\t\tcachedFinalStates = new LinkedList<>(finalStates);\n\t\t}\n\t\treturn cachedFinalStates;\n\t}",
"public boolean isFinalState() {\n return finalState[currentState.getValue()];\n }",
"public ExecutionState getCurrentExecutionState() {\n\t\treturn currentExecutionState;\n\t}",
"public Map<String, Object> getTempState() {\n // Create the tempState if it doesn't exist.\n if (tempState == null)\n tempState = new HashMap<String, Object>();\n return tempState;\n }",
"public ExecuteState() {\r\n PrevPC = 0;\r\n ChangedLoc = -1;\r\n OldInst = new CodeBlueInstruction();\r\n }",
"public int getPreviousContextSize() {\n return this.previousContextSize;\n }",
"public abstract Context context();",
"void resetMachineState(ExecutionContext context) {\r\n synchronized (classLoaderLock) {\r\n if (classLoader == null) {\r\n return;\r\n }\r\n classLoader.resetCachedResults(context);\r\n // Discard the class loader. This will unload all classes in the module and adjunct.\r\n classLoader = null;\r\n }\r\n }",
"private Object getState() {\n\treturn null;\r\n}",
"public interface ContextEvent {\n ContextState getState();\n\n /**\n * Should return last fetched HTML page in string format\n * @return\n */\n String getLastHtml();\n}",
"public STATE getState() {\n return this.lastState;\n }",
"@Override\n public TurnState getNextState() { return new Finalize(); }",
"private void storeViewState()\n\t{\n\t\tCommand lastCmd = project.getLastCommand();\n\t\tif (lastCmd != null)\n\t\t{\n\t\t\tlastCmd.setOptionalState(view.toJSONString(lastCmd.getProjectState()));\n\t\t}\n\t}",
"public String getContext() { return context; }",
"protected final State getState() {\n return state;\n }",
"public State state() {\n return _state;\n }",
"private StateHolder getStateHolder() {\n return stateHolder;\n }",
"public State getMyCurrentState () {\n return myCurrentState;\n }",
"ShapeState getFinalState();",
"public List<Element> getState() {\r\n return savedState_;\r\n }",
"public String getLastEvaluationState() {\n return this.lastEvaluationState;\n }",
"Map<String, Object> getContext();",
"public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}",
"public State getState() {\n return state.get();\n }",
"public String getContext() {\r\n\t\treturn context;\r\n\t}",
"StateClass() {\r\n restored = restore();\r\n }",
"public interface ContextDataRegistry {\n\n\t/**\n\t * Return the project that may be set when this action context is used for a project specific request (e.g.: /api/v2/dummy/nodes..)\n\t * \n\t * @param ac\n\t * @return Project or null if no project has been specified in the given context.\n\t */\n\tHibProject getProject(InternalActionContext ac);\n\n\t/**\n\t * Store the project information in the given context.\n\t * \n\t * @param ac\n\t * @param project\n\t */\n\tvoid setProject(InternalActionContext ac, HibProject project);\n\n\t/**\n\t * Return the branch that may be specified in this action context as query parameter. This method will fail, if no project is set, or if the specified\n\t * branch does not exist for the project When no branch was specified (but a project was set), this will return the latest branch of the project.\n\t * \n\t * @param ac\n\t * @param project\n\t * project for overriding the project set in the action context\n\t * @return branch\n\t */\n\tHibBranch getBranch(InternalActionContext ac, HibProject project);\n}",
"public TState getState() {\n return state;\n }",
"private static void endTenantFlow() {\n Stack<TenantContextDataHolder> contextDataStack = parentHolderInstanceStack.get();\n if (contextDataStack != null) {\n holderInstance.set(contextDataStack.pop());\n }\n }",
"public S getCurrentState();",
"public void onRestorePendingState() {\n }",
"public int getCurrentState() {\n return myState;\n }",
"@Override\n public int getState() {\n return myState;\n }",
"public State getLastState() {\n\t\treturn endState;\r\n\t}",
"@Override\n\tpublic byte[] getCrawlPackageGeneratorState() \n\t{\n\t\treturn null; \n\t}",
"public String getContext() {\n\t\treturn context;\n\t}",
"public IContextInformation getContextInformation()\n {\n return null;\n }",
"public State state() {\n return state;\n }",
"public GlobalState getState() throws IOException {\n StateReponse state = getRequest(\"/state?address=\" + stateAddress, StateReponse.class);\n if (state.getData().size() == 0) {\n // No data, return identity\n return new GlobalState();\n }\n String stateEntry = state.getData().get(0).getData();\n String base64 = new String(Base64.getDecoder().decode(stateEntry));\n return DataUtil.StringToGlobalState(base64);\n }",
"public void reset() {\n context.reset();\n state = State.NAME;\n }",
"@Override\n public String getState()\n {\n return state;\n }",
"public Object getContextObject() {\n return context;\n }",
"protected final TranslationContext context() {\n\t\treturn context;\n\t}",
"public ComponentContext getContext()\n\t{\n\t\treturn context;\n\t}",
"public org.omg.CORBA.Context read_Context() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }",
"@EventListener(ContextRefreshedEvent.class)\n public void contextRefreshEvent() {\n\n MapConfigurationRegistrySingleton.getSingleton()\n .merge(mapConfigurationRegistry);\n }",
"public void switchToGlobalContext(){\n currentConstants = null;\n currentVariables = null;\n\n temporaryConstants = null;\n temporaryVariables = null;\n }",
"public String getReqCurLocState() {\n return reqCurLocState;\n }",
"OperationalState operationalState();",
"OperationalState operationalState();",
"public Context getContext() {\r\n\t\treturn context;\r\n\t}",
"com.google.protobuf.ByteString\n getContextBytes();",
"public Long getState() {\n return state;\n }",
"@Override\n\tpublic String getState() {\n\t\treturn this.state;\n\t}",
"public List <State> getDigest ()\n {\n return digest;\n }",
"public List <State> getDigest ()\n {\n return digest;\n }",
"public boolean isNewContextEntry()\n {\n return false;\n }",
"public STATE getState() {\n\t\n\t\treturn state;\n\t}",
"public int[][] getCurrentState() {\n\t\treturn this.copyState(this.currentState);\n\t}",
"public String getLocalState()\n {\n return localState;\n }",
"List<Integer> getState()\n\t{\n\t\treturn state;\n\t}",
"com.google.protobuf.ByteString getContext();",
"public Contexte() {\n FactoryRegistry registry = FactoryRegistry.getRegistry();\n registry.register(\"module\", new ModuleFactory());\n registry.register(\"if\", new ConditionFactory());\n registry.register(\"template\", new TemplateFactory());\n registry.register(\"dump\", new DumpFactory());\n }",
"public E finishedState() {\r\n\t\treturn this.values[this.values.length - 1];\r\n\t}",
"public Collection<ModuleStateData> getStateData()\r\n {\r\n return myStateData;\r\n }",
"public RCProxyState getState() {\n\t\treturn state;\n\t}",
"public Context getContext() {\n\t\treturn context;\n\t}",
"long getCurrentContext();"
] | [
"0.63771",
"0.60002714",
"0.5995685",
"0.5963004",
"0.57343113",
"0.57143414",
"0.5684997",
"0.56647253",
"0.56570256",
"0.56122345",
"0.56097114",
"0.54695135",
"0.5454498",
"0.54488677",
"0.54477865",
"0.5432697",
"0.54307497",
"0.5369782",
"0.5362812",
"0.53237003",
"0.5271546",
"0.5268098",
"0.52672094",
"0.5263539",
"0.5259256",
"0.5255892",
"0.5253098",
"0.52420884",
"0.52411693",
"0.5228013",
"0.52254826",
"0.52094036",
"0.5195598",
"0.51942277",
"0.5184853",
"0.51823497",
"0.51812315",
"0.5174933",
"0.51546407",
"0.51505524",
"0.51454854",
"0.5141729",
"0.51332915",
"0.5133285",
"0.51317227",
"0.51290834",
"0.5128353",
"0.5122965",
"0.5122277",
"0.51173544",
"0.51167583",
"0.5107844",
"0.5105537",
"0.5101752",
"0.5094492",
"0.50926465",
"0.5086962",
"0.5085743",
"0.5084744",
"0.5073445",
"0.5065301",
"0.5059225",
"0.50549346",
"0.50543576",
"0.5053913",
"0.50484455",
"0.504573",
"0.50424147",
"0.50415885",
"0.5040064",
"0.50350285",
"0.5033711",
"0.5020377",
"0.5015532",
"0.50145185",
"0.50101465",
"0.500918",
"0.5008022",
"0.50008655",
"0.49968043",
"0.49955103",
"0.4993612",
"0.4993612",
"0.49873304",
"0.49862725",
"0.49860233",
"0.49834827",
"0.498291",
"0.498291",
"0.49816504",
"0.49787596",
"0.4976435",
"0.4973035",
"0.49723732",
"0.49674642",
"0.49642813",
"0.49593368",
"0.495605",
"0.4946751",
"0.49442756",
"0.49436852"
] | 0.0 | -1 |
The final state of the request registry. | Registry getRequestRegistry(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RequestState getState() {\r\n\t\treturn state;\r\n\t}",
"public State getfinalState(){\n\t\t\treturn finalState;\n\t\t}",
"public List <State> getRequest ()\n {\n return request;\n }",
"public void requestForgetLastBuildState() {\n \t\trequestForgetState = true;\n \t}",
"public void initialState() {\n\t\t//empty\n\t}",
"public String getReqCurLocState() {\n return reqCurLocState;\n }",
"protected S state() {\n return state;\n }",
"public int getRequestState() {\n\t\treturn _tempNoTiceShipMessage.getRequestState();\n\t}",
"@Override\n public Map<String, Object> currentState() {\n\n return new HashMap<>();\n }",
"public com.bingo.server.msg.REQ.RegistryRequest getRegistry() {\n return registry_ == null ? com.bingo.server.msg.REQ.RegistryRequest.getDefaultInstance() : registry_;\n }",
"public void resultState(SubmitObject submit) {\n\t\tLog.i(TAG, \"CommunicationState: \" + submit.getState().toString());\n\t\tmSubmitService.resultState(submit);\n\t}",
"public STATE getState() {\n return this.lastState;\n }",
"protected boolean isFinalised() {\n return finalised;\n }",
"public void setFinal() {\r\n\t\tthis.isFinal = true;\r\n\t}",
"@Override\r\n\tpublic void exitRequest() {\n\t\t\r\n\t}",
"public final void rq() {\n this.state = 0;\n this.bbo = 0;\n this.bbz = 256;\n }",
"public boolean isFinalState() {\n return finalState[currentState.getValue()];\n }",
"public void recycle()\n\t{\n\t\tparams = null;\n\t\tconfigured = false;\n\t\tattributes = null;\n\t\tmyConfig = null;\n\t\tpreviousRequest = null;\n\t\tmyModel = null;\n\t\tvalidationErrors = new HashMap();\n\t\theaders = null;\n\t\tsource = null;\n\t\tlocale = null;\n\n\t\tif (log.isDebugEnabled())\n\t\t{\n\t\t\tlog.debug(\"Request \" + toString() + \" recycled\");\n\t\t}\n\t}",
"public E finishedState() {\r\n\t\treturn this.values[this.values.length - 1];\r\n\t}",
"public Map<String, Object> state() {\n return Collections.unmodifiableMap(values);\n }",
"public void getState();",
"ResponseState getState();",
"private State getState()\n {\n return state;\n }",
"public List<State> getFinalStates() {\n\t\tif (cachedFinalStates == null) {\n\t\t\tcachedFinalStates = new LinkedList<>(finalStates);\n\t\t}\n\t\treturn cachedFinalStates;\n\t}",
"public CallRegistry() {\n\t\tidGen = new IdGenerator();\n\t\tidGen.reserve(NO_RESPONSE_EXPECTED);\n\t\tcurrentCalls = new LinkedHashMap<Integer, RegisteredCall>();\n\t\tcurrentIteration = new LinkedList<RegisteredCall>();\n\t}",
"public com.bingo.server.msg.REQ.RegistryRequest getRegistry() {\n if (registryBuilder_ == null) {\n return registry_ == null ? com.bingo.server.msg.REQ.RegistryRequest.getDefaultInstance() : registry_;\n } else {\n return registryBuilder_.getMessage();\n }\n }",
"public State getLastState() {\n\t\treturn endState;\r\n\t}",
"@Override\n public String getState()\n {\n return state;\n }",
"public State state() {\n return _state;\n }",
"public Date getLastRequest() {\n\t\treturn _last_request;\n\t}",
"public T getState() {\r\n\t\treturn state;\r\n\t}",
"com.bingo.server.msg.REQ.RegistryRequest getRegistry();",
"public List <State> getDigest ()\n {\n return digest;\n }",
"public List <State> getDigest ()\n {\n return digest;\n }",
"@Override\n\tpublic int getState() {\n\t\treturn 0;\n\t}",
"public final void finalize() {\n if (!this.f5341c) {\n mo12514a(\"Request on the loose\");\n C1264ee.m6818c(\"Marker log finalized without finish() - uncaught exit point for request\", new Object[0]);\n }\n }",
"public Integer getState() {\r\n return state;\r\n }",
"public Integer getState() {\r\n return state;\r\n }",
"public Integer getState() {\n return state;\n }",
"public Integer getState() {\n return state;\n }",
"public Integer getState() {\n return state;\n }",
"public Integer getState() {\n return state;\n }",
"public Integer getState() {\n return state;\n }",
"public Integer getState() {\n return state;\n }",
"public RCProxyState getState() {\n\t\treturn state;\n\t}",
"void state_REQState(){\r\n eccState = INDEX_REQState;\r\n alg_REQAlg();\r\n CNF.serviceEvent(this);\r\n state_START();\r\n}",
"@Override\n\tpublic String getState() {\n\t\treturn this.state;\n\t}",
"private void handleStateReq(StateHeader hdr) {\r\n Address sender=hdr.sender;\r\n if(sender == null) {\r\n if(log.isErrorEnabled())\r\n log.error(\"sender is null !\");\r\n return;\r\n }\r\n\r\n String id=hdr.state_id; // id could be null, which means get the entire state\r\n synchronized(state_requesters) {\r\n boolean empty=state_requesters.isEmpty();\r\n Set<Address> requesters=state_requesters.get(id);\r\n if(requesters == null) {\r\n requesters=new HashSet<Address>();\r\n state_requesters.put(id, requesters);\r\n }\r\n requesters.add(sender);\r\n\r\n if(!isDigestNeeded()) { // state transfer is in progress, digest was already requested\r\n requestApplicationStates(sender, null, false);\r\n }\r\n else if(empty) {\r\n if(!flushProtocolInStack) {\r\n down_prot.down(new Event(Event.CLOSE_BARRIER));\r\n }\r\n Digest digest=(Digest)down_prot.down(new Event(Event.GET_DIGEST));\r\n if(log.isDebugEnabled())\r\n log.debug(\"digest is \" + digest + \", getting application state\");\r\n try {\r\n requestApplicationStates(sender, digest, !flushProtocolInStack);\r\n }\r\n catch(Throwable t) {\r\n if(log.isErrorEnabled())\r\n log.error(\"failed getting state from application\", t);\r\n if(!flushProtocolInStack) {\r\n down_prot.down(new Event(Event.OPEN_BARRIER));\r\n }\r\n }\r\n }\r\n }\r\n }",
"public String getLastEvaluationState() {\n return this.lastEvaluationState;\n }",
"public State state() {\n return state;\n }",
"protected HashSet initReqQueuedHash() {\n return new HashSet();\n }",
"public com.bingo.server.msg.REQ.RegistryRequestOrBuilder getRegistryOrBuilder() {\n return getRegistry();\n }",
"protected final State getState() {\n return state;\n }",
"DNSState getState()\n {\n return state;\n }",
"private Object getState() {\n\treturn null;\r\n}",
"@Override\n\tpublic Request request() {\n\t\treturn originalRequest;\n\t}",
"public int getState() {\n return state_;\n }",
"public int getState() {\n return state_;\n }",
"public int getState() {\n return state_;\n }",
"public int getState() {\n return state_;\n }",
"public int getState() {\n return state_;\n }",
"public void completeRequest() {\n // Clean up any old-age flash scopes\n Map<Integer, FlashScope> scopes = getContainer(request, false);\n if (scopes != null && !scopes.isEmpty()) {\n scopes.values()\n .removeIf(FlashScope::isExpired);\n }\n\n // Replace the request and response objects for the request cycle that is ending\n // with objects that are safe to use on the ensuing request.\n HttpServletRequest flashRequest = FlashRequest.replaceRequest(request);\n HttpServletResponse flashResponse = (HttpServletResponse) Proxy.newProxyInstance(\n getClass().getClassLoader(),\n new Class<?>[]{HttpServletResponse.class},\n new FlashResponseInvocationHandler());\n for (Object o : this.values()) {\n if (o instanceof ActionBean) {\n ActionBeanContext context = ((ActionBean) o).getContext();\n if (context != null) {\n context.setRequest(flashRequest);\n context.setResponse(flashResponse);\n }\n }\n }\n\n // start timer, clear request\n this.startTime = System.currentTimeMillis();\n this.request = null;\n this.semaphore.release();\n }",
"protected void storeCurrentValues() {\n }",
"public void finishedAllRequests() {\n hasMoreRequests = false;\n }",
"@Override\n public int getState() {\n return myState;\n }",
"@Override\n\tpublic Map<String, Object> doComplete() {\n\t\treturn null;\n\t}",
"public void onRestorePendingState() {\n }",
"public void saveState() {\n\t\tsuper.saveState();\n\t}",
"ShapeState getFinalState();",
"public int getState(){\n return state;\n }",
"public STATE getState() {\n\t\n\t\treturn state;\n\t}",
"private StateHolder getStateHolder() {\n return stateHolder;\n }",
"public String finalState() {\r\n\t\tString str = \"Vehicles Processed: count:\" + this.totalVehicleCount\r\n\t\t\t\t+ \", logged: \" + this.dissatifiedVehicles.size()\r\n\t\t\t\t+ \"\\nVehicle Record: \\n\";\r\n\t\tfor (Vehicle v : this.dissatifiedVehicles) {\r\n\t\t\tstr += v.toString() + \"\\n\\n\";\r\n\t\t}\r\n\t\treturn str + \"\\n\";\r\n\t}",
"public int getState(){\n\t\treturn state;\n\t}",
"public int getState() {\n\t\treturn state;\n\t}",
"public int getState() {\n return _state;\n }",
"public S getState() {\r\n\t\treturn state;\r\n\t}",
"public int getState() {return state;}",
"public int getState() {return state;}",
"Object getState();",
"private void storeViewState()\n\t{\n\t\tCommand lastCmd = project.getLastCommand();\n\t\tif (lastCmd != null)\n\t\t{\n\t\t\tlastCmd.setOptionalState(view.toJSONString(lastCmd.getProjectState()));\n\t\t}\n\t}",
"public int getState() {\n return state;\n }",
"public int getState() {\n return state;\n }",
"public List<Element> getState() {\r\n return savedState_;\r\n }",
"public String getState() {\r\n\t\treturn state;\t\t\r\n\t}",
"public List <State> getResponse ()\n {\n return response;\n }",
"@Basic\n\t@Raw\n\tpublic boolean isFinalized() {\n\t\treturn this.finalized;\n\t}",
"public void addFinalState(final State finalState) {\n\t\tcachedFinalStates = null;\n\t\tfinalStates.add(finalState);\n\t\tdistributeStateEvent(new AutomataStateEvent(this, finalState, false, false, true));\n\t}",
"private RequestExecution() {}",
"OperationalState operationalState();",
"OperationalState operationalState();",
"public GhRequest getRequest() {\r\n return localRequest;\r\n }",
"public GhRequest getRequest() {\r\n return localRequest;\r\n }",
"public int getState() {\n \t\treturn state;\n \t}",
"public Long getState() {\n return state;\n }",
"public int getState() {\n return state_;\n }",
"public int getState() {\n return state_;\n }",
"public int getState() {\n return state_;\n }",
"public int getState() {\n return state_;\n }",
"public java.lang.String getState () {\n\t\treturn state;\n\t}"
] | [
"0.642718",
"0.6245829",
"0.5738976",
"0.5644574",
"0.5571294",
"0.5569133",
"0.556603",
"0.5558777",
"0.54437494",
"0.540735",
"0.53580225",
"0.5329091",
"0.531515",
"0.5299737",
"0.52928567",
"0.52911514",
"0.5282476",
"0.52735883",
"0.5269018",
"0.52578557",
"0.52577865",
"0.52435607",
"0.52431124",
"0.5237155",
"0.52013445",
"0.51958936",
"0.5192923",
"0.5180226",
"0.51755154",
"0.517385",
"0.5161253",
"0.5127296",
"0.51233363",
"0.51233363",
"0.5114796",
"0.5111898",
"0.5110238",
"0.5110238",
"0.51088655",
"0.51088655",
"0.51088655",
"0.51088655",
"0.51088655",
"0.51088655",
"0.51082987",
"0.51044637",
"0.51036245",
"0.5103582",
"0.50937754",
"0.5089247",
"0.50850934",
"0.5071186",
"0.5066345",
"0.50624466",
"0.5059929",
"0.50547975",
"0.50452304",
"0.50452304",
"0.50452304",
"0.50452304",
"0.50452304",
"0.5044441",
"0.5032295",
"0.5028843",
"0.50266594",
"0.5022802",
"0.50226957",
"0.50162274",
"0.501361",
"0.5002746",
"0.50010866",
"0.49984375",
"0.49893755",
"0.49859264",
"0.49850926",
"0.49839517",
"0.49826297",
"0.49690685",
"0.49690685",
"0.4966654",
"0.4964396",
"0.49549443",
"0.49549443",
"0.4950261",
"0.49477035",
"0.49455023",
"0.49454606",
"0.49436238",
"0.4943379",
"0.49344683",
"0.49344683",
"0.49275336",
"0.49275336",
"0.49263048",
"0.49247533",
"0.49245238",
"0.49245238",
"0.49245238",
"0.49245238",
"0.49244553"
] | 0.5254951 | 21 |
Indicates whether the result of invoking the handler was that it delegated to a downstream handler. | boolean isCalledNext(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasDelegatedOutput();",
"public boolean hasDelegatedOutput() {\n return delegatedOutput_ != null;\n }",
"public boolean hasDelegatedOutput() {\n return delegatedOutputBuilder_ != null || delegatedOutput_ != null;\n }",
"Boolean isInvokeSuccess();",
"public boolean isHandRaised ( ) {\n\t\treturn extract ( handle -> handle.isHandRaised ( ) );\n\t}",
"private boolean isCallback(IMethodResult result)\n\t{\n\t\treturn (result != null && result.hasCallback());\n\t}",
"public boolean isSubscriptionHandled() {\n return SUBSCRIPTIONHANDLED.equals(message);\n }",
"public boolean isConversing ( ) {\n\t\treturn extract ( handle -> handle.isConversing ( ) );\n\t}",
"public boolean isOnReceiveCalled() {\n return this.f49;\n }",
"boolean hasInvoke();",
"public boolean isTwoHanded()\n/* 84: */ {\n/* 85:75 */ return false;\n/* 86: */ }",
"@Override\n public boolean getResult() {\n return result_;\n }",
"@Override\n public boolean isDone() {\n // boolean result = true;\n // try {\n // result = !evaluateCondition();\n // } catch (Exception e) {\n // logger.error(e.getMessage(), e);\n // }\n // setDone(true);\n // return result;\n // setDone(false);\n return false;\n }",
"public boolean isHandled() {\r\n return handled;\r\n }",
"boolean hasTrickEndedResponse();",
"public boolean isResult() {\n return result;\n }",
"public boolean isSneaking ( ) {\n\t\treturn extract ( handle -> handle.isSneaking ( ) );\n\t}",
"@Override\n public boolean getResult() {\n return result_;\n }",
"@Override\n protected boolean hasReturnedFormDirectCall (MJIEnv env, int objRef){\n ThreadInfo ti = env.getThreadInfo();\n return ti.hasReturnedFromDirectCall(UIACTION);\n }",
"public boolean getCallReturnOnMessage() {\n\t return isCallReturnOnMessage.get();\n\t}",
"boolean hasRoundEndedResponse();",
"protected boolean isFinished() {\n\t\treturn pid.onTarget();\n\t}",
"public boolean isDone()\r\n/* 69: */ {\r\n/* 70:106 */ return isDone0(this.result);\r\n/* 71: */ }",
"public boolean hasDidUri() {\n return deliveryMethodCase_ == 2;\n }",
"boolean isMarkAsResponse();",
"protected boolean isFinished() {\n return m_onTarget;\n }",
"public final boolean isHandled() {\n return this.handled;\n }",
"@Override\n\tpublic boolean isInterestedInSuccess() {\n\t\treturn false;\n\t}",
"public boolean isReturning(){\n\t\treturn returning;\n\t}",
"boolean hasDidUri();",
"public boolean isResult (Object value);",
"@Override\n public boolean isHandled() {\n return handled;\n }",
"public boolean matchResult() {\n return !pathMatchDependencies.isEmpty();\n }",
"public boolean isDone(String requestId);",
"public boolean isSuccess()\r\n/* 79: */ {\r\n/* 80:115 */ Object result = this.result;\r\n/* 81:116 */ if ((result == null) || (result == UNCANCELLABLE)) {\r\n/* 82:117 */ return false;\r\n/* 83: */ }\r\n/* 84:119 */ return !(result instanceof CauseHolder);\r\n/* 85: */ }",
"public boolean isCalled() {\n\t\t\treturn called;\n\t\t}",
"boolean hasReceived();",
"public abstract boolean isCompleted();",
"public boolean isReceived() {\n\t\treturn _received;\n\t}",
"boolean hasReply();",
"boolean isResolveByProxy();",
"public boolean hasReceived() {\n\t if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasReceived()\" );\n Via via=(Via)sipHeader;\n return via.hasParameter(Via.RECEIVED);\n }",
"@Override\n\tprotected void doIsPermitted(String arg0, Handler<AsyncResult<Boolean>> arg1) {\n\t\t\n\t}",
"public boolean hasResult()\n/* */ {\n/* 119 */ return this.result != RESULT_NONE;\n/* */ }",
"public boolean isReturn() {\n return (isReturn);\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean okReveiced () {\n\t\t\treturn resultDetected[RESULT_INDEX_OK];\n\t\t}",
"public boolean isOK() {\n\t\treturn adaptee.isOK();\n\t}",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasReplicateResponse();",
"public boolean isHandled() \n { return (eventAction != null) ? eventAction.isHandled() : false; }",
"public boolean getReturn();",
"boolean isCompleted();",
"protected boolean isFinished() {\n //return controller.onTarget();\n return true;\n }",
"boolean hasResponseMessage();",
"@Override\n protected boolean isFinished() {\n return (m_left_follower.isFinished() || m_right_follower.isFinished());\n }",
"boolean hasInitialResponse();",
"public boolean isReturned() {\r\n\t\treturn isReturned;\r\n\t}",
"@Override\n\t\tpublic boolean isSuccess() {\n\t\t\treturn false;\n\t\t}",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean getResult() {\n return result_;\n }",
"public boolean isSuccess();",
"public boolean isSuccess();",
"public boolean isResponse(){\n return true;\n }",
"public boolean isCallback() {\n return callback;\n }",
"@Override\n public boolean isReturn() {\n return true;\n }",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"public static boolean corectTargetResponse() {\n\t\tif (blockContext.targetCircles[blockContext.exitFlag] == blockContext.clickedCircle) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}",
"public boolean mediate(MessageContext synCtx) {\r\n\r\n SynapseLog synLog = getLog(synCtx);\r\n\r\n if (synLog.isTraceOrDebugEnabled()) {\r\n synLog.traceOrDebug(\"Start : Salesforce mediator\");\r\n\r\n if (synLog.isTraceTraceEnabled()) {\r\n synLog.traceTrace(\"Message : \" + synCtx.getEnvelope());\r\n }\r\n }\r\n\r\n if (synLog.isTraceOrDebugEnabled()) {\r\n synLog.traceOrDebug(\"Start dispatching operation: \"\r\n + operation.getName());\r\n }\r\n\r\n Object result = null;\r\n //delegate salesforce operation for this mediator\r\n try {\r\n result = requestHandler.handle(operation, synCtx);\r\n } catch (SynapseException e) {\r\n synLog.logSynapseException(\"Error Executing Salesforce Mediator.Exiting further processing..\", e);\r\n return false;\r\n }\r\n\r\n if (synLog.isTraceTraceEnabled()) {\r\n synLog.traceTrace(\"Response payload received : \" + result);\r\n }\r\n\r\n if (result != null) {\r\n try {\r\n new ResponseHandler().handle(operation, synCtx, result);\r\n if (log.isDebugEnabled()) {\r\n log.debug(\"Salesforce Response : \" + result);\r\n }\r\n } catch (SynapseException e) {\r\n synLog.logSynapseException(\"Error Executing Salesforce Mediator Response processing.\", e);\r\n return true;\r\n }\r\n } else {\r\n synLog.traceOrDebug(\"Service returned a null response\");\r\n }\r\n\r\n if (synLog.isTraceOrDebugEnabled()) {\r\n synLog.traceOrDebug(\"End dispatching operation: \"\r\n + operation.getName());\r\n }\r\n\r\n if (synLog.isTraceOrDebugEnabled()) {\r\n\r\n synLog.traceOrDebug(\"End : Salesforce mediator\");\r\n }\r\n\r\n return true;\r\n }",
"@Override\n\tpublic boolean isEventComplete() {\n\t\treturn status==EventCompleted;\n\t}",
"@java.lang.Override\n public boolean hasDidUri() {\n return deliveryMethodCase_ == 2;\n }",
"boolean isForwarding();",
"private static boolean isDone0(Object result)\r\n/* 74: */ {\r\n/* 75:110 */ return (result != null) && (result != UNCANCELLABLE);\r\n/* 76: */ }",
"public boolean result () {\n return m_result;\n }",
"public boolean getResult() {\n\t\tif (stack.size() != 1) {\n\t\t\tthrow new IllegalStateException(\"Stack size mismatch\");\n\t\t}\n\t\t\n\t\treturn stack.peek();\n\t}",
"public boolean actionCompleted() {\n return !mAttacking;\n }"
] | [
"0.6527833",
"0.6332099",
"0.61238027",
"0.59459764",
"0.58192825",
"0.57962084",
"0.57313836",
"0.562671",
"0.54849154",
"0.54096615",
"0.5409118",
"0.53905517",
"0.53711885",
"0.53674936",
"0.5363202",
"0.535215",
"0.5348803",
"0.53460765",
"0.53387386",
"0.5299306",
"0.52718747",
"0.5268311",
"0.525837",
"0.52574116",
"0.5254022",
"0.5253101",
"0.52486944",
"0.52478313",
"0.5239452",
"0.52318466",
"0.521651",
"0.5180751",
"0.5180552",
"0.51788676",
"0.51728666",
"0.5170265",
"0.5168904",
"0.5161064",
"0.51439506",
"0.514296",
"0.5126002",
"0.5120895",
"0.51162225",
"0.51149315",
"0.5113106",
"0.5103108",
"0.5103108",
"0.5103108",
"0.5103108",
"0.5099731",
"0.50890505",
"0.50857466",
"0.50857466",
"0.50857466",
"0.50857466",
"0.50857466",
"0.50857466",
"0.50857466",
"0.50857466",
"0.50857466",
"0.50857466",
"0.50857466",
"0.50857466",
"0.5082633",
"0.5081726",
"0.50785035",
"0.50757104",
"0.50567424",
"0.50466955",
"0.50444746",
"0.5040385",
"0.5036234",
"0.50319743",
"0.5030581",
"0.5030581",
"0.5030581",
"0.5030581",
"0.50230765",
"0.50230765",
"0.50204796",
"0.5016646",
"0.5010368",
"0.5009905",
"0.5009905",
"0.5009905",
"0.5009905",
"0.5009905",
"0.5009905",
"0.5009905",
"0.5009905",
"0.5009905",
"0.49923784",
"0.49895623",
"0.49667215",
"0.49639213",
"0.49500638",
"0.4947191",
"0.49471116",
"0.49463817",
"0.49382657"
] | 0.56862915 | 7 |
we will call printArray method | public static void print2Arrays2(int[]arrNums1,int[]arrNums2) {
if (arrNums1.length>arrNums2.length) {
printArray(arrNums1);
printArray(arrNums2);
} else {
printArray(arrNums2);
printArray(arrNums1);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void showArray() {\n\t\tSystem.out.println(Arrays.toString(this.array));\n\n\t}",
"public void print()\n\t{\n\t\tStringBuffer print = new StringBuffer();\n\t\tif (arraySize != 0)\n\t\t{\n\t\t\tfor (int index = 0; index < arraySize - 1; index++) \n\t\t\t{ \n\t\t\t\tprint.append(array[index] + \", \");\n\t\t\t}\n\t\t\tprint.append(array[arraySize - 1]);\n\t\t\tSystem.out.println(print.toString());\n\t\t}\n\t}",
"public void printArray()\n {\n for (int i=0;i<array.length; i++)\n {\n System.out.print(array[i] + \" \"); \n }\n System.out.println();\n }",
"static void printArray(Comparable[] arr) {\n\t\tint n = arr.length;\n\t\tfor (int i = 0; i < n; ++i)\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\tSystem.out.println();\n\t}",
"public void printArrays() {\n for (ArraySymbol as: arrays) {\n System.out.println(as);\n }\n }",
"private static void printArray(Object[] array) {\n for (Object t : array) {\n System.out.println(\" \" + t + \", \");\n }\n }",
"private static void printArray(Integer[] a) {\n\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\tSystem.out.print(a[k] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"private static void printArray(int[] a) {\n\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\tSystem.out.print(a[k] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void printArray(){\n\n\t\tfor (int i=0;i<1;i++){\n\n\t\t\tfor (int j=0;j<population[i].getLength();j++){\n\n\t\t\t\tSystem.out.println(\"X\" + j + \": \" + population[i].getX(j) + \" \" + \"Y\"+ j + \": \" + population[i].getY(j));\n\t\t\t\tSystem.out.println();\n\n\t\t\t}//end j\n\n\t\t\tSystem.out.println(\"The duplicate count is: \" + population[i].duplicateCheck());\n\t\t\tSystem.out.println(\"The fitness is \" + population[i].computeFitness());\n\t\t\t//population[i].computeFitness();\n\n\t\t}//end i\n\n\t}",
"public static void printArray(int[] array){\n for(int i=0;i<array.length;i++){\n System.out.print(array[i]+\" \");\n }}",
"private static void printArray(int[] arr) {\n\t\tSystem.out.println(\"array is \");\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"void printArray(CatalogueItem arr[])\r\n {\r\n int n = arr.length;\r\n for (int i=0; i<n; ++i)\r\n System.out.print(\r\n \"id: \" + arr[i].getItemId() + \" \"\r\n + \"name: \" + arr[i].getItemName() + \" \"\r\n + \"category: \" + arr[i].getCategory() + \"\\n\");\r\n System.out.println();\r\n System.out.println();\r\n }",
"static void printArray(int arr[]) \n\t { \n\t\t int n = arr.length; \n\t\t for (int i=0; i<n; ++i) \n\t\t\t System.out.print(arr[i] + \" \"); \n\t\t System.out.println(); \n\t }",
"private static void printArray(int[] array) {\n\t\tfor(int i: array) {\n\t\t\tSystem.out.print(i + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"static void print(int[] array)\n\t{\n\t\tfor(int i = 0; i < array.length; i++)\n\t\t{\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}",
"private void displayArray() {\r\n System.out.println(\"CEK ARRAY : \");\r\n for (i = 0; i < array.length; i++) {\r\n System.out.print(array[i]+\",\");\r\n }\r\n }",
"private static void print(int[] arr) {\n\t\tfor(int i=0;i<=arr.length;i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(arr[i]+\" \");\r\n\t\t}\r\n\t}",
"static void printArray(int[] array) {\n\n\n for (int i = 0; i < array.length; i++) {\n\n System.out.print(array[i] + \" \");\n\n\n }\n\n System.out.println();\n\n }",
"public void printArray(int array[]) {\n\t\tfor(int i = 0;i<array.length;i++) {\n\t\t\tSystem.out.println(\"Array[\"+ (i+1) +\"] = \"+array[i]);\n\t\t}\n\t}",
"private static void printArrayTraversal() {\n for (int i = 0; i < traversalLength; i++)\n System.out.print(arrayTraversal[i] + \" \");\n }",
"public void print() \r\n\t{\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Starting print\");\r\n\t\t}\r\n\t\t\r\n\t\tfor (int index = 0; index < count; index++) \r\n\t\t{\r\n\t\t\tif (index % 5 == 0) \r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\tif(debug)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\\nDebug - numArray[index] = \" + numArray[index]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.print(numArray[index] + \"\\t\");\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Ending print\");\r\n\t\t}\r\n\t}",
"public void print() {\r\n\t\tfor (int i = front; i <= rear; i++) {\r\n\t\t\tSystem.out.print(arr[i].getData() + \"\\t\");\r\n\t\t}\r\n\t}",
"static void printArray(int arr[]) {\n int n = arr.length;\n for (int i = 0; i < n; ++i)\n System.out.print(arr[i] + \" \");\n \tSystem.out.println();\n }",
"private static void printArray(int[] integerArray) \n\t{\n\t\t\n\t\tfor (int i = 0; i < integerArray.length; i++)\n\t\t{\n\t\t\tSystem.out.println(integerArray[i]);\n\t\t}\n\t\t\n\t}",
"public static void printArray(double[] array){\n for(int k = 0; k < array.length; k++){\n System.out.print(array[k] + \" \");\n }\n System.out.println();\n }",
"private static void printArray(Node[][] puzzle) {\r\n\t\tfor (int i = 0; i < puzzle.length; i++) {\r\n\t\t\tfor (int j = 0; j < puzzle[0].length; j++) {\r\n\t\t\t\tSystem.out.print(puzzle[i][j].getValue());\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t}",
"public static void printArray(int[] array)\r\n {\r\n //Loop through array and print each individual element\r\n for (int n=0; n < array.length; ++n)\r\n {\r\n System.out.println(array [n]); \r\n \r\n }\r\n \r\n }",
"public static void printArray(double[] array) {\r\n\r\n for (int i = 0; i < array.length; i++) {\r\n System.out.print(\"[\" + array[i] + \"] \");\r\n }\r\n System.out.println(\"\");\r\n }",
"static void printArray(int arr[]) {\n\t\tint n = arr.length;\n\t\tfor (int i = 0; i < n; ++i)\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\tSystem.out.println();\n\t}",
"static void printArray(int[] arr) {\n for (int item : arr) {\n System.out.print(item+ \" \");\n }\n }",
"private static void print(int[] a) {\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tSystem.out.println(\"i is \"+ i +\" value is \"+ a[i]);\n\t\t}\n\t}",
"static void printArray(int arr[]) \n { \n for (int i = 0; i < arr.length; i++) \n System.out.print(arr[i] + \" \"); \n }",
"public void printAll(){\nfor(int i=0;i<size ;i++){\n System.out.println(\"a[%d]\"+data[i]); \n}\n System.out.println(\"size\"+size); \n}",
"public static void printArray(int[] arr)\n {\n int i;\n // your code goes here\n for(i = 0;i< arr.length;i++)\n {\n\t\t System.out.println(arr[i]);\n }\n \n \n }",
"public static void printArray(int[] arr) {\n System.out.println(\"===\");\n for (int i = 0; i < arr.length; i++) {\n System.out.println(arr[i]);\n }\n System.out.println(\"===\");\n }",
"public void print() {\n\t\t\tfor (int i = 0; i < nowLength; i++) {\n\t\t\t\tSystem.out.print(ray[i] + \" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}",
"static void printArray(int arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i]+\" \");\n System.out.println();\n }",
"public static void printArray(Object[][] dataArray) {\n\t\t\n\t\tif (dataArray == null) {\n\t\t\tSystem.out.print(\"Empty Array\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint rows = dataArray.length;\n\t\tint cols = dataArray[0].length;\n\t\t\n\t\tSystem.out.print(\"\\nData: \\n\");\n\t\tSystem.out.print(\"Number of Rows: \" + (rows) + \" \\n\");\n\t\tSystem.out.print(\"Number of Columns: \" + (cols) + \" \\n\\n\");\n\t\n\t\tfor (int i = 0; i < rows ; i++) { \n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tSystem.out.print(dataArray[i][j].toString() + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}",
"public static void printArray(Cell[] arr) {\r\n\t\tConstants.logger.info(\"\\nWhole Field as single Array[\");\r\n\t\tfor (int j = 0; j < arr.length; j++) {\r\n\t\t\tSystem.out.print(arr[j]);\r\n\t\t}\r\n\t\tConstants.logger.info(\"]\\n\");\r\n\t}",
"public void printArray(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n System.out.print(arr[i] + \" \");\n }\n }",
"public static void printArray(int[] a) {\n System.out.print(\"{\" + a[0]);\n for (int i = 1; i < a.length; i++) {\n System.out.print(\", \" + a[i]);\n }\n System.out.println(\"}\");\n }",
"public static void printArray(String[] dataArray) {\n\t\t\n\t\tif (dataArray == null) {\n\t\t\tSystem.out.print(\"Empty Array\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint length = dataArray.length;\n\t\t\n\t\tSystem.out.print(\"\\nData: \\n\");\n\t\tSystem.out.print(\"Number of Entries: \" + (length) + \" \\n\");\n\t\t\n\t\tfor (int i = 0; i < length ; i++) { \n\t\t\tSystem.out.print(dataArray[i].toString() + \"\\t\");\n\t\t}\n\t\tSystem.out.print(\"\\n\");\n\t}",
"public static void printArray( int[] a ) {\n\tSystem.out.print(\"[\");\n\tfor( int i : a )\n\t System.out.print( i + \",\");\n\tSystem.out.print(\"]\");\n }",
"static void printArray(int arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i] + \" \");\n System.out.println();\n }",
"void printArray(int[] arr) {\n\t\tfor (int ele : arr) {\n\t\t\tSystem.out.print(ele + \" \");\n\t\t}\n\t}",
"public static void printArray( int[] a ) {\n\tSystem.out.print(\"[\");\n\tfor( int i : a )\n\t System.out.print( i + \",\");\n\tSystem.out.println(\"]\");\n }",
"static void printArray(int[] arr) {\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif (i != arr.length - 1)\n\t\t\t\tSystem.out.print(arr[i] + \", \");\n\t\t\telse\n\t\t\t\tSystem.out.print(arr[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printArray( int[] a ) {\n System.out.print(\"[\");\n for( int i : a )\n System.out.print( i + \",\");\n System.out.println(\"]\");\n }",
"public static void printArray( int[] a ) {\n System.out.print(\"[\");\n for( int i : a )\n System.out.print( i + \",\");\n System.out.println(\"]\");\n }",
"static void printArray(int arr[], int size)\n {\n int i;\n for (i = 0; i < size; i++)\n System.out.print(arr[i] + \" \");\n System.out.println();\n }",
"static void printArray(int arr[], int size)\n {\n int i;\n for (i = 0; i < size; i++)\n System.out.print(arr[i] + \" \");\n System.out.println();\n }",
"private static void printArray(int[] array) {\n\t\tif(array==null){\n\t\t\tSystem.out.println(\"Nothing in the array.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint Len = array.length;\n\t\tfor(int i=0; i<Len; i++){\n\t\t\tSystem.out.print(\" \" + array[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}",
"public static void printArray(int[] array) {\r\n\t\tSystem.out.print(\"4. All values stored in the array is: \");\r\n\t\tfor (int i = 0; i < myList.length; i++) {\r\n\t\t\tSystem.out.print(myList[i] + \" \");\r\n\t\t}\r\n\t}",
"static void printArray(int arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i] + \" \");\n\n System.out.println();\n }",
"public static <T> void printArray(T[] array){\n for(int i=0;i<array.length;i++){\n System.out.println(array[i]);\n }\n }",
"private static void printIntArray(int[] arr){\n\t\tSystem.out.print(\"[ \");\n\t\tfor(Integer i : arr){\n\t\t\tSystem.out.print(i + \" \");\n\t\t}\n\t\tSystem.out.println(\" ]\");\n\t}",
"private static void writeArray(int[] randomArray) {\n\t\tfor (int i = 0; i < randomArray.length; i++) {\r\n\t\t\tSystem.out.print(\" \" + i + \" . eleman :\" + randomArray[i]);\r\n\t\t}\r\n\t}",
"void printArray(int arr[]) {\r\n\r\n //enhanced for loop\r\n for (int item:arr) {\r\n System.out.print(item + \" \");\r\n }\r\n System.out.println();\r\n }",
"public void print() {\n for (int i = 0; i < size; i++)\n System.out.print(elements[i] + \" \");\n System.out.println();\n }",
"static void printArray(int arr[], int size)\r\n {\r\n int i;\r\n for (i=0; i < size; i++)\r\n System.out.print(arr[i] + \" \");\r\n System.out.println(\"\");\r\n }",
"public static void printArray(int[] a) {\n for (int el : a) {\n System.out.print(el + \" \");\n }\n System.out.println();\n }",
"public void print () \r\n\t{\r\n\t\tfor (int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\tif (index % 5 == 0) // print 5 columns\r\n\t\t\t\tSystem.out.println();\r\n\r\n\t\t\tSystem.out.print(array[index] + \"\\t\");\t// print next element\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"public static void printArray(int[] array){\n\n for(int i = 0 ; i < array.length; i++){\n System.out.println(\"Element \" + i + \", value is \" + array[i]);\n }\n\n }",
"public static void printArray(int[] arr) {\n String output = \"[ \";\n for (int i = 0; i < arr.length; i++) {\n if (i != 0) {\n output += \", \" + arr[i];\n }\n else {\n output += arr[i];\n }\n }\n output += \" ]\";\n System.out.println(output);\n }",
"void printArray(Integer arr[])\n {\n int n = arr.length;\n for (int i=0; i<n; ++i)\n System.out.print(arr[i] + \" \");\n System.out.println();\n System.out.println();\n }",
"public static void printArray(int[] arr) {\n\t\t\t\t\tfor (int j = 0; j < arr.length - 1; j++) {\n\t\t\t\t\t\tSystem.out.print(arr[j] + \", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(arr[arr.length - 1]);\n\t\t\t\t}",
"public static void printArray(int[] array) {\n \n for (int i = 0; i < array.length; i++) {\n \n System.out.println(\"array[\" + i + \"] = \" + array[i]);\n }\n }",
"static void writearray(String[]array) {\n\t\t for (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}",
"public static void printArray(String[] arr) {\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t\t}\n\t}",
"public void print(){\n\t\tfor (int i=0; i<_size; i++){\n\t\t\tSystem.out.print(_a[i].getKey()+\"; \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printArray(double[] a) {\n\t\tfor(int i=0;i<a.length;i++) {\n\t\t\tSystem.out.format(\"%.2f \",a[i]);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"@Override\n public void run() {\n\tInteger[] array1 = {1,2,3};\n\tString[] array2 = {\"Vipul\",\"Ankita\"};\n\tprint(array1);\n\tprint(array2);\n\t\n }",
"public void printArray(int [] array) {\n\t\t\n\t\tfor(int i =0; i<array.length; i++) {\n\t\t\tSystem.out.print(array[i] + \" \");\n\t\t}\n\t}",
"public static void printIntArray(int[] array){\n for(int i = 0; i < array.length; i++)\n System.out.print(\"[\" + i + \"]\" + \" = \" + array[i] + \" \");\n }",
"public void print(){\n\t\tif(isEmpty()) System.out.println(\"[vazio]\");\n\t\telse{\n\t\t\tSystem.out.print(\"A = [\" + A[0]);\n\t\t\tfor(int i=1; i<size; i++)\n\t\t\t\tSystem.out.print(\", \"+ A[i]);\n\t\t\tSystem.out.println(\"]\");\n\t\t}\n\t}",
"public static void printArray(int[] array) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.print(\"array = [\");\r\n\t\tfor (int i=0; i < SIZE_OF_ARRAY-1; i++)\r\n\t\t\tSystem.out.print(\"\"+ array[i]+\" | \");\r\n\t\tSystem.out.println(\"\"+ array[SIZE_OF_ARRAY-1]+\"]\");\r\n\t\tSystem.out.println(\"-------------------------------------------------\"\r\n\t\t\t\t+ \"-------------------\");\r\n\t}",
"static void printArray(char [] a) {\n\t\tfor (int i=0; i< a.length; i++) System.out.print(a[i]); \n\t\tSystem.out.println();\n\t}",
"void printArray(int[] arrayNum, int arrayLength) {\n\t\t\t\tSystem.out.print(\"Given Array of integer is = \" + \"{\");\n\n\t\t\t\tfor (int i = 0; i != arrayLength;) {\n\t\t\t\t\tSystem.out.print(arrayNum[i]);\n\t\t\t\t\t++i;\n\t\t\t\t\tif (i < arrayLength)\n\t\t\t\t\t\tSystem.out.print(\" , \");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"}\");\n\t\t\t}",
"public static void printArray(int[] array) {\n\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.print(array[i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"static void print (String[] A) {\n\t\tfor(int i = 0; i < A.length; i++) {\n\t\t\tSystem.out.print(A[i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printArray(int[] arr, int size) {\n for (int i = 0; i < size; i++)\n System.out.print(arr[i] + \" \");\n }",
"public void printIntArray(int[] arr) {\n\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\tSystem.out.print(arr[i] + \" \");\n\t}",
"public void display() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tSystem.out.print(a[i] + \"\\t\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public static void printArray(int[][] Array) {\r\n\t\t\tfor (int i = 0; i < Array.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < Array[0].length; j++) {\r\n\t\t\t\t\tSystem.out.print(Array[i][j] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}",
"public void printArray(long[] array) {\n System.out.println(Arrays.toString(array));\n }",
"public void print() {\r\n\r\n\t\tfor (int row=0; row<10; row++) \r\n\t\t{\r\n\t\t\tfor (int col=0; col<10; col++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"\\t\"+nums[row][col]); //separated by tabs\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"private static void show(Comparable[] a) {\n for (int i = 0; i < a.length; i++) {\n System.out.printf(\"a[%d] = %s\\n\", i + 1, a[i].toString());\n }\n System.out.println();\n }",
"public void displayArray(Cell[][] cells);",
"public void print() {\r\n System.out.print(\"[id: <\" + this.id + \"> \");\r\n if (this.dimension > 0) {\r\n System.out.print(this.data[0]);\r\n }\r\n for (int i = 1; i < this.dimension * 2; i++) {\r\n System.out.print(\" \" + this.data[i]);\r\n }\r\n System.out.println(\"]\");\r\n }",
"public void print(String[] a){\n\t\tfor(int i = 0; i < a.length; i++){\n\t\t\tSystem.out.print(a[i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void print() {\n\t\tfor (int i = 0; i < TABLE_SIZE; i++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tif (array[i] != null) {\n\t\t\t\tSystem.out.print(array[i].value);\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.print(\"|\\n\");\n\t}",
"public static void printArray(int[] arr) {\r\n\t\tfor (int element : arr) {\r\n\t\t\tSystem.out.print(element + \" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t}",
"public static void printArray(int[] array)\n {\n for (int value : array)\n System.out.print(value + \" \");\n System.out.println();\n }",
"public static void printArray(String[] array){\n int noOfElement=array.length; // Number of element is the length of this array\n for(int i=0;i<array.length;i++){ // print out the each element in array with \" \"(space) splitting\n System.out.print(array[i]+\" \");}}",
"public static void printArray(int[] grades){\n int arraylength=grades.length;//find length of input array\n for (int i=0; i<=arraylength-1;i++){\n //print out elements\n System.out.print(grades[i]+\" \");\n }\n System.out.println();//print new lnie\n }",
"public static void printArray(int[][] twoDArray) {\n\t\tfor (int i = 0; i < twoDArray.length; i++) {\n\t\t\tSystem.out.println(Arrays.toString(twoDArray[i]));\n\t\t}\n\t}",
"public static void printArr(int[] arr){\n int i;\n System.out.print(\"Array { \");\n for(i = 0; i < n; i++){\n System.out.print(arr[i] + ((i < n - 1)? \",\":\"\") + \" \");\n }\n System.out.println(\"}\");\n }",
"public static void printArrays() {\r\n\t\tIterator it = arrayMap.entrySet().iterator();\r\n\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry<Integer, ArrayList<Integer>> pair = (Map.Entry<Integer, ArrayList<Integer>>) it\r\n\t\t\t\t\t.next();\r\n\t\t\tArrayList<Integer> list = pair.getValue();\r\n\t\t\tIterator liter = list.iterator();\r\n\t\t\twhile (liter.hasNext()) {\r\n\t\t\t\tSystem.out.print(liter.next() + \" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public static <T> void printArray(T[] arr){\n for(T t: arr){\n System.out.println(t);\n }\n }",
"private void showArray(ArrayList<String[]> arr) {\n for(String[] row: arr){\n for(String x: row){\n System.out.print(x + \"\\t\\t\");\n }\n System.out.println();\n } \n System.out.println(\"------------------------------------\");\n }",
"static void printArr(int arr[], int N) { \n\t\tupdateArray(arr, N); \n\t\tfor (int i = 0; i < N; i++) \n\t\t\tSystem.out.print(\"\"+arr[i]+\" \"); \n\t\tSystem.out.print(\"\\n\"); \n\t}"
] | [
"0.79226714",
"0.7779714",
"0.76784766",
"0.7598401",
"0.75667435",
"0.7476025",
"0.74279404",
"0.74054825",
"0.7355616",
"0.73555684",
"0.7308912",
"0.7300225",
"0.7295098",
"0.7259177",
"0.7246119",
"0.7245488",
"0.7238886",
"0.72303075",
"0.7222786",
"0.71794856",
"0.71515507",
"0.71514666",
"0.7144197",
"0.71292794",
"0.71261305",
"0.7119833",
"0.7109235",
"0.7107655",
"0.7104574",
"0.71037096",
"0.7100788",
"0.70959705",
"0.70929825",
"0.7083852",
"0.707172",
"0.70699674",
"0.7056711",
"0.70410454",
"0.70371646",
"0.7035666",
"0.7035661",
"0.70341134",
"0.70277256",
"0.70265174",
"0.70224434",
"0.7012232",
"0.7007548",
"0.70025176",
"0.70025176",
"0.700229",
"0.700229",
"0.7001318",
"0.70003575",
"0.6993618",
"0.69810927",
"0.6976716",
"0.6972566",
"0.697222",
"0.6955004",
"0.69540167",
"0.69353974",
"0.69298303",
"0.6914446",
"0.69071394",
"0.68966985",
"0.68929905",
"0.68851393",
"0.6885079",
"0.6878978",
"0.68789035",
"0.68771696",
"0.68685174",
"0.68659526",
"0.68581367",
"0.68550223",
"0.68427473",
"0.68361044",
"0.6829226",
"0.6787089",
"0.6787077",
"0.67853266",
"0.67676574",
"0.67534846",
"0.67532116",
"0.675089",
"0.6746568",
"0.6742802",
"0.6742454",
"0.6740459",
"0.67326224",
"0.6731231",
"0.6719271",
"0.6712141",
"0.6711842",
"0.6703256",
"0.669995",
"0.6698252",
"0.6698225",
"0.6688056",
"0.66695905",
"0.6649711"
] | 0.0 | -1 |
different amount of parameters | ConstuctorOverloading(){
System.out.println("I am non=argument constructor");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Result mo5059a(Params... paramsArr);",
"@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}",
"private void countParams() {\n if( paramCount >= 0 ) {\n return;\n }\n Iterator<AnyType> parser = name.getSignature( types );\n paramCount = needThisParameter ? 1 : 0;\n while( parser.next() != null ) {\n paramCount++;\n }\n valueType = parser.next();\n while( parser.hasNext() ) {\n valueType = parser.next();\n paramCount--;\n }\n }",
"@Override\n\tprotected void initParams() {\n\t\t\n\t}",
"ParameterList getParameters();",
"public int getNumberParameters() { return parameters.length; }",
"int getParametersCount();",
"int getParametersCount();",
"void setParameters() {\n\t\t\n\t}",
"int getParamsCount();",
"private String[] getParams(int amount) {\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tString letters[] = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\"};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tlist.add(\"-\" + letters[i]);\r\n\t\t\tlist.add(paramArray[i]);\r\n\t\t}\r\n\t\treturn list.toArray(new String[0]);\r\n\t}",
"public void getParameters(Parameters parameters) {\n\n }",
"@Parameters\n\tpublic static Collection<ByteBuf> getParams(){\n\t\tByteBuf full = Unpooled.buffer(128);\n\t\tfull.writeInt(0);\n\t\tfull.writeInt(1);\n\t\t\n\t\tByteBuf ill = Unpooled.buffer(128);\n\t\till.writeInt(10);\n\t\t\n\t\treturn Arrays.asList(new ByteBuf[] {\n\t\t\tfull,\n\t\t\till,\n\t\t\tUnpooled.buffer(128),\n\t\t\tnull,\n\t\t});\n\t}",
"String [] getParameters();",
"int getNumParameters();",
"private void initParameters() {\n Annotation[][] paramsAnnotations = method.getParameterAnnotations();\n for (int i = 0; i < paramsAnnotations.length; i++) {\n if (paramsAnnotations[i].length == 0) {\n contentBuilder.addUnnamedParam(i);\n } else {\n for (Annotation annotation : paramsAnnotations[i]) {\n Class<?> annotationType = annotation.annotationType();\n if (annotationType.equals(PathParam.class)\n && pathBuilder != null) {\n PathParam param = (PathParam) annotation;\n pathBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(QueryParam.class)) {\n QueryParam param = (QueryParam) annotation;\n queryBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(HeaderParam.class)) {\n HeaderParam param = (HeaderParam) annotation;\n headerBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(NamedParam.class)) {\n NamedParam param = (NamedParam) annotation;\n contentBuilder.addNamedParam(param.value(), i);\n } else {\n contentBuilder.addUnnamedParam(i);\n }\n }\n }\n }\n }",
"@Override\n\t\tpublic void setParameters(Object[] parameters) {\n\t\t\t\n\t\t}",
"public Variable[] getParameters();",
"protected void setupParameters() {\n \n \n\n }",
"public Parameters getParameters();",
"public int getNumOfParams() { return params.length; }",
"public void getParameters(Parameters parameters) {\n\n\t}",
"public Map getParameters();",
"public static void setConstantAkParam(String parameter, int[] values)\n {\n int i = 0;\n if (parameter.equalsIgnoreCase(\"genb\"))\n {\n DsLog.log1(LOG_TAG, \"The number of GEq bands is \" + values[0]);\n i = getAkParamIndex(\"gebf\");\n akParams_[i].len = values[0];\n i = getAkParamIndex(\"gebg\");\n akParams_[i].len = values[0];\n i = getAkParamIndex(\"vcbf\");\n akParams_[i].len = values[0];\n i = getAkParamIndex(\"vcbg\");\n akParams_[i].len = values[0];\n i = getAkParamIndex(\"vcbe\");\n akParams_[i].len = values[0];\n akParam_genb_ = values[0];\n }\n else if (parameter.equalsIgnoreCase(\"ienb\"))\n {\n DsLog.log1(LOG_TAG, \"The number of IEq bands is \" + values[0]);\n i = getAkParamIndex(\"iebf\");\n akParams_[i].len = values[0];\n i = getAkParamIndex(\"iebt\");\n akParams_[i].len = values[0];\n akParam_ienb_ = values[0];\n }\n else if (parameter.equalsIgnoreCase(\"aonb\"))\n {\n DsLog.log1(LOG_TAG, \"The number of Audio Optimizer bands is \" + values[0]);\n i = getAkParamIndex(\"aobf\");\n akParams_[i].len = values[0];\n i = getAkParamIndex(\"aobg\");\n akParams_[i].len = (values[0] + 1) * AKPARAM_AOCC;\n i = getAkParamIndex(\"arbf\");\n akParams_[i].len = values[0];\n i = getAkParamIndex(\"arbi\");\n akParams_[i].len = values[0];\n i = getAkParamIndex(\"arbl\");\n akParams_[i].len = values[0];\n i = getAkParamIndex(\"arbh\");\n akParams_[i].len = values[0];\n akParam_aonb_ = values[0];\n }\n else if (parameter.equalsIgnoreCase(\"gebf\"))\n {\n DsLog.log1(LOG_TAG, \"Initializing the graphic equalizer band center frequencies\");\n akParam_gebf_ = values;\n }\n\n // Define all the allowed settings once all the key parameters are settled down.\n if (!constantAkParamsDefined_ && akParam_genb_ != -1 && akParam_ienb_ != -1 && akParam_aonb_ != -1 && akParam_gebf_ != null)\n {\n defineSettings();\n constantAkParamsDefined_ = true;\n }\n }",
"private static void variosParametros(String nombre, int ... numeros){\n System.out.println(\"nombre = \" + nombre);\n imprimirNumeros(numeros);\n }",
"INDArray getParams();",
"@Override\n\tpublic ParameterSet requiredParameters()\n\t{\n\t\t// Parameter p0 = new\n\t\t// Parameter(\"Dummy Parameter\",\"Lets user know that the function has been selected.\",FormLine.DROPDOWN,new\n\t\t// String[] {\"true\"},0);\n\t\tParameter p0 = getNumThreadsParameter(10, 4);\n\t\tParameter p1 = new Parameter(\"Old Min\", \"Image Intensity Value\", \"0.0\");\n\t\tParameter p2 = new Parameter(\"Old Max\", \"Image Intensity Value\", \"4095.0\");\n\t\tParameter p3 = new Parameter(\"New Min\", \"Image Intensity Value\", \"0.0\");\n\t\tParameter p4 = new Parameter(\"New Max\", \"Image Intensity Value\", \"65535.0\");\n\t\tParameter p5 = new Parameter(\"Gamma\", \"0.1-5.0, value of 1 results in no change\", \"1.0\");\n\t\tParameter p6 = new Parameter(\"Output Bit Depth\", \"Depth of the outputted image\", Parameter.DROPDOWN, new String[] { \"8\", \"16\", \"32\" }, 1);\n\t\t\n\t\t// Make an array of the parameters and return it\n\t\tParameterSet parameterArray = new ParameterSet();\n\t\tparameterArray.addParameter(p0);\n\t\tparameterArray.addParameter(p1);\n\t\tparameterArray.addParameter(p2);\n\t\tparameterArray.addParameter(p3);\n\t\tparameterArray.addParameter(p4);\n\t\tparameterArray.addParameter(p5);\n\t\tparameterArray.addParameter(p6);\n\t\treturn parameterArray;\n\t}",
"@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noofconflicts);\n String checkconflicts = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"checkconflicts\", checkconflicts);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=0;m<noofstudent;m++){\n params.put(\"sid[\"+m+\"]\",sid[m]);\n }\n\n\n return params;\n }",
"protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}",
"@Override\n\tpublic int parametersCount() {\n\t\treturn 0;\n\t}",
"public void setParameters(int m, int r, int n){\n\t\t//Correct for invalid parameters\n\t\tif (m < 1) m = 1;\n\t\tif (r < 0) r = 0; else if (r > m) r = m;\n\t\tif (n < 0) n = 0; else if (n > m) n = m;\n\t\t//Assign parameter values\n\t\tpopulationSize = m;\n\t\ttype1Size = r;\n\t\tsampleSize = n;\n\t\tc = Functions.comb(populationSize, sampleSize);\n\t\tsetDomain(Math.max(0, sampleSize - populationSize + type1Size), Math.min(type1Size, sampleSize), 1, DISCRETE);\n\t}",
"public abstract String paramsToString();",
"@Override\n public int getNumberArguments() {\n return 1;\n }",
"@Override\n\tprotected void setParameterValues() {\n\t}",
"private void addParams(List<Scope.Type> types, List<String> names) {\n\t for (int i = types.size() - 1; i >= 0; --i) {\n\t st.addArgument(types.get(i), names.get(i));\n\t }\n\t }",
"public int getParameterSize();",
"public void passStaticParams(int num,Word p1,Word p2,Word p3) {\r\n\t\tif (num!=numParams) {\r\n\t\t\tthrow new IllegalArgumentException(\"the number of params should be \"+numParams+\" but it is \"+num);\r\n\t\t}\r\n\t\tif (num>3) {\r\n\t\t\tthrow new IllegalArgumentException(\"we can only handle 3 params\");\r\n\t\t}\r\n\t\tif (num>=1) local[0]=p1;\r\n\t\tif (num>=2) local[1]=p2;\r\n\t\tif (num>=3) local[2]=p3;\r\n\t\tlog(\"local[0] = \"+ local[0]);\r\n\t}",
"@Override\r\n public void addAdditionalParams(WeiboParameters des, WeiboParameters src) {\n\r\n }",
"protected void initParametros ( int numParametros ) {\n if ( numParametros > 0 )\n parametros = new Parametro[ numParametros ];\n }",
"@Override\n public int getArgLength() {\n return 4;\n }",
"@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noOfStudents);\n String creatre = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"createsubmittedform\", creatre);\n params.put(\"uid\",uid);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=1;m<3;m++){\n String z= String.valueOf(m);\n params.put(\"pfid[\"+m+\"]\",z);\n params.put(\"hostelid[\"+m+\"]\",hostelid[m-1]);\n params.put(\"floorno[\"+m+\"]\",floorno[m-1]);\n }\n for (int k = 0; k < noofstudent; k++) {\n int m = k/2 +1;\n String z= String.valueOf(m);\n params.put(\"sid[\"+k+\"]\", sid[k]);\n params.put(\"roominwing[\"+k+\"]\",z );\n }\n return params;\n }",
"Nary<ExecutableParameter> parameters();",
"int getParameterCount();",
"private void addMoreRepletParameters() throws Exception\n {\n addTermbaseParameter();\n addLanguageParameter();\n addRepletParameters(theParameters);\n }",
"abstract int estimationParameter1();",
"private void setAllParameters(int len) {\n\t\t\tshowUPLMN = new String[len] ;\n\t\t\toriginalUPLMN = new String[len] ;\n\t\t\tstrUorG = new String[len] ;\n\t\t\tpart = new byte[len][];\n\t\t\torder = new int[len];\n\t\t\tfor(int i=0;i<len;i++){\n\t\t\t\t part[i] = new byte[6];\n\t\t\t}\n\t\t}",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"huruf\", huruf);\n params.put(\"derajat_lengan_x\", drajatX);\n params.put(\"derajat lengan_y\", drajatY);\n params.put(\"gambar\", gambar);\n\n return params;\n }",
"@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noOfStudents);\n String creatre = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"createsavedform\", creatre);\n params.put(\"uid\",uid);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=1;m<3;m++){\n String z= String.valueOf(m);\n params.put(\"pfid[\"+m+\"]\",z);\n params.put(\"hostelid[\"+m+\"]\",hostelid[m-1]);\n params.put(\"floorno[\"+m+\"]\",floorno[m-1]);\n }\n for (int k = 0; k < noofstudent; k++) {\n int m = k/2 +1;\n String z= String.valueOf(m);\n params.put(\"sid[\"+k+\"]\", sid[k]);\n params.put(\"sname[\"+k+\"]\", sname[k]);\n params.put(\"roominwing[\"+k+\"]\",z );\n }\n\n return params;\n }",
"private Param<?>[] computeAllParameters(Param<?>[] baseParameters, Param<?>[] additionalParameters) {\n int additionalLength = 0;\n if (additionalParameters != null) {\n additionalLength = additionalParameters.length;\n }\n Param<?>[] allParameters = new Param[baseParameters.length + 1 + additionalLength];\n int index = 0;\n for (Param<?> parameter : baseParameters) {\n allParameters[index] = parameter;\n index++;\n }\n allParameters[index] = new Param<String>(\"key\", key);\n index++;\n if (additionalParameters != null) {\n for (Param<?> parameter : additionalParameters) {\n allParameters[index] = parameter;\n index++;\n }\n }\n return allParameters;\n }",
"private String buildParams(){\n HashMap<String,String> items = new HashMap<>();\n if(paramValid(param1name,param1value))\n items.put(param1name,param1value);\n if(paramValid(param2name,param2value))\n items.put(param2name,param2value);\n if(paramValid(param3name,param3value))\n items.put(param3name,param3value);\n return JsonOutput.toJson(items);\n }",
"public void checkParameters() {\n }",
"private void buildOtherParams() {\n\t\tmClient.putRequestParam(\"attrType\", \"1\");\r\n\t}",
"protected void parametersInstantiation_EM() {\n }",
"public bwq(String paramString1, String paramString2)\r\n/* 10: */ {\r\n/* 11: 9 */ this.a = paramString1;\r\n/* 12:10 */ this.f = paramString2;\r\n/* 13: */ }",
"private void validateInputParameters(){\n\n }",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", name);\n params.put(\"ean\", ean);\n params.put(\"supplier\", supplier);\n params.put(\"offer\", offer);\n params.put(\"price\", price);\n\n return params;\n }",
"private boolean validateParams(int amount) {\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tif(paramArray[i] == null) {\r\n\t\t\t\t//Error\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }",
"public void setParameters(Map<String, String> param) {\n\n // check the occurrence of required parameters\n if(!(param.containsKey(\"Indri:mu\") && param.containsKey(\"Indri:lambda\"))){\n throw new IllegalArgumentException\n (\"Required parameters for IndriExpansion model were missing from the parameter file.\");\n }\n\n this.mu = Double.parseDouble(param.get(\"Indri:mu\"));\n if(this.mu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:mu\") + \", mu is a real number >= 0\");\n\n this.lambda = Double.parseDouble(param.get(\"Indri:lambda\"));\n if(this.lambda < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:lambda\") + \", lambda is a real number between 0.0 and 1.0\");\n\n if((param.containsKey(\"fb\") && param.get(\"fb\").equals(\"true\"))) {\n this.fb = \"true\";\n\n this.fbDocs = Integer.parseInt(param.get(\"fbDocs\"));\n if (this.fbDocs <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbDocs\") + \", fbDocs is an integer > 0\");\n\n this.fbTerms = Integer.parseInt(param.get(\"fbTerms\"));\n if (this.fbTerms <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbTerms\") + \", fbTerms is an integer > 0\");\n\n this.fbMu = Integer.parseInt(param.get(\"fbMu\"));\n if (this.fbMu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbMu\") + \", fbMu is an integer >= 0\");\n\n this.fbOrigWeight = Double.parseDouble(param.get(\"fbOrigWeight\"));\n if (this.fbOrigWeight < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbOrigWeight\") + \", fbOrigWeight is a real number between 0.0 and 1.0\");\n\n if (param.containsKey(\"fbInitialRankingFile\") && param.get(\"fbInitialRankingFile\") != \"\") {\n this.fbInitialRankingFile = param.get(\"fbInitialRankingFile\");\n try{\n this.initialRanking = readRanking();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n if (param.containsKey(\"fbExpansionQueryFile\") && param.get(\"fbExpansionQueryFile\") != \"\")\n this.fbExpansionQueryFile = param.get(\"fbExpansionQueryFile\");\n }\n }",
"public int nbParameters() {\n\treturn getParameters().size();\n }",
"public void setParameters(String parameters);",
"public ParameterList getAdjustableParams();",
"@Override\n\tpublic void setParams(String[] params) {\n\t}",
"@Override\n\tpublic void setParams(String[] params) {\n\t}",
"public int getNumIndependentParameters();",
"@Parameters\n public static Collection<Object[]> testParameters() {\n Collection<Object[]> params = new ArrayList<Object[]>();\n\n for (OPT opt: OPT.values()) {\n Object[] par = new Object[2];\n par[0] = opt;\n par[1] = opt.name();\n\n params.add( par );\n }\n\n return params;\n }",
"class_1034 method_112(ahb var1, String var2, int var3, int var4, int var5);",
"@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"nosambungan\", nosambungan);\n return params;\n }",
"abstract public int maxArgs();",
"void setParameter(String name, String[] values);",
"int countTypedParameters();",
"@Override\n\t\tpublic Object[] getParameters() {\n\t\t\treturn null;\n\t\t}",
"public int getParameterCount();",
"protected abstract Object[] getValue(Object ... inputs) throws InvalidNumberOfArgumentsException;",
"@java.lang.Override\n public int getParametersCount() {\n return parameters_.size();\n }",
"@java.lang.Override\n public int getParametersCount() {\n return parameters_.size();\n }",
"public Final_parametre() {\r\n\t}",
"public abstract ImmutableSet<String> getExplicitlyPassedParameters();",
"public abstract void a(b paramb, int paramInt1, int paramInt2);",
"private static ArgumentsPair parseArgs(String args[]) {\n String allArgs[] = new String[] {\n PARAMETER_NEW_FORMAT,\n PARAMETER_TRANSFORM,\n PARAMETER_BASE,\n PARAMETER_BITS,\n PARAMETER_BYTES,\n PARAMETER_DIFFERENCE,\n PARAMETER_STRENGTH,\n PARAMETER_TIME\n };\n Set<String> allArgsSet = new HashSet<>(Arrays.asList(allArgs));\n ArgumentsPair argumentsPair = new ArgumentsPair();\n\n for (int i = 0; i < args.length; i++) {\n String param = args[i].substring(1);\n if (allArgsSet.contains(param)) {\n argumentsPair.paramsAdd(param);\n } else if (param.equals(PARAMETER_ALL)) {\n argumentsPair.paramsAddAll(allArgsSet);\n argumentsPair.getParams().remove(PARAMETER_NEW_FORMAT);\n argumentsPair.getParams().remove(PARAMETER_TRANSFORM);\n } else if (param.equals(PARAMETER_GENERATE)) {\n if (args.length <= i + 1) {\n System.err.println(\"Wrong -\" + PARAMETER_GENERATE + \" parameter. Use -\" + PARAMETER_GENERATE + \" keyBitLength. (keyBitLength = 512|1024)\");\n }\n else {\n int keyBitLength = Integer.valueOf(args[++i]);\n switch (keyBitLength) {\n case 1024:\n GENERATE_KEYS = true;\n GENERATED_PRIME_BIT_LENGTH = 512;\n break;\n case 512:\n GENERATE_KEYS = true;\n GENERATED_PRIME_BIT_LENGTH = 256;\n break;\n default:\n System.err.println(\"Wrong -\" + PARAMETER_GENERATE + \" parameter. Use -\" + PARAMETER_GENERATE + \" keyBitLength. (keyBitLength = 512|1024)\");\n }\n }\n } else {\n argumentsPair.filesAdd(args[i]);\n }\n }\n return argumentsPair;\n }",
"private Parameter[] processParameters(int parameterCount, Object[] parameters) {\n Parameter[] pars = new Parameter[parameterCount];\n // Parameter parsing needed, object is not serializable\n int i = 0;\n for (int npar = 0; npar < parameterCount; ++npar) {\n DataType type = (DataType) parameters[i + 1];\n Direction direction = (Direction) parameters[i + 2];\n Stream stream = (Stream) parameters[i + 3];\n String prefix = (String) parameters[i + 4];\n\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\" Parameter \" + (npar + 1) + \" has type \" + type.name());\n }\n\n switch (type) {\n case FILE_T:\n try {\n String fileName = (String) parameters[i];\n String originalName = new File(fileName).getName();\n DataLocation location = createLocation((String) parameters[i]);\n pars[npar] = new FileParameter(direction, stream, prefix, location, originalName);\n } catch (Exception e) {\n LOGGER.error(ERROR_FILE_NAME, e);\n ErrorManager.fatal(ERROR_FILE_NAME, e);\n }\n\n break;\n\n case PSCO_T:\n case OBJECT_T:\n pars[npar] = new ObjectParameter(direction, stream, prefix, parameters[i], oReg.newObjectParameter(parameters[i]));\n break;\n\n case EXTERNAL_OBJECT_T:\n String id = (String) parameters[i];\n pars[npar] = new ExternalObjectParameter(direction, stream, prefix, id, externalObjectHashcode(id));\n break;\n\n default:\n /*\n * Basic types (including String). The only possible direction is IN, warn otherwise\n */\n if (direction != Direction.IN) {\n LOGGER.warn(WARN_WRONG_DIRECTION + \"Parameter \" + npar + \" is a basic type, therefore it must have IN direction\");\n }\n pars[npar] = new BasicTypeParameter(type, Direction.IN, stream, prefix, parameters[i]);\n break;\n }\n i += 5;\n }\n\n return pars;\n }",
"protected void setParameters(double[] parameters) {\n\tthis.parameters = parameters;\n }",
"public void setParameterNameValuePairs(entity.LoadParameter[] value);",
"@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }",
"@Override\n\tprotected String getParameters()\n\t{\n\t\tString fields = \" ?, ?, ?, ?, ?, ? \";\n\t\treturn fields;\n\t}",
"@Parameters({\"name\", \"lastName\"})\n @Test\n public void test1(String name, String lastName){\n System.out.println(\"Name is \"+ name);\n System.out.println(\"Last name is \"+ lastName);\n }",
"public interface Params {\n }",
"private static String actualParametersToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(\"p\").append(i);\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }",
"@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}",
"@Override\n\tprotected String getParameters()\n\t{\n\t\tString fields = \" ?, ?, ?, ?, ? \";\n\t\treturn fields;\n\t}",
"public void b(int paramInt1, int paramInt2) {}",
"public void b(int paramInt1, int paramInt2) {}",
"public ars(arr paramarr, int paramInt1, int paramInt2)\r\n/* 10: */ {\r\n/* 11:25 */ this.c = paramInt1;\r\n/* 12:26 */ this.d = paramInt2;\r\n/* 13:27 */ arr.a(paramarr).a(this.a, paramInt1 << 4, paramInt2 << 4, 16, 16);\r\n/* 14:28 */ arr.a(paramarr).a(this.b, paramInt1 << 4, paramInt2 << 4, 16, 16, false);\r\n/* 15: */ }",
"public lo(int paramInt1, int paramInt2, int paramInt3, int paramInt4, byte paramByte1, byte paramByte2, boolean paramBoolean)\r\n/* 26: */ {\r\n/* 27:33 */ this.a = paramInt1;\r\n/* 28:34 */ this.b = paramInt2;\r\n/* 29:35 */ this.c = paramInt3;\r\n/* 30:36 */ this.d = paramInt4;\r\n/* 31:37 */ this.e = paramByte1;\r\n/* 32:38 */ this.f = paramByte2;\r\n/* 33:39 */ this.g = paramBoolean;\r\n/* 34: */ }",
"@Override\r\n public void setParameter(String parameters) {\r\n // dummy\r\n }",
"protected int getParamCount() {\n return paramCount;\n }",
"public void init(Object[] parameters) {\n\n\t}",
"public abstract ParamNumber getParamX();",
"@Override\r\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\r\n\r\n // Adding All values to Params.\r\n params.put(\"name\", Name);\r\n params.put(\"age\", Age);\r\n params.put(\"phone_no\", Phoneno);\r\n params.put(\"h_lic_no\", Hospitallic);\r\n params.put(\"appoinment_date\", Appointment1);\r\n params.put(\"address\", Address);\r\n params.put(\"permision\", Permission);\r\n\r\n return params;\r\n }",
"private static List<String> loadParams(Type.FunctionOrMethod function){\n\t\tint numParams = function.params().size();\n\t\tList<String >params = new ArrayList<String>();\n\n\t\t//Params are numbered in order, so just put in the variable names\n\t\tfor (int i = 0; i < numParams; i++){\n\t\t\tparams.add(String.format(\"$%d\", i));\n\t\t}\n\n\t\treturn params;\n\t}",
"@TestMethod(value=\"testGetParameters\")\n public Object[] getParameters() {\n // return the parameters as used for the descriptor calculation\n Object[] params = new Object[3];\n params[0] = maxIterations;\n params[1] = lpeChecker;\n params[2] = maxResonStruc;\n return params;\n }"
] | [
"0.6538159",
"0.65279377",
"0.6457131",
"0.6296612",
"0.6270992",
"0.62334883",
"0.6198136",
"0.6198136",
"0.61628026",
"0.6160355",
"0.6147325",
"0.613405",
"0.61242163",
"0.608304",
"0.6078045",
"0.60770154",
"0.60713655",
"0.6030145",
"0.6011525",
"0.6007235",
"0.59897166",
"0.59779716",
"0.593451",
"0.5930235",
"0.5917321",
"0.59122",
"0.58857375",
"0.58750993",
"0.58750415",
"0.5860268",
"0.58388966",
"0.5822227",
"0.58197224",
"0.58145",
"0.5797172",
"0.57920337",
"0.57890564",
"0.5772087",
"0.5771955",
"0.5766303",
"0.5764956",
"0.5728606",
"0.57263005",
"0.5707748",
"0.57055277",
"0.5699183",
"0.56986845",
"0.569837",
"0.56975734",
"0.56942934",
"0.5691167",
"0.56726503",
"0.5661699",
"0.5657011",
"0.56466186",
"0.56394464",
"0.56100726",
"0.5602165",
"0.5597877",
"0.5584519",
"0.55828166",
"0.5578993",
"0.5567263",
"0.5567263",
"0.5552513",
"0.5545693",
"0.554247",
"0.55418104",
"0.55330604",
"0.55324936",
"0.55261546",
"0.55260944",
"0.5523753",
"0.5523728",
"0.5509547",
"0.5509547",
"0.55067134",
"0.5506562",
"0.5505342",
"0.550082",
"0.5496174",
"0.5495456",
"0.54912794",
"0.5490997",
"0.54900557",
"0.54839915",
"0.54838395",
"0.548245",
"0.5478855",
"0.5478808",
"0.54740745",
"0.54740745",
"0.54723585",
"0.54682153",
"0.5466186",
"0.5458665",
"0.5455518",
"0.5450875",
"0.54503274",
"0.54456997",
"0.5443171"
] | 0.0 | -1 |
having different type of parameters | ConstuctorOverloading(int num){
System.out.println("I am contructor with 1 parameter");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Object getTypedParams(Object params);",
"public interface Params {\n }",
"public abstract String paramsToString();",
"private static void a(Object param0, Class<?> param1) {\n }",
"BParameterTyping createBParameterTyping();",
"public int a(String paramString, int paramInt1, int paramInt2, int paramInt3)\r\n/* 239: */ {\r\n/* 240:247 */ return a(paramString, (float)paramInt1, (float)paramInt2, paramInt3, false);\r\n/* 241: */ }",
"private void checkTypes(Variable first, Variable second) throws OutmatchingParameterType {\n VariableVerifier.VerifiedTypes firstType = first.getType();\n VariableVerifier.VerifiedTypes secondType = second.getType();\n\n if (!firstType.equals(secondType)) {\n throw new OutmatchingParameterType();\n }\n }",
"@Test\r\n public void testParamterized()\r\n {\r\n test(Types.create(List.class).withType(Number.class).build());\r\n }",
"@Override\n\t\tpublic Object getTypedParams(Object params) {\n\t\t\treturn null;\n\t\t}",
"@Override\n\t\tpublic Object getTypedParams(Object params) {\n\t\t\treturn null;\n\t\t}",
"@Test\n public void testParameterType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String.class);\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(StringListSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"public TypeParameterListNode getTypeParameters()throws ClassCastException;",
"int getParamType(String type);",
"TypeInfo[] typeParams();",
"public ITypeInfo[] getParameters();",
"public abstract Result mo5059a(Params... paramsArr);",
"public abstract boolean a(e parame, b paramb, int paramInt1, int paramInt2);",
"static void checkArgTypes(\r\n\t\tString funcName, Argument[] args, JParameter[] params) {\r\n\t\tif(args.length != params.length){\r\n\t\t\tthrow new IllegalArgumentsException(funcName, \"Wrong number of arguments\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<args.length;i++){\r\n\t\t\tJValue val = args[i].getValue();\r\n\t\t\tJParameter jp = params[i];\r\n\t\t\tif(jp.isUntyped()){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tJType typ = jp.getType();\r\n\t\t\tif(RefValue.isGenericNull(val)){\r\n\t\t\t\tJTypeKind kind = typ.getKind();\r\n\t\t\t\tif (kind == JTypeKind.CLASS || kind == JTypeKind.PLATFORM){\r\n\t\t\t\t\t// If it is a generic null, replace it with a typed null to comply with function declaration.\r\n\t\t\t\t\tRefValue rv = RefValue.makeNullRefValue(\r\n\t\t\t\t\t\tval.getMemoryArea(), kind == JTypeKind.CLASS ? (ICompoundType)typ : JObjectType.getInstance());\r\n\t\t\t\t\targs[i].setValue(rv);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcheckConvertibility(val, typ);\r\n\t\t}\r\n\t}",
"@Test\n public void testSourceParamType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(getFirstTypeParameter(ParamToListParam.class));\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(ParamToListParam.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}",
"public abstract void a(b paramb, int paramInt1, int paramInt2);",
"void addTypedParameter(Parameter typedParameter);",
"private static boolean\n\t\tdoParametersMatch(Class<?>[] types, Object[] parameters)\n\t{\n\t\tif (types.length != parameters.length) return false;\n\t\tfor (int i = 0; i < types.length; i++)\n\t\t\tif (parameters[i] != null) {\n\t\t\t\tClass<?> clazz = parameters[i].getClass();\n\t\t\t\tif (types[i].isPrimitive()) {\n\t\t\t\t\tif (types[i] != Long.TYPE && types[i] != Integer.TYPE &&\n\t\t\t\t\t\ttypes[i] != Boolean.TYPE) throw new RuntimeException(\n\t\t\t\t\t\t\"unsupported primitive type \" + clazz);\n\t\t\t\t\tif (types[i] == Long.TYPE && clazz != Long.class) return false;\n\t\t\t\t\telse if (types[i] == Integer.TYPE && clazz != Integer.class) return false;\n\t\t\t\t\telse if (types[i] == Boolean.TYPE && clazz != Boolean.class) return false;\n\t\t\t\t}\n\t\t\t\telse if (!types[i].isAssignableFrom(clazz)) return false;\n\t\t\t}\n\t\treturn true;\n\t}",
"public void getParameters(Parameters parameters) {\n\n }",
"protected abstract boolean canConvert(Class<?> parameterType, Class<?> originalArgumentType);",
"public abstract boolean isArrayParams();",
"private void addParams(List<Scope.Type> types, List<String> names) {\n\t for (int i = types.size() - 1; i >= 0; --i) {\n\t st.addArgument(types.get(i), names.get(i));\n\t }\n\t }",
"public void a(a<e> parama) {\n }",
"@Test\n public void getTypeArguments() {\n List<String> target=new ArrayList<String>() {{\n add(\"thimble\");\n }};\n\n Type[] arguments= TypeDetective.sniffTypeParameters(target.getClass(), ArrayList.class);\n assertEquals(1, arguments.length);\n assertEquals(String.class,arguments[0]);\n }",
"Type getMethodParameterType() throws IllegalArgumentException;",
"ParameterList getParameters();",
"public static ParameterExpression parameter(Class type) { throw Extensions.todo(); }",
"@Override\n public void setParameters(Map<Enum<?>, Object> parameters) {\n }",
"Iterable<ActionParameterTypes> getParameterTypeAlternatives();",
"public StringUnionFunc() {\n\t super.addLinkableParameter(\"str1\"); \n\t\t super.addLinkableParameter(\"str2\"); \n }",
"protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);",
"String toParameter();",
"public interface ParamPoint {\r\n\r\n\t/**\r\n\t * Get X coordinate parameter.\r\n\t * \r\n\t * @return X coordinate\r\n\t */\r\n\tpublic abstract ParamNumber getParamX();\r\n\r\n\t/**\r\n\t * Get Y coordinate parameter.\r\n\t * \r\n\t * @return Y coordinate\r\n\t */\r\n\tpublic abstract ParamNumber getParamY();\r\n\r\n\t/**\r\n\t * Get Z coordinate parameter.\r\n\t * \r\n\t * @return Z coordinate\r\n\t */\r\n\tpublic abstract ParamNumber getParamZ();\r\n}",
"private void checkParams(String[] params) throws MethodCallWithNonexistentParameter,\n OutmatchingParametersToMethodCall, OutmatchingParameterType, InconvertibleTypeAssignment {\n ArrayList<Variable> methodParams = this.method.getMethodParameters();\n if (params.length != methodParams.size()) {\n // not enough params somewhere, or more than enough.\n throw new OutmatchingParametersToMethodCall();\n }\n int i = 0;\n for (String toBeParam : params) {\n toBeParam = toBeParam.trim();\n Variable toBeVariable = findParamByName(toBeParam);\n VariableVerifier.VerifiedTypes type = methodParams.get(i).getType();\n if (toBeVariable == null) {\n VariableVerifier.VerifiedTypes typeOfString = VariableVerifier.VerifiedTypes.getTypeOfString(toBeParam);\n if (!type.getConvertibles().contains(typeOfString)) {\n throw new MethodCallWithNonexistentParameter();\n }\n } else {\n checkTypes(toBeVariable, methodParams.get(i));\n checkValue(toBeVariable);\n }\n i++;\n }\n }",
"private void countParams() {\n if( paramCount >= 0 ) {\n return;\n }\n Iterator<AnyType> parser = name.getSignature( types );\n paramCount = needThisParameter ? 1 : 0;\n while( parser.next() != null ) {\n paramCount++;\n }\n valueType = parser.next();\n while( parser.hasNext() ) {\n valueType = parser.next();\n paramCount--;\n }\n }",
"public static void main(String[] args) {\n\t\tList<? super Integer> list1 = new ArrayList<Integer>();\n\t\tList<? super Integer> list2 = new ArrayList<Number>();\n\t\tList<? super Integer> list3 = new ArrayList<Object>();\n\t\t\n\t\t//showAll(list1); //invalid because (minimum) lower bound is Number \n\t\t\n\t\t//Number class extend Object implements Serializable \n\t\tList<? super Number> nums = new ArrayList<>();\n\t\t//We can add element to lower bounded wild card\n\t\t// but element must be the given type or it's Sub type\n\t\tnums.add(3);//valid because Integer is a sub type of Number\n\t\tnums.add(10.23);//valid because Double is a sub type of Number\n\t\tnums.add(50.3f);//valid because Float is a sub type of Number\n\t\t//Valid call\n\t\tshowAll(nums);\n\t\t\n\t\t//Valid call because Number extends Object\n\t\tList<? super Object> objects = new ArrayList<>();\n\t\tshowAll(objects);\n\t\t\n\t\t//Valid call because Number extends Serializable\n\t\tList<Serializable> list = new ArrayList<>();\n\t\tlist.add(\"Adam\");\n\t\tlist.add(\"Raghav\");\n\t\tlist.add(\"Mark\");\n\t\tshowAll(list);\n\t}",
"protected abstract Boolean applicable(Map<String, Object> parameters);",
"private Parameter[] processParameters(int parameterCount, Object[] parameters) {\n Parameter[] pars = new Parameter[parameterCount];\n // Parameter parsing needed, object is not serializable\n int i = 0;\n for (int npar = 0; npar < parameterCount; ++npar) {\n DataType type = (DataType) parameters[i + 1];\n Direction direction = (Direction) parameters[i + 2];\n Stream stream = (Stream) parameters[i + 3];\n String prefix = (String) parameters[i + 4];\n\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\" Parameter \" + (npar + 1) + \" has type \" + type.name());\n }\n\n switch (type) {\n case FILE_T:\n try {\n String fileName = (String) parameters[i];\n String originalName = new File(fileName).getName();\n DataLocation location = createLocation((String) parameters[i]);\n pars[npar] = new FileParameter(direction, stream, prefix, location, originalName);\n } catch (Exception e) {\n LOGGER.error(ERROR_FILE_NAME, e);\n ErrorManager.fatal(ERROR_FILE_NAME, e);\n }\n\n break;\n\n case PSCO_T:\n case OBJECT_T:\n pars[npar] = new ObjectParameter(direction, stream, prefix, parameters[i], oReg.newObjectParameter(parameters[i]));\n break;\n\n case EXTERNAL_OBJECT_T:\n String id = (String) parameters[i];\n pars[npar] = new ExternalObjectParameter(direction, stream, prefix, id, externalObjectHashcode(id));\n break;\n\n default:\n /*\n * Basic types (including String). The only possible direction is IN, warn otherwise\n */\n if (direction != Direction.IN) {\n LOGGER.warn(WARN_WRONG_DIRECTION + \"Parameter \" + npar + \" is a basic type, therefore it must have IN direction\");\n }\n pars[npar] = new BasicTypeParameter(type, Direction.IN, stream, prefix, parameters[i]);\n break;\n }\n i += 5;\n }\n\n return pars;\n }",
"public void testOneOrMoreParameters() {\n int nrParameters = methodToTest.getParameterTypes().length;\n Class[] params = methodToTest.getParameterTypes();\n Object[] foo = new Object[nrParameters];\n \n // set up all parameters. Some methods are invoked with\n // primitives or collections, so we need to create them\n // accordingly\n for (int i = 0; i < nrParameters; i++) {\n try {\n if (params[i].isPrimitive()) {\n String primitiveName = params[i]\n .getName();\n if (primitiveName.equals(\"int\")) {\n foo[i] = Integer.valueOf(0);\n }\n if (primitiveName.equals(\"boolean\")) {\n foo[i] = Boolean.TRUE;\n }\n if (primitiveName.equals(\"short\")) {\n foo[i] = new Short(\"0\");\n }\n } else if (params[i].getName().equals(\"java.util.Collection\")) {\n foo[i] = new ArrayList();\n } else {\n /*\n * this call could easily fall if there is e.g. no public\n * default constructor. If it fails tweak the if/else tree\n * above to accommodate the parameter or check if we need to\n * test the particular method at all.\n */\n foo[i] = params[i].newInstance();\n }\n } catch (InstantiationException e) {\n fail(\"Cannot create an instance of : \"\n + params[i].getName()\n + \", required for \"\n + methodToTest.getName()\n + \". Check if \"\n + \"test needs reworking.\");\n } catch (IllegalAccessException il) {\n fail(\"Illegal Access to : \"\n + params[i].getName());\n }\n }\n \n try {\n methodToTest.invoke(facade, foo);\n fail(methodToTest.getName()\n + \" does not deliver an IllegalArgumentException\");\n } catch (InvocationTargetException e) {\n if (e.getTargetException() instanceof IllegalArgumentException \n || e.getTargetException() instanceof ClassCastException\n || e.getTargetException() instanceof NotImplementedException) {\n return;\n }\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \"\n + e.getTargetException());\n } catch (NotImplementedException e) {\n // If method not supported ignore failure\n } catch (Exception e) {\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \" + e.toString());\n }\n }",
"@Override\n public Class<?>[] getParameterTypes() {\n return null;\n }",
"public interface Parameter {\n\n\t/**\n\t * Returns the actual parameter value given the inputs provided as arguments.\n\t * If the actual value cannot be retrieved (missing information), throws \n\t * an exception.\n\t * \n\t * @param input the input assignment\n\t * @return the actual parameter value\n\t */\n\tpublic double getParameterValue (Assignment input) ;\n\t\n\t\n\t/**\n\t * Returns the (possibly empty) set of parameter identifiers used in the \n\t * parameter object.\n\t * \n\t * @return the collection of parameter labels \n\t */\n\tpublic Collection<String> getParameterIds();\n\n\t\n\t\n\t/**\n\t * Adds the value of the two parameters and returns the result\n\t * \n\t * @param otherPram the parameter to add\n\t * @return the result of the addition\n\t */\n\tpublic Parameter sumParameter(Parameter otherPram); \n\t\n\t/**\n\t * Multiplies the value of the two parameters and returns the result\n\t * \n\t * @param otherPram the parameter to multiply\n\t * @return the result of the multiplication\n\t */\n\tpublic Parameter multiplyParameter(Parameter otherPram); \n\t\n}",
"public ParameterType getType();",
"public getType_args(getType_args other) {\n }",
"public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}",
"public interface TypeHandler {\r\n\r\n public void setParamters(PreparedStatement preparedStatement, Map<String,Integer>parameterMap, Object value) throws SQLException;\r\n\r\n public Class getParameterClass(String name)throws SQLException;\r\n\r\n\tpublic void setValueForObject(ResultSet resultSet, Object object,String columnName,String propertyName)throws SQLException;\r\n}",
"@Override\n public void setParams(Object[] params) {\n if (params.length != 1) {\n throw new IllegalArgumentException(\"expected one parameter\");\n }\n setParams((Number) params[0]);\n }",
"private InstantiateTransformer(Class[] paramTypes, Object[] args) {\n super();\n if (((paramTypes == null) && (args != null))\n || ((paramTypes != null) && (args == null))\n || ((paramTypes != null) && (args != null) && (paramTypes.length != args.length))) {\n throw new IllegalArgumentException(\"InstantiateTransformer: The parameter types must match the arguments\");\n }\n if ((paramTypes == null) && (args == null)) {\n iParamTypes = null;\n iArgs = null;\n } else {\n iParamTypes = (Class[]) paramTypes.clone();\n iArgs = (Object[]) args.clone();\n }\n }",
"@Override\n\t\tpublic void setParameters(Object[] parameters) {\n\t\t\t\n\t\t}",
"public Class<? extends DataType>[] getRequiredArgs();",
"public void checkTypeValid(List<Object> types) {\n if(types.size() != inputs.size()) {\n throw new IllegalArgumentException(\"Not matched passed parameter count.\");\n }\n }",
"public void setTypeParameters(TypeParameterListNode typeParameters);",
"public interface Param {\n\n int[] args();\n String exec(ExecutePack pack);\n String label();\n}",
"Collection<Parameter> getTypedParameters();",
"List<Type> getTypeParameters();",
"private static String actualParametersToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(\"p\").append(i);\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }",
"@Test\n public void testGenericParameterType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String[].class);\n typeList.addAll(getBothParameters(ArrayToListArray.class));\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(NoOpSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"private static AbstractType<?>[] argumentsType(@Nullable StringType algorithmArgumentType)\n {\n return algorithmArgumentType == null\n ? DEFAULT_ARGUMENTS\n : new AbstractType<?>[]{ algorithmArgumentType };\n }",
"public interface ParameterInput extends Input {\n\t\n\t/**\n\t * Returns the metadata of this parameter.\n\t * @return ParameterMetadata\tmetadata\n\t */\n\tpublic ParameterMetadata getMetadata();\n\t\n\t/**\n\t * Returns the parameter value of an option.\n\t * \n\t * @return Object option parameter value\n\t */\n\tpublic Object getValue();\n\t\n\t/**\n\t * Returns the File parameter value of an option.\n\t * If option's parameter type does not match with the\n\t * return type the value returned is null.\n\t * \n\t * @return File file value\n\t */\n\tpublic File getFileValue();\n\t\n\t/**\n\t * Returns the directory parameter value of an option.\n\t * If option's parameter type does not match with the\n\t * return type the value returned is null.\n\t * \n\t * @return File a directory file\n\t */\t\n\tpublic File getDirectoryValue();\n\n\t/**\n\t * Returns the String parameter value of an option.\n\t * If option's parameter type does not match with the\n\t * return type the value returned is null.\n\t * \n\t * @return String string value\n\t */\n\tpublic String getStringValue();\n\t\n\t/**\n\t * Returns the Number parameter value of an option.\n\t * If option's parameter type does not match with the\n\t * return type the value returned is null.\n\t * \n\t * @return Number value\n\t */\n\tpublic Number getNumberValue();\n\t\n}",
"ActionParameterTypes getFormalParameterTypes();",
"public interface InputParam extends Parameter {\r\n\r\n /* ***************************************************\r\n * Property http://www.semanticweb.org/rami#isEquivalent\r\n */\r\n \r\n /**\r\n * Gets all property values for the isEquivalent property.<p>\r\n * \r\n * @returns a collection of values for the isEquivalent property.\r\n */\r\n Collection<? extends Noun> getIsEquivalent();\r\n\r\n /**\r\n * Checks if the class has a isEquivalent property value.<p>\r\n * \r\n * @return true if there is a isEquivalent property value.\r\n */\r\n boolean hasIsEquivalent();\r\n\r\n /**\r\n * Adds a isEquivalent property value.<p>\r\n * \r\n * @param newIsEquivalent the isEquivalent property value to be added\r\n */\r\n void addIsEquivalent(Noun newIsEquivalent);\r\n\r\n /**\r\n * Removes a isEquivalent property value.<p>\r\n * \r\n * @param oldIsEquivalent the isEquivalent property value to be removed.\r\n */\r\n void removeIsEquivalent(Noun oldIsEquivalent);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.semanticweb.org/rami#isInputTo\r\n */\r\n \r\n /**\r\n * Gets all property values for the isInputTo property.<p>\r\n * \r\n * @returns a collection of values for the isInputTo property.\r\n */\r\n Collection<? extends MethodCall> getIsInputTo();\r\n\r\n /**\r\n * Checks if the class has a isInputTo property value.<p>\r\n * \r\n * @return true if there is a isInputTo property value.\r\n */\r\n boolean hasIsInputTo();\r\n\r\n /**\r\n * Adds a isInputTo property value.<p>\r\n * \r\n * @param newIsInputTo the isInputTo property value to be added\r\n */\r\n void addIsInputTo(MethodCall newIsInputTo);\r\n\r\n /**\r\n * Removes a isInputTo property value.<p>\r\n * \r\n * @param oldIsInputTo the isInputTo property value to be removed.\r\n */\r\n void removeIsInputTo(MethodCall oldIsInputTo);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.semanticweb.org/rami#Label\r\n */\r\n \r\n /**\r\n * Gets all property values for the Label property.<p>\r\n * \r\n * @returns a collection of values for the Label property.\r\n */\r\n Collection<? extends Object> getLabel();\r\n\r\n /**\r\n * Checks if the class has a Label property value.<p>\r\n * \r\n * @return true if there is a Label property value.\r\n */\r\n boolean hasLabel();\r\n\r\n /**\r\n * Adds a Label property value.<p>\r\n * \r\n * @param newLabel the Label property value to be added\r\n */\r\n void addLabel(Object newLabel);\r\n\r\n /**\r\n * Removes a Label property value.<p>\r\n * \r\n * @param oldLabel the Label property value to be removed.\r\n */\r\n void removeLabel(Object oldLabel);\r\n\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}",
"public interface VinhNT_Parameter {\n public void addParam(JSONObject input);\n public String get_field_name();\n public void getParam(JSONObject input);\n public boolean isRequired();\n public ArrayList<Error_Input> checkInput();\n public Context getContext();\n}",
"protected abstract Object[] getValue(Object ... inputs) throws InvalidNumberOfArgumentsException;",
"@Override\n\tpublic Class[] getMethodParameterTypes() {\n\t\treturn new Class[]{byte[].class, int.class,byte[].class,\n\t\t byte[].class, int.class, byte[].class,\n\t\t int.class, byte[].class, byte[].class};\n\t}",
"public void getParameters(Parameters parameters) {\n\n\t}",
"private static String formalParametersToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(getTypeName(pts[i])).append(\" p\").append(i);\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }",
"@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}",
"public interface Params\n{\n\tpublic static final String DEFAULT_PATH=\"default_path\";\n\tpublic static final String DEFAULT_NAME=\"default_name\";\n\tpublic static final String MODE=\"mode\";\n\tpublic static final String FILE_TYPE=\"file_type\";\n}",
"protected abstract Content getTypeParameterLinks(LinkInfo linkInfo);",
"@Test(expected = IllegalArgumentException.class)\n public void testAnotherInvalidMatch() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String.class);\n typeList.add(Object.class);\n typeList.add(Object.class);\n typeList.addAll(getBothParameters(ParamToListParam.class));\n typeList.add(getFirstTypeParameter(StringListSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"interface cl {\n void b(List<a> list, List<String> list2);\n}",
"char[][] getTypeParameterNames();",
"private static Object[] parametersForVarargs(Class<?>[] parameterTypes, Object[] parameters) {\n int fixedLen = parameterTypes.length - 1;\n Class<?> componentType = parameterTypes[fixedLen].getComponentType();\n assert componentType != null;\n if (componentType.isPrimitive()) {\n componentType = ClassUtils.primitiveToWrapper(componentType);\n }\n int arrayLength = parameters.length - fixedLen;\n\n if (arrayLength >= 0) {\n if (arrayLength == 1 && parameterTypes[fixedLen].isInstance(parameters[fixedLen])) {\n // not a varargs call\n return parameters;\n } else if ((arrayLength > 0 && (componentType.isInstance(parameters[fixedLen]) || parameters[fixedLen] == null)) ||\n arrayLength == 0) {\n Object array = DefaultTypeTransformation.castToVargsArray(parameters, fixedLen, parameterTypes[fixedLen]);\n Object[] parameters2 = new Object[fixedLen + 1];\n System.arraycopy(parameters, 0, parameters2, 0, fixedLen);\n parameters2[fixedLen] = array;\n\n return parameters2;\n }\n }\n return parameters;\n }",
"public interface IValid {\n\n default boolean isValid(String annoStr) {\n return null!=getValid(annoStr);\n }\n\n default IMVC getValid(String annoStr) {\n String anno = null;\n if (annoStr.startsWith(\"@\")) {\n if(annoStr.indexOf(\"(\")!=-1){\n anno = annoStr.substring(1,annoStr.indexOf(\"(\"));\n }else{\n anno = annoStr.substring(1);\n }\n }else{\n if(annoStr.indexOf(\"(\")!=-1){\n anno = annoStr.substring(0,annoStr.indexOf(\"(\"));\n }else{\n anno = annoStr;\n }\n }\n for (IMVC imvc : getTypes()) {\n if (imvc.getRequestParamName().endsWith(anno)||imvc.getRequestParamName().equals(anno)) {\n return imvc;\n }\n }\n return null;\n }\n\n List<IMVC> getTypes();\n\n IParameter getParameter(String parameterStr,List<String> docsStrs);\n}",
"Object isMatch(Object arg, String wantedType);",
"private void checkForPrimitiveParameters(Method execMethod, Logger logger) {\n final Class<?>[] paramTypes = execMethod.getParameterTypes();\n for (final Class<?> paramType : paramTypes) {\n if (paramType.isPrimitive()) {\n logger.config(\"The method \" + execMethod\n + \" contains a primitive parameter \" + paramType + \".\");\n logger\n .config(\"It is recommended to use it's wrapper class. If no value could be read from the request, now you would got the default value. If you use the wrapper class, you would get null.\");\n break;\n }\n }\n }",
"public abstract A a(com.airbnb.lottie.g.a<K> aVar, float f2);",
"public interface T93 {\n\n void get2(List<String> stringList);\n\n void get(List<Integer> integerList);\n}",
"public interface NonScalable extends Parameter\n{\n}",
"private static Object convertType(Class type, String parameter)\n throws ResourceException {\n try {\n String typeName = type.getName();\n\n if (typeName.equals(\"java.lang.String\") ||\n typeName.equals(\"java.lang.Object\")) {\n return parameter;\n }\n\n if (typeName.equals(\"int\") || typeName.equals(\"java.lang.Integer\")) {\n return new Integer(parameter);\n }\n\n if (typeName.equals(\"short\") || typeName.equals(\"java.lang.Short\")) {\n return new Short(parameter);\n }\n\n if (typeName.equals(\"byte\") || typeName.equals(\"java.lang.Byte\")) {\n return new Byte(parameter);\n }\n\n if (typeName.equals(\"long\") || typeName.equals(\"java.lang.Long\")) {\n return new Long(parameter);\n }\n\n if (typeName.equals(\"float\") || typeName.equals(\"java.lang.Float\")) {\n return new Float(parameter);\n }\n\n if (typeName.equals(\"double\") ||\n typeName.equals(\"java.lang.Double\")) {\n return new Double(parameter);\n }\n\n if (typeName.equals(\"java.math.BigDecimal\")) {\n return new java.math.BigDecimal(parameter);\n }\n\n if (typeName.equals(\"java.math.BigInteger\")) {\n return new java.math.BigInteger(parameter);\n }\n\n if (typeName.equals(\"boolean\") ||\n typeName.equals(\"java.lang.Boolean\")) {\n return new Boolean(parameter);\n }\n\n return parameter;\n } catch (NumberFormatException nfe) {\n _logger.log(Level.SEVERE, \"jdbc.exc_nfe\", parameter);\n\n String msg = sm.getString(\"me.invalid_param\", parameter);\n throw new ResourceException(msg);\n }\n }",
"public void checkParameters(ArrayList<String> parameters) throws IncompatibleTypeException {\r\n\t\tTypeBoolean booleanTester =new TypeBoolean(true, false, false, true);\r\n\t\tboolean isCompatible;\r\n\t\tfor (String parameter: parameters) {\r\n\t\t\tisCompatible = booleanTester.compatibleWith(parameter);\r\n\t\t\tif (!isCompatible) {\r\n\t\t\t\tVariable lastAppearance = findVariable(parameter);\r\n\t\t\t\tif (lastAppearance == null) {\r\n\t\t\t\t\tthrow new IncompatibleTypeException();\r\n\t\t\t\t}\r\n\t\t\t\tisCompatible = booleanTester.compatibleWith(lastAppearance);\r\n\t\t\t\tif (!isCompatible || !lastAppearance.isInitialized()) {\r\n\t\t\t\t\tthrow new IncompatibleTypeException();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"Parameter createParameter();",
"protected String addParams(IntrospectedTable introspectedTable, Method method, int type1) {\n switch (type1) {\n case 1:\n method.addParameter(new Parameter(pojoType, \"record\"));\n return \"record\";\n case 2:\n if (introspectedTable.getRules().generatePrimaryKeyClass()) {\n FullyQualifiedJavaType type = new FullyQualifiedJavaType(introspectedTable.getPrimaryKeyType());\n method.addParameter(new Parameter(type, \"key\"));\n } else {\n for (IntrospectedColumn introspectedColumn : introspectedTable.getPrimaryKeyColumns()) {\n FullyQualifiedJavaType type = introspectedColumn.getFullyQualifiedJavaType();\n method.addParameter(new Parameter(type, introspectedColumn.getJavaProperty()));\n }\n }\n StringBuffer sb = new StringBuffer();\n for (IntrospectedColumn introspectedColumn : introspectedTable.getPrimaryKeyColumns()) {\n sb.append(introspectedColumn.getJavaProperty());\n sb.append(\",\");\n }\n sb.setLength(sb.length() - 1);\n return sb.toString();\n case 3:\n method.addParameter(new Parameter(pojoExampleType, \"example\"));\n return \"example\";\n case 4:\n method.addParameter(0, new Parameter(pojoType, \"record\"));\n method.addParameter(1, new Parameter(pojoExampleType, \"example\"));\n return \"record, example\";\n default:\n break;\n }\n return null;\n }",
"public Parameters getParameters();",
"public static void main(String[] args) {\n\t\tOverloadingType1 ot1 = new OverloadingType1();\n\t\tshort a=3, b=6;\n\t\tot1.add(2, 3);\n\t\tot1.add(a, b);\n\t\tot1.add(a);\n\t\t\n\t\t\n\t}",
"protected void a(int paramInt1, int paramInt2, boolean paramBoolean, EntityPlayer paramahd) {}",
"public void b(int paramInt1, int paramInt2) {}",
"public void b(int paramInt1, int paramInt2) {}",
"protected void validateArguments( Object[] args ) throws ActionExecutionException {\n\n Annotation[][] annotations = method.getParameterAnnotations();\n for (int i = 0; i < annotations.length; i++) {\n\n Annotation[] paramAnnotations = annotations[i];\n\n for (Annotation paramAnnotation : paramAnnotations) {\n if (paramAnnotation instanceof Parameter) {\n Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation;\n ValidationType validationType = paramDescriptionAnnotation.validation();\n\n String[] validationArgs;\n\n // if we are checking for valid constants, then the\n // args array should contain\n // the name of the array holding the valid constants\n if (validationType == ValidationType.STRING_CONSTANT\n || validationType == ValidationType.NUMBER_CONSTANT) {\n try {\n String arrayName = paramDescriptionAnnotation.args()[0];\n\n // get the field and set access level if\n // necessary\n Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName);\n if (!arrayField.isAccessible()) {\n arrayField.setAccessible(true);\n }\n Object arrayValidConstants = arrayField.get(null);\n\n // convert the object array to string array\n String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)];\n for (int j = 0; j < Array.getLength(arrayValidConstants); j++) {\n arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString();\n }\n\n validationArgs = arrayValidConstatnsStr;\n\n } catch (IndexOutOfBoundsException iobe) {\n // this is a fatal error\n throw new ActionExecutionException(\"You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation\");\n } catch (Exception e) {\n // this is a fatal error\n throw new ActionExecutionException(\"Could not get array with valid constants - action annotations are incorrect\");\n }\n } else {\n validationArgs = paramDescriptionAnnotation.args();\n }\n\n List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(),\n paramDescriptionAnnotation.name(),\n args[i], validationArgs);\n //perform validation\n for (BaseType baseType : typeValidators) {\n if (baseType != null) {\n try {\n baseType.validate();\n } catch (TypeException e) {\n throw new InvalidInputArgumentsException(\"Validation failed while validating argument \"\n + paramDescriptionAnnotation.name()\n + e.getMessage());\n }\n } else {\n log.warn(\"Could not perform validation on argument \"\n + paramDescriptionAnnotation.name());\n }\n }\n }\n }\n }\n }",
"@Override\n protected PacketArgs.ArgumentType[] getArgumentTypes() {\n return new PacketArgs.ArgumentType[] { PacketArgs.ArgumentType.String };\n }",
"@Test\r\n public void testParamterizedWithObject()\r\n {\r\n test(Types.create(List.class).withSubtypeOf(Object.class).build());\r\n }",
"private void checkArgTypes() {\n Parameter[] methodParams = method.getParameters();\n if(methodParams.length != arguments.length + 1) {\n throw new InvalidCommandException(\"Incorrect number of arguments on command method. Commands must have 1 argument for the sender and one argument per annotated argument\");\n }\n\n Class<?> firstParamType = methodParams[0].getType();\n\n boolean isFirstArgValid = true;\n if(requiresPlayer) {\n if(firstParamType.isAssignableFrom(IPlayerData.class)) {\n usePlayerData = true; // Command methods annotated with a player requirement can also use IPlayerData as their first argument\n } else if(!firstParamType.isAssignableFrom(Player.class)) {\n isFirstArgValid = false; // Otherwise, set it to invalid if we can't assign it from a player\n }\n } else if(!firstParamType.isAssignableFrom(CommandSender.class)) { // Non player requirement annotated commands must just take a CommandSender\n isFirstArgValid = false;\n }\n\n if(!isFirstArgValid) {\n throw new InvalidCommandException(\"The first argument for a command must be a CommandSender. (or a Player/IPlayerData if annotated with a player requirement)\");\n }\n }",
"@Override\n public String kind() {\n return \"@param\";\n }",
"public boolean parametersMatch(Method m, Class[] param) {\n boolean match = false;\n Class[] types = m.getParameterTypes();\n if (types.length!=param.length)\n return false;\n for (int i=0; i<types.length; i++) {\n match = types[i].equals(param[i]);\n }\n return match;\n }",
"public abstract String toFORMParam();",
"public static ParameterExpression parameter(Class type, String name) { throw Extensions.todo(); }",
"public static void main(String[] args) {\n\t\tP92_Overloading_Sample obj=new P92_Overloading_Sample();\n\t\tSystem.out.println(obj.add());//30\n\t\tSystem.out.println(obj.add(500));//530\n\t\tSystem.out.println(obj.add(200, 300.9f));//500\n\t\tSystem.out.println(obj.add(55, 500));//555\n\t}"
] | [
"0.67040074",
"0.62831986",
"0.6140187",
"0.5989621",
"0.5977002",
"0.59387815",
"0.59189093",
"0.59155315",
"0.58411527",
"0.58411527",
"0.58251274",
"0.5800986",
"0.5797969",
"0.57931036",
"0.577956",
"0.5750967",
"0.57316744",
"0.57078236",
"0.5696506",
"0.56539315",
"0.5649589",
"0.5648272",
"0.5646549",
"0.5639756",
"0.5632935",
"0.5622316",
"0.5611909",
"0.56087846",
"0.5573221",
"0.55623585",
"0.555438",
"0.5549522",
"0.55279726",
"0.55132675",
"0.5505168",
"0.5504364",
"0.5497071",
"0.5480581",
"0.5478316",
"0.5472746",
"0.5470451",
"0.5466112",
"0.54621303",
"0.54561305",
"0.5454443",
"0.54301304",
"0.5426372",
"0.5409836",
"0.5408935",
"0.54083586",
"0.54010105",
"0.5395625",
"0.5392125",
"0.53918785",
"0.5390303",
"0.5388488",
"0.53862005",
"0.5385973",
"0.5380584",
"0.5367775",
"0.5367733",
"0.53626287",
"0.53586143",
"0.53584635",
"0.535762",
"0.5357555",
"0.5352741",
"0.5347482",
"0.5340682",
"0.53371537",
"0.53215235",
"0.5313021",
"0.5311478",
"0.5310811",
"0.53020406",
"0.52996993",
"0.5295533",
"0.52925926",
"0.5284971",
"0.5284072",
"0.5281411",
"0.5273263",
"0.5270799",
"0.52658975",
"0.52653533",
"0.525822",
"0.52573645",
"0.5254549",
"0.52537644",
"0.52508736",
"0.5246114",
"0.5246114",
"0.5244418",
"0.5241039",
"0.52386105",
"0.52373517",
"0.523292",
"0.5225258",
"0.5219624",
"0.5219476",
"0.5211931"
] | 0.0 | -1 |
This is static because the CheckerThread will use it. | public void launch(boolean showHide){
visibility = showHide;
SetupWindow(visibility);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic void run() {\n\t\t\tcheck();\n\t\t}",
"public IgniteThread checkpointerThread() {\n return checkpointerThread;\n }",
"private ThreadUtil() {\n \n }",
"private SingletonDoubleCheck() {}",
"private ThreadUtil() {\n }",
"public final void putSelfInCheck() {\n\t\tout.println(\"You can't place yourself in check.\");\n\t}",
"public void threadManager() {\n /**Retrieve all data stored in \"preference\"*/\n if (mNodeThingUtils.getAllSavedThing() != null) {\n\n Map<String, String> getAllSensor = mNodeThingUtils.getAllSavedThing();\n Set<String> keys = getAllSensor.keySet();\n\n /**It checks to see if he has already been registered*/\n if (!threadControl.containsKey(String.valueOf(keys))) {\n for (Iterator i = keys.iterator(); i.hasNext(); ) {\n String key = (String) i.next();\n /**This control is used to separate the thread type from the sensor type*/\n if (!key.matches(Constant.Regexp.THREAD_CONTROL) && key.length() != 2) {\n\n /**Creates a new thread and registers it as \"nodename: thingname\"\n * of type \"map\" so that it is easy to check later*/\n threadControl.put(key, new ThreadUtils(mContext));\n }\n }\n } else {\n LogUtils.logger(TAG, \"There is a thread named as \" + keys);\n }\n }\n }",
"@Override\n\tpublic void check() {\n\t\t\n\t}",
"@Override\n\tpublic void check() {\n\t\t\n\t}",
"@Override\n\tpublic void check() throws Exception {\n\t}",
"private CheckingTools() {\r\n super();\r\n }",
"protected PayerThread() {\n\t\t\tEvent.ASSERTION.issue(sets == null, \"builders is null\");\n\t\t\tEvent.ASSERTION.issue(workloadConfiguration == null, \"configuration is null\");\n\n\t\t\tsetDaemon(true);\n\t\t}",
"public DemographicInfoTaskChecker() {\n }",
"public static void main(String[] args) {\n final DoubleCheck[] doubleCheckThread1 = new DoubleCheck[2];\n Thread thread1 = new Thread(new Runnable() {\n @Override\n public void run() {\n doubleCheckThread1[0] = DoubleCheck.getInstance();\n }\n });\n\n Thread thread2 = new Thread(new Runnable() {\n @Override\n public void run() {\n doubleCheckThread1[1] = DoubleCheck.getInstance();\n }\n });\n thread1.start();\n thread2.start();\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(doubleCheckThread1[0].hashCode());\n System.out.println(doubleCheckThread1[1].hashCode());\n }",
"private void checkIfAlive() {\n synchronized (this) {\n if (!mIsAlive) {\n Log.e(LOG_TAG, \"use of a released dataHandler\", new Exception(\"use of a released dataHandler\"));\n //throw new AssertionError(\"Should not used a MXDataHandler\");\n }\n }\n }",
"private void checkCrossThreads() {\t\r\n\t\t\tisJumppingBetweenThreads = (currentThread != Thread.currentThread());\r\n\t\t}",
"@Override\n public void syncState() {\n scheduledCounter.check();\n }",
"private CheckUtil(){ }",
"private void onAccess() {\n ctx.itHolder().checkWeakQueue();\n\n checkRemoved();\n }",
"public void timeToCheckWorker() {\n notifyCanMove(this.getCurrentTurn().getCurrentPlayer());\n }",
"private RRCPConnectionListener() {\n mainThread = new Thread(this);\n }",
"Thread getLocker();",
"public Checker getChecker() {\n return checker;\n }",
"private TestsResultQueueEntry() {\n\t\t}",
"private void checkAccount() {\n Runnable load = new Runnable() {\n public void run() {\n try {\n// mPerson = mProvider.getPerson(mLogin.getUserGuid(), false);\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n mActivity.runOnUiThread(checkAccountRunnable);\n }\n }\n };\n\n Thread thread = new Thread(null, load, \"checkAccount\");\n thread.start();\n }",
"private UniqueElementSingleThreadWorker()\n {\n _state = ActivityState.INITIALIZING;\n _taskQueue = new UniqueTagQueue<String, Runnable>();\n \n _taskThread = new Thread(\"UniqueElementSingleThreadWorker-\" + COUNTER.incrementAndGet())\n {\n @Override\n public void run()\n {\n while(true)\n {\n try\n {\n Runnable task = _taskQueue.blockingPop();\n if(task == SHUTDOWN_TASK)\n {\n break;\n }\n task.run();\n }\n catch(InterruptedException ex) { }\n //Catch run time exceptions that the runnable might throw so that the thread does not die\n catch(RuntimeException ex)\n {\n ErrorReporter.reportUncaughtException(ex);\n }\n }\n \n _state = ActivityState.SHUT_DOWN;\n }\n };\n }",
"public void checkInside() {\n checkInsideDone = false;\n }",
"public void run() {\n\t\tthis.checkConnectedList();\n\t}",
"private void checkTickListener()\n\t{\n\t}",
"public void run() {\n /*\n r28 = this;\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled\n r24 = r0\n boolean r24 = r24.get()\n if (r24 == 0) goto L_0x000d\n L_0x000c:\n return\n L_0x000d:\n r6 = 0\n r17 = 0\n r14 = 0\n java.io.File r9 = new java.io.File // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r0 = r28\n java.net.URL r0 = r0.url // Catch:{ Exception -> 0x02f2 }\n r25 = r0\n java.lang.String r25 = r25.toString() // Catch:{ Exception -> 0x02f2 }\n java.lang.String r24 = r24.getTempFile(r25) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r9.<init>(r0) // Catch:{ Exception -> 0x02f2 }\n boolean r15 = r9.exists() // Catch:{ Exception -> 0x02f2 }\n anetwork.channel.entity.RequestImpl r19 = new anetwork.channel.entity.RequestImpl // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.net.URL r0 = r0.url // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r0 = r19\n r1 = r24\n r0.<init>((java.net.URL) r1) // Catch:{ Exception -> 0x02f2 }\n r24 = 0\n r0 = r19\n r1 = r24\n r0.setRetryTime(r1) // Catch:{ Exception -> 0x02f2 }\n r24 = 1\n r0 = r19\n r1 = r24\n r0.setFollowRedirects(r1) // Catch:{ Exception -> 0x02f2 }\n if (r15 == 0) goto L_0x007e\n java.lang.String r24 = \"Range\"\n java.lang.StringBuilder r25 = new java.lang.StringBuilder // Catch:{ Exception -> 0x02f2 }\n r25.<init>() // Catch:{ Exception -> 0x02f2 }\n java.lang.String r26 = \"bytes=\"\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n long r26 = r9.length() // Catch:{ Exception -> 0x02f2 }\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n java.lang.String r26 = \"-\"\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n java.lang.String r25 = r25.toString() // Catch:{ Exception -> 0x02f2 }\n r0 = r19\n r1 = r24\n r2 = r25\n r0.addHeader(r1, r2) // Catch:{ Exception -> 0x02f2 }\n L_0x007e:\n anetwork.channel.degrade.DegradableNetwork r16 = new anetwork.channel.degrade.DegradableNetwork // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n android.content.Context r24 = r24.context // Catch:{ Exception -> 0x02f2 }\n r0 = r16\n r1 = r24\n r0.<init>(r1) // Catch:{ Exception -> 0x02f2 }\n r24 = 0\n r0 = r16\n r1 = r19\n r2 = r24\n anetwork.channel.aidl.Connection r24 = r0.getConnection(r1, r2) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r1 = r28\n r1.conn = r0 // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n int r20 = r24.getStatusCode() // Catch:{ Exception -> 0x02f2 }\n if (r20 <= 0) goto L_0x00c7\n r24 = 200(0xc8, float:2.8E-43)\n r0 = r20\n r1 = r24\n if (r0 == r1) goto L_0x0121\n r24 = 206(0xce, float:2.89E-43)\n r0 = r20\n r1 = r24\n if (r0 == r1) goto L_0x0121\n r24 = 416(0x1a0, float:5.83E-43)\n r0 = r20\n r1 = r24\n if (r0 == r1) goto L_0x0121\n L_0x00c7:\n r24 = -102(0xffffffffffffff9a, float:NaN)\n java.lang.StringBuilder r25 = new java.lang.StringBuilder // Catch:{ Exception -> 0x02f2 }\n r25.<init>() // Catch:{ Exception -> 0x02f2 }\n java.lang.String r26 = \"ResponseCode:\"\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n r0 = r25\n r1 = r20\n java.lang.StringBuilder r25 = r0.append(r1) // Catch:{ Exception -> 0x02f2 }\n java.lang.String r25 = r25.toString() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n r1 = r24\n r2 = r25\n r0.notifyFail(r1, r2) // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x00ef\n r6.close() // Catch:{ Exception -> 0x0421 }\n L_0x00ef:\n if (r17 == 0) goto L_0x00f4\n r17.close() // Catch:{ Exception -> 0x0424 }\n L_0x00f4:\n if (r14 == 0) goto L_0x00f9\n r14.close() // Catch:{ Exception -> 0x0427 }\n L_0x00f9:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x011e }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x011e }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x011e }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x011e }\n monitor-exit(r25) // Catch:{ all -> 0x011e }\n goto L_0x000c\n L_0x011e:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x011e }\n throw r24\n L_0x0121:\n if (r15 == 0) goto L_0x0195\n r24 = 416(0x1a0, float:5.83E-43)\n r0 = r20\n r1 = r24\n if (r0 != r1) goto L_0x018c\n r15 = 0\n java.util.List r24 = r19.getHeaders() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n r1 = r24\n r0.removeRangeHeader(r1) // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x017a\n if (r6 == 0) goto L_0x0148\n r6.close() // Catch:{ Exception -> 0x042a }\n L_0x0148:\n if (r17 == 0) goto L_0x014d\n r17.close() // Catch:{ Exception -> 0x042d }\n L_0x014d:\n if (r14 == 0) goto L_0x0152\n r14.close() // Catch:{ Exception -> 0x0430 }\n L_0x0152:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x0177 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x0177 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x0177 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x0177 }\n monitor-exit(r25) // Catch:{ all -> 0x0177 }\n goto L_0x000c\n L_0x0177:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x0177 }\n throw r24\n L_0x017a:\n r24 = 0\n r0 = r16\n r1 = r19\n r2 = r24\n anetwork.channel.aidl.Connection r24 = r0.getConnection(r1, r2) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r1 = r28\n r1.conn = r0 // Catch:{ Exception -> 0x02f2 }\n L_0x018c:\n r24 = 200(0xc8, float:2.8E-43)\n r0 = r20\n r1 = r24\n if (r0 != r1) goto L_0x0195\n r15 = 0\n L_0x0195:\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x01d8\n if (r6 == 0) goto L_0x01a6\n r6.close() // Catch:{ Exception -> 0x0433 }\n L_0x01a6:\n if (r17 == 0) goto L_0x01ab\n r17.close() // Catch:{ Exception -> 0x0436 }\n L_0x01ab:\n if (r14 == 0) goto L_0x01b0\n r14.close() // Catch:{ Exception -> 0x0439 }\n L_0x01b0:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x01d5 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x01d5 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x01d5 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x01d5 }\n monitor-exit(r25) // Catch:{ all -> 0x01d5 }\n goto L_0x000c\n L_0x01d5:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x01d5 }\n throw r24\n L_0x01d8:\n r12 = 0\n if (r15 != 0) goto L_0x0250\n java.io.BufferedOutputStream r7 = new java.io.BufferedOutputStream // Catch:{ Exception -> 0x02f2 }\n java.io.FileOutputStream r24 = new java.io.FileOutputStream // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r0.<init>(r9) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r7.<init>(r0) // Catch:{ Exception -> 0x02f2 }\n r6 = r7\n L_0x01eb:\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n java.util.Map r24 = r24.getConnHeadFields() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n r1 = r20\n r2 = r24\n long r22 = r0.parseContentLength(r1, r2, r12) // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n anetwork.channel.aidl.ParcelableInputStream r14 = r24.getInputStream() // Catch:{ Exception -> 0x02f2 }\n if (r14 != 0) goto L_0x0279\n r24 = -103(0xffffffffffffff99, float:NaN)\n java.lang.String r25 = \"input stream is null.\"\n r0 = r28\n r1 = r24\n r2 = r25\n r0.notifyFail(r1, r2) // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x021e\n r6.close() // Catch:{ Exception -> 0x043c }\n L_0x021e:\n if (r17 == 0) goto L_0x0223\n r17.close() // Catch:{ Exception -> 0x043f }\n L_0x0223:\n if (r14 == 0) goto L_0x0228\n r14.close() // Catch:{ Exception -> 0x0442 }\n L_0x0228:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x024d }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x024d }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x024d }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x024d }\n monitor-exit(r25) // Catch:{ all -> 0x024d }\n goto L_0x000c\n L_0x024d:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x024d }\n throw r24\n L_0x0250:\n java.io.RandomAccessFile r18 = new java.io.RandomAccessFile // Catch:{ Exception -> 0x02f2 }\n java.lang.String r24 = \"rw\"\n r0 = r18\n r1 = r24\n r0.<init>(r9, r1) // Catch:{ Exception -> 0x02f2 }\n long r12 = r18.length() // Catch:{ Exception -> 0x0474, all -> 0x046f }\n r0 = r18\n r0.seek(r12) // Catch:{ Exception -> 0x0474, all -> 0x046f }\n java.io.BufferedOutputStream r7 = new java.io.BufferedOutputStream // Catch:{ Exception -> 0x0474, all -> 0x046f }\n java.nio.channels.FileChannel r24 = r18.getChannel() // Catch:{ Exception -> 0x0474, all -> 0x046f }\n java.io.OutputStream r24 = java.nio.channels.Channels.newOutputStream(r24) // Catch:{ Exception -> 0x0474, all -> 0x046f }\n r0 = r24\n r7.<init>(r0) // Catch:{ Exception -> 0x0474, all -> 0x046f }\n r17 = r18\n r6 = r7\n goto L_0x01eb\n L_0x0279:\n r10 = -1\n r21 = 0\n r24 = 2048(0x800, float:2.87E-42)\n r0 = r24\n byte[] r8 = new byte[r0] // Catch:{ Exception -> 0x02f2 }\n L_0x0282:\n int r10 = r14.read(r8) // Catch:{ Exception -> 0x02f2 }\n r24 = -1\n r0 = r24\n if (r10 == r0) goto L_0x0354\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x02d8\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r24.cancel() // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x02a6\n r6.close() // Catch:{ Exception -> 0x0445 }\n L_0x02a6:\n if (r17 == 0) goto L_0x02ab\n r17.close() // Catch:{ Exception -> 0x0448 }\n L_0x02ab:\n if (r14 == 0) goto L_0x02b0\n r14.close() // Catch:{ Exception -> 0x044b }\n L_0x02b0:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x02d5 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x02d5 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x02d5 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x02d5 }\n monitor-exit(r25) // Catch:{ all -> 0x02d5 }\n goto L_0x000c\n L_0x02d5:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x02d5 }\n throw r24\n L_0x02d8:\n int r21 = r21 + r10\n r24 = 0\n r0 = r24\n r6.write(r8, r0, r10) // Catch:{ Exception -> 0x02f2 }\n r0 = r21\n long r0 = (long) r0 // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n long r24 = r24 + r12\n r0 = r28\n r1 = r24\n r3 = r22\n r0.notifyProgress(r1, r3) // Catch:{ Exception -> 0x02f2 }\n goto L_0x0282\n L_0x02f2:\n r11 = move-exception\n L_0x02f3:\n java.lang.String r24 = \"anet.DownloadManager\"\n java.lang.String r25 = \"file download failed!\"\n r26 = 0\n r27 = 0\n r0 = r27\n java.lang.Object[] r0 = new java.lang.Object[r0] // Catch:{ all -> 0x03ee }\n r27 = r0\n r0 = r24\n r1 = r25\n r2 = r26\n r3 = r27\n anet.channel.util.ALog.e(r0, r1, r2, r11, r3) // Catch:{ all -> 0x03ee }\n r24 = -104(0xffffffffffffff98, float:NaN)\n java.lang.String r25 = r11.toString() // Catch:{ all -> 0x03ee }\n r0 = r28\n r1 = r24\n r2 = r25\n r0.notifyFail(r1, r2) // Catch:{ all -> 0x03ee }\n if (r6 == 0) goto L_0x0322\n r6.close() // Catch:{ Exception -> 0x0460 }\n L_0x0322:\n if (r17 == 0) goto L_0x0327\n r17.close() // Catch:{ Exception -> 0x0463 }\n L_0x0327:\n if (r14 == 0) goto L_0x032c\n r14.close() // Catch:{ Exception -> 0x0466 }\n L_0x032c:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x0351 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x0351 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x0351 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x0351 }\n monitor-exit(r25) // Catch:{ all -> 0x0351 }\n goto L_0x000c\n L_0x0351:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x0351 }\n throw r24\n L_0x0354:\n r6.flush() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x039a\n if (r6 == 0) goto L_0x0368\n r6.close() // Catch:{ Exception -> 0x044e }\n L_0x0368:\n if (r17 == 0) goto L_0x036d\n r17.close() // Catch:{ Exception -> 0x0451 }\n L_0x036d:\n if (r14 == 0) goto L_0x0372\n r14.close() // Catch:{ Exception -> 0x0454 }\n L_0x0372:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x0397 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x0397 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x0397 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x0397 }\n monitor-exit(r25) // Catch:{ all -> 0x0397 }\n goto L_0x000c\n L_0x0397:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x0397 }\n throw r24\n L_0x039a:\n java.io.File r24 = new java.io.File // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.lang.String r0 = r0.filePath // Catch:{ Exception -> 0x02f2 }\n r25 = r0\n r24.<init>(r25) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r9.renameTo(r0) // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.lang.String r0 = r0.filePath // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r0 = r28\n r1 = r24\n r0.notifySuccess(r1) // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x03bc\n r6.close() // Catch:{ Exception -> 0x0457 }\n L_0x03bc:\n if (r17 == 0) goto L_0x03c1\n r17.close() // Catch:{ Exception -> 0x045a }\n L_0x03c1:\n if (r14 == 0) goto L_0x03c6\n r14.close() // Catch:{ Exception -> 0x045d }\n L_0x03c6:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x03eb }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x03eb }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x03eb }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x03eb }\n monitor-exit(r25) // Catch:{ all -> 0x03eb }\n goto L_0x000c\n L_0x03eb:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x03eb }\n throw r24\n L_0x03ee:\n r24 = move-exception\n L_0x03ef:\n if (r6 == 0) goto L_0x03f4\n r6.close() // Catch:{ Exception -> 0x0469 }\n L_0x03f4:\n if (r17 == 0) goto L_0x03f9\n r17.close() // Catch:{ Exception -> 0x046b }\n L_0x03f9:\n if (r14 == 0) goto L_0x03fe\n r14.close() // Catch:{ Exception -> 0x046d }\n L_0x03fe:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r25 = r0\n android.util.SparseArray r25 = r25.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x041e }\n r26 = r0\n android.util.SparseArray r26 = r26.taskMap // Catch:{ all -> 0x041e }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x041e }\n r27 = r0\n r26.remove(r27) // Catch:{ all -> 0x041e }\n monitor-exit(r25) // Catch:{ all -> 0x041e }\n throw r24\n L_0x041e:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x041e }\n throw r24\n L_0x0421:\n r24 = move-exception\n goto L_0x00ef\n L_0x0424:\n r24 = move-exception\n goto L_0x00f4\n L_0x0427:\n r24 = move-exception\n goto L_0x00f9\n L_0x042a:\n r24 = move-exception\n goto L_0x0148\n L_0x042d:\n r24 = move-exception\n goto L_0x014d\n L_0x0430:\n r24 = move-exception\n goto L_0x0152\n L_0x0433:\n r24 = move-exception\n goto L_0x01a6\n L_0x0436:\n r24 = move-exception\n goto L_0x01ab\n L_0x0439:\n r24 = move-exception\n goto L_0x01b0\n L_0x043c:\n r24 = move-exception\n goto L_0x021e\n L_0x043f:\n r24 = move-exception\n goto L_0x0223\n L_0x0442:\n r24 = move-exception\n goto L_0x0228\n L_0x0445:\n r24 = move-exception\n goto L_0x02a6\n L_0x0448:\n r24 = move-exception\n goto L_0x02ab\n L_0x044b:\n r24 = move-exception\n goto L_0x02b0\n L_0x044e:\n r24 = move-exception\n goto L_0x0368\n L_0x0451:\n r24 = move-exception\n goto L_0x036d\n L_0x0454:\n r24 = move-exception\n goto L_0x0372\n L_0x0457:\n r24 = move-exception\n goto L_0x03bc\n L_0x045a:\n r24 = move-exception\n goto L_0x03c1\n L_0x045d:\n r24 = move-exception\n goto L_0x03c6\n L_0x0460:\n r24 = move-exception\n goto L_0x0322\n L_0x0463:\n r24 = move-exception\n goto L_0x0327\n L_0x0466:\n r24 = move-exception\n goto L_0x032c\n L_0x0469:\n r25 = move-exception\n goto L_0x03f4\n L_0x046b:\n r25 = move-exception\n goto L_0x03f9\n L_0x046d:\n r25 = move-exception\n goto L_0x03fe\n L_0x046f:\n r24 = move-exception\n r17 = r18\n goto L_0x03ef\n L_0x0474:\n r11 = move-exception\n r17 = r18\n goto L_0x02f3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: anetwork.channel.download.DownloadManager.DownloadTask.run():void\");\n }",
"protected Checkpoint() {\n super();\n }",
"private void check() {\n ShedSolar.instance.haps.post( Events.WEATHER_REPORT_MISSED );\n LOGGER.info( \"Failed to receive weather report\" );\n\n // check again...\n startChecker();\n }",
"private CoinTracker() {\n api = new CryptoCompare();\n new SymbolThread().start();\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n e = new Elements(api);\n e.frames.mainFrame.setTitle(TITLE + \" : \" + api.HOME);\n e.frames.mainFrame.setVisible(true);\n new HttpThread().start();\n new HistThread().start();\n }\n });\n }",
"protected void run() {\r\n\t\t//\r\n\t}",
"private SingletonThreadSafeExample(){\n this.invoke++;\n }",
"private SingletonSyncBlock() {}",
"public final void inCheck() {\n\t\tout.println(\"You have been placed in check!\");\n\t}",
"private ThreadUtil() {\n throw new UnsupportedOperationException(\"This class is non-instantiable\"); //$NON-NLS-1$\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"private static void tickOnThread() {\n final Thread thread = new Thread(new Runnable(){\n @Override\n public void run() {\n tick(true);\n }\n });\n thread.start();\n }",
"static void onSpinWait() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tnew Verification(b);\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"public synchronized void startUpdates(){\n mStatusChecker.run();\n }",
"ThreadCounterRunner() {}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"public IllegalConnectionCheck() {\n listener = new LinkedHashSet<CheckListener>();\n active = true;\n }",
"public void check() {\n\t\t\ttry {\n\t\t\t\twhile (num < MAX) {\n\t\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t\tlong workingNum = num;\n\t\t\t\t\tif (isPrime(workingNum)) {\n\t\t\t\t\t\tif (workingNum == 1)\n\t\t\t\t\t\t\tworkingNum = 2;\n\t\t\t\t\t\tmsg.obj = workingNum;\n\t\t\t\t\t\thandler.sendMessage(msg);\n\n\t\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\t}\n\n\t\t\t\t\tnum += 2;\n\n\t\t\t\t}\n\n\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\tLog.d(TAG, \"Counter has reached Max\");\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"max\", \"Counter has reached Max\");\n\t\t\t\tmsg.setData(bundle);\n\t\t\t\thandler.sendMessage(msg);\n\n\t\t\t\t// If the Thread is interrupted.\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tLog.d(TAG, \"Thread interrupted\");\n\t\t\t}\n\n\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"private void checkSingleInstance() {\r\n\t\t//Erzeugt ein RandomAccessFile \"flag\"\r\n\t\tfinal File file = new File(\"flag\");\r\n\t\tRandomAccessFile randomAccessFile;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//Ist es der Applikation nicht möglich, das erstellte File zu sperren, zeigt es an, dass bereits eines vorhanden ist.\r\n\t\t\t//Dementsprechend wird die Applikation beendet, da bereits eine Instanz geöffnet wurde.\r\n\t\t\trandomAccessFile = new RandomAccessFile(file, \"rw\");\r\n\t\t\tfinal FileLock fileLock = randomAccessFile.getChannel().tryLock();\r\n\r\n\t\t\tif (fileLock == null) {\r\n\t\t\t\tPlatform.exit();\r\n\t\t\t}\r\n\t\t} catch (Exception e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"@Override\r\n\tpublic void preCheck(CheckCommand checkCommand) throws Exception {\n\r\n\t}",
"private void checking() {\n checkProgress = new ProgressDialog(DownloadActivity.this);\n checkProgress.setCancelable(false);\n checkProgress.setMessage(getResources().getString(R.string.checking_message));\n checkProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n checkProgress.setIndeterminate(true);\n checkProgress.show();\n new Thread(new Runnable() {\n public void run() {\n while (check == 0) {}\n checkProgress.dismiss();\n }\n }).start();\n }",
"private static boolean m61442b() {\n if (Looper.getMainLooper().getThread() == Thread.currentThread()) {\n return true;\n }\n return false;\n }",
"LockManager() {\n }",
"public void runOnAvailableCallback() {\n onAvailableCallback.run();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"protected void checkInitialized() {\n \tcheckState(this.breeder!=null && this.threads!=null, \"Local state was not correctly set after being deserialized.\");\n }",
"public void startTaskTriggerCheckerThread() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n canRunEnqueueTaskThread.set(true);\n while(canRunEnqueueTaskThread.get()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n if(taskEnqueued.get() || canRunTaskThread.get()) { //do not enqueue the task if an instance of that task is already enqueued or running.\n continue;\n //log(PrioritizedReactiveTask.this.getClass().getSimpleName() + \" already in queue or is currently executing\");\n } else if(shouldTaskActivate()) {\n System.out.println(\"Thread \" + Thread.currentThread().getId() + \" enqueued task: \" + this.getClass().getSimpleName());\n taskQueue.add(PrioritizedReactiveTask.this);\n activeTasks.add(PrioritizedReactiveTask.this);\n taskEnqueued.set(true);\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }).start();\n }",
"@Override\n\tpublic void msgCheckReady(double check, int table) {\n\t\tlog.add(new LoggedEvent(\"received msgCheckReady. check is \"+check+\" and table is \"+table));\n\t}",
"public AbstractConcurrentTestCase() {\n mainThread = Thread.currentThread();\n }",
"public static void checkUiThread() {\n if(Looper.getMainLooper() != Looper.myLooper()) {\n throw new IllegalStateException(\"Must be called from the Main Thread. Current Thread was :\"+ Thread.currentThread());\n }\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\tpublic void idleCheck() {\n\t\t\n\t}",
"@Override\n\tpublic void idleCheck() {\n\t\t\n\t}",
"void checked(){\n \n try {\n \n throw new CheckedException();\n } catch (CheckedException e) {\n e.printStackTrace();\n }\n\n }",
"private SleeperTask()\r\n\t{\r\n\t\ttimer = new Timer();\r\n\t\tprovider = null;\r\n\t\taction = \"\";\r\n\t\tverbose = false;\r\n\t\tsetRepeat(5);\r\n\t}",
"protected Tool() {\n\n\t\t// A hacky way of automatically registering it AFTER the parent constructor, assuming all went okay\n\t\tnew Thread(() -> {\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(3);\n\t\t\t} catch (final InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tfinal Tool instance = Tool.this;\n\n\t\t\tif (!isRegistered(instance))\n\t\t\t\tregister(instance);\n\t\t}).start();\n\t}",
"protected void checkCanRun() throws BuildException {\n \n }",
"@Override\n public boolean isThreadSafe()\n {\n return false;\n }",
"public static void initialize()\n {\n // Initiate election\n Runnable sender = new BullyAlgorithm(\"Sender\",\"election\");\n new Thread(sender).start();\n }",
"private void tokenRingThread() throws Exception {\n\t\tThread thread = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttokenRing.init();\n\t\t\t}\n\t\t});\n\t\tthread.start();\n\t}",
"public void run() {\n mSyncStart = null;\n\n // start sync\n SyncAdapter.requestSync(NumberValidation.this, true);\n\n // if we have been called internally, start ConversationList\n if (mFromInternal)\n startActivity(new Intent(getApplicationContext(), ConversationList.class));\n\n Toast.makeText(getApplicationContext(), R.string.msg_authenticated, Toast.LENGTH_LONG).show();\n\n // end this\n abortProgress();\n finish();\n }",
"public void OnRun()\r\n {\r\n try\r\n {\r\n Init();\r\n }\r\n catch(Exception ex)\r\n {\r\n eventLogger.error(ex);\r\n }\r\n \r\n try\r\n {\r\n this.types = this.config.getTypes();\r\n \r\n// this.checkList = dao.CheckLastRun();\r\n \r\n// if (checkList.size()>0)\r\n// {\r\n// Vector<Integer> checkListLastRun = checkList;\r\n// \r\n// checkList = new Vector<Integer>();\r\n// \r\n// CollectInvitees(true);\r\n// CollectInvitees(false);\r\n// \r\n// // lasttime missing some mails\r\n// RemoveSearched(checkListLastRun);\r\n// }\r\n// else\r\n// {\r\n dao.CleanChecklist();\r\n \r\n CollectInvitees(true);\r\n CollectInvitees(false);\r\n \r\n for(Integer id : this.checkList)\r\n {\r\n dao.BuildChecklist(id);\r\n }\r\n// }\r\n \r\n SendEmails();\r\n }\r\n catch(Exception ex)\r\n {\r\n eventLogger.warn(ex);\r\n }\r\n }",
"private SchedulerThreadCounter()\n\t{\n\t\tii_counter = 100;\n\t}",
"public TestMatchmakingHandler() {\r\n\t\tchecks = new AtomicInteger[3];\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tchecks[i] = new AtomicInteger(0);\r\n\t\t}\r\n\t}",
"@Override\n public void threadStarted() {\n }",
"static void m61437a() {\n if (!m61442b()) {\n throw new IllegalStateException(\"Method call should happen from the main thread.\");\n }\n }",
"public void run()\r\n/* 49: */ {\r\n/* 50:170 */ if (!TrafficCounter.this.monitorActive) {\r\n/* 51:171 */ return;\r\n/* 52: */ }\r\n/* 53:173 */ TrafficCounter.this.resetAccounting(TrafficCounter.milliSecondFromNano());\r\n/* 54:174 */ if (TrafficCounter.this.trafficShapingHandler != null) {\r\n/* 55:175 */ TrafficCounter.this.trafficShapingHandler.doAccounting(TrafficCounter.this);\r\n/* 56: */ }\r\n/* 57:177 */ TrafficCounter.this.scheduledFuture = TrafficCounter.this.executor.schedule(this, TrafficCounter.this.checkInterval.get(), TimeUnit.MILLISECONDS);\r\n/* 58: */ }",
"public void run() {\n\t\tcheckUsers();\n\t}",
"public JobManagerHolder() {\n this.instance = null;\n }",
"@Override\n\t\tpublic void run() {\n\n\t\t}",
"@Override\r\n\tpublic void run() {\n\t}",
"@Override\r\n\tpublic void run() {\n\t}",
"public static ThreadSafe getInstaceDoubleChecking(){\n if(instance==null){\n synchronized (ThreadSafe.class) {\n if (instance==null) {\n instance = new ThreadSafe();\n }\n }\n }\n return instance;\n }",
"public void StartFailureDetection()\n\t{\n\t\tm_FailDetThread = new Thread(m_oMember);\n\t\tm_FailDetThread.start();\n\t}"
] | [
"0.66063035",
"0.6579965",
"0.63881665",
"0.605359",
"0.5956032",
"0.5892935",
"0.58222824",
"0.5806798",
"0.5806798",
"0.57720226",
"0.57571465",
"0.569249",
"0.56823117",
"0.5664168",
"0.56385654",
"0.5632289",
"0.5631284",
"0.56161445",
"0.56126755",
"0.55899805",
"0.5566402",
"0.5565223",
"0.55642724",
"0.5555825",
"0.5492406",
"0.5488378",
"0.5473211",
"0.5469894",
"0.5469579",
"0.5461367",
"0.5451707",
"0.5447096",
"0.54382765",
"0.5436554",
"0.54346293",
"0.54337245",
"0.543338",
"0.542932",
"0.5428284",
"0.5428284",
"0.5409228",
"0.5409145",
"0.53923553",
"0.53923553",
"0.5390686",
"0.5389354",
"0.53864056",
"0.53839684",
"0.53830534",
"0.53830534",
"0.53830534",
"0.5366754",
"0.5366754",
"0.5366754",
"0.5366754",
"0.5366754",
"0.5366754",
"0.5366754",
"0.53657305",
"0.5357544",
"0.53542054",
"0.53542054",
"0.5334554",
"0.5330316",
"0.53284544",
"0.53141814",
"0.5313316",
"0.5311358",
"0.5309703",
"0.53091097",
"0.53091097",
"0.53048956",
"0.53048784",
"0.5299607",
"0.52971816",
"0.5296344",
"0.52952486",
"0.52952486",
"0.52925783",
"0.52925783",
"0.52909917",
"0.5278696",
"0.5276126",
"0.5274364",
"0.5274027",
"0.52673596",
"0.52651817",
"0.52644",
"0.52588177",
"0.5257642",
"0.5254964",
"0.5253738",
"0.5250566",
"0.524245",
"0.52422714",
"0.52402747",
"0.5232941",
"0.5229447",
"0.5229447",
"0.52288103",
"0.52262527"
] | 0.0 | -1 |
Tells if the response contains object. | public boolean hasObject(){
return _object != null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"boolean hasObject();",
"@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }",
"boolean hasGenericResponse();",
"public boolean hasObject() {\n return objectBuilder_ != null || object_ != null;\n }",
"boolean hasListResponse();",
"boolean hasReflectionResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"boolean hasResponse();",
"public boolean containsObject(T obj);",
"public boolean containsObject(T obj);",
"protected synchronized boolean isObjectPresent() { return objPresent; }",
"public boolean contains(T obj) {\r\n\t\tlogger.trace(\"Enter contains\");\r\n\t\tlogger.trace(\"Exit contains\");\r\n\t\treturn data.contains(obj);\r\n\t}",
"boolean isSerializeResponse();",
"default boolean checkJsonResp(JsonElement response) {\n return false;\n }",
"public boolean hasResponse() {\n return instance.hasResponse();\n }",
"public boolean hasResponse() {\n return instance.hasResponse();\n }",
"public boolean hasResponse() {\n return instance.hasResponse();\n }",
"public boolean hasResponse() {\n return instance.hasResponse();\n }",
"public boolean hasResponse() {\n return response_ != null;\n }",
"public boolean isObject() {\n return false;\n }",
"protected boolean isObject() {\n long mark = 0;\n try {\n mark = this.createMark();\n boolean bl = this.getObject() != null;\n return bl;\n }\n catch (MathLinkException e) {\n this.clearError();\n boolean bl = false;\n return bl;\n }\n finally {\n if (mark != 0) {\n this.seekMark(mark);\n this.destroyMark(mark);\n }\n }\n }",
"public boolean containsObject(AdvObject obj) {\n\t\treturn objects.contains(obj); // Replace with your code\n\t}",
"public boolean hasResponse() {\n return responseBuilder_ != null || response_ != null;\n }",
"public boolean hasListResponse() {\n return msgCase_ == 6;\n }",
"public boolean hasResponse() {\n return responseBuilder_ != null || response_ != null;\n }",
"public boolean hasResponse() {\n return response_ != null;\n }",
"public boolean hasResponse() {\n return response_ != null;\n }",
"public boolean hasResponse() {\n return response_ != null;\n }",
"public boolean isMaybeObject() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null && object_labels.stream().anyMatch(x -> x.getKind() != Kind.SYMBOL);\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasListResponse() {\n return msgCase_ == 6;\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"@Override\n\t\tpublic boolean contains(Object o) {\n\t\t\treturn false;\n\t\t}",
"public boolean isSetObject() {\n return this.object != null;\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasResponse() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"boolean hasSearchResponse();",
"public boolean hasBody() {\n return result.hasBody();\n }",
"public boolean hasBody() {\n return result.hasBody();\n }",
"public boolean hasBody() {\n return result.hasBody();\n }",
"public boolean hasBody() {\n return result.hasBody();\n }",
"public boolean hasBody() {\n return result.hasBody();\n }",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"public boolean contains( T obj )\n {\n if(nodes.containsKey(obj)){\n \treturn true;\n }\n return false;\n }",
"public boolean contains(WModelObject object)\n\t{\n\t\treturn m_elements.contains(object);\n\t}",
"public boolean contains(T obj) {\r\n return lastIndexOf(obj) != -1;\r\n }",
"public abstract boolean isObject(T type);",
"@Override\n public boolean isObject() {\n return false;\n }",
"public boolean hasObjUser() {\n return objUser_ != null;\n }",
"public boolean isReturnObjects() {\n return returnObjects;\n }",
"@Override\n\tpublic boolean contains(Object entity) {\n\t\treturn false;\n\t}",
"public boolean hasResponseBytes() {\n return result.hasResponseBytes();\n }",
"boolean hasInitialResponse();",
"@Override\n public boolean isExist(Object o) {\n return true;\n }",
"private boolean isPresent(JSONObject object, String key) {\n\n\t\treturn !(object.isNull(key));\n\n\t}",
"public boolean isObject() {\n\t\t// Object is the class that has itself as superclass\n\t\treturn getSuperClass() == this;\n\t}",
"@Override\n\tpublic boolean contains(T obj) {\n\t\tif (cache.contains(obj))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean contains(Object o);",
"public boolean contains(Object o);",
"protected boolean findObject(Object obj){\n \n }",
"@Override\r\n public boolean hasMoreObjects() {\r\n return hasMore;\r\n }",
"@Override\n public boolean hasNext() {\n return this.nextObject != null;\n }",
"public boolean hasContents() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"boolean hasResponseMessage();",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof ReturnItemResponse)) {\r\n return false;\r\n }\r\n ReturnItemResponse other = (ReturnItemResponse) object;\r\n if ((this.returnItemResponseId == null && other.returnItemResponseId != null) || (this.returnItemResponseId != null && !this.returnItemResponseId.equals(other.returnItemResponseId))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@java.lang.Override\n public boolean hasSearchResponse() {\n return searchResponse_ != null;\n }",
"public boolean hasContents() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasChunkResponse() {\n return chunkResponseBuilder_ != null || chunkResponse_ != null;\n }",
"public boolean isMaybeObjectOrSymbol() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null;\n }",
"public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains (Object obj) {\n\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\tif (obj.equals (p.myItem)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasResponse() {\n if(responses == null)\n return false;\n for(SapMessage response : responses) {\n if(response != null)\n return true;\n }\n return false;\n }",
"boolean isElement(Object object);",
"@Override\n public boolean contains(Object object) {\n T value = (T) object;\n boolean result = false;\n for (int index = 0; index < this.values.length; index++) {\n T data = (T) this.values[index];\n if (data != null) {\n if (value.equals(data)) {\n result = true;\n }\n }\n }\n\n return result;\n }",
"public boolean hasBody() {\n /*\n * For response, a message-body is explicitly forbidden in responses to HEAD requests\n * a message-body is explicitly forbidden in 1xx (informational), 204 (no content), and 304 (not modified)\n * responses\n */\n int code = statusLine.code();\n return !(code >= 100 && code < 200 || code == 204 || code == 304);\n }",
"public boolean hasContent() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"@Override\n public boolean contains(Object o) {\n return indexOf(o) >= 0;\n }"
] | [
"0.7244062",
"0.7244062",
"0.7244062",
"0.7244062",
"0.7244062",
"0.7244062",
"0.7244062",
"0.71908224",
"0.685573",
"0.682489",
"0.6674039",
"0.66646487",
"0.66378605",
"0.66378605",
"0.66378605",
"0.66378605",
"0.66378605",
"0.66378605",
"0.66378605",
"0.66378605",
"0.66378605",
"0.6481929",
"0.6481929",
"0.6481268",
"0.643149",
"0.6390183",
"0.63863325",
"0.6336496",
"0.6336496",
"0.6336496",
"0.6336496",
"0.6331004",
"0.6323083",
"0.6285323",
"0.6272133",
"0.6258251",
"0.6255202",
"0.624737",
"0.6240765",
"0.6240765",
"0.6240765",
"0.62390685",
"0.6214223",
"0.6213498",
"0.6194597",
"0.6170052",
"0.61686945",
"0.6155459",
"0.61511093",
"0.6147762",
"0.6146384",
"0.6128215",
"0.60780334",
"0.60780334",
"0.60780334",
"0.6076264",
"0.60668665",
"0.60668665",
"0.60668665",
"0.60668665",
"0.60668665",
"0.60654044",
"0.60654044",
"0.60654044",
"0.60483307",
"0.6023501",
"0.59891695",
"0.59821254",
"0.59664965",
"0.59646666",
"0.59608704",
"0.59338427",
"0.5927892",
"0.59265184",
"0.592249",
"0.5891245",
"0.58872706",
"0.5880816",
"0.58555377",
"0.58555377",
"0.58534664",
"0.5845119",
"0.5843596",
"0.5842463",
"0.5837712",
"0.583592",
"0.5832536",
"0.583207",
"0.5831375",
"0.5823945",
"0.58186865",
"0.5818349",
"0.5818349",
"0.5818349",
"0.58113956",
"0.5810602",
"0.58104014",
"0.58025265",
"0.58014065",
"0.5796364"
] | 0.7035561 | 8 |
Update CrystalThrowShard damage / NOTE "if(c instanceof Crystal_Needle_Rain)" did NOT work. | @Override
public void receivePostDraw(AbstractCard c)
{
if (c.cardID.equals("Crystal_Needle_Rain")) // TODO: Fix damage to be green on card; change damage not
// baseDamage somehow
c.baseDamage = c.baseMagicNumber * Crystal_Needle_Rain.countShards();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }",
"public void applyDamage(int damage)\r\n\t{\r\n\r\n\t}",
"public void repair(){\n if(health < 9) {\n this.health++;\n }\n }",
"public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }",
"private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }",
"@Override\n protected int strengthViability(Creature c){\n int baseViability = super.strengthViability(c);\n if (Elements.elementDamageMultiplier(c,bossFormation.getFrontCreature().getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST * 3);\n }\n if (Elements.elementDamageMultiplier(bossFormation.getFrontCreature(),c.getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST / 3);\n }\n return baseViability;\n }",
"@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }",
"public static boolean addColdWound(@Nullable Creature performer, @Nonnull Creature defender, int pos, double damage, float armourMod, float infection, float poison, boolean noMinimumDamage, boolean spell) {\n/* 2032 */ if (performer != null && performer.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 2034 */ damage = performer.getTemplate().getCreatureAI().causedWound(performer, defender, (byte)8, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 2037 */ if (defender.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 2039 */ damage = defender.getTemplate().getCreatureAI().receivedWound(defender, performer, (byte)8, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 2042 */ if (defender.getCultist() != null && defender.getCultist().hasNoElementalDamage())\n/* 2043 */ return false; \n/* 2044 */ boolean dead = false;\n/* 2045 */ if (damage * armourMod > 500.0D || noMinimumDamage) {\n/* */ DbWound dbWound;\n/* 2047 */ if (defender.hasSpellEffect((byte)68)) {\n/* */ \n/* 2049 */ defender.reduceStoneSkin();\n/* 2050 */ return false;\n/* */ } \n/* 2052 */ Wound wound = null;\n/* 2053 */ boolean foundWound = false;\n/* 2054 */ if (performer != null) {\n/* */ \n/* 2056 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 2057 */ segments.add(new MulticolorLineSegment(\"Your weapon\", (byte)3));\n/* 2058 */ segments.add(new MulticolorLineSegment(\" freezes \", (byte)3));\n/* 2059 */ segments.add(new CreatureLineSegment(defender));\n/* 2060 */ segments.add(new MulticolorLineSegment(\".\", (byte)3));\n/* */ \n/* 2062 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ \n/* 2064 */ segments.set(0, new CreatureLineSegment(performer));\n/* 2065 */ for (MulticolorLineSegment s : segments) {\n/* 2066 */ s.setColor((byte)7);\n/* */ }\n/* 2068 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 2074 */ if (defender.getBody().getWounds() != null) {\n/* */ \n/* 2076 */ wound = defender.getBody().getWounds().getWoundTypeAtLocation((byte)pos, (byte)8);\n/* 2077 */ if (wound != null)\n/* */ {\n/* 2079 */ if (wound.getType() == 8) {\n/* */ \n/* 2081 */ defender.setWounded();\n/* 2082 */ wound.setBandaged(false);\n/* 2083 */ dead = wound.modifySeverity((int)(damage * armourMod), (performer != null && performer.isPlayer()), spell);\n/* 2084 */ foundWound = true;\n/* */ } else {\n/* */ \n/* 2087 */ wound = null;\n/* */ } } \n/* */ } \n/* 2090 */ if (wound == null)\n/* */ {\n/* 2092 */ if (WurmId.getType(defender.getWurmId()) == 1) {\n/* 2093 */ TempWound tempWound = new TempWound((byte)8, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, spell);\n/* */ } else {\n/* */ \n/* 2096 */ dbWound = new DbWound((byte)8, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, (performer != null && performer.isPlayer()), spell);\n/* */ } \n/* */ }\n/* 2099 */ if (!foundWound)\n/* 2100 */ dead = defender.getBody().addWound((Wound)dbWound); \n/* */ } \n/* 2102 */ return dead;\n/* */ }",
"private void takeDamage(int damage){ health -= damage;}",
"@Override\n\tpublic void takeDamage(double damage) {\n\n\t}",
"public void reduceHealth(int damage){\n health -= damage;\n }",
"public int takeDamage(int damage) {\n damage -= ARMOR;\r\n // set new hp\r\n return super.takeDamage(damage);\r\n }",
"public void takeDamage(int damage) {\n this.damageTaken += damage;\n }",
"public void setHandThrowDamage(short handThrowDamage);",
"public void takeDamage(int damage);",
"@Override\n\tpublic void damage(float f) {\n\t\t\n\t}",
"public void reduceHealth(int ammo_damage){\n this.health -= ammo_damage;\n }",
"public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }",
"@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}",
"public void magicAttack(Character c) {\n\t\ttempHealth = c.getHealth() - _strMagic + c.getMagicDef();\n\t\tc.setHealth(tempHealth);\n\t\t_currentMagic -= 2;\n\t}",
"public void damage(int amount) {\n \tshield = shield - amount;\n }",
"public void setBowDamage(short bowDamage);",
"private void subtractEnemySheild(int damage) {\n this.enemyShield -= damage;\n }",
"@Override\n public void attackedByShaman(double attack) {\n damageCounter += (2 * attack) / 3;\n this.attack = Math.max(this.attack - (2 * attack) / 3, 0);\n }",
"public void takeDamage(int dmg){\r\n this.currHP -= dmg;\r\n }",
"public void takeDamage(int damage) {\r\n this.health -= damage;\r\n if(this.health < 0)\r\n this.health = 0;\r\n }",
"public void damaged() {\n this.damageState = DamageState.DAMAGED;\n }",
"public void setHungerDamage(float hunger);",
"@Override\r\n\tpublic void setHealth(int strike) {\n\t\t\r\n\t}",
"public void setDamage(int d) {\r\n this.damage = d;\r\n }",
"public void calibrated() {\n weaponDamage = weaponDamage + 10;\r\n }",
"public static boolean addAcidWound(@Nullable Creature performer, @Nonnull Creature defender, int pos, double damage, float armourMod, float infection, float poison, boolean noMinimumDamage, boolean spell) {\n/* 1885 */ if (performer != null && performer.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1887 */ damage = performer.getTemplate().getCreatureAI().causedWound(performer, defender, (byte)10, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1890 */ if (defender.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1892 */ damage = defender.getTemplate().getCreatureAI().receivedWound(defender, performer, (byte)10, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1895 */ if (defender.getCultist() != null && defender.getCultist().hasNoElementalDamage())\n/* 1896 */ return false; \n/* 1897 */ boolean dead = false;\n/* 1898 */ if (damage * armourMod > 500.0D || noMinimumDamage) {\n/* */ DbWound dbWound;\n/* 1900 */ if (defender.hasSpellEffect((byte)68)) {\n/* */ \n/* 1902 */ defender.reduceStoneSkin();\n/* 1903 */ return false;\n/* */ } \n/* 1905 */ Wound wound = null;\n/* 1906 */ boolean foundWound = false;\n/* 1907 */ if (performer != null) {\n/* */ \n/* 1909 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 1910 */ segments.add(new MulticolorLineSegment(\"Acid from \", (byte)3));\n/* 1911 */ segments.add(new CreatureLineSegment(performer));\n/* 1912 */ segments.add(new MulticolorLineSegment(\" dissolves \", (byte)3));\n/* 1913 */ segments.add(new CreatureLineSegment(defender));\n/* 1914 */ segments.add(new MulticolorLineSegment(\".\", (byte)3));\n/* */ \n/* 1916 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ \n/* 1918 */ for (MulticolorLineSegment s : segments) {\n/* 1919 */ s.setColor((byte)7);\n/* */ }\n/* 1921 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1927 */ if (defender.getBody().getWounds() != null) {\n/* */ \n/* 1929 */ wound = defender.getBody().getWounds().getWoundTypeAtLocation((byte)pos, (byte)10);\n/* 1930 */ if (wound != null)\n/* */ {\n/* 1932 */ if (wound.getType() == 10) {\n/* */ \n/* 1934 */ defender.setWounded();\n/* 1935 */ wound.setBandaged(false);\n/* 1936 */ dead = wound.modifySeverity((int)(damage / 2.0D * armourMod), (performer != null && performer.isPlayer()), spell);\n/* 1937 */ foundWound = true;\n/* */ } else {\n/* */ \n/* 1940 */ wound = null;\n/* */ } } \n/* */ } \n/* 1943 */ if (wound == null)\n/* */ {\n/* 1945 */ if (WurmId.getType(defender.getWurmId()) == 1) {\n/* 1946 */ TempWound tempWound = new TempWound((byte)10, (byte)pos, (float)damage / 2.0F * armourMod, defender.getWurmId(), poison, infection, spell);\n/* */ } else {\n/* */ \n/* 1949 */ dbWound = new DbWound((byte)10, (byte)pos, (float)damage / 2.0F * armourMod, defender.getWurmId(), poison, infection, (performer != null && performer.isPlayer()), spell);\n/* */ } } \n/* 1951 */ if (!foundWound)\n/* 1952 */ dead = defender.getBody().addWound((Wound)dbWound); \n/* */ } \n/* 1954 */ return dead;\n/* */ }",
"public void damage(int damage, int penetration) {\n int def = defense;\n if (shield != null ) def += shield.getDefense();\n def = defense - penetration;\n if (def < 0) def = 0;\n if (def >= damage) return;\n health -= (damage - def);\n if (health < 0) health = 0;\n decreaseMoral((damage-def)/30);\n if (leader)\n color = new Color(color.getRed(), color.getGreen() + (damage-def)/2, color.getBlue() + (damage-def)/2);\n else\n color = new Color(color.getRed(), color.getGreen() + (damage-def)*2 , color.getBlue() + (damage-def)*2);\n }",
"public void doArriveEffect(Card c) {\r\n\t\t// May change later\r\n\t\tif (c.getName().contentEquals(\"Shrine\")) {\r\n\t\t\tdragonClank += 3;\r\n\t\t\tif (dragonClank > 24) {\r\n\t\t\t\tdragonClank = 24;\r\n\t\t\t}\r\n\t\t// Overlord and Watcher so far\r\n\t\t} else {\r\n\t\t\tfor (int j = 0; j < players.size(); j++) {\r\n\t\t\t\tif (!players.get(j).isDead() && !players.get(j).isFree()) {\r\n\t\t\t\t\tplayers.get(j).updateClankOnBoard(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tupdateBoardNoImageChange();\r\n\t}",
"public static boolean addWound(@Nullable Creature performer, Creature defender, byte type, int pos, double damage, float armourMod, String attString, @Nullable Battle battle, float infection, float poison, boolean archery, boolean alreadyCalculatedResist, boolean noMinimumDamage, boolean spell) {\n/* 1518 */ if (performer != null && performer.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1520 */ damage = performer.getTemplate().getCreatureAI().causedWound(performer, defender, type, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1523 */ if (defender != null && defender.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1525 */ damage = defender.getTemplate().getCreatureAI().receivedWound(defender, performer, type, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1528 */ if (!alreadyCalculatedResist) {\n/* */ \n/* 1530 */ if (type == 8 || type == 4 || type == 10)\n/* */ {\n/* 1532 */ if (defender.getCultist() != null && defender.getCultist().hasNoElementalDamage()) {\n/* 1533 */ return false;\n/* */ }\n/* */ }\n/* 1536 */ if (defender.hasSpellEffect((byte)69))\n/* */ {\n/* 1538 */ damage *= 0.800000011920929D;\n/* */ }\n/* 1540 */ damage *= Wound.getResistModifier(performer, defender, type);\n/* */ } \n/* 1542 */ boolean dead = false;\n/* 1543 */ if (damage * armourMod > 500.0D || noMinimumDamage) {\n/* */ DbWound dbWound;\n/* 1545 */ if (defender.hasSpellEffect((byte)68)) {\n/* */ \n/* 1547 */ defender.reduceStoneSkin();\n/* 1548 */ return false;\n/* */ } \n/* 1550 */ Wound wound = null;\n/* 1551 */ boolean foundWound = false;\n/* 1552 */ String broadCastString = \"\";\n/* */ \n/* 1554 */ String otherString = (CombatHandler.getOthersString() == \"\") ? (attString + \"s\") : CombatHandler.getOthersString();\n/* */ \n/* */ \n/* 1557 */ CombatHandler.setOthersString(\"\");\n/* */ \n/* */ \n/* 1560 */ if (Server.rand.nextInt(10) <= 6 && defender.getBody().getWounds() != null) {\n/* 1561 */ wound = defender.getBody().getWounds().getWoundTypeAtLocation((byte)pos, type);\n/* */ }\n/* 1563 */ if (wound != null) {\n/* */ \n/* 1565 */ defender.setWounded();\n/* 1566 */ if (infection > 0.0F)\n/* 1567 */ wound.setInfectionSeverity(Math.min(99.0F, wound\n/* 1568 */ .getInfectionSeverity() + Server.rand.nextInt((int)infection))); \n/* 1569 */ if (poison > 0.0F)\n/* 1570 */ wound.setPoisonSeverity(Math.min(99.0F, wound.getPoisonSeverity() + poison)); \n/* 1571 */ wound.setBandaged(false);\n/* 1572 */ if (wound.getHealEff() > 0 && Server.rand.nextInt(2) == 0)\n/* 1573 */ wound.setHealeff((byte)0); \n/* 1574 */ dead = wound.modifySeverity((int)(damage * armourMod), (performer != null) ? performer.isPlayer() : false, spell);\n/* 1575 */ foundWound = true;\n/* */ }\n/* */ else {\n/* */ \n/* 1579 */ if (!defender.isPlayer()) {\n/* 1580 */ TempWound tempWound = new TempWound(type, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, spell);\n/* */ } else {\n/* */ \n/* 1583 */ dbWound = new DbWound(type, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, (performer != null) ? performer.isPlayer() : false, spell);\n/* 1584 */ } defender.setWounded();\n/* */ } \n/* */ \n/* 1587 */ if (performer != null && !attString.isEmpty()) {\n/* */ \n/* 1589 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 1590 */ segments.add(new CreatureLineSegment(performer));\n/* 1591 */ segments.add(new MulticolorLineSegment(\" \" + otherString + \" \", (byte)0));\n/* 1592 */ if (performer == defender) {\n/* 1593 */ segments.add(new MulticolorLineSegment(performer.getHimHerItString() + \"self\", (byte)0));\n/* */ } else {\n/* 1595 */ segments.add(new CreatureLineSegment(defender));\n/* 1596 */ } segments.add(new MulticolorLineSegment(\" \" + getStrengthString(damage / 1000.0D) + \" in the \" + defender\n/* 1597 */ .getBody().getWoundLocationString(dbWound.getLocation()) + \" and \" + \n/* 1598 */ getRealDamageString(damage * armourMod), (byte)0));\n/* 1599 */ segments.add(new MulticolorLineSegment(\"s it.\", (byte)0));\n/* */ \n/* 1601 */ MessageServer.broadcastColoredAction(segments, performer, defender, 5, true);\n/* */ \n/* 1603 */ for (MulticolorLineSegment s : segments) {\n/* 1604 */ broadCastString = broadCastString + s.getText();\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1612 */ if (performer != defender) {\n/* */ \n/* 1614 */ for (MulticolorLineSegment s : segments) {\n/* 1615 */ s.setColor((byte)7);\n/* */ }\n/* 1617 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1625 */ ((MulticolorLineSegment)segments.get(1)).setText(\" \" + attString + \" \");\n/* 1626 */ ((MulticolorLineSegment)segments.get(4)).setText(\" it.\");\n/* 1627 */ for (MulticolorLineSegment s : segments) {\n/* 1628 */ s.setColor((byte)3);\n/* */ }\n/* 1630 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1640 */ if (defender.isDominated())\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1647 */ if (!archery) {\n/* */ \n/* 1649 */ if (!defender.isReborn() || defender.getMother() != -10L) {\n/* 1650 */ defender.modifyLoyalty(-((int)(damage * armourMod) * defender.getBaseCombatRating() / 200000.0F));\n/* */ }\n/* 1652 */ } else if (defender.getDominator() == performer) {\n/* 1653 */ defender.modifyLoyalty(-((int)(damage * armourMod) * defender.getBaseCombatRating() / 200000.0F));\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1660 */ if (infection > 0.0F && !attString.isEmpty())\n/* */ {\n/* 1662 */ if (performer != null) {\n/* */ \n/* 1664 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 1665 */ segments.add(new MulticolorLineSegment(\"Your weapon\", (byte)3));\n/* 1666 */ segments.add(new MulticolorLineSegment(\" infects \", (byte)3));\n/* 1667 */ segments.add(new CreatureLineSegment(defender));\n/* 1668 */ segments.add(new MulticolorLineSegment(\" with a disease.\", (byte)3));\n/* */ \n/* 1670 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ \n/* 1672 */ segments.set(0, new CreatureLineSegment(performer));\n/* 1673 */ for (MulticolorLineSegment s : segments) {\n/* 1674 */ s.setColor((byte)7);\n/* */ }\n/* 1676 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1684 */ if (poison > 0.0F && !attString.isEmpty())\n/* */ {\n/* 1686 */ if (performer != null) {\n/* */ \n/* 1688 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 1689 */ segments.add(new MulticolorLineSegment(\"Your weapon\", (byte)3));\n/* 1690 */ segments.add(new MulticolorLineSegment(\" poisons \", (byte)3));\n/* 1691 */ segments.add(new CreatureLineSegment(defender));\n/* 1692 */ segments.add(new MulticolorLineSegment(\".\", (byte)3));\n/* */ \n/* 1694 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ \n/* 1696 */ segments.set(0, new CreatureLineSegment(performer));\n/* 1697 */ for (MulticolorLineSegment s : segments) {\n/* 1698 */ s.setColor((byte)7);\n/* */ }\n/* 1700 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1709 */ if (battle != null && performer != null) {\n/* 1710 */ battle.addEvent(new BattleEvent((short)114, performer.getName(), defender.getName(), broadCastString));\n/* */ }\n/* 1712 */ if (!foundWound)\n/* 1713 */ dead = defender.getBody().addWound((Wound)dbWound); \n/* */ } \n/* 1715 */ return dead;\n/* */ }",
"private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }",
"public void changeStats(gameCharacter toAffect);",
"public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }",
"private void calculateDamage() {\n this.baseDamage = this.actualBaseDamage;\n this.applyPowers();\n this.baseDamage = Math.max(this.baseDamage - ((this.baseDamage * this.otherCardsPlayed) / this.magicNumber), 0);\n }",
"PlayingSquare giveDamage(int damage);",
"public static boolean addDrownWound(@Nullable Creature performer, @Nonnull Creature defender, int pos, double damage, float armourMod, float infection, float poison, boolean noMinimumDamage, boolean spell) {\n/* 2108 */ if (performer != null && performer.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 2110 */ damage = performer.getTemplate().getCreatureAI().causedWound(performer, defender, (byte)7, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 2113 */ if (defender.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 2115 */ damage = defender.getTemplate().getCreatureAI().receivedWound(defender, performer, (byte)7, pos, armourMod, damage);\n/* */ }\n/* */ \n/* */ \n/* 2119 */ if (defender.getCultist() != null && defender.getCultist().hasNoElementalDamage())\n/* 2120 */ return false; \n/* 2121 */ if (defender.isSubmerged())\n/* */ {\n/* 2123 */ return false;\n/* */ }\n/* 2125 */ boolean dead = false;\n/* 2126 */ if (damage * armourMod > 500.0D || noMinimumDamage) {\n/* */ DbWound dbWound;\n/* 2128 */ Wound wound = null;\n/* 2129 */ boolean foundWound = false;\n/* 2130 */ if (performer != null) {\n/* */ \n/* 2132 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 2133 */ segments.add(new MulticolorLineSegment(\"Your weapon\", (byte)3));\n/* 2134 */ segments.add(new MulticolorLineSegment(\" drowns \", (byte)3));\n/* 2135 */ segments.add(new CreatureLineSegment(defender));\n/* 2136 */ segments.add(new MulticolorLineSegment(\".\", (byte)3));\n/* */ \n/* 2138 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ \n/* 2140 */ segments.set(0, new CreatureLineSegment(performer));\n/* 2141 */ for (MulticolorLineSegment s : segments) {\n/* 2142 */ s.setColor((byte)7);\n/* */ }\n/* 2144 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 2150 */ if (defender.getBody().getWounds() != null) {\n/* */ \n/* 2152 */ wound = defender.getBody().getWounds().getWoundTypeAtLocation((byte)pos, (byte)7);\n/* 2153 */ if (wound != null)\n/* */ {\n/* 2155 */ if (wound.getType() == 7) {\n/* */ \n/* 2157 */ defender.setWounded();\n/* 2158 */ wound.setBandaged(false);\n/* 2159 */ dead = wound.modifySeverity((int)(damage * armourMod), (performer != null && performer.isPlayer()), spell);\n/* 2160 */ foundWound = true;\n/* */ } else {\n/* */ \n/* 2163 */ wound = null;\n/* */ } } \n/* */ } \n/* 2166 */ if (wound == null)\n/* */ {\n/* 2168 */ if (WurmId.getType(defender.getWurmId()) == 1) {\n/* 2169 */ TempWound tempWound = new TempWound((byte)7, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, spell);\n/* */ } else {\n/* */ \n/* 2172 */ dbWound = new DbWound((byte)7, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, (performer != null && performer.isPlayer()), spell);\n/* */ } \n/* */ }\n/* 2175 */ if (!foundWound)\n/* 2176 */ dead = defender.getBody().addWound((Wound)dbWound); \n/* */ } \n/* 2178 */ if (dead && defender.isPlayer())\n/* 2179 */ defender.achievement(98); \n/* 2180 */ return dead;\n/* */ }",
"public void setSiegeWeaponDamage(short siegeWeaponDamage);",
"public void upgradeStats()\n {\n reload-=1;\n damage*=2;\n range+=50;\n }",
"protected int recalculateDamage(int baseDamage, Conveyer info, Combatant striker, Combatant victim) {\n return baseDamage;\n }",
"public void setHasLightSource(Creature creature, @Nullable Item lightSource) {\n/* 5438 */ if (lightSource != null && lightSource.getTemplateId() == 1243)\n/* */ return; \n/* 5440 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5444 */ if (lightSource == null) {\n/* */ \n/* 5446 */ if (vz.getWatcher().getWurmId() == creature.getWurmId()) {\n/* 5447 */ vz.sendRemoveEffect(-1L, (byte)0);\n/* */ } else {\n/* 5449 */ vz.sendRemoveEffect(creature.getWurmId(), (byte)0);\n/* */ }\n/* */ \n/* */ }\n/* 5453 */ else if (vz.getWatcher().getWurmId() == creature.getWurmId()) {\n/* */ \n/* 5455 */ if (lightSource.getColor() != -1) {\n/* */ \n/* 5457 */ int lightStrength = Math.max(WurmColor.getColorRed(lightSource.color), \n/* 5458 */ WurmColor.getColorGreen(lightSource.color));\n/* 5459 */ lightStrength = Math.max(lightStrength, WurmColor.getColorBlue(lightSource.color));\n/* 5460 */ byte r = (byte)(WurmColor.getColorRed(lightSource.color) * 128 / lightStrength);\n/* 5461 */ byte g = (byte)(WurmColor.getColorGreen(lightSource.color) * 128 / lightStrength);\n/* 5462 */ byte b = (byte)(WurmColor.getColorBlue(lightSource.color) * 128 / lightStrength);\n/* */ \n/* 5464 */ vz.sendAttachCreatureEffect(null, (byte)0, r, g, b, lightSource\n/* 5465 */ .getRadius());\n/* */ \n/* */ \n/* */ }\n/* 5469 */ else if (lightSource.isLightBright()) {\n/* */ \n/* 5471 */ int lightStrength = (int)(80.0F + lightSource.getCurrentQualityLevel() / 100.0F * 40.0F);\n/* 5472 */ vz.sendAttachCreatureEffect(null, (byte)0, \n/* 5473 */ Item.getRLight(lightStrength), Item.getGLight(lightStrength), \n/* 5474 */ Item.getBLight(lightStrength), lightSource.getRadius());\n/* */ } else {\n/* */ \n/* 5477 */ vz.sendAttachCreatureEffect(null, (byte)0, \n/* 5478 */ Item.getRLight(80), Item.getGLight(80), Item.getBLight(80), lightSource.getRadius());\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 5483 */ else if (lightSource.getColor() != -1) {\n/* */ \n/* 5485 */ int lightStrength = Math.max(WurmColor.getColorRed(lightSource.color), \n/* 5486 */ WurmColor.getColorGreen(lightSource.color));\n/* 5487 */ lightStrength = Math.max(lightStrength, WurmColor.getColorBlue(lightSource.color));\n/* 5488 */ byte r = (byte)(WurmColor.getColorRed(lightSource.color) * 128 / lightStrength);\n/* 5489 */ byte g = (byte)(WurmColor.getColorGreen(lightSource.color) * 128 / lightStrength);\n/* 5490 */ byte b = (byte)(WurmColor.getColorBlue(lightSource.color) * 128 / lightStrength);\n/* */ \n/* 5492 */ vz.sendAttachCreatureEffect(creature, (byte)0, r, g, b, lightSource\n/* 5493 */ .getRadius());\n/* */ \n/* */ \n/* */ }\n/* 5497 */ else if (lightSource.isLightBright()) {\n/* */ \n/* 5499 */ int lightStrength = (int)(80.0F + lightSource.getCurrentQualityLevel() / 100.0F * 40.0F);\n/* 5500 */ vz.sendAttachCreatureEffect(creature, (byte)0, \n/* 5501 */ Item.getRLight(lightStrength), Item.getGLight(lightStrength), \n/* 5502 */ Item.getBLight(lightStrength), lightSource.getRadius());\n/* */ } else {\n/* */ \n/* 5505 */ vz.sendAttachCreatureEffect(creature, (byte)0, \n/* 5506 */ Item.getRLight(80), Item.getGLight(80), Item.getBLight(80), lightSource.getRadius());\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 5511 */ catch (Exception e) {\n/* */ \n/* 5513 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }",
"public Shot(int damage) {\n\t\tthis.damage = damage;\n\t}",
"public void damageDevice() {\n\t\t\r\n\t}",
"public void takedmg(int dmg){\n curHp -= dmg;\n }",
"public void corrupt(int indexOfCrystal) {\n\t\tif(identifiedArray[indexOfCrystal] != null) {\n\t\t\tif(identifiedArray[indexOfCrystal].corrupted == false) {\n\t\t\t\tidentifiedArray[indexOfCrystal].corrupted = true;\n\t\t\t\tint rollCorrupt = rand.nextInt(12);\n\t\t\t\tif(rollCorrupt == 0) { // 1,2,3 upgrade %\n\t\t\t\t\tidentifiedArray[indexOfCrystal].crystalType = \"Blessed Token Boost\";\n\t\t\t\t\tcorrupt_tier_up(indexOfCrystal);\n\t\t\t\t}\n\t\t\t\tif(rollCorrupt == 1) {\n\t\t\t\t\tidentifiedArray[indexOfCrystal].crystalType = \"Blessed Sell Boost\";\n\t\t\t\t\tcorrupt_tier_up(indexOfCrystal);\n\t\t\t\t}\n\t\t\t\tif(rollCorrupt == 2) {\n\t\t\t\t\tidentifiedArray[indexOfCrystal].crystalType = \"Blessed EXP Boost\";\n\t\t\t\t\tcorrupt_tier_up(indexOfCrystal);\n\t\t\t\t}\n\t\t\t\tif((rollCorrupt>2)&&(rollCorrupt<6)){// 3,4,5 destroy\n\t\t\t\t\tidentifiedArray[indexOfCrystal] = null;\n\t\t\t\t}\n\t\t\t\tif(rollCorrupt == 6) { // 1,2,3 upgrade %\n\t\t\t\t\tidentifiedArray[indexOfCrystal].crystalType = \"Cursed Token Boost\";\n\t\t\t\t\tcorrupt_tier_down(indexOfCrystal);\n\t\t\t\t}\n\t\t\t\tif(rollCorrupt == 7) {\n\t\t\t\t\tidentifiedArray[indexOfCrystal].crystalType = \"Cursed Sell Boost\";\n\t\t\t\t\tcorrupt_tier_down(indexOfCrystal);\n\t\t\t\t}\n\t\t\t\tif(rollCorrupt == 8) {\n\t\t\t\t\tidentifiedArray[indexOfCrystal].crystalType = \"Cursed EXP Boost\";\n\t\t\t\t\tcorrupt_tier_down(indexOfCrystal);\n\t\t\t\t}\n\t\t\t\tif((rollCorrupt>8)&&(rollCorrupt<12)) { // 9,10,11\n\t\t\t\t\tString[] array1 = identifiedArray[indexOfCrystal].t2keywords;\n\t\t\t\t\tString[] array2 = identifiedArray[indexOfCrystal].keywords;\n\t\t\t\t\tboolean plus = false;\n\t\t\t\t\tfor(int i = 0;i<array1.length;i++) {\n\t\t\t\t\t\tif(array1[i]!=\"\") {\n\t\t\t\t\t\t\tarray1[i] += \"+\";\n\t\t\t\t\t\t\tplus = true;\n\t\t\t\t\t\t\tidentifiedArray[indexOfCrystal].rating *= 4;\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(plus == false) {\n\t\t\t\t\t\tfor(int i = 0;i<array2.length;i++) {\n\t\t\t\t\t\t\tif(array2[i]!=\"\") {\n\t\t\t\t\t\t\t\tarray2[i] += \"+\";\n\t\t\t\t\t\t\t\tplus = true;\n\t\t\t\t\t\t\t\tidentifiedArray[indexOfCrystal].rating *= 4;\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\t\n\t\t\t\t\tidentifiedArray[indexOfCrystal].t2keywords= array1;\n\t\t\t\t\tidentifiedArray[indexOfCrystal].keywords= array2;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"@ZenCodeType.Method\n @ZenCodeType.Setter(\"damageRodBy\")\n public static void damageRodBy(ItemFishedEvent internal, int damage) {\n \n internal.damageRodBy(damage);\n }",
"public short getBowDamage();",
"public short getHandThrowDamage();",
"public void specialEffect() {\n if (getDefense() > 0) {\n setDefense(0);\n setCurrentHealth(currentHealth + 50);\n }\n\n }",
"public int takeDamage(int damage) \r\n\t{\r\n\t\t//Pre: an int damage\r\n\t\t//Post: reduces health variable by damage\r\n\t\tif(health - damage > 0) \r\n\t\t{\r\n\t\t\thealth -= damage;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t\treturn health;\r\n\t}",
"public void corrupt_tier_up(int indexOfCrystal) {\n\t\tint newPercent = identifiedArray[indexOfCrystal].crystalPercent;\n\t\tnewPercent = newPercent / identifiedArray[indexOfCrystal].crystalTier;\n\t\tidentifiedArray[indexOfCrystal].crystalTier +=1;\n\t\tnewPercent = newPercent * identifiedArray[indexOfCrystal].crystalTier;\n\t\tidentifiedArray[indexOfCrystal].crystalPercent = newPercent;\n\t\tidentifiedArray[indexOfCrystal].rating = identifiedArray[indexOfCrystal].calculate_rating();\n\t}",
"public int giveDamage();",
"public abstract void incrementHealth(int hp);",
"public static boolean addRotWound(@Nullable Creature performer, Creature defender, int pos, double damage, float armourMod, float infection, float poison, boolean noMinimumDamage, boolean spell) {\n/* 1721 */ if (performer != null && performer.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1723 */ damage = performer.getTemplate().getCreatureAI().causedWound(performer, defender, (byte)6, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1726 */ if (defender.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1728 */ damage = defender.getTemplate().getCreatureAI().receivedWound(defender, performer, (byte)6, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1731 */ boolean dead = false;\n/* 1732 */ if (damage * armourMod > 500.0D || noMinimumDamage) {\n/* */ DbWound dbWound;\n/* 1734 */ if (defender.hasSpellEffect((byte)68)) {\n/* */ \n/* 1736 */ defender.reduceStoneSkin();\n/* 1737 */ return false;\n/* */ } \n/* 1739 */ Wound wound = null;\n/* 1740 */ boolean foundWound = false;\n/* 1741 */ if (performer != null) {\n/* */ \n/* 1743 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 1744 */ segments.add(new MulticolorLineSegment(\"Your weapon\", (byte)3));\n/* 1745 */ segments.add(new MulticolorLineSegment(\" infects \", (byte)3));\n/* 1746 */ segments.add(new CreatureLineSegment(defender));\n/* 1747 */ segments.add(new MulticolorLineSegment(\" with a disease.\", (byte)3));\n/* */ \n/* 1749 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ \n/* 1751 */ segments.set(0, new CreatureLineSegment(performer));\n/* 1752 */ for (MulticolorLineSegment s : segments) {\n/* 1753 */ s.setColor((byte)7);\n/* */ }\n/* 1755 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1761 */ if (defender.getBody().getWounds() != null) {\n/* */ \n/* 1763 */ wound = defender.getBody().getWounds().getWoundTypeAtLocation((byte)pos, (byte)6);\n/* 1764 */ if (wound != null)\n/* */ {\n/* 1766 */ if (wound.getType() == 6) {\n/* */ \n/* 1768 */ defender.setWounded();\n/* 1769 */ wound.setBandaged(false);\n/* 1770 */ dead = wound.modifySeverity((int)(damage * armourMod), (performer != null && performer.isPlayer()), spell);\n/* 1771 */ wound.setInfectionSeverity(Math.min(99.0F, wound.getInfectionSeverity() + infection));\n/* 1772 */ foundWound = true;\n/* */ } else {\n/* */ \n/* 1775 */ wound = null;\n/* */ } \n/* */ }\n/* */ } \n/* 1779 */ if (wound == null)\n/* */ {\n/* 1781 */ if (WurmId.getType(defender.getWurmId()) == 1) {\n/* */ \n/* 1783 */ TempWound tempWound = new TempWound((byte)6, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, spell);\n/* */ } else {\n/* */ \n/* 1786 */ dbWound = new DbWound((byte)6, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, (performer != null && performer.isPlayer()), spell);\n/* */ } \n/* */ }\n/* 1789 */ if (!foundWound)\n/* 1790 */ dead = defender.getBody().addWound((Wound)dbWound); \n/* */ } \n/* 1792 */ return dead;\n/* */ }",
"@Override\n\tpublic void UpdateReductin(int red, long shelfId) {\n\t\t\n\t\tshelfRepository.updateReductionPercentage(red, shelfId);\n\t}",
"@Override\n public void addDamage(Player shooter, int damage) {\n if(!this.equals(shooter) && damage > 0) {\n int num=0;\n boolean isRage = false;\n Kill lastKill = null;\n List<PlayerColor> marksToBeRemoved = marks.stream().filter(m -> m == shooter.getColor()).collect(Collectors.toList());\n damage += marksToBeRemoved.size();\n marks.removeAll(marksToBeRemoved);\n\n if (this.damage.size() < 11) { //11\n for (int i = 0; i < damage; i++)\n this.damage.add(shooter.getColor());\n num = this.damage.size();\n if (num > 10) { //10\n this.deaths++;\n this.isDead = true;\n if (num > 11) {\n isRage = true;\n shooter.addThisTurnMarks(this, 1); //the shooter receive a mark in case of rage\n }\n if (game != null)\n game.addThisTurnKill(shooter, this, isRage);\n\n } else if (num > 5)\n this.adrenaline = AdrenalineLevel.SHOOTLEVEL;\n else if (num > 2)\n this.adrenaline = AdrenalineLevel.GRABLEVEL;\n } else if (this.damage.size() == 11 && damage > 0) { //11\n lastKill = game.getLastKill(this);\n lastKill.setRage(true);\n shooter.addThisTurnMarks(this, 1); //the shooter receive a mark in case of rage\n if(game != null)\n game.notifyRage(lastKill);\n }\n if (game != null)\n game.notifyDamage(this, shooter, damage, marksToBeRemoved.size());\n }\n }",
"Horse updateHorse(Horse horse);",
"public void takeDamage(int damage) {\n\t\tlife = (life-damage<0)?0:life-damage;\n\t}",
"void takeDamage(int points) {\n this.health -= points;\n }",
"@Override\n public void updateEntity()\n {\n super.updateEntity();\n\n // Updates heat level of the block based on internal tank amount.\n checkHeatLevels();\n\n // Server side processing for furnace.\n if (!this.worldObj.isRemote)\n {\n // Checks to see if we can add a bucket of water to internal tank.\n this.addBucketToInternalTank();\n\n // First tick for new item being cooked in furnace.\n if (this.getProgressValue() == 0 && this.canSmelt() && this.isPowered() && this.isRedstonePowered())\n {\n // Calculate length of time it should take to compute these genome combinations.\n ItemStack currentRecipe = this.getRecipeResult(\n SlotContainerTypeEnum.INPUT_INGREDIENT1,\n SlotContainerTypeEnum.INPUT_INGREDIENT2,\n SlotContainerTypeEnum.INPUT_EXTRA,\n SlotContainerTypeEnum.OUTPUT_RESULT1);\n \n if (currentRecipe == null)\n {\n // Default value for cooking genome if we have none.\n this.setProgressMaximum(200);\n }\n else\n {\n // Defined in MadEntities during mob init.\n this.setProgressMaximum(66);\n }\n\n // Increments the timer to kickstart the cooking loop.\n this.incrementProgressValue();\n }\n else if (this.getProgressValue() > 0 && this.canSmelt() && this.isPowered() && this.isRedstonePowered())\n {\n // Run on server when we have items and electrical power.\n // Note: This is the main work loop for the block!\n\n // Increments the timer to kickstart the cooking loop.\n this.incrementProgressValue();\n\n // Check if furnace has exceeded total amount of time to cook.\n if (this.getProgressValue() >= this.getProgressMaximum())\n {\n // Convert one item into another via 'cooking' process.\n this.setProgressValue(0);\n this.smeltItem();\n this.setInventoriesChanged();\n }\n }\n else\n {\n // Reset loop, prepare for next item or closure.\n this.setProgressValue(0);\n }\n }\n }",
"public void setDamage(double d) {\n damage = d;\n }",
"public abstract boolean updateBlackboard(Furniture c);",
"protected void setItemDamage(Material material, int damage) \r\n\t{\tthis.itemDamage.put(material, damage);\t}",
"@Override\n public void scaleStats() {\n this.damage = BASE_DMG + (this.getLevel() * 3);\n }",
"@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }",
"public void takeDamage(int dmg) {\n\t\thealth -= dmg;\n\t}",
"public static boolean addFireWound(@Nullable Creature performer, @Nonnull Creature defender, int pos, double damage, float armourMod, float infection, float poison, boolean noMinimumDamage, boolean spell) {\n/* 1798 */ if (performer != null && performer.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1800 */ damage = performer.getTemplate().getCreatureAI().causedWound(performer, defender, (byte)4, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1803 */ if (defender.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1805 */ damage = defender.getTemplate().getCreatureAI().receivedWound(defender, performer, (byte)4, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1808 */ if (defender.getCultist() != null && defender.getCultist().hasNoElementalDamage())\n/* 1809 */ return false; \n/* 1810 */ boolean dead = false;\n/* 1811 */ if (damage * armourMod > 500.0D || noMinimumDamage) {\n/* */ DbWound dbWound;\n/* 1813 */ if (defender.hasSpellEffect((byte)68)) {\n/* */ \n/* 1815 */ defender.reduceStoneSkin();\n/* 1816 */ return false;\n/* */ } \n/* 1818 */ Wound wound = null;\n/* 1819 */ boolean foundWound = false;\n/* 1820 */ if (performer != null) {\n/* */ \n/* 1822 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 1823 */ segments.add(new MulticolorLineSegment(\"Your weapon\", (byte)3));\n/* 1824 */ segments.add(new MulticolorLineSegment(\" burns \", (byte)3));\n/* 1825 */ segments.add(new CreatureLineSegment(defender));\n/* 1826 */ segments.add(new MulticolorLineSegment(\".\", (byte)3));\n/* */ \n/* 1828 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ \n/* 1830 */ segments.set(0, new CreatureLineSegment(performer));\n/* 1831 */ for (MulticolorLineSegment s : segments) {\n/* 1832 */ s.setColor((byte)7);\n/* */ }\n/* 1834 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1840 */ if (defender.getBody().getWounds() != null) {\n/* */ \n/* 1842 */ wound = defender.getBody().getWounds().getWoundTypeAtLocation((byte)pos, (byte)4);\n/* 1843 */ if (wound != null)\n/* */ {\n/* 1845 */ if (wound.getType() == 4) {\n/* */ \n/* 1847 */ defender.setWounded();\n/* 1848 */ wound.setBandaged(false);\n/* 1849 */ dead = wound.modifySeverity((int)(damage * armourMod), (performer != null && performer.isPlayer()), spell);\n/* 1850 */ foundWound = true;\n/* */ } else {\n/* */ \n/* 1853 */ wound = null;\n/* */ } } \n/* */ } \n/* 1856 */ if (wound == null)\n/* */ {\n/* 1858 */ if (WurmId.getType(defender.getWurmId()) == 1) {\n/* 1859 */ TempWound tempWound = new TempWound((byte)4, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, spell);\n/* */ } else {\n/* */ \n/* 1862 */ dbWound = new DbWound((byte)4, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, (performer != null && performer.isPlayer()), spell);\n/* */ } \n/* */ }\n/* 1865 */ if (!foundWound)\n/* 1866 */ dead = defender.getBody().addWound((Wound)dbWound); \n/* */ } \n/* 1868 */ return dead;\n/* */ }",
"@Override\n public final int groundModifier(final Wizard wizard, final int damageToModify) {\n return (int) Math.round((float) damageToModify * this.wizardModifier\n + this.getMagicNumber());\n }",
"public void updateArmorModifier(int p_184691_1_) {\n if (!this.world.isRemote) {\n this.getAttribute(Attributes.ARMOR).removeModifier(COVERED_ARMOR_BONUS_MODIFIER);\n if (p_184691_1_ == 0) {\n this.getAttribute(Attributes.ARMOR).applyPersistentModifier(COVERED_ARMOR_BONUS_MODIFIER);\n this.playSound(SoundEvents.ENTITY_SHULKER_CLOSE, 1.0F, 1.0F);\n } else {\n this.playSound(SoundEvents.ENTITY_SHULKER_OPEN, 1.0F, 1.0F);\n }\n }\n\n this.dataManager.set(PEEK_TICK, (byte)p_184691_1_);\n }",
"@Override\n public void attackedByPaladin(double attack) {\n this.attack += (2 * attack) / 3;\n damageCounter = Math.max(damageCounter - (2 * attack) / 3, 0);\n }",
"private static void processDamageResistance( CreatureTemplate ctr, String ER )\n {\n int open = ER.indexOf( \"(\" );\n int close = ER.indexOf( \")\" );\n String ERType = ER.substring( 19, open - 1 );\n String ERValue = ER.substring( open + 1, close );\n\n // Set Resistance by type\n if( ERType.equalsIgnoreCase( \"acid\" ) )\n ctr.getER().accessAcid().setResistance( Integer.parseInt( ERValue ) );\n if( ERType.equalsIgnoreCase( \"cold\" ) )\n ctr.getER().accessCold().setResistance( Integer.parseInt( ERValue ) );\n if( ERType.equalsIgnoreCase( \"electricity\" ) )\n ctr.getER().accessElectricity().setResistance( Integer.parseInt( ERValue ) );\n if( ERType.equalsIgnoreCase( \"fire\" ) )\n ctr.getER().accessFire().setResistance( Integer.parseInt( ERValue ) );\n if( ERType.equalsIgnoreCase( \"sonic\" ) )\n ctr.getER().accessSonic().setResistance( Integer.parseInt( ERValue ) );\n }",
"public void areaEffect(Player player){\n if(object.getProperties().containsKey(\"endLevel\")) {\n System.out.println(\"Fin du level\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n PlayScreen.setEndLevel();\n }\n\n if(object.getProperties().containsKey(\"startBossFight\")) {\n\n System.out.println(\"Start Boss Fight\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 9, cell);\n\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 9, cell);\n\n PlayScreen.cameraChangeBoss(true);\n setCategoryFilterFixture(GameTest.GROUND_BIT, PlayScreen.getFixtureStartBoss());\n\n }\n\n if(object.getProperties().containsKey(\"blueKnight\")) {\n System.out.println(\"Changement en bleu\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"blue\");\n }\n\n if(object.getProperties().containsKey(\"greyKnight\")) {\n System.out.println(\"Changement en gris\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"grey\");\n }\n\n if(object.getProperties().containsKey(\"redKnight\")) {\n System.out.println(\"Changement en rouge\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"red\");\n }\n\n }",
"public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}",
"@Override\r\n\tpublic void updateRcptDamage(RcptDamage RcptDamage) {\n\t\trcptDamageMapper.updateByPrimaryKeySelective(RcptDamage);\r\n\t}",
"@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker)\n\t{\n\t\treduceCurrentHp(damage, attacker, true);\n\t}",
"public static boolean addInternalWound(@Nullable Creature performer, @Nonnull Creature defender, int pos, double damage, float armourMod, float infection, float poison, boolean noMinimumDamage, boolean spell) {\n/* 1960 */ if (performer != null && performer.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1962 */ damage = performer.getTemplate().getCreatureAI().causedWound(performer, defender, (byte)9, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1965 */ if (defender.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1967 */ damage = defender.getTemplate().getCreatureAI().receivedWound(defender, performer, (byte)9, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1970 */ if (defender.isGhost() || defender.isUnique())\n/* 1971 */ return false; \n/* 1972 */ boolean dead = false;\n/* */ \n/* 1974 */ if (damage * armourMod > 500.0D || noMinimumDamage) {\n/* */ DbWound dbWound;\n/* 1976 */ Wound wound = null;\n/* 1977 */ boolean foundWound = false;\n/* 1978 */ if (performer != null) {\n/* */ \n/* 1980 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 1981 */ segments.add(new MulticolorLineSegment(\"Your weapon\", (byte)3));\n/* 1982 */ segments.add(new MulticolorLineSegment(\" causes pain deep inside \", (byte)3));\n/* 1983 */ segments.add(new CreatureLineSegment(defender));\n/* 1984 */ segments.add(new MulticolorLineSegment(\".\", (byte)3));\n/* */ \n/* 1986 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ \n/* 1988 */ segments.set(0, new CreatureLineSegment(performer));\n/* 1989 */ for (MulticolorLineSegment s : segments) {\n/* 1990 */ s.setColor((byte)7);\n/* */ }\n/* 1992 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1998 */ if (defender.getBody().getWounds() != null) {\n/* */ \n/* 2000 */ wound = defender.getBody().getWounds().getWoundTypeAtLocation((byte)pos, (byte)9);\n/* 2001 */ if (wound != null)\n/* */ {\n/* 2003 */ if (wound.getType() == 9) {\n/* */ \n/* 2005 */ defender.setWounded();\n/* 2006 */ wound.setBandaged(false);\n/* 2007 */ dead = wound.modifySeverity((int)(damage * armourMod), (performer != null && performer.isPlayer()), spell);\n/* 2008 */ foundWound = true;\n/* */ } else {\n/* */ \n/* 2011 */ wound = null;\n/* */ } } \n/* */ } \n/* 2014 */ if (wound == null)\n/* */ {\n/* 2016 */ if (WurmId.getType(defender.getWurmId()) == 1) {\n/* 2017 */ TempWound tempWound = new TempWound((byte)9, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, spell);\n/* */ } else {\n/* */ \n/* 2020 */ dbWound = new DbWound((byte)9, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, (performer != null && performer.isPlayer()), spell);\n/* */ } \n/* */ }\n/* 2023 */ if (!foundWound)\n/* 2024 */ dead = defender.getBody().addWound((Wound)dbWound); \n/* */ } \n/* 2026 */ return dead;\n/* */ }",
"private void doCardEffects(Card c) {\r\n\t\tcurrentPlayer.updateSkill(c.getSkill());\r\n\t\tcurrentPlayer.updateBoots(c.getBoots());\r\n\t\tcurrentPlayer.updateSwords(c.getSwords());\r\n\t\tcurrentPlayer.updateGold(c.getGold());\r\n\t\tcurrentPlayer.updateClankOnBoard(c.getClank());\r\n\t\tif (c.isTeleport()) {\r\n\t\t\tcurrentPlayer.updateTeleports(1);\r\n\t\t}\r\n\t\t\r\n\t\t// Do swag effect\r\n\t\tif (currentPlayer.getSwags() > 0 && c.getClank() > 0) currentPlayer.updateSkill(c.getClank()*currentPlayer.getSwags());\r\n\t\t\r\n\t\t// Draw last (not sure if required)\r\n\t\tcurrentPlayer.draw(c.getDraw());\r\n\t\t\r\n\t\t// Calculate conditions\r\n\t\tif (c.getCondition() != null) {\r\n\t\t\tif (c.getCondition()[0].contentEquals(\"companion\")) {\r\n\t\t\t\tif (currentPlayer.hasCompanion()) {\r\n\t\t\t\t\tcurrentPlayer.draw(1);\r\n\t\t\t\t}\r\n\t\t\t} else if (c.getCondition()[0].contentEquals(\"artifact\")) {\r\n\t\t\t\tif (currentPlayer.has(\"Artifact\")) {\r\n\t\t\t\t\tif (c.getCondition()[1].contentEquals(\"teleport\")) {\r\n\t\t\t\t\t\tcurrentPlayer.updateTeleports(1);\r\n\t\t\t\t\t} else if (c.getCondition()[1].contentEquals(\"skill\")) {\r\n\t\t\t\t\t\tcurrentPlayer.updateSkill(2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (c.getCondition()[0].contentEquals(\"crown\")) {\r\n\t\t\t\tif (currentPlayer.has(\"Crown\")) {\r\n\t\t\t\t\tif (c.getCondition()[1].contentEquals(\"heart\")) {\r\n\t\t\t\t\t\tupdateHealth(currentPlayer,1);\r\n\t\t\t\t\t} else if (c.getCondition()[1].contentEquals(\"swordboot\")) {\r\n\t\t\t\t\t\tcurrentPlayer.updateSwords(1);\r\n\t\t\t\t\t\tcurrentPlayer.updateBoots(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (c.getCondition()[0].contentEquals(\"monkeyidol\")) {\r\n\t\t\t\tif (currentPlayer.has(\"MonkeyIdol\")) {\r\n\t\t\t\t\tcurrentPlayer.updateSkill(2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Unique Cards\r\n\t\tif (c.isUnique()) {\r\n\t\t\t// Choose cards\r\n\t\t\tif (c.getName().contentEquals(\"Shrine\") || c.getName().contentEquals(\"Dragon Shrine\") ||\r\n\t\t\t\tc.getName().contentEquals(\"Treasure Hunter\") || \r\n\t\t\t\tc.getName().contentEquals(\"Underworld Dealing\") || c.getName().contentEquals(\"Mister Whiskers\") ||\r\n\t\t\t\tc.getName().contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tmustChoose.add(c.getName());\r\n\t\t\t\tchoosePrompt();\r\n\t\t\t} else if (c.getName().endsWith(\"Master Burglar\")) {\r\n\t\t\t\tcurrentPlayer.trash(\"Burgle\");\r\n\t\t\t} else if (c.getName().contentEquals(\"Dead Run\")) {\r\n\t\t\t\tcurrentPlayer.setRunning(true);\r\n\t\t\t} else if (c.getName().contentEquals(\"Flying Carpet\")) {\r\n\t\t\t\tcurrentPlayer.setFlying(true);\r\n\t\t\t} else if (c.getName().contentEquals(\"Watcher\") || c.getName().contentEquals(\"Tattle\")) {\r\n\t\t\t\tgiveOthersClank(1);\r\n\t\t\t} else if (c.getName().contentEquals(\"Swagger\")) {\r\n\t\t\t\tcurrentPlayer.setSwags(currentPlayer.getSwags()+1);\r\n\t\t\t} else if (c.getName().contentEquals(\"Search\")) {\r\n\t\t\t\tcurrentPlayer.setSearches(currentPlayer.getSearches()+1);\r\n\t\t\t} else if (c.getName().contentEquals(\"Sleight of Hand\") || c.getName().contentEquals(\"Apothecary\")) {\r\n\t\t\t\t// Including itself\r\n\t\t\t\t// If there are other cards, add discard\r\n\t\t\t\tif (currentPlayer.getPlayArea().getNonPlayedSize() > 1) {\r\n\t\t\t\t\tmustDiscard.add(c.getName());\r\n\t\t\t\t\tdiscardPrompt();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void receiveDamage(double damage) {\r\n health = health - damage;\r\n }",
"@Test\n public void useEffect() {\n \t//should normally run useItem method, but for testing it is not needed here.\n \tHealthEffect bombEff = (HealthEffect) bomb.getEffect().get(0);\n \tbombEff.applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP - 700);\n \tSpecial heal = new Special(SpecialType.HEALTHBLESS);\n \theal.getEffect().get(0).applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP);\n }",
"public abstract void setEffects(Tank t);",
"@Override\n public void hit(int damage)\n {\n state.hit(damage, this);\n }",
"public void injure(int a, PhysicsEntity attacker ){\n\t\ta *= getArmorPercentage();\n\t\tsuper.injure(a,attacker);\n\t}",
"void decreaseHealth(Float damage);",
"public void setDamage(int damage) {\r\n\t\tthis.damage = damage;\r\n\t}",
"public void onLivingUpdate()\n {\n if (this.worldObj.isDaytime() && !this.worldObj.isRemote && !this.isChild())\n {\n float var1 = this.getBrightness(100.0F);\n\n if (var1 > 0.5F && this.rand.nextFloat() * 30.0F < (var1 - 0.4F) * 2.0F && this.worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)))\n {\n boolean var2 = true;\n ItemStack var3 = this.getEquipmentInSlot(4);\n\n if (var3 != null)\n {\n if (var3.isItemStackDamageable())\n {\n var3.setItemDamage(var3.getItemDamageForDisplay() + this.rand.nextInt(2));\n\n if (var3.getItemDamageForDisplay() >= var3.getMaxDamage())\n {\n this.renderBrokenItemStack(var3);\n this.setCurrentItemOrArmor(4, (ItemStack)null);\n }\n }\n\n var2 = false;\n }\n\n if (var2)\n {\n this.setFire(-99);\n }\n }\n }\n\n super.onLivingUpdate();\n }",
"public final void applyDamage(DamageDTO damage) {\n int rolledDamage = damage.getMaxDamage();\n if (rolledDamage > 0) {\n this.currentHitPoints -= rolledDamage;\n }\n if (this.currentHitPoints <= 0) {\n this.die();\n }\n }",
"public void damagePlayer(int damage){\n hero.decreaseHp(damage);\n }",
"@Override\n public String performSpecialEffect() {\n this.health += HEALTH_STEAL_AMOUNT;\n return \"The vampire stole a bit of health after it attacked.\";\n }",
"public void specialAttack(Character c) {\n\t\ttempHealth = c.getHealth() - (_strStat * 2) + c.getDef();\n\t\tc.setHealth(tempHealth);\n\t}",
"protected void setItemDamageLevel(Material material, double damage) \r\n\t{\tthis.itemDamageLevel.put(material, damage);\t}",
"boolean takeDamage(int dmg);",
"@Override\n public void run() {\n if (config.DebugLogging) {\n getLogger().info(\"Reverting Ice to Water to prevent server overload\");\n }\n\n Block fixblock = getServer().getWorld(blockloc.getWorld().getName()).getBlockAt(blockloc);\n fixblock.setType(Material.STATIONARY_WATER);\n\n }",
"public void handleAttack(int damage) {\n this.health -= damage;\n }",
"public void takeDamage(int damage) {\r\n health -= damage;\r\n if(health<=0)setAlive(false);\r\n }",
"public void setDamage(double damage) {\r\n\t\tthis.damage = damage;\r\n\t}",
"@Override\n\tpublic int calculateDamage() \n\t{\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}"
] | [
"0.60728765",
"0.6001775",
"0.5993675",
"0.5954932",
"0.59362364",
"0.59228444",
"0.5921377",
"0.58990717",
"0.5864842",
"0.5847589",
"0.5804342",
"0.5736712",
"0.57124674",
"0.5708561",
"0.5680796",
"0.56756485",
"0.56326884",
"0.56274074",
"0.56111836",
"0.55979854",
"0.5596053",
"0.5592378",
"0.55623394",
"0.55612385",
"0.55601037",
"0.5554565",
"0.55173045",
"0.5511696",
"0.5504349",
"0.5498601",
"0.5487342",
"0.5483141",
"0.54520977",
"0.54444957",
"0.5430377",
"0.54282933",
"0.54204166",
"0.5419272",
"0.54171646",
"0.5414967",
"0.5405622",
"0.53995377",
"0.53907496",
"0.5379485",
"0.5370985",
"0.53700316",
"0.53660864",
"0.53534883",
"0.53476185",
"0.53475344",
"0.533977",
"0.5325966",
"0.5324647",
"0.53190273",
"0.5316348",
"0.53156453",
"0.5312712",
"0.53126043",
"0.5305737",
"0.5299614",
"0.5294813",
"0.5288322",
"0.5285825",
"0.5283808",
"0.52823347",
"0.52773666",
"0.5270343",
"0.52692074",
"0.52614975",
"0.52597153",
"0.52510405",
"0.5247377",
"0.52433264",
"0.5232715",
"0.5231543",
"0.52314544",
"0.5226422",
"0.52232707",
"0.52199477",
"0.5218428",
"0.52179074",
"0.5211121",
"0.5206994",
"0.52050775",
"0.5203922",
"0.5196053",
"0.51944304",
"0.518811",
"0.51858836",
"0.51832116",
"0.518272",
"0.5180533",
"0.51785755",
"0.5167132",
"0.51571214",
"0.51529574",
"0.51490885",
"0.5137633",
"0.51320124",
"0.5132"
] | 0.66016775 | 0 |
Calculate damage based off skill chosen and return that number. Choosing is done differently for AI and human, hence abstract method. | public Skills chooseSkill(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int doDamage() {\n if (difficulty <5)\n return damage;\n else \n return damage*2;\n }",
"AbilityDamage getAbilityDamage();",
"int getDamage();",
"int getDamage();",
"int getDamage();",
"int getDamage();",
"int getDamage();",
"public int giveDamage();",
"public int getDamage() {\n\t\treturn (int) (Math.random() * damageVariance) + damage;\n\t}",
"private void calculateDamage() {\n this.baseDamage = this.actualBaseDamage;\n this.applyPowers();\n this.baseDamage = Math.max(this.baseDamage - ((this.baseDamage * this.otherCardsPlayed) / this.magicNumber), 0);\n }",
"public short getSiegeWeaponDamage();",
"public int computeDamageTo(Combatant opponent) { return 0; }",
"public int getDamage() {\n //TODO\n return 1;\n }",
"public int getDamage() {\n \t\treturn damage + ((int) 0.5*level);\n \t}",
"@Override\n\tpublic int calculateDamage() \n\t{\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"@Override\n public int damage(){\n int damage = 0;\n Random rand = new Random();\n int x = rand.nextInt(20) + 1;\n if (x == 1)\n damage = 50;\n return damage; \n }",
"public static double getWeaponDamage(Item weapon, Skill attStrength) {\n/* 2348 */ if (weapon.isBodyPart() && weapon.getAuxData() != 100) {\n/* */ \n/* */ try {\n/* */ \n/* 2352 */ float f = Server.getInstance().getCreature(weapon.getOwnerId()).getCombatDamage(weapon);\n/* */ \n/* 2354 */ return (f + Server.rand.nextFloat() * f * 2.0F);\n/* */ }\n/* 2356 */ catch (NoSuchCreatureException nsc) {\n/* */ \n/* 2358 */ logger.log(Level.WARNING, \"Could not find Creature owner of weapon: \" + weapon + \" due to \" + nsc.getMessage(), (Throwable)nsc);\n/* */ \n/* */ }\n/* 2361 */ catch (NoSuchPlayerException nsp) {\n/* */ \n/* 2363 */ logger.log(Level.WARNING, \"Could not find Player owner of weapon: \" + weapon + \" due to \" + nsp.getMessage(), (Throwable)nsp);\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2368 */ float base = 6.0F;\n/* 2369 */ if (weapon.isWeaponSword()) {\n/* */ \n/* 2371 */ base = 24.0F;\n/* */ }\n/* 2373 */ else if (weapon.isWeaponAxe()) {\n/* 2374 */ base = 30.0F;\n/* 2375 */ } else if (weapon.isWeaponPierce()) {\n/* 2376 */ base = 12.0F;\n/* 2377 */ } else if (weapon.isWeaponSlash()) {\n/* 2378 */ base = 18.0F;\n/* 2379 */ } else if (weapon.isWeaponCrush()) {\n/* 2380 */ base = 36.0F;\n/* 2381 */ } else if (weapon.isBodyPart() && weapon.getAuxData() == 100) {\n/* */ \n/* 2383 */ base = 6.0F;\n/* */ } \n/* 2385 */ if (weapon.isWood()) {\n/* 2386 */ base *= 0.1F;\n/* 2387 */ } else if (weapon.isTool()) {\n/* 2388 */ base *= 0.3F;\n/* */ } \n/* 2390 */ base = (float)(base * (1.0D + attStrength.getKnowledge(0.0D) / 100.0D));\n/* */ \n/* 2392 */ float randomizer = (50.0F + Server.rand.nextFloat() * 50.0F) / 100.0F;\n/* */ \n/* 2394 */ return base + (randomizer * base * 4.0F * weapon.getQualityLevel() * weapon.getDamagePercent()) / 10000.0D;\n/* */ }",
"public abstract int getRandomDamage();",
"public void takeDamage(int damage);",
"int getBonusHP();",
"@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }",
"public int getFishingSkill();",
"public short getHandThrowDamage();",
"@Override\n public double getDamageAmount() {\n return this.getStrength().getAbilityValue();\n }",
"public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }",
"@Override\n\tpublic Damage calculateDamage(int attackingPlayerIndex, int victimPlayerIndex)\n\t{\n\t\tdouble randomDamage = getParentCalculator().calculateRandomDamage();\n\t\tdouble conditionalDamage = -1;\n\t\t\n\t\tSkills attackingSkillEnum = getParentCalculator().getSkillEnum(attackingPlayerIndex);\n\t\t\n\t\tif(attackingSkillEnum == Skills.ROCK_THROW)\n\t\t{\n\t\t\tconditionalDamage = calculateRockThrowDamage(victimPlayerIndex);\n\t\t}\n\t\telse if(attackingSkillEnum == Skills.SCISSORS_POKE)\n\t\t{\n\t\t\tconditionalDamage = calculateScissorPokeDamage(victimPlayerIndex);\n\t\t}\n\t\telse if(attackingSkillEnum == Skills.PAPER_CUT)\n\t\t{\n\t\t\tconditionalDamage = calculatePaperCutDamage(victimPlayerIndex);\n\t\t}\n\t\telse if(attackingSkillEnum == Skills.SHOOT_THE_MOON)\n\t\t{\n\t\t\tconditionalDamage = super.calculateShootTheMoonDamage(attackingPlayerIndex, victimPlayerIndex);\n\t\t}\n\t\telse if(attackingSkillEnum == Skills.REVERSAL_OF_FORTUNE)\n\t\t{\n\t\t\tconditionalDamage = super.calculateReversalOfFortuneDamage(attackingPlayerIndex);\n\t\t\trandomDamage = randomDamage + conditionalDamage;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// TODO throw custom exception\n\t\t\tthrow new RuntimeException(\"Unknown skill choice:\" + attackingSkillEnum);\n\t\t}\n\t\t\n\t\treturn new Damage(randomDamage, conditionalDamage);\n\t}",
"public int getSelectedWeaponDamage() {\n return 0;\n }",
"protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }",
"public int getDamage () {\n\t\treturn (this.puissance + stuff.getDegat());\n\t}",
"private void takeDamage(int damage){ health -= damage;}",
"public void applyDamage(int damage)\r\n\t{\r\n\r\n\t}",
"int getAttackRoll();",
"@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}",
"@Override\r\n\tpublic int attack() {\r\n\t\treturn rnd.nextInt(MAX_MONSTER_ATTACK_DAMAGE);\r\n\t}",
"@Override\n\tpublic int calculateCustomDamageTaken(Entity attacker, Entity defender, int damage, int attackType) {\n\t\treturn damage;\n\t}",
"public int attack()\n {\n int percent = Randomizer.nextInt(100) + 1;\n int baseDamage = super.attack();\n if(percent <= 5)\n {\n baseDamage *= 2;\n baseDamage += 50;\n }\n return baseDamage;\n }",
"public int takeDamage(int damage) \r\n\t{\r\n\t\t//Pre: an int damage\r\n\t\t//Post: reduces health variable by damage\r\n\t\tif(health - damage > 0) \r\n\t\t{\r\n\t\t\thealth -= damage;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t\treturn health;\r\n\t}",
"public void damage(int damageTaken) {\n //TODO: Create specific damage methods instead of damage calls everywhere(see damagedByBullet())\n if (!invincible) {\n this.hp -= damageTaken;\n }\n }",
"public int dmg(){\r\n dmg = rand.nextInt(att);\r\n if(att == 1)\r\n dmg = 1;\r\n return dmg;\r\n }",
"public float getHungerDamage();",
"@Override\n public int getEffectiveDamage(Hero hero){\n return (hero.getDex() + hero.getBonusDex()) * 2 + this.damage;\n }",
"private int attack(int chance, int additionalDamage) {\n if (diceRoll(10) <= chance) { //A statement where we call a diceRoll, if we hit under or equals the chance to hit, we calculate the damage\n int attackValue = player.getAttackValue() * (diceRoll(4) + additionalDamage); //Here we get the players attackValue, which then gets multiplied by a diceRoll + the additionalDamage from the chosen attack\n int damageDealt = 0;\n if (attackValue >= opponent.getArmor()) { //We check if our attackValue is greater than or equals to the opponents armor. If it is not, we don't deal any damage.\n damageDealt = (attackValue - opponent.getArmor()) + 1; //If we attack through the opponents armor, we deal the remaining damage + 1. (if we deal 1 damage and opponent has 1 armor, we still deal 1 damage)\n opponent.changeHealth(damageDealt * -1); //Changes the opponents health\n }\n return damageDealt;\n }\n return -1;\n }",
"private int calculateHeroDamageDone(Hero h, GenericMonster m){\n\t\t// Take into account armor, magic resist, thoughness, that kind of thing..\n\t\thDmg = h.getWeapon().calculateDamageDelt();\n\t\tcalcDef = new CalculateDefence(h.getWeapon(), m);\n\t\tint def = calcDef.getMonsterDefense();\n\t\t// Getting the defense value and type\n\t\tmResistance = calcDef.getMonsterDefType();\n\t\tmResistanceValue = calcDef.getMonsterDefValue();\n\t\treturn (hDmg - def);\n\t}",
"public double damageCalculation(Player player, NPC mob) {\r\n double weapon = player.getWeapon().getDamage();\r\n double attack = player.getStats().getAttack();\r\n double defence = mob.getStats().getDefence();\r\n double critMulti = 1;\r\n\r\n// Chance chance = new Chance(player.getLevel(), player.getStats().getDexterity(), player.getCharacterClass());\r\n Chance chance = new Chance(player.getStats().getCritChance());\r\n boolean crit = chance.getSuccess();\r\n\r\n if (crit) {\r\n critMulti = 2;\r\n System.out.println(\"CRIT!\");\r\n } else {\r\n// System.out.println(\"No crit\");\r\n }\r\n\r\n return ((weapon + attack) * 2 - defence) * critMulti;\r\n }",
"public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }",
"public int getDamage() {\n return damage;\n }",
"public void getDamaged(float dmg) {\n\t\tStagePanel.addValueLabel(parentGP,dmg,Commons.cAttack);\n\t\tif(shield - dmg >= 0) {\n\t\t\tshield-=dmg;\n\t\t\tdmg = 0;\n\t\t}else {\n\t\t\tdmg-=shield;\n\t\t\tshield = 0;\n\t\t}\n\t\tif(health-dmg > 0) {\n\t\t\thealth-=dmg;\n\t\t}else {\n\t\t\thealth = 0;\n\t\t}\n\t\tSoundEffect.play(\"Hurt.wav\");\n\t}",
"public int getDamage()\n\t{\n\t\treturn Damage;\n\t}",
"private static int playerDamageDealt(int playerAttack, int monsterDefense){\r\n int playerDamageDealt;\r\n playerDamageDealt = (playerAttack - monsterDefense);\r\n return playerDamageDealt;\r\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"public int getDamage() {\n return damage_;\n }",
"@Override\n public int attack(){\n //create an int list to store the numbers\n int[] arr = {zero, six, ten};\n //get a random index of the list\n int index = getRandom().nextInt(arr.length);\n //return the number on that random index\n int damageVal = arr[index];\n return damageVal;\n }",
"public static int physicalDamage(Creature attacker, Creature defender, int result)\n\t{\n\t\t\n\t\tdouble base;\n\t\t\n\t\tif(attacker instanceof Rogue)\n\t\t{\n\t\t\tbase = attacker.getAgility() * attacker.getAttackModifier();\n\t\t}else\n\t\t{\n\t\t\tbase = attacker.getStrength() * attacker.getAttackModifier();\n\t\t}\n\t\t\t\n\t\tint damage = (int) (base - defender.getDefense() - defender.getStamina());\t\t\n\t\t\n\t\t//ensures at least one point of damage done\n\t\tif(damage < 1){\n\t\t\tRandom damrand = new Random();\n\t\t\tdamage = damrand.nextInt((10) + 1);\n\t\t}\n\t\t\n\t\tif(result == 3)\n\t\t\t//crit damage\n\t\t\treturn damage * 2;\n\t\t\n\t\tif(result == 2)\n\t\t\t//regular damage\n\t\t\treturn damage;\n\t\t\n\t\tif(result == 1)\n\t\t{\n\t\t\tdamage = damage / 4;\n\t\t\t//ensures at least one point of damage done\n\t\t\tif(damage < 1)\n\t\t\t\tdamage = 1;\n\t\t\t\n\t\t\treturn damage;\n\t\t}\n\t\t\n\t\t\n\t\treturn 0;\n\t\t\n\t}",
"public short getBowDamage();",
"private double calculateDamage(Weapon weapon, double motionValue, Monster target, MonsterParts part, int weaknessExploitLevel, \n int critBoostLevel, boolean critElement, int samples) throws InvalidWeaponException, InvalidPartException {\n \n if (weapon == null) {\n throw new InvalidWeaponException(\"No weapon provided.\");\n }\n \n rawDamage = 0;\n critDamage = 0;\n elementalDamage = 0;\n elementalCritDamage = 0;\n criticalElement = critElement;\n \n if (weaknessExploitLevel == 0) {\n weaknessExploit = 0;\n } else if (weaknessExploitLevel == 1) {\n weaknessExploit = 15;\n } else if (weaknessExploitLevel == 2) {\n weaknessExploit = 30;\n } else if (weaknessExploitLevel == 3) {\n weaknessExploit = 50;\n } else {\n throw new IllegalArgumentException(\"Weakness Exploit must be level 0, 1, 2, or 3\");\n }\n \n if (critBoostLevel == 0) {\n critBoost = 0;\n } else if (critBoostLevel == 1) {\n critBoost = 5;\n } else if (critBoostLevel == 2) {\n critBoost = 10;\n } else if (critBoostLevel == 3) {\n critBoost = 15;\n } else {\n throw new IllegalArgumentException(\"Critical Boost must be level 0, 1, 2, or 3\");\n }\n \n for (int i = 0; i < samples; i++) {\n rawDamage += weapon.getAttack()/weapon.getInflation() * weapon.getRawSharpness() * target.getPartMultiplierRaw(part, weapon) * motionValue;\n elementalDamage += weapon.getElementStatusDmg()/10 * weapon.getElementalSharpness() * target.getPartMultiplierElemental(part, weapon);\n calculateCrit(target, part, weapon, motionValue);\n }\n \n return (rawDamage + critDamage + elementalDamage + elementalCritDamage)/samples;\n \n }",
"public static int getDamage(String name) {\n\n EnumMoreSwords swordType = getType(name);\n\n if (swordType != null) {\n\n return swordType.swordDamage;\n }\n\n return -1;\n }",
"public int getWeaponDamage()\r\n\t{\t\r\n\t\tint damageValue = 0; //damage for superclass / unspecified weapon type; overwritten if the referenced weapon is specified/exists\r\n\t\t\r\n\t\t//passes the subclass name of the referenced Weapon object and get its specified damage\r\n\t\t\r\n\t\tif (this.getClass ( ).getName().equals(\"Stick\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((Stick)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\telse if (this.getClass ( ).getName().equals(\"Sword\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((Sword)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\telse if (this.getClass ( ).getName().equals(\"Bazooka\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((Bazooka)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\telse if (this.getClass ( ).getName().equals(\"AtomicBomb\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((AtomicBomb)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\telse if (this.getClass ( ).getName().equals(\"PotatoCannon\"))\r\n\t\t{\r\n\t\t\tdamageValue = ((PotatoCannon)this).getWeaponDamage();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn damageValue;\r\n\t}",
"public int getDamage() {\r\n\t\treturn damage;\r\n\t}",
"public int computeRangedDamageTo(Combatant opponent) { return 0; }",
"float getBonusPercentHP();",
"public int healHero(int i) {\n int heal;\n switch (i) {\n case 1:\n heal = rand.nextInt(4) + 1;\n HP.replenish(heal);\n return heal;\n case 2:\n heal = rand.nextInt(5) + 2;\n HP.replenish(heal);\n return heal;\n case 3:\n heal = rand.nextInt(6) + 3;\n HP.replenish(heal);\n return heal;\n case 4:\n heal = rand.nextInt(9) + 5;\n HP.replenish(heal);\n return heal;\n case 5: // healing hero to full\n HP.replenish(100);\n default:\n return 0;\n }\n }",
"public double mageStrike()\r\n\t{\r\n\t\tdouble r = random.nextDouble();\r\n\t\tdmg2 = dmg + ((2*pRange)/100) * (r - 0.5) * dmg;\r\n\t\tif (r < (crit/100))\r\n\t\t{\r\n\t\t\tdmg2 = 2*dmg2;\r\n\t\t\taggro = aggro * 1.4;\r\n\t\t}\r\n\t\taggro = aggro * 1.2;\r\n\t\treturn dmg2;\r\n\t}",
"public abstract double experience();",
"public int calculateAttack() {\n int attack = 0;\n for (Weapon w : equippedWeapons) {\n attack += w.getType().getDamage();\n }\n return attack;\n }",
"public int calcCharMagicDamage() \n\t{\n\t\treturn npcInt;\n\t}",
"private static int calcMagicSkill(Thing caster, Thing spell) {\r\n \t\t// TODO skill modification\r\n \t\tif (caster==null) {\r\n \t\t\treturn (int)(5*Math.pow(spellPowerMultiplier,spell.getLevel()));\r\n \t\t}\r\n \t\tint skill=caster.getStat(spell.getString(\"Order\"));\r\n \t\tint st=(int)(caster.getStat(\"IN\")\r\n \t\t\t\t*(0.85+0.15*caster.getStat(Skill.CASTING))\r\n \t\t\t\t*(0.85+0.15*skill)); \r\n \t\treturn st;\r\n \t}",
"public void attack(String spell, character opponent){\n Random rand = new Random();\n int prob;\n String attack;\n \n prob = rand.nextInt(2); //we need two random numbers to allow us to use the two attacks:\n if(prob==0){\n attack = \"punch\";\n opponent.setHealth(opponent.getHealth() - 10);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n else if(prob==1){\n attack = \"kick\";\n opponent.setHealth(opponent.getHealth() - 15);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n \n }",
"PlayingSquare giveDamage(int damage);",
"public int getEquippedWeaponDamage() {\n return 0;\n }",
"public int shoot()\n {\n if(availableAmmo > 0)\n {\n System.out.println(\"Pew Pew\");\n availableAmmo--; \n damageCaused = randomDamageGenerator.nextInt(450);\n return damageCaused;\n }\n else return -1;\n }",
"@Override\n\tpublic int calculateCustomDamage(Entity attacker, Entity defender, int entityAttackType) {\n\t\tif (attacker.getType() == EntityType.NPC && defender.getType() == EntityType.PLAYER) {\n\t\t\tNpc attackerAsNpc = (Npc) attacker;\n\n\t\t\tPlayer defenderAsPlayer = (Player) defender;\n\n\t\t\tif (attack == AbyssalSireAttack.SWIPE) {\n\t\t\t\tif (defenderAsPlayer.prayerActive[ServerConstants.PROTECT_FROM_MELEE]) {\n\t\t\t\t\treturn ThreadLocalRandom.current().nextInt(2, 7);\n\t\t\t\t}\n\t\t\t\treturn NpcHandler.calculateNpcMeleeDamage(attackerAsNpc, defenderAsPlayer, -1, 32);\n\t\t\t} else if (attack == AbyssalSireAttack.TENDRIL_SWIPE) {\n\t\t\t\tif (defenderAsPlayer.prayerActive[ServerConstants.PROTECT_FROM_MELEE]) {\n\t\t\t\t\treturn ThreadLocalRandom.current().nextInt(0, 13);\n\t\t\t\t}\n\t\t\t\treturn NpcHandler.calculateNpcMeleeDamage(attackerAsNpc, defenderAsPlayer, -1, 40);\n\t\t\t} else if (attack == AbyssalSireAttack.DOUBLE_TENDRIL_SWIPE) {\n\t\t\t\tif (defenderAsPlayer.prayerActive[ServerConstants.PROTECT_FROM_MELEE]) {\n\t\t\t\t\treturn ThreadLocalRandom.current().nextInt(0, 26);\n\t\t\t\t}\n\t\t\t\treturn NpcHandler.calculateNpcMeleeDamage(attackerAsNpc, defenderAsPlayer, -1, 66);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public int getDamage() {\r\n\t\treturn myDamage;\r\n\t}",
"public long damage(long damage, long mana)\r\n\t{\r\n\t\tif (isDragonOnMe)\r\n\t\t\treturn damageMySelf(2*damage, mana);\r\n\t\telse\r\n\t\t\treturn damageMySelf(damage, mana);\r\n\t}",
"public static short getModFromSkill( CreatureTemplate ctr, String skillName )\n {\n\n // Charisma based skills\n if( \"Bluff\".equals( skillName ) || \"Diplomacy\".equals( skillName ) || \"Intimidate\".equals( skillName ) || \"Streetwise\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.CHA ) - 10) / 2);\n }\n\n // Constitution based skills\n if( \"Endurance\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.CON ) - 10) / 2);\n }\n\n // Dex based skills\n if( \"Acrobatics\".equals( skillName ) || \"Stealth\".equals( skillName ) || \"Thievery\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.DEX ) - 10) / 2);\n }\n\n // Int based skills\n if( \"Arcana\".equals( skillName ) || \"History\".equals( skillName ) || \"Religion\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.INT ) - 10) / 2);\n }\n\n // STR based skills\n if( \"Athletics\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.STR ) - 10) / 2);\n }\n // WIS based skills\n if( \"Dungeoneering\".equals( skillName ) || \"Heal\".equals( skillName ) || \"Insight\".equals( skillName ) || \"Nature\".equals( skillName )\n || \"Perception\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.WIS ) - 10) / 2);\n }\n\n return -10; // Skill not found in list\n }",
"boolean takeDamage(int dmg);",
"public int takeDamage(int damage) {\n damage -= ARMOR;\r\n // set new hp\r\n return super.takeDamage(damage);\r\n }",
"public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }",
"public int getWeaponDamage() {\n return Math.round(type.getWeaponDamage()*type.getItemLevelMultipliers()\n\t\t\t\t[level - 1]);\n }",
"public double calculateDamage(int type, double damage, double pierce)\n {\n double damageTaken = 0;\n int critRng;\n int ratio = 1;\n int critChance =1;\n int critDmg = 1;\n if(type == 1)\n {\n damageTaken = ( (damage*pierce*ratio)+((damage*ratio*(1-pierce))/(1+(0.01*(armor)))) );\n }\n else if (type == 2)\n {\n damageTaken = ( (damage*pierce*ratio)+((damage*ratio*(1-pierce))/(1+(0.01*(shield)))) );\n }\n else if (type == 3)\n {\n critRng = (int)(Math.random()*1.01);\n if (critRng<= critChance)\n damageTaken = ( (damage*critDmg*pierce*ratio) + ((damage*critDmg*(1-pierce))/(1+(0.01*(armor)))) );\n else\n damageTaken = ( (damage*pierce*ratio) + ((damage*(1-pierce))/(1+(0.01*(armor)))) );\n }\n else if (type == 4)\n {\n critRng = (int)(Math.random()*1.01);\n if (critRng<= critChance)\n damageTaken = ( ((weaponDmg+damage)*critDmg*pierce) + (((weaponDmg+damage)*critDmg*(1-pierce))/(1+(0.01*(armor)))) );\n else\n damageTaken = ( ((weaponDmg+damage)*pierce) + (((weaponDmg+damage)*(1-pierce))/(1+(0.01*(armor)))) );\n }\n else\n {\n damageTaken = damage;\n }\n return damageTaken;\n }",
"public int attackRoll(){\r\n\t\treturn (int) (Math.random() * 100);\r\n\t}",
"public int calculateCharacterDamage(BasicCharacter character, int skillIndex) {\n\n int damage = (int) (Math.random() * (character.getSkillArray()[skillIndex].getMaxDamage() - character.getSkillArray()[skillIndex].getMinDamage()) + 1);\n\n damage += character.getSkillArray()[skillIndex].getMinDamage();\n\n damage *= character.getDamage();\n\n return damage;\n }",
"public int getDamage() {\n\t\t\treturn damage;\n\t\t}",
"@Override\n\tpublic int fight(Enemy e1) {\n\t\tint damage = 0;\n\t\tRandom randomNum = new Random();\n\t\tdamage = 6 + randomNum.nextInt(4);\n\t\ttry {\n\t\t\te1.takeDamage(damage);\n\t\t} catch (InvalidDamageException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn damage;\n\t}",
"@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}",
"public int tryManualAttack(String weaponOrSpell) {\n\t\tint hitPoints = 0;\n\t\ttry {\n\t\t\tif (weaponOrSpell == \"weapon\" && hasWeapon && (weapon.getRange() > 1)) {\n\t\t\t\thitPoints = weapon.getDamage();\n\t\t\t} else if (weaponOrSpell == \"spell\" && hasSpell && (weapon.getRange() > 1)) {\n\t\t\t\thitPoints = spell.getDamage();\n\t\t\t}\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.out.println(\"Invalid value!\");\n\t\t\t// reader.next(); // this consumes the invalid token\n\t\t}\n\t\treturn hitPoints;\n\t}",
"public double getDamage() {\n return damage;\n }",
"@Override\n public int damageCalculator(final Heroes enemy, final Heroes hero) {\n float landModifier;\n int firstAbilityDamage;\n int secondAbilityDamage;\n if (enemy.getLocation().equals(\"V\")) {\n landModifier = factory.getLandModifiers(\"V\");\n } else {\n landModifier = LandModifiersFactory.getNoModifiers();\n }\n firstAbilityDamage = Math.round(landModifier * (factory.getAllDamages(\"fireblast\")\n + hero.getLevel() * factory.getAllLevelDamages(\"fireblast\")));\n secondAbilityDamage = Math.round(landModifier * (factory.getAllDamages(\"ignite\")\n + hero.getLevel() * factory.getAllLevelDamages(\"ignite\")));\n //retin damage-ul fara modificatori in caz ca adversarul este wizard\n enemy.setDamageReceived(firstAbilityDamage + secondAbilityDamage);\n firstAbilityDamage = Math.round(firstAbilityDamage\n * hero.getRaceModifiers1(enemy.getTypeOfHero()));\n secondAbilityDamage = Math.round(secondAbilityDamage\n * hero.getRaceModifiers2(enemy.getTypeOfHero()));\n //ii setez damage overtime\n enemy.setIgniteOvertimeDamage(2);\n return firstAbilityDamage + secondAbilityDamage;\n }",
"protected int recalculateDamage(int baseDamage, Conveyer info, Combatant striker, Combatant victim) {\n return baseDamage;\n }",
"private static int experienceTally(int playerExperience, int monsterExperience){\r\n int totalExperience;\r\n totalExperience = playerExperience + monsterExperience;\r\n return totalExperience;\r\n }",
"public double getDamage() {\r\n\t\treturn damage;\r\n\t}",
"void takeDamage(HeroDamage enemy1, HeroDamage enemy2);",
"public int calculateCombatLevel() {\r\n if (entity instanceof NPC) {\r\n return ((NPC) entity).getDefinition().getCombatLevel();\r\n }\r\n int combatLevel;\r\n int melee = staticLevels[ATTACK] + staticLevels[STRENGTH];\r\n int range = (int) (1.5 * staticLevels[RANGE]);\r\n int mage = (int) (1.5 * staticLevels[MAGIC]);\r\n if (melee > range && melee > mage) {\r\n combatLevel = melee;\r\n } else if (range > melee && range > mage) {\r\n combatLevel = range;\r\n } else {\r\n combatLevel = mage;\r\n }\r\n combatLevel = staticLevels[DEFENCE] + staticLevels[HITPOINTS] + (staticLevels[PRAYER] / 2) + (int) (1.3 * combatLevel);\r\n return combatLevel / 4;\r\n }",
"private static int calcMagicPower(Thing caster, Thing spell) {\r\n \t\tGame.assertTrue(spell.getFlag(\"IsSpell\"));\r\n \t\tdouble sk=0;\r\n \t\tif (caster!=null) {\r\n \t\t\tsk=calcMagicSkill(caster,spell);\r\n \t\t} \r\n \t\t\r\n \t\t// minimum skill\r\n \t\tint skillMin=spell.getStat(\"SkillMin\");\r\n \t\tif (sk<skillMin) sk=skillMin;\r\n \t\t\r\n \t\tsk=sk*spell.getStat(\"PowerMultiplier\")/100.0 \r\n \t\t\t\t+spell.getStat(\"PowerBonus\");\r\n \t\t\r\n \t\tif (sk<0) sk=0;\r\n \t\treturn (int)sk;\r\n \t}"
] | [
"0.7384322",
"0.7086563",
"0.70719165",
"0.70719165",
"0.70719165",
"0.70719165",
"0.70719165",
"0.6961424",
"0.6829015",
"0.6803174",
"0.6757757",
"0.67418605",
"0.6691172",
"0.6625751",
"0.66131294",
"0.6609749",
"0.65977615",
"0.65952444",
"0.657735",
"0.65729505",
"0.6522685",
"0.6483703",
"0.6452988",
"0.6449731",
"0.6402977",
"0.63703865",
"0.63409823",
"0.6332351",
"0.63263303",
"0.63026875",
"0.63021153",
"0.62796605",
"0.62708986",
"0.6259146",
"0.62579066",
"0.62384385",
"0.62366366",
"0.62343544",
"0.62329406",
"0.62319547",
"0.62295246",
"0.6228572",
"0.62266386",
"0.62207615",
"0.6204214",
"0.62010366",
"0.619944",
"0.6199106",
"0.61815625",
"0.6176194",
"0.6176194",
"0.6176194",
"0.6176194",
"0.6176194",
"0.61751336",
"0.61751336",
"0.61751336",
"0.61751336",
"0.61751336",
"0.6171048",
"0.6167187",
"0.6165936",
"0.61614066",
"0.6159201",
"0.6152706",
"0.615195",
"0.6139121",
"0.6138247",
"0.61361134",
"0.6134402",
"0.6133871",
"0.6133621",
"0.6126151",
"0.6123882",
"0.612264",
"0.61139846",
"0.60982776",
"0.6096785",
"0.6095674",
"0.60850304",
"0.6080932",
"0.6073109",
"0.6038323",
"0.60271436",
"0.6026251",
"0.6024971",
"0.6020786",
"0.60201037",
"0.60112333",
"0.59768337",
"0.5975094",
"0.5969009",
"0.59678245",
"0.59615093",
"0.5961473",
"0.5959078",
"0.59589076",
"0.59588796",
"0.59586245",
"0.59571713",
"0.5957082"
] | 0.0 | -1 |
Adjust damage for the playable type. | public void updateHp(double amount); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void applyDamage(int damage)\r\n\t{\r\n\r\n\t}",
"public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }",
"@Override\n public void adjustTypeAttributes() {\n this.getSpecialData().addAttribute(SharedMonsterAttributes.maxHealth, 20.0);\n }",
"protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }",
"private void takeDamage(int damage){ health -= damage;}",
"public void takeDamage(int damage);",
"@Override\n protected void adjustTypeAttributes() {\n this.getSpecialData().addAttribute(SharedMonsterAttributes.maxHealth, 20.0);\n this.getSpecialData().multAttribute(SharedMonsterAttributes.movementSpeed, 1.2);\n }",
"public void damagePlayer(int damage){\n hero.decreaseHp(damage);\n }",
"@Override\n public void onTypeAttack(Entity target) {\n if (target instanceof EntityLivingBase) {\n int time;\n switch (target.worldObj.difficultySetting) {\n case PEACEFUL:\n return;\n case EASY:\n time = 15;\n break;\n case NORMAL:\n time = 35;\n break;\n default:\n time = 75;\n }\n time *= 20;\n ((EntityLivingBase)target).addPotionEffect(new PotionEffect(Potion.resistance.id, time, -3));\n }\n }",
"public void reduceHealth(int damage){\n health -= damage;\n }",
"@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}",
"@Override\n\tpublic void takeDamage(double damage) {\n\n\t}",
"public void takeDamage(int damage) {\n this.damageTaken += damage;\n }",
"public void takeDamage(int damage) {\r\n this.health -= damage;\r\n if(this.health < 0)\r\n this.health = 0;\r\n }",
"@Override\n public void scaleStats() {\n this.damage = BASE_DMG + (this.getLevel() * 3);\n }",
"public int takeDamage(int damage) {\n damage -= ARMOR;\r\n // set new hp\r\n return super.takeDamage(damage);\r\n }",
"public void takeDamage(int damage) {\n\t\tlife = (life-damage<0)?0:life-damage;\n\t}",
"public void setDamage(int damage) {\n\t\tWeapon.itemDamage = damage;\n\t}",
"@Override\n public void applySoundAtAttacker(int type, Entity target)\n {\n \t\tswitch (type)\n \t\t{\n \t\tcase 1: //light cannon\n \t\t\tthis.playSound(ModSounds.SHIP_LASER, ConfigHandler.volumeFire, this.getSoundPitch() * 0.85F);\n \t \n \t\t\t//entity sound\n \t\t\tif (this.rand.nextInt(10) > 7)\n \t\t\t{\n \t\t\t\tthis.playSound(this.getCustomSound(1, this), this.getSoundVolume(), this.getSoundPitch());\n \t }\n \t\tbreak;\n \t\tcase 2: //heavy cannon\n \t\t\tthis.playSound(ModSounds.SHIP_FIREHEAVY, ConfigHandler.volumeFire, this.getSoundPitch() * 0.85F);\n \t \n \t //entity sound\n \t if (this.getRNG().nextInt(10) > 7)\n \t {\n \t \tthis.playSound(this.getCustomSound(1, this), this.getSoundVolume(), this.getSoundPitch());\n \t }\n \t\tbreak;\n \t\tcase 3: //light aircraft\n \t\tcase 4: //heavy aircraft\n \t\t\tthis.playSound(ModSounds.SHIP_AIRCRAFT, ConfigHandler.volumeFire * 0.5F, this.getSoundPitch() * 0.85F);\n \t \tbreak;\n\t\tdefault: //melee\n\t\t\tif (this.getRNG().nextInt(2) == 0)\n\t\t\t{\n\t\t\t\tthis.playSound(this.getCustomSound(1, this), this.getSoundVolume(), this.getSoundPitch());\n\t }\n\t\tbreak;\n \t\t}//end switch\n \t}",
"@Override\n\tpublic void damage(float f) {\n\t\t\n\t}",
"public void damage(int damageTaken) {\n //TODO: Create specific damage methods instead of damage calls everywhere(see damagedByBullet())\n if (!invincible) {\n this.hp -= damageTaken;\n }\n }",
"public void suffer(int damage){\r\n\t\thp -= damage;\r\n\t\tinvulnerable = true;\r\n\t}",
"private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }",
"public void takeAttack(int damage) {\r\n if(this.evasion > 0)\r\n this.evasion--;\r\n else\r\n this.takeDamage(damage);\r\n }",
"public void takeDamage(int dmg){\r\n this.currHP -= dmg;\r\n }",
"private void calculateDamage() {\n this.baseDamage = this.actualBaseDamage;\n this.applyPowers();\n this.baseDamage = Math.max(this.baseDamage - ((this.baseDamage * this.otherCardsPlayed) / this.magicNumber), 0);\n }",
"@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }",
"public void damage(double amount, Unit source, int type) {\n damage(amount, source);\r\n }",
"@Override\n public int doDamage() {\n if (difficulty <5)\n return damage;\n else \n return damage*2;\n }",
"public void ability(LevelManager lm){\n\n int prevDamage = lm.player.getDamage();\n int newDamage = prevDamage+12;\n lm.player.setDamage(newDamage);\n }",
"protected void setProjectileDamage(CharacterDamageManager.ProjectileType type, int damage) \r\n\t{\tthis.projectileDamage.put(type, damage);\t}",
"public void takeDamage(int dmg) {\n\t\thealth -= dmg;\n\t}",
"@Override\n\tpublic int calculateCustomDamageTaken(Entity attacker, Entity defender, int damage, int attackType) {\n\t\treturn damage;\n\t}",
"public void reduceHealth(int ammo_damage){\n this.health -= ammo_damage;\n }",
"@Override\n\tpublic void onDamage(WorldObj obj, Items item) {\n\n\t\tif(is_stunned) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint dmg = (int) item.type.ATK;\n\t\t\n\t\tOnScreenText.AddText(\"\"+dmg, bounds.x , bounds.y + 1.1f);\n\t\t\n\t\tvelX = obj.direction * 5;\n\t\tvelY = 5;\n\t\tgrounded = false;\n\t\t\n\t\tHP -= dmg;\n\t\t\n\n\t\tstun_counter = 0;\n\t\t\n\t\tif(HP <= 0 && !isDead) {\n\t\t\tonDeath();\n\t\t}\n\t\t\n\t}",
"private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }",
"public void setDamage(int damage) {\r\n\t\tthis.damage = damage;\r\n\t}",
"private void subtractPlayerHealth(int damage) {\n this.playerShipHealth -= damage;\n }",
"public void damage(int amount) {\n \tshield = shield - amount;\n }",
"PlayingSquare giveDamage(int damage);",
"public void setDamage(int d) {\r\n this.damage = d;\r\n }",
"public void buyDecreaseDamage() {\n this.decreaseDamage++;\n }",
"public void setSiegeWeaponDamage(short siegeWeaponDamage);",
"@Override\n public void attackedByPaladin(double attack) {\n this.attack += (2 * attack) / 3;\n damageCounter = Math.max(damageCounter - (2 * attack) / 3, 0);\n }",
"public void calibrated() {\n weaponDamage = weaponDamage + 10;\r\n }",
"void decreaseHealth(Float damage);",
"public void applyDamage(int damage)\n\t{\n\t\tthis.currHP -= damage;\n\t\tif(currHP <= 0)\n\n\t\t{\n\t\t\tthis.currHP = 0;\n\t\t\tthis.kill();\n\t\t}\n\t\t\t\n\t}",
"public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }",
"public void takedmg(int dmg){\n curHp -= dmg;\n }",
"public int giveDamage();",
"public void specialEffect() {\n if (getDefense() > 0) {\n setDefense(0);\n setCurrentHealth(currentHealth + 50);\n }\n\n }",
"@ZenCodeType.Method\n @ZenCodeType.Setter(\"damageRodBy\")\n public static void damageRodBy(ItemFishedEvent internal, int damage) {\n \n internal.damageRodBy(damage);\n }",
"@Override\n protected void onTypeAttack(Entity target) {\n if (target instanceof EntityLivingBase) {\n int time;\n switch (target.worldObj.difficultySetting) {\n case PEACEFUL:\n return;\n case EASY:\n time = 20;\n break;\n case NORMAL:\n time = 50;\n break;\n default:\n time = 120;\n }\n time *= 20;\n EffectHelper.stackEffect((EntityLivingBase)target, Potion.weakness, time, 0, 4);\n EffectHelper.stackEffect((EntityLivingBase)target, Potion.digSlowdown, time, 0, 4);\n }\n }",
"@Override\n public final int groundModifier(final Wizard wizard, final int damageToModify) {\n return (int) Math.round((float) damageToModify * this.wizardModifier\n + this.getMagicNumber());\n }",
"public void takeDamage(int damage) {\r\n health -= damage;\r\n if(health<=0)setAlive(false);\r\n }",
"public int takeDamage(int damage) \r\n\t{\r\n\t\t//Pre: an int damage\r\n\t\t//Post: reduces health variable by damage\r\n\t\tif(health - damage > 0) \r\n\t\t{\r\n\t\t\thealth -= damage;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t\treturn health;\r\n\t}",
"private void applyEffect(Event.Effect effect) {\n\t\tint change = (int) effect.getValue();\n\t\t\n\t\tswitch(effect.getType()) {\t\t\n\t\tcase INCREASE_MONEY:\n\t\t\tplayer.setMoney(player.getMoney() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_MONEY:\n\t\t\tplayer.setMoney(player.getMoney() - change);\n\t\t\tbreak;\n\t\tcase INCREASE_AGENTS:\n\t\t\tplayer.setAgentNumber(player.getAgentNumber() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_AGENTS:\n\t\t\tplayer.setAgentNumber(player.getAgentNumber() - change);\n\t\t\tbreak;\n\t\tcase INCREASE_AGENT_SKILL:\n\t\t\tplayer.setAgentSkill(player.getAgentSkill() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_AGENT_SKILL:\n\t\t\tplayer.setAgentSkill(player.getAgentSkill() - change);\t\t\t\n\t\t\tbreak;\n\t\tcase INCREASE_MEDIA_REACH:\n\t\t\tplayer.setMediaReach(player.getMediaReach() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_MEDIA_REACH:\n\t\t\tplayer.setMediaReach(player.getMediaReach() - change);\t\t\t\n\t\t\tbreak;\n\t\tcase INCREASE_MEDIA_INFLUENCE:\n\t\t\tplayer.setMediaPerception(player.getMediaPerception() + change);\n\t\t\tbreak;\n\t\tcase DECREASE_MEDIA_INFLUENCE:\n\t\t\tplayer.setMediaPerception(player.getMediaPerception() - change);\t\t\t\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// TODO handle error\n\t\t}\n\t\t\n\t}",
"public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }",
"public void takeDamage(int amount){\r\n\t\tthis.life = this.life - amount;\r\n\t}",
"public final void applyDamage(DamageDTO damage) {\n int rolledDamage = damage.getMaxDamage();\n if (rolledDamage > 0) {\n this.currentHitPoints -= rolledDamage;\n }\n if (this.currentHitPoints <= 0) {\n this.die();\n }\n }",
"public void setDamage(double damage) {\r\n\t\tthis.damage = damage;\r\n\t}",
"public void handleAttack(int damage) {\n this.health -= damage;\n }",
"public void damaged() {\n this.damageState = DamageState.DAMAGED;\n }",
"public void setDamage(double d) {\n damage = d;\n }",
"public Builder setDamage(int value) {\n bitField0_ |= 0x00000080;\n damage_ = value;\n onChanged();\n return this;\n }",
"public void setBowDamage(short bowDamage);",
"private void subtractEnemySheild(int damage) {\n this.enemyShield -= damage;\n }",
"@Override\n public void increaseStrength(int power) {\n this.damageStrength += power;\n }",
"public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }",
"public Builder setDamage(int value) {\n bitField0_ |= 0x00000200;\n damage_ = value;\n onChanged();\n return this;\n }",
"public Builder setDamage(int value) {\n bitField0_ |= 0x00000400;\n damage_ = value;\n onChanged();\n return this;\n }",
"public Builder setDamage(int value) {\n bitField0_ |= 0x00000400;\n damage_ = value;\n onChanged();\n return this;\n }",
"public Builder setDamage(int value) {\n bitField0_ |= 0x00000400;\n damage_ = value;\n onChanged();\n return this;\n }",
"@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\r\n public void onPlayerDamagedByPlayer(final EntityDamageByEntityEvent event) {\n if (!(event.getEntity() instanceof Player)) {\r\n return;\r\n }\r\n if (!(event.getDamager() instanceof Player)) {\r\n return;\r\n }\r\n \r\n final Player target = (Player)event.getEntity();\r\n final Player attacker = (Player)event.getDamager();\r\n final ItemStack is = attacker.getItemInHand();\r\n \r\n if (is != null){\r\n switch (is.getType()){\r\n case EMERALD:\r\n attacker.setItemInHand(ItemUtil.decrementItem(is, 1));\r\n \r\n // 体力・空腹回復、燃えてたら消化\r\n target.setHealth(target.getMaxHealth());\r\n target.setFoodLevel(20);\r\n target.setFireTicks(0);\r\n \r\n // ポーション効果付与\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 45 * 20, 0)); // 45 secs\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 7 * 60 * 20, 0)); // 7 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 9 * 60 * 20, 1)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 9 * 60 * 20, 0)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 5 * 60 * 20, 1)); // 5 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 3 * 60 * 20, 0)); // 3 mins\r\n \r\n // effect, messaging\r\n target.getWorld().playEffect(target.getLocation(), Effect.ENDER_SIGNAL, 0, 10);\r\n Util.message(target, PlayerManager.getPlayer(attacker).getName() + \" &aから特殊効果を与えられました!\");\r\n Util.message(attacker, PlayerManager.getPlayer(target).getName() + \" &aに特殊効果を与えました!\");\r\n \r\n event.setCancelled(true);\r\n event.setDamage(0);\r\n break;\r\n default: break;\r\n }\r\n }\r\n }",
"@Override\n\tpublic void onDamageTaken(Entity attacker, Entity defender, int damage, int entityAttackType) {\n\t\tif (attacker.getType() == EntityType.PLAYER && defender.getType() == EntityType.NPC) {\n\t\t\tPlayer attackerAsPlayer = (Player) attacker;\n\n\t\t\tNpc defenderAsNpc = (Npc) defender;\n\n\t\t\tif (phase == AbyssalSirePhase.SLEEPING && phaseProgressionEvent == null) {\n\t\t\t\tphaseProgressionEvent = new AbyssalSirePhaseProgressionEvent();\n\n\t\t\t\tCycleEventContainer<Entity> container = getEventHandler().addEvent(this, phaseProgressionEvent, 6);\n\n\t\t\t\trequestAnimation(4528);\n\t\t\t\tcontainer.addStopListener(() -> {\n\t\t\t\t\tif (phase == AbyssalSirePhase.SLEEPING) {\n\t\t\t\t\t\ttarget = attackerAsPlayer;\n\t\t\t\t\t\tfirstWake();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (phase == AbyssalSirePhase.AWAKE) {\n\t\t\t\tif (attackerAsPlayer.getOldSpellId() > -1) {\n\t\t\t\t\tint spellDisorientation = DISORIENTING_SPELLS.getOrDefault(CombatConstants.MAGIC_SPELLS[attackerAsPlayer.getOldSpellId()][0], 0);\n\n\t\t\t\t\tif (spellDisorientation > 0) {\n\t\t\t\t\t\tdisorientation += spellDisorientation;\n\n\t\t\t\t\t\tif (disorientation >= 100) {\n\t\t\t\t\t\t\tdisorient();\n\t\t\t\t\t\t\tattackerAsPlayer.getPA().sendMessage(\"Your shadow spelled disoriented the Abyssal sire.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (phase != AbyssalSirePhase.DISORIENTED) {\n\t\t\t\t\tdamageDisorientation += damage;\n\n\t\t\t\t\tif (damageDisorientation >= 75) {\n\t\t\t\t\t\tdisorient();\n\t\t\t\t\t\tattackerAsPlayer.getPA().sendMessage(\"Your damage slowly disoriented the Abyssal sire.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\theal(ThreadLocalRandom.current().nextInt(1, Math.max(5, damage)));\n\t\t\t} else if (phase == AbyssalSirePhase.MELEE_COMBAT) {\n\t\t\t\tif ((defenderAsNpc.getCurrentHitPoints() <= 200)) {\n\t\t\t\t\twalkToCenter();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void takeDamage(int points) {\n this.health -= points;\n }",
"public void setHandThrowDamage(short handThrowDamage);",
"public void OnDamage(AI ai, int aTK, float f) {\n\tif(DamagedTimer < 0.8f)\n\t\treturn;\n\tvel.x = f;\n\tvel.y = 3;\n\tDamagedTimer = 0;\n\tgrounded = false;\n\taTK -= (getDEF()*0.8f);\n\tif(aTK <= 0)\n\t\taTK = 1;\n\tHP -= aTK;\n\tInventory.CurrentInventory.dmgTxts.add(new dmgText(pos.x, pos.y+1, aTK));\n\t\n\tSoundManager.PlaySound(\"playerHurt\",3);\n\t\n\t\n}",
"public void attack(Player player) {\n this.damage = 18 - player.getfPoint(); // the higher the Fighter skill,\n // the lower the damage. change the math.\n int newHealth = player.getShip().getHealth() - damage;\n player.getShip().setHealth(newHealth);\n }",
"public void setDamageTaken(double damage){\n\t\tlifeForce -= damage;\n\t\tif (! (lifeForce > 0) ) {\n\t\t\tJOptionPane.showMessageDialog(null, \"You Died - GAME OVER\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"private void subtractEnemyHealth(int damage) {\n this.enemyShipHealth -= damage;\n }",
"protected void setProjDamageLevel(CharacterDamageManager.ProjectileType type, double damage)\r\n\t{\tthis.projDamageLevel.put(type, damage);\t}",
"public void setHungerDamage(float hunger);",
"public void receiveDamage(double damage) {\r\n health = health - damage;\r\n }",
"public void takeDamage(double num) {\r\n \r\n int damage = (int)Math.round(num);\r\n this.health -= damage;\r\n this.state=this.color+16;\r\n if (damage <= 5) {\r\n if (this.playerNum == 1)\r\n this.positionX -= 40;\r\n else \r\n this.positionX += 40;\r\n }\r\n else if (this.playerNum == 1)\r\n this.positionX -= damage * 6;\r\n else\r\n this.positionX += damage * 6;\r\n \r\n }",
"public void setWeaponDamage (int weaponDamage)\r\n\t{\r\n\t\tthis.weaponDamage = weaponDamage;\r\n\t}",
"public void reduceHealth(int damage, int player) {\n\t\tif (player == OPPONENT) {\n\t\t\tint currentHealth = Integer.parseInt(opponentHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\topponentHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = opponentHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(0,reduction);\n\t\t} else if (player == LOCAL) {\n\t\t\tint currentHealth = Integer.parseInt(localHealth.getText());\n\t\t\tint newHealth = currentHealth - damage;\n\t\t\tlocalHealth.setText(Integer.toString(newHealth));\n\t\t\tdouble reduction = localHealthBar.getWidth()*(((double)newHealth)/((double) currentHealth));\n\t\t\thealthBarDamageAnimation(1,reduction);\n\t\t}\n\t}",
"@Override\n public void hardMode() {\n super.setHP(1800);\n super.getFrontAttack().setBaseDamage(37.5);\n super.getRightAttack().setBaseDamage(37.5);\n super.getBackAttack().setBaseDamage(37.5);\n super.getLeftAttack().setBaseDamage(37.5);\n }",
"public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}",
"@Override\n\tpublic int calculateCustomDamage(Entity attacker, Entity defender, int entityAttackType) {\n\t\tif (attacker.getType() == EntityType.NPC && defender.getType() == EntityType.PLAYER) {\n\t\t\tNpc attackerAsNpc = (Npc) attacker;\n\n\t\t\tPlayer defenderAsPlayer = (Player) defender;\n\n\t\t\tif (attack == AbyssalSireAttack.SWIPE) {\n\t\t\t\tif (defenderAsPlayer.prayerActive[ServerConstants.PROTECT_FROM_MELEE]) {\n\t\t\t\t\treturn ThreadLocalRandom.current().nextInt(2, 7);\n\t\t\t\t}\n\t\t\t\treturn NpcHandler.calculateNpcMeleeDamage(attackerAsNpc, defenderAsPlayer, -1, 32);\n\t\t\t} else if (attack == AbyssalSireAttack.TENDRIL_SWIPE) {\n\t\t\t\tif (defenderAsPlayer.prayerActive[ServerConstants.PROTECT_FROM_MELEE]) {\n\t\t\t\t\treturn ThreadLocalRandom.current().nextInt(0, 13);\n\t\t\t\t}\n\t\t\t\treturn NpcHandler.calculateNpcMeleeDamage(attackerAsNpc, defenderAsPlayer, -1, 40);\n\t\t\t} else if (attack == AbyssalSireAttack.DOUBLE_TENDRIL_SWIPE) {\n\t\t\t\tif (defenderAsPlayer.prayerActive[ServerConstants.PROTECT_FROM_MELEE]) {\n\t\t\t\t\treturn ThreadLocalRandom.current().nextInt(0, 26);\n\t\t\t\t}\n\t\t\t\treturn NpcHandler.calculateNpcMeleeDamage(attackerAsNpc, defenderAsPlayer, -1, 66);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public DamageType getDamagetype();",
"@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker)\n\t{\n\t\treduceCurrentHp(damage, attacker, true);\n\t}",
"@Override\n public void attackedByShaman(double attack) {\n damageCounter += (2 * attack) / 3;\n this.attack = Math.max(this.attack - (2 * attack) / 3, 0);\n }",
"@Override\r\n public void onHit(int damage){\n if(box2body != null){\r\n hp -= damage;\r\n screen.getGameManager().get(\"Sounds/orc-34-hit.wav\", Sound.class).play();\r\n if(this.hp <= 0) {\r\n screen.bodiesToDelete.add(box2body);\r\n deleteFlag = true;\r\n screen.spawnedCreatures.remove(this);\r\n screen.getGameManager().get(\"Sounds/orc-32-death.wav\", Sound.class).play();\r\n\r\n //Award Experience\r\n screen.getPlayer().awardExperience(this.experienceValue);\r\n screen.getPlayer().increaseKillCount();\r\n }\r\n }\r\n //Attack player when damaged\r\n //Prevents player from sniping monsters using Wander AI\r\n if(currentState != State.ATTACKING){\r\n Vector2 orcPosition = new Vector2(box2body.getPosition().x, box2body.getPosition().y);\r\n Vector2 playerPosition = new Vector2(screen.getPlayer().box2body.getPosition().x, screen.getPlayer().box2body.getPosition().y);\r\n\r\n currentState = State.HASBEENATTACKED;\r\n velocity = new Vector2(playerPosition.x - orcPosition.x, playerPosition.y - orcPosition.y);\r\n box2body.setLinearVelocity(velocity.scl(speed));\r\n }\r\n }",
"private float setAttackAbsorption(HashMap content) {\n\t\tfloat change = calculateAbsorption();\n this.attackDamageModifier = baseDamageModifier + change;\n//System.out.println(\"attack: \" + this.attackDamageModifier);\n content.put(\"attack_damage_modifier\", \"\" + this.attackDamageModifier);\n\t\treturn change*ABSORPTION_PRICE_MULTIPLIER;\n }",
"@Override\n protected int strengthViability(Creature c){\n int baseViability = super.strengthViability(c);\n if (Elements.elementDamageMultiplier(c,bossFormation.getFrontCreature().getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST * 3);\n }\n if (Elements.elementDamageMultiplier(bossFormation.getFrontCreature(),c.getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST / 3);\n }\n return baseViability;\n }",
"public void setDamage() {\n\t\tRandom rand = new Random();\n\t\tint damage = rand.nextInt(getMaxDamage()) + 1;\n\t\tthis.damage = damage;\n\t}",
"public abstract int doDamage(int time, GenericMovableUnit unit, Unit target);",
"@Override\n public void easyMode() {\n super.setHP(900);\n super.getFrontAttack().setBaseDamage(18.75);\n super.getRightAttack().setBaseDamage(18.75);\n super.getBackAttack().setBaseDamage(18.75);\n super.getLeftAttack().setBaseDamage(18.75);\n }",
"@Override\n public void applyEffect(Battle battle, Cell cell, Account player, int activeTime) {\n /* if (activeTime != -1)\n return;\n ManaItemBuff manaItemBuff = new ManaItemBuff(player, 1);\n manaItemBuff.setTurnCounter(-5);\n manaItemBuff.castBuff();\n player.getOwnBuffs().add(manaItemBuff);*/\n }",
"public void beAttacked(int damage) {\r\n\t\tif (health > damage) {\r\n\t\t\thealth -= damage;\r\n\t\t}else {\r\n\t\t\thealth = 0;\r\n\t\t}\r\n\t}"
] | [
"0.7113753",
"0.6867221",
"0.6853873",
"0.6838226",
"0.68118596",
"0.6730095",
"0.67150915",
"0.66446364",
"0.6633176",
"0.6632358",
"0.66083163",
"0.65719885",
"0.65702045",
"0.6558166",
"0.6554828",
"0.65341085",
"0.650239",
"0.6468076",
"0.645376",
"0.6449674",
"0.6440702",
"0.6422605",
"0.64045125",
"0.63842815",
"0.63665324",
"0.63319856",
"0.6322943",
"0.63081115",
"0.62977487",
"0.62923986",
"0.62917095",
"0.6290842",
"0.6289274",
"0.6289144",
"0.62824154",
"0.62569875",
"0.6229891",
"0.6220233",
"0.62123114",
"0.62066543",
"0.6198896",
"0.6192312",
"0.6190885",
"0.6174474",
"0.6172776",
"0.61725765",
"0.61707735",
"0.61680895",
"0.61632204",
"0.6154633",
"0.6151299",
"0.61484295",
"0.61471105",
"0.61434734",
"0.6140926",
"0.6140829",
"0.6137717",
"0.6127197",
"0.6125052",
"0.6115636",
"0.6112474",
"0.61088663",
"0.6096449",
"0.6089231",
"0.60749453",
"0.6070276",
"0.6067784",
"0.60444266",
"0.60330826",
"0.6018264",
"0.60100955",
"0.60100955",
"0.60091555",
"0.6007769",
"0.5993846",
"0.59882593",
"0.59860826",
"0.5983123",
"0.59763503",
"0.5975084",
"0.5970362",
"0.5966154",
"0.5945661",
"0.5943183",
"0.59412956",
"0.59354883",
"0.5931246",
"0.59206736",
"0.59142715",
"0.5867447",
"0.5866536",
"0.5856289",
"0.58462524",
"0.5844992",
"0.58411306",
"0.5839317",
"0.5836224",
"0.58237934",
"0.5823501",
"0.5813755",
"0.5811258"
] | 0.0 | -1 |
Accessor for isSleeping boolean. | public boolean isAwake(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isSleeping ( ) {\n\t\treturn extract ( handle -> handle.isSleeping ( ) );\n\t}",
"public boolean isInSleep() {\n\t\treturn isInSleep;\n\t}",
"public int isSleeping(){\n\t\tif(state == \"SLEEPING\") { return 1; }\n\t\telse\t\t\t\t\t { return 0; }\n\t}",
"public boolean isSleepy() {\n\t\treturn sleepy;\n\t}",
"public boolean isSleepingAllowed () {\n\t\treturn body.isSleepingAllowed();\n\t}",
"public long getSleeping() { return sleeping; }",
"@Override\n\tpublic boolean isSleeping() {\n\t\treturn false;\n\t}",
"protected void setSleeping() {\n isSleeping = true;\n }",
"void setSleeping(boolean sleeping);",
"public boolean isSetSleeping() {\n return EncodingUtils.testBit(__isset_bitfield, __SLEEPING_ISSET_ID);\n }",
"public boolean isSleepingIgnored ( ) {\n\t\treturn extract ( handle -> handle.isSleepingIgnored ( ) );\n\t}",
"public Boolean getSuspend() {\n return suspend;\n }",
"public void setSleepingIgnored ( boolean isSleeping ) {\n\t\texecute ( handle -> handle.setSleepingIgnored ( isSleeping ) );\n\t}",
"public void setInSleep(boolean isInSleep) {\n\t\tthis.isInSleep = isInSleep;\n\t}",
"public boolean isWakeUp() {\n return wakeUp;\n }",
"private void setSleeping(boolean bool) {\r\n if (sleep != bool) {\r\n this.sleep = bool;\r\n repaint();\r\n if (!sleep) {\r\n synchronized (this.r) {\r\n this.r.notify();\r\n }\r\n }\r\n }\r\n }",
"public boolean isScheduled();",
"public boolean isFalling() { return isFalling; }",
"public abstract boolean isScheduled();",
"public boolean getFalling() {return falling;}",
"public boolean isUpdateDelayed() {\n return (Boolean) getProperty(\"isUpdateDelayed\");\n }",
"public boolean canEnterDeepSleep() {\n if (mState != STATE_SHUTDOWN_PREPARE) {\n throw new IllegalStateException(\"wrong state\");\n }\n return (mParam & VehicleApPowerStateShutdownParam.CAN_SLEEP) != 0;\n }",
"public boolean isOn(){\n return state;\n }",
"public boolean isTired()\r\n \t{\r\n \t\treturn lastSleep >= TIME_SLEEP;\r\n \t}",
"public boolean isBIsWait() {\n return bIsWait;\n }",
"boolean isBeating();",
"public void setSleepingAllowed (boolean flag) {\n\t\tbody.setSleepingAllowed(flag);\n\t}",
"public long getSleepTime() {\n return sleepTime;\n }",
"public boolean isThisThingOn(){\r\n return isActive;\r\n }",
"@Override\n\tpublic boolean isScheduled() {\n\t\treturn model.isScheduled();\n\t}",
"public final boolean isDisabled()\n {\n return myDisabledProperty.get();\n }",
"public boolean isBIsWaitHis() {\n return bIsWaitHis;\n }",
"public boolean isEnabled()\n {\n return schedulerService.isEnabled();\n }",
"BooleanProperty getOn();",
"public boolean isTalking()\n\t{\n\t\treturn m_isTalking;\n\t}",
"@Override\n public int getSleepTime() {\n return this.sleepTime;\n }",
"public boolean isOn() throws Exception;",
"public boolean isFlashing() {\n return isFlashing;\n }",
"@Override\n\tpublic boolean isScheduled();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isTurning();",
"private long getSleepTime()\n {\n return sleepTime;\n }",
"public boolean isSuspended() { return suspended; }",
"public boolean isBIsGiveBreakfast() {\n return bIsGiveBreakfast;\n }",
"Boolean isSuspendOnStart();",
"public boolean getPowerState() {\n\t\tSharedPreferences settings = parentContext.getSharedPreferences(PREFERENCE_FILE,\n\t\t\t\tContext.MODE_PRIVATE);\n\t\treturn settings.getBoolean(TOGGLE_KEY, true);\n\t}",
"public boolean isSuspended() {\n return suspended;\n }",
"public boolean isExecuting(){\n return !pausing;\n }",
"public void setSleepy(boolean sleepy) {\n\t\tthis.sleepy = sleepy;\n\t}",
"boolean getBoolean();",
"boolean getBoolean();",
"public synchronized boolean getEnabled() {\r\n return this.soundOn;\r\n }",
"public boolean getBoolean();",
"public boolean isShotDown(){\n return this.shotDown;\n }",
"public Boolean getBooleanValue() {\n return this.booleanValue;\n }",
"boolean isWaiting()\n {\n return waitFlags != 0;\n }",
"public java.lang.Boolean getBootable() {\r\n return bootable;\r\n }",
"boolean isSetPaymentDelay();",
"public boolean isEnabled() {\r\n\t\treturn sensor.isEnabled();\r\n\t}",
"public boolean isOn() {\n return on;\n }",
"public BooleanProperty timerRunningProperty() {\n return timerRunning;\n }",
"public boolean GetWaitingFlag() { return this.mWaitingF; }",
"protected boolean isOn() {\r\n\t\treturn this.isOn;\r\n\t}",
"public boolean isHolding();",
"public Component mustSleep() {\n return MiniMessage.get().parse(hyphenHeader + mustSleep);\n }",
"public boolean isIsDisabled() {\r\n return isDisabled;\r\n }",
"public boolean isOn() {\n\t\treturn false;\n\t}",
"public double getSleepEfficiency() {\n\t\treturn sleepEfficiency;\n\t}",
"public boolean isPowerOn() {\n Log.d(TAG, \"Is Fist Power On: \" + (SystemProperties.getBoolean(IS_POWER_ON_PROPERTY, false)));\n\n if (!SystemProperties.getBoolean(IS_POWER_ON_PROPERTY, false)) {\n SystemProperties.set(IS_POWER_ON_PROPERTY, \"true\");\n return true;\n } else {\n return false;\n }\n }",
"public boolean isHasPowerUp() {\n\t\treturn hasPowerUp;\n\t}",
"public boolean servesBreakfast() {\n return convertBool(mBreakfast);\n }",
"public boolean isScuttle() {\n return scuttle;\n }",
"public boolean isSpriting()\n\t{\n\t\treturn m_isSpriting;\n\t}",
"public boolean getPause() {\r\n return pause;\r\n }",
"public boolean getSteady() {\n\t\treturn (getTaskType() == TASK_STEADY);\n\t}",
"public Boolean isHeld() { return held; }",
"public boolean isStopping() {\n return stopping;\n }",
"public Boolean isEnable() {\n return this.enable;\n }",
"boolean isDelayed();",
"public boolean isSuspended();",
"public boolean isUnPauseable()\n\t{\n\t\treturn unPauseable;\n\t}",
"public boolean isOn() {\n return onFlag;\n }",
"public boolean isRunning(){\n return isRunning;\n }",
"public Boolean timerCheck(){\n return isRunning;\n }",
"public boolean isSuspended() {\n return suspended != 0;\n }",
"public boolean isSprinting(){\n return this.sprint;\n }",
"public boolean isSuspended() {\n return m_suspended;\n }",
"public boolean getBooleanValue() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not a boolean.\");\n }",
"public String isEnabled() {\n return this.isEnabled;\n }",
"public boolean isShifterLocked() {\n return isShifterLocked;\n }",
"public boolean isSwitchedOn(){\r\n return _switchedOn;\r\n }",
"public boolean isPaused() {\n return _isPaused;\n }",
"public Boolean getIswialon() {\r\n return iswialon;\r\n }",
"public boolean hasBeenShot(){\n return this.hasBeenShot;\n }",
"public Boolean isEnabled() {\n return this.isEnabled;\n }",
"public static boolean isDisabled() {\r\n return disabled;\r\n }",
"public Boolean getTombstoned() {\n return tombstoned;\n }",
"public boolean isShootDown() {\n return shootDown;\n }",
"public boolean isDisabled()\n {\n return disabled;\n }",
"public boolean isPaused() {\r\n return DownloadWatchDog.this.stateMachine.isState(PAUSE_STATE);\r\n }",
"public boolean isMovement() {\n return isMovementEvent;\n }"
] | [
"0.841763",
"0.8229887",
"0.8046251",
"0.7795633",
"0.7617495",
"0.75117487",
"0.75087994",
"0.7460968",
"0.7398081",
"0.71443343",
"0.7103829",
"0.65950215",
"0.65370953",
"0.65017825",
"0.64782894",
"0.6401079",
"0.63203335",
"0.6292837",
"0.6242816",
"0.621873",
"0.6205017",
"0.612117",
"0.60970825",
"0.6095354",
"0.60907155",
"0.6084337",
"0.6074779",
"0.60746884",
"0.6023543",
"0.6021236",
"0.60019666",
"0.5975414",
"0.59751195",
"0.5972957",
"0.5969753",
"0.5961151",
"0.5952228",
"0.59371597",
"0.5932097",
"0.59186184",
"0.5917691",
"0.591405",
"0.5894806",
"0.58925676",
"0.589183",
"0.5867679",
"0.58668625",
"0.58054435",
"0.58018243",
"0.58018243",
"0.5795601",
"0.5794674",
"0.57910943",
"0.57860434",
"0.57557434",
"0.5748988",
"0.57454765",
"0.57405424",
"0.57404554",
"0.5733527",
"0.57271516",
"0.5724223",
"0.5719843",
"0.57143646",
"0.57077914",
"0.5707278",
"0.57065505",
"0.57033515",
"0.5698632",
"0.5694719",
"0.56883544",
"0.5673872",
"0.5645151",
"0.56400603",
"0.56383914",
"0.563343",
"0.56202996",
"0.5614438",
"0.56142104",
"0.5610508",
"0.56103915",
"0.5604274",
"0.56029373",
"0.5576215",
"0.5564056",
"0.5562314",
"0.5561742",
"0.55459994",
"0.5544514",
"0.5544492",
"0.5543875",
"0.5539888",
"0.55389434",
"0.5537939",
"0.5534945",
"0.5533945",
"0.55337507",
"0.5519837",
"0.5519429",
"0.5519425"
] | 0.5590071 | 83 |
Sets HP to 100 | public void resetHp(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setHP(int hp) {\r\n\t\tthis.hp += hp;\r\n\t}",
"void setCurrentHP(final int newHP);",
"public void setHp(int hp){\r\n this.hp = hp;\r\n }",
"public void setHP(int h)\n\t{\n\t\tiHP = h;\n\t\t\n\t}",
"public void setHp(int hp) {\r\n\t\tthis.hp = hp;\r\n\t}",
"public void setHP(int newHP) {\n //grabs the hp\n HpComponent health = this.findHpComponent();\n\n health.setHP(newHP); //sets the hp\n }",
"public void setActualHP(int hp) { this.actualHP = Math.max(0, hp); }",
"@Override\n public void setHp(int hp){\n this.hp = hp;\n }",
"public void setHp(int hp) {\n\t\tthis.hp = hp;\n\t}",
"public void setHealth(double h){\n health = h;\n }",
"public static void setNewHP(int newHP){\r\n\t\thp -= newHP;\r\n\t}",
"public void setHealth(double Health){\r\n health = Health;\r\n }",
"public void updateHp(double amount);",
"public void resetHP(){\r\n this.currHP = this.maxHP;\r\n }",
"public void SetHealth(int h)\n{\n\thealth=h;\n}",
"private void setHealth() {\n eliteMob.setHealth(maxHealth = (maxHealth > 2000) ? 2000 : maxHealth);\n }",
"@Override\r\n\tpublic void setHealth(int strike) {\n\t\t\r\n\t}",
"public void setHealth(int h) {\n setStat(h, health);\n }",
"@Override\n public void hp(){\n HP=50*nivel;\n }",
"public void setHp(byte hp){\n this.hp = hp;\n }",
"public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }",
"@Override\n\tpublic void setHealth(double health) {\n\n\t}",
"public void setCurrentHP(final int newHP) {\n this.currentHP = Math.max(Math.min(newHP, maxHP), 0);\n }",
"public void setHealth(int health)\r\n {\r\n this.health = health;\r\n }",
"public abstract void setHealth(int health);",
"public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}",
"public void setHealth(double health) {\r\n\t\tthis.health = health;\r\n\t}",
"public void setHealth(int health) {\n this.health = health;\n }",
"private void strengthen(float hp) {\n this.hp += hp;\n if (this.hp > MAX_HP) {\n this.hp = MAX_HP;\n }\n }",
"@Override\r\n\tprotected void setHealth( double newHealth ) \r\n\t{\r\n\t\tthis._health = this._health - newHealth;\r\n\t}",
"public void resetHealth(){\n curHp = healthPoint;\n }",
"public void setHealth(float health) {\r\n \t\tthis.health = health;\r\n \t}",
"public abstract void incrementHealth(int hp);",
"private void setHealth(double healthPercentage) {\n eliteMob.setHealth(this.maxHealth * healthPercentage);\n }",
"public void setHealth(float health)\n {\n if ( health > getMaxHealth() )\n {\n this.health = getMaxHealth();\n }\n else if (health < 0)\n {\n this.health = 0.0f;\n }\n else\n {\n this.health = health;\n }\n\n }",
"public Builder setHPValue(int value) {\n bitField0_ |= 0x00000002;\n hPValue_ = value;\n onChanged();\n return this;\n }",
"public void setHealth(int health) {\n\t\tthis.health = health;\n\t\tif (this.health < 0)\n\t\t\tthis.health = 0;\n\t}",
"public Builder setHPPerSecond(int value) {\n bitField0_ |= 0x00000010;\n hPPerSecond_ = value;\n onChanged();\n return this;\n }",
"public void healPlayer(int hp) {\n if (hero.getHp() < LabyrinthFactory.HP_PLAYER) {\n hero.increaseHP(hp);\n }\n }",
"public void heal()\n {\n\tif (potions <= 0) {\n\t System.out.println(\"Out of potions. :(\");\n\t}\n\telse {\n\t HP += 1300/4;\n\t if (HP > 1300 ){\n\t\tHP = 1300;\n\t }\n System.out.println(\"Your HP is now \" + HP + \".\");\n\t potions -= 1;\n\t}\n }",
"public void decreaseHealth(int hp) {\n this.decreaseLife();\n }",
"public Builder setBonusHP(int value) {\n bitField0_ |= 0x00000001;\n bonusHP_ = value;\n onChanged();\n return this;\n }",
"@Test\n\tpublic void testSetHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(10);\n\t\tassertTrue(npc.getBaseHealth() == 10);\n\t\tnpc.setHealth(35);\n\t\tassertFalse(npc.getBaseHealth() == 10);\n\t\tassertTrue(npc.getBaseHealth() == 35);\n\t}",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00004000;\n curHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00000080;\n curHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00000080;\n curHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00000080;\n curHP_ = value;\n onChanged();\n return this;\n }",
"private void setHealth(Player p, int health)\n {\n int current = p.getHealth();\n \n // If the health is 20, just leave it at that no matter what.\n int regain = health == 20 ? 20 : health - current;\n \n // Set the health, and fire off the event.\n p.setHealth(health);\n EntityRegainHealthEvent event = new EntityRegainHealthEvent(p, regain, RegainReason.CUSTOM);\n Bukkit.getPluginManager().callEvent(event);\n }",
"void gainHealth(int points) {\n this.health += points;\n }",
"public Builder setMaxHP(int value) {\n bitField0_ |= 0x00000040;\n maxHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setMaxHP(int value) {\n bitField0_ |= 0x00000040;\n maxHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setMaxHP(int value) {\n bitField0_ |= 0x00000040;\n maxHP_ = value;\n onChanged();\n return this;\n }",
"protected void setHealth(EntityLivingBase target, int health)\n {\n if (Metamorph.proxy.config.disable_health)\n {\n return;\n }\n\n float ratio = target.getHealth() / target.getMaxHealth();\n float proportionalHealth = Math.round(health * ratio);\n\n this.setMaxHealth(target, health);\n target.setHealth(proportionalHealth <= 0 ? 1 : proportionalHealth);\n }",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00000008;\n curHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setMaxHP(int value) {\n bitField0_ |= 0x00000010;\n maxHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setBonusPercentHP(float value) {\n bitField0_ |= 0x00000002;\n bonusPercentHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setCurHP(int value) {\n bitField0_ |= 0x00000040;\n curHP_ = value;\n onChanged();\n return this;\n }",
"public Builder setMaxHP(int value) {\n bitField0_ |= 0x00000020;\n maxHP_ = value;\n onChanged();\n return this;\n }",
"public void setMaxHealth() {\n\t\tthis.maxHealth *= level / 10;\n\t}",
"public void resetHealth() {\n\t\tthis.health = this.getCombatDefinition().getMaxHealth();\n\t}",
"public void special(){\n if(kc >= 10){\n this.setHP(kc/10);\n kc %= 10;\n }\n }",
"public void heal(int healAmount){\r\n health+= healAmount;\r\n }",
"public void takeDamage(int dmg){\r\n this.currHP -= dmg;\r\n }",
"public void setHigh(double value){high = value;}",
"public static void heal(LivingEntity ent) {\n\t\tAttributeInstance maxHealth = ent.getAttribute(Attribute.GENERIC_MAX_HEALTH);\n\t\tif(maxHealth != null) {\n\t\t\tent.setHealth(maxHealth.getValue());\n\t\t}\n\t\tif(ent instanceof Player) {\n\t\t\tPlayer p = (Player) ent;\n\t\t\tp.setFoodLevel(20);\n\t\t\tp.setSaturation(20);\n\t\t}\n\t}",
"int getCurrentHP();",
"public void punch (int health)\n {\n\thealth -= 8;\n\thealth2 = health;\n }",
"public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }",
"@Override\r\n\tpublic void heal() {\n\t\tSystem.out.println(\"Paladin \" + super.getName() + \" heals for 50 points.\");\r\n\t\tsuper.setHitPoints(super.getHitPoints() + 50);\r\n\t}",
"public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }",
"public static void setHealth(int healtha)\r\n\t{\r\n\t\thealth = healtha;\r\n\t}",
"public Builder setMaxHP(int value) {\n bitField0_ |= 0x00002000;\n maxHP_ = value;\n onChanged();\n return this;\n }",
"@Test\n\tpublic void testChangeHealth() {\n\t\tnpc.setLevel(1);\n\t\tnpc.setHealth(23);\n\t\tint tempHealth = npc.getHealth();\n\t\tnpc.changeHealth(10);\n\t\tassertTrue(npc.getHealth() == tempHealth + 10);\n\t\tnpc.changeHealth(100);\n\t\tassertTrue(npc.getHealth() == npc.getMaxHealth());\n\t\tnpc.changeHealth(-999);\n\t\tassertTrue(npc.isDead());\n\t}",
"public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}",
"@Override\n public void hardMode() {\n super.setHP(1800);\n super.getFrontAttack().setBaseDamage(37.5);\n super.getRightAttack().setBaseDamage(37.5);\n super.getBackAttack().setBaseDamage(37.5);\n super.getLeftAttack().setBaseDamage(37.5);\n }",
"@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}",
"public void setHungerDamage(float hunger);",
"public void changeHealth(int i) {\n \t\tif (health + i < getMaxHealth()) {\n \t\t\thealth += i;\n \t\t} else if (health + i > getMaxHealth()) {\n \t\t\thealth = getMaxHealth();\n \t\t} else if (health + i < 1) {\n \t\t\thealth = 0;\n \t\t\talive = false;\n \t\t}\n \t}",
"public void decreaseHealth() {\n setHealth(getHealth()-1);\n }",
"public int getHP() {\n\t\treturn HP;\n\t}",
"@Override\n public void easyMode() {\n super.setHP(900);\n super.getFrontAttack().setBaseDamage(18.75);\n super.getRightAttack().setBaseDamage(18.75);\n super.getBackAttack().setBaseDamage(18.75);\n super.getLeftAttack().setBaseDamage(18.75);\n }",
"public void setHealthAmount( int count, int maxHealth ) {\n this.currentHealth = count;\n this.maxHealth = maxHealth;\n\n determineState();\n\n //put the bars on the screen\n rootTable.clearChildren();\n for ( int i = 0; i < count; i++ ) {\n rootTable.add( healthMeter.get( i ) ).top().left().size( 25f, 100f );\n }\n }",
"public void setStats(int health, int attack, int defense) {\n\t\tmaxHealth = health;\n\t maxAttack = attack;\n\t maxDefense = defense;\n\t curHealth = maxHealth;\n\t curAttack = maxAttack;\n\t curDefense = maxDefense;\n\t}",
"private void setHighScore(int hs) {\n setStat(hs, highScore);\n }",
"int getHPValue();",
"public void incLevel(int lvl){this.Level=this.XP/(100);}",
"public void setBaseHealth(int baseHealth)\r\n {\r\n this.mBaseHealth = baseHealth;\r\n }",
"public void reduceHealth() {\n\t}",
"public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }",
"public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }",
"public void setBaseHP5(int baseHP5)\r\n {\r\n this.mBaseHP5 = baseHP5;\r\n }",
"public static void changeHealth(int _value){\n healthLabel -= _value;\n healthHUD.setText(String.format(Locale.getDefault(),\"%03d\", healthLabel));\n }",
"public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }",
"public void setPotion(int p) {\n setStat(p, potion);\n }",
"public int getHP() {\r\n return currHP;\r\n }",
"protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }",
"@Override\n public void hit(int atk) {\n hp = hp - atk;\n }",
"public void heal1()\r\n {\r\n this.health = 700;\r\n Story.healText1();\r\n }",
"float getBonusPercentHP();",
"private void takeDamage(int damage){ health -= damage;}"
] | [
"0.8447767",
"0.8088259",
"0.799287",
"0.79148495",
"0.7868957",
"0.7833635",
"0.78012806",
"0.7797556",
"0.7736012",
"0.76656353",
"0.7614449",
"0.76012766",
"0.74871325",
"0.74840933",
"0.74740076",
"0.7467302",
"0.73964244",
"0.7343653",
"0.732149",
"0.73001754",
"0.7262985",
"0.72444427",
"0.72023994",
"0.7190698",
"0.7184754",
"0.7119154",
"0.7084438",
"0.7050639",
"0.70216763",
"0.69876844",
"0.6966563",
"0.69641584",
"0.69622236",
"0.6941389",
"0.6915358",
"0.6884985",
"0.68728083",
"0.6793354",
"0.67788184",
"0.6766551",
"0.6758911",
"0.6697022",
"0.6690784",
"0.6656956",
"0.66390735",
"0.66371846",
"0.66371846",
"0.6617661",
"0.6613763",
"0.6613583",
"0.6613583",
"0.661098",
"0.6609786",
"0.65926945",
"0.6575627",
"0.6574937",
"0.65654165",
"0.6560914",
"0.6559806",
"0.65265024",
"0.65232927",
"0.65148103",
"0.64974135",
"0.64883447",
"0.64847916",
"0.64763963",
"0.6462664",
"0.6453287",
"0.64343375",
"0.64187545",
"0.6399156",
"0.6374005",
"0.6365439",
"0.63503647",
"0.6344431",
"0.631798",
"0.63033384",
"0.62828296",
"0.6282697",
"0.6273413",
"0.62709993",
"0.6270747",
"0.62676036",
"0.6259895",
"0.6246428",
"0.6245357",
"0.62389046",
"0.62349564",
"0.6231498",
"0.6229838",
"0.6222638",
"0.62186706",
"0.6213148",
"0.62129205",
"0.62004656",
"0.6199583",
"0.61871463",
"0.61817867",
"0.6175245",
"0.6174506"
] | 0.65316415 | 59 |
Gets the player's pet name | public String getPetName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getPetName() {\n return localPetName;\n }",
"public String getName(Player p) {\n\t\treturn name;\n\t}",
"String getPlayerName();",
"public String getPlayerName() {\n return props.getProperty(\"name\");\n }",
"public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}",
"String getName() {\n return getStringStat(playerName);\n }",
"public String getPlayername(Player player) {\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n System.out.println(\"Merci de d'indiquer le nom du joueur \"+player.getColor().toString(false)+\" : \");\n String name = readInput.nextLine();\n return name;\n }",
"public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}",
"public String getUserpetname() {\n return userpetname;\n }",
"public String getName(){\r\n\t\treturn playerName;\r\n\t}",
"String getName(){\n\t\treturn playerName;\n\t}",
"public String getName(){\n\t\treturn players.get(0).getName();\n\t}",
"public String getPlayerName() {\n return nameLabel.getText().substring(0, nameLabel.getText().indexOf('\\''));\n }",
"public String getPokemonName() {\n\t\treturn pokemon.getName();\n\t}",
"abstract public String getNameFor(Player player);",
"public String getPlayerName(){\n\t\treturn playerName;\n\t}",
"public String getPlayerName() {\n\t\treturn name;\n\t}",
"public String getPlayerName() {\n return this.playerName;\n }",
"public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }",
"@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}",
"public String getPlayerName() {\n return name; \n }",
"public String getPlayerName() {\n return playerName;\n }",
"public String getPlayerName() {\n return playerName;\n }",
"public String getPlayerName() {\n\n return m_playerName;\n }",
"@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }",
"@Override\n public String toString() {\n return PET_NAME;\n }",
"public String getPlayerName() {\n \treturn playername;\n }",
"public String getPlayerListName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getPlayerListName ).orElse ( name );\n\t}",
"public String getPlayerName() {\n\t\treturn playerName;\n\t}",
"java.lang.String getGameName();",
"java.lang.String getGameName();",
"public java.lang.String getPetId() {\n return localPetId;\n }",
"public String getFullPlayerName(Player otherPlayer) {\n return this.fullPlayerName;\n }",
"@Test\n\tpublic void testPetWhenGetNameBolt() {\n\t\tPet pet = new Pet(\"Bolt\", \"owloo\");\t\t\n\t\tString expect = \"Bolt\";\n\t\tString result = pet.getPetName();\t\t\n\t\tassertEquals(expect, result);\t\n\t}",
"private String getPlayerName() {\n Bundle inBundle = getIntent().getExtras();\n String name = inBundle.get(USER_NAME).toString();\n return name;\n }",
"public VirtualPet getPet(String name) {\n\t\treturn shelterPets.get(name);\n\n\t}",
"public String getPotionName()\r\n/* 119: */ {\r\n/* 120:121 */ return Potion.potionList[this.id].getName();\r\n/* 121: */ }",
"public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n }\n }",
"public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"String getPName();",
"private String getPlayerName() {\n EditText name = (EditText) findViewById(R.id.name_edittext_view);\n return name.getText().toString();\n }",
"public static String getNameOne() {\n\tString name;\n\tname = playerOneName.getText();\n\treturn name;\n\n }",
"@Test\n\tpublic void testPetWhenGetNameViolet() {\n\t\tPet pet = new Pet(\"Violet\", \"arf\");\t\t\n\t\tString expect = \"Violet\";\n\t\tString result = pet.getPetName();\t\t\n\t\tassertEquals(expect, result);\t\n\t}",
"public String getDisplayName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getDisplayName ).orElse ( name );\n\t}",
"private String getPlayerName(int i) {\n\t\tSystem.out.println(\"\\nEnter Player \"+i+\"'s Name:\");\n\t\treturn GetInput.getInstance().aString();\n\t}",
"public String getPlayerName(){\n return this.playerName;\n\n }",
"public Pet getPet(String name) {\n\t\treturn getPet(name, false);\n\t}",
"@Test\n\tpublic void testPetWhenGetNameNala() {\n\t\tPet pet = new Pet(\"Nala\", \"roar\");\t\t\n\t\tString expect = \"Nala\";\n\t\tString result = pet.getPetName();\t\t\n\t\tassertEquals(expect, result);\t\t\n\t}",
"String player1GetName(){\n return player1;\n }",
"private void getPlayertName() {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}",
"String getPname();",
"public static String getEntityName(Entity entity) {\n\n\t\t//Player\n\t\tif (entity instanceof Player) return ((Player) entity).getName();\n\t\t//Other\n\t\telse return entity.getType().getName();\n\t}",
"String getPlayer();",
"public String getLoggedPlayerName() {\r\n return ctrlDomain.getLoggedPlayerName();\r\n }",
"public String getName() {\r\n return this.animalName;\r\n }",
"public String getOpponentName() {\n return opponentName;\n }",
"public String getPlayer() {\n return p;\n }",
"String getPlayerName() {\r\n EditText editText = (EditText) findViewById(R.id.name_edit_text_view);\r\n return editText.getText().toString();\r\n }",
"private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }",
"public String getPlayerTitle(Player player)\n \t{\n \t\tif (player == null)\n \t\t\treturn \"\";\n \n \t\tFPlayer me = FPlayers.i.get(player);\n \t\tif (me == null)\n \t\t\treturn \"\";\n \n \t\treturn me.getTitle().trim();\n \t}",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();"
] | [
"0.8303329",
"0.76610124",
"0.7600661",
"0.74245536",
"0.7372069",
"0.73610514",
"0.7340695",
"0.7324473",
"0.73129815",
"0.72125876",
"0.72068316",
"0.7196067",
"0.71703243",
"0.71559024",
"0.71040833",
"0.70811313",
"0.7069732",
"0.705333",
"0.70144385",
"0.70068616",
"0.699896",
"0.69878227",
"0.69878227",
"0.69531363",
"0.6932019",
"0.69150287",
"0.6914224",
"0.6899532",
"0.68683016",
"0.6845557",
"0.6845557",
"0.68212235",
"0.67929053",
"0.6778064",
"0.67646646",
"0.67527467",
"0.6742211",
"0.6735648",
"0.6678066",
"0.66710365",
"0.66415334",
"0.66152674",
"0.6614887",
"0.6607485",
"0.6521762",
"0.6517024",
"0.648682",
"0.64738166",
"0.6460452",
"0.6449202",
"0.6444621",
"0.644005",
"0.6437615",
"0.64292943",
"0.64280754",
"0.6411343",
"0.6407003",
"0.6405525",
"0.63808924",
"0.6366941",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873",
"0.63595873"
] | 0.81064487 | 1 |
Returns the predicted skill for Shoot the Moon. | public Skills getSkillPrediction(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSkill() {\n\t\treturn skill;\n\t}",
"public abstract SkillData skill();",
"public Skills getChosenSkill();",
"protected Skill getNpcSuperiorBuff()\r\n\t{\n\t\treturn getSkill(15649, 1); //warrior\r\n//\t\treturn getSkill(15650, 1); //wizzard\r\n\t}",
"public com.transerainc.aha.gen.agent.SkillDocument.Skill getSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public void setSkillPrediction(Skills skill);",
"public Double getSkillNumber() {\n return skillNumber;\n }",
"@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }",
"@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }",
"Skill getSkill(String name);",
"public int getFishingSkill();",
"public Integer getSkillId() {\n return skillId;\n }",
"public Skills chooseSkill();",
"String getSkills();",
"java.lang.String getPredicted();",
"public Ability getConfigurationSkill() {\n\n\n if (frameworkAbility.hasAdvantage(advantageCosmic.advantageName) || frameworkAbility.hasAdvantage(advantageNoSkillRollRequired.advantageName)) {\n return null;\n } else {\n ParameterList pl = frameworkAbility.getPowerParameterList();\n Ability skill = null;\n\n Object o = pl.getParameterValue(\"Skill\");\n if (o instanceof AbilityAlias) {\n skill = ((AbilityAlias) o).getAliasReferent();\n } else if (o instanceof Ability) {\n skill = (Ability) o;\n }\n\n return skill;\n }\n }",
"private static int calcMagicSkill(Thing caster, Thing spell) {\r\n \t\t// TODO skill modification\r\n \t\tif (caster==null) {\r\n \t\t\treturn (int)(5*Math.pow(spellPowerMultiplier,spell.getLevel()));\r\n \t\t}\r\n \t\tint skill=caster.getStat(spell.getString(\"Order\"));\r\n \t\tint st=(int)(caster.getStat(\"IN\")\r\n \t\t\t\t*(0.85+0.15*caster.getStat(Skill.CASTING))\r\n \t\t\t\t*(0.85+0.15*skill)); \r\n \t\treturn st;\r\n \t}",
"@Override\n\tpublic Skills chooseSkill() {\n\t\t\n\t\treturn null;\n\t}",
"public skills(){\n\t\tname = \"tempName\";\n\t\tmanaCost =0;\n\t\tskillDmg = 0;\n\t\tcritFactor = 0;\n\t\tcritChance = 0;\n\t\tnoOfTargets = 1;\n\t\thitChance = 0;\n\t\tmyAttribute = null;\n\t\t\n\t\t//instantiates the original values, prob will have no need\n\t\torigSkillDmg = 0;\n\t\torigCritFac = 0;\n\t\torigCritChan = 0;\n\t\torigHitChan =0;\n\t\t\n\t\t//stores the current buffs on the person\n\t\tcurrBuff = null;\n\t}",
"public int getSkillType() {\n\t\treturn 1;\n\t}",
"int getSkillId();",
"String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }",
"public wbcadventure.Skill getSkill(int skillNumber){\n switch(skillNumber){\n case 0 : return skill1;\n case 1 : return skill2;\n case 2 : return skill3;\n case 3 : return skill4;\n }\n return null;\n }",
"public House getPredicted() {\r\n return this.predicted;\r\n }",
"protected String getHurtSound() {\r\n\t\treturn \"mob.chicken.hurt\";\r\n\t}",
"public int getHighestCombatSkill() {\r\n int id = 0;\r\n int last = 0;\r\n for (int i = 0; i < 5; i++) {\r\n if (staticLevels[i] > last) {\r\n last = staticLevels[i];\r\n id = i;\r\n }\r\n }\r\n return id;\r\n }",
"public String getSkillsetName() {\n return skillsetName;\n }",
"public short getSiegeWeaponDamage();",
"public int getTrainingExp()\n\t{\n\t\treturn m_skillTrainingExp;\n\t}",
"private double enemyKills()\n {\n return (double)enemyResult.shipsLost();\n }",
"public Skill get(SkillType type) {\r\n\t\treturn this.skills.get(type);\r\n\t}",
"public byte getNumSkills()\r\n\t{\r\n\t\treturn lastSkill;\r\n\t}",
"public int getPotion() {\n return getStat(potion);\n }",
"@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}",
"@Override\n\tpublic double getAttack() {\n\t\treturn 0;\n\t}",
"public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int getAttack() {\n return base.getAttack();\n }",
"public Sound getSoundHurt() {\n return soundHurt;\n }",
"public int performPokeAction() {\n\t\tAction action = pokemon.chooseAction();\n\t\tif (action == Action.ATTACK) {\n\t\t\ttrainer.takeDamage(pokemon.performAttack());\n\t\t}\n\t\treturn action.getValue();\n\t\t//return Action.ATTACK.getValue();\n\t}",
"Skill getSkill(Long skillId) throws DbException;",
"@Override\n public int getSkillLevel(int skillId) {\n final Skill skill = getKnownSkill(skillId);\n return (skill == null) ? 0 : skill.getLevel();\n }",
"int getAttackRoll();",
"public int getSkillRechargeTime(Skills currentSkill);",
"public double getReward() {\n if (inGoalRegion()) {\n return REWARD_AT_GOAL;\n } else {\n return REWARD_PER_STEP;\n }\n }",
"@JsonProperty( \"skills\" )\n\tpublic List<Skill> getSkills()\n\t{\n\t\treturn m_skills;\n\t}",
"public short getHandThrowDamage();",
"@Override\n\tpublic double getAttack() {\n return attack;\n\t}",
"private static int calcMagicPower(Thing caster, Thing spell) {\r\n \t\tGame.assertTrue(spell.getFlag(\"IsSpell\"));\r\n \t\tdouble sk=0;\r\n \t\tif (caster!=null) {\r\n \t\t\tsk=calcMagicSkill(caster,spell);\r\n \t\t} \r\n \t\t\r\n \t\t// minimum skill\r\n \t\tint skillMin=spell.getStat(\"SkillMin\");\r\n \t\tif (sk<skillMin) sk=skillMin;\r\n \t\t\r\n \t\tsk=sk*spell.getStat(\"PowerMultiplier\")/100.0 \r\n \t\t\t\t+spell.getStat(\"PowerBonus\");\r\n \t\t\r\n \t\tif (sk<0) sk=0;\r\n \t\treturn (int)sk;\r\n \t}",
"public LongFilter getSkillId() {\n\t\treturn skillId;\n\t}",
"public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}",
"int getBonusHP();",
"public LossModel getLoss() {\n return new LossModel(600, 30, 500);\n }",
"private Alien2 shootmiddle() {\n\t\tAlien2 shooter = alien2[choose()];\n\t\tif (shooter == null) return shootmiddle();\n\t\telse if (shooter.Destroyed) return shootmiddle();\n\t\telse return shooter;\n\t}",
"public int getShotsOnTarget () {\r\n\t\treturn shotsOnTarget;\r\n\t}",
"public Skill(String skillName, double skillDamage, int skillManaCost, double skillHeal){\n name = skillName;\n damage = skillDamage;\n manaCost = skillManaCost;\n heal = skillHeal;\n//sets up skills to return as their name.\n }",
"public java.lang.String getLykill() {\n return lykill;\n }",
"public String konus() {\n\t\treturn this.getIsim()+\" havliyor\";\n\t}",
"public int getKeyHireShip() {\r\n return getKeyShoot();\r\n }",
"public static byte calcSkillReflect(L2Character target, L2Skill skill)\n\t{\n\t\t/*\n\t\t * Neither some special skills (like hero debuffs...) or those skills\n\t\t * ignoring resistances can be reflected\n\t\t */\n\t\tif (skill.ignoreResists() || !skill.canBeReflected())\n\t\t{\n\t\t\treturn SKILL_REFLECT_FAILED;\n\t\t}\n\n\t\t// only magic and melee skills can be reflected\n\t\tif (!skill.isMagic() && (skill.getCastRange() == -1 || skill.getCastRange() > MELEE_ATTACK_RANGE))\n\t\t{\n\t\t\treturn SKILL_REFLECT_FAILED;\n\t\t}\n\n\t\tbyte reflect = SKILL_REFLECT_FAILED;\n\t\t// check for non-reflected skilltypes, need additional retail check\n\t\tswitch (skill.getSkillType())\n\t\t{\n\t\t\tcase BUFF:\n\t\t\tcase HEAL_PERCENT:\n\t\t\tcase MANAHEAL_PERCENT:\n\t\t\tcase UNDEAD_DEFENSE:\n\t\t\tcase AGGDEBUFF:\n\t\t\tcase CONT:\n\t\t\t\treturn SKILL_REFLECT_FAILED;\n\t\t\t// these skill types can deal damage\n\t\t\tcase PDAM:\n\t\t\tcase MDAM:\n\t\t\tcase BLOW:\n\t\t\tcase DRAIN:\n\t\t\tcase CHARGEDAM:\n\t\t\tcase FATAL:\n\t\t\tcase DEATHLINK:\n\t\t\tcase CPDAM:\n\t\t\tcase MANADAM:\n\t\t\tcase CPDAMPERCENT:\n\t\t\tcase MAXHPDAMPERCENT:\n\t\t\t\tfinal Stats stat =\n\t\t\t\t\t\tskill.isMagic() ? Stats.VENGEANCE_SKILL_MAGIC_DAMAGE : Stats.VENGEANCE_SKILL_PHYSICAL_DAMAGE;\n\t\t\t\tfinal double venganceChance = target.getStat().calcStat(stat, 0, target, skill);\n\t\t\t\tif (venganceChance > Rnd.get(100))\n\t\t\t\t{\n\t\t\t\t\treflect |= SKILL_REFLECT_VENGEANCE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfinal double reflectChance = target.calcStat(Stats.REFLECT_DEBUFFS, 0, null, skill);\n\t\tif (Rnd.get(100) < reflectChance)\n\t\t{\n\t\t\treflect |= SKILL_REFLECT_EFFECTS;\n\t\t}\n\n\t\treturn reflect;\n\t}",
"@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }",
"public int rollAttack()\n {\n Random random2 = new Random();\n int atk = random2.nextInt(20) +1 + attackBonus;\n return atk;\n }",
"@Override\n public Sprite getHurtSprite() {\n return Assets.getInstance().getSprite(\"entity/zombie_blood0.png\");\n }",
"public String StrongestWeapon() {\n\t\tString weapon = \"fists\";\n\t\tfor (Item temp: rooms.player.getItems()) {\t\t\t\t// Goes through all items in bag\n\t\t\tif (temp.getID() == \"pocket knife\" && !weapon.equals(\"wrench\")){ // Has pocket knife\n\t\t\t\tweapon = \"pocket knife\";\n\t\t\t}else if (temp.getID() == \"wrench\"){\t\t\t\t// Has wrench\n\t\t\t\tweapon = \"wrench\";\n\t\t\t}else if (temp.getID() == \"sword\"){\t\t\t\t\t// Has sword\n\t\t\t\treturn \"sword\";\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\treturn weapon;\n\t}",
"java.lang.String getSkillsEndorsementsRaw();",
"public double getAttack() {\n return attack;\n }",
"@Override\n\tprotected String getHurtSound() {\n\t\treturn \"mob.creeper.say\";\n\t}",
"protected String t() {\n return this.isAngry() ? \"mob.wolf.growl\" : (this.random.nextInt(3) == 0 ? (this.isTamed() && this.datawatcher.getFloat(18) < (this.getMaxHealth() / 2) ? \"mob.wolf.whine\" : \"mob.wolf.panting\") : \"mob.wolf.bark\");\n }",
"@Override\n\tpublic Skill getSkill(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//now retrieve/read from database using the primary key\n\t\tSkill theSkill = currentSession.get(Skill.class, theId);\n\t\t\n\t\treturn theSkill;\n\t}",
"@Override\r\n\tpublic float MPCost(int skillLevel, int augID) {\n\t\treturn 5;\r\n\t}",
"public String getProfitLoss() {\n\n return this.profitLoss;\n }",
"protected String getHurtSound() {\n return \"dig.stone\";\n }",
"public abstract double experience();",
"@Override\n public String getFunction() {\n return \"Gets all skills a player character has.\";\n }",
"public static short getModFromSkill( CreatureTemplate ctr, String skillName )\n {\n\n // Charisma based skills\n if( \"Bluff\".equals( skillName ) || \"Diplomacy\".equals( skillName ) || \"Intimidate\".equals( skillName ) || \"Streetwise\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.CHA ) - 10) / 2);\n }\n\n // Constitution based skills\n if( \"Endurance\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.CON ) - 10) / 2);\n }\n\n // Dex based skills\n if( \"Acrobatics\".equals( skillName ) || \"Stealth\".equals( skillName ) || \"Thievery\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.DEX ) - 10) / 2);\n }\n\n // Int based skills\n if( \"Arcana\".equals( skillName ) || \"History\".equals( skillName ) || \"Religion\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.INT ) - 10) / 2);\n }\n\n // STR based skills\n if( \"Athletics\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.STR ) - 10) / 2);\n }\n // WIS based skills\n if( \"Dungeoneering\".equals( skillName ) || \"Heal\".equals( skillName ) || \"Insight\".equals( skillName ) || \"Nature\".equals( skillName )\n || \"Perception\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.WIS ) - 10) / 2);\n }\n\n return -10; // Skill not found in list\n }",
"public String getJoke() {\n int index = (int)((float)Math.random() * mJokes.size());\n return mJokes.get(index);\n }",
"Integer getSkillCount( String key ){\n return developer.skills.size();\n }",
"public int getWeaponDamage()\n {\n \t\treturn mystuff.getWepDmg();\n }",
"public String getAsteroidAttack() {\n\t\tminusShield(2);\n\t\treturn \"Got damaged from the asteroid belt!!\";\n\t}",
"public static String getSkillName(int skillId) {\n switch (skillId) {\n case Constants.SKILLS_ATTACK:\n return \"Attack\";\n case Constants.SKILLS_STRENGTH:\n return \"Strength\";\n case Constants.SKILLS_RANGE:\n return \"Range\";\n case Constants.SKILLS_DEFENSE:\n return \"Defence\";\n case Constants.SKILLS_MAGIC:\n return \"Magic\";\n case Constants.SKILLS_COOKING:\n return \"Cooking\";\n case Constants.SKILLS_FISHING:\n return \"Fishing\";\n case Constants.SKILLS_WOODCUTTING:\n return \"WC\";\n case Constants.SKILLS_HITPOINTS:\n return \"HitPoints\";\n case Constants.SKILLS_AGILITY:\n return \"Agility\";\n default:\n return \"None\";\n }\n }",
"public String getWeapon() {\n return weapon1;\n }",
"public int getCurrentAbilityTargetY() {\n return currentAbilityTargetY;\n }",
"public int getBonusHP() {\n return bonusHP_;\n }",
"public WeightedPoint getGoal()\n {\n return map.getGoal();\n }",
"@Override\n\tprotected String getHurtSound() {\n\t\treturn ZollernModInfo.MODID + \":hellduck.hurt\";\n\t}",
"public String toString(){\n return player.toString() + \"\\nGained a new Skill\";\n }",
"public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}",
"public IntrinsicWeapon getIntrinsicWeapon() {\r\n\t\treturn new IntrinsicWeapon(10, \"bombard\");\r\n\t}",
"public void calculateKnockback(Entity ent, ArrayList<WeaponEffect> effects) {\n }",
"@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }",
"public int getHat() {\n return hat_;\n }",
"void updateSkill(Skill skill);",
"public Skill(Player player){\n this.player = player;\n this.name = player.name;\n this.intellect = player.intellect;\n this.defense = player.defense;\n this.attack = player.attack;\n this.weapon = player.weapon;\n this.armor = player.armor;\n this.defense = player.defense;\n\n }",
"java.lang.String getMent();",
"public void setSkillId(Integer skillId) {\n this.skillId = skillId;\n }",
"public OutcomeDistribution predictOutcome(GameObserver gameObs) {\n initialize(gameObs);\n computeOutcomePrediction(gameObs);\n return predictedOutcome;\n }",
"public java.lang.String getStudent_penalty() {\n\t\treturn _primarySchoolStudent.getStudent_penalty();\n\t}",
"public ResponseEntity<List<Skill>> getAllSkills() {\n \tList<Skill> skillist=skillService.getAllSkills();\n\t\t\n//\t\tLOGGER.debug(\" Trying to Fetch list of Skills\");\n\t\t\n\t\tif(skillist==null) {\n\t\t\t\n//\t\t\tLOGGER.error(\" No Skill Found\");\n\t\t\tthrow new ResourceNotFoundException(\"No Skill Details found\");\n\t\t}\n//\t\tLOGGER.info(\"Successfully Retrieved\");\n\t\treturn new ResponseEntity<>(skillist,HttpStatus.OK);\n }",
"public int getAttack() { return this.attack; }",
"public int getKeySellItem() {\r\n return getKeyShoot();\r\n }",
"public int attackRoll(){\r\n\t\treturn (int) (Math.random() * 100);\r\n\t}"
] | [
"0.6505379",
"0.61431134",
"0.61131835",
"0.6107633",
"0.6054685",
"0.60296065",
"0.60265476",
"0.59545887",
"0.5951197",
"0.5877104",
"0.5817007",
"0.58145106",
"0.5799047",
"0.57744986",
"0.5688616",
"0.56761783",
"0.56539667",
"0.5644361",
"0.5604374",
"0.557346",
"0.55527323",
"0.5528864",
"0.5488834",
"0.54610986",
"0.54296273",
"0.5425595",
"0.53570235",
"0.53319305",
"0.5315209",
"0.53145313",
"0.53107023",
"0.5300324",
"0.5287021",
"0.52834517",
"0.5280407",
"0.525156",
"0.5247267",
"0.5238028",
"0.52380013",
"0.52340925",
"0.52295065",
"0.52291584",
"0.5223423",
"0.522307",
"0.5222505",
"0.5216599",
"0.52113336",
"0.52062166",
"0.5201129",
"0.5199375",
"0.51947904",
"0.5193913",
"0.5193767",
"0.5189177",
"0.5183422",
"0.5168409",
"0.51664",
"0.5153656",
"0.5150836",
"0.5119462",
"0.5118191",
"0.5116907",
"0.5115467",
"0.5111876",
"0.51075023",
"0.5105526",
"0.51053184",
"0.5085775",
"0.5075852",
"0.50751185",
"0.50536627",
"0.50493234",
"0.504135",
"0.5035819",
"0.503531",
"0.50290805",
"0.5024853",
"0.5024743",
"0.50172424",
"0.5007434",
"0.5007374",
"0.50055695",
"0.4989194",
"0.4987584",
"0.4983862",
"0.49807128",
"0.49798214",
"0.4979072",
"0.4976601",
"0.49730828",
"0.49691534",
"0.49670503",
"0.49577892",
"0.49549565",
"0.49542806",
"0.49526447",
"0.49523774",
"0.49459383",
"0.49444804",
"0.4944415"
] | 0.7256877 | 0 |
Returns the predicted skill for Shoot the Moon. | public void setSkillPrediction(Skills skill); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Skills getSkillPrediction();",
"public String getSkill() {\n\t\treturn skill;\n\t}",
"public abstract SkillData skill();",
"public Skills getChosenSkill();",
"protected Skill getNpcSuperiorBuff()\r\n\t{\n\t\treturn getSkill(15649, 1); //warrior\r\n//\t\treturn getSkill(15650, 1); //wizzard\r\n\t}",
"public com.transerainc.aha.gen.agent.SkillDocument.Skill getSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public Double getSkillNumber() {\n return skillNumber;\n }",
"@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }",
"@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }",
"Skill getSkill(String name);",
"public int getFishingSkill();",
"public Integer getSkillId() {\n return skillId;\n }",
"public Skills chooseSkill();",
"String getSkills();",
"java.lang.String getPredicted();",
"public Ability getConfigurationSkill() {\n\n\n if (frameworkAbility.hasAdvantage(advantageCosmic.advantageName) || frameworkAbility.hasAdvantage(advantageNoSkillRollRequired.advantageName)) {\n return null;\n } else {\n ParameterList pl = frameworkAbility.getPowerParameterList();\n Ability skill = null;\n\n Object o = pl.getParameterValue(\"Skill\");\n if (o instanceof AbilityAlias) {\n skill = ((AbilityAlias) o).getAliasReferent();\n } else if (o instanceof Ability) {\n skill = (Ability) o;\n }\n\n return skill;\n }\n }",
"private static int calcMagicSkill(Thing caster, Thing spell) {\r\n \t\t// TODO skill modification\r\n \t\tif (caster==null) {\r\n \t\t\treturn (int)(5*Math.pow(spellPowerMultiplier,spell.getLevel()));\r\n \t\t}\r\n \t\tint skill=caster.getStat(spell.getString(\"Order\"));\r\n \t\tint st=(int)(caster.getStat(\"IN\")\r\n \t\t\t\t*(0.85+0.15*caster.getStat(Skill.CASTING))\r\n \t\t\t\t*(0.85+0.15*skill)); \r\n \t\treturn st;\r\n \t}",
"@Override\n\tpublic Skills chooseSkill() {\n\t\t\n\t\treturn null;\n\t}",
"public skills(){\n\t\tname = \"tempName\";\n\t\tmanaCost =0;\n\t\tskillDmg = 0;\n\t\tcritFactor = 0;\n\t\tcritChance = 0;\n\t\tnoOfTargets = 1;\n\t\thitChance = 0;\n\t\tmyAttribute = null;\n\t\t\n\t\t//instantiates the original values, prob will have no need\n\t\torigSkillDmg = 0;\n\t\torigCritFac = 0;\n\t\torigCritChan = 0;\n\t\torigHitChan =0;\n\t\t\n\t\t//stores the current buffs on the person\n\t\tcurrBuff = null;\n\t}",
"public int getSkillType() {\n\t\treturn 1;\n\t}",
"int getSkillId();",
"String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }",
"public wbcadventure.Skill getSkill(int skillNumber){\n switch(skillNumber){\n case 0 : return skill1;\n case 1 : return skill2;\n case 2 : return skill3;\n case 3 : return skill4;\n }\n return null;\n }",
"public House getPredicted() {\r\n return this.predicted;\r\n }",
"protected String getHurtSound() {\r\n\t\treturn \"mob.chicken.hurt\";\r\n\t}",
"public int getHighestCombatSkill() {\r\n int id = 0;\r\n int last = 0;\r\n for (int i = 0; i < 5; i++) {\r\n if (staticLevels[i] > last) {\r\n last = staticLevels[i];\r\n id = i;\r\n }\r\n }\r\n return id;\r\n }",
"public String getSkillsetName() {\n return skillsetName;\n }",
"public short getSiegeWeaponDamage();",
"public int getTrainingExp()\n\t{\n\t\treturn m_skillTrainingExp;\n\t}",
"private double enemyKills()\n {\n return (double)enemyResult.shipsLost();\n }",
"public Skill get(SkillType type) {\r\n\t\treturn this.skills.get(type);\r\n\t}",
"public byte getNumSkills()\r\n\t{\r\n\t\treturn lastSkill;\r\n\t}",
"public int getPotion() {\n return getStat(potion);\n }",
"@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}",
"@Override\n\tpublic double getAttack() {\n\t\treturn 0;\n\t}",
"public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int getAttack() {\n return base.getAttack();\n }",
"public Sound getSoundHurt() {\n return soundHurt;\n }",
"Skill getSkill(Long skillId) throws DbException;",
"public int performPokeAction() {\n\t\tAction action = pokemon.chooseAction();\n\t\tif (action == Action.ATTACK) {\n\t\t\ttrainer.takeDamage(pokemon.performAttack());\n\t\t}\n\t\treturn action.getValue();\n\t\t//return Action.ATTACK.getValue();\n\t}",
"@Override\n public int getSkillLevel(int skillId) {\n final Skill skill = getKnownSkill(skillId);\n return (skill == null) ? 0 : skill.getLevel();\n }",
"int getAttackRoll();",
"public int getSkillRechargeTime(Skills currentSkill);",
"@JsonProperty( \"skills\" )\n\tpublic List<Skill> getSkills()\n\t{\n\t\treturn m_skills;\n\t}",
"public double getReward() {\n if (inGoalRegion()) {\n return REWARD_AT_GOAL;\n } else {\n return REWARD_PER_STEP;\n }\n }",
"public short getHandThrowDamage();",
"@Override\n\tpublic double getAttack() {\n return attack;\n\t}",
"private static int calcMagicPower(Thing caster, Thing spell) {\r\n \t\tGame.assertTrue(spell.getFlag(\"IsSpell\"));\r\n \t\tdouble sk=0;\r\n \t\tif (caster!=null) {\r\n \t\t\tsk=calcMagicSkill(caster,spell);\r\n \t\t} \r\n \t\t\r\n \t\t// minimum skill\r\n \t\tint skillMin=spell.getStat(\"SkillMin\");\r\n \t\tif (sk<skillMin) sk=skillMin;\r\n \t\t\r\n \t\tsk=sk*spell.getStat(\"PowerMultiplier\")/100.0 \r\n \t\t\t\t+spell.getStat(\"PowerBonus\");\r\n \t\t\r\n \t\tif (sk<0) sk=0;\r\n \t\treturn (int)sk;\r\n \t}",
"public LongFilter getSkillId() {\n\t\treturn skillId;\n\t}",
"public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}",
"int getBonusHP();",
"public LossModel getLoss() {\n return new LossModel(600, 30, 500);\n }",
"private Alien2 shootmiddle() {\n\t\tAlien2 shooter = alien2[choose()];\n\t\tif (shooter == null) return shootmiddle();\n\t\telse if (shooter.Destroyed) return shootmiddle();\n\t\telse return shooter;\n\t}",
"public int getShotsOnTarget () {\r\n\t\treturn shotsOnTarget;\r\n\t}",
"public Skill(String skillName, double skillDamage, int skillManaCost, double skillHeal){\n name = skillName;\n damage = skillDamage;\n manaCost = skillManaCost;\n heal = skillHeal;\n//sets up skills to return as their name.\n }",
"public java.lang.String getLykill() {\n return lykill;\n }",
"public String konus() {\n\t\treturn this.getIsim()+\" havliyor\";\n\t}",
"public int getKeyHireShip() {\r\n return getKeyShoot();\r\n }",
"public static byte calcSkillReflect(L2Character target, L2Skill skill)\n\t{\n\t\t/*\n\t\t * Neither some special skills (like hero debuffs...) or those skills\n\t\t * ignoring resistances can be reflected\n\t\t */\n\t\tif (skill.ignoreResists() || !skill.canBeReflected())\n\t\t{\n\t\t\treturn SKILL_REFLECT_FAILED;\n\t\t}\n\n\t\t// only magic and melee skills can be reflected\n\t\tif (!skill.isMagic() && (skill.getCastRange() == -1 || skill.getCastRange() > MELEE_ATTACK_RANGE))\n\t\t{\n\t\t\treturn SKILL_REFLECT_FAILED;\n\t\t}\n\n\t\tbyte reflect = SKILL_REFLECT_FAILED;\n\t\t// check for non-reflected skilltypes, need additional retail check\n\t\tswitch (skill.getSkillType())\n\t\t{\n\t\t\tcase BUFF:\n\t\t\tcase HEAL_PERCENT:\n\t\t\tcase MANAHEAL_PERCENT:\n\t\t\tcase UNDEAD_DEFENSE:\n\t\t\tcase AGGDEBUFF:\n\t\t\tcase CONT:\n\t\t\t\treturn SKILL_REFLECT_FAILED;\n\t\t\t// these skill types can deal damage\n\t\t\tcase PDAM:\n\t\t\tcase MDAM:\n\t\t\tcase BLOW:\n\t\t\tcase DRAIN:\n\t\t\tcase CHARGEDAM:\n\t\t\tcase FATAL:\n\t\t\tcase DEATHLINK:\n\t\t\tcase CPDAM:\n\t\t\tcase MANADAM:\n\t\t\tcase CPDAMPERCENT:\n\t\t\tcase MAXHPDAMPERCENT:\n\t\t\t\tfinal Stats stat =\n\t\t\t\t\t\tskill.isMagic() ? Stats.VENGEANCE_SKILL_MAGIC_DAMAGE : Stats.VENGEANCE_SKILL_PHYSICAL_DAMAGE;\n\t\t\t\tfinal double venganceChance = target.getStat().calcStat(stat, 0, target, skill);\n\t\t\t\tif (venganceChance > Rnd.get(100))\n\t\t\t\t{\n\t\t\t\t\treflect |= SKILL_REFLECT_VENGEANCE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfinal double reflectChance = target.calcStat(Stats.REFLECT_DEBUFFS, 0, null, skill);\n\t\tif (Rnd.get(100) < reflectChance)\n\t\t{\n\t\t\treflect |= SKILL_REFLECT_EFFECTS;\n\t\t}\n\n\t\treturn reflect;\n\t}",
"@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }",
"public int rollAttack()\n {\n Random random2 = new Random();\n int atk = random2.nextInt(20) +1 + attackBonus;\n return atk;\n }",
"@Override\n public Sprite getHurtSprite() {\n return Assets.getInstance().getSprite(\"entity/zombie_blood0.png\");\n }",
"public String StrongestWeapon() {\n\t\tString weapon = \"fists\";\n\t\tfor (Item temp: rooms.player.getItems()) {\t\t\t\t// Goes through all items in bag\n\t\t\tif (temp.getID() == \"pocket knife\" && !weapon.equals(\"wrench\")){ // Has pocket knife\n\t\t\t\tweapon = \"pocket knife\";\n\t\t\t}else if (temp.getID() == \"wrench\"){\t\t\t\t// Has wrench\n\t\t\t\tweapon = \"wrench\";\n\t\t\t}else if (temp.getID() == \"sword\"){\t\t\t\t\t// Has sword\n\t\t\t\treturn \"sword\";\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\treturn weapon;\n\t}",
"java.lang.String getSkillsEndorsementsRaw();",
"public double getAttack() {\n return attack;\n }",
"@Override\n\tprotected String getHurtSound() {\n\t\treturn \"mob.creeper.say\";\n\t}",
"protected String t() {\n return this.isAngry() ? \"mob.wolf.growl\" : (this.random.nextInt(3) == 0 ? (this.isTamed() && this.datawatcher.getFloat(18) < (this.getMaxHealth() / 2) ? \"mob.wolf.whine\" : \"mob.wolf.panting\") : \"mob.wolf.bark\");\n }",
"@Override\n\tpublic Skill getSkill(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//now retrieve/read from database using the primary key\n\t\tSkill theSkill = currentSession.get(Skill.class, theId);\n\t\t\n\t\treturn theSkill;\n\t}",
"public String getProfitLoss() {\n\n return this.profitLoss;\n }",
"@Override\r\n\tpublic float MPCost(int skillLevel, int augID) {\n\t\treturn 5;\r\n\t}",
"protected String getHurtSound() {\n return \"dig.stone\";\n }",
"public abstract double experience();",
"@Override\n public String getFunction() {\n return \"Gets all skills a player character has.\";\n }",
"public static short getModFromSkill( CreatureTemplate ctr, String skillName )\n {\n\n // Charisma based skills\n if( \"Bluff\".equals( skillName ) || \"Diplomacy\".equals( skillName ) || \"Intimidate\".equals( skillName ) || \"Streetwise\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.CHA ) - 10) / 2);\n }\n\n // Constitution based skills\n if( \"Endurance\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.CON ) - 10) / 2);\n }\n\n // Dex based skills\n if( \"Acrobatics\".equals( skillName ) || \"Stealth\".equals( skillName ) || \"Thievery\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.DEX ) - 10) / 2);\n }\n\n // Int based skills\n if( \"Arcana\".equals( skillName ) || \"History\".equals( skillName ) || \"Religion\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.INT ) - 10) / 2);\n }\n\n // STR based skills\n if( \"Athletics\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.STR ) - 10) / 2);\n }\n // WIS based skills\n if( \"Dungeoneering\".equals( skillName ) || \"Heal\".equals( skillName ) || \"Insight\".equals( skillName ) || \"Nature\".equals( skillName )\n || \"Perception\".equals( skillName ) )\n {\n return (short)((ctr.getAbilityScore( D20Rules.Ability.WIS ) - 10) / 2);\n }\n\n return -10; // Skill not found in list\n }",
"public String getJoke() {\n int index = (int)((float)Math.random() * mJokes.size());\n return mJokes.get(index);\n }",
"Integer getSkillCount( String key ){\n return developer.skills.size();\n }",
"public String getAsteroidAttack() {\n\t\tminusShield(2);\n\t\treturn \"Got damaged from the asteroid belt!!\";\n\t}",
"public int getWeaponDamage()\n {\n \t\treturn mystuff.getWepDmg();\n }",
"public static String getSkillName(int skillId) {\n switch (skillId) {\n case Constants.SKILLS_ATTACK:\n return \"Attack\";\n case Constants.SKILLS_STRENGTH:\n return \"Strength\";\n case Constants.SKILLS_RANGE:\n return \"Range\";\n case Constants.SKILLS_DEFENSE:\n return \"Defence\";\n case Constants.SKILLS_MAGIC:\n return \"Magic\";\n case Constants.SKILLS_COOKING:\n return \"Cooking\";\n case Constants.SKILLS_FISHING:\n return \"Fishing\";\n case Constants.SKILLS_WOODCUTTING:\n return \"WC\";\n case Constants.SKILLS_HITPOINTS:\n return \"HitPoints\";\n case Constants.SKILLS_AGILITY:\n return \"Agility\";\n default:\n return \"None\";\n }\n }",
"public int getCurrentAbilityTargetY() {\n return currentAbilityTargetY;\n }",
"public String getWeapon() {\n return weapon1;\n }",
"public int getBonusHP() {\n return bonusHP_;\n }",
"public WeightedPoint getGoal()\n {\n return map.getGoal();\n }",
"@Override\n\tprotected String getHurtSound() {\n\t\treturn ZollernModInfo.MODID + \":hellduck.hurt\";\n\t}",
"public String toString(){\n return player.toString() + \"\\nGained a new Skill\";\n }",
"public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}",
"public IntrinsicWeapon getIntrinsicWeapon() {\r\n\t\treturn new IntrinsicWeapon(10, \"bombard\");\r\n\t}",
"public void calculateKnockback(Entity ent, ArrayList<WeaponEffect> effects) {\n }",
"@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }",
"public int getHat() {\n return hat_;\n }",
"void updateSkill(Skill skill);",
"public Skill(Player player){\n this.player = player;\n this.name = player.name;\n this.intellect = player.intellect;\n this.defense = player.defense;\n this.attack = player.attack;\n this.weapon = player.weapon;\n this.armor = player.armor;\n this.defense = player.defense;\n\n }",
"public void setSkillId(Integer skillId) {\n this.skillId = skillId;\n }",
"java.lang.String getMent();",
"public ResponseEntity<List<Skill>> getAllSkills() {\n \tList<Skill> skillist=skillService.getAllSkills();\n\t\t\n//\t\tLOGGER.debug(\" Trying to Fetch list of Skills\");\n\t\t\n\t\tif(skillist==null) {\n\t\t\t\n//\t\t\tLOGGER.error(\" No Skill Found\");\n\t\t\tthrow new ResourceNotFoundException(\"No Skill Details found\");\n\t\t}\n//\t\tLOGGER.info(\"Successfully Retrieved\");\n\t\treturn new ResponseEntity<>(skillist,HttpStatus.OK);\n }",
"public java.lang.String getStudent_penalty() {\n\t\treturn _primarySchoolStudent.getStudent_penalty();\n\t}",
"public OutcomeDistribution predictOutcome(GameObserver gameObs) {\n initialize(gameObs);\n computeOutcomePrediction(gameObs);\n return predictedOutcome;\n }",
"public int getAttack() { return this.attack; }",
"public int attackRoll(){\r\n\t\treturn (int) (Math.random() * 100);\r\n\t}",
"public int getEquippedWeaponDamage() {\n return 0;\n }"
] | [
"0.7258827",
"0.65089107",
"0.6145518",
"0.6115789",
"0.6108448",
"0.6057829",
"0.6029606",
"0.59578097",
"0.5954527",
"0.5880226",
"0.58186686",
"0.5818",
"0.58016413",
"0.5777293",
"0.568844",
"0.5678911",
"0.5654353",
"0.56470865",
"0.5607549",
"0.557661",
"0.555536",
"0.5532024",
"0.54913294",
"0.54603827",
"0.5430082",
"0.542708",
"0.53600806",
"0.53330714",
"0.5317094",
"0.5313846",
"0.5313155",
"0.53027356",
"0.5286627",
"0.52862",
"0.528153",
"0.5253862",
"0.5247583",
"0.5239771",
"0.5237297",
"0.5236391",
"0.52325714",
"0.523064",
"0.52256477",
"0.5225317",
"0.52242446",
"0.52171504",
"0.5211905",
"0.52062404",
"0.5204127",
"0.5201213",
"0.5195733",
"0.51937056",
"0.519244",
"0.51885504",
"0.51864547",
"0.51683486",
"0.51664263",
"0.5153745",
"0.5150949",
"0.5119311",
"0.5119292",
"0.5117207",
"0.5115537",
"0.51131546",
"0.5108065",
"0.51062125",
"0.5104873",
"0.5088481",
"0.5075262",
"0.50750273",
"0.5054288",
"0.5050358",
"0.50429595",
"0.5037238",
"0.50331944",
"0.50316507",
"0.5025453",
"0.50248456",
"0.50202745",
"0.5008151",
"0.5007552",
"0.5006317",
"0.49893934",
"0.49883088",
"0.4985125",
"0.49841803",
"0.498",
"0.49779645",
"0.4977716",
"0.49729005",
"0.4972363",
"0.496955",
"0.4958839",
"0.4955436",
"0.49549896",
"0.4954841",
"0.49539945",
"0.4946444",
"0.49455142",
"0.49448612"
] | 0.6032171 | 6 |
Returns the full HP. | public double getPlayerFullHP(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getCurrentHP();",
"public int getHP() {\n\t\treturn HP;\n\t}",
"public double getHp() {\n return hp;\n }",
"public int getHp() {\n return hp;\n }",
"public int getHp() {\r\n return hp;\r\n }",
"public int getHp() {\n return hp;\n }",
"public int getHP()\n\t{\n\t\treturn iHP;\n\t\t\n\t}",
"public int getHp() \n\t{\n\t\treturn hp;\n\t}",
"public int getHP() {\r\n return currHP;\r\n }",
"public int getHP()\n\t{\n\t\tUnit u = this;\n\t\tint hp = 0;\n\t\tfor(Command c : u.race.unitcommands)\n\t\t\tif(c.command.equals(\"#hp\"))\n\t\t\t\thp += Integer.parseInt(c.args.get(0));\n\t\t\n\t\tfor(Command c : u.getSlot(\"basesprite\").commands)\n\t\t\tif(c.command.equals(\"#hp\"))\n\t\t\t{\n\t\t\t\tString arg = c.args.get(0);\n\t\t\t\tif(c.args.get(0).startsWith(\"+\"))\n\t\t\t\t\targ = arg.substring(1);\n\t\t\t\t\n\t\t\t\thp += Integer.parseInt(arg);\n\t\t\t}\n\t\t\n\t\tif(hp > 0)\n\t\t\treturn hp;\n\t\telse\n\t\t\treturn 10;\n\t}",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"public int getHp() {\n\t\treturn this.hp;\n\t}",
"public String getPokemonHP() {\n\t\treturn pokemon.getCurHP() + \"/\" + pokemon.getMaxHP();\n\t}",
"int getHPValue();",
"public int getCurrentHP() {\n return currentHP;\n }",
"public int getHp(){\r\n return hp;\r\n }",
"public int getHPValue() {\n return hPValue_;\n }",
"public int getHealth();",
"public byte getHp(){\n return hp;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"int getHealth();",
"public int getHPValue() {\n return hPValue_;\n }",
"public Integer getHealth();",
"public String showHp()\r\n {\r\n return \" \"+this.hp;\r\n }",
"int getMaxHP();",
"int getMaxHP();",
"int getMaxHP();",
"int getMaxHP();",
"int getMaxHP();",
"int getMaxHP();",
"int getMaxHP();",
"Float getHealth();",
"int getBonusHP();",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"public int getCurHP() {\n return curHP_;\n }",
"float getBonusPercentHP();",
"@Override\n\tpublic double getHealth() {\n\t\treturn 0;\n\t}",
"public int getHPPerSecond() {\n return hPPerSecond_;\n }",
"public int getHPPerSecond() {\n return hPPerSecond_;\n }",
"public double getHealth() {\r\n\t\treturn health;\r\n\t}",
"public int getHealthGain();",
"int getHPPerSecond();",
"public int getBaseHealth()\r\n {\r\n return mBaseHealth;\r\n }",
"public int getHealth()\r\n {\r\n return health;\r\n }",
"public float getHealth(){\n return health.getHealth();\n }",
"public int getHealth() {\n return getStat(health);\n }",
"@Override\r\n\tprotected double getHealth() \r\n\t{\r\n\t\treturn this._health;\r\n\t}",
"public int getHealth() {\n\t\treturn this.Health;\n\t}",
"float getPercentHealth();",
"public int getHealth()\r\n {\r\n return this.health;\r\n }",
"public int getHealth() {\n return this.health;\n }",
"public int getBonusHP() {\n return bonusHP_;\n }",
"public int getMaxHP() {\n return maxHP;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public double calculateHpPercent();",
"public static final int getMobHPBase() {\n try {\n final int x = p().sysInts[Int.MOB_HP_BASE.ordinal()].intValue();\n return (x <= 0) ? 11 : x;\n } catch (final Exception t) {\n return 11;\n }\n }",
"public float getHealth()\n {\n return health;\n }",
"public int getHealthCost();",
"@Override\r\n\tpublic int getHealth() {\n\t\treturn health;\r\n\t}",
"public int getHealth() {\r\n\t\treturn health;\r\n\t}",
"public float getHealth() {\n\t\treturn _health;\n\t}",
"public double getHealth() {\n return classData.getHealth(level);\n }",
"public float getBonusPercentHP() {\n return bonusPercentHP_;\n }",
"public int getBonusHP() {\n return bonusHP_;\n }",
"public int getHealth() {\n \t\treturn health;\n \t}",
"@Override\n public void hp(){\n HP=50*nivel;\n }",
"public int getCurrentHealth() {\r\n return currentHealth;\r\n }",
"public double getMaxHp() {\n return maxHp;\n }",
"public double getHealth() { return health; }",
"public int getHealth() {\n\t\treturn currentHealth;\n\t}",
"public int getHealth() { return this.health; }",
"public int getMaxHealth();",
"public int getCurrentHealth() {\n return currentHealth;\n }",
"public double getHealth(){\r\n return health;\r\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public int getMaxHP() {\n return maxHP_;\n }",
"public float getBonusPercentHP() {\n return bonusPercentHP_;\n }"
] | [
"0.7889993",
"0.78747404",
"0.7739067",
"0.7620524",
"0.7618287",
"0.76059234",
"0.75949657",
"0.7588848",
"0.7497314",
"0.74410635",
"0.7421068",
"0.7421068",
"0.7421068",
"0.7421068",
"0.7421068",
"0.7421068",
"0.7395837",
"0.7373338",
"0.7325178",
"0.7311519",
"0.72332835",
"0.71288705",
"0.7118505",
"0.70806265",
"0.7061568",
"0.7061568",
"0.706119",
"0.706119",
"0.7060675",
"0.7060675",
"0.706053",
"0.70594656",
"0.7047464",
"0.7027127",
"0.69803834",
"0.69803834",
"0.69803834",
"0.69803834",
"0.69803834",
"0.69803834",
"0.69803834",
"0.69668746",
"0.696257",
"0.6947449",
"0.6947449",
"0.6947449",
"0.69455343",
"0.69455343",
"0.69455343",
"0.6926568",
"0.690663",
"0.68972534",
"0.6869691",
"0.6867114",
"0.6861179",
"0.6853582",
"0.6839134",
"0.6816583",
"0.6810364",
"0.68075585",
"0.67984843",
"0.67876375",
"0.6785291",
"0.67851436",
"0.67784715",
"0.6770358",
"0.6761942",
"0.6757086",
"0.6757086",
"0.675617",
"0.675617",
"0.675617",
"0.6755895",
"0.67523366",
"0.67502815",
"0.67412496",
"0.67401934",
"0.67346656",
"0.66979176",
"0.66951853",
"0.6690418",
"0.6685722",
"0.6670658",
"0.66694576",
"0.6646124",
"0.6639021",
"0.6636848",
"0.6635572",
"0.66310185",
"0.6630685",
"0.6610464",
"0.6598174",
"0.65946954",
"0.6586853",
"0.6586853",
"0.6586853",
"0.65850824",
"0.65850824",
"0.65850824",
"0.65794957"
] | 0.7925886 | 0 |
Gets the recharge time on a skill | public int getSkillRechargeTime(Skills currentSkill); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRechargeTime(Skills skill, int time);",
"Double getRemainingTime();",
"public void setRechargeTime(int time)\n {\n\t rechargeTime = time;\n }",
"Expression getReaction_time_parm();",
"public int getRecitationTime(){\n\t\treturn this.recitationTime;\n\t}",
"public double getHoldTime();",
"public int getGrowthTime(){\n return this.growthTime;\n }",
"public long getTimeRemaining() {\n int timer = 180000; //3 minutes for the game in milliseconds\n long timeElapsed = System.currentTimeMillis() - startTime;\n long timeRemaining = timer - timeElapsed + bonusTime;\n long timeInSeconds = timeRemaining / 1000;\n long seconds = timeInSeconds % 60;\n long minutes = timeInSeconds / 60;\n if (seconds < 0 || minutes < 0) { //so negative numbers don't show\n seconds = 0;\n minutes = 0;\n }\n return timeInSeconds;\n }",
"public static long getTimeToNextLevel(final int skill, final int xpGainedPerHour) {\r\n\t\treturn getTimeToLevel(skill, Skills.getRealLevel(skill) + 1, xpGainedPerHour);\r\n\t}",
"@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}",
"public double getCBRTime();",
"public Date getRecTime() {\n return recTime;\n }",
"public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}",
"long getRetrievedTime();",
"public Date getNextChargeTime() {\n return nextChargeTime;\n }",
"public Date getLastChargeTime() {\n return lastChargeTime;\n }",
"public String getTotalTime() {\r\n if (recipe != null) {\r\n return readableTime(recipe.getCookTime() + recipe.getPrepTime());\r\n } else {\r\n return \"\";\r\n }\r\n }",
"Duration getRemainingTime();",
"public Date getPayTime() {\n return payTime;\n }",
"public Date getPayTime() {\n return payTime;\n }",
"int getRaceTime() {\r\n\t\tint pace = getPaceSeconds();\r\n\t\tRace selectedRace = (Race)raceBox.getSelectedItem();\r\n\t\tdouble raceLength = selectedRace.getLength();\r\n\t\t\r\n\t\tint totalTime = (int)(raceLength * pace);\r\n\t\treturn totalTime;\r\n\t}",
"public Date getRedeemedTime() {\n return redeemedTime;\n }",
"public double getTime() { return time; }",
"@Override\n public long getTimeNeeded() {\n return timeNeeded;\n }",
"hr.client.appuser.CouponCenter.TimeRange getUseTime();",
"hr.client.appuser.CouponCenter.TimeRange getUseTime();",
"public static long getTimeToLevel(final int skill, final int level, final int xpGainedPerHour) {\r\n\t\tif (xpGainedPerHour < 1) {\r\n\t\t\treturn 0L;\r\n\t\t}\r\n\t\treturn (long) (getExpToLevel(skill, level) * ONE_HOUR / xpGainedPerHour);\r\n\t}",
"long getTotalDoExamTime();",
"public Date getOprTime() {\n return oprTime;\n }",
"public double getTime() {\n return this.time;\n }",
"public Date getPaidTime() {\n return paidTime;\n }",
"public double getTime();",
"public static long getTimeToNextLevel(final int skill, final long runTime, final int xpGained) {\r\n\t\treturn getTimeToNextLevel(skill, Util.getPerHourValue(runTime, xpGained));\r\n\t}",
"protected String currentElapsedTimeExp(RomanticTransaction tx) {\n return tx.currentElapsedTimeExp();\n }",
"public double getRemainingTime()\n {\n return totalTime - scheduledTime;\n }",
"double getRelativeTime() {\n return relativeTime;\n }",
"int getChronicDelayTime();",
"public double getReward() {\n if (inGoalRegion()) {\n return REWARD_AT_GOAL;\n } else {\n return REWARD_PER_STEP;\n }\n }",
"public java.lang.String getActRtnTime () {\n\t\treturn actRtnTime;\n\t}",
"public double getTime()\n {\n long l = System.currentTimeMillis()-base;\n return l/1000.0;\n }",
"public double getTime() {return _time;}",
"public long getEventTime();",
"public long getTimeElapsed() {\r\n\t long now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pTrialTime + timePassedSinceLastUpdate;\r\n\t}",
"public String getReqTime() {\n return reqTime;\n }",
"public String getEstimatedRemainingTime() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return \"N/A\";\n \n long eta = d-(System.currentTimeMillis()-startTime);\n if(eta<=0) return \"N/A\";\n \n return Util.getTimeSpanString(eta);\n }",
"public int getAdditionalRunTime() {\n return additionalRunTime;\n }",
"BigInteger getResponse_time();",
"@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}",
"public int getTime() {\n return time;\n }",
"public int getTime() {\n return time;\n }",
"public int getTime() {\n return time;\n }",
"public Date getPaymentTime() {\n\t\treturn paymentTime;\n\t}",
"public int getTime() {\r\n return time;\r\n }",
"public abstract String getRegime();",
"public BigDecimal getRechargeMoney() {\n return rechargeMoney;\n }",
"public long age() {\n if (startTime == 0) {\n return 0;\n } else {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }\n }",
"public abstract Date getPreviousFireTime();",
"double getTime();",
"public Rational getStartTime ()\r\n {\r\n return startTime;\r\n }",
"public String getRegtime() {\n return regtime;\n }",
"public double getTimeRemaining() {\n\t\treturn (startingTime + duration) - System.currentTimeMillis();\n\t}",
"public TimeValue getAwardedProgramTime() {\n if (_timeAllocation == null) return new TimeValue(0, TimeValue.Units.hours);\n return TimeValue.millisecondsToTimeValue(_timeAllocation.getSum().getProgramAward().toMillis(), TimeValue.Units.hours);\n }",
"int getBurnDuration();",
"public int getTranTime()\n\t{\n\t\treturn tranTime;\n\t}",
"public double getReward() {\n return reward;\n }",
"public Date getReadTime() {\n\t\treturn readTime;\n\t}",
"public int getExtraTimeGiven()\r\n {\r\n return extraTimeGiven;\r\n }",
"public Date getResponsetime() {\n return responsetime;\n }",
"public Date getPrescriptiontime() {\n return prescriptiontime;\n }",
"public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}",
"public int getTime() {\n\t\treturn time;\n\t}",
"public int getTime() {\n\t\treturn time;\n\t}",
"public double getTime() { return duration; }",
"public long getTimerTime() {\n return timerTime;\n }",
"public int getTotalTime();",
"public long getTime() {\r\n \treturn time;\r\n }",
"public String getTime() {\n return this.time;\n }",
"public Date getReadTime() {\n return readTime;\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.PaymentDelay getPaymentDelay();",
"protected double getPay() {\n\t\tint extraHrs = 0;\n\t\tif (this.hoursWrkd > 40) {\n\t\t\textraHrs = this.hoursWrkd - 40;\n\t\t\treturn (hourlyRate * 40) + (extraHrs * (hourlyRate * 1.5));\n\t\t} else {\n\t\t\treturn hoursWrkd * hourlyRate;\n\t\t}\t\t\n\t}",
"public int getTime() { return _time; }",
"public Timer getTime() {\n\t\treturn time;\n\t}",
"public int getTime() {\n\n\t\treturn time;\n\t}",
"public Integer getDealingTime() {\r\n return dealingTime;\r\n }",
"public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"public double time()\n\t{\n\t\treturn _dblTime;\n\t}",
"@Override\n\t\tpublic final double time() throws Throwable {\n\t\t\tinit();\n\t\t\ttimer.lap();\n\t\t\ttimed();\n\t\t\tdouble time = timer.lap();\n\t\t\tcleanup();\n\t\t\treturn time;\n\t\t}",
"public Double getTime() {\n\t\treturn new Double((double) length * 36) / ((((double) speed) * 100));\n\t}",
"public double getRotRms() {\n\t\treturn 3600.0 * Math.sqrt(1000.0 * rotInt / (double) (updateTimeStamp - startTime));\n\t}",
"public Date getRptrecvtime() {\n return rptrecvtime;\n }",
"public Long getTime() {\n return time;\n }",
"public long getTime() {\n return time;\n }",
"public long getRegTime() {\n\t\t\treturn regTime;\n\t\t}",
"@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}",
"public Date getModifiyTime() {\n return modifiyTime;\n }",
"public Date getTrialTime() {\r\n\t\tlong now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pState == TimeState.Initialization\r\n\t ? new Date()\r\n\t : new Date(this.pTrialTime + timePassedSinceLastUpdate * this.pTrialTimeSpeed);\r\n\t}",
"public Integer getCraftTime(final ItemStack item, final int amount) {\n\n final int time = 0;\n\n return 0;\n}",
"public int readDisplay() {\n\t\treturn payStation.getTimeBoughtInMinutes();\n\t}",
"public String getTimer() {\n return timer;\n }"
] | [
"0.70548075",
"0.63025826",
"0.6253829",
"0.6240904",
"0.62404543",
"0.6208039",
"0.61208135",
"0.60257107",
"0.6024159",
"0.6003788",
"0.5990477",
"0.59890175",
"0.5975",
"0.59431076",
"0.593416",
"0.59070086",
"0.5904422",
"0.58833",
"0.58634317",
"0.58634317",
"0.5837457",
"0.5830321",
"0.5806686",
"0.58049077",
"0.5794683",
"0.5794683",
"0.57923687",
"0.57746845",
"0.5759013",
"0.5749147",
"0.5749104",
"0.5748957",
"0.5745961",
"0.57277656",
"0.5703989",
"0.56913793",
"0.5683886",
"0.5678513",
"0.56748426",
"0.5663533",
"0.5661468",
"0.5635782",
"0.5634603",
"0.56268895",
"0.56232667",
"0.562038",
"0.56200004",
"0.56172734",
"0.5596055",
"0.5596055",
"0.5596055",
"0.55844766",
"0.5582815",
"0.5581152",
"0.55689746",
"0.5568587",
"0.5548025",
"0.55477524",
"0.55388093",
"0.55385226",
"0.55373347",
"0.5532715",
"0.55287856",
"0.5527874",
"0.55269414",
"0.5522175",
"0.55146825",
"0.55111957",
"0.55110884",
"0.55068666",
"0.5506717",
"0.5506717",
"0.5505971",
"0.54959065",
"0.5491096",
"0.5490746",
"0.5486502",
"0.54854894",
"0.54845726",
"0.54801834",
"0.5479356",
"0.5478456",
"0.5477889",
"0.5476415",
"0.54757756",
"0.5475313",
"0.5475313",
"0.54742014",
"0.54726815",
"0.54716915",
"0.54712725",
"0.5467077",
"0.5462829",
"0.54616964",
"0.54605705",
"0.54563195",
"0.54561025",
"0.545202",
"0.54477465",
"0.54467374"
] | 0.86088926 | 0 |
Percentage of the current HP to the full HP | public double calculateHpPercent(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"float getPercentHealth();",
"float getBonusPercentHP();",
"int getPercentageHeated();",
"public double getPlayerFullHP();",
"public float getBonusPercentHP() {\n return bonusPercentHP_;\n }",
"public float getBonusPercentHP() {\n return bonusPercentHP_;\n }",
"int getCurrentHP();",
"Float getHealth();",
"public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }",
"public abstract double getPercentDead();",
"public int percent() {\n\t\tdouble meters = meters();\n\t\tif (meters < MIN_METERS) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn (int) (Math.pow((meters - MIN_METERS)\n\t\t\t\t/ (MAX_METERS - MIN_METERS) * Math.pow(100, CURVE),\n\t\t\t\t1.000d / CURVE));\n\t}",
"public double getHealthRelative() {\n\t\treturn getHealth() / (double) getMaxHealth();\n\t}",
"private void updateHealth() {\n float percentage = (float) game.getPlayerComponent().getHealth() / (float) game.getPlayerComponent().getMaxHealth(); //Possible placed in controller\n healthBar.setWidth(healthBarMaxWidth * percentage);\n }",
"public int getPercentage() {\r\n\r\n\t\treturn (getAmount() - offeredQuantity) / 100;\r\n\r\n\t}",
"int getBatteryPercentage();",
"@Override\n public double getAlcoholPercent() {\n return (getAlcoholVolume() / getVolume()) * 100.0;\n }",
"Float getFedAnimalsPercentage();",
"public double getPercent() { return this.percentage; }",
"public float getHealth(){\n return health.getHealth();\n }",
"java.lang.String getPercentage();",
"int getHPPerSecond();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"int getCurHP();",
"public double getHitsPercentual()\n\t{\n\t\t//Convert int to double values\n\t\tdouble doubleHits = hits;\n\t\tdouble doubleTotalProcessedStops = totalProcessedStops;\n\t\t\n\t\t//Hits percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (doubleHits / doubleTotalProcessedStops));\n\t}",
"public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}",
"public int getPercentage() {\r\n return Percentage;\r\n }",
"public float getPercent() {\n return percent;\n }",
"public int getHealthGain();",
"public double getOccupancyPercentage() throws SQLException {\n\t\tdouble result = (double) getOccupancy() / getMaxOccupancy() * 100;\n\t\tresult = Math.round (result * 100.0) / 100.0; \n\t\treturn result;\n\t}",
"public double getHeardPercentUS() {\n return heardPercentUS;\n }",
"public double getPercent() {\r\n\t\treturn percent;\r\n\t}",
"public double getHeardPercentOut() {\n return heardPercentOut;\n }",
"public double getMainPercentage(){return mainPercentage;}",
"@Override\n\tpublic double getHealth() {\n\t\treturn 0;\n\t}",
"int getHealth();",
"public void updateHp(double amount);",
"public Double getProgressPercent();",
"int getHPValue();",
"public double getHealth() {\r\n\t\treturn health;\r\n\t}",
"@Override\r\n\tprotected double getHealth() \r\n\t{\r\n\t\treturn this._health;\r\n\t}",
"public double getPercentage() {\n\t\treturn this.percentage;\n\t}",
"public double getHealth() { return health; }",
"public double getHp() {\n return hp;\n }",
"public float getHealth()\n {\n return health;\n }",
"@Override\n public void hp(){\n HP=50*nivel;\n }",
"public int healHealthFraction(double fraction) {\n return heal((int)Math.max(this.getMaxHP()*fraction, 1));\n }",
"public int getHealth();",
"double getChangePercent() {\n\t return 100 - (currentPrice * 100 / previousClosingPrice);\n\t }",
"public void getHitPercent(double hitPer) {\r\n\t\thitPercent = hitPer;\r\n\t}",
"public double getHealth(){\r\n return health;\r\n }",
"public double getHeardPercentEng() {\n return heardPercentEng;\n }",
"private double calcScorePercent() {\n\t\tdouble adjustedLab = totalPP * labWeight;\n\t\tdouble adjustedProj = totalPP * projWeight;\n\t\tdouble adjustedExam = totalPP * examWeight;\n\t\tdouble adjustedCodeLab = totalPP * codeLabWeight;\n\t\tdouble adjustedFinal = totalPP * finalWeight;\n\n\t\tlabScore = (labScore / labPP) * adjustedLab;\n\t\tprojScore = (projScore / projPP) * adjustedProj;\n\t\texamScore = (examScore / examPP) * adjustedExam;\n\t\tcodeLabScore = (codeLabScore / codeLabPP) * adjustedCodeLab;\n\t\tfinalExamScore = (finalExamScore / finalExamPP) * adjustedFinal;\n\n//\t\tdouble labPercent = labScore / adjustedLab;\n//\t\tdouble projPercent = projScore / adjustedProj;\n//\t\tdouble examPercent = examScore / adjustedExam;\n//\t\tdouble codeLabPercent = codeLabScore / adjustedCodeLab;\n//\t\tdouble finalPercent = finalExamScore / adjustedFinal;\n\n\t\tdouble totalPercent = (labScore + projScore + examScore + codeLabScore + finalExamScore) / totalPP;\n\t\t\n\t\tscorePercent = totalPercent;\n\t\t\n\t\treturn totalPercent;\n\t}",
"public int getHP() {\r\n return currHP;\r\n }",
"public String getPokemonHP() {\n\t\treturn pokemon.getCurHP() + \"/\" + pokemon.getMaxHP();\n\t}",
"public int getHP()\n\t{\n\t\tUnit u = this;\n\t\tint hp = 0;\n\t\tfor(Command c : u.race.unitcommands)\n\t\t\tif(c.command.equals(\"#hp\"))\n\t\t\t\thp += Integer.parseInt(c.args.get(0));\n\t\t\n\t\tfor(Command c : u.getSlot(\"basesprite\").commands)\n\t\t\tif(c.command.equals(\"#hp\"))\n\t\t\t{\n\t\t\t\tString arg = c.args.get(0);\n\t\t\t\tif(c.args.get(0).startsWith(\"+\"))\n\t\t\t\t\targ = arg.substring(1);\n\t\t\t\t\n\t\t\t\thp += Integer.parseInt(arg);\n\t\t\t}\n\t\t\n\t\tif(hp > 0)\n\t\t\treturn hp;\n\t\telse\n\t\t\treturn 10;\n\t}",
"public BigDecimal getPercentageProfitPStd();",
"public int getHealth() {\n return getStat(health);\n }",
"public double getPercentRem(long used){\n long left = freeSpace - used;\n return ((double)left / (double)totalSpace) * 100d;\n }",
"public void percentualGordura(){\n\n s0 = 4.95 / denscorp;\n s1 = s0 - 4.50;\n percentgord = s1 * 100;\n\n }",
"public int getHealthCost();",
"public double getHealth() {\n return classData.getHealth(level);\n }",
"public int getOverallProgressPercent() {\n return overallProgressPercent;\n }",
"public int getCurrentHealth() {\r\n return currentHealth;\r\n }",
"public void update() {\n remHpWidth = healthbarWidth * ent.getCurrentHealth() / ent.getMaxHealth();\n lostHpWidth = healthbarWidth - remHpWidth;\n }",
"public double usagePercentage() {\n return 1.0 * (this.rectangleCount() - 1) / (this.M * this.nodeCount()); // -1 in order to ignore de root\n }",
"public void heal()\n {\n\tif (potions <= 0) {\n\t System.out.println(\"Out of potions. :(\");\n\t}\n\telse {\n\t HP += 1300/4;\n\t if (HP > 1300 ){\n\t\tHP = 1300;\n\t }\n System.out.println(\"Your HP is now \" + HP + \".\");\n\t potions -= 1;\n\t}\n }",
"public float getHealth() {\n\t\treturn _health;\n\t}",
"protected double getHPS() {\n\t\t\treturn this.getHealing() / this.castPeriod;\n\t\t}",
"public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }",
"boolean hasBonusPercentHP();",
"double getpercentage() {\n return this.percentage;\n }",
"public int getCurrentHP() {\n return currentHP;\n }",
"public int getBaseHealth()\r\n {\r\n return mBaseHealth;\r\n }",
"public int getCurrentHealth() {\n return currentHealth;\n }",
"public float PercentPL() {\n\t\tif (!isClosed()) {\r\n\t\t\tSystem.err.println(\"Cannot compute PL if trade is on\");\r\n\t\t\treturn -1f;\r\n\t\t}\r\n\t\tif(dir == Direction.LONG) {//If long\r\n\t\t\t//(Sell price - Buy price) / Buy price * 100\r\n\t\t\treturn ((exitPrice - entryPrice)/entryPrice)*100;\r\n\t\t}\r\n\t\t//If short\r\n\t\t//(Sell price - Buy price) / Sell price * 100\r\n\t\treturn ((entryPrice - exitPrice)/entryPrice)*100;\r\n\t}",
"public double getHonesty(){\n\t\treturn (this.pct_honest);\n\t}",
"protected float getHealthPoint() {\n\t\treturn healthPoint;\n\t}",
"public double mean(){\n return StdStats.mean(percentage);\n }",
"public int getHealth() {\n\t\treturn currentHealth;\n\t}",
"public float getProgressPct() {\n return (float) currentCompactedKVs / getTotalCompactingKVs();\n }",
"public Integer getMinHealthyPercentage() {\n return this.minHealthyPercentage;\n }",
"public Number getPercentage() {\n return (Number) getAttributeInternal(PERCENTAGE);\n }",
"private void updateBonusStats(double percentage) {\n baseStats.setHealth((int) (baseStats.getHealth() * percentage));\n baseStats.setStrength((int) (baseStats.getStrength() * percentage));\n baseStats.setDexterity((int) (baseStats.getDexterity() * percentage));\n baseStats.setIntelligence((int) (baseStats.getIntelligence() * percentage));\n }",
"public BigDecimal getUsagePercentage() {\n return this.usagePercentage;\n }",
"public static String percentBar(double hpPercent) {\r\n\t\tif (hpPercent > 0 && hpPercent <= 5) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"|\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||||||||||\";\r\n\t\t} else if (hpPercent > 5 && hpPercent <= 10) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||||||||||\";\r\n\t\t} else if (hpPercent > 10 && hpPercent <= 15) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"|||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||||||||\";\r\n\t\t} else if (hpPercent > 15 && hpPercent <= 20) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||||||||\";\r\n\t\t} else if (hpPercent > 20 && hpPercent <= 25) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"|||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||||||\";\r\n\t\t} else if (hpPercent > 25 && hpPercent <= 30) {\r\n\t\t\treturn ChatColor.RED + \"\" + ChatColor.BOLD + \"||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||||||\";\r\n\t\t} else if (hpPercent > 30 && hpPercent <= 35) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"|||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||||\";\r\n\t\t} else if (hpPercent > 35 && hpPercent <= 40) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||||\";\r\n\t\t} else if (hpPercent > 40 && hpPercent <= 45) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"|||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||||\";\r\n\t\t} else if (hpPercent > 45 && hpPercent <= 50) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||||\";\r\n\t\t} else if (hpPercent > 50 && hpPercent <= 55) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"|||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||||\";\r\n\t\t} else if (hpPercent > 55 && hpPercent <= 60) {\r\n\t\t\treturn ChatColor.YELLOW + \"\" + ChatColor.BOLD + \"||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||||\";\r\n\t\t} else if (hpPercent > 60 && hpPercent <= 65) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"|||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||||\";\r\n\t\t} else if (hpPercent > 65 && hpPercent <= 70) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||||\";\r\n\t\t} else if (hpPercent > 70 && hpPercent <= 75) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"|||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||||\";\r\n\t\t} else if (hpPercent > 75 && hpPercent <= 80) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||||\";\r\n\t\t} else if (hpPercent > 80 && hpPercent <= 85) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"|||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|||\";\r\n\t\t} else if (hpPercent > 85 && hpPercent <= 90) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"||||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||\";\r\n\t\t} else if (hpPercent > 90 && hpPercent <= 95) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"||||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"||\";\r\n\t\t} else if (hpPercent > 95 && hpPercent <= 100) {\r\n\t\t\treturn ChatColor.GREEN + \"\" + ChatColor.BOLD + \"|||||||||||||||||||\" + ChatColor.GRAY + ChatColor.BOLD + \"|\";\r\n\t\t} else {\r\n\t\t\treturn ChatColor.GRAY + \"\" + ChatColor.BOLD + \"||||||||||||||||||||\";\r\n\t\t}\r\n\t}",
"public float getPercentage() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn percentage;\r\n\t}",
"public Integer getHealth();",
"public int getHP() {\n\t\treturn HP;\n\t}",
"public int getHealth()\r\n {\r\n return health;\r\n }",
"public void setActualHP(int hp) { this.actualHP = Math.max(0, hp); }",
"int getBonusHP();",
"public double getCurrentHealth() {\n return ((Growable)delegate).currentHealth;\n }",
"public int getHPPerSecond() {\n return hPPerSecond_;\n }",
"double redPercentage();",
"public double getHeardPercentSports() {\n return heardPercentSports;\n }",
"@Override\n public double calculatePercentageExtra() {\n double percentageExtra = 0;\n \n percentageExtra += getTwoColourCost();\n \n if(getChemicalResistance()) {\n percentageExtra += getChemicalResistanceCost();\n }\n \n return percentageExtra;\n }"
] | [
"0.8109346",
"0.78975004",
"0.7350045",
"0.7304546",
"0.7130172",
"0.7044135",
"0.6986348",
"0.69757783",
"0.6974524",
"0.69273996",
"0.68993616",
"0.68758684",
"0.68679184",
"0.68619895",
"0.68543684",
"0.68409985",
"0.6795609",
"0.6760471",
"0.6749291",
"0.67429",
"0.6733781",
"0.67058575",
"0.67058575",
"0.67058575",
"0.67058575",
"0.67058575",
"0.67058575",
"0.67049325",
"0.66895396",
"0.66696954",
"0.6660733",
"0.66549915",
"0.6650983",
"0.66390866",
"0.6601261",
"0.6561248",
"0.6559751",
"0.6540857",
"0.6532551",
"0.6527617",
"0.6520559",
"0.65121233",
"0.6508462",
"0.6502785",
"0.64944357",
"0.6482223",
"0.6477434",
"0.6461884",
"0.6461771",
"0.64531124",
"0.6450005",
"0.64320356",
"0.6427167",
"0.6426946",
"0.64260244",
"0.64104384",
"0.64027995",
"0.63884956",
"0.6381572",
"0.6372375",
"0.6366058",
"0.6365702",
"0.63637656",
"0.63619816",
"0.6361278",
"0.63605666",
"0.63564646",
"0.63510245",
"0.63385004",
"0.63382024",
"0.633792",
"0.6327859",
"0.6325404",
"0.63134754",
"0.63120544",
"0.63106143",
"0.63055074",
"0.6305402",
"0.6299558",
"0.62994325",
"0.6292608",
"0.62843907",
"0.6278159",
"0.62756413",
"0.6275058",
"0.625348",
"0.6244122",
"0.6243185",
"0.62336904",
"0.62329143",
"0.6231978",
"0.62228644",
"0.6218658",
"0.6217236",
"0.62165093",
"0.6210162",
"0.6204727",
"0.62025064",
"0.61941206",
"0.61877155"
] | 0.84321505 | 0 |
Sets the recharge time for a specific skill to a specific recharge time | public void setRechargeTime(Skills skill, int time); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRechargeTime(int time)\n {\n\t rechargeTime = time;\n }",
"public int getSkillRechargeTime(Skills currentSkill);",
"public void setRedeemedTime(Date redeemedTime) {\n this.redeemedTime = redeemedTime;\n }",
"public void setTime(Time time) {\n this.time = time; // assigns the time argument value to the time attribute\n }",
"public void setRecTime(Date recTime) {\n this.recTime = recTime;\n }",
"void setTime(final int time);",
"public void setModifiyTime(Date modifiyTime) {\n this.modifiyTime = modifiyTime;\n }",
"public void setResponsetime(Date responsetime) {\n this.responsetime = responsetime;\n }",
"public void setRequesttime(Date requesttime) {\n this.requesttime = requesttime;\n }",
"public void setTime(int time) {\n\n\t\tthis.time = time;\n\t}",
"public void setTime(int time) {\n\t\tthis.time = time;\n\t}",
"public void setPrescriptiontime(Date prescriptiontime) {\n this.prescriptiontime = prescriptiontime;\n }",
"public void setModifytime(Date modifytime) {\n this.modifytime = modifytime;\n }",
"public void setTime(int time) {\r\n\t\tthis.time = time;\r\n\t\tupdate();\r\n\t}",
"public void pickRecitationTime(int start){\n\t\tthis.recitationTime = start;\n\t}",
"public void decrementRechargeTimes();",
"public void setRegtime(Date regtime) {\n this.regtime = regtime;\n }",
"public final void setResponseTime(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Integer responsetime)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.ResponseTime.toString(), responsetime);\r\n\t}",
"public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }",
"public void setTime(){\n Date currentDate = new Date();\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putLong(\"WAIT_TIME\", currentDate.getTime() + 1800000); //30 min\n editor.commit();\n }",
"public void setTime(Date time) {\n\t\tthis.time = time;\n\t}",
"public void setTime(Date time) {\r\n\t\tthis.time = time;\r\n\t}",
"public void setPaidTime(Date paidTime) {\n this.paidTime = paidTime;\n }",
"void setReportTime(long time);",
"public void setTime(int t){\r\n\t\t\t\ttime = t;\r\n\t\t\t}",
"public void setRegtime(Date regtime) {\r\n\t\tthis.regtime = regtime;\r\n\t}",
"public void setTime(Date time) {\n this.time = time;\n }",
"public void setTime(Date time) {\n this.time = time;\n }",
"public void setTime(Date time) {\n this.time = time;\n }",
"public void setTime(Date time) {\n this.time = time;\n }",
"public void setTime(Date time) {\r\n this.time = time;\r\n }",
"public void setTime(Date time) {\r\n this.time = time;\r\n }",
"public void setTime(Date time) {\r\n this.time = time;\r\n }",
"public edu.pa.Rat.Builder setTime(int value) {\n validate(fields()[0], value);\n this.time = value;\n fieldSetFlags()[0] = true;\n return this; \n }",
"public void setTime(double time) {_time = time;}",
"public void setTime(double minutes) {\n\t\t// implement this method.\n\n\t}",
"public void setTime( Date time ) {\n this.time = time;\n }",
"void setRecurrenceDuration(int recurrenceDuration);",
"public void updateTime(int time)\n\t{\n\t\tshotsRemaining = rateOfFire;\n\t}",
"public void setTime(gov.ucore.ucore._2_0.TimeType time)\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().find_element_user(TIME$2, 0);\n if (target == null)\n {\n target = (gov.ucore.ucore._2_0.TimeType)get_store().add_element_user(TIME$2);\n }\n target.set(time);\n }\n }",
"public void setTime(long elapseTime) {\r\n\t\tsecond = (elapseTime / 1000) % 60;\r\n\t\tminute = (elapseTime / 1000) / 60 % 60;\r\n\t\thour = ((elapseTime / 1000) / 3600) % 24;\t\r\n\t}",
"public void setTime(long time)\n {\n this.time = time;\n\n }",
"public void setTime(long time) {\r\n\t\tthis.time = time;\r\n\t}",
"public void xsetRequestedTime(org.apache.xmlbeans.XmlDateTime requestedTime)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDateTime target = null;\n target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(REQUESTEDTIME$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(REQUESTEDTIME$2);\n }\n target.set(requestedTime);\n }\n }",
"public void setTime(Date time) {\n this.time = new Date(time.getTime());\n }",
"public final void setResponseTime(java.lang.Integer responsetime)\r\n\t{\r\n\t\tsetResponseTime(getContext(), responsetime);\r\n\t}",
"public void setTime(long time) {\r\n this.time = time;\r\n }",
"public void setTime(long time) {\n this.time = time;\n }",
"public void setClaimer(int claimer) {\n this.claimer = claimer;\n }",
"public void setSettleTime(Date settleTime) {\n this.settleTime = settleTime;\n }",
"public final void setTime(final Date newTime) {\n this.time = newTime;\n }",
"public void setTime(){\r\n \r\n }",
"public void setPayTime(Date payTime) {\n this.payTime = payTime;\n }",
"public void setPayTime(Date payTime) {\n this.payTime = payTime;\n }",
"public void setProvisionTime(java.util.Calendar param){\n localProvisionTimeTracker = true;\n \n this.localProvisionTime=param;\n \n\n }",
"public void setTime(int time)\n {\n this.time = time;\n start = time;\n end = time;\n }",
"public void setTime(Date date) {\r\n\t\tthis.wecker = date;\r\n\t}",
"@Override\r\n\tpublic void setMyTime(MyTime myTime) {\n\t\t\r\n\t}",
"public void setTranTime(int time)\n\t{\n\t\tthis.tranTime = time;\n\t}",
"public void setNextChargeTime(Date nextChargeTime) {\n this.nextChargeTime = nextChargeTime;\n }",
"public void setTime(String time) {\n }",
"public void setModifiTime(Date modifiTime) {\n this.modifiTime = modifiTime;\n }",
"public void setTime(String time) {\r\n\t\tthis.time = time;\r\n\t}",
"public void setModifytime(String modifytime) {\n this.modifytime = modifytime;\n }",
"public void setRegtime(String regtime) {\n this.regtime = regtime;\n }",
"public void setTime(long time,int ento){ \r\n\t}",
"@Override\n\tpublic void setTime(String time) {\n\t\tthis.time = time;\n\t}",
"public void setModifyTime(Date modifyTime) {\r\n this.modifyTime = modifyTime;\r\n }",
"public void setTime(long time) {\r\n this.time.setTime(time);\r\n }",
"public void setRepairTime(Date repairTime) {\n this.repairTime = repairTime;\n }",
"public static int setIrrigTime(String time) {\n\t\tString path = SET_IRRIG_TIME + time;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return 400;\n\t\treturn response.statusCode();\n\t}",
"public void setStartTime (Rational startTime)\r\n {\r\n // Already done?\r\n if (this.startTime == null) {\r\n logger.debug(\"setStartTime {} for chord #{}\", startTime, getId());\r\n\r\n this.startTime = startTime;\r\n//\r\n// // Set the same info in containing slot if any\r\n// if (slot != null) {\r\n// slot.setStartTime(startTime);\r\n// }\r\n } else {\r\n if (!this.startTime.equals(startTime)) {\r\n addError(\r\n \"Reassigning startTime from \" + this.startTime + \" to \"\r\n + startTime + \" in \" + this);\r\n }\r\n }\r\n }",
"public void setCreatTime(Date creatTime) {\n this.creatTime = creatTime;\n }",
"public void setCreatTime(Date creatTime) {\n this.creatTime = creatTime;\n }",
"public void setModifyTime(Date modifyTime) {\n this.modifyTime = modifyTime;\n }",
"public void setModifyTime(Date modifyTime) {\n this.modifyTime = modifyTime;\n }",
"public void setModifyTime(Date modifyTime) {\n this.modifyTime = modifyTime;\n }",
"public void setModifyTime(Date modifyTime) {\n this.modifyTime = modifyTime;\n }",
"public void setModifyTime(Date modifyTime) {\n this.modifyTime = modifyTime;\n }",
"public void setModifyTime(Date modifyTime) {\n this.modifyTime = modifyTime;\n }",
"public void setModifyTime(Date modifyTime) {\n this.modifyTime = modifyTime;\n }",
"public void setModifyTime(Date modifyTime) {\n this.modifyTime = modifyTime;\n }",
"public void setModifyTime(Date modifyTime) {\n this.modifyTime = modifyTime;\n }",
"public void setTime(String time) {\n this.time = time;\n }",
"public void setTime(String time) {\n\t\tthis.time = time;\n\t}",
"private MadisRecord setRecordTime(MadisRecord rec) {\n try {\n rec.setDataTime(new DataTime(rec.getTimeObs()));\n return rec;\n } catch (Exception e) {\n statusHandler.handle(Priority.ERROR, \"Can't set Madis Record URI! \"\n + rec.getStationId(), e);\n }\n\n return null;\n }",
"void setRetrievedTime(long retrievedTime);",
"public void setOprTime(Date oprTime) {\n this.oprTime = oprTime;\n }",
"public void setAlarm(Context context, int pk, long time, int Hora, int Minuto) {\n\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n calendar.set(Calendar.HOUR_OF_DAY, Hora);\n calendar.set(Calendar.MINUTE, Minuto);\n\n\n //Se crea la hora correcta para el sistema\n long newTime = 1000 * 60 * 60 * time;\n AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n Intent alarmIntent = new Intent(context, AlarmReceiver.class);\n alarmIntent.putExtra(\"alarma\", pk);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, pk, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), newTime, pendingIntent);\n\n\n\n }",
"public void setDealingTime(Date dealingTime)\n/* */ {\n/* 171 */ this.dealingTime = dealingTime;\n/* */ }",
"public void setMinute(int r1) throws java.lang.IllegalArgumentException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: gov.nist.javax.sip.header.SIPDate.setMinute(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.setMinute(int):void\");\n }",
"public void setRequestedTime(java.util.Calendar requestedTime)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REQUESTEDTIME$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REQUESTEDTIME$2);\n }\n target.setCalendarValue(requestedTime);\n }\n }",
"void setExposureTimePref(long exposure_time);",
"public void setExamIDAndTimer(String examID, String examDuration) {\n\t\tthis.examID = examID;\n\t\tminutes = Integer.parseInt(examDuration);\n\t\twhile (minutes >= 60) {\n\t\t\thours++;\n\t\t\tminutes -= 60;\n\t\t}\n\t}",
"Expression getReaction_time_parm();",
"public final void setExpiryTime(long expire) {\n\t\tm_tmo = expire;\n\t}",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }",
"public void setTime(Long time) {\n this.time = time;\n }",
"public void setWishPaymentTime(Date wishPaymentTime) {\n this.wishPaymentTime = wishPaymentTime;\n }"
] | [
"0.7727199",
"0.6464453",
"0.5993698",
"0.5873295",
"0.58728194",
"0.58591104",
"0.58542335",
"0.584353",
"0.57527876",
"0.57338923",
"0.57271826",
"0.5707319",
"0.5697807",
"0.56974924",
"0.569731",
"0.56692016",
"0.56339103",
"0.55923605",
"0.55923426",
"0.55858135",
"0.5582657",
"0.55695873",
"0.555813",
"0.55532265",
"0.5553151",
"0.5548092",
"0.5546726",
"0.5546726",
"0.5546726",
"0.5546726",
"0.5544926",
"0.5544926",
"0.5544926",
"0.55363715",
"0.5532359",
"0.5529737",
"0.5527347",
"0.5515696",
"0.55089045",
"0.5505167",
"0.55049825",
"0.5504369",
"0.5503622",
"0.54878575",
"0.54875016",
"0.5485952",
"0.5484745",
"0.5483349",
"0.5479062",
"0.543767",
"0.543404",
"0.54319143",
"0.5423797",
"0.5423797",
"0.5405888",
"0.5384154",
"0.5361546",
"0.535996",
"0.5354935",
"0.535328",
"0.53431225",
"0.53233844",
"0.5305234",
"0.5305199",
"0.530494",
"0.5303744",
"0.5290417",
"0.5288329",
"0.5283177",
"0.5278981",
"0.5276625",
"0.52735436",
"0.5272269",
"0.5272269",
"0.5268322",
"0.5268322",
"0.5268322",
"0.5268322",
"0.5268322",
"0.5268322",
"0.5268322",
"0.5268322",
"0.5268322",
"0.5266166",
"0.526313",
"0.52575743",
"0.5244",
"0.52299285",
"0.5228422",
"0.5225926",
"0.52151716",
"0.5213034",
"0.52019",
"0.5199203",
"0.51963353",
"0.5191009",
"0.51812744",
"0.51812744",
"0.5178108",
"0.5177743"
] | 0.8936087 | 0 |
Decrement the recharge times of all skills in the list | public void decrementRechargeTimes(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void decrementOpponentRechargeTimes()\n\t{\n\t\tfor (Map.Entry<Skills, Integer> pair : rechargingOpponentSkills.entrySet())\n\t\t{\n\t\t\tint val = pair.getValue();\n\t\t\tSkills s = pair.getKey();\n\t\t\t\n\t\t\tif (val > 0)\n\t\t\t{\n\t\t\t\trechargingOpponentSkills.put(s, --val);\n\t\t\t}\n\t\t}\n\t}",
"public void setRechargeTime(Skills skill, int time);",
"public int getSkillRechargeTime(Skills currentSkill);",
"public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}",
"public final void decreaseLives() {\n\t\tlives--;\n\t}",
"public void resetSkills()\r\n\t{\r\n\t\t// TODO Keep Skill List upto date\r\n\t\tfarming = 0;\r\n\t}",
"public void decrementStunCountdown()\n {\n addStunCountdown(-1);\n }",
"void decrease();",
"void decrease();",
"public void decreaseKarma(final int i) {\n final boolean flagChanged = karma > 0;\n karma -= i;\n if (karma <= 0) {\n karma = 0;\n updateKarma(flagChanged);\n } else {\n updateKarma(false);\n }\n }",
"public void decrement() {\n items--;\n }",
"public void decrementTotalScore(){\n totalScore -= 1;\n }",
"public void decrease() {\r\n --lives;\r\n }",
"public static void decreaseDifficaulty() {\r\n\t\tif (Enemy._timerTicker < 70)\r\n\t\t\tEnemy._timerTicker += 3;\r\n\t\tif (Player._timerTicker > 4)\r\n\t\t\tPlayer._timerTicker -= 2;\r\n\t}",
"public void updatePatience(){\n Patience = Patience - 1;\n }",
"public void decrement() {\r\n\t\tcurrentSheeps--;\r\n\t}",
"public void decreaseLife() {\n this.terminate();\n }",
"public void RemoveCredits(long credits)\n {\n this.credits -= credits;\n }",
"public void removeSkills()\r\n\t{\r\n\t\tremove(skillOne);\r\n\t\tremove(skillTwo);\r\n\t\tremove(skillThree);\r\n\t\tremove(skillFour);\r\n\t\tremove(skillFive);\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public void decrementNumberOfBoats() {\n\t\tnumOfBoats--;\n\t}",
"protected void decrementEffectDurations()\n\t{\n\t\tfor(int i = 0; i < effects.length; i++)\n\t\t{\n\t\t\tif(effects[i] != null)\n\t\t\t{\n\t\t\t\teffects[i].decrementDuration();\n\t\t\t\t\n\t\t\t\tif(effects[i].getDuration() == 0)\n\t\t\t\t{\n\t\t\t\t\t// TODO: Destroy Effect object\n\n\t\t\t\t\t// Remove object from effects array\n\t\t\t\t\teffects[i] = null;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void unlockSkill() {\n int i = 0;\n while (skills.get(i).isUnlocked()) {\n i = i + 1;\n }\n skills.get(i).unlock();\n }",
"public void terminate(Payroll pr){\n while(!pr.getList().isEmpty()){\n payroll.remove(pr.getList().removeFirst());\n }\n }",
"void decrementTick();",
"public void decrementLifePoints(double amount) {\r\n lifepoints -= amount;\r\n if (lifepoints < 0) {\r\n lifepoints = 0;\r\n }\r\n if (entity instanceof Player) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, HITPOINTS));\r\n }\r\n }",
"public void decrement(View view){\n if(quantity == 1) {\n Toast t = Toast.makeText(this, \"You cannot order 0 coffees\", Toast.LENGTH_LONG);\n t.show();\n return;\n }//could be error if ever set not to a positive number\n\n quantity = quantity - 1;\n displayQuantity(quantity);\n }",
"void unsetRaceList();",
"void unsetRecurrenceDuration();",
"@Override\r\n\tpublic void decreaseAmount(ResourceType resource) {\n\t\t\r\n\t}",
"private void revertMortgage(ArrayList<PropertyCard> cards) {\n\t\tfor(PropertyCard c: cards) {\n\t\t\tc.outOfMortgage();\n\t\t}\n\t}",
"public void decrementLives() {\n lives--;\n switch (lives) {\n case 0:\n System.out.println(\"You Have Lost\");\n System.exit(0);\n case 1:\n System.out.println(\"You have: \" + lives + \" life left\");\n break; \n default:\n System.out.println(\"You have: \" + lives + \" lives left\");\n break;\n }\n }",
"public abstract void decrement(int delta);",
"private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }",
"void unsetCapitalPayed();",
"public void decrementAmount() {\n this.amount--;\n amountSold++;\n }",
"public void decrease() {\r\n\r\n\t\tdecrease(1);\r\n\r\n\t}",
"public void takeLife()\n\t{\n\t\tlives --;\n\t}",
"public void decrementVictoryPoints() {\n\t\tthis.totalVictoryPoints++;\n\t}",
"public void decreaseRemainingPausesCount() {\r\n remainingPausesCount--;\r\n }",
"boolean decrementPlannedInstances();",
"public void decrement() {\n\t\tnumber--;\n\t}",
"public void subLife() {lives--;}",
"public void decrement() {\n sync.decrement();\n }",
"void unsetAppliesPeriod();",
"public void endTurn() {\n for (BattleEffect btlEff : effectsToRemove) {\n if (btlEff.getTurnsRemaining() == 0) {\n btlEff.remove();\n effectsToApply.remove(btlEff);\n } else {\n btlEff.decrementTurnsRemaining();\n }\n }\n }",
"public void pulse() {\r\n if (lifepoints < 1) {\r\n return;\r\n }\r\n for (SkillRestoration aRestoration : restoration) {\r\n if (aRestoration != null) {\r\n aRestoration.restore(entity);\r\n }\r\n }\r\n }",
"public void timeToRunDec()\n\t{\n\t\tthis.time_to_run -- ;\n\t}",
"private void subtractPlayerMissile() {\n this.playerMissile -= 1;\n }",
"protected void decrementTime() {\n this.currTimeProgressValue-=2;\n this.pbarTime.setValue(this.currTimeProgressValue);\n setTimeCaption();\n }",
"public void removeRemaining( int index )\n\t{\n\t\t_avTable.rm( ATTR_REMAINING , index ) ;\n\t}",
"public void decrement (View view) {\n if(quantity==0) {\n Toast.makeText(this, \"You cannot have less than 1 cup of coffee\", Toast.LENGTH_SHORT).show();\n return;\n }\n quantity = quantity - 1;\n displayQuantity(quantity);\n }",
"private void decrementCounter()\r\n\t{\r\n\t\tthis.counter--;\r\n\t}",
"public void decrement(){\n if (value >0) {\n value -= 1;\n }\n }",
"public void lostLife(){\r\n\t\tthis.lives--;\r\n\t}",
"private void resetCooldown() {\n nextAttack = tower.getFireFrequency();\n }",
"public void decrementTotal(){\n total--;\n }",
"void decreaseScore(){\n\t\tcurrentScore = currentScore - 10;\n\t\tcom.triviagame.Trivia_Game.finalScore = currentScore;\n\t}",
"public void pruneCooldowns() {\n HashMap<String, Long> cooldownsTempList = new HashMap<>();\n cooldownsList.keySet().forEach(key -> {\n long timeRemaining = cooldownDuration - (System.currentTimeMillis() - cooldownsList.get(key));\n if(timeRemaining > 0) {\n cooldownsTempList.put(key, cooldownsList.get(key));\n }\n });\n cooldownsList.clear();\n cooldownsList.putAll(cooldownsTempList);\n }",
"public void decrease(int number) {\r\n this.count -= number;\r\n }",
"public void decrease(int number) {\r\n this.count -= number;\r\n }",
"public void dispersePayout(Room room){\n \n Dice d = new Dice();\n ArrayList<Integer> payoutVals = d.rollPayout(room.getSceneCard().getSceneBudget());\n \n ArrayList<Player> players = room.getOccupants();\n \n ArrayList<Role> roles = room.getSceneCard().getRoles();\n ArrayList<Integer> ranks = new ArrayList<Integer>();\n \n for(Role r : roles){\n ranks.add(r.getRank());\n }\n \n Collections.sort(ranks);\n Collections.reverse(ranks);\n \n //loop through roles and pay respective players\n for(int i = 0; i < payoutVals.size(); i++){\n int roleRank = ranks.get(i % ranks.size()); \n \n for(Player p : players){\n if(p.getCurrentRole() != null){\n if(p.getCurrentRole().isOnCard() && p.getCurrentRole().getRank() == roleRank){\n p.addMoney(payoutVals.get(i));\n }\n }\n \n \n }\n }\n for(Player p : players){\n if(p.getCurrentRole() != null){\n if(!(p.getCurrentRole().isOnCard())){\n p.addMoney(p.getCurrentRole().getRank());\n }\n }\n \n }\n }",
"@Test\n public void decrementNumberOfRounds() {\n int decrementedNumberOfRounds = TimeValuesHelper.decrementValue(\"1\");\n Assert.assertEquals(0, decrementedNumberOfRounds);\n }",
"public void letTimePass(int numHours) throws IllegalArgumentException{\r\n if(numHours < 0){\r\n throw new IllegalArgumentException(\"The number of hours to decrease is non-negative\");\r\n }\r\n else{\r\n for(Auction auctions: values()){\r\n auctions.decrementTimeRemaining(numHours); \r\n }\r\n }\r\n }",
"public void decrementWorkload() {\n workload--;\n }",
"public void DeductCharges () {\r\n\r\n\t\tdouble Temp = 0;\r\n\r\n\t\tfor ( Map.Entry<String, Double> CA : _ChargeAmounts.entrySet() ) {\r\n\r\n\t\t\tTemp += CA.getValue();;\r\n\r\n\t\t}\r\n\r\n\t\t_MonthlyChargeAmounts.put( _Tick.getMonthNumber(), Temp );\r\n\r\n\t\t_FundValue -= Temp;\r\n\r\n\t\tSystem.out.println( \"\\t\\t\\t \" + _Name + \" After Charges : \" + _FundValue );\r\n\t}",
"public void subtract() {\n\t\t\n\t}",
"@Override\n\tprotected void killReward() {\n\t\t\n\t}",
"protected void decrement(View view){\r\n if (quantity==1){\r\n return;\r\n }\r\n quantity--;\r\n display(quantity);\r\n }",
"void recount();",
"public void deductLife() {\n\t\t\n\t\t// If player01 is currently active.. \n\t\tif(player01.getIsCurrentlyPlaying()) {\n\t\t\t\n\t\t\t// Deduct a life.\n\t\t\tplayer01.deductlife();\n\t\t\t\n\t\t\t// Display message.\n\t\t\tSystem.out.println(\"Player 01 has lost a life!\");\n\t\t\tSystem.out.println(\"Player 01 Lives Left: \" + player01.getPlayerLives());\n\t\t\t\n\t\t\t// If all player 01's lives are lost..\n\t\t\tif(player01.getPlayerLives() == 0){\n\t\t\t\t\n\t\t\t\t// Invoke\n\t\t\t\tallPlayerLivesAreGone();\n\t\t\t}\n\t\t\t\n\t\t\t// If player02 is currently active.. \n\t\t} else {\n\t\t\t\n\t\t\tplayer02.deductlife();\n\t\t\tSystem.out.println(\"Player 02 has lost a life!\");\n\t\t\tSystem.out.println(\"Player 02 Lives Left: \" + player02.getPlayerLives());\n\t\t\t\n\t\t\tif(player02.getPlayerLives() == 0){\n\t\t\t\tallPlayerLivesAreGone();\n\t\t\t}\n\t\t}\n\t}",
"public void decSpeed()\n\t{\n\t\t//only decrease if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).decSpeed();\n\t\t\tSystem.out.println(\"Speed -10\");\n\t\t}else\n\t\t\tSystem.out.println(\"A player ship is not currently spawned\");\n\t}",
"public void decreaseQuantity(int amount) {\n this.currentQuantity -= amount;\n }",
"public void renew(){\n kickOut();\n cashOut();\n for(Player player: players){\n player.renew();\n }\n dealer.renew();\n go();\n }",
"public void levelDown() {\n this._learnState -= 1;\n this.save();\n }",
"@Test\n public void decreaseWithDiscardLessThan4() {\n gm.setPlayerInfo(clientPlayer4);\n gm.setThisPlayerIndex(clientPlayer4.getPlayerIndex());\n for (ResourceType type : ResourceType.values()) {\n assertEquals(0, getAmounts().getOfType(type));\n }\n assertFalse(dc.getMaxDiscard() >= 4);\n dc.increaseAmount(ResourceType.ORE);\n assertEquals(0, getAmounts().getOfType(ResourceType.ORE));\n dc.decreaseAmount(ResourceType.ORE);\n assertEquals(0, getAmounts().getOfType(ResourceType.ORE));\n }",
"@Scheduled(cron = \"0 0 1 * * *\")\n\tpublic void removeExpiredPremiumUsers(){\n\t\tIterable <User> users = userDao.findAll();\n\t\tDate now = new Date();\n\t\t\n\t\tfor (User user : users){\n\t\t\tif (user.isPremium()){\n\t\t\t\ttry{\n\t\t\t\t\tif(user.getPremiumExpiryDate().before(now)){\n\t\t\t\t\t\tuser.removePremium();\n\t\t\t\t\t\tuserDao.save(user);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch(Exception e){\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void removeTime(int index) {\r\n\t\tthis.timeAvailable.remove(index);\r\n\t}",
"public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void unsetAmount();",
"public void decrement(View view) {\n quantity = quantity - 1;\n display(quantity);\n\n }",
"public void decrement(View view) {\n quantity = quantity - 1;\n display(quantity);\n\n }",
"public void buyDecreaseDamage() {\n this.decreaseDamage++;\n }",
"public final void decreaseShields() {\n\t\tshields--;\n\t}",
"public void decMonstres() {\n\t\tthis.nbMonstres -= 1;\n\t}",
"public void increaseDecrease(String toDo)\n {\n\n ObservableList<?>fields= updateNew.getChildren();\n for(int i=0;i<fields.size();i++)\n {\n if(toDo.equals(\"i\")) {\n for(int k=0;k<=100;k++) {\n slowMotion(fields, i, k);\n }\n }\n else if(toDo.equalsIgnoreCase(\"d\"))\n {\n for(int k=100;k>=0;k--) {\n slowMotion(fields, i, k);\n }\n }\n }\n }",
"public void removeFromRatebooks(entity.ImpactTestingRateBook element);",
"public void removeSkill(View view) {\n //Create animations\n final Animation fadeIn = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.fade_in);\n final Animation fadeOut = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.fade_out);\n\n //Grab the button\n Button clicked = (Button) view;\n\n String temp = null;\n //Remove skill from list\n for (String s : dummySubjectList) {\n if (s == clicked.getText()) {\n temp = s;\n }\n }\n\n dummySubjectList.remove(temp);\n\n //Get text color so it can be reset later\n final ColorStateList tc = clicked.getTextColors();\n final CharSequence theSkill = clicked.getText();\n\n //Change the button, fade in/out\n view.startAnimation(fadeOut);\n clicked.setText(\"Undo\");\n clicked.setTextColor(getResources().getColor(R.color.red));\n view.startAnimation(fadeIn);\n\n Toast.makeText(getApplicationContext(), theSkill + \" deleted\",\n Toast.LENGTH_SHORT).show();\n\n //User clicks on 'undo' option\n view.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //Reset the button to the skill\n Button clicked = (Button) view;\n view.startAnimation(fadeOut);\n clicked.setText(theSkill);\n clicked.setTextColor(tc);\n view.startAnimation(fadeIn);\n\n Toast.makeText(getApplicationContext(), theSkill + \" undeleted\",\n Toast.LENGTH_SHORT).show();\n\n //Add skill to list\n dummySubjectList.add(theSkill.toString());\n\n //User clicks on skill button\n view.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n removeSkill(view);\n }\n });\n }\n });\n\n }",
"public void decreaseQuantity() {\n this.quantity--;\n this.updateTotalPrice();\n }",
"private void calculeStatRemove() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int loose = resourceB - resourceA;\n int diff = (resourceA - resourceB) + value;\n this.getContext().getStats().incNbRessourceLoosePlayers(idPlayer,type,loose);\n this.getContext().getStats().incNbRessourceNotLoosePlayers(idPlayer,type,diff);\n }",
"private void decrementTriesRemaining() {\n if (temps==null) temps = JCSystem.makeTransientByteArray(NUMTEMPS, JCSystem.CLEAR_ON_RESET);\n temps[TRIES] = (byte)(triesLeft[0]-1);\n Util.arrayCopyNonAtomic( temps, TRIES, triesLeft, (short)0, (short)1 );\n }",
"public void decSpeed()\n\t{\n\t\t//only decrease if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).decSpeed();\n\t\t\t\tSystem.out.println(\"Speed decreased by 1\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}",
"public void decreasePigsCounter() {\n --_pigsCounter;\n }",
"void unsetValueQuantity();",
"public void decrement(View view) {\n if(quantity==1) {\n // Show an error message as a toast\n Toast.makeText(this, \"You cannot have less than 1 coffee\", Toast.LENGTH_SHORT).show();\n //Exit this method early because there is nothing left to do\n return;\n }\n quantity=quantity-1;\n displayQuantity(quantity);\n\n }",
"@Override\r\n\tpublic void decreaseDomesticTradeResourceAmount(ResourceType resource) {\n\t\t\r\n\t}",
"public void removeMoney(int x)\n\t{\n\t\tsomethingChanged = true;\n\t\tmoney -= x;\n\t}",
"public void decreaseLife() {\n\t\tif(life<=0) {\n\t\t\tlife = 0;\n\t\t\tisAlive = false;\n\t\t}else if(life==1) {\t\t\t\t// If only one life left, then player will die\n\t\t\tlife--;\n\t\t\tisAlive = false;\n\t\t}else {\n\t\t\tlife--;\n\t\t}\n\t}",
"public void decrement(View view) {\n String msg = getString(R.string.too_few_message);\n if(quantity > 0){\n quantity--;\n } else{\n Toast.makeText(this, msg, Toast.LENGTH_SHORT)\n .show();\n }\n\n displayQuantity(quantity);\n }",
"public void deductHealth( int amt) {\n currentHealth = currentHealth - amt;\n }",
"public void applyBrake(int decrement)\r\n {\r\n speed -= decrement;\r\n }"
] | [
"0.8531305",
"0.6472649",
"0.6373559",
"0.6312256",
"0.6114162",
"0.6093848",
"0.59353197",
"0.59260225",
"0.59260225",
"0.5916076",
"0.5905932",
"0.5860902",
"0.58459586",
"0.5824553",
"0.5763422",
"0.57157606",
"0.5708857",
"0.57014465",
"0.5689758",
"0.56545573",
"0.56033176",
"0.55710644",
"0.55621886",
"0.5559338",
"0.5547727",
"0.553966",
"0.552889",
"0.5519126",
"0.5516995",
"0.5499243",
"0.54958457",
"0.5493706",
"0.5487746",
"0.54821295",
"0.5477705",
"0.5473757",
"0.54705125",
"0.54617786",
"0.5432157",
"0.54247916",
"0.5417322",
"0.54098153",
"0.5390286",
"0.537812",
"0.53575385",
"0.5353633",
"0.5336773",
"0.53202784",
"0.53178966",
"0.53051555",
"0.5284016",
"0.52773285",
"0.52747124",
"0.5269207",
"0.52683806",
"0.52543545",
"0.5245652",
"0.52402383",
"0.5238827",
"0.5238827",
"0.52385575",
"0.5238195",
"0.5234551",
"0.5233818",
"0.52185166",
"0.5218063",
"0.52146435",
"0.52137387",
"0.5212153",
"0.5209781",
"0.520671",
"0.5205099",
"0.5203527",
"0.51954174",
"0.5194985",
"0.51943",
"0.5193858",
"0.51912194",
"0.51900697",
"0.51885295",
"0.51885295",
"0.5184158",
"0.5180392",
"0.5177574",
"0.51724017",
"0.5170052",
"0.51687616",
"0.51647687",
"0.51641834",
"0.5163864",
"0.5163853",
"0.5162972",
"0.51613706",
"0.51610696",
"0.5156857",
"0.51561064",
"0.5148621",
"0.5144744",
"0.51385134",
"0.51376474"
] | 0.8015304 | 1 |
Reset the status of a playable | public void reset(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reset() {\n mMediaPlayer.reset();\n setPlayerState(State.IDLE);\n }",
"void reset() {\n\t\tsongs.get(curSong).rewind();\n\t\tsongs.get(curSong).pause();\n\t}",
"public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\n }",
"public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }",
"public void resetPlayer() {\n\t\thealth = 3;\n\t\tplayerSpeed = 5f;\n\t\tmultiBulletIsActive = false;\n\t\tspeedBulletIsActive = false;\n\t\tquickFireBulletIsActive = false;\n\t\tinvincipleTimer = 0;\n\t\txPosition = 230;\n\t}",
"public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }",
"void resetStatus();",
"public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}",
"public void togglePlay() { }",
"public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}",
"private void setGameStatus() {\n this.gameStatus = false;\n }",
"private void transport_play() {\n timerReset();\n playing = true;\n now_playing_play_button.setForeground(getDrawable(R.drawable.ic_pause_50dp));\n }",
"public void resetGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tthis.round = 0;\r\n\t\tthis.phase = 0;\r\n\t\tthis.prices = Share.generate();\r\n\t\tint i = 0;\r\n\t\twhile(i < this.prices.size())\r\n\t\t{\r\n\t\t\tthis.prices.get(i).addShares(Config.StartingStockPrice);\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tint p = 0;\r\n\t\twhile(p < Config.PlayerLimit)\r\n\t\t{\r\n\t\t\tif(this.players[p] != null)\r\n\t\t\t{\r\n\t\t\t\tthis.players[p].reset();\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\tthis.deck = Card.createDeck();\r\n\t\tthis.onTable = new LinkedList<>();\r\n\t\tCollections.shuffle(this.deck);\r\n\t\tthis.dealToTable();\r\n\t}",
"private void resetMediaPlayer() {\n if (mediaPlayer != null) {\n //mediaPlayer.stop();\n mediaPlayer.reset();\n mediaPlayer.release();\n mediaPlayer = null;\n listen_icon.setText(Html.fromHtml(\"\"));\n listen_text.setText(\"Listen\");\n }\n }",
"public void reset(StarObjectClass self){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\tmediaplayer.reset();\r\n \t}",
"void undoPlay();",
"@Override\n\tpublic void resume() {\n\t\tif (mPlayId == mPlayTotal) {\n\t\t\tmPlayId = 0;\n\t\t}\n\t\tsetChange();\n\t}",
"@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }",
"private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }",
"public void restart(){\n for(Player p: players)\n if(p.getActive())\n p.reset();\n turn = 0;\n currentPlayer = 0;\n diceRoller=true;\n }",
"public void resetPlayer(){\n images = new EntitySet(true,false, 0);\n }",
"public void resetTossedStatus(){\n\t\tdiceTossed = false;\n\t}",
"public void setPlaying() {\n\t\tstate = State.INGAME;\n\t}",
"private void audioManipulatorResetMediaPlayer() {\n\t\tcontroller.audioManipulatorResetMediaPlayer();\n\t}",
"public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }",
"public void pausePlayer(){\n this.stopRadio();\n }",
"public void reset() { \r\n stop(); \r\n if (midi) \r\n sequencer.setTickPosition(0); \r\n else \r\n clip.setMicrosecondPosition(0); \r\n audioPosition = 0; \r\n progress.setValue(0); \r\n }",
"private void transport_resume() {\n timerResume();\n playing = true;\n now_playing_play_button.setForeground(getDrawable(R.drawable.ic_pause_50dp));\n }",
"public void playAgain() {\r\n\t\t\r\n\t\tscreen.reset();\r\n\t\t\r\n\t}",
"public void resetUnit() {\n if (isUnitFromCurrentPlayer()) {\n this.addListener(this.openActionBuilder.get().unitActor(this).build().getOpenActionMenu());\n } else {\n //A voir\n }\n }",
"public void clearPlayed(){\n\t\tplayed = null;\n\t}",
"private void resume() { player.resume();}",
"void togglePlay();",
"private void timerReset() {\n playing = true;\n now_playing_progress_bar.setMax((int) thisSong.getLengthMilliseconds());\n timer_startTime = System.currentTimeMillis();\n timerHandler.postDelayed(timerRunnable, 0);\n }",
"public void play() { player.resume();}",
"private void resetGame() {\n rockList.clear();\n\n initializeGame();\n }",
"private void reset() // reset the game so another game can be played.\n\t{\n\t\tenableControls(); // enable the controls again..\n\n\t\tfor (MutablePocket thisMutPocket: playerPockets) // Reset the pockets to their initial values.\n\t\t{\n\t\t\tthisMutPocket.setDiamondCount(3);\n\t\t}\n\n\t\tfor(ImmutablePocket thisImmPocket: goalPockets)\n\t\t{\n\t\t\tthisImmPocket.setDiamondCount(0);\n\t\t}\n\n\t\tfor(Player thisPlayer: players) // Same for the player..\n\t\t{\n\t\t\tthisPlayer.resetPlayer();\n\t\t}\n\n\t\tupdatePlayerList(); // Update the player list.\n\n\t}",
"private void resetAfterGame() {\n }",
"public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }",
"public boolean reset(final PlayListItem playListItem) {\n\n try {\n stop();\n\n mCurrentlyPlaying = playListItem;\n\n mMediaPlayer = MediaPlayer.create(this, Uri.parse(playListItem.getTrackUri()));\n mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n\n // Keeps the device running, but allows the screen to turn off.\n mMediaPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK);\n\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n\n @Override\n public void onPrepared(MediaPlayer mp) {\n\n // Media has loaded and we're ready to begin playing.\n Log.d(TAG, \"onPrepared() called\");\n mMediaPlayer.start();\n\n // Notify listeners that a new track has started.\n PreferenceManager.getDefaultSharedPreferences(getApplicationContext())\n .edit()\n .putString(MainActivity.PREF_CURRENT_ALBUM, playListItem.getAlbumName())\n .putString(MainActivity.PREF_CURRENT_ARTIST_NAME, playListItem.getArtistName())\n .putString(MainActivity.PREF_CURRENT_ARTIST_SPOTIFY_ID, playListItem.getArtistId())\n .putString(MainActivity.PREF_CURRENT_TRACK_NAME, playListItem.getTrackName())\n .putString(MainActivity.PREF_CURRENT_TRACK_SPOTIFY_ID, playListItem.getTrackId())\n .putString(MainActivity.PREF_CURRENT_TRACK_URL, playListItem.getTrackUri())\n .putBoolean(MainActivity.PREF_IS_PLAYING, true)\n .commit();\n\n Intent intent = new Intent(TRACK_START_BROADCAST_FILTER);\n intent.putExtra(SpotifyStreamerActivity.KEY_CURRENT_TRACK, playListItem);\n LocalBroadcastManager.getInstance(StreamerMediaService.this).sendBroadcast(intent);\n }\n });\n\n mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() {\n\n @Override\n public boolean onError(MediaPlayer mp, int what, int extra) {\n Log.d(TAG, \"onError() called. what:\" + what + \" extra:\" + extra);\n return false;\n }\n });\n\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n\n @Override\n public void onCompletion(MediaPlayer mp) {\n\n if (!continueOnCompletion) {\n\n mNotificationManager.cancel(NotificationTarget.NOTIFICATION_ID);\n\n PreferenceManager.getDefaultSharedPreferences(getApplicationContext())\n .edit()\n .putBoolean(MainActivity.PREF_IS_PLAYING, false)\n .commit();\n }\n\n // Notify listeners that the track has completed.\n Intent intent = new Intent(TRACK_STOP_BROADCAST_FILTER);\n LocalBroadcastManager.getInstance(StreamerMediaService.this).sendBroadcast(intent);\n }\n\n });\n\n } catch (Exception e) {\n Log.e(TAG, \"Error in reset(): \" + e.getMessage());\n return false;\n }\n\n return true;\n }",
"private void transport_pause() {\n timerPause();\n playing = false;\n now_playing_play_button.setForeground(getDrawable(R.drawable.ic_play_arrow_50dp));\n }",
"public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}",
"private void resume()\r\n {\r\n player.resume();\r\n }",
"public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }",
"public void resetPlayer(Nimsys nimSys,ArrayList<Player> list,Scanner keyboard) {\r\n\t\tboolean flag = false;\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\t\r\n\t\tif(nimSys.commands.length==1){\r\n\t\t\tSystem.out.println(\"Are you sure you want to reset all player statistics? (y/n)\");\r\n\t\t\tString next = keyboard.next();\r\n\t\t\tkeyboard.nextLine();\r\n\t\t\tif(next.equals(\"y\")){\r\n\t\t\t\twhile (aa.hasNext()) {\r\n\t\t\t\t\tPlayer in = aa.next();\r\n\t\t\t\t\tin.setWinGame(0);\r\n\t\t\t\t\tin.setGamePlay(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\telse{\r\n\t\t\twhile (aa.hasNext()) {\r\n\t\t\t\tPlayer in = aa.next();\r\n\t\t\t\tif(in.getUserName().equals(nimSys.commands[0])){\r\n\t\t\t\t\tin.setWinGame(0);\r\n\t\t\t\t\tin.setGamePlay(0);\r\n\t\t\t\t\tflag = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(flag == false)\r\n\t\t\t\tSystem.out.println(\"The player does not exist.\");\r\n\t\t}\r\n\t}",
"public void resetGame() {\r\n\t\tfor(Player p : players) {\r\n\t\t\tp.reset();\r\n\t\t}\r\n\t\tstate.reset();\r\n\t}",
"public void stopPlaying(){\r\n\t\tsongsToPlay.clear();\r\n\t\tselectedPreset = -1;\r\n\t\tselectedSource = \"\";\r\n\t\ttry{\r\n\t\t\tplayer.stop();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.err.println(\"ERROR: BASICPLAYER STOP CODE HAS FAULTED.\");\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void setUIStatePlaying(){\n play.setEnabled(false);\n pause.setEnabled(true);\n stop.setEnabled(true);\n }",
"public void setPlayState(PlayerState state) { isPaused = !state.playing; }",
"public void stopPlaying() {\n \t\tisPlaying = false;\n \t}",
"public void restart() {\n this.getPlayerHand().getHandCards().clear();\n this.dealerHand.getHandCards().clear();\n this.getPlayerHand().setActualValue(0);\n this.getDealerHand().setActualValue(0);\n this.gameOver = false;\n this.playerBet = MIN_BET;\n this.roundCount = 0;\n this.isRunning = true;\n this.startGame();\n }",
"public void reset()\n\t{\n\t\tdelayCount = 0f;\n\t\trepeatCount = 0;\n\t\tenabled = true;\n\t}",
"private void restart()\n {\n mPlayer.stop();\n mPlayer = MediaPlayer.create(this, audioUri);\n mPlayer.start();\n }",
"public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }",
"public void reset() {\n\n players = new Player[numAIPlayers + 1];\n createHumanPlayer();\n createAIPlayers(numAIPlayers);\n wholeDeck.shuffle();\n\n // --- DEBUG LOG ---\n // The contents of the complete deck after it has been shuffled\n Logger.log(\"COMPLETE GAME DECK AFTER SHUFFLE:\", wholeDeck.toString());\n\n assignCards(wholeDeck, players);\n activePlayer = randomlySelectFirstPlayer(players);\n playersInGame = new ArrayList<>(Arrays.asList(players));\n winningCard = null;\n roundWinner = null;\n\n roundNumber = 1;\n drawRound = 0;\n }",
"public void resetPlaysList(MappingType mapping) {\n\t\tmapping.getPlays().clear();\n\t}",
"public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }",
"public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }",
"public void resetWinRecord()\n{\n gamesWon = 0;\n}",
"@Override\n\tpublic void reset(ReadOnlyBoard board, Counter player, Boolean undoPossible) {\n\n\t}",
"public void resetStatusEffects() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tp.resetStats();\r\n\t\t}\r\n\t}",
"private void switchPlayPause(){\n Intent mSwitchPlayStatus = new Intent(BROADCAST_switchPlayStatus);\n if (mIsPlaying==1) {\n mSwitchPlayStatus.putExtra(\"switchPlayStatus\", 1);\n sBtn_PlayResume.setImageResource(R.drawable.select_btn_play);\n } else if (mIsPlaying==2){\n mSwitchPlayStatus.putExtra(\"switchPlayStatus\",2);\n sBtn_PlayResume.setImageResource(R.drawable.select_btn_pause);\n }\n LocalBroadcastManager.getInstance(this).sendBroadcast(mSwitchPlayStatus);\n }",
"public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}",
"public void resetPlayerInfo() {\r\n\t\tthis.damageDealt = 0;\r\n\t\tthis.damageTaken = 0;\r\n\t\tthis.robotsDestroyed = 0;\r\n\t\tthis.tilesMoved = 0;\r\n\t\tthis.turnsSinceLastMove = 0;\r\n\t\tthis.turnsSinceLastFire = 0;\r\n\t\t\r\n\t\tthis.robots = new ArrayList<Robot>(3);\r\n\t\t\r\n\t\t/* 0 = scout , 1 = sniper, 2 = tank */\r\n\t\tthis.robots.add(new Robot(playerID, 0));\r\n\t\tthis.robots.add(new Robot(playerID, 1));\r\n\t\tthis.robots.add(new Robot(playerID, 2));\r\n\t}",
"public void stop() {\n mCurrentPlayer.reset();\n mIsInitialized = false;\n }",
"public void reset()\n\t{\n\t\tm_running = false;\n\t\tm_elapsedMs = 0;\n\t\tm_lastMs = 0;\n\t}",
"public void reset() {\n\t\tFile file = new File(\"src/LevelData.txt\");\n\t\tpaddle = new Paddle(COURT_WIDTH, COURT_HEIGHT, Color.BLACK);\n\t\tbricks = new Bricks(COURT_WIDTH, COURT_HEIGHT, file);\n\t\tball = new Ball(COURT_WIDTH, COURT_HEIGHT, 5, Color.BLACK);\n\n\t\tplaying = true;\n\t\tcurrScoreVal = 0;\n\t\tlivesLeft = 3;\n\t\tstatus.setText(\"Running...\");\n\t\tyourScore.setText(\"Your Score: 0\");\n\t\tlives.setText(\" Lives: \" + livesLeft.toString() + \"| \");\n\n\t\t// Making sure that this component has the keyboard focus\n\t\trequestFocusInWindow();\n\t}",
"public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}",
"private void resetGame(){\n\n }",
"private void resetGame() {\n game.resetScores();\n this.dialogFlag = false;\n rollButton.setDisable(false);\n undoButton.setDisable(true);\n resetButton.setDisable(true);\n setDefault(\"player\");\n setDefault(\"computer\");\n }",
"@Override\n public void resetGame() {\n\n }",
"public void turnOff() {\n update(0,0,0);\n this.status = false;\n }",
"public void changeTurn(){\r\n model.setCheckPiece(null);\r\n model.swapPlayers();\r\n }",
"protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }",
"public void reset() {\n\t\tAssets.playSound(\"tweet\");\n\t\tscore = respawnTimer = spawnCount= 0;\n\t\t\n\t\twalls = new ArrayList<Wall>();\n\t\tcheckPoints = new ArrayList<Wall>();\n\t\tground = new ArrayList<Ground>();\n\n\t\tGround g;\n\t\tPoint[] points = new Point[21];\n\t\tfor (int i = 0; i < 21; i++) {\n\t\t\tpoints[i] = new Point(i * 32, 448);\n\t\t}\n\t\tfor (int j = 0; j < points.length; j++) {\n\t\t\tg = new Ground();\n\t\t\tg.setBounds(new Rectangle(points[j].x, 448, 32, 32));\n\t\t\tground.add(g);\n\t\t}\n\n\t\tsky = new Background(-0.2);\n\t\tsky.setImage(Assets.sprite_sky);\n\t\t\n\t\tmountains = new Background(-0.4);\n\t\tmountains.setImage(Assets.sprite_mountains);\n\t\t\n\t\ttrees = new Background(-1.4);\n\t\ttrees.setImage(Assets.sprite_trees);\n\n\t\tstarted = false;\n\t\tplayer.reset();\n\n\t}",
"@Override\n public void playStop() {\n }",
"void unsetStatus();",
"public void unPause()\n {\n paused = false;\n }",
"private void pause() { player.pause();}",
"public void unpause() {\n\t\t// Move the real time clock up to now\n\t\tsynchronized (mSurfaceHolder) {\n\t\t\tmLastTime = System.currentTimeMillis() + 100;\n\t\t}\n\t\tsetState(GameState.RUNNING_LVL);\n\t}",
"@Override\r\n\tpublic void resetBoard() {\r\n\t\tcontroller.resetGame(player);\r\n\t\tclearBoardView();\r\n\t\tif (ready)\r\n\t\t\tcontroller.playerIsNotReady();\r\n\t}",
"public void togglePlay() {\n\t\tif (playing)\n\t\t\tpause();\n\t\telse\n\t\t\tplay();\n\t}",
"public void ReplayCurrentLevel(){\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"TimeoutSound\");\n }\n musicName = \"TimeoutSound\";\n JOptionPane.showMessageDialog(null, \"Oops! Time out. Please replay current level.\", \"Timeout\", JOptionPane.INFORMATION_MESSAGE);\n newGameStart(level);\n }",
"public void reset() {\n\t\tthis.startTime = 0;\n\t\tthis.stopTime = 0;\n\t\tthis.running = false;\n\t}",
"@Override\r\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\r\n\t\t\t\tmPlaying = false;\r\n\t\t\t\tstatus.setText(\"Stop Play\");\r\n\t\t\t}",
"private void ResetGame(){\n this.deck = new Deck();\n humanPlayer.getHand().clear();\n humanPlayer.setWager(0);\n dealer.getHand().clear();\n }",
"default void free() {\n setState(Audio.AudioState.STOPPED);\n }",
"public void ResetPlayer() {\n\t\tfor (int i = 0; i < moveOrder.length; i++) {\n\t\t\tmoves.add(moveOrder[i]);\n\t\t}\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t\tthis.movesMade = 0;\n\t\tthis.face = 1;\n\t}",
"private void resetForNextTurn() {\n\t\tremove(ball);\n\t\tdrawBall();\n\t\tsetInitialBallVelocity();\n\t\tpaddleCollisionCount = 0;\n\t\tpause(2000); \t\t\t\t\n }",
"public void reset(){\n active = false;\n done = false;\n state = State.invisible;\n curX = 0;\n }",
"private void resetActionButtonsState()\n {\n // Actions\n GameAction fpAction = firstPlayer.getLastAction();\n GameAction spAction = secondPlayer.getLastAction();\n\n // First player reset state\n if (fpAction instanceof RockAction)\n {\n animateSelectedButton(firstPlayerRock, false);\n }\n else if (fpAction instanceof PaperAction)\n {\n animateSelectedButton(firstPlayerPaper, false);\n }\n else if (fpAction instanceof ScissorsAction)\n {\n animateSelectedButton(firstPlayerScissors, false);\n }\n\n // Second player reset state\n if (spAction instanceof RockAction)\n {\n animateSelectedButton(secondPlayerRock, true);\n }\n else if (spAction instanceof PaperAction)\n {\n animateSelectedButton(secondPlayerPaper, true);\n }\n else if (spAction instanceof ScissorsAction)\n {\n animateSelectedButton(secondPlayerScissors, true);\n }\n }",
"public void reset() {\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tfor (int j = 0; j<DIVISIONS; j++){\n\t\t\t\tgameArray[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tgameWon = false;\n\t\twinningPlayer = NEITHER;\n\t\tgameTie = false;\n\t\tcurrentPlayer = USER;\n\t}",
"private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }",
"public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }",
"public void reset() {\r\n\r\n for ( Card card : cards ) {\r\n if ( card.isFaceUp() ) {\r\n card.toggleFace( true );\r\n }\r\n }\r\n Collections.shuffle( cards );\r\n\r\n this.undoStack = new ArrayList<>();\r\n\r\n this.moveCount = 0;\r\n\r\n announce( null );\r\n }",
"public void resetSounds() {\n\t\tCollection<SoundInfo> sounds = soundList.values();\n for(SoundInfo sound: sounds){\n \t\tsound.reset();\n }\n\t}",
"public void resetTask() {\n super.resetTask();\n this.entity.setAggroed(false);\n this.seeTime = 0;\n this.attackTime = -1;\n this.entity.resetActiveHand();\n }",
"synchronized void toggle() {\n try {\n myShouldPause = !myShouldPause;\n if (myShouldPause) {\n if (myPlayer != null) {\n myPlayer.stop();\n }\n } else if (!myGamePause) {\n // if the player is null, we create a new one.\n if (myPlayer == null) {\n start();\n }\n // start the music.\n myPlayer.start();\n }\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }",
"public void resetPlayerTime ( ) {\n\t\texecute ( handle -> handle.resetPlayerTime ( ) );\n\t}",
"public void reset(){\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm -r data/games_module\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"0\"+\" /\\\" data/winnings\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"sed -i \\\"1s/.*/ \"+\"175\"+\" /\\\" data/tts_speed\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/answered_questions\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/five_random_categories\");\n\t\tBashCmdUtil.bashCmdNoOutput(\"rm data/current_player\");\n\t\t_currentPlayer = null;\n\t\t_internationalUnlocked = false;\n\t\t_gamesData.clear();\n\t\t_fiveRandomCategories.clear();\n\t\tfor (int i= 0; i<5;i++) {\n\t\t\t_answeredQuestions[i]=0;\n\t\t}\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/answered_questions\");\n\t\tinitialiseCategories();\n\t\ttry {\n\t\t\treadCategories();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFiveRandomCategories();\n\t}",
"@Override\n public void reset(MiniGame game) {\n }"
] | [
"0.7170679",
"0.69712913",
"0.682024",
"0.6812222",
"0.667307",
"0.66453016",
"0.66435266",
"0.65806407",
"0.64732444",
"0.6453693",
"0.64509594",
"0.6447581",
"0.6446546",
"0.643381",
"0.63765925",
"0.63705903",
"0.63528126",
"0.634251",
"0.6335074",
"0.6320266",
"0.6316616",
"0.62968546",
"0.62672657",
"0.62503356",
"0.6235958",
"0.6223951",
"0.62042254",
"0.6202442",
"0.6202007",
"0.61734635",
"0.61716014",
"0.6170031",
"0.61586356",
"0.61562324",
"0.6154711",
"0.61542106",
"0.6152176",
"0.61483896",
"0.6141332",
"0.6136037",
"0.6135667",
"0.61302304",
"0.6128885",
"0.6105729",
"0.6095273",
"0.60911965",
"0.60876215",
"0.60819536",
"0.6070424",
"0.60664284",
"0.6065496",
"0.6050659",
"0.6033365",
"0.6024997",
"0.6024996",
"0.6016705",
"0.60159653",
"0.60118407",
"0.5976181",
"0.59754086",
"0.59668267",
"0.59662294",
"0.5964518",
"0.59625655",
"0.5953072",
"0.59507966",
"0.5949136",
"0.5947015",
"0.59239525",
"0.5923237",
"0.5920424",
"0.5914615",
"0.5906181",
"0.5903575",
"0.5899924",
"0.5893723",
"0.58912647",
"0.58876884",
"0.58818364",
"0.5874",
"0.5872684",
"0.58714896",
"0.58642375",
"0.58624786",
"0.5857243",
"0.58544374",
"0.5853423",
"0.58478427",
"0.5837431",
"0.5833663",
"0.5833406",
"0.5827237",
"0.58236325",
"0.58215576",
"0.5816498",
"0.5815431",
"0.581397",
"0.5804303",
"0.5800294",
"0.57988495",
"0.57907015"
] | 0.0 | -1 |
Get the most recent chosen skill | public Skills getChosenSkill(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getHighestCombatSkill() {\r\n int id = 0;\r\n int last = 0;\r\n for (int i = 0; i < 5; i++) {\r\n if (staticLevels[i] > last) {\r\n last = staticLevels[i];\r\n id = i;\r\n }\r\n }\r\n return id;\r\n }",
"Question getLastQuestion();",
"String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }",
"Skill getSkill(String name);",
"public Skills chooseSkill();",
"@Override\n\tpublic Skills chooseSkill() {\n\t\t\n\t\treturn null;\n\t}",
"public String getSkill() {\n\t\treturn skill;\n\t}",
"Skill getSkill(Long skillId) throws DbException;",
"public SUDecision getlastChoice() {\r\n\t\treturn m_lastChoice;\r\n\t}",
"public com.transerainc.aha.gen.agent.SkillDocument.Skill getSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public int getSkillRechargeTime(Skills currentSkill);",
"String getSkills();",
"public wbcadventure.Skill getSkill(int skillNumber){\n switch(skillNumber){\n case 0 : return skill1;\n case 1 : return skill2;\n case 2 : return skill3;\n case 3 : return skill4;\n }\n return null;\n }",
"int getSkillId();",
"public Double getSkillNumber() {\n return skillNumber;\n }",
"public Skills getSkillPrediction();",
"public int getFishingSkill();",
"long getLastBonusTicketDate();",
"public static MyStudent studentWithHighest ( List<MyStudent> list) {\n\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-1).findFirst().get();\n\t}",
"public int getBestGuy () {\r\n return poblac.getBestGuy();\r\n }",
"Question getFirstQuestion();",
"public Skill get(SkillType type) {\r\n\t\treturn this.skills.get(type);\r\n\t}",
"public long getLastPlayed ( ) {\n\t\treturn extract ( handle -> handle.getLastPlayed ( ) );\n\t}",
"public Question getCurrentQuestion() {\n Question question = null;\n for (Question q : questions) {\n if (q.getSequence() == sequence) {\n question = q;\n break;\n }\n }\n return question;\n }",
"public Fitness bestScore() {\r\n Map.Entry<Fitness, List<Element>> bestEntry\r\n = elementsByFitness.lastEntry();\r\n if (bestEntry == null) {\r\n return null;\r\n }\r\n Fitness result = bestEntry.getKey();\r\n\r\n return result;\r\n }",
"public static String getMostFrequentToy() {\n\t\tString name = \"\";\n\t\tint max = 0;\n\t\tfor (int i = 0; i < toyList.size(); i++) {\n\t\t\tif (max < toyList.get(i).getCount()) {\n\t\t\t\tmax = toyList.get(i).getCount();\n\t\t\t\tname = toyList.get(i).getName();\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}",
"public List<T> mostliked();",
"public String getHighestInterest(){\n if(!interestsNotFilled()) {\n Object highestInterest = interestMap.keySet().toArray()[0];\n for (String interest : interestMap.keySet()) {\n float score = interestMap.get(interest);\n if (score > interestMap.get(highestInterest)) {\n highestInterest = interest;\n }\n }\n return (String) highestInterest;\n }else{\n return null;\n }\n }",
"@Override\r\n \tpublic List<Skill> getCurrentlySelected(CDOMObject owner, PlayerCharacter pc)\r\n \t{\r\n \t\treturn Collections.emptyList();\r\n \t}",
"public abstract SkillData skill();",
"public Integer getSkillId() {\n return skillId;\n }",
"Book getLatestBook();",
"@GetMapping(\"/latest\")\n public UserSkillDto getLatestChangedUserSkillData(@PathVariable(\"userId\") Long userId) {\n Set<UserSkill> userSkills = userSkillService.getAllSkillsByUserId(userId);\n if (userSkills.size() == 0) {\n throw new ResourceNotFoundException(\"Latest user skill\", \"userId\", userId);\n }\n\n return userSkills.stream()\n .filter(us -> us.getEditorId() != null)\n .map(userSkillMapper::entityToDto)\n .max(Comparator.comparing(UserSkillDto::getLastEditDate))\n .orElseThrow(() -> new ResourceNotFoundException(\"Latest user skill\", \"userId\", userId));\n }",
"Integer getSkillCount( String key ){\n return developer.skills.size();\n }",
"private Value chooseSuggestion(PermissionOutcome outcome) {\n Value suggestedValue;\n if (outcome.highestAcceptedValue != null) {\n suggestedValue = outcome.highestAcceptedValue;\n } else {\n try {\n suggestedValue = queue.peek();\n } catch (NoSuchElementException e) {\n suggestedValue = new Value();\n }\n }\n return suggestedValue;\n }",
"@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }",
"@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }",
"public String pop()\n {\n int next = prefs.getLastHintNumber() + 1;\n if (next >= hints.length) return null;\n\n prefs.updateLastHint(next, DateUtils.getToday());\n return hints[next];\n }",
"public Building mostFitInPopulation(){\n\t\tCollections.sort(population);\n\t\treturn population.get(population.size() - 1);\n\t}",
"public byte getNumSkills()\r\n\t{\r\n\t\treturn lastSkill;\r\n\t}",
"protected Skill getNpcSuperiorBuff()\r\n\t{\n\t\treturn getSkill(15649, 1); //warrior\r\n//\t\treturn getSkill(15650, 1); //wizzard\r\n\t}",
"@Override\n\tpublic Skill getSkill(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//now retrieve/read from database using the primary key\n\t\tSkill theSkill = currentSession.get(Skill.class, theId);\n\t\t\n\t\treturn theSkill;\n\t}",
"public int getSkillType() {\n\t\treturn 1;\n\t}",
"public Dog findYoungest() {\n\t\t\tif(this.younger == null) return this.d;\r\n\t\t\telse{\r\n\t\t\t\treturn this.younger.findYoungest();\r\n\t\t\t}\r\n\t\t}",
"public String getSkillsetName() {\n return skillsetName;\n }",
"public OptionalDouble getBestScore()\n {\n if (scores.size() > 0)\n {\n return OptionalDouble.of(scores.lastKey());\n }\n else\n {\n return OptionalDouble.empty();\n }\n }",
"public static Optional<Student> getStudentWithHighestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(maxBy(Comparator.comparing(Student::getGpa)));\n\t}",
"public Production getLastProductionFired () { return lastFiredInst.getProduction(); }",
"public String getBestMovie() {\n\t\tdouble highestRating = 0;\n\t\tString bestMovie = \"\";\n\t\tfor(Movie movie : this.movieList) {\n\t\t\tif(movie.getRating() > highestRating) {\n\t\t\t\thighestRating = movie.getRating();\n\t\t\t\tbestMovie = movie.getName();\n\t\t\t}\n\t\t}\n\t\treturn bestMovie;\n\t}",
"public HighScore getMaxScore(){\n HighScore hs;\n db = helper.getReadableDatabase();\n Cursor scoreCursor = db.query(SQLHelper.DB_TABLE_SCORES, SCORES_COLUMNS, null, null, null, null, SQLHelper.KEY_SCORE + \" DESC\", null);\n scoreCursor.moveToFirst();\n if(scoreCursor.getCount() == 0){\n hs = null;\n }\n else{\n hs = new HighScore(scoreCursor.getString(0), scoreCursor.getLong(1),\n scoreCursor.getLong(2), scoreCursor.getString(3), scoreCursor.getString(4));\n scoreCursor.moveToNext();\n if (scoreCursor != null && !scoreCursor.isClosed()) { // Close cursor\n scoreCursor.close();\n }\n }\n db.close();\n return hs; // Return max high score\n }",
"@Override\n public Score getBest() {\n Session session = FACTORY.openSession();\n\n try {\n List<Score> bestScores = session.createQuery(\"FROM Score s WHERE s.value = (SELECT max(s.value) FROM Score s)\", Score.class)\n .list();\n\n session.close();\n\n return bestScores.isEmpty() ? new Score(0L) : bestScores.get(0);\n } catch (ClassCastException e) {\n LOG.error(\"Error happened during casting query results.\");\n return null;\n }\n }",
"public int getLatestWeather() { //This function goes through the readings Arraylist and gets the most recent weather Code and returns it.\n int code;\n code = readings.get(readings.size() - 1).code;\n return code;\n }",
"public double getHighestReward() {\n if (this.highestReward == -1.0) {\n double tempHighestReward = -1.0;\n for (B bidder : this.bidders) {\n if (bidder.getReward() > tempHighestReward) {\n tempHighestReward = bidder.getReward();\n }\n }\n this.highestReward = tempHighestReward;\n }\n return this.highestReward;\n }",
"public RaceSituation getLatestByStage(Stage stage);",
"public List<Story> getLatestChallengesUndertaken() {\n return storyRepository.findTop50ByApprovedIsTrueOrderByLastUpdatedDesc();\n }",
"@Repository\npublic interface JobSkills extends JpaRepository<JobSkill,Integer> {\n List<JobSkill> findBySkillId(int id);\n List<JobSkill> findByJobOfferId(int id);\n\n @Query(value = \"SELECT TOP 5 skill.description, COUNT (skill.description) FROM skill \\n\" +\n \"INNER JOIN job_skill\\n\" +\n \"ON skill.id = job_skill.skill_id\\n\" +\n \"GROUP BY skill.description\\n\" +\n \"ORDER BY COUNT (skill.description) DESC;\", nativeQuery = true)\n List<Object[]> getTop5MostRequestedSkills();\n}",
"public V getLatest() {\n return lastItemOfList(versions);\n }",
"public TagSequence getBestTag();",
"public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}",
"public int getExperience();",
"public abstract String getLastAnswer();",
"public String StrongestWeapon() {\n\t\tString weapon = \"fists\";\n\t\tfor (Item temp: rooms.player.getItems()) {\t\t\t\t// Goes through all items in bag\n\t\t\tif (temp.getID() == \"pocket knife\" && !weapon.equals(\"wrench\")){ // Has pocket knife\n\t\t\t\tweapon = \"pocket knife\";\n\t\t\t}else if (temp.getID() == \"wrench\"){\t\t\t\t// Has wrench\n\t\t\t\tweapon = \"wrench\";\n\t\t\t}else if (temp.getID() == \"sword\"){\t\t\t\t\t// Has sword\n\t\t\t\treturn \"sword\";\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\treturn weapon;\n\t}",
"public Individual getWorst() {\n\t\treturn individuals[individuals.length-1];\n\t}",
"Article findLatestArticle();",
"public Book mostExpensive() {\n //create variable that stores the book thats most expensive\n Book mostExpensive = bookList.get(0);//most expensive book is set as the first in the array\n for (Book book : bookList) {\n if(book.getPrice() > mostExpensive.getPrice()){\n mostExpensive = book;\n }\n } return mostExpensive;//returns only one (theFIRST) most expensive in the array if tehre are several with the same price\n }",
"public com.transerainc.aha.gen.agent.SkillDocument.Skill addNewSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n return target;\n }\n }",
"@Override\n public String getFunction() {\n return \"Gets all skills a player character has.\";\n }",
"public Question getFirstQ()\n {\n return questionList.get(0);\n }",
"public Optional<DataModel> max(){\n return stream.max(Comparator.comparing(DataModel::getAge));\n }",
"private String pickWord() {\n \thangmanWords = new HangmanLexicon();\n \tint randomWord = rgen.nextInt(0, (hangmanWords.getWordCount() - 1)); \n \tString pickedWord = hangmanWords.getWord(randomWord);\n \treturn pickedWord;\n }",
"public Individual getBest() {\n\t\treturn individuals[0];\n\t}",
"public Fitness worstScore() {\r\n Map.Entry<Fitness, List<Element>> worstEntry\r\n = elementsByFitness.firstEntry();\r\n if (worstEntry == null) {\r\n return null;\r\n }\r\n Fitness result = worstEntry.getKey();\r\n\r\n return result;\r\n }",
"public String getBestActor() {\n\t\tdouble max = 0;\n\t\tString bestActor = \"\";\n\t\tfor(Actor actor : this.actorList) {\n\t\t\tdouble averageRating = 0;\n\t\t\tfor(Movie movie : actor.getMovies()) {\n\t\t\t\taverageRating += movie.getRating() / actor.getMovies().size();\n\t\t\t}\n\t\t\tif(averageRating > max) {\n\t\t\t\tmax = averageRating;\n\t\t\t\tbestActor = actor.getName();\n\t\t\t}\n\t\t}\n\t\treturn bestActor;\n\t}",
"@Test\n public void testGetLowest_03() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s2);\n instance.add(s1);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }",
"public Card getLastDrawnCard()\n\t{\n\t\treturn currentHand.get(getHandSize() - 1);\n\t}",
"public Document getBest (int awardID)\n \t{\n \t\tInteger hashCode = (Integer)awardIdReference.get(new Integer(awardID));\n \t\tObject[] dupls = theLoanList.getDupls(hashCode.intValue());\n \t\tDuplicateLoanDataVO dataVO = (DuplicateLoanDataVO)dupls[0];\n \t\treturn dataVO.getDocument();\n \t}",
"@Override\n public int higherScore() {\n if (!scoresUpToDate) {\n updateScores();\n }\n return higherScore;\n }",
"@Override\n public Note getHighest() {\n if (this.sheet.isEmpty()) {\n throw new IllegalArgumentException(\"No note is added.\");\n }\n Note currentHigh = new Note(this.high.getDuration(), this.high.getOctave\n (), this.high.getStartMeasure(), this.high.getPitch(), this.high\n .getIsHead(), this.high.getInstrument(), this.high.getVolume());\n for (int i = 0; i < this.sheet.size(); i++) {\n for (Note n : this.sheet.get(i)) {\n if (currentHigh.compareTo(n) == -1) {\n currentHigh = n;\n }\n }\n }\n return currentHigh;\n }",
"void updateSkill(Skill skill);",
"public T getBestElement() {\n\t\tT bestElement = null;\n\t\tdouble bestProb = -1;\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\tdouble thisProb = itemProbs_.get(element);\n\t\t\tif (thisProb > bestProb) {\n\t\t\t\tbestProb = thisProb;\n\t\t\t\tbestElement = element;\n\t\t\t}\n\t\t}\n\t\treturn bestElement;\n\t}",
"protected String getHighestCrest(int option, String date) {\n String buffer = null;\n String where = null;\n\n /* Create the query */\n String query = \"select stage, datcrst from crest\";\n\n /* Create the where clause from the desired option. */\n if (option == E19_GAGE_READING_CREST) {\n where = \" where lid = '\" + lid + \"' and hw is null \";\n } else if (option == E19_HIGH_WATERMARKS_CREST) {\n where = \" where lid = '\" + lid + \"' and hw = 'X' \";\n } else if (option == E19_TIME_CREST) {\n where = \" where lid = '\" + lid + \"' and datcrst >= '\" + date + \"'\";\n }\n\n where += \" order by stage desc \";\n\n /* Create the return string and return. */\n ArrayList<Object[]> rs = TextReportDataManager.getInstance()\n .getCrest(query + where);\n\n if ((rs != null) && (rs.size() > 0)) {\n Object[] oa = rs.get(0); // get the first record\n buffer = String.format(\"%s %10s\", oa[0],\n sdf.format((Date) oa[1]));\n }\n\n return buffer;\n }",
"public String getLastPlayed() {\n\t\treturn levelRunning;\n\t}",
"public String getNextQuestion() {\r\n\t\t// Condition for getting the exact question, starting from the first question in\r\n\t\t// the list. This will happen until the method reaches the end of the list with\r\n\t\t// questions.\r\n\t\tif (counter < questions.size()) {\r\n\t\t\tnextQuestion = questions.get(counter).getQuestion();\r\n\t\t\t// Incrementing the counter with one, so next time the method is called it will\r\n\t\t\t// get the following question from the list.\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\t// When the end of the list is reached the next question will take this value.\r\n\t\telse {\r\n\t\t\tnextQuestion = \"You completed the test!\";\r\n\t\t}\r\n\t\treturn nextQuestion;\r\n\r\n\t}",
"public Card getHighestCard() {\n Card rtrnCard = cardsPlayed[0];\n int i;\n int tempInt;\n int currentHighestRank = cardsPlayed[0].getIntValue();\n for(i = 0; i < cardsPlayed.length; i++){\n if(cardsPlayed[i].getSuit().equals(suit)){\n tempInt = cardsPlayed[i].getIntValue();\n if((currentHighestRank < tempInt)&&(!(cardsPlayed[i].equals(rtrnCard)))){\n rtrnCard = cardsPlayed[i];\n currentHighestRank = cardsPlayed[i].getIntValue();\n }\n }\n }\n return rtrnCard;\n }",
"@Test\n public void testGetLowest_01() {\n System.out.println(\"getLowest\");\n \n Skill s1 = mock(Skill.class);\n when(s1.getName()).thenReturn(\"Java\");\n when(s1.getType()).thenReturn(\"Technical\");\n when(s1.getCost()).thenReturn(2);\n when(s1.getLevel()).thenReturn(4);\n when(s1.getCostFormula()).thenReturn(Skill.PLUS_2);\n Skill s2 = mock(Skill.class);\n when(s2.getName()).thenReturn(\"C\");\n when(s2.getType()).thenReturn(\"Technical\");\n when(s2.getCost()).thenReturn(2);\n when(s2.getLevel()).thenReturn(5);\n when(s2.getCostFormula()).thenReturn(Skill.PLUS_2);\n \n SkillsList instance = new SkillsList();\n instance.add(s1);\n instance.add(s2);\n String result = instance.getLowest().getName();\n assertTrue(result.equals(\"Java\"));\n }",
"public LongFilter getSkillId() {\n\t\treturn skillId;\n\t}",
"public PlayerChoicePick getNextPlayerChoicePick();",
"List<Expenses> latestExpenses();",
"@Override\n public int getSkillLevel(int skillId) {\n final Skill skill = getKnownSkill(skillId);\n return (skill == null) ? 0 : skill.getLevel();\n }",
"com.google.protobuf.Duration getMaxExperience();",
"public T getLast(){\n\treturn _end.getCargo();\n }",
"public PracticeResult getHighestGradingByMember(Member member, String practiceType);",
"public double getSkillPknow (String stdId,String skill){\n double pknow = 0.0;\n Iterator<Document> cr;\n Document query = new Document();\n query = new Document(\"_id\", new ObjectId(stdId)).append(\"skills.name\",skill);\n MongoCursor<Document> cursor = studentSkills.find(query).iterator();\n try {\n // SKill already exists\n if (cursor.hasNext()){\n Document c = cursor.next();\n List<Document> skills = (List<Document>)c.get(\"skills\");\n cr = skills.iterator();\n try {\n while (cr.hasNext()){\n Document sk = cr.next();\n String name = (String)sk.get(\"name\");\n System.out.println(name);\n if (name!=null && name.equals(skill)){\n pknow = (double)sk.get(\"pknown\");\n System.out.println(pknow);\n }\n }\n // System.out.println(c.toJson(),skills);\n\n\n }\n finally {\n cursor.close();\n }\n }\n // SKill is new for student\n else{\n System.out.println(\"Adding no existing skill for user, with default values\");\n this.addSkill(stdId,skill,\"none\");\n return 0.3;\n\n }\n } finally {\n cursor.close();\n }\n return pknow;\n}",
"public Item getLast();",
"public String getLastItem();",
"public static MyStudent SecondHighest (List<MyStudent> list) {\n\t\t\t\n\t\t\treturn list.stream().sorted(Comparator.comparing(MyStudent::getScore)).skip(list.size()-2).findFirst().get();\n\t\t\t\n\t\t}",
"Object getWorst();",
"public String getTaunt() {\n\t\tRandom rand = new Random();\n\t\tint n = rand.nextInt(3); // creates a random int\n\t\treturn taunts.get(n); // returns the taunt at that index\n\t}",
"public Timestamp getLastCompetition() {\r\n return lastCompetition;\r\n }",
"public Ability getConfigurationSkill() {\n\n\n if (frameworkAbility.hasAdvantage(advantageCosmic.advantageName) || frameworkAbility.hasAdvantage(advantageNoSkillRollRequired.advantageName)) {\n return null;\n } else {\n ParameterList pl = frameworkAbility.getPowerParameterList();\n Ability skill = null;\n\n Object o = pl.getParameterValue(\"Skill\");\n if (o instanceof AbilityAlias) {\n skill = ((AbilityAlias) o).getAliasReferent();\n } else if (o instanceof Ability) {\n skill = (Ability) o;\n }\n\n return skill;\n }\n }"
] | [
"0.6256682",
"0.62187415",
"0.59974897",
"0.5978891",
"0.58995587",
"0.5886109",
"0.5868843",
"0.58684075",
"0.58507997",
"0.5796231",
"0.575883",
"0.5665246",
"0.56478494",
"0.56172514",
"0.55152",
"0.5494056",
"0.5461567",
"0.54353124",
"0.5423448",
"0.5408343",
"0.54014885",
"0.53937596",
"0.5376703",
"0.5370548",
"0.5361337",
"0.53598315",
"0.5352114",
"0.5350928",
"0.5344359",
"0.53440887",
"0.53284633",
"0.53055006",
"0.5302355",
"0.5282992",
"0.52733713",
"0.5268171",
"0.52542496",
"0.5232591",
"0.52300847",
"0.5226812",
"0.5221897",
"0.5206566",
"0.52061296",
"0.51847684",
"0.5178662",
"0.51632744",
"0.516324",
"0.5160661",
"0.5157742",
"0.5153866",
"0.51495606",
"0.51373494",
"0.5123231",
"0.5121265",
"0.51148343",
"0.5099407",
"0.5053788",
"0.50241137",
"0.5020985",
"0.50180334",
"0.50046784",
"0.5000932",
"0.49965382",
"0.49872866",
"0.4980671",
"0.4978688",
"0.49704504",
"0.496374",
"0.49585423",
"0.4948515",
"0.49465677",
"0.49436393",
"0.4939864",
"0.4936481",
"0.4935273",
"0.49345148",
"0.4932855",
"0.4924897",
"0.49134773",
"0.49074024",
"0.48938727",
"0.48896685",
"0.4889352",
"0.48800325",
"0.48698524",
"0.48642164",
"0.48629934",
"0.48613736",
"0.48478314",
"0.48464897",
"0.48436195",
"0.48424482",
"0.48325247",
"0.48289287",
"0.4826001",
"0.48221093",
"0.48213252",
"0.48159534",
"0.48068863",
"0.48059073"
] | 0.6660836 | 0 |
Get the player type. | public PlayerTypes getPlayerType(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPlayerType() {\r\n return playerType;\r\n\t}",
"public int getPlayerType() {\r\n\t\treturn Player.RANDOM_PLAYER;\r\n\t}",
"@Override\n\tpublic PlayerType getPlayerType() {\n\t\treturn PlayerType.COMPUTER;\n\t}",
"@Override\n public PlayerType getPlayerType(int player) {\n if (player == 0) {\n return PlayerType.HUMAN;\n }\n return PlayerType.CPU;\n }",
"public void setPlayerType(String type) {\r\n playerType = type;\r\n\t}",
"public String getGameType() {\n return gameType;\n }",
"public static GameType getGameType() {\n\t\treturn type;\n\t}",
"public int getPlaybackType() {\n return mBundle.getInt(KEY_PLAYBACK_TYPE);\n }",
"public String getLoadPlayerType1(){\n return m_LoadPlayerType1;\n }",
"public static int getGameType()\n\t{\n\t\treturn -1;\n\t}",
"@Override\n\tpublic String getPlayerClass()\n\t{\n\t\treturn source.getPlayerClass();\n\t}",
"SpawnType getGameSpawnType();",
"public int getType()\n {\n return pref.getInt(KEY_TYPE, 0);\n }",
"public static PlayerType playerType(int playerID) {\n return TUIMenu.displayValueMenu(\n String.format(\"Choisissez le type de joueur pour le joueur %d :\", playerID),\n List.of(\n new SupplierAction<>() {\n public String name() {\n return \"Joueur réel\";\n }\n\n public PlayerType get() {\n return PlayerType.REAL_PLAYER;\n }\n },\n new SupplierAction<>() {\n public String name() {\n return \"IA basique\";\n }\n\n public PlayerType get() {\n return PlayerType.BASIC_AI;\n }\n }\n )\n );\n }",
"public String getLoadPlayerType2(){\n return m_LoadPlayerType2;\n }",
"public String type() {\n return \"Pawn\";\n }",
"public Player(String type){\n \n this.type = type;\n }",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getType();",
"String getActorType();",
"public String getLoadGameType(){\n return m_LoadGameType;\n }",
"public char getType() {\r\n return type.charAt(1);\r\n }",
"String getPlayer();",
"public char getType() {\r\n return type;\r\n }",
"public String getType() {\n\t\treturn String.valueOf(this.pieceType);\n\t}",
"public static String getType() {\n\t\treturn type;\n\t}",
"public String getType()\r\n {\r\n return mType;\r\n }",
"String getType() {\n return type;\n }",
"public char getType() {\n return type;\n }",
"public char getType() {\n return type;\n }",
"public CardTypes getType() {\n\t\treturn type;\n\t}",
"public String get_type()\r\n\t{\r\n\t\treturn this.type;\r\n\t}",
"String getType() {\n return mType;\n }",
"public String getType()\r\n {\r\n return type;\r\n }",
"String getTileType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public String getType();",
"public TurnType getType() {\n\t\treturn type;\n\t}",
"public char getType() {\n\t\treturn type;\n\t}",
"public String getType()\n \t{\n \t\treturn this.type;\n \t}",
"public String getType() {\n return m_Type;\n }",
"@java.lang.Override\n public speech.multilang.Params.ScoringControllerParams.Type getType() {\n @SuppressWarnings(\"deprecation\")\n speech.multilang.Params.ScoringControllerParams.Type result = speech.multilang.Params.ScoringControllerParams.Type.valueOf(type_);\n return result == null ? speech.multilang.Params.ScoringControllerParams.Type.UNKNOWN : result;\n }",
"public String obtenirType() {\n\t\treturn this.type;\n\t}",
"public final String type() {\n return type;\n }",
"interface Player {\n /**\n * player playing as hare\n */\n int PLAYER_TYPE_HARE = 100;\n\n /**\n * player playing as hound\n */\n int PLAYER_TYPE_HOUND = 101;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n {\n return type;\n }",
"public String getPlayerName(String szMIMEType)\r\n { \r\n if (szMIMEType == null)\r\n return null;\r\n\r\n Object player = m_hashTable.get(szMIMEType);\r\n if (player == null) \r\n return null;\r\n return (String)player;\r\n }",
"public String getType() \n {\n return type;\n }",
"public String getType() {\n /**\n * @return type of Ice Cream\n */\n return type;\n }",
"@java.lang.Override public speech.multilang.Params.ScoringControllerParams.Type getType() {\n @SuppressWarnings(\"deprecation\")\n speech.multilang.Params.ScoringControllerParams.Type result = speech.multilang.Params.ScoringControllerParams.Type.valueOf(type_);\n return result == null ? speech.multilang.Params.ScoringControllerParams.Type.UNKNOWN : result;\n }",
"public String getType()\n {\n return type;\n }",
"public String getType()\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\treturn typeElement == null ? null : typeElement.getTextContent();\n\t\t}",
"public char getType() {\n return this.type;\n }",
"public String getType() {\n return (String) getObject(\"type\");\n }",
"@Override\n\tpublic EntityType getDefenderType() {\n\t\treturn EntityType.PLAYER;\n\t}",
"public final String getType() {\n return this.type;\n }",
"public char getType(){\n\t\treturn type;\n\t}",
"public char getType() {\n return this._type;\n }",
"public String getType()\r\n\t{\r\n\t\treturn type;\r\n\t}",
"public String getType()\n {\n\treturn type;\n }",
"public String getType() {\r\n return type;\r\n }"
] | [
"0.8473364",
"0.76284903",
"0.73377967",
"0.7250887",
"0.7055517",
"0.7041719",
"0.69931585",
"0.6838364",
"0.65337515",
"0.6525413",
"0.6504234",
"0.6431779",
"0.6410771",
"0.6346397",
"0.6298465",
"0.6280461",
"0.623957",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.62326974",
"0.6225874",
"0.6214581",
"0.6188085",
"0.6167545",
"0.6118366",
"0.6113964",
"0.6104604",
"0.61037725",
"0.6096633",
"0.60871744",
"0.60871744",
"0.6076268",
"0.606313",
"0.6059587",
"0.60566205",
"0.6055261",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.6045304",
"0.60438067",
"0.6024791",
"0.6016838",
"0.6005217",
"0.6002383",
"0.59953195",
"0.59951204",
"0.59949243",
"0.5990623",
"0.5990623",
"0.5990623",
"0.5990623",
"0.5990623",
"0.5990623",
"0.5988097",
"0.59871566",
"0.5983182",
"0.5975349",
"0.5973995",
"0.597393",
"0.59697664",
"0.5969092",
"0.5968897",
"0.5962364",
"0.5960528",
"0.5958141",
"0.5955775",
"0.59462816",
"0.59461594"
] | 0.87039226 | 0 |
DatabaseReference cambien1=states.child("CAM_BIEN_1"); DatabaseReference cambien2=states.child("CAM_BIEN_2"); DatabaseReference cambien3=states.child("CAM_BIEN_3"); DatabaseReference cambien4=states.child("CAM_BIEN_4"); led1 | @Override
public void onDataChange(DataSnapshot dataSnapshot) {
if (dataSnapshot.child("states").child("CAM_BIEN_1").getValue().toString().equalsIgnoreCase("true")){
led1.setText("led1 on");
}else
led1.setText("led1 off");
//led2
if (dataSnapshot.child("states").child("CAM_BIEN_2").getValue().toString().equalsIgnoreCase("true")){
led2.setText("led2 on");
}else
led2.setText("led2 off");
//led3
if (dataSnapshot.child("states").child("CAM_BIEN_3").getValue().toString().equalsIgnoreCase("true")){
led3.setText("led3 on");
}else
led3.setText("led3 off");
//led4
if (dataSnapshot.child("states").child("CAM_BIEN_4").getValue().toString().equalsIgnoreCase("true")){
led4.setText("led4 on");
}else
led4.setText("led4 off");
//switch
if (dataSnapshot.child("states").child("autoupdate").getValue().toString().equalsIgnoreCase("true")){
mswitch.setChecked(true);
}else
mswitch.setChecked(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void iniciarBaseDeDatos(){\n db_reference = FirebaseDatabase.getInstance().getReference();\n\n }",
"private void iniciarFirebase(){\n FirebaseApp.initializeApp(getApplicationContext());\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_simply);\n DatabaseReference root= FirebaseDatabase.getInstance().getReference();\n DatabaseReference aaa,bbb;\n\n a= (ArrayList<String>) getIntent().getSerializableExtra(\"key\");\n\n ProgressBar pb=(ProgressBar)findViewById(R.id.progressBar3);\n\n\n//aaa = root.child(\"items\").child(a.get(i)).child(\"cost\");\n\n aaa = root.child(a.get(i)).child(\"cost\");\n bbb = root.child(a.get(i)).child(\"name\");\n //Toast.makeText(getApplicationContext(),a.get(0),Toast.LENGTH_SHORT).show();\n\n\n root.addListenerForSingleValueEvent(new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n ding = dataSnapshot.getValue().toString();\n\n for(i=0;i<a.size();i++){\n\n b.add(dataSnapshot.child(a.get(i)).child(\"cost\").getValue().toString());\n }\n\n op();\n }\n\n\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n root.addListenerForSingleValueEvent(new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n wastefellow = dataSnapshot.getValue().toString();\n\n for(i=0;i<a.size();i++){\n\n c.add(dataSnapshot.child(a.get(i)).child(\"name\").getValue().toString());\n }\n\n op();\n }\n\n\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String value = dataSnapshot.getValue().toString();\n Toast.makeText(Alertothers.this, value, Toast.LENGTH_SHORT).show();\n Duid=value;\n if(Duid.length()>=10)\n {\n //myRefambu=database.getReference(\"Ambulances/\"+Duid);\n myRefAge=database.getReference(\"Ambulances/\"+Duid+\"/PAge\");\n myRefBloodgr=database.getReference(\"Ambulances/\"+Duid+\"/PBloodGr\");\n lat=database.getReference(\"Ambulances/\"+Duid+\"/PLat\");\n lon=database.getReference(\"Ambulances/\"+Duid+\"/PLon\");\n name=database.getReference(\"Ambulances/\"+Duid+\"/PName\");\n relmob1=database.getReference(\"Ambulances/\"+Duid+\"/PRelMob1\");\n puid=database.getReference(\"Ambulances/\"+Duid+\"/PUID\");\n // if(Duid.length()==28) {\n myRefAge.setValue(\"N/A\");\n name.setValue(\"N/A\");\n lat.setValue(\"N/A\");\n lon.setValue(\"N/A\");\n myRefBloodgr.setValue(\"N/A\");\n relmob1.setValue(\"N/A\");\n puid.setValue(\"N/A\");\n // }\n myRefdname.setValue(\"N/A\");\n myRefduid.setValue(\"N/A\");\n myRefaccident.setValue(\"N/A\");\n dialog.dismiss();\n Intent intent=new Intent(Alertothers.this,MainActivity.class);\n startActivity(intent);\n\n }\n //Log.d(TAG, \"Value is: \" + value);\n }",
"void CheckFirebase(String bks)\n {\n DBR = FDB.getReference(\"Books\");\n //DBR.orderByChild(\"NAME\").equals(b);\n b = bks.split(\",\");\n i=0;\n DBR.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n //if(data.NAME.equals(b))\n\n // Toast.makeText(ViewBooksActivity.this, \"***\"+dataSnapshot.getKey(), Toast.LENGTH_SHORT).show();\n if(dataSnapshot.getKey().equals(b[i]) && i<b.length)\n {\n MyDataSetGet data = dataSnapshot.getValue(MyDataSetGet.class);\n // Toast.makeText(ViewBooksActivity.this, \"value aded\"+i, Toast.LENGTH_SHORT).show();\n listData.add(data);\n i++;\n\n }\n rv2.setAdapter(adapter);\n }\n\n\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"private void getBoulderData(DataSnapshot dataSnapshot, int j, String gym, String zone,\n String colour){\n\n // set the boulder class\n boulder_class.setText(dataSnapshot.child(\"gym\")\n .child(gym)\n .child(zone)\n .child(colour)\n .child(\"boulder\" + j)\n .child(\"classs\")\n .getValue().toString());\n // set the text colour based on class\n Log.d(TAG, \"preSetTextColor\");\n // setTextColor(boulder_class.getText().toString());\n\n // set the boulder grade\n boulder_grade.setText(dataSnapshot.child(\"gym\")\n .child(gym)\n .child(zone)\n .child(colour)\n .child(\"boulder\" + j)\n .child(\"grade\")\n .getValue().toString());\n\n // calculate flash points with boulder grade\n Log.d(TAG, \"preCalculateFlashPoints\");\n String points = calculateFlashPoints(boulder_grade.getText().toString());\n boulder_points.setText(points);\n\n // set the average tries\n\n boulder_avgTries.setText(dataSnapshot.child(\"gym\")\n .child(gym)\n .child(zone)\n .child(colour)\n .child(\"boulder\" + j)\n .child(\"avg_tries\")\n .getValue().toString());\n\n }",
"private void getInfo() {\n mDatabaseReference.child(studentID).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n\n student = dataSnapshot.getValue(Student.class);\n student.setStuID(dataSnapshot.getKey().toString());\n bus.setID(dataSnapshot.child(\"busID\").getValue().toString());\n busStop.setBusStopID(dataSnapshot.child(\"busID\").getValue().toString());\n parent.setPatentID(dataSnapshot.child(\"parentID\").getValue().toString());\n getBusList();\n showInfo();\n } else {\n progressBar.dismiss();\n Toast.makeText(getActivity(), R.string.error_database, Toast.LENGTH_SHORT).show();\n }\n }\n\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n if (databaseError != null) {\n Toast.makeText(getActivity(), R.string.error_database, Toast.LENGTH_SHORT).show();\n }\n\n }\n });\n\n }",
"private void setupFirebase() {\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n mFirebaseDatabaseReference = mFirebaseDatabase.getReference().child(Constants.ROOM_DATABASE_REFERENCE);\r\n mQuery = mFirebaseDatabaseReference.orderByChild(Constants.ROOM_INT_REFERENCE).startAt(Utils.convertHallStart(mHallStart)).endAt(Utils.convertHallEnd(mHallEnd));\r\n }",
"public void retrieveAllTeamsFromDatabase(String dbMemberName) {\n\n DatabaseReference dbReference = FirebaseDatabase.getInstance().getReference().child(dbMemberName);\n Log.d(\">>>>>\", \"Starting method\");\n isTeamsRetrieved = false;\n// teamsList.clear();\n\n dbReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n teamsList.clear();\n Log.d(\">>>>>\", \"On 1 st method\");\n for (DataSnapshot postSnapshot : snapshot.getChildren()) {\n Log.d(\">>>>>\", \"On 2 nd method\");\n team = postSnapshot.getValue(Team.class);\n teamsList.add(team);\n\n // here you can access to name property like university.name\n System.out.println(\">>>>> Retrieving team -> \" + team);\n\n if (!isTeamsRetrieved) {\n isTeamsRetrieved = true;\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n System.out.println(\"The read failed: \" + databaseError.getMessage());\n }\n });\n }",
"private void initFirebase() {\n FirebaseApp.initializeApp(this);\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n storageReference = FirebaseStorage.getInstance().getReference();\n }",
"public void chargerLesParcours() {\n refParcours.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n Log.d(\"PARCOURS ADDED (snap)\", dataSnapshot.getKey()+\"\");\n addParcoursFromFirebase(evenementFactory.parseParcours(dataSnapshot));\n }\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {}\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {}\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {}\n @Override\n public void onCancelled(DatabaseError databaseError) {}\n });\n }",
"public static DatabaseReference get_database_reference(String node) {\n DatabaseReference myRef = FirebaseDatabase.getInstance().getReference(node);\n return myRef;\n }",
"private void subirDispositivo(){\n DatabaseReference subir_data = db_reference.child(\"Dispositivo\");\n Map<String, String> dataDispositivo = new HashMap<String, String>();\n dataDispositivo.put(\"Evento\", etNombreCurso.getText().toString());\n dataDispositivo.put(\"Latitud1\", disp_Lat1);\n dataDispositivo.put(\"Longitud1\", disp_Long1);\n dataDispositivo.put(\"Latitud2\", disp_Lat2);\n dataDispositivo.put(\"Longitud2\", disp_Long2);\n subir_data.push().setValue(dataDispositivo);\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n\n ArrayList<Locomotive> list = new ArrayList<>();\n for (DataSnapshot d : dataSnapshot.getChildren()) {\n list.add(d.getValue(Locomotive.class));\n }\n reading.setReadings(list);\n //Log.d(\"readings size\",reading.getReadings().size()+\"\");\n //Log.d(\"list:\",list.toString());\n //Log.d(\"reading:\",reading.getReadings().toString());\n }",
"public void leerBaseDatos(){\n if(connected == true){\n final FirebaseDatabase database = FirebaseDatabase.getInstance();\n\n DatabaseReference ref = database.getReference().child(\"kitDeSensores\").child(id);\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n kitSensoresDatos post = dataSnapshot.getValue(kitSensoresDatos.class);\n if(post ==null){\n fuego.setText(\"El sensor no tiene datos para mostrar\");\n temperatura.setText(\"El sensor no tiene datos para mostrar\");\n humedad.setText(\"El sensor no tiene datos para mostrar\");\n humo.setText(\"El sensor no tiene datos para mostrar\");\n Log.d(\"Humedad obtenidad\", String.valueOf(humo));\n }else{\n String fuegoExiste;\n if(String.valueOf(post.getFuego()).equals(\"0\")){\n fuegoExiste = \"No\";\n }else{\n fuegoExiste = \"Si\";\n }\n fuego.setText(fuegoExiste);\n temperatura.setText(String.valueOf(post.getTemperatura()) + \" °C\");\n humo.setText(String.valueOf(post.getGas()) + \" ppm\");\n humedad.setText(String.valueOf(post.getHumedad()) + \" %\");\n }\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }else{\n fuego.setText(\"No tienes conexion a internet\");\n temperatura.setText(\"No tienes conexion a internet\");\n humedad.setText(\"No tienes conexion a internet\");\n humo.setText(\"No tienes conexion a internet\"); }\n }",
"public RecipeDatabase() {\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference AllRecipeRef = database.getReference(\"allRecipes\");\n DatabaseReference newRecipeRef = AllRecipeRef.push();\n newRecipeRef.setValue(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n }",
"private void allDeliveryInformation() {\n DatabaseReference deliveryFeeRef = FirebaseDatabase.getInstance().getReference().child(\"Delivery Details\");\n deliveryFeeRef.child(\"personnelDelivery\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if (dataSnapshot.hasChild(\"amount\")){\n personnelDeliveryFee = dataSnapshot.child(\"amount\").getValue().toString();\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n deliveryFeeRef.child(\"postBoxDelivery\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()){\n if (dataSnapshot.hasChild(\"amount\")){\n postBoxDeliveryFee = dataSnapshot.child(\"amount\").getValue().toString();\n }\n\n if (dataSnapshot.hasChild(\"InnerMessage\")){\n postBoxDeliveryMessage = dataSnapshot.child(\"InnerMessage\").getValue().toString();\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"private void getComputers() {\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Computer\");\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot ds : dataSnapshot.getChildren()) {\n Computer c = ds.getValue(Computer.class);\n computers.add(c);\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }",
"private void cargarDatosFirebase(){\n dbRef = FirebaseDatabase.getInstance().getReference().child(\"jugadores\");\n\n //añadimos el evento que no va a devolver los valores\n valueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n listaJugadores.clear();\n for (DataSnapshot jugadoresDataSnapshot: dataSnapshot.getChildren()){\n cargarListView(jugadoresDataSnapshot);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.e(\"ActivityParte2\", \"DATABASE ERROR\");\n }\n };\n //asignamos el evento para que sea a tiempo real\n dbRef.addValueEventListener(valueEventListener);\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n\n for (DataSnapshot student_snapshot : dataSnapshot.getChildren()) {\n //databaseStudent ref = student_snapshot.getValue(DatabaseReference.class);\n // for(DataSnapshot s2 : student_snapshot.child(\"Company_msg\").getChildren()){\n\n String s=student_snapshot.child(\"companyName\").getValue(String.class);\n holder.b_company.setText(userlist.get(position).getCompany().toString());\n\n\n //}\n }\n\n }",
"private void initFirebase() {\n database = FirebaseDatabase.getInstance();\n user = FirebaseAuth.getInstance().getCurrentUser();\n dRef = database.getReference(\"Trails\");\n }",
"private void initDatabase(){\n\n mChildEventListener=new ChildEventListener() {\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n androidDatabase.addChildEventListener(mChildEventListener);\n }",
"public void cekNotif(){\n try{\n Gref.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n\n\n\n String a = dataSnapshot.child(\"to_id\").getValue().toString();\n\n if (a.equals(BerandaActivity.id)){\n\n Toast.makeText(context.getApplicationContext(),\"Ada pesan komunitas baru\",Toast.LENGTH_SHORT).show();\n }\n\n\n\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });}\n catch (Exception e){\n\n Log.e(\"eror add child : \",\"\"+e);\n }\n\n }",
"private void defaultvalues(){\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Groceries\");\n cat1.setImage(\"https://i.imgur.com/XhTjOMu.png\");\n databaseReference.child(\"Groceries\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Books\");\n cat1.setImage(\"https://i.imgur.com/U9tdGo6_d.webp?maxwidth=760&fidelity=grand\");\n databaseReference.child(\"Books\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Furniture\");\n cat1.setImage(\"https://i.imgur.com/X0qnvfp.png\");\n databaseReference.child(\"Furniture\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Appliances\");\n cat1.setImage(\"https://i.imgur.com/UpUzKwA.png\");\n databaseReference.child(\"Appliances\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n\n }",
"private void dispositivoGPS(String nameDisp){\n DatabaseReference db_dispositivo = db_reference.child(\"Registros\");\n\n db_dispositivo.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Boolean existe = false;\n HashMap<String, String> info_disp = null;\n\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if (snapshot!=null && snapshot.getKey().equals(edtDispositivo.getText().toString())){\n System.out.println(nameDisp+\"hola\");\n info_disp =(HashMap<String, String>) snapshot.getValue();\n existe = true;\n break;\n }\n }\n if (existe && info_disp!=null) {\n System.out.println(existe);\n DatabaseReference db_dispo = db_dispositivo.child(nameDisp);\n db_dispo.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n HashMap<String, String> info_dps = null;\n String key = null;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n info_dps =(HashMap<String, String>) dataSnapshot.getValue();\n key=snapshot.getKey();\n break;\n }\n if (info_dps!=null && key!=null) {\n\n DatabaseReference base = db_dispo.child(key);\n base.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n HashMap<String, String> info =null;\n HashMap<String, String> punto =null;\n Boolean nulidad = false;\n String keydato = null;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()){\n info = (HashMap<String, String>) dataSnapshot.getValue();\n if (info!=null) {\n if (!info.get(\"lat\").equals(\"0\")) {\n punto = (HashMap<String, String>) dataSnapshot.getValue();\n nulidad = true;\n keydato = dataSnapshot.getKey();\n System.out.println(keydato);\n break;\n }\n System.out.println(\"no existe\");\n }\n }\n if (punto!=null && nulidad && keydato!=null){\n System.out.println(info);\n System.out.println(\"aki\");\n if (numDispositivo == 1) {\n disp_Lat1 = punto.get(\"lat\");\n disp_Long1 = punto.get(\"long\");\n estadoBateria = punto.get(\"estBateria\");\n System.out.println(numDispositivo);\n System.out.println(numDispositivo);\n System.out.println(disp_Lat1 + \"-\" + disp_Long1);\n System.out.println(disp_Lat2 + \"-\" + disp_Long2);\n Toast.makeText(FormularioCurso.this, \"La bateria de su dispositivo es: \" + estadoBateria, Toast.LENGTH_SHORT).show();\n DatabaseReference eliminar = db_reference.child(\"Registros\").child(nameDisp);\n eliminar.child(keydato).removeValue();\n }\n if (numDispositivo == 2) {\n disp_Lat2 = punto.get(\"lat\");\n disp_Long2 = punto.get(\"long\");\n estadoBateria = punto.get(\"estBateria\");\n System.out.println(numDispositivo);\n System.out.println(disp_Lat1 + \"-\" + disp_Long1);\n System.out.println(disp_Lat2 + \"-\" + disp_Long2);\n Toast.makeText(FormularioCurso.this, \"La bateria de su dispositivo es: \" + estadoBateria, Toast.LENGTH_SHORT).show();\n DatabaseReference eliminar = db_reference.child(\"Registros\").child(nameDisp);\n eliminar.child(keydato).removeValue();\n }\n Guardar();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Log.e(TAG, \"Error!\", databaseError.toException());\n }\n });\n\n }else{\n System.out.println(\"falla disp\");\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Log.e(TAG, \"Error!\", databaseError.toException());\n }\n });\n\n }else{\n Toast.makeText(FormularioCurso.this, \"El codigo o nombre del dispositivo ingresado no existe.\", Toast.LENGTH_SHORT).show();\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Log.e(TAG, \"Error!\", databaseError.toException());\n }\n });\n }",
"@Override\n //****OnDataChange Method - this will only be called when the data on Firebase changes\n // If your program previously worked and then stopped all of a suddent\n // check the database to ensure that the data is actually changing. Good form\n // is to provide your users a Last Updated data item which can be retrieved\n // and checked.\n public void onDataChange(DataSnapshot snapshot) {\n s = dropdown.getSelectedItem().toString();\n\n //*** get a picture of the child data your are attempting to bring back\n System.out.println(\"****** THIS IS WHAT DATA LOOKS LIKE --- START\");\n System.out.println(snapshot.child(s));\n System.out.println(snapshot.child(s).getKey());\n System.out.println(\"****** THIS IS WHAT DATA LOOKS LIKE --- END\");\n //*** Make sure your class looks exactly like what is being returned\n\n\n // Credits and Last Updated\n // System.out.println(\"DATA LAST UPDATED: \"+ snapshot.child(\"_updated\").getValue());\n _updated.setText(snapshot.child(\"_updated\").getValue().toString());\n _credits.setText(snapshot.child(\"_credits\").getValue().toString());\n\n //Get the subset of data you want from your Class object. \"s\" is the key of the data you want\n mAirportDelays = snapshot.child(s).getValue(AirportDelays.class);\n delayInfoTextView.setText(\"\");\n cityTextview.setText(mAirportDelays.getCity() + \",\");\n stateTextView.setText(\" \" + mAirportDelays.getState());\n if (!mAirportDelays.getDelay()) {\n delayString = \" No Delays \";\n airportName.setTextColor(Color.BLACK);\n cityTextview.setTextColor(Color.BLACK);\n stateTextView.setTextColor(Color.BLACK);\n\n // mlayout.setBackgroundColor(Color.WHITE);\n\n } else {\n delayString = \" DELAYS REPORTED\";\n\n cityTextview.setTextColor(Color.RED);\n stateTextView.setTextColor(Color.RED);\n airportName.setTextColor(Color.RED);\n delayInfoTextView.setText(\n \"Closure Began - \" + mAirportDelays.status.getClosureBegin() + \"\\n\" +\n \"Reason - \" + mAirportDelays.status.getReason() + \"\\n\" +\n \"Minimum Delay - \" + mAirportDelays.status.getMinDelay() + \"\\n\" +\n \"Maximum Delay - \" + mAirportDelays.status.getMaxDelay() + \"\\n\" +\n \"Average Delay - \" + mAirportDelays.status.getAvgDelay() + \"\\n\" +\n \"Trend - \" + mAirportDelays.status.getTrend() + \"\\n\" +\n \"Type of Delay - \" + mAirportDelays.status.getType() + \"\\n\" +\n \"Closure Ends - \" + mAirportDelays.status.getClosureEnd() + \"\\n\" +\n \"End Time - \" + mAirportDelays.status.getEndTime());\n // mlayout.setBackgroundColor(Color.RED);\n\n }\n windTextView.setText(\"WIND | \" + mAirportDelays.weather.getWind());\n tempTextview.setText(\"TEMPERATURE | \" + mAirportDelays.weather.getTemp());\n visibilityTextView.setText(\"VISIBILITY | \" + mAirportDelays.weather.getVisibility().toString() + \" Miles\");\n weatherTextView.setText(\"WEATHER | \" + mAirportDelays.weather.getWeather());\n setTitle(mAirportDelays.getName() + delayString);\n airportName.setText(mAirportDelays.getIATA());\n }",
"private void saveFilterData(){\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\n\n databaseBleed = FirebaseDatabase.getInstance().getReference().child(\"bleeds\").child(uid);\n\n String bleedLocation = txtLocation.getText().toString();\n String bleedCause = txtCause.getText().toString();\n String bleedSeverity = txtSeverity.getText().toString();\n\n Intent Filterintent = new Intent(getActivity(), ViewAllBleeds.class);\n\n Filterintent.putExtra(\"BLEED_LOCATION\", bleedLocation);\n Filterintent.putExtra(\"BLEED_CAUSE\", bleedCause);\n Filterintent.putExtra(\"BLEED_SEVERITY\", bleedSeverity);\n startActivity(Filterintent);\n\n }",
"@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n mFirebaseDatabaseReference = mFirebaseDatabase.getReference().child(\"room\");\r\n super.onCreate(savedInstanceState);\r\n }",
"private void getData() {\n serviceReference = mFirebaseInstance.getReference(\"Service\");\n serviceReference.child(Common.barbershopSelected).child(Common.serviceSelected)\n .addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Service currentService = dataSnapshot.getValue(Service.class);\n\n service = currentService.getNama();\n totalharga = currentService.getHarga();\n txtTotal.setText(totalharga);\n txtService.setText(service);\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n // get reference to 'barberman'\n barbermanReference = mFirebaseInstance.getReference(\"Barberman\");\n barbermanReference.child(Common.barbershopSelected).child(Common.barbermanSelected)\n .addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Barberman currentBarberman = dataSnapshot.getValue(Barberman.class);\n\n barberman = currentBarberman.getNama();\n txtBarberman.setText(barberman);\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n // get 'jadwal'\n jadwal = Common.jadwalSelected;\n txtJadwal.setText(jadwal);\n\n// jadwalReference = mFirebaseInstance.getReference(\"Jadwal\");\n// jadwalReference.child(Common.barbershopSelected).child(Common.jadwalSelected)\n// .addValueEventListener(new ValueEventListener() {\n// @Override\n// public void onDataChange(DataSnapshot dataSnapshot) {\n// Jadwal currentJadwal = dataSnapshot.getValue(Jadwal.class);\n//\n// jadwal = currentJadwal.getWaktu();\n// txtJadwal.setText(jadwal);\n//\n// }\n//\n// @Override\n// public void onCancelled(DatabaseError databaseError) {\n//\n// }\n// });\n\n // get reference to 'barbershop'\n barbershopReference = mFirebaseInstance.getReference(\"Barbershop\");\n barbershopReference.child(Common.barbershopSelected)\n .addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Barbershop currentBarbershop = dataSnapshot.getValue(Barbershop.class);\n\n barbershop = currentBarbershop.getNama();\n phoneBarbershop = currentBarbershop.getPhone();\n\n txtBarbershop.setText(barbershop);\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n // get reference to 'user'\n barbershopReference = mFirebaseInstance.getReference(\"Users\");\n barbershopReference.child(userId)\n .addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User currentUser = dataSnapshot.getValue(User.class);\n\n phoneUser = currentUser.getPhone();\n\n txtBarbershop.setText(barbershop);\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }",
"public void retrieveAllPlayersFromDatabase(String dbMemberName) {\n DatabaseReference dbReference = FirebaseDatabase.getInstance().getReference().child(dbMemberName);\n Log.d(\">>>>>\", \"Starting method\");\n isPlayersRetrieved = false;\n\n dbReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n Log.d(\">>>>>\", \"On 1 st method\");\n playersList.clear();\n for (DataSnapshot postSnapshot : snapshot.getChildren()) {\n Log.d(\">>>>>\", \"On 2 nd method\");\n player = postSnapshot.getValue(Player.class);\n playersList.add(player);\n\n // here you can access to name property like university.name\n System.out.println(\">>>>> Retrieving player -> \" + player);\n\n if (!isPlayersRetrieved) {\n isPlayersRetrieved = true;\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n System.out.println(\"The read failed: \" + databaseError.getMessage());\n }\n });\n }",
"void save_Online(String firebase_id){\n\n DatabaseReference records_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.records_ref));\n DatabaseReference all_users_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.all_users));\n\n User_Class klinuser = common.userBundle(registration_bundle);\n\n if (klinuser != null){\n String cell_number = \"0\"+String.valueOf(klinuser.getNumber());\n records_ref.child(cell_number).child(\"uid\").setValue(klinuser.getFirebaseID());\n\n //save user details to All_Users/Biography/Uid\n all_users_ref.child(firebase_id).setValue(klinuser);\n loadBioData_online(firebase_id);\n }\n\n\n }",
"private void Reader(View view){\n DatabaseReference ref = mainRef.child(\"management\").child(\"staff\");\n\n // Reading The Reference\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull @NotNull DataSnapshot snapshot) {\n for (DataSnapshot d1 : snapshot.getChildren()){\n //\n String id = \"\";\n String username = \"\";\n String password = \"\";\n String name = \"\";\n String phone = \"\";\n String address = \"\";\n String position = \"\";\n String salary = \"\";\n String email = \"\";\n int lvl = 99;\n //\n for (DataSnapshot d2 : d1.getChildren()){\n if (d2.getKey().equals(\"id\")){ id = d2.getValue().toString();}\n if (d2.getKey().equals(\"username\")){ username = d2.getValue().toString();}\n if (d2.getKey().equals(\"password\")){ password = d2.getValue().toString();}\n if (d2.getKey().equals(\"name\")){ name = d2.getValue().toString();}\n if (d2.getKey().equals(\"phone\")){ phone = d2.getValue().toString();}\n if (d2.getKey().equals(\"address\")){ address = d2.getValue().toString();}\n if (d2.getKey().equals(\"position\")){ position = d2.getValue().toString();}\n if (d2.getKey().equals(\"salary\")){ salary = d2.getValue().toString();}\n if (d2.getKey().equals(\"email\")){ email = d2.getValue().toString();}\n if (d2.getKey().equals(\"lvl\")){ lvl = Integer.parseInt(d2.getValue().toString());}\n }\n //\n Staff tempMem = new Staff(\"\"+id, \"\"+username, \"\"+password, \"\"+name, \"\"+phone,\"\"+address,\"\"+position\n ,\"\"+salary,\"\"+email, lvl);\n //\n tempMem.setStaRef(d1.getRef());\n AddMember(tempMem);\n }\n setRecyclerView(view);\n }\n\n @Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) { }});\n }",
"private void updateTries(final String tries, final String gym, final String zone,\n final String colour){\n myRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n String currentUser = mAuth.getCurrentUser().getUid();\n // if current tries is 0\n if (boulder_progress.getText() == \"0\") {\n\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser)\n .child(gym)\n .child(zone)\n .child(colour)\n .child((testGym3Activity.this.getString(R.string.dbname_boulder_tries1))\n +(Integer.toString(selected_boulder))\n +(testGym3Activity.this.\n getString(R.string.dbname_boulder_tries2)))\n .setValue(Integer.parseInt(tries)); // set db value to 2\n }\n else {\n //current tries is not 0, add\n int curr_tries = Integer.parseInt(boulder_progress.getText().toString()); // 3\n int new_tries = Integer.parseInt(tries) + curr_tries; // 2+3 = 5\n\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser)\n .child(gym)\n .child(zone)\n .child(colour)\n .child((testGym3Activity.this.getString(R.string.dbname_boulder_tries1))\n +(Integer.toString(selected_boulder))\n +(testGym3Activity.this.\n getString(R.string.dbname_boulder_tries2)))\n .setValue(new_tries); // 5\n }\n // check if true by checking if not done\n if (boulder_completed.getText() == getResources().getString(R.string.tries_not_done)){\n\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser)\n .child(gym)\n .child(zone)\n .child(colour)\n .child((testGym3Activity.this.getString(R.string.dbname_boulder_tries1))\n +(Integer.toString(selected_boulder))+(testGym3Activity.this.getString(R.string.dbname_boulder_status2))).setValue(false);\n }\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n\n }",
"public void attachDatabaseListener() {\n dRef.addChildEventListener(new ChildEventListener() {\n\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n Trail addedTrail = dataSnapshot.getValue(Trail.class);\n if(checkTrailUser(addedTrail.getuserId(), user.getUid())) {\n trails.add(addedTrail);\n keys.add(dataSnapshot.getKey());\n trailAdapter.notifyDataSetChanged();\n App.trainer.addTrail(addedTrail);\n }\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n Trail changedTrail = dataSnapshot.getValue(Trail.class);\n if(checkTrailUser(changedTrail.getuserId(), user.getUid())) {\n String key = dataSnapshot.getKey();\n trails.set(keys.indexOf(key), changedTrail);\n App.trainer.setTrail(keys.indexOf(key), changedTrail);\n trailAdapter.notifyDataSetChanged();\n }\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n Trail removedTrail = dataSnapshot.getValue(Trail.class);\n if(checkTrailUser(removedTrail.getuserId(), user.getUid())) {\n keys.remove(dataSnapshot.getKey());\n removeTrail(removedTrail);\n App.trainer.removeTrail(removedTrail.getTrailID());\n trailAdapter.notifyDataSetChanged();\n }\n }\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {}\n public void onCancelled(DatabaseError databaseError) {}\n });\n }",
"public void firebaseAdd(HashMap hashMap){\n DatabaseReference myref = FirebaseDatabase.getInstance().getReference(hashMap.get(\"CafeId\").toString()).child(\"Menu\").child(hashMap.get(\"MenuKatagori\").toString()).child(hashMap.get(\"KatagoriId\").toString());\n myref.child(\"Fiyat\").setValue(hashMap.get(\"YeniDeger\").toString());\n\n\n }",
"private void writeAndReadFromDatabase() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n DatabaseReference locationRef = database.getReference(\"Emerald Location\");\n\n myRef.setValue(\"Yay this is working!!!\");\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(\"Amy\", \"Failed to read value.\", error.toException());\n }\n });\n }",
"public void initializeHashMap(DatabaseReference ref){\n ref.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n UserSign sign = dataSnapshot.getValue(UserSign.class);\n System.out.println(\"ADDED USER SIGN FROM LOCAL DECK \" + dataSnapshot.getValue(UserSign.class).getUrl());\n userSigns.put(sign.getUrl(), sign);\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n //Updadte the deck if a sign was removed from the user's myDeck\n System.out.println(\"REMOVED USER SIGN FROM LOCAL DECK \" + dataSnapshot.getValue(UserSign.class).getUrl());\n userSigns.remove(dataSnapshot.getValue(UserSign.class).getUrl());\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_waiting_room);\n\n String nameOfRoom = getIntent().getStringExtra(\"RoomName\");\n\n // TODO: Intent from previous screen contains EXTRA_ROOM_MESSAGE plus the nameOfRoom\n // Done?\n DatabaseReference _roomNameRefPlayer1 = database.getReference(\"rooms/\"+nameOfRoom+\"/player1\");\n _roomNameRefPlayer1.setValue(true);\n\n DatabaseReference _roomNameRefPlayer2 = database.getReference(\"rooms/\"+nameOfRoom+\"/player2\");\n _roomNameRefPlayer2.setValue(false);\n\n DatabaseReference _roomListener = database.getReference(\"rooms/\"+nameOfRoom);\n _roomListener.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if(snapshot.child(\"player2\").exists()) {\n boolean P2Existence = snapshot.child(\"player2\").getValue(boolean.class);\n if (P2Existence) {\n Intent intent = new Intent(getApplicationContext(),GameActivity.class);\n intent.putExtra(\"playerID\", \"1\");\n startActivity(intent);\n }\n }\n /*\n //try{\n boolean P2Existence = snapshot.getValue(boolean.class);\n if (P2Existence) {\n Intent intent = new Intent(getApplicationContext(),GameActivity.class);\n intent.putExtra(\"playerID\", \"1\");\n startActivity(intent);\n }\n //} catch (NullPointerException e) {\n // System.err.println(\"Null pointer exception\");\n //}\n */\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }",
"@Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n if(dataSnapshot.getKey().equals(b[i]) && i<b.length)\n {\n MyDataSetGet data = dataSnapshot.getValue(MyDataSetGet.class);\n // Toast.makeText(ViewBooksActivity.this, \"value aded\"+i, Toast.LENGTH_SHORT).show();\n listData.add(data);\n i++;\n\n }\n rv2.setAdapter(adapter);\n }",
"private void obtenerAnimales() {\n // final ArrayList<String> lista = new ArrayList<>();\n //Para obtener datos de la base de datos\n refAnimales.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n long size = dataSnapshot.getChildrenCount();\n ArrayList<String> animalesFirebase = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n\n String code = dataSnapshot.child(\"\" + i).child(\"codigo\").getValue(String.class);\n String nombre = dataSnapshot.child(\"\" + i).child(\"nombre\").getValue(String.class);\n String tipo = dataSnapshot.child(\"\" + i).child(\"tipo\").getValue(String.class);\n String raza = dataSnapshot.child(\"\" + i).child(\"raza\").getValue(String.class);\n String animal = code + \" | \" + nombre + \" | \" + tipo + \" | \" + raza;\n\n animalesFirebase.add(animal);\n }\n\n adaptar(animalesFirebase);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }",
"public static DatabaseReference getFirebaseDatabase() {\n if (referenciaFirebase == null) {\n referenciaFirebase = FirebaseDatabase.getInstance().getReference();\n }\n return referenciaFirebase;\n }",
"public DatabaseReference open() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n myPokemonDbRef = database.getReference(PokemonDataTag);\n return myPokemonDbRef;\n }",
"public void getAssignedConsumerHouseAddress() {\n String providerId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n // final DatabaseReference assignedConsumerRef = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(\"Providers\").child(providerId).child(\"consumerRequest\").child(\"houseLocation\");\n final DatabaseReference assignedConsumerRef = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(\"Providers\").child(providerId).child(\"consumerRequest\");\n\n // assignedConsumerRef.addValueEventListener(new ValueEventListener() {\n assignedConsumerRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n Map<String, Object> map = (Map<String, Object>) dataSnapshot.getValue();\n\n\n if (map.get(\"houseLocation\") != null) {\n houseToWork = map.get(\"houseLocation\").toString();\n nConsumerHouse.setText(houseToWork);\n\n } else {\n nConsumerHouse.setText(\"House: Not provided..\");\n }\n if (map.get(\"dateSched\") != null) {\n dateWork = map.get(\"dateSched\").toString();\n nConsumerDate.setText(dateWork);\n\n /////////\n if (dateWork.equals(dateToday)) {\n isSched = \"off\";\n // Toast.makeText(ProviderMapActivity.this, \"OFF\" ,Toast.LENGTH_SHORT).show(); //edit\n } else {\n isSched = \"on\";\n // Toast.makeText(ProviderMapActivity.this, \"ON\",Toast.LENGTH_SHORT).show(); //edit\n }\n /////////\n\n } else {\n nConsumerDate.setText(\"Date: Not provided..\");\n }\n\n if (map.get(\"timeRequest\") != null) {\n timeWork = map.get(\"timeRequest\").toString();\n nConsumerTime.setText(timeWork);\n\n } else {\n nConsumerTime.setText(\"Date: Not provided..\");\n }\n\n if (map.get(\"payment\") != null) {\n paymentTobe = map.get(\"payment\").toString();\n nConsumerPayment.setText(paymentTobe);\n } else {\n nConsumerPayment.setText(\"Charged Not provided..\");\n }\n\n if (map.get(\"paymentDigit\") != null) {\n paymentTobeDig = map.get(\"paymentDigit\").toString();\n paymentTobeDigit = Float.parseFloat(paymentTobeDig);\n\n }\n\n if (map.get(\"consumerServiceRequest\") != null) {\n consumerRequest = map.get(\"consumerServiceRequest\").toString();\n nConsumerRequest.setText(consumerRequest);\n\n } else {\n nConsumerRequest.setText(\"Service Type Not provided..\");\n }\n\n if (map.get(\"consumerNote\") != null) {\n consuNote = map.get(\"consumerNote\").toString();\n nConsumerNote.setText(consuNote);\n\n } else {\n nConsumerNote.setText(\"Note: Not provided..\");\n }\n\n\n\n if (map.get(\"houseType\") != null) {\n consuHouseType = map.get(\"houseType\").toString();\n nHouseType.setText(consuHouseType);\n\n } else {\n nHouseType.setText(\"Note: Not provided..\");\n }\n\n // if (map.get(\"serviceAdditionalDetails\") != null) {\n // serviceDetails = map.get(\"serviceAdditionalDetails\").toString();\n // nServiceAdditionalDetails.setText(\"Service Details: \" + serviceDetails);\n // }\n\n int x = 0;\n\n if (map.get(\"itemOne\") != null) {\n nItemOne.setVisibility(View.VISIBLE);\n itemLabel1.setVisibility(View.VISIBLE);\n item_one = map.get(\"itemOne\").toString();\n x = x + 1;\n nItemOne.setText(\"No.\"+x +\" \"+ item_one);\n }\n\n if (map.get(\"itemTwo\") != null) {\n nItemTwo.setVisibility(View.VISIBLE);\n itemLabel2.setVisibility(View.VISIBLE);\n item_two = map.get(\"itemTwo\").toString();\n x = x + 1;\n nItemTwo.setText(\"No.\"+x +\" \"+ item_two);\n\n // nItemTwo.setText(\"Work Details: \" + item_two);\n }\n\n if (map.get(\"itemThree\") != null) {\n nItemThree.setVisibility(View.VISIBLE);\n itemLabel3.setVisibility(View.VISIBLE);\n item_three = map.get(\"itemThree\").toString();\n x = x + 1;\n nItemThree.setText(\"No.\"+x +\" \"+ item_three);\n }\n\n if (map.get(\"itemFour\") != null) {\n nItemFour.setVisibility(View.VISIBLE);\n itemLabel4.setVisibility(View.VISIBLE);\n item_four = map.get(\"itemFour\").toString();\n x = x + 1;\n nItemFour.setText(\"No.\"+x +\" \"+ item_four);\n }\n\n if (map.get(\"itemFive\") != null) {\n nItemFive.setVisibility(View.VISIBLE);\n itemLabel5.setVisibility(View.VISIBLE);\n item_five = map.get(\"itemFive\").toString();\n x = x + 1;\n nItemFive.setText(\"No.\"+x +\" \"+ item_five);\n }\n\n Double houseLat = 0.0;\n Double houseLng = 0.0;\n if (map.get(\"houseLocationLat\") != null) {\n houseLat = Double.valueOf(map.get(\"houseLocationLat\").toString());\n }\n\n if (map.get(\"houseLocationLng\") != null) {\n houseLng = Double.valueOf(map.get(\"houseLocationLng\").toString());\n }\n\n destinationLatLng = new LatLng(houseLat, houseLng);\n\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }",
"private void loadFromFirebaseDB() {\n FIRDatabase database = FIRDatabase.database();\n\n FIRDatabaseReference notificationsRef = database.reference(NOTIFICATION);\n\n FIRDatabaseReference notificationContinueRef = notificationsRef.child(\"1notification_to_continue\");\n\n FIRDatabaseReference notificationDownloadRef = notificationsRef.child(\"2notification_to_download\");\n\n\n notificationContinueRef.child(\"1en_hours_notification\").observeEvent(FIRDataEventType.Value,\n new VoidBlock1<FIRDataSnapshot>() {\n @Override\n public void invoke(FIRDataSnapshot firDataSnapshot) {\n try {\n NSNumber value = (NSNumber) firDataSnapshot.getValue();\n NSUserDefaults.getStandardUserDefaults().put(KEY_NOTIFICATION1_AFTER, value);\n System.out.println(\"Continue Hrs------------------------------>\"+value);\n } catch (Exception e) {\n System.out.println(\"Continue Hrs Error------------------------>\"+e);\n }\n\n }\n });\n\n\n notificationContinueRef.child(\"2en_title_notification\").observeEvent(FIRDataEventType.Value,\n new VoidBlock1<FIRDataSnapshot>() {\n @Override\n public void invoke(FIRDataSnapshot firDataSnapshot) {\n try {\n NSString value = (NSString) firDataSnapshot.getValue();\n NSUserDefaults.getStandardUserDefaults().put(KEY_NOTIFICATION1_TITLE, value);\n System.out.println(\"Notification Title --------------------------> \" + value);\n } catch (Exception e) {\n System.out.println(\"Continue Title Error------------------------>\"+e);\n }\n\n }\n });\n\n notificationContinueRef.child(\"3en_message_notification\").observeEvent(FIRDataEventType.Value\n , new VoidBlock1<FIRDataSnapshot>() {\n @Override\n public void invoke(FIRDataSnapshot firDataSnapshot) {\n try {\n NSString value = (NSString) firDataSnapshot.getValue();\n // NSUserDefaults.getStandardUserDefaults().put(KEY_NOTIFICATION1_MESSAGE, value);\n System.out.println(\"Notification Message ----------------------> \" + value);\n } catch (Exception e) {\n System.out.println(\"Continue Message Error------------------------>\"+e);\n }\n\n }\n });\n\n\n notificationDownloadRef.child(\"1en_hours_notification\").observeEvent(FIRDataEventType.Value,\n new VoidBlock1<FIRDataSnapshot>() {\n @Override\n public void invoke(FIRDataSnapshot firDataSnapshot) {\n try {\n NSNumber value = (NSNumber) firDataSnapshot.getValue();\n NSUserDefaults.getStandardUserDefaults().put(KEY_NOTIFICATION2_AFTER, value);\n System.out.println(\"Download Hrs------------------------>\"+value);\n } catch (Exception e) {\n System.out.println(\"Download Hrs Error------------------------>\"+e);\n }\n\n }\n });\n\n\n notificationDownloadRef.child(\"2en_title_notification\").observeEvent(FIRDataEventType.Value,\n new VoidBlock1<FIRDataSnapshot>() {\n @Override\n public void invoke(FIRDataSnapshot firDataSnapshot) {\n try {\n NSString value = (NSString) firDataSnapshot.getValue();\n NSUserDefaults.getStandardUserDefaults().put(KEY_NOTIFICATION2_TITLE, value);\n System.out.println(\"Notification Title -------------------------> \" + value);\n } catch (Exception e) {\n System.out.println(\"Download Title Error------------------------>\"+e);\n }\n\n }\n });\n\n notificationDownloadRef.child(\"3en_message_notification\").observeEvent(FIRDataEventType.Value\n , new VoidBlock1<FIRDataSnapshot>() {\n @Override\n public void invoke(FIRDataSnapshot firDataSnapshot) {\n try {\n NSString value = (NSString) firDataSnapshot.getValue();\n // NSUserDefaults.getStandardUserDefaults().put(KEY_NOTIFICATION2_MESSAGE, value);\n System.out.println(\"Notification Message --------------------------> \" + value);\n } catch (Exception e) {\n System.out.println(\"Continue Message Error------------------------>\"+e);\n }\n }\n });\n\n }",
"@Override\n public void cambiarEstadoQuedada(final PeticionQuedada peticionQuedada, final CambiarEstadoCallback callback) {\n listaPeticionesRecibidasQuedadasUsuario= new ArrayList<>();\n user = mAuth.getCurrentUser();\n Query query = UsuariosRef.child(user.getUid()).child(\"Peticiones recibidas\").orderByChild(\"id_peticion\")\n .equalTo(peticionQuedada.getId_peticion());\n\n query.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n dataSnapshot.getRef().child(\"estado\").setValue(peticionQuedada.getEstado());\n Query query2 = UsuariosRef.child(peticionQuedada.getAutor_peticion()).child(\"Peticiones enviadas\").orderByChild(\"id_peticion\")\n .equalTo(peticionQuedada.getId_peticion());\n Log.i(\"CAMBIO ESTADO\",\"1\");\n query2.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n dataSnapshot.getRef().child(\"estado\").setValue(peticionQuedada.getEstado());\n Query query3 = QuedadasRef.orderByChild(\"id\")\n .equalTo(peticionQuedada.getId());\n Log.i(\"CAMBIO ESTADO\",\"2\");\n\n query3.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n final String plazasActualizadas=\"\"+(Integer.parseInt(peticionQuedada.getPlazas())\n - Integer.parseInt(peticionQuedada.getNum_plazas_solicitadas()));\n dataSnapshot.getRef().child(\"plazas\").setValue(plazasActualizadas);\n\n Query query4 = UsuariosRef.child(user.getUid()).child(\"Quedadas\").orderByChild(\"id\")\n .equalTo(peticionQuedada.getId());\n Log.i(\"CAMBIO ESTADO\",\"3\");\n\n query4.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n dataSnapshot.getRef().child(\"plazas\").setValue(plazasActualizadas);\n Log.i(\"CAMBIO ESTADO\",\"4\");\n\n callback.onEstadoCambiado();\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n callback.onEstadoCambiadoError();\n\n }\n });\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n callback.onEstadoCambiadoError();\n\n }\n });\n\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n callback.onEstadoCambiadoError();\n }\n });\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n callback.onEstadoCambiadoError();\n }\n });\n\n }",
"@Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n mPlants.clear();\n\n //aici baga key value din real time database\n for(DataSnapshot postSnapshot : snapshot.getChildren()){\n Plants plant = postSnapshot.getValue(Plants.class);\n plant.setKey(postSnapshot.getKey());\n\n Log.d(\"TAG\", \"plant.key \" + plant.getKey() );\n mPlants.add(plant);\n }\n\n mAdapter.notifyDataSetChanged();\n }",
"public void buscarPabellon(String idPabellon)\n {\n TxtPabellon=(TextView)findViewById(R.id.txt_pabellon);\n database.getReference(Constants.FIREBASE_LOCATION_PABELLON).child(idPabellon).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Pabellon pabellon = dataSnapshot.getValue(Pabellon.class);\n latPabellon=pabellon.getLatitud();\n longPabellon=pabellon.getLongitud();\n nombrePabellon=pabellon.getNombre();\n TxtPabellon.setText(nombrePabellon);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.w(\"getUser:onCancelled\", databaseError.toException());\n }\n });\n }",
"private void onlinecheack(String online) {\r\n\r\n Calendar calendar_time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_time = new SimpleDateFormat(DataManager.TimePattern);\r\n String CurrentTime = simpleDateFormat_time.format(calendar_time.getTime());\r\n\r\n\r\n Calendar calendar_date = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_date = new SimpleDateFormat(DataManager.DatePattern);\r\n String CurrentDate = simpleDateFormat_date.format(calendar_date.getTime());\r\n\r\n\r\n Map<String, Object> onlinemap = new HashMap<String, Object>();\r\n onlinemap.put(DataManager.UserCardActive, online);\r\n onlinemap.put(DataManager.UserActiveTime, CurrentTime);\r\n onlinemap.put(DataManager.UserActiveDate, CurrentDate);\r\n\r\n\r\n OnlineRoot.child(CurrentUserID).child(DataManager.UserOnlineRoot).updateChildren(onlinemap)\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if (task.isSuccessful()) {\r\n\r\n } else {\r\n Toast.makeText(getActivity(), task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n\r\n }",
"@Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n getBoulderData(dataSnapshot, selected_boulder, gym, \"zone_\" + zone, colour);\n getUserData(dataSnapshot, selected_boulder, gym, \"zone_\" + zone, colour);\n }",
"public void getSectorsDataFromFirebase () {\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Home\").child(\"specialties\");\n ref.addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Get map of sectors in datasnapshot\n getSectorsDataFromMap((Map<String,Object>) dataSnapshot.getValue());\n sectorsAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //handle databaseError\n }\n });\n ref.keepSynced(true);\n\n\n }",
"@Override\n public void run() {\n try {\n int pj = Integer.parseInt(SalasJuego.PARTIDAS_JUGADAS);\n pj = pj + 1;\n Log.i(\"II/FullScreen_Juego>\", \" Partidas Jugadas aumenta a = \" + pj);\n\n //Pasamos los datos a la Base de Datos\n\n databaseReference.child(user.getUid()).child(\"money\").setValue(df.format(dineroUsuario)); //Referencia>Hijo> money:dinero\n databaseReference.child(user.getUid()).child(\"partidasJugadas\").setValue(pj);\n Log.i(\"II/FullScreen_Juego>\", \" SUMAMOS A MI DINERO: \" + visorMoneyP1.getText().toString().trim());\n\n } catch (NumberFormatException n) {\n Log.i(\"II/FullScreen_Juego>\", \"Error NumberFormatException 1\" + n);\n\n\n }\n\n }",
"private void loaddata(){\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n FirebaseDatabase database =FirebaseDatabase.getInstance();\n\n //Obtengo la referencia a la lista de pares del usuario.\n final DatabaseReference myRef = database.getReference(FirebaseReferences.LIST_PAIRS_REFERENCE).child(user.getUid()).child(FirebaseReferences.PAIR_REFERENCE);\n\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n pairs.removeAll(pairs);\n\n for(DataSnapshot snapshot :dataSnapshot.getChildren()){\n\n Pair pair = snapshot.getValue(Pair.class);\n pairs.add(pair);\n }\n groupbyPairs(pairs);\n pairsAdapter.setPairs2List(pairsOrdered);\n\n btcInfo=pairsAdapter.getBtcInfo();\n if(btcInfo != null){\n getBalance();\n Log.e(\"Balance\", \"Balance Cargado\");\n }else {\n Log.e(\"Balance\", \"Sin balance\");\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }",
"public static DatabaseReference getFirebaseDataBase(){\n if(firebase==null){\n firebase = FirebaseDatabase.getInstance().getReference();\n }\n return firebase;\n }",
"private void updateRoute(final String tries, final String points, final String gym, final String zone,\n final String colour){\n myRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n int curr_tries = Integer.parseInt(boulder_progress.getText().toString());\n int new_tries = Integer.parseInt(tries) + curr_tries; //5\n\n FirebaseUser currentUser = mAuth.getCurrentUser();\n\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(gym)\n .child(zone)\n .child(colour)\n .child((testGym3Activity.this.getString(R.string.dbname_boulder_tries1))\n +(Integer.toString(selected_boulder))+(testGym3Activity.this.getString(R.string.dbname_boulder_tries2))).setValue(new_tries);\n\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(gym)\n .child(zone)\n .child(colour)\n .child((testGym3Activity.this.getString(R.string.dbname_boulder_tries1))\n +(Integer.toString(selected_boulder))+(testGym3Activity.this.getString(R.string.dbname_boulder_status2))).setValue(true);\n\n // get the users current points\n int curr_points = Integer.parseInt(dataSnapshot.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid()).child(testGym3Activity.this\n .getString(R.string.dbname_boulder_points)).getValue().toString()) ;\n //.setValue(Integer.parseInt(points));\n int new_points = 0;\n\n // if tries are 3 or less\n if (new_tries <= 3){\n new_points = curr_points + Integer.parseInt(points);\n Toast.makeText(testGym3Activity.this, \"Points earned: \" + Integer.parseInt(points), Toast.LENGTH_LONG).show();\n }\n // else if tries are between 6 and 3 including 6\n else if (new_tries <= 6) {\n new_points = curr_points + (Integer.parseInt(points)-5);\n Toast.makeText(testGym3Activity.this, \"Points earned: \" + (Integer.parseInt(points)-5), Toast.LENGTH_LONG).show();\n }\n // else if tries are greater than 6\n else {\n new_points = curr_points + (Integer.parseInt(points)-10);\n Toast.makeText(testGym3Activity.this, \"Points earned: \" + (Integer.parseInt(points)-10), Toast.LENGTH_LONG).show();\n }\n\n // get the boulder points and set it to user points\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_boulder_points))\n .setValue(new_points);\n\n // get the boulder points and update users leader-boards\n myRef.child(testGym3Activity.this.getString(R.string.dbname_leaderboards))\n .child(gym)\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_boulder_points))\n .setValue(new_points);\n\n // increment the amount of total climbs for this user\n int curr_climbs = Integer.parseInt(dataSnapshot.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_climbs)).getValue().toString()) ;\n int new_climbs = curr_climbs + 1;\n\n // update the amount of total climbs for this user\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_climbs))\n .setValue(new_climbs);\n\n // get the total climbs and update users leader-boards\n myRef.child(testGym3Activity.this.getString(R.string.dbname_leaderboards))\n .child(gym)\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_climbs))\n .setValue(new_climbs);\n\n // calculate the amount of total tries for this user\n int total_curr_tries = Integer.parseInt(dataSnapshot.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_tries)).getValue().toString()) ;\n int total_new_tries = total_curr_tries + new_tries;\n\n // update the amount of total tries for this user\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_tries))\n .setValue(total_new_tries);\n\n // set the average tries for this user\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_avgtries))\n .setValue(total_new_tries/new_climbs);\n\n // get the average tries and update the users leader-boards\n myRef.child(testGym3Activity.this.getString(R.string.dbname_leaderboards))\n .child(gym)\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_avgtries))\n .setValue(total_new_tries/new_climbs);\n\n // first check if climbs are greater than 3\n // then compare this grade (use points) with database current grade\n // if null then replace (1st grade for user)\n // if less than database current grade do nothing\n // if greater than database current grade update\n if (new_climbs >= 3) {\n String curr_grade = dataSnapshot.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_grade)).getValue().toString() ;\n Integer curr_grade_points = Integer.parseInt(calculateFlashPoints(curr_grade));\n Integer new_grade_points = Integer.parseInt(points);\n\n if (curr_grade_points >= new_grade_points){\n //do nothing\n }\n else if (new_grade_points == 80) {\n //do nothing\n }\n else {\n\n // update the database with grade of this climb\n myRef.child(testGym3Activity.this.getString(R.string.dbname_users))\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_grade))\n .setValue(boulder_grade.getText());\n\n // get the grade and update the users leaderboard\n myRef.child(testGym3Activity.this.getString(R.string.dbname_leaderboards))\n .child(gym)\n .child(currentUser.getUid())\n .child(testGym3Activity.this\n .getString(R.string.dbname_grade))\n .setValue(boulder_grade.getText());\n }\n }\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"private void initFirebase() {\n //инициализируем наше приложение для Firebase согласно параметрам в google-services.json\n // (google-services.json - файл, с настройками для firebase, кот. мы получили во время регистрации)\n FirebaseApp.initializeApp(this);\n //получаем точку входа для базы данных\n database = FirebaseDatabase.getInstance();\n myRef = database.getReference();\n\n }",
"private void loadCorrespondingFlats(String prop) {\n Firebase flatRef = new Firebase(getResources().getString(R.string.flats_location));\n Query flatsOfPropertyQuery = flatRef.orderByChild(\"addressLine1\").equalTo(prop);\n flatsOfPropertyQuery.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n flatList.clear();\n flatNums.clear();\n for (DataSnapshot childSnapShot : dataSnapshot.getChildren()) {\n Flat flt = childSnapShot.getValue(Flat.class);\n flatList.add(flt);\n flatNums.add(flt.getFlatNum());\n }\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });\n }",
"@Override\n public void onCreate(Bundle icicle) {\n //FirebaseApp.initializeApp(getApplicationContext());\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash);\n prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n //FirebaseApp customApp = FirebaseApp.initializeApp(this);\n // FirebaseStorage storage = FirebaseStorage.getInstance(customApp);\n // reference1= FirebaseStorage.getInstance(\"gs://doctorlog-ac4d6.appspot.com\").getReference();\n // FirebaseStorage firebaseStorage1=FirebaseStorage.getInstance(app);\n //reference1=firebaseStorage1.getReference();\n firebaseOptions2=new FirebaseOptions.Builder()\n .setApplicationId(\"1:720142389475:android:920875d8334fb1c3\")\n .setApiKey(\"AIzaSyCTT78tupL7oOhSkIeHgNN6hyLWgxWMcs8 \")\n .setDatabaseUrl(\"https://doctorlog-ac4d6.firebaseio.com/\")\n .build();\n FirebaseApp.initializeApp(this,firebaseOptions2,\"third\");\n FirebaseApp app1=FirebaseApp.getInstance(\"third\");\n FirebaseDatabase firebaseDatabase=FirebaseDatabase.getInstance(app1);\n reference=firebaseDatabase.getReference(\"doctor\");\n mStorageRef = FirebaseStorage.getInstance().getReference();\n Uri uri = null;\n getWindow().getDecorView().setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n boolean previouslyStarted = prefs.getBoolean(\"isFirstRun\", false);\n read1(new Firebasecallback1() {\n @Override\n public void onCallback1(List<DummyItem> list) {\n\n Toast.makeText(splash.this,\"completed\" ,Toast.LENGTH_LONG ).show();\n }\n\n });\n\n if(!previouslyStarted) {\n SharedPreferences.Editor edit = prefs.edit();\n edit.putBoolean(\"isFirstRun\", Boolean.TRUE);\n edit.commit();\n Intent mainIntent = new Intent(splash.this,LoginActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n\n else\n { db= FirebaseDatabase.getInstance().getReference(\"patient\");\n SharedPreferences prefs1 = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n previously=prefs1.getString(\"key\",\"null\" );\n Toast.makeText(getBaseContext(),\"my \"+previously ,Toast.LENGTH_LONG ).show();\n read(new LoginActivity.Firebasecallback() {\n @Override\n public void onCallback(List<user> list) {\n // Toast.makeText(getActivity(), \"msg12\",Toast.LENGTH_LONG).show();\n for (user e:list)\n { // Toast.makeText(LoginActivity.this, \"list\",Toast.LENGTH_LONG).show();\n if(previously.equals(e.id))\n { Toast.makeText(splash.this, e.url,Toast.LENGTH_LONG).show();\n LoginActivity.userg=new user(e.id,e.username,e.mail,e.url,e.phn,e.lat,e.lng);\n LoginActivity.usname=e.username;\n LoginActivity.name=e.mail;\n if(e.url==null)\n LoginActivity.url=null;\n else\n LoginActivity.url=Uri.parse(e.url);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n SharedPreferences.Editor edit = preferences.edit();\n edit.putString(\"key\",e.id);\n edit.commit();\n break;\n\n }\n }\n\n check=true;\n Intent mainIntent = new Intent(splash.this, MainActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n // Toast.makeText(splash.this, \"mmmm\", Toast.LENGTH_SHORT).show();\n //LoginActivity.usname=null;\n\n\n }\n\n });\n }\n }\n }, SPLASH_DISPLAY_LENGTH);\n }",
"public void initializeGameRoom() {\n DatabaseReference game = database.getReference(gameCodeRef);\n game.child(\"NumberOfPlayers\").setValue(0);\n game.child(\"PlayersDoneBrainstorming\").setValue(0);\n game.child(\"PlayersDoneEliminating\").setValue(0);\n game.child(\"AllDoneBrainstorming\").setValue(false);\n game.child(\"AllDoneEliminating\").setValue(false);\n game.child(\"StartGame\").setValue(false);\n\n }",
"@Override\n public void obtenerQuedadas(final ObtenerQuedadasCallback callback) {\n\n\n QuedadasRef.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n\n quedada = dataSnapshot.getValue(Quedada.class);\n Log.i(\"Quedada_OBTENIDA\", quedada.toString());\n\n // Log.i(\"FECHA ACTUAL\", dateFormat.format(date));\n String fecha_obtenida= \"\"+quedada.getFecha()+ \" \"+quedada.getHora();\n if(compararFechaActualCon(fecha_obtenida)) {\n\n if(quedada.getPlazas().equals(\"0\")) {\n Log.i(\"Quedada_OBTENIDA\", \"PLAZAS NULAS\");\n\n }else{\n Log.i(\"Quedada_OBTENIDA\", \"FECHA VALIDA\");\n listaQuedadasGeneral.add(quedada);\n }\n }\n\n\n callback.onQuedadasObtenidas(listaQuedadasGeneral);\n\n //listaQuedadasGeneral= new ArrayList<>();\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n callback.onQuedadasObtenidasError();\n }\n });\n\n }",
"private void subirLista(){\n DatabaseReference db_lista = db_reference.child(\"Asistencias\");\n HashMap<String, String> dataLista = new HashMap<String, String>();\n dataLista.put(\"evento\",etNombreCurso.getText().toString());\n dataLista.put(\"fecha\", etFecha.getText().toString());\n dataLista.put(\"lista\", \"-\");\n db_lista.push().setValue(dataLista);\n }",
"private void updateBalanceInDatabase(DatabaseReference ref, final String newValue){\n ref.child(\"currentBalance\").setValue(newValue).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Log.d(\"Firebase\", \"Added New Value \"+ newValue + \" \");\n startActivity(new Intent(NewTransactionActivity.this, HomePageActivity.class));\n finish();\n }\n }\n });\n }",
"@Override\n public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {\n list = new ArrayList<canchas>();\n for (com.google.firebase.database.DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {\n\n canchas value = dataSnapshot1.getValue(canchas.class);\n canchas fire = new canchas();\n\n String distrito = value.getDistrito();\n String local = value.getLocal();\n String nombre = value.getNombre();\n String foto = value.getFoto();\n\n String localid = value.getLocalid();\n String canchaid = value.getCanchaid();\n\n fire.setDistrito(distrito);\n fire.setLocal(local);\n fire.setNombre(nombre);\n fire.setFoto(foto);\n\n fire.setLocalid(localid);\n fire.setCanchaid(canchaid);\n\n list.add(fire);\n\n\n Canchasadapter canchasadapter = new Canchasadapter(list, Seleccionarcanchas.this);\n RecyclerView.LayoutManager recyce = new GridLayoutManager(Seleccionarcanchas.this, 1);\n /// RecyclerView.LayoutManager recyce = new LinearLayoutManager(MainActivity.this);\n // recycle.addItemDecoration(new GridSpacingItemDecoration(2, dpToPx(10), true));\n recycle.setLayoutManager(recyce);\n recycle.setItemAnimator(new DefaultItemAnimator());\n recycle.setAdapter(canchasadapter);\n\n }\n }",
"@SuppressLint(\"RestrictedApi\")\n public void getEmergencyAssistance(){\n final String uID = objAccount.getCurrentUser().getUid();\n ArrayList<String> allMemberID = new ArrayList<>();\n\n ArrayList<objFamily> allFamily = tb_Family.getInstance(context).getAllFamilyByUid(uID);\n for(objFamily family : allFamily){\n for(String memberID : family.getMembersList()){\n if(!memberID.matches(uID)\n && !allMemberID.contains(memberID))\n allMemberID.add(memberID);\n }\n }\n\n //Add listening events for each member\n for(String id : allMemberID){\n Query mRef = mDatabase.getReference()\n .child(keyUtils.emergencyAssistanceList)\n .child(id)\n .limitToLast(1);\n\n mRef.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n if(dataSnapshot.getValue() != null){\n\n boolean isNewEmergency = false;\n\n fb_emergencyAssistance fireBase_EmergencyAssistance = dataSnapshot.getValue(fb_emergencyAssistance.class);\n\n if(fireBase_EmergencyAssistance != null){\n\n if(!fireBase_EmergencyAssistance.getListSeen().contains(uID))\n isNewEmergency = true;\n\n final String pathEmergency = dataSnapshot.getRef().getPath().toString();\n objEmergencyAssistance emergencyAssistance = new objEmergencyAssistance(pathEmergency, fireBase_EmergencyAssistance);\n\n boolean flag = false;\n //If not received, notice and write in SQLite\n if(!emergencyAssistance.getListReceived().contains(uID)){\n //Set received\n List<String> listReceived = emergencyAssistance.getListReceived();\n listReceived.add(uID);\n setReceivedEmergencyAssistance(pathEmergency,listReceived);\n tb_EmergencyAssistance.getInstance(context).addEmergencyAssistance(emergencyAssistance);\n\n flag = true;\n }\n\n //Notifications have news\n if(flag)\n mView.emergencyAssistance(tb_Account.getInstance(context).getAccountByID(id), emergencyAssistance, isNewEmergency);\n else\n mView.emergencyAssistance(null, null, isNewEmergency);\n\n }\n }\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }\n }",
"public static DatabaseReference getFirebaseDatabase(){\n\n if (firebase == null){\n firebase = FirebaseDatabase.getInstance().getReference();\n }\n return firebase;\n }",
"private void startDBValue(String target){\n database.getReference(gameCodeRef).child(target).setValue(1);\n }",
"private void retrieveData(){\n databaseReference.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Teacher teacher = dataSnapshot.getValue(Teacher.class);\n\n if (teacher==null){\n saveData();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n toast(getString(R.string.retrieve_failed));\n }\n });\n }",
"private void dbListeners() {\n // Set if image+text is being worked on currently\n //================================================\n mBeingWorkedOnListener = new ValueEventListener() {\n @Override\n public void onDataChange(final DataSnapshot dataSnapshot) {\n new AsyncTask<Void, Void, String>() {\n @Override\n protected String doInBackground(Void... voids) {\n return dataSnapshot.getValue(String.class);\n }\n\n @Override\n protected void onPostExecute(String s) {\n beingWorkedOn = s;\n }\n }.execute();\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n };\n\n dGlobalRef.child(\"beingWorkedOn\").addValueEventListener(mBeingWorkedOnListener);\n }",
"@Override\n public void onChildAdded(DataSnapshot dataSnapshot, String previousChild) {\n Partido partido = dataSnapshot.getValue(Partido.class);\n //Se comprueba si el partido es en casa.\n if(partido.isCasa())\n {\n TxtProxPartido.setText(Constants.EQUIPO + \" - \" + partido.getRival());\n }\n else\n {\n TxtProxPartido.setText(partido.getRival() + \" - \" + Constants.EQUIPO);\n }\n //FECHA DEL PARTIDO\n TxtFecha.setText(partido.getFecha());\n //HORA DEL PARTIDO\n TxtHora.setText(partido.getHora());\n //Se comprueba que hay hora del partido para que no haya errores en las siguiente operaciones\n if(!partido.getHora().equals(\"\")) {\n //Dividir la cadena de la hora en horas y minutos para añadirlo a la alarma\n String[] parts = partido.getHora().split(\":\");\n hora=Integer.parseInt(parts[0]);\n minutos=Integer.parseInt(parts[1]);\n //Sumar la fecha del partido mas la hora del partido\n Long fechaPartido=(Utils.transformarFecha(\"hh:mm\",partido.getHora())+Utils.transformarFecha(\"dd-MM-yyyy\",partido.getFecha()));\n //Activar el boton de alarma cuando estemos a menos de 24horas del partido\n if(Utils.tsFechaHoy>(fechaPartido-Constants.TIMESTAMP_UN_DIA) && Utils.tsFechaHoy<fechaPartido) {\n fab.setVisibility(View.VISIBLE);\n }\n }\n //Se comprueba que se haya asignado un pabellon para que no haya errores en las siguientes operaciones\n if(!partido.getPabellon().equals(\"\")){\n IDpabellon=partido.getPabellon();\n //Buscar las cordenadas y el nombre del pabellon con la id del pabellon\n buscarPabellon(IDpabellon);\n //Activar boton de la direccion del pabellon cuando este aun no haya sido asignado a un partido. Por defecto esta desactivado\n btnMapa.setEnabled(true);\n }\n\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n try {\n estadoPeticionLed = dataSnapshot.child(\"PuertaEscAppLecRas\").child(\"Led\").child(\"estado\").getValue().toString();\n\n String estadoLed = dataSnapshot.child(\"PuertaLecAppEscRas\").child(\"Led\").child(\"estado\").getValue().toString();\n String estadoPresencia = dataSnapshot.child(\"PuertaLecAppEscRas\").child(\"Presencia\").child(\"estado\").getValue().toString();\n Integer anguloServo = Integer.parseInt(dataSnapshot.child(\"PuertaLecAppEscRas\").child(\"Servo\").child(\"angulo\").getValue().toString());\n Integer esfuerzoServo = Integer.parseInt(dataSnapshot.child(\"PuertaLecAppEscRas\").child(\"Servo\").child(\"esfuerzo\").getValue().toString());\n\n PuertaLecAppEscRas.setPuerta(estadoLed, estadoPresencia, anguloServo, esfuerzoServo);\n //SETEO LA INFORMACION DE LA PUERTA\n if(PuertaLecAppEscRas.getLed().getEstado().equals(\"on\")){\n tviewLed.setText(\"Encendida\");\n }else{\n tviewLed.setText(\"Apagada\");\n }\n\n if(PuertaLecAppEscRas.getServo().getAngulo().toString().equals(\"0\")){\n tviewPuerta.setText(\"Cerrada\");\n }else{\n tviewPuerta.setText(\"Abierta\");\n }\n\n if(PuertaLecAppEscRas.getPresencia().getEstado().equals(\"on\")){\n tviewPresencia.setText(\"Si\");\n }else{\n tviewPresencia.setText(\"No\");\n }\n\n //SI SE ACTIVA QUE ESTA FORZANDOSE LA PUERTA, ACTIVO LA NOTIFICACION EN LA APP\n if(PuertaLecAppEscRas.getServo().getEsfuerzo() == 1){\n tViewNotificacion.setText(\"PRECAUCION, PUERTA FORZADA!!!\");\n tViewNotificacion.setVisibility(View.VISIBLE);\n btnOk.setVisibility(View.VISIBLE);\n mp.start();\n vibrator.vibrate(8000L);\n }\n\n\n\n\n }catch (NullPointerException e){\n // error, seguramente nombre de campos incorrectos devuelven objeto NULO\n tviewLed.setText(\"Error obteniendo datos BBDD\");\n }\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_mine_tilladelser);\n Toolbar toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n toolbar.setTitleTextAppearance(this, R.style.TitleTextApperance);\n getSupportActionBar().setTitle(\"Consentcoin\");\n\n //Vises her at metoden også har en drawer-menu\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n NavigationView navigationView = findViewById(R.id.nav_view);\n ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(\n this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);\n drawer.addDrawerListener(toggle);\n toggle.syncState();\n navigationView.setNavigationItemSelectedListener(this);\n\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"Consents\");\n\n //Her instansieres vores childEventListener\n ChildEventListener childEventListener = new ChildEventListener() {\n\n //Denne metode sætter texten i vores textview som findes i mineTilladelser.\n //Metoden benytter sig af en listener \"onChildAdded\" som tager dataen fra vores firebase database og laver det til en string\n //Derefter tilføjes text til mineTilladelser via \"textView.append\" og linjen skiftes\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n String text = dataSnapshot.getValue().toString();\n TextView textView = findViewById(R.id.Samtykker);\n textView.append(text + \"\\n\");\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n myRef.addChildEventListener(childEventListener);\n}",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView((int) C0520R.layout.activity_main5);\n final EditText adm = (EditText) findViewById(C0520R.C0522id.register_);\n this.table_user.addValueEventListener(new ValueEventListener() {\n static final /* synthetic */ boolean $assertionsDisabled = false;\n\n static {\n Class<Main5Activity> cls = Main5Activity.class;\n }\n\n public void onDataChange(final DataSnapshot dataSnapshot) {\n for (DataSnapshot next : dataSnapshot.getChildren()) {\n ((Button) Main5Activity.this.findViewById(C0520R.C0522id.loadForEdit)).setOnClickListener(new View.OnClickListener() {\n static final /* synthetic */ boolean $assertionsDisabled = false;\n\n static {\n Class<Main5Activity> cls = Main5Activity.class;\n }\n\n public void onClick(View v) {\n if (dataSnapshot.child(\"user1\").child(\"STUDENTS\").child(adm.getText().toString().toUpperCase()).exists()) {\n try {\n String Name = dataSnapshot.child(\"user1\").child(\"STUDENTS\").child(adm.getText().toString().toUpperCase()).child(\"Name\").getValue().toString();\n String Class = dataSnapshot.child(\"user1\").child(\"STUDENTS\").child(adm.getText().toString().toUpperCase()).child(\"Class\").getValue().toString();\n String address = dataSnapshot.child(\"user1\").child(\"STUDENTS\").child(adm.getText().toString().toUpperCase()).child(\"Address\").getValue().toString();\n String Contact = dataSnapshot.child(\"user1\").child(\"STUDENTS\").child(adm.getText().toString().toUpperCase()).child(\"Contact\").getValue().toString();\n String rollno = dataSnapshot.child(\"user1\").child(\"STUDENTS\").child(adm.getText().toString().toUpperCase()).child(\"Roll No\").getValue().toString();\n String str = \"SELECT * FROM STUDENT WHERE regno = '\" + adm.getText().toString().toUpperCase() + \"'\";\n ((EditText) Main5Activity.this.findViewById(C0520R.C0522id.edit_name_)).setText(Name);\n ((EditText) Main5Activity.this.findViewById(C0520R.C0522id.Class)).setText(Class);\n ((EditText) Main5Activity.this.findViewById(C0520R.C0522id.address)).setText(address);\n ((EditText) Main5Activity.this.findViewById(C0520R.C0522id.contact)).setText(Contact);\n ((EditText) Main5Activity.this.findViewById(C0520R.C0522id.roll)).setText(rollno);\n } catch (Exception e) {\n }\n } else {\n Toast.makeText(Main5Activity.this.getBaseContext(), \"No Such Student\", 1).show();\n }\n }\n });\n }\n }\n\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n ((Button) findViewById(C0520R.C0522id.buttonSAVEEDITS)).setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n EditText name = (EditText) Main5Activity.this.findViewById(C0520R.C0522id.edit_name_);\n EditText Clas = (EditText) Main5Activity.this.findViewById(C0520R.C0522id.Class);\n EditText add = (EditText) Main5Activity.this.findViewById(C0520R.C0522id.address);\n EditText contact = (EditText) Main5Activity.this.findViewById(C0520R.C0522id.contact);\n EditText roll = (EditText) Main5Activity.this.findViewById(C0520R.C0522id.roll);\n DatabaseReference ss = Main5Activity.this.table_user.child(\"user1\").child(\"STUDENTS\").child(adm.getText().toString().toUpperCase());\n if (adm.length() == 0) {\n Toast.makeText(Main5Activity.this.getBaseContext(), \"fill\", 1).show();\n } else if (name.length() == 0) {\n Toast.makeText(Main5Activity.this.getBaseContext(), \"fill name\", 1).show();\n } else if (Clas.length() == 0) {\n Toast.makeText(Main5Activity.this.getBaseContext(), \"fill class\", 1).show();\n } else if (add.length() == 0) {\n Toast.makeText(Main5Activity.this.getBaseContext(), \"fill address\", 1).show();\n } else if (contact.length() == 0) {\n Toast.makeText(Main5Activity.this.getBaseContext(), \"fill contact\", 1).show();\n } else if (roll.length() == 0) {\n Toast.makeText(Main5Activity.this.getBaseContext(), \"fill the roll no\", 1).show();\n } else {\n try {\n DatabaseReference child = ss.child(\"Name\");\n child.setValue(\"\" + name.getText().toString());\n DatabaseReference child2 = ss.child(\"Class\");\n child2.setValue(\"\" + Clas.getText().toString());\n DatabaseReference child3 = ss.child(\"Address\");\n child3.setValue(\"\" + add.getText().toString());\n DatabaseReference child4 = ss.child(\"Contact\");\n child4.setValue(\"\" + contact.getText().toString());\n DatabaseReference child5 = ss.child(\"Roll No\");\n child5.setValue(\"\" + Integer.parseInt(roll.getText().toString()));\n } catch (Exception e) {\n Context baseContext = Main5Activity.this.getBaseContext();\n Toast.makeText(baseContext, \"\" + e, 1).show();\n }\n }\n Main5Activity.this.table_user.addValueEventListener(new ValueEventListener() {\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.child(\"user1\").child(\"STUDENTS\").child(adm.getText().toString().toUpperCase()).getChildrenCount() == 6) {\n Toast.makeText(Main5Activity.this.getBaseContext(), \"Edit Saved\", 1).show();\n Main5Activity.this.finish();\n } else {\n Toast.makeText(Main5Activity.this.getBaseContext(), \"Error Occured\", 1).show();\n }\n Main5Activity.this.finish();\n }\n\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n });\n }\n });\n }",
"@Override\n public void onCreate(SQLiteDatabase database) {\n //database.execSQL(DATABASE_CREATE_FRIDGE_ITEM);\n\n database.execSQL(\"CREATE TABLE IF NOT EXISTS \" + \"brainSensor\" +\n \" ( data1 int,data2 int,data3 int,data4 int);\");\n }",
"private void setValues() {\n DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();\n DatabaseReference propRef = rootRef.child(\"Properties\").child(globals.chosenProp);\n\n propRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (DataSnapshot ds : dataSnapshot.getChildren()) {\n //Fetches the key for each child of the parent node\n String key = ds.getKey();\n\n //Runs key through switch to determine what variable needs to be assigned with the keys value\n switch(key) {\n case \"name\":\n name = ds.getValue().toString();\n break;\n case \"address\":\n address = ds.getValue().toString();\n break;\n case \"category\":\n category = ds.getValue().toString();\n break;\n case \"size\":\n size = ds.getValue().toString();\n break;\n case \"price\":\n price = ds.getValue().toString();\n break;\n case \"agent\":\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + key);\n }\n }\n }\n //Runs loadDetails method\n loadDetails();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) { }\n });\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n HashMap<String,MapElements> testing1 = new HashMap<String, MapElements>();\n\n for(DataSnapshot snapshot:dataSnapshot.getChildren())\n {\n Log.d(TAG, \"SNAPSHOT \"+snapshot.getKey());\n String Key = snapshot.getKey();\n\n //Log.d(TAG, \"SPECIFIC\" +snapshot.child(Key).getValue().toString());\n\n }\n }",
"public void editAt(final String cardname) {\n\n\n productimages = model.getProductimages();\n\n mDatabaseReference.child(\"Products\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n for (final DataSnapshot snapshot: dataSnapshot.getChildren()){\n String parent = snapshot.getKey();\n\n mDatabaseReference.child(\"Products\").child(card).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (final DataSnapshot datasnapshot: dataSnapshot.getChildren()){\n String UID = datasnapshot.getKey();\n String card_name = datasnapshot.child(\"cardname\").getValue(String.class);\n System.out.println(\"The card_name is \" + card_name);\n if(card_name.toLowerCase().contains(cardname.toLowerCase())) {\n System.out.println(\"UID here is\" + UID);\n System.out.println(\"bulkdescription \" + bulkdescription.getText().toString());\n\n\n mDatabaseReference.child(\"Products\").child(card).child(UID).removeValue();\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"cardname\").setValue(cardName.getText().toString());\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"carddiscription\").setValue(carddesc.getText().toString());\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"bulkdescription\").setValue(bulkdescription.getText().toString());\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"cardimage\").setValue(cardimage.getText().toString());\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"cardprice\").setValue(cardprice.getText().toString());\n// if (changeflag)\n// mDatabaseReference.child(\"Products\").child(category).child(UID).child(\"productimages\").setValue(firebaseImgAddresses);\n//\n\n\n }\n\n\n\n\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }\n\n myNewCard(cardName.getText().toString().trim(), cardimage.getText().toString(), carddesc.getText().toString(), Float.parseFloat(cardprice.getText().toString()), model.getCardid(),bulkdescription.getText().toString());\n\n\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n\n\n }",
"@Override\r\n public void onItemClick(AdapterView<?> parent, View view, int i, long id) {\n switch (i){\r\n case 0:\r\n myRef = database.getReference(\"Proteins\");\r\n nutritionTitle.setText(\"Protein Sources\");\r\n\r\n /*\r\n myRef.setValue(\"<b>Protein Options / Serving Size</b>\" + \"<br/></br/><br/>\" +\r\n \"<b>Eggs:</b> 6 egg whites (you can boil them or cook them in a pan using non stick spray like PAM. Season with salt and pepper or a little hot sauce to taste)<br/><br/>\" +\r\n \"<b>Low Fat Cottage Cheese:</b> 1 cup <br/><br/>\" +\r\n \"<b>Chick Breast:</b> 1 breast (grill, bake, or pan fry with non-stick spray. Okay to season but DO NOT use marinades because they are full of salt)<br/><br/>\" +\r\n \"<b>Lean Beef:</b> 6 oz (Ground Beef 93% lean, Eye of Round cut in to small portions and grilled, baked, fried -or- London Broil grilled or baked then cut into portions)<br/><br/>\" +\r\n \"<b>Pork:</b> 6 oz (Pork Chops lean with fat cut off edge before cooking -or- Pork Tenderloin <br/><br/>\" +\r\n \"<b>Fish:</b> 6 oz (any fish is acceptable)<br/><br/>\" +\r\n \"<b>Protein Powder Mixed with Water:</b> 1 scoop (around 25g of protein per serving)<br/><br/>\" +\r\n \"<b>Deli Meat:</b> Turkey 4 oz. (ask for the low sodium) <br/><br/>\");\r\n\r\n\r\n\r\n textContent = \"<b>Protein Options / Serving Size</b>\" + \"<br/></br/><br/>\" +\r\n \"<b>Eggs:</b> 6 egg whites (you can boil them or cook them in a pan using non stick spray like PAM. Season with salt and pepper or a little hot sauce to taste)<br/><br/>\" +\r\n \"<b>Low Fat Cottage Cheese:</b> 1 cup <br/><br/>\" +\r\n \"<b>Chick Breast:</b> 1 breast (grill, bake, or pan fry with non-stick spray. Okay to season but DO NOT use marinades because they are full of salt)<br/><br/>\" +\r\n \"<b>Lean Beef:</b> 6 oz (Ground Beef 93% lean, Eye of Round cut in to small portions and grilled, baked, fried -or- London Broil grilled or baked then cut into portions)<br/><br/>\" +\r\n \"<b>Pork:</b> 6 oz (Pork Chops lean with fat cut off edge before cooking -or- Pork Tenderloin <br/><br/>\" +\r\n \"<b>Fish:</b> 6 oz (any fish is acceptable)<br/><br/>\" +\r\n \"<b>Protein Powder Mixed with Water:</b> 1 scoop (around 25g of protein per serving)<br/><br/>\" +\r\n \"<b>Deli Meat:</b> Turkey 4 oz. (ask for the low sodium) <br/><br/>\";\r\n contentDesc.setText(Html.fromHtml(textContent));\r\n */\r\n\r\n break;\r\n case 1:\r\n myRef = database.getReference(\"Carbohydrates\");\r\n nutritionTitle.setText(\"Carbohydrate Sources\");\r\n\r\n /*\r\n myRef.setValue(\"<b>Carbohydrate Options / Serving Size</b>\" + \"<br/></br/><br/>\" +\r\n \"<b>Oatmeal:</b> 3/4 cup (make with water and season with artificial sweetener such as Stevia, Splenda, Equal, Sweet n Low, or cinnamon. After cooking, I add a scoop of protein powder to create a chocolate protein oatmeal which is awesome.)<br/><br/>\" +\r\n \"<b>High Fiber Cereal:</b> 1 cup with 1/2 cup skim milk<br/><br/>\" +\r\n \"<b>Sweet Potato:</b> medium size (microwave wrapped in a paper towel for 5 to 6 minutes on high) <br/><br/>\" +\r\n \"<b>Brown Rice:</b> 1 cup <br/><br/>\" +\r\n \"<b>Quinoa:</b> 1 cup (actually a seed that is very similar in texture and consistency to couscous. Season with salt & pepper which is quite good)<br/><br/>\" +\r\n \"<b>Wheat Berries:</b> 1 cup (incredible grain found in bulk at grocers such as Whole Foods) <br/><br/>\" +\r\n \"<b>Whole Grain Bread:</b> 2 slices <br/><br/>\" +\r\n \"<b>Low Carbohydrate or Whole Wheat Tortilla:</b> 1 <br/><br/>\" +\r\n \"<b>Beans:</b> 1/2 can (pinto, garbanzo, or red kidney and look for the low sodium option if buying canned beans)<br/><br/>\");\r\n\r\n\r\n\r\n textContent = \"<b>Carbohydrate Options / Serving Size</b>\" + \"<br/></br/><br/>\" +\r\n \"<b>Oatmeal:</b> 3/4 cup (make with water and season with artificial sweetener such as Stevia, Splenda, Equal, Sweet n Low, or cinnamon. After cooking, I add a scoop of protein powder to create a chocolate protein oatmeal which is awesome.)<br/><br/>\" +\r\n \"<b>High Fiber Cereal:</b> 1 cup with 1/2 cup skim milk<br/><br/>\" +\r\n \"<b>Sweet Potato:</b> medium size (microwave wrapped in a paper towel for 5 to 6 minutes on high) <br/><br/>\" +\r\n \"<b>Brown Rice:</b> 1 cup <br/><br/>\" +\r\n \"<b>Quinoa:</b> 1 cup (actually a seed that is very similar in texture and consistency to couscous. Season with salt & pepper which is quite good)<br/><br/>\" +\r\n \"<b>Wheat Berries:</b> 1 cup (incredible grain found in bulk at grocers such as Whole Foods) <br/><br/>\" +\r\n \"<b>Whole Grain Bread:</b> 2 slices <br/><br/>\" +\r\n \"<b>Low Carbohydrate or Whole Wheat Tortilla:</b> 1 <br/><br/>\" +\r\n \"<b>Beans:</b> 1/2 can (pinto, garbanzo, or red kidney and look for the low sodium option if buying canned beans)<br/><br/>\";\r\n contentDesc.setText(Html.fromHtml(textContent));\r\n */\r\n break;\r\n\r\n case 2:\r\n myRef = database.getReference(\"Fats\");\r\n nutritionTitle.setText(\"Fat Sources\");\r\n /*\r\n myRef.setValue(\"<b>Fat Options</b> <b>/</b> <b>Serving Size</b>\" + \"<br/></br/><br/>\" +\r\n \"<b>Olive Oil </b> <b>/</b> <b>Flaxseed Oil:</b> Great source of fat. Great to add to dishes.<br/><br/>\" +\r\n \"<b>Fish Oil:</b> Staple source of healthy fats.<br/><br/>\" +\r\n \"<b>Almond Butter</b><b>/</b><b>Cashew Butter:</b> Derived from the nuts but a good source of fat.<br/><br/>\" +\r\n \"<b>Almonds:</b> Great source of fat and small amount of protein.<br/><br/>\" +\r\n \"<b>Pecans:</b> Great source of fat and small amount of protein.<br/><br/>\" +\r\n \"<b>Walnuts:</b> Great source of fat and small amount of protein.<br/><br/>\" +\r\n \"<b>Cashews:</b> Great source of fat and small amount of protein.<br/><br/>\" +\r\n \"<b>Natural Peanut Butter:</b> Not processed. Great source of fat and some protein. Love adding this to my shakes during the day.<br/><br/>\" +\r\n \"<b>Avocados:</b> Healthy fat source. Love it in my sushi.\");\r\n\r\n\r\n textContent = \"<b>Fat Options</b> <b>/</b> <b>Serving Size</b>\" + \"<br/></br/><br/>\" +\r\n \"<b>Olive Oil </b> <b>/</b> <b>Flaxseed Oil:</b> Great source of fat. Great to add to dishes.<br/><br/>\" +\r\n \"<b>Fish Oil:</b> Staple source of healthy fats.<br/><br/>\" +\r\n \"<b>Almond Butter</b><b>/</b><b>Cashew Butter:</b> Derived from the nuts but a good source of fat.<br/><br/>\" +\r\n \"<b>Almonds:</b> Great source of fat and small amount of protein.<br/><br/>\" +\r\n \"<b>Pecans:</b> Great source of fat and small amount of protein.<br/><br/>\" +\r\n \"<b>Walnuts:</b> Great source of fat and small amount of protein.<br/><br/>\" +\r\n \"<b>Cashews:</b> Great source of fat and small amount of protein.<br/><br/>\" +\r\n \"<b>Natural Peanut Butter:</b> Not processed. Great source of fat and some protein. Love adding this to my shakes during the day.<br/><br/>\" +\r\n \"<b>Avocados:</b> Healthy fat source. Love it in my sushi.\";\r\n contentDesc.setText(Html.fromHtml(textContent));\r\n */\r\n\r\n break;\r\n case 3:\r\n myRef = database.getReference(\"FruitsAndVeggies\");\r\n nutritionTitle.setText(\"Fruits & Vegetables\");\r\n /*\r\n myRef.setValue(\"<b>Vegetables</b>\" + \"<br/><br/><br/>\" +\r\n \"General rule is that if it is *green* you may consume as much as desired- seriously as much as you want.<br/><br/>\" +\r\n \"Salads are a great option; however, use a vinegar dressing as opposed to high calorie dressings.<br/><br/> \" +\r\n \"Seasoned Rice Wine Vinegar is a personal favorite which can be found in the vinegar section of the grocery store.<br/><br/>\" +\r\n \"<b>Broccoli:</b> as much as you want (great steamed with a little salt, pepper and a squeeze of lemon)<br/><br/>\" +\r\n \"<b>Yellow Squash:</b> as much as you want<br/><br/>\" +\r\n \"<b>Zucchini:</b> as much as you want<br/><br/>\" +\r\n \"<b>Green Pepper:</b> as much as you want<br/><br/>\" +\r\n \"<b>Celery:</b> as much as you want<br/><br/>\" +\r\n \"<b>Cucumber:</b> as much as you want<br/><br/>\" +\r\n \"<b>Spinach:</b> as much as you want<br/><br/>\" +\r\n \"<b>Lettuce (any kind):</b> as much as you want<br/><br/>\" +\r\n \"<b>Green Beans:</b> as much as you want (if canned, purchase the \\\"<i>No Sodium Added<i/>\\\" option)<br/><br/>\" +\r\n \"<b>Asparagus:</b> as much as you want<br/><br/>\" +\r\n \"<b>Radishes:</b> as much as you want<br/><br/>\" +\r\n \"<b>Mushrooms:</b> as much as you want<br/><br/>\" +\r\n \"<b>Carrots:</b></b> 2 medium size (note this root contains more sugar than most green vegetables) <br/><br/><br/>\" +\r\n \"<b>Fruits</b><br/><br/><br/>\" +\r\n \"<b>Orange:</b> 1<br/><br/>\" +\r\n \"<b>Apple:</b> 1<br/><br/>\" +\r\n \"<b>Grapefruit:</b> 1<br/><br/>\" +\r\n \"<b>Peach:</b> 1<br/><br/>\" +\r\n \"<b>Nectarine:</b> 1<br/><br/>\" +\r\n \"<b>Pear:</b> 1<br/><br/>\" +\r\n \"<b>Kiwi:</b> 2<br/><br/>\" +\r\n \"<b>Tangerine</b>: 2\");\r\n\r\n\r\n\r\n textContent = \"<b>Vegetables</b>\" + \"<br/><br/><br/>\" +\r\n \"General rule is that if it is *green* you may consume as much as desired- seriously as much as you want.<br/><br/>\" +\r\n \"Salads are a great option; however, use a vinegar dressing as opposed to high calorie dressings.<br/><br/> \" +\r\n \"Seasoned Rice Wine Vinegar is a personal favorite which can be found in the vinegar section of the grocery store.<br/><br/>\" +\r\n \"<b>Broccoli:</b> as much as you want (great steamed with a little salt, pepper and a squeeze of lemon)<br/><br/>\" +\r\n \"<b>Yellow Squash:</b> as much as you want<br/><br/>\" +\r\n \"<b>Zucchini:</b> as much as you want<br/><br/>\" +\r\n \"<b>Green Pepper:</b> as much as you want<br/><br/>\" +\r\n \"<b>Celery:</b> as much as you want<br/><br/>\" +\r\n \"<b>Cucumber:</b> as much as you want<br/><br/>\" +\r\n \"<b>Spinach:</b> as much as you want<br/><br/>\" +\r\n \"<b>Lettuce (any kind):</b> as much as you want<br/><br/>\" +\r\n \"<b>Green Beans:</b> as much as you want (if canned, purchase the \\\"<i>No Sodium Added<i/>\\\" option)<br/><br/>\" +\r\n \"<b>Asparagus:</b> as much as you want<br/><br/>\" +\r\n \"<b>Radishes:</b> as much as you want<br/><br/>\" +\r\n \"<b>Mushrooms:</b> as much as you want<br/><br/>\" +\r\n \"<b>Carrots:</b></b> 2 medium size (note this root contains more sugar than most green vegetables) <br/><br/><br/>\" +\r\n \"<b>Fruits</b><br/><br/><br/>\" +\r\n \"<b>Orange:</b> 1<br/><br/>\" +\r\n \"<b>Apple:</b> 1<br/><br/>\" +\r\n \"<b>Grapefruit:</b> 1<br/><br/>\" +\r\n \"<b>Peach:</b> 1<br/><br/>\" +\r\n \"<b>Nectarine:</b> 1<br/><br/>\" +\r\n \"<b>Pear:</b> 1<br/><br/>\" +\r\n \"<b>Kiwi:</b> 2<br/><br/>\" +\r\n \"<b>Tangerine</b>: 2\";\r\n contentDesc.setText(Html.fromHtml(textContent));\r\n */\r\n break;\r\n }\r\n\r\n // Read from the database\r\n myRef.addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n // This method is called once with the initial value and again\r\n // whenever data at this location is updated.\r\n String value = dataSnapshot.getValue(String.class);\r\n contentDesc.setText(Html.fromHtml(value));\r\n\r\n Log.d(TAG, \"Value is: \" + value);\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError error) {\r\n // Failed to read value\r\n Log.w(TAG, \"Failed to read value.\", error.toException());\r\n }\r\n });\r\n\r\n }",
"public void updateDatabaseRefForward(String child) {\n // move reference to the file, and then to the children attribute\n myRef = myRef.child(child).child(\"children\");\n }",
"void getDataFromFirebase(){\n //Firebase Read Listener\n mTasksDatabaseReference.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n //Running Foreach loop\n for(DataSnapshot d : dataSnapshot.getChildren()) {\n //Getting Value from 1 to 10 in ArrayList(tasks)\n tasks.add(d.getValue().toString());\n }\n\n //Putting key & tasks(ArrayList) in HashMap\n itemsMap.put(dataSnapshot.getKey(),tasks);\n\n headersList.add(dataSnapshot.getKey());\n\n tasks=new ArrayList<>();\n\n Log.d(TAG, \"onChildAdded: dataSnapshot.getChildren: \"+dataSnapshot.getChildren());\n Log.d(TAG, \"onChildAdded: KEY\"+dataSnapshot.getKey()+\" value \"+dataSnapshot.getValue().toString());\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n Log.d(TAG, \"onChildChanged: \"+dataSnapshot.getValue().toString());\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n //task.remove(\"\" + dataSnapshot.getValue());\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n // mTasksDatabaseReference.addChildEventListener(mChildEventListener);\n }",
"private void SaveVisitors() {\n\n if(deceasedKey!=null)\n {\n @SuppressLint(\"SimpleDateFormat\") DateFormat df = new SimpleDateFormat(\"EEE, d MMM yyyy, HH:mm\");\n date = df.format(Calendar.getInstance().getTime());\n\n reference=database.getReference(\"Deceaceds\").child(deceasedKey).child(\"Visitors\");\n reference.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n final Map<String,String> newMap= new HashMap<>();\n newMap.put(\"Date\", date + \" \"+\"Tarihinde \" + VisitorName + \" \" + VisitorSurname+\" \"+Fullname+\" profilini ziyaret etti\");\n String VisitorKey = reference.push().getKey();\n reference.child(VisitorKey).setValue(newMap);\n\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n\n }\n\n }",
"public void leerDB(){\n sqlDB = bdHelper.getReadableDatabase();\n\n }",
"@Override\n public void onChildAdded(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) {\n if (snapshot.exists()) {\n String favoriteName = snapshot.getKey();\n //add the snapshot key to favorites list as it will be the boulder problem name\n //favorites.add(snapshot.getKey());\n dbRef.child(\"BoulderProblems\").child(\"UserCreated\").child(favoriteName).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n BoulderProblem bp = snapshot.getValue(BoulderProblem.class);\n\n //create value event listener to find display name of setter in database\n ValueEventListener setterListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n //set the setter display name of the boulder problem\n bp.SetSetter(snapshot.getValue().toString());\n //add to list of boulder problems\n bps.add(bp);\n //call method to apply searches, filters and sorts to get correct display list\n BPSearch();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n };\n AttachSetterListener(bp.GetSetterId(), setterListener);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n //call the favorites search method\n //FavoritesSearch();\n }\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n refApartmentNumbersOnly.removeEventListener(apartmentListener);\n if (dataSnapshot.exists()){\n for (DataSnapshot data:dataSnapshot.getChildren()){\n String number = data.getValue(String.class);\n if (numberOfApartment.equals(number)){\n apartmentDoesntExist = false;\n }\n }\n }\n if (apartmentDoesntExist){\n\n DatabaseReference myRef2 = database.getReference(\"apartmentNumbersOnly\").child(uid);\n myRef2.setValue(numberOfApartment);\n Tenant t = new Tenant(firstNameText, lastNameText, idText, Integer.parseInt(numberOfApartment));\n DatabaseReference myRef = database.getReference(\"Tenants\").child(uid);\n myRef.setValue(t);\n actualUserType = t.getClass().getName();\n // create a path for the type of user and save in {uid <-> type}\n DatabaseReference myRef3 = database.getReference(\"typeDefined\").child(uid);\n myRef3.setValue(actualUserType);\n sendMetoMain();\n }\n else{\n deleteLeftOversFromDB(uid, \"duplicate apartment number\");\n }\n }",
"public static void createExampleOrders(DatabaseReference myRef) {\n for (int i = 1; i <= 3; i++) {\r\n myRef.child(\"example\" + i).child(\"status\").setValue(\"ACTIVE\");\r\n myRef.child(\"example\" + i).child(\"food\").setValue(\"Example Order \" + i);\r\n myRef.child(\"example\" + i).child(\"table\").setValue(i);\r\n myRef.child(\"example\" + i).child(\"timestamp\").setValue(\"0000000000000\");\r\n }\r\n }",
"public void getWalkerInfo(){\n walkerInfo.setVisibility(View.VISIBLE);\n final DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference().child(\"users\").child(\"walkers\").child(walkerFoundID);\n databaseReference.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(dataSnapshot.exists() && dataSnapshot.getChildrenCount()>0){\n\n name = dataSnapshot.child(\"name\").getValue().toString();\n phone = dataSnapshot.child(\"phone\").getValue().toString();\n\n if(name != null) {\n walkerNameField.setText(name);\n }\n\n if(phone != null) {\n walkerPhoneField.setText(phone);\n }\n\n storageReference = FirebaseStorage.getInstance().getReference();\n storageReference.child(\"images/\"+walkerFoundID).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Glide.with(OwnerMapActivity.this).load(uri).into(walkerProfileImage);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n // Handle any errors\n }\n });\n\n int ratingSum = 0;\n float ratingsTotal = 0;\n float ratingAvg = 0;\n for(DataSnapshot child: dataSnapshot.child(\"rating\").getChildren()){\n ratingSum = ratingSum + Integer.valueOf(child.getValue().toString());\n ratingsTotal++;\n }\n\n if(ratingsTotal != 0){\n ratingAvg = ratingSum / ratingsTotal;\n ratingBar.setRating(ratingAvg);\n }\n\n /*if(ratingAvg >= 4.5){\n DatabaseReference topWalkerRef = FirebaseDatabase.getInstance().getReference().child(\"topWalkers\");\n HashMap map = new HashMap();\n map.put(\"rating\", ratingAvg);\n topWalkerRef.child(walkerFoundID).updateChildren(map);\n }\n\n /* Map<String, Object> map = (Map<String, Object>) dataSnapshot.getValue();\n if(map.get(\"name\") != null){\n name = map.get(\"name\").toString();\n nameField.setText(name);\n }\n\n if(map.get(\"phone\") != null){\n phone = map.get(\"phone\").toString();\n phoneField.setText(phone);\n } */\n\n\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"@Override\n public void getAllBrains(Dataholder dataholder) {\n database.getReference(gameCodeRef).child(\"Players\").addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n ArrayList<Brain> brains = new ArrayList<>();\n for (DataSnapshot playersSnapshot : snapshot.getChildren()) {\n for (DataSnapshot brainSnapshot : playersSnapshot.getChildren()) {\n for (DataSnapshot brain2Snapshot : brainSnapshot.getChildren()){\n if (!(brain2Snapshot.getValue() instanceof String) && !(brain2Snapshot.getValue() instanceof Boolean)){\n Brain brain = brain2Snapshot.getValue(Brain.class);\n brains.add(brain);\n }\n }\n }\n }\n dataholder.setBrains(brains);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.w(TAG,\"loadGamecode:onCancelled\", error.toException());\n }\n\n });\n }",
"@SuppressLint(\"StringFormatMatches\")\n @Override\n public void onSuccess(Uri uri) {\n String id= databaseCars.push().getKey();\n Produit prod = new Produit(id,uri.toString(), nomfourni.getText().toString(), label.getText().toString(), prix.getText().toString(),qte.getText().toString());\n String prodId=root.push().getKey();\n root.child(prodId).setValue(prod);\n databaseCars.child(\"Produit\").child(id).setValue(prod);\n Toast.makeText(GestionProduit.this, \"Produit added\", Toast.LENGTH_LONG).show();\n }",
"public void getCurrentUserBranch(){\n mUserDatabase = FirebaseDatabase.getInstance().getReference().child(\"Users\");\n mUserDatabase.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n String id = dataSnapshot.getKey();\n String name = dataSnapshot.child(\"name\").getValue().toString();\n String email = dataSnapshot.child(\"email\").getValue().toString();\n if (email.equals(Email)) {\n currentUserId = id;\n Log.i(\"mUserDatabase\", \"Email is: \" + email);\n mUserBranch = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(currentUserId);\n mUserLocations = mUserBranch.child(\"collectedLocations\");\n mUserLocations.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n String location = dataSnapshot.getKey().toString();\n String locationName = dataSnapshot.getValue().toString();\n Log.i(\"mUserLocations\", \"Next location is: \" + location);\n collectedLocationList.add(location);\n collectedLocationNameList.add(locationName);\n collectedCounter = collectedLocationList.size();\n TextView textView = (TextView) findViewById(R.id.textView);\n textView.setText(\" x \" + collectedCounter);\n Log.i(\"collectedCounter\", \"Size is: \" + collectedCounter);\n SharedPreferences.Editor locationEditor = sharedPreferencesLocation.edit();\n locationEditor.putInt(\"Counter\", collectedCounter);\n Set<String> set = new HashSet<String>();\n set.addAll(collectedLocationNameList);\n locationEditor.putStringSet(\"locations\", set);\n locationEditor.commit();\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"private void attachDatabaseReference_requested_holidays() {\n if (mChildEventListenerDaysRequested == null) {\n mChildEventListenerDaysRequested = new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n Log.v(\"***********\", \"There has beem an addition in daysRequested\");\n //List<Long> longList = (List) dataSnapshot.getValue();\n if (dataSnapshot.getKey().equals(mUserID)) {//check if it's the current user branch\n RequestedHolidays reques = new RequestedHolidays();\n //reques = dataSnapshot.getValue(RequestedHolidays.class);\n GenericTypeIndicator<List<Long>> t =\n new GenericTypeIndicator<List<Long>>() {\n };\n\n Object objecto = dataSnapshot.getValue();\n //List<Long> messages = dataSnapshot.getValue(t);\n //makeMapHash(objecto);\n //HashMap<String, Long> map = new HashMap<String, Long>();\n //map.put (1, \"Mark\");\n //map.put (2, \"Tarryn\");\n //map = (HashMap) dataSnapshot.getValue();\n //List<Long> list = new ArrayList<Long>(map.values());\n\n //List<Long> longList = (List) dataSnapshot.getValue();\n List<Long> longList = (List<Long>) dataSnapshot.getValue();\n requestedHolidays = ConvertHashToList(longList);\n Log.i(\"***********\", \"DrawMonth called in attach...requested\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n }\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n Log.i(\"***********\", \"There has beem a change in daysRequested\");\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n Log.i(\"***********\", \"There has beem a removed in daysRequested\");\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n Log.i(\"***********\", \"There has beem a moved in daysRequested\");\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(getApplicationContext(), \"ONCANCELLED in /requested_holidays\", Toast.LENGTH_LONG).show();\n Log.i(\"***********\", \"ONCANCELLED IN /requested_holidays\");\n }\n };\n //when days are added to the requestedHolidays in the DB this will trigger\n //mDatabaseReferenceHolidays.addChildEventListener(mChildEventListenerDaysRequested);\n mDatabaseReferenceRequestedHolidays.addChildEventListener(mChildEventListenerDaysRequested);\n //mDatabaseReference.addChildEventListener(mChildEventListenerDaysRequested);\n }\n }",
"private void GetDataFromFirebase() {\n Query query = myRef.child(\"student\");\n\n query.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n ClearAll();\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n Students student = new Students();\n if (snapshot.child(\"url\").getValue() == null) {\n student.setImageUrl(snapshot.child(\"imageUrl\").getValue().toString());\n } else {\n student.setImageUrl(snapshot.child(\"url\").getValue().toString());\n\n }\n student.setName(snapshot.child(\"name\").getValue().toString());\n students.add(student);\n }\n recyclerAdapter = new GradingRecyclerAdapter(getApplicationContext(), students);\n recyclerView.setAdapter(recyclerAdapter);\n recyclerAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }",
"private void init(){\n DatabaseReference reference1 = FirebaseDatabase.getInstance().getReference();\n Query query1 = reference1.child(\"Users\")\n .orderByChild(\"userID\").equalTo(mUser.getUserID());\n query1.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for(DataSnapshot singleSnapshot : dataSnapshot.getChildren()){\n Log.d(TAG, \"onDataChange: found user:\" + singleSnapshot.getValue(User.class).toString());\n\n UserSettings settings = new UserSettings();\n settings.setUser(mUser);\n user_id = settings.getUser().getUserID();\n setProfileWidgets(settings);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n\n //get the users profile photos\n\n DatabaseReference reference2 = FirebaseDatabase.getInstance().getReference();\n\n /* GAKUHA SA DATABASE PHOTOS DATA ADTO SA USER_PHOTOS TABLE\n * NYA ANG UNIQUE ID KAY ANG USER_ID\n * NYA INSIDE KAY ANG FIELDS WITH VALUES*/\n Query query2 = reference2\n .child(\"Users_Photos\")\n .child(mUser.getUserID());\n query2.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n ArrayList<Photo> photos = new ArrayList<Photo>();\n for ( DataSnapshot singleSnapshot : dataSnapshot.getChildren()){\n\n Log.d(TAG, \"onDataChange: CHECKING >>>\" + singleSnapshot.getValue().toString());\n Photo photo = new Photo();\n Map<String, Object> objectMap = (HashMap<String, Object>) singleSnapshot.getValue();\n\n photo.setPhoto_description(objectMap.get(getString(R.string.field_caption)).toString());\n photo.setQuantity(objectMap.get(getString(R.string.field_tags)).toString());\n photo.setPhoto_id(objectMap.get(getString(R.string.field_photo_id)).toString());\n photo.setUser_id(objectMap.get(getString(R.string.field_user_id)).toString());\n photo.setDate_created(objectMap.get(getString(R.string.field_date_created)).toString());\n photo.setImage_path(objectMap.get(getString(R.string.field_image_path)).toString());\n\n\n ArrayList<Comment> comments = new ArrayList<Comment>();\n for (DataSnapshot dSnapshot : singleSnapshot\n .child(getString(R.string.field_comments)).getChildren()){\n Comment comment = new Comment();\n comment.setUser_id(dSnapshot.getValue(Comment.class).getUser_id());\n comment.setComment(dSnapshot.getValue(Comment.class).getComment());\n comment.setDate_created(dSnapshot.getValue(Comment.class).getDate_created());\n comments.add(comment);\n }\n\n photo.setComments(comments);\n\n List<Like> likesList = new ArrayList<Like>();\n for (DataSnapshot dSnapshot : singleSnapshot\n .child(getString(R.string.field_likes)).getChildren()){\n Like like = new Like();\n like.setUser_id(dSnapshot.getValue(Like.class).getUser_id());\n likesList.add(like);\n }\n photo.setLikes(likesList);\n photos.add(photo);\n }\n setupImageGrid(photos);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.d(TAG, \"onCancelled: query cancelled.\");\n }\n });\n }",
"void loadBioData_online(String fireID){\n\n String all_users = getResources().getString(R.string.all_users);\n tv_verify_status.setText(getResources().getString(R.string.logging_in));\n\n DatabaseReference all_user_ref = FirebaseDatabase.getInstance().getReference(all_users);\n\n all_user_ref.child(fireID).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n User_Class userBio = dataSnapshot.getValue(User_Class.class);\n\n if (userBio != null){\n try {\n klinDB.addUser(userBio);\n toDashboard();\n }catch (Exception e){\n Toast.makeText(getApplicationContext(),\"Error loading online data \"\n +e.toString(),Toast.LENGTH_LONG).show();\n\n }\n }\n\n all_user_ref.removeEventListener(this);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"public static void main(String[] args) {\n ConnectionManager connectionManager = new ConnectionManager();\n connectionManager.connect(\"student_register_database.db\");\n\n // Create a tables\n connectionManager.executeStatement(\"CREATE TABLE Skole (navn TEXT PRIMARY KEY)\");\n connectionManager.executeStatement(\"CREATE TABLE Kull (kode TEXT PRIMARY KEY, skole TEXT REFERENCES Skole(navn))\");\n connectionManager.executeStatement(\"CREATE TABLE Student (studentNo INTEGER PRIMARY KEY, navn TEXT NOT NULL, kull TEXT REFERENCES Kull(kode))\");\n connectionManager.executeStatement(\"CREATE TABLE Kurs (kode TEXT PRIMARY KEY, navn TEXT NOT NULL, skole TEXT REFERENCES Skole(navn))\");\n connectionManager.executeStatement(\"CREATE TABLE Karakter (id INTEGER PRIMARY KEY, karakter TEXT NOT NULL, ar INTEGER NOT NULL, student TEXT REFERENCES Student(studentNo), kurs TEXT REFERENCES Kurs(kode))\");\n\n // ASSIGNMENT PART B\n connectionManager.executeStatement(\"INSERT INTO Skole(navn) VALUES('Universitetet i Bergen')\");\n connectionManager.executeStatement(\"INSERT INTO Kull(kode,skole) VALUES('2019V', 'Universitetet i Bergen')\");\n connectionManager.executeStatement(\"INSERT INTO Kurs(kode, navn, skole) VALUES('INFO233', 'Avansert Programmering', 'Universitetet i Bergen')\");\n connectionManager.executeStatement(\"INSERT INTO Student(navn, kull) VALUES('Per', '2019V')\");\n connectionManager.executeStatement(\"INSERT INTO Student(navn, kull) VALUES('Kari', '2019V')\");\n connectionManager.executeStatement(\"INSERT INTO Karakter(karakter, ar, student, kurs) VALUES('A', '2019', 'Per', 'INFO233')\");\n connectionManager.executeStatement(\"INSERT INTO Karakter(karakter, ar, student, kurs) VALUES('A', '2019', 'Kari', 'INFO233')\");\n\n\n // Close the connection\n connectionManager.closeConnection();\n\n }",
"public static DatabaseReference getBase() {\n return FirebaseDatabase.getInstance().getReference();\n }",
"private void populatePersonalBoardList() {\n final DatabaseReference database;\n database = FirebaseDatabase.getInstance().getReference();\n\n database.child(\"PersonalBoard\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n DatabaseReference personalBoardDBRef = null;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if(snapshot.hasChild(email.split(\"@\")[0])){\n dataSnapshot = snapshot.child(email.split(\"@\")[0]);\n personalBoardDBRef = database.child(\"PersonalBoard\").child(snapshot.getKey()).child(email.split(\"@\")[0]);\n break;\n }\n }\n\n if(personalBoardDBRef != null) {\n for(DataSnapshot snapshot : dataSnapshot.getChildren()) {\n for(DataSnapshot subsnapshot : snapshot.getChildren()) {\n personalBoardList.add(subsnapshot.getKey().toString());\n }\n }\n } else {\n personalBoardList.add(\"My Board\");\n }\n arrayAdapterPersonalBoard.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(DatabaseError d) {\n Log.d(\"Login DbError Msg ->\", d.getMessage());\n Log.d(\"Login DbError Detail ->\", d.getDetails());\n }\n });\n }",
"private void fetchdata(DatabaseReference product_child) {\n product_child.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n for (DataSnapshot postSnapshot :snapshot.getChildren()){\n Cat_list cat_list = postSnapshot.getValue(Cat_list.class);\n// adding the item to the list which we get from the data base\n cat_lists.add(cat_list);\n Log.d(\"fetched\",cat_list.getName());\n }\n\n cat_Adapter=new Cat_Adapter(Catagories.this,cat_lists);\n cat_recyclerView.setAdapter(cat_Adapter);\n cat_Adapter.setOnItemClickListener(Catagories.this);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Toast.makeText(Catagories.this, error.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }",
"private void loadLeisure() {\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"leisures\");\n //get all data from this ref\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n postList.clear();\n for (DataSnapshot ds : dataSnapshot.getChildren()) {\n LeisureModel leisureModel = ds.getValue(LeisureModel.class);\n postList.add(leisureModel);\n //adapter\n postAdapter = new LeisureAdapter(SearchAllLeisure.this, postList);\n postAdapter.notifyDataSetChanged();\n //set adapter to recyclerview\n rvLeisureCategory.setAdapter(postAdapter);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n //in case of error\n Toast.makeText(SearchAllLeisure.this, \"\" + databaseError.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }",
"public void triggerRoomsOnce() throws Exception{\n Firebase roomsNodeRef = fire_db.child(\"ChatRoomNode\");\n Firebase newNodeRef = null;\n if(acceptKey == null){\n newNodeRef = roomsNodeRef.push();\n acceptKey = newNodeRef.getKey();\n }else{\n newNodeRef = roomsNodeRef.child(acceptKey);\n }\n // Firebase newNodeRef = roomsNodeRef.push();\n try {\n newNodeRef.setValue(\"accept\",new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n Log.d(\"triggerRoomsOnce\",\"onComplete Data could not be saved. \" + firebaseError.getMessage());\n } else {\n Log.d(\"triggerRoomsOnce\",\" onComplete Data saved successfully.\");\n }\n }\n });\n\n }catch (Exception exc){\n throw new Exception(\"Something failed.\", new Throwable(String.valueOf(Exception.class)));\n }\n\n\n /* triggerRoomsOnceRef.setValue(\"accepted\");*//*, new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n triggerRoomsOnceRef.removeEventListener();\n System.out.println(\"Data could not be saved. \" + firebaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\");\n }\n }\n });*//*\n*/\n\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n final Boolean[] press = new Boolean[1];\n if (dataSnapshot.hasChild(\"press\")) {\n press[0] = trueM;\n final DatabaseReference mPressReferencePress = db.child(\"Games\").child(userid).child(\"Redblue\").child(\"Question\");\n mListenerPress = new ValueEventListener() {\n @SuppressLint(\"SetTextI18n\")\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (press[0]) {\n //get current key and set read\n\n //if guest didnt ans quesiton\n updateSurvivor(userid);\n// checkansAfterPress(userid,press[0]);\n\n\n ArrayList<QuestionAddRBActivity.QuestionRB> questionUpdate = new ArrayList<>();\n Boolean allread = true;\n\n for (DataSnapshot child : dataSnapshot.getChildren()) {\n if (!child.hasChild(\"read\")) {\n QuestionAddRBActivity.QuestionRB temp = new QuestionAddRBActivity.QuestionRB();\n temp.setAnswer(child.child(\"answer\").getValue(String.class));\n temp.setQuestion(child.child(\"question\").getValue(String.class));\n temp.setOptionA(child.child(\"optionA\").getValue(String.class));\n temp.setOptionB(child.child(\"optionB\").getValue(String.class));\n temp.setQuestionkey(child.getKey());\n// temp.setQuestionkey(child.child(\"next\").getValue(String.class));\n questionUpdate.add(temp);\n allread = false;\n }\n }\n if (!questionUpdate.isEmpty()) {\n numberQ++;\n questionNumber.setText((numberQ) + \"/\" + size);\n if (userid.equals(userId)){\n optionB.setBackgroundColor(getResources().getColor(R.color.blueB));\n optionA.setBackgroundColor(getResources().getColor(R.color.redA));\n\n questionkey = questionUpdate.get(0).getQuestionkey();\n question.setText(questionUpdate.get(0).getQuestion());\n optionA.setText(questionUpdate.get(0).getOptionA());\n optionB.setText(questionUpdate.get(0).getOptionB());\n// if (numberQ ==size-1){\n// questionKeyLast[0] = questionkey;\n// }\n db.child(\"Games\").child(userid).child(\"Redblue\").child(\"currentQuestionKey\").setValue(questionkey);\n db.child(\"Games\").child(userid).child(\"Redblue\").child(\"Question\").child(questionUpdate.get(0).getQuestionkey()).child(\"read\").setValue(true);\n }else{\n setContentNextQuestion(userid);\n }\n\n// db.child(\"Games\").child(userid).child(\"Redblue\").child(questionItems.get(currentpo).getQuestionkey()).child(\"next\").setValue(true);\n db.child(\"Games\").child(userid).child(\"Redblue\").child(\"press\").removeValue();\n press[0] = falseM;\n mPressReferencePress.removeEventListener(mListenerPress);\n\n }\n if (allread) {\n gameSet(userid,allread,false,press[0]);\n //find the last survivor if game set\n\n// findSurvivor(userid,allread,false);\n }\n //update the textview of surviorand loser\n }\n\n\n }\n\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n };\n mPressReferencePress.addValueEventListener(mListenerPress);\n db.child(\"Games\").child(userid).child(\"Redblue\").child(\"press\").removeValue();\n\n }\n\n\n }",
"private void MakemeOnlion() {\n progressDialog.setMessage(\"Checking user....\");\n Map<String,Object>map=new HashMap<>();\n map.put(\"onlion\",\"true\");\n\n //update value to db\n DatabaseReference databaseReference= FirebaseDatabase.getInstance().getReference(\"Users\");\n databaseReference.child(firebaseAuth.getCurrentUser().getUid()).updateChildren(map).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n \n CheckuserType();\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(Login_Activity.this, e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n });\n }",
"public void status(String status) {\n FirebaseDatabase.getInstance().getReference(\"chef_account_settings\").child(firebaseUser.getUid()).child(\"status\").setValue(status);\n// HashMap<String, Object> hashMap = new HashMap<>();\n// hashMap.put(\"status\", status);\n// reference.updateChildren(hashMap);\n }"
] | [
"0.62258464",
"0.5850361",
"0.57551247",
"0.5744646",
"0.55636644",
"0.54460925",
"0.54324245",
"0.5430066",
"0.5417742",
"0.5411692",
"0.5405658",
"0.5404692",
"0.5403919",
"0.53952885",
"0.53907573",
"0.538094",
"0.53484905",
"0.53422534",
"0.53173274",
"0.53069234",
"0.5299003",
"0.5293486",
"0.52838916",
"0.526501",
"0.5256775",
"0.52539295",
"0.5246954",
"0.52369714",
"0.5209594",
"0.5202888",
"0.51931393",
"0.5192525",
"0.5192031",
"0.5191473",
"0.5179325",
"0.5178554",
"0.5169606",
"0.5156572",
"0.5150143",
"0.5121512",
"0.51199985",
"0.5118226",
"0.5116941",
"0.5113932",
"0.51048017",
"0.50872344",
"0.5085652",
"0.5073281",
"0.503996",
"0.50342435",
"0.5029407",
"0.5012308",
"0.50088364",
"0.49841574",
"0.49710348",
"0.49595758",
"0.49590445",
"0.49541268",
"0.49539158",
"0.49503714",
"0.49495336",
"0.49405614",
"0.49394313",
"0.49198636",
"0.4918414",
"0.4911687",
"0.49095562",
"0.4908392",
"0.48912868",
"0.4883593",
"0.48826507",
"0.48822856",
"0.487165",
"0.4865795",
"0.48557076",
"0.48491174",
"0.48354444",
"0.48334694",
"0.48328465",
"0.48259994",
"0.4821099",
"0.4820606",
"0.482023",
"0.48134",
"0.48117524",
"0.48103222",
"0.4809688",
"0.47988847",
"0.4797245",
"0.4793439",
"0.4790551",
"0.47870508",
"0.4784779",
"0.47765526",
"0.4776328",
"0.47735852",
"0.4773417",
"0.47705504",
"0.476844",
"0.47626486"
] | 0.6723049 | 0 |
Extracts a private key from a Java Keystore and then encrypts it (with hybrid public key encryption). If signing key is specified the encrypted private key is additionally signed with that key and the output is a zip file containing the signature and the encrypted private key. If the signing key uses algorithm different then RSA or DSA an UnsupportedAlgorithmException is thrown. | public void run(
String encryptionPublicKeyHex,
String outputFile,
KeystoreKey keyToExport,
Optional<KeystoreKey> keyToSignWith,
boolean includeCertificate)
throws Exception {
KeyStore keyStoreForKeyToExport = keystoreHelper.getKeystore(keyToExport);
PrivateKey privateKeyToExport =
keystoreHelper.getPrivateKey(keyStoreForKeyToExport, keyToExport);
byte[] privateKeyPem = privateKeyToPem(privateKeyToExport);
byte[] encryptedPrivateKey = encryptPrivateKey(fromHex(encryptionPublicKeyHex), privateKeyPem);
if (keyToSignWith.isPresent() || includeCertificate) {
Certificate certificate = keystoreHelper.getCertificate(keyStoreForKeyToExport, keyToExport);
Optional<byte[]> signature =
keyToSignWith.isPresent()
? Optional.of(sign(encryptedPrivateKey, keyToSignWith.get()))
: Optional.empty();
writeToZipFile(outputFile, signature, encryptedPrivateKey, certificateToPem(certificate));
} else {
Files.write(Paths.get(outputFile), encryptedPrivateKey);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void createKeyFiles(String pass, String publicKeyFilename, String privateKeyFilename) throws Exception {\n\t\tString password = null;\n\t\tif (pass.isEmpty()) {\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tSystem.out.print(\"Password to encrypt the private key: \");\n\t\t\tpassword = in.readLine();\n\t\t\tSystem.out.println(\"Generating an RSA keypair...\");\n\t\t} else {\n\t\t\tpassword = pass;\n\t\t}\n\t\t\n\t\t// Create an RSA key\n\t\tKeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkeyPairGenerator.initialize(1024);\n\t\tKeyPair keyPair = keyPairGenerator.genKeyPair();\n\n\t\tSystem.out.println(\"Done generating the keypair.\\n\");\n\n\t\t// Now we need to write the public key out to a file\n\t\tSystem.out.print(\"Public key filename: \");\n\n\t\t// Get the encoded form of the public key so we can\n\t\t// use it again in the future. This is X.509 by default.\n\t\tbyte[] publicKeyBytes = keyPair.getPublic().getEncoded();\n\n\t\t// Write the encoded public key out to the filesystem\n\t\tFileOutputStream fos = new FileOutputStream(publicKeyFilename);\n\t\tfos.write(publicKeyBytes);\n\t\tfos.close();\n\n\t\t// Now we need to do the same thing with the private key,\n\t\t// but we need to password encrypt it as well.\n\t\tSystem.out.print(\"Private key filename: \");\n \n\t\t// Get the encoded form. This is PKCS#8 by default.\n\t\tbyte[] privateKeyBytes = keyPair.getPrivate().getEncoded();\n\n\t\t// Here we actually encrypt the private key\n\t\tbyte[] encryptedPrivateKeyBytes = passwordEncrypt(password.toCharArray(), privateKeyBytes);\n\n\t\tfos = new FileOutputStream(privateKeyFilename);\n\t\tfos.write(encryptedPrivateKeyBytes);\n\t\tfos.close();\n\t}",
"void exportSecretKey(PGPSecretKeyRing key, OutputStream outputStream) throws IOException;",
"@Override\n public OutputStream createEncryptor(OutputStream out, EncryptionKey publicKey) throws IOException {\n KeyEncapsulationMechanism.KeyAndCiphertext<SymmetricKey> keyAndCiphertext = kem.encaps(publicKey);\n\n //Serialize the encapsulated key\n byte[] encapsulatedKey = new JSONConverter().serialize(keyAndCiphertext.encapsulatedKey.getRepresentation())\n .getBytes(StandardCharsets.UTF_8);\n\n //Prepare the encapsulated key length as the first four bytes of the ciphertext. That ought to be enough for\n // everybody.\n byte[] keyLenBytes = ByteBuffer.allocate(4).putInt(encapsulatedKey.length).array();\n\n //Write keyLenBytes || encapsulatedKey to stream\n out.write(keyLenBytes);\n out.write(encapsulatedKey);\n\n //Return resulting stream that symmetrically encrypts any input and writes the ciphertext to out\n return symmetricScheme.createEncryptor(out, keyAndCiphertext.key);\n }",
"public PrivateKey getKey();",
"private void openKeystoreAndOutputJad() throws Exception {\n File ksfile;\n FileInputStream ksstream;\n\n if (alias == null) {\n usageError(command + \" requires -alias\");\n }\n\n if (outfile == null) {\n usageError(command + \" requires an output JAD\");\n }\n\n if (keystore == null) {\n keystore = System.getProperty(\"user.home\") + File.separator\n + \".keystore\";\n }\n\n try {\n ksfile = new File(keystore);\n // Check if keystore file is empty\n if (ksfile.exists() && ksfile.length() == 0) {\n throw new Exception(\"Keystore exists, but is empty: \" +\n keystore);\n }\n\n ksstream = new FileInputStream(ksfile);\n } catch (FileNotFoundException fnfe) {\n throw new Exception(\"Keystore does not exist: \" + keystore);\n }\n\n try {\n try {\n // the stream will be closed later\n outstream = new FileOutputStream(outfile);\n } catch (IOException ioe) {\n throw new Exception(\"Error opening output JAD: \" +\n outfile);\n }\n\n try {\n // load the keystore into the AppDescriptor\n appdesc.loadKeyStore(ksstream, storepass);\n } catch (Exception e) {\n throw new Exception(\"Keystore could not be loaded: \" +\n e.toString());\n }\n } finally {\n try {\n ksstream.close();\n } catch (IOException e) {\n // ignore\n }\n }\n }",
"void exportPublicKey(long KeyId, OutputStream os) throws PGPException, IOException, KeyNotFoundException;",
"public static void main(String args[]) throws Exception{\n\t KeyStore keyStore = KeyStore.getInstance(\"JCEKS\");\r\n\r\n //Cargar el objeto KeyStore \r\n char[] password = \"changeit\".toCharArray();\r\n java.io.FileInputStream fis = new FileInputStream(\r\n \t\t \"/usr/lib/jvm/java-11-openjdk-amd64/lib/security/cacerts\");\r\n \r\n keyStore.load(fis, password);\r\n \r\n //Crear el objeto KeyStore.ProtectionParameter \r\n ProtectionParameter protectionParam = new KeyStore.PasswordProtection(password);\r\n\r\n //Crear el objeto SecretKey \r\n SecretKey mySecretKey = new SecretKeySpec(\"myPassword\".getBytes(), \"DSA\");\r\n \r\n //Crear el objeto SecretKeyEntry \r\n SecretKeyEntry secretKeyEntry = new SecretKeyEntry(mySecretKey);\r\n keyStore.setEntry(\"AliasClaveSecreta\", secretKeyEntry, protectionParam);\r\n\r\n //Almacenar el objeto KeyStore \r\n java.io.FileOutputStream fos = null;\r\n fos = new java.io.FileOutputStream(\"newKeyStoreName\");\r\n keyStore.store(fos, password);\r\n \r\n //Crear el objeto KeyStore.SecretKeyEntry \r\n SecretKeyEntry secretKeyEnt = (SecretKeyEntry)keyStore.getEntry(\"AliasClaveSecreta\", protectionParam);\r\n\r\n //Crear el objeto SecretKey \r\n SecretKey mysecretKey = secretKeyEnt.getSecretKey(); \r\n System.out.println(\"Algoritmo usado para generar la clave: \"+mysecretKey.getAlgorithm()); \r\n System.out.println(\"Formato usado para la clave: \"+mysecretKey.getFormat());\r\n }",
"private Map<String,KeystoreMetadata> buildKeystores(\r\n Map<String,Object> keyObjMap, Map<String,CertificateMetadata> certMap, IPresenter presenter)\r\n {\r\n Map<String,KeystoreMetadata> keyMap = new HashMap<>();\r\n for(Map.Entry<String,Object> keyEntry : keyObjMap.entrySet())\r\n {\r\n Map<String,Object> propertiesMap = null;\r\n try {\r\n propertiesMap = (Map<String, Object>) keyEntry.getValue();\r\n } catch (ClassCastException e) {\r\n throw new MetadataException(\"Certificate metadata is incorrectly formatted\");\r\n }\r\n \r\n String outputKeystoreFilename = keyEntry.getKey();\r\n KeystoreMetadata km = new KeystoreMetadata();\r\n km.setOutputKeystoreFilename(outputKeystoreFilename);\r\n km.setBaseKeystoreFilename((String) propertiesMap.get(\"base-keystore-filename\"));\r\n km.setKeystorePassword((String) propertiesMap.get(\"keystore-password\"));\r\n \r\n Map<String,Object> certsObjectMap = null;\r\n try {\r\n certsObjectMap = (Map<String,Object>) propertiesMap.get(\"certificates\");\r\n } catch(ClassCastException e) {\r\n throw new MetadataException(\"Certificate metadata is incorrectly formatted\");\r\n }\r\n \r\n List<CertificateMetadata> certList = new LinkedList<>();\r\n if(certsObjectMap == null) // allow creation of empty keystores\r\n presenter.emptyKeystore(outputKeystoreFilename);\r\n else\r\n for(Map.Entry<String,Object> certEntry : certsObjectMap.entrySet())\r\n {\r\n String certRef = certEntry.getKey();\r\n String certAlias = (String) certEntry.getValue();\r\n CertificateMetadata cert = certMap.get(certRef);\r\n km.addCertByAlias(certAlias,cert);\r\n km.addAliasByCertRef(certRef,certAlias);\r\n certList.add(cert);\r\n }\r\n km.setCertificates(certList);\r\n keyMap.put(outputKeystoreFilename, km);\r\n }\r\n return keyMap;\r\n }",
"private static void keyPairGenerator() throws NoSuchAlgorithmException, IOException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(2048);\n KeyPair keyPair = kpg.generateKeyPair();\n\n //Get public and private keys\n Key publicKey = keyPair.getPublic();\n Key privateKey = keyPair.getPrivate();\n\n String outFile = files_path + \"/Client_public\";\n PrintStream out = null;\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(publicKey.getEncoded());\n out.close();\n\n outFile = files_path + \"/Client_private\";\n out = new PrintStream(new FileOutputStream(outFile + \".key\"));\n out.write(privateKey.getEncoded());\n out.close();\n\n System.err.println(\"Private key format: \" + privateKey.getFormat());\n // prints \"Private key format: PKCS#8\" on my machine\n\n System.err.println(\"Public key format: \" + publicKey.getFormat());\n // prints \"Public key format: X.509\" on my machine\n\n }",
"public KeyStore getKeyStore(InputStream keystoreIS, String password) throws CertException;",
"void exportSecretKey(long KeyID, OutputStream outputStream) throws PGPException, IOException, KeyNotFoundException;",
"void saveKeys(String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;",
"public KeyProvider getKeyProvider() {\n return keystore; \n }",
"public void importKeyFromJcaKeystore(KeyStore jcaKeystore,\n String alias, String domain)\n throws IOException, GeneralSecurityException {\n X509Certificate cert;\n byte[] der;\n TLV tbsCert;\n TLV subjectName;\n RSAPublicKey rsaKey;\n String owner;\n long notBefore;\n long notAfter;\n byte[] rawModulus;\n int i;\n int keyLen;\n byte[] modulus;\n byte[] exponent;\n Vector keys;\n\n // get the cert from the keystore\n try {\n cert = (X509Certificate)jcaKeystore.getCertificate(alias);\n } catch (ClassCastException cce) {\n throw new CertificateException(\"Certificate not X.509 type\");\n }\n\n if (cert == null) {\n throw new CertificateException(\"Certificate not found\");\n }\n\n /*\n * J2SE reorders the attributes when building a printable name\n * so we must build a printable name on our own.\n */\n\n /*\n * TBSCertificate ::= SEQUENCE {\n * version [0] EXPLICIT Version DEFAULT v1,\n * serialNumber CertificateSerialNumber,\n * signature AlgorithmIdentifier,\n * issuer Name,\n * validity Validity,\n * subject Name,\n * subjectPublicKeyInfo SubjectPublicKeyInfo,\n * issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,\n * -- If present, version shall be v2 or v3\n * subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,\n * -- If present, version shall be v2 or v3\n * extensions [3] EXPLICIT Extensions OPTIONAL\n * -- If present, version shall be v3\n * }\n */\n der = cert.getTBSCertificate();\n tbsCert = new TLV(der, 0);\n\n // walk down the tree of TLVs to find the subject name\n try {\n // Top level a is Sequence, drop down to the first child\n subjectName = tbsCert.child;\n\n // skip the version if present.\n if (subjectName.type == TLV.VERSION_TYPE) {\n subjectName = subjectName.next;\n }\n\n // skip the serial number\n subjectName = subjectName.next;\n \n // skip the signature alg. id.\n subjectName = subjectName.next;\n \n // skip the issuer\n subjectName = subjectName.next;\n \n // skip the validity\n subjectName = subjectName.next;\n\n owner = parseDN(der, subjectName);\n } catch (NullPointerException e) {\n throw new CertificateException(\"TBSCertificate corrupt 1\");\n } catch (IndexOutOfBoundsException e) {\n throw new CertificateException(\"TBSCertificate corrupt 2\");\n }\n\n notBefore = cert.getNotBefore().getTime();\n notAfter = cert.getNotAfter().getTime();\n\n // get the key from the cert\n try {\n rsaKey = (RSAPublicKey)cert.getPublicKey();\n } catch (ClassCastException cce) {\n throw new RuntimeException(\"Key in certificate is not an RSA key\");\n }\n\n // get the key parameters from the key\n rawModulus = rsaKey.getModulus().toByteArray();\n\n /*\n * the modulus is given as the minimum positive integer,\n * will not padded to the bit size of the key, or may have a extra\n * pad to make it positive. SSL expects the key to be signature\n * bit size. but we cannot get that from the key, so we should\n * remove any zero pad bytes and then pad out to a multiple of 8 bytes\n */\n for (i = 0; i < rawModulus.length && rawModulus[i] == 0; i++);\n\n keyLen = rawModulus.length - i;\n keyLen = (keyLen + 7) / 8 * 8;\n modulus = new byte[keyLen];\n\n int k, j;\n for (k = rawModulus.length - 1, j = keyLen - 1;\n k >= 0 && j >= 0; k--, j--) {\n modulus[j] = rawModulus[k];\n }\n\n exponent = rsaKey.getPublicExponent().toByteArray();\n\n // add the key\n keys = keystore.findKeys(owner);\n if (keys != null) {\n boolean duplicateKey = false;\n\n for (int n = 0; !duplicateKey && n < keys.size(); n++) {\n PublicKeyInfo key = (PublicKeyInfo)keys.elementAt(n);\n\n if (key.getOwner().equals(owner)) {\n byte[] temp = key.getModulus();\n\n if (modulus.length == temp.length) {\n duplicateKey = true;\n for (int m = 0; j < modulus.length && m < temp.length;\n m++) {\n if (modulus[m] != temp[m]) {\n duplicateKey = false;\n break;\n }\n }\n }\n }\n }\n \n if (duplicateKey) {\n throw new CertificateException(\n \"Owner already has this key in the ME keystore\");\n }\n }\n \n keystore.addKey(new PublicKeyInfo(owner, notBefore, notAfter,\n modulus, exponent, domain));\n }",
"public KeyStore getKeyStore();",
"ExportedKeyData makeKeyPairs(PGPKeyPair masterKey, PGPKeyPair subKey, String username, String email, String password) throws PGPException, IOException;",
"public interface CertService {\n\n /**\n * Retrieves the root certificate.\n * \n * @return\n * @throws CertException\n */\n public X509Certificate getRootCertificate() throws CertException;\n\n /**\n * Sets up a root service to be used for CA-related services like certificate request signing and certificate\n * revocation.\n * \n * @param keystore\n * @throws CertException\n */\n public void setRootService(RootService rootService) throws CertException;\n\n /**\n * Retrieves a KeyStore object from a supplied InputStream. Requires a keystore password.\n * \n * @param userId\n * @return\n */\n public KeyStore getKeyStore(InputStream keystoreIS, String password) throws CertException;\n\n /**\n * Retrieves existing private and public key from a KeyStore.\n * \n * @param userId\n * @return\n */\n public KeyPair getKeyPair(KeyStore ks, String keyAlias, String certificateAlias, String keyPassword)\n throws CertException;\n\n /**\n * Retrieves an existing certificate from a keystore using keystore's certificate alias.\n * \n * @param userId\n * @return\n */\n public X509Certificate getCertificate(KeyStore keystore, String certificateAlias) throws CertException;\n\n /**\n * Generates a private key and a public certificate for a user whose X.509 field information was enclosed in a\n * UserInfo parameter. Stores those artifacts in a password protected keystore. This is the principal method for\n * activating a new certificate and signing it with a root certificate.\n * \n * @param userId\n * @return KeyStore based on the provided userInfo\n */\n\n public KeyStore initializeUser(UserInfo userInfo, String keyPassword) throws CertException;\n\n /**\n * Wraps a certificate object into an OutputStream object secured by a keystore password\n * \n * @param keystore\n * @param os\n * @param keystorePassword\n * @throws CertException\n */\n public void storeCertificate(KeyStore keystore, OutputStream os, String keystorePassword) throws CertException;\n\n /**\n * Extracts the email address from a certificate\n * \n * @param certificate\n * @return\n * @throws CertException\n */\n public String getCertificateEmail(X509Certificate certificate) throws CertException;\n\n}",
"public KeyFiles createKeyPair(Path publicKeyDestination, Path privateKeyDestination) throws IOException {\n Objects.requireNonNull(publicKeyDestination);\n Objects.requireNonNull(privateKeyDestination);\n\n KeyPairGenerator generator = null;\n\n try {\n generator = KeyPairGenerator.getInstance(\"RSA\", BouncyCastleProvider.PROVIDER_NAME);\n generator.initialize(1024, SecureRandom.getInstanceStrong());\n } catch (NoSuchAlgorithmException | NoSuchProviderException e) {\n // We register the provider at construction, and RSA is a standard algorithm - if these exceptions occur,\n // something is legitimately wrong with the JVM\n throw new IllegalStateException(\"Error configuring key generator\", e);\n }\n\n KeyPair pair = generator.generateKeyPair();\n\n PemObject publicPem = new PemObject(\"RSA PUBLIC KEY\", pair.getPublic().getEncoded());\n PemObject privatePem = new PemObject(\"RSA PRIVATE KEY\", pair.getPrivate().getEncoded());\n\n try (PemWriter pemWriter = new PemWriter(\n new OutputStreamWriter(Files.newOutputStream(publicKeyDestination, StandardOpenOption.CREATE_NEW)))) {\n pemWriter.writeObject(publicPem);\n }\n\n try (PemWriter pemWriter = new PemWriter(\n new OutputStreamWriter(Files.newOutputStream(privateKeyDestination, StandardOpenOption.CREATE_NEW)))) {\n pemWriter.writeObject(privatePem);\n }\n\n return new KeyFiles(publicKeyDestination, privateKeyDestination);\n }",
"public void saveKeystore(File meKeystoreFile) throws IOException {\n FileOutputStream output;\n\n output = new FileOutputStream(meKeystoreFile);\n\n keystore.serialize(output);\n output.close();\n }",
"OutputFile encryptingOutputFile();",
"public void RSAyoyo() throws NoSuchAlgorithmException, GeneralSecurityException, IOException {\r\n\r\n KeyPairGenerator kPairGen = KeyPairGenerator.getInstance(\"RSA\");\r\n kPairGen.initialize(2048);\r\n KeyPair kPair = kPairGen.genKeyPair();\r\n publicKey = kPair.getPublic();\r\n System.out.println(publicKey);\r\n privateKey = kPair.getPrivate();\r\n\r\n KeyFactory fact = KeyFactory.getInstance(\"RSA\");\r\n RSAPublicKeySpec pub = fact.getKeySpec(kPair.getPublic(), RSAPublicKeySpec.class);\r\n RSAPrivateKeySpec priv = fact.getKeySpec(kPair.getPrivate(), RSAPrivateKeySpec.class);\r\n serializeToFile(\"public.key\", pub.getModulus(), pub.getPublicExponent()); \t\t\t\t// this will give public key file\r\n serializeToFile(\"private.key\", priv.getModulus(), priv.getPrivateExponent());\t\t\t// this will give private key file\r\n\r\n \r\n }",
"java.lang.String getPubkey();",
"public void storeCertificate(KeyStore keystore, OutputStream os, String keystorePassword) throws CertException;",
"private void exportKeyPair() {\n\t\t// Which key pair entry has been selected?\n\t\tint selectedRow = keyPairsTable.getSelectedRow();\n\t\tif (selectedRow == -1) // no row currently selected\n\t\t\treturn;\n\n\t\t// Get the key pair entry's Keystore alias\n\t\tString alias = (String) keyPairsTable.getModel().getValueAt(selectedRow, 6);\n\n\t\t// Let the user choose a PKCS #12 file (keystore) to export public and\n\t\t// private key pair to\n\t\tFile exportFile = selectImportExportFile(\"Select a file to export to\", // title\n\t\t\t\tnew String[] { \".p12\", \".pfx\" }, // array of file extensions\n\t\t\t\t// for the file filter\n\t\t\t\t\"PKCS#12 Files (*.p12, *.pfx)\", // description of the filter\n\t\t\t\t\"Export\", // text for the file chooser's approve button\n\t\t\t\t\"keyPairDir\"); // preference string for saving the last chosen directory\n\n\t\tif (exportFile == null)\n\t\t\treturn;\n\n\t\t// If file already exist - ask the user if he wants to overwrite it\n\t\tif (exportFile.isFile()\n\t\t\t\t&& showConfirmDialog(this,\n\t\t\t\t\t\t\"The file with the given name already exists.\\n\"\n\t\t\t\t\t\t\t\t+ \"Do you want to overwrite it?\", ALERT_TITLE,\n\t\t\t\t\t\tYES_NO_OPTION) == NO_OPTION)\n\t\t\treturn;\n\n\t\t// Get the user to enter the password for the PKCS #12 keystore file\n\t\tGetPasswordDialog getPasswordDialog = new GetPasswordDialog(this,\n\t\t\t\t\"Credential Manager\", true,\n\t\t\t\t\"Enter the password for protecting the exported key pair\");\n\t\tgetPasswordDialog.setLocationRelativeTo(this);\n\t\tgetPasswordDialog.setVisible(true);\n\n\t\tString pkcs12Password = getPasswordDialog.getPassword();\n\n\t\tif (pkcs12Password == null) { // user cancelled or empty password\n\t\t\t// Warn the user\n\t\t\tshowMessageDialog(\n\t\t\t\t\tthis,\n\t\t\t\t\t\"You must supply a password for protecting the exported key pair.\",\n\t\t\t\t\tALERT_TITLE, INFORMATION_MESSAGE);\n\t\t\treturn;\n\t\t}\n\n\t\t// Export the key pair\n\t\ttry {\n\t\t\tcredManager.exportKeyPair(alias, exportFile, pkcs12Password);\n\t\t\tshowMessageDialog(this, \"Key pair export successful\", ALERT_TITLE,\n\t\t\t\t\tINFORMATION_MESSAGE);\n\t\t} catch (CMException cme) {\n\t\t\tshowMessageDialog(this, cme.getMessage(), ERROR_TITLE,\n\t\t\t\t\tERROR_MESSAGE);\n\t\t}\n\t}",
"public static void main(String... args) throws Exception {\n String password = CipherFactory.KEYSTORE_PASSWORD;\n KeyStore store = CipherFactory.getKeyStore(password);\n printKeystore(store, password);\n }",
"public static File createTempKeyStore( String keyStoreName, char[] keyStorePassword ) throws IOException, KeyStoreException,\n NoSuchAlgorithmException, CertificateException, InvalidKeyException, NoSuchProviderException, SignatureException\n {\n File keyStoreFile = Files.createTempFile( keyStoreName, \"ks\" ).toFile();\n keyStoreFile.deleteOnExit();\n \n KeyStore keyStore = KeyStore.getInstance( KeyStore.getDefaultType() );\n \n try ( InputStream keyStoreData = new FileInputStream( keyStoreFile ) )\n {\n keyStore.load( null, keyStorePassword );\n }\n\n // Generate the asymmetric keys, using EC algorithm\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance( \"EC\" );\n KeyPair keyPair = keyPairGenerator.generateKeyPair();\n \n // Generate the subject's name\n X500Principal owner = new X500Principal( \"CN=apacheds,OU=directory,O=apache,C=US\" );\n\n // Create the self-signed certificate\n X509Certificate certificate = CertificateUtil.generateSelfSignedCertificate( owner, keyPair, 365, \"SHA256WithECDSA\" );\n \n keyStore.setKeyEntry( \"apachedsKey\", keyPair.getPrivate(), keyStorePassword, new X509Certificate[] { certificate } );\n \n try ( FileOutputStream out = new FileOutputStream( keyStoreFile ) )\n {\n keyStore.store( out, keyStorePassword );\n }\n \n return keyStoreFile;\n }",
"@Override\n\tpublic void signPropis(File propis, String jks, String allias, String password, String cer, String cerNaziv)\n\t\t\tthrows IOException {\n\n\t\tDocument doc = loadDocument(propis.getCanonicalPath());\n\n\t\tPrivateKey pk = readPrivateKey(jks, allias, password);\n\t\tCertificate cert = readCertificate(jks, cerNaziv);\n\t\ttry {\n\t\t\tdoc = signDocument(doc, pk, cert);\n\t\t} catch (XMLSecurityException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tFileOutputStream f = new FileOutputStream(propis);\n\n\t\t\tTransformerFactory factory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = factory.newTransformer();\n\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\tStreamResult result = new StreamResult(f);\n\n\t\t\ttransformer.transform(source, result);\n\n\t\t\tf.close();\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerFactoryConfigurationError e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@NonNull\n @Override\n protected Key generateKey(@NonNull final KeyGenParameterSpec spec) throws GeneralSecurityException {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\n throw new KeyStoreAccessException(\"Unsupported API\" + Build.VERSION.SDK_INT + \" version detected.\");\n }\n\n final KeyGenerator generator = KeyGenerator.getInstance(getEncryptionAlgorithm(), KEYSTORE_TYPE);\n\n // initialize key generator\n generator.init(spec);\n\n return generator.generateKey();\n }",
"public PublicKeyStoreBuilderBase getKeystore() {\n return keystore;\n }",
"public MEKeyTool(String meKeystoreFilename)\n throws FileNotFoundException, IOException {\n\n FileInputStream input;\n\n input = new FileInputStream(new File(meKeystoreFilename));\n\n try {\n keystore = new PublicKeyStoreBuilderBase(input);\n } finally {\n input.close();\n }\n }",
"private KeyManager getKeyManager() {\n\t\tDefaultResourceLoader loader = new FileSystemResourceLoader();\n\t\tResource storeFile = loader.getResource(\"file:\" + samlProps.get(\"keyStoreFilePath\"));\n\t\tMap<String, String> keyPasswords = new HashMap<String, String>();\n\t\tkeyPasswords.put(samlProps.get(\"keyAlias\"), samlProps.get(\"keyPasswd\"));\n\n\t\treturn new JKSKeyManager(storeFile, samlProps.get(\"keyStorePasswd\"), keyPasswords, samlProps.get(\"keyAlias\"));\n\t}",
"public java.security.PrivateKey getPrivateKey() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: java.security.Signer.getPrivateKey():java.security.PrivateKey, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.getPrivateKey():java.security.PrivateKey\");\n }",
"public void writeKeysToFile(){\n if(d == null){\n calculateKeypair();\n }\n FileHandler fh = new FileHandler();\n fh.writeFile(sbPrivate.toString(), \"sk.txt\");\n fh.writeFile(sbPublic.toString(), \"pk.txt\");\n }",
"@VisibleForTesting\n KeyStore.PrivateKeyEntry getRSAKeyEntry() throws CryptoException, IncompatibleDeviceException {\n try {\n KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE);\n keyStore.load(null);\n if (keyStore.containsAlias(OLD_KEY_ALIAS)) {\n //Return existing key. On weird cases, the alias would be present but the key not\n KeyStore.PrivateKeyEntry existingKey = getKeyEntryCompat(keyStore, OLD_KEY_ALIAS);\n if (existingKey != null) {\n return existingKey;\n }\n } else if (keyStore.containsAlias(KEY_ALIAS)) {\n KeyStore.PrivateKeyEntry existingKey = getKeyEntryCompat(keyStore, KEY_ALIAS);\n if (existingKey != null) {\n return existingKey;\n }\n }\n\n Calendar start = Calendar.getInstance();\n Calendar end = Calendar.getInstance();\n end.add(Calendar.YEAR, 25);\n AlgorithmParameterSpec spec;\n X500Principal principal = new X500Principal(\"CN=Auth0.Android,O=Auth0\");\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n spec = new KeyGenParameterSpec.Builder(KEY_ALIAS, KeyProperties.PURPOSE_DECRYPT | KeyProperties.PURPOSE_ENCRYPT)\n .setCertificateSubject(principal)\n .setCertificateSerialNumber(BigInteger.ONE)\n .setCertificateNotBefore(start.getTime())\n .setCertificateNotAfter(end.getTime())\n .setKeySize(RSA_KEY_SIZE)\n .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_RSA_PKCS1)\n .setBlockModes(KeyProperties.BLOCK_MODE_ECB)\n .build();\n } else {\n //Following code is for API 18-22\n //Generate new RSA KeyPair and save it on the KeyStore\n KeyPairGeneratorSpec.Builder specBuilder = new KeyPairGeneratorSpec.Builder(context)\n .setAlias(KEY_ALIAS)\n .setSubject(principal)\n .setKeySize(RSA_KEY_SIZE)\n .setSerialNumber(BigInteger.ONE)\n .setStartDate(start.getTime())\n .setEndDate(end.getTime());\n\n KeyguardManager kManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n //The next call can return null when the LockScreen is not configured\n Intent authIntent = kManager.createConfirmDeviceCredentialIntent(null, null);\n boolean keyguardEnabled = kManager.isKeyguardSecure() && authIntent != null;\n if (keyguardEnabled) {\n //If a ScreenLock is setup, protect this key pair.\n specBuilder.setEncryptionRequired();\n }\n }\n spec = specBuilder.build();\n }\n\n KeyPairGenerator generator = KeyPairGenerator.getInstance(ALGORITHM_RSA, ANDROID_KEY_STORE);\n generator.initialize(spec);\n generator.generateKeyPair();\n\n return getKeyEntryCompat(keyStore, KEY_ALIAS);\n } catch (CertificateException | InvalidAlgorithmParameterException | NoSuchProviderException | NoSuchAlgorithmException | KeyStoreException | ProviderException e) {\n /*\n * This exceptions are safe to be ignored:\n *\n * - CertificateException:\n * Thrown when certificate has expired (25 years..) or couldn't be loaded\n * - KeyStoreException:\n * - NoSuchProviderException:\n * Thrown when \"AndroidKeyStore\" is not available. Was introduced on API 18.\n * - NoSuchAlgorithmException:\n * Thrown when \"RSA\" algorithm is not available. Was introduced on API 18.\n * - InvalidAlgorithmParameterException:\n * Thrown if Key Size is other than 512, 768, 1024, 2048, 3072, 4096\n * or if Padding is other than RSA/ECB/PKCS1Padding, introduced on API 18\n * or if Block Mode is other than ECB\n * - ProviderException:\n * Thrown on some modified devices when KeyPairGenerator#generateKeyPair is called.\n * See: https://www.bountysource.com/issues/45527093-keystore-issues\n *\n * However if any of this exceptions happens to be thrown (OEMs often change their Android distribution source code),\n * all the checks performed in this class wouldn't matter and the device would not be compatible at all with it.\n *\n * Read more in https://developer.android.com/training/articles/keystore#SupportedAlgorithms\n */\n Log.e(TAG, \"The device can't generate a new RSA Key pair.\", e);\n throw new IncompatibleDeviceException(e);\n } catch (IOException | UnrecoverableEntryException e) {\n /*\n * Any of this exceptions mean the old key pair is somehow corrupted.\n * We can delete both the RSA and the AES keys and let the user retry the operation.\n *\n * - IOException:\n * Thrown when there is an I/O or format problem with the keystore data.\n * - UnrecoverableEntryException:\n * Thrown when the key cannot be recovered. Probably because it was invalidated by a Lock Screen change.\n */\n deleteRSAKeys();\n deleteAESKeys();\n throw new CryptoException(\"The existing RSA key pair could not be recovered and has been deleted. \" +\n \"This occasionally happens when the Lock Screen settings are changed. You can safely retry this operation.\", e);\n }\n }",
"public void encrypt() throws Exception {\n\t\tLogWriter = new BufferedWriter(new FileWriter(localWorkingDirectoryPath + \"\\\\Log_Encryption.txt\"));\n\t\tFileOutputStream configurationFileOutputStream = null;\n\n\t\t// Loading the store with the giving arguments\n\t\twriteToLog(\"Step 1: Loading the store with the giving arguments\");\n\t\tloadStore();\n\n\t\t// Getting the receiver's public-key\n\t\twriteToLog(\"Step 2: Getting the receiver's public-key\");\n\t\tCertificate receiverCert = keyStore.getCertificate(receiverSelfSignedCertAlias);\n\t\tif (receiverCert == null) {\n\t\t\twriteToLog(\"The entered certificate alias: \\\"\" + receiverSelfSignedCertAlias\n\t\t\t\t\t+ \"\\\" dose not exist in the keys store.\");\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"The entered certificate alias: \\\"\" + receiverSelfSignedCertAlias\n\t\t\t\t\t+ \"\\\" dose not exist in the keys store.\");\n\t\t}\n\t\tPublicKey receiverPublicKey = receiverCert.getPublicKey();\n\n\t\t// Getting my private key in order to generate a signature\n\t\twriteToLog(\"Step 3: Getting the encryptor's private-key\");\n\t\tPrivateKey myPrivateKey = getMyPrivateKey();\n\t\t\n\t\t// Generating a symmetric key\n\t\twriteToLog(\"Step 4: Generating a symmetric key\");\n\t\tKeyGenerator kg = KeyGenerator.getInstance(\"AES\");\n\t\tSecretKey semetricKey = kg.generateKey();\n\n\t\t// Generating a random IV\n\t\twriteToLog(\"Step 5: Generating a random IV\");\n\t\tbyte[] iv = generateRandomIV();\n\n\t\t// Initializing the cipher\n\t\twriteToLog(\"Step 6: Initilatzing the cipher Object\");\n\t\ttry {\n\t\t\tmyCipher = createCipher();\n\t\t\tmyCipher.init(Cipher.ENCRYPT_MODE, semetricKey, new IvParameterSpec(iv));\n\t\t}catch(Exception e) {\n\t\t\twriteToLog(\"Error While tring to Initializing the cipher with the giving arguments: \" + e.getMessage());\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception(\"Error: While tring to Initializing the cipher with the giving arguments\",e);\n\t\t}\n\t\t\n\n\t\t// Initializing the signature with my private-key\n\t\twriteToLog(\"Step 7: Initilatzing the signature Object with the encryptor's private-key\");\n\t\tSignature dataSigner = Signature.getInstance(\"SHA256withRSA\");\n\t\tdataSigner.initSign(myPrivateKey);\n\n\t\t// Encrypting\n\t\twriteToLog(\"Step 8: Encrypting... \");\n\t\tFile fileToEncrrypt = new File(fileToEncryptPath);\n\t\tencryptingData(fileToEncrrypt, dataSigner);\n\n\t\t// Signing on the encrypted data\n\t\twriteToLog(\"Step 9: Signing on the encrypted data \");\n\t\tbyte[] mySignature = dataSigner.sign();\n\n\t\t// Encrypt the symmetric key with the public of the receiver\n\t\twriteToLog(\"Step 10: Encrypt the symmetric key with the public of the receiver \");\n\t\tbyte[] encryptedSymmetricKey = encryptSymmetricKey(receiverPublicKey, semetricKey);\n\n\t\t// Saving the IV, Encrypted Symmetric-Key and Signature to the configurations file\n\t\twriteToLog(\"Step 11: Saving the IV, Encrypted Semetric-Key and Signature to the configurations file \");\n\t\tsavingToConfigurationsFile(configurationFileOutputStream, iv, encryptedSymmetricKey, mySignature);\n\n\t\tLogWriter.write(\"Encryption completed, No Errors Were Found\");\n\t\tLogWriter.close();\n\t}",
"String encryption(Long key, String encryptionContent);",
"public static KeyPair GenrateandEncrypt(String keyname) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException\n\t {\n\t \tKeyPairGenerator kpg;\n\t kpg = KeyPairGenerator.getInstance(\"RSA\");\n kpg.initialize(4096);\n \n KeyPair kp = kpg.genKeyPair();\n PublicKey publicKey = kp.getPublic();\n PrivateKey privateKey = kp.getPrivate();\n\n //save keys \n \n \n String sPublic = Base64.getEncoder().encodeToString( publicKey.getEncoded());\n String sPrivate = Base64.getEncoder().encodeToString( privateKey.getEncoded());\n\n File file1 = new File(keyname+\"public.txt\");\n\t\t\tFileWriter fileWriter1 = new FileWriter(file1);\n\t\t\tfileWriter1.write(sPublic);\n\t\t\t\n\t\t\t\n\t\t\tFile file2 = new File(keyname+\"private.txt\");\n\t\t\tFileWriter fileWriter2 = new FileWriter(file2);\n\t\t\tfileWriter2.write(sPrivate);\n\t\t\t \n fileWriter1.flush();\n fileWriter1.close();\n \n fileWriter2.flush();\n fileWriter2.close();\n ////////////\n \n return kp;\n\t }",
"private static RSAPrivateKey getPrivateKey() throws GeneralSecurityException {\n String privateKeyPath = getPrivateKeyPath();\n String keyStorePath = getKeyStorePath();\n String keyStorePrivateKeyAlias = getKeyStoreAlias();\n if (privateKeyPath != null) {\n File privateKeyFile = new File(privateKeyPath);\n if (privateKeyFile.isFile()) {\n //load privateKey from file\n return loadPrivateKeyFromFile(privateKeyPath, passphrase);\n } else {\n throw new IllegalArgumentException(\n \"The specified privateKey path '\" + privateKeyPath + \"' is invalid\");\n }\n } else if (keyStorePath != null && keyStorePrivateKeyAlias != null) {\n return new KeyStoreManager()\n .getKeyStorePrivateKey(keyStorePath, getKeyStorePassword(), keyStorePrivateKeyAlias);\n } else {\n throw new IllegalArgumentException(\n \"Could not load the privateKey for authentication. Please check the privateKey parameters in your input.\");\n }\n }",
"public static void main(String[] args) {\n\n\t\tif (args.length != 5) {\n\t\t System.out.println(\"Usage: GenSig nameOfFileToSign keystore password sign publicKey\");\n\n\t\t }\n\t\telse try{\n\n\t\t KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t ks.load(new FileInputStream(args[1]), args[2].toCharArray());\n\t\t \n\t\t String alias = (String)ks.aliases().nextElement();\n\t\t PrivateKey privateKey = (PrivateKey) ks.getKey(alias, args[2].toCharArray());\n\n\t\t Certificate cert = ks.getCertificate(alias);\n\n\t\t // Get public key\t\n\t\t PublicKey publicKey = cert.getPublicKey();\n\n\t\t /* Create a Signature object and initialize it with the private key */\n\n\t\t Signature rsa = Signature.getInstance(\"SHA256withRSA\");\t\n\t\n\n\t\t rsa.initSign(privateKey);\n\n\t\t /* Update and sign the data */\n\n \t String hexString = readFile(args[0]).trim();\n\t\t byte[] decodedBytes = DatatypeConverter.parseHexBinary(hexString);\t\n\t\t InputStream bufin = new ByteArrayInputStream(decodedBytes);\n\n\n\t\t byte[] buffer = new byte[1024];\n\t\t int len;\n\t\t while (bufin.available() != 0) {\n\t\t\tlen = bufin.read(buffer);\n\t\t\trsa.update(buffer, 0, len);\n\t\t };\n\n\t\t bufin.close();\n\n\t\t /* Now that all the data to be signed has been read in, \n\t\t\t generate a signature for it */\n\n\t\t byte[] realSig = rsa.sign();\n\n\t\t \n\t\t /* Save the signature in a file */\n\n\t\t File file = new File(args[3]);\n\t\t PrintWriter out = new PrintWriter(file);\n\n\t\t\t// if file doesn't exists, then create it\n\t\t\tif (!file.exists()) {\n\t\t\t\tfile.createNewFile();\n\t\t\t}\n\n\t\t out.println(DatatypeConverter.printBase64Binary(realSig));\n\t\t out.close();\n\n\n\t\t /* Save the public key in a file */\n\t\t byte[] key = publicKey.getEncoded();\n\t\t FileOutputStream keyfos = new FileOutputStream(args[4]);\n\t\t keyfos.write(key);\n\n\t\t keyfos.close();\n\n\t\t} catch (Exception e) {\n\t\t System.err.println(\"Caught exception \" + e.toString());\n\t\t}\n\n\t}",
"public void newKeystore(String alias,String password, String bodyCert) {\n try {\n CertAndKeyGen keyGen = new CertAndKeyGen(\"RSA\", ALGORITHM, null);\n try {\n keyGen.generate(KEY_LEN);\n PrivateKey pk = keyGen.getPrivateKey();\n X509Certificate cert;\n cert = keyGen.getSelfCertificate(new X500Name(bodyCert), (long) EXPIRATION * 24 * 60 * 60);\n X509Certificate[] chain = new X509Certificate[1];\n chain[0]= cert;\n //creo el request PKCS10\n PKCS10 certreq = new PKCS10 (keyGen.getPublicKey());\n Signature signature = Signature.getInstance(ALGORITHM);\n signature.initSign(pk);\n certreq.encodeAndSign(new X500Name(bodyCert), signature);\n //-creo el archivo CSR-\n //FileOutputStream filereq = new FileOutputStream(\"C:\\\\test\\\\certreq.csr\");\n FileOutputStream filereq = new FileOutputStream(OUTPUTCERT_PATH);\n PrintStream ps = new PrintStream(filereq);\n certreq.print(ps);\n ps.close();\n filereq.close();\n \n this.ks = KeyStore.getInstance(INSTANCE);\n this.ksPass = password.toCharArray();\n try (FileOutputStream newkeystore = new FileOutputStream(archivo)) {\n ks.load(null,null);\n ks.setKeyEntry(alias, pk, ksPass, chain);\n ks.store(newkeystore, ksPass);\n }\n } catch (InvalidKeyException | IOException | CertificateException | SignatureException | KeyStoreException ex) {\n LOG.error(\"Error a manipular el archivo: \"+archivo,ex);\n }\n \n } \n catch (NoSuchAlgorithmException | NoSuchProviderException ex) {\n LOG.error(ex);\n }\n }",
"public String getPrivateKey();",
"public String getPrivateKey();",
"public KeyStore createPKCS12KeyStore(String alias, char[] password) {\n try {\r\n KeyStore keyStore = KeyStore.getInstance(CertificateHelper.TOLVEN_CREDENTIAL_FORMAT_PKCS12);\r\n try {\r\n keyStore.load(null, password);\r\n } catch (IOException ex) {\r\n throw new RuntimeException(\"Could not load keystore for alias: \" + alias, ex);\r\n }\r\n X509Certificate[] certificateChain = new X509Certificate[1];\r\n certificateChain[0] = getX509Certificate();\r\n keyStore.setKeyEntry(alias, getPrivateKey(), password, certificateChain);\r\n return keyStore;\r\n } catch (GeneralSecurityException ex) {\r\n throw new RuntimeException(\"Could not create a PKCS12 keystore for alias: \" + alias, ex);\r\n }\r\n }",
"PrivateKey getPrivateKey();",
"private static byte[] sign(KeyPair keyPair, Path path, String signatureAlgorithm)\n\t{\n\t\tbyte[] signature = null;\n\n\t\ttry\n\t\t{\n\t\t\tbyte[] dataFromFile = Files.readAllBytes(path);\n\t\t\tSignature sign = Signature.getInstance(signatureAlgorithm);\n\t\t\tsign.initSign(keyPair.getPrivate());\n\t\t\tsign.update(dataFromFile);\n\t\t\tsignature = sign.sign();\n\t\t} catch (IOException | InvalidKeyException | NoSuchAlgorithmException | SignatureException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn signature;\n\t}",
"public MEKeyTool(File meKeystoreFile)\n throws FileNotFoundException, IOException {\n\n FileInputStream input;\n\n input = new FileInputStream(meKeystoreFile);\n\n try {\n keystore = new PublicKeyStoreBuilderBase(input);\n } finally {\n input.close();\n }\n }",
"public static void execEnkripsi(File fileTemp, String pathTempFileEncryptName, String pathEncryptedSecretKeyFile, String pemContent, SimpleDateFormat sdf, String outputFileNameZip) throws Exception{\n String secretKey=RandomStringUtils.randomAlphanumeric(16);\r\n System.out.println(\"Generated Secret Key :\"+secretKey);\r\n File exportedFile;\r\n CompressingUtils compressingUtils = new CompressingUtils();\r\n String tmpPlainZipped = lokasiHasil+\"/tmp\"+outputFileNameZip;\r\n List<File> lsFile = new ArrayList<>();\r\n lsFile.add(fileTemp);\r\n if(compressingUtils.createZipWithoutPassword(lsFile, tmpPlainZipped)){\r\n exportedFile = new File(tmpPlainZipped);\r\n //delete file awal yang telah dikompresi\r\n for(File dfile : lsFile){\r\n dfile.delete();\r\n }\r\n }else{\r\n throw new Exception(\"gagal melakukan kompresi file\");\r\n }\r\n System.out.println(\"file kompresi berhasil dibuat \"+ outputFileNameZip);\r\n\r\n /*Step 3 : enkripsi file dengan kunci acak */\r\n System.out.println(\"Step 3 : enkripsi file dengan kunci acak\");\r\n\r\n\r\n String fileOutputEcnryptedname = lokasiHasil+\"/\"+outputFileNameZip;\r\n\r\n File tempFileEncryptName = new File(pathTempFileEncryptName);\r\n try {\r\n CryptoUtils.encrypt(secretKey, exportedFile, tempFileEncryptName);\r\n } catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi file gagal : \" + e.getMessage());\r\n }\r\n\r\n EncryptionUtils utils = new EncryptionUtils();\r\n PublicKey publicKey = utils.getPublicKeyFromX509(pemContent);\r\n\r\n /*Step 4 : Enkripsi kunci acak dengan public key dari DJP*/\r\n System.out.println(\"Step 4 : enkripsi kunci acak dengan public key dari DJP\");\r\n\r\n String encryptedSecretKey;\r\n try{\r\n encryptedSecretKey = CryptoUtils.encrypt(secretKey, publicKey);\r\n }catch (CryptoException e) {\r\n throw new Exception(\"Enkripsi kunci gagal : \" + e.getMessage());\r\n }\r\n File encryptedSecretKeyFile = new File(pathEncryptedSecretKeyFile);\r\n try {\r\n FileOutputStream outputStream = new FileOutputStream(encryptedSecretKeyFile);\r\n outputStream.write(encryptedSecretKey.getBytes());\r\n outputStream.close();\r\n }catch (FileNotFoundException e){\r\n throw new Exception(\"kunci yang dienkripsi tidak ditemukan : \" + pathEncryptedSecretKeyFile);\r\n } catch (IOException e) {\r\n throw new Exception(\"gagal membentuk kunci enkripsi\");\r\n }\r\n\r\n /*Step 5: Compress data dan key kedalam file zip dan menjadi hasil akhir*/\r\n System.out.println(\"Step 5: Compress enkripsi file dan kunci kedalam file zip\");\r\n\r\n List<File> listFiles = new ArrayList<File>();\r\n listFiles.add(tempFileEncryptName);\r\n listFiles.add(encryptedSecretKeyFile);\r\n\r\n if(listFiles.size() != 2){\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n throw new Exception(\"file enkripsi dan/atau key enkripsi salah satunya tidak ada\");\r\n }\r\n\r\n compressingUtils = new CompressingUtils();\r\n if (compressingUtils.createZip(listFiles, fileOutputEcnryptedname)) {\r\n /*Step 6 : hapus file data dan key, hasil dari step 3 dan 4 */\r\n System.out.println(\"Step 6 : hapus file data dan key, hasil dari step 3 dan 4\");\r\n\r\n for (File file : listFiles) {\r\n file.delete();\r\n }\r\n /*Step 7: hapus file zip, hasil dari step 2 */\r\n System.out.println(\"Step 7: hapus file zip, hasil dari step 2\");\r\n\r\n exportedFile.delete();\r\n }\r\n\r\n System.out.println(\"Proses enkripsi selesai, nama file : \" + fileOutputEcnryptedname);\r\n }",
"public void generateKeyPair(String dirPath) throws Exception {\n\t\tnew File(dirPath).mkdirs();\n\t\tKeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n\t\tkpg.initialize(512);\n\t\tKeyPair keyPair = kpg.generateKeyPair();\n\t\tPrivateKey privateKey = keyPair.getPrivate();\n\t\tPublicKey publicKey = keyPair.getPublic();\n\t\t\n\t\t// Store Public Key.\n\t\tX509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(publicKey.getEncoded());\n\t\tFileOutputStream fos = new FileOutputStream(dirPath + \"/public.key\");\n\t\tfos.write(x509EncodedKeySpec.getEncoded());\n\t\tfos.close();\n\t\t\n\t\t// Store Private Key.\n\t\tPKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(privateKey.getEncoded());\n\t\tfos = new FileOutputStream(dirPath + \"/private.key\");\n\t\tfos.write(pkcs8EncodedKeySpec.getEncoded());\n\t\tfos.close();\n\t}",
"public void saveAsFile(File privateKeyFile, char[] password) throws IllegalArgumentException, IOException, NoSuchAlgorithmException, NoSuchPaddingException {\r\n\t\tString key = this.saveAsString(password);\r\n\t\tFiles.write(privateKeyFile.toPath(), key.getBytes(StandardCharsets.UTF_8));\r\n\t}",
"protected abstract InputStream openPrivateKeyStream(String id)\n throws FileNotFoundException, KeyStorageException, IOException;",
"void exportPublicKey(PGPPublicKeyRing pgpPublicKey, OutputStream os) throws PGPException, IOException;",
"public SingleCertKeyStoreProvider() {\r\n super(\"PKCS7\", PROVIDER_VERSION, \"KeyStore for a PKCS7 or X.509 certificate\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() {\r\n \t/** {@inheritdoc} */\r\n @Override\r\n\t\t\tpublic Object run() {\r\n put(\"KeyStore.PKCS7\", \"es.gob.afirma.keystores.single.SingleCertKeyStore\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n return null;\r\n }\r\n });\r\n }",
"public static Keys generateKeys() throws GeneralSecurityException {\n KeyGenerator gen = KeyGenerator.getInstance(ENC_ALGORITHM);\n gen.init(KEYLEN);\n SecretKey encKey = gen.generateKey();\n\n /* XXX: It's probably unnecessary to create a different keygen for the\n * MAC, but JCA's API design suggests we should just in case ... */\n gen = KeyGenerator.getInstance(MAC_ALGORITHM);\n gen.init(KEYLEN);\n SecretKey macKey = gen.generateKey();\n\n return new Keys(encKey, macKey);\n }",
"private static void encryptFile(String fileInput, String publicKeyFilename) throws Exception {\n\n\t\t// Load the public key bytes\n\t\tFileInputStream fis = new FileInputStream(publicKeyFilename);\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\n\t\tint theByte = 0;\n\t\twhile ((theByte = fis.read()) != -1) {\n\t\t\tbaos.write(theByte);\n\t\t}\n\t\tfis.close();\n\n\t\tbyte[] keyBytes = baos.toByteArray();\n\t\tbaos.close();\n\n\t\t// Turn the encoded key into a real RSA public key.\n\t\t// Public keys are encoded in X.509.\n\t\tX509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes);\n\t\tKeyFactory keyFactory = KeyFactory.getInstance(\"RSA\");\n\t\tPublicKey publicKey = keyFactory.generatePublic(keySpec);\n\n\t\t// Open up an output file for the output of the encryption\n\t\tString fileOutput = fileInput + ENCRYPTED_FILENAME_SUFFIX;\n\t\tDataOutputStream output = new DataOutputStream(new FileOutputStream(fileOutput));\n\n\t\t// Create a cipher using that key to initialize it\n\t\tCipher rsaCipher = Cipher.getInstance(\"RSA/ECB/PKCS1Padding\");\n\t\trsaCipher.init(Cipher.ENCRYPT_MODE, publicKey);\n\n\t\t// Now create a new 256 bit Rijndael key to encrypt the file itself.\n\t\t// This will be the session key.\n\t\tKeyGenerator rijndaelKeyGenerator = KeyGenerator.getInstance(\"Rijndael\");\n\t\trijndaelKeyGenerator.init(256);\n\t\tSystem.out.println(\"Generating session key...\");\n\t\tKey rijndaelKey = rijndaelKeyGenerator.generateKey();\n\t\tSystem.out.println(\"Done generating key.\");\n\n\t\t// Encrypt the Rijndael key with the RSA cipher\n\t\t// and write it to the beginning of the file.\n\t\tbyte[] encodedKeyBytes = rsaCipher.doFinal(rijndaelKey.getEncoded());\n\t\toutput.writeInt(encodedKeyBytes.length);\n\t\toutput.write(encodedKeyBytes);\n\n\t\t// Now we need an Initialization Vector for the symmetric cipher in CBC mode\n\t\tSecureRandom random = new SecureRandom();\n\t\tbyte[] iv = new byte[16];\n\t\trandom.nextBytes(iv);\n\n\t\t// Write the IV out to the file.\n\t\toutput.write(iv);\n\t\tIvParameterSpec spec = new IvParameterSpec(iv);\n\n\t\t// Create the cipher for encrypting the file itself.\n\t\tCipher symmetricCipher = Cipher.getInstance(\"Rijndael/CBC/PKCS5Padding\");\n\t\tsymmetricCipher.init(Cipher.ENCRYPT_MODE, rijndaelKey, spec);\n\n\t\tCipherOutputStream cos = new CipherOutputStream(output, symmetricCipher);\n\n\t\tSystem.out.println(\"Encrypting the file...\");\n\n\t\tFileInputStream input = new FileInputStream(fileInput);\n\n\t\ttheByte = 0;\n\t\twhile ((theByte = input.read()) != -1) {\n\t\t\tcos.write(theByte);\n\t\t}\n\t\tinput.close();\n\t\tcos.close();\n\t\tSystem.out.println(\"File encrypted.\");\n\t\treturn;\n\t}",
"private static CryptoToken getFromKeystore(KeyStore keystore, String alias,\r\n\t\t\tString password) throws UnrecoverableKeyException,\r\n\t\t\tKeyStoreException, NoSuchAlgorithmException, CertificateException,\r\n\t\t\tBkavSignaturesException {\r\n\t\tif (alias == null) {\r\n\t\t\tthrow new BkavSignaturesException(\"No alias was found in keystore\");\r\n\t\t}\r\n\r\n\t\tCryptoToken token = null;\r\n\t\t// Get private key from keystore\r\n\t\tPrivateKey privateKey = (PrivateKey) keystore.getKey(alias,\r\n\t\t\t\tpassword.toCharArray());\r\n\r\n\t\t// Get signer's certificate and cast to X509Certificate if able\r\n\t\t// Only work with X509Certificate\r\n\t\tCertificate cert = keystore.getCertificate(alias);\r\n\t\tX509Certificate signerCert = null;\r\n\t\tif (cert != null && cert instanceof X509Certificate) {\r\n\t\t\tsignerCert = (X509Certificate) cert;\r\n\t\t}\r\n\r\n\t\t// Get signer's certchain and Issuer's certificate\r\n\t\t// Check issuer's signature on signer's certificate first\r\n\t\tCertificate[] certChain = keystore.getCertificateChain(alias);\r\n\t\tX509Certificate issuerCert = null;\r\n\t\tif (signerCert != null) {\r\n\t\t\tfor (Certificate c : certChain) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (c != null && c instanceof X509Certificate) {\r\n\t\t\t\t\t\tsignerCert.verify(c.getPublicKey());\r\n\t\t\t\t\t\tissuerCert = (X509Certificate) c;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (InvalidKeyException e) {\r\n\t\t\t\t\t// Do nothing here\r\n\t\t\t\t} catch (NoSuchProviderException e) {\r\n\t\t\t\t\t// Do nothing here\r\n\t\t\t\t} catch (SignatureException e) {\r\n\t\t\t\t\t// Do nothing here\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tProvider privateProvider = keystore.getProvider();\r\n\r\n\t\ttoken = new CryptoToken(privateKey, signerCert, issuerCert, certChain,\r\n\t\t\t\tprivateProvider);\r\n\r\n\t\treturn token;\r\n\t}",
"public static void createKeyStore(String filename,\n String password, String keyPassword, String alias,\n Key privateKey, Certificate cert)\n throws GeneralSecurityException, IOException {\n KeyStore ks = createEmptyKeyStore();\n ks.setKeyEntry(alias, privateKey, keyPassword.toCharArray(),\n new Certificate[]{cert});\n saveKeyStore(ks, filename, password);\n }",
"java.lang.String getPublicEciesKey();",
"OpenSSLKey mo134201a();",
"public interface KeyPairProvider {\n\n KeyPair getJWTKey();\n\n /**\n * Get a key with the specified alias;\n * If there is no key of this alias, return\n * {@code null}\n *\n * @param alias the alias of key to load\n * @return a valid key pair or {@code null} if a key with this alias is not available\n */\n KeyPair getKey(String alias);\n}",
"public KeyPair loadKeystoreKeyPair(String privateKeyAlias) throws ProviderException {\n try {\n return HwUniversalKeyStoreProvider.loadAndroidKeyStoreKeyPairFromKeystore(this.mKeyStore, privateKeyAlias, this.mEntryUid);\n } catch (UnrecoverableKeyException e) {\n throw new ProviderException(\"Failed to load generated key pair from keystore\", e);\n }\n }",
"@Override\n public String buildSignature(RequestDataToSign requestDataToSign, String appKey) {\n // find private key for this app\n final String secretKey = keyStore.getPrivateKey(appKey);\n if (secretKey == null) {\n LOG.error(\"Unknown application key: {}\", appKey);\n throw new PrivateKeyNotFoundException();\n }\n\n // sign\n return super.buildSignature(requestDataToSign, secretKey);\n }",
"@Test\r\n public void testSign() throws SodiumException, CryptoException {\r\n\r\n byte[] data = \"Hola caracola\".getBytes();\r\n\r\n CryptoService instance = new CryptoService();\r\n Keys keys = instance.createKeys(null);\r\n byte[] result = instance.sign(data, keys);\r\n assertNotNull(result);\r\n }",
"public SaveKeystoreFileChooser()\r\n/* 16: */ {\r\n/* 17:16 */ setFileHidingEnabled(false);\r\n/* 18:17 */ FileFilter filter = new FileNameExtensionFilter(\"Your Digital File Private Key (.pfx)\", new String[] { \"pfx\" });\r\n/* 19:18 */ addChoosableFileFilter(filter);\r\n/* 20:19 */ setFileFilter(filter);\r\n/* 21: */ }",
"public static ECKey fromPrivate(BigInteger privKey, boolean compressed) {\n ECPoint point = publicPointFromPrivate(privKey);\n return new ECKey(privKey, getPointWithCompression(point, compressed));\n }",
"BlsPoint sign(BigInteger privateKey, byte[] data);",
"public java.security.KeyPair generateKeyPair() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00ef in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.dsa.KeyPairGeneratorSpi.generateKeyPair():java.security.KeyPair, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.dsa.KeyPairGeneratorSpi.generateKeyPair():java.security.KeyPair\");\n }",
"public KeyPair getKeyPair(KeyStore ks, String keyAlias, String certificateAlias, String keyPassword)\n throws CertException;",
"public static void main(final String[] args) throws Exception {\n Security.addProvider(new BouncyCastleProvider());\n\n // --- setup key pair (generated in advance)\n final String passphrase = \"owlstead\";\n final KeyPair kp = generateRSAKeyPair(1024);\n final RSAPublicKey rsaPublicKey = (RSAPublicKey) kp.getPublic();\n final RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) kp.getPrivate();\n\n // --- encode and wrap\n byte[] x509EncodedRSAPublicKey = encodeRSAPublicKey(rsaPublicKey);\n final byte[] saltedAndEncryptedPrivate = wrapRSAPrivateKey(\n passphrase, rsaPrivateKey);\n\n // --- decode and unwrap\n final RSAPublicKey retrievedRSAPublicKey = decodeRSAPublicKey(x509EncodedRSAPublicKey);\n final RSAPrivateKey retrievedRSAPrivateKey = unwrapRSAPrivateKey(passphrase,\n saltedAndEncryptedPrivate);\n\n // --- check result\n System.out.println(retrievedRSAPublicKey);\n System.out.println(retrievedRSAPrivateKey);\n }",
"public interface CryptoService {\n /**\n * Read encrypted password file.\n *\n * @param file Encrypted file instance.\n * @param password Password to decrypt file.\n *\n * @return file content.\n *\n * */\n String readFile(File file, String password);\n\n /**\n * Write and encrypt content to file.\n *\n * @param file encrypted file location.\n * @param password password which will be used to encrypt file.\n * @param cnt file content.\n * */\n void writeFile(File file, String password, String cnt);\n\n /**\n * Encrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToEncrypt text which will be encrypted\n * @return encrypted content\n * */\n String encrypt(String password, String textToEncrypt);\n\n /**\n * Decrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToDecrypt text which will be decrypted\n * @return decrypted content\n * */\n String decrypt(String password, String textToDecrypt);\n\n /**\n * Write and encrypt the password database.\n *\n * @param passwordDatabase passwords database which will be saved to encrypted file.\n * */\n void writeFile(PasswordDatabase passwordDatabase) throws JsonConversionException;\n}",
"private void createDerivedKey() throws NoSuchAlgorithmException, InvalidKeySpecException, IOException {\n byte[] salt = null;\n int numIterations;\n derivedKey = null;\n \n // read salt + numIterations from file if available\n File derivParamFile = configuration.getKeyDerivationParametersFile();\n if (derivParamFile.exists()) {\n DataInputStream inputStream = null;\n try {\n inputStream = new DataInputStream(new FileInputStream(derivParamFile));\n salt = new byte[FileEncryptionConstants.SALT_LENGTH];\n inputStream.read(salt);\n numIterations = inputStream.readInt();\n byte[] key = FileEncryptionUtil.getEncryptionKey(password, salt, numIterations);\n derivedKey = new DerivedKey(salt, numIterations, key);\n }\n finally {\n if (inputStream != null)\n inputStream.close();\n }\n }\n \n // if necessary, create a new salt and key and write the derivation parameters to the cache file\n if (derivedKey==null || derivedKey.numIterations!=NUM_ITERATIONS) {\n I2PAppContext appContext = I2PAppContext.getGlobalContext();\n salt = new byte[SALT_LENGTH];\n appContext.random().nextBytes(salt);\n \n DataOutputStream outputStream = null;\n try {\n byte[] key = FileEncryptionUtil.getEncryptionKey(password, salt, NUM_ITERATIONS);\n derivedKey = new DerivedKey(salt, NUM_ITERATIONS, key);\n outputStream = new DataOutputStream(new FileOutputStream(derivParamFile));\n outputStream.write(salt);\n outputStream.writeInt(NUM_ITERATIONS);\n }\n finally {\n if (outputStream != null)\n outputStream.close();\n }\n }\n }",
"private void importKeyPair() {\n\t\t/*\n\t\t * Let the user choose a PKCS #12 file (keystore) containing a public\n\t\t * and private key pair to import\n\t\t */\n\t\tFile importFile = selectImportExportFile(\n\t\t\t\t\"PKCS #12 file to import from\", // title\n\t\t\t\tnew String[] { \".p12\", \".pfx\" }, // array of file extensions\n\t\t\t\t// for the file filter\n\t\t\t\t\"PKCS#12 Files (*.p12, *.pfx)\", // description of the filter\n\t\t\t\t\"Import\", // text for the file chooser's approve button\n\t\t\t\t\"keyPairDir\"); // preference string for saving the last chosen directory\n\n\t\tif (importFile == null)\n\t\t\treturn;\n\n\t\t// The PKCS #12 keystore is not a file\n\t\tif (!importFile.isFile()) {\n\t\t\tshowMessageDialog(this, \"Your selection is not a file\",\n\t\t\t\t\tALERT_TITLE, WARNING_MESSAGE);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the user to enter the password that was used to encrypt the\n\t\t// private key contained in the PKCS #12 file\n\t\tGetPasswordDialog getPasswordDialog = new GetPasswordDialog(this,\n\t\t\t\t\"Import key pair entry\", true,\n\t\t\t\t\"Enter the password that was used to encrypt the PKCS #12 file\");\n\t\tgetPasswordDialog.setLocationRelativeTo(this);\n\t\tgetPasswordDialog.setVisible(true);\n\n\t\tString pkcs12Password = getPasswordDialog.getPassword();\n\n\t\tif (pkcs12Password == null) // user cancelled\n\t\t\treturn;\n\t\telse if (pkcs12Password.isEmpty()) // empty password\n\t\t\t// FIXME: Maybe user did not have the password set for the private key???\n\t\t\treturn;\n\n\t\ttry {\n\t\t\t// Load the PKCS #12 keystore from the file\n\t\t\t// (this is using the BouncyCastle provider !!!)\n\t\t\tKeyStore pkcs12Keystore = credManager.loadPKCS12Keystore(importFile,\n\t\t\t\t\tpkcs12Password);\n\n\t\t\t/*\n\t\t\t * Display the import key pair dialog supplying all the private keys\n\t\t\t * stored in the PKCS #12 file (normally there will be only one\n\t\t\t * private key inside, but could be more as this is a keystore after\n\t\t\t * all).\n\t\t\t */\n\t\t\tNewKeyPairEntryDialog importKeyPairDialog = new NewKeyPairEntryDialog(\n\t\t\t\t\tthis, \"Credential Manager\", true, pkcs12Keystore, dnParser);\n\t\t\timportKeyPairDialog.setLocationRelativeTo(this);\n\t\t\timportKeyPairDialog.setVisible(true);\n\n\t\t\t// Get the private key and certificate chain of the key pair\n\t\t\tKey privateKey = importKeyPairDialog.getPrivateKey();\n\t\t\tCertificate[] certChain = importKeyPairDialog.getCertificateChain();\n\n\t\t\tif (privateKey == null || certChain == null)\n\t\t\t\t// User did not select a key pair for import or cancelled\n\t\t\t\treturn;\n\n\t\t\t/*\n\t\t\t * Check if a key pair entry with the same alias already exists in\n\t\t\t * the Keystore\n\t\t\t */\n\t\t\tif (credManager.hasKeyPair(privateKey, certChain)\n\t\t\t\t\t&& showConfirmDialog(this,\n\t\t\t\t\t\t\t\"The keystore already contains the key pair entry with the same private key.\\n\"\n\t\t\t\t\t\t\t\t\t+ \"Do you want to overwrite it?\",\n\t\t\t\t\t\t\tALERT_TITLE, YES_NO_OPTION) != YES_OPTION)\n\t\t\t\treturn;\n\n\t\t\t// Place the private key and certificate chain into the Keystore\n\t\t\tcredManager.addKeyPair(privateKey, certChain);\n\n\t\t\t// Display success message\n\t\t\tshowMessageDialog(this, \"Key pair import successful\", ALERT_TITLE,\n\t\t\t\t\tINFORMATION_MESSAGE);\n\t\t} catch (Exception ex) { // too many exceptions to catch separately\n\t\t\tString exMessage = \"Failed to import the key pair entry to the Keystore. \"\n\t\t\t\t\t+ ex.getMessage();\n\t\t\tlogger.error(exMessage, ex);\n\t\t\tshowMessageDialog(this, exMessage, ERROR_TITLE, ERROR_MESSAGE);\n\t\t}\n\t}",
"public PGPPublicKey getEncryptionKey() {\n\t\tIterator iter = base.getPublicKeys();\n\t\tPGPPublicKey encKey = null;\n\t\twhile (iter.hasNext()) {\n\t\t\tPGPPublicKey k = (PGPPublicKey) iter.next();\n\t\t\tif (k.isEncryptionKey())\n\t\t\t\tencKey = k;\n\t\t}\n\n\t\treturn encKey;\n\t}",
"private byte[] encryptSymmetricKey(PublicKey receiverPublicKey, SecretKey semetricKey) throws Exception {\n\t\ttry {\n\t\t\tmyCipher = Cipher.getInstance(\"RSA\");\n\t\t\tmyCipher.init(Cipher.ENCRYPT_MODE, receiverPublicKey);\n\t\t\treturn myCipher.doFinal(semetricKey.getEncoded());\n\t\t} catch (Exception e) {\n\t\t\twriteToLog(\"Error While trying to encrypt the semetric-key: \" + e.getMessage());\n\t\t\tLogWriter.close();\n\t\t\tthrow new Exception();\n\t\t}\n\n\t}",
"public KeyStoreSigner(@Nonnull KeyStore keyStore, char[] password, String alias) {\n\tthis.keyStore = keyStore;\n\tthis.password = password;\n\tthis.alias = alias;\n }",
"public static void main(String[] args) throws ClassNotFoundException, BadPaddingException, IllegalBlockSizeException,\n IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException {\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\");\n // Generate the keys — might take sometime on slow computers\n KeyPair myPair = kpg.generateKeyPair();\n\n /*\n * This will give you a KeyPair object, which holds two keys: a private\n * and a public. In order to make use of these keys, you will need to\n * create a Cipher object, which will be used in combination with\n * SealedObject to encrypt the data that you are going to end over the\n * network. Here’s how you do that:\n */\n\n // Get an instance of the Cipher for RSA encryption/decryption\n Cipher c = Cipher.getInstance(\"RSA\");\n // Initiate the Cipher, telling it that it is going to Encrypt, giving it the public key\n c.init(Cipher.ENCRYPT_MODE, myPair.getPublic());\n\n /*\n * After initializing the Cipher, we’re ready to encrypt the data.\n * Since after encryption the resulting data will not make much sense if\n * you see them “naked”, we have to encapsulate them in another\n * Object. Java provides this, by the SealedObject class. SealedObjects\n * are containers for encrypted objects, which encrypt and decrypt their\n * contents with the help of a Cipher object.\n *\n * The following example shows how to create and encrypt the contents of\n * a SealedObject:\n */\n\n // Create a secret message\n String myMessage = new String(\"Secret Message\");\n // Encrypt that message using a new SealedObject and the Cipher we created before\n SealedObject myEncryptedMessage= new SealedObject( myMessage, c);\n\n /*\n * The resulting object can be sent over the network without fear, since\n * it is encrypted. The only one who can decrypt and get the data, is the\n * one who holds the private key. Normally, this should be the server. In\n * order to decrypt the message, we’ll need to re-initialize the Cipher\n * object, but this time with a different mode, decrypt, and use the\n * private key instead of the public key.\n *\n * This is how you do this in Java:\n */\n\n // Get an instance of the Cipher for RSA encryption/decryption\n Cipher dec = Cipher.getInstance(\"RSA\");\n // Initiate the Cipher, telling it that it is going to Decrypt, giving it the private key\n dec.init(Cipher.DECRYPT_MODE, myPair.getPrivate());\n\n /*\n * Now that the Cipher is ready to decrypt, we must tell the SealedObject\n * to decrypt the held data.\n */\n\n // Tell the SealedObject we created before to decrypt the data and return it\n String message = (String) myEncryptedMessage.getObject(dec);\n System.out.println(\"foo = \"+message);\n\n /*\n * Beware when using the getObject method, since it returns an instance\n * of an Object (even if it is actually an instance of String), and not\n * an instance of the Class that it was before encryption, so you’ll\n * have to cast it to its prior form.\n *\n * The above is from: http:andreas.louca.org/2008/03/20/java-rsa-\n * encryption-an-example/\n *\n * [msj121] [so/q/13500368] [cc by-sa 3.0]\n */\n }",
"@Override\n public byte[] generateSignature() throws CryptoException, DataLengthException {\n if (!forSigning) {\n throw new IllegalStateException(\"CL04 Signer not initialised for signature generation.\");\n }\n\n try {\n CL04SignSecretPairingKeySerParameter sk = (CL04SignSecretPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(sk.getParameters());\n final Element alpha = pairing.getZr().newRandomElement().getImmutable();\n final Element a = sk.getG().powZn(alpha);\n final List<Element> A = sk.getZ().stream().map(a::powZn).collect(Collectors.toCollection(ArrayList::new));\n final Element b = a.powZn(sk.getY()).getImmutable();\n final List<Element> B = A.stream().map(Ai -> Ai.powZn(sk.getY())).collect(Collectors.toCollection(ArrayList::new));\n final Element xTimesY = alpha.mul(sk.getX().mul(sk.getY()));\n final Element c = a.powZn(sk.getX()).mul(commitment.powZn(xTimesY)).getImmutable();\n\n Element[] signElements = new Element[3 + 2 * messages.size()];\n signElements[0] = a;\n signElements[1] = b;\n signElements[2] = c;\n for (int i = 0; i < messages.size(); i++) {\n signElements[3 + i] = A.get(i);\n signElements[3 + messages.size() + i] = B.get(i);\n }\n return derEncode(signElements);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }",
"@NonNull\n @Override\n protected KeyInfo getKeyInfo(@NonNull final Key key) throws GeneralSecurityException {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {\n throw new KeyStoreAccessException(\"Unsupported API\" + Build.VERSION.SDK_INT + \" version detected.\");\n }\n\n final SecretKeyFactory factory = SecretKeyFactory.getInstance(key.getAlgorithm(), KEYSTORE_TYPE);\n final KeySpec keySpec = factory.getKeySpec((SecretKey) key, KeyInfo.class);\n\n return (KeyInfo) keySpec;\n }",
"@SuppressFBWarnings(value = \"EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS\",\n\t\t\tjustification = \"converting checked to unchecked exceptions that must not be thrown\")\n\tpublic static KeyStore loadKeyStore(final Path jksFilePath, final String password)\n\t\t\tthrows CertificateException, IOException {\n\t\ttry (InputStream inputStream = Files.newInputStream(jksFilePath)) {\n\t\t\tfinal KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n\t\t\tkeyStore.load(inputStream, password.toCharArray());\n\t\t\treturn keyStore;\n\t\t} catch (final KeyStoreException | NoSuchAlgorithmException e) {\n\t\t\tthrow new SneakyException(e);\n\t\t}\n\t}",
"public interface GpgObjectSigner {\n\n\t/**\n\t * Signs the specified object.\n\t *\n\t * <p>\n\t * Implementors should obtain the payload for signing from the specified\n\t * object via {@link ObjectBuilder#build()} and create a proper\n\t * {@link GpgSignature}. The generated signature must be set on the\n\t * specified {@code object} (see\n\t * {@link ObjectBuilder#setGpgSignature(GpgSignature)}).\n\t * </p>\n\t * <p>\n\t * Any existing signature on the object must be discarded prior obtaining\n\t * the payload via {@link ObjectBuilder#build()}.\n\t * </p>\n\t *\n\t * @param object\n\t * the object to sign (must not be {@code null} and must be\n\t * complete to allow proper calculation of payload)\n\t * @param gpgSigningKey\n\t * the signing key to locate (passed as is to the GPG signing\n\t * tool as is; eg., value of <code>user.signingkey</code>)\n\t * @param committer\n\t * the signing identity (to help with key lookup in case signing\n\t * key is not specified)\n\t * @param credentialsProvider\n\t * provider to use when querying for signing key credentials (eg.\n\t * passphrase)\n\t * @param config\n\t * GPG settings from the git config\n\t * @throws CanceledException\n\t * when signing was canceled (eg., user aborted when entering\n\t * passphrase)\n\t * @throws UnsupportedSigningFormatException\n\t * if a config is given and the wanted key format is not\n\t * supported\n\t */\n\tvoid signObject(@NonNull ObjectBuilder object,\n\t\t\t@Nullable String gpgSigningKey, @NonNull PersonIdent committer,\n\t\t\tCredentialsProvider credentialsProvider, GpgConfig config)\n\t\t\tthrows CanceledException, UnsupportedSigningFormatException;\n\n\t/**\n\t * Indicates if a signing key is available for the specified committer\n\t * and/or signing key.\n\t *\n\t * @param gpgSigningKey\n\t * the signing key to locate (passed as is to the GPG signing\n\t * tool as is; eg., value of <code>user.signingkey</code>)\n\t * @param committer\n\t * the signing identity (to help with key lookup in case signing\n\t * key is not specified)\n\t * @param credentialsProvider\n\t * provider to use when querying for signing key credentials (eg.\n\t * passphrase)\n\t * @param config\n\t * GPG settings from the git config\n\t * @return <code>true</code> if a signing key is available,\n\t * <code>false</code> otherwise\n\t * @throws CanceledException\n\t * when signing was canceled (eg., user aborted when entering\n\t * passphrase)\n\t * @throws UnsupportedSigningFormatException\n\t * if a config is given and the wanted key format is not\n\t * supported\n\t */\n\tpublic abstract boolean canLocateSigningKey(@Nullable String gpgSigningKey,\n\t\t\t@NonNull PersonIdent committer,\n\t\t\tCredentialsProvider credentialsProvider, GpgConfig config)\n\t\t\tthrows CanceledException, UnsupportedSigningFormatException;\n\n}",
"com.google.protobuf.ByteString\n getPubkeyBytes();",
"@Override\n\tpublic ECKey toPublicJWK() {\n\n\t\treturn new ECKey(\n\t\t\tgetCurve(), getX(), getY(),\n\t\t\tgetKeyUse(), getKeyOperations(), getAlgorithm(), getKeyID(),\n\t\t\tgetX509CertURL(), getX509CertThumbprint(), getX509CertSHA256Thumbprint(), getX509CertChain(),\n\t\t\tgetKeyStore());\n\t}",
"@SuppressWarnings(\"all\")\n public static void main(String...args) throws Exception {\n FileInputStream pubKFile = new FileInputStream(\"C:\\\\Demo\\\\publicKey\");\n byte[] encKey = new byte[pubKFile.available()];\n pubKFile.read(encKey);\n pubKFile.close();\n\n // 2. decode the public key\n X509EncodedKeySpec spec = new X509EncodedKeySpec(encKey);\n PublicKey publicKey = KeyFactory.getInstance(\"DSA\").generatePublic(spec);\n\n // 3. read the signature\n FileInputStream signatureFile = new FileInputStream(\"C:\\\\Demo\\\\signature\");\n byte[] sigByte = new byte[signatureFile.available()];\n signatureFile.read(sigByte);\n signatureFile.close();\n\n // 4. generate the signature\n Signature signature = Signature.getInstance(\"SHA1withDSA\");\n signature.initVerify(publicKey);\n\n // 5. supply the data\n FileInputStream dataFile = new FileInputStream(\"C:\\\\Demo\\\\code\");\n BufferedInputStream dataStream = new BufferedInputStream(dataFile);\n byte[] tmpBuf = new byte[dataStream.available()];\n int len;\n while ((len = dataStream.read(tmpBuf)) >= 0) {\n signature.update(tmpBuf, 0, len);\n }\n dataStream.close();\n\n // 6. verify\n boolean result = signature.verify(sigByte);\n System.out.println(\"Result:\" + result);\n }",
"@Override\n public String getProviderName() {\n return \"SimpleEncryptionKeyStoreProvider\";\n }",
"public MEKeyTool(InputStream meKeystoreStream)\n throws IOException {\n keystore = new PublicKeyStoreBuilderBase(meKeystoreStream);\n }",
"KeyStore loadKeystore(char[] keystorePassword) {\n try {\n // Load the keystore in the user's home directory\n bufferedInputStream.reset();\n keystore.load(bufferedInputStream, keystorePassword);\n return keystore;\n // TODO: EOFException might mean we're skipping guesses\n } catch (CertificateException | NoSuchAlgorithmException | FileNotFoundException e) {\n throw new KeystoreException(e);\n } catch (IOException e) {\n if ((e.getCause() instanceof UnrecoverableKeyException) &&\n (e.getCause().getMessage().contains(\"Password verification failed\"))) return null;\n\n throw new KeystoreException(e);\n }\n }",
"public final KeyStore.PrivateKeyEntry mo10698f(KeyStore keyStore) {\n PrivateKey privateKey;\n if (Build.VERSION.SDK_INT < 28 || (privateKey = (PrivateKey) keyStore.getKey(this.f723a, (char[]) null)) == null) {\n return (KeyStore.PrivateKeyEntry) keyStore.getEntry(this.f723a, (KeyStore.ProtectionParameter) null);\n }\n return new KeyStore.PrivateKeyEntry(privateKey, new Certificate[]{keyStore.getCertificate(this.f723a)});\n }",
"private void encryptionAlgorithm() {\n\t\ttry {\n\t\t\t\n\t\t\tFileInputStream fileInputStream2=new FileInputStream(\"D:\\\\program\\\\key.txt\");\n\t\t\tchar key=(char)fileInputStream2.read();\n\t\t\tSystem.out.println(key);\n\t\t\tFileInputStream fileInputStream1=new FileInputStream(\"D:\\\\program\\\\message.txt\");\n\t\t\tint i=0;\n\t\t\t\n\t\t\tStringBuilder message=new StringBuilder();\n\t\t\twhile((i= fileInputStream1.read())!= -1 )\n\t\t\t{\n\t\t\t\tmessage.append((char)i);\n\t\t\t}\n\t\t\tString s=message.toString();\n\t\t\tchar[] letters=new char[s.length()];\n\t\t\tStringBuilder en=new StringBuilder();\n\t\t\tfor(int j = 0;j < letters.length;j++)\n\t\t\t{\n\t\t\t\ten.append((char)(byte)letters[j]+key);\n\t\t\t}\t\t\n\t\t\tFileOutputStream fileoutput=new FileOutputStream(\"D:\\\\program\\\\encryptedfile.txt\");\n\t\t\t\n\t\t\tfileInputStream1.close();\n\t\t\tfileInputStream2.close();\n\t\t\t\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}",
"@Override\n public InputStream encrypt(InputStream in, EncryptionKey publicKey) throws IOException {\n KeyEncapsulationMechanism.KeyAndCiphertext<SymmetricKey> keyAndCiphertext = kem.encaps(publicKey);\n\n //Serialize the encapsulated key\n byte[] encapsulatedKey = new JSONConverter().serialize(keyAndCiphertext.encapsulatedKey.getRepresentation())\n .getBytes(StandardCharsets.UTF_8);\n\n //Prepare the encapsulated key length as the first four bytes of the ciphertext. That ought to be enough for\n // everybody.\n byte[] keyLenBytes = ByteBuffer.allocate(4).putInt(encapsulatedKey.length).array();\n\n //Return resulting stream that concatenates: keyLenBytes || encapsulatedKey || ciphertextFromSymmetricScheme\n return new SequenceInputStream(new ByteArrayInputStream(keyLenBytes),\n new SequenceInputStream(new ByteArrayInputStream(encapsulatedKey),\n symmetricScheme.encrypt(in, keyAndCiphertext.key)));\n }",
"@Override\n public KeyStoreView fromKeyStore(KeyStore keyStore, Function<String, char[]> keyPassword) {\n return new DefaultKeyStoreView(\n new DefaultKeyStoreSourceImpl(metadataOper, keyStore, oper, keyPassword)\n );\n }",
"static KeyPair generateKeyPair() throws NoSuchAlgorithmException {\n\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(ALGORITHM);\n\n keyGen.initialize(2048);\n\n //Log.e(TAG, \"generateKeyPair: this is public key encoding \" + Arrays.toString(generateKeyPair.getPrivate().getEncoded()));\n\n return keyGen.generateKeyPair();\n }",
"public void importKeyFromJcaKeystore(String jcakeystoreFilename,\n String keystorePassword,\n String alias, String domain)\n throws IOException, GeneralSecurityException {\n FileInputStream keystoreStream;\n KeyStore jcaKeystore;\n\n // Load the keystore\n keystoreStream = new FileInputStream(new File(jcakeystoreFilename));\n\n try {\n jcaKeystore = KeyStore.getInstance(KeyStore.getDefaultType());\n\n if (keystorePassword == null) {\n jcaKeystore.load(keystoreStream, null);\n } else {\n jcaKeystore.load(keystoreStream,\n keystorePassword.toCharArray());\n }\n } finally {\n keystoreStream.close();\n }\n\n importKeyFromJcaKeystore(jcaKeystore,\n alias,\n domain);\n }",
"public static byte[] createSignedDataStreaming(\n PrivateKey signingKey, X509CertificateHolder signingCert, byte[] msg)\n throws CMSException, OperatorCreationException, IOException\n {\n SignerInfoGenerator signerInfoGenerator =\n new JcaSimpleSignerInfoGeneratorBuilder()\n .setProvider(\"BC\")\n .build(\"SHA256withECDSA\", signingKey, signingCert);\n\n CMSSignedDataStreamGenerator gen = new CMSSignedDataStreamGenerator();\n\n gen.addSignerInfoGenerator(signerInfoGenerator);\n\n Store<X509CertificateHolder> certs =\n new CollectionStore<X509CertificateHolder>(\n Collections.singletonList(signingCert));\n\n gen.addCertificates(certs);\n\n ByteArrayOutputStream bOut = new ByteArrayOutputStream();\n\n OutputStream sOut = gen.open(bOut, true);\n\n sOut.write(msg);\n\n sOut.close();\n \n return bOut.toByteArray();\n }",
"SignatureSpi(com.android.org.bouncycastle.crypto.Digest r1, com.android.org.bouncycastle.crypto.DSA r2, com.android.org.bouncycastle.jcajce.provider.asymmetric.util.DSAEncoder r3) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.<init>(com.android.org.bouncycastle.crypto.Digest, com.android.org.bouncycastle.crypto.DSA, com.android.org.bouncycastle.jcajce.provider.asymmetric.util.DSAEncoder):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.<init>(com.android.org.bouncycastle.crypto.Digest, com.android.org.bouncycastle.crypto.DSA, com.android.org.bouncycastle.jcajce.provider.asymmetric.util.DSAEncoder):void\");\n }",
"@Override\r\n\tpublic byte[] cosign(final byte[] sign,\r\n final String algorithm,\r\n final PrivateKey key,\r\n final java.security.cert.Certificate[] certChain,\r\n final Properties extraParams) throws AOException, IOException {\r\n return sign(sign, algorithm, key, certChain, extraParams);\r\n }",
"private void getKeyAndCerts(String filePath, String pw)\n throws GeneralSecurityException, IOException {\n System.out\n .println(\"reading signature key and certificates from file \" + filePath + \".\");\n\n FileInputStream fis = new FileInputStream(filePath);\n KeyStore store = KeyStore.getInstance(\"PKCS12\", \"IAIK\");\n store.load(fis, pw.toCharArray());\n\n Enumeration<String> aliases = store.aliases();\n String alias = (String) aliases.nextElement();\n privKey_ = (PrivateKey) store.getKey(alias, pw.toCharArray());\n certChain_ = Util.convertCertificateChain(store.getCertificateChain(alias));\n fis.close();\n }",
"public Signer getPDFSigner();",
"public Key getPublicKey(String alias, String password) throws CryptoException {\n\t\ttry {\n\t\t\tKey key = getPrivateKey(alias, password);\n\t\t\tif (key instanceof PrivateKey) {\n\t // get certificate of public key\n\t Certificate certificate = keystore.getCertificate(alias);\n\t // get public key from the certificate\n\t return certificate.getPublicKey();\n\t\t\t}\t\t\t\n\t\t} catch (KeyStoreException e) {\n\t\t\tlogger.error(\"error accessing the keystore\", e);\n\t\t\tthrow new CryptoException(\"error accessing the keystore\", e);\t\t\t\n\t\t}\n\t\treturn null;\n\t}",
"@Test(dependsOnMethods = \"testCreateKey\")\n public void testWrapUnwrapKey() {\n KeyOperationResult wrapResult = api().wrap(vaultUri,\n KEY_NAME,\n \"\",\n cryptoAlgorithm,\n contentEncryptionKey\n );\n assertNotNull(wrapResult);\n assertTrue(!wrapResult.value().isEmpty());\n\n // Unwrap symmetric key\n KeyOperationResult unwrapResult = api().unwrap(vaultUri,\n KEY_NAME,\n \"\",\n cryptoAlgorithm,\n wrapResult.value()\n );\n assertNotNull(unwrapResult);\n assertTrue(unwrapResult.value().equals(contentEncryptionKey));\n }",
"void saveKeys(PGPPublicKeyRingCollection publicKeyRings, PGPSecretKeyRingCollection secretKeyRings, String publicKeyFileLocation, String secretKeyFileLocation) throws IOException;",
"@Bean\n public KeyManager keyManager() {\n final Resource storeFile\n = this.resourceLoader.getResource(\"classpath:\" + this.samlProperties.getKeystore().getName());\n final Map<String, String> passwords = new HashMap<>();\n passwords.put(\n this.samlProperties.getKeystore().getDefaultKey().getName(),\n this.samlProperties.getKeystore().getDefaultKey().getPassword()\n );\n return new JKSKeyManager(\n storeFile,\n this.samlProperties.getKeystore().getPassword(),\n passwords,\n this.samlProperties.getKeystore().getDefaultKey().getName()\n );\n }"
] | [
"0.53460294",
"0.522363",
"0.5222903",
"0.5153686",
"0.5135491",
"0.50522774",
"0.5011925",
"0.50032526",
"0.5002739",
"0.49854088",
"0.49385667",
"0.4895979",
"0.48754382",
"0.4874943",
"0.48455566",
"0.4818589",
"0.48140934",
"0.48047572",
"0.4792206",
"0.47802606",
"0.4735185",
"0.47015604",
"0.46965685",
"0.46372548",
"0.46292964",
"0.4623885",
"0.46075568",
"0.4599584",
"0.4580849",
"0.45370498",
"0.45364687",
"0.453605",
"0.45355412",
"0.4516509",
"0.45047966",
"0.45036295",
"0.44987896",
"0.4492689",
"0.44794786",
"0.4472396",
"0.44599465",
"0.44599465",
"0.44526702",
"0.44303617",
"0.4421035",
"0.44174805",
"0.441717",
"0.4414989",
"0.44104576",
"0.43897647",
"0.4382593",
"0.4378144",
"0.43554577",
"0.43540773",
"0.43537462",
"0.43463117",
"0.43419796",
"0.43412945",
"0.43400308",
"0.43399236",
"0.43347546",
"0.43342772",
"0.43316084",
"0.43291166",
"0.43282956",
"0.43100494",
"0.43090275",
"0.43051195",
"0.4304725",
"0.42884904",
"0.42845735",
"0.42832035",
"0.4280843",
"0.42785913",
"0.42694998",
"0.42615506",
"0.42550138",
"0.4247849",
"0.42449233",
"0.42362443",
"0.42344105",
"0.42335683",
"0.42328215",
"0.4231783",
"0.42309186",
"0.42242888",
"0.42192775",
"0.420048",
"0.42002153",
"0.4195057",
"0.41944602",
"0.41798684",
"0.4172724",
"0.41719308",
"0.41690606",
"0.4168379",
"0.41627127",
"0.41625813",
"0.41610742",
"0.41559008"
] | 0.54110026 | 0 |
/ Business Patch Download Listener | @Override
public void onBusinessPatchDownloadSuccess() {
UPLogUtils.d(TAG, ">> patch file download successful.");
handler.sendEmptyMessage(MSG_RELOAD_REACT_ROOT_VIEW);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void download() {\n\t\t\r\n\t}",
"public void download() {\n }",
"public void download(BillDownloadEventNotification eventNotification) throws Exception {\n\t\tStopWatch timer = new StopWatch();\n\t\ttimer.start();\n\t\t\n\t\tOLBBillDownloadRequest request = null;\n\t\tboolean successful = false;\n\t\t//update status to processing\n\t\trequest = dao.getBillDownloadRequest(eventNotification.getRecordId());\n\t\tif (null == request) {\n\t\t\tthrow new Exception(\"BillDownloadRequest cannot be found: \" + eventNotification.getRecordId());\n\t\t}\n\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_PROCESSING);\n\t\tdao.update(request);\n\t\t\n\t\tDataHandler billContent = null;\n\t\tString extension = \".pdf\";\n\t\tsuccessful = true;\n\t\tString billSysId = getBillSysId(request.getDdn());\n\t\t\n\t\tString billNumber = \"\";\n\t\tif(billSysId.equals(BILL_SYS_ID_FLEXCAB)){\n\t\t\tbillNumber = request.getBillNumber();\n\t\t} else if(billSysId.equals(BILL_SYS_ID_MICA)){\n\t\t\tbillNumber = getMICABillNumber(request.getBillNumber());\t\t\t\n\t\t}\n\t\t\n\t\tDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tString issueDate = df.format(request.getBillIssueDate());\n\t\tif (log.isDebugEnabled()) log.debug(\"Calling webservice client\");\n\t\ttry {\n\t\t\tString requestType = REQUEST_TYPE_BULK;\n\t\t\tif(eventNotification.getParentRecordId() == ONE_OFF_DOWNLOAD_BULK_ID){\n\t\t\t\trequestType = REQUEST_TYPE_ONEOFF;\n\t\t\t}\n\t\t\tbillContent = getDoc(requestType,billSysId,request.getAccountNumber(), billNumber, issueDate,PAGE_LIMIT, PAGE_RANGE, id, pw);\n\t\t} catch(TelJIesRpcServiceFault e){\n\t\t\tif (log.isDebugEnabled()) log.debug(\"Service Fault received: \",e);\t\t\t\n\t\t\tif(e.getFaultID().equals(TelstraCBMConstants.SALMAT_ERROR_CODE_001)){\n\t\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_NOT_FOUND);\n\t\t\t} else if(e.getFaultID().equals(TelstraCBMConstants.SALMAT_ERROR_CODE_008)){\n\t\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_TOO_LARGE);\n\t\t\t} else { \n\t\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_FAILED);\n\t\t\t}\n\t\t\tsuccessful = false;\n\t\t} catch(RemoteException re){\n\t\t\tif (log.isDebugEnabled()) log.debug(\"Remote exception occured: \",re);\n\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_FAILED);\n\t\t\tsuccessful = false;\n\t\t}\n\t\ttry {\n\t\t\teventNotification.setSuccessful(false);\n\t\t\tif (successful) {\n\t\t\t\t//save file to file system\n\t\t\t\tMessageFormat pathFormat = new MessageFormat(this.billsPath);\n\t\t\t\tString[] pathArgs = {eventNotification.getUserId(),eventNotification.getBulkReqestName()};\n\t\t\t\tStringBuffer path = new StringBuffer(pathFormat.format(pathArgs));\n\t\t\n\t\t\t\tpath.append(request.getAccountNumber()).append(\"_\")\n\t\t\t\t\t\t.append(request.getBillNumber()).append(\"_\")\n\t\t\t\t\t\t.append(df.format(request.getBillIssueDate())).append(extension);\n\t\t\t\tif (log.isDebugEnabled()) log.debug(\"Writing PDF to the location: \"+path.toString());\n\t\t\t\tFile file = new File(path.toString());\n\t\t\t\tif(!file.exists()){ file.createNewFile();}\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\t\tbillContent.writeTo(fos);\n\t\t\t\tfos.close();\n\t\t\t\t\n\t\t\t\t//update status to complete\n\t\t\t\trequest.setBillFilePath(path.toString());\n\t\t\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_COMPLETE);\n\t\t\t\tdao.update(request);\n\t\t\t\tdao.flushToDatabase();\n\t\t\t\n\t\t\t\teventNotification.setSuccessful(true);\n\t\t\t} else {\n\t\t\t\tif (log.isDebugEnabled()) log.debug(\"Saving failed bill status to database\");\n\t\t\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_ERROR);\n\t\t\t\tdao.update(request);\n\t\t\t\tdao.flushToDatabase();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception caught while saving bill download request to file system: \", e);\n\t\t\tif (log.isDebugEnabled()) log.debug(\"Cleaning up bill download request\");\n\t\t\t//get fresh copy of request\n\t\t\trequest = dao.getBillDownloadRequest(eventNotification.getRecordId());\n\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_FAILED);\n\t\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_ERROR);\n\t\t\tdao.update(request);\n\t\t\tdao.flushToDatabase();\n\t\t}\n\t\t\n\t\ttimer.stop();\n\t\tOLBBillDownloadTime time = new OLBBillDownloadTime();\n\t\ttime.setCreated(new Date());\n\t\ttime.setGeneratorTypeId(getGeneratorType(request.getDownloadFormat()));\n\t\ttime.setElapsedSeconds((float)timer.getElapsedTime()/(float)1000);\n\t\ttime.setReference(request.getId()+\"\");\n\t\tif(log.isDebugEnabled()) { log.debug(\"Recording response time: \" + time.getElapsedSeconds()); }\n\t\tgetDao().recordTime(time);\n\t\t\n\t\tif(eventNotification.getParentRecordId() != ONE_OFF_DOWNLOAD_BULK_ID){\n\t\t\tjmsSender.sendMesage(eventNotification);\n\t\t}\n\t}",
"public void startingBatchDownload(Model firstPatch, Model finalPatch) \n {\n super.startingBatchDownload(firstPatch, finalPatch);\n }",
"public interface FilePostDownloadHandler {\n void onPostDownload();\n}",
"private void sendNotification(Download download) {\n }",
"void onDownloadFileCreated(DownloadFileInfo downloadFileInfo);",
"private void addDownloadJob(TvDataUpdateManager dataBase, Mirror mirror, Date date,\r\n String level, Channel channel, String country,\r\n DayProgramReceiveDH receiveDH, DayProgramUpdateDH updateDH,\r\n SummaryFile remoteSummary, SummaryFile localSummary)\r\n {\n if (remoteSummary == null) {\r\n return;\r\n }\r\n String completeFileName = DayProgramFile.getProgramFileName(date,\r\n country, channel.getId(), level);\r\n File completeFile = null;\r\n\r\n int levelIdx = DayProgramFile.getLevelIndexForId(level);\r\n\r\n\r\n boolean downloadTheWholeDayProgram;\r\n // Check whether we already have data for this day\r\n downloadTheWholeDayProgram = !(dataBase.isDayProgramAvailable(date, channel) && (completeFile = new File(mDataDir, completeFileName)).exists());\r\n if (!downloadTheWholeDayProgram) {\r\n // We have data -> Check whether the mirror has an update\r\n\r\n // Get the version of the file\r\n int localVersion;\r\n try {\r\n localVersion = localSummary.getDayProgramVersion(date, country, channel.getId(), levelIdx);\r\n if (localVersion == -1) {\r\n //not found, look into file itself\r\n if (completeFile == null) {\r\n completeFile = new File(mDataDir, completeFileName);\r\n }\r\n localVersion = DayProgramFile.readVersionFromFile(completeFile);\r\n //directly add it\r\n localSummary.setDayProgramVersion(date, country, channel.getId(), levelIdx, localVersion);\r\n //getChannelGroupById(channel.getGroup().getId()).saveLocalSummary();\r\n }\r\n \r\n if (localVersion == 255) {\r\n downloadTheWholeDayProgram = true;\r\n } else {\r\n\r\n\r\n // Check whether the mirror has a newer version\r\n boolean needsUpdate;\r\n int mirrorVersion = remoteSummary.getDayProgramVersion(date, country,\r\n channel.getId(), levelIdx);\r\n needsUpdate = (mirrorVersion > localVersion);\r\n\r\n\r\n if (needsUpdate) {\r\n // We need an update -> Add an update job\r\n String updateFileName = DayProgramFile.getProgramFileName(date,\r\n country, channel.getId(), level, localVersion);\r\n mDownloadManager.addDownloadJob(mirror.getUrl(),updateFileName, updateDH);\r\n }\r\n }\r\n\r\n } catch (Exception exc) {\r\n// // don't throw an exception; try to download the file again\r\n// throw new TvBrowserException(getClass(), \"error.5\",\r\n// \"Reading version of TV data file failed: {0}\",\r\n// completeFile.getAbsolutePath(), exc);\r\n downloadTheWholeDayProgram = true;\r\n }\r\n\r\n }\r\n\r\n if (downloadTheWholeDayProgram)\r\n {\r\n // We have no data -> Check whether the mirror has\r\n boolean needsUpdate;\r\n int mirrorVersion = remoteSummary.getDayProgramVersion(date, country,\r\n channel.getId(), levelIdx);\r\n needsUpdate = (mirrorVersion != -1);\r\n\r\n if (needsUpdate) {\r\n // We need an receive -> Add a download job\r\n mDownloadManager.addDownloadJob(mirror.getUrl(),completeFileName, receiveDH);\r\n }\r\n }\r\n }",
"void onDownloadComplete(EzDownloadRequest downloadRequest);",
"public interface UpdateDownloadListener {\n /**\n * Invoked when download starts.\n */\n public void downloadStarted();\n\n /**\n * Invoked when download progress changes.\n *\n * @param downloaded\n * the number of downloaded bytes.\n * @param total\n * the total size of data.\n */\n public void downloadProgress(long downloaded, long total, long bytesPerSecond, long secondsLeft);\n\n /**\n * Invoked when download completes.\n *\n * @param f\n * the downloaded installer file.\n */\n public void downloadCompleted(File f);\n\n /**\n * Invoked when download fails for some reason.\n *\n * @param t\n * the optional exception object that caused this download to fail.\n */\n public void downloadFailed(Throwable t);\n}",
"void mo54427b(DownloadInfo downloadInfo);",
"public interface DownloadListener {\n void onStart(String url,String savePath);\n void onProgress(String url, String savePath,long progress,long max);\n void onComplete(String url,String savePath);\n void onCancel(String url,String savePath);\n void onFail(String url,String savePath);\n\n // boolean isCanceled(String url,String savePath);\n String generalFileName(String url);\n long getMax(String url,String savePath);\n long getAvailable(String url,String savePath);\n}",
"public void downloadStarted();",
"public void stoppingBatchDownload(Model firstPatch, Model finalPatch) \n {\n }",
"@Override\n public void Download(DownloadBatchResult getBatchRes) {\n }",
"void mo54425b(int i, int i2, IDownloadListener iDownloadListener, ListenerType listenerType, boolean z);",
"@Override\n public void onVersionFileDownloadTimeout() {\n\n }",
"private void delegatedDownload(ResourceDownloadInfo rdi) throws Exception {\n WebResource webResource = client.resource(delegateResourceDownloadServiceUrl);\n webResource.entity(rdi);\n // Get the resource\n File resourceFile = webResource.get(File.class);\n rdi.setFile(resourceFile);\n }",
"public void onDownloadSuccess(String fileInfo);",
"public interface FileDownloadListener {\n\n\t/**\n\t * Listener for the progress of downloadFile\n\t * @param current current file data offset\n\t * @param total total length of file data\n\t */\n\tpublic void onDownloadProgress(int current, int total);\n\t\n\tpublic boolean cancelDownload();\n}",
"public void OnFileDataReceived(byte[] data,int read, int length, int downloaded);",
"public interface DownloadListener\n{\n void onCancel(boolean isAuto);\n\n void onFailStart(boolean isAuto);\n\n void onFailed(boolean isAuto);\n\n void onProgress(int paramInt,boolean isAuto);\n\n void onStart(boolean isAuto);\n\n void onSuccess(boolean isAuto);\n\n void onWait(boolean isAuto);\n}",
"void mo54428b(DownloadTask downloadTask);",
"public void downloadDay(){\n\n}",
"void onDownloadsChanged();",
"void onDownloadsChanged();",
"@Override\n @RequestMapping(\"download.feep\")\n public void download(HttpServletRequest request, HttpServletResponse response) throws FeepControllerException {\n\n }",
"public boolean getUpdatesListenersOnDownload() \n {\n return true; \n }",
"void mo54411a(int i, int i2, IDownloadListener iDownloadListener, ListenerType listenerType, boolean z);",
"@Override\r\n\tpublic void downloadHomework() {\n\t\t\r\n\t}",
"@Override\n public void run() {\n downloadFile(Const.MONITOR_SERVER_ADDRESS, downFilePath);\n }",
"public FileInputStream downloadCompletedJobReport(String start, String end, int flag, int client) throws Exception;",
"public interface OnDownloadFileChangeListener {\n\n /**\n * an new DownloadFile created\n *\n * @param downloadFileInfo new DownloadFile created\n */\n void onDownloadFileCreated(DownloadFileInfo downloadFileInfo);\n\n /**\n * an DownloadFile updated\n *\n * @param downloadFileInfo DownloadFile updated\n * @param type the update type\n */\n void onDownloadFileUpdated(DownloadFileInfo downloadFileInfo, Type type);\n\n /**\n * an DownloadFile deleted\n *\n * @param downloadFileInfo DownloadFile deleted\n */\n void onDownloadFileDeleted(DownloadFileInfo downloadFileInfo);\n\n /**\n * DownloadFile Update Type\n */\n public static enum Type {\n /**\n * save dir changed\n */\n SAVE_DIR,\n /**\n * save file name changed\n */\n SAVE_FILE_NAME,\n /**\n * other,may be all\n */\n OTHER\n }\n}",
"void mo54418a(DownloadTask downloadTask);",
"@Override\n public boolean isDownloadable() {\n return true;\n }",
"public void downloadCompleted(File f);",
"void fileDownloaded(String path);",
"public void onFileDownloadComplete(String filePath);",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n listener.onDownlaoded(finalFile);\n }",
"public interface Listener {\n\n /** Called when the tracked downloads changed. */\n void onDownloadsChanged();\n }",
"public interface Listener {\n\n /** Called when the tracked downloads changed. */\n void onDownloadsChanged();\n }",
"public interface OnDownloadListener {\n /**\n * 下载成功\n */\n void onDownloadSuccess();\n\n /**\n * @param progress\n * 下载进度\n */\n void onDownloading(int progress);\n\n /**\n * 下载失败\n */\n void onDownloadFailed();\n}",
"public void onFileDownloadComplete(String filePath, Object object);",
"void onDownloadFailed(EzDownloadRequest downloadRequest, int errorCode, String errorMessage);",
"@Override\n public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype,\n long contentLength) {\n }",
"private void downloadFile(final FileMessage fm) {\n if (Platform.isFxApplicationThread()) {\n saveFile(fm);\n } else {\n Platform.runLater(() -> saveFile(fm));\n }\n }",
"void downloadCompleted(String blobId);",
"public interface DownloadListener {\n void onDownloadStart(DownloadTask task);\n\n void onDownloadProgress(DownloadTask task);\n\n void onDownloadSuccess(DownloadTask task);\n\n void onDownloadFail(DownloadTask task);\n\n void onDownloadDeleted(DownloadTask task);\n\n void onDownloadPaused(DownloadTask task);\n\n void onDownloadResumed(DownloadTask task);\n}",
"public interface FileDownloadInterface {\n void onFileDownloadSuccess();\n void onFileDownloadFailed(Exception ex);\n}",
"public interface DownloadTaskListener {\n\n void onStart(String taskId, long completeBytes, long totalBytes);\n\n\n void onProgress(String taskId, long currentBytes, long totalBytes);\n\n\n void onPause(String taskId, long currentBytes, long totalBytes);\n\n\n void onFinish(String taskId, File file);\n\n\n void onFailure(String taskId, String error_msg);\n}",
"File downloadExtension(DownloadExtensionRequest request);",
"public interface DownloadProgressListener\n{\n /**\n * 下载进度监听方法,获取和处理下载点数据的大小\n * @param size\n */\n public void onDownloadSize(int size);\n\n}",
"public interface DownloadData {\n public void download();\n public String getFileLocation();\n}",
"public interface UpDateDownloadListener {\n void start();\n void onProgressChanged(int progress,String downloadUrl);\n void onFinished(long completeSize,String downloadUrl);\n void onFailure();\n}",
"@Override\n public void run() {\n downloadInfo.state = STATE_DOWNLOADING;\n notifyStateChange(downloadInfo);\n\n //6.specific download, two kinds of education\n // re-download and resume downloads\n Request request;\n File file = new File(downloadInfo.path);\n if (!file.exists() || file.length() != downloadInfo.currentLength) {\n //file is not exists, or file size in downloadInfo saved inconsistent\n //the file is invalid\n file.delete();\n downloadInfo.currentLength = 0;\n\n //need to re-download\n String url = String.format(Url.APP_DOWNLOAD, downloadInfo.downloadUrl);\n request = new Request.Builder().url(url).build();\n } else {\n //need to resume download\n String url = String.format(Url.APP_BREAK_DOWNLOAD, downloadInfo.downloadUrl, downloadInfo.currentLength);\n request = new Request.Builder().url(url).build();\n }\n\n Response response = null;\n InputStream is = null;\n FileOutputStream fos = null;\n\n try {\n response = okHttpClient.newCall(request).execute();\n is = response.body().byteStream();\n\n if (response != null && is != null) {\n fos = new FileOutputStream(file, true);\n\n byte[] buffer = new byte[1024 * 8];\n int len = -1;\n while ((len = is.read(buffer)) != -1 && downloadInfo.state == STATE_DOWNLOADING) {\n fos.write(buffer, 0, len);\n fos.flush();\n\n downloadInfo.currentLength = downloadInfo.currentLength + len;\n notifyProgressChange(downloadInfo);\n }\n } else {\n //the server return an error\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n } finally {\n try {\n fos.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //handle the case did not come here,there are has three situation\n //1.download finish 2.download error 3.download pause\n if (file.length() == downloadInfo.currentLength && downloadInfo.state == STATE_DOWNLOADING) {\n //说明下载完成\n downloadInfo.state = STATE_FINISH;\n notifyStateChange(downloadInfo);\n } else if (downloadInfo.state == STATE_PAUSE) {\n notifyStateChange(downloadInfo);\n } else {\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n //requires runnable is removed from the current from downloadTaskMap at the end of the task\n downloadTaskMap.remove(downloadInfo.id);\n }",
"public interface DownloadFile {\n\n void start(ZionDownloadListener downloadListener);\n\n}",
"@GET(\"/resource/example.zip\")\n Call<ResponseBody> downloadFileWithFixedUrl();",
"void downloadingFile(String path);",
"void onDFSEntry();",
"public static void main(String[] args) throws IOException {\n\n downloadFileRequest();\n }",
"public void DownloadUpdate(String version)\n {\n String destination = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + \"/\";\n String fileName = \"textbomb.apk\";\n destination += fileName;\n final Uri uri = Uri.parse(\"file://\" + destination);\n Log.d(\"textbomb.apk\", \"Dest: \" + uri);\n\n //Delete update file if exists\n File file = new File(destination);\n if (file.exists())\n //file.delete() - test this, I think sometimes it doesnt work\n file.delete();\n\n //get url of app on server\n String url = \"https://github.com/wethegreenpeople/TextBomb/releases/download/\" + version + \"/textbomb.apk\";\n\n //set downloadmanager\n DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));\n request.setDescription(\"Textbomb\");\n request.setTitle(\"Textbomb\");\n\n //set destination\n request.setDestinationUri(uri);\n\n // get download service and enqueue file\n final DownloadManager manager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);\n final long downloadId = manager.enqueue(request);\n\n //set BroadcastReceiver to install app when .apk is downloaded\n BroadcastReceiver onComplete = new BroadcastReceiver() {\n public void onReceive(Context ctxt, Intent intent) {\n File apkFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + \"/textbomb.apk\");\n intent = new Intent(Intent.ACTION_VIEW);\n Uri fileUri = android.support.v4.content.FileProvider.getUriForFile(context, context.getPackageName() + \".provider\", apkFile);\n intent.setDataAndType(fileUri, \"application/vnd.android.package-archive\");\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n ctxt.startActivity(intent);\n }\n };\n //register receiver for when .apk download is compete\n context.registerReceiver(onComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));\n }",
"@Test\n public void downloadTest() throws ApiException {\n Integer devid = null;\n String path = null;\n File response = api.download(devid, path);\n\n // TODO: test validations\n }",
"void mo45684a(DownloadInfo cVar, BaseException aVar, int i) throws RemoteException;",
"public void handlerDownloadProgress(int progress) {\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"deal download progress in UpdateClient, progress=\" + progress);\n }\n }",
"void mo54417a(DownloadChunk downloadChunk);",
"@SuppressWarnings(\"deprecation\")\r\n @Override\r\n public AvailableStatus requestFileInformation(final DownloadLink link) throws IOException, PluginException {\r\n br = new Browser();\r\n // need to correct links that are added prior to fixing!\r\n correctDownloadLink(link);\r\n prepBrowser(br);\r\n br.setFollowRedirects(true);\r\n final URLConnectionAdapter con = br.openGetConnection(link.getDownloadURL());\r\n if (con.getResponseCode() == 503 || con.getResponseCode() == 404) {\r\n con.disconnect();\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n br.followConnection();\r\n if (br.containsHTML(\"<title>\\\\s*-\\\\s*(?:Yunfile|Dix3)[^<]*</title>\")) {\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n // Access denied\r\n if (br.containsHTML(\"Access denied<|资源已被禁止访问</span>\")) {\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n // Not found\r\n if (br.containsHTML(\"<span>(资源未找到|Not found)</span>\")) {\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n /* Wrong link */\r\n if (br.containsHTML(\">Wrong</span>\")) {\r\n throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);\r\n }\r\n String filename = null, filesize = null;\r\n // if (br.getURL().matches(\"http://page\\\\d+\\\\.yunfile.com/fs/[a-z0-9]+/\")) ;\r\n filename = br.getRegex(\"Downloading: <a></a> ([^<>]*) - [^<>]+<\").getMatch(0);\r\n if (filename == null) {\r\n filename = br.getRegex(\"<title>(.*?)\\\\s*-\\\\s*(?:Yunfile|Dix3)[^<]*</title>\").getMatch(0);\r\n }\r\n if (filename == null) {\r\n filename = br.getRegex(\"<h2 class=\\\"title\\\">文件下载\\\\ \\\\ ([^<>\\\"]*?)</h2>\").getMatch(0);\r\n }\r\n filesize = br.getRegex(\"文件大小: <b>([^<>\\\"]*?)</b>\").getMatch(0);\r\n if (filesize == null) {\r\n filesize = br.getRegex(\"File Size: <b>([^<>\\\"]*?)</b>\").getMatch(0);\r\n }\r\n if (filesize == null) {\r\n filesize = br.getRegex(\"id=\\\"file_show_filename\\\">[^<>]+</span> \\\\- ([^<>\\\"]+) <\").getMatch(0);\r\n }\r\n if (filename == null) {\r\n throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);\r\n }\r\n link.setName(decode(\"111\", filename.trim()));\r\n link.setDownloadSize(SizeFormatter.getSize(filesize));\r\n return AvailableStatus.TRUE;\r\n }",
"public void downloadFile(final Context context, final String fileKey, String pageFileKey, String fileType, final DownloadListener downloadListener) {\n\n final String pathName = Config.getPathName(context) + fileType + getFIleNameFromFileKEy(fileKey);\n final String pagePathName = Config.getPathName(context) + PAGES_FILE + getFIleNameFromFileKEy(pageFileKey);\n\n final long totalBytes = 0;\n TransferObserver downloadObserver = transferUtility.download(\n Config.BUCKET_NAME,\n fileKey,\n new File(pathName));\n\n\n // Attach a listener to the observer to get state update and progress notifications\n downloadObserver.setTransferListener(new TransferListener() {\n\n @Override\n public void onStateChanged(int id, TransferState state) {\n if (TransferState.COMPLETED == state) {\n\n downloadListener.onDownloadFinish(id, state.name(), pathName, pagePathName);\n }\n }\n\n @Override\n public void onProgressChanged(int id, long bytesCurrent,long bytesTotal) {\n\n\n if (bytesTotal == 0){\n\n bitesCorrent = bytesCurrent;\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n\n URL url = null;\n try {\n url = new URL(S3_JABRUTOUCH + fileKey);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n URLConnection conection = null;\n try {\n conection = url.openConnection();\n } catch (IOException e) {\n e.printStackTrace();\n }\n // getting file length\n int lengthOfFile = conection.getContentLength();\n\n float percentDonef = ((float) bitesCorrent / (float) lengthOfFile) * 100;\n final int percentDone = (int) percentDonef;\n\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n downloadListener.onProgressChanged(percentDone);\n }\n });\n }\n });\n thread.start();\n\n }else {\n\n\n float percentDonef = ((float) bytesCurrent / (float) bytesTotal) * 100;\n int percentDone = (int) percentDonef;\n\n downloadListener.onProgressChanged(percentDone);\n }\n\n\n }\n\n @Override\n public void onError(int id, Exception ex) {\n\n Toast.makeText(context, \"Error downloading file \" + fileKey, Toast.LENGTH_LONG).show();\n downloadListener.onDownloadError();\n\n }\n\n });\n\n // If you prefer to poll for the data, instead of attaching a\n // listener, check for the state and progress in the observer.\n if (TransferState.COMPLETED == downloadObserver.getState()) {\n // Handle a completed upload.\n\n\n }\n\n\n }",
"public void reviewFileDownload(HttpServletRequest request, HttpServletResponse response, int reviewNum, int idx) throws Exception;",
"public interface OnDownloadCompleteListener{\n\t\tvoid onDownloadComplete(DownloadBean bean);\n\t}",
"public PatchNotesDownloader(String patchNotesLink) {\n // Check to see if patchNotesLink starts with C:\\ or a similar path and then append file:\\\\ if true?\n PATCH_NOTES_LINK = patchNotesLink;\n }",
"@Override\n\t\t\t\t\t\tpublic void failed() {\n\t\t\t\t\t\t\tSystem.out.println(\"下载失败\");\n\t\t\t\t\t\t}",
"private JnlpResource locateResource( DownloadRequest dreq )\n throws IOException, ErrorResponseException\n {\n if ( dreq.getVersion() == null )\n {\n return handleBasicDownload( dreq );\n }\n else\n {\n return handleVersionRequest( dreq );\n }\n }",
"@Override \r\n public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, \r\n\t long contentLength) {\n \tString filename = SDHelper.getAppDataPath() + File.separator \r\n\t\t\t\t\t+ getFilename(url);\r\n \tFile file =new File(filename);\r\n \tif (file.exists()) {\r\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\tString ext = getExt(file);\r\n\t\t\t\tString mark = null;\r\n\t\t\t if (ext.equalsIgnoreCase(\"doc\")||ext.equalsIgnoreCase(\"docx\"))\r\n\t\t\t\t\tmark = \"application/msword\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"xls\")||ext.equalsIgnoreCase(\"xlsx\"))\r\n\t\t\t\t\tmark = \"application/vnd.ms-excel\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"ppt\")||ext.equalsIgnoreCase(\"pptx\"))\r\n\t\t\t\t\tmark = \"application/vnd.ms-powerpoint\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"pdf\"))\r\n\t\t\t\t\tmark = \"application/pdf\";\r\n\t\t\t\t\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"apk\"))\r\n\t\t\t\t\tmark = \t\"application/vnd.android.package-archive\"; \r\n\t\t\t\tintent.setDataAndType(Uri.fromFile(file), mark);\r\n\t\t\t\tmContext.startActivity(intent);\r\n\r\n \t}\r\n \telse \r\n \t new getFileAsync().execute(url);\r\n \t\r\n \t}",
"public final synchronized void bfk() {\n C4990ab.m7416i(\"MicroMsg.MsgFileWorker_Base\", \"onDownloadFail\");\n if (this.ktU != null) {\n this.ktU.bfe();\n this.ktU = null;\n }\n }",
"public void patch (File appdir, File patch, ProgressObserver obs)\n throws IOException\n {\n // save this information for later\n _obs = obs;\n _plength = patch.length();\n\n try (ZipFile file = new ZipFile(patch)) {\n Enumeration<? extends ZipEntry> entries = file.entries();\n while (entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n String path = entry.getName();\n long elength = entry.getCompressedSize();\n\n // depending on the suffix, we do The Right Thing (tm)\n if (path.endsWith(CREATE)) {\n path = strip(path, CREATE);\n log.info(\"Creating \" + path + \"...\");\n createFile(file, entry, new File(appdir, path));\n\n } else if (path.endsWith(PATCH)) {\n path = strip(path, PATCH);\n log.info(\"Patching \" + path + \"...\");\n patchFile(file, entry, appdir, path);\n\n } else if (path.endsWith(DELETE)) {\n path = strip(path, DELETE);\n log.info(\"Removing \" + path + \"...\");\n File target = new File(appdir, path);\n if (!FileUtil.deleteHarder(target)) {\n log.warning(\"Failure deleting '\" + target + \"'.\");\n }\n\n } else {\n log.warning(\"Skipping bogus patch file entry: \" + path);\n }\n\n // note that we've completed this entry\n _complete += elength;\n }\n }\n }",
"@Override\n public void run() {\n if (checkmeInfo == null || wantLanguage == null || updatePatch == null) {\n return;\n }\n try {\n//\t\t\t\t//获取升级包下载地址\n//\t\t\t\tJSONObject jsonObject = PostUtils.doPost(Constant.URL_GET_CHECKME_PATCH\n//\t\t\t\t\t\t, PostInfoMaker.makeGetCheckmePatchInfo(checkmeInfo, wantLanguage));\n//\t\t\t\tif (jsonObject == null) {\n//\t\t\t\t\t//获取错误\n//\t\t\t\t\tMsgUtils.sendMsg(callerHandler, Constant.MSG_SHOW_UPDATE_FAILED);\n//\t\t\t\t}else {\n//\t\t\t\t\tif (jsonObject.getString(\"Result\").equals(\"NULL\")) {\n//\t\t\t\t\t\tMsgUtils.sendMsg(callerHandler, Constant.MSG_SHOW_UPDATE_FAILED);\n//\t\t\t\t\t}else {\n//\t\t\t\t\t\t//判断App包和语言包版本,并下载\n//\t\t\t\t\t\tAppPatch appPatch = new AppPatch(jsonObject);\n//\t\t\t\t\t\tLanguagePatch languagePatch = new LanguagePatch(jsonObject);\n//\t\t\t\t\t\tif (appPatch.getDependLanguageVersion() != languagePatch.getVersion()) {\n//\t\t\t\t\t\t\t//两包版本不对应,升级失败\n//\t\t\t\t\t\t\tMsgUtils.sendMsg(callerHandler, Constant.MSG_SHOW_UPDATE_FAILED);\n//\t\t\t\t\t\t}else {\n//\t\t\t\t\t\t\t//先删除旧的本地升级包,再下载新升级包\n//\t\t\t\t\t\t\tdeleteOldPatchs();\n//\t\t\t\t\t\t\tdownloadPatchs(appPatch, languagePatch);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n if (StringUtils.isUpdateAvailable(updatePatch.getVersion(), makeVersion(checkmeInfo.getSoftware()))) {\n deleteOldPatchs();\n downloadPatchs(updatePatch, wantLanguage);\n }\n } catch (Exception e) {\n // TODO: handle exception\n e.printStackTrace();\n MsgUtils.sendMsg(callerHandler, Constant.MSG_SHOW_UPDATE_FAILED);\n }\n\n }",
"public void getData(Context context) {\n try{\n // Datos locales\n PackageInfo pckginfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n currentVersionCode = pckginfo.versionCode;\n currentVersionName = pckginfo.versionName;\n\n // Datos remotos\n String data = downloadHttp(new URL(INFO_FILE));\n JSONObject json = new JSONObject(data);\n latestVersionCode = json.getInt(\"versionCode\");\n latestVersionName = json.getString(\"versionName\");\n downloadURL = json.getString(\"downloadURL\");\n Log.d ( \"AutoUpdate\" , \"Data obtained successfully\" );\n } catch (JSONException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error with JSON\" , e);\n } catch (NameNotFoundException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error with Packete: S\" , e);\n } catch (IOException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error downloading\" , e);\n }\n }",
"public interface IPresenterDownload {\n void findDownloadMessage();\n void sendDownLoadMessage(DownloadDoc doc);\n}",
"public void processDownloadRequest(DownloadParams p_params)\n throws OfflineEditorManagerException, RemoteException\n {\n m_localInstance.processDownloadRequest(p_params);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (mDownloadedFileID == -1)\n return;\n Toast.makeText(getApplicationContext(), getString(R.string.atom_ui_tip_download_success), //To notify the Client that the file is being downloaded\n Toast.LENGTH_LONG).show();\n QunarWebActvity.this.finish();\n }",
"public void downloadData() {\n\t\tint start = millis();\n\t\tdthread = new DaysimDownloadThread();\n\t\tdthread.start();\n\t\tdataready = false;\n\t\twhile(!dataready) {\n\t\t\tif((millis() - start)/175 < 99) {\n\t\t\t\tLightMaskClient.setMainText(\"\\n\\n\" + \"Downloading: \" + (millis() - start)/175 + \"% completed\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tLightMaskClient.setMainText(\"Downloading: \" + 99 + \"% completed\");\n\t\t\t}\n\t\t\tdelay(100);\n\t\t}\n\t\tdthread.quit();\n\t\tLightMaskClient.setMainText(\"\\n\\n\" + \"Downloading: 100% completed\");\n\t\tToolkit.getDefaultToolkit().beep();\n\t\tdelay(1000); \n\t\tLightMaskClient.setMainText(\"Please disconnect the Daysimeter\");\n\t\tLightMaskClient.dlComplete = true;\n\t\t//setup the download for processing\n\t\tfor(int i = 0; i < EEPROM.length; i++) {\n\t\t\tEEPROM[i] = bytefile1[i] & 0xFF;\n\t\t}\n\t \n\t\tfor(int i = 0; i < header.length; i++) {\n\t\t\theader[i] = bytefile2[i] & 0xFF;\n\t\t}\n\t\t\n\t\tasciiheader = MakeList(header);\n\t\tisnew = asciiheader[2].contains(\"daysimeter\");\n\t\tisUTC = asciiheader[1].contains(\"1.3\") || asciiheader[1].contains(\"1.4\")\n\t\t\n\t\torganizeEEPROM();\n\t\tprocessData();\n\t\tsavefile();\n\t}",
"@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n }",
"@Override\n public void run() {\n DownloadListener.getListener().execute();\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void downLoadSuccess(String localFilPath) {\n\t\t\t\t\t\t\t\t\t\tupdate.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\tprogressBar_downLoad.setVisibility(View.INVISIBLE);\n\t\t\t\t\t\t\t\t\t\tFailOpera.Instace(mContext).openFile(localFilPath);\n\t\t\t\t\t\t\t\t\t}",
"void downloadFeature(File file, int id) throws IOException, SQLException;",
"@Override\n // Download file\n protected void onHandleIntent(@Nullable Intent intent) {\n String address = intent.getStringExtra(\"URL\");\n // Conecction with url\n HttpURLConnection connection = null;\n // Stream for save content\n OutputStream streamToFile = null;\n try {\n // Get filename from URL\n URL url = new URL(address);\n File file = new File(url.getFile());\n String fileName = file.getName();\n // Create new file\n DocumentFile directory = DocumentFile.fromTreeUri(this, uri);\n DocumentFile dFile = directory.createFile(\"\", fileName);\n // Make connection\n connection = (HttpURLConnection) url.openConnection();\n // Stream for fetching data\n DataInputStream dataInputStream = new DataInputStream(connection.getInputStream());\n // Initialize stream for writing\n streamToFile = getContentResolver().openOutputStream(dFile.getUri());\n\n //streamToFile = new FileOutputStream(f);\n // Buffor for data\n byte buffor[] = new byte[100];\n // Amount of readed data\n int gotBytes = dataInputStream.read(buffor, 0, 100);\n // Total readed data\n int totalBytes = 0;\n // Read untill end of file\n while (gotBytes != -1) {\n // Write read data to buffer\n streamToFile.write(buffor, 0, gotBytes);\n // How many bytes read\n gotBytes = dataInputStream.read(buffor, 0, 100);\n // Add readed bytes to total counter\n totalBytes += gotBytes;\n // Send message with readed bytes\n sendBroadcast(totalBytes);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n // Close connetions\n if (connection != null)\n connection.disconnect();\n\n if (streamToFile != null) {\n try {\n streamToFile.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"@Test(enabled = false)\n public void testDownload() throws Exception {\n\n AttFtpClient attFtpClient = AttFtpClient.getFtpClient();\n\n File retrieveLastModifiedFileFromFTP = attFtpClient.retrieveLastModifiedFileFromFTP();\n attFtpClient.deleteFilesFromFTPserver();\n }",
"public void download() {\r\n\t\t\ttThread = new Thread(this);\r\n\t\t\ttThread.start();\r\n\t\t}",
"protected void download() {\r\n\t\tsetState(DOWNLOADING);\r\n\t\t\r\n\t\tThread t = new Thread(this);\r\n\t\tt.start();\r\n\t}",
"@Override\n\tpublic void fileDeliveryServiceListUpdate() {\n\t\t\n\t}",
"public abstract void onNewPatchset(TicketModel ticket);",
"void downloadNdwi6(File file, int id) throws IOException, SQLException;",
"public void onClick() {\n getRequestCycle().setRequestTarget(new IRequestTarget() {\n \n public void detach(RequestCycle requestCycle) {\n }\n \n public void respond(RequestCycle requestCycle) {\n WebResponse r = (WebResponse) requestCycle.getResponse();\n r.setAttachmentHeader(fileName);\n try {\n File file = AttachmentUtils.getFile(attachment, getJtrac().getJtracHome());\n InputStream is = new FileInputStream(file);\n try {\n Streams.copy(is, r.getOutputStream());\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n });\n }",
"void downloadModis(File file, ModisProduct product, int id) throws IOException, SQLException;",
"private void download()\n {\n if(mDownloadConnection!=null && mDownloadConnection.mBinder!=null)\n {\n if (mDownloadConnection.mBinder.download(\"file1\"))\n {\n mTvFilename.setText(\"file1\");\n }\n }\n }",
"public static void main(String[] args) {\n HttpConnection connection = new HttpConnection.Builder(\n INTEGRATION_CHANNEL_URL, API_GW_URL, APP_KEY, APP_SECRET, ORG_ID)\n .build();\n\n DeviceInfo deviceInfo = new DeviceInfo().setAssetId(ASSET_ID);\n // fileUri is an enos scheme file uri\n String fileUri = \"enos-connect://xxx.txt\";\n\n try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {\n InputStream inputStream = connection.downloadFile(deviceInfo, fileUri, FileCategory.FEATURE);\n byte[] buffer = new byte[1024];\n int len;\n while ((len = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, len);\n }\n byte[] data = outputStream.toByteArray();\n System.out.println(new String(data));\n } catch (EnvisionException | IOException e) {\n e.printStackTrace();\n }\n\n // Asynchronously call the file download request\n try {\n connection.downloadFile(deviceInfo, fileUri, FileCategory.FEATURE, new IFileCallback() {\n @Override\n public void onResponse(InputStream inputStream) throws IOException {\n System.out.println(\"download file asynchronously\");\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n byte[] buffer = new byte[1024];\n int len;\n while ((len = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0 ,len);\n }\n byte[] data = outputStream.toByteArray();\n System.out.println(new String(data));\n }\n\n @Override\n public void onFailure(Exception failure) {\n failure.printStackTrace();\n }\n }\n );\n } catch (EnvisionException e) {\n e.printStackTrace();\n }\n }",
"public void downloadFile(ObjectInputStream inputStream) {\r\n\t \tFileEvent fileEvent = null;\r\n\t \ttry {\r\n\t \tfileEvent = (FileEvent) inputStream.readObject();\r\n\t if (fileEvent.getStatus().equalsIgnoreCase(\"Error\")) {\r\n\t System.out.println(\"Error occurred ..So exiting\");\r\n\t System.exit(0);\r\n\t }\r\n\t String outputFile = fileEvent.getDestinationDirectory() + fileEvent.getFilename();\r\n\t if (!new File(fileEvent.getDestinationDirectory()).exists()) {\r\n\t new File(fileEvent.getDestinationDirectory()).mkdirs();\r\n\t }\r\n\t File dstFile = new File(outputFile);\r\n\t FileOutputStream fileOutputStream = new FileOutputStream(dstFile);\r\n\t fileOutputStream.write(fileEvent.getFileData());\r\n\t fileOutputStream.flush();\r\n\t fileOutputStream.close();\r\n\t System.out.println(\"Output file : \" + outputFile + \" is successfully saved \");\r\n\t Thread.sleep(3000);\r\n\t System.exit(0);\r\n\t \r\n\t } catch (ClassCastException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tList<String> serverFiles = (List<String>) fileEvent;\r\n\t\t\t\tSystem.out.println(serverFiles);\r\n\t\t\t} catch (IOException e) {\r\n\t e.printStackTrace();\r\n\t } catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t } catch (InterruptedException e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t }",
"public void handlerDownloadState(int status) {\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"deal download status in UpdateClient, status=\" + status);\n }\n if (status == STATUS_DOWNLOAD_SUCCESS) {\n // requestInstall();\n }\n }",
"public interface Downloader {\n void download(String fileLink);\n\n}",
"public final synchronized void bfj() {\n C4990ab.m7416i(\"MicroMsg.MsgFileWorker_Base\", \"onDownloadStop\");\n if (this.ktU != null) {\n this.ktU.bff();\n this.ktU = null;\n }\n }"
] | [
"0.6495846",
"0.6241359",
"0.6164688",
"0.6129921",
"0.60769427",
"0.60271883",
"0.6016028",
"0.5992772",
"0.59641415",
"0.5938095",
"0.59123176",
"0.58932954",
"0.58522546",
"0.5852227",
"0.5848862",
"0.583575",
"0.5831377",
"0.5791139",
"0.5773639",
"0.57641923",
"0.5757833",
"0.5740834",
"0.57238173",
"0.5700086",
"0.5641391",
"0.5641391",
"0.56389636",
"0.5617501",
"0.55837053",
"0.55724365",
"0.5531517",
"0.5529985",
"0.5528777",
"0.5518976",
"0.551523",
"0.55020565",
"0.54985744",
"0.54897743",
"0.5489647",
"0.5476257",
"0.5476257",
"0.5472007",
"0.5470451",
"0.546351",
"0.543573",
"0.54302585",
"0.5405329",
"0.5395581",
"0.53947216",
"0.53924996",
"0.53777987",
"0.53544384",
"0.53510654",
"0.53485674",
"0.53288454",
"0.52949184",
"0.52860355",
"0.52750134",
"0.5264123",
"0.52584624",
"0.5258409",
"0.52570987",
"0.5253673",
"0.52494955",
"0.5246171",
"0.5240516",
"0.5235682",
"0.5226847",
"0.5223648",
"0.5221939",
"0.52195084",
"0.52140105",
"0.52071166",
"0.52035224",
"0.52031666",
"0.51973563",
"0.5194844",
"0.51916593",
"0.51879054",
"0.5185147",
"0.51850396",
"0.5177312",
"0.5174308",
"0.517219",
"0.51598746",
"0.5153162",
"0.51506037",
"0.51360005",
"0.5132924",
"0.5124206",
"0.51203096",
"0.5119639",
"0.5112516",
"0.510799",
"0.51062244",
"0.50989944",
"0.5093799",
"0.50896823",
"0.50882673",
"0.50871295"
] | 0.6919005 | 0 |
Sends an email reminder for a task. | void sendEmail(Task task, String taskTypeName, String plantName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sendNotification(String task, int id) {\n NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext());\n builder.setContentTitle(\"Amigo ToDo Manager\");\n builder.setContentText(task);\n\n //Create a pending intent to attach with the notif\n Intent i = new Intent(getApplicationContext(), ToDoEditActivity.class);\n Uri todoUri = Uri.parse(ToDoContentProvider.CONTENT_URI + \"/\" + id);\n i.putExtra(ToDoContentProvider.CONTENT_ITEM_TYPE, todoUri);\n PendingIntent pIntent = PendingIntent.getActivity(getApplicationContext(), 101, i, PendingIntent.FLAG_UPDATE_CURRENT);\n builder.setContentIntent(pIntent);\n builder.setSmallIcon(R.mipmap.ic_launcher);\n builder.setAutoCancel(true);\n Notification notif = builder.build();\n\n notificationManager.notify(101, notif);\n\n }",
"public void sendMailReport() {\n mailService.sendMail(\"users@example.org\", \"ToDo report\",\n String.format(\"There are '%s' todo entries!\", todoListService.getAllEntries().size()));\n }",
"public void sendMail() {\n String email = emailID.getText().toString();\n String subject = \"BlueBucket One-Time OTP\";\n otp=generateOTP();\n String message = \"\"+otp;\n\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }",
"public void sendEmailWithoutAuth(WatchAlertTask watchAlertTask, WatchAlertTaskQuery watchAlertTaskQuery)\r\n\t{\r\n\t\t\r\n\t\tString alertEmailBody = new String();\r\n\t\tString alertString = watchAlertTask.getAlertBody().getAlertString();\r\n\t\tList<MapVariableValue> nodes = watchAlertTask.getAlertBody().getAlertMapStrings();\r\n\t\t\r\n\t\ttry{\r\n\t\t\tlogger.info(\"BEFORE SENDING EMAIL\");\r\n\t\t\tString[] stringArray = watchAlertTask.getSmtpServer().split(\":\");\r\n\t\t\tString smtpServer = stringArray[0];\r\n\t\t\tString smtpPort = new String(\"25\");\r\n\t\t\t\t\r\n\t\t\tif(stringArray.length == 2) smtpPort = stringArray[1];\t\t\t \t \r\n\t\t\t\r\n\t\t\tif(watchAlertTask.getStoreActiveState() == 2)\r\n\t\t\t\talertEmailBody = WatchAlertUtils.replaceKeywords(watchAlertTask.getSendAlertEmailBody(), watchAlertTask, watchAlertTaskQuery, nodes);\r\n\t\t\telse\r\n\t\t\t\talertEmailBody = WatchAlertUtils.replaceKeywords(watchAlertTask.getClearAlertEmailBody(), watchAlertTask, watchAlertTaskQuery, nodes);\r\n\t\t\t\r\n\t\t\talertEmailBody = alertEmailBody.replaceAll(\"%MESSAGE%\", alertString);\r\n\t\t\tProperties props = System.getProperties();\r\n\t\t\tprops.put(\"mail.smtp.host\", smtpServer);\r\n\t\t\tprops.put(\"mail.transport.protocol\", \"smtp\");\r\n\t\t\tprops.put(\"mail.smtp.socketFactory.fallback\", \"true\");\r\n\t\t\tprops.put(\"mail.smtp.port\", smtpPort);\r\n\t\t\tprops.put(\"java.net.preferIPv4Stack\", \"true\");\r\n\t\t\tSession session = Session.getInstance(props);\r\n\t\t\tMimeMessage msg = new MimeMessage(session);\r\n\t\t\t\r\n\t\t\tfor(String addressstr : watchAlertTask.getRecipients())\r\n\t\t\t{\r\n\t\t\t\taddressstr = WatchAlertUtils.replaceKeywords(addressstr, watchAlertTask, watchAlertTaskQuery, nodes);\r\n\t\t\t\tString[] addressstr2 = addressstr.split(\":\");\r\n\t\t\t\t\r\n\t\t\t\tInternetAddress internetAddress = new InternetAddress(addressstr2[1]);\r\n\t\t\t\tif(addressstr2.length > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(addressstr2[0].toLowerCase().equals(\"to\"))\r\n\t\t\t\t\t\tmsg.addRecipient(MimeMessage.RecipientType.TO, internetAddress);\r\n\t\t\t\t\telse if(addressstr2[0].toLowerCase().equals(\"cc\"))\r\n\t\t\t\t\t\tmsg.addRecipient(MimeMessage.RecipientType.CC, internetAddress);\r\n\t\t\t\t\telse if(addressstr2[0].toLowerCase().equals(\"bcc\"))\r\n\t\t\t\t\t\tmsg.addRecipient(MimeMessage.RecipientType.BCC, internetAddress);\r\n\t\t\t\t\telse logger.info(\"Cannot find prefix in \\'\" +addressstr+\"\\' . Should be one of the to, cc or bcc.\");\t \t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tlogger.info(\"Cannot parse address \\'\" +addressstr+\"\\' . Should be in format: pefix:email@domain\");\r\n\t\t\t} \r\n\t\t\r\n \t//for(int i = 0; i< msg.getAllRecipients().length; i++)\r\n \t//\tlogger.info(\"Sending email to \" + msg.getAllRecipients()[i].toString());\r\n \t\r\n\t\t\tmsg.setFrom(new InternetAddress(watchAlertTask.getSmtpFrom()));\r\n\t\t\tmsg.setSubject(watchAlertTask.getSmtpSubject());\r\n\t\t\tmsg.setText(alertEmailBody, \"utf-8\", \"html\");\r\n\t\t\t//TODO Sometime service sending second email with empty body. Will investigate. \r\n\t\t\tif(alertEmailBody.length() > 0)\r\n\t\t\t{\r\n\t\t\t\tTransport transport = session.getTransport();\r\n\t\t\t\ttransport.connect();\r\n\t\t\t\ttransport.sendMessage(msg, msg.getAllRecipients());\r\n\t\t\t\ttransport.close();\r\n\t\t\t\tlogger.debug(\"Sent EMAIL TASK: \" + watchAlertTask.getTaskNumber()+\" with Subject: \" + watchAlertTask.getSmtpSubject() +\" and with body: \" + alertEmailBody);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tlogger.debug(\"Found EMAIL with empty body \" + watchAlertTask.getTaskNumber()+\" with Subject: \" + watchAlertTask.getSmtpSubject() +\" and with body: \" + alertEmailBody);\r\n\t\t\t\r\n\t\t}catch (MessagingException mex) {\r\n\t\t\tlogger.error(mex.toString());\r\n\t\t}\r\n\t}",
"public void sendMail(String to, String subject, String text);",
"public void sendEmailWithAuth(final WatchAlertTask watchAlertTask, WatchAlertTaskQuery watchAlertTaskQuery)\r\n\t{\r\n\t\r\n\t\tString alertEmailBody = new String();\r\n\t\tString alertString = watchAlertTask.getAlertBody().getAlertString();\r\n\t\tList<MapVariableValue> nodes = watchAlertTask.getAlertBody().getAlertMapStrings();\r\n\t\tTransport trans=null;\r\n\t\tString[] stringArray = watchAlertTask.getSmtpServer().split(\":\");\r\n\t\tString smtpServer = stringArray[0];\r\n\t\tString smtpPort = new String(\"25\");\r\n\t\tif(stringArray.length == 2)\r\n\t\t\tsmtpPort = stringArray[1];\r\n\t\t\r\n\t\tif(watchAlertTask.getStoreActiveState() == 2)\r\n\t\t\talertEmailBody = WatchAlertUtils.replaceKeywords(watchAlertTask.getSendAlertEmailBody(), watchAlertTask, watchAlertTaskQuery, nodes);\r\n\t\telse\r\n\t\t\talertEmailBody = WatchAlertUtils.replaceKeywords(watchAlertTask.getClearAlertEmailBody(), watchAlertTask, watchAlertTaskQuery, nodes);\r\n\t\t\r\n\t\talertEmailBody = alertEmailBody.replaceAll(\"%MESSAGE%\", alertString);\r\n\t\t\r\n Properties props = new Properties(); \r\n props.put(\"mail.transport.protocol\", \"smtp\");\r\n props.put(\"mail.smtp.host\", smtpServer); \r\n props.put(\"mail.smtp.port\", smtpPort); \r\n props.put(\"mail.smtp.auth\", \"true\"); \r\n props.put(\"mail.debug\", \"true\"); \r\n\r\n Session session = \r\n Session.getInstance(props, new javax.mail.Authenticator() { \r\n protected PasswordAuthentication getPasswordAuthentication() { \r\n return new PasswordAuthentication(watchAlertTask.getSmtpFrom(), watchAlertTask.getSmtpPassword()); \r\n } \r\n }); \r\n\r\n try {\r\n \tMimeMessage msg = new MimeMessage(session); \r\n \tInternetAddress addressFrom = new InternetAddress(watchAlertTask.getSmtpFrom()); \r\n \tmsg.setFrom(addressFrom);\r\n \t \t\r\n \tfor(String addressstr : watchAlertTask.getRecipients())\r\n \t{\r\n\t\t\t\taddressstr = WatchAlertUtils.replaceKeywords(addressstr, watchAlertTask, watchAlertTaskQuery, nodes);\r\n\t\t\t\r\n \t\tString[] addressstr2 = addressstr.split(\":\");\r\n \t\tInternetAddress internetAddress = new InternetAddress(addressstr2[1]);\r\n \t\tif(addressstr2.length > 1)\r\n \t\t{\r\n \t\t\tif(addressstr2[0].toLowerCase().equals(\"to\"))\r\n \t\t\t\tmsg.addRecipient(MimeMessage.RecipientType.TO,internetAddress);\r\n \t\t\telse if(addressstr2[0].toLowerCase().equals(\"cc\"))\r\n \t\t\t\tmsg.addRecipient(MimeMessage.RecipientType.CC, internetAddress);\r\n \t\t\telse if(addressstr2[0].toLowerCase().equals(\"bcc\"))\r\n \t\t\t\tmsg.addRecipient(MimeMessage.RecipientType.BCC, internetAddress);\r\n \t\t\telse logger.info(\"Cannot find prefix in \\'\" +addressstr+\"\\' . Should be one of the to, cc or bcc.\");\t \t\t\t\r\n \t\t}\r\n \t\telse\r\n \t\t\tlogger.info(\"Cannot parse address \\'\" +addressstr+\"\\' . Should be in format: pefix:email@domain\");\r\n \t} \r\n \t \t\r\n \t//for(int i = 0; i< msg.getAllRecipients().length; i++)\r\n \t//\tlogger.info(\"Sending email to \" + msg.getAllRecipients()[i].toString());\r\n \t\r\n \tmsg.setSubject(watchAlertTask.getSmtpSubject()); \r\n \tmsg.setText(alertEmailBody, \"utf-8\", \"html\");\r\n \ttrans = session.getTransport(\"smtp\");\r\n \ttrans.connect(smtpServer, watchAlertTask.getSmtpFrom(), watchAlertTask.getSmtpPassword());\r\n \tmsg.saveChanges();\r\n \ttrans.sendMessage(msg, msg.getAllRecipients());\r\n \ttrans.close();\r\n \tlogger.info(\"Sent EMAIL TASK: \" + watchAlertTask.getTaskNumber()+\" with Subject: \" + watchAlertTask.getSmtpSubject() +\" and with body: \" + alertEmailBody);\r\n }\r\n catch (MessagingException mex) {\r\n \tlogger.error(mex.toString());\r\n }\r\n\t}",
"SendEmail() {\t\n\t}",
"public void sendNotificaitoin(User user) throws MailException, InterruptedException {\n\n\n System.out.println(\"Sending email...\");\n\n SimpleMailMessage mail = new SimpleMailMessage();\n mail.setTo(\"mtayfurunal@gmail.com\");\n mail.setFrom(\"mentorshipobss@gmail.com\");\n mail.setSubject(\"notification\");\n mail.setText(\"time is running out\");\n javaMailSender.send(mail);\n\n System.out.println(\"Email Sent!\");\n }",
"public void execute(HashMap taskparams) {\n\t\t\n\t\tLOGGER.info(\"Starting ReminderDuplicateID Scheduled Task \");\n\t\t\n\t\tlookup= Platform.getService(tcLookupOperationsIntf.class);\n\t\t//userRepository=Platform.getService(UserRepository.class);\n\t\t//usrInfo = Platform.getService(UserInfo.class);\n\t\temailIntf = Platform.getService(tcEmailOperationsIntf.class);\n\t\tString lookupName= (String) taskparams.get(\"Lookup Name\");\n\t\tString emailTemp = (String) taskparams.get(\"Email Template\");\n\t\tLOGGER.info(\"lookupName \"+lookupName);\n\t\tLOGGER.info(\"emailTemp \"+emailTemp);\n\t\tHashMap<String,String> reminderDetMap = readLookupValues(lookup,lookupName);\n\t\tLOGGER.info(\"Lookup Map \"+reminderDetMap);\n\t\t\n\t\tif (reminderDetMap!=null && reminderDetMap.size()>0){\n\t\t\tfor (Entry<String, String> entry : reminderDetMap.entrySet()){\n\t\t\t\t//LOGGER.info(\"Inside for Loop \");\n\t\t\t\tString uid= entry.getKey();\n\t\t\t\tString decodeValue= entry.getValue();\n\t\t\t\tif (decodeValue!=null ){\n\t\t\t\t\t//LOGGER.info(\"Inside if and for \");\n\t\t\t\t\tString [] datenHrUid = decodeValue.split(\",\");\n\t\t\t\t\tString reminderDate = datenHrUid[0];\n\t\t\t\t\tString hrUID = datenHrUid[1];\n\t\t\t\t\tString attr= datenHrUid[2];\n\t\t\t\t\t//LOGGER.info(\" reminderDate\"+reminderDate+\" \"+hrUID);\n\t\t\t\t\tif (noOfDaysSinceCreation(reminderDate)==0){\n\t\t\t\t\t\tLOGGER.info(\"Now the reminder email would be sent\");\n\t\t\t\t\t\tsendNotification(uid,hrUID,emailTemp,attr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tremoveLookupValues(lookup,lookupName);\n\t\t}\n\t\t\n\t\t\n\t}",
"@Scheduled(cron = \"0 1 * * * *\")\n public void dailyTasks(){\n logger.info(\"Daily task started\");\n\n logger.info(\"Sending overdue emails\");\n List<Payment> overduePayments = new ArrayList<>();\n List<Payment> futurePayments = new ArrayList<>();\n paymentService.addPendingPayments(futurePayments, overduePayments);\n for(Payment overdue: overduePayments){\n Client client = overdue.getClient();\n if(client == null) throw new IllegalStateException(\"Payment \" + overdue.getId() + \" should have a valid client \");\n String email = client.getEmail();\n if(StringUtils.isEmpty(email)) continue;\n overdueEmailBody.replaceAll(\"\\\\$name\", client.getFirstName()).replaceAll(\"\\\\$unit\", overdue.getUnit().getName()).replaceAll(\"\\\\amount\", String.valueOf(overdue.getAmount()));\n emailSender.sendEmail(email, overdueEmailSubject, overdueEmailBody );\n }\n for(Payment payment: futurePayments){\n Client client = payment.getClient();\n if(client == null) throw new IllegalStateException(\"Payment \" + payment.getId() + \" should have a valid client \");\n String email = client.getEmail();\n if(StringUtils.isEmpty(email)) continue;\n futureEmailBody.replaceAll(\"\\\\$name\", client.getFirstName()).replaceAll(\"\\\\$unit\", payment.getUnit().getName()).replaceAll(\"\\\\amount\", String.valueOf(payment.getAmount()));\n emailSender.sendEmail(email, futureEmailSubject, futureEmailBody );\n }\n\n }",
"public void SendEmail(){\n //Dummy Email Bot\n String from = \"cz2002testacc@gmail.com\";\n String emailPW = \"thisiscz2002\";\n\n try{\n Session session = Session.getDefaultInstance(init(), new Authenticator(){\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(from, emailPW);\n }});\n\n // -- Create a new message --\n Message msg = new MimeMessage(session);\n\n // -- Set the FROM and fields --\n msg.setFrom(new InternetAddress(from));\n msg.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(getRecipientEmail(),false));\n\n LocalDateTime myDateObj = LocalDateTime.now();\n DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n String formattedDate = myDateObj.format(myFormatObj);\n\n msg.setSubject(getEmailSubject());\n msg.setText(getMessage());\n msg.setSentDate(new Date());\n Transport.send(msg);\n\n //System.out.println(formattedDate + \" - Message sent.\");\n }catch (MessagingException e){\n System.out.println(\"Error: \" + e);\n }\n }",
"void sendEmail(Job job, String email);",
"@Scheduled(cron = \"0 * * * * *\")\r\n\tpublic void run() {\r\n\r\n\t\tString[] emailArray = new String[emailRecipientList.size()];\r\n\t\temailArray = emailRecipientList.toArray(emailArray);\r\n\t\tLOGGER.debug(\"Sending a email to \" + emailArray);\r\n //Current time\r\n\t\tLocalDateTime now = LocalDateTime.now();\r\n\t\t//Current time - 1 hour\r\n\t\tLocalDateTime after = LocalDateTime.now().minusHours(1);\r\n\r\n\t\tTimestamp dateCreatedBefore = Timestamp.valueOf(now);\r\n\t\tTimestamp dateCreatedAfter = Timestamp.valueOf(after);\r\n\t\t// Search for file id's added for the last hour \r\n\t\tList<Long> ids = infoDataService.searchFileId(null, null, \r\n\t\t\t\tdateCreatedBefore, dateCreatedAfter, null, null,null);\r\n\t\t// Create a email body \r\n\t\tStringBuffer emailBody =new StringBuffer();\r\n\t\temailBody.append(\"New Files Uploaded:\");\r\n for(Long id : ids) {\r\n \ttry {\r\n \t FileInfo metaData = infoDataService.findRecordById(id);\r\n \t emailBody.append(System.lineSeparator());\r\n \t emailBody.append(\"*******************************************************\");\r\n \t emailBody.append(System.lineSeparator());\r\n \t emailBody.append(\"ID:\"+metaData.getId());\r\n \t emailBody.append(\", ORIGINAL NAME: \"+metaData.getFileName());\r\n \t Long size = metaData.getSize()/1000;\r\n \t emailBody.append(\", SIZE (KB):\"+size);\r\n \t emailBody.append((metaData.getPublicAccess())?\", PUBLIC ACCESS: true\":\" , PUBLIC ACCESS: false\");\r\n \t emailBody.append(\", TIME UPLOADED:\"+metaData.getUploadedTs().toLocalDateTime());\r\n \t emailBody.append(System.lineSeparator());\r\n \t}\r\n \tcatch(Exception e) {\r\n \t\temailBody.append(Utilities.NO_DATA_FOR_ID+id); \t\t\r\n \t}\r\n }\r\n // Sending a scheduled email \r\n SimpleMailMessage msg = new SimpleMailMessage();\r\n\t\tmsg.setTo(emailArray);\r\n\t\tmsg.setSubject(Utilities.SCHEDULER_SUBJECT);\r\n\t\tmsg.setText(emailBody.toString());\r\n\t\tmsg.setFrom(emailSender);\r\n\r\n\t\t// TODO\r\n\t\t// Uncomment the next line after adding a correct credentials to the\r\n\t\t// application.properies file\r\n\t\t// javaMailSender.send(msg);\r\n\r\n\t}",
"public void sendMail(View view) {\n\n contentManager = new ContentManager(this);\n contentManager.sendEmail(helpBinding.mail.getText().toString(), new EmailListener() {\n @Override\n public void onSuccess(EmailResponse emailResponse) {\n showToast(emailResponse.getMessage());\n }\n\n @Override\n public void onFailed(String message, int responseCode) {\n showToast(message);\n }\n\n @Override\n public void startLoading(String requestId) {\n showToast(getString(R.string.sendEmail));\n }\n\n @Override\n public void endLoading(String requestId) {\n\n }\n });\n }",
"private void sendNotificationMail(Download download, String subject, String bodyTemplate) {\n List<Address> emails = getNotificationAddresses(download);\n if (emails.isEmpty() && bccAddresses.isEmpty()) {\n LOG.warn(\"No valid notification addresses given for download {}\", download.getKey());\n return;\n }\n try {\n // Send E-Mail\n MimeMessage msg = new MimeMessage(session);\n msg.setFrom();\n msg.setRecipients(Message.RecipientType.TO, emails.toArray(new Address[emails.size()]));\n msg.setRecipients(Message.RecipientType.BCC, bccAddresses.toArray(new Address[bccAddresses.size()]));\n msg.setSubject(subject);\n msg.setSentDate(new Date());\n msg.setText(buildBody(download, bodyTemplate));\n Transport.send(msg);\n\n } catch (TemplateException | IOException e) {\n LOG.error(NOTIFY_ADMIN, \"Rendering of notification Mail for download [{}] failed\", download.getKey(), e);\n } catch (MessagingException e) {\n LOG.error(NOTIFY_ADMIN, \"Sending of notification Mail for download [{}] failed\", download.getKey(), e);\n }\n }",
"private void sendEmail() {\n\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n Log.i(TAG, \"sendEmail: \"+currentEmail);\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n String email = currentEmail.trim();\n String subject = \"Garbage Report Handeled\";\n\n String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" +\" \"+textViewDescription.getText().toString();\n\n// String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" + \" \" +time+\" \"+textViewDescription.getText().toString();\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }",
"SendEmailResponse sendEmail(String templateId, String emailAddress, Map<String, String> personalisation, String reference) throws NotificationClientException;",
"public void addTask(Task task) {\n\t\tMessage msg=new Message(null, null, task);\n\t\ttry {\n\t\t\tchannel.send(msg);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\t//Runtime exception with info for use in debugging\n\t\t\tthrow new RuntimeException(ex.getMessage());\n\t\t}\n\t}",
"public static void sendEmail(String randPass) {\n\t\t// Recipient's email ID needs to be mentioned.\n\t String to = \"kingstead1@gmail.com\";\n\n\t // Sender's email ID needs to be mentioned\n\t String from = \"kingstead1@gmail.com\";\n\n\t // Get system properties\n\t Properties properties = System.getProperties();\n\t \tproperties = System.getProperties();\n\t properties.put(\"mail.smtp.auth\", \"true\");\n\t properties.put(\"mail.smtp.starttls.enable\", \"true\");\n\t properties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t properties.put(\"mail.smtp.port\", \"587\");\n\n\t // Get the default Session object.\n\t Session session = Session.getInstance(properties, new javax.mail.Authenticator() {\n\t protected PasswordAuthentication getPasswordAuthentication() {\n\t return new PasswordAuthentication(\"user\", \"pass\");\n\t }\n\t });\n\n\t try {\n\t // Create a default MimeMessage object.\n\t MimeMessage message = new MimeMessage(session);\n\n\t // Set From: header field of the header.\n\t message.setFrom(new InternetAddress(from));\n\n\t // Set To: header field of the header.\n\t message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n\n\t // Set Subject: header field\n\t message.setSubject(\"Dart Password Reset\");\n\t // Now set the actual message\n\t message.setText(\"You're getting this message because you've requested to reset your password! Your new password is: \" + randPass + \" ! Don't forget it.\");\n\n\t // Send message\n\t Transport.send(message);\n\t System.out.println(\"Sent message successfully....\");\n\t } catch (MessagingException mex) {\n\t mex.printStackTrace();\n\t }\n\n\t}",
"private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }",
"private void sendEmail() {\n String to = \"tsutton720@gmail.com\";\n\n // Sender's email ID needs to be mentioned\n String from = \"web@gmail.com\";\n\n // Assuming you are sending email from localhost\n String host = \"localhost\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n\n // Get the default Session object.\n Session session = Session.getDefaultInstance(properties);\n\n try {\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject(\"This is the Subject Line!\");\n\n // Now set the actual message\n message.setText(\"This is actual message\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n } catch (MessagingException mex) {\n mex.printStackTrace();\n }\n }",
"public void execute(JobExecutionContext context) {\n sendSevenDaysExpiringEmails();\n sendOneDayExpiringEmails();\n sendOneDayExpiredEmails();\n }",
"public void sendEmail(\n ActionRequest actionRequest, ActionResponse actionResponse)\n throws IOException, PortletException {\n }",
"@Asynchronous\n public void sendEmail(String subject, String text, String ... recepients) {\n try {\n Message m = new MimeMessage(noReplySession);\n \n Address[] addrs = InternetAddress.parse(StringUtils.concat(recepients, \";\"), false);\n m.setRecipients(Message.RecipientType.TO, addrs);\n m.setSubject(subject);\n m.setFrom(InternetAddress.parse(\"noreply@tagscool.com\", false)[0]);\n m.setContent(text, \"text/html; charset=utf-8\");\n m.setSentDate(new Date());\n Transport.send(m);\n } catch (Exception ex) {\n log.error(\"sendEmail(): failed to send message.\", ex);\n }\n }",
"public void sendEmail(String recipient,String password);",
"protected void updateTaskEmailsManually() {\n List<Object> arguments = new ArrayList<Object>();\n String emailToReplace = \"test22@just.ee\";\n arguments.add(emailToReplace);\n List<Task> results = BeanHelper.getWorkflowDbService().searchTasksAllStores(\"(wfc_owner_email=? )\", arguments, -1).getFirst();\n Map<QName, Serializable> changedProps = new HashMap<QName, Serializable>();\n for (Task task : results) {\n changedProps.clear();\n try {\n String ownerId = task.getOwnerId();\n String newTaskOwnerEmail = BeanHelper.getUserService().getUserEmail(ownerId);\n if (StringUtils.isBlank(newTaskOwnerEmail)) {\n LOG.warn(\"The e-mail of following task was not updated because no user e-mail address was found:\\n\" + task);\n continue;\n }\n changedProps.put(WorkflowCommonModel.Props.OWNER_EMAIL, newTaskOwnerEmail);\n BeanHelper.getWorkflowDbService().updateTaskEntryIgnoringParent(task, changedProps);\n LOG.info(\"Updated task [nodeRef=\" + task.getNodeRef() + \"] e-mail manually: \" + emailToReplace + \" -> \" + newTaskOwnerEmail);\n } catch (Exception e) {\n LOG.error(e);\n continue;\n }\n }\n }",
"public void sendEmail(String receiver, Integer indexID){\r\n\t \r\n\t Properties props = new Properties();\r\n\t props.put(\"mail.smtp.host\", EMAIL_SERVER);\r\n\t props.put(\"mail.smtp.port\", SERVER_PORT);\r\n\t props.put(\"mail.smtp.starttls.enable\", \"true\");\r\n\t props.put(\"mail.smtp.auth\", \"true\");\r\n\t props.put(\"mail.smtp.socketFactory.port\", SERVER_PORT);\r\n\t props.put(\"mail.smtp.socketFactory.class\", \"javax.net.ssl.SSLSocketFactory\");\r\n\t props.put(\"mail.smtp.socketFactory.fallback\", \"false\");\r\n\t \r\n\t Session sess = Session.getInstance(props,\r\n\t\t\t new javax.mail.Authenticator() {\r\n\t\t \t\tprotected PasswordAuthentication getPasswordAuthentication() {\r\n\t\t \t\t\treturn new PasswordAuthentication(EMAIL_SENDER, PW_SENDER);\r\n\t\t \t\t}\r\n\t \t});\r\n\t \r\n\t try{ \r\n\t Message msg = new MimeMessage(sess);\r\n\t msg.setFrom(new InternetAddress(EMAIL_SENDER));\r\n\t msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(receiver));\r\n\t msg.setSubject(\"Notification regarding waitlist\");\r\n\t \r\n\t Transport.send(msg);\r\n\t System.out.println(\"Email has been send successfully!\"); \r\n\t }\r\n\t \r\n\t catch (MessagingException e){\r\n\t\t throw new RuntimeException(e);\r\n\t }\r\n\t \r\n\t \r\n\t }",
"public Boolean sendEmail(String sender, String receiver, String subject, String body) throws Exception;",
"public void sendEmail(String username, String password) throws Throwable {\r\n\t\tString emailSubject = \"Test Report on \" + new Date();\r\n\t\tString emailMsg = \"This is an automatically generated email for test run\";\r\n\t\tEmailAttachment attachment = new EmailAttachment();\r\n\t\tattachment.setPath(\"test-output/emailable-report.html\");\r\n\t\tattachment.setDisposition(EmailAttachment.ATTACHMENT);\r\n\t\tattachment.setDescription(\"Test Report\");\r\n\t\tMultiPartEmail email = new MultiPartEmail();\r\n\t\temail.setHostName(\"imap.gmail.com\");\r\n\t\temail.setSmtpPort(465);\r\n\t\temail.setAuthenticator(new DefaultAuthenticator(username, password));\r\n\t\temail.setSSLCheckServerIdentity(true);\r\n\t\temail.setSSLOnConnect(true);\r\n\t\tSystem.out.println(\"Connected to gmail..\");\r\n\t\tSystem.out.println(\"Sending mail to: \" + toEmails);\r\n\t\tSystem.out.println(\"Subject: \" + emailSubject + \"\\nEmail Body: \" + emailMsg);\r\n\t\temail.setFrom(username);\r\n\t\temail.setSubject(emailSubject);\r\n\t\temail.setMsg(emailMsg);\r\n\t\tString[] emails = toEmails.split(\",\");\r\n\t\temail.addTo(emails);\r\n\t\temail.attach(attachment);\r\n\t\temail.send();\r\n\t\tSystem.out.println(\"Email Sent..\");\r\n\t}",
"@Override\n public void sendEmail() {\n return;\n }",
"@Asynchronous\n public void sendSimpleEmail(String subject, String text, String ... recepients) {\n try {\n Message m = new MimeMessage(noReplySession);\n Address[] addrs = InternetAddress.parse(StringUtils.concat(recepients, \";\"), false);\n m.setRecipients(Message.RecipientType.TO, addrs);\n m.setSubject(subject);\n m.setFrom(InternetAddress.parse(\"noreply@tagscool.com\", false)[0]);\n m.setText(text);\n m.setSentDate(new Date());\n Transport.send(m);\n } catch (Exception ex) {\n log.error(\"sendSimpleEmail(): failed to send message.\", ex);\n }\n }",
"void notifyMessage(Task task);",
"private void sendEmail() {\n\n // Set up an intent object to send email and fill it out\n Intent emailIntent = new Intent(Intent.ACTION_SEND);\n emailIntent.setData(Uri.parse(\"mailto:\"));\n emailIntent.setType(\"text/plain\");\n\n // An array of string addresses\n String[] toAddress = new String[]{getString(R.string.email_company_contact)};\n emailIntent.putExtra(Intent.EXTRA_EMAIL, toAddress);\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.email_subject));\n emailIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.email_default_text));\n\n // Error handler, try to execute code\n try {\n // Starts a new screen to send email\n startActivity(Intent.createChooser(emailIntent, getString(R.string.email_prompt)));\n finish();\n } catch (android.content.ActivityNotFoundException ex) {\n // An error occurred trying to use the activity\n Toast.makeText(this,\n getString(R.string.error_send_email), Toast.LENGTH_SHORT).show();\n // Missing a finally that closes the activity?\n }\n }",
"public void sendMail(String to, String templateName, Object... parameters);",
"@Then(\"^Send a mail to email id \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void Send_a_mail_to_email_id(String arg1) throws Throwable {\n\t throw new PendingException();\r\n\t}",
"public void send() {\n\t\tfinal String username = \"oneplanner.sys@gmail.com\";\n\t\tfinal String password = \"Oneplanner2017*\";\n\n\t\tProperties props = new Properties();\n\t\tprops.put(\"mail.smtp.auth\", \"true\");\n\t\tprops.put(\"mail.smtp.starttls.enable\", \"true\");\n\t\tprops.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t\tprops.put(\"mail.smtp.port\", \"587\");\n\n\t\ttry {\n\t\t\tSession session = Session.getInstance(props,\n\t\t\t\t\t new javax.mail.Authenticator() {\n\t\t\t\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t\t\t\t}\n\t\t\t\t\t });\n\n\t\t\t\t\tMessage message = new MimeMessage(session);\n\t\t\t\t\tmessage.setFrom(new InternetAddress(\"oneplanner.sys@gmail.com\"));\n\t\t\t\t\tmessage.setRecipients(Message.RecipientType.TO,\n\t\t\t\t\t\tInternetAddress.parse(\"jinnonsbox@gmail.com\"));\n\t\t\tmessage.setSubject(\"test\");\n\t\t\tmessage.setText(\"test\");\n\t\t\t\n\t\t\tTransport.send(message);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n }",
"@Asynchronous //Metodo Assíncrono para que a aplicação continue normalmente sem ficar bloqueada até que o email seja enviado \r\n\tpublic void sendEmail(Email email) {\n\t log.info(\"Email enviado por \" + email.getEmailUsuario() + \" para \" + email.getReceptor() +\" : \" + email.getMensagem());\r\n\t try {\r\n\t //Criação de uma mensagem simples\r\n\t Message message = new MimeMessage(mailSession);\r\n\t //Cabeçalho do Email\r\n\t message.setFrom(new InternetAddress(email.getEmailUsuario()));\r\n\t message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(email.getReceptor())); \r\n\t message.setSubject(email.getTitulo());\r\n\t //Corpo do email\r\n\t message.setText(email.getMensagem());\r\n\r\n\t //Envio da mensagem \r\n\t Transport.send(message);\r\n\t log.debug(\"Email enviado\");\r\n\t } catch (MessagingException e) {\r\n\t log.error(\"Erro a enviar o email : \" + e.getMessage()); }\r\n\t }",
"void setReminder(int eventId, String eventEndDate, String eventType);",
"@ApiMethod(name = \"sendEmail\", path = \"sendEmail\", httpMethod = HttpMethod.POST)\npublic EmailForm sendEmail(final EmailForm emailForm)\n throws UnauthorizedException, ConflictException {\n\n\tif(emailForm.getEmailAddress() == null){\n throw new ConflictException(\"You must enter an email address\");\n }\n\tif(emailForm.getMessage() == null){\n throw new ConflictException(\"You must enter a message\");\n\t}\n\tif(emailForm.getName() == null){\n throw new ConflictException(\"You must enter a name\");\n\t}\t\n\tif(emailForm.getSubject() == null){\n throw new ConflictException(\"You must enter an email subject\");\n\t} \n\t\n\tfinal Queue queue = QueueFactory.getDefaultQueue();\n \n\n // Start transactions\n EmailForm email = ofy().transact(new Work<EmailForm>(){\n \t@Override\n \tpublic EmailForm run(){\n \n queue.add(ofy().getTransaction(),\n \t\tTaskOptions.Builder.withUrl(\"/tasks/send_email\")\n \t\t.param(\"emailAddress\", emailForm.getEmailAddress())\n \t\t.param(\"message\", emailForm.getMessage())\n \t\t.param(\"subject\", emailForm.getSubject())\n \t\t.param(\"name\", emailForm.getName()));\n return emailForm;\n \t}\n }); \n return email;\n}",
"private void sendEmail(String result){\n \t\n \tIntent emailIntent = new Intent(android.content.Intent.ACTION_SEND);\n \temailIntent.setType(\"plain/text\");\n \t\n \t//emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n \t/* Fill it with Data */\n \temailIntent.setType(\"plain/text\");\n \t//emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{\"to@email.com\"});\n \temailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Here's the code from FlipSHA\");\n \temailIntent.putExtra(android.content.Intent.EXTRA_TEXT, \"After the coin is flipped and\" +\n \t\t\t\" you don't believe in your friend, check this hash \"+ result);\n\n \t/* Send it off to the Activity-Chooser */\n \tstartActivity(emailIntent); \n }",
"private void sendEmail(String email, String password, String name) {\n \n String to = email;\n String from = \"twitproject16@yahoo.com\";\n String subject = \"New Password\";\n String body = \"Dear \" + name + \",\\n\\n\" +\n \"You recently requested a password change. Here is your new password: \\n\\n\" +\n password +\n \"\\n\\nHave a great day!\\n\\n\" +\n \"Twitter Team\\n\" +\n \"Alex Foreman & Paul Brown\";\n boolean isBodyHTML = false;\n\n try\n {\n MailUtilYahoo.sendMail(to, from, subject, body, isBodyHTML);\n }\n catch (MessagingException e)\n {\n this.log(\n \"Unable to send email. \\n\" +\n \"Here is the email you tried to send: \\n\" +\n \"=====================================\\n\" +\n \"TO: \" + email + \"\\n\" +\n \"FROM: \" + from + \"\\n\" +\n \"SUBJECT: \" + subject + \"\\n\" +\n \"\\n\" +\n body + \"\\n\\n\");\n } \n }",
"@Override\n\tpublic void sendTaskMail (char message, byte timeout) {\n\t\tif (Harness.TRACE)\n\t\t\tHarness.trace(String.format(\"[HarnessMailbox] SendTaskMail to %d, message %d, timeout %d\",\n\t\t\t\t\t\t\t\t\t\t(int)mailbox_number, (int)message, (int)timeout)); \n\t\tif (mail_count[mailbox_number] == 0) {\n\t\t\tmail_message[mailbox_number] = message;\n\t\t} else {\n\t\t\tmail_overflows++;\n\t\t}\n\t\tmail_count[mailbox_number] ++;\n\t}",
"public void sendMailAction(View view) {\n String name = getPlayerName();\n String message = createShortQuizSummary(finalScore, name);\n String mailto = \"mailto:\" + getPlayerMail() +\n \"?cc=\" + \"\" +\n \"&subject=\" + Uri.encode(name + getResources().getString(R.string.score_in_quiz)) +\n \"&body=\" + Uri.encode(message);\n\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO);\n emailIntent.setData(Uri.parse(mailto));\n\n try {\n startActivity(emailIntent);\n } catch (ActivityNotFoundException e) {\n }\n\n }",
"public void sendMail(String to, String cc, String bcc, String subject, String text);",
"void send(Email email);",
"public void sendMail(String to, String cc, String subject, String text);",
"void sendHtmlMail(String to, String subject, String content);",
"public void sendDiscrepancyEmail() throws Exception;",
"public void sendEmail(final Context context, final String title) {\n\t\tsendEmail(context, title, \"\");\n\t}",
"public interface Task {\n void send(INotificationSideChannel iNotificationSideChannel) throws RemoteException;\n }",
"public void execute(DelegateExecution execution) {\n System.out.println(\"Sending email now\");\n }",
"@Override\n\tvoid email() {\n\t\tSystem.out.println(\"email id jdfjdfh@gmail.com\");\n\t\t\n\t}",
"public static void createDailyReminderAlarm(Context context) {\n String prefWeekendDayStart = PreferenceUtils.readString(PreferenceUtils.SNOOZE_WEEKEND_DAY_START, context);\n int weekendDayStartHour = TimePreference.getHour(prefWeekendDayStart);\n int weekendDayStartMinute = TimePreference.getMinute(prefWeekendDayStart);\n\n // Create reminders intent.\n PendingIntent alarmIntent = getRemindersIntent(context, Intents.DAILY_REMINDER);\n\n // Trigger the alarm.\n triggerDailyAlarm(context, weekendDayStartHour, weekendDayStartMinute, alarmIntent);\n }",
"private void sendEmailVerification() {\n showProgressDialog();\n\n // [START send_email_verification]\n final FirebaseUser user = mAuth.getCurrentUser();\n assert user != null;\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // [START_EXCLUDE]\n // Re-enable button\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\n \"Verification email sent to \" + user.getEmail(),\n Toast.LENGTH_SHORT).show();\n } else {\n Log.e(TAG, \"sendEmailVerification\", task.getException());\n Toast.makeText(getApplicationContext(),\n \"Failed to send verification email.\",\n Toast.LENGTH_SHORT).show();\n }\n hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n // [END send_email_verification]\n }",
"private void showReminderNotification(Context context) {\n // inisialisasi channel id, channel name, judul notifikasi, pesan notifikasi, intent, dan id request\n String CHANNEL_ID = \"Channel_1\";\n String CHANNEL_NAME = \"Reminder Channel App\";\n String title = context.getString(R.string.reminder_app_title);\n String message = context.getString(R.string.reminder_app_message);\n Intent intent = new Intent(context, MainActivity.class);\n int REQUST_CODE_APP = 110;\n\n PendingIntent pendingIntent = TaskStackBuilder.create(context)\n .addNextIntent(intent)\n .getPendingIntent(REQUST_CODE_APP, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // statement ini berfungsi untuk membuat notifikasi kita dapat berkerja dengan sistem android\n NotificationManager notificationManager\n = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // mengset bunyi notifikasi, disini menggunakan bunyi default notifikasi pada sistem android\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n // method ini berfungsi untuk mengatur isi notifikasi\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID)\n .setSmallIcon(R.drawable.ic_notifications_black_24dp) // set icon kecil notifikasi\n .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), // set icon besar notifikasi\n R.drawable.baseline_notification_important_white_48dp))\n .setContentTitle(title) // set judul notifikasi\n .setContentText(message) // set pesan notifikasi\n .setContentIntent(pendingIntent) // set aksi notifikasi\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000}) // set pola getar saat notifikasi\n .setSound(alarmSound); // set bunyi notifikasi yang akan digunakan\n\n // statement ini berfungsi supaya notifikasi yang telah dibuat dapat berjalan di android\n // dengan OS Oreo ke atas\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME,\n NotificationManager.IMPORTANCE_DEFAULT);\n\n channel.enableVibration(true);\n channel.setVibrationPattern(new long[]{1000, 1000, 1000, 1000, 1000});\n\n builder.setChannelId(CHANNEL_ID);\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(channel);\n }\n }\n\n // statement ini berfungsi supaya notifikasi yang telah dibuat dapat berjalan di bawah\n // android dengan OS Oreo ke bawah\n Notification notification = builder.build();\n if (notificationManager != null) {\n notificationManager.notify(ID_APP, notification);\n }\n }",
"public void emailNotePosted(\n\t\t\tUserService userService, Note note\n\t\t);",
"public void sendTaskRepliedNotification(final Long taskId, final Long replier) {\n\t\ttaskExecutor.execute(new AsyncWebTask(notificationDao.getSessionFactory()) {\n\t\t\tpublic void runInBackground() {\n\t\t\t\tTask task = (Task) getSession().get(Task.class, taskId);\n\t\t\t\tUser source = (User) getSession().get(User.class, replier);\n\n\t\t\t\tList<User> followers = task.getFollowers();\n\t\t\t\tfor (User follower : followers) {\n\t\t\t\t\tif (!follower.equals(source)) {\n\t\t\t\t\t\tNotification notification = new Notification();\n\t\t\t\t\t\tnotification.setTask(task);\n\t\t\t\t\t\tnotification.setReceiver(follower);\n\t\t\t\t\t\tnotification.setSource(source);\n\t\t\t\t\t\tnotification.setType(NotificationType.TASK_REPLY);\n\t\t\t\t\t\tnotificationDao.saveNotification(getSession(), notification);\n\n\t\t\t\t\t\tupdateNotificationMapIfUserExists(follower.getId(), 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"void send(String emailName);",
"private void newTask()\n {\n \t//TODO add alarm\n \tTask task = new Task(taskName.getText().toString(), taskDetails.getText().toString());\n \tdb.createTask(task);\n \t//TODO Tie notification to an alarm\n \t//Create notification\n \tIntent notifyIntent = new Intent(this, TaskNotification.class);\n \tnotifyIntent.putExtra(\"title\", task.name); //add title name\n \tnotifyIntent.putExtra(\"id\", (int) task.id); //add id\n \tstartActivity(notifyIntent); //create the intent\n \t\n \trefreshData();\n }",
"public static void sendMail(String to, String msg) throws RuntimeException, AddressException, MessagingException {\r\n Properties properties = System.getProperties();\r\n properties.put(\"mail.smtp.auth\", \"true\");\r\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n properties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\r\n properties.put(\"mail.smtp.port\", \"587\");\r\n properties.put(\"mail.smtp.ssl.trust\", \"smtp.gmail.com\");\r\n// properties.setProperty(\"mail.smtp.host\", HOST);\r\n Session session = Session.getDefaultInstance(properties,\r\n new Authenticator() {\r\n @Override\r\n protected PasswordAuthentication getPasswordAuthentication() {\r\n return new PasswordAuthentication(FROM, PASSWORD);\r\n }\r\n });\r\n\r\n // Create a default MimeMessage object.\r\n MimeMessage message = new MimeMessage(session);\r\n // Set From: header field of the header.\r\n message.setFrom(new InternetAddress(FROM));\r\n // Set To: header field of the header.\r\n message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to));\r\n // Set Subject: header field\r\n message.setSubject(\"Your confirmation code from Simple Blog register\");\r\n // Send the actual HTML message, as big as you like\r\n message.setContent(\r\n \"<h1>\" + msg + \"</h1><br/>\"\r\n + \"<h5>Please input your confirmation code to the web link:</h5>\"\r\n + \"<a href=\\\"\" + CONFIRM_URL + \"\\\">Click here</a>\",\r\n \"text/html\");\r\n\r\n // Send message \r\n Transport.send(message);\r\n System.out.println(\"message sent successfully....\");\r\n\r\n }",
"public static void sendResetPassword(Context context, String email) {\n FirebaseAuth.getInstance().sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) { // Reset email password successfully sent\n Log.d(\"RecipeFinderAuth\", \"Email Sent!\");\n Toast.makeText(context, \"Email Sent!\", Toast.LENGTH_SHORT).show();\n ((AppCompatActivity)(context)).finish();\n } else { // Failed to send reset email password\n Toast.makeText(context, \"Failed to Send Email!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"public static void sendConfirmationMail(String toMail){\n String confirmationText = \"Welcome as a new user of Household Manager.\" +\n \"\\n You can log in with \"+toMail+ \" and the password you chose.\" +\n \"If you've forgotten your password you can get a new one sent from our Login page.\";\n sendMail(toMail,confirmationText);\n }",
"void sendCommonMail(String to, String subject, String content);",
"public static void sendEmail(EmailSendable e, String message){\n\t\tSystem.out.println(\"Email-a bidali da: \"+message);\r\n\t}",
"public void sendChecksumReportEmail() throws MessagingException \r\n\t{\t\r\n\t\tlog.debug(\"Send checksum checker report\");\r\n\t\tRepository repository = repositoryService.getRepository(Repository.DEFAULT_REPOSITORY_ID, false);\r\n\r\n\t\tif( repository != null )\r\n\t {\r\n\t\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormat);\r\n\t\t StringBuffer emailText = new StringBuffer();\r\n\t\t String reportDateStr = simpleDateFormat.format(new Date());\r\n\t\t\r\n\t\t emailText.append(\"Checksum report for \" + repository.getName() + \" as of \" + reportDateStr + \"\\n\\n\");\r\n\t\t emailText.append(\"There are: \" + fileInfoChecksumService.getChecksumInfoFailsCount() + \" checksum failures in the repository \\n\");\r\n\t\t emailText.append(\"Use this link to review the checksums \" + baseWebAppPath + \"admin/viewFileInfoChecksums.action \\n\");\r\n\t\t\r\n\t\t MimeMessage message = mailSender.createMimeMessage();\r\n\t\t MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(message, false, \"UTF-8\");\r\n\t\t String subject = \"Checksum report for \" + repository.getName() + \" as of: \" + reportDateStr;\r\n\t\t mimeMessageHelper.setSubject(subject);\r\n\t\t mimeMessageHelper.setFrom(fromAddress);\r\n\t\t mimeMessageHelper.setTo(email);\r\n\t\t mimeMessageHelper.setText(emailText.toString());\r\n\t\t mailSender.send(message);\r\n\t }\r\n\t\telse\r\n\t\t{\r\n\t\t\tlog.debug(\"No repository found\");\r\n\t\t}\r\n\t}",
"public void sendEmail(){\r\n EmailService emailSvc = new EmailService(email, username, password, firstName, lastName);\r\n Thread th = new Thread(emailSvc);\r\n LOG.info(\"Starting a new thread to send the email..\");\r\n th.start();\r\n LOG.info(\"The email was sent successfully\");\r\n }",
"private void sendEmail(String emailAddress, String subject, String body) {\n\t\t\n\t}",
"public void mailPromo(String fname, String customerEmail, String promo, double discount){\n\t Properties props = makeProps();\r\n\t \r\n\t final String username = \"cinema4050@gmail.com\";\r\n\t final String password = \"movie4050\";\r\n\t \r\n\t try{\r\n\t Session session = Session.getDefaultInstance(props, \r\n\t new Authenticator(){\r\n\t protected PasswordAuthentication getPasswordAuthentication() {\r\n\t return new PasswordAuthentication(username,password);}});\r\n\t // -- Create a new message --\r\n\t Message msg = new MimeMessage(session);\r\n\t \r\n\t /* from */\r\n\t msg.setFrom(new InternetAddress(username));\r\n\t \r\n\t /* to */\r\n\t msg.setRecipients(Message.RecipientType.TO, \r\n\t InternetAddress.parse(customerEmail,false));\r\n\t /* title */\r\n\t msg.setSubject(\"New Promotion!\");\r\n\t \r\n\t /* text field */ \r\n\t String sendThis = \"Hello \"+fname + \"!\\n\\n\"\r\n\t + \"We are emailing you to inform you that there is a new promotion.\\n\"\r\n\t + \"Use code -- \"+promo+\" -- to save $\" + discount + \"0 on your next purchase on CINEMA4050!\\n\"\r\n\t + \"Thank you for using our service!\\n\";\r\n\t msg.setText(sendThis);\r\n\t msg.setSentDate(new Date());\r\n\t Transport.send(msg);\r\n\t \r\n\t System.out.println(\"Message sent.\");\r\n\t }catch (MessagingException e){ \r\n\t System.out.println(\"Error: \" + e);\r\n\t }\r\n\t \r\n\t }",
"public static Result sendNotification(Long storyId) {\n\r\n\t\tmodels.Story story = models.Story.findById(storyId);\r\n\t\tif (story == null) {\r\n\t\t\treturn badRequest(\"Invalid story id\");\r\n\t\t}\r\n\r\n\t\tMailerAPI mail = play.Play.application().plugin(MailerPlugin.class).email();\r\n\t\t//mail.setSubject(\"Story Publication Notification: storyId: \" + story.getId() + \"from \" + user.getFullName() + \"<\" + user.getEmail() + \">\");\r\n\t\tmail.setSubject(\"Story Publication Notification: storyId: \" + story.getId() );\r\n\t\tmail.setRecipient( \"Lir Publisher\" , \"jose.neves.rodrigues@gmail.com\");\r\n\t\tmail.setFrom(\"Lost in Reality Service\");\r\n\t\t//adds attachment\r\n\t\t//mail.addAttachment(\"attachment.pdf\", new File(\"/some/path/attachment.pdf\"));\r\n\t\t//adds inline attachment from byte array\r\n\t\t//byte[] data = \"data\".getBytes();\r\n\t\t//mail.addAttachment(\"data.txt\", data, \"text/plain\", \"A simple file\", EmailAttachment.INLINE);\r\n\t\t//sends html\r\n\t\t//mail.sendHtml(\"<html>html</html>\" );\r\n\t\t//sends text/text\r\n\t\t//mail.send( \"Story Publication Notification: storyId: \" + storyId + \"from \" + user.getFullName() + \"<\" + user.getEmail() + \">\" );\r\n\t\t//sends both text and html\r\n\t\t//mail.send( \"text\", \"<html>html</html>\");\r\n\r\n\t\tSystem.out.println(\"email sent\");\r\n\r\n\t\treturn ok();\r\n\t}",
"public void testRecurringTask()\n throws Exception {\n checkNumPersistedTasks(0);\n \n // Schedule a recurring task\n TestTask task = new TestTask();\n task.setIntervalMillis(200);\n Mailbox mbox = TestUtil.getMailbox(USER_NAME);\n task.setMailboxId(mbox.getId());\n ScheduledTaskManager.schedule(task);\n \n // Make sure the task is persisted\n checkNumPersistedTasks(1);\n Thread.sleep(1000);\n \n // Cancel the task and make sure it's removed from the database\n ScheduledTaskManager.cancel(TestTask.class.getName(), TASK_NAME, mbox.getId(), false);\n Thread.sleep(200);\n int numCalls = task.getNumCalls();\n assertTrue(\"Unexpected number of task runs: \" + numCalls, numCalls > 0);\n checkNumPersistedTasks(0);\n \n // Sleep some more and make sure the task doesn't run again\n Thread.sleep(400);\n assertEquals(\"Task still ran after being cancelled\", numCalls, task.getNumCalls());\n }",
"private void sendEmailVerification() {\n final FirebaseUser user = mAuth.getCurrentUser();\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // [START_EXCLUDE]\n // Re-enable button\n\n if (task.isSuccessful()) {\n Toast.makeText(LoginCombActivity.this,\n \"Verification email sent to \" + user.getEmail(),\n Toast.LENGTH_SHORT).show();\n } else {\n Log.e(TAG, \"sendEmailVerification\", task.getException());\n Toast.makeText(LoginCombActivity.this,\n \"Failed to send verification email.\",\n Toast.LENGTH_SHORT).show();\n }\n // [END_EXCLUDE]\n }\n });\n // [END send_email_verification]\n }",
"public void setReminderApp(Context context) {\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, DailyReminderApp.class);\n\n // setting waktu, kapan notifikasi akan di keluarkan\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, 7); // waktu yang di set adalah pukul 7 pagi\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n\n // pending intent ini akan menjalankan fungsi onReceive\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, ID_APP, intent, 0);\n if (alarmManager != null) {\n // statement ini berfungsi untuk mengatur jeda waktu notifikasi muncul\n // jeda waktu yang digunakan adalah sehari\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY, pendingIntent);\n }\n\n\n }",
"void sendEmail(Otp otp) throws Exception {\n String text = \"Otp: \" + otp.getOtpValue();\n String from = \"\"; // Add From Email Address\n String to = \"\"; // Add To Email Address\n\n SimpleMailMessage message = new SimpleMailMessage();\n message.setFrom(from);\n message.setTo(to);\n message.setSubject(\"Otp Verification\");\n message.setText(text);\n emailSender.send(message);\n }",
"public void sendMail(RegistrationData d) {}",
"@Override\n\tvoid email() {\n\t\tSystem.out.println(\"sai@gmail.com\");\n\t\t\n\t}",
"@PostMapping(\"/sendMail\")\n\t@Timed\n\t@ResponseStatus(HttpStatus.CREATED)\n\tpublic void sentMail(@RequestBody String orderId) {\n\t\tSystem.out.println(\"Email send for Id \" + orderId);\n\t\tTransaction transaction = transactionRepository.findOneByOrderid(orderId);\n\t\tContext context = new Context();\n\t\tcontext.setVariable(\"order\", transaction.getOrderid());\n\t\tcontext.setVariable(\"email\", transaction.getEmail());\n\t\tcontext.setVariable(\"hash\", \"https://\" + CAN_NETWORK + \"etherscan.io/tx/\" + transaction.getHash());\n\t\tcontext.setVariable(\"can\", \"https://\" + CAN_NETWORK + \"etherscan.io/tx/\" + transaction.getHashethertoaccount());\n\t\tcontext.setVariable(\"amount\", transaction.getAmount() + \" CAN\");\n\t\tcontext.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl());\n\t\tString content = templateEngine.process(\"mail/transactionConfirm\", context);\n\t\tsendEmail(transaction.getEmail(), \"Transaction Successful\", content, false, true);\n\t\tlog.debug(\"Called sendMail\");\n\t}",
"@Override\n\tpublic boolean sendEmail() {\n\t\treturn true;\n\t}",
"public interface MailService\n{\n\t/**\n\t * Creates a new message suitable to be filled in, then queued for sending.\n\t * @return A new message.\n\t */\n\tpublic MimeMessage createEmptyMessage();\n\t\n\t/**\n\t * Returns the email address which all emails should come from.\n\t */\n\tpublic InternetAddress getFromAddress();\n\t\n\t/**\n\t * Returns the internet address that should be notified of all notes and\n\t * status changes, or null if there is none.\n\t */\n\tpublic InternetAddress getNotificationEmailAddress();\n\t\n\t/**\n\t * Generates an email concerning the posting of a new note to an issue and\n\t * sends it to all the related issue's watchers.\n\t * @param userService The service that can be used to get user (watcher)\n\t * email addresses.\n\t * @param note The note being reported on.\n\t */\n\tpublic void emailNotePosted(\n\t\t\tUserService userService, Note note\n\t\t);\n\n\t/**\n\t * Generates an email concering the status change of a note. The email is\n\t * sent to all the issue's watchers.\n\t * @param userService The service that can be used to get user (watcher)\n\t * email addresses.\n\t * @param issue The issue being reported on.\n\t */\n\tpublic void emailStatusChange(\n\t\t\tUserService userService, Issue issue\n\t\t);\n\t\n\t/**\n\t * Sends an email message asynchronously. This method does not block.\n\t * @param message The email message to send.\n\t */\n\tpublic void queueMessage(Message message);\n}",
"public void sendInterest(View view) {\n Log.i(\"Send email\", \"\");\n String[] TO = {agentEmail};\n String[] CC = {\"\"};\n Intent emailIntent = new Intent(Intent.ACTION_SEND);\n\n emailIntent.setData(Uri.parse(\"mailto:\"));\n emailIntent.setType(\"text/plain\");\n emailIntent.putExtra(Intent.EXTRA_EMAIL, TO);\n emailIntent.putExtra(Intent.EXTRA_CC, CC);\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, \"You have an interested buyer for \" + globals.chosenProp);\n emailIntent.putExtra(Intent.EXTRA_TEXT, \"User: \" + globals.loggedUser + \" has shown interest in \" + globals.chosenProp + \". Respond to them via email to arrange a showing or to exchange information.\");\n\n try {\n startActivity(Intent.createChooser(emailIntent, \"Send mail...\"));\n finish();\n Log.i(\"Finished sending email...\", \"\");\n } catch (android.content.ActivityNotFoundException ex) {\n Toast.makeText(property_view_standard.this, \"There is no email client installed.\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void sendMailMessage(MailMessage mailMessage) throws MailerException;",
"public void editEmailNotification(ActionRequest actionRequest,ActionResponse actionResponse) throws SystemException\n\t{\n\t\tString enableEmailNotification = ParamUtil.getString(actionRequest, \"enableEmailNotification\");\n\t\tString firstNotificationSubject = ParamUtil.getString(actionRequest, \"firstNotificationSubject\");\n\t\tString firstNotificationBody = ParamUtil.getString(actionRequest, \"firstNotificationTemplate\");\n\t\t\n\t\t\n\t\tString secondNotificationSubject = ParamUtil.getString(actionRequest, \"secondNotificationSubject\");\n\t\tString secondNotificationBody = ParamUtil.getString(actionRequest, \"secondNotificationTemplate\");\n\t\t\n\t\tString fromAddress = ParamUtil.getString(actionRequest, \"fromAddress\");\n\t\tString fromName = ParamUtil.getString(actionRequest, \"fromName\");\n\t\t\n\t\tString firstReminderDay = ParamUtil.getString(actionRequest, \"firstReminderDay\");\n\t\tString firstReminderSendContinuous = ParamUtil.getString(actionRequest, \"firstReminderSendContinuous\");\n\t\tString secondReminderSendContinuous = ParamUtil.getString(actionRequest, \"secondReminderSendContinuous\");\n\t\tString secondReminderDay = ParamUtil.getString(actionRequest, \"secondReminderDay\");\n\t\tString firstReminderDayUntil = ParamUtil.getString(actionRequest, \"firstReminderDayUntil\");\n\t\tString secondReminderDayUntil = ParamUtil.getString(actionRequest, \"secondReminderDayUntil\");\n\t\t\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.KEY_CONFIG_EMAIL_FIRST_NOTIFICATION_SUBJECT, firstNotificationSubject);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.KEY_CONFIG_EMAIL_FIRST_NOTIFICATION_BODY, firstNotificationBody);\n\t\t\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.KEY_CONFIG_EMAIL_SECOND_NOTIFICATION_SUBJECT, secondNotificationSubject);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.KEY_CONFIG_EMAIL_SECOND_NOTIFICATION_BODY, secondNotificationBody);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.KEY_CONFIG_EMAIL_FROM_ADDRESS, fromAddress);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.KEY_CONFIG_EMAIL_FROM_NAME, fromName);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.KEY_CONFIG_REMINDER_1ST_SEND_CONTINUOUSLY, firstReminderSendContinuous);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.KEY_CONFIG_REMINDER_2ND_SEND_CONTINUOUSLY, secondReminderSendContinuous);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.KEY_CONFIG_ENABLE_EMAIL_NOTIFICATION, enableEmailNotification);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.CONFIG_REMINDER_DAY_1ST, firstReminderDay);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.CONFIG_REMINDER_DAY_1ST_UNTIL, firstReminderDayUntil);\n\t\t\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.CONFIG_REMINDER_DAY_2ND, secondReminderDay);\n\t\tConfigLocalServiceUtil.addByStringValue(EisUtil.CONFIG_REMINDER_DAY_2ND_UNTIL, secondReminderDayUntil);\n\n\n\t\n\t\t//Tester.testNotification();\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic void sendEmails() {\n\t\tSystem.out.println(\"All e-mails sent from e-mail service!\");\r\n\t}",
"public void sendMail(String to, String cc, String bcc, String templateName, Object... parameters);",
"@Override\n public void sendEmail(String emailBody) {\n }",
"public void resendVerificationEmail(View view) {\n current_user.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Verification email has been resent to \" +\n current_user.getEmail() + \". Please check your inbox/spam folder.\",\n Toast.LENGTH_LONG);\n\n // Centering the text\n LinearLayout toastLayout = (LinearLayout) toast.getView();\n if (toastLayout.getChildCount() > 0) {\n TextView textView = (TextView) toastLayout.getChildAt(0);\n textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);\n }\n\n toast.show();\n }\n }\n });\n }",
"public void send(EmailMessage email) {\r\n emailActorRef.tell(email, emailActorRef);\r\n }",
"private void sendEmail(){\n String teachersEmail = tvTeachersEmail.getText().toString();\n String[] receiver = new String[1];\n receiver[0] = teachersEmail;\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.putExtra(Intent.EXTRA_EMAIL, receiver);\n\n // opening only email clients - force sending with email\n intent.setType(\"message/rfc822\");\n startActivity(Intent.createChooser(intent, getString(R.string.open_email_clients)));\n }",
"public void sendMail(String address, String content) {\n }",
"public void setReminder(Context context, String type, String time, String message){\n AlarmManager alarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);\n Intent intent = new Intent(context, ReminderReceiver.class);\n intent.putExtra(EXTRA_MESSAGE,message);\n intent.putExtra(EXTRA_TYPE,type);\n String timeArray[] = time.split(\":\");\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY,Integer.parseInt(timeArray[0]));\n calendar.set(Calendar.MINUTE,Integer.parseInt(timeArray[1]));\n calendar.set(Calendar.SECOND,0);\n\n int requestCode = NOTIF_ID_REMINDER;\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context,requestCode,intent,0);\n alarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);\n\n Toast.makeText(context,\"Reminder berhasil disimpan\",Toast.LENGTH_SHORT).show();\n }",
"public void tradeEmail(Trade model, Activity view) {\n String subject = \"SSCTE Trade Completed\" ;\n String body = model.getOwner().getName() + \" has accepted a trade with \" + model.getBorrower().getName() + \".\\n\" +\n \"+=================================+\\n\" +\n \" \" + model.getOwner().getName() + \"'s cards traded:\\n\";\n for (Card card : model.getOwnerList()) {\n body = body + \" [\" + card.getQuantity() + \"] \" + card.getName() + \"\\n\";\n }\n body = body +\n \"+=====================+\\n\" +\n \" \" + model.getBorrower().getName() + \"'s cards traded:\\n\";\n for (Card card : model.getBorrowList()) {\n body = body + \" [\" + card.getQuantity() + \"] \" + card.getName() + \"\\n\";\n }\n body = body +\n \"+=================================+\\n\\n\" +\n \" [Add some comments for continuing trade here]\";\n\n\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(\n \"mailto\",model.getOwner().getEmail() + \",\"+model.getBorrower().getEmail(), null));\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n emailIntent.putExtra(Intent.EXTRA_TEXT, body);\n view.startActivity(Intent.createChooser(emailIntent, \"Send email...\"));\n }",
"public String sendEmail(final IEmailMessage message, final String... emails) throws ServiceException\n\t{\n\n\t\tif(! settingsService.isConnected(EMAIL))\n\t\t{\n\t\t\tthrow new IntegrationException(\"SMTP server connection is refused.\");\n\t\t}\n\n\t\tfinal String text = freemarkerUtil.getFreeMarkerTemplateContent(message.getTemplate(), message);\n\t\tfinal String [] recipients = processRecipients(emails);\n\n\t\tif(recipients.length > 0)\n\t\t{\n\t\t\tMimeMessagePreparator preparator = new MimeMessagePreparator()\n\t\t\t{\n\t\t\t\tpublic void prepare(MimeMessage mimeMessage) throws Exception\n\t\t\t\t{\n\t\t\t\t\tboolean hasAttachments = message.getAttachments() != null;\n\n\t\t\t\t\tMimeMessageHelper msg = new MimeMessageHelper(mimeMessage, hasAttachments);\n\t\t\t\t\tmsg.setSubject(message.getSubject());\n\t\t\t\t\tmsg.setTo(recipients);\n\t\t\t\t\tif(! StringUtils.isBlank(emailTask.getFromAddress())) {\n\t\t\t\t\t\tmsg.setFrom(emailTask.getFromAddress(), emailTask.getJavaMailSenderImpl().getUsername());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsg.setFrom(emailTask.getJavaMailSenderImpl().getUsername());\n\t\t\t\t\t}\n\t\t\t\t\tmsg.setText(text, true);\n\t\t\t\t\tif(hasAttachments)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(Attachment attachment : message.getAttachments())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmsg.addAttachment(attachment.getName() + \".\" + FilenameUtils.getExtension(attachment.getFile().getName()), attachment.getFile());\n\t\t\t\t\t\t\tmsg.addInline(attachment.getName().replaceAll(\" \", \"_\"), attachment.getFile());\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\temailTask.setPreparator(preparator);\n\t\t\tRunnable task = emailTask;\n\t\t\tautowireizer.autowireBean(task);\n\t\t\tExecutors.newSingleThreadExecutor().execute(task);\n\t\t}\n\t\treturn text;\n\t}",
"public void sendMail() {\n String sub;\n String message;\n\n sub = \"Welcome\";\n message = \"Thank you for choosing us as your healthcare partners. Here we strive hard to ensure that\\n\"\n + \"you remain in good health. Not only we boast of an exellent team of doctors but also world class operational \\n\"\n + \"infrastructure in place. For any other information or details contact our reg desk. You can access\\n\"\n + \"your account with the Username:\" + txtUserName.getText()+ \"and your password:\" + txtPassword.getPassword().toString()+ \".\\n\\t\\t\\t -Team MVP\";\n\n SendEmail SE = new SendEmail(txtEmail.getText(), sub, message);\n }",
"private void sendNotification() {\n int mNotificationId = 001;\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_action_camera)\n .setContentTitle(\"Daily Selfie\")\n .setContentText(\"Time for another selfie\");\n Intent resultIntent = new Intent(this, MainActivity.class);\n PendingIntent resultPendingIntent =\n PendingIntent.getActivity(\n this,\n 0,\n resultIntent,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n mBuilder.setContentIntent(resultPendingIntent);\n // Gets an instance of the NotificationManager service\n NotificationManager mNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n // Builds the notification and issues it.\n mNotifyMgr.notify(mNotificationId, mBuilder.build());\n }",
"void sendScheduledNotifications(JobProgress progress);",
"public void appendToReminders(Date reminders);",
"public void sendMail(String to, String cc, String templateName, Object... parameters);",
"@ResponseBody\n @RequestMapping(\"/sendSimpleEmail\")\n public String sendSimpleEmail() {\n SimpleMailMessage message = new SimpleMailMessage();\n\n message.setTo(MyConstants.FRIEND_EMAIL);\n message.setSubject(\"Test Simple Email\");\n message.setText(\"Hello, Im testing Simple Email\");\n\n // Send Message!\n this.emailSender.send(message);\n\n return \"Email Sent!\";\n }",
"public int sendShipperOrderNotificationEmail(int customerID, int orderId, int confirmationNumber, Collection<OrderedProduct> orderedProducts, BigDecimal orderAmount, Date orderDate) {\r\n // SMTP Setting\r\n String smtpServer = \"smtp.gmail.com\";\r\n\r\n //Email Addresses\r\n String from = \"chizzymeka@gmail.com\";\r\n String shipperEmail = null;\r\n \r\n // Look for the activated shipper and obtain thier email aaddress\r\n List<Shipper> shipperList = shipperFacade.findAll();\r\n for(Shipper shipper : shipperList){\r\n boolean shipperActivated = shipper.getShipperActivated();\r\n \r\n if(shipperActivated){\r\n shipperEmail = shipper.getShipperEmail().trim();\r\n }\r\n }\r\n \r\n String to = shipperEmail;\r\n String bcc = \"chizzymeka@yahoo.co.uk\";\r\n\r\n //Message\r\n String subject = \"New Order for Collection: \" + orderId + \"|\" + \"Confirmation Number: \" + confirmationNumber;\r\n String message = \"Please liaise with the listed suppliers below to collect the orders for the subject customers.\";\r\n String productDetailsAndAssociatedSupplierDetails = null;\r\n\r\n for (OrderedProduct op : orderedProducts) {\r\n String productName = op.getProduct().getProductName();\r\n int productQuantity = op.getOrderedProductQuantity();\r\n String supplierName = op.getProduct().getSupplierID().getSupplierCompanyName();\r\n String supplierPhone = op.getProduct().getSupplierID().getSupplierPhone();\r\n String supplierEmail = op.getProduct().getSupplierID().getSupplierEmail();\r\n productDetailsAndAssociatedSupplierDetails += \"<tr><td>\" + productName + \"</td><td>\" + productQuantity + \"</td><td>\" + supplierName + \"</td><td>\" + supplierPhone + \"</td><td>\" + supplierEmail + \"</td></tr>\";\r\n }\r\n\r\n String messageBody\r\n = \"<table>\"\r\n + \"<tr><td colspan=5>\" + message + \"</td></tr>\"\r\n + \"<tr><td colspan=5>Order Number:</td><td>\" + orderId + \"</td></tr>\"\r\n + \"<tr><td colspan=5>Confirmation Number:</td><td>\" + confirmationNumber + \"</td></tr>\"\r\n + \"<tr><td colspan=5>Amount:</td><td>\" + orderAmount + \"</td></tr>\"\r\n + \"<tr><td colspan=5>Order Date:</td><td>\" + orderDate + \"</td></tr>\"\r\n + \"<tr><td>Product Name</td><td>Quantity</td><td>Suplier Name</td><td>Supplier Phone</td><td>Supplier Email</td></tr>\"\r\n + productDetailsAndAssociatedSupplierDetails\r\n + \"</table>\";\r\n\r\n try {\r\n Properties properties = System.getProperties();\r\n properties.put(\"mail.transport.protocol\", \"smtp\");\r\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n properties.put(\"mail.smtp.host\", smtpServer);\r\n properties.put(\"mail.smtp.auth\", \"true\");\r\n Authenticator authenticator = new SMTPAuthenticator();\r\n Session session = Session.getInstance(properties, authenticator);\r\n\r\n // Create a new messageBody\r\n Message mimeMessage = new MimeMessage(session);\r\n\r\n // Set the FROM and TO fields\r\n mimeMessage.setFrom(new InternetAddress(from));\r\n mimeMessage.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));\r\n mimeMessage.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(bcc, false)); // Change this to be hard-coded Peripherals email\r\n mimeMessage.setSubject(subject);\r\n mimeMessage.setContent(messageBody, \"text/html; charset=utf-8\");\r\n\r\n // Set some other header information\r\n mimeMessage.setHeader(\"Order Confirmation\", \"Peripherals\");\r\n mimeMessage.setSentDate(new Date());\r\n\r\n // Send the messageBody\r\n Transport.send(mimeMessage);\r\n System.out.println(\"Message sent successfully!\");\r\n return 0;\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n System.out.println(\"Exception \" + ex);\r\n return -1;\r\n }\r\n }",
"public void sendMessage() throws DLException{\n // adjust mail properties\n Properties properties = System.getProperties();\n properties.put(\"mail.smtp.port\", \"587\");\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\n properties.put(\"mail.smtp.auth\", \"true\");\n properties.setProperty(\"mail.smtp.host\", host);\n Session session = Session.getInstance(properties,\n new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(sender, senderPassword);\n }\n });\n \n try { \n // MimeMessage object. \n MimeMessage message = new MimeMessage(session); \n \n // Set From Field: adding senders email to from field. \n message.setFrom(new InternetAddress(sender)); \n \n // Set To Field: adding recipient's email to from field. \n message.addRecipient(Message.RecipientType.TO, new InternetAddress(recipient)); \n \n // Set Subject: subject of the email \n message.setSubject(\"Reset Password Request\"); \n \n // set body of the email. \n message.setText(\"Here is your temporary password: \" + password + \"\\nIt will expire in 5 minutes.\"); \n \n // Send email. \n Transport.send(message); \n System.out.println(\"Mail successfully sent\");\n \n } catch (MessagingException mex) { \n new DLException(mex);\n System.out.println(\"Something went wrong in sending an email\");\n } \n }",
"public static void sendAlarmEmail(EmailParameters emailParameters) {\r\n\t\tsendEmail(emailParameters, \"Alarm detected movement at your house!\", \"Alarm detected movement at your house!\");\r\n\t}"
] | [
"0.60378903",
"0.5970768",
"0.5908244",
"0.5745436",
"0.5689414",
"0.5651435",
"0.56494474",
"0.56328756",
"0.5604484",
"0.55913526",
"0.5576399",
"0.5561909",
"0.5550311",
"0.55389524",
"0.5509625",
"0.5502776",
"0.54958224",
"0.54931414",
"0.5488427",
"0.547047",
"0.5411637",
"0.53893864",
"0.53459245",
"0.5335706",
"0.53305894",
"0.5330072",
"0.53025573",
"0.53005064",
"0.5299072",
"0.52962416",
"0.5280647",
"0.5275713",
"0.52516574",
"0.52410495",
"0.52291924",
"0.5224545",
"0.52168363",
"0.5214939",
"0.5194152",
"0.5157446",
"0.5155362",
"0.51492095",
"0.5139912",
"0.5117068",
"0.5113665",
"0.5107149",
"0.5099794",
"0.5084806",
"0.5063393",
"0.5063249",
"0.50617325",
"0.5060152",
"0.5059653",
"0.5054241",
"0.50506145",
"0.50492066",
"0.50474006",
"0.50399673",
"0.5030934",
"0.5029114",
"0.50251466",
"0.5025005",
"0.5024531",
"0.50176984",
"0.5015055",
"0.50039816",
"0.49943092",
"0.4991353",
"0.4978286",
"0.4974653",
"0.4969731",
"0.49652073",
"0.496072",
"0.49587",
"0.4957453",
"0.49569637",
"0.49567574",
"0.49565166",
"0.4955167",
"0.4944504",
"0.49238962",
"0.49231982",
"0.4919415",
"0.49117082",
"0.4906117",
"0.4885785",
"0.48791903",
"0.48755816",
"0.48708433",
"0.48663998",
"0.4856519",
"0.48540118",
"0.48527572",
"0.4851978",
"0.48477915",
"0.4847162",
"0.48466018",
"0.48428363",
"0.483979",
"0.48366535"
] | 0.72645867 | 0 |
The backend contract for sending Marquez instrumentation. Information operations can be sent synchronously or asynchronously over various protocols | public interface Backend extends Closeable {
void put(String path, String json);
default void post(String path) {
post(path, null);
}
void post(String path, @Nullable String json);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.544 -0500\", hash_original_method = \"42BD69B2114459AD691B3AEBDAE73546\", hash_generated_method = \"C285A4D23EAB85D82915D70E1F66F84C\")\n \npublic Message sendMessageSynchronously(int what) {\n Message msg = Message.obtain();\n msg.what = what;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }",
"public interface Transport {\n\n /**\n * This method returns id of the current transport\n * @return\n */\n String id();\n\n /**\n * This methos returns Id of the upstream node\n * @return\n */\n String getUpstreamId();\n\n /**\n * This method returns random\n *\n * @param id\n * @param exclude\n * @return\n */\n String getRandomDownstreamFrom(String id, String exclude);\n\n /**\n * This method returns consumer that accepts messages for delivery\n * @return\n */\n Consumer<VoidMessage> outgoingConsumer();\n\n /**\n * This method returns flow of messages for parameter server\n * @return\n */\n Publisher<INDArrayMessage> incomingPublisher();\n\n /**\n * This method starts this Transport instance\n */\n void launch();\n\n /**\n * This method will start this Transport instance\n */\n void launchAsMaster();\n\n /**\n * This method shuts down this Transport instance\n */\n void shutdown();\n\n /**\n * This method will send message to the network, using tree structure\n * @param message\n */\n void propagateMessage(VoidMessage message, PropagationMode mode) throws IOException;\n\n /**\n * This method will send message to the node specified by Id\n *\n * @param message\n * @param id\n */\n void sendMessage(VoidMessage message, String id);\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id) throws InterruptedException;\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id, long waitTime, TimeUnit timeUnit) throws InterruptedException;\n\n /**\n * This method will be invoked for all incoming messages\n * PLEASE NOTE: this method is mostly suited for tests\n *\n * @param message\n */\n void processMessage(VoidMessage message);\n\n\n /**\n * This method allows to set callback instance, which will be called upon restart event\n * @param callback\n */\n void setRestartCallback(RestartCallback callback);\n\n /**\n * This methd allows to set callback instance for various\n * @param cls\n * @param callback\n * @param <T1> RequestMessage class\n * @param <T2> ResponseMessage class\n */\n <T extends RequestMessage> void addRequestConsumer(Class<T> cls, Consumer<T> consumer);\n\n /**\n * This method will be called if mesh update was received\n *\n * PLEASE NOTE: This method will be called ONLY if new mesh differs from current one\n * @param mesh\n */\n void onMeshUpdate(MeshOrganizer mesh);\n\n /**\n * This method will be called upon remap request\n * @param id\n */\n void onRemap(String id);\n\n /**\n * This method returns total number of nodes known to this Transport\n * @return\n */\n int totalNumberOfNodes();\n\n\n /**\n * This method returns ID of the root node\n * @return\n */\n String getRootId();\n\n /**\n * This method checks if all connections required for work are established\n * @return true\n */\n boolean isConnected();\n\n /**\n * This method checks if this node was properly introduced to driver\n * @return\n */\n boolean isIntroduced();\n\n /**\n * This method checks connection to the given node ID, and if it's not connected - establishes connection\n * @param id\n */\n void ensureConnection(String id);\n}",
"@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.552 -0500\", hash_original_method = \"35A5E39A8A1820326BDEA32FA9EDD100\", hash_generated_method = \"CE016FA9F8D335C8879BF83223FA7CD6\")\n \npublic Message sendMessageSynchronously(int what, Object obj) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.obj = obj;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }",
"@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.548 -0500\", hash_original_method = \"AFDADB0B0E37C71FB8D4BE31CA39F990\", hash_generated_method = \"B6827FF2C6A650BBE4692173D7372E8C\")\n \npublic Message sendMessageSynchronously(int what, int arg1, int arg2) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n msg.arg2 = arg2;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }",
"@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.546 -0500\", hash_original_method = \"69DA3E1B323882B9D4B744C6E35751A3\", hash_generated_method = \"60004DC4003AFFE42822995754840E35\")\n \npublic Message sendMessageSynchronously(int what, int arg1) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }",
"public interface QxService {\n String transmission(String data, String appId, String sign);\n}",
"public interface Telemetry {}",
"RequestSender onInform(Consumer<Message> consumer);",
"@DSSink({DSSinkKind.SYNCHRONIZATION_DATA})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.550 -0500\", hash_original_method = \"EEAA69B320108852E46A6304535CC9F5\", hash_generated_method = \"D642B9F06D082255CC2F6570E4A84B40\")\n \npublic Message sendMessageSynchronously(int what, int arg1, int arg2, Object obj) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n msg.arg2 = arg2;\n msg.obj = obj;\n Message resultMsg = sendMessageSynchronously(msg);\n return resultMsg;\n }",
"public interface HttpTxnHandle\n{\n\n void respond(String data);\n\n void reject(int status, String reason);\n\n String path();\n\n default void reject(int code)\n {\n reject(code, \"Unknown\");\n }\n\n String host();\n\n void send(FullHttpResponse res);\n\n String cookie(String name);\n\n String method();\n\n String uri();\n\n Map<String, List<String>> query();\n\n InputStream input();\n\n Map<String, List<String>> headers();\n\n Runnable schedule(Duration timeout, Runnable callback);\n\n}",
"private void sendRegistrationIdToBackend() {\n // Your implementation here.\n }",
"private void sendTelemetry(HttpRecordable recordable) {\n }",
"public interface IRequestHeartBeatBiz {\n interface OnRequestListener{\n void success(List<UserInformationBean> userInformation);\n void failed();\n }\n void requestData(String uuid, OnRequestListener requestListener);\n}",
"public interface AsynchChannelsGateway {\n\n public Message<String> send(Message<String> message);\n\n}",
"public FutureResult sendToServer(String onTheWireFormat) throws IOException;",
"public interface TransactionThread\n{\n\t/**\n\t * Enqueues a packet to be sent.\n\t * \n\t * @param packet Packet to send\n\t */\n\tpublic void send(Packet packet);\n\t\n\t/**\n\t * Enqueues a new packet to be sent.\n\t * \n\t * @param opcode Opcode to assign to the new packet\n\t */\n\tpublic void send(Opcode opcode);\n\n\t/**\n\t * Enqueues a new packet to be sent.\n\t * \n\t * @param opcode Opcode to assign to the new packet\n\t * @param datum A serializable object to attach to the packet\n\t */\n\tpublic void send(Opcode opcode, Serializable datum);\n}",
"public interface IBugReportRpcAsync {\r\n\r\n /**\r\n * Submit a bug report.\r\n * @param bugReport Bug report to submit\r\n * @param callback Callback to be invoked after method call completes\r\n */\r\n void submitBugReport(BugReport bugReport, AsyncCallback<Void> callback);\r\n\r\n}",
"private void send() {\n vertx.eventBus().publish(GeneratorConfigVerticle.ADDRESS, toJson());\n }",
"public interface RMASubmitCaller {\n\t/*\n\t * Command define from Order Confirmation API Guide JSON and XML format\n\t */\n\t@Headers({ \"Accept: application/json\", \"Content-Type: application/json\" })\n\t@RequestLine(\"POST /servicemgmt/rma/newrma?sellerid={sellerid}&version={version}\")\n\tSubmitRMAResponse sendRMASubmitRequestJSON(@Param(\"sellerid\") String sellerID, @Param(\"version\") String version,\n\t\t\tSubmitRMARequest body);\n\n\t@Headers({ \"Accept: application/xml\", \"Content-Type: application/xml\" })\n\t@RequestLine(\"POST /servicemgmt/rma/newrma?sellerid={sellerid}&version={version}\")\n\tSubmitRMAResponse sendRMASubmitRequestXML(@Param(\"sellerid\") String sellerID, @Param(\"version\") String version,\n\t\t\tSubmitRMARequest body);\n\n\t// Implement default method of interface class that according to\n\t// Variables.MediaType to run at JSON or XML request.\n\tdefault SubmitRMAResponse sendRMASubmitRequest(SubmitRMARequest body, String version) {\n\t\tswitch (Variables.MediaType) {\n\t\tcase JSON:\n\t\t\tif (Variables.SimulationEnabled)\n\t\t\t\treturn sendRMASubmitRequestJSON(Content.SellerID, \"307\", body);\n\t\t\telse\n\t\t\t\treturn sendRMASubmitRequestJSON(Content.SellerID, version, body);\n\n\t\tcase XML:\n\t\t\tif (Variables.SimulationEnabled)\n\t\t\t\treturn sendRMASubmitRequestXML(Content.SellerID, \"307\", body);\n\t\t\telse\n\t\t\t\treturn sendRMASubmitRequestXML(Content.SellerID, version, body);\n\n\t\tdefault:\n\t\t\tthrow new RuntimeException(\"Never Happened!\");\n\t\t}\n\n\t}\n\n\tstatic RMASubmitCaller buildJSON() {\n\t\tVariables.MediaType = MEDIA_TYPE.JSON;\n\n\t\treturn new CallerFactory<RMASubmitCaller>().jsonBuild(RMASubmitCaller.class, Variables.LogLevel,\n\t\t\t\tVariables.Retryer, RMAClient.genClient());\n\t}\n\n\tstatic RMASubmitCaller buildXML() {\n\t\tVariables.MediaType = MEDIA_TYPE.XML;\n\n\t\treturn new CallerFactory<RMASubmitCaller>().xmlBuild(RMASubmitCaller.class, Variables.LogLevel,\n\t\t\t\tVariables.Retryer, RMAClient.genClient());\n\t}\n\n}",
"@ThriftService(\"ThriftTaskService\")\npublic interface ThriftTaskClient\n{\n @ThriftMethod\n ListenableFuture<ThriftBufferResult> getResults(TaskId taskId, OutputBufferId bufferId, long token, long maxSizeInBytes);\n\n @ThriftMethod\n ListenableFuture<Void> acknowledgeResults(TaskId taskId, OutputBufferId bufferId, long token);\n\n @ThriftMethod\n ListenableFuture<Void> abortResults(TaskId taskId, OutputBufferId bufferId);\n}",
"@SuppressWarnings(\"unchecked\")\n\t\tpublic void run() {\n long throughputMeasurementStartTime = System.currentTimeMillis();\n\n byte[] reply;\n int reqId;\n int req = 0;\n\n Storage st = new Storage(nTXs);\n\n System.out.println(\"Executing experiment for \" + nTXs + \" ops\");\n\n for (int i = 0; i < nTXs; i++, req++) {\n long last_send_instant = System.nanoTime();\n if (dos) {\n reqId = proxy.generateRequestId((readOnly) ? TOMMessageType.UNORDERED_REQUEST : TOMMessageType.ORDERED_REQUEST); \n proxy.TOMulticast(request, reqId, (readOnly) ? TOMMessageType.UNORDERED_REQUEST : TOMMessageType.ORDERED_REQUEST); \n\n } else {\n \tif(readOnly) {\n \t\treply = proxy.invokeUnordered(request);\n \t} else {\n \t\treply = proxy.invokeOrdered(request);\n \t}\n }\n st.store(System.nanoTime() - last_send_instant);\n\n if (timeout > 0) {\n //sleeps timeout ms before sending next request\n try {\n\t\t\t\t\t\tThread.sleep(timeout);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n } \n\n } \n writeReportJSON(throughputMeasurementStartTime, st); \n }",
"public interface AsynService {\n void asynMethod();\n}",
"public interface INetworkHandler<T> extends Runnable {\n\n /**\n * The main method which starts the protocol implementation.\n * <p>\n * {@inheritDoc}\n */\n void run();\n\n /**\n * Sends the request of the network handler to all online peers of the node.\n *\n * @throws ConnectionFailedException If the other online clients can not be determined\n */\n void sendRequest(IRequest request)\n throws ConnectionFailedException;\n\n /**\n * Blocks until all notified clients have responded\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await()\n throws InterruptedException;\n\n /**\n * Blocks for the given timeout.\n *\n * @param timeout The timeout to wait\n * @param timeUnit The time unit which qualifies the timeout\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await(long timeout, TimeUnit timeUnit)\n throws InterruptedException;\n\n /**\n * Returns true once all notified clients have responded.\n *\n * @return True, if all notified clients have responded, false otherwise.\n */\n boolean isCompleted();\n\n /**\n * Returns the progress until this handler's communication\n * is considered complete (See {@link INetworkHandler#isCompleted()}).\n *\n * Returns values between 100 and 0 (inclusive).\n *\n * @return The progress\n */\n int getProgress();\n\n\n /**\n * Returns the final result of the exchange.\n * Note, that the result may be null before all clients have responded.\n *\n * @return The result once the all necessary clients responded. May be null before all clients have responded\n */\n T getResult();\n}",
"public interface HTTPContract {\n void getRequirementList(AnnounceDataSource.GetRequirementListCallback callback);\n void getFeelingList(AnnounceDataSource.GetFeelingListCallback callback);\n void postFeelingCommend();\n void postFeelingComment();\n// void postRequirementBook();\n// void postRequirementComment();\n\n}",
"public interface TransportAdapterClient {\r\n \r\n /**\r\n * Initializes instance. Configuration parameters are specific\r\n * to Transport Adapter implementation.\r\n * @param configuration\r\n */\r\n public void init(Map<String, String> configuration);\r\n \r\n /**\r\n * Submits batch to server side.\r\n * @param batch\r\n */\r\n public void submit(Batch batch);\r\n \r\n /**\r\n * Submits batch to server side applying operation filter if specified\r\n * i.e. only those batch units will be submitted which have operation\r\n * equal to provided operation filter.\r\n * \r\n * @param batch\r\n * @param opFilter\r\n */\r\n public void submit(Batch batch, BatchOperation opFilter); \r\n\r\n /**\r\n * Tests specified store alive.\r\n * @param storeName\r\n * @return\r\n */\r\n public boolean isAlive(String storeName);\r\n \r\n \r\n /**\r\n * Returns stream on content specified by content Id from store\r\n * specified by store Name.\r\n * \r\n * FIXME Providing OutputStream here implies that CSPCache must be capable\r\n * to provide either File as a future content placeholder or a OutputStream itself\r\n * \r\n * @param storeName\r\n * @param contentId\r\n * @param target is output stream to which content should be written\r\n */\r\n public void get(String storeName, Long jcrContentId, OutputStream target);\r\n \r\n \r\n}",
"void sendTransactionToServer()\n \t{\n \t\t//json + sql magic\n \t}",
"public abstract byte[] instrumentMethod();",
"public interface Communicator {\n void sendPositionAndJson(int position , String json);\n}",
"public interface Callback {\n\n /**\n * A callback method the user should implement. This method will be called when the send to the server has\n * completed.\n * @param send The results of the call. This send is guaranteed to be completed so none of its methods will block.\n */\n public void onCompletion(RecordSend send);\n}",
"public interface ClearcutLoggerApi\n{\n\n public abstract PendingResult logEventAsync(Context context, LogEventParcelable logeventparcelable);\n}",
"GasData receiveGasData();",
"@Override\n public void run() {\n byte[] deviceTxPayload = CoreServices.getOrCreateHardwareWalletService().get().getContext().getSerializedTx().toByteArray();\n\n log.info(\"DeviceTx payload:\\n{}\", Utils.HEX.encode(deviceTxPayload));\n\n // Load deviceTx\n Transaction deviceTx = new Transaction(MainNetParams.get(), deviceTxPayload);\n\n log.info(\"deviceTx:\\n{}\", deviceTx.toString());\n\n // Check the signatures are canonical\n for (TransactionInput txInput : deviceTx.getInputs()) {\n byte[] signature = txInput.getScriptSig().getChunks().get(0).data;\n if (signature != null) {\n log.debug(\n \"Is signature canonical test result '{}' for txInput '{}', signature '{}'\",\n TransactionSignature.isEncodingCanonical(signature),\n txInput.toString(),\n Utils.HEX.encode(signature));\n } else {\n log.warn(\"No signature data\");\n }\n }\n\n log.debug(\"Committing and broadcasting the last tx\");\n\n BitcoinNetworkService bitcoinNetworkService = CoreServices.getOrCreateBitcoinNetworkService();\n\n if (bitcoinNetworkService.getLastSendRequestSummaryOptional().isPresent()\n && bitcoinNetworkService.getLastWalletOptional().isPresent()) {\n\n SendRequestSummary sendRequestSummary = bitcoinNetworkService.getLastSendRequestSummaryOptional().get();\n\n // Check the unsigned and signed tx are essentially the same as a check against malware attacks on the Trezor\n if (TransactionUtils.checkEssentiallyEqual(sendRequestSummary.getSendRequest().get().tx, deviceTx)) {\n // Substitute the signed tx from the trezor\n log.debug(\n \"Substituting the Trezor signed tx '{}' for the unsigned version {}\",\n deviceTx.toString(),\n sendRequestSummary.getSendRequest().get().tx.toString()\n );\n sendRequestSummary.getSendRequest().get().tx = deviceTx;\n log.debug(\"The transaction fee was {}\", sendRequestSummary.getSendRequest().get().fee);\n\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_TRANSACTION_CREATED_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n\n // Get the last wallet\n Wallet wallet = bitcoinNetworkService.getLastWalletOptional().get();\n\n // Commit and broadcast\n bitcoinNetworkService.commitAndBroadcast(sendRequestSummary, wallet, paymentRequestData);\n\n // Ensure the header is switched off whilst the send is in progress\n ViewEvents.fireViewChangedEvent(ViewKey.HEADER, false);\n } else {\n // The signed transaction is essentially different from what was sent to it - abort send\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_FAILURE_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n }\n } else {\n log.debug(\"Cannot commit and broadcast the last send as it is not present in bitcoinNetworkService\");\n }\n // Clear the previous remembered tx\n bitcoinNetworkService.setLastSendRequestSummaryOptional(Optional.<SendRequestSummary>absent());\n bitcoinNetworkService.setLastWalletOptional(Optional.<Wallet>absent());\n }",
"@Override\n public void callSync() {\n\n }",
"@Override\n\tpublic void run() {\n\t\tRequestBody body = RequestBody.create(this.jsonType, this.contents);\n\t\tRequest request = new Request.Builder()\n\t\t\t.url(this.serverURL)\n\t\t\t.post(body)\n\t\t\t.build();\n\t\t\n\t\ttry {\n\t\t\tResponse response = client.newCall(request).execute();\n\t\t\tString str = response.body().string();\n\t\t\t//logger.log(Level.INFO, \n\t\t\t//\t\tString.format(\"DEBUG postCallInfoToServerTask succeed: %s\", str));\n\t\t} catch (IOException e) {\n\t\t\tNetProphetLogger.logError(\"PostCallInfoTask.run\", e.toString());\n\t\t}\n\t}",
"public interface OnSendTotSpent {\n void ReceiveTotSpent(double totSpent);\n }",
"public interface MessageSender {\n boolean handle(Context context, MessageResponse response);\n}",
"public interface Communicator {\n\n\n public void sendData(String string);\n public void sendNIDcardObject(NIDCard nidCard);\n public void startWelcomeFragment();\n public void stopWelcomeFragment();\n public void startStepOne();\n}",
"public interface RpcClient {\r\n\r\n\t/**\r\n\t * Initializes this RpcClient\r\n\t */\r\n\tpublic void initialize();\r\n\t\r\n\t/**\r\n\t * Sends the specified object and waits for a response message (or) the specified timeout to occur. Keeps the connection open for further \r\n\t * send requests. Note that clients of this RPCClient must call {@link RPCClient#closeConnections()} when done using this RPCClient.\r\n\t * This method performs to-and-from conversion of the specified object to a raw byte array when publishing it to the queue / consuming off it. \r\n\t * @param message the message to be sent\r\n\t * @param timeout the timeout duration in milliseconds\r\n\t * @return response Object from the RPC message call\r\n\t * @throws MessagingTimeoutException in case the specified timeout occurs\r\n\t * @throws MessagingException in case of errors in message publishing\r\n\t */\r\n\tpublic Object send(Object message, int timeout) throws MessagingTimeoutException, MessagingException;\r\n\r\n\t/**\r\n\t * Sends the specified String and waits for a response message (or) the specified timeout to occur. Keeps the connection open for further \r\n\t * send requests. Note that clients of this RPCClient must call {@link RPCClient#closeConnections()} when done using this RPCClient.\r\n\t * This method performs to-and-from conversion of the specified object to UTF-8 encoded byte array when publishing it to the queue / consuming off it. \r\n\t * @param message the String message to be sent\r\n\t * @param timeout the timeout duration in milliseconds\r\n\t * @return response String from the RPC message call\r\n\t * @throws MessagingTimeoutException in case the specified timeout occurs\r\n\t * @throws MessagingException in case of errors in message publishing\r\n\t */\r\n\tpublic String sendString(String message , int timeout) throws MessagingTimeoutException, MessagingException;\r\n\t\r\n\t/**\r\n\t * Closes connection related objects used by this RpcClient.\r\n\t * @throws MessagingException in case of errors closing connections to the underlying messaging system.\r\n\t */\r\n\tpublic void closeConnections() throws MessagingException;\r\n\t\r\n}",
"public interface IAutonomousRunner {\n <T> void runSingleAutonomousTx(\n RequestContext ctx,\n int expectedTotal, // expected total number of records (Collections.size())\n Iterable<T> iterable, // provider of loop variables\n Function<T, RequestParameters> requestProvider, // converts a loop variable to a request\n Consumer<StatisticsDTO> logEnhancer, // optional (may be null): enhances the statistics output (set info1...)\n String processId // processId of the statistics log\n );\n}",
"public interface IPayloadDatabaseLayer extends IThreadedLayer {\n //\n // Callbacks\n //\n\n /**\n * Called when an enqueue completes.\n */\n public interface EnqueueCallback {\n /**\n * Called when an enqueue finishes.\n *\n * @param success Whether the enqueue was successful.\n * @param rowCount The new database size\n */\n void onEnqueue(boolean success, long rowCount);\n }\n\n /**\n * Callback for when a database payload query returns\n *\n * @author ivolo\n */\n public interface PayloadCallback {\n void onPayload(long minId, long maxId, List<BasePayload> payloads);\n }\n\n /**\n * Callback for when payloads are removed from the database\n *\n * @author ivolo\n */\n public interface RemoveCallback {\n void onRemoved(int removed);\n }\n\n //\n // Methods\n //\n\n /**\n * Adds a payload to the database\n */\n void enqueue(BasePayload payload, EnqueueCallback callback);\n\n /**\n * Gets the next payloads from the database\n */\n void nextPayload(PayloadCallback callback);\n\n /**\n * Removes payloads from the database\n */\n void removePayloads(final long minId, long maxId, RemoveCallback callback);\n}",
"public interface MsgSenderInterface {\n\n public boolean sendMsgToMQ(String jsonStr);\n\n}",
"@VertxGen\n@ProxyGen\npublic interface IOrderHandler {\n\n String ORDER_SERVICE_ADDRESS = \"order_service_address\";\n\n @Fluent\n IOrderHandler insertOrder(long orderId, long userId, String price, String freight, long shippingInformationId, String leaveMessage, JsonArray orderDetails, Handler<AsyncResult<Integer>> handler);\n\n @Fluent\n IOrderHandler findPageOrder(long userId, Integer status, int size, int offset, Handler<AsyncResult<List<JsonObject>>> handler);\n\n @Fluent\n IOrderHandler findOrderRowNum(long userId, Integer status, Handler<AsyncResult<JsonObject>> handler);\n\n @Fluent\n IOrderHandler preparedInsertOrder(JsonArray params, Handler<AsyncResult<String>> handler);\n\n @Fluent\n IOrderHandler findPreparedOrder(String id, Handler<AsyncResult<JsonObject>> handler);\n\n @Fluent\n IOrderHandler getOrderById(long orderId, long userId, Handler<AsyncResult<JsonObject>> handler);\n\n @Fluent\n IOrderHandler payOrder(long orderId, int versions, Handler<AsyncResult<Integer>> handler);\n\n @Fluent\n IOrderHandler refund(long orderId, long userId, int refundType, String refundReason, String refundMoney, String refundDescription, Handler<AsyncResult<UpdateResult>> handler);\n\n @Fluent\n IOrderHandler undoRefund(long orderId, long userId, Handler<AsyncResult<UpdateResult>> handler);\n}",
"public static interface ApplicationManagerBlockingClient {\n\n /**\n * <pre>\n * Applications should first be registered to the Handler with the `RegisterApplication` method\n * </pre>\n */\n public com.google.protobuf.Empty registerApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * GetApplication returns the application with the given identifier (app_id)\n * </pre>\n */\n public org.thethingsnetwork.management.proto.HandlerOuterClass.Application getApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * SetApplication updates the settings for the application. All fields must be supplied.\n * </pre>\n */\n public com.google.protobuf.Empty setApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.Application request);\n\n /**\n * <pre>\n * DeleteApplication deletes the application with the given identifier (app_id)\n * </pre>\n */\n public com.google.protobuf.Empty deleteApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * GetDevice returns the device with the given identifier (app_id and dev_id)\n * </pre>\n */\n public org.thethingsnetwork.management.proto.HandlerOuterClass.Device getDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);\n\n /**\n * <pre>\n * SetDevice creates or updates a device. All fields must be supplied.\n * </pre>\n */\n public com.google.protobuf.Empty setDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.Device request);\n\n /**\n * <pre>\n * DeleteDevice deletes the device with the given identifier (app_id and dev_id)\n * </pre>\n */\n public com.google.protobuf.Empty deleteDevice(org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceIdentifier request);\n\n /**\n * <pre>\n * GetDevicesForApplication returns all devices that belong to the application with the given identifier (app_id)\n * </pre>\n */\n public org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList getDevicesForApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);\n\n /**\n * <pre>\n * DryUplink simulates processing a downlink message and returns the result\n * </pre>\n */\n public org.thethingsnetwork.management.proto.HandlerOuterClass.DryDownlinkResult dryDownlink(org.thethingsnetwork.management.proto.HandlerOuterClass.DryDownlinkMessage request);\n\n /**\n * <pre>\n * DryUplink simulates processing an uplink message and returns the result\n * </pre>\n */\n public org.thethingsnetwork.management.proto.HandlerOuterClass.DryUplinkResult dryUplink(org.thethingsnetwork.management.proto.HandlerOuterClass.DryUplinkMessage request);\n\n /**\n * <pre>\n * SimulateUplink simulates an uplink message\n * </pre>\n */\n public com.google.protobuf.Empty simulateUplink(org.thethingsnetwork.management.proto.HandlerOuterClass.SimulatedUplinkMessage request);\n }",
"public interface ApiCommand extends Serializable {\n public void execute(GiftApiClient apiClient);\n}",
"public interface IShotRequest {\n\n /**\n * start request\n */\n void notifyStart();\n\n /**\n * notify on finish success\n *\n * @param response\n */\n void notifySuccess(final List<ShotBO> response);\n\n /**\n * notify error\n *\n * @param errorResponse\n */\n void notifyFailure(final ErrorResponse errorResponse);\n}",
"public interface AsyncConnection {\n \n /**\n * Return <tt>true</tt> is the current connection associated with \n * this event has been suspended.\n */\n public boolean isSuspended();\n \n \n /**\n * Suspend the current connection. Suspended connection are parked and\n * eventually used when the Grizzlet Container initiates pushes.\n */\n public void suspend() throws AlreadyPausedException;\n \n \n /**\n * Resume a suspended connection. The response will be completed and the \n * connection become synchronous (e.g. a normal http connection).\n */\n public void resume() throws NotYetPausedException;\n \n \n /**\n * Advises the Grizzlet Container to start intiating a push operation, using \n * the argument <code>message</code>. All asynchronous connection that has \n * been suspended will have a chance to push the data back to their \n * associated clients.\n *\n * @param message The data that will be pushed.\n */\n public void push(String message) throws IOException;\n \n \n /**\n * Return the GrizzletRequest associated with this AsynchConnection. \n */\n public GrizzletRequest getRequest();\n \n \n /**\n * Return the GrizzletResponse associated with this AsynchConnection. \n */\n public GrizzletResponse getResponse();\n \n \n /**\n * Is this AsyncConnection being in the process of being resumed?\n */\n public boolean isResuming();\n \n \n /**\n * Is this AsyncConnection has push events ready to push back data to \n * its associated client.\n */\n public boolean hasPushEvent();\n \n \n /**\n * Return the <code>message</code> that can be pushed back.\n */\n public String getPushEvent();\n \n \n /**\n * Is the current asynchronous connection defined as an HTTP Get.\n */\n public boolean isGet();\n \n \n /**\n * Is the current asynchronous connection defined as an HTTP Get. \n */\n public boolean isPost();\n \n \n /**\n * Return the number of suspended connections associated with the current\n * {@link Grizzlet}\n */\n public int getSuspendedCount();\n \n \n}",
"public interface GeneralService {\n\n /**\n * Returns general server data\n */\n Request getGeneralData(AsyncCallback<GeneralData> callback);\n\n}",
"public interface ISmartFlyper {\n <T> T send(WrapperMethod method);\n}",
"Map<String, Object> send();",
"public interface ISeedProveiderRpcService {\n Long getTask( Map<String, Object> mapQuery) throws BizCheckedException;\n void createTask( Map<String, Object> mapQuery) throws BizCheckedException;\n List<String> getOrderList(String barcode) throws BizCheckedException;\n List<Map> getStoreList(Map<String, Object> mapQuery) throws BizCheckedException;\n}",
"public static void testIBMMQSendData(){\n\n MQParam param = new MQParam();\n param.setHost(\"10.86.92.194\");\n param.setPort(30099);\n param.setCcsid(1208);\n param.setChannel(\"SVRCONN_GW_OUT\");\n param.setQueueManager(\"ESB_OUT\");\n param.setQueueName(\"EIS.QUEUE.REQUEST.OUT.GCDCHZWMES\");\n param.setUserId(\"mqm\");\n param.setPassword(\"mqm\");\n new Thread(new IBMReceiverThread(param)).run();\n }",
"public void run() throws Exception {\n JsonObject jsonConfig = new JsonObject()\n .put(\"database.url\", \"jdbc:hsqldb:file:target/hsqldb;shutdown=true\");\n\n // Set up Vertx and database access\n Vertx vertx = Vertx.vertx();\n Config config = ConfigFrom.firstOf().custom(jsonConfig::getString).get();\n Builder dbb = DatabaseProviderVertx.pooledBuilder(vertx, config)\n .withSqlInExceptionMessages()\n .withSqlParameterLogging();\n\n // Set up a table with some data we can query later\n dbb.transact(db -> {\n db.get().dropTableQuietly(\"t\");\n new Schema().addTable(\"t\")\n .addColumn(\"pk\").primaryKey().table()\n .addColumn(\"message\").asString(80).schema().execute(db);\n\n db.get().toInsert(\"insert into t (pk,message) values (?,?)\")\n .argInteger(1).argString(\"Hello World!\").batch()\n .argInteger(2).argString(\"Goodbye!\").insertBatch();\n });\n\n // Start our server\n vertx.createHttpServer().requestHandler(request -> {\n Metric metric = new Metric(true);\n\n // Read the query parameter from the request\n String pkParam = request.getParam(\"pk\");\n if (pkParam == null) {\n // Probably a favicon or similar request we ignore for now\n request.response().setStatusCode(404).end();\n return;\n }\n int pk = Integer.parseInt(pkParam);\n\n // Lookup the message from the database\n dbb.transactAsync(db -> {\n // Note this part happens on a worker thread\n metric.checkpoint(\"worker\");\n String s = db.get().toSelect(\"select message from t where pk=?\").argInteger(pk).queryStringOrEmpty();\n metric.checkpoint(\"db\");\n return s;\n }, result -> {\n // Now we are back on the event loop thread\n metric.checkpoint(\"result\");\n request.response().bodyEndHandler(h -> {\n metric.done(\"sent\", request.response().bytesWritten());\n log.debug(\"Served request: \" + metric.getMessage());\n });\n if (result.succeeded()) {\n request.response().setStatusCode(200).putHeader(\"content-type\", \"text/plain\").end(result.result());\n } else {\n log.error(\"Returning 500 to client\", result.cause());\n request.response().setStatusCode(500).end();\n }\n });\n }).listen(8123, result ->\n log.info(\"Started server. Go to http://localhost:8123/?pk=1 or http://localhost:8123/?pk=2\")\n );\n\n // Attempt to do a clean shutdown on JVM exit\n Runtime.getRuntime().addShutdownHook(new Thread(() -> {\n log.debug(\"Trying to stop the server nicely\");\n try {\n synchronized (lock) {\n // First shutdown Vert.x\n vertx.close(h -> {\n log.debug(\"Vert.x stopped, now closing the connection pool\");\n synchronized (lock) {\n // Then shutdown the database pool\n dbb.close();\n log.debug(\"Server stopped\");\n lock.notify();\n }\n });\n lock.wait(30000);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }));\n }",
"public interface IUMSender {\n void start();\n void send(Context context, UMDB umdb);\n}",
"public interface IPostExecutedGetAmountTask {\n void onPostExecutedGetAmountTask(String amount);\n}",
"public interface ZigBeeRpcApi {\n\n /**\n * Executes console command.\n * @param command the console command\n * @return the command output\n */\n String execute(final String command);\n\n /**\n * Sends ZigBee Cluster Library command without waiting for response.\n *\n * @param command the command\n * @return transaction ID\n * @throws ZigBeeException if exception occurs in sending\n */\n int send(final Command command) throws ZigBeeException;\n\n /**\n * Start receiving commands by creating receive queue.\n *\n * @return the receive queue ID\n */\n String addReceiveQueue();\n\n /**\n * Stops receiving by removing receive queue.\n *\n * @param receiveQueueId the receive queue ID\n */\n void removeReceiveQueue(final String receiveQueueId);\n\n /**\n * Receives ZigBee Cluster Library commands.\n *\n * @return list of commands received.\n * @throws ZigBeeException if exception occurs in receiving\n */\n List<Command> receive(final String receiveQueueId) throws ZigBeeException;\n\n /**\n * Sets device label.\n * @param networkAddress the network address\n * @param endPointId the end point ID\n * @param label the label\n */\n void setDeviceLabel(int networkAddress, int endPointId, String label);\n\n /**\n * Removes device(s) by network address.\n * @param networkAddress the network address\n */\n void removeDevice(int networkAddress);\n\n /**\n * Gets ZigBee devices.\n * @return list of ZigBee devices\n */\n List<ZigBeeDevice> getDevices();\n\n /**\n * Sets group label.\n * @param groupId the group ID\n * @param label the label\n */\n void addGroup(int groupId, String label);\n\n /**\n * Removes group label.\n * @param groupId the group ID\n */\n void removeGroup(int groupId);\n\n /**\n * Gets group by network address.\n * @param groupId the group ID\n * @return the ZigBee group or null if no exists with given group ID.\n */\n ZigBeeGroup getGroup(int groupId);\n\n /**\n * Gets all groups.\n * @return list of groups.\n */\n List<ZigBeeGroup> getGroups();\n\n}",
"@Override\n\tpublic void processRequest(RequestEvent requestEvent) {\n\t\t requestEvent.getServerTransaction();\n\t\tSystem.out.println(\"Sending ------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"[]:\"+requestEvent.toString());\n\t}",
"public interface OnAdHocReceivedData {\n void onReceivedData(JSONObject experimentFlags);\n}",
"public interface IMarketObserver {\n\n //To be defined in which format MarketAgent publishes stockprice\n /**\n * This method is called when information about an IMarket\n * which was previously requested using an asynchronous\n * interface becomes available.\n */\n public void onStockpriceChanged();\n\n /**\n * This method is called when information about an IMarket\n * which was previously requested using an asynchronous\n * interface becomes available.\n *\n * @param transactionEntry the transaction entry\n */\n public void onTransactionAdded(TransactionEntry transactionEntry);\n \n /**\n * This method is called when information about an IMarket\n * which was previously requested using an asynchronous\n * interface becomes available.\n *\n * @param orderEntry the order entry\n */\n public void onOrderAdded(OrderEntry orderEntry);\n \n /**\n * This method is called when information about an IMarket\n * which was previously requested using an asynchronous\n * interface becomes available.\n *\n * @param shareEntry the share entry\n */\n public void onShareAdded(ShareEntry shareEntry);\n}",
"@Override\n public void run() {\n BeginTransactionMethodCall beginTransactionMethodCall = (BeginTransactionMethodCall) methodCall;\n long transactionTimeout = beginTransactionMethodCall.getTransactionTimeout();\n SpaceTransactionHolder spaceTransactionHolder = new SpaceTransactionHolder();\n spaceTransactionHolder.setSynchronizedWithTransaction( true );\n spaceTransactionHolder.setTimeoutInMillis( transactionTimeout );\n TransactionModificationContext mc = new TransactionModificationContext();\n mc.setProxyMode( true );\n spaceTransactionHolder.setModificationContext( mc );\n modificationContextFor( nodeRaised ).put( mc.getTransactionId(), spaceTransactionHolder );\n methodCall.setResponseBody( objectBuffer.writeObjectData( mc.getTransactionId() ) );\n }",
"private void sendUpdateConnectionInfo() {\n\n }",
"public void send() {\n\t}",
"public interface IPlainRequest extends Serializable\r\n{\r\n\t/**\r\n\t * Returns the id of the request\r\n\t * \r\n\t * @return the id of the request\r\n\t */\r\n\tLong getId();\r\n\r\n\t/**\r\n\t * Returns the status of the request\r\n\t * \r\n\t * @return the status of the request\r\n\t */\r\n\tRequestStatus getStatus();\r\n\r\n\t/**\r\n\t * Returns information about the sender of the request\r\n\t * \r\n\t * @return information about the sender of the request\r\n\t */\r\n\tINotificationTraveller getSender();\r\n}",
"public void doCall(){\n CalculatorPayload operation = newContent();\n\n ((PBFTClient)getProtocol()).syncCall(operation);\n }",
"public interface NettyProxyService {\n /**\n * 心跳\n *\n * @param msg\n * @throws Exception\n */\n void processHeartbeatMsg(HeartbeatMsg msg) throws Exception;\n\n /**\n * 上传位置\n *\n * @param msg\n * @throws Exception\n */\n void processLocationMsg(LocationMsg msg) throws Exception;\n\n /**\n * 离线\n *\n * @param deviceNumber\n */\n void processInactive(String deviceNumber);\n}",
"public interface ToNetworkProcessor {\n\n /**\n * Send message.\n *\n * @param message the message\n */\n void sendMessage(String message);\n}",
"public interface WithHoldOrderContract {\r\n\r\n ResponseData resendWithholdOrder();\r\n \r\n}",
"interface DmaRequestMaster extends DmaRequest\n{\n\tpublic void dmaMaster(CPU cpu) throws SIMException;\n}",
"@Override\n\tpublic void execute(Tuple arg0) {\n\t\tdeviceId = arg0.getStringByField(\"deviceid\");\n\t\tjsondata = arg0.getStringByField(\"jsondata\");\n\t\tvalid = arg0.getBooleanByField(\"valid\");\n\n\n// full amqp uri TODO: set amqp uri or Hostname\n\n\n\nJsonObject message = new JsonObject().put(\"body\", jsondata);\nif(valid) {\n\n//publish message to broker...TODO:change the queue name\n\n\tclient.basicPublish(\"\", \"validQ\", message, null);\n\n}\nelse{\n\n\t//TODO:publish it to user.notification\n\tclient.basicPublish(\"\", \"user.notification\", message, null);\n\n}\n\n\n\n\n\t\t// AerospikeClient client = new AerospikeClient(\"localhost\", 3000);\n\t\t// org.json.JSONObject jsonObject=new org.json.JSONObject(jsondata);\n\t\t// // jsonObject.put(\"valid\",valid);\n\t\t// // jsonObject.put(\"checked\",checked);\n\t\t// String jsonString=jsonObject.toString();\n\t\t// Key validationKey = new Key(\"test\", \"demo1\", jsonObject.get(\"id\").toString() + \"-\" + jsonObject.get(\"timestamp\") +\"-Validated\");\n\t\t// Bin bodyBin=new Bin(\"body\",jsonString);\n\t\t// client.put(null,validationKey,bodyBin);\n\t\t//\n\t\t// client.close();\n\t}",
"public interface Sendable {\n\n}",
"public interface ITransportHandler {\n\n /**\n * Processing device returned messages\n * \n * @author\n * @param devReplyStr Message information returned by the device\n */\n void handlePacket(String devReplyStr);\n\n /**\n * Error information processing apparatus returns <br>\n * \n * @author\n * @param devReplyErr Error messages returned by the device\n */\n void handleError(String devReplyErr);\n\n /**\n * Device interaction with the end of the glyph packets <br>\n * \n * @author\n * @return End glyph packets\n */\n String getPacketEndTag();\n\n /**\n * Encoding packets\n * \n * @author\n * @return Encoding packets\n */\n String getCharsetName();\n\n}",
"ISerializer invoke(String responseReceiverId);",
"public interface AMQPIntegratorService {\n\n\tvoid queueMessage(MailStructure email);\n}",
"public void sendHeartbeat();",
"public interface IRpcResponser {\n\n public void callback(String secret, Class<?> clazzOfInterface, Object serviceProvider, long timeout, TimeUnit timeUnit);\n\n public WrappedRpcServer buildRpcServer(String secret, IRpcMessageProcessor rpcMsgProcessor);\n}",
"public void request() {\n }",
"public final void run() {\n AppMethodBeat.i(108148);\n if (q.a(cVar2.aBx(), jSONObject2, (com.tencent.mm.plugin.appbrand.s.q.a) cVar2.aa(com.tencent.mm.plugin.appbrand.s.q.a.class)) == b.FAIL_SIZE_EXCEED_LIMIT) {\n aVar2.BA(\"convert native buffer parameter fail. native buffer exceed size limit.\");\n AppMethodBeat.o(108148);\n return;\n }\n String CS = j.CS(jSONObject2.optString(\"url\"));\n Object opt = jSONObject2.opt(\"data\");\n String optString = jSONObject2.optString(FirebaseAnalytics.b.METHOD);\n if (bo.isNullOrNil(optString)) {\n optString = \"GET\";\n }\n if (TextUtils.isEmpty(CS)) {\n aVar2.BA(\"url is null\");\n AppMethodBeat.o(108148);\n } else if (URLUtil.isHttpsUrl(CS) || URLUtil.isHttpUrl(CS)) {\n byte[] bArr = new byte[0];\n if (opt != null && d.CK(optString)) {\n if (opt instanceof String) {\n bArr = ((String) opt).getBytes(Charset.forName(\"UTF-8\"));\n } else if (opt instanceof ByteBuffer) {\n bArr = com.tencent.mm.plugin.appbrand.r.d.q((ByteBuffer) opt);\n }\n }\n synchronized (d.this.ioA) {\n try {\n if (d.this.ioA.size() >= d.this.ioB) {\n aVar2.BA(\"max connected\");\n ab.i(\"MicroMsg.AppBrandNetworkRequest\", \"max connected mRequestTaskList.size():%d,mMaxRequestConcurrent:%d\", Integer.valueOf(d.this.ioA.size()), Integer.valueOf(d.this.ioB));\n }\n } finally {\n while (true) {\n }\n AppMethodBeat.o(108148);\n }\n }\n } else {\n aVar2.BA(\"request protocol must be http or https\");\n AppMethodBeat.o(108148);\n }\n }",
"public interface EndpointBase {\n\n boolean isIdleNow();\n\n /**\n * @param connectionTimeout\n * @param methodTimeout\n */\n void setTimeouts(int connectionTimeout, int methodTimeout);\n\n /**\n * @param alwaysMainThread\n */\n void setCallbackThread(boolean alwaysMainThread);\n\n /**\n * @param flags\n */\n void setDebugFlags(int flags);\n\n int getDebugFlags();\n\n /**\n * @param delay\n */\n void setDelay(int delay);\n\n void addErrorLogger(ErrorLogger logger);\n\n void removeErrorLogger(ErrorLogger logger);\n\n void setOnRequestEventListener(OnRequestEventListener listener);\n\n\n void setPercentLoss(float percentLoss);\n\n int getThreadPriority();\n\n void setThreadPriority(int threadPriority);\n\n\n ProtocolController getProtocolController();\n\n void setUrlModifier(UrlModifier urlModifier);\n\n /**\n * No log.\n */\n int NO_DEBUG = 0;\n\n /**\n * Log time of requests.\n */\n int TIME_DEBUG = 1;\n\n /**\n * Log request content.\n */\n int REQUEST_DEBUG = 2;\n\n /**\n * Log response content.\n */\n int RESPONSE_DEBUG = 4;\n\n /**\n * Log cache behavior.\n */\n int CACHE_DEBUG = 8;\n\n /**\n * Log request code line.\n */\n int REQUEST_LINE_DEBUG = 16;\n\n /**\n * Log request and response headers.\n */\n int HEADERS_DEBUG = 32;\n\n /**\n * Log request errors\n */\n int ERROR_DEBUG = 64;\n\n /**\n * Log cancellations\n */\n int CANCEL_DEBUG = 128;\n\n /**\n * Log cancellations\n */\n int THREAD_DEBUG = 256;\n\n /**\n * Log everything.\n */\n int FULL_DEBUG = TIME_DEBUG | REQUEST_DEBUG | RESPONSE_DEBUG | CACHE_DEBUG | REQUEST_LINE_DEBUG | HEADERS_DEBUG | ERROR_DEBUG | CANCEL_DEBUG;\n\n int INTERNAL_DEBUG = FULL_DEBUG | THREAD_DEBUG;\n\n /**\n * Created by Kuba on 17/07/14.\n */\n interface UrlModifier {\n\n String createUrl(String url);\n\n }\n\n interface OnRequestEventListener {\n\n void onStart(Request request, int requestsCount);\n\n void onStop(Request request, int requestsCount);\n\n }\n}",
"@Scheduled(fixedRate = 2000)\n private void doSendRpcUsage() {\n List<MethodCallDTO> items = stats.values()\n .stream()\n .map(stat -> new MethodCallDTO(\n stat.name,\n stat.count.longValue(),\n stat.lastCall.longValue(),\n stat.lastResult.get(),\n stat.curl))\n .sorted((s1, s2) -> s1.getMethodName().compareTo(s2.getMethodName()))\n .collect(Collectors.toList());\n\n clientMessageService.sendToTopic(\"/topic/rpcUsage\", items);\n }",
"public interface RpcLogger {\n\n\t/**\n\t * Logger a single RPC call.\n\t * \n\t * @param client the initiator of the RPC call.\n\t * @param server the server of the RPC all.\n\t * @param signature the service method called.\n\t * @param request protobuf.\n\t * @param response protobuf.\n\t * @param errorMessage if an error was signaled\n\t * @param correlationId the correlationId.\n\t * @param requestTS the timestamp of request.\n\t * @param responseTS the timestamp of the response.\n\t */\n\tpublic void logCall( PeerInfo client, PeerInfo server, String signature, Message request, Message response, String errorMessage, int correlationId, long requestTS, long responseTS );\n\n\t/**\n\t * Logger the receipt or sending of an OobResponse.\n\t * @param client\n\t * @param server\n\t * @param signature\n\t * @param message\n\t * @param correlationId\n\t * @param eventTS\n\t */\n\tpublic void logOobResponse( PeerInfo client, PeerInfo server, Message message, String signature, int correlationId, long eventTS );\n\t\n\t/**\n\t * Logger the receipt or sending of an OobMessage.\n\t * @param client\n\t * @param server\n\t * @param message\n\t * @param eventTS\n\t */\n\tpublic void logOobMessage( PeerInfo client, PeerInfo server, Message message, long eventTS );\n\n}",
"abstract public void sendData(Account account, SyncResult syncResult) throws Exception;",
"public interface AsyncResponce {\n\n /// Cette classe permet de realiser une callback dans une Async Task en overidant cette classe\n void ComputeResult(Object result);\n}",
"public interface RequestContract {\n\n public void save_request(String note);\n\n public void save_request();\n}",
"public interface StuAnswerDataToMqService {\n\n /**\n * 向RabbitMq推送已做对的、未批改的习题数据\n * @param dataList\n * @throws Exception\n */\n void sendExerciseData2Mq(List<StudentWorkAnswer> dataList) throws BizLayerException;\n\n\n}",
"Object sendRpcRequest(RpcRequest rpcRequest);",
"@Override\r\n\tpublic void askPressionAsync() throws Exception\r\n\t\t{\n\r\n\t\tbyte[] tabByte = TrameEncoder.coder(ASK_MSG_PRESSION);\r\n\t\toutputStream.write(tabByte);\r\n\t\t}",
"void onTransactionComplete(Task<Void> task,int requestCode);",
"public interface RLatitudeServiceAsync {\r\n\r\n\tvoid sayHello(AsyncCallback<String> callback);\r\n\r\n\tvoid publishUser(String name, String firstName, String dateNaissance,\r\n\t\t\tAsyncCallback< String > callback );\r\n\t\r\n\tvoid checkPasswordLoginValidity( String login, String password, AsyncCallback< Boolean > callback );\r\n\t\r\n\tvoid publishAuthentication( String uid, String login, String password, AsyncCallback</*IUser*/Void> callback );\r\n\t\r\n\tvoid connect(String login, String password, AsyncCallback< String > callback);\r\n\t\r\n\tvoid disconnect(String uid, AsyncCallback< Boolean > callback);\r\n\t\r\n\tvoid changeMyVisibility(String uid, boolean visibility,\r\n\t\t\tAsyncCallback<Boolean> callback);\r\n\r\n\tvoid getVisibility(String uid, AsyncCallback<Boolean> callback);\r\n\t\r\n\tvoid setCurrentPostion(String uid, Position position,\r\n\t\t\tAsyncCallback<Void> callback);\r\n\t\r\n\tvoid addContact( String uidUser, String uidContact, AsyncCallback< Void > callback );\r\n\t\r\n\tvoid getContact( String uid,\r\n\t\t\tAsyncCallback< List< ResolvedContact > > callback );\r\n\t\r\n\tvoid getUser( String name, String lastName, AsyncCallback<ResolvedUser> callback );\r\n\t\r\n\tvoid getUser(String uid,AsyncCallback<ResolvedUser> callback);\r\n\r\n\tvoid getPosition( String uidUser, AsyncCallback< Position > callback );\r\n\r\n}",
"public interface BlockChainService {\n\n BigInteger getBlockNumber() throws RuntimeException;\n\n BigInteger getGasPrice();\n\n BigInteger getBalance(String address);\n\n String sendEtherTransaction(String from, String password,String to, String amount) throws RuntimeException;\n\n String sendTextTransaction(String from, String password,String to, String data) throws RuntimeException;\n\n\n}",
"public interface ApplicationServletAsync {\r\n\r\n\tvoid sendRequest(Map<String, Serializable> requestParameters,\r\n\t\t\tMap<String, Serializable> responseParameters,\r\n\t\t\tAsyncCallback<Void> callback);\r\n}",
"public interface AdditionalOrderInforCaller {\n\t/*\n\t * Command define from Order Confirmation API Guide\n\t * JSON and XML format\n\t */\n\t@Headers({\"Accept: application/json\",\"Content-Type: application/json\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestJSON(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\t\n\t@Headers({\"Accept: application/xml\",\"Content-Type: application/xml\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestXML(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\n\t// Implement default method of interface class that according to Variables.MediaType to run at JSON or XML request.\n\tdefault GetAdditionalOrderInformationResponse sendAdditionalOrderInforRequest(GetAdditionalOrderInformationRequest body) {\n\t\tswitch(Variables.MediaType) {\n\t\tcase JSON:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestJSON(Content.SellerID, body);\n\t\t\t\n\t\tcase XML:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestXML(Content.SellerID, body);\t\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new RuntimeException(\"Never Happened!\");\n\t\t}\n\t\t\t\t\n\t}\n\t\n\tstatic AdditionalOrderInforCaller buildJSON() {\n\t\tVariables.MediaType = MEDIA_TYPE.JSON;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.jsonBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\n\tstatic AdditionalOrderInforCaller buildXML() {\n\t\tVariables.MediaType = MEDIA_TYPE.XML;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.xmlBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\t\n}",
"@Override\n\tpublic String execute() throws Exception {\n\t\treturn \"send\";\n\t}",
"private static void bidiStreamService(ManagedChannel channel){\n CalculatorServiceGrpc.CalculatorServiceStub asynClient = CalculatorServiceGrpc.newStub(channel);\n CountDownLatch latch = new CountDownLatch(1);\n StreamObserver<FindMaximumRequest> streamObserver = asynClient.findMaximum(new StreamObserver<FindMaximumResponse>() {\n @Override\n public void onNext(FindMaximumResponse value) {\n System.out.println(\"Got new maxium from server: \"+ value.getMaximum());\n }\n\n @Override\n public void onError(Throwable t) {\n latch.countDown();\n }\n\n @Override\n public void onCompleted() {\n System.out.println(\"Server is done sending data\");\n latch.countDown();\n }\n });\n\n Arrays.asList(1,5,3,6,2,20).forEach(\n number -> {\n System.out.println(\"Sending number: \"+ number);\n streamObserver.onNext(FindMaximumRequest.newBuilder()\n .setNumber(number)\n .build());\n }\n );\n\n streamObserver.onCompleted();\n try {\n latch.await(3L, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public interface CoreServiceInvoker {\n\n\n GWRequest processRequest(Object requestData, InterfaceMapper mapper);\n\n /**\n * 处理请求信息\n */\n GWRequest processRequest(Object requestData, InterfaceMapper mapper, boolean needPackage);\n\n /**\n * 调用核心方法\n */\n GWResponse invoke(GWRequest request, boolean needPackage);\n\n /**\n * 处理返回信息\n */\n Object analysisResponse(GWRequest request, GWResponse response);\n Object analysisResp(GWRequest request, GWResponse response);\n}",
"public interface Notify extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npublic static abstract class Stub extends android.os.Binder implements com.jancar.media.Notify\n{\nprivate static final java.lang.String DESCRIPTOR = \"com.jancar.media.Notify\";\n/** Construct the stub at attach it to the interface. */\npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}\n/**\n * Cast an IBinder object into an com.jancar.media.Notify interface,\n * generating a proxy if needed.\n */\npublic static com.jancar.media.Notify asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.jancar.media.Notify))) {\nreturn ((com.jancar.media.Notify)iin);\n}\nreturn new com.jancar.media.Notify.Stub.Proxy(obj);\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn this;\n}\n@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException\n{\nswitch (code)\n{\ncase INTERFACE_TRANSACTION:\n{\nreply.writeString(DESCRIPTOR);\nreturn true;\n}\ncase TRANSACTION_notifyMusic:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.util.List<com.jancar.media.data.Music> _arg0;\n_arg0 = data.createTypedArrayList(com.jancar.media.data.Music.CREATOR);\nthis.notifyMusic(_arg0);\nreply.writeNoException();\nreply.writeTypedList(_arg0);\nreturn true;\n}\ncase TRANSACTION_notifyVideo:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.util.List<com.jancar.media.data.Video> _arg0;\n_arg0 = data.createTypedArrayList(com.jancar.media.data.Video.CREATOR);\nthis.notifyVideo(_arg0);\nreply.writeNoException();\nreply.writeTypedList(_arg0);\nreturn true;\n}\ncase TRANSACTION_notifyImage:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.util.List<com.jancar.media.data.Image> _arg0;\n_arg0 = data.createTypedArrayList(com.jancar.media.data.Image.CREATOR);\nthis.notifyImage(_arg0);\nreply.writeNoException();\nreply.writeTypedList(_arg0);\nreturn true;\n}\ncase TRANSACTION_notifyID3Music:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.util.List<com.jancar.media.data.Music> _arg0;\n_arg0 = data.createTypedArrayList(com.jancar.media.data.Music.CREATOR);\nthis.notifyID3Music(_arg0);\nreply.writeNoException();\nreply.writeTypedList(_arg0);\nreturn true;\n}\ncase TRANSACTION_notifyPath:\n{\ndata.enforceInterface(DESCRIPTOR);\njava.lang.String _arg0;\n_arg0 = data.readString();\nthis.notifyPath(_arg0);\nreply.writeNoException();\nreturn true;\n}\n}\nreturn super.onTransact(code, data, reply, flags);\n}\nprivate static class Proxy implements com.jancar.media.Notify\n{\nprivate android.os.IBinder mRemote;\nProxy(android.os.IBinder remote)\n{\nmRemote = remote;\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn mRemote;\n}\npublic java.lang.String getInterfaceDescriptor()\n{\nreturn DESCRIPTOR;\n}\n/**\n * Demonstrates some basic types that you can use as parameters\n * and return values in AIDL.\n */\n@Override public void notifyMusic(java.util.List<com.jancar.media.data.Music> list) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeTypedList(list);\nmRemote.transact(Stub.TRANSACTION_notifyMusic, _data, _reply, 0);\n_reply.readException();\n_reply.readTypedList(list, com.jancar.media.data.Music.CREATOR);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void notifyVideo(java.util.List<com.jancar.media.data.Video> list) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeTypedList(list);\nmRemote.transact(Stub.TRANSACTION_notifyVideo, _data, _reply, 0);\n_reply.readException();\n_reply.readTypedList(list, com.jancar.media.data.Video.CREATOR);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void notifyImage(java.util.List<com.jancar.media.data.Image> list) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeTypedList(list);\nmRemote.transact(Stub.TRANSACTION_notifyImage, _data, _reply, 0);\n_reply.readException();\n_reply.readTypedList(list, com.jancar.media.data.Image.CREATOR);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void notifyID3Music(java.util.List<com.jancar.media.data.Music> list) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeTypedList(list);\nmRemote.transact(Stub.TRANSACTION_notifyID3Music, _data, _reply, 0);\n_reply.readException();\n_reply.readTypedList(list, com.jancar.media.data.Music.CREATOR);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void notifyPath(java.lang.String path) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeString(path);\nmRemote.transact(Stub.TRANSACTION_notifyPath, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n}\nstatic final int TRANSACTION_notifyMusic = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);\nstatic final int TRANSACTION_notifyVideo = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);\nstatic final int TRANSACTION_notifyImage = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);\nstatic final int TRANSACTION_notifyID3Music = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);\nstatic final int TRANSACTION_notifyPath = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);\n}\n/**\n * Demonstrates some basic types that you can use as parameters\n * and return values in AIDL.\n */\npublic void notifyMusic(java.util.List<com.jancar.media.data.Music> list) throws android.os.RemoteException;\npublic void notifyVideo(java.util.List<com.jancar.media.data.Video> list) throws android.os.RemoteException;\npublic void notifyImage(java.util.List<com.jancar.media.data.Image> list) throws android.os.RemoteException;\npublic void notifyID3Music(java.util.List<com.jancar.media.data.Music> list) throws android.os.RemoteException;\npublic void notifyPath(java.lang.String path) throws android.os.RemoteException;\n}",
"public interface GreetingServiceAsync {\r\n \r\n public void getAvailableDatasets(AsyncCallback<Map<Integer,String> >datasetResults);\r\n public void loadDataset(int datasetId,AsyncCallback<DatasetInformation> asyncCallback);\r\n public void computeLineChart(int datasetId,AsyncCallback<LineChartResults> asyncCallback);\r\n public void computeSomClustering(int datasetId,int linkage,int distanceMeasure,AsyncCallback<SomClusteringResults> asyncCallback);\r\n public void computeHeatmap(int datasetId,List<String>indexer,List<String>colIndexer,AsyncCallback<ImgResult> asyncCallback );\r\n public void computePCA(int datasetId,int comI,int comII, AsyncCallback<PCAResults> asyncCallback);\r\n public void computeRank(int datasetId,String perm,String seed,String[] colGropNames,String log2, AsyncCallback<RankResult> asyncCallback);\r\n public void createRowGroup(int datasetId, String name, String color, String type, int[] selection, AsyncCallback<Boolean> asyncCallback);\r\n public void createColGroup(int datasetId, String name, String color, String type, String[] selection, AsyncCallback<Boolean> asyncCallback);\r\n public void createSubDataset(String name,int[] selection,AsyncCallback<Integer> asyncCallback);\r\n public void updateDatasetInfo(int datasetId, AsyncCallback<DatasetInformation> asyncCallback);\r\n public void activateGroups(int datasetId,String[] rowGroups,String[] colGroups, AsyncCallback<DatasetInformation> asyncCallback);\r\n\r\n \r\n public void saveDataset(int datasetId, String newName,AsyncCallback<Integer> asyncCallback);\r\n \r\n}",
"public interface IScadaApiSend {\n \n /**\n * API Method to fetch all Production Blocks\n * @return List of Production Block objects\n */\n public ProductionBlock[] getAllProductionBlocks();\n \n /**\n * API Method to get a specific production block based on id\n * @param id ID of production block to fetch \n * @return Production Block object matching given ID\n */\n public ProductionBlock getSpecificProductionBlock(int id);\n \n /**\n * API Method to save a Production Block object\n * @param pb Production Block object to save \n * @return True on succesful save, false otherwise\n */\n public String saveProductionBlock(ProductionBlock pb);\n \n /**\n * API Method to update a Production Block object\n * @param pb Production Block object to update\n * @return True on succesful update, false otherwise\n */\n public String updateProductionBlock(ProductionBlock pb);\n \n /**\n * API Method to delete a Production Block object\n * @param pb Production block object to delete\n * @return True on succesful deletion, false otherwise\n */\n public String deleteProductionBlock(ProductionBlock pb);\n \n /**\n * API Method to get a specific GrowthProfile object\n * @param id ID of the GrowthProfile object wished to fetch from DB\n * @return GrowthProfile object based on id\n */\n public GrowthProfile getSpecificGrowthProfile(int id);\n \n /**\n * API Ping method used to test if connection is still alive.\n * @return True or false if there is connection. \n */\n public boolean ping();\n}",
"void enqueue(BasePayload payload, EnqueueCallback callback);",
"public interface ClientLoggingWebClient\n{\n\n public abstract boolean isSynchronous();\n\n public abstract void sendLoggingEvents(String s, String s1, ClientLoggingWebCallback clientloggingwebcallback);\n}",
"@Test\r\n public void simpleFlowAndJMX() throws Exception {\r\n ModuleURN instanceURN = new ModuleURN(PROVIDER_URN, \"mymodule\");\r\n //Set up the data\r\n Object []requestParm = {BigDecimal.ONE, 2, \"three\"};\r\n CopierModule.SynchronousRequest req =\r\n new CopierModule.SynchronousRequest(requestParm);\r\n req.semaphore.acquire();\r\n //Set up the sink listener\r\n BlockingSinkDataListener listener = new BlockingSinkDataListener();\r\n mManager.addSinkListener(listener);\r\n //Create the data flow.\r\n DataFlowID flowID = mManager.createDataFlow(new DataRequest[]{\r\n new DataRequest(CopierModuleFactory.INSTANCE_URN,\r\n req),\r\n new DataRequest(instanceURN, null)\r\n });\r\n //wait for the data to be emitted.\r\n req.semaphore.acquire();\r\n //wait for the data to be received\r\n for(Object o: requestParm) {\r\n assertEquals(o, listener.getNextData());\r\n }\r\n //verify the flow info\r\n DataFlowInfo flowInfo = mManager.getDataFlowInfo(flowID);\r\n assertFlowInfo(flowInfo, flowID, 3, true, false, null, null);\r\n //verify the last 2 flow steps\r\n assertFlowStep(flowInfo.getFlowSteps()[1], instanceURN, true, 3, 0,\r\n null, true, 3, 0, null, instanceURN, null);\r\n assertFlowStep(flowInfo.getFlowSteps()[2],\r\n SinkModuleFactory.INSTANCE_URN, false, 0, 0, null, true, 3, 0,\r\n null, SinkModuleFactory.INSTANCE_URN, null);\r\n //verify the module info to double check that it's auto-created.\r\n assertModuleInfo(mManager, instanceURN, ModuleState.STARTED, null,\r\n new DataFlowID[]{flowID}, true, true, true, true, false);\r\n //verify JMX MXBean Info\r\n final ObjectName on = instanceURN.toObjectName();\r\n final MBeanServer beanServer = getMBeanServer();\r\n assertTrue(beanServer.isRegistered(on));\r\n MBeanInfo beanInfo = beanServer.getMBeanInfo(on);\r\n assertEquals(SimpleAsyncProcessor.class.getName(), beanInfo.getClassName());\r\n assertEquals(Messages.JMX_MXBEAN_DESCRIPTION.getText(), beanInfo.getDescription());\r\n assertEquals(0, beanInfo.getOperations().length);\r\n assertEquals(0, beanInfo.getConstructors().length);\r\n assertEquals(0, beanInfo.getNotifications().length);\r\n assertEquals(0, beanInfo.getDescriptor().getFieldNames().length);\r\n MBeanAttributeInfo[] attributeInfos = beanInfo.getAttributes();\r\n assertEquals(1, attributeInfos.length);\r\n final String validAttribute = SimpleAsyncProcessor.ATTRIB_PREFIX + flowID;\r\n assertEquals(validAttribute, attributeInfos[0].getName());\r\n assertEquals(Integer.class.getName(), attributeInfos[0].getType());\r\n assertEquals(Messages.JMX_ATTRIBUTE_FLOW_CNT_DESCRIPTION.getText(flowID), attributeInfos[0].getDescription());\r\n assertEquals(0, attributeInfos[0].getDescriptor().getFieldNames().length);\r\n assertFalse(attributeInfos[0].isIs());\r\n assertFalse(attributeInfos[0].isWritable());\r\n assertTrue(attributeInfos[0].isReadable());\r\n \r\n //verify Attributes\r\n Object value = beanServer.getAttribute(on, SimpleAsyncProcessor.ATTRIB_PREFIX + flowID);\r\n assertEquals((Integer)0, (Integer)value);\r\n final String invalidAttribute = SimpleAsyncProcessor.ATTRIB_PREFIX + 1;\r\n new ExpectedFailure<AttributeNotFoundException>(invalidAttribute){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.getAttribute(on, invalidAttribute);\r\n }\r\n };\r\n new ExpectedFailure<AttributeNotFoundException>(\"blah\"){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.getAttribute(on, \"blah\");\r\n }\r\n };\r\n AttributeList attribList = beanServer.getAttributes(on,\r\n new String[]{validAttribute, invalidAttribute});\r\n assertEquals(1, attribList.size());\r\n assertEquals(new Attribute(validAttribute, 0), attribList.get(0));\r\n new ExpectedFailure<AttributeNotFoundException>(){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.setAttribute(on, new Attribute(validAttribute, 34));\r\n }\r\n };\r\n new ExpectedFailure<AttributeNotFoundException>(){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.setAttribute(on, new Attribute(invalidAttribute, 34));\r\n }\r\n };\r\n AttributeList list = new AttributeList(Arrays.asList(\r\n new Attribute(validAttribute, 12),\r\n new Attribute(invalidAttribute, 13)\r\n ));\r\n assertEquals(0, beanServer.setAttributes(on, list).size());\r\n //verify no operations can be performed\r\n ReflectionException excpt = new ExpectedFailure<ReflectionException>() {\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.invoke(on, \"getQueueSizes\", null, null);\r\n }\r\n }.getException();\r\n assertTrue(excpt.toString(), excpt.getCause() instanceof NoSuchMethodException);\r\n\r\n //stop the flow\r\n mManager.cancel(flowID);\r\n //verify that the module is deleted.\r\n List<ModuleURN> instances = mManager.getModuleInstances(PROVIDER_URN);\r\n assertTrue(instances.toString(), instances.isEmpty());\r\n //remove the listener\r\n mManager.removeSinkListener(listener);\r\n }",
"public interface IMqService {\n /*发送消息到队列的方法,其中TerminalStateProtoBuf是proto格式的消息,根据实际情况更改*/\n /*\n void reportTerminalState(String restaurantId,TerminalStateProtoBuf.TerminalState.StateType stateType);\n */\n}",
"public interface LongProcessOperations \n{\n ServoConRemote.LongProcessPackage.Status Completed ();\n\n //message is empty on success\n String Message ();\n double Progress ();\n void Detach ();\n}"
] | [
"0.6022303",
"0.59727466",
"0.58507776",
"0.58081865",
"0.5795497",
"0.5778109",
"0.57634157",
"0.57557815",
"0.57501173",
"0.56923366",
"0.5663756",
"0.56560576",
"0.56410843",
"0.5622467",
"0.55937576",
"0.55328935",
"0.5514257",
"0.5485159",
"0.5484039",
"0.54813147",
"0.5473721",
"0.5437517",
"0.54296535",
"0.5402016",
"0.53962576",
"0.53947043",
"0.5390451",
"0.5382093",
"0.5366256",
"0.5346663",
"0.53451365",
"0.5343489",
"0.5334003",
"0.5321636",
"0.5321323",
"0.53088105",
"0.5305181",
"0.52945435",
"0.52886516",
"0.5284733",
"0.5282912",
"0.5279916",
"0.5269851",
"0.5269671",
"0.5267951",
"0.5267855",
"0.52585137",
"0.525437",
"0.5249988",
"0.5249514",
"0.52475566",
"0.52471864",
"0.52414334",
"0.5239458",
"0.5236796",
"0.5227814",
"0.5225934",
"0.5216471",
"0.52084273",
"0.5197239",
"0.5194161",
"0.5186499",
"0.51850784",
"0.51812404",
"0.51804644",
"0.5176701",
"0.51727295",
"0.5141114",
"0.5135582",
"0.51337916",
"0.513344",
"0.5128121",
"0.51206094",
"0.5117597",
"0.5114269",
"0.5109424",
"0.5107977",
"0.5107786",
"0.51068914",
"0.5102776",
"0.5101011",
"0.509967",
"0.5099615",
"0.5097668",
"0.50975704",
"0.5085979",
"0.50854033",
"0.50795233",
"0.5078958",
"0.50788844",
"0.5077506",
"0.5076907",
"0.5072992",
"0.5072665",
"0.5069601",
"0.5066109",
"0.50643545",
"0.5064331",
"0.50505626",
"0.504685",
"0.50408036"
] | 0.0 | -1 |
Function to find smallest window containing all distinct characters | static String findSubString(String str)
{
int n = str.length();
// Count all distinct characters.
int dist_count = 0;
boolean[] visited = new boolean[MAX_CHARS];
Arrays.fill(visited, false);
for (int i=0; i<n; i++)
{
if (visited[str.charAt(i)] == false)
{
visited[str.charAt(i)] = true;
dist_count++;
}
}
// We basically maintain a window of characters that contains all characters of given string.
int start = 0, start_index = -1;
int min_len = Integer.MAX_VALUE;
int count = 0;
int[] curr_count = new int[MAX_CHARS];
for (int j=0; j<n; j++)
{
// Count occurrence of characters of string
curr_count[str.charAt(j)]++;
// If any distinct character matched, then increment count
if (curr_count[str.charAt(j)] == 1 )
count++;
// if all the characters are matched
if (count == dist_count)
{
// Try to minimize the window i.e., check if
// any character is occurring more no. of times
// than its occurrence in pattern, if yes
// then remove it from starting and also remove
// the useless characters.
while (curr_count[str.charAt(start)] > 1)
{
if (curr_count[str.charAt(start)] > 1)
curr_count[str.charAt(start)]--;
start++;
}
// Update window size
int len_window = j - start + 1;
if (min_len > len_window)
{
min_len = len_window;
start_index = start;
}
}
}
// Return substring starting from start_index
// and length min_len
return str.substring(start_index, start_index+min_len);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String minWindowCaseII(String s, String t) {\n if(s.length() == 0 || t.length() == 0) {\n return \"\";\n }\n\n HashMap<Character, Integer> uniqueCharsInT = new HashMap<>();\n HashMap<Character, Integer> uniqueCharsInCurrWindowInS = new HashMap<>();\n\n for(char c : t.toCharArray()) {\n uniqueCharsInT.put(c, uniqueCharsInT.getOrDefault(c, 0) + 1);\n }\n\n List<Pair<Integer, Character>> filteredS = new ArrayList<>();\n for(int i = 0; i < s.length(); i++) {\n if(uniqueCharsInT.containsKey(s.charAt(i))) {\n filteredS.add(new Pair<>(i, s.charAt(i)));\n }\n }\n int[] ans = new int[] {-1, 0, 0}; // window length, left, right\n int left = 0, right = 0, uniqueCharsInTCount = uniqueCharsInT.size(), uniqueCharsInCurrWindowCount = 0;\n\n\n while(right < filteredS.size()) {\n char rightChar = filteredS.get(right).getValue();\n uniqueCharsInCurrWindowInS.put(rightChar, uniqueCharsInCurrWindowInS.getOrDefault(uniqueCharsInCurrWindowInS, 0) + 1);\n\n if(uniqueCharsInT.get(rightChar).intValue() == uniqueCharsInCurrWindowInS.get(rightChar).intValue()) {\n uniqueCharsInCurrWindowCount++;\n }\n\n while(left <= right && uniqueCharsInCurrWindowCount == uniqueCharsInTCount) {\n char leftChar = filteredS.get(left).getValue();\n\n int start = filteredS.get(left).getKey();\n int end = filteredS.get(right).getKey();\n if(ans[0] == -1 || end - start + 1 < ans[0]) {\n ans[0] = end - start + 1;\n ans[1] = start;\n ans[2] = end;\n }\n\n uniqueCharsInCurrWindowInS.put(leftChar, uniqueCharsInCurrWindowInS.get(leftChar) - 1);\n if(uniqueCharsInT.containsKey(leftChar) && uniqueCharsInT.get(leftChar).intValue() > uniqueCharsInCurrWindowInS.get(leftChar).intValue()) {\n uniqueCharsInCurrWindowCount--;\n }\n\n left++;\n }\n\n right++;\n }\n\n return ans[0] == -1 ? \"\" : s.substring(ans[1], ans[2] + 1);\n }",
"public static String minWindow(String s, String t) \n {\n String ans = \"\";\n int[] ascii = new int[128]; // fill the ascii, \n for(char e: t.toCharArray())\n {\n \t ascii[e]++; // letters in String T contribute positive value to the ascii array\n }\n \n int counter = t.length(), begin = 0, end = 0,minLen = Integer.MAX_VALUE, head = 0;\n// we need to keep track of the letter left in t, where it starts and where it end.\n while(end<s.length())\n {\n \t if(ascii[s.charAt(end)]>0) \n \t {\n \t\t counter--; // find one letter from String t in String s, counter--,\n \t }\n \t ascii[s.charAt(end)]--; // letters in String S contribute negative value to the ascii array\n\t\t end++; // keep moving end to the last index of String s. \n\t\t // end index records the last index of the possible window.\n \t\t \n/*\n * once the letters in t are all traversed, counter should be zero, and we have found a possible window\n * the while loop below is to update the begin index of the window\n * while ascii[char] is above 0, which means a letter in string T is found in string S\n * then counter++ and letters in String S \n * after a possible window is found now contribute positive values to ascii\n * while traverse each letter in String, update the length of minimum window. \n * \n */\n \t while(counter ==0) \n \t { \n \t\t if(end - begin < minLen)\n \t\t {\n \t\t\t head = begin;\n \t\t\t minLen = end-begin;\n \t\t }\n \t\t \n \t\t ascii[s.charAt(begin)]++;\n \t\t if(ascii[s.charAt(begin)]>0)\n \t\t {\n \t\t\t counter++;\n \t\t }\n \t\t begin++;\n \t }\n }\n \n if(minLen != Integer.MAX_VALUE)\n \t ans = s.substring(head, head+minLen);\n return ans;\n }",
"public static String minimum_window(String s, String t) {\n // Write your code here\n if(s.length() < t.length()){\n return \"-1\";\n }\n String result = \"\";\n int n = s.length();\n int m = t.length();\n char[] freq1 = new char[128];\n char[] freq2 = new char[128];\n\n for(char c : t.toCharArray()){\n freq1[c]++;\n }\n\n int len = n+1;\n int cnt = 0;\n int l = 0;\n\n for(int i = 0 ; i< s.length(); i++){\n char temp = s.charAt(i);\n freq2[temp]++;\n if(freq1[temp]!=0 && freq2[temp] <= freq1[temp]){\n cnt++;\n }\n\n if(cnt >= m){\n while(freq2[s.charAt(l)] > freq1[s.charAt(l)] || freq1[s.charAt(l)] == 0){\n if(freq2[s.charAt(l)] > freq1[s.charAt(l)]){\n freq2[s.charAt(l)]--;\n }\n l++;\n }\n if(len > i - l + 1){\n len = i-l+1;\n result = s.substring(l,l+len);\n }\n }\n\n\n }\n return result.length() == 0 ? \"-1\": result;\n }",
"public int minCut1(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] cut = new int[1];\n cut[0] = Integer.MAX_VALUE;\n List<List<String>> res = new ArrayList<>();\n helper1(s, 0, cut, dp, res, new ArrayList<>());\n // System.out.format(\"res: %s\\n\", res);\n return cut[0];\n }",
"public String minWindow(String s, String t) {\n int slength = s.length(), tlength = t.length();\n Queue<Integer> queue = new ArrayDeque<>();\n int[] wordCountOfT = new int[256];\n int[] currentWordCountOfT = new int[256];\n\n for (int i = 0; i < tlength; i++) {\n wordCountOfT[t.charAt(i)]++;\n }\n\n int hasFound = 0;\n int windowStart = -1, windowEnd = slength;\n\n for (int i = 0; i < slength; i++) {\n\n if (wordCountOfT[s.charAt(i)] != 0) {\n queue.add(i);\n currentWordCountOfT[s.charAt(i)]++;\n\n if (currentWordCountOfT[s.charAt(i)] <= wordCountOfT[s.charAt(i)]) {\n hasFound++;\n }\n\n if (hasFound == tlength) {\n int k;\n do {\n k = queue.peek();\n queue.poll();\n currentWordCountOfT[s.charAt(k)]--;\n }\n while (wordCountOfT[s.charAt(k)] <= currentWordCountOfT[s.charAt(k)]);\n\n\n if (windowEnd - windowStart > i - k) {\n windowStart = k;\n windowEnd = i;\n }\n\n hasFound--;\n }\n }\n }\n\n return windowStart != -1 ? s.substring(windowStart, windowStart + (windowEnd - windowStart + 1)) : \"\";\n }",
"public String minWindow(String s, String t) {\n String res = \"\";\n if (t.length() > s.length()) return res;\n Map<Character, Integer> dict = new HashMap<>();\n int count=t.length();\n for (char ch : t.toCharArray()) {\n dict.put(ch, dict.getOrDefault(ch,0)+1);\n }\n int start=0, end=0, d=Integer.MAX_VALUE, head=0;\n while (end < s.length()) {\n if (dict.containsKey(s.charAt(end))) {\n if (dict.get(s.charAt(end)) > 0) {\n count--;\n }\n dict.put(s.charAt(end), dict.get(s.charAt(end)) - 1);\n }\n end++;\n while (count == 0) {\n if (end - start < d) {\n res = s.substring(start,end);\n d = end - start;\n }\n // make it invalid;\n // notice that we could seize the essence????\n // to make it invalid, we only care if the counter is positive or not;\n // we don't care about the char at end if it is changed;\n if (dict.containsKey(s.charAt(start))) {\n if (dict.get(s.charAt(start)) >= 0) {\n count++;\n }\n dict.put(s.charAt(start), dict.get(s.charAt(start)) + 1);\n }\n start++;\n }\n }\n return res;\n }",
"public String minWindow(String s, String t) {\n if (t.length() > s.length()) {\n return \"\";\n }\n\n Map<Character, Integer> pattern = new HashMap<>();\n int count = 0;\n\n for (char c : t.toCharArray()) {\n if (!pattern.containsKey(c)) {\n count++;\n }\n pattern.put(c, pattern.getOrDefault(c, 0) + 1);\n }\n\n int right = 0, left = 0;\n int minStart = -1, minEnd = -1;\n int minLength = Integer.MAX_VALUE;\n\n while (right < s.length()) {\n char c = s.charAt(right);\n\n if (pattern.containsKey(c)) {\n pattern.put(c, pattern.get(c) - 1);\n if (pattern.get(c) == 0) {\n count--;\n }\n }\n\n while (left < right && count == 0) {\n // left == right || pattern.containsKey\n char cleft = s.charAt(left);\n if (right - left + 1 < minLength) {\n minStart = left;\n minEnd = right;\n minLength = right - left + 1;\n }\n\n if (pattern.containsKey(cleft)) {\n pattern.put(cleft, pattern.get(cleft) + 1);\n if (pattern.get(cleft) > 0) {\n count++;\n }\n }\n left++;\n }\n\n right++;\n }\n\n return minStart == -1 || minEnd == -1 ? \"\" : s.substring(minStart, minEnd + 1);\n }",
"public String minWindow(String S, String T) {\n\t int tt = T.length();\n\t // set up a hashmap for T and also keep track of occurance\n\t HashMap<Character, Integer> needFind = new HashMap<Character, Integer>();\n\t HashMap<Character, Integer> hasFound = new HashMap<Character, Integer>();\n\t for (int i=0; i<tt; ++i) {\n\t hasFound.put(T.charAt(i), 0);\n\t if (needFind.containsKey(T.charAt(i))) {\n\t needFind.put(T.charAt(i), needFind.get(T.charAt(i))+1);\n\t } else {\n\t needFind.put(T.charAt(i), 1);\n\t }\n\t }\n\t // sliding window as needed\n\t int right = 0, found = 0, left = 0;\n\t ArrayList<Integer> nexts = new ArrayList<Integer>();\n\t String window = \"\";\n\t int winSize = Integer.MAX_VALUE;\n\t while (right < S.length()) {\n\t char c = S.charAt(right);\n\t if (!needFind.containsKey(c)) { // not a match\n\t ++right;\n\t continue;\n\t }\n\n\t nexts.add(right);\n\t ++right;\n\t hasFound.put(c, hasFound.get(c)+1);\n\t if (hasFound.get(c) <= needFind.get(c)) ++found;\n\n\t if (found >= tt) { // got a window\n\t // move left?\n\t char ll = S.charAt(nexts.get(left));\n\t while (hasFound.get(ll) > needFind.get(ll)) {\n\t hasFound.put(ll, hasFound.get(ll)-1);\n\t ++left;\n\t ll = S.charAt(nexts.get(left));\n\t }\n\t // smaller window?\n\t if (right - nexts.get(left) < winSize) {\n\t winSize = right - nexts.get(left);\n\t window = S.substring(nexts.get(left), right);\n\t }\n\t }\n\t }\n\t System.out.println(window);\n\t return window;\t\n\t}",
"public String minWindow(String s, String t) {\n if (t.length() == 0 || s.length() == 0) {\n return \"\";\n }\n int[] map = new int[128];\n for (char c : t.toCharArray()) map[c]++;\n\n int min = Integer.MAX_VALUE;\n\n int left = 0, right = 0;\n int[] map2 = new int[128];\n\n int minStart = 0;\n int minEnd = 0;\n while (right < s.length()) {\n map2[s.charAt(right)]++;\n right++; //extending right boundary\n\n while (matches(map, map2)) {\n //the current valid window is [left, right-1], notice the minus 1\n int length = right - left;\n if (length < min) {\n min = length;\n minStart = left;\n minEnd = right; // minEnd is exclusive for calling substring\n }\n //shrink left boundary\n map2[s.charAt(left)]--;\n left++;\n }\n }\n return s.substring(minStart, minEnd);\n }",
"public String minWindow2(String s, String t) {\n\n if (s == null || s.length() == 0 || t == null || t.length() == 0) {\n return \"\";\n }\n Map<Character, Integer> map = new HashMap<>();\n for (char c : t.toCharArray()) {\n map.put(c, map.getOrDefault(c, 0) + 1);\n }\n int lo = 0, hi = 0;\n\n // count是满足窗口的条件\n int count = t.length();\n int minLength = s.length() + 1;\n int begin = -1, end = -1;\n while (hi < s.length()) {\n char cur = s.charAt(hi);\n if (map.containsKey(cur)) {\n map.put(cur, map.get(cur) - 1);\n\n // 也就是刚刚减去的cur,是必须的( 需要2个a, 那么第三个a就不是必须的)\n if (map.get(cur) >= 0) {\n count--;\n }\n }\n\n // 当满足条件时, 缩小左边窗口。\n while (count == 0) {\n if (minLength > hi - lo + 1) {\n minLength = hi - lo + 1;\n begin = lo;\n end = hi;\n }\n char toRemove = s.charAt(lo);\n if (map.containsKey(toRemove)) {\n map.put(toRemove, map.get(toRemove) + 1);\n // 同--的地方,当窗口释放的char是必须的, count++\n if (map.get(toRemove) >= 1) {\n count++;\n }\n }\n lo++;\n }\n hi++;\n }\n return begin == -1 ? \"\" : s.substring(begin, end + 1);\n }",
"public String minWindow(String s, String t) {\n if (s.length() < t.length()) return \"\";\n char[] tc = t.toCharArray();\n HashMap<Character, Integer> tm = new HashMap<>(tc.length);\n for (char c : tc) {\n Integer n = tm.get(c);\n if (n == null) n = 0;\n tm.put(c, n+1);\n }\n int l = 0, r = 0, count = 0;\n int start = 0, window = Integer.MAX_VALUE;\n for (r = 0; r < s.length(); r++) {\n char c = s.charAt(r);\n Integer n = tm.get(c);\n if (n == null) continue;\n tm.put(c, n-1);\n if (n <= 0) continue;\n count++;\n while (count == tc.length) {\n c = s.charAt(l++);\n n = tm.get(c);\n if (n == null) continue;\n tm.put(c, n+1);\n if (n < 0) continue;\n count--;\n int newWindow = r-l+2;\n if (newWindow <= window) {\n start = l-1;\n window = newWindow;\n }\n }\n }\n if (window == Integer.MAX_VALUE) return \"\";\n return s.substring(start, start + window);\n }",
"public int minCut2(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] cut = new int[1];\n cut[0] = Integer.MAX_VALUE;\n // List<List<String>> res = new ArrayList<>();\n helper2(s, 0, cut, dp, 0);\n // System.out.format(\"res: %s\\n\", res);\n return cut[0];\n }",
"public int minCut4(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n Map<Integer, Integer> memo = new HashMap<>();\n\n int[] res = new int[1];\n res[0] = Integer.MAX_VALUE;\n\n helper3(s, 0, res, 0, dp, memo);\n return res[0];\n }",
"public static String minimumWindow_Map(String s, String t) {\n\t\tif(s==null || t==null || s.length()==0 || t.length()==0 || s.length()<t.length()) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tMap<Character, Integer> pmap = new HashMap<>();\n\t\t// initialize the pattern frequency map\n\t\tfor(int i=0;i<t.length();i++) {\n\t\t\tchar c = t.charAt(i);\n\t\t\tpmap.put(c, pmap.getOrDefault(c, 0)+1);\n\t\t}\n\n\t\tMap<Character,Integer> foundMap = new HashMap<>();\n\t\tint start = 0;\n\t\tint minLength = Integer.MAX_VALUE;\n\t\tint startIndex = -1;\n\t\tint count = 0;\n\t\t\n\t\tfor (int end = 0; end < s.length(); end++) {\n\t\t\tif (pmap.containsKey(s.charAt(end))) {\n\t\t\t\tfoundMap.put(s.charAt(end), foundMap.getOrDefault(s.charAt(end), 0) + 1);\n\t\t\t\tif (foundMap.get(s.charAt(end)) <= pmap.get(s.charAt(end))) {\n\t\t\t\t\t++count;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (count == t.length()) {\n\t\t\t\tchar c = s.charAt(start);\n\t\t\t\twhile (foundMap.getOrDefault(c, 0) > pmap.getOrDefault(c, 0) || !pmap.containsKey(c)) {\n\t\t\t\t\tif (foundMap.getOrDefault(c, 0) > pmap.getOrDefault(c, 0)) {\n\t\t\t\t\t\tfoundMap.put(c, foundMap.get(c) - 1);\n\t\t\t\t\t}\n\t\t\t\t\t++start;\n\t\t\t\t\tc = s.charAt(start);\n\t\t\t\t}\n\t\t\t\tint currentLength2 = end - start + 1;\n\t\t\t\tif (minLength > currentLength2) {\n\t\t\t\t\tminLength = currentLength2;\n\t\t\t\t\tstartIndex = start;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn startIndex==-1 ? \"\": s.substring(startIndex, startIndex+minLength) ;\n\t}",
"public String minWindow(String S, String T) \n\t{\n\t\t\n\t int m = T.length(), n = S.length();\n\t int[][] dp = new int[m + 1][n + 1];\n\t for (int j = 0; j <= n; j++) \n\t dp[0][j] = j + 1;\n\t \n\t for (int i = 1; i <= m; i++) \n\t {\n\t for (int j = 1; j <= n; j++) \n\t {\n\t if (T.charAt(i - 1) == S.charAt(j - 1)) \n\t dp[i][j] = dp[i - 1][j - 1];\n\t else \n\t dp[i][j] = dp[i][j - 1];\n\t }\n\t }\n\n\t int start = 0, len = n + 1;\n\t for (int j = 1; j <= n; j++) \n\t {\n\t if (dp[m][j] != 0) \n\t {\n\t if (j - dp[m][j] + 1 < len) \n\t {\n\t start = dp[m][j] - 1;\n\t len = j - dp[m][j] + 1;\n\t }\n\t }\n\t }\n\t return len == n + 1 ? \"\" : S.substring(start, start + len);\n\t}",
"public String minWindow(String S, String T) {\n\t\tint[][] mat = new int[T.length()][S.length()];\n\t\t\n\t\tList<List<Integer>> lists = new ArrayList<List<Integer>>();\n\t\t\n\t\tList<Integer> toPrint = new ArrayList<Integer>();\n\t\t\n\t\tfor(int c=0; c<S.length(); c++) {\n\t\t\tmat[0][c] = T.charAt(0) == S.charAt(c) ? c : -1;\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int r=1; r<T.length(); r++) {\n\t\t\tList<Integer> curList = new ArrayList<Integer>();\n\t\t\tfor(int c=0; c<S.length(); c++) {\n\t\t\t\tint prev = -1;\n\t\t\t\tif(r > 0) \n\t\t\t\t\tprev = mat[r-1][c];\n\t\t\t\telse\n\t\t\t\t\tcurList.add(c);\n\t\t\t\t\n\t\t\t\tif(T.charAt(r) == S.charAt(c)) {\n\t\t\t\t\tmat[r][c] = c;\n\t\t\t\t\t\n\t\t\t\t\tif(prev != -1 && prev < c) {\n\t\t\t\t\t\tcurList.add(prev);\n\t\t\t\t\t\tcurList.add(c);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tmat[r][c] = -1;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tlists.add(curList);\n\t\t}\n\t\t\n\t\tint end = -1;\n\t\t\t\t\n\t\tfor(int r=T.length()-1; r>=0; r--) {\n\t\t\tint c = S.length()-1;\n\t\t\t\n\t\t\t\tif(mat[r][c] != -1) {\n\t\t\t\t\tend = c;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\treturn \"\";\n }",
"public int minCut(String s) {\n boolean[][] isPal = new boolean[s.length()][s.length()];\n for (int r = 0; r < s.length(); r++) {\n for (int l = 0; l <= r; l++) {\n isPal[l][r] = s.charAt(l) == s.charAt(r) && (l + 1 > r - 1 || isPal[l + 1][r - 1]);\n }\n }\n\n int[] dp = new int[s.length() + 1];\n Arrays.fill(dp, Integer.MAX_VALUE);\n // base case. s.substring(0, 0); empty string. means this cut is\n // invalid/unnecessary.\n dp[0] = -1;\n // base case. s.substring(0, 1); the first character\n dp[1] = 0;\n\n for (int r = 1; r < s.length(); r++) {\n for (int l = 0; l <= r; l++) {\n if (isPal[l][r]) {\n dp[r + 1] = Math.min(dp[r + 1], 1 + dp[l]);\n }\n }\n }\n\n return dp[s.length()];\n }",
"public String minimumWindowSubstring(String s, String t) {\n\t\tif (s == null || t == null || s.length() < t.length() || t.length() == 0) return \"\";\n\t\tint[] charCnt = new int[256];\n\t\tint cnt = 0; // the number of different characters in t\n\t\tfor (char c: t.toCharArray()) {\n\t\t\tif (charCnt[c] == 0) cnt++;\n\t\t\tcharCnt[c]++;\n\t\t}\n\t\tchar[] S = s.toCharArray();\n\t\tString res = \"\";\n\t\tfor (int start = 0, end = 0; start < S.length; start++) {\n\t\t\twhile(end < S.length && cnt != 0) {\n\t\t\t\tcharCnt[S[end]]--;\n\t\t\t\tif (charCnt[S[end]] == 0) cnt--;\n\t\t\t\tend++;\n\t\t\t}\n\t\t\tif (cnt == 0 && \n\t\t\t (res.length() == 0 || res.length() > end - start)) res = s.substring(start, end);\n\t\t\tif (charCnt[S[start]] == 0) cnt++;\n\t\t\tcharCnt[S[start]]++;\n\t\t}\n\t\treturn res;\n\t}",
"private static void longestSubstringAllUnique(String s) {\n\t\tif(s == null || s.length() == 0) {\n\t\t\tSystem.out.println(\"\");\n\t\t\treturn;\n\t\t}\n\t\t//sliding window : 2 pointers (one is use for traverse)\n\t\tint l = 0;\n\t\tSet<Character> set = new HashSet<>();//keep track of current window char\n\t\tint longest = 0;\n\t\t\n\t\tfor(int r = 0; r < s.length(); r++) {\n//\t\t\tif(set.contains(s.charAt(r))) {\n//\t\t\t\twhile(set.contains(s.charAt(r))) {\n//\t\t\t\t\tset.remove(s.charAt(l));\n//\t\t\t\t\tl++;\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t\n\t\t\twhile(set.contains(s.charAt(r))) {//set == itself give distinct key: our requirement is all distinct \n\t\t\t\tset.remove(s.charAt(l));\n\t\t\t\tl++;\n\t\t\t}\n\t\t\t\n\t\t\tset.add(s.charAt(r));\n\t\t\tint currentWindowSize = r - l + 1;\n\t\t\tlongest = Math.max(longest, currentWindowSize);\n\t\t}\n\t\tSystem.out.println(longest);\n\t}",
"public long distinctSubstring() {\n long ans = 1;\n int n = rank.length;\n for (int i = 0; i < n; i++) {\n long len = n - i;\n if (rank[i] < n - 1) {\n len -= lcp[rank[i]];\n }\n ans += len;\n }\n return ans;\n }",
"public int minCut3(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] memo = new int[s.length() + 1];\n Arrays.fill(memo, -1);\n\n int[] res = new int[1];\n res[0] = Integer.MAX_VALUE;\n\n helper3(s, 0, res, 0, dp, memo);\n return res[0];\n }",
"public char FirstAppearingOnce(){\n int minIndex = Integer.MAX_VALUE;\n char ch = '#';\n for(int i=0;i<256;i++){\n if(occurrence[i]>=0){\n if(occurrence[i]<minIndex){\n minIndex = occurrence[i];\n ch = (char)i;\n }\n }\n }\n if(minIndex==Integer.MAX_VALUE)\n return '#';\n else\n return ch;\n }",
"public String minWindow(String S, String T) {\r\n\t\t// Note: The Solution object is instantiated only once and is reused by\r\n\t\t// each test case.\r\n\t\tif (T.length() > S.length()) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tMap<Character, Integer> table = new HashMap<Character, Integer>();\r\n\t\tchar[] ss = S.toCharArray();\r\n\t\tchar[] tt = T.toCharArray();\r\n\t\tMap<Character, Integer> ttable = new HashMap<Character, Integer>();\r\n\t\tArrayList<Character> cs = new ArrayList<Character>();\r\n\t\tfor (char c : tt) {\r\n\t\t\tif (ttable.containsKey(c)) {\r\n\t\t\t\tint num = ttable.get(c);\r\n\t\t\t\tttable.put(c, num + 1);\r\n\t\t\t} else {\r\n\t\t\t\tttable.put(c, 1);\r\n\t\t\t}\r\n\t\t\tcs.add(c);\r\n\t\t}\r\n\t\tint start = -1;\r\n\t\tint end = -1;\r\n\t\tString substring = \"\";\r\n\t\tfor (int i = 0; i < ss.length; i++) {\r\n\t\t\tif (ttable.keySet().contains(ss[i])) {\r\n\t\t\t\tif (-1 == start) {\r\n\t\t\t\t\tstart = i;\r\n\t\t\t\t}\r\n\t\t\t\tint num = ttable.get(ss[i]);\r\n\t\t\t\tif (num > 1) {\r\n\t\t\t\t\tttable.put(ss[i], num - 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tttable.remove(ss[i]);\r\n\t\t\t\t}\r\n\t\t\t\tif (ttable.isEmpty()) {\r\n\t\t\t\t\tend = i;\r\n\t\t\t\t\tsubstring = S.substring(start, end + 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} else if (cs.contains(ss[i])) {\r\n\t\t\t\tif (table.containsKey(ss[i])) {\r\n\t\t\t\t\tint num = table.get(ss[i]);\r\n\t\t\t\t\ttable.put(ss[i], num + 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttable.put(ss[i], 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (-1 == start || -1 == end) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tfor (start = start + 1; start <= ss.length - tt.length\r\n\t\t\t\t&& end < ss.length; start++) {\r\n\t\t\tif (!cs.contains(ss[start - 1])) {\r\n\t\t\t\tString tmp = S.substring(start, end + 1);\r\n\t\t\t\tif (tmp.length() < substring.length()) {\r\n\t\t\t\t\tsubstring = tmp;\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tif (table.containsKey(ss[start - 1])) {\r\n\t\t\t\t\tint num = table.get(ss[start - 1]);\r\n\t\t\t\t\tif (num > 1) {\r\n\t\t\t\t\t\ttable.put(ss[start - 1], num - 1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttable.remove(ss[start - 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString tmp = S.substring(start, end + 1);\r\n\t\t\t\t\tif (tmp.length() < substring.length()) {\r\n\t\t\t\t\t\tsubstring = tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfor (end = end + 1; end < ss.length; end++) {\r\n\t\t\t\t\t\tif (ss[start - 1] == ss[end]) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (cs.contains(ss[end])) {\r\n\t\t\t\t\t\t\tif (table.containsKey(ss[end])) {\r\n\t\t\t\t\t\t\t\tint num = table.get(ss[end]);\r\n\t\t\t\t\t\t\t\ttable.put(ss[end], num + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\ttable.put(ss[end], 1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (end < ss.length) {\r\n\t\t\t\t\t\tString tmp = S.substring(start, end + 1);\r\n\t\t\t\t\t\tif (tmp.length() < substring.length()) {\r\n\t\t\t\t\t\t\tsubstring = tmp;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn substring;\r\n\t}",
"public int minCut(String s) {\n if (s == null || s.length() < 2) return 0;\n int len = s.length();\n int[][] dp = new int[len][len];\n for (int i = 0; i < len; i++) {\n Arrays.fill(dp[i], len + 1);\n dp[i][i] = 0; // [i,i] is palindome, no need to cut\n }\n for (int l = 2; l <= len; l++) {\n for (int i = 0; i < len - l + 1; i++) {\n int j = l + i - 1;\n if (isPalindrome(i, j, s)) dp[i][j] = 0;\n else {\n for (int k = i; k < j; k++) {\n dp[i][j] = Math.min(dp[i][j], 1 + dp[i][k] + dp[k + 1][j]);\n }\n }\n }\n }\n\n return dp[0][len - 1];\n }",
"public int firstUniqChar(String s) {\n int n = s.length();\n int[] cnt = new int[26];\n int[] index = new int[26];\n Arrays.fill(index, n+1);\n \n // Keep the index \n for(int i=0; i<n; i++){\n cnt[s.charAt(i) - 'a']++;\n index[s.charAt(i) - 'a'] = i;\n }\n \n int minIndex = n+1;\n for(int i=0; i<26; ++i){\n if(cnt[i] > 1)\n continue;\n minIndex = Math.min(minIndex, index[i]);\n }\n return minIndex == n+1 ? -1 : minIndex;\n }",
"while (hi < s.length()) {\n if (/* maximum window - window is valid; min window - window is NOT valid */) {\n //move hi forward for one step + update count\n hi++;\n }",
"public static int minCuts(String input) {\n\t //corner case\n\t if (input.length() <= 1) {\n\t return 0;\n\t }\n\t //define space for dp\n\t int[] dp = new int[input.length()];\n\t for (int i = 1; i < input.length(); i++) {\n\t //dp[i] = 0;\n\t if (palindrome(input, 0, i)) {\n\t dp[i] = 0;\n\t continue;\n\t }\n\t //set default value\n\t dp[i] = Integer.MAX_VALUE;\n\t for(int j = 0; j < i; j++) {\n\t if (palindrome(input, j + 1, i)) {\n\t //dp[i] = dp[j] + 1;\n\t dp[i] = Math.min(dp[i], dp[j] + 1);\n\t }\n\t }\n\t }\n\t return dp[input.length() - 1];\n\t }",
"public char FirstAppearingOnce()\n {\n int minPos = Integer.MAX_VALUE;\n char ch = '#';\n for (int i = 0; i < map.length; i++) {\n if (map[i] >= 0) {\n if (map[i] < minPos) {\n minPos = map[i];\n ch = (char)i;\n }\n }\n }\n return ch;\n }",
"public int minCutII(String s) {\n if (s == null || s.length() < 2) return 0;\n int len = s.length();\n int[] cut = new int[len];\n boolean[][] palindrome = new boolean[len][len];\n for (int i = 0; i < len; i++) {\n int min = i;\n for (int j = 0; j <= i; j++) {\n if (s.charAt(i) == s.charAt(j) &&\n ((j + 1 > i - 1) || palindrome[j + 1][i - 1])) {\n palindrome[j][i] = true;\n min = j == 0 ? 0 : Math.min(min, cut[j - 1] + 1);\n }\n }\n cut[i] = min;\n }\n return cut[len - 1];\n }",
"public int minCut(String s) {\n boolean[][] b=table(s);\n int[] cut=new int[s.length()+1];\n cut[s.length()]=0;\n for(int i=s.length()-1;i>=0;i--){\n cut[i]=s.length()-i;\n for(int r=i;r<s.length();r++){\n if(b[i][r])\n cut[i]=Math.min(cut[r+1]+1,cut[i]);\n }\n }\n \n return cut[0]-1;\n }",
"public int minWordBreak(String s, Set<String> dict) {\n Map<String, List<String>> map = new HashMap<String, List<String>>();\n List<String> possibles = wordBreakHelper(s,dict,map);\n int minCut = s.length();\n for (String possible: possibles) {\n int cut = possible.split(\" \").length;\n if (minCut > cut)\n minCut = cut;\n }\n return minCut;\n}",
"public int minInsertions(String s) {\n int n = s.length();\n //Initialising dp array. It will represent the longest common subsequence between first i characters of first string and first j characters of second string\n int[][] dp = new int[n+1][n+1];\n \n //Looping through start and end of the string. Thus dp will consider the string from start and string from end and then store the ans\n for (int i = 0; i < n; ++i){\n for (int j = 0; j < n; ++j){\n \n //If both the characters are equal, then we increment the previous dp value otherwise we take max of the next character considered for both strings\n dp[i + 1][j + 1] = s.charAt(i) == s.charAt(n - 1 - j) ? dp[i][j] + 1 : Math.max(dp[i][j + 1], dp[i + 1][j]);\n } \n }\n //Returning ans\n return n - dp[n][n];\n }",
"public int minCuts(String input) {\n if (input.length() <= 1) {\n return 0;\n }\n int n = input.length();\n char[] arr = input.toCharArray();\n int[] minCut = new int[n + 1];\n\n // preproces, isP[start][end] represent if substring start - 1][end -1] is P\n // a string is P: single char; two char and same; same char at out + inner isP opp direction\n boolean [][] isP = new boolean[n + 1][n + 1];\n for (int e = 1; e < n + 1; e++) {\n minCut[e] = e - 1;\n for (int s = e; s > 0; s--) {\n if (arr[s - 1] == arr[e - 1]) {\n isP[s][e] = e - s < 2 || isP[s + 1][e - 1];\n }\n if (isP[s][e]) {\n minCut[e] = Math.min(minCut[e], minCut[s - 1] + 1);\n }\n }\n }\n return minCut[n];\n\n }",
"public static void main(String[] args)\n {\n String string = \"101101101\";\n int[][] dp = new int[string.length()+1][string.length() +1];\n int len = string.length();\n for (int i=0 ; i<= len ;i++) {\n for (int j=0 ;j<=len ;j++) {\n dp[i][j] = -1;\n }\n }\n System.out.println(minPartitions(string, 0, string.length() -1, dp));\n }",
"public static int minLength(String[] words) {\n ArrayList<String> minimized = new ArrayList<>();\n int len = words[0].length() + 1;\n minimized.add(words[0]);\n\n for (int i = 1; i < words.length; i++) {\n for (int j = 0; j < minimized.size(); j++) {\n if (encoded(minimized.get(j), words[i])) {\n break;\n }\n if (encoded(words[i], minimized.get(j))) {\n len -= minimized.get(j).length();\n minimized.remove(j);\n\n len += words[i].length();\n minimized.add(words[i]);\n break;\n }\n\n if (j == minimized.size() - 1) {\n minimized.add(words[i]);\n len += (words[i].length() + 1);\n break;\n }\n }\n }\n\n return len;\n }",
"@Test\n\tvoid testMinimumWindowSubstring() {\n\t\tassertEquals(\"BANC\", new MinimumWindowSubstring().minWindow(\"ADOBECODEBANC\", \"ABC\"));\n\t\tassertEquals(\"BECODEBA\", new MinimumWindowSubstring().minWindow(\"ADOBECODEBANC\", \"ABCB\"));\n\t\tassertEquals(\"aa\", new MinimumWindowSubstring().minWindow(\"aa\", \"aa\"));\n\t}",
"int max_cut_2(String s)\n {\n\n if(s==null || s.length()<2)\n {\n return 0;\n }\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cut = new int[n];\n for(int i = n-1;i>=0;i++) {\n\n //i represents the 左大段和右小段的左边界\n //j represents the 右小段的右边界\n cut[i] = n - 1 - i;\n\n for (int j = i; j < n; j++) {\n if (s.charAt(i) == s.charAt(j) && (j - i < 2 || dp[i + 1][j - 1]))\n {\n dp[i][j] = true;\n if(j == n-1)\n {\n cut[i]=0;\n }\n else{\n cut[i] = Math.min(cut[i],cut[j+1]+1);\n }\n }\n }\n }\n\n return cut[0];\n }",
"private static int firstUniqChar3(String s) {\n if (s == null || s.isEmpty()) {\n return -1;\n }\n\n int idx = Integer.MAX_VALUE;\n for (char c = 'a'; c <= 'z'; c++) {\n int first = s.indexOf(c);\n int last = s.lastIndexOf(c);\n\n if (first != -1 && first == last) {\n idx = Math.min(idx, first);\n }\n }\n\n return idx == Integer.MAX_VALUE ? -1 : idx;\n }",
"public List<Integer> partitionLabels(String S) {\n List<Integer> sizes = new ArrayList<>();\n\n int[] lastIndex = new int[26]; //cuz only lower case letters will be given to us\n\n //finding the lastIndexes of all the characters in the given string so that inside the loop start->end, we don't have to\n //do S.lastIndexOf('someCharacter') over & over cuz if we do that than the solution will be O(n^2) cuz string.lastIndexOf loops\n //through the string everytime it needs to find the last occurance & if the character happens to be at the end of the string\n //than it'll string.lastIndexOf would have to loop through the entire string over and over inside the start->end loop\n for(int i=0; i< S.length(); i++) {\n //subtracting the current character from a that's how we can map the lower case letters to an array of 26 Eg. 'a' -'a' = 0, 'b' -'a' = 1 so on and so forth. Otherwise we can also use an array of length 128 and loop from 97->122 but the array slots from 0->97 & 123->128 will be taking memory for nothing\n lastIndex[S.charAt(i) - 'a'] = i;\n }\n\n int start=0, end = 0, extendedEnd = 0;\n while(start < S.length()) {\n char startCharacter = S.charAt(start);\n end = lastIndex[startCharacter - 'a'];\n extendedEnd = end;\n\n for(int i=start; i<end; i++) {\n\n //checking if the current character that lies in the window start till end has last occurance index that's greater than current end, than we extend end.\n //NOTE: if we don't check the occurance like lastIndex[S.charAt(i)- 'a'] instead we check it like lastIndex[i], we won't be getting correct answer cuz lastIndex[] contains last occurances of characters from a-z\n //the characters in String S might not occur in the order a-z. They'll be jumbled across the string.\n //therefore in order to get the last occurance of current character, we do it like lastIndex[S.charAt(i)- 'a']\n if(lastIndex[S.charAt(i)- 'a'] > end) {\n extendedEnd = lastIndex[S.charAt(i)- 'a'];\n end = extendedEnd;\n }\n }\n\n sizes.add((extendedEnd - start + 1));\n start = extendedEnd + 1;\n }\n\n return sizes;\n }",
"public int firstUniqChar2(String s) {\r\n \r\n char[] arr= s.toCharArray();\r\n int index = -1;\r\n HashMap<Character, Integer> map = new HashMap<>();\r\n \r\n for (int i=0;i<arr.length;i++){\r\n if (map.containsKey(arr[i])){\r\n map.put(arr[i], -1);\r\n } else {\r\n map.put(arr[i],i);\r\n }\r\n }\r\n \r\n for (int i : map.values()){\r\n if (i >-1){\r\n if (index == -1){\r\n index = i;\r\n } else if (i<index) {\r\n index = i; \r\n }\r\n \r\n }\r\n }\r\n \r\n return index;\r\n }",
"public int minCut5(String s) {\n boolean[][] isPalindrome = new boolean[s.length()][s.length()];\n for (int r = 0; r < s.length(); r++) {\n for (int l = 0; l <= r; l++) {\n isPalindrome[l][r] = s.charAt(l) == s.charAt(r) && (l + 1 > r - 1 || isPalindrome[l + 1][r - 1]);\n }\n }\n\n int[] memo = new int[s.length()];\n Arrays.fill(memo, -1);\n\n return helper5(s, s.length() - 1, isPalindrome, memo);\n }",
"int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }",
"public static void main(String args[]) {\n\t\t\n\t\t//System.out.println(minWindow(\"ADOBECODEBANC\",\"ABC\"));\n\t\t//System.out.println(minWindow(\"AB\",\"B\"));\n\t\t//System.out.println(minWindow(\"BDAB\",\"AB\"));\n\t\t//System.out.println(minWindow(\"A\",\"AA\"));\n\t\tSystem.out.println(minWindow(\"ABC\",\"C\"));\n\t}",
"public List<Integer> findAnagrams(String s, String p) {\n List<Integer> ans = new ArrayList<>();\n if(s == null || \"\".equals(s) || p == null || \"\".equals(p) || p.length() > s.length()) return ans;\n // use map to track chars in p\n Map<Character, Integer> map = new HashMap<>();\n for (int i = 0; i < p.length(); i++) {\n // key is distinct char, value is times of current char appears\n map.put(p.charAt(i) , map.getOrDefault(p.charAt(i) , 0) + 1);\n }\n\n int len = p.length();\n // two pointers indicate window's left boundary and right boundary\n int left = 0;\n int right = 0;\n // counter indicates whether our window contains all chars or not\n int counter = map.size();\n\n while (right < s.length()){\n // pick out current char\n char cur = s.charAt(right);\n // check whether cur in map or not, if in, we find one so decrease counter\n if(map.containsKey(cur)){\n // update map\n map.put(cur, map.get(cur) - 1);\n if(map.get(cur) == 0)\n counter --;\n }\n // move right boundary of window forward\n right ++;\n\n // when counter equals to 0, it means that we have all chars in p in our current window,\n // then we'll try to make the window smaller by moving left pointer\n while (counter == 0){\n // check whether the char to remove is in map or not, if in, we need to increase counter\n char temp = s.charAt(left);\n if(map.containsKey(temp)){\n // update map\n map.put(temp, map.get(temp) + 1);\n if(map.get(temp) > 0)\n counter ++;\n }\n // check whether there is an answer before increase left\n if(right - left == len) ans.add(left);\n left ++;\n }\n }\n\n return ans;\n }",
"public int minFlipsMonoIncr(String S) {\n \n int n = S.length();\n int[] nLeftOnes = new int[n]; // inclusive\n \n int cnt = 0;\n for (int i = 0; i < n; i++) {\n if(S.charAt(i) == '1') {\n cnt++;\n }\n nLeftOnes[i] = cnt;\n }\n \n // scan for best partition\n // if we split to the right hand side of ith element\n // we need to flip all the left ones = nLeftOnes[i]\n // + all the right zeros = (n - nLeftOnes[n - 1]) - ((i + 1) - nLeftOnes[i])\n // corner case is flip all the zeros to one\n // that is (n - nLeftOnes[n - 1])\n \n int cMin = Integer.MAX_VALUE;\n for (int i = 0; i < n; i++) {\n cMin = Math.min(cMin, nLeftOnes[i] + (n - nLeftOnes[n - 1]) - ((i + 1) - nLeftOnes[i]));\n }\n cMin = Math.min(cMin, n - nLeftOnes[n - 1]);\n \n return cMin;\n \n }",
"public static List<String> commonChars(String[] A) {\n\n List<String> result = new ArrayList<>();\n if(A == null || A.length < 2){\n return result;\n }\n Map<Character, Integer> map = new HashMap<>();\n for(Character c : A[0].toCharArray()){\n map.put(c, map.getOrDefault(c,0) + 1);\n }\n\n for (int i = 1; i < A.length; i++) {\n Map<Character, Integer> tempMap = new HashMap<>();\n for(Character c : A[i].toCharArray()){\n tempMap.put(c, tempMap.getOrDefault(c,0) + 1);\n }\n if(map.isEmpty()){\n return result;\n }\n// map.entrySet().removeIf(entry -> tempMap.containsKey(entry.getKey()));\n\n\n\n Iterator<Map.Entry<Character, Integer>> iterator = map.entrySet().iterator();\n Map.Entry<Character, Integer> entry;\n Character key;\n while (iterator.hasNext()) {\n entry = iterator.next();\n key = entry.getKey();\n if(!tempMap.containsKey(key)){\n iterator.remove();\n }else{\n int tempVal = tempMap.get(key);\n map.put(key, entry.getValue() > tempVal ? tempVal : entry.getValue());\n }\n }\n\n }\n\n\n Integer num;\n for(Map.Entry<Character, Integer> entry : map.entrySet()){\n num = entry.getValue();\n for (int i = 0; i < num; i++) {\n result.add(entry.getKey().toString());\n }\n }\n\n return result;\n\n }",
"public int minCharacters(String a, String b) {\n int[] c1 = new int[26];\n int[] c2 = new int[26];\n for (char c: a.toCharArray()) {\n c1[c-'a']++;\n }\n for (char c: b.toCharArray()) {\n c2[c-'a']++;\n }\n\n // initialize res\n int m = a.length();\n int n = b.length();\n int res = m + n;\n\n // 1. make string a and b only consist of distinct character\n for (int i = 0; i < 26; ++i) {\n // means operations to change all characters(m+n) to character i (c1[i] and c2[i])\n res = Math.min(res, m + n - c1[i] - c2[i]);\n }\n\n // cal prefix sum\n // this prefix sum represents the frequency of all characters less than i;\n for (int i = 1; i < 26; ++i) {\n c1[i] += c1[i - 1];\n c2[i] += c2[i - 1];\n }\n\n // 2,3 a less than b or b less than a\n // why the up-limit is 25? cos, the character 'z' can not be the base character. there is no one\n for (int i = 0; i < 25; ++i) {\n // c1[i] for freq of characters less than or equal to i in a\n // c2[i] for freq of characters less than or equal to i in b\n\n // 2. make a < b\n // replace all characters less or equal to i in `b` to larger ones and all characters grater than i in `a` to less ones\n res = Math.min(res, c2[i] + m - c1[i]);\n // 3. make a > b\n // replace all characters less or equal to i in `a` to larger ones and all characters grater than i in `b` to less ones\n res = Math.min(res, c1[i] + n - c2[i]);\n }\n return res;\n }",
"public String solution(String s) {\n\t\tStream<Character> tmp = s.chars().mapToObj(value -> (char)value);\n\t\treturn tmp.collect(Collectors.groupingBy(Function.identity(), Collectors.counting())).entrySet().stream().filter(characterLongEntry -> characterLongEntry.getValue() == 2).findFirst().get().getKey().toString();\n\t}",
"public int lengthOfLongestSubstringKDistinctImprvd(String s, int k) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n \n int[] map = new int[256];\n int j = 0;\n int distinctCt = 0;\n int maxLen = 0;\n\n for (int i = 0; i < s.length(); i++) {\n while (j < s.length()) {\n map[s.charAt(j)] += 1;\n if (map[s.charAt(j)] == 1) {\n distinctCt++;\n }\n j++;\n if (distinctCt > k) {\n break;\n }\n maxLen = Math.max(j- i, maxLen);\n }\n map[s.charAt(i)] -= 1;\n if (map[s.charAt(i)] == 0) {\n distinctCt--;\n }\n }\n\n return maxLen;\n}",
"private static int solution3(String s) {\r\n int n = s.length();\r\n Set<Character> set = new HashSet<>();\r\n int ans = 0, i = 0, j = 0;\r\n while (i < n && j < n) {\r\n if (!set.contains(s.charAt(j))) {\r\n set.add(s.charAt(j++));\r\n ans = Math.max(ans, j - i);\r\n } else {\r\n set.remove(s.charAt(i++));\r\n }\r\n }\r\n return ans;\r\n }",
"public int minCuts1(String input) {\n\t\t //corner case\n\t\t if (input.length() <= 1) {\n\t\t return 0;\n\t\t }\n\t\t boolean[][] matrix = createMatrix(input);\n\t\t int[] dp = new int[input.length()];\n\t\t for (int i = 1; i < input.length(); i++) {\n\t\t //dp[i] = 0;\n\t\t if (matrix[0][i]) {\n\t\t dp[i] = 0;\n\t\t continue;\n\t\t }\n\t\t //set default value\n\t\t dp[i] = Integer.MAX_VALUE;\n\t\t for(int j = 0; j < i; j++) {\n\t\t if (matrix[i][j]) {\n\t\t dp[i] = Math.min(dp[i], dp[j] + 1);\n\t\t }\n\t\t }\n\t\t }\n\t\t return dp[input.length() - 1];\n\t\t }",
"public int firstUniqChar(String s) {\r\n int res = s.length();\r\n for (char c = 'a'; c <= 'z'; c++) {\r\n int index = s.indexOf(c);\r\n if (index != -1 && index == s.lastIndexOf(c)) res = Math.min(res, index);\r\n }\r\n\r\n return res == s.length() ? -1 : res;\r\n }",
"public String getLowestChromKey();",
"private static int minimum() {\n\t\tint popSize = 0;\n\t\tChromosome thisChromo = null;\n\t\tChromosome thatChromo = null;\n\t\tint winner = 0;\n\t\tboolean foundNewWinner = false;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\tfoundNewWinner = false;\n\t\t\tpopSize = population.size();\n\t\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\t\tif (i != winner) { // Avoid self-comparison.\n\t\t\t\t\tthisChromo = population.get(i);\n\t\t\t\t\tthatChromo = population.get(winner);\n\t\t\t\t\tif (thisChromo.conflicts() < thatChromo.conflicts()) {\n\t\t\t\t\t\twinner = i;\n\t\t\t\t\t\tfoundNewWinner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (foundNewWinner == false) {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\treturn winner;\n\t}",
"String LetterCount(String str) {\n String strr1[]=str.split(\" \");\n String strr[]= strr1;\n String strt=\"\";\n int count=0;\n int count1=0;\n int maxi=0;\n \n for(int i=0; i<strr.length; i++){\n char[] crr=strr[i].toCharArray();\n java.util.Arrays.sort(crr);\n strt=new String(crr);\n for(int j=0; j<strt.length()-1; j++){\n while(strt.charAt(j)==strt.charAt(j+1) && j<strt.length()-2){\n count++;\n j++;\n }\n }\n if(count>count1){\n count1=count;\n maxi=i;\n }\n count=0;\n }\n return strr1[maxi];\n \n }",
"static int gemstones(String[] arr) \r\n {\r\n int i,j,k,v=-1,l=arr[0].length(),g2[]=new int[26],c=0;\r\n char g1[]=new char[26];\r\n for(i=0;i<26;i++)\r\n {\r\n g1[i]=(char)(97+i);\r\n g2[i]=0;\r\n }\r\n for(i=0;i<l;i++)\r\n for(j=0;j<26;j++)\r\n if(g1[j]==arr[0].charAt(i)) g2[j]+=1;\r\n for(i=0;i<26;i++)\r\n if(g2[i]>0) ++c;\r\n char s[]=new char[c];\r\n for(i=0;i<26;i++)\r\n if(g2[i]>0) s[++v]=g1[i];\r\n \r\n int ci[]=new int[c];\r\n for(i=0;i<c;i++)\r\n ci[i]=0;\r\n v=0;\r\n \r\n for(i=1;i<arr.length;i++)\r\n {\r\n for(k=0;k<c;k++)\r\n for(j=0;j<arr[i].length();j++)\r\n if(arr[i].charAt(j)==s[k]) {++ci[k];break;}\r\n }\r\n for(i=0;i<c;i++)\r\n if(ci[i]==arr.length-1) ++v;\r\n return v;\r\n }",
"public int firstUniqChar(String s) {\n Map<String, Integer> occurMap = new LinkedHashMap<>();\n for (int i = 0; i < s.length(); i++) {\n String si = s.substring(i, i + 1);\n if (occurMap.containsKey(si)) {\n if (occurMap.get(si) > -1) {\n occurMap.put(si, -1);\n }\n } else {\n occurMap.put(si, i);\n }\n }\n for (Integer idx : occurMap.values()) {\n if (idx > -1) {\n return idx;\n }\n }\n return -1;\n }",
"public static void main(String[] args) {\n\t\tString S = \"abbbb\";\r\n\t\tString T = \"aa\";\r\n\r\n\t\tString sub = new MinimumWindowSubstring().minWindow(S, T);\r\n\r\n\t\tSystem.out.println(sub);\r\n\t}",
"public int lengthOfLongestSubstringTwoDistinct(String s) {\n if(s == null || s.length() == 0)\n return 0;\n \n //corner case\n int n = s.length();\n if(n < 3)\n return n;\n \n int left = 0;\n int right = 0;\n HashMap<Character,Integer> sMap = new HashMap<>(); // HashMap storing Character, rightmost position\n int maxLen = 2;\n \n while(right < n) {\n // when the slidewindow contains less than three characters\n sMap.put(s.charAt(right), right++);\n \n // when the slidewindow contains three characters\n if(sMap.size() == 3) {\n int i = Collections.min(sMap.values());\n sMap.remove(s.charAt(i)); // remove leftmost character\n left = i+1;\n }\n maxLen = Math.max(maxLen, right - left);\n }\n return maxLen;\n }",
"private String removeAlphabets(String s, int k) {\n int windowSize=k;\n Stack<Character>st=new Stack<>();\n Stack<Integer> count=new Stack<>();\n char[] chars = s.toCharArray();\n for (char ch:chars){\n if(st.isEmpty() || !st.isEmpty() && ch!=st.peek()){\n st.push(ch);\n count.push(1);\n }\n else if(!st.isEmpty() && !count.isEmpty() && ch==st.peek()){\n st.push(ch);\n count.push(count.peek()+1);\n if(count.peek()==k){\n while (k>0){\n count.pop();\n st.pop();\n k--;\n }\n k=windowSize;\n }\n }\n\n }\n StringBuffer sb=new StringBuffer();\n while (!st.isEmpty()){\n sb.append(st.pop());\n }\n return sb.reverse().toString();\n }",
"private static int firstUniqChar1(String s) {\n int[] counts = new int[128];\n for (int i = 0; i < s.length(); i++) {\n int c = s.charAt(i);\n counts[c] = counts[c] + 1;\n }\n\n int uniqueIdx = -1;\n for (int i = 0; i < s.length(); i++) {\n if (counts[(int) s.charAt(i)] == 1) {\n uniqueIdx = i;\n break;\n }\n }\n\n return uniqueIdx;\n }",
"public int firstUniqChar(String s) {\n int[] freq = new int[26];\n \n for (char c : s.toCharArray())\n freq[c - 'a']++;\n \n for (int i = 0; i < s.length(); i++)\n if (freq[s.charAt(i) - 'a'] == 1) return i;\n \n return -1;\n }",
"private static int solution4(String s) {\r\n int n = s.length(), ans = 0;\r\n Map<Character, Integer> map = new HashMap<>();\r\n for (int j = 0, i = 0; j < n; j++) {\r\n if (map.containsKey(s.charAt(j)))\r\n i = Math.max(map.get(s.charAt(j)), i);\r\n ans = Math.max(ans, j - i + 1);\r\n map.put(s.charAt(j), j + 1);\r\n }\r\n return ans;\r\n }",
"static int alternate(String s) {\n HashMap<Character,Integer>mapCharacter = new HashMap<>();\n LinkedList<String>twoChar=new LinkedList<>();\n LinkedList<Character>arr=new LinkedList<>();\n Stack<String>stack=new Stack<>();\n int largest=0;\n int counter=0;\n if (s.length()==1){\n return 0;\n }\n\n for (int i =0; i<s.length();i++){\n if (mapCharacter.get(s.charAt(i))==null)\n {\n mapCharacter.put(s.charAt(i),1);\n }\n }\n\n Iterator iterator=mapCharacter.entrySet().iterator();\n while (iterator.hasNext()){\n counter++;\n Map.Entry entry=(Map.Entry)iterator.next();\n arr.addFirst((Character) entry.getKey());\n }\n\n for (int i=0;i<arr.size();i++){\n for (int j=i;j<arr.size();j++){\n StringBuilder sb =new StringBuilder();\n for (int k=0;k<s.length();k++){\n if (s.charAt(k)==arr.get(i)||s.charAt(k)==arr.get(j)){\n sb.append(s.charAt(k));\n }\n }\n twoChar.addFirst(sb.toString());\n }\n }\n\n\n for (int b=0;b<twoChar.size();b++){\n String elementIn=twoChar.get(b);\n stack.push(elementIn);\n\n for (int i=0;i<elementIn.length()-1;i++){\n\n if (elementIn.charAt(i)==elementIn.charAt(i+1)){\n stack.pop();\n break;\n }\n }\n }\n\n int stackSize=stack.size();\n\n for (int j=0;j<stackSize;j++){\n String s1=stack.pop();\n int length=s1.length();\n if (length>largest){\n largest=length;\n\n }\n }\n return largest;\n\n\n\n\n }",
"private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }",
"private String longestCommonPrefixVS(String[] strs){\n\t\tif (strs == null || strs.length == 0) return \"\";\n\t\t for (int i = 0; i < strs[0].length() ; i++){\n\t\t char c = strs[0].charAt(i);\n\t\t for (int j = 1; j < strs.length; j ++) {\n\t\t if (i == strs[j].length() || strs[j].charAt(i) != c)\n\t\t return strs[0].substring(0, i);\n\t\t }\n\t\t }\n\t\t return strs[0];\n\t}",
"public int findSubstringInWraproundString1(String p) {\n if(p == null || p.length() == 0) {\n return 0;\n }\n int pLength = p.length();\n // keep track of the number of consecutive letters for each substrings which starts from a...z\n int[] consecutiveNumberFrom = new int[26]; \n consecutiveNumberFrom[p.charAt(0) - 'a'] = 1;\n // keep track of the number of legacy consecutive letters\n int[] consecutiveCount = new int[pLength];\n consecutiveCount[0] = 1;\n int result = 1;\n for(int i = 1; i < pLength; i++) {\n consecutiveCount[i] = isConsecutive(p.charAt(i - 1), p.charAt(i))\n ? consecutiveCount[i - 1] + 1\n : 1;\n for(int j = i - consecutiveCount[i] + 1; j <= i; j++) {\n if(consecutiveNumberFrom[p.charAt(j) - 'a'] < i - j + 1) {\n result++;\n consecutiveNumberFrom[p.charAt(j) - 'a']++;\n } else {\n break;\n }\n }\n }\n return result;\n }",
"private static String longestCommonPrefix(String[] strs) {\n\t\tif (strs == null || strs.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tint minLen = Integer.MAX_VALUE;\n\t\tfor (String str : strs) {\n\t\t\tif (minLen > str.length()) {\n\t\t\t\tminLen = str.length();\n\t\t\t}\n\t\t}\n\t\tif (minLen == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tfor (int j = 0; j < minLen; j++) {\n\t\t\tchar prev = '0';\n\t\t\tfor (int i = 0; i < strs.length; i++) {\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tprev = strs[i].charAt(j);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (prev != strs[i].charAt(j)) {\n\t\t\t\t\treturn strs[i].substring(0, j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strs[0].substring(0, minLen);\n\t}",
"private String getCountryWithMostNumberOfBordersShared(HashSet<String> countriesConquered) {\r\n\t\tString weakestCountry = \"\";\r\n\t\tInteger maxNeighbours = Integer.MIN_VALUE;\r\n\t\t\r\n\t\tfor(String country : countriesConquered) {\r\n\t\t\tInteger enemyNeighbours = 0;\r\n\t\t\tfor(String adjacentCountry : this.gameData.gameMap.getAdjacentCountries(country)) {\r\n\t\t\t\tif(this.gameData.gameMap.getCountry(adjacentCountry).getCountryConquerorID() != this.playerID) {\r\n\t\t\t\t\tenemyNeighbours++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(enemyNeighbours > maxNeighbours) {\r\n\t\t\t\tmaxNeighbours = enemyNeighbours;\r\n\t\t\t\tweakestCountry = country;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn weakestCountry;\r\n\t\t\r\n\t}",
"static String reverseShuffleMerge(String s) {\r\n resultString = new char[s.length()/2];\r\n inputString = s;\r\n \r\n for (int i = 0; i < s.length(); i++) {\r\n charCounts.put(s.charAt(i), charCounts.getOrDefault(s.charAt(i),0)+1);\r\n initialCharCounts.put(s.charAt(i), initialCharCounts.getOrDefault(s.charAt(i),0)+1);\r\n }\r\n \r\n for (int i = s.length()-1; i >= 0; i--) {\r\n if(resultStringIndex >= s.length()/2) {\r\n break;\r\n }\r\n \r\n if(minCharacter > s.charAt(i) && usedCharCounts.getOrDefault(s.charAt(i),0) < initialCharCounts.get(s.charAt(i))/2) {\r\n minCharacter = s.charAt(i);\r\n }\r\n \r\n if(initialCharCounts.get(s.charAt(i))/2 < charCounts.get(s.charAt(i)) + usedCharCounts.getOrDefault(s.charAt(i), 0) ) {\r\n possibleCharsList.add(s.charAt(i));\r\n }\r\n else {\r\n if(minCharacter >= s.charAt(i)) {\r\n addResultString(s.charAt(i));\r\n if(resultStringIndex >= s.length()/2) {\r\n break;\r\n }\r\n else {\r\n if(minCharacter != Character.MAX_VALUE && minCharacter != s.charAt(i)) {\r\n addResultString(minCharacter);\r\n }\r\n }\r\n }\r\n else {\r\n if(possibleCharsList.size()>0) {\r\n checkandAddPossibleChars(s,i);\r\n }\r\n \r\n if(resultStringIndex >= s.length()/2) {\r\n break;\r\n }\r\n else {\r\n addResultString(s.charAt(i));\r\n }\r\n }\r\n minCharacter = Character.MAX_VALUE;\r\n possibleCharsList.clear();\r\n }\r\n \r\n charCounts.put(s.charAt(i), charCounts.get(s.charAt(i))-1);\r\n }\r\n \r\n System.out.println(String.valueOf(resultString));\r\n return String.valueOf(resultString);\r\n\r\n\r\n }",
"static String lexography(String s,int k) {\n\t\tString smallest=\"\";\n\t\tString largest=\"\";\n\t\tString temp=\"\";\n\t\tsmallest=largest=s.substring(0, k);\n\t\tint x;\n\t\tfor(int i=1;i<=s.length()-k;i++)\n\t\t{\n\t\t\ttemp=s.substring(i,i+k);\n\t\t\t\n\t\t\tx=temp.compareTo(smallest);\n\t\t\tif(x<0) smallest=temp;\n\t\t\tx=temp.compareTo(largest);\n\t\t\tif(x>0) largest=temp;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t return smallest+\"\\n\"+largest;\n\t}",
"static int lcs(String s, String t)\n{\n\tint n = s.length(), m = t.length();\n\tint[][] dp = new int[n+1][m+1];\n\tfor(int i = 1; i<=n; i++)\n\t\tfor(int j = 1; j<=m; j++)\n\t\t{\n\t\t\tdp[i][j] = Math.max(dp[i-1][j], dp[i][j-1]);\n\t\t\tint cur = (s.charAt(i-1) == t.charAt(j-1)) ? 1 : 0;\n\t\t\tdp[i][j] = Math.max(dp[i][j], cur + dp[i-1][j-1]);\n\t\t}\n\treturn dp[n][m];\n}",
"static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }",
"static int countingValleys(int n, String s) {\n \n int count = 0;\n char ch;\n int down = -1;\n int up = 1;\n int[] steps = new int[s.length()];\n \n for(int i = 0; i< s.length()-1; i++){\n ch = s.charAt(i);\n if(ch == 'U'){\n count++;\n steps[i] = count; //up\n }\n else{\n count--;\n steps[i] = count; //down\n }\n }\n \n int min = 0;\n \n for(int i=1; i<steps.length; i++){\n if(steps[i]==0 && steps[i-1]!=1){\n min++; //count++\n }\n }\n\n return min; //count\n }",
"private static int firstUniqChar2(String s) {\n Map<Character, Integer> seen = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n seen.put(c, seen.getOrDefault(c, 0) + 1);\n }\n\n int uniqueIdx = -1;\n for (int i = 0; i < s.length(); i++) {\n if (seen.get(s.charAt(i)) == 1) {\n uniqueIdx = i;\n break;\n }\n }\n\n return uniqueIdx;\n }",
"public static int canArrangeWords(String arr[])\n {\n // INSERT YOUR CODE HERE\n for(int i=0;i<arr.length;i++){\n for(int j=0;j<arr.length-i-1;j++){\n if(arr[j].charAt(0)>arr[j+1].charAt(0)){\n String temp=arr[j];\n arr[j]=arr[j+1];\n arr[j+1]=temp;\n }\n }\n }\n for(int i=1;i<arr.length;i++){\n if(arr[i].charAt(0)!=arr[i-1].charAt(arr[i-1].length()-1)){\n return -1;\n }\n }\n return 1;\n }",
"public static int[] buildZ(char[] a) {\n int n = a.length;\n int[] z = new int[n];\n if (n == 0) return z;\n z[0] = n;\n int l = 0, r = 0;\n for (int i = 1; i < n; i++) {\n if (i > r) {\n l = r = i;\n while (r < n && a[r - l] == a[r]) {\n r++;\n }\n z[i] = r - l;\n r--;\n } else {\n int k = i - l;\n if (z[k] < r - i + 1) {\n z[i] = z[k];\n } else {\n l = i;\n while (r < n && a[r - l] == a[r]) {\n r++;\n }\n z[i] = r - l;\n r--;\n }\n }\n }\n return z;\n }",
"private int dp(String s){\n\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cuts = new int[n];\n\n for(int i = 0; i < n; i ++){\n int min = i;\n for(int j = 0; j <= i; j ++){\n if(s.charAt(i) == s.charAt(j) && ( i - j < 2 || dp[i - 1][j + 1])){\n // String(j~i) is a palindrom\n //\n dp[i][j] = true;\n min = j == 0? 0 : Math.min(min, cuts[j - 1] + 1);\n }\n }\n cuts[i] = min;\n }\n return cuts[n - 1];\n }",
"public int findSubstringInWraproundString(String p) {\n if(p == null || p.length() == 0) {\n return 0;\n }\n // count[i] is the maximum unique substring that ends with a...z\n int[] count = new int[26];\n // keep track of the number of consecutive letters ended with current letter\n int consecutiveCount = 1;\n for(int i = 0; i < p.length(); i++) {\n if(i > 0 && isConsecutive(p.charAt(i - 1), p.charAt(i))) {\n consecutiveCount++;\n } else {\n consecutiveCount = 1;\n }\n int index = p.charAt(i) - 'a';\n count[index] = Math.max(count[index], consecutiveCount);\n }\n int result = 0;\n for(int singleCount : count) {\n result += singleCount;\n }\n return result;\n }",
"static int minSteps(int n, String B){\n // Complete this function\n int count=0;\n for(int i=0;i<n-2;i++){\n int j=i+1;\n int k=j+1;\n if(B.charAt(i) == '0' && B.charAt(j) == '1' && B.charAt(k) == '0'){\n count++;\n i=i+2;\n }\n }\n return count;\n }",
"LengthDistinct createLengthDistinct();",
"public static int findMinSubArray(int S, int[] arr) {\n int windowSum = 0, minLength = Integer.MAX_VALUE;\n int windowStart = 0;\n for (int windowEnd = 0; windowEnd < arr.length; windowEnd++) {\n windowSum += arr[windowEnd]; // add the next element\n // shrink the window as small as possible until the 'windowSum' is smaller than 'S'\n while (windowSum >= S) {\n minLength = Math.min(minLength, windowEnd - windowStart + 1);\n windowSum -= arr[windowStart]; // subtract the element going out\n windowStart++; // slide the window ahead\n }\n }\n\n return minLength == Integer.MAX_VALUE ? 0 : minLength;\n }",
"public static Entry[] startsWith(MaxFrequencyHeap h, char letter) {\r\n\t\tEntry[] top5 = new Entry[CAPACITY];\r\n\r\n\t\tint counter = 0;\r\n\r\n\t\t// While our heap is not empty and we\r\n\t\t// havent found the top 5 words of the minimum length n\r\n\t\t// remove the max word from our heap\r\n\t\twhile(h.size()>0 && counter!=5){\r\n\r\n\t\t\tEntry current_entry = h.removeMax();\r\n\r\n\t\t\tString current_word = current_entry.getWord();\r\n\r\n\t\t\t// If the current entry word starts with the letter we are looking for\r\n\t\t\t// add the entry to our top5 array\r\n\t\t\tif(current_word.charAt(0)==letter){\r\n\r\n\t\t\t\ttop5[counter] = current_entry;\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn top5;\r\n\t}",
"public static int firstOccurrence(String s, String x) {\n int lens = s.length();\n int lenx = x.length();\n // base cases\n if (x.equals(s) || x.equals(\"*\")&&s.length()==1) return 0;\n if (x.isEmpty() || s.isEmpty()) return -1;\n\n int[][] dp = new int[lenx+1][lens+1];\n\n for(int i = 1;i<lenx+1;i++){\n for(int j = 1;j<lens+1;j++){\n //int max = Math.max(dp[i-1][j-1], Math.max(dp[i-1][j], dp[i][j-1]));\n int max= dp[i-1][j-1];\n if((s.charAt(j-1)==x.charAt(i-1))||x.charAt(i-1)=='*'){\n dp[i][j] = max+1;\n if(dp[i][j]==lenx){\n return j-lenx;\n }\n }else{\n dp[i][j]= max;\n }\n }\n }\n return -1;\n\n }",
"public int lengthOfLongestSubstringKDistinct(String s, int k) {\n Map<Character, Integer> map = new HashMap<>();\n int maxLenght = 0;\n\n int i = 0;\n int j = 0;\n int n = s.length();\n\n while (j < s.length()) {\n\n char c = s.charAt(j);\n if (map.containsKey(c)) {\n map.put(c, map.get(c) + 1);\n } else {\n map.put(c, 1);\n }\n\n if (map.size() <= k) {\n maxLenght = Math.max(maxLenght, j - i + 1);\n }\n\n if (map.size() > k) {\n\n while (map.size() > k && i < j) {\n char cx = s.charAt(i);\n map.put(cx, map.get(cx) - 1);\n if (map.get(cx) == 0) {\n map.remove(cx);\n }\n i++;\n }\n }\n\n j++;\n }\n\n return maxLenght;\n }",
"private static String miniBlow(char c, int n){\n\t\tString result = \"\";\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tresult += c;\n\t\t}\n\t\treturn result;\n\t}",
"public int firstUniqChar2(String s) {\n char[] chars = s.toCharArray();\n \n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (s.indexOf(c) == s.lastIndexOf(c)) return i;\n }\n \n return -1;\n }",
"public int minDeletionsToObtainStringInRightFormat3(String s) {\n // Go through the string, count the number of B at left side and the number of A at right side.\n // Then, find the minimum sum of left B and right A at each position.\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int n = s.length();\n int[] left = new int[n]; // number of B from left\n int[] right = new int[n]; // number of A from right\n left[0] = s.charAt(0) == 'B' ? 1 : 0;\n for (int i = 1; i < n; i++) {\n left[i] = left[i - 1];\n if (s.charAt(i) == 'B') {\n left[i]++;\n }\n\n }\n\n right[n - 1] = s.charAt(n - 1) == 'A' ? 1 : 0;\n for (int i = n - 2; i >= 0; i--) {\n right[i] = right[i + 1];\n if (s.charAt(i) == 'A') {\n right[i]++;\n }\n }\n\n int min = n;\n for (int i = 0; i < n; i++) {\n int count = 0;\n if (i == 0) {\n count = right[i + 1];\n } else if (i == n - 1) {\n count = left[i - 1];\n } else {\n count = left[i - 1] + right[i + 1];\n }\n min = Math.min(min, count);\n }\n\n return min;\n }",
"public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}",
"public void firstNonRepeated(String str){\n Map<Character, Integer> map = new LinkedHashMap<Character, Integer>();\n\n /*Input string convert to array of char*/\n char[] charArray = str.toCharArray();\n\n\n /*Iterating through array, count and put in hashmap */\n for(char c:charArray) {\n if (map.get(c) != null)\n map.put(c, map.get(c) + 1);\n else\n map.put(c, new Integer(1));\n }\n\n\n /*Iterating through map and check if there is character with just one occurrence*/\n Set<Character> keySet = map.keySet();\n for(Character key : keySet){\n if (map.get(key) == 1){\n System.out.println(\"Character is: \"+ key);\n System.exit(0);\n }\n }\n System.out.println(\"There are no characters with just one occurrence!\");\n }",
"private int find(String input) {\n int maxSubsequent = 0;\n int currentSubsequent = 1;\n\n String[] inputArray = input.split(\" \");\n List<Integer> numbers = new ArrayList<Integer>();\n\n for (String s : inputArray) {\n numbers.add(Integer.parseInt(s));\n }\n\n for (int i = 0; i < numbers.size() - 1; i++) {\n if (Math.abs((numbers.get(i + 1) - numbers.get(i))) == DIFFERENCE) {\n currentSubsequent++;\n } else {\n maxSubsequent = (currentSubsequent > maxSubsequent) ? currentSubsequent : maxSubsequent;\n currentSubsequent = 1;\n }\n }\n\n maxSubsequent = (currentSubsequent > maxSubsequent) ? currentSubsequent : maxSubsequent;\n\n return maxSubsequent;\n }",
"public static int Main()\n\t{\n\t\ts = (String)malloc(100000 * (Character.SIZE / Byte.SIZE));\n\t\tint[] count = new int[26];\n\t\tint[] p = new int[26];\n\t\tint n;\n\t\tchar cc;\n\t\tchar key = '-';\n\t\tint min = 100001;\n\t\tint i;\n\t\tString tempVar = ConsoleInput.scanfRead();\n\t\tif (tempVar != null)\n\t\t{\n\t\t\tn = Integer.parseInt(tempVar);\n\t\t}\n\t\tString tempVar2 = ConsoleInput.scanfRead(null, 1);\n\t\tif (tempVar2 != null)\n\t\t{\n\t\t\tcc = tempVar2.charAt(0);\n\t\t}\n\n\t\twhile (n-- != 0)\n\t\t{\n\t\t\ts = new Scanner(System.in).nextLine();\n\t\t\tfor (i = 0;i < 26;i++)\n\t\t\t{\n\t\t\t\tcount[i] = 0;\n\t\t\t\tp[i] = 100001;\n\t\t\t}\n\t\t\tfor (i = 0;i < s.length();i++)\n\t\t\t{\n\t\t\t\tcount[*(s.Substring(i)) - 'a']++;\n\t\t\t\tif (p[*(s.Substring(i)) - 'a'] > i)\n\t\t\t\t{\n\t\t\t\t\tp[*(s.Substring(i)) - 'a'] = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tkey = '-';\n\t\t\tmin = 100001;\n\t\t\tfor (i = 0;i < 26;i++)\n\t\t\t{\n\t\t\t\tif (count[i] == 1 && p[i] < min)\n\t\t\t\t{\n\t\t\t\t\tkey = 'a' + i;\n\t\t\t\t\tmin = p[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (key == '-')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"no\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%c\\n\",key);\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}",
"public static int firstUniqChar(String s) {\n Map<Character, Integer> map = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (map.containsKey(c)) {\n map.put(c, map.get(c) + 1);\n } else {\n map.put(c, 1);\n }\n }\n\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (map.get(c) == 1) {\n return i;\n }\n }\n return -1;\n\n }",
"public static int longestConsecutive(int[] num) {\n // Start typing your Java solution below\n // DO NOT write main() function\n \n if(num == null || num.length == 0) return 0;\n \n int min = Integer.MAX_VALUE;\n int max = Integer.MIN_VALUE;\n for(int i= 0; i< num.length; i++){\n if(num[i] > max){\n max = num[i];\n }\n if(num[i] < min){\n min = num[i];\n }\n }\n \n int range = max - min +1;\n BitSet bs = new BitSet(range);\n System.out.println(\"range \" + range);\n \n for(int i=0; i< num.length; i++){\n bs.set(num[i] - min);\n }\n \n int maxCount = 0;\n int start = -1;\n int i = 0;\n \n System.out.println(\"bs size \" + bs.size());\n while(i < bs.size() && !bs.get(i)){\n i++;\n }\n if(i < bs.size()){\n start = i;\n maxCount = 1;\n }\n \n //System.out.println(\"start \" + start + \" max \" + maxCount);\n for(int j=i+1; j< bs.size() && j >=1; j++){\n if(bs.get(j) != bs.get(j-1)){\n if(bs.get(j) && start == -1){\n start = j;\n }\n if(!bs.get(j) && start != -1){\n if(maxCount < j - start){\n maxCount = j - start;\n }\n start = -1;\n }\n //System.out.println(\"start \" + start + \" max \" + maxCount);\n \n }\n }\n return maxCount;\n }",
"static int minimumDistances(int[] a) {\n int l = a.length;\n Map<Integer, List<Integer>> map = new HashMap<>();\n for (int i = 0; i <l ; i++) {\n List<Integer> val = map.get(a[i]);\n if(val == null){\n val = new ArrayList<>();\n }\n val.add(i);\n map.put(a[i], val);\n }\n int min = Integer.MAX_VALUE;\n for (List<Integer> value:\n map.values()) {\n int c = value.size();\n if(c>1){\n for (int i = 0; i < c-1 ; i++) {\n min = Math.min(min, value.get(i+1)- value.get(i));\n }\n }\n }\n if(min == Integer.MAX_VALUE) min = -1;\n return min;\n\n\n }",
"public static int[] lcp(int[] sa, CharSequence s) {\n int n = sa.length;\n int[] rank = new int[n];\n for (int i = 0; i < n; i++)\n rank[sa[i]] = i;\n int[] lcp = new int[n - 1];\n for (int i = 0, h = 0; i < n; i++) {\n if (rank[i] < n - 1) {\n for (int j = sa[rank[i] + 1]; Math.max(i, j) + h < s.length()\n && s.charAt(i + h) == s.charAt(j + h); ++h)\n ;\n lcp[rank[i]] = h;\n if (h > 0)\n --h;\n }\n }\n return lcp;\n }",
"public int lengthOfLongestSubstringKDistinct(String s, int k) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int j = 0;\n int max = 0;\n int[] map = new int[256];\n int distinctCt = 0;\n\n for (int i = 0; i < s.length(); i++) {\n while( j < s.length()) {\n int ch = s.charAt(j);\n if (map[ch] == 0) {\n if (distinctCt + 1 > k) {\n break;\n }\n map[ch] = 1;\n distinctCt++;\n j++;\n } else {\n map[ch] += 1;\n j++;\n }\n }\n max = Math.max(max, j - i);\n map[s.charAt(i)] -= 1;\n if (map[s.charAt(i)] == 0) {\n distinctCt--;\n }\n }\n return max;\n }",
"private void repeatingCharacter(String input) {\n\t\tMap<Character,Integer> map = new HashMap<Character,Integer>();\n\t\t//O[n]\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\tmap.put(input.charAt(i),map.getOrDefault(input.charAt(i), 0)+1);\n\t\t}\n\t\t//o[n]\n\t\tint max = Collections.max(map.values());\n\t\tint secondMax = 0;\n\t\tchar output = 0;\n\t\t//o[n]\n\t\tfor(Map.Entry<Character, Integer> a : map.entrySet()) {\n\t\t\tif(a.getValue()<max && a.getValue()>secondMax) {\n\t\t\t\tsecondMax = a.getValue();\n\t\t\t\toutput = a.getKey();\n\t\t\t}\n\t\t}\n\t\tif(!(secondMax == max)) {\n\t\t\tSystem.out.println(output);\n\t\t}else {\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"private static char firstNonRepeatingCharacterV1(String str) {\n if(str == null) return '_';\n Map<Character, Integer> charCountMap = new HashMap<>();\n Set<Character> linkedHashSet = new LinkedHashSet<>();\n\n for(int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n if(charCountMap.containsKey(ch)) {\n charCountMap.put(ch, charCountMap.get(ch) + 1); // do not need this step\n } else {\n charCountMap.put(ch, 1);\n }\n }\n for(int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n if(charCountMap.get(ch) == 1) {\n return ch;\n }\n }\n return '_';\n }",
"public static void main(String[] args) {\n System.out.println(firstUniqChar(\"leetcode\")); //should return 0\n System.out.println(firstUniqChar(\"loveleetcode\")); //should return 2\n\n }"
] | [
"0.76478815",
"0.7391431",
"0.7223348",
"0.68603253",
"0.68307173",
"0.68225163",
"0.6800904",
"0.66722345",
"0.667093",
"0.6665123",
"0.66637677",
"0.66617584",
"0.6586895",
"0.6468341",
"0.6422334",
"0.6410915",
"0.63897854",
"0.63881",
"0.6375989",
"0.6311447",
"0.6265262",
"0.6231274",
"0.6203283",
"0.6146971",
"0.6123231",
"0.6107633",
"0.6103382",
"0.6098047",
"0.6017024",
"0.6016282",
"0.60117143",
"0.5925234",
"0.586508",
"0.5863288",
"0.58257484",
"0.58247304",
"0.58183396",
"0.5817058",
"0.57904375",
"0.57608044",
"0.56956553",
"0.5677863",
"0.56551814",
"0.564094",
"0.5628412",
"0.5604057",
"0.5601244",
"0.5579403",
"0.55569357",
"0.55513626",
"0.5545993",
"0.55444455",
"0.5512184",
"0.5491315",
"0.549025",
"0.5487689",
"0.5479919",
"0.5474223",
"0.54678035",
"0.5467194",
"0.54477614",
"0.54412425",
"0.5435948",
"0.54044116",
"0.537417",
"0.5353499",
"0.53491235",
"0.5327061",
"0.5317848",
"0.53108776",
"0.5288365",
"0.52880365",
"0.5280091",
"0.5271994",
"0.5264952",
"0.5259116",
"0.5250183",
"0.52409995",
"0.52176905",
"0.5208595",
"0.52023953",
"0.5196453",
"0.5180341",
"0.5178399",
"0.51694816",
"0.516769",
"0.5167054",
"0.5158021",
"0.5147726",
"0.51406413",
"0.513911",
"0.5137591",
"0.5122989",
"0.51164806",
"0.5114128",
"0.51116985",
"0.5110449",
"0.51076573",
"0.5104197",
"0.51012576"
] | 0.5634658 | 44 |
TODO Autogenerated method stub | public static void main(String[] args) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Remove o Cliente do SPACE se ele existir | public boolean removeClient(String nickname) {
try{
// Implementacao JavaSpaces
// if(space != null){
//
// Client client = new Client(nickname);
// Client clientFromSpace = (Client) space.take(client, null, Long.MAX_VALUE);
// Client clientFromMap = clients.get(nickname);
//
// if (!clientExists(clientFromSpace) && !clientExists(clientFromMap)) {
// return true;
// }
// }
Client clientFromMap = clients.remove(nickname);
if (clientExists(clientFromMap)) {
return true;
}
} catch (Exception e) {
System.err.println(e.getMessage());
return false;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String remove() \n {\n //TODO\n return \"\";\n }",
"protected final void removeChar()\n\t{\n\t\tif (showCaret && displayingCaret)\n\t\t{\n\t\t\tif (text.getText().length() > 1) text.setText(text.getText().substring(0, text.getText().length() - 2) + \"|\");\n\t\t}\n\t\telse if (text.getText().length() > 1) text.setText(text.getText().substring(0, text.getText().length() - 2) + \" \");\n\t}",
"@Override\n public void afterTextChanged(Editable s) {\n if (s.toString().length() == 1 && !s.toString().startsWith(\"3\")) {\n s.clear();\n }\n }",
"public void delete() {\n\t if (input.getSelectedText() != null){\n\t input.setText(input.getText().replace(\n\t input.getSelectedText(), \"\"));}\n\t}",
"private String eliminarEspaciosMayoresA1(String mensaje) {\n //Elimina todos los espacios mayores a 1 que se encuentren dentro del mensaje\n Pattern patron = Pattern.compile(\"[ ]+\");\n Matcher encaja = patron.matcher(mensaje);\n String resultado = encaja.replaceAll(\" \");\n return resultado;\n }",
"private static String clearSpaces(final String old) {\n return old.replace(\" \", \"\").replace(\"\\n\", \"\");\n }",
"public void trimDuplicatedNewline() {\n Utils.limitNewline(builder, 1);\n }",
"@Override\n\t\tpublic void removeUpdate(DocumentEvent e) {\n\t\t\tchar[] contraseņa;\n\t\t\tcontraseņa = contraseņa1.getPassword();\n\t\t\tif(contraseņa.length<8||contraseņa.length>12)\n\t\t\t{\n\t\t\t\tcontraseņa1.setBackground(Color.RED);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcontraseņa1.setBackground(Color.WHITE);\n\t\t\t}\n\t\t}",
"public void supprimerJoueur() {\n cercle.setStroke(Color.TRANSPARENT);\n isVisible = false;\n }",
"private String eliminarEspaciosInicialesFinales(String mensaje) {\n //Elimina todos los espacios que se encuentren al inicio o al final de la frace\n Pattern patron = Pattern.compile(\"^[ ]+|[ ]+$\");\n Matcher encaja = patron.matcher(mensaje);\n String resultado = encaja.replaceAll(\"\");\n return resultado;\n }",
"static void trimNL() {\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }",
"@Override\r\n\tpublic void removeField() {\n\t\tusernameField.setText(\"\");\r\n\t\tpassField.setText(\"\");\r\n\t}",
"public void unsetText()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(TEXT$18, 0);\n }\n }",
"public void removeCharacter(android.widget.Button button){\n int index;\n if(saisie[0] == button.getText().charAt(0)){\n index = 0;\n }else if(saisie[1] == button.getText().charAt(0)){\n index = 1;\n }else if(saisie[2] == button.getText().charAt(0)){\n index = 2;\n }else if(saisie[3] == button.getText().charAt(0)){\n index = 3;\n }else {\n index = 4;\n }\n // Supprmier le caractère\n saisie[index] = ' ';\n\n }",
"public void clearFrontendMid() {\n genClient.clear(CacheKey.frontendMid);\n }",
"void removeHadithText(Object oldHadithText);",
"public static String removePosessive(String line) {\n\t\tif (line.contains(\"'S\")) {\n\t\t\tline = line.replace(\"'S\", \"\");\n\t\t}\n\t\treturn line;\n\t}",
"public void text_clear()\n {\n C_ID.setText(\"\");\n C_Name.setText(\"\");\n C_NIC.setText(\"\");\n C_P_Id.setText(\"\");\n C_P_Name.setText(\"\");\n C_Address.setText(\"\");\n C_TelNo.setText(\"\");\n C_Age.setText(\"\");\n }",
"@Override\n\tpublic String spaceRemover(String input) {\n\t\treturn input.replaceAll(\"\\\\s+\",\"\");\n\n\t}",
"private void clearHocSinh() {\n\t\ttxtMa.setText(\"\");\n\t\ttxtTen.setText(\"\");\n\t\ttxtTuoi.setText(\"\");\n\t\ttxtSdt.setText(\"\");\n\t\ttxtDiaChi.setText(\"\");\n\t\ttxtEmail.setText(\"\");\n\t}",
"public String removeFirst() {\n\t\treturn removeAt(0);\n\t}",
"private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }",
"public void supprimerClient(String nom, String prenom) {\n\t\tIterator<Client> it = clients.iterator();\n\t\tboolean existant = true;\n\t\twhile (it.hasNext()) {\n\t\t\tClient client = it.next();\n\t\t\tif (nom == client.getNom() && prenom == client.getPrenom()) {\n\t\t\t\tit.remove();\n\t\t\t\tSystem.out.println(\"Le client \" + client.getNom() + \" \" + client.getPrenom() + \" a bien ´┐Żt´┐Ż supprim´┐Ż dans la base de donn´┐Żes\");\n\t\t\t\texistant = false;\n\t\t\t\tSystem.out.println(clients.size());\n\t\t\t}\n\t\t}\n\t\tif (existant == true) {\n\t\t\tSystem.out.println(\"Action impossible, ce client n'existe pas\");\n\t\t}\n\t}",
"public void ClearTextFieldCreate() {\n txtFGameName.setText(\"\");\n txtFMovements.setText(\"\");\n }",
"private void clear() {\r\n\t\tareaTexto.setText(\"\");\r\n\t}",
"private void removeClient () {\n AutomatedClient c = clients.pollFirstEntry().getValue();\n Nnow--;\n\n c.signalToLeave();\n System.out.println(\"O cliente \" + c.getUsername() + \" foi sinalizado para sair\");\n }",
"public String removeClient(Socket socket) {\n int length = clientsSockets.size();\n for (int i = 0; i < length; ++i) {\n if (clientsSockets.get(i).getClientSocket() == socket) {\n String clientName = clientsSockets.get(i).getNickname();\n clientsSockets.remove(i);\n return clientName;\n }\n }\n return null; // not found\n }",
"public static String removeQuebraLinha (String s) {\n\n\t\tif (StringUtils.isNotBlank(s)) {\n\n\t\t\ts = s.replaceAll(\"\\r\", \"\"); \n\t\t\ts = s.replaceAll(\"\\t\", \"\");\n\t\t\ts = s.replaceAll(\"\\n\", \"\");\n\t\t}\n\n\t\treturn s;\n\t}",
"@Override\n public void limpiar() {\n txtIdioma.setText(\"\");\n txtBusqueda.setText(\"\");\n }",
"public void jTextFieldRemoveUpdateGeneral(String sTipo,JTextField jTextField,DocumentEvent evt) { \t \r\n\t\ttry {\r\n\t\t\t//System.out.println(\"REMOVE\");\r\n\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,AnalisisTransaClienteConstantesFunciones.CLASSNAME);\r\n \t\t}\r\n }",
"public void deleteCharFromName() {\n \t\tif (playerName.length() > 0 && state == 4) {\n \t\t\tplayerName = playerName.substring(0, playerName.length() - 1);\n \t\t}\n \t}",
"private boolean isNoSpace(final String message) {\n\t\treturn message.contains(\"0 space\"); //$NON-NLS-1$\n\t}",
"private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {\n String cadena;\n cadena = campoDeNumeros.getText();\n \n if(cadena.length() >0) {\n cadena = cadena.substring( 0, cadena.length() -1);\n campoDeNumeros.setText(cadena);\n }\n }",
"public synchronized void clearMessage() {\n\t\tthis.commonTxtView.setText(\"\");\n\t}",
"static void removeClient(String username) {\n\t\tif (ConnectedClients.containsKey(username)) {\n\t\t\tConnectedClients.remove(username);\n\t\t\tActiveClients.remove(username);\n\t\t\tSystem.out.println(\"Active clients after removal\"+ActiveClients);\n\t\t\tDML0=new DefaultListModel();\n\t\t\tCurrentClients.setModel(DML0);\n\t\t\tDML0.addAll(ActiveClients);\n\t\t\tCurrentClients.setModel(DML0);\n\t\t}\n\t}",
"public void removeUpdate(DocumentEvent e) \n\t\t{\n\t\t\tchar[] contraseña=usuario2.getPassword();\n\t\t\t\n\t\t\tif(contraseña.length<=0) \n\t\t\t{\n\t\t\t\tusuario2.setBackground(Color.WHITE);//al borrar y no tener ningun caracter se pne blanco\n\t\t\t\tus.setText(\"por favor introduzca la contraseña\");\n\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tif(contraseña.length<8||contraseña.length>12) \n\t\t\t\t{\n\t\t\t\t\tusuario2.setBackground(Color.RED);//si contiene menor a 8 o mayor a 12 caracteres se pone rojo\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tusuario2.setBackground(Color.GREEN);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}",
"void imprimir(String s){\n\t\ttxtS.append(s+\"\\n\");\n\t}",
"private static String removeNewline(String content) {\n if (StringUtil.isNotEmpty(content)) {\n content = content.replaceAll(StringConstants.LF, EMPTY);\n content = content.replace(StringConstants.CR, EMPTY);\n return content;\n }\n return content;\n }",
"@Override\n public void afterTextChanged(Editable s) {\n String input = s.toString();\n if (input.length() > 0 && input.charAt(0) == '0') {\n s.replace(0, 1, \"\");\n }\n }",
"@Override\n public String trim(final String toTrim) {\n return replaceAll(toTrim, \"\\u00A0\", \" \").trim();\n }",
"public void addEmptyLine() {\n addLine(\"\");\n }",
"public void clearDropoffText(View v){\n \t\t((EditText)findViewById(R.id.dropoffText)).setText(\"\");\n \t}",
"private static String trim(String s) {\n return s.replace(\" \", \"\");\n }",
"private void removeClientFromDisplay(String clientIDToRemove) {\n\t\teventDisplayArea = (ViewGroup)findViewById(R.id.mainEventDisplayArea);\n\n\t\tView clientTextViewToRemove = clientDisplayMap.get(clientIDToRemove);\n\t\teventDisplayArea.removeView(clientTextViewToRemove);\n\t\tclientDisplayMap.remove(clientIDToRemove);\n\t}",
"@Override\n public void focusGained(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_acchol.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_acchol.setText(\"\");\n }\n }",
"public void clearPickupText(View v){\n \t\t((EditText)findViewById(R.id.pickupText)).setText(\"\");\n \t}",
"public String quitaespacios (String str) {\n\n str = repNull(str);\n str = str.trim();\n str = rep(str, \"[ ]{2,}\", \" \");\n\n return str;\n }",
"@FXML\n public void limpaCidade(){\n \ttxtNome.setText(\"\");\n \ttxtUf.getSelectionModel().clearSelection();\n }",
"private void removeSpaces(String[] lines) {\r\n for (int i = 0; i<lines.length; i++) {\r\n lines[i] = lines[i].strip();\r\n lines[i] = lines[i].replaceAll(\"\\\"\", \"\");\r\n }\r\n }",
"@Override\n public String comer(String c)\n {\n c=\"Gato No puede Comer Nada\" ;\n \n return c;\n }",
"static public final boolean ccIsAllNoneSpace(String pxLine){\n return VcStringUtility.ccNulloutString(pxLine)\n .matches(\"^\\\\S+$\");\n }",
"public void effacerConnectes() {\n connectes.setText(\"\");\n }",
"public void removerClienteDoBanco(){\n\t\tdao.removerCliente(doCadastroController);\r\n\t}",
"public void clearTitle(Player player) {\n\t\tsendTitle(player, Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0), \"\", \"\");\n\t}",
"@Override\n\t\tpublic void afterTextChanged(Editable s) {\n\t\t\tString text = s.toString();\n\t\t\tint len = s.toString().length();\n\t\t\tif (len == 1 && text.equals(\"0\")) {\n\t\t\t\ts.clear();\n\t\t\t}\n\n\t\t}",
"static void trimNL(String s) {\n StringBuilder sb = new StringBuilder(s);\n while(sb.length() > 0 && (sb.charAt(sb.length() - 1) == '\\u005cr' || sb.charAt(sb.length() - 1) == '\\u005cn'))\n sb.deleteCharAt(sb.length() - 1);\n }",
"@Override\r\n\t\tpublic void removeUpdate(DocumentEvent e) {\n\t\t\tMessage = t.getText();\r\n\t\t\tcanvas.repaint();\r\n\t\t\r\n\t\t}",
"@Override\n\tpublic boolean deleteSurroundingText(int leftLength, int rightLength)\n\t{\n\t\tNativeInterface.Activity.onKeyDown(KeyEvent.KEYCODE_DEL, this.delKeyDownEvent);\n\t\tNativeInterface.Activity.onKeyUp(KeyEvent.KEYCODE_DEL, this.delKeyUpEvent);\n\t\treturn super.deleteSurroundingText(leftLength, rightLength);\n\t}",
"public void clearText(){\n EditText userIdEntry = findViewById(R.id.userIDEntry);\n userIdEntry.getText().clear();\n }",
"private void clearTextField() {\n txtOrder.setText(\"\");\n txtName.setText(\"\");\n txtWeight.setText(\"\");\n txtGallon.setText(\"\");\n txtPersent.setText(\"\");\n txtPrice.setText(\"\");\n \n }",
"public static void processDeleteNames() {\r\n\t\tif (!IniSetup.enterNames.getText().equals(\"\")) {\r\n\t\t\tnames.remove((String) IniSetup.enterNames.getText());\r\n\t\t}\r\n\t}",
"private String eliminar_contenido_innecesario(String line) {\n \n \tint index_question = line.indexOf('?');\n\t\tint index_point = line.indexOf('.');\n\t\t\n\t\tline = ( index_question > 0 ) ? line.substring(0, index_question+1) : line;\n\t\tline = ( index_point > 0 ) ? line.substring(0, index_point+1) : line;\n\t\t\n \treturn line;\n }",
"void addEmptyCluster(String line) {\n String prefixRemoved = line.substring(line.indexOf(\"://\") + 3);\n String clusterName = prefixRemoved;\n clusterName = handleClusterNameChar(prefixRemoved, clusterName, \"/\");\n clusterName = handleClusterNameChar(prefixRemoved, clusterName, \";\");\n clusterName = handleClusterNameChar(prefixRemoved, clusterName, \"/\");\n if (clusterName.contains(\"$\")) {\n return;\n }\n addUpstreamServer(clusterName);\n }",
"@Override\n public void focusGained(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_usern.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_usern.setText(\"\");\n }\n }",
"public void clearMsgArea()\n\t{\n\t\tmsgArea.setEditable(true);\n\t\tmsgArea.setText(\"\");\n\t\tmsgArea.setEditable(false);\n\t}",
"private void btn_clearitemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_clearitemActionPerformed\n //Code to remove only item detailsdsfsdf\n txt_iniId.setText(\"\");\n cbo_iniName.setSelectedItem(0);\n txt_inQty.setText(\"\");\n }",
"public void jTextFieldRemoveUpdateGeneral(String sTipo,JTextField jTextField,DocumentEvent evt) { \t \r\n\t\ttry {\r\n\t\t\t//System.out.println(\"REMOVE\");\r\n\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,EvaluacionProveedorConstantesFunciones.CLASSNAME);\r\n \t\t}\r\n }",
"@Override\n public void afterTextChanged(Editable s) {\n\n if(!txt_codigo.getText().toString().equals(\"\")){\n //LLAMAR AL METODO QUE COMPRUEBA SI EL CODIGO INGRESADO ES VALIDO O NO (TRUE O FALSE)\n //IF(CODIGO ES VALIDO) ENTONCES TOAST = CODIGO AGREGADO ELSE CODIGOERRONEO\n\n //TXT.CODIGO.SETTEXT(\"\");\n }\n }",
"public void removeCopyrightMessage(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), COPYRIGHTMESSAGE, value);\r\n\t}",
"@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(!tfPolje.getText().trim().equals(\"\")){\r\n\t\t\ttfPolje.setBackground(Color.WHITE);\r\n\t\t}\r\n\t}",
"@Override\n public void focusGained(FocusEvent arg0) {\n if(jtxt_holderName.getText().contains(\"xxx\")){\n jtxt_holderName.setText(\"\");\n }\n }",
"public void delete(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //If a character is being removed from a single line\n if (characterIndex < currentText.getCharacterEdges().length - 1) {\n currentText = codeWindow.getTextLineController().backspace(currentText, characterIndex, false);\n }\n //If a newline character is being removed two lines need to be merged\n else if (lineIndex < texts.size() - 1) {\n currentText = codeWindow.getTextLineController().merge(currentText, codeWindow.getTextLineController().getCodeWindowTextLines().get(lineIndex + 1), codeWindow);\n }\n //The cursors position is unchanged\n }\n }",
"private String replaceSpaces(String value) {\r\n\t\treturn value.replace(\" \", \"_\");\r\n\t}",
"@Override\r\n\tpublic void keyTyped(KeyEvent e) {\n\t\tint c =e.getKeyCode();\r\n\t\tif (c == KeyEvent.VK_DELETE)\r\n\t\t{\r\n\t\t\tif(msg.length() > 0)\r\n\t\t\t{\r\n\t\t\tmsg.substring(0, msg.length()-2);\r\n\t\t\t}\r\n\t\t\trepaint();\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"private void addEspace() {\n simplePanel.add(new JLabel(\"\"));\n }",
"public static String delete(String str1,String str2){\n\t\tString newOne=str1.replace(str2, \"\");\n\t\treturn newOne;\n\t}",
"private static String removeSoftHyphens(String in) {\n String result = in.replaceAll(\"\\u00AD\", \"\");\n return result.length() == 0 ? \"-\" : result;\n }",
"public String prefixeEspace(final String espace) {\n return(null);\n }",
"private String quitarCaracteresNoImprimibles(String mensaje) {\n String newMensaje = \"\";\n int codigoLetra = 0;\n for (char letra : mensaje.toCharArray()) {\n codigoLetra = (int) letra;\n if (codigoLetra >= 32 && codigoLetra <= 128) {\n newMensaje += letra;\n }\n }\n return newMensaje;\n }",
"private String trimSponsorName( String sponsorName ){\r\n String dispSponsorName = sponsorName ;\r\n if( dispSponsorName == null ){\r\n dispSponsorName = \"\";\r\n //Modified for case#3341 - Sponsor Code Validation - start \r\n }else if( dispSponsorName.length() > 80 ){\r\n dispSponsorName = dispSponsorName.substring( 0, 80 ) + \"...\" ;\r\n }\r\n dispSponsorName = \" \"+dispSponsorName;\r\n //Modified for case#3341 - Sponsor Code Validation - end\r\n return dispSponsorName;\r\n }",
"public void delNomFromMac(Verbum w){\r\n\t\tw.macForm = w.macrons.substring(0, w.macrons.length()-w.nomFormLengh);\r\n\t\tif(w.macForm.length()>0){ //avoid index out of bounds\r\n\t\t\tif(w.macForm.charAt(w.macForm.length()-1)=='*'){\r\n\t\t\t\tw.macForm = w.macForm.substring(0, w.macForm.length()-2);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn;\r\n\t}",
"private void deleteClient()\n {\n System.out.println(\"Delete client with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteClient(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"public void clearDescription() {\r\n\r\n\t\tWebElement descField = McsElement.getElementByXpath(driver,\tDESCRIPTION_TXTAREA);\r\n\t\r\n\t\tdescField.sendKeys(\" \");\r\n\t\t\r\n\t\tdescField.clear();\r\n\t\t\r\n\t\tdescField.sendKeys(Keys.TAB);\r\n\t}",
"public String clearEntry();",
"public void clear()\r\n {\r\n \tdisplayUserInput = \" \";\r\n \t\r\n }",
"@Override\r\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif(!tfPolje.getText().trim().equals(\"\")){\r\n\t\t\ttfPolje.setBackground(Color.WHITE);\r\n\t\t}\r\n\r\n\t}",
"static String trimStart(String s) {\n StringBuilder sb = new StringBuilder(s);\n while(sb.length() > 0 && (sb.charAt(0) == '\\u005cr'\n || sb.charAt(0) == '\\u005cn'\n || sb.charAt(0) == '\\u005ct'\n || sb.charAt(0) == ' ')) {\n sb.deleteCharAt(0);\n }\n return sb.toString();\n }",
"public void jTextFieldRemoveUpdateGeneral(String sTipo,JTextField jTextField,DocumentEvent evt) { \t \r\n\t\ttry {\r\n\t\t\t//System.out.println(\"REMOVE\");\r\n\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,CostoGastoImporConstantesFunciones.CLASSNAME);\r\n \t\t}\r\n }",
"public void jTextFieldRemoveUpdateGeneral(String sTipo,JTextField jTextField,DocumentEvent evt) { \t \r\n\t\ttry {\r\n\t\t\t//System.out.println(\"REMOVE\");\r\n\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,FacturaPuntoVentaConstantesFunciones.CLASSNAME);\r\n \t\t}\r\n }",
"Curso eliminaCurso(String clave);",
"@Override\n public void afterTextChanged(Editable s) {\n //s.toString();\n if (!s.toString().isEmpty()) {\n czyNazwisko = true;\n } else\n czyNazwisko = false;\n pokazOblicz();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Utility.hideKeyBoard(editText, mContext);\n if (editText.getText().toString().trim().length() > 0) {\n client_name.setText(editText.getText().toString().trim());\n } else {\n client_name.setText(\"\");\n }\n }",
"public void jTextFieldRemoveUpdateGeneral(String sTipo,JTextField jTextField,DocumentEvent evt) { \t \r\n\t\ttry {\r\n\t\t\t//System.out.println(\"REMOVE\");\r\n\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,CierreCajaConstantesFunciones.CLASSNAME);\r\n \t\t}\r\n }",
"public void performDelete() {\n \t\tif (text.getSelectionCount() > 0)\n \t\t\ttext.insert(StringStatics.BLANK);\n \t\telse {\n \t\t\t// remove the next character\n \t\t\tint pos = text.getCaretPosition();\n \t\t\tif (pos < text.getCharCount()) {\n \t\t\t\ttext.setSelection(pos, pos + 1);\n \t\t\t\ttext.insert(StringStatics.BLANK);\n \t\t\t}\n \t\t}\n \t\tcheckSelection();\n \t\tcheckDeleteable();\n \t\tcheckSelectable();\n \t}",
"public static String removeSpace(String a){\n String b = \" \"; //STRING TO MAKE PALINDROME TEST\n for(int i =0; i<a.length();i++){ //WORK FOR MORE CASES\n if((int)a.charAt(i)==(int)b.charAt(0))\n a=a.substring(0,i)+a.substring(i+1);\n }\n return a;\n }",
"private void removeElementAndPrefix(final Element element) {\n final Element parentElement = element.getParentElement();\n final Text prefix = findPrefix(element);\n if (prefix != null) {\n final String newText = prefix.getText().replaceFirst(\"(?s)\\\\n[ \\\\t]*$\", \"\");\n if (newText.length() > 0) {\n prefix.setText(newText);\n } else {\n parentElement.removeNode(prefix);\n }\n }\n\n parentElement.removeNode(element);\n }",
"private void limpiar() {\r\n view.txtTexto.setText(\"\");\r\n }",
"public void clear() {\n lb.setText(\"\");\n }",
"public void jTextFieldRemoveUpdateGeneral(String sTipo,JTextField jTextField,DocumentEvent evt) { \t \r\n\t\ttry {\r\n\t\t\t//System.out.println(\"REMOVE\");\r\n\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,LibroContableConstantesFunciones.CLASSNAME);\r\n \t\t}\r\n }",
"public void jTextFieldRemoveUpdateGeneral(String sTipo,JTextField jTextField,DocumentEvent evt) { \t \r\n\t\ttry {\r\n\t\t\t//System.out.println(\"REMOVE\");\r\n\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,UtilidadTipoPrecioConstantesFunciones.CLASSNAME);\r\n \t\t}\r\n }",
"void unsetLeading();"
] | [
"0.5827178",
"0.58132184",
"0.57846075",
"0.5726527",
"0.57236177",
"0.5644165",
"0.5605464",
"0.55733466",
"0.55721813",
"0.54202974",
"0.54089725",
"0.538114",
"0.5346422",
"0.53405833",
"0.5307963",
"0.5281287",
"0.52695084",
"0.52588534",
"0.52587825",
"0.5257648",
"0.52355146",
"0.5227932",
"0.52249056",
"0.52247506",
"0.521713",
"0.52158123",
"0.5198863",
"0.5197164",
"0.5193798",
"0.5190003",
"0.51842606",
"0.51780343",
"0.5172871",
"0.5151018",
"0.5148457",
"0.5148288",
"0.51343834",
"0.5129699",
"0.5126181",
"0.51170903",
"0.51154244",
"0.5106861",
"0.51008236",
"0.50888",
"0.5088273",
"0.508053",
"0.5080495",
"0.5076774",
"0.50665283",
"0.5053592",
"0.50435364",
"0.5034636",
"0.50324076",
"0.50315017",
"0.5028541",
"0.5019271",
"0.5015332",
"0.5005679",
"0.5004499",
"0.50010633",
"0.5000927",
"0.50002456",
"0.499599",
"0.49920043",
"0.4990066",
"0.49890646",
"0.49884656",
"0.49833217",
"0.49800867",
"0.49651977",
"0.49636358",
"0.49607724",
"0.49571452",
"0.49541575",
"0.49540618",
"0.4944563",
"0.4942535",
"0.494101",
"0.49408683",
"0.49390814",
"0.49313954",
"0.49240038",
"0.49207026",
"0.49190497",
"0.49182048",
"0.49171722",
"0.49171355",
"0.4913197",
"0.4909549",
"0.49070054",
"0.48996454",
"0.48987854",
"0.48964193",
"0.48934728",
"0.48911566",
"0.48908126",
"0.4890537",
"0.4888354",
"0.4887714",
"0.48847142",
"0.4879769"
] | 0.0 | -1 |
Adiciona a sala no SPACE se ela nao existir | public boolean addRoom(String roomName) {
try{
if(rooms.contains(roomName)){ // ja existe
return false;
}
return rooms.add(roomName);
} catch (Exception e) {
System.err.println(e.getMessage());
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void adicionar(Pessoa pessoa){\n adicionar(raiz, pessoa);\n }",
"public void insere (String nome)\n {\n //TODO\n }",
"public String insertEscuela(Escuela escuela){\n String regInsertado = \"Registro Escuela #\";\n long contador = 0;\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"IDESCUELA\",escuela.getIdentificadorEscuela());\n contentValues.put(\"NOMESCUELA\", escuela.getNombreEscuela());\n contador = db.insert(\"ESCUELA\",null,contentValues);\n db.close();\n\n if(contador == -1 || contador == 0){\n regInsertado = \"Error al insertar Escuela. Registro duplicado.\";\n }else{\n regInsertado = regInsertado + contador;\n }\n return regInsertado;\n }",
"public static void insert(String s)\n {\n }",
"@Override\r\n\tpublic boolean addHA(String ha) {\n\t\treturn adi.addHA(ha);\r\n\t}",
"private void insertar(String nombre, String Contra) {\n ini.Tabla.insertar(nombre, Contra);\n AVLTree arbol = new AVLTree();\n Nod nodo=null;\n ini.ListaGen.append(0,0,\"\\\\\",nombre,\"\\\\\",\"\\\\\",arbol,\"C\",nodo); \n \n }",
"public boolean\tadd(String e) {\n\t\tboolean notExist = false;\n\t\tif (map.put(e, PRESENT)==null) {\n\t\t\tnotExist = true;\n\t\t}\n\t\treturn notExist;\n\t}",
"private void addWord(String s) {\n TrieNode node = root;\n for(int i = 0; i < s.length(); i++) {\n int index = s.charAt(i) - 'a';\n if (node.trieNodes[index] == null) {\n node.trieNodes[index] = new TrieNode();\n }\n node = node.trieNodes[index];\n }\n node.isLeave = true;\n }",
"@Override\n public void applyTextEspecie(String especieMascota) {\n if(!especieMascota.isEmpty())\n {\n especie = especieMascota;\n //Guarda la especie\n instanciaDB.getSpeciesDAO().insertSpecies(new Especie(especieMascota));\n }\n }",
"public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\t\tif (gameObj[5].size() == 0)\n\t\t{\n\t\t\tgameObj[5].add(new SpaceStation());\n\t\t\tSystem.out.println(\"SpaceStation added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A space station is already spawned\");\n\t\t}\n\t}",
"public boolean add(String key) {\n char[] characters = key.trim().toCharArray();\n\n TrieNode trieNode = root; // current trie node\n\n boolean alreadyExists = true;\n\n for (char ch : characters) {\n // get the character represent index from the current trie node\n int index = ch - 'a';\n if (trieNode.offsprings[index] == null) {\n trieNode.offsprings[index] = new TrieNode();\n alreadyExists = false;\n }\n\n trieNode = trieNode.offsprings[index];\n }\n\n trieNode.isRepresentACompleteWord = true;\n\n return alreadyExists;\n }",
"public void insert(String word) {\n Trie cur = this;\n int i = 0;\n while(i < word.length()) {\n int c = word.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n cur.tries[c] = new Trie();\n }\n cur = cur.tries[c];\n i++;\n }\n cur.hasWord = true;\n }",
"public void insert(String word) {\n TrieNode ptr = root;\n for(int i = 0;i < word.length();i++) {\n char c = word.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n ptr.child[c - 'a'] = new TrieNode();\n }\n ptr = ptr.child[c - 'a'];\n }\n ptr.is_end = true;\n }",
"public Boolean CreateStoreAdmin(String a, String b, Store s) {\n for (int i = 0 ; i <= SAlist.getStoreAdmins().size() -1 ; i++)\n {\n if (SAlist.getStoreAdmins().get(i).getID().equals(a))\n {\n System.out.println(\"ID alreday exists\");\n return false;\n }\n }\n StoreAdmin admin = new StoreAdmin(a, b, s);\n SAlist.getStoreAdmins().add(admin);\n try {\n SerialiseList();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n return true;\n }",
"public void insertBySName(String name, String sname, String no){\n\t\troot = insertBySName(root, name, sname, no);\n\t}",
"public void insert(String word) {\n TrieNode node = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (node.ch[c - 'a'] == null) {\n node.ch[c - 'a'] = new TrieNode();\n }\n node = node.ch[c - 'a'];\n }\n node.word = word;\n }",
"public void add (String word) {\n Trie pointeur ;\n\n if(word.length() != 0){\n String lettre = Character.toString(word.charAt(0));\n String ssChaine = word.substring(1);\n pointeur = this.fils.get(lettre);\n if(pointeur == null){\n pointeur = new Trie();\n this.fils.put(lettre,pointeur);\n\n }\n pointeur.add(ssChaine);\n if(ssChaine.length()==0){\n this.fin = true;\n }\n \n }\n \n }",
"public void insert(String word) {\n TrieNode node = root;\n\n for (char c: word.toCharArray()) {\n if (node.children[c - 'a'] == null) \n node.children[c - 'a'] = new TrieNode();\n\n node = node.children[c - 'a'];\n }\n\n node.word = word;\n }",
"static void add(String s) {\n if (s != null) {\n a.add(s);\n }\n }",
"public void insertDH(String s) {\n int key = Math.floorMod(oaat(s.toCharArray()), this.size);\n int step = Math.floorMod(fnv1a32(s.toCharArray()), this.size - 1) + 1;\n while (this.data[key] != null) {\n this.collisions++;\n key = Math.floorMod(key + step, this.size);\n }\n this.data[key] = s;\n }",
"public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (now.children[c - 'a'] == null) {\n now.children[c - 'a'] = new TrieNode();\n }\n now = now.children[c - 'a'];\n }\n now.hasWord = true;\n }",
"public boolean addWord(String word) {\n return false;\n }",
"public int addStorageplace (Storageplace pStorageplace){\r\n\t List<Storageplace> storageplaceList = getAll();\r\n\t boolean storageplaceExists = false;\r\n\t for(Storageplace storageplace: storageplaceList){\r\n\t if(storageplace.getStorageplaceName() == pStorageplace.getStorageplaceName()){\r\n\t \t storageplaceExists = true;\r\n\t break;\r\n\t }\r\n\t }\t\t\r\n\t if(!storageplaceExists){\r\n\t \t storageplaceList.add(pStorageplace);\r\n\t // Setup query\r\n\t String query = \"INSERT INTO storageplace(storageplace_name) VALUE(?);\";\r\n\t Connection conn = Database.connectMariaDb();\r\n\t try {\r\n\t\t\t\t// Setup statement\r\n\t\t\t\t PreparedStatement stmt = conn.prepareStatement(query);\r\n\t\t\t\t // Set values\r\n\t\t\t\tstmt.setString(1, pStorageplace.getStorageplaceName());\t\t\t\t\t\t\r\n\t\t\t\t// Execute statement\r\n\t\t\t\tstmt.executeUpdate();\t\t\t\t\r\n\t\t\t\t// Closing statement and connection\r\n\t\t\t\tstmt.close();\r\n\t\t\t\tDatabase.mariaDbClose();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tSystem.err.println(\"An SQL exception occured when trying to add a record to storageplace \" + e.getMessage());\r\n\t\t\t\treturn 0;\r\n\t\t\t}\t\t \r\n\t return 1;\r\n\t }\r\n\t return 0;\r\n\t }",
"public void insert(String word) {\n if (word == null || word.length() == 0)\n return;\n TrieNode node = root;\n char [] letters = word.toCharArray();\n for (int i=0; i < letters.length; i++) {\n int pos = letters[i] - 'a';\n if (node.son[pos] == null) {\n node.son[pos] = new TrieNode();\n node.son[pos].val = letters[i];\n }\n node = node.son[pos];\n }\n node.isEnd = true;\n }",
"public String insertGame(String nome, int exp){\n\t\tif( exp > 100 )\n\t\t\treturn \"Un gioco puo' fornire al massimo 100 punti esperienza!\";\n\t\t\n\t\tgioco = new Gioco(nome, exp);\n\t\t\n\t\ttry{\n\t\t\tnew GiocoDao().insertGame(gioco);\n\t\t\treturn \"Gioco inserito con successo!\";\n\t\t}\n\t\tcatch(SQLException e){\n\t\t\treturn \"Gioco gia' esistente.\";\n\t\t}\n\t}",
"public void insert(String word) {\n TrieNode cur = root;\n for(int i=0; i<word.length(); i++){\n int index = word.charAt(i)-'a';\n if(cur.children[index] == null)\n cur.children[index] = new TrieNode(word.charAt(i));\n cur = cur.children[index];\n if(i == word.length()-1)\n cur.isEnd = true;\n }\n }",
"public String insertAlum(Alumno alumno) //lo necesitaba\n {\n String regInsertado = \"Alumno: \";\n\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"CARNET\",alumno.getCarnet());\n contentValues.put(\"IDESCUELA\", alumno.getIdEscuela());\n contentValues.put(\"NOMESTUDIANTE\", alumno.getNombre());\n long contador = db.insert(\"ESTUDIANTE\",null,contentValues);\n db.close();\n\n if(contador > 0){\n regInsertado = regInsertado + contador;\n }else{\n regInsertado = \"Ya existe el alumno.\" + alumno.getCarnet();\n }\n return regInsertado;\n }",
"public void insert(String word){\n //initially curr is root\n TrieNode curr = root;\n for(int i=0; i<word.length(); i++){\n char c = word.charAt(i);\n //if char doesnot exist, add new trienode\n if(curr.children[c-'a'] == null){\n curr.children[c-'a'] = new TrieNode();\n }\n //curr++\n curr = curr.children[c-'a'];\n }\n //set curr.word to the word\n curr.word = word;\n }",
"public void insert(String word) {\n Node curr = root;\n\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n\n if(curr.children[c - 'a'] == null) {\n curr.children[c - 'a'] = new Node(c);\n }\n\n curr = curr.children[c - 'a'];\n }\n\n curr.isWord = true;\n }",
"public void insert(String word) {\n Trie root = this;\n for (char c : word.toCharArray()) {\n if (root.next[c - 'a'] == null) {\n root.next[c - 'a'] = new Trie();\n }\n root = root.next[c - 'a'];\n }\n root.word = word;\n }",
"public void databaseinsert() {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tSite site = new Site(Sid.getText().toString().trim(), Scou.getText().toString().trim());\n\t\tlong rowId = dbHlp.insertDB(site);\n\t\tif (rowId != -1) {\n\t\t\tsb.append(getString(R.string.insert_success));\n\n\t\t} else {\n\n\t\t\tsb.append(getString(R.string.insert_fail));\n\t\t}\n\t\tToast.makeText(Stu_state.this, sb, Toast.LENGTH_SHORT).show();\n\t}",
"public void addWord (String word) {\r\n word = word.toUpperCase ();\r\n if (word.length () > 1) {\r\n String s = validateWord (word);\r\n if (!s.equals (\"\")) {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered contained invalid characters\\nInvalid characters are: \" + s, \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n checkEasterEgg (word);\r\n words.add (word);\r\n Components.wordList.getContents ().addElement (word);\r\n } else {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered does not meet the minimum requirement length of 2\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"boolean insertarRol(String nombre) throws Exception;",
"boolean add(String val);",
"@Override\n public void applyTextRaza(String razaMascota) {\n if (!razaMascota.isEmpty())\n {\n /*Obtenemos el nombre se la especie que esta seleccionada en este momento para optener su id*/\n instanciaDB.getRazaDAO().insertBreed(new Raza(razaMascota,\n instanciaDB.getSpeciesDAO().getIdSpeciesByName(spiEspecie.getSelectedItem().toString())));\n\n }\n\n }",
"public void insert(String word) {\n Node currentNode = head;\n for (int i = 0; i < word.length(); i++) {\n char currentChar = word.charAt(i);\n if (currentNode.children.get(currentChar - 'a') == null) {\n currentNode.children.set(currentChar - 'a', new Node(false));\n }\n currentNode = currentNode.children.get(currentChar - 'a');\n }\n currentNode.setIsFinished(true);\n }",
"public void addNewLegalEntity(String string) {\n\t\t\r\n\t}",
"@Override\n\tpublic boolean atentica(String senha) {\n\t\treturn false;\n\t}",
"public void insert(String word) \n\t {\n\t \tTrieNode p = root;\n\t for(int i=0; i<word.length(); ++i)\n\t {\n\t \tchar c = word.charAt(i);\n\t \tif(p.children[c-'a']==null)\n\t \t\tp.children[c-'a'] = new TrieNode(c);\n\t \tp = p.children[c-'a'];\n\t }\n\t p.mark = true;\n\t }",
"public void inserirContato() {\n\t\tSystem.out.println(\"Digite o nome do novo contato: \");\n\t\tString contato = scanner.nextLine();\n\t\tlistaDeContatos.add(contato);\n\t}",
"public boolean nuevaHoja(String nombre) {\n if(wp.insertarHoja(nombre)){\n numhojas ++; \n return true;\n }\n return false;\n }",
"public void insert(String word) {\n TrieNode parent = root;\n for(int i=0; i<word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n\n // Character doesn't exist at the current level\n if (parent.children[index] == null) {\n TrieNode node = new TrieNode();\n parent.children[index] = node;\n parent = node;\n } else {\n parent = parent.children[index];\n }\n }\n parent.isLeaf = true;\n }",
"void Salvar(String nome) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public void insert(String s){\n\t\tinsertHelper(root, s);\n\t}",
"public void insert(String word) {\n TrieNode current = root;\n for(char c : word.toCharArray()){\n int index = c - 'a';\n if(current.childrens[index] == null)\n current.childrens[index] = new TrieNode(c);\n current = current.childrens[index];\n }\n current.eow = true;\n }",
"public void insertarAlimento (int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas, float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);",
"private void addshangping(int shangping_id, String shangping_name, float price, int loadnumber) {\n\t\t\r\n\t}",
"private void crearNave(String accion) {\n\t\tthis.naveCreada=true;\n\t\tpausa = false;\n\t\t\n\t\tString [] info = accion.split(\"#\");\n\t\tString [] xA = info[3].split(\"=\");\n\t\tString [] yA = info[4].split(\"=\");\n\t\tString [] vxA = info[5].split(\"=\");\n\t\tString [] vyA = info[6].split(\"=\");\n\t\tString [] anA = info[7].split(\"=\");\n\t\t\n\t\tdouble x = Double.valueOf(xA[1]);\n\t\tdouble y = Double.valueOf(yA[1]);\n\t\tdouble velocidadx = Double.valueOf(vxA[1]);\n\t\tdouble velocidady = Double.valueOf(vyA[1]);\n\t\tdouble an = Double.valueOf(anA[1]);\n\t\t\n\t\tthis.nave = new Nave (x, y, an, 0.2, 0.98, 0.05, 20, this);\n\t\tnave.setVelocidadX(velocidadx);\n\t\tnave.setVelocidadY(velocidady);\n\t}",
"public void insereInicio(String elemento) {\n No novoNo = new No(elemento, ini);\n ini = novoNo;\n }",
"gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Aa addNewAa();",
"public void insert(String word) {\n Node current = root;\n for (int i = 0; i < word.length(); ++i) {\n int c = word.charAt(i) - 'a';\n if (current.children[c] == null)\n current.children[c] = new Node(c);\n current = current.children[c];\n }\n current.isWord = true;\n }",
"public void insert(String word) {\n TrieNode curr = root;\n for(char c : word.toCharArray()) {\n int idx = c - 'a';\n if(curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }",
"public void insert(String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }",
"public void insert(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }",
"public void insert(String word) {\n TrieTree point = root;\n for(int i = 0; i < word.length(); i++){\n char ch = word.charAt(i);\n if(point.getChild(ch - 'a') == null){\n point.setChild(ch - 'a', ch);\n }\n point = point.getChild(ch - 'a');\n }\n point.setIsWord();\n }",
"public boolean add(String s){\n if(count == contents.length) {\n return false;\n }\n contents[count] = s;\n count++;\n return true;\n }",
"private boolean entrarSala() throws Exception {\n // Recebe ID do jogo, caso disponível\n this.idJogo = remoteApi.entrarSala(this.idJogador,jTextNome.toString());\n // Caso sala seja criada com sucesso, seta O para as jogadas\n if(this.idJogo!=-1) {\n this.marcador = marc_o;\n return true;\n }\n return false;\n }",
"public void addDoctor(String name, String lastname, String userName, String pass, String secAns)\r\n {\r\n\t try{\r\n\t\t // command to Insert is called with parameters\r\n\t String command = \"INSERT INTO DOCTORDATA (FIRSTNAME,LASTNAME,USERNAME,PASSWORD,SECURITYQN,SECURITYANS)\"+\r\n\t\t\t \"VALUES ('\"+name+\"', '\"+lastname+\"', '\"+userName+\"', '\"+pass+\"', '\"+\"What is Your favorite food?\"+\"', '\"+secAns+\"');\";\r\n\t stmt.executeUpdate(command);\r\n\t \r\n\t \r\n\t } catch (SQLException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t}\r\n\t \r\n }",
"public boolean add(String e) {\r\n \tSystem.out.println(e + \" \" + PRESENT);\r\n return map.put(e, PRESENT)==null;\r\n }",
"public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }",
"public static void instanciarSala(Sala sala) {\n\t\tsalas[contSalas] = sala;\n\t\tcontSalas++;\n\t}",
"public void insertar2(String nombre, String apellido, String mail, String celular, String comuna,String profesor,String alumno,String clave) {\n db.execSQL(\"insert into \" + TABLE_NAME + \" values (null,'\" + nombre + \"','\" + apellido + \"','\" + mail + \"','\" + celular + \"','\" + comuna + \"',\" + profesor + \",0,0,0,0,\" + alumno + \",'\" + clave + \"')\");\n }",
"@Override\n public void insert(final String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n final TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }",
"public void addWord(String word) {\n TrieNode node = root;\n char[] words = word.toCharArray();\n for (char c: words){\n if (node.children[c-'a'] == null){\n node.children[c-'a']=new TrieNode();\n }\n node = node.children[c-'a'];\n }\n node.item = word;\n }",
"public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }",
"public String inseriscinome()\n {\n String nome;\n \n do\n {\n System.out.println(\"--Inserisci il nome utente--\");\n nome=input.nextLine();\n }\n while(nome.isEmpty());\n \n return nome;\n }",
"@Test\n public void spacesInKeywordTest() {\n tester.correct(\"Laaa Laaa Laaaa Li\" );\n }",
"public void insert(String word) {\n TrieNode p = root;\n for (char c : word.toCharArray()) {\n int childIndex = (int)(c - 'a');\n if (p.children[childIndex] == null) {\n p.children[childIndex] = new TrieNode();\n }\n p = p.children[childIndex];\n }\n p.isWord = true;\n }",
"public static void addArquivo(String texto, String nomeArquivo){\n\t\ttry {\n\t\t\tboolean logExiste = false;\n\t\t\tFile file = new File(nomeArquivo);\n\t\t\tlogExiste = file.exists();\n\t\t\t\n\t\t\tFileWriter fw = new FileWriter(nomeArquivo, true);\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\n\t\t\tif (logExiste)\n\t\t\t\tbw.append(\"\\n\" + texto);\n\t\t\telse\n\t\t\t\tbw.write(texto);\n\t\t\t\n\t\t\t\n\t\t\tbw.close();\n\t\t\t\n\t\t\t}\n\t\t\tcatch (IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(\"Impossivel gravar no arquivo\");\n\t\t\t}\n\t}",
"private static boolean transactionAddGame(Transaction tx, GameBean newGame) {\n HashMap<String, Object> parameters = new HashMap<>();\n parameters.put(\"name\", newGame.getName());\n if(!newGame.getCategory1().equals(\"\")) {\n parameters.put(\"category1\", newGame.getCategory1() );\n\n String checkGame = \"MATCH (g:Game{name:$name})\" +\n \" RETURN g\";\n\n Result result = tx.run(checkGame, parameters);\n\n if (result.hasNext()) {\n return false;\n }\n\n result = tx.run(\"CREATE (g:Game{name:$name, category1:$category1})\"\n , parameters);\n\n return true;\n }\n\n return false;\n }",
"private void agregarDiccionario(Palabra palabra){\n if (!dic.contiene(palabra)) {\n boolean su = sugerencia(palabra);\n if(su){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea agregar: ´\"+palabra.getCadena()+\"´ al diccionario?\", \"Agregar!\", JOptionPane.YES_NO_OPTION);\n if (d == 0) \n dic.agrega(palabra);\n }\n }else {\n JOptionPane.showMessageDialog(null,\"--La palabra ya se encuentra en el diccionario.--\\n --\"+dic.busca(palabra).toString());\n }\n }",
"public void insert(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(!tn.hm.containsKey(c)){\n tn = new TrieNode();\n tn.hm.put(c, temp);\n }\n tn = temp;\n }\n tn.flag = true;\n }",
"public boolean add(String s) {\n s = s.trim().toLowerCase();\n\n TrieNode current = root;\n\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isLowerCase(c)) {\n TrieNode child = current.children.get(c);\n if (child == null) {\n child = new TrieNode();\n current.children.put(c, child);\n }\n current = child;\n }\n }\n if(current.isWord){\n \tcurrent.word = s;\n }\n if (current.isWord)\n return false;\n \n current.isWord = true;\n return true;\n }",
"public void insertHelper(Node oroot, String s){\n\t\tNode newNode = new Node();\n\t\tif(s.length()>0){\t\t\t// if string s is empty return, if not the node's current will first char of string\n\t\t\tnewNode.current = s.charAt(0);\n\t\t}\n\t\telse{\n\t\t\treturn;\n\t\t}\n\t\tboolean flag = true;\t// flag determines if the char already exsit in the tree \n\t\tfor(int i = 0; i<oroot.children.size(); i++){ // loop whole children\n\t\t\tif(oroot.children.get(i).current == s.charAt(0)){\n\t\t\t\tflag = false;\n\t\t\t\tinsertHelper(oroot.children.get(i), s.substring(1));\n\t\t\t}\n\t\t}\n\t\tif(flag){\t\t// if current char is not exsit in the tree\n\t\t\toroot.children.add(newNode);\n\t\t\tinsertHelper(oroot.children.get(oroot.children.size()-1), s.substring(1));\t\n\t\t}\n\t}",
"private void insert(SymObject obj) {\n try {\n table.insert(obj);\n } catch (NameAlreadyExistsExcpetion ex) {\n error(obj.name + \" already declared\");\n }\n }",
"@Test\n\tpublic void isExistingCaseNameAdded() {\n\t\tString caseName = \"leather Case\";\n\t\tString cost = \"50\";\n\t\ttry {\n\t\t\tCaseManagerService.addCaseType(caseName, cost);\n\t\t\tfail();\n\t\t} catch (ServiceException e) {\n\t\t\tassertEquals(\"Case Name is Already Exist\",e.getMessage());\n\t\t}\n\t}",
"public void addWord(Word word);",
"boolean agregarSalida(Salida s) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(s);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }",
"public void nomeAluno(String na) {\n\t\tnomeAluno = na; \n\t}",
"private void addToRoot(String line) {\r\n String[] components = line.split(\"\\\",\\\"\"); //get all components of line, that are [word, type, meaning]\r\n removeSpaces(components); //remove space and extra symbol from all components\r\n\r\n if (components.length == 3) { //if the components are valid\r\n\r\n boolean[] status = dict.addWord(components[0], components[1], components[2], 'a'); //try adding in add mode\r\n\r\n if (status[1]) { // if word already exists but have other meaning so need to append the meaning\r\n dict.addWord(components[0], components[1], components[2], 'u'); //add in update mdoe\r\n }\r\n }\r\n\r\n //System.out.println(\"Added word : \" + components[0]);\r\n }",
"Professor procurarNome(String nome) throws ProfessorNomeNExisteException;",
"public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}",
"public void addWord(String word) {\n TrieNode curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (curr.children[c - 'a'] == null )\n curr.children[c - 'a'] = new TrieNode();\n curr = curr.children[c - 'a'];\n }\n curr.end = true;\n }",
"private void add(String thestring) {\n\t\t\n\t}",
"public void addText(String texto) {\n\t\tthis.texto = texto == null ? \"\" : texto.trim();\n\t}",
"public boolean insert(String s) {\n\n\t\tTreeNode node = root;\n \n\t\t// ***** method code to be added in this class *****\n\t\t// now we just have a dummy that prints message and returns true.\n\t\tboolean completed = false;\n\n\t\tfor (int i=0; i<s.length();i++){\n\t\t\t\n\t\t\tif (i == s.length()-1){\n\t\t\t\tcompleted = true;\n\t\t\t}\n\t\t\t\n\t\t\tnode = insert(String.valueOf(s.charAt(i)), node,completed);\n\n\t\t\tif (foundFalse == true){\n\t\t\t\tfoundFalse = false;\n\t\t\t\treturn false;\n\t\t\t}\n\n\n\t\t}\n\t\t\n\t\treturn true;\n\n\t}",
"private void adicionar(No novo, Pessoa pessoa) {\n if(raiz == null)\n raiz = new No(pessoa);\n else{\n if(pessoa.getIdade()<novo.getPessoa().getIdade()){\n if(novo.getEsquerda() != null)\n adicionar(novo.getEsquerda() , pessoa);\n else\n novo.setEsquerda(new No(pessoa));\n }else{\n if(novo.getDireita() !=null)\n adicionar(novo.getDireita(), pessoa);\n else\n novo.setDireita(new No(pessoa));\n }\n }\n \n }",
"private void save() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null) ) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.insert(nama_pasien2,\n nama_dokter2,\n tgl_pengobatanField.getText().toString().trim(),\n waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),\n hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }",
"public void insert(String word) {\n TrieNode node = root;\n\n // for each char in the word, add to the TrieNode\n for (char c: word.toCharArray()) {\n // if there are no such child, then we add it\n if (node.children[c - 'a'] == null) {\n node.children[c - 'a'] = new TrieNode(c);\n }\n // move the node to next layer\n node = node.children[c - 'a'];\n\n }\n // mark the isWord\n node.isWord = true;\n }",
"public void insert(String word) {\n TrieNode n = root;\n for(char c : word.toCharArray()) {\n if(n.children[c]==null) {\n n.children[c] = new TrieNode();\n }\n n = n.children[c];\n }\n n.isWord = true;\n n.word = word;\n }",
"@SuppressLint({\"CommitPrefEdits\"})\n public boolean lD(String str) {\n Editor edit = this.rE.edit();\n edit.putString(\"existing_instance_identifier\", str);\n return this.rE.a(edit);\n }",
"public void add(String str);",
"public void add(String str);",
"public void insert(String word) {\n TrieNode cur = root;\n HashMap<Character, TrieNode> curChildren = root.children;\n char[] wordArray = word.toCharArray();\n for(int i = 0; i < wordArray.length; i++){\n char wc = wordArray[i];\n if(curChildren.containsKey(wc)){\n cur = curChildren.get(wc);\n } else {\n TrieNode newNode = new TrieNode(wc);\n curChildren.put(wc, newNode);\n cur = newNode;\n }\n curChildren = cur.children;\n if(i == wordArray.length - 1){\n cur.hasWord= true;\n }\n }\n }",
"public void apagarFicheiro(String s) {\r\n\t\tFile f = new File(s + \".dat\");\r\n\t\ttry {\r\n\t\t\tif (f.exists()) {\r\n\t\t\t\tf.delete();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t//\r\n\t\t}\r\n\t}",
"public void addWord(String word) {\r\n Trie node = root;\r\n for(char ch: word.toCharArray()){\r\n if(node.child[ch - 'a'] == null)\r\n node.child[ch - 'a'] = new Trie(ch);\r\n node = node.child[ch - 'a'];\r\n }\r\n node.end = true;\r\n }",
"public void addToWish( String product_id, String product_name,String product_brand, String product_img,\n String product_price,String product_desc, String product_discount, String product_varieties )\n {\n boolean isAdded = mDatabaseFavorite.insert(product_id, product_name,product_brand, product_img,\n product_price,product_discount);\n\n if (isAdded == true)\n {\n Toast.makeText(DetailActivity.this,\"Added to Favorite\",Toast.LENGTH_SHORT).show();\n\n }\n\n else {\n\n Toast.makeText(DetailActivity.this,\"Already present in favoriteList\",Toast.LENGTH_SHORT).show();\n\n }\n\n }",
"public void insert(String name)\r\n\t{\r\n\t\tinsert(name, true);\r\n\t}",
"public boolean adicionaMusica(String musica) {\n\n\t\tfor (int i = 0; i < musicas.length; i++) {\n\t\t\tif (musicas[i] == null) {\n\t\t\t\tmusicas[i] = musica;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void addWord(String word)\n {\n TrieNode1 node = root;\n for (char c:word.toCharArray())\n {\n if (node.childerens[c-'a']==null)\n {\n node.childerens[c-'a'] = new TrieNode1();\n }\n node = node.childerens[c-'a'];\n }\n node.isEnd = true;\n\n }",
"public void insert(String word) {\n\t\tcur = root;\n\t\tfor (char c : word.toCharArray()) {\n\t\t\tif (cur.children[c - 'a'] == null) {\n\t\t\t\tcur.children[c - 'a'] = new TrieNode(c);\n\t\t\t}\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\tcur.isWord = true;\n\t}"
] | [
"0.55576766",
"0.5548984",
"0.54823333",
"0.54382175",
"0.5412492",
"0.5303732",
"0.529651",
"0.52943766",
"0.52525836",
"0.52474576",
"0.5190563",
"0.51899165",
"0.516305",
"0.516128",
"0.5134511",
"0.5132409",
"0.51272106",
"0.51245344",
"0.5119508",
"0.5118936",
"0.51168853",
"0.51100576",
"0.5102281",
"0.5079713",
"0.50736386",
"0.5064669",
"0.5062664",
"0.505891",
"0.50347203",
"0.5031968",
"0.5015481",
"0.499736",
"0.49962527",
"0.49948573",
"0.49781117",
"0.49723688",
"0.49701074",
"0.4966538",
"0.493595",
"0.49350688",
"0.49309888",
"0.49256635",
"0.49239975",
"0.49233812",
"0.49213198",
"0.4920822",
"0.49170482",
"0.4911299",
"0.4905833",
"0.49044272",
"0.49037436",
"0.49010295",
"0.48887283",
"0.48863065",
"0.48843703",
"0.48803514",
"0.48801297",
"0.48794678",
"0.48736447",
"0.48699513",
"0.48697913",
"0.4867922",
"0.48650348",
"0.48634818",
"0.48614225",
"0.48563525",
"0.48526525",
"0.48508278",
"0.48481002",
"0.48318124",
"0.48278308",
"0.48248577",
"0.48201892",
"0.48197776",
"0.4818547",
"0.48170224",
"0.48153338",
"0.48146456",
"0.4814538",
"0.4812133",
"0.48119715",
"0.4807028",
"0.48066917",
"0.4804874",
"0.4797899",
"0.47908446",
"0.47856954",
"0.4781215",
"0.47808057",
"0.4780776",
"0.4778218",
"0.47774464",
"0.47774464",
"0.4775975",
"0.47750637",
"0.47730225",
"0.47691977",
"0.47670478",
"0.47651517",
"0.47635174",
"0.47598898"
] | 0.0 | -1 |
Remove a sala do SPACE se ela existir | public boolean delRoom(String roomName) {
try{
if (rooms.remove(roomName)) {
return true;
}
} catch (Exception e) {
System.err.println(e.getMessage());
return false;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String removeSpace(String a){\n String b = \" \"; //STRING TO MAKE PALINDROME TEST\n for(int i =0; i<a.length();i++){ //WORK FOR MORE CASES\n if((int)a.charAt(i)==(int)b.charAt(0))\n a=a.substring(0,i)+a.substring(i+1);\n }\n return a;\n }",
"private String eliminarEspaciosMayoresA1(String mensaje) {\n //Elimina todos los espacios mayores a 1 que se encuentren dentro del mensaje\n Pattern patron = Pattern.compile(\"[ ]+\");\n Matcher encaja = patron.matcher(mensaje);\n String resultado = encaja.replaceAll(\" \");\n return resultado;\n }",
"private String replaceSpaces(String value) {\r\n\t\treturn value.replace(\" \", \"_\");\r\n\t}",
"@Override\n\tpublic String spaceRemover(String input) {\n\t\treturn input.replaceAll(\"\\\\s+\",\"\");\n\n\t}",
"private static String trim(String s) {\n return s.replace(\" \", \"\");\n }",
"private static String clearSpaces(final String old) {\n return old.replace(\" \", \"\").replace(\"\\n\", \"\");\n }",
"private String normalizeSpace(final String arg) {\n return arg.replaceAll(Constants.SPACE_PATTERN, Constants.SPACE);\n }",
"public String quitaespacios (String str) {\n\n str = repNull(str);\n str = str.trim();\n str = rep(str, \"[ ]{2,}\", \" \");\n\n return str;\n }",
"private boolean isNoSpace(final String message) {\n\t\treturn message.contains(\"0 space\"); //$NON-NLS-1$\n\t}",
"public static String removePosessive(String line) {\n\t\tif (line.contains(\"'S\")) {\n\t\t\tline = line.replace(\"'S\", \"\");\n\t\t}\n\t\treturn line;\n\t}",
"public static String saveWhitespaces(String s) {\n\t\treturn StringUtil.replace(s, \" \", \"\\u00A0\");\n\t}",
"private static String trimWhiteSpace(String sentence) {\n\t\tsentence = sentence.replaceAll(\"[^a-zA-Z]\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\n\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\t\", \" \");\n// sentence = sentence.replaceAll(\"\\\\.\", \" \");\n// sentence = sentence.replaceAll(\",\", \" \");\n \n//\t\tint length;\n//\t\tdo {\n//\t\t\tlength = sentence.length();\n//\t\t\tsentence = sentence.replaceAll(\" \", \" \");\n//\n//\t\t} while (sentence.length() < length);\n\t\treturn sentence;\n\t}",
"private static String removeSoftHyphens(String in) {\n String result = in.replaceAll(\"\\u00AD\", \"\");\n return result.length() == 0 ? \"-\" : result;\n }",
"public static String removeQuebraLinha (String s) {\n\n\t\tif (StringUtils.isNotBlank(s)) {\n\n\t\t\ts = s.replaceAll(\"\\r\", \"\"); \n\t\t\ts = s.replaceAll(\"\\t\", \"\");\n\t\t\ts = s.replaceAll(\"\\n\", \"\");\n\t\t}\n\n\t\treturn s;\n\t}",
"public static String removeBuailte(String s) {\n String out = \"\";\n char[] ca = s.toCharArray();\n for(int i = 0; i < ca.length; i++) {\n char undotted = removeDot(ca[i]);\n if(undotted == ca[i]) {\n out += ca[i];\n } else {\n if(Character.isLowerCase(ca[i])) {\n out += undotted;\n out += 'h';\n } else {\n if((i == 0 && ca.length == 1)\n || (ca.length > (i + 1) && Character.isUpperCase(ca[i + 1]))\n || ((i > 0) && (i == ca.length - 1) && Character.isUpperCase(ca[i - 1]))) {\n out += undotted;\n out += 'H';\n } else {\n out += undotted;\n out += 'h';\n }\n }\n }\n }\n return out;\n }",
"private String limpiar_texto(String texto){\n \n texto = texto.replaceAll(\"\\n\",\"\");\n texto=texto.toUpperCase();\n for(int i=0;i<texto.length();i++){\n //Se crea un for que llenara el nuevo char\n int posicion = tabla.indexOf(texto.charAt(i)); //charat regresa el valor del arreglo\n if(posicion == -1){ \n texto=texto.replace(texto.charAt(i),' ');\n //En caso que no aparezca en la tabla de caracteres\n //Tiene que ser eliminado\n }\n }\n return texto;\n }",
"private String eliminarEspaciosInicialesFinales(String mensaje) {\n //Elimina todos los espacios que se encuentren al inicio o al final de la frace\n Pattern patron = Pattern.compile(\"^[ ]+|[ ]+$\");\n Matcher encaja = patron.matcher(mensaje);\n String resultado = encaja.replaceAll(\"\");\n return resultado;\n }",
"private String removeLeadingWhitespace(String input) {\n for (int index = 0; index < input.length(); index++) {\n if (!Character.isWhitespace(input.charAt(index))) {\n return input.substring(index);\n }\n }\n return input;\n }",
"public static String fromNullToSpace(String a) {\r\n\t\tif (a == null || \"\".equals(a)) {\r\n\t\t\treturn \" \";\r\n\t\t} else {\r\n\t\t\treturn a;\r\n\t\t}\r\n\t}",
"@Override\n public void afterTextChanged(Editable s) {\n if (s.toString().length() == 1 && !s.toString().startsWith(\"3\")) {\n s.clear();\n }\n }",
"private boolean getReplaceNonBreakingSpace() {\n return false;\n }",
"@Override\n\tpublic String clean(String input) {\n\t\tinput = input.replaceAll(removeCommonWords.toString(), \" \");\n\t\t//input = input.replaceAll(removeSingleCharacterOrOnlyDigits.toString(), \" \");\n\t\t//input = input.replaceAll(removeTime.toString(), \" \");\n\t\t//input = input.replaceAll(\"(\\\\s+>+\\\\s+)+\", \" \");\n\t\treturn input;\n\t}",
"private String trimToSearchFormat(String input) {\n String output = input.replace(\"p:\", \"\")\n .replace(\"[\", \"\")\n .replace(\"]\", \"\")\n .replace(\",\", \"\")\n .replace(\" \", DELIM);\n return output;\n }",
"public static void main(String[] args) {\n String sentence=\"I am the best\";\n System.out.println(sentence.replace(\" \", \"\"));\n }",
"static private String stripPlusIfPresent( String value ){\n String strippedPlus = value;\n \n if ( value.length() >= 2 && value.charAt(0) == '+' && value.charAt(1) != '-' ) {\n strippedPlus = value.substring(1);\n }\n return strippedPlus;\n }",
"private String trimSponsorName( String sponsorName ){\r\n String dispSponsorName = sponsorName ;\r\n if( dispSponsorName == null ){\r\n dispSponsorName = \"\";\r\n //Modified for case#3341 - Sponsor Code Validation - start \r\n }else if( dispSponsorName.length() > 80 ){\r\n dispSponsorName = dispSponsorName.substring( 0, 80 ) + \"...\" ;\r\n }\r\n dispSponsorName = \" \"+dispSponsorName;\r\n //Modified for case#3341 - Sponsor Code Validation - end\r\n return dispSponsorName;\r\n }",
"private String fixName(String aName) {\n final String firstToken = new StringTokenizer(aName, \" \").nextToken();\n int iRepeatedNamePos = aName.indexOf(firstToken, 1);\n if (iRepeatedNamePos > 0) {\n return aName.substring(0, iRepeatedNamePos).trim();\n }\n return aName;\n }",
"public void removeCharacter(android.widget.Button button){\n int index;\n if(saisie[0] == button.getText().charAt(0)){\n index = 0;\n }else if(saisie[1] == button.getText().charAt(0)){\n index = 1;\n }else if(saisie[2] == button.getText().charAt(0)){\n index = 2;\n }else if(saisie[3] == button.getText().charAt(0)){\n index = 3;\n }else {\n index = 4;\n }\n // Supprmier le caractère\n saisie[index] = ' ';\n\n }",
"private String eliminar_contenido_innecesario(String line) {\n \n \tint index_question = line.indexOf('?');\n\t\tint index_point = line.indexOf('.');\n\t\t\n\t\tline = ( index_question > 0 ) ? line.substring(0, index_question+1) : line;\n\t\tline = ( index_point > 0 ) ? line.substring(0, index_point+1) : line;\n\t\t\n \treturn line;\n }",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\" Bir string giriniz =\");\n String text = sc.nextLine();\n\n boolean boslukVarmi = text.contains(\" \");\n System.out.println(\"boslukVarmi = \" + boslukVarmi);\n \n boolean bosMU=text.isEmpty();\n System.out.println(\"bosMU = \" + bosMU);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }",
"private boolean makeSpaceBefore(boolean addSpace){\n int index = ts.index();\n try {\n while(true) {\n if (!ts.movePrevious()){\n return false;\n }\n if (ts.token().id() == NEW_LINE){\n DiffResult diff = diffs.getDiffs(ts, 0);\n if (diff == null || diff.replace == null || diff.replace.hasNewLine()){\n return false;\n }\n } else if (ts.token().id() == PREPROCESSOR_DIRECTIVE){\n return false;\n } else if (ts.token().id() != WHITESPACE){\n replaceSegment(addSpace, index);\n return true;\n }\n }\n } finally {\n ts.moveIndex(index);\n ts.moveNext();\n }\n }",
"static String trimStart(String s) {\n StringBuilder sb = new StringBuilder(s);\n while(sb.length() > 0 && (sb.charAt(0) == '\\u005cr'\n || sb.charAt(0) == '\\u005cn'\n || sb.charAt(0) == '\\u005ct'\n || sb.charAt(0) == ' ')) {\n sb.deleteCharAt(0);\n }\n return sb.toString();\n }",
"static void trimNL(String s) {\n StringBuilder sb = new StringBuilder(s);\n while(sb.length() > 0 && (sb.charAt(sb.length() - 1) == '\\u005cr' || sb.charAt(sb.length() - 1) == '\\u005cn'))\n sb.deleteCharAt(sb.length() - 1);\n }",
"public static String addSpace(Object o)\r\n/* 100: */ {\r\n/* 101: 96 */ String s = o.toString().trim();\r\n/* 102: 97 */ if (s.isEmpty()) {\r\n/* 103: 98 */ return \"\";\r\n/* 104: */ }\r\n/* 105:100 */ char last = s.charAt(s.length() - 1);\r\n/* 106:101 */ if (\">\".indexOf(last) >= 0) {\r\n/* 107:102 */ return s;\r\n/* 108: */ }\r\n/* 109:104 */ if (\":\".indexOf(last) >= 0) {\r\n/* 110:105 */ return s.trim() + \" \";\r\n/* 111: */ }\r\n/* 112:107 */ if (\".?!\".indexOf(last) >= 0) {\r\n/* 113:108 */ return s + \" \";\r\n/* 114: */ }\r\n/* 115:111 */ return s + \" \";\r\n/* 116: */ }",
"public static String cleanMovieTitle (Literal title) {\n String reTitle = \"\";\n if(null != title && title.isLiteral()) {\n reTitle = title.getString().replace(\" and \", \" & \");\n if(reTitle.contains(\"(\")) {\n int index = reTitle.indexOf(\"(\");\n reTitle = reTitle.substring(0,index);\n reTitle = reTitle.trim();\n }\n }\n return reTitle;\n }",
"public static String cleanName(String firstOrLastName) {\n return firstOrLastName.trim().replaceAll(\"\\\\s+\", \" \");\n }",
"private String spacing(String line) {\n \n \t\t/* Remove redundant spaces (keep only one space between two words) */\n \t\tint limit = 0;\n \t\tMatcher matcher = patternSpaces.matcher(line);\n \n \t\tString oldLine = line;\n \n \t\tremSpaces: while (matcher.find()) {\n \n \t\t\tint offset = matcher.start();\n \n \t\t\t// do not remove spaces at the beginning of a line\n \t\t\tif (line.substring(0, offset).trim().equals(\"\"))\n \t\t\t\tcontinue;\n \n \t\t\t/*\n \t\t\t * if the spaces (or tabs) are at the beginning of a line or before a comment, then we keep them\n \t\t\t */\n \t\t\t/*\n \t\t\t * Matcher matcherSpacesBeforeComment = patternSpacesBeforeComment.matcher(line); if\n \t\t\t * (matcherSpacesBeforeComment.find()) { if (offset < matcherSpacesBeforeComment.end()) continue\n \t\t\t * remSpaces; }\n \t\t\t */\n \n \t\t\t// if the spaces are before a comment, then we keep them\n \t\t\tString afterSpaces = line.substring(matcher.end());\n \t\t\tif (afterSpaces.startsWith(\"(*\"))\n \t\t\t\tcontinue remSpaces;\n \n \t\t\t// If we are inside a string, then we skip this replacing\n \t\t\tMatcher matcherString = patternString.matcher(line);\n \t\t\twhile (matcherString.find()) {\n \t\t\t\tif (matcherString.start() <= offset && offset < matcherString.end())\n \t\t\t\t\tcontinue remSpaces;\n \t\t\t}\n \n \t\t\t// If we are inside a comment, then we skip this replacing\n \t\t\tMatcher matcherComment = patternComment.matcher(line);\n \t\t\twhile (matcherComment.find()) {\n \t\t\t\tif (matcherComment.start() <= offset && offset < matcherComment.end())\n \t\t\t\t\tcontinue remSpaces;\n \t\t\t}\n \n \t\t\tline = line.substring(0, offset) + \" \" + line.substring(matcher.end());\n \n \t\t\t// we have to reset the matcher, because we modified the line\n \t\t\tmatcher = patternSpaces.matcher(line);\n \n \t\t\t// we put a limit, just in case we would get into an infinite loop\n \t\t\tif (limit++ > 10000) {\n \t\t\t\tOcamlPlugin.logError(\"Infinite loop detected in formatter during spacing (1): <<\" + oldLine\n \t\t\t\t\t\t+ \">>\");\n \t\t\t\tbreak;\n \t\t\t}\n \n \t\t}\n \n \t\t// remove spaces before commas\n \t\t//line = line.replaceAll(\" ,\", \",\");\n \t\t// remove spaces before semicolons\n \t\t//line = line.replaceAll(\" ;\", \";\");\n \n \t\tfor (int nPattern = 0; nPattern <= 1; nPattern++) {\n \t\t\tPattern patternSpacing;\n \t\t\tif (nPattern == 0)\n \t\t\t\tpatternSpacing = patternSpacingRight;\n \t\t\telse\n \t\t\t\tpatternSpacing = patternSpacingLeft;\n \n \t\t\t/*\n \t\t\t * We put a limit to the number of replacements, just in case we would get into an infinite loop\n \t\t\t */\n \t\t\tlimit = 0;\n \t\t\t// add spaces before some characters\n \t\t\tmatcher = patternSpacing.matcher(line);\n \n \t\t\toldLine = line;\n \n \t\t\taddSpaces: while (matcher.find()) {\n \n \t\t\t\tint offset = matcher.start() + 1;\n \t\t\t\tif (offset > line.length() - 1 || offset < 0) {\n \t\t\t\t\tocaml.OcamlPlugin.logError(\"OcamlIndenter:format : invalid position\");\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \n \t\t\t\t// if we are inside a string, then we skip this replacement\n \t\t\t\tMatcher matcherString = patternString.matcher(line);\n \t\t\t\twhile (matcherString.find()) {\n \t\t\t\t\tif (matcherString.start() <= offset && offset < matcherString.end())\n \t\t\t\t\t\tcontinue addSpaces;\n \t\t\t\t}\n \n \t\t\t\t// Skip replacement if in comment\n \t\t\t\tMatcher matcherComment = patternComment.matcher(line);\n \t\t\t\twhile (matcherComment.find()) {\n \t\t\t\t\tif (matcherComment.start() <= offset && offset < matcherComment.end())\n \t\t\t\t\t\tcontinue addSpaces;\n \t\t\t\t}\n \n \t\t\t\tline = line.substring(0, offset) + \" \" + line.substring(offset);\n \n \t\t\t\t// we have to reset the matcher, because we modified the line\n \t\t\t\tmatcher = patternSpacing.matcher(line);\n \t\t\t\tif (limit++ > 10000) {\n \t\t\t\t\tOcamlPlugin.logError(\"Infinite loop detected in formatter during spacing (2): <<\"\n \t\t\t\t\t\t\t+ oldLine + \">>\");\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn line;\n \n \t}",
"private boolean isOneSpace(final String message) {\n\t\treturn message.contains(\"1 space\"); //$NON-NLS-1$\n\t}",
"private String quitaEspacios(String cadena) {\n String unspacedString = \"\";\t//Variable donde lee la función\n\n for (int i = 0; i < cadena.length(); i++) {\t//Le quita los espacios a la espresión que leyó\n //Si el caracter no es un espacio lo pone, sino lo quita.\n if (cadena.charAt(i) != ' ') {\n unspacedString += cadena.charAt(i);\n }\n }\n\n return unspacedString;\n }",
"private boolean space() {\r\n return CHAR(' ');\r\n }",
"public static String delFirstChar(String word){\n\t\tif(word.length() <= 1){\n\t\t\treturn word;\n\t\t}\n\t\tword = word.substring(1, word.length());\n\t\tguessPW(word);\n\t\treturn word;\n\n\t}",
"public static String RemoveDublicates(String str) {\n String result = \"\"; //storing result of the loop\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n if (!result.contains(\"\" + ch)) { // this is char so we need convert comcating to empty string\n result += ch;\n }\n\n }\n return result;\n }",
"private final static String stripDash( String s ) {\n\n StringTokenizer tokDash = new StringTokenizer(s, \"-\");\n\n if (tokDash.countTokens() > 1) {\n return tokDash.nextToken();\n } else {\n return s;\n }\n\n }",
"private String _removeSpaces(String matrixElement) {\n char[] es = matrixElement.toCharArray();\n char[] _temp = new char[es.length];\n int count = 0;\n for (int i = 0; i < es.length; i++) {\n if (Character.isDigit(es[i]) || es[i] == '.' || es[i] == '-') {\n _temp[count++] = es[i];\n }\n }\n return new String(_temp, 0, count);\n }",
"private static boolean mirarSiTerminado(char[] a) {\r\n\t\tboolean terminado = true;\r\n\t\tfor (int i = 0; i <= a.length - 1; i++) {// COMPRUEBO QUE NO HAYA '_'\r\n\t\t\tif (a[i] == '_') {\r\n\t\t\t\tterminado = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terminado;\r\n\t}",
"static public final boolean ccIsAllNoneSpace(String pxLine){\n return VcStringUtility.ccNulloutString(pxLine)\n .matches(\"^\\\\S+$\");\n }",
"@Override\n public String trim(final String toTrim) {\n return replaceAll(toTrim, \"\\u00A0\", \" \").trim();\n }",
"public static void main(String[] args) {\n\n String str = \"Angelsa MIilovski\";\n StringBuilder bulid = new StringBuilder(str);\n bulid.deleteCharAt(6); // Shift the positions front.\n bulid.deleteCharAt(6 - 1);\n bulid.deleteCharAt(8 - 1);\n System.out.println(\"Name is : \" + bulid);\n\n// StringBuffer buffer = new StringBuffer(str);\n// buffer.replace(1, 2, \"\"); // Shift the positions front.\n// buffer.replace(7, 8, \"\");\n// buffer.replace(13, 14, \"\");\n// System.out.println(\"Buffer : \"+buffer);\n\n// char[] c = str.toCharArray();\n// String new_Str = \"\";\n// for (int i = 0; i < c.length; i++) {\n// if (!(i == 1 || i == 8 || i == 15))\n// new_Str += c[i];\n// }\n// System.out.println(\"Char Array : \"+new_Str);\n\n// public String removeChar(String str, Integer n) {\n// String front = str.substring(0, n);\n// String back = str.substring(n+1, str.length());\n// return front + back;\n// }\n\n// String str = \"Angel%Milovski\";\n// str = str.replaceFirst(String.valueOf(str.charAt(5)), \" \");//'l' will replace with \"\"\n// System.out.println(str);//output: wecome\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\t String kkNo=\"12345 4532 7686 3550\";\n\t\t\t\tString isim=\"sanim sah29\";\n\t\t\t\tSystem.out.println(kkNo.replace(\" \", \"\"));\n\t\t\t\tSystem.out.println(kkNo); // 12345 4532 7686 3550 yoksa 12345453276863550\n\t\t\t\t\n\t\t\t\t// replaceAll ile\n\t\t\t\t\n\t\t\t\tSystem.out.println(kkNo.replaceAll(\"\\\\s\", \"\")); // s sadece space\n\t\t\t\tSystem.out.println(kkNo.replaceAll(\"\\\\S\", \"*\")); // S space olmayan hersey\n\t\t\t\tSystem.out.println(kkNo.replaceAll(\"\\\\w\", \"&\")); // harf veya rakamlarin hepsi\n\t\t\t\tSystem.out.println(kkNo.replaceAll(\"\\\\W\", \"-\")); // harf veya rakamlarin disindaki hersey\n\t\t\t\tSystem.out.println(kkNo.replaceAll(\"\\\\d\", \"0\")); // rakamlarin hepsi\n\t\t\t\tSystem.out.println(kkNo.replaceAll(\"\\\\D\", \"a\")); // rakamlarin disindaki hersey\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.println(isim.replaceAll(\"\\\\s\", \"\")); // s sadece space\n\t\t\t\tSystem.out.println(isim.replaceAll(\"\\\\S\", \"*\")); // S space olmayan hersey\n\t\t\t\tSystem.out.println(isim.replaceAll(\"\\\\w\", \"&\")); // harf veya rakamlarin hepsi\n\t\t\t\tSystem.out.println(isim.replaceAll(\"\\\\W\", \"-\")); // harf veya rakamlarin disindaki hersey\n\t\t\t\tSystem.out.println(isim.replaceAll(\"\\\\d\", \"0\")); // rakamlarin hepsi\n\t\t\t\tSystem.out.println(isim.replaceAll(\"\\\\D\", \"a\")); // rakamlarin disindaki hersey\n\t\t\t\t\n\t\t\t\t//syso icinde yapilan Manipulationlar asil Stringi degistirmez\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\tString str = \"Harmohan Is Mad Person\";\n\t\tString newString = str.replaceAll(\" \", \"\");\n\t\tSystem.out.println(newString);\n\t\t\n\n\t}",
"static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }",
"static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }",
"static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }",
"public static String trimHorizontalSpace(String str) {\n String horizontalSpace = \"\\\\h\";\n str = str.replaceAll(\"(^\" + horizontalSpace + \"*)|(\" + horizontalSpace + \"*$)\", \"\");\n return str;\n }",
"static void trim() {\n if (a.size() == 0)\n return;\n Object o = a.get(a.size() - 1);\n StringBuilder sb = new StringBuilder();\n if (o instanceof Token)\n sb.append( ((Token)o).image );\n else\n sb.append((String)o);\n while(sb.length() > 0 && sb.charAt(sb.length() - 1) == ' ')\n sb.deleteCharAt(sb.length() - 1);\n a.set(a.size() - 1, sb.toString() );\n }",
"private String quitarCaracteresNoImprimibles(String mensaje) {\n String newMensaje = \"\";\n int codigoLetra = 0;\n for (char letra : mensaje.toCharArray()) {\n codigoLetra = (int) letra;\n if (codigoLetra >= 32 && codigoLetra <= 128) {\n newMensaje += letra;\n }\n }\n return newMensaje;\n }",
"public static boolean spotIsEmpty(char n){\r\n boolean dummy = false;\r\n if (n == ' '){\r\n dummy = true;\r\n return dummy;\r\n }\r\n return dummy;\r\n }",
"public String removeSeparadorData(String data) {\r\n if(data.contains(\"/\")) {\r\n data = data.replaceAll(\"/\", \"\");\r\n \r\n } else if(data.contains(\"-\")) {\r\n data = data.replace(\"-\", \"\");\r\n }\r\n return data;\r\n }",
"public static String removeWhiteSpace(String value) {\n return value.replaceAll(\"\\\\s\", \"\");\n }",
"private String RemoveCharacter(String strName) {\r\n String strRemover = \"( - )|( · )\";\r\n String[] strTemp = strName.split(strRemover);\r\n if (strTemp.length >= 2) {\r\n strName = strTemp[0].trim() + \" - \" + strTemp[1].trim();\r\n }\r\n\r\n strName = strName.replace(\"\", \"-\");\r\n strName = strName.replace(\"\", \"'\");\r\n strName = strName.replace(\":\", \",\");\r\n\r\n strName = strName.replace(\"VA - \", \"\");\r\n strName = strName.replace(\"FLAC\", \"\");\r\n return strName;\r\n }",
"@Override\n public void afterTextChanged(Editable s) {\n String input = s.toString();\n if (input.length() > 0 && input.charAt(0) == '0') {\n s.replace(0, 1, \"\");\n }\n }",
"private void addSpaces(String text) {\n if (!text.equals(myPreviousText)) {\n // Remove spaces\n text = text.replace(\" \", \"\");\n\n // Add space between each character\n StringBuilder newText = new StringBuilder();\n for (int i = 0; i < text.length(); i++) {\n if (i == text.length() - 1) {\n // Do not add a space after the last character -> Allow user to delete last character\n newText.append(Character.toUpperCase(text.charAt(text.length() - 1)));\n }\n else {\n newText.append(Character.toUpperCase(text.charAt(i)) + LETTER_SPACING);\n }\n }\n\n myPreviousText = newText.toString();\n // Update the text with spaces and place the cursor at the end\n myEditText.setText(newText);\n myEditText.setSelection(newText.length());\n }\n }",
"@Test\n\tpublic void testRemoveWhiteSpacesAndPunctuation() {\n\t\tString input = \"2$2?5 5!63\";\n\t\tString actual = GeneralUtility.removeWhiteSpacesAndPunctuation(input);\n\t\tString expected = \"225563\";\n\t\tAssert.assertEquals(expected, actual);\n\t}",
"static String replaceBlankInString(char[] s) {\n if (s == null || s.length <=0) return null;\n int originStrLen = s.length;\n int numOfBlanks = 0,destStrLen = 0;\n int p1 = originStrLen-1,p2;\n for (int i=0;i<originStrLen;i++) {\n if (s[i] == ' ') {\n numOfBlanks++;\n }\n }\n destStrLen = originStrLen + 2 * numOfBlanks;\n p2 = destStrLen-1;\n\n char descArr[] = new char[destStrLen];\n\n System.arraycopy(s,0,descArr,0,originStrLen);\n while (p1 != p2 && p1 >=0) {\n if (s[p1] == ' ') {\n descArr[p2--] = '0';\n descArr[p2--] = '2';\n descArr[p2--] = '%';\n } else {\n descArr[p2--] = s[p1];\n }\n p1--;\n }\n return new String(descArr);\n }",
"public String prefixeEspace(final String espace) {\n return(null);\n }",
"public String cifrar(String palabra){\n\n String cifrado= \" \";\n char auxiliar;\n int i = 0;\n \n for(i=0;i<palabra.length();i++){\n auxiliar=palabra.charAt(i);\n if(auxiliar ==' '){\n \n }else{\n auxiliar++;\n if(auxiliar=='{'){\n auxiliar='a';\n }\n }\n cifrado=cifrado+\"\"+auxiliar;\n }\n return cifrado;\n }",
"public static boolean stillSpace(char[][] a){\r\n boolean temp = false;\r\n for (int i = 0; i<a.length;i++){\r\n for (int j = 0; j<a[0].length;j++){\r\n if (a[i][j]==' '){\r\n temp = true;\r\n }\r\n }\r\n }\r\n return temp;\r\n }",
"public String removeSpaces(String str) {\n str = str.replace(\" \", \"-\");\n return str;\n }",
"public static void checkWithoutSpaces(String name)throws SpaceNotAllowedException{\n \n if(name.contains(\" \")) throw new SpaceNotAllowedException(\"The spaces in the name of entity are not allowed!\");\n }",
"private boolean startsWithSpace(String str) {\r\n\t\treturn str.length() != 0 && str.charAt(0) == ' ';\r\n\t}",
"public static String cleanString(String s) {\n\t\ts = s.trim();\n\t\tString newStr = \"\";\n\t\tboolean lastWasSpace = false;\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tif(c == ' ' && lastWasSpace) {\n\t\t\t\t//Ignore\n\t\t\t} else if (c == ' ' && !lastWasSpace) {\n\t\t\t\tnewStr+=c;\n\t\t\t\tlastWasSpace = true;\n\t\t\t} else {\n\t\t\t\tnewStr+=c;\n\t\t\t\tlastWasSpace = false;\n\t\t\t}\n\t\t}\n\t\ts = newStr;\n\t\treturn s;\n\t}",
"private final static String stripA( String s ) {\n\n char[] ca = s.toCharArray();\n char[] ca2 = new char [ca.length - 1];\n\n\n for ( int i=0; i<ca2.length; i++ ) {\n ca2[i] = ca[i];\n } // end for\n\n return new String (ca2);\n\n }",
"public static String removeNonWord(String message)\r\n {\r\n int start = getLetterIndex(message, head); //get the fist index that contain English letter\r\n int end = getLetterIndex(message, tail); //get the last index that contain English letter\r\n if (start == end) // if only contain one letter\r\n return String.valueOf(message.charAt(start)); // return the letter\r\n return message.substring(start, end + 1); // return the content that contain English letter\r\n }",
"public String trim(String str) {\n\n return str.replaceFirst(\" \", \"\");\n\n }",
"private String eliminarComaSi(String str) {\n\t\tString result = null;\r\n\t\tif (str.charAt(str.length() - 1) == ',' && (str != null) && (str.length() > 0)) {\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t result = str.substring(0, str.length() - 1);\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t}\r\n\t\treturn result;\r\n\t\t}",
"private static String lineInsideSquareWithBlankAtTheEnd(String line) {\n while (line.length() < SPACES_INSIDE_SQUARE) {\n line+= EMPTY_SPACE_CAR;\n }\n return line;\n }",
"public static String squeezeWhitespace (String input){\r\n return Whitespace.matcher(input).replaceAll(\" \").trim();\r\n }",
"String divideAtWhite()[]{ return null; }",
"private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }",
"public static String delete(String str1,String str2){\n\t\tString newOne=str1.replace(str2, \"\");\n\t\treturn newOne;\n\t}",
"public static void sayStripped(String s){\n int i, count, bC, aC;\n boolean f = false;\n count = 0;\n // After Word Space Count\n aC = 0;\n // Before Word Space Count\n bC = 0;\n // Remove spaces before word\n for(i = 0; i < s.length(); i++){\n if(s.charAt(i) == ' '){\n bC++;\n } else {\n break;\n }\n }\n s = s.substring(0 + bC, s.length());\n \n // Remove spaces after word\n for(i = s.length() - 1; i > 0; i--){\n if(s.charAt(i) == ' '){\n aC++;\n } else {\n break;\n }\n }\n s = s.substring(0, s.length() - aC);\n say(s);\n return;\n }",
"private void removeSpaces(String[] lines) {\r\n for (int i = 0; i<lines.length; i++) {\r\n lines[i] = lines[i].strip();\r\n lines[i] = lines[i].replaceAll(\"\\\"\", \"\");\r\n }\r\n }",
"private String removeWhitespace(String lineToFormat) {\n StringBuilder lineWithoutWhitespace = new StringBuilder();\n StringBuilder buffer = new StringBuilder();\n boolean isString = false;\n char prevChar = '\\0';\n\n for (int i = 0; i < lineToFormat.length(); i++) {\n // check if the current char is a whitespace char\n if (AssemblyConstants.isWhitespace(lineToFormat.charAt(i))) {\n if (buffer.length() > 0) {\n // add everything from buffer in-between\n lineWithoutWhitespace.append(buffer).append(\" \");\n buffer.setLength(0);\n }\n } else {\n // add all non-whitespace chars found to the buffer\n char charToAdd = lineToFormat.charAt(i);\n // check if the char is a part of a string (check if it's not an escaped string separator as well)\n if (charToAdd == AssemblyConstants.STRING_SEPARATOR && prevChar != AssemblyConstants.ESCAPE_SEQUENCE)\n isString = !isString;\n\n // if the char is not a part of a string, make it lowercase if it's a letter\n if (!isString)\n buffer.append((charToAdd < 'A' || charToAdd > 'Z')\n ? charToAdd\n : (char) (charToAdd + 0x20));\n else\n // if the char is a part of a string, just add it as it is\n buffer.append(charToAdd);\n }\n\n prevChar = lineToFormat.charAt(i);\n }\n\n if (isString)\n throw new WrongAssemblyLineException(\"\\nWrong assembly line found:\\n\"\n + \"'\" + lineToFormat + \"' contains too many string separators\");\n\n // add the rest found in buffer\n return buffer.length() > 0\n ? lineWithoutWhitespace.append(buffer).toString().trim()\n : lineWithoutWhitespace.toString().trim();\n }",
"protected final void removeChar()\n\t{\n\t\tif (showCaret && displayingCaret)\n\t\t{\n\t\t\tif (text.getText().length() > 1) text.setText(text.getText().substring(0, text.getText().length() - 2) + \"|\");\n\t\t}\n\t\telse if (text.getText().length() > 1) text.setText(text.getText().substring(0, text.getText().length() - 2) + \" \");\n\t}",
"private String removeFirstChar(String name) {\n\t\treturn name.substring(1, name.length());\n\t}",
"private String checkNullString(String text) {\n if ( text.contains( \" \" )) {\n return null;\n }\n\n // otherwise, we're totally good\n return text;\n }",
"String trimLeft( String txt ){\r\n // trim\r\n int start = 0;\r\n WHITESPACE: for( int i=0; i < txt.length(); i++ ){\r\n char ch = txt.charAt(i);\r\n if( Character.isWhitespace(ch)){\r\n continue;\r\n }\r\n else {\r\n start = i;\r\n break WHITESPACE;\r\n }\r\n }\r\n return txt.substring(start); \r\n }",
"static String hideString(String input) {\n if (input == null || input.isEmpty()) {\n return input;\n }\n if (input.length() <= 2) {\n return Strings.repeat(\"X\", input.length());\n }\n\n return new StringBuilder(input).replace(1, input.length() - 1,\n Strings.repeat(\"X\", input.length() - 2))\n .toString();\n }",
"public void shingleStrippedString(String s) {\n\t\t\n\t\tString s_stripped = s.replaceAll(\"\\\\s\",\"\");\n//\t\tSystem.out.println(s_stripped);\n\t\tthis.shingleString(s_stripped);\n\t}",
"static void trimNL() {\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }",
"public static String normalize(CharSequence value) {\n if (value == null) {\n return null;\n }\n return WHITESPACE_PATTERN.matcher(value).replaceAll(\" \");\n }",
"private String avoidErrorChar (String original) {\n\t\tStringBuffer modSB = new StringBuffer();\n\t\tfor (int j=0; j < original.length(); j++) {\n\t\t\tchar c = original.charAt(j);\n\t\t\tif (c == '\\n') {\n\t\t\t\tmodSB.append(\"\\\\n\"); // rimpiazzo il ritorno a capo con il simbolo \\n\n\t\t\t} else if (c == '\"') {\n\t\t\t\tmodSB.append(\"''\"); // rimpiazzo le doppie virgolette (\") con due apostofi ('')\n\t\t\t} else if ((int)c > 31 || (int)c !=127){ // non stampo i primi 32 caratteri di controllo\n\t\t\t\tmodSB.append(c);\n\t\t\t}\n\t\t}\n\t\treturn modSB.toString();\n\t}",
"private boolean spaces() {\r\n return OPT(GO() && space() && spaces());\r\n }",
"public void buttonBackSpaceOnClick(View view){\n char[] CharacterOfString ;\n String Word = (String) display.getText();\n CharacterOfString = Word.toCharArray();\n Word=\"\";\n for (int count = 0; CharacterOfString.length-1 > count; count++){\n Word+=CharacterOfString[count];\n }\n /* for(char SingleChar: CharacterOfString){\n if(CharacterOfString[CharacterOfString.length-1]!= SingleChar)\n Word+=SingleChar;\n }*/\n display.setText(Word);\n\n }",
"public static String removeSpaces(String s) {\r\n StringTokenizer stt = new StringTokenizer(s);\r\n String res = \"\";\r\n\r\n while (stt.hasMoreTokens()) {\r\n String tok = stt.nextToken().trim();\r\n res += tok;\r\n }\r\n return res;\r\n }",
"public static String removeDuplicate(String word) {\n StringBuffer sb = new StringBuffer();\n if(word.length() <= 1) {\n return word;\n }\n char current = word.charAt(0);\n sb.append(current);\n for(int i = 1; i < word.length(); i++) {\n char c = word.charAt(i);\n if(c != current) {\n sb.append(c);\n current = c;\n }\n }\n return sb.toString();\n }",
"private String filter(String line) {\n return line.toLowerCase().replaceAll(\"[^a-z]\", \"\");\n }",
"static void trimWhitespace() {\n for (int i = a.size() - 1; i >= 0; i-- ) {\n Object o = a.get(i);\n StringBuilder sb = new StringBuilder();\n if (o instanceof Token)\n sb.append( ((Token)o).image );\n else\n sb.append((String)o);\n while(sb.length() > 0 && (sb.charAt(sb.length() - 1) == '\\u005cr'\n || sb.charAt(sb.length() - 1) == '\\u005cn'\n || sb.charAt(sb.length() - 1) == '\\u005ct'\n || sb.charAt(sb.length() - 1) == ' ')) {\n sb.deleteCharAt(sb.length() - 1);\n }\n if (sb.length() == 0) {\n a.remove(i);\n }\n else {\n a.set(i, sb.toString());\n break;\n }\n }\n if (a.size() == 0) {\n while(outputBuffer.length() > 0 && (outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr'\n || outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn'\n || outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005ct'\n || outputBuffer.charAt(outputBuffer.length() - 1) == ' ')) {\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }\n }\n }",
"@Test\n public void spacesInKeywordTest() {\n tester.correct(\"Laaa Laaa Laaaa Li\" );\n }",
"private Set<String> cleanSet(Set<String> s){\n\t\t\tLog.i(TAG, \"cleanSet(msg)\");\n\n\t\t\tif (s.contains(\"\")) {\n\t\t\t\ts.remove(\"\");\t\n\t\t\t}if (s.contains(\"etc\")) { // Developers prerogative\n\t\t\t\ts.remove(\"etc\");\n\t\t\t}\n\t\t\treturn s;\n\t\t}",
"private String removePunctuation(String word) {\n\n StringBuffer sb = new StringBuffer(word);\n if (word.length() == 0) {\n return word;\n }\n for (String cs : COMMON_SUFFIX) {\n if (word.endsWith(\"'\" + cs) || word.endsWith(\"’\" + cs)) {\n sb.delete(sb.length() - cs.length() - 1, sb.length());\n break;\n }\n }\n if (sb.length() > 0) {\n int first = Character.getType(sb.charAt(0));\n int last = Character.getType(sb.charAt(sb.length() - 1));\n if (last != Character.LOWERCASE_LETTER\n && last != Character.UPPERCASE_LETTER) {\n sb.deleteCharAt(sb.length() - 1);\n }\n if (sb.length() > 0 && first != Character.LOWERCASE_LETTER\n && first != Character.UPPERCASE_LETTER) {\n sb.deleteCharAt(0);\n }\n }\n return sb.toString();\n }"
] | [
"0.6759133",
"0.65202814",
"0.6216902",
"0.61561173",
"0.6070976",
"0.606",
"0.60290575",
"0.6029003",
"0.60168576",
"0.5997784",
"0.59586585",
"0.5957908",
"0.59537715",
"0.59268314",
"0.58822256",
"0.5865547",
"0.5848385",
"0.58142835",
"0.5812166",
"0.5761894",
"0.56890446",
"0.56889564",
"0.56600904",
"0.564982",
"0.56417286",
"0.5585395",
"0.5580286",
"0.55748296",
"0.5573484",
"0.5573242",
"0.55728567",
"0.55707383",
"0.55636036",
"0.5554788",
"0.5553581",
"0.55513823",
"0.5522295",
"0.55209816",
"0.5509777",
"0.5507833",
"0.55053616",
"0.54990655",
"0.54960316",
"0.5495589",
"0.54870504",
"0.5486946",
"0.5483345",
"0.5469749",
"0.54643506",
"0.54573876",
"0.5452152",
"0.5452152",
"0.5452152",
"0.5445532",
"0.5441525",
"0.5439271",
"0.54289114",
"0.5417665",
"0.5416459",
"0.540574",
"0.5393455",
"0.5388342",
"0.53815836",
"0.5375997",
"0.53641367",
"0.5356991",
"0.5350406",
"0.53421015",
"0.5337905",
"0.53374225",
"0.5333912",
"0.5331246",
"0.53292185",
"0.532464",
"0.53219575",
"0.5319006",
"0.5317937",
"0.5317666",
"0.531538",
"0.5310494",
"0.53006864",
"0.5298511",
"0.52863437",
"0.5277345",
"0.5272475",
"0.5270972",
"0.5267002",
"0.5266643",
"0.5266383",
"0.52641755",
"0.52566737",
"0.52553004",
"0.52439636",
"0.52437395",
"0.52413505",
"0.52412456",
"0.5239791",
"0.5236441",
"0.5236428",
"0.52331966",
"0.52259773"
] | 0.0 | -1 |
Muda o cliente de sala | public boolean changeClientRoom(String clientName, String roomName) {
try{
if(!rooms.contains(roomName)){ // Ja existe
return false;
}
Client clientFromMap = getClient(clientName);
if (!clientExists(clientFromMap)) {
return false;
}
clientFromMap.setRoom(roomName);
return true;
} catch (Exception e) {
System.err.println(e.getMessage());
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void grabarCliente(){\n RequestParams params = new RequestParams();\n params.put(\"nombre\",edtNombre.getText().toString().trim());\n params.put(\"apellido\",edtApellido.getText().toString().trim());\n params.put(\"correo\", edtCorreo.getText().toString().trim());\n String claveMD5 = edtClave.getText().toString().trim();\n try {\n params.put(\"clave\", ws.getMD5(claveMD5));\n } catch (Exception e) {\n e.printStackTrace();\n }\n params.put(\"id_cargo\",idCargo);\n params.put(\"autoriza\",validarCheckBoxAutoriza());\n crearUsuarioWS(params);\n }",
"void realizarSolicitud(Cliente cliente);",
"private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}",
"public void selecionarCliente() {\n int cod = tabCliente.getSelectionModel().getSelectedItem().getCodigo();\n cli = cli.buscar(cod);\n\n cxCPF.setText(cli.getCpf());\n cxNome.setText(cli.getNome());\n cxRua.setText(cli.getRua());\n cxNumero.setText(Integer.toString(cli.getNumero()));\n cxBairro.setText(cli.getBairro());\n cxComplemento.setText(cli.getComplemento());\n cxTelefone1.setText(cli.getTelefone1());\n cxTelefone2.setText(cli.getTelefone2());\n cxEmail.setText(cli.getEmail());\n btnSalvar.setText(\"Novo\");\n bloquear(false);\n }",
"Cliente(){}",
"@Override\n\tpublic void cadastrar(Cliente o) {\n\t\t\n\t}",
"@Override\n\tpublic void altaCliente(Cliente cliente) {\n\t}",
"public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}",
"public alterarSenhaCliente() {\n }",
"public void gravarCliente() {\n\t\tCliente cliente = new DAO<Cliente>(Cliente.class)\n\t\t\t\t.buscaPorId(this.clienteId);\n\t\tthis.solicitacao.adicionaCliente(cliente);\n\t\tSystem.out.println(\"Cliente a gravar é \" + cliente.getNome());\n\t}",
"public Cliente() {\n setUndecorated(true);\n initComponents();\n jLabel7.setText(\"Usted Cuenta con: \"+ connecion.dinero);\n llenarTablaReservaciones(jTableMostrarReserva,\"FK_Usuario\");\n// jTableMostrarReserva.removeColumn(jTableMostrarReserva.getColumn(\"Id\"));\n// jTableMostrarReserva.removeColumn(jTableMostrarReserva.getColumn(\"Id\"));\n connecion.MostarTEsta(\"ID_Estado\", \"1\");\n this.setSize(848, 512);\n this.setLocationRelativeTo(null);\n \n }",
"public TelaCliente() {\n\n try {\n Handler console = new ConsoleHandler();\n Handler file = new FileHandler(\"/tmp/roquerou.log\");\n console.setLevel(Level.ALL);\n file.setLevel(Level.ALL);\n file.setFormatter(new SimpleFormatter());\n LOG.addHandler(file);\n LOG.addHandler(console);\n LOG.setUseParentHandlers(false);\n } catch (IOException io) {\n LOG.warning(\"O ficheiro hellologgin.xml não pode ser criado\");\n }\n\n initComponents();\n NivelDAO nd = new NivelDAO();\n if (nd.buscar() == 3) {\n botaoNovoCliente.setEnabled(false);\n buscarcli.setEnabled(false);\n tabelaCliente.setEnabled(false);\n popularCombo();\n setarLabels();\n\n LOG.info(\"Abertura da Tela de Clientes\");\n } else {\n popularCombo();\n setarLabels();\n\n LOG.info(\"Abertura da Tela de Clientes\");\n }\n }",
"public Interfaz_RegistroClientes() {\n initComponents();\n limpiar();\n }",
"public Client buscarClientePorId(String id){\n Client client = new Client();\n \n // Faltaaaa\n \n \n \n \n \n return client;\n }",
"private static Cliente llenarDatosCliente() {\r\n\t\tCliente cliente1 = new Cliente();\r\n\t\tcliente1.setApellido(\"De Assis\");\r\n\t\tcliente1.setDni(368638373);\r\n\t\tcliente1.setNombre(\"alexia\");\r\n\t\tcliente1.setId(100001);\r\n\r\n\t\treturn cliente1;\r\n\t}",
"public Cliente() {\r\n\t\tSystem.out.println(\"El cliente es: Diego Juarez \"+\"\\n\");\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t}",
"public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }",
"public void novo() {\n cliente = new Cliente();\n }",
"@Override\n\tpublic void asignarClienteAcobrador() {\n\t\tSet<ClienteProxy> lista=grid.getMultiSelectionModel().getSelectedSet();\t\t\n\t\tif(!lista.isEmpty()){\n\t\t\tFACTORY.initialize(EVENTBUS);\n\t\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\t\t\t\n\t\t\tRequest<Boolean> request=context.asignarClientesAlCobrador(lista, beanGestorCobranza.getIdUsuarioOwner(), beanGestorCobranza.getIdUsuarioCobrador() , beanGestorCobranza.getIdGestorCobranza());\n\t\t\trequest.fire(new Receiver<Boolean>(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean response) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgoToBack();\n\t\t\t\t}});\n\t\t}else{\n\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\tnot.showPopup();\n\t\t}\n\t}",
"public TelaCliente() {\n \n CadCli = new Dao_CadastroCliente();\n initComponents();\n BtPesquisarConsulta.setEnabled(false);\n BtSalvarCli.setEnabled(false);\n BtAlterarCli.setEnabled(false);\n TipodeViaCli.setEnabled(false);\n TxEstadoCli.setEnabled(false);\n BtBuscarCli.setEnabled(false);\n BtLimparCli.setEnabled(false);\n TxTipoPessoa.setEnabled(false);\n PnlPj.setVisible(false);\n PnlPf.setVisible(false);\n centralizarComponente();\n\n }",
"public TelaAlterarCliente() {\n\t\tinitComponents();\n\t}",
"@Override\r\n\tpublic void aggiornaUI() {\r\n\t\tString valore = input_ricerca_cliente.getText();\r\n\t\tthis.clienti.setAll(AppFacadeController.getInstance().getGestisciClientiController().cercaCliente(valore));\r\n\t}",
"@Override\r\n\tpublic void buscarCliente(String dato) {\n\t\tList<Cliente> listaEncontrados = clienteDao.buscarContrato(dato);\r\n\t\tvistaCliente.mostrarClientes(listaEncontrados);\r\n\t}",
"public ListaCliente() {\n\t\tClienteRepositorio repositorio = FabricaPersistencia.fabricarCliente();\n\t\tList<Cliente> clientes = null;\n\t\ttry {\n\t\t\tclientes = repositorio.getClientes();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tclientes = new ArrayList<Cliente>();\n\t\t}\n\t\tObject[][] grid = new Object[clientes.size()][3];\n\t\tfor (int ct = 0; ct < clientes.size(); ct++) {\n\t\t\tgrid[ct] = new Object[] {clientes.get(ct).getNome(),\n\t\t\t\t\tclientes.get(ct).getEmail()};\n\t\t}\n\t\tJTable table= new JTable(grid, new String[] {\"NOME\", \"EMAIL\"});\n\t\tJScrollPane scroll = new JScrollPane(table);\n\t\tgetContentPane().add(scroll, BorderLayout.CENTER);\n\t\tsetTitle(\"Clientes Cadastrados\");\n\t\tsetSize(600,400);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t}",
"@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}",
"public void AfficherListClient() throws Exception{\n laListeClient = Client_Db_Connect.tousLesClients();\n laListeClient.forEach((c) -> {\n modelClient.addRow(new Object[]{ c.getIdent(),\n c.getRaison(),\n c.getTypeSo(),\n c.getDomaine(),\n c.getAdresse(),\n c.getTel(),\n c.getCa(),\n c.getComment(),\n c.getNbrEmp(),\n c.getDateContrat(),\n c.getAdresseMail()});\n });\n }",
"public void obtenerTipificacionesCliente(Participante cliente)\n throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Entrada\");\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n if (cliente.getOidCliente() == null) {\n cliente.setTipificacionCliente(null);\n if(log.isDebugEnabled()) {//sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- NULO : \");\n UtilidadesLog.debug(\"---- cliente : \" + cliente.getOidCliente());\n } \n } else {\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n query.append(\" SELECT CLIE_OID_CLIE, \");\n query.append(\" CLAS_OID_CLAS, \");\n query.append(\" SBTI_OID_SUBT_CLIE, \");\n query.append(\" TCCL_OID_TIPO_CLASI, \");\n query.append(\" TICL_OID_TIPO_CLIE \");\n query.append(\" FROM V_MAE_TIPIF_CLIEN \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + cliente\n .getOidCliente());\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- TIPIF : \" + respuesta);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n cliente.setTipificacionCliente(null);\n } else {\n TipificacionCliente[] tipificaciones = new TipificacionCliente[\n respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n tipificaciones[i] = new TipificacionCliente();\n\n {\n BigDecimal oidClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"CLAS_OID_CLAS\");\n tipificaciones[i].setOidClasificacionCliente((\n oidClasificacionCliente != null) ? new Long(\n oidClasificacionCliente.longValue()) : null);\n }\n\n tipificaciones[i].setOidSubTipoCliente(new Long((\n (BigDecimal) respuesta\n .getValueAt(i, \"SBTI_OID_SUBT_CLIE\")).longValue()));\n\n {\n BigDecimal oidTipoClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"TCCL_OID_TIPO_CLASI\");\n tipificaciones[i].setOidTipoClasificacionCliente(\n (oidTipoClasificacionCliente != null)? new Long(\n oidTipoClasificacionCliente.longValue()) \n : null);\n }\n\n tipificaciones[i].setOidTipoCliente(new Long(((BigDecimal)\n respuesta.getValueAt(i, \"TICL_OID_TIPO_CLIE\"))\n .longValue()));\n }\n\n cliente.setTipificacionCliente(tipificaciones);\n }\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Salida\");\n }",
"public Sesion(Cliente cl) {\n this.cliente = cl;\n estado = Estado.inicioBot;\n accion = Accion.iniciarSesion;\n valor = ValorAIngresar.pin;\n mensajeRecibido = null;\n respuesta = new Respuesta();\n }",
"public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}",
"public static void promedioBoletaCliente() {\r\n\t\tPailTap clienteBoleta = getDataTap(\"C:/Paula/masterset/data/9\");\r\n\t\tPailTap boletaProperty = getDataTap(\"C:/Paula/masterset/data/4\");\r\n\t\t\r\n\t\tSubquery promedio = new Subquery(\"?Cliente_id\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(clienteBoleta, \"_\", \"?data\")\r\n\t\t\t\t.predicate(boletaProperty, \"_\", \"?data2\")\r\n\t\t\t\t.predicate(new ExtractClienteBoleta(), \"?data\").out(\"?Cliente_id\", \"?Boleta_id\", \"?Dia\")\r\n\t\t\t\t.predicate(new ExtractBoletaTotal(), \"?data2\").out(\"?Boleta_id\",\"?Total\")\r\n\t\t\t\t.predicate(new Avg(), \"?Total\").out(\"?Promedio\");\r\n\t\t\r\n\t\tSubquery tobatchview = new Subquery(\"?json\")\r\n\t\t\t\t.predicate(promedio, \"?Cliente\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(new ToJSON(), \"?Cliente\", \"?Promedio\", \"?Dia\").out(\"?json\");\r\n\t\tApi.execute(new batchview(), tobatchview);\r\n\t\t//Api.execute(new StdoutTap(), promedio);\r\n\t}",
"public Sesion(String codigoCliente) {\n cliente = new Cliente(codigoCliente);\n estado = Estado.inicioBot;\n accion = Accion.registrar;\n valor = ValorAIngresar.nombre;\n mensajeRecibido = null;\n respuesta = new Respuesta();\n }",
"public AgregarClientes(Directorio directorio) {\n initComponents();\n this.directorio=directorio;\n \n \n }",
"public void emprestar(ClienteLivro cliente) {\n\t\tcliente.homem = 100;\n\n\t}",
"public AreaClientes() {\n initComponents();\n cargarTabla();\n editarCliente(false);\n \n }",
"public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}",
"public TelaCliente() {\n initComponents();\n conexao=ModuloConexao.conector();\n }",
"public String RespuestaCliente()\n{\tString Muestra=\"\";\n\t\n\tMuestra+=\"DATOS DEL CLIENTE\\n\"\n\t\t\t+ \"Nombre: \"+getNombre()+\"\\n\"\n\t\t\t+ \"DNI: \"+getDni()+\"\\n\"\n\t\t\t+ \"Salario: �\"+String.format(\"%.1f\",getSalario())+\"\\n\\n\";\n\t\n\treturn Muestra;\n\t\n\t}",
"private void addClient () {\n ArrayList<String> info = loadOnePlayerInfo();\n Ntotal++;\n Nnow++;\n\n System.out.println(\"Vai ser inicializado o utilizador \" + info.get(0));\n initThread(info.get(0), info.get(1));\n }",
"private void peticionDeCliente() throws IOException, InterruptedException {\n\t\tString mensaje = null;\n\t\tboolean salir = false;\n\t\twhile(!salir) {\n\t\t\tmensaje = in.readLine();\n\t\t\tif(mensaje!=null && !mensaje.split(\";\")[0].equals(\"Comprobacion\")) {\n\t\t\t\tthis.tcpServidor.colaPeticion.put(mensaje); //ALMACENA SOLICITUD EN COLA_PETICIONES\n\t\t\t\tSystem.out.println(\"Peticion del cliente \"+this.idCliente+\": \"+ mensaje);\n\t\t\t}\n\t\t}\n\t}",
"private void handleOptionOne() {\n\n ClientData clientData = view.askForClientPersonalDataAndCreateClientData(); // zwracamy stworzonego w widoku clienta z wrpowadoznych scanerem danych\n clientModel.save(clientData); // zapisujemy clienta do bazy danych\n view.showClientInformation(clientData); // wyswietlamy info o jego pinie itp.\n\n }",
"public Cliente getCliente() {\n return cliente;\n }",
"public void makeClient() {\n try {\n clienteFacade.create(cliente);\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Cliente creado exitosamente\", null));\n } catch (Exception e) {\n System.err.println(\"Error en la creacion del usuario: \" + e.getMessage());\n FacesContext.getCurrentInstance().addMessage(\"messages\", new FacesMessage(FacesMessage.SEVERITY_FATAL, e.getMessage(), null));\n }\n }",
"private static void menuCadastroCliente() throws Exception {\r\n String nome, email, cpf;\r\n int id;\r\n boolean erro = false;\r\n System.out.println(\"\\n\\t*** Cadastro ***\\n\");\r\n System.out.print(\"Nome completo: \");\r\n nome = read.nextLine();\r\n System.out.print(\"Email: \");\r\n email = read.next();\r\n do {\r\n System.out.print(\"CPF: \");\r\n cpf = read.next().replace(\".\", \"\").replace(\"-\", \"\");\r\n System.out.println(cpf);\r\n if (cpf.length() != 11) {\r\n System.out.println(\"CPF inválido!\\nDigite novamente!\");\r\n erro = true;\r\n }\r\n } while (erro);\r\n if (getCliente(email) == null) {\r\n\r\n id = arqClientes.inserir(new Cliente(nome, email, cpf));\r\n System.out.println(\"Guarde seu email, pois é através dele que você efetua o login em nossa plataforma\");\r\n System.out.println(\"Cadastro efetuado!\");\r\n gerenciadorSistema();\r\n } else {\r\n System.out.println(\"\\nJá existe Usuario com esse email!\\nCadastro cancelado!\");\r\n }\r\n }",
"public void ObtenerCliente(Connection conn, VOCliente voCli){\n\t\tString sqlBuscarCli=consultas.BuscarCliente();\r\n\t\ttry {\r\n\t\t\tPreparedStatement pstmt=conn.prepareStatement(sqlBuscarCli);\r\n\t\t\tpstmt.setString(1, voCli.getsNroCli());\r\n\t\t\tpstmt.setInt(2, voCli.getiIdCli());\r\n\t\t\tResultSet rs=pstmt.executeQuery();\r\n\t\t\t\r\n\t\t\tif(rs.next()){\r\n\t\t\t\tvoCli.setiIdDepto(rs.getInt(\"idDepto\"));\r\n\t\t\t\tvoCli.setiHrCargables(rs.getInt(\"hsCargables\"));\r\n\t\t\t\tvoCli.setiHonorarios(rs.getInt(\"honorarios\"));\r\n\t\t\t\tvoCli.setiMoneda(rs.getInt(\"moneda\"));\r\n\t\t\t\tvoCli.setsRut(rs.getString(\"rut\"));\r\n\t\t\t\tvoCli.setsNroCli(rs.getString(\"nroCli\"));\r\n\t\t\t\tvoCli.setsTel(rs.getString(\"tel\"));\r\n\t\t\t\tvoCli.setsDireccion(rs.getString(\"direccion\"));\r\n\t\t\t\tvoCli.setsNomCli(rs.getString(\"nomCli\"));\r\n\t\t\t}\r\n\t\t\trs.close(); pstmt.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}",
"public ClientesCadastrados() {\n initComponents();\n tabelaClientes();\n Tabela.setRowSelectionAllowed(false);\n Tabela.getTableHeader().setReorderingAllowed(false);\n setIcone();\n }",
"public Cliente getCliente() {\n return objCliente;\n }",
"public void verificarDatosConsola(Cliente cliente, List<Cuenta> listaCuentas) {\n\n int codigoCliente = cliente.getCodigo();\n\n System.out.println(\"Codigo: \"+cliente.getCodigo());\n System.out.println(\"Nombre: \"+cliente.getNombre());\n System.out.println(\"DPI: \"+cliente.getDPI());\n System.out.println(\"Direccion: \"+cliente.getDireccion());\n System.out.println(\"Sexo: \"+cliente.getSexo());\n System.out.println(\"Password: \"+cliente.getPassword());\n System.out.println(\"Tipo de Usuario: \"+ 3);\n\n System.out.println(\"Nacimiento: \"+cliente.getNacimiento());\n System.out.println(\"ArchivoDPI: \"+cliente.getDPIEscaneado());\n System.out.println(\"Estado: \"+cliente.isEstado());\n \n \n for (Cuenta cuenta : listaCuentas) {\n System.out.println(\"CUENTAS DEL CLIENTE\");\n System.out.println(\"Numero de Cuenta: \"+cuenta.getNoCuenta());\n System.out.println(\"Fecha de Creacion: \"+cuenta.getFechaCreacion());\n System.out.println(\"Saldo: \"+cuenta.getSaldo());\n System.out.println(\"Codigo del Dueño: \"+codigoCliente);\n \n }\n \n\n\n }",
"private void onCadastrarCliente() {\n prepFieldsNovoCliente();\n mainCliente = null;\n }",
"public void enviaMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=4\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}",
"public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}",
"public ControladorClientes(Vista vistaCliente) {\r\n\t\tthis.vistaCliente = vistaCliente;\r\n\t\tthis.clienteDao = new ClienteDAO();\r\n\t}",
"public VistaConsultarMovimientosPorCliente() {\n initComponents();\n continuarInicializandoComponentes();\n }",
"public DmaiClient() {\r\n\t\tthis.mainView = new MainView();\r\n\t\tconnexionServeur();\r\n\r\n\t}",
"public ICliente getCodCli();",
"@Override\r\n public List<Cliente> listarClientes() throws Exception {\r\n Query consulta = entity.createNamedQuery(Cliente.CONSULTA_TODOS_CLIENTES);\r\n List<Cliente> listaClientes = consulta.getResultList();//retorna una lista\r\n return listaClientes;\r\n }",
"public void getOrdini(){\n caricamento = ProgressDialog.show(getActivity(), \"Cerco i tuoi ordini!\",\r\n \"Connessione con il server in corso...\", true);\r\n caricamento.show();\r\n\r\n JSONObject postData = new JSONObject();\r\n try {\r\n postData.put(\"id_utente\", Parametri.id);\r\n\r\n } catch (Exception e) {\r\n caricamento.dismiss();\r\n return;\r\n }\r\n\r\n Connessione conn = new Connessione(postData, \"POST\");\r\n conn.addListener(this);\r\n //In Parametri.IP c'è la path a cui va aggiunta il nome della pagina.php\r\n conn.execute(Parametri.IP + \"/SistudiaMieiOrdiniAndroid.php\");\r\n\r\n }",
"public void cadastrar(Cliente cliente){\n\t\tSystem.out.println(cliente.toString());\r\n\t\tint tamanho = this.clientes.length;\r\n\t\tthis.clientes = Arrays.copyOf(this.clientes, this.clientes.length + 1);\r\n\t\tthis.clientes[tamanho - 1] = cliente;\r\n\t}",
"public ArrayList<Cliente> listarClientes(){\n ArrayList<Cliente> ls = new ArrayList<Cliente>();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, idioma, categoria FROM clientes\";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial.\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n Cliente cl = new Cliente();\n cl.setCodigo(rs.getInt(\"codigo\"));\n cl.setNit(rs.getString(\"nit\"));\n cl.setRazonSocial(rs.getString(\"razonsocial\"));\n cl.setCategoria(rs.getString(\"categoria\"));\n cl.setEmail(rs.getString(\"email\"));\n Calendar cal = new GregorianCalendar();\n cal.setTime(rs.getDate(\"fecharegistro\")); \n cl.setFechaRegistro(cal.getTime());\n cl.setIdioma(rs.getString(\"idioma\"));\n cl.setPais(rs.getString(\"pais\"));\n\t\t\tls.add(cl);\n\t\t}\n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n } \n return ls;\n\t}",
"public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}",
"@Override\n\tpublic void goToUiSelectClient(String modo) {\n\t\tif (modo.equalsIgnoreCase(constants.modoNuevo())) {\n\t\t\tuiHomeCobrador.getHeader().getLblTitulo().setText(constants.clientes());\n\t\t\tuiHomeCobrador.getHeader().setVisibleBtnMenu(false);\n\t\t\tuiHomeCobrador.getContainer().showWidget(3);\t\t\t\n\t\t\tuiHomeCobrador.getUiClienteSelected().cargarClienteSinCobrador();\n\t\t\tuiHomeCobrador.getUiClienteSelected().setBeanGestorCobranza(beanGestorCobranza);\n\t\t\tuiHomeCobrador.getUiClienteSelected().grid.getMultiSelectionModel().clear();\n\t\t}\n\t}",
"public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }",
"public OCSPCliente(String servidorURL)\r\n {\r\n this.servidorURL = servidorURL;\r\n }",
"@Override\n\tpublic Integer alta(Cliente cliente) {\n\t\treturn null;\n\t}",
"public void procesarRespuestaServidor(RutinaG rutina) {\n\n bdHelperRutinas = new BdHelperRutinas(context, BD_Rutinas);\n bdHelperRutinas.openBd();\n ContentValues registro = prepararRegistroRutina(rutina);\n bdHelperRutinas.insertTabla(DataBaseManagerRutinas.TABLE_NAME, registro);\n bdHelperRutinas.closeBd();\n }",
"public void asociarMedidorACliente(Cliente c, Medidor m){\r\n\t\t//TODO Implementar metodo\r\n\t}",
"private Cliente obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Entrada\");\n \n StringBuffer nombreCli = new StringBuffer();\n\n // crear cliente\n Cliente cliente = new Cliente();\n cliente.setOidCliente(oidCliente);\n\n // completar oidEstatus\n BigDecimal oidEstatus = null;\n\n {\n BelcorpService bs1;\n RecordSet respuesta1;\n String codigoError1;\n StringBuffer query1 = new StringBuffer();\n\n try {\n bs1 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n try {\n query1.append(\" SELECT CLIE_OID_CLIE, \");\n query1.append(\" ESTA_OID_ESTA_CLIE \");\n query1.append(\" FROM MAE_CLIEN_DATOS_ADICI \");\n query1.append(\" WHERE CLIE_OID_CLIE = \" + oidCliente);\n respuesta1 = bs1.dbService.executeStaticQuery(query1.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta1 \" + respuesta1);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n if (respuesta1.esVacio()) {\n cliente.setOidEstatus(null);\n } else {\n oidEstatus = (BigDecimal) respuesta1\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatus((oidEstatus != null) ? new Long(\n oidEstatus.longValue()) : null);\n }\n }\n // completar oidEstatusFuturo\n {\n BelcorpService bs2;\n RecordSet respuesta2;\n String codigoError2;\n StringBuffer query2 = new StringBuffer();\n\n try {\n bs2 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n try {\n query2.append(\" SELECT OID_ESTA_CLIE, \");\n query2.append(\" ESTA_OID_ESTA_CLIE \");\n query2.append(\" FROM MAE_ESTAT_CLIEN \");\n query2.append(\" WHERE OID_ESTA_CLIE = \" + oidEstatus);\n respuesta2 = bs2.dbService.executeStaticQuery(query2.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta2 \" + respuesta2); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n if (respuesta2.esVacio()) {\n cliente.setOidEstatusFuturo(null);\n } else {\n {\n BigDecimal oidEstatusFuturo = (BigDecimal) respuesta2\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatusFuturo((oidEstatusFuturo != null) \n ? new Long(oidEstatusFuturo.longValue()) : null);\n }\n }\n }\n // completar periodoPrimerContacto \n {\n BelcorpService bs3;\n RecordSet respuesta3;\n String codigoError3;\n StringBuffer query3 = new StringBuffer();\n\n try {\n bs3 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n try {\n query3.append(\" SELECT A.CLIE_OID_CLIE, \");\n query3.append(\" A.PERD_OID_PERI, \");\n query3.append(\" B.PAIS_OID_PAIS, \");\n query3.append(\" B.CANA_OID_CANA, \");\n query3.append(\" B.MARC_OID_MARC, \");\n query3.append(\" B.FEC_INIC, \");\n query3.append(\" B.FEC_FINA, \");\n query3.append(\" C.COD_PERI \");\n query3.append(\" FROM MAE_CLIEN_PRIME_CONTA A, \");\n query3.append(\" CRA_PERIO B, \");\n query3.append(\" SEG_PERIO_CORPO C \");\n query3.append(\" WHERE A.CLIE_OID_CLIE = \" + oidCliente);\n query3.append(\" AND A.PERD_OID_PERI = B.OID_PERI \");\n query3.append(\" AND B.PERI_OID_PERI = C.OID_PERI \");\n respuesta3 = bs3.dbService.executeStaticQuery(query3.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta3 \" + respuesta3); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n if (respuesta3.esVacio()) {\n cliente.setPeriodoPrimerContacto(null);\n } else {\n Periodo periodo = new Periodo();\n\n {\n BigDecimal oidPeriodo = (BigDecimal) respuesta3\n .getValueAt(0, \"PERD_OID_PERI\");\n periodo.setOidPeriodo((oidPeriodo != null) \n ? new Long(oidPeriodo.longValue()) : null);\n }\n\n periodo.setCodperiodo((String) respuesta3\n .getValueAt(0, \"COD_PERI\"));\n periodo.setFechaDesde((Date) respuesta3\n .getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuesta3\n .getValueAt(0, \"FEC_FINA\"));\n periodo.setOidPais(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"PAIS_OID_PAIS\")).longValue()));\n periodo.setOidCanal(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"CANA_OID_CANA\")).longValue()));\n periodo.setOidMarca(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"MARC_OID_MARC\")).longValue()));\n cliente.setPeriodoPrimerContacto(periodo);\n }\n }\n // completar AmbitoGeografico\n {\n BelcorpService bs4;\n RecordSet respuesta4;\n String codigoError4;\n StringBuffer query4 = new StringBuffer();\n\n try {\n bs4 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n try {\n //jrivas 29/6/2005\n //Modificado INC. 19479\n SimpleDateFormat sdfFormato = new SimpleDateFormat(\"dd/MM/yyyy\");\n String fechaDesde = sdfFormato.format(peri.getFechaDesde());\n String fechaHasta = sdfFormato.format(peri.getFechaHasta());\n\n query4.append(\" SELECT sub.oid_subg_vent, reg.oid_regi, \");\n query4.append(\" zon.oid_zona, sec.oid_secc, \");\n query4.append(\" terr.terr_oid_terr, \");\n query4.append(\" sec.clie_oid_clie oid_lider, \");\n query4.append(\" zon.clie_oid_clie oid_gerente_zona, \");\n query4.append(\" reg.clie_oid_clie oid_gerente_region, \");\n query4.append(\" sub.clie_oid_clie oid_subgerente \");\n query4.append(\" FROM mae_clien_unida_admin una, \");\n query4.append(\" zon_terri_admin terr, \");\n query4.append(\" zon_secci sec, \");\n query4.append(\" zon_zona zon, \");\n query4.append(\" zon_regio reg, \");\n query4.append(\" zon_sub_geren_venta sub \");\n //jrivas 27/04/2006 INC DBLG50000361\n //query4.append(\" , cra_perio per1, \");\n //query4.append(\" cra_perio per2 \");\n query4.append(\" WHERE una.clie_oid_clie = \" + oidCliente);\n query4.append(\" AND una.ztad_oid_terr_admi = \");\n query4.append(\" terr.oid_terr_admi \");\n query4.append(\" AND terr.zscc_oid_secc = sec.oid_secc \");\n query4.append(\" AND sec.zzon_oid_zona = zon.oid_zona \");\n query4.append(\" AND zon.zorg_oid_regi = reg.oid_regi \");\n query4.append(\" AND reg.zsgv_oid_subg_vent = \");\n query4.append(\" sub.oid_subg_vent \");\n //jrivas 27/04/2006 INC DBLG50000361\n query4.append(\" AND una.perd_oid_peri_fin IS NULL \");\n \n // sapaza -- PER-SiCC-2013-0960 -- 03/09/2013\n //query4.append(\" AND una.ind_acti = 1 \");\n \n /*query4.append(\" AND una.perd_oid_peri_fin = \");\n query4.append(\" AND una.perd_oid_peri_ini = per1.oid_peri \");\n query4.append(\" per2.oid_peri(+) \");\n query4.append(\" AND per1.fec_inic <= TO_DATE ('\" + \n fechaDesde + \"', 'dd/MM/yyyy') \");\n query4.append(\" AND ( per2.fec_fina IS NULL OR \");\n query4.append(\" per2.fec_fina >= TO_DATE ('\" + fechaHasta \n + \"', 'dd/MM/yyyy') ) \");*/\n\n respuesta4 = bs4.dbService.executeStaticQuery(query4.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"respuesta4: \" + respuesta4);\n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n Gerente lider = new Gerente();\n Gerente gerenteZona = new Gerente();\n Gerente gerenteRegion = new Gerente();\n Gerente subGerente = new Gerente();\n\n if (respuesta4.esVacio()) {\n cliente.setAmbitoGeografico(null);\n } else {\n AmbitoGeografico ambito = new AmbitoGeografico();\n ambito.setOidSubgerencia(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBG_VENT\")).longValue()));\n ambito.setOidRegion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_REGI\")).longValue()));\n ambito.setOidZona(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_ZONA\")).longValue()));\n ambito.setOidSeccion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SECC\")).longValue()));\n\n //jrivas 29/6/2005\n //Modificado INC. 19479\n ambito.setOidTerritorio(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"TERR_OID_TERR\")).longValue()));\n\n if (respuesta4.getValueAt(0, \"OID_LIDER\") != null) {\n lider.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_LIDER\")).longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_ZONA\") != null) {\n gerenteZona.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_GERENTE_ZONA\")).longValue()));\n ;\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_REGION\") != null) {\n gerenteRegion.setOidCliente(new Long(((BigDecimal) \n respuesta4.getValueAt(0, \"OID_GERENTE_REGION\"))\n .longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_SUBGERENTE\") != null) {\n subGerente.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBGERENTE\")).longValue()));\n }\n\n ambito.setLider(lider);\n ambito.setGerenteZona(gerenteZona);\n ambito.setGerenteRegion(gerenteRegion);\n ambito.setSubgerente(subGerente);\n\n cliente.setAmbitoGeografico(ambito);\n }\n }\n // completar nombre\n {\n BelcorpService bs5;\n RecordSet respuesta5;\n String codigoError5;\n StringBuffer query5 = new StringBuffer();\n\n try {\n bs5 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n try {\n query5.append(\" SELECT OID_CLIE, \");\n query5.append(\" VAL_APE1, \");\n query5.append(\" VAL_APE2, \");\n query5.append(\" VAL_NOM1, \");\n query5.append(\" VAL_NOM2 \");\n query5.append(\" FROM MAE_CLIEN \");\n query5.append(\" WHERE OID_CLIE = \" + oidCliente.longValue());\n respuesta5 = bs5.dbService.executeStaticQuery(query5.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta5 \" + respuesta5);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n if (respuesta5.esVacio()) {\n cliente.setNombre(null);\n } else {\n \n if(respuesta5.getValueAt(0, \"VAL_NOM1\")!=null) {\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_NOM2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM2\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE1\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE2\"));\n }\n \n cliente.setNombre(nombreCli.toString());\n }\n }\n\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Salida\");\n return cliente;\n }",
"public void onClick(View v) {\n\t\t\t\tif (networkAvailable()){\r\n\t\t\t\t\tIntent intent = new Intent(ClientesListTask.this, MapaClientes.class);\t\t\r\n\t\t\t\t\tintent.putExtra(\"idusuario\", idusuario);\t\t\t\t\t\t\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToast.makeText(ClientesListTask.this, \"Necesita conexion a internet para ver el mapa\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}",
"public List<Cliente> consultarClientes();",
"public String MuestraCualquiera() {//PARA MOSTRAR CUALQUIER TIPO DE CLIENTE\nString Muestra=\"\";\n\nif(getTipoCliente().equals(\"Docente\")) {//SI ES DOCENTE\nMuestra=MuestraDocente();//SE MUESTRAN SOLO LOS DATOS DE DOCENTE\n}else if(getTipoCliente().equalsIgnoreCase(\"Administrativo\")) {//SI ES ADMINISTRATIVO\nMuestra=MuestraAdministrativo();//SE MUESTRAN SOLO LOS DATOS DE ADMINISTRATIVO\n}\n\nreturn Muestra;\n}",
"Reserva Obtener();",
"public int almacenarCliente(Connection conn, BCliente cliente,BUsuario usuario)throws SQLException{\r\n\t\tICliente daoCliente = new DCliente();\r\n\r\n\t\treturn daoCliente.almacenarCliente(conn, cliente, usuario);\r\n\t}",
"private Client lireClientServ(int idClient) {\n\t\tClient client = daoclient.readClientDaoById(idClient);\n\t\treturn client;\n\t}",
"public int getIdCliente() {\n return idCliente;\n }",
"public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\n }",
"public ArrayList<DataCliente> listarClientes();",
"private void criaContaCliente (String cpf) {\n this.contasClientes.put(cpf, new Conta(cpf));\n }",
"public void run() {\n\t\ttry {\n\t\t\tin = new BufferedReader(new InputStreamReader(cliente.getInputStream()));\n\t\t\tmOut = new PrintWriter(new BufferedWriter(new OutputStreamWriter(cliente.getOutputStream())), true);\n\n\t\t\tint comparar = idCliente(); //recibe id del cliente\n\t\t\tif(comparar==0) { \n\t\t\t\t//ENVIA id PARA EL CLIENTE\n\t\t\t\tthis.tcpServidor.maxCliente++;\n\t\t\t\tenviarMensaje(\"ID;\"+this.tcpServidor.maxCliente);\n\t\t\t\t//ENVIA maxCliente A TODAS LAS REPLICAS\n\t\t\t\tfor (HiloReplica h : this.tcpServidor.hiloReplica) {\n\t\t\t\t\th.enviarMensaje(\"MAXCLIENTE;\"+this.tcpServidor.maxCliente);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.idCliente = comparar; //GUARDA id DEL CLIENTE\n\t\t\t}\n\t\n\t\t\tSystem.out.println(\"Cliente \"+this.idCliente+\" conectado a Balanceado \"+this.tcpServidor.id);\n\t\t\t\n\t\t\tpeticionDeCliente();\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(\"HiloCliente\" + \": Error\" + e);\n\t\t}\n\t}",
"private void iniciaTela() {\n try {\n tfCod.setText(String.valueOf(reservaCliDAO.getLastId()));\n desabilitaCampos(false);\n DefaultComboBoxModel modeloComboCliente;\n modeloComboCliente = new DefaultComboBoxModel(funDAO.getAll().toArray());\n cbFunc.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(quartoDAO.getAll().toArray());\n cbQuarto.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(cliDAO.getAll().toArray());\n cbCliente.setModel(modeloComboCliente);\n btSelect.setEnabled(false);\n verificaCampos();\n carregaTableReserva(reservaDAO.getAll());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic int agregarCliente(ClienteBean cliente) throws Exception {\n\t\treturn 0;\n\t}",
"public Clientes() {\n\t\tclientes = new Cliente[MAX_CLIENTES];\n\t}",
"public void setCodCli(ICliente codigo);",
"private void llenarControles(Cliente pCliente) {\n try {\n clienteActual = ClienteDAL.obtenerPorId(pCliente); // Obtener el Rol por Id \n this.txtNombre.setText(clienteActual.getNombre()); // Llenar la caja de texto txtNombre con el nombre del rol \n this.txtApellido.setText(clienteActual.getApellido());\n this.txtDui.setText(clienteActual.getDui());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n this.txtNumero.setText(Integer.toString(clienteActual.getNumero()));\n } catch (Exception ex) {\n // Enviar el mensaje al usuario de la pantalla en el caso que suceda un error al obtener los datos de la base de datos\n JOptionPane.showMessageDialog(frmPadre, \"Sucedio el siguiente error: \" + ex.getMessage());\n }\n }",
"public void clienteSalio(String name, String cuarto) throws IOException {\n if (cuarto.equals(\"Reunion de clientes\")) {\n IntercambioDeUsuarios(name);\n } else {\n for (int c = 0; c < clientesEsperando.length; c++) { // Transforma cualquier usuario que escribio salir en la lista de espera a null\n if (clientesEsperando[c] != null) {\n if (name.equals(clientesEsperando[c].clientName)) {\n\n \n clientesEsperando[c] = null;\n try {\n clientesEsperando[c] = clientesEsperando[c + 1]; \n clientesEsperando[c + 1] = null;\n } catch (Exception e) {\n }\n clientesEsperando[c].actualizarCuartosReunion(clientesConectados);\n clientesEsperando[c].actualizarCuartosEspera(clientesEsperando);\n break;\n }\n }\n }\n }\n\n }",
"private void obtenerClienteRecomendante(Cliente clienteParametro, Long \n oidPais) throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendante(Cliente\"\n +\"clienteParametro, Long oidPais):Entrada\");\n // query sobre INC\n BelcorpService bsInc = null;\n RecordSet respuestaInc = null;\n StringBuffer queryInc = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n try {\n //jrivas 17/8/2005\n //Inc 20556 \n queryInc.append(\" SELECT RECT.CLIE_OID_CLIE, FEC_INIC, FEC_FINA \");\n queryInc.append(\" FROM INC_CLIEN_RECDO RDO, CRA_PERIO, \");\n queryInc.append(\" INC_CLIEN_RECTE RECT \");\n queryInc.append(\" WHERE PERD_OID_PERI = OID_PERI \");\n queryInc.append(\" AND RDO.CLIE_OID_CLIE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND CLR3_OID_CLIE_RETE = OID_CLIE_RETE \");\n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n // query sobre MAE\n BelcorpService bsMae = null;\n RecordSet respuestaMae = null;\n StringBuffer queryMae = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n ClienteRecomendante clienteRecomendante = new ClienteRecomendante();\n boolean hayRecomendante;\n\n if (!respuestaInc.esVacio()) {\n // tomo los datos de INC\n hayRecomendante = true;\n\n {\n BigDecimal recomendante = (BigDecimal) respuestaInc\n .getValueAt(0, \"CLIE_OID_CLIE\");\n clienteRecomendante.setRecomendante((recomendante != null) \n ? new Long(recomendante.longValue()) : null);\n }\n\n clienteRecomendante.setFechaInicio((Date) respuestaInc\n .getValueAt(0, \"FEC_INIC\"));\n // fecha fin de INC\n {\n Date fechaFin = (Date) respuestaInc.getValueAt(0, \"FEC_FINA\");\n clienteRecomendante.setFechaFin((fechaFin != null) \n ? fechaFin : null);\n }\n \n /* */\n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n Date fec_desd = (Date) respuestaInc.getValueAt(0, \"FEC_INIC\");\n\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteParametro.getOidCliente()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(fec_desd) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n \n clienteParametro.setPeriodo(periodo);\n\n/* */\n } else {\n // BELC300022542 - gPineda - 24/08/06\n try {\n queryInc = new StringBuffer();\n \n //jrivas 4/7/2005\n //Inc 16978\n queryInc.append(\" SELECT CLIE_OID_CLIE_VNTE, FEC_DESD, FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNDO = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n \n // BELC300022542 - gPineda - 24/08/06\n //queryInc.append(\" AND COD_TIPO_VINC = '\" + ConstantesMAE.TIPO_VINCULO_RECOMENDADA + \"'\");\n queryInc.append(\" AND IND_RECO = 1 \");\n \n respuestaMae = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMae \" + respuestaMae); \n \n \n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n if (!respuestaMae.esVacio()) { \n Date fec_desd = (Date) respuestaMae.getValueAt(0, \"FEC_DESD\");\n \n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteParametro.getOidCliente()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(fec_desd) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n \n clienteParametro.setPeriodo(periodo);\n } \n // } \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if (!respuestaMae.esVacio()) {\n hayRecomendante = true;\n clienteRecomendante.setRecomendante(new Long(((BigDecimal) \n respuestaMae.getValueAt(0, \"CLIE_OID_CLIE_VNTE\"))\n .longValue()));\n\n {\n Date fechaInicio = (Date) respuestaMae\n .getValueAt(0, \"FEC_DESD\");\n clienteRecomendante.setFechaInicio((fechaInicio != null) \n ? fechaInicio : null);\n }\n // fecha fin de MAE\n {\n Date fechaFin = (Date) respuestaMae\n .getValueAt(0, \"FEC_HAST\");\n clienteRecomendante.setFechaFin((fechaFin != null) \n ? fechaFin : null);\n }\n } else {\n hayRecomendante = false;\n }\n }\n // tomo los datos de MAE\n if (hayRecomendante) {\n \n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteRecomendante.getRecomendante()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n\n clienteRecomendante.setPeriodo(periodo);\n // } \n \n Cliente clienteLocal = new Cliente();\n clienteLocal.setOidCliente(clienteRecomendante.getRecomendante());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendante.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n clienteParametro.setClienteRecomendante(clienteRecomendante);\n \n } else {\n clienteParametro.setClienteRecomendante(null);\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendante(Cliente\"\n +\" clienteParametro, Long oidPais):Salida\");\n }",
"private Cliente obtenerCliente(Long oidCliente, Solicitud solicitud)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerCliente(Long oidCliente,\"\n +\"Solicitud solicitud):Entrada\");\n\n /*Descripcion: este metodo retorna un objeto de la clase Cliente\n con todos sus datos recuperados.\n\n Implementacion:\n\n 1- Invocar al metodo obtenerDatosGeneralesCliente pasandole por\n parametro el oidCliente. Este metodo retornara un objeto de la clase\n Cliente el cual debe ser asignado a la propiedad cliente de la \n Solicitud.\n 2- Invocar al metodo obtenerTipificacionesCliente pasandole por\n parametro el objeto cliente. Este metodo creara un array de objetos\n de la clase TipificacionCliente el cual asignara al atributo\n tipificacionCliente del cliente pasado por parametro.\n 3- Invocar al metodo obtenerHistoricoEstatusCliente pasandole por\n parametro el objeto cliente. Este metodo asignara un array de objetos\n de la clase HistoricoEstatusCliente al atributo \n historicoEstatusCliente\n del cliente pasado por parametro.\n 4- Invocar al metodo obtenerPeriodosConPedidosCliente pasandole por\n parametro el objeto cliente. Este metodo asignara un array de objetos\n de la clase Periodo al atributo periodosConPedidos del cliente pasado\n por parametro.\n 5- Invocar al metodo obtenerClienteRecomendante pasandole por\n parametro el objeto cliente. Este metodo asignara un objeto de la\n calse ClienteRecomendante al atributo clienteRecomendante del cliente\n recibido por parametro.\n 6- Invocar al metodo obtenerDatosGerentes pasandole por parametro el\n objeto cliente.\n */\n\n //1\n Cliente cliente = this.obtenerDatosGeneralesCliente(oidCliente, \n solicitud.getPeriodo());\n solicitud.setCliente(cliente);\n\n //2\n UtilidadesLog.debug(\"****obtenerCliente 1****\");\n this.obtenerTipificacionesCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 2****\");\n\n //3\n this.obtenerHistoricoEstatusCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 3****\");\n\n //4\n this.obtenerPeriodosConPedidosCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 4****\");\n\n //5\n //jrivas 4/7/2005\n //Inc 16978 \n this.obtenerClienteRecomendante(cliente, solicitud.getOidPais());\n\n // 5.1\n // JVM - sicc 20070237, calling obtenerClienteRecomendado\n this.obtenerClienteRecomendado(cliente, solicitud.getOidPais());\n\n //6\n this.obtenerDatosGerentes(cliente, solicitud.getPeriodo());\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Salio de obtenerCliente - DAOSolicitudes\");\n \n // vbongiov 22/9/2005 inc 20940\n cliente.setIndRecomendante(this.esClienteRecomendante(cliente.getOidCliente(), solicitud.getPeriodo()));\n\n // jrivas 30/8//2006 inc DBLG5000839\n cliente.setIndRecomendado(this.esClienteRecomendado(cliente.getOidCliente(), solicitud.getPeriodo()));\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerCliente(Long oidCliente, \"\n +\"Solicitud solicitud):Salida\");\n return cliente;\n }",
"public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }",
"public CadastrarCliente() {\n initComponents();\n initComponents();\n FormatCamp();\n setLocation(110, 0);\n }",
"public ServeurGestion(int portClient){\r\n try {\r\n ecoute=new ServerSocket(portClient);\r\n appels=new Vector<>();\r\n } catch (IOException ex) {\r\n Logger.getLogger(ServeurGestion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"private void obtenerClienteRecomendado(Cliente clienteParametro, Long oidPais) throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Entrada\");\n\n BelcorpService bsInc = null;\n RecordSet respuestaInc = null;\n StringBuffer queryInc = new StringBuffer();\n ArrayList lstRecomendados;\n\n if ( clienteParametro.getClienteRecomendante() != null){\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"oidClienteRecomendante=\"+clienteParametro.getClienteRecomendante().getRecomendante());\n }\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n try {\n queryInc.append(\" SELECT \");\n queryInc.append(\" CLIE_OID_CLIE_VNDO CLIE_OID_CLIE, \");\n queryInc.append(\" FEC_DESD FEC_INIC, \");\n queryInc.append(\" FEC_HAST FEC_FINA \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n queryInc.append(\" AND CLIE_OID_CLIE_VNDO NOT IN ( \");\n \n // queryInc.append(\" SELECT RDO.CLIE_OID_CLIE, FEC_INIC, FEC_FINA \");\n queryInc.append(\" SELECT DISTINCT RDO.CLIE_OID_CLIE \");\n queryInc.append(\" FROM INC_CLIEN_RECDO RDO, CRA_PERIO, \");\n queryInc.append(\" INC_CLIEN_RECTE RECT \");\n queryInc.append(\" WHERE PERD_OID_PERI = OID_PERI \");\n queryInc.append(\" AND RECT.CLIE_OID_CLIE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND CLR3_OID_CLIE_RETE = OID_CLIE_RETE \");\n \n queryInc.append(\" ) \");\n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n //BelcorpService bsMae = null;\n RecordSet respuestaMae = null;\n //StringBuffer queryMae = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n \n boolean hayRecomendado = false;\n Cliente clienteLocal = new Cliente();\n lstRecomendados = clienteParametro.getClienteRecomendado();\n\n if (!respuestaInc.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnINC(true);\n \n /* vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n * no lleno lstRecomendados con estos valores solo mantengo el indicador IndRecomendadosEnINC \n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaInc.getRowCount();i++){ \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente()); \n \n BigDecimal recomendado = (BigDecimal) respuestaInc.getValueAt(i, \"CLIE_OID_CLIE\");\n clienteRecomendado.setRecomendado((recomendado != null) ? new Long(recomendado.longValue()) : null);\n \n clienteRecomendado.setFechaInicio((Date) respuestaInc.getValueAt(i, \"FEC_INIC\"));\n Date fechaFin = (Date) respuestaInc.getValueAt(i, \"FEC_FINA\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n\n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n }*/\n } \n \n // vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n // \n \n try {\n queryInc = new StringBuffer(); \n queryInc.append(\" SELECT CLIE_OID_CLIE_VNDO, FEC_DESD, FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n\n respuestaMae = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMae \" + respuestaMae); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if (!respuestaMae.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnMAE(true);\n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaMae.getRowCount();i++){ \n \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente());\n\n clienteRecomendado.setRecomendado(new Long(((BigDecimal) \n respuestaMae.getValueAt(i, \"CLIE_OID_CLIE_VNDO\")).longValue()));\n {\n Date fechaInicio = (Date) respuestaMae.getValueAt(i, \"FEC_DESD\");\n clienteRecomendado.setFechaInicio((fechaInicio != null) ? fechaInicio : null);\n }\n\n {\n Date fechaFin = (Date) respuestaMae.getValueAt(i, \"FEC_HAST\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n }\n \n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n \n }\n \n clienteParametro.setClienteRecomendado(lstRecomendados);\n \n } else {\n hayRecomendado = false;\n }\n\n if (!hayRecomendado) {\n clienteParametro.setClienteRecomendado(null);\n }\n \n // JVM, sicc 20070381, if, manejo del Recomendador, bloque de recuparacion de periodo\n if (lstRecomendados.size() > 0)\n { \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n RecordSet respuestaMaeRdr = null;\n\n try { \n queryInc = new StringBuffer();\n queryInc.append(\" SELECT DISTINCT CLIE_OID_CLIE_VNTE , FEC_DESD , FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n respuestaMaeRdr = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMaeRdr \" + respuestaMaeRdr); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n ClienteRecomendante clienteRecomendador = new ClienteRecomendante();\n \n if (!respuestaMaeRdr.esVacio()) {\n \n {\n BigDecimal recomendador = (BigDecimal) respuestaMaeRdr.getValueAt(0, \"CLIE_OID_CLIE_VNTE\");\n clienteRecomendador.setRecomendante((recomendador != null) ? new Long(recomendador.longValue()) : null);\n }\n \n clienteRecomendador.setFechaInicio((Date) respuestaMaeRdr.getValueAt(0, \"FEC_DESD\"));\n // fecha fin de INC\n {\n Date fechaFin = (Date) respuestaMaeRdr.getValueAt(0, \"FEC_HAST\");\n clienteRecomendador.setFechaFin((fechaFin != null)? fechaFin : null);\n }\n \n clienteParametro.setClienteRecomendador(clienteRecomendador);\n }\n \n for (int i=0; i<lstRecomendados.size(); i++){\n\n ClienteRecomendado clienteRecomendados = new ClienteRecomendado(); \n \n clienteRecomendados = (ClienteRecomendado) lstRecomendados.get(i);\n \n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n\n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteRecomendados.getRecomendado()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n\n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n BigDecimal bd;\n \n if (!respuestaInc.esVacio()) {\n\n Periodo periodo = new Periodo();\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n \n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n \n clienteRecomendados.setPeriodo(periodo);\n } \n }\n }\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"lstRecomendados(\"+lstRecomendados.size() + \n \") getIndRecomendadosEnMAE(\"+clienteParametro.getIndRecomendadosEnMAE() +\n \") getIndRecomendadosEnINC(\"+clienteParametro.getIndRecomendadosEnINC() +\")\"); \n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Salida\"); \n \n }",
"public ClienteConsultas() {\n listadeClientes = new ArrayList<>();\n clienteSeleccionado = new ArrayList<>();\n }",
"public void agregarDatosCliente(Integer codCliente){\n try{\n ClienteDao clienteDao = new ClienteDaoImp();\n //obtenemos la instancia de Cliente en Base a su codigo\n this.cliente = clienteDao.obtenerClientePorCodigo(codCliente);\n //Mensaje de confirmacion de exito de la operacion\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Correcto\", \"Cliente agregado correctamente!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }",
"public synchronized HashMap nextClient() throws SQLException \n\t{\n\t\tif (selClientes.next()) \n\t\t{\n\t\t\tHashMap result = new HashMap();\n\t\t\tresult.put(\"IDT_MSISDN\", selClientes.getString(\"IDT_MSISDN\"));\n\t\t\tresult.put(\"IDT_PROMOCAO\", new Integer(selClientes.getInt(\"IDT_PROMOCAO\")));\n\t\t\tresult.put(\"DAT_EXECUCAO\", selClientes.getDate(\"DAT_EXECUCAO\"));\n\t\t\tresult.put(\"DAT_ENTRADA_PROMOCAO\", selClientes.getDate(\"DAT_ENTRADA_PROMOCAO\"));\n\t\t\t//Para o campo IND_SUSPENSO, verificar se o campo lido foi NULL porque nao pode ser assumido o valor\n\t\t\t//0 como default\n\t\t\tresult.put(\"IND_SUSPENSO\", new Integer(selClientes.getInt(\"IND_SUSPENSO\")));\n\t\t\tif(selClientes.wasNull())\n\t\t\t{\n\t\t\t\tresult.put(\"IND_SUSPENSO\", null);\n\t\t\t}\n\t\t\tresult.put(\"IND_ISENTO_LIMITE\", new Integer(selClientes.getInt(\"IND_ISENTO_LIMITE\")));\n\t\t\tresult.put(\"IDT_STATUS\", new Integer(selClientes.getInt(\"IDT_STATUS\")));\n\t\t\tresult.put(\"DAT_EXPIRACAO_PRINCIPAL\", selClientes.getDate(\"DAT_EXPIRACAO_PRINCIPAL\"));\n\t\t\tresult.put(\"IND_ZERAR_SALDO_BONUS\", new Integer(selClientes.getInt(\"IND_ZERAR_SALDO_BONUS\")));\n\t\t\tresult.put(\"IND_ZERAR_SALDO_SMS\", new Integer(selClientes.getInt(\"IND_ZERAR_SALDO_SMS\")));\n\t\t\tresult.put(\"IND_ZERAR_SALDO_GPRS\", new Integer(selClientes.getInt(\"IND_ZERAR_SALDO_GPRS\")));\n\t\t\t//Verifica se os minutos totais sao menores que os minutos com tarifacao diferenciada Friends&Family. Caso \n\t\t\t//seja verdadeiro (o que indica inconsistencia na base ou perda de CDRs), os minutos FF devem ser ajustados \n\t\t\t//de forma a ficarem iguais aos minutos totais, conforme alinhamento entre Albervan, Luciano e Daniel\n\t\t\t//Ferreira. Esta decisao foi tomada de modo a diminuir o numero de reclamacoes por nao recebimento de \n\t\t\t//bonus, ao mesmo tempo em que os registros de ligacoes recebidas no extrato permanecerao consistentes \n\t\t\t//(o numero total de minutos nas ligacoes detalhadas correspondem ao numero consolidado, sendo estes todos \n\t\t\t//considerados como tendo tarifacao diferenciada).\n\t\t\tdouble minCredito = selClientes.getDouble(\"MIN_CREDITO\");\n\t\t\tdouble minFF = selClientes.getDouble(\"MIN_FF\");\n\t\t\tif(minCredito < minFF)\n\t\t\t{\n\t\t\t\tminFF = minCredito;\n\t\t\t}\n\t\t\tresult.put(\"MIN_CREDITO\", new Double(minCredito));\n\t\t\tresult.put(\"MIN_FF\", new Double(minFF));\n\t\t\t\n\t\t\treturn result;\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public ManterCliente() {\n try {\n initComponents();\n BloquearCampos();\n bt_salvar.setEnabled(false);\n bt_editar.setEnabled(false);\n txt_codigo.setEditable(true);\n mascaraCNPJ = new MaskFormatter(\"###.###.###/####-##\");\n mascaraCPF = new MaskFormatter(\"###.###.###-##\");\n } catch (ParseException ex) {\n JOptionPane.showMessageDialog(null, \"Erro ao carregar formulário. Contate o suporte.\");\n }\n }",
"public List<Cliente> mostrarClientes()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\t\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\t//Collections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"private static void esperarCliente() {\n try {\n socket = serverSocket.accept();\n System.out.println(\"Cliente conectado...\");\n } catch (IOException ex) {\n Logger.getLogger(ServidorUnicauca.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public Cliente(String nombre,int comensales){\n\t\tthis.nombre = nombre;\n\t\tthis.comensales =comensales;\n\t}",
"@GetMapping(\"/clientes\")\r\n\tpublic List<Cliente> listar(){\r\n\t\treturn iClienteServicio.findAll();\r\n\t\t\r\n\t}",
"private void iniciaFrm() {\n statusLbls(false);\n statusBtnInicial();\n try {\n clientes = new Cliente_DAO().findAll();\n } catch (Exception ex) {\n Logger.getLogger(JF_CadastroCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public static void main(String[] args) {\n\t\tString[] horasSesiones = {};\r\n\t\tSala sala = new Sala(\"Tiburon\", horasSesiones, 9, 5);\r\n\r\n\t\tsala.incluirSesion(\"20:00\");\r\n\r\n\t\t/*for (String hora : sala.getHorasDeSesionesDeSala())\r\n\t\t\tSystem.out.println(hora);*/\r\n\t//\tsala.borrarSesion(\"15:00\"); // no hace nada\r\n\t\t//sala.borrarSesion(\"20:00\");\r\n\r\n\t\tfor (String hora : sala.getHorasDeSesionesDeSala())\r\n\t\t\tSystem.out.println(hora);\r\n\r\n\t\t// necesitamos la ventanilla para mostrar el estado de la sesion\r\n\t\tVentanillaVirtualUsuario ventanilla = new VentanillaVirtualUsuario(null, true);\r\nSystem.out.println(sala.sesiones.size());\r\nSystem.out.print(sala.getEstadoSesion(1));\r\n\t\tsala.comprarEntrada(1, 2, 1);\r\n\t\tsala.comprarEntrada(1, 9, 3);\r\n\r\n\t\tint idVenta = sala.getIdEntrada(1, 9, 3);\r\n\r\n\t\tSystem.out.println(\"Id de venta es:\" + idVenta);\r\n\r\n\t\tButacasContiguas butacas = sala.recomendarButacasContiguas(1, 1);\r\n\r\n\t\tsala.comprarEntradasRecomendadas(1, butacas);\r\n\r\n\t\tint idVenta1 = sala.getIdEntrada(1, butacas.getFila(), butacas.getColumna());\r\n\r\n\t\tsala.recogerEntradas(idVenta1, 1);\r\n\r\n\t\tventanilla.mostrarEstadoSesion(sala.getEstadoSesion(1));\r\n\r\n\t\tSystem.out.println(\"No. de butacas disponibles: \" + sala.getButacasDisponiblesSesion(1));\r\n\r\n\t\tSystem.out.println(\"Tickets :\" + sala.recogerEntradas(idVenta, 1));\r\n\r\n\t\tSystem.out.println(\"Tickets recomendados:\" + sala.recogerEntradas(idVenta1, 1));\r\n\t\t//System.out.println(sala.sesiones.size());\r\n\t\t//sala.incluirSesion(\"10:56\");\r\n\t\t//sala.incluirSesion(\"10:57\");\r\n\t\t//System.out.println(sala.sesiones.size());\r\n\t\t/*{\r\n\t\t\tfor (int i = 0; i < sala.getHorasDeSesionesDeSala().length; i++) {\r\n\t\t\t\tSystem.out.println(sala.getHorasDeSesionesDeSala()[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}*/\r\n\t\t\r\n\t}",
"public void setIdCliente(int value) {\n this.idCliente = value;\n }",
"@Override\n public DatosIntercambio subirFichero(String nombreFichero,int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\n\n \t//AQUI HACE FALTA CONOCER LA IP PUERTO DEL ALMACEN\n \t//Enviamos los datos para que el servicio Datos almacene los metadatos \n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \t\n \t//aqui deberiamos haber combropado un mensaje de error si idCliente < 0 podriamos saber que ha habido error\n int idCliente = datos.almacenarFichero(nombreFichero,idSesionCliente);\n int idSesionRepo = datos.dimeRepositorio(idCliente);//sesion del repositorio\n Interfaz.imprime(\"Se ha agregado el fichero \" + nombreFichero + \" en el almacen de Datos\"); \n \n //Devolvemos la URL del servicioClOperador con la carpeta donde se guardara el tema\n DatosIntercambio di = new DatosIntercambio(idCliente , \"rmi://\" + direccionServicioClOperador + \":\" + puertoServicioClOperador + \"/cloperador/\"+ idSesionRepo);\n return di;\n }"
] | [
"0.7117037",
"0.69854295",
"0.6812915",
"0.6792957",
"0.6746365",
"0.6726394",
"0.67181",
"0.6642227",
"0.6620709",
"0.65338016",
"0.64890736",
"0.645106",
"0.6435881",
"0.6431414",
"0.6421196",
"0.63926005",
"0.63800615",
"0.636778",
"0.6366933",
"0.6366601",
"0.6353908",
"0.6343845",
"0.63049495",
"0.6302634",
"0.6301588",
"0.62879884",
"0.6286694",
"0.62775105",
"0.6268795",
"0.62637305",
"0.62591434",
"0.62565535",
"0.62364185",
"0.62275875",
"0.6221917",
"0.6213955",
"0.6211226",
"0.61840785",
"0.618081",
"0.616079",
"0.6154213",
"0.61397463",
"0.6136828",
"0.6133239",
"0.6124959",
"0.6124705",
"0.6118138",
"0.6108709",
"0.6106676",
"0.6102668",
"0.609639",
"0.6094216",
"0.60941577",
"0.609143",
"0.60886127",
"0.6087032",
"0.608703",
"0.6086459",
"0.6085846",
"0.6077042",
"0.60585904",
"0.60551304",
"0.60388917",
"0.60375005",
"0.60291135",
"0.601253",
"0.6012313",
"0.60097873",
"0.60056555",
"0.59996706",
"0.5989495",
"0.59857845",
"0.5983017",
"0.59802",
"0.597983",
"0.59789175",
"0.5968779",
"0.5967989",
"0.59658635",
"0.59658426",
"0.596582",
"0.5964301",
"0.59587663",
"0.59464467",
"0.5944754",
"0.59444904",
"0.5941506",
"0.5934436",
"0.5920558",
"0.59090114",
"0.59074247",
"0.59051657",
"0.59051174",
"0.59048235",
"0.58983934",
"0.5894098",
"0.58867896",
"0.5885445",
"0.5883614",
"0.5883342",
"0.5868801"
] | 0.0 | -1 |
Get paths and their lengths from beginning of graph to node | @Override
protected List<CriticalNode<N>> constructQueues(Collection<N> allNodes, Collection<L> allLinks, Collection<List<N>> allPaths, GraphPathsData<N> graphPathsData) {
List<Pair<List<N>, PathLength>> pathWithLengthPairs = GraphPathsData.computeLengthsOfPaths(
lengthComputer, allPaths, allNodes, allLinks, false
);
Map<N, Integer> nodeToLengthOfCriticalPathFromBegin = pathWithLengthPairs.stream().collect(Collectors.toMap(
//Key = first node of path
pathWithLengthFromBegin -> CollectionUtils.getLastOrNull(pathWithLengthFromBegin.first),
//Value = length of path in weight
pathWithLengthFromBegin -> pathWithLengthFromBegin.second.inNumberOfNodes
));
return graphPathsData.pathsWithLengths.stream()
//Map pair {path, pathLength} to pair {{path, pathLength}, coherence}
.map(pathWithLengthPair -> Pair.create(
pathWithLengthPair,
CoherenceComputer.getCoherence(CollectionUtils.getFirstOrNull(pathWithLengthPair.first), allLinks)
))
//Sort paths
.sorted(
//Sort by coherence
Comparator.<Pair<Pair<List<N>, PathLength>, Integer>, Integer>comparing(Pair::getSecond)
//Max first
.reversed()
//If equal coherence - sort by number of nodes left to beginning of graph
.thenComparing(
pathWithLengthPairWithCoherencePair ->
nodeToLengthOfCriticalPathFromBegin.get(
CollectionUtils.getFirstOrNull(
pathWithLengthPairWithCoherencePair.first.first
)
)
)
)
//pair {{path, lengthOfPath}, coherence} -> CriticalNode(firstNodeOfPath, {coherence, lengthOfPathInNumberOfNodes})
.map(pathWithLengthPairWithCoherencePair -> new CriticalNode<>(
CollectionUtils.getFirstOrNull(pathWithLengthPairWithCoherencePair.first.first),
new Tuple<>(
pathWithLengthPairWithCoherencePair.second,
nodeToLengthOfCriticalPathFromBegin.get(
CollectionUtils.getFirstOrNull(
pathWithLengthPairWithCoherencePair.first.first
)
)
)
))
.collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void shortestPathsNodes() {\n for (int sourceNode = 0; sourceNode < wordGraph.V(); sourceNode++) {\n BreadthFirstDirectedPaths bfs = new BreadthFirstDirectedPaths(wordGraph, sourceNode);\n\n for (int goalNode = 0; goalNode < wordGraph.V(); goalNode++) {\n Iterable<Integer> shortestPath = bfs.pathTo(goalNode);\n int pathLength = -1;\n if (shortestPath != null) {\n for (int edge : shortestPath) {\n pathLength++;\n }\n }\n if (pathLength != -1) {\n }\n System.out.println(pathLength);\n }\n }\n }",
"public int getNumberOfPaths(){ \r\n HashMap<FlowGraphNode, Integer> number = new HashMap<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n HashMap<FlowGraphNode, Integer> label = new HashMap<>();\r\n \r\n label.put(start,1);\r\n queue.add(start);\r\n do{\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n int count = number.getOrDefault(child, child.inDeg()) -1;\r\n if(count == 0){\r\n queue.add(child);\r\n number.remove(child);\r\n //label\r\n int sum = 0;\r\n for(FlowGraphNode anc : child.from){\r\n sum += label.get(anc);\r\n }\r\n label.put(child,sum);\r\n }else{\r\n number.put(child, count);\r\n }\r\n }\r\n }while(!queue.isEmpty());\r\n \r\n if(!number.isEmpty()){\r\n //there has to be a loop in the graph\r\n return -1;\r\n }\r\n \r\n return label.get(end);\r\n }",
"public int shortestPathLength(int[][] graph) {\n Queue<MyPath> q = new LinkedList<>();\n Set<String> visited = new HashSet<>();\n\n for (int i = 0; i < graph.length; i++) {\n MyPath path = new MyPath(i, (1 << i));\n visited.add(path.convertToString());\n q.offer(path);\n }\n\n int length = 0;\n while (!q.isEmpty()) {\n int size = q.size();\n while (size-- > 0) {\n MyPath next = q.poll();\n int curr = next.curr;\n int currPath = next.nodes;\n // Assume we have two nodes -> n = 2\n // 1 << 2 -> 100\n // 100 - 1 -> 011 which means both nodes are visited\n if (currPath == (1 << graph.length) - 1) {\n return length;\n }\n for (int neighbors : graph[curr]) {\n MyPath newPath = new MyPath(neighbors, currPath | (1 << neighbors));\n String pathString = newPath.convertToString();\n if (visited.add(pathString)) {\n q.offer(newPath);\n }\n }\n }\n length++;\n }\n\n return -1;\n }",
"public int pathLength(V from, V to) {\n\n if (from.equals(null) || to.equals(null)){\n throw new IllegalArgumentException();\n }\n\n HashMap <V, Integer> distances = new HashMap<>();\n if (!hasPath(from, to)){\n return Integer.MAX_VALUE;\n }\n\n if (from.equals(to)){\n return 0;\n }\n\n distances.put(from, 0);\n\n Queue<V> queue = new LinkedList<>();\n queue.add(from);\n\n while (!queue.isEmpty()){\n\n V curr_ver = queue.poll();\n ArrayList<V> neighbors = graph.get(curr_ver);\n int i = 0;\n V neighbor;\n int current_dist = distances.get(curr_ver);\n\n while (i < neighbors.size()){\n\n neighbor = neighbors.get(i);\n\n if (distances.containsKey(neighbor)){\n i++;\n continue;\n }\n\n if(neighbor.equals(to)){\n return distances.get(curr_ver) + 1;\n }\n\n i++;\n distances.put(neighbor, current_dist+ 1);\n queue.add(neighbor);\n\n }\n\n }\n\n return Integer.MAX_VALUE;\n\n }",
"public int getPathLength();",
"int getPathsCount();",
"public Graph runNumberOfPathThroughAnyNode(AdjacencyMatrix m){\r\n\t\tGraph graph = new Graph(m);\r\n\t\treturn PathCount.getNumberOfPathThroughAnyNode(graph);\t\r\n\t}",
"public int getPathCount() {\n return path_.size();\n }",
"public int getPathCount() {\n return path_.size();\n }",
"public Double getPathLenght (List<Long> path){\n \n Double res = 0.0;\n \n // thread save reading \n synchronized (vertexes){ \n for(int i=0; i<path.size()-1; i++){\n\n Map<Long,Edge> edges =vertexes.get(path.get(i)).allEdges();\n\n Edge edge = edges.get(path.get(i+1));\n\n if(edge != null){\n res += edge.getWeight();\n }else{\n return null;\n }\n\n }\n }\n \n return res;\n }",
"public int getNodeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return visited.size();\r\n }",
"public double avePathLength();",
"Iterable<Vertex> computePath(Vertex start, Vertex end) throws GraphException;",
"private List<routerNode> getPathVertexList(routerNode beginNode, routerNode endNode) {\r\n\t\tTransformer<routerLink, Integer> wtTransformer; // transformer for getting edge weight\r\n\t\twtTransformer = new Transformer<routerLink, Integer>() {\r\n public Integer transform(routerLink link) {\r\n return link.getWeight();\r\n \t}\r\n };\t\t\r\n\r\n\t\t\r\n\t\tList<routerNode> vlist;\r\n\t\tDijkstraShortestPath<routerNode, routerLink> DSPath = \r\n\t \t new DijkstraShortestPath<routerNode, routerLink>(gGraph, wtTransformer);\r\n \t// get the shortest path in the form of edge list \r\n List<routerLink> elist = DSPath.getPath(beginNode, endNode);\r\n\t\t\r\n \t\t// get the node list form the shortest path\r\n\t Iterator<routerLink> ebIter = elist.iterator();\r\n\t vlist = new ArrayList<routerNode>(elist.size() + 1);\r\n \tvlist.add(0, beginNode);\r\n\t for(int i=0; i<elist.size(); i++){\r\n\t\t routerLink aLink = ebIter.next();\r\n\t \t \t// get the nodes corresponding to the edge\r\n \t\tPair<routerNode> endpoints = gGraph.getEndpoints(aLink);\r\n\t routerNode V1 = endpoints.getFirst();\r\n\t routerNode V2 = endpoints.getSecond();\r\n\t \tif(vlist.get(i) == V1)\r\n\t \t vlist.add(i+1, V2);\r\n\t else\r\n\t \tvlist.add(i+1, V1);\r\n\t }\r\n\t return vlist;\r\n\t}",
"@Override\n\tpublic int totalPathLength() {\n\t\treturn totalPathLength(root, sum);// returns total path lenght number\n\t}",
"int getPathCost(Coordinate end) {\n if (!graph.containsKey(end)) {\n // test use display point\n // System.err.printf(\"Graph doesn't contain end vertex \\\"%s\\\"\\n\", end);\n return Integer.MAX_VALUE;\n }\n int weight = Integer.MAX_VALUE;\n for (Coordinate key : graph.keySet()) {\n if (key.equals(end)) {\n weight = graph.get(key).dist;\n }\n }\n return weight;\n }",
"public int getPathLength()\r\n\t{\r\n\t\treturn path.size();\r\n\t}",
"protected abstract int[] getPathElements();",
"private NodePath<T> collectPathNodes( WeightedGraph<T> graph, Object startNodeId, Object endNodeId ) {\n\t\tArrayDeque<Node<T>> deque = new ArrayDeque<>( searchNodes.size() );\n\t\tNode<T> startNode = graph.getNode( startNodeId );\n\t\tNode<T> endNode = graph.getNode( endNodeId );\n\t\tSearchNode<T> node = getSearchNode( endNode );\n\n\t\t//\tkeep this before we flush the maps\n\t\tfinal int finalDistance = node.getDistance();\n\n\t\t//\twalk backwards through the \"previous\" links\n\t\tdo {\n\t\t\tdeque.push( node.getNode() );\n\t\t}\n\t\twhile ( (node = getSearchNode( node.getPrevious() )) != null && ! node.equals( startNode ) );\n\t\tdeque.push( startNode );\n\n\t\tclearSearchNodes();\n\t\treturn new NodePath<>( new ArrayList<>( deque ), finalDistance );\n\t}",
"public List<List<Integer>> allPathsSourceTarget(int[][] graph) {\n \n boolean[] visited = new boolean[graph.length];\n \n List<Integer> paths = new ArrayList();\n paths.add(0);\n \n List<List<Integer>> allPaths = new ArrayList();\n \n dfs(0,graph.length-1, paths,allPaths,visited,graph);\n \n return allPaths;\n }",
"public static int p413ComputeShortestPathNumber(Vertex start, Vertex end){\n\t Queue<Vertex> queue=new LinkedList<Vertex>();\n\t Map<Vertex, Status> statusMap=new HashMap<Vertex, Status>();\n\t Map<Vertex, Integer> levelMap=new HashMap<Vertex, Integer>();\n\t List<List<Vertex>> allLevelList=new LinkedList<List<Vertex>>();\n\t \n\t queue.offer(start);\n\t statusMap.put(start, Status.Queued);\n\t levelMap.put(start, 0);\n\t \n\t Vertex vertex;\n\t int lastLevel=-1;\n\t List<Vertex> levelList = null;\n\t\twhile ((vertex = queue.poll()) != null) {\n\t\t\tint currentLevel = levelMap.get(vertex);\n\n\t\t\tif (currentLevel != lastLevel) {\n\t\t\t\tlastLevel = currentLevel;\n\t\t\t\tlevelList = new LinkedList<Vertex>();\n\n\t\t\t\tallLevelList.add(levelList);\n\t\t\t}\n\n\t\t\tlevelList.add(vertex);\n\n\t\t\tif (vertex.equals(end)) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tSet<Vertex> adjacentVertexes = vertex.getAdjacentVertexes();\n\t\t\tfor (Iterator iterator = adjacentVertexes.iterator(); iterator.hasNext();) {\n\t\t\t\tVertex adjacent = (Vertex) iterator.next();\n\n\t\t\t\tif (statusMap.get(adjacent) == null) {\n\t\t\t\t\tqueue.offer(adjacent);\n\t\t\t\t\tstatusMap.put(adjacent, Status.Queued);\n\t\t\t\t\tlevelMap.put(adjacent, currentLevel + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t \n\t int max=Integer.MIN_VALUE;\n\t List<Vertex> targetList=new LinkedList<Vertex>();\n\t targetList.add(end);\n\t for(int index=lastLevel-1;index>0;index--){\n\t\t List<Vertex> lastLevelList = allLevelList.get(index);\n\t\t List<Vertex> tmpList=new LinkedList<Vertex>();\n\n\t\t int count=0;\n\t\t for (Iterator iterator = lastLevelList.iterator(); iterator.hasNext();) {\n\t\t\t\tVertex lastLevelVertex = (Vertex) iterator.next();\n\t\t\t\tfor (Iterator iterator2 = targetList.iterator(); iterator2.hasNext();) {\n\t\t\t\t\tVertex vertex2 = (Vertex) iterator2.next();\n\t\t\t\t\tif(lastLevelVertex.getAdjacentVertexes().contains(vertex2)){\n\t\t\t\t\t count++;\n\t\t\t\t\t tmpList.add(lastLevelVertex);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t targetList=tmpList;\n\t\t \n\t\t if(count>max){\n\t\t \tmax=count;\n\t\t }\n\t }\n\t \n\t return max;\n\t}",
"ArrayList<Node> DFSIter( Graph graph, final Node start, final Node end)\n {\n boolean visited[] = new boolean[graph.numNodes];\n Stack<Node> stack = new Stack<Node>();\n Map< Node,Node> parentPath = new HashMap< Node,Node>(); \n stack.push(start);\n\n while ( !stack.isEmpty() )\n {\n Node currNode = stack.pop();\n // end loop when goal node is found\n if ( currNode == end )\n break;\n // If node has already been visited, skip it\n if ( visited[currNode.id] )\n continue;\n else\n {\n visited[currNode.id] = true;\n int numEdges = currNode.connectedNodes.size();\n\n for ( int i = 0; i < numEdges; i++ )\n {\n Node edgeNode = currNode.connectedNodes.get(i);\n if ( !visited[edgeNode.id] )\n {\n stack.push( edgeNode );\n parentPath.put( edgeNode, currNode);\n }\n }\n \n }\n }\n\n ArrayList<Node> path = new ArrayList<Node>();\n Node currNode = end;\n while ( currNode != null )\n {\n path.add(0, currNode);\n currNode = parentPath.get(currNode);\n }\n\n return path;\n }",
"@Override\n\tpublic ArrayList<Edge<Object>> getPath(String startNode, String endNode) {\n\t\treturn null;\n\t}",
"private void computePath(){\n LinkedStack<T> reversePath = new LinkedStack<T>();\n // adding end vertex to reversePath\n T current = end; // first node is the end one\n while (!current.equals(start)){\n reversePath.push(current); // adding current to path\n current = closestPredecessor[vertexIndex(current)]; // changing to closest predecessor to current\n }\n reversePath.push(current); // adding the start vertex\n \n while (!reversePath.isEmpty()){\n path.enqueue(reversePath.pop());\n }\n }",
"private List<Edge> getPath(Vertex source) {\n\t\tint [] predecessors = new ShortestPath().findShortestPath(this.residualNetwork, source);\n\t\tList<Edge> path = retrieveEdgesFromPredecessorArray(predecessors);\n\t\treturn path;\n\t}",
"private long nodesLength(Edge[] E) {\n\t\tlong nodesLength = 0;\n\t\tfor (Edge e:E ) {\n\t\t\tif (e.getTo() > nodesLength) nodesLength = e.getTo();\n\t\t\tif (e.getFrom() > nodesLength) nodesLength = e.getFrom();\n\t\t}\n\t\tnodesLength++;\t\n\t\treturn nodesLength;\t\t\n\t}",
"public static int numberOfWaysToTraverseGraph(int width, int height) {\n\n int[][] graph = new int[height][width];\n for (int i = 0; i < height; i++) {\n graph[i][0] = 1;\n }\n\n for (int j = 0; j < width; j++) {\n graph[0][j] = 1;\n }\n\n for (int i = 1; i < height; i++) {\n for (int j = 1; j < width; j++) {\n graph[i][j] = graph[i - 1][j] + graph[i][j - 1];\n }\n }\n return graph[height - 1][width - 1];\n }",
"public List<Node> findPath(Node start);",
"private double[] computeShortestPathLengths(Entity pStartNode,\r\n\t\t\tdouble pShortestPathLengthSum, double pMaxPathLength,\r\n\t\t\tSet<Entity> pWasSource)\r\n\t{\r\n\r\n\t\tint pStartNodeMaxPathLength = 0;\r\n\r\n\t\t// a set of nodes that have already been expanded -> algorithm should\r\n\t\t// expand nodes monotonically and not go back\r\n\t\tSet<Entity> alreadyExpanded = new HashSet<Entity>();\r\n\r\n\t\t// a queue holding the newly discovered nodes with their and their\r\n\t\t// distance to the start node\r\n\t\tList<Entity[]> queue = new ArrayList<Entity[]>();\r\n\r\n\t\t// initialize queue with start node\r\n\t\tEntity[] innerList = new Entity[2];\r\n\t\tinnerList[0] = pStartNode; // the node\r\n\t\tinnerList[1] = new Entity(\"0\"); // the distance to the start node\r\n\t\tqueue.add(innerList);\r\n\r\n\t\t// while the queue is not empty\r\n\t\twhile (!queue.isEmpty()) {\r\n\t\t\t// remove first element from queue\r\n\t\t\tEntity[] queueElement = queue.get(0);\r\n\t\t\tEntity currentNode = queueElement[0];\r\n\t\t\tEntity distance = queueElement[1];\r\n\t\t\tqueue.remove(0);\r\n\r\n\t\t\t// if the node was not already expanded\r\n\t\t\tif (!alreadyExpanded.contains(currentNode)) {\r\n\r\n\t\t\t\t// the node gets expanded now\r\n\t\t\t\talreadyExpanded.add(currentNode);\r\n\r\n\t\t\t\t// if the node was a source node in a previous run, we already\r\n\t\t\t\t// have added this path\r\n\t\t\t\tif (!pWasSource.contains(currentNode)) {\r\n\t\t\t\t\t// add the distance of this node to shortestPathLengthSum\r\n\t\t\t\t\t// check if maxPathLength must be updated\r\n\t\t\t\t\tint tmpDistance = new Integer(distance.getFirstLexeme());\r\n\t\t\t\t\tpShortestPathLengthSum += tmpDistance;\r\n\t\t\t\t\tif (tmpDistance > pMaxPathLength) {\r\n\t\t\t\t\t\tpMaxPathLength = tmpDistance;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// even if the node was a source node in a previous run there\r\n\t\t\t\t// can be a path to\r\n\t\t\t\t// other nodes over this node, so go on:\r\n\r\n\t\t\t\t// get the neighbors of the queue element\r\n\t\t\t\tSet<Entity> neighbors = getNeighbors(currentNode);\r\n\r\n\t\t\t\t// iterate over all neighbors\r\n\t\t\t\tfor (Entity neighbor : neighbors) {\r\n\t\t\t\t\t// if the node was not already expanded\r\n\t\t\t\t\tif (!alreadyExpanded.contains(neighbor)) {\r\n\t\t\t\t\t\t// add the node to the queue, increase node distance by\r\n\t\t\t\t\t\t// one\r\n\t\t\t\t\t\tEntity[] tmpList = new Entity[2];\r\n\t\t\t\t\t\ttmpList[0] = neighbor;\r\n\t\t\t\t\t\tInteger tmpDistance = new Integer(\r\n\t\t\t\t\t\t\t\tdistance.getFirstLexeme()) + 1;\r\n\t\t\t\t\t\ttmpList[1] = new Entity(tmpDistance.toString());\r\n\t\t\t\t\t\tqueue.add(tmpList);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tpStartNodeMaxPathLength = new Integer(distance.getFirstLexeme());\r\n\t\t}\r\n\t\teccentricityMap.put(pStartNode, pStartNodeMaxPathLength);\r\n\r\n\t\tdouble returnArray[] = { pShortestPathLengthSum, pMaxPathLength };\r\n\t\treturn returnArray;\r\n\t}",
"public int numberOfWaysToTraverseGraph( int width, int height ) {\n\n\t\tint[][] graph = new int[height][width];\n\n\t\t// first column cells will have only one way to reach them, thats from up\n\t\tfor( int row = 0; row < height; row++ ) {\n\t\t\tgraph[row][0] = 1;\n\t\t}\n\n\t\t// first row cells will have only one way to reach them, thats from left\n\t\tfor( int col = 0; col < width; col++ ) {\n\t\t\tgraph[0][col] = 1;\n\t\t}\n\n\t\t// rest of the cells\n\t\t// number of ways to reach = number of ways to reach cell in previous row + in previous col\n\t\tfor( int row = 1; row < height; row++ ) {\n\t\t\tfor( int col = 1; col < width; col++ ) {\n\n\t\t\t\t// better in reading\n\t\t\t\tint previousRow = row - 1;\n\t\t\t\tint previousCol = col - 1;\n\n\t\t\t\tgraph[row][col] = graph[previousRow][col] + graph[row][previousCol];\n\t\t\t}\n\t\t}\n\n\t\treturn graph[height - 1][width - 1];\n\t}",
"public Graph runNumberOfPathThroughAnyLink(AdjacencyMatrix m){\r\n\t\tGraph graph = new Graph(m);\r\n\t\treturn PathCount.getNumberOfPathThroughAnyLink(graph);\r\n\t}",
"public static void main(String[] args) {\n TreeNode root = new TreeNode(-2);\n root.add(1);\n root.add(-3);\n\n List<List<Integer>> list = pathSum(root, -5);\n System.out.println(list.size());\n }",
"private List<Edge<String>> getPath(Vertex<String> end,\n Vertex<String> start) {\n if (graph.label(end) != null) {\n List<Edge<String>> path = new ArrayList<>();\n\n Vertex<String> cur = end;\n Edge<String> road;\n while (cur != start) {\n road = (Edge<String>) graph.label(cur); // unchecked cast ok\n path.add(road);\n cur = graph.from(road);\n }\n return path;\n }\n return null;\n }",
"public void getAllPaths(Graph<Integer> graph) {\n\t\tTopologicalSort obj = new TopologicalSort();\r\n\t\tStack<Vertex<Integer>> result = obj.sort(graph);\r\n\t\t\r\n\t\t// source (one or multiple) must lie at the top\r\n\t\twhile(!result.isEmpty()) {\r\n\t\t\tVertex<Integer> currentVertex = result.pop();\r\n\t\t\t\r\n\t\t\tif(visited.contains(currentVertex.getId())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstack = new Stack<Vertex<Integer>>();\r\n\t\t\tSystem.out.println(\"Paths: \");\r\n\t\t\tvisited = new ArrayList<Long>();\r\n\t\t\tdfs(currentVertex);\r\n\t\t\t//System.out.println(stack);\r\n\t\t\t//GraphUtil.print(stack);\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public List<WeightedPoint> getPath()\n {\n return getPath(this.tail);\n }",
"Iterable<Vertex> computePathToGraph(Loc start, Vertex end) throws GraphException;",
"public int getEdgeCount(){\r\n HashSet<FlowGraphNode> visited = new HashSet<>();\r\n LinkedList<FlowGraphNode> queue = new LinkedList<>();\r\n queue.add(start);\r\n visited.add(start);\r\n int counter = 0;\r\n while(!queue.isEmpty()){\r\n FlowGraphNode node = queue.pop();\r\n counter += node.outDeg();\r\n for(FlowGraphNode child : node.to){\r\n if(visited.add(child)){\r\n queue.add(child);\r\n }\r\n }\r\n }\r\n return counter;\r\n }",
"public double getAverageHopsNumberPerPath (AbstractGrafo graph) throws ExcecaoGrafo {\n\t\tint numNodes = graph.getNos().tamanho();\n\t\tHashMap<String, Caminho> routeTable = new HashMap<String, Caminho>();\n\t\tList<Double> distances = new ArrayList<Double>();\n\t\tfor (int i = 1 ; i <= numNodes; i++) {\n\n\t\t\tfor (int k = 1 ; k <= numNodes ; k++) {\n\t\t\t\tif (k != i) {\n\t\t\t\t\tNo source = graph.getNo(new Integer(i).toString());\n\t\t\t\t\tNo destination = graph.getNo(new Integer(k).toString());\n\t\t\t\t\tCaminho path = Dijkstra.getMenorCaminho(graph, source, destination);\n\t\t\t\t\tString key = source.getId()+\"-\"+destination.getId();\n\t\t\t\t\tif (!routeTable.containsKey(key)) {\n\t\t\t\t\t\trouteTable.put(key,path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (Iterator<String> it = routeTable.keySet().iterator() ; it.hasNext() ; ) {\n\t\t\t\tString key = it.next();\n\t\t\t\tCaminho path = routeTable.get(key);\n\t\t\t\tdistances.add(path.getDistancia());\n\t\t\t}\n\n\t\t}\n\n\t\treturn this.mean(distances);\n\t}",
"ShortestPath(UndirectedWeightedGraph graph, String startNodeId, String endNodeId) throws NotFoundNodeException {\r\n\t\t\r\n\t\tif (!graph.containsNode(startNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, startNodeId);\r\n\t\t}\t\t\r\n\t\tif (!graph.containsNode(endNodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, endNodeId);\r\n\t\t}\t\r\n\r\n\t\tsrc = startNodeId;\r\n\t\tdst = endNodeId;\r\n\t\t\r\n\t\tif (endNodeId.equals(startNodeId)) {\r\n\t\t\tlength = 0;\r\n\t\t\tnumOfPath = 1;\r\n\t\t\tArrayList<String> path = new ArrayList<String>();\r\n\t\t\tpath.add(startNodeId);\r\n\t\t\tpathList.add(path);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// create a HashMap of updated distance from the starting node to every node\r\n\t\t\t// initially it is 0, inf, inf, inf, ...\r\n\t\t\tHashMap<String, Double> distance = new HashMap<String, Double>();\t\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif (nodeId.equals(startNodeId)) {\r\n\t\t\t\t\t// the starting node will always have 0 distance from itself\r\n\t\t\t\t\tdistance.put(nodeId, 0.0);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// the others have initial distance is infinity\r\n\t\t\t\t\tdistance.put(nodeId, Double.MAX_VALUE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// a HashMap of preceding node of each node\r\n\t\t\tHashMap<String, HashSet<String>> precedence = new HashMap<String, HashSet<String>>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tif ( nodeId.equals(startNodeId) ) {\r\n\t\t\t\t\tprecedence.put(nodeId, null);\t// the start node will have no preceding node\r\n\t\t\t\t}\r\n\t\t\t\telse { \r\n\t\t\t\t\tprecedence.put(nodeId, new HashSet<String>());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\tSet<String> unvisitedNode = new HashSet<String>();\r\n\t\t\tfor (String nodeId : graph.getNodeList().keySet()) {\r\n\t\t\t\tunvisitedNode.add(nodeId);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble minUnvisitedLength;\r\n\t\t\tString minUnvisitedNode;\r\n\t\t\t// run loop while not all node is visited\r\n\t\t\twhile ( unvisitedNode.size() != 0 ) {\r\n\t\t\t\t// find the unvisited node with minimum current distance in distance list\r\n\t\t\t\tminUnvisitedLength = Double.MAX_VALUE;\r\n\t\t\t\tminUnvisitedNode = \"\";\r\n\t\t\t\tfor (String nodeId : unvisitedNode) {\r\n\t\t\t\t\tif (distance.get(nodeId) < minUnvisitedLength) {\r\n\t\t\t\t\t\tminUnvisitedNode = nodeId;\r\n\t\t\t\t\t\tminUnvisitedLength = distance.get(nodeId); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// if there are no node that can be visited from the unvisitedNode, break the loop \r\n\t\t\t\tif (minUnvisitedLength == Double.MAX_VALUE) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// remove the node from unvisitedNode\r\n\t\t\t\tunvisitedNode.remove(minUnvisitedNode);\r\n\t\t\t\t\r\n\t\t\t\t// update the distance of its neighbors\r\n\t\t\t\tfor (Node neighborNode : graph.getNodeList().get(minUnvisitedNode).getNeighbors().keySet()) {\r\n\t\t\t\t\tdouble distanceFromTheMinNode = distance.get(minUnvisitedNode) + graph.getNodeList().get(minUnvisitedNode).getNeighbors().get(neighborNode).getWeight();\r\n\t\t\t\t\t// if the distance of the neighbor can be shorter from the current node, change \r\n\t\t\t\t\t// its details in distance and precedence\r\n\t\t\t\t\tif ( distanceFromTheMinNode < distance.get(neighborNode.getId()) ) {\r\n\t\t\t\t\t\tdistance.replace(neighborNode.getId(), distanceFromTheMinNode);\r\n\t\t\t\t\t\t// renew the precedence of the neighbor node\r\n\t\t\t\t\t\tprecedence.put(neighborNode.getId(), new HashSet<String>());\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (distanceFromTheMinNode == distance.get(neighborNode.getId())) {\r\n\t\t\t\t\t\t// unlike dijkstra's algorithm, multiple path should be update into the precedence\r\n\t\t\t\t\t\t// if from another node the distance is the same, add it to the precedence\r\n\t\t\t\t\t\tprecedence.get(neighborNode.getId()).add(minUnvisitedNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// if the current node in the process is the end node, we can stop the while loop here\r\n\t\t\t\tif (minUnvisitedNode == endNodeId) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (distance.get(endNodeId) == Double.MAX_VALUE) {\r\n\t\t\t\t// in case there is no shortest path between the 2 nodes\r\n\t\t\t\tlength = 0;\r\n\t\t\t\tnumOfPath = 0;\r\n\t\t\t\tpathList = null;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// other wise we have these information\r\n\t\t\t\tlength = distance.get(endNodeId);\r\n\t\t\t\t//numOfPath = this.getNumPath(precedence, startNodeId, endNodeId);\r\n\t\t\t\tpathList = this.findPathList(precedence, startNodeId, endNodeId);\r\n\t\t\t\tnumOfPath = pathList.size();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\t// END ELSE\t\t\r\n\t}",
"public int getPathsCount() {\n return paths_.size();\n }",
"int dijkstras(Node src, Node last) {\n\t\tPriorityQueue<Node> pq = new PriorityQueue<>((a, b) -> (a.getPrev().getDistance()) - (b.getPrev().getDistance()));\n\t\tsrc.getPrev().setDistance(0);\n\t\tlast.setFinished(true);\n\t\tpq.add(src);\n\t\tint count = 0;\n\t\t\n\t\twhile (!pq.isEmpty()) {\n\t\t\tNode n = pq.poll();\n\t\t\tcount++;\n\t\t\tif (n.isFinished()) return count;\n\t\t\tfor (Edge edge = n.getEdge(); edge != null; edge = edge.getNextEdge()) {\n\t\t\t\t\n\t\t\t\t//Checks to see if a path is shorter than the current one\n\t\t\t\tif (edge.getTo().getPrev().getDistance() > n.getPrev().getDistance() + edge.getWeight()) {\n\t\t\t\t\tedge.getTo().getPrev().setDistance(n.getPrev().getDistance() + edge.getWeight());\n\t\t\t\t\tedge.getTo().getPrev().setLast(n);\n\t\t\t\t\tpq.add(edge.getTo());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"public abstract int shortestPathDistance(String vertLabel1, String vertLabel2);",
"public double length() {\n\t\tdouble length = 0;\n\t\tif (isEmpty())\n\t\t\treturn 0;\n\t\tjava.util.ListIterator<PathPoint> it = listIterator();\n\t\tPathPoint current = it.next();\n\t\twhile (it.hasNext()) {\n\t\t\tPathPoint next = it.next();\n\t\t\tlength += mc.distance3d(current.getLocation(), next.getLocation());\n\t\t\tcurrent = next;\n\t\t}\n\t\treturn length;\n\t}",
"public int getPathsCount() {\n return paths_.size();\n }",
"@Override\r\n\tpublic double getAverageShortestPathLength()\r\n\t{\r\n\r\n\t\tif (averageShortestPathLength < 0) { // has not been initialized\r\n\t\t\tlogger.debug(\"Calling setGraphParameters\");\r\n\t\t\tsetGraphParameters();\r\n\t\t\t// logger.info(\"Sum = \" + (averageShortestPathLength *\r\n\t\t\t// (getNumberOfNodes() * (getNumberOfNodes()-1) / 2)));\r\n\t\t}\r\n\r\n\t\treturn averageShortestPathLength;\r\n\t}",
"public Integer getPathLength() {\n return pathLength;\n }",
"public int getNumOfPath(){\r\n\t\treturn numOfPath;\r\n\t}",
"void countPaths (int inicio) {\r\n\t\tint n = lisAdy.keySet().size();\r\n\t\tint paths[] = new int[n];\r\n\t\tvisitados = new boolean[n];\r\n\t\tcola = new ArrayDeque<> ();\r\n\t\t\r\n\t\ttoposort(inicio);\r\n\t\tpaths[inicio] = 1;\r\n\t\tfor (int i : cola) {\r\n\t\t\tfor (int v : lisAdy.get(i)) \r\n\t\t\t\tpaths[v] += paths[i];\r\n\t\t}\r\n\t}",
"public int noOfMPaths2Dest(int s,int t,int k){\n double INFINITY = Double.MAX_VALUE;\n boolean[] SPT = new boolean[intersection];\n double[] resultPath = new double[intersection];\n LinkedList<Integer>[] parent = new LinkedList[intersection]; //using linked list instead of array to store all the possible parent of an intersection\n\n for (int i = 0; i <intersection ; i++) {\n resultPath[i] = INFINITY;\n parent[i] = new LinkedList<>();\n }\n\n //decrease the distance for the first index\n resultPath[s] = 0;\n\n //add all the vertices to the MinHeap\n MinHeap minHeap = new MinHeap(k);\n for (int i = 0; i <intersection ; i++) {\n minHeap.add(i,resultPath[i]);\n }\n //while minHeap is not empty\n while(!minHeap.isEmpty()){\n //extract the min\n int extractedVertex = minHeap.extractMin();\n\n if(extractedVertex==t) {\n break;\n }\n SPT[extractedVertex] = true;\n\n LinkedList<Edge> list = g.adjacencylist[extractedVertex];\n for (int i = 0; i <list.size() ; i++) {\n Edge edge = list.get(i);\n int destination = edge.destination;\n if(SPT[destination]==false ) {\n\n double newKey = resultPath[extractedVertex] + edge.weight ;\n double currentKey = resultPath[destination];\n if(currentKey>=newKey){\n minHeap.updateKey(newKey, destination,resultPath[destination]);\n parent[destination].add(extractedVertex);\n resultPath[destination] = newKey;\n }\n }\n }\n }\n int numofPath =0;\n\n //calculate the number of path\n if(parent[t]!=null){\n boolean[] isVisited = new boolean[intersection];\n ArrayList<Integer> pathList = new ArrayList<>();\n pathList.add(t);\n numofPath = findAllPathsUtil(s, t, isVisited, pathList,numofPath,parent); //dfs\n\n }\n return numofPath;\n }",
"int getEdgeCount();",
"public ArrayList<Vertex> getPath(Vertex target) {\n\t\tArrayList<Vertex> path = new ArrayList<Vertex>();\n\t\tVertex step = target;\n\t\t// check if a path exists\n\t\tif (predecessors.get(step) == null) {\n\t\t\treturn null;\n\t\t}\n\t\tpath.add(step);\n\t\twhile (predecessors.get(step) != null) {\n\t\t\tstep = predecessors.get(step);\n\t\t\tpath.add(step);\n\t\t}\n\t\t// Put it into the correct order\n\t\tCollections.reverse(path);\n\n\n\t\tVertex current=null;\n\t\tVertex next=null;\n\t\tint length = path.size();\n\t\tfor(int i=0;i<length-1;i++){\n current = path.get(i);\n\t\t\t next = path.get(i+1);\n\t\t\tif(!rapid && (nodeColor_map.get(current.getName()).equalsIgnoreCase(\"dB\")||\n\t\t\t\t\tnodeColor_map.get(next.getName()).equalsIgnoreCase(\"dB\")))\n\t\t\t\trapid = true;\n\t\t\troute_length+= edge_length_map.get(new Pair(current,next));\n\t\t}\n\n\t\treturn path;\n\t}",
"int getNodeCount();",
"int getNodeCount();",
"private double getTotalWeightOnPath(SimpleDirectedWeightedGraph<Attraction, DefaultWeightedEdge> graph, \r\n\t\t\t GraphPath<Attraction, DefaultWeightedEdge> path) {\r\n\t\t\r\n\t\t double totalWeight = 0;\r\n\t\t List<DefaultWeightedEdge> edgeList= path.getEdgeList();\r\n\t\t for (DefaultWeightedEdge edge: edgeList) {\r\n\t\t\t Attraction source = graph.getEdgeSource(edge);\r\n\t\t\t Attraction end = graph.getEdgeTarget(edge);\r\n\t\t\t double weight= graph.getEdgeWeight(edge);\r\n\t\t\t // System.out.println(\"The weight from \" + source.getName() + \" to \" + end.getName() + \" is \" + weight);\r\n\t\t\t totalWeight += weight;\r\n\t\t }\r\n\t\treturn totalWeight;\r\n\t}",
"@Override\n public int nodeCount() {\n return graphNodes.size();\n }",
"public List<node_info> shortestPath(int src, int dest);",
"public int getSourcePathCount() {\n if (sourcePathBuilder_ == null) {\n return sourcePath_.size();\n } else {\n return sourcePathBuilder_.getCount();\n }\n }",
"int getNodesCount();",
"int getNodesCount();",
"private static void computePaths(Vertex source) {\n source.minDistance = 0;\n // retrieves with log(n) time\n PriorityQueue<Vertex> vertexPriorityQueue = new PriorityQueue<>();\n\n //BFS traversal\n vertexPriorityQueue.add(source);\n\n // O((v + e) * log(v))\n while (!vertexPriorityQueue.isEmpty()) {\n // this poll always returns the shortest distance vertex at log(v) time\n Vertex vertex = vertexPriorityQueue.poll();\n\n //visit each edge exiting vertex (adjacencies)\n for (Edge edgeInVertex : vertex.adjacencies) {\n // calculate new distance between edgeInVertex and target\n Vertex targetVertex = edgeInVertex.target;\n double edgeWeightForThisVertex = edgeInVertex.weight;\n double distanceThruVertex = vertex.minDistance + edgeWeightForThisVertex;\n if (distanceThruVertex < targetVertex.minDistance) {\n // modify the targetVertex with new calculated minDistance and previous vertex\n // by removing the old vertex and add new vertex with updates\n vertexPriorityQueue.remove(targetVertex);\n targetVertex.minDistance = distanceThruVertex;\n // update previous with the shortest distance vertex\n targetVertex.previous = vertex;\n vertexPriorityQueue.add(targetVertex);// adding takes log(v) time because needs to heapify\n }\n }\n }\n }",
"default int calcHeight() throws NotATreeException {\n\n int[] roots = getSources();\n\n if (roots.length == 0) {\n throw new NotATreeException();\n }\n\n class WrappedCalcLongestPath {\n private int calcLongestPath(int node, TIntList path) throws CycleDetectedException {\n\n if (!containsNode(node)) {\n throw new IllegalArgumentException(\"node \"+ node + \" was not found\");\n }\n\n if (isSink(node)) {\n return path.size()-1;\n }\n\n TIntList lengths = new TIntArrayList();\n for (int edge : getOutEdges(node)) {\n\n int nextNode = getHeadNode(edge);\n\n TIntList newPath = new TIntArrayList(path);\n newPath.add(nextNode);\n\n if (path.contains(nextNode)) {\n throw new CycleDetectedException(newPath);\n }\n\n lengths.add(calcLongestPath(nextNode, newPath));\n }\n\n return lengths.max();\n }\n }\n\n // it is ok if there are multiple roots (see example of enzyme-classification-cv where it misses the root that\n // connect children EC 1.-.-.-, EC 2.-.-.-, ..., EC 6.-.-.-)\n /*if (roots.length > 1) {\n throw new NotATreeMultipleRootsException(roots);\n }*/\n\n return new WrappedCalcLongestPath().calcLongestPath(roots[0], new TIntArrayList(new int[] {roots[0]}));\n }",
"void shortestPaths( Set<Integer> nodes );",
"public interface AllPairsShortestPathAlgo\n{\n long[][]getDistances(Graph g);\n}",
"public synchronized double getDistance(String from, String to) {\n\t\treturn (new DijkstraShortestPath<String, SumoEdge>(graph, from, to)).getPathLength();\n\t}",
"public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }",
"private List<Point> getPath(int index) {\n\t\t \n\t \n\t\t Node fromNode = oEdge.fromNode;\n\t\t Node toNode = oEdge.toNode;\n\t\t float x1 = fromNode.longitude;\n\t\t float x2 = toNode.longitude;\n\t\t float y1 = fromNode.latitude;\n\t\t float y2 = toNode.latitude;\n\t\t double slope, angle;\n\t\t if(x1!=x2) {\n\t\t\t slope = (y2-y1)/(x2-x1);\n\t\t\t \tangle = Math.atan(slope);\n\t\t\t \t} else {\n\t\t\t \t\tangle = Math.PI/2;\n\t\t\t \t}\n\t\t Double L = Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n\t\t float offsetPixels=0;\n\t\t if(Math.toDegrees(angle)>Math.toDegrees(90)) {\n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=roadWidth*1/10;\n\t\t\t }\n\t\t\t \n\t\t } else {\n\t\t\t \n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=-roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=-roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=-roadWidth*1/10;\n\t\t\t }\n\t\t }\n\t\t \n\t\t // This is the first parallel line\n\t\t float x1p1 = x1 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float x2p1 = x2 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float y1p1 = y1 + offsetPixels * (x1-x2) / L.floatValue();\n\t\t float y2p1 = y2 + offsetPixels * (x1-x2) / L.floatValue();\n//\t\t if(oEdge.edgeID==16) {\n//\t\t\t System.out.println(\"testing\");\n//\t\t }\n\t\t \n\t\t Point P1 = new Point(x1p1,y1p1);\n\t\t Point P2 = new Point(x2p1,y2p1);\n\t\t List<Point> gP = GetPoints(P1, P2);\n\t\t return gP;\n\t \n\t}",
"@Override\r\n public Set<List<String>> findAllPaths(int sourceId, int targetId, int reachability) {\r\n //all paths found\r\n Set<List<String>> allPaths = new HashSet<List<String>>();\r\n //collects path in one iteration\r\n Set<List<String>> newPathsCollector = new HashSet<List<String>>();\r\n //same as the solution but with inverted edges\r\n Set<List<String>> tmpPathsToTarget = new HashSet<List<String>>();\r\n //final solution\r\n Set<List<String>> pathsToTarget = new HashSet<List<String>>();\r\n \r\n String[] statementTokens = null; \r\n Set<Integer> allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n List<String> statementsFound = new ArrayList<String>();\r\n \r\n for (int i = 0; i < reachability; i++) {\r\n if (i == 0) { \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(sourceId);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n //allProcessedNodes.add(inNodeId); \r\n //Incoming nodes are reversed\r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n allPaths.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(sourceId);\r\n \r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n statementsFound.add(outEdge);\r\n allPaths.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n } else {\r\n newPathsCollector = new HashSet<List<String>>();\r\n\r\n for (List<String> statements: allPaths) {\r\n allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n int lastNodeInPath = 0;\r\n \r\n for (String predicate: statements) {\r\n if (predicate.contains(\">-\")) {\r\n statementTokens = predicate.split(\">-\");\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[0]).reverse().toString()));\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString()));\r\n lastNodeInPath = Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString());\r\n } else {\r\n statementTokens = predicate.split(\"->\"); \r\n allProcessedNodes.add(Integer.parseInt(statementTokens[0]));\r\n allProcessedNodes.add(Integer.parseInt(statementTokens[2]));\r\n lastNodeInPath = Integer.parseInt(statementTokens[2]);\r\n }\r\n }\r\n \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(lastNodeInPath);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n if (allProcessedNodes.contains(inNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n newPathsCollector.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(lastNodeInPath);\r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n if (allProcessedNodes.contains(outNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(outEdge);\r\n newPathsCollector.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n }\r\n allPaths.addAll(newPathsCollector);\r\n }\r\n \r\n //System.out.println(\"*****End of iteration \" + i);\r\n //System.out.println(\"#SIZE OF allPaths: \" + allPaths.size());\r\n int numItems = 0;\r\n for (List<String> currList: allPaths) {\r\n numItems = numItems + currList.size();\r\n }\r\n //System.out.println(\"#NUMBER OF ELEMS OF ALL LISTS: \" + numItems);\r\n //System.out.println(\"#SIZE OF tmpPathsToTarget : \" + tmpPathsToTarget.size());\r\n }\r\n \r\n //We need to reverse back all the predicates\r\n for (List<String> statements: tmpPathsToTarget) { \r\n List<String> fixedStatements = new ArrayList<String>(); \r\n for (int i = 0; i < statements.size(); i++) { \r\n String statement = statements.get(i); \r\n if (statement.contains(\">-\")) {\r\n fixedStatements.add(new StringBuilder(statement).reverse().toString());\r\n } else {\r\n fixedStatements.add(statement);\r\n } \r\n }\r\n pathsToTarget.add(fixedStatements);\r\n }\r\n return pathsToTarget;\r\n }",
"public static ArrayList<GraphNode> getPathWithPredicate(GraphNode startNode, Predicate<GraphNode> predicate, int maxLength) {\n ArrayList<GraphNode> path = new ArrayList<>();\n Comparator<GraphNode> nodeComparator = new GraphNodePositionComparator(getPositionOf(startNode));\n HashSet<GraphNode> alreadyFound = new HashSet<>();\n\n Predicate<GraphNode> predicateAndNotAlreadyFound = predicate.and(graphNode -> !alreadyFound.contains(graphNode));\n\n GraphNode currentNode = startNode;\n\n for (int i = 0; i < maxLength; i++) {\n path.add(currentNode);\n alreadyFound.add(currentNode);\n\n GraphNode maxNode = getMaxWithPredicate(\n currentNode.neighbors,\n nodeComparator,\n predicateAndNotAlreadyFound\n );\n\n if (maxNode == null) {\n break;\n }\n currentNode = maxNode;\n }\n\n return path;\n }",
"List<Edge> getPath() throws NoPathFoundException;",
"public String findDistanceOfPath(String[] vertices) {\r\n String source = vertices[0];\r\n int distance = 0;\r\n for (int i = 1; i < vertices.length; i++) {\r\n String target = vertices[i];\r\n Map<String, Integer> edgeMap = adj.get(source);\r\n if (edgeMap != null && edgeMap.containsKey(target)) {\r\n distance += edgeMap.get(target);\r\n } else {\r\n return \"NO SUCH ROUTE\";\r\n }\r\n source = target;\r\n }\r\n return String.valueOf(distance);\r\n }",
"public double length() {\n if (first.p == null) return 0;\n double distance = 0.0;\n Node n = first;\n Node n2 = first.next;\n while (!n.next.equals(first)) {\n distance += n.p.distanceTo(n2.p);\n n = n.next;\n n2 = n2.next;\n }\n distance += n.p.distanceTo(n2.p);\n return distance;\n }",
"@Test\n public void testDiameter() {\n Vertex v1 = new Vertex(1, \"A\");\n Vertex v2 = new Vertex(2, \"B\");\n Vertex v3 = new Vertex(3, \"C\");\n Vertex v4 = new Vertex(4, \"D\");\n\n Edge<Vertex> e1 = new Edge<>(v1, v2, 1);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 2);\n Edge<Vertex> e3 = new Edge<>(v1, v3, 4);\n Edge<Vertex> e4 = new Edge<>(v2, v4, 5);\n Edge<Vertex> e5 = new Edge<>(v3, v4, 6);\n\n\n Graph<Vertex, Edge<Vertex>> g = new Graph<>();\n g.addVertex(v1);\n g.addVertex(v2);\n g.addVertex(v3);\n g.addVertex(v4);\n g.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n g.addEdge(e4);\n g.addEdge(e5);\n\n List<Vertex> shortestPath = g.shortestPath(v1, v3);\n\n assertEquals(3, g.pathLength(shortestPath));\n assertEquals(6, g.diameter());\n }",
"int sizeOfPathArray();",
"@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tint[] prev = new int[dwg.nodeSize()];\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\tprev[src%dwg.nodeSize()] = -1;\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t\tprev[u.getKey()%dwg.nodeSize()] = v.getKey();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tList<node_data> ans = new ArrayList<node_data>();\n\t\tint run = dest;\n\t\twhile(run != src) {\n\t\t\tans.add(0,dwg.getNode(run));\n\t\t\trun = prev[run%dwg.nodeSize()];\n\t\t}\n\t\tans.add(0, dwg.getNode(src));\n\n\t\treturn ans;\n\t}",
"public int getPathCost() {\r\n\t\treturn pathCost;\r\n\t}",
"int getSourcepathCount();",
"int getSourcepathCount();",
"public int getPathCost(List<String> path) {\n\t\tif (path.size() == 1 || path.size() == 0)\n\t\t\treturn 0;\n\t\tint cost = 0;\n\t\tfor (int i = 1; i < path.size(); i++) {\n\t\t\tInteger weight = edges.get(path.get(i) + \" \" + path.get(i - 1));\n\t\t\tif (weight == null)\n\t\t\t\treturn -1;\n\t\t\tcost += weight;\n\t\t}\n\t\treturn cost;\n\t}",
"public int length(Iterable<Integer> v, Iterable<Integer> w) {\n if (!isValid(v, w)) {\n throw new IndexOutOfBoundsException();\n }\n\n BreadthFirstDirectedPaths bfsV = new BreadthFirstDirectedPaths(digraph, v);\n BreadthFirstDirectedPaths bfsW = new BreadthFirstDirectedPaths(digraph, w);\n\n int shortestPath = -1;\n Deque<Integer> ancestors = new ArrayDeque<>();\n\n for (int i = 0; i < this.digraph.V(); i++) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i)) {\n ancestors.push(i);\n }\n }\n\n for (Integer integer : ancestors) {\n int path = bfsV.distTo(integer) + bfsW.distTo(integer);\n if (shortestPath == -1 || path < shortestPath) {\n shortestPath = path;\n }\n }\n return shortestPath;\n }",
"private void generatePath(List<Coordinate> source, List<Coordinate> path) {\n for (int i = 0; i < source.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = source.get(i);\n Coordinate end = source.get(i + 1);\n graph.dijkstra(start);\n graph.printPath(end);\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n }\n }",
"public static void computePaths(Vertex source){\n\t\tsource.minDistance=0;\n\t\t//visit each vertex u, always visiting vertex with smallest minDistance first\n\t\tPriorityQueue<Vertex> vertexQueue=new PriorityQueue<Vertex>();\n\t\tvertexQueue.add(source);\n\t\twhile(!vertexQueue.isEmpty()){\n\t\t\tVertex u = vertexQueue.poll();\n\t\t\tSystem.out.println(\"For: \"+u);\n\t\t\tfor (Edge e: u.adjacencies){\n\t\t\t\tVertex v = e.target;\n\t\t\t\tSystem.out.println(\"Checking: \"+u+\" -> \"+v);\n\t\t\t\tdouble weight=e.weight;\n\t\t\t\t//relax the edge (u,v)\n\t\t\t\tdouble distanceThroughU=u.minDistance+weight;\n\t\t\t\tif(distanceThroughU<v.minDistance){\n\t\t\t\t\tSystem.out.println(\"Updating minDistance to \"+distanceThroughU);\n\t\t\t\t\tv.minDistance=distanceThroughU;\n\t\t\t\t\tv.previous=u;\n\t\t\t\t\t//move the vertex v to the top of the queue\n\t\t\t\t\tvertexQueue.remove(v);\n\t\t\t\t\tvertexQueue.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void computeAllPaths()\n {\n for (Station src : this.graph.stations)\n {\n List<Station> visited = new ArrayList<Station>();\n computePathsForNode(src, null, null, visited);\n }\n Print.printTripList(this.tripList);\n }",
"@Override\n public List<node_data> shortestPath(int src, int dest) {\n reset();\n for (node_data node : G.getV()) {\n node.setWeight(Double.POSITIVE_INFINITY);\n }\n\n DWGraph_DS.Node currentNode = (DWGraph_DS.Node) G.getNode(src);\n currentNode.setWeight(0);\n PriorityQueue<node_data> unvisitedNodes = new PriorityQueue(G.nodeSize(), weightComperator);\n unvisitedNodes.addAll(G.getV());\n HashMap<Integer, node_data> parent = new HashMap<>();\n parent.put(src, null);\n\n while (currentNode.getWeight() != Double.POSITIVE_INFINITY) {\n if (G.getNode(dest).getTag() == 1) {\n break;\n }\n for (edge_data edge : G.getE(currentNode.getKey())) {\n DWGraph_DS.Node neighbor = (DWGraph_DS.Node) G.getNode(edge.getDest());\n double tmpWeight = currentNode.getWeight() + edge.getWeight();\n if (tmpWeight < neighbor.getWeight()) {\n neighbor.setWeight(tmpWeight);\n unvisitedNodes.remove(neighbor);\n unvisitedNodes.add(neighbor);\n parent.put(neighbor.getKey(), currentNode);\n }\n }\n currentNode.setTag(1);\n if(currentNode.getKey()==dest) break;\n unvisitedNodes.remove(currentNode);\n currentNode = (DWGraph_DS.Node) unvisitedNodes.poll();\n }\n /*\n Rebuild the path list\n */\n if (!parent.keySet().contains(dest)) return null;\n List<node_data> pathList = new ArrayList<>();\n currentNode = (DWGraph_DS.Node) G.getNode(dest);\n while (parent.get(currentNode.getKey()) != null) {\n pathList.add(currentNode);\n currentNode = (DWGraph_DS.Node) parent.get(currentNode.getKey());\n }\n Collections.reverse(pathList);\n return pathList;\n }",
"private static int getLongestPath(ArrayList<ArrayList<Integer>> graph, int N) {\n int startNode = 1;\n int edgeVertex = 0;\n\n boolean[] visited = new boolean[N + 1];\n\n LinkedList<Integer> queue = new LinkedList<>();\n\n queue.add(startNode);\n visited[startNode] = true;\n\n while (!queue.isEmpty()) {\n int u = queue.poll();\n\n for (int v : graph.get(u)) {\n if (!visited[v]) {\n queue.add(v);\n visited[v]=true;\n edgeVertex = v;\n }\n }\n }\n\n\n //Doing BFS from one of the edgeVertex\n\n queue.clear();\n Arrays.fill(visited, false);\n\n int length = 0;\n\n queue.add(edgeVertex);\n queue.add(-1);\n visited[edgeVertex] = true;\n\n while (queue.size() > 1) {\n int u = queue.poll();\n\n if (u == -1) {\n queue.add(-1);\n length++;\n\n } else {\n for (int v : graph.get(u)) {\n if (!visited[v]) {\n queue.add(v);\n visited[v] = true;\n }\n }\n }\n }\n\n return length;\n }",
"public ArrayList<Integer> path(int startVertex, int stopVertex) {\n// you supply the body of this method\n int start = startVertex;\n int stop = stopVertex;\n int previous;\n ArrayList<Integer> list = new ArrayList<>();\n HashMap<Integer, Integer> route = new HashMap<>();\n Stack<Integer> visited = new Stack<>();\n Stack<Integer> reverse = new Stack<>();\n int parent;\n if(!pathExists(startVertex,stopVertex)){\n return new ArrayList<Integer>();\n }\n else if(startVertex == stopVertex){\n list.add(startVertex);\n return list;\n }\n else{\n while(!neighbors(start).contains(stopVertex)){\n List neighbor = neighbors(start);\n for (Object a: neighbor) {\n if(!pathExists((int)a,stopVertex)){\n continue;\n }\n if(visited.contains(a)){\n continue;\n }\n else {\n route.put((int) a, start);\n visited.push(start);\n start = (int) a;\n break;\n }\n }\n }\n route.put(stopVertex,start);\n list.add(stopVertex);\n previous = route.get(stopVertex);\n list.add(previous);\n while(previous!=startVertex){\n int temp = route.get(previous);\n list.add(temp);\n previous = temp;\n }\n for(int i=0; i<list.size(); i++){\n reverse.push(list.get(i));\n }\n int i=0;\n while(!reverse.empty()){\n int temp = reverse.pop();\n list.set(i,temp);\n i++;\n }\n//list.add(startVertex);\n return list;\n }\n }",
"@Override\r\n public List<T> breadthFirstPath(T start, T end) {\r\n\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n LinkedList<Vertex<T>> vertexList = new LinkedList<>();\r\n //Set<Vertex<T>> visited = new HashSet<>();\r\n ArrayList<Vertex<T>> visited = new ArrayList<>();\r\n\r\n LinkedList<Vertex<T>> pred = new LinkedList<>();\r\n int currIndex = 0;\r\n\r\n pred.add(null);\r\n\r\n vertexList.add(startV);\r\n visited.add(startV);\r\n\r\n LinkedList<T> path = new LinkedList<>();\r\n\r\n if (breadthFirstSearch(start, end) == false) {\r\n path = new LinkedList<>();\r\n return path;\r\n } else {\r\n while (vertexList.size() > 0) {\r\n Vertex<T> next = vertexList.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if (next == endV) {\r\n path.add(endV.getValue());\r\n break;\r\n }\r\n for (Vertex<T> neighbor : next.getNeighbors()) {\r\n if (!visited.contains(neighbor)) {\r\n pred.add(next);\r\n visited.add(neighbor);\r\n vertexList.add(neighbor);\r\n }\r\n }\r\n currIndex++;\r\n //path.add(next.getValue());\r\n\r\n }\r\n while (currIndex != 0) {\r\n Vertex<T> parent = pred.get(currIndex);\r\n path.add(parent.getValue());\r\n currIndex = visited.indexOf(parent);\r\n }\r\n }\r\n Collections.reverse(path);\r\n return path;\r\n }",
"public ArrayList<Integer> getPath(int destination){\n\t\tif(parent[destination] == NOPARENT || hasNegativeCycle[destination] == true){ //will crash if out of bounds!\n\t\t\treturn null; //Never visited or is part of negative cycle, path is undefined!\n\t\t}\n\t\tint curr = destination; \n\t\t//Actually build the path\n\t\tArrayList<Integer> nodesInPath = new ArrayList<Integer>();\n\t\twhile(parent[curr] != curr){ //has itself as parent\n\t\t\tnodesInPath.add(curr);\n\t\t\tcurr = parent[curr];\n\t\t}\n\t\tnodesInPath.add(curr); //add start node too!\n\t\treturn nodesInPath;\n\t}",
"private HashMap<String, Integer> getShortestPathBetweenDifferentNodes(Node start, Node end) {\n HashMap<Node, Node> parentChildMap = new HashMap<>();\n parentChildMap.put(start, null);\n\n // Shortest path between nodes\n HashMap<Node, Integer> shortestPathMap = new HashMap<>();\n\n for (Node node : getNodes()) {\n if (node == start)\n shortestPathMap.put(start, 0);\n else shortestPathMap.put(node, Integer.MAX_VALUE);\n }\n\n for (Edge edge : start.getEdges()) {\n shortestPathMap.put(edge.getDestination(), edge.getWeight());\n parentChildMap.put(edge.getDestination(), start);\n }\n\n while (true) {\n Node currentNode = closestUnvisitedNeighbour(shortestPathMap);\n\n if (currentNode == null) {\n return null;\n }\n\n // Save path to nearest unvisited node\n if (currentNode == end) {\n Node child = end;\n String path = end.getName();\n while (true) {\n Node parent = parentChildMap.get(child);\n if (parent == null) {\n break;\n }\n\n // Create path using previous(parent) and current(child) node\n path = parent.getName() + \"\" + path;\n child = parent;\n }\n HashMap<String,Integer> hm= new HashMap<>();\n hm.put(path, shortestPathMap.get(end));\n return hm;\n }\n currentNode.visit();\n\n // Go trough edges and find nearest\n for (Edge edge : currentNode.getEdges()) {\n if (edge.getDestination().isVisited())\n continue;\n\n if (shortestPathMap.get(currentNode) + edge.getWeight() < shortestPathMap.get(edge.getDestination())) {\n shortestPathMap.put(edge.getDestination(), shortestPathMap.get(currentNode) + edge.getWeight());\n parentChildMap.put(edge.getDestination(), currentNode);\n }\n }\n }\n }",
"public void findShortestPath(String startName, String endName) {\n checkValidEndpoint(startName);\n checkValidEndpoint(endName);\n\n Vertex<String> start = vertices.get(startName);\n Vertex<String> end = vertices.get(endName);\n\n double totalDist; // totalDist must be update below\n\n Map<Vertex<String>, Double> distance = new HashMap<>();\n Map<Vertex<String>, Vertex<String>> previous = new HashMap<>();\n Set<Vertex<String>> explored = new HashSet<>();\n PriorityQueue<VertexDistancePair> pq = new PriorityQueue<>();\n\n\n\n addPQ(distance, start, pq, previous);\n\n\n\n dijkstraHelper(pq, end, explored, distance, previous);\n\n\n\n\n\n\n totalDist = distance.get(end);\n List<Edge<String>> path = getPath(end, start);\n printPath(path, totalDist);\n }",
"Integer distance(PathFindingNode a, PathFindingNode b);",
"private HashMap<String, Integer> getShortestPath(Node start, Node end){\n if(start.equals(end)) {\n return getShortestPath(start);\n }\n return getShortestPathBetweenDifferentNodes(start,end);\n }",
"private static ArrayList<Connection> pathFindDijkstra(Graph graph, int start, int goal) {\n\t\tNodeRecord startRecord = new NodeRecord();\r\n\t\tstartRecord.setNode(start);\r\n\t\tstartRecord.setConnection(null);\r\n\t\tstartRecord.setCostSoFar(0);\r\n\t\tstartRecord.setCategory(OPEN);\r\n\t\t\r\n\t\tArrayList<NodeRecord> open = new ArrayList<NodeRecord>();\r\n\t\tArrayList<NodeRecord> close = new ArrayList<NodeRecord>();\r\n\t\topen.add(startRecord);\r\n\t\tNodeRecord current = null;\r\n\t\tdouble endNodeCost = 0;\r\n\t\twhile(open.size() > 0){\r\n\t\t\tcurrent = getSmallestCSFElementFromList(open);\r\n\t\t\tif(current.getNode() == goal){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tGraphNode node = graph.getNodeById(current.getNode());\r\n\t\t\tArrayList<Connection> connections = node.getConnection();\r\n\t\t\tfor( Connection connection :connections){\r\n\t\t\t\t// get the cost estimate for end node\r\n\t\t\t\tint endNode = connection.getToNode();\r\n\t\t\t\tendNodeCost = current.getCostSoFar() + connection.getCost();\r\n\t\t\t\tNodeRecord endNodeRecord = new NodeRecord();\r\n\t\t\t\t// if node is closed skip it\r\n\t\t\t\tif(listContains(close, endNode))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t// or if the node is in open list\r\n\t\t\t\telse if (listContains(open,endNode)){\r\n\t\t\t\t\tendNodeRecord = findInList(open, endNode);\r\n\t\t\t\t\t// print\r\n\t\t\t\t\t// if we didn't get shorter route then skip\r\n\t\t\t\t\tif(endNodeRecord.getCostSoFar() <= endNodeCost) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// else node is not visited yet\r\n\t\t\t\telse {\r\n\t\t\t\t\tendNodeRecord = new NodeRecord();\r\n\t\t\t\t\tendNodeRecord.setNode(endNode);\r\n\t\t\t\t}\r\n\t\t\t\t//update the node\r\n\t\t\t\tendNodeRecord.setCostSoFar(endNodeCost);\r\n\t\t\t\tendNodeRecord.setConnection(connection);\r\n\t\t\t\t// add it to open list\r\n\t\t\t\tif(!listContains(open, endNode)){\r\n\t\t\t\t\topen.add(endNodeRecord);\r\n\t\t\t\t}\r\n\t\t\t}// end of for loop for connection\r\n\t\t\topen.remove(current);\r\n\t\t\tclose.add(current);\r\n\t\t}// end of while loop for open list\r\n\t\tif(current.getNode() != goal)\r\n\t\t\treturn null;\r\n\t\telse { //get the path\r\n\t\t\tArrayList<Connection> path = new ArrayList<>();\r\n\t\t\twhile(current.getNode() != start){\r\n\t\t\t\tpath.add(current.getConnection());\r\n\t\t\t\tint newNode = current.getConnection().getFromNode();\r\n\t\t\t\tcurrent = findInList(close, newNode);\r\n\t\t\t}\r\n\t\t\tCollections.reverse(path);\r\n\t\t\treturn path;\r\n\t\t}\r\n\t}",
"public static List<CampusGraph.Edges<String, String>> findPath(CampusGraph<String, String> cg, String start, String destination) {\n if (cg == null || start == null || destination == null) {\n throw new IllegalArgumentException();\n }\n Queue<String> visitedNodes = new LinkedList<>();\n Map<String, List<CampusGraph.Edges<String, String>>> paths = new HashMap<>();\n visitedNodes.add(start); // Add start to Q\n paths.put(start, new LinkedList<>()); // Add start->[] to M (start mapped to an empty list)\n\n while (!visitedNodes.isEmpty()) {\n String currentNode = visitedNodes.remove();\n if (currentNode.equals(destination)) { // found the path\n return paths.get(currentNode);\n } else {\n List<CampusGraph.Edges<String, String>> neighbors = cg.getAllChildren(currentNode);\n neighbors.sort(new Comparator<CampusGraph.Edges<String, String>>() {\n @Override\n public int compare(CampusGraph.Edges<String, String> o1, CampusGraph.Edges<String, String> o2) {\n int cmpEndNode = o1.getEndTag().compareTo(o2.getEndTag());\n if (cmpEndNode == 0) {\n return o1.getEdgeLabel().compareTo(o2.getEdgeLabel());\n }\n return cmpEndNode;\n }\n }); // ascending list. Sort characters and books names all at once??\n\n for (CampusGraph.Edges<String, String> e: neighbors) {\n String neighbor = e.getEndTag();\n if (!paths.containsKey(neighbor)) { // i.e. if the neighbor is unvisited\n List<CampusGraph.Edges<String, String>> pathCopy = new LinkedList<>(paths.get(currentNode));\n pathCopy.add(e);\n paths.put(neighbor, pathCopy); // add the path exclusive to this neighbor\n visitedNodes.add(neighbor); // then, mark the neighbor as visited\n }\n }\n }\n }\n return null; // No destination found\n }",
"public int getShortestPathLatency(Node node) {\n HashMap<String, Integer> pathWeight = getShortestPath(node);\n if(pathWeight!=null && pathWeight.size()==1) {\n return pathWeight.entrySet().iterator().next().getValue();\n }\n return 0;\n }",
"public int getPathWeight(String path) {\n List<Character> list = path.chars().mapToObj(l -> (char) l).collect(Collectors.toList());\n if(list.size()==2) {\n // If we have only two nodes on our path - return existing edge weight\n return getWeight(getNode(list.get(0).toString()), getNode(list.get(1).toString()));\n } else {\n // If we have more than two nodes on our path\n int w = 0;\n for(int i=0; i<list.size()-1; i++) {\n int localWeight = getWeight(getNode(list.get(i).toString()), getNode(list.get(i + 1).toString()));\n // Handle case of non existing connection\n if(localWeight == 0) {\n logger.warn(\"NO SUCH TRACE: \" + list.get(i).toString() + \"-\" + list.get(i + 1).toString());\n return 0;\n }\n w = w + getWeight(getNode(list.get(i).toString()), getNode(list.get(i + 1).toString()));\n }\n return w;\n }\n\n }",
"@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tList<node_data> ans = new ArrayList<>();\n\t\tthis.shortestPathDist(src, dest);\n\t\tif(this.GA.getNode(src).getWeight() == Integer.MAX_VALUE || this.GA.getNode(dest).getWeight() == Integer.MAX_VALUE){\n\t\t\tSystem.out.print(\"There is not a path between the nodes.\");\n\t\t\treturn null;\n\t\t}\n\t\tgraph copied = this.copy();\n\t\ttransPose(copied);\n\t\tnode_data first = copied.getNode(dest);\n\t\tans.add(first);\n\t\twhile (first.getKey() != src) {\n\t\t\tCollection<edge_data> temp = copied.getE(first.getKey());\n\t\t\tdouble check= first.getWeight();\n\t\t\tif(temp!=null) {\n\t\t\t\tfor (edge_data edge : temp) {\n\t\t\t\t\tif (copied.getNode(edge.getDest()).getWeight() + edge.getWeight() == check) {\n\t\t\t\t\t\tfirst = copied.getNode(edge.getDest());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tans.add(first);\n\t\t}\n\t\tList<node_data> ans2 = new ArrayList<>();\n\t\tfor (int i = ans.size()-1;i>=0;i--){\n\t\t\tans2.add(ans.get(i));\n\t\t}\n\t\treturn ans2;\n\t}",
"public String getLengths() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i = 0; i < paths.size(); i++) {\n\t\t\tsb.append(paths.get(i).getLength());\n\n\t\t\tif (i != paths.size() - 1) {\n\t\t\t\tsb.append(\",\");\n\t\t\t}\n\t\t}\n\n\t\treturn sb.toString();\n\t}",
"private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is this doing here???\n if (neighbors.isEmpty()){\n \n }\n \n // looping through to find distances from start to neighbors\n for (T neighbor : neighbors){ \n int neighborIndex = vertexIndex(neighbor); \n int d = distances[currentIndex] + getEdgeWeight(current, neighbor);\n \n if (d < distances[neighborIndex]){ // if this distance is less than previous distance\n distances[neighborIndex] = d;\n closestPredecessor[neighborIndex] = current; // now closest predecessor is current\n }\n }\n \n if (current.equals(end)){\n atEnd = true;\n }\n else{\n // finding unvisited node that is closest to start node\n T min = getMinUnvisited();\n if (min != null){\n unvisited.remove(min); // remove minimum neighbor from unvisited\n visited.add(min); // add minimum neighbor to visited\n current = min;\n }\n }\n }\n computePath();\n totalDistance = distances[vertexIndex(end)];\n }",
"public static void computePaths(Point source) {\n\n\t\tsource.setMinimumDistance(0.0);\n\t\tPriorityQueue<Point> pointQueue = new PriorityQueue<Point>();\n\t\tpointQueue.add(source);\n\t\twhile (!pointQueue.isEmpty()) {\n\t\t\tPoint u = pointQueue.poll();\n\t\t\tif (u.getAdjacencies() != null) {\n\t\t\t\tfor (Edge e : u.getAdjacencies()) {\n\n\t\t\t\t\tPoint target = e.getTarget();\n\t\t\t\t\tdouble weight = e.getWeight();\n\t\t\t\t\tdouble distanceThroughP = weight + u.getMinimumDistance();\n\n\t\t\t\t\tif (distanceThroughP < target.getMinimumDistance()) {\n\t\t\t\t\t\tpointQueue.remove(target);\n\n\t\t\t\t\t\ttarget.setMinimumDistance(distanceThroughP);\n\t\t\t\t\t\ttarget.setPrevious(u);\n\t\t\t\t\t\tpointQueue.add(target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static int pathLength(int[] path, int[][] matrix) {\n\t\tint pathLength = 0;\n\t\t// The distance from the starting node to the first node in the path.\n\t\tpathLength += matrix[0][path[0]];\n\t\t// The distances between the nodes in the path.\n\t\tfor (int i = 0; i < path.length - 1; i++) {\n\t\t\tpathLength += matrix[path[i]][path[i + 1]];\n\t\t}\n\t\t// The distance from the last node in the path to the destination node.\n\t\tpathLength += matrix[path[path.length - 1]][matrix[0].length - 1];\n\t\treturn pathLength;\n\t}",
"@Override\n public List dijkstrasShortestPath(T start, T end) {\n Vertex<T> origin = new Vertex<>(start);\n Vertex<T> destination = new Vertex<>(end);\n List<Vertex<T>> path;\n\n settledNodes = new HashSet<>();\n unSettledNodes = new HashSet<>();\n distancesBetweenNodes = new HashMap<>();\n predecessors = new HashMap<>();\n\n distancesBetweenNodes.put(origin,0);\n unSettledNodes.add(origin);\n\n while(unSettledNodes.size() > 0){\n Vertex<T> minimumWeightedVertex = getMinimum(unSettledNodes);\n settledNodes.add(minimumWeightedVertex);\n unSettledNodes.remove(minimumWeightedVertex);\n findMinimumDistance(minimumWeightedVertex);\n }\n path = getPath(destination);\n return path;\n\n }"
] | [
"0.73818815",
"0.73223513",
"0.68745315",
"0.67324305",
"0.65160257",
"0.64007324",
"0.6221647",
"0.6192103",
"0.6174242",
"0.6164022",
"0.61080354",
"0.6106584",
"0.60704845",
"0.6050188",
"0.6043456",
"0.6041961",
"0.6019479",
"0.59873176",
"0.5986201",
"0.5974214",
"0.5963953",
"0.5957559",
"0.59486306",
"0.5947382",
"0.594321",
"0.5916057",
"0.59138006",
"0.5913654",
"0.5901064",
"0.58911896",
"0.588267",
"0.58821195",
"0.58742285",
"0.58717704",
"0.58700347",
"0.58693624",
"0.5848487",
"0.57930475",
"0.57805395",
"0.5767783",
"0.57493883",
"0.57450515",
"0.5740979",
"0.5734736",
"0.5713802",
"0.57066196",
"0.5693574",
"0.56891483",
"0.5681325",
"0.5675459",
"0.5663199",
"0.5646888",
"0.5646888",
"0.56460863",
"0.56459117",
"0.564159",
"0.5635306",
"0.56158364",
"0.56158364",
"0.5607879",
"0.5606017",
"0.560155",
"0.5593284",
"0.5589161",
"0.5579194",
"0.55787987",
"0.55774283",
"0.557555",
"0.55666345",
"0.5560617",
"0.55540395",
"0.5550395",
"0.5549824",
"0.5547648",
"0.5544044",
"0.5539757",
"0.5539757",
"0.55350244",
"0.5521586",
"0.55175257",
"0.55111593",
"0.5508812",
"0.54963726",
"0.5492173",
"0.5490279",
"0.54866135",
"0.5486047",
"0.5485164",
"0.54798406",
"0.5479537",
"0.5470902",
"0.5469804",
"0.5460336",
"0.54564816",
"0.5455993",
"0.5452639",
"0.545215",
"0.545105",
"0.5451011",
"0.54487324",
"0.5447467"
] | 0.0 | -1 |
Initialize your data structure here. | public MyStack() {
q=new LinkedList<Integer>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initData() {\n }",
"private void initData() {\n\t}",
"private void initData() {\n\n }",
"public void initData() {\n }",
"public void initData() {\n }",
"@Override\n\tpublic void initData() {\n\n\n\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tpublic void initData() {\n\t\t\n\t}",
"@Override\n protected void initData() {\n }",
"@Override\n protected void initData() {\n }",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tpublic void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"private void InitData() {\n\t}",
"@Override\r\n\tpublic void initData() {\n\t}",
"private void initData(){\n\n }",
"public AllOOneDataStructure() {\n map = new HashMap<>();\n vals = new HashMap<>();\n maxKey = minKey = \"\";\n max = min = 0;\n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tprotected void initData(){\n\t\tsuper.initData();\n\t}",
"public InitialData(){}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"protected @Override\r\n abstract void initData();",
"private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }",
"public DesignADataStructure() {\n arr = new ArrayList<>();\n map = new HashMap<>();\n }",
"public void initData() {\n\t\tnotes = new ArrayList<>();\n\t\t//place to read notes e.g from file\n\t}",
"public void initialize() {\n // empty for now\n }",
"void initData(){\n }",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void initData(){\r\n \r\n }",
"public void initialize()\n {\n }",
"private void initData() {\n\t\tpages = new ArrayList<WallpaperPage>();\n\n\t}",
"public void init() {\n \n }",
"private void initializeData() {\n posts = new ArrayList<>();\n posts.add(new Posts(\"Emma Wilson\", \"23 years old\", R.drawable.logo));\n posts.add(new Posts(\"Lavery Maiss\", \"25 years old\", R.drawable.star));\n posts.add(new Posts(\"Lillie Watts\", \"35 years old\", R.drawable.profile));\n }",
"public static void init() {\n buildings = new HashMap<Long, JSONObject>();\n arr = new ArrayList();\n buildingOfRoom = new HashMap<Long, Long>();\n }",
"public void init() {\n\t\t}",
"public void InitData() {\n }",
"abstract void initializeNeededData();",
"@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"private RandomData() {\n initFields();\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private TigerData() {\n initFields();\n }",
"public Data() {\n this.customers = new HashMap<>();\n this.orders = new HashMap<>();\n this.siteVisits = new HashMap<>();\n this.imageUploads = new HashMap<>();\n }",
"public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }",
"public void init() {\n for (int i = 1; i <= 20; i++) {\n List<Data> dataList = new ArrayList<Data>();\n if (i % 2 == 0 || (1 + i % 10) == _siteIndex) {\n dataList.add(new Data(i, 10 * i));\n _dataMap.put(i, dataList);\n }\n }\n }",
"private void initData() {\n requestServerToGetInformation();\n }",
"private void Initialized_Data() {\n\t\t\r\n\t}",
"void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}",
"private void initValues() {\n \n }",
"private void init() {\n }",
"public void initialize() {\n grow(0);\n }",
"public void init() {\r\n\r\n\t}",
"private void initialize()\n {\n aggregatedFields = new Fields(fieldToAggregator.keySet());\n }",
"@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }",
"public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }",
"protected void initialize() {\n \t\n }",
"public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"@Override public void init()\n\t\t{\n\t\t}",
"private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}",
"public DataStructure() {\r\n firstX = null;\r\n lastX = null;\r\n firstY = null;\r\n lastY = null;\r\n size = 0;\r\n }",
"private void initialize() {\n }",
"private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}",
"private void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void initialize() {\n // TODO\n }",
"public void initialize() {\r\n }",
"@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"private void init()\n\t{\n\t\tif (_invData == null)\n\t\t\t_invData = new InvestigateStore.MappedStores();\n\t}",
"@Override\n\t\tprotected void initialise() {\n\n\t\t}",
"public void init() {\n\t\t\n\t}",
"public void init() {\n\t\n\t}",
"public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }",
"private void initialize() {\n\t\t\n\t}",
"private void initialize() {\n this.pm10Sensors = new ArrayList<>();\n this.tempSensors = new ArrayList<>();\n this.humidSensors = new ArrayList<>();\n }",
"@Override\r\n\tpublic void init() {}",
"public void init() {\n\t\t// Read the data text file and load up the local database\n\t\tinitData();\n\n\t\t// Create the labels and the textbox\n\t\taddNameLabel();\n\t\taddNameBox();\n\t\taddGraphButton();\n\t\taddClearButton();\n\n\t\t// Set up the graph object\n\t\tgraph = new NameSurferGraph();\n\t\tadd(graph);\n\n\t}",
"private void initialData() {\n\n }",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"public mainData() {\n }",
"private void initStructures() throws RIFCSException {\n initTexts();\n initDates();\n }",
"public void init() {\n initComponents();\n initData();\n }",
"public void init() {\n\t}"
] | [
"0.79946685",
"0.7973242",
"0.7808862",
"0.77763873",
"0.77763873",
"0.7643394",
"0.76371324",
"0.76371324",
"0.76371324",
"0.76371324",
"0.76371324",
"0.76371324",
"0.75553316",
"0.7543321",
"0.7543321",
"0.75426376",
"0.75426376",
"0.75426376",
"0.7532583",
"0.75228804",
"0.75228804",
"0.7515626",
"0.7494068",
"0.7454065",
"0.7388256",
"0.7380365",
"0.7328254",
"0.7311082",
"0.7256176",
"0.7242837",
"0.7242837",
"0.720293",
"0.7202036",
"0.7164401",
"0.7144378",
"0.71355236",
"0.7132754",
"0.7131076",
"0.7101955",
"0.7098935",
"0.70951265",
"0.70578545",
"0.7055706",
"0.70423454",
"0.7021184",
"0.70061564",
"0.6987191",
"0.6979681",
"0.6960125",
"0.6946316",
"0.69393814",
"0.6938019",
"0.6937645",
"0.6935085",
"0.6933533",
"0.692056",
"0.69171643",
"0.6911375",
"0.6903781",
"0.68829435",
"0.6881986",
"0.6879309",
"0.68750894",
"0.6868541",
"0.6867774",
"0.6852462",
"0.6851922",
"0.68477225",
"0.68477225",
"0.68477225",
"0.68477225",
"0.6846597",
"0.6818907",
"0.6808544",
"0.6805373",
"0.6791477",
"0.6787723",
"0.6781544",
"0.6781544",
"0.6781544",
"0.67674476",
"0.676184",
"0.67618203",
"0.67537767",
"0.67537767",
"0.67537767",
"0.6750694",
"0.67330045",
"0.67218685",
"0.6721014",
"0.67197996",
"0.67170006",
"0.67124057",
"0.6708111",
"0.66997004",
"0.66991216",
"0.6692312",
"0.6687212",
"0.66789055",
"0.6668848",
"0.66666573"
] | 0.0 | -1 |
Push element x onto stack. | public void push(int x) {
int size=q.size();
q.offer(x);
for(int i=0;i<size;i++){
q.offer(q.poll());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void push(int x) {\n stack.add(x);\n }",
"public void push(int x) {\r\n inStack.push(x);\r\n }",
"public void push(int x) {\n this.stack1.add(x);\n }",
"public void push(int x) {\n pushStack.add(x);\n }",
"public void push(int x) {\n\t\tstack.push(x);\n\t}",
"public void push(int x) {\r\n stack.offer(x);\r\n }",
"public void push(int x) {\r\n stack.offer(x);\r\n }",
"public void push(int x) {\n this.inputStack.push(x);\n }",
"public void push(int x) {\n storeStack.push(x);\n }",
"public void push(int x) {\n this.stack1.push(x);\n }",
"public void push(int x) {\n inSt.push(x);\n\n }",
"public void push(int x) {\n if (isIn) {\n stackIn.push(x);\n } else {\n while (!stackOut.empty()) {\n stackIn.push(stackOut.pop());\n }\n stackIn.push(x);\n isIn = true;\n }\n\n }",
"public void push(int x) {\n rearStack.push(x);\n }",
"public void push(int x) {\n /**\n * 将otherStack中所有元素还原到stack中后在栈顶加入新元素\n */\n while (!otherStack.isEmpty()) {\n stack.push(otherStack.pop());\n }\n stack.push(x);\n }",
"public void push(int x) {\n Stack<Integer> tmp = new Stack<>();\n while(!s.isEmpty()) {\n tmp.push(s.pop());\n }\n tmp.push(x);\n while(!tmp.isEmpty()) {\n s.push(tmp.pop());\n }\n }",
"public void push(int x) {\r\n Stack<Integer> newStack = new Stack<>();\r\n newStack.push(x);\r\n\r\n Stack<Integer> tmp = new Stack<>();\r\n while (!this.stack.isEmpty()) {\r\n tmp.push(this.stack.pop());\r\n }\r\n\r\n while (!tmp.isEmpty()) {\r\n newStack.push(tmp.pop());\r\n }\r\n\r\n\r\n this.stack = newStack;\r\n }",
"public void push(int x) {\n push.push(x);\n }",
"public void push(int x) {\n load();\n stack.push(x);\n unload();\n }",
"public void push(int x) {\n if (mStack1.isEmpty()) {\n mFirst = x;\n }\n mStack1.push(x);\n }",
"public void push(int x) {\n\t if(first == null){\n\t first = x;\n\t }\n\t s.push(x);\n\t}",
"public void push(int x) {\n stk1.push(x);\n }",
"public void push(int x) {\n temp.push(x);\n }",
"public void push(int x) {\n stack1.push(x);\n }",
"public void push(int x) {\n \tstack.push(x);\n \t// if stack is empty or the element is less than current minimal,\n \t// push it to minStack\n \tif (minStack.isEmpty()) {\n \t\tminStack.push(x);\n \t} else {\n\t \tint min = minStack.peek();\n\t \tif (x <= min) minStack.push(x);\n \t}\n }",
"public void push(int x) {\n\t\tinput.push(x);\n\t}",
"public void push(int x) {\n\t\tif (size() == capacity()) {\n\t\t\tdoubleSize();\n\t\t}\n\t\tarr[end] = x;\n\t\t++end;\n\t}",
"public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n assistStack.push(x);\n while (!assistStack.isEmpty()) {\n storeStack.push(assistStack.pop());\n }\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n s1.push(x);\n }",
"public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n int[] ints = new int[storeStack.size()];\n int i =0;\n while (!storeStack.isEmpty()) {\n ints[i++] = storeStack.pop();\n }\n storeStack.push(x);\n for (int i1 = ints.length - 1; i1 >= 0; i1--) {\n storeStack.push(ints[i1]);\n\n }\n }",
"public void push(int x) {\n\t\tlist.add(x);\n\t}",
"void push(int x) {\n\t\tif (stack.size() == 0) {\n\t\t\tstack.push(x);\n\t\t\tminEle = x;\n\t\t} else if (x >= minEle) {\n\t\t\tstack.push(x);\n\t\t} else if (x < minEle) {\n\t\t\t// Push something smaller than original value\n\t\t\t// At any time when we pop , we will see if the value\n\t\t\t// of the peek is less then min or not\n\t\t\tstack.push(2 * x - minEle);\n\t\t\tminEle = x;\n\t\t}\n\t}",
"public void push(int x) {\n data.add(x);\n }",
"public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }",
"public void push(int x) {\n // 将 popStack 中数据导入 pushStack\n while (!popStack.isEmpty()) {\n pushStack.push(popStack.pop());\n }\n // 压入 x\n pushStack.push(x);\n // 将数据导回 popStack\n while (!pushStack.isEmpty()) {\n popStack.push(pushStack.pop());\n }\n\n }",
"public void push(int x) {\n \tlist.add(x);\n }",
"public void push(int x) {\n \tint size = s2.size();\n \tfor(int i = 0; i < size; i++) {\n \t\ts.push(s2.pop());\n \t}\n \ts.push(x);\n }",
"public void push(double x) \n {\n if (top == s.length) \n {\n \tthrow new IllegalArgumentException(\"full stack!\");\n }\n \n \n else\n {\n s[++top] = x;\n \n } \n }",
"public void push(int x) {\n s1.push(x);\n temp = (Stack<Integer>) s1.clone();\n s2.clear();\n while (!temp.isEmpty()) {\n s2.push(temp.pop());\n }\n }",
"public void push(int x) {\n stack1.push(x);\n if (stack2.isEmpty() || x <= stack2.peek()) {\n stack2.push(x);\n }\n }",
"public void push(int x) {\n\t\tint max = maxStack.isEmpty() ? x : maxStack.peek();\n\t\tmaxStack.push(max > x ? max : x);\n\t\tstack.push(x);\n\t}",
"public void push(T x) {\n\t\tl.push(x);\n\t}",
"public void push(int x) {\n q.add(x);\n for (int i = 0; i < q.size() - 1; ++i) {\n q.add(q.poll());\n }\n }",
"public void push(int x) {\n\t\tNode t = new Node();\n\t\tt.data = x;\n\t\tt.next = top;\n\t\ttop = t;\n\t}",
"public void push(int x) {\n queue.add(x);\n }",
"public void push(int x) {\n queue.add(x);\n }",
"public void push(int x) {\n left.push(x);\n }",
"public void push(int x) {\n Node node = new Node(x);\n top.next = node;\n node.pre = top;\n top = node;\n size++;\n }",
"public void push(int x) {\n if(afterRotate){\n rotate();\n afterRotate = false;\n }\n stack.push(x);\n }",
"public void push(int x) {\n queue.addLast(x);\n }",
"public void push(int x) {\n queue.addLast(x);\n }",
"public void push(int x) {\n queue.add(x);\n for (int i = 0; i < queue.size()-1; i++) {\n queue.add(queue.poll());\n }\n }",
"public void push(int x) {\n queue.push(x);\n }",
"public void push(int x) {\n if(x <= min){\n stack.push(min);\n min=x;\n }\n stack.push(x);\n }",
"public void push(int x) {\n helper.add(x);\n helper.addAll(objects);\n\n tmp = objects;\n tmp.clear();\n objects = helper;\n helper = tmp;\n }",
"public void push(int x) { //全部放到第一个\n temp1.push(x);\n }",
"public void push(E x) {\n\t\t\n\t\taddBefore(mHead.next, x);\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}",
"public void push(int x) {\n q1.add(x);\n int n = q1.size();\n for (int i = 1; i < n; i++) {\n q1.add(q1.poll());\n }\n }",
"public void push(int x) {\n Queue<Integer> tmp = new LinkedList<>();\n while (!queue.isEmpty()) {\n tmp.add(queue.remove());\n }\n queue.add(x);\n \n while (!tmp.isEmpty()) {\n queue.add(tmp.remove());\n }\n }",
"public void push(int x) {\n one.add(x);\n for(int i=0;i<one.size()-1;i++)\n {\n one.add(one.poll());\n }\n \n }",
"public void push(int x) {\n int n = queue.size();\n queue.offer(x);\n for (int i = 0; i < n; i++) {\n queue.offer(queue.poll());\n }\n }",
"public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }",
"public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }",
"@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}",
"void push(Integer x) {\n\n\t\tif (isEmpty()) {\n\t\t\ttop = new Node(x);\n\t\t\tmid = top;\n\t\t\ttotalNodes++;\n\t\t} else {\n\t\t\tNode n = new Node(x);\n\t\t\tn.next = top;\n\t\t\ttop.prev = n;\n\t\t\ttop = n;\n\t\t\ttotalNodes++;\n\t\t\tif (totalNodes % 2 != 0) {\n\t\t\t\tmid = mid.prev;\n\t\t\t}\n\t\t}\n\t}",
"public void push(int x) {\n if (head == null) {\n head = new Node1(x, x);\n } else {\n head = new Node1(x, Math.min(x, head.min), head);\n }\n }",
"public void push(int x) {\n q.offer(x);\n }",
"@Override\n\tpublic void push(Object x) {\n\t\tthis.vector.add(x);\n\t}",
"public void push(int x) {\n // 第一步先 push\n queue.offer(x);\n // 第二步把前面的变量重新倒腾一遍\n // 这一部分代码很关键,在树的层序遍历中也用到了\n int size = queue.size() - 1;\n for (int i = 0; i < size; i++) {\n queue.offer(queue.poll());\n }\n }",
"void push(Integer x) {\n if (s.isEmpty()) {\n minEle = x;\n s.push(x);\n System.out.println(\"Number Inserted: \" + x);\n return;\n }\n // if new number is less than original minEle\n if (x < minEle) {\n s.push(2 * x - minEle);\n minEle = x;\n } else {\n s.push(x);\n }\n System.out.println(\"Number Inserted: \" + x);\n }",
"public void push(int x) {\n queue.offer(x);\n }",
"public void push(int element) {\n stack1.push(element);\n }",
"public void stackPush(int element) {\r\n\t\ttop++;\r\n\t\tarray[top] = element;\r\n\t\tcount++;\r\n\t }",
"public void push(int x) {\n if (!reverseQueue.isEmpty()) {\n normalQueue.offer(reverseQueue.poll());\n }\n normalQueue.offer(x);\n }",
"public void push(int x) {\r\n this.queueMain.offer(x);\r\n }",
"public void push(int x) {\n // for pop(), so prepare\n // 要想 pop 省事 push到 queue tail 的 x 要 想办法放到队列第一位\n // how 只要不空 移到另外一个 放好 x 再移回来\n while (!One.isEmpty()) {\n Two.add(One.poll());\n }\n One.add(x);\n while (!Two.isEmpty()) {\n One.add(Two.poll());\n }\n }",
"public void push(T x);",
"public void push(int x) {\n p.next=new ListNode(x);\n p = p.next;\n }",
"@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}",
"public void push(ExParValue x) {\r\n\t\t// System.out.println(\"ExPar.push() currently on top \" +\r\n\t\t// value.toString() + \" pushing \" + x.toString());\r\n\t\tExParValue v = x.isUndefined() ? (ExParValue) value.clone()\r\n\t\t\t\t: (ExParValue) x.clone();\r\n\t\tv.next = value;\r\n\t\tvalue = v;\r\n\t\t// System.out.println(\"ExPar.push() New value: \" + value);\r\n\t}",
"public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }",
"public void push(int x) {\n\n if (list.isEmpty()) {\n head = x;\n }\n\n list2.add(x);\n while (!(list.isEmpty())) {\n list2.add(list.poll());\n }\n\n while (!(list2.isEmpty())) {\n list.add(list2.poll());\n }\n\n\n }",
"public void push(int x) {\n while (!forReverse.isEmpty()) {\n queue.add(forReverse.poll());\n }\n queue.add(x);\n }",
"void push(int x) \n\t{ \n\t\tif(isEmpty() == true) \n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tmin.push(x); \n\t\t} \n\t\telse\n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tint y = min.pop(); \n\t\t\tmin.push(y); \n\t\t\tif(x < y) \n\t\t\t\tmin.push(x); \n\t\t\telse\n\t\t\t\tmin.push(y); \n\t\t} \n\t}",
"private static void sortedInsert(Stack<Integer> stack, int x) {\n if (stack.isEmpty() || stack.peek() < x) {\n stack.push(x);\n return;\n }\n int temp = stack.pop();\n sortedInsert(stack, x);\n stack.push(temp);\n }",
"void push(int stackNum, int value) throws Exception{\n\t//check if we have space\n\tif(stackPointer[stackNum] + 1 >= stackSize){ //last element\n\t\tthrows new Exception(\"Out of space.\");\n\t}\n\n\t//increment stack pointer and then update top value\n\tstackPointer[stackNum]++; \n\tbuffer[absTopOfStack(stackNum)] = value;\n}",
"public void push(int element) {\n while (!stack1.isEmpty()){\n stack2.push(stack1.pop());\n }\n stack1.push(element);\n while(!stack2.isEmpty()){\n stack1.push(stack2.pop());\n }\n }",
"public void push(T x)\n\t{\n\t\t// If the head is null, set the head equal\n\t\t// to the new node.\n\t\tif(head == null)\n\t\t\thead = new Node<T>(x);\n\t\telse\n\t\t{\n\t\t\t// Loop through the list and add the new node\n\t\t\t// on to the back of the list.\n\t\t\tNode<T> curr = head;\n\t\t\twhile(curr.getNext() != null)\n\t\t\t\tcurr = curr.getNext();\n\n\t\t\tNode<T> last = new Node<T>(x);\n\t\t\tcurr.setNext(last);\n\t\t}\t\n\t}",
"public void push(int x) {\n if(!queueA.isEmpty()){\n queueA.add(x);\n }else if(!queueB.isEmpty()){\n queueB.add(x);\n }else{\n queueA.add(x);\n }\n }",
"public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }",
"public void push(int element) {\n\t\tif (top -1 == size) { // top == --size\n\t\t\t//System.out.println(\"Stack is full\");\n\n\t\t\t//Switch\n\t\t\tint[] tmp = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\ttmp[i] = stacks[i];\n\t\t\t}\n\t\t\tstacks = null;\n\t\t\tstacks = new int[size * 2];\n\t\t\tfor(int i = 0; i <= top; i++){\n\t\t\t\tstacks[i] = tmp[i];\n\t\t\t}\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t} else {\n\t\t\tstacks[++top] = element;\n\t\t\tSystem.out.println(element + \" is pushed\");\n\t\t}\n\t\tsize++;\n\t}",
"public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n }\n else {\n q2.add(x);\n while(q1.size() > 0) {\n q2.add(q1.poll());\n }\n }\n }",
"void push(int x);",
"void push(T x);",
"public void push(int x) {\n q1.push(x);\n if (q2.size() > 0){\n q2.remove();\n }\n }",
"public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n } else {\n q2.add(x);\n while(q1.size() > 0){\n q2.add(q1.poll());\n }\n }\n }",
"public void push (E item){\n this.stack.add(item);\n }",
"public void push(T value) {\n \tstack.add(value);\n }"
] | [
"0.86726034",
"0.85932225",
"0.85570914",
"0.8550038",
"0.852482",
"0.8498592",
"0.8488227",
"0.8461912",
"0.8458076",
"0.8428038",
"0.8376653",
"0.8370226",
"0.8368897",
"0.8343204",
"0.83385926",
"0.8335069",
"0.8333074",
"0.83219844",
"0.83110696",
"0.8299808",
"0.82648236",
"0.8260843",
"0.8227758",
"0.81988394",
"0.819731",
"0.81950635",
"0.8136101",
"0.813282",
"0.81123054",
"0.81123054",
"0.81123054",
"0.8089274",
"0.8086407",
"0.8082756",
"0.8075835",
"0.8058963",
"0.8050122",
"0.80101556",
"0.79978484",
"0.79816735",
"0.7965629",
"0.7918633",
"0.78817797",
"0.7859532",
"0.7854534",
"0.7853485",
"0.78523874",
"0.78523874",
"0.78476787",
"0.7841256",
"0.78404015",
"0.7834868",
"0.7825307",
"0.780459",
"0.7791437",
"0.77746886",
"0.771773",
"0.7690058",
"0.765422",
"0.765174",
"0.7648162",
"0.7646733",
"0.7637257",
"0.7633213",
"0.7633213",
"0.7625352",
"0.7617576",
"0.7603999",
"0.75609857",
"0.75587195",
"0.75492984",
"0.75358003",
"0.75231606",
"0.74670357",
"0.7450564",
"0.74457633",
"0.7396862",
"0.73832387",
"0.73720616",
"0.7360162",
"0.73447925",
"0.7335559",
"0.7328421",
"0.7286221",
"0.7262818",
"0.72311556",
"0.72194356",
"0.72047585",
"0.71959877",
"0.7185571",
"0.717108",
"0.7165948",
"0.7088451",
"0.7078484",
"0.7070283",
"0.70639855",
"0.70509607",
"0.704537",
"0.70401484",
"0.70389265"
] | 0.76382875 | 62 |
Removes the element on top of the stack and returns that element. | public int pop() {
return q.poll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T pop() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//remove top element from stack\n\t\t//and \"clear to let GC do its work\"\n\t\treturn elements.remove(elements.size() - 1);\n\t}",
"@Override\r\n\tpublic T pop() {\r\n\t\tT top = stack[topIndex];\r\n\t\tstack[topIndex] = null;\r\n\t\ttopIndex--;\r\n\t\treturn top;\r\n\t}",
"public Object pop() {\n if (top >= 0) {\n Object currentObject = stack[top--];\n if (top > minStackSize) {\n decreaseStackSize(1);\n }\n return currentObject;\n }\n else {\n return null;\n }\n }",
"public T pop() {\n T top = peek();\n stack[topIndex] = null;\n topIndex--;\n return top;\n }",
"public T pop() {\n \tT retVal = stack.get(stack.size() - 1); // get the value at the top of the stack\n \tstack.remove(stack.size() - 1); // remove the value at the top of the stack\n \treturn retVal;\n }",
"public E pop()\n {\n E topVal = stack.removeFirst();\n return topVal;\n }",
"public E pop(){\n return this.stack.remove(stack.size()-1);\n }",
"public Object pop()\r\n {\n assert !this.isEmpty();\r\n\t\t\r\n Node oldTop = this.top;\r\n this.top = oldTop.getNext();\r\n oldTop.setNext(null); // enable garbage collection\r\n return oldTop.getItem();\r\n }",
"public T pop() {\n\t\tT value = peek();\n\t\tstack.remove(value);\n\t\treturn value;\n\t}",
"public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}",
"public E pop () {\n\t\treturn stack.remove( stack.size()-1 );\t\t\n\t}",
"private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }",
"public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}",
"public T pop() {\r\n\t\tT ele = top.ele;\r\n\t\ttop = top.next;\r\n\t\tsize--;\r\n\t\t\r\n\t\treturn ele;\r\n\t}",
"public T pop() {\n\t\tif (this.l.getHead() != null) {\n\t\t\tT tmp = l.getHead().getData();\n\t\t\tl.setHead(l.getHead().getNext());\n\t\t\treturn tmp;\n\t\t} else {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}",
"public T pop() {\n if(isEmpty()) {\n throw new NoSuchElementException(\"Stack is empty\");\n }\n return this.stackArray[top--];\n }",
"@Override\n\tpublic T pop() {\n\t\tif(isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is Empty\");\n\t\treturn null;}\n\t\ttop--;\t\t\t\t\t\t//top-- now before since we need index top-1\n\t\tT result = stack[top];\n\t\tstack[top] = null;\n\t\treturn result;\n\t\t\t\n\t}",
"public E removeFirst() {\n return pop();\n }",
"public Object pop() {\n return stack.pop();\n }",
"public GenericStack popStack(){\n if(isEmpty() == true)return null;\n GenericStack temp = top;\n // makes next item in list the tip\n top = top.next;\n return temp;\n }",
"public Object pop( )\n {\n Object item = null;\n\n try\n {\n if ( this.top == null)\n {\n throw new Exception( );\n }\n\n item = this.top.data;\n this.top = this.top.next;\n \n this.count--;\n }\n catch (Exception e)\n {\n System.out.println( \" Exception: attempt to pop an empty stack\" );\n }\n\n return item;\n }",
"public T pop() { //pop = remove the last element added to the array, in a stack last in, first out (in a queue pop and push from different ends)\n try {\n T getOut = (T) myCustomStack[numElements - 1]; //variable for element to remove (pop off) = last element (if you have 7 elements, the index # is 6)\n myCustomStack[numElements] = null; //remove element by making it null\n numElements--; //remove last element, decrease the numElements\n return getOut; //return popped number\n\n } catch (Exception exc) {\n System.out.println(\"Can't pop from empty stack!\");\n return null;\n }\n }",
"Object pop();",
"public E pop() throws NoSuchElementException{\n\t\treturn stackList.removeFromFront();\n\t}",
"public E pop() {\n if(isEmpty()) throw new EmptyStackException();\n\n E itemPopped = this.stack[top-1];\n this.stack[top-1] = null;\n top--;\n return itemPopped;\n\n }",
"public Object pop();",
"public T pop() {\n\t\tT value = null;\n\t\tif (!isEmpty()) {\n\t\t\ttop = top.next;\n\t\t\tvalue = top.value;\n\t\t}\n\t\treturn value; // returning popped value\n\t}",
"public T pop() {\r\n if ( top == null )\r\n throw new IllegalStateException(\"Can't pop from an empty stack.\");\r\n T topItem = top.item; // The item that is being popped.\r\n top = top.next; // The previous second item is now on top.\r\n return topItem;\r\n }",
"public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public Item pop() {\n if(isEmpty()) return null;\n Item item = top.data;\n top = top.next;\n size--;\n return item;\n\n }",
"public T pop() throws EmptyStackException\r\n {\r\n if (isEmpty())\r\n throw new EmptyStackException();\r\n\r\n top--;\r\n T result = stack[top];\r\n stack[top] = null; \r\n\r\n return result;\r\n }",
"public TYPE pop();",
"public Object pop()\n\t{\n\t\tif (size == 0)\n\t\t\tthrow new EmptyStackException();\n\t\t\n\t\tObject result = elements[--size];\n\t\telements[size] = null;\n\t\treturn result;\n\t}",
"public Employee pop() {\n if (isEmpty()) {\n throw new EmptyStackException();\n }\n /*top always contains the index of next available position in the array so, there is nothing at top.\n The top item on the stack is actually stored at top-1\n */\n Employee employee = stack[--top];\n stack[top] = null; //assign removed element position to null\n return employee; // return the removed element\n }",
"@Override\n\tpublic E pop() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\tE element = arr[top];\n\t\tarr[top--] = null;\n\t\treturn element;\n\t}",
"private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}",
"T pop();",
"T pop();",
"T pop();",
"public Object pop() {\n if (isEmpty())\n throw new EmptyStackException();\n\n Object value = peek();\n collection.remove(collection.size() - 1);\n return value;\n }",
"public T pop() {\r\n T o = get(size() - 1);\r\n remove(size() - 1);\r\n return o;\r\n\t}",
"public T pop() throws EmptyStackException {\n if (top == null) {\n throw new EmptyStackException();\n }\n\n StackNode<T> removed = top;\n top = top.getNext();\n return removed.getData();\n }",
"public Object pop() {\n\t\tif(this.isEmpty())\n throw new IllegalStateException(\"Stack is empty\");\n return items.remove(items.size() - 1);\n\t}",
"@Override\n public E pop() {\n E result = peek();\n storage[ top-- ] = null;\n return result;\n\n }",
"public Object pop() {\n if (top != null) {\n Object item = top.getOperand();\n\n top = top.next;\n return item;\n }\n\n System.out.println(\"Stack is empty\");\n return null;\n\n }",
"public T pop()\n\t{\n\t\treturn list.removeFirst();\n\t}",
"public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }",
"@Override\n public T pop(){\n\n if (arrayAsList.isEmpty()){\n throw new IllegalStateException(\"Stack is empty. Nothing to pop!\");\n }\n\n T tempElement = arrayAsList.get(stackPointer - 1);\n arrayAsList.remove(--stackPointer);\n\n return tempElement;\n }",
"T pop() {\n if (stackSize == 0) {\n throw new EmptyStackException();\n }\n return stackArray[--stackSize];\n }",
"@Override\r\n\tpublic E pop() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tE answer = stack[t];\r\n\t\tstack[t] = null; // dereference to help garbage collection\r\n\t\tt--;\r\n\t\treturn answer;\r\n\t}",
"public String pop() {\n String removed = NOTHING;\n // Is there anything in the stack to remove?\n if (usage > 0) {\n // Obtain the topmost value from the stack\n removed = this.foundation[this.foundation.length - this.usage];\n // Clean up the array location\n this.foundation[this.foundation.length - this.usage] = null;\n // Decrease usage counter\n usage--;\n }\n return removed;\n }",
"public Object pop() {\n\t\tObject o = get(getSize() - 1);\n\t\tremove(getSize() - 1);\n\t\treturn o;\n\t}",
"public T pop() {\r\n\r\n\t\tT top = peek(); // Throws exception if stack is empty.\r\n\t\t\r\n\t\t// Sets top of stack to next link. \r\n\t\ttopNode = topNode.getNext();\r\n\t\t\r\n\t\treturn top;\r\n\t\t\r\n\t}",
"public T pop() {\n if (this.top == null) {\n throw new EmptyStackException();\n }\n T data = this.top.data;\n this.top = this.top.below;\n return data;\n }",
"private synchronized BackStep pop() {\r\n\t\t\tBackStep bs;\r\n\t\t\tbs = stack[top];\r\n\t\t\tif (size == 1) {\r\n\t\t\t\ttop = -1;\r\n\t\t\t} else {\r\n\t\t\t\ttop = (top + capacity - 1) % capacity;\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\treturn bs;\r\n\t\t}",
"public T pop() {\n\t\tif (isEmpty())\n\t\t\tthrow new EmptyStackException();\n\t\telse\n\t\t\treturn vector.remove(vector.size() - 1);\t\t\n\t}",
"public Session pop() {\r\n\t\tint oldIndex = index;\r\n\t\tif (index >= 0) {\r\n\t\t\tindex--;\r\n\t\t\treturn stack[oldIndex];\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public T top() {\n \treturn stack.get(stack.size() - 1);\n }",
"@Override\r\n\tpublic E pop() {\n\t\treturn null;\r\n\t}",
"public void pop();",
"public final Object pop()\n {\n synchronized (this.stack)\n {\n return this.stack[--this.pointer];\n }\n }",
"@Override\n\tpublic E pop() {\n\t\treturn null;\n\t}",
"Object pop(){\r\n\t\tlastStack = getLastStack();\r\n\t\tif(lastStack!=null){\r\n\t\t\tint num = lastStack.pop();\r\n\t\t\treturn num;\r\n\t\t} else {stacks.remove(stacks.size()-1);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic T pop() throws StackUnderflowException {\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\tstack.remove(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}",
"public T pop() {\n if (head == null) {\n return null;\n } else {\n Node<T> returnedNode = head;\n head = head.getNext();\n return returnedNode.getItem();\n }\n }",
"@Override\n\tpublic Object pop() {\n\t\tif (elementCount == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\telementCount--;\n\t\treturn elementData[elementCount];\n\t}",
"public T pop()\n {\n return pop(first);\n }",
"public O popBack()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = last;\r\n last = last.getPrevious();\r\n\r\n count--;\r\n if (isEmpty()) first = null;\r\n else last.setNext(null);\r\n return l.getObject();\r\n } else\r\n return null;\r\n \r\n }",
"E pop() throws EmptyStackException;",
"public Object pop() {\n return fStack.pop();\n }",
"@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop() {\n return stackImpl.pop();\n }",
"public E pop() \r\n {\r\n E o = list.get(getSize() - 1);\r\n list.remove(getSize() - 1);\r\n return o;\r\n }",
"public AnyType pop() throws StackException;",
"public K pop() {\n\t\tK data = null;\r\n\t\tif(top!=null){\r\n\t\t\tdata = top.data;\r\n\t\t\ttop = top.next;\r\n\t\t\tsize--;\r\n\t\t}\r\n\t\treturn data;\r\n\t}",
"public Item pop()\n {\n if (isEmpty()) throw new NoSuchElementException(\"Stack underflow\");\n Item item = top.item;\n top = top.next;\n N--;\n return item;\n }",
"public T pop() {\n StackNode tempNode = peekNode();\n\n if(length > 1) {\n lastNode = peekNode().getParent();\n tempNode.setParent(null);\n length--;\n return (T) tempNode.getTData();\n }\n else if(length == 1) {\n lastNode = new StackNode();\n length--;\n return (T) tempNode.getTData();\n }\n else {\n throw new IndexOutOfBoundsException(\"Your stack is empty!\");\n }\n }",
"public void pop()\r\n\t{\r\n\t\ttop--;\r\n\t\tstack[top] = null;\r\n\t}",
"public Node<T> pop() {\n\n\t\tNode<T> popNode = new Node<T>();\n\t\tpopNode = getTopNode();\n\n\t\t/*\n\t\t * Three special cases for a pop() are a empty stack, only one node at\n\t\t * the top and a stack with multiple elements.\n\t\t */\n\t\tif (isEmpty()) {\n\t\t\tSystem.out.println(\"Stack is EMPTY!!\");\n\t\t\treturn (null);\n\t\t} else if (stackSize == 1) {\n\t\t\ttopNode = null;\n\t\t} else {\n\t\t\ttopNode = topNode.getNextNode();\n\t\t}\n\n\t\tSystem.out.println(\"## POP \\\"\" + popNode.data + \"\\\" FROM STACK ##\");\n\n\t\t// Decrease Stack Size\n\t\tsetStackSize(getStackSize() - 1);\n\t\treturn (popNode);\n\t}",
"public T pop() throws StackUnderflowException{\r\n\t\t\t\t\r\n\t\t// check if the stack is empty before popping up.\r\n\t\tif(stackData.isEmpty())\r\n\t\t\tthrow new StackUnderflowException();\r\n\r\n\t\treturn stackData.remove(stackData.size()-1); //popping;\r\n\t}",
"public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}",
"public E pop(){\r\n Node<E> curr = top;\r\n top = top.getNext();\r\n size--;\r\n return (E)curr.getData();\r\n \r\n }",
"@Override\n\tpublic E pop() {\n\t\tif(size == 0) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\tsize--;\n\t\treturn list.remove(0);\n\t}",
"public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }",
"E pop();",
"E pop();",
"E pop();",
"@Override\n public T pop() {\n if (!isEmpty()) {\n T data = backing[size - 1];\n backing[size - 1] = null;\n size--;\n return data;\n } else {\n throw new NoSuchElementException(\"The stack is empty\");\n }\n }"
] | [
"0.7831054",
"0.78167725",
"0.7808246",
"0.7797564",
"0.7689596",
"0.7677747",
"0.7633739",
"0.76071864",
"0.7598945",
"0.7597015",
"0.7577195",
"0.75743157",
"0.75456405",
"0.75169796",
"0.750027",
"0.74873495",
"0.74667877",
"0.7460093",
"0.74569875",
"0.7456191",
"0.744837",
"0.74207103",
"0.7406906",
"0.74033815",
"0.7401186",
"0.7379766",
"0.7370952",
"0.73472834",
"0.734713",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7335123",
"0.7324371",
"0.7313926",
"0.7311951",
"0.73110545",
"0.7310549",
"0.7304512",
"0.7297009",
"0.7293909",
"0.7293909",
"0.7293909",
"0.7284467",
"0.72834486",
"0.72771436",
"0.7270916",
"0.7266674",
"0.72660893",
"0.72511417",
"0.7238035",
"0.72323054",
"0.72286993",
"0.72209424",
"0.72192407",
"0.7210599",
"0.72091603",
"0.7199765",
"0.7196248",
"0.7195882",
"0.7189582",
"0.71828914",
"0.71817344",
"0.7177487",
"0.71751624",
"0.71638006",
"0.7152466",
"0.7151245",
"0.7142062",
"0.71410716",
"0.71334636",
"0.7117701",
"0.71173024",
"0.71133095",
"0.71099454",
"0.71064913",
"0.71064913",
"0.71064913",
"0.71064913",
"0.71064913",
"0.7102089",
"0.71010643",
"0.70969707",
"0.7088635",
"0.7065762",
"0.7061361",
"0.70485055",
"0.7044555",
"0.7040969",
"0.70397604",
"0.7035089",
"0.7034882",
"0.7031653",
"0.70310974",
"0.70310974",
"0.70310974",
"0.70287824"
] | 0.0 | -1 |
Get the top element. | public int top() {
return q.peek();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int top() {\n return topElem;\n }",
"public E top() {\n return !isEmpty() ? head.item : null;\n }",
"public int topElement() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).element;\n\t\t\n\t\t}\n\t}",
"public T getTop( );",
"E top();",
"public int top() { return 0; }",
"public int top() {\r\n return top;\r\n }",
"public int top() {\r\n return top;\r\n }",
"public int getTop() {\n\t\treturn this.top;\n\t}",
"public int getTop() {\n\treturn top;\n }",
"public Integer getTop() {\n return top;\n }",
"public int top() {\n return top;\n }",
"public int getTop() {\n return top;\n }",
"public T top();",
"public int top() {\n return One.peek();\n }",
"public T peek() {\r\n\t\tT ele = top.ele;\r\n\t\treturn ele;\r\n\t}",
"Location getTop() {\n // -\n if(!isEmpty())\n return top.getLocation();\n return null;\n }",
"public float getTop() {\n return internalGroup.getTop();\n }",
"public abstract Object top();",
"public T top() {\n \treturn stack.get(stack.size() - 1);\n }",
"public int top() {\n return (int) one.peek();\n \n }",
"public int top() {\n return list.peek();\n }",
"public E top() {\n return head.prev.data;\n }",
"public int top() {\n return top.value;\n }",
"public int top();",
"public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }",
"public MeasurementCSSImpl getTop()\n\t{\n\t\treturn top;\n\t}",
"public E peek(){\n\t\treturn top.element;\n\t}",
"public Node top() {\r\n\t\treturn start;\r\n\t}",
"public int top() {\n return q.peek();\n }",
"public int top() {\n \treturn list.get(list.size()-1);\n }",
"public int getTop() {\n return position[0] - (size - 1) / 2;\n }",
"public int top() {\n\t\treturn list.get(list.size() - 1);\n\t}",
"public int top() {\n return objects.peek();\n }",
"public int top() {\n return q1.getFirst();\n }",
"public E top()\n\tthrows EmptyStackException;",
"public E top() {\n\t\tif (this.top == null) {\n\t\t\tthrow new EmptyStackException( );\n\t\t}\n\t\treturn this.top.data;\n\t\t\t\n\t}",
"@Override\n\tpublic E top() throws EmptyStackException {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException(\"Empty Stack\");\n\t\t}\n\t\treturn arr[top];\n\t}",
"public Node<T> getTopNode() {\n\t\treturn topNode;\n\t}",
"public int top() {\n return queue.element();\n }",
"public int top() {\n\t\treturn stack.peek();\n \n }",
"public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}",
"public int top() {\n return q1.peek();\n }",
"public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}",
"public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }",
"public K topValue() {\n\t\tif(top!=null)\r\n\t\t\treturn top.data;\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public int top() {\n return p.val;\n }",
"public Object peek()\r\n {\n assert !this.isEmpty();\r\n return this.top.getItem();\r\n }",
"public int top() {\r\n int value = this.pop();\r\n this.stack.offer(value);\r\n return value;\r\n }",
"public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }",
"@Nullable\n public DpProp getTop() {\n if (mImpl.hasTop()) {\n return DpProp.fromProto(mImpl.getTop());\n } else {\n return null;\n }\n }",
"public String top(){\n if(!(pilha.size() == 0)){\n return pilha.get(pilha.size()-1);\n }else{\n return null;\n }\n }",
"public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }",
"public E popTop() {\n // FILL IN\n }",
"public int top() {\n return stack1.peek();\n }",
"public Card top() {\r\n\t\treturn cards.get(cards.size() - 1);\r\n\t}",
"public View getTopView() {\n\t\tint topViewIndex = getChildCount() - 1;\n\t\treturn getChildAt(topViewIndex);\n\t}",
"public Card top() {\n\t\treturn firstCard;\n\t}",
"public int top() {\n Integer poll = q1.peek();\n return poll == null ? -1 : poll;\n }",
"public int top() {\n return queue.peek();\n }",
"public int top() {\n return queue.peek();\n }",
"public int getElementAtTopOfStack() {\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n return myarray[top];\n \n }",
"int top();",
"public int top() {\n return queue.peek();\n }",
"public int top() {\n return queue.peek();\n }",
"public E top() throws StackUnderflowException {\r\n E item = null;\r\n if(!isEmpty()) item = items.get(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n \r\n return item;\r\n }",
"public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}",
"public int top() {\n move();\n return reverseQueue.peek();\n }",
"public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }",
"@VisibleForTesting\n public TaskStack getTopStack() {\n if (DisplayContent.this.mTaskStackContainers.getChildCount() > 0) {\n return (TaskStack) DisplayContent.this.mTaskStackContainers.getChildAt(DisplayContent.this.mTaskStackContainers.getChildCount() - 1);\n }\n return null;\n }",
"public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}",
"public Disc top()\n\t{\n\t\tint poleSize = pole.size();\n\n\t\t// If the pole is empty, return nothing\n\t\tif(poleSize == 0)\n\t\t\treturn null;\n\n\t\t// Otherwise return the top disc\n\t\treturn pole.get(poleSize - 1);\n\t}",
"public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }",
"public T peek() {\n return top.getData();\n }",
"public int top() {\n return queue.peekLast();\n }",
"public int top() {\n return queue.getLast();\n }",
"public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }",
"@Override\n\tpublic T top()\n\t{\n if(list.size()==0)\n {\n throw new IllegalStateException(\"Stack is empty\");\n }\n return list.get(getSize()-1);\n\t}",
"public Integer peek() {\n if (hasTop)\n return top;\n top = it.next();\n hasTop = true;\n return top;\n }",
"public T top() throws StackUnderflowException;",
"@DISPID(-2147417103)\n @PropGet\n int offsetTop();",
"public static Interval topInterval(){\n\t\treturn top;\n\t}",
"public double getTop() {\n return this.yT;\n }",
"public int top() {\n\t\treturn count == 0? -1 : st[count-1];\r\n\t}",
"public T peek() {\n\t\treturn top.value;\n\t}",
"public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }",
"public Card getTopCard() {\n\t\treturn topCard;\n\t}",
"public int top() {\n if(q1.size() > 0){\n return q1.peek();\n } else {\n return q2.peek();\n }\n }",
"public int top() {\n if(q1.size() > 0) {\n return q1.peek();\n } else {\n return q2.peek();\n }\n }",
"public Card topCard() {\n return this.deck.peek();\n }",
"public Card showTop() {\n\t\treturn hand.get(0);\n\t}",
"public int top() {\n return queue1.peek();\n }",
"public E pop(){\n\t\tif(top == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tE retval = top.element;\n\t\ttop = top.next;\n\t\t\n\t\treturn retval;\n\t}",
"@Override\n public E top()throws EmptyStackException{\n E c = null;\n if(!isEmpty()){\n c = stackArray[count-1];\n return c;\n }\n \n else \n throw new EmptyStackException();\n }",
"public final Symbol top() {\n\t\ttry {\n\t\t\treturn opstack.top().getSymbol();\n\t\t} catch (BadTypeException | EmptyStackException e) {\n\t\t\tSystem.out.println(\"An exception has occurred, \"\n\t\t\t\t\t+ \"Maybe the stack has gone empty\");\n\t\t\treturn null;\n\t\t}\n\t}",
"public int top() {\n if (data.size() != 0) {\n return data.get(data.size() - 1);\n }\n throw new RuntimeException(\"top: 栈为空,非法操作\");\n }",
"@Override\n\tpublic final int getBodyOffsetTop() {\n\t\treturn DOMImpl.impl.getBodyOffsetTop(documentFor());\n\t}",
"public int stackTop() {\r\n\t return array[top];\r\n\t }",
"@Override\r\n\tpublic T top() throws StackUnderflowException{\r\n\t\tif (!isEmpty()) {\r\n\t\t\tT e = stack.get(size()-1);\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new StackUnderflowException();\r\n\t\t}\r\n\t}",
"protected abstract String getTopElementDesc();"
] | [
"0.8335391",
"0.79349744",
"0.77535766",
"0.77485377",
"0.7694716",
"0.7643979",
"0.76287264",
"0.76287264",
"0.7621167",
"0.76107985",
"0.7589793",
"0.75735",
"0.75697887",
"0.75568175",
"0.7533656",
"0.7494104",
"0.7478269",
"0.7464191",
"0.7455398",
"0.7447233",
"0.74203175",
"0.7406463",
"0.74043393",
"0.7352939",
"0.734244",
"0.73417586",
"0.73098415",
"0.73066354",
"0.72712797",
"0.7264668",
"0.72567874",
"0.7251758",
"0.7224371",
"0.7217857",
"0.7213579",
"0.7193627",
"0.7159476",
"0.71480757",
"0.7147091",
"0.714256",
"0.71301913",
"0.7090007",
"0.70728034",
"0.70705646",
"0.705187",
"0.7045256",
"0.7038922",
"0.7028157",
"0.7018065",
"0.7016963",
"0.70165926",
"0.70121855",
"0.69868004",
"0.69615036",
"0.6950168",
"0.6943396",
"0.69373804",
"0.69267696",
"0.6905826",
"0.6902142",
"0.6902142",
"0.6881802",
"0.6880401",
"0.6878632",
"0.6878632",
"0.6875906",
"0.6875629",
"0.68707705",
"0.6870016",
"0.6850324",
"0.6835108",
"0.68345004",
"0.68320584",
"0.6799987",
"0.679576",
"0.6791164",
"0.6776064",
"0.6769703",
"0.6759183",
"0.67574704",
"0.67564046",
"0.6752813",
"0.67456734",
"0.67297053",
"0.6711097",
"0.66882664",
"0.66698295",
"0.66411424",
"0.66350937",
"0.662777",
"0.66265106",
"0.6597248",
"0.65854275",
"0.6578951",
"0.65743136",
"0.65719897",
"0.65618366",
"0.6542039",
"0.653388",
"0.6479797"
] | 0.7304828 | 28 |
Returns whether the stack is empty. | public boolean empty() {
if(q.size()==0) return true;
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean emptyStack() {\n return (expStack.size() == 0);\n }",
"public boolean isEmpty()\n {\n return stack.size() == 0;\n }",
"public boolean isEmpty() {\n \treturn stack.size() == 0;\n }",
"public boolean isEmpty()\n {\n return stack.isEmpty();\n }",
"public boolean isEmpty() {\n return stackImpl.isEmpty();\n }",
"public boolean empty() {\r\n return this.stack.isEmpty();\r\n }",
"public boolean empty() {\r\n return stack.isEmpty();\r\n }",
"public boolean empty() {\n return stack.isEmpty();\n }",
"public boolean empty() {\n return stack.isEmpty();\n }",
"public boolean empty() {\n System.out.println(stack.isEmpty());\n return stack.isEmpty();\n }",
"public boolean isEmpty() {\n\t\treturn (stackSize == 0 ? true : false);\n\t}",
"public boolean empty() {\r\n return stack.isEmpty();\r\n }",
"public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }",
"public boolean empty() {\n return stack.isEmpty();\n }",
"public boolean empty() {\n return stack.empty();\n }",
"public boolean isEmpty(){\r\n\t\treturn stackData.isEmpty();\r\n\t}",
"@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}",
"public boolean isEmpty(){\n return this.stack.isEmpty();\n\n }",
"public final boolean isEmpty() {\n\t\treturn !(opstack.size() > 0);\n\t}",
"public boolean empty() {\n return popStack.isEmpty();\n }",
"public boolean empty() {\n\t\tif(stackTmp.isEmpty() && stack.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isEmpty() {return stackList.isEmpty();}",
"public boolean isEmpty() {\n return stack.isListEmpty();\n }",
"public boolean empty() {\n return this.stack1.empty() && this.stack2.empty();\n }",
"public boolean empty() {\n return this.stack2.size() == 0 && this.stack1.size() == 0;\n }",
"public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }",
"public boolean isEmpty() {\n if (opStack.size() == 0) {\n return true;\n }\n return false;\n }",
"public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }",
"public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }",
"public boolean empty() {\r\n return inStack.empty() && outStack.empty();\r\n }",
"public boolean empty() {\n if (stackIn.empty() && stackOut.empty()) {\n return true;\n }\n return false;\n }",
"public boolean isCarStackEmpty() {\n boolean carStackEmpty = false;\n if(top < 0) {\n carStackEmpty = true;\n }\n return carStackEmpty;\n }",
"public boolean isEmpty() {\n return downStack.isEmpty();\n }",
"public boolean isEmpty(){\r\n \treturn stack1.isEmpty();\r\n }",
"public boolean empty() {\n return stack1.empty();\n }",
"public boolean empty() {\n return stack1.isEmpty() && stack2.isEmpty();\n }",
"public boolean empty() {\n return mStack1.isEmpty() && mStack2.isEmpty();\n }",
"public boolean isEmpty() \n {\n return stack1.isEmpty() && stack2.isEmpty();\n }",
"@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}",
"private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}",
"public boolean isEmpty() {\n\n return (top == null);\n }",
"public boolean empty() {\n return storeStack.isEmpty();\n }",
"public boolean empty() {\n return storeStack.isEmpty();\n }",
"public boolean empty() {\n return storeStack.isEmpty();\n }",
"public boolean isEmpty() {\r\n return (top == null);\r\n }",
"public boolean isEmpty() {\n return (this.top == 0);\n }",
"public boolean isEmpty() {\n\t\treturn (top == null) ? true : false;\n\t}",
"public boolean isEmpty()\n\t{\n\t\treturn top == null;\n\t}",
"public boolean isEmpty() {\n\t\t\n\t\treturn top == null;\n\t}",
"public boolean isFull() {\n return (this.top == this.stack.length);\n }",
"public boolean isEmpty() {\n return top == null;\n }",
"public boolean isEmpty() {\n return top == null;\n }",
"public boolean isEmpty()\r\n\t{\r\n\t\treturn top<=0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn heap.isEmpty();\n\t}",
"public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean empty() {\n return push.isEmpty();\n }",
"public boolean isEmpty(){\n return (top == 0);\n }",
"@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}",
"public boolean isEmpty()\r\n {\n return this.top == null;\r\n }",
"public boolean isEmpty() {\n return this.top == null;\n }",
"public boolean isEmpty() {\n if(this.top== -1) {\n return true;\n }\n return false;\n }",
"public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }",
"public boolean isEmpty() {\n\t\treturn front == null;\n\t}",
"public boolean empty() { \n if (top == -1) {\n return true;\n }\n else {\n return false;\n }\n }",
"public boolean isEmpty() {\n return (fifoEmpty.getBoolean());\n }",
"public boolean empty() {\n\t\treturn (size() <= 0);\n\t}",
"public boolean isEmpty() {\n return top==-1;\n }",
"@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn top==null;\r\n\t}",
"public boolean isEmpty()\n {\n return heapSize == 0;\n }",
"public boolean isFull(){\n return (top == employeeStack.length);\n }",
"public static boolean isEmpty()\n { return currentSize==0; }",
"public boolean isEmpty() {\n return topIndex < 0;\n }",
"public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}",
"public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}",
"public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}",
"public boolean empty() {\n return stk1.isEmpty() && stk2.isEmpty();\n }",
"public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn currentSize == 0;\n\t}",
"public boolean isEmpty(){\n if(top == null)return true;\n return false;\n }",
"public boolean isEmpty() {\n\t\treturn mSentinel == mRoot;// if the root is equal to the sentinel(empty\n\t\t\t\t\t\t\t\t\t// node) then the tree is empty otherwise it\n\t\t\t\t\t\t\t\t\t// is not\n\t}",
"public boolean isEmpty()\n\t{\n\t\treturn (head == null);\n\t}",
"public boolean isHeapEmpty() {\n\t\treturn this.head == null;\n\t}",
"public boolean isSet() {\n return !this.stack.isEmpty();\n }",
"public boolean isEmpty() {\r\n\t\t\r\n\t\treturn topNode == null; // Checks if topNode is null;\r\n\t\t\r\n\t}",
"public final boolean isEmpty() {\n return mSize == 0;\n }",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n return (size == 0);\n }",
"public boolean empty() {\n return size <= 0;\n }",
"public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}",
"public boolean isEmpty() {\n return doIsEmpty();\n }",
"public boolean empty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return this.queue.size() == 0;\n }",
"public boolean isEmpty() {\r\n return (size == 0);\r\n }",
"public boolean isEmpty() {\r\n\t\treturn size == 0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}"
] | [
"0.9056883",
"0.89877164",
"0.8927279",
"0.8913691",
"0.88952327",
"0.8861644",
"0.8812663",
"0.8803307",
"0.8803307",
"0.88012934",
"0.8762096",
"0.87552625",
"0.8734233",
"0.8733799",
"0.8713177",
"0.87054056",
"0.869478",
"0.8679571",
"0.866394",
"0.86360806",
"0.8620381",
"0.8588986",
"0.8536643",
"0.8519639",
"0.84929776",
"0.84534115",
"0.84058106",
"0.83876854",
"0.83645254",
"0.83537555",
"0.83166593",
"0.83037966",
"0.828262",
"0.82777196",
"0.82748145",
"0.8235703",
"0.82064724",
"0.8194284",
"0.81544614",
"0.8025837",
"0.8013609",
"0.79574287",
"0.79574287",
"0.79574287",
"0.7939453",
"0.7928077",
"0.7913513",
"0.7880019",
"0.78706414",
"0.7865312",
"0.7810955",
"0.7810955",
"0.77883196",
"0.77276206",
"0.77276206",
"0.7723528",
"0.7723445",
"0.77220076",
"0.7701561",
"0.76997113",
"0.76993895",
"0.7675793",
"0.76150143",
"0.7590963",
"0.75841945",
"0.7563374",
"0.754169",
"0.7534229",
"0.7515534",
"0.7509447",
"0.7505655",
"0.7505497",
"0.7497732",
"0.74970293",
"0.74944997",
"0.7487798",
"0.7487798",
"0.7473871",
"0.74631596",
"0.74569964",
"0.744851",
"0.7444053",
"0.742821",
"0.7427812",
"0.74265707",
"0.74222845",
"0.7415967",
"0.74026",
"0.7399876",
"0.7399876",
"0.7399876",
"0.7395811",
"0.7395516",
"0.7395358",
"0.7395175",
"0.7390058",
"0.738929",
"0.7388407",
"0.73881257",
"0.7385511",
"0.7385511"
] | 0.0 | -1 |
BASE CASE ROOT == NULL RETURN THE NODE WITH THA VALUE VAL | public static Node insert(Node root, int val) {
if (root == null) {
return new Node(val);
} else {
//IF THE VALUE ROOT IS GREATER THEN THE VAL
//GO TO LEFT
//AND CALL INSERT METHOD (IF NULL ADD A NEW NODE WITH THE VALUE VAL)
if (val <= root.data) {
root.left = insert(root.left, val);
} else {
//IF THE VALUE OF ROOT IS SMALLER THEN THE VAL
//GO TO RIGHT
//AND CALL INSERT METHOD (IF NULL ADD A NEW NODE WITH THE VALUE VAL)
root.right = insert(root.right, val);
}
}
return root;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public Node getNodeFromValue(Object value_p, Document doc_p) throws Exception\r\n {\n return null;\r\n }",
"boolean getTreeNodeIdNull();",
"public Node findNode(E val) {\n\t\tif (val == null) return null;\n\t\treturn findNode(root, val);\n\t}",
"static int nullNode() {\n\t\treturn -1;\n\t}",
"@Test\n\tpublic void takingNullNodeTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeNode(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}",
"public MyBinNode findNodeByValue(Type val){\n MyBinNode aux = this.root;\n while(aux.value.compareTo(val) != 0){\n if(aux.value.compareTo(val) > 0){\n aux = aux.left;\n }else{\n aux = aux.right;\n }\n if(aux == null){\n return null;\n }\n }\n return aux;\n }",
"boolean getRecursiveNull();",
"private RegressionTreeNode traverseNominalNode(Serializable value) {\n\t\tif(value.equals(this.value)){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}",
"private T bestValue(MatchTreeNode<T> node) {\n T value = null;\n if (node != null) {\n if (node.child(\"/\") != null) {\n value = node.child(\"/\").value();\n } else {\n value = bestValue(node.parent());\n }\n }\n return value;\n }",
"public String toString() { return root == null ? \"nil\" : root.toString(); }",
"private Node createNullLeaf(Node parent) {\n Node leaf = new Node();\n leaf.color = Color.BLACK;\n leaf.isNull = true;\n leaf.parent = parent;\n leaf.count = Integer.MAX_VALUE;\n leaf.ID = Integer.MAX_VALUE;\n return leaf;\n }",
"@Override\r\n public Object getValueFromNode(Node node_p) throws Exception\r\n {\n return null;\r\n }",
"@Test\n public void test7() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getParent();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"BTNode<T> getRoot();",
"@Override\r\n\t\tpublic Node getFirstChild()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n public Node getNode() throws ItemNotFoundException, ValueFormatException,\n RepositoryException {\n return null;\n }",
"@Override\n\tpublic Object visit(SimpleNode node, Object data) {\n\t\treturn null;\n\t}",
"public AVLTree() { \n super();\n // This acts as a sentinel root node\n // How to identify a sentinel node: A node with parent == null is SENTINEL NODE\n // The actual tree starts from one of the child of the sentinel node !.\n // CONVENTION: Assume right child of the sentinel node holds the actual root! and left child will always be null.\n \n }",
"private boolean ifLeaf(Node myT) {\r\n return myT != null && myT.left == null && myT.right == null;\r\n }",
"RootNode getRootNode();",
"@Override\n\tpublic V getValue(K key) {\n\t\tNode currentNode = firstNode;\n\t\t\n\t\tif(!isEmpty()){\n\t\t\twhile(currentNode.key != key){\n\t\t\t\tif(currentNode.getNextNode() == null){\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn (V)currentNode.value;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}",
"public Value get(String key) {\n Node x = get(root, key, 0);\n if (x == null) return null; //node does not exist\n else return (Value) x.val; //found node, but key could be null\n }",
"public boolean getTreeNodeIdNull() {\n return treeNodeIdNull_;\n }",
"@Override\r\n\tpublic Node getRootNode() throws RepositoryException {\n\t\treturn null;\r\n\t}",
"@Override\r\n\t\tpublic String getNodeValue() throws DOMException\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Test(enabled = true, dependsOnMethods = {\"remove\"}, expectedExceptions = NullPointerException.class)\n\tpublic void getNullOnNull() {\n\t\tassert stack.getLast().getNext() == node5;\n\t}",
"default boolean isRoot() {\n if (isEmpty()){\n return false;\n }\n\n TreeNode treeNode = getTreeNode();\n return treeNode.getLeftValue() == 1;\n }",
"public boolean getTreeNodeIdNull() {\n return treeNodeIdNull_;\n }",
"ValueNode getDefaultTree()\n\t{\n\t\treturn defaultTree;\n\t}",
"public T caseRoot(Root object) {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Node<T> getRoot() {\r\n\t\treturn raiz;\r\n\t}",
"@Override\r\n\tpublic CacheTreeNode getOneRootNode(String key) {\n\t\treturn searchTreeNode(key);\r\n\t}",
"@Override\n\tpublic void visit(NullValue arg0) {\n\t\t\n\t}",
"public abstract T queryRootNode();",
"@Override\n\tpublic Object visit(ASTRoot node, Object data)\n\t{\n\t\treturn singleChildValid(node, data);\n\t}",
"public String getNodeValue ();",
"private BinaryNode<AnyType> findParentNode1(BinaryNode<AnyType> t, AnyType x)\r\n\t{\r\n\t\tif(t == null)\r\n\t\t\treturn null;\r\n\t\telse if(t == root && (x.compareTo(root.element)== 0))\r\n\t\t\treturn t;\r\n\t\telse\r\n\t\t{\r\n\t\t\tif((t.left!= null && (x.compareTo(t.left.element) == 0)) || (t.right!= null && (x.compareTo(t.right.element) == 0)))\r\n\t\t\t\treturn t;\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tBinaryNode<AnyType> temp = findParentNode1(t.left,x);\r\n\t\t\t\tif(temp == null)\r\n\t\t\t\t\treturn findParentNode1(t.right,x);\r\n\t\t\t\telse\r\n\t\t\t\t\treturn temp;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void visit(NullValue arg0) {\n\n\t}",
"private void nullLeaf(AVLNode<T> node) {\n AVLNode<T> prev = getParent(root, node);\n int comp = node.getData().compareTo(prev.getData());\n if (comp > 0) {\n prev.setRight(null);\n AVLNode<T> min = findMin(prev.getLeft());\n AVLNode<T> max = findMax(prev.getLeft());\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n } else {\n prev.setLeft(null);\n AVLNode<T> max = findMax(prev.getRight());\n AVLNode<T> min = findMin(prev.getRight());\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n }\n }",
"@Override\n public boolean isEmpty() {\n return root == null;\n }",
"public void returnRecursive(Node<E> node, E val) {\n // Will check if the node already exists and if it doesn't then it will create a new node\n // otherwise will run recursively on the left node\n // node.left is the left node from the Node class.\n if (val.compareTo(node.getInfo()) < 0){\n if(node.left == null)\n node.left = new Node(val);\n else\n returnRecursive(node.left, val);\n\n }\n // Will check if the node already exists and if it doesn't then it will create a new node\n // otherwise will run recursively on the right node\n // node.right is the right node from the Node class.\n if(val.compareTo(node.getInfo()) > 0)\n if(node.right == null)\n node.right = new Node(val);\n else\n returnRecursive(node.right, val);\n\n }",
"protected boolean isRoot(BTNode <E> v){\n\t\treturn (v.parent() == null); \n }",
"public TreeNode searchBST(TreeNode root, int val) {\n\n if (root.left == null && root.right == null){\n return new TreeNode();\n }\n\n // DFS\n return _help(root, val);\n }",
"public void testCreateTreeViewForNull() {\n try {\n Util.createTreeView(\"class\", null, \"namespace\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException ex) {\n // success\n }\n }",
"private Node caseNoChildren(Node deleteThis) {\r\n\r\n Node parent = deleteThis.getParent();\r\n\r\n if (parent == null) {\r\n this.root = null; // Kyseessä on juuri\r\n return deleteThis;\r\n }\r\n if (deleteThis == parent.getLeft()) {\r\n parent.setLeft(null);\r\n } else {\r\n parent.setRight(null);\r\n }\r\n return deleteThis;\r\n }",
"@Override\r\n\tpublic T getRootElement() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(this.root == null) {\r\n\t\treturn null;\r\n\t\t\r\n\t\t}\r\n\t\treturn this.root.data;\r\n\t}",
"public abstract MetricTreeNode getRoot();",
"public ParseTreeNode visit(PropertyValueNode propertyValueNode) {\n return null;\n }",
"@SuppressWarnings(\"unchecked\")\n <T extends GraphNode<N, E>> T getNodeOrFail(N val) {\n T node = (T) getNode(val);\n if (node == null) {\n throw new IllegalArgumentException(val + \" does not exist in graph\");\n }\n return node;\n }",
"private TSTNode<E> deleteNodeRecursion(TSTNode<E> currentNode) {\n \n if(currentNode == null) return null;\n if(currentNode.relatives[TSTNode.EQKID] != null || currentNode.data != null) return null; // can't delete this node if it has a non-null eq kid or data\n\n TSTNode<E> currentParent = currentNode.relatives[TSTNode.PARENT];\n\n // if we've made it this far, then we know the currentNode isn't null, but its data and equal kid are null, so we can delete the current node\n // (before deleting the current node, we'll move any lower nodes higher in the tree)\n boolean lokidNull = currentNode.relatives[TSTNode.LOKID] == null;\n boolean hikidNull = currentNode.relatives[TSTNode.HIKID] == null;\n\n ////////////////////////////////////////////////////////////////////////\n // Add by Cheok. To resolve java.lang.NullPointerException\n // I am not sure this is the correct solution, as I have not gone\n // through this sourc code in detail.\n if (currentParent == null && currentNode == this.rootNode) {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n // Add by Cheok. To resolve java.lang.NullPointerException\n ////////////////////////////////////////////////////////////////////////\n\n // now find out what kind of child current node is\n int childType;\n if(currentParent.relatives[TSTNode.LOKID] == currentNode) {\n childType = TSTNode.LOKID;\n } else if(currentParent.relatives[TSTNode.EQKID] == currentNode) {\n childType = TSTNode.EQKID;\n } else if(currentParent.relatives[TSTNode.HIKID] == currentNode) {\n childType = TSTNode.HIKID;\n } else {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n\n if(lokidNull && hikidNull) {\n // if we make it to here, all three kids are null and we can just delete this node\n currentParent.relatives[childType] = null;\n return currentParent;\n }\n\n // if we make it this far, we know that EQKID is null, and either HIKID or LOKID is null, or both HIKID and LOKID are NON-null\n if(lokidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.HIKID];\n currentNode.relatives[TSTNode.HIKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n if(hikidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.LOKID];\n currentNode.relatives[TSTNode.LOKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n int deltaHi = currentNode.relatives[TSTNode.HIKID].splitchar - currentNode.splitchar;\n int deltaLo = currentNode.splitchar - currentNode.relatives[TSTNode.LOKID].splitchar;\n int movingKid;\n TSTNode<E> targetNode;\n \n // if deltaHi is equal to deltaLo, then choose one of them at random, and make it \"further away\" from the current node's splitchar\n if(deltaHi == deltaLo) {\n if(Math.random() < 0.5) {\n deltaHi++;\n } else {\n deltaLo++;\n }\n }\n\n\tif(deltaHi > deltaLo) {\n movingKid = TSTNode.HIKID;\n targetNode = currentNode.relatives[TSTNode.LOKID];\n } else {\n movingKid = TSTNode.LOKID;\n targetNode = currentNode.relatives[TSTNode.HIKID];\n }\n\n while(targetNode.relatives[movingKid] != null) targetNode = targetNode.relatives[movingKid];\n \n // now targetNode.relatives[movingKid] is null, and we can put the moving kid into it.\n targetNode.relatives[movingKid] = currentNode.relatives[movingKid];\n\n // now we need to put the target node where the current node used to be\n currentParent.relatives[childType] = targetNode;\n targetNode.relatives[TSTNode.PARENT] = currentParent;\n\n if(!lokidNull) currentNode.relatives[TSTNode.LOKID] = null;\n if(!hikidNull) currentNode.relatives[TSTNode.HIKID] = null;\n\n // note that the statements above ensure currentNode is completely dereferenced, and so it will be garbage collected\n return currentParent;\n }",
"protected Node<T> getNode(T key) {\n\t\tNode<T> node = root;\n\t\twhile (node != null) {\n\t\t\tif (key.compareTo(node.value) == 0) {\n\t\t\t\treturn node;\n\t\t\t} else if (key.compareTo(node.value) < 0) {\n\t\t\t\tnode = node.right;\n\t\t\t} else {\n\t\t\t\tnode = node.left;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Test\n public void test11() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n int int0 = defaultMenuItem0.getDepth();\n assertEquals(0, int0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"boolean hasNode()\n/* */ {\n/* 473 */ if ((this.bn == null) && (this.mn == null)) return false;\n/* 474 */ if (this.jt == null) return false;\n/* 475 */ return true;\n/* */ }",
"public boolean deleteNode(Type val){\n MyBinNode aux = this.root;\n MyBinNode parent = this.root;\n boolean left = true;\n \n while(aux.value.compareTo(val) != 0){\n parent = aux;\n if(aux.value.compareTo(val) > 0){\n left = true;\n aux = aux.left;\n }else{\n left = false;\n aux = aux.right;\n }\n if(aux == null){\n return false;\n }\n }\n \n if(aux.left==null && aux.right==null){\n if(aux == this.root){\n this.root = null;\n }else if(left){\n parent.left = null;\n }else{\n parent.right = null;\n }\n }else if(aux.right == null){\n if(aux == this.root){\n this.root = aux.left;\n }else if(left){\n parent.left = aux.left;\n }else{\n parent.right = aux.left;\n }\n }else if(aux.left == null){\n if(aux == this.root){\n this.root = aux.right;\n }else if(left){\n parent.left = aux.right;\n }else{\n parent.right = aux.right;\n }\n }else{\n MyBinNode replace = getToReplace(aux);\n if(aux == this.root){\n this.root = replace;\n }else if(left){\n parent.left = replace;\n }else{\n parent.right = replace;\n }\n replace.left = aux.left;\n }\n return true;\n }",
"public ParseTreeNode visit(LevelNode levelNode) {\n return null;\n }",
"public Node getRootNode() throws Exception;",
"public void root(Node n) {}",
"public boolean isRealNode()\r\n\t\t{\r\n\t\t\tif (this.key == -1)\r\n\t\t\t\treturn false;\r\n\t\t\treturn true; \r\n\t\t}",
"boolean isEmpty(){\n return root == null;\n }",
"private RBNode<T> getRoot(){\n return root.getLeft();\n }",
"public static <E extends Comparable> TreeNode<E> findNode(TreeNode<E> root, E value) {\r\n TreeNode node = root;\r\n \r\n while(node != null) {\r\n int compare = value.compareTo(node.getValue());\r\n \r\n if(compare == 0) {\r\n return node;\r\n } else if(compare < 0) {\r\n node = node.getLeft();\r\n } else {\r\n node = node.getRight();\r\n }\r\n }\r\n \r\n return null;\r\n }",
"@Override\n public Optional<Node<T>> findBy(T value) {\n Optional<Node<T>> rsl = Optional.empty();\n Queue<Node<T>> data = new LinkedList<>();\n data.offer(this.root);\n while (!data.isEmpty()) {\n Node<T> el = data.poll();\n if (el.eqValues(value)) {\n rsl = Optional.of(el);\n break;\n }\n for (Node<T> child : el.leaves()) {\n data.offer(child);\n }\n }\n return rsl;\n }",
"private boolean isLeaf()\r\n\t\t{\r\n\t\t\treturn getLeftChild() == null && getRightChild() == null;\r\n\t\t}",
"public TernaryTree() {\n root = null;\n\n }",
"@Test\n public void testDefaultRoot() {\n assertEquals(ClassModel.getObjectClass(), node.getModel());\n assertEquals(1, node.size());\n assertEquals(0, treeHash.size());\n }",
"@Test\n public void test5() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getContained();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"private boolean isEmpty()\r\n\t{\r\n\t\treturn getRoot() == null;\r\n\t}",
"@Override\n\tpublic WhereNode getLeftChild() {\n\t\treturn null;\n\t}",
"boolean isEmpty(){\r\n\t\t\r\n\t\treturn root == null;\r\n\t}",
"public TreeNode searchBST_1(TreeNode root, int val) {\n if (root == null || val == root.val) return root;\n\n return val < root.val ? searchBST_1(root.left, val) : searchBST_1(root.right, val);\n }",
"public void remove(T value) {\n\n // Declares and initializes the node whose value is being searched for and begins a recursive search.\n Node<T> node = new Node<>(value);\n if (root.getValue().compareTo(value) == 0) node = root;\n else node = searchRecursively(root, value);\n\n // If node has no children...\n if (node.getLeft() == null && node.getRight() == null) {\n // If it's the root, remove root.\n if (node.getValue().compareTo(root.getValue()) == 0) {\n root = null;\n return;\n }\n // Otherwise, get its parent node.\n Node parent = getParent(value);\n // Determines whether the node is the left or right child of the parent and sets the appropriate branch of\n // the parent to null.\n if (parent.getLeft() == null) {\n if (parent.getRight().getValue().compareTo(value) == 0)\n parent.setRight(null);\n } else if (parent.getRight() == null) {\n if (parent.getLeft().getValue().compareTo(value) == 0)\n parent.setLeft(null);\n } else if (parent.getLeft().getValue().compareTo(value) == 0) {\n parent.setLeft(null);\n } else if (parent.getRight().getValue().compareTo(value) == 0) {\n parent.setRight(null);\n }\n\n // If the node has either no left or no right branch...\n } else if (node.getLeft() == null || node.getRight() == null) {\n // If its left branch is null...\n if (node.getLeft() == null) {\n // If the value in question belongs to the root and root has no left branch, its right branch becomes\n // the new root.\n if (node.getValue().compareTo(root.getValue()) == 0) root = root.getRight();\n // Otherwise, finds the parent, determines whether the value in question belongs to the node in the\n // parent's left or right branch, and sets the appropriate branch to reference the node's right branch.\n else {\n Node<T> parent = getParent(value);\n if (parent.getLeft().getValue().compareTo(value) == 0) parent.setLeft(node.getRight());\n else parent.setRight(node.getRight());\n }\n // If its right branch is null...\n } else if (node.getRight() == null) {\n // If the value in question belongs to the root and root has no right branch, its left branch becomes\n // the new root.\n if (node.getValue().compareTo(root.getValue()) == 0) root = root.getLeft();\n else {\n Node<T> parent = getParent(value);\n if (parent.getLeft().getValue().compareTo(value) == 0) parent.setLeft(node.getLeft());\n else parent.setRight(node.getRight());\n }\n }\n // If the node has two children...\n } else {\n // Iterates through the current node's left nodes until none remain, replacing its value with that of its left node.\n while (node.getLeft() != null) {\n Node<T> left = node.getLeft();\n node.setValue(left.getValue());\n if (node.getLeft().getLeft() == null && node.getLeft().getRight() == null) {\n node.setLeft(null);\n }\n node = left;\n // If there are no left nodes but a right node exists, sets the current node's value to that of its right\n // node. Loop will continue to iterate through left nodes.\n if (node.getLeft() == null && node.getRight() != null) {\n Node<T> right = node.getRight();\n node.setValue(right.getValue());\n node = right;\n }\n }\n }\n balance(root);\n }",
"private IAVLNode findSuccessor(IAVLNode node) \r\n\t {\r\n\t\t if(node.getRight().getHeight() != -1) \r\n\t\t\t return minPointer(node.getRight());\r\n\t\t IAVLNode parent = node.getParent();\r\n\t\t while(parent.getHeight() != -1 && node == parent.getRight())\r\n\t\t {\r\n\t\t\t node = parent;\r\n\t\t\t parent = node.getParent();\r\n\t\t }\r\n\t\t return parent;\t \r\n\t\t}",
"static Node BSTInsert(Node tmp,int key)\n {\n //if the tree is empty it will insert the new node as root\n \n if(tmp==null)\n {\n tmp=new Node(key);\n \n return tmp;\n }\n \n else\n \n rBSTInsert(tmp,key);\n \n \n return tmp;\n }",
"@Override\n\tpublic void visit(Null n) {\n\t\t\n\t}",
"public Node getNode() {\n\t\treturn null;\n\t}",
"public boolean isEmpty(){\n return this.root == null;\n }",
"public Boolean isRootNode();",
"boolean getTreeNodeIdForVariantMatrixNull();",
"public static TreeNode getMockWithSuccessorTreeRoot() {\n TreeNode<Integer> root = new TreeNode<>(4);\n TreeNode<Integer> node1 = new TreeNode<>(2);\n TreeNode<Integer> node2 = new TreeNode<>(8);\n TreeNode<Integer> node3 = new TreeNode<>(1);\n TreeNode<Integer> node4 = new TreeNode<>(3);\n TreeNode<Integer> node5 = new TreeNode<>(7);\n TreeNode<Integer> node6 = new TreeNode<>(9);\n\n root.left = node1;\n root.right = node2;\n node1.parent = root;\n node2.parent = root;\n\n node1.left = node3;\n node1.right = node4;\n node3.parent = node1;\n node4.parent = node1;\n\n node2.left = node5;\n node2.right = node6;\n node5.parent = node2;\n node6.parent = node2;\n\n return root;\n }",
"public static Node getSingleNode(Object arg) {\n if (arg instanceof Node) {\n return (Node) arg;\n } else if (arg instanceof Iterable<?>) {\n return (Node) Iterables.getOnlyElement((Iterable<?>) arg, null);\n } else {\n return null;\n }\n }",
"public ObjectTreeNode searchBST(Object o) {\n ObjectTreeNode p;\n \n ObjectTreeNode r = new ObjectTreeNode(o);\n if(root != null) {\n p = root;\n while (p != null) {\n if (((TreeComparable)(r.getInfo())).compareTo((TreeComparable)(p.getInfo())) < 0)\n p = p.getLeft();\n else if (((TreeComparable)(r.getInfo())).compareTo((TreeComparable)(p.getInfo())) > 0)\n p = p.getRight();\n else \n return p;\n }\n }\n return null;\n }",
"public static TreeNode makeNull(ArrowType type) {\n return new NullNode(type);\n }",
"@Override\r\n\t\tpublic Node getLastChild()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public int jumlahNode() {\n return jumlahNode(root);\n }",
"public T caseNode(Node object) {\n\t\treturn null;\n\t}",
"public T caseNode(Node object) {\n\t\treturn null;\n\t}",
"@Test\n public void test8() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.toString();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"private TreeNode getOnlyChild() {\n return templateRoot.getChildren().get(0);\n }",
"public boolean isLeaf()\r\n {\r\n return this.getLeft()==null&&this.getRight()==null;\r\n }",
"abstract protected UiElementNode getRootNode();",
"public Builder setTreeNodeIdNull(boolean value) {\n \n treeNodeIdNull_ = value;\n onChanged();\n return this;\n }",
"@Override\n public boolean isMissingNode() { return false; }",
"@Test\n public void test9() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.setIndex(0);\n assertEquals(0, defaultMenuItem0.getIndex());\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"public boolean isRealNode();",
"public boolean isRealNode();",
"public V get(K key){\n\t\t\n\n\t\tNode n=searchkey(root, key);\n\n\t\t\n\t\tif(n!=null && n.value!=null){\n\t\t\treturn n.value;\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}",
"@Test\n public void testListWithNulls() {\n Node makeNull = Node.ROOT\n .withName(\"makeNull\")\n .withFunction(\"test/makeNull\")\n .withInputAdded(Port.floatPort(\"value\", 0.0));\n Node net = Node.NETWORK\n .withChildAdded(threeNumbers)\n .withChildAdded(makeNull)\n .connect(\"threeNumbers\", \"makeNull\", \"value\");\n assertResultsEqual(net, makeNull);\n }",
"public String getNodeValue(Node node) throws Exception;",
"@Test\n \tpublic void whereClauseForNodeRoot() {\n \t\tnode23.setRoot(true);\n \t\tcheckWhereCondition(\"_rank23.root IS TRUE\");\n \t}",
"public T rootValue() {\n if (root == null) throw new IllegalStateException(\"Empty tree has no root value\");\n return root.value;\n }",
"@Override\r\n\tpublic boolean isLeaf() {\n\t\treturn (left==null)&&(right==null);\r\n\t}"
] | [
"0.6706979",
"0.670551",
"0.64149773",
"0.6384991",
"0.63576734",
"0.63189864",
"0.6288456",
"0.6249935",
"0.62087566",
"0.6143577",
"0.6075766",
"0.6018183",
"0.5992836",
"0.5954858",
"0.5934497",
"0.59286565",
"0.5921635",
"0.59024405",
"0.5897715",
"0.58968043",
"0.5890664",
"0.58809674",
"0.5879321",
"0.58711815",
"0.5869281",
"0.58488315",
"0.5844363",
"0.5844215",
"0.58352494",
"0.58348227",
"0.5833604",
"0.58324647",
"0.58304",
"0.5828104",
"0.58201283",
"0.58023",
"0.58017343",
"0.57966816",
"0.57873476",
"0.5785527",
"0.5783684",
"0.578329",
"0.57798684",
"0.5773833",
"0.5769083",
"0.5751915",
"0.57450163",
"0.57413685",
"0.5740264",
"0.5721519",
"0.57179165",
"0.5715209",
"0.571229",
"0.56899834",
"0.5683987",
"0.5674492",
"0.5668224",
"0.56665903",
"0.5665473",
"0.56594044",
"0.56476635",
"0.564476",
"0.56409806",
"0.5637711",
"0.5635882",
"0.5634721",
"0.56191945",
"0.5615952",
"0.5611141",
"0.5601064",
"0.56008816",
"0.5595304",
"0.5594529",
"0.5594427",
"0.5593896",
"0.559109",
"0.5590992",
"0.5588008",
"0.558589",
"0.5577076",
"0.55757695",
"0.55751634",
"0.5575093",
"0.5572939",
"0.5572639",
"0.5572639",
"0.55687344",
"0.55608547",
"0.55567175",
"0.55547297",
"0.555104",
"0.5546721",
"0.5536949",
"0.5518488",
"0.5518488",
"0.5511557",
"0.55096316",
"0.550732",
"0.5504478",
"0.5504425",
"0.5503894"
] | 0.0 | -1 |
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | public ShardBriefInfo(ShardBriefInfo source) {
if (source.ShardSerialId != null) {
this.ShardSerialId = new String(source.ShardSerialId);
}
if (source.ShardInstanceId != null) {
this.ShardInstanceId = new String(source.ShardInstanceId);
}
if (source.Status != null) {
this.Status = new Long(source.Status);
}
if (source.StatusDesc != null) {
this.StatusDesc = new String(source.StatusDesc);
}
if (source.CreateTime != null) {
this.CreateTime = new String(source.CreateTime);
}
if (source.Memory != null) {
this.Memory = new Long(source.Memory);
}
if (source.Storage != null) {
this.Storage = new Long(source.Storage);
}
if (source.LogDisk != null) {
this.LogDisk = new Long(source.LogDisk);
}
if (source.NodeCount != null) {
this.NodeCount = new Long(source.NodeCount);
}
if (source.StorageUsage != null) {
this.StorageUsage = new Float(source.StorageUsage);
}
if (source.ProxyVersion != null) {
this.ProxyVersion = new String(source.ProxyVersion);
}
if (source.ShardMasterZone != null) {
this.ShardMasterZone = new String(source.ShardMasterZone);
}
if (source.ShardSlaveZones != null) {
this.ShardSlaveZones = new String[source.ShardSlaveZones.length];
for (int i = 0; i < source.ShardSlaveZones.length; i++) {
this.ShardSlaveZones[i] = new String(source.ShardSlaveZones[i]);
}
}
if (source.Cpu != null) {
this.Cpu = new Long(source.Cpu);
}
if (source.NodesInfo != null) {
this.NodesInfo = new NodeInfo[source.NodesInfo.length];
for (int i = 0; i < source.NodesInfo.length; i++) {
this.NodesInfo[i] = new NodeInfo(source.NodesInfo[i]);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void set(String key, Object value);",
"void set(K key, V value);",
"public setKeyValue_args(setKeyValue_args other) {\n if (other.isSetKey()) {\n this.key = other.key;\n }\n if (other.isSetValue()) {\n this.value = other.value;\n }\n }",
"public abstract void set(String key, T data);",
"Object put(Object key, Object value);",
"public native Map<K, V> set(K key, V value);",
"@Test\n public void testSet() {\n Assert.assertTrue(map.set(\"key-1\", \"value-1\", 10));\n Assert.assertTrue(map.set(\"key-1\", \"value-2\", 10));\n Assert.assertTrue(map.set(\"key-2\", \"value-1\", 10));\n }",
"private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }",
"void set(K k, V v) throws OverflowException;",
"public Value put(Key key, Value thing) ;",
"@Test\n\tpublic void testPutAccessReodersElement() {\n\t\tmap.put(\"key1\", \"value1\");\n\n\t\tSet<String> keySet = map.keySet();\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key1\",\n\t\t\tkeySet.iterator().next());\n\n\t\t// move 2 to the top/front\n\t\tmap.put(\"key2\", \"value2\");\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key2\",\n\t\t\tkeySet.iterator().next());\n\t}",
"public void set(String key, Object value) {\n set(key, value, 0);\n }",
"final <T> void set(String key, T value) {\n set(key, value, false);\n }",
"public void setObject(final String key, final Object value)\r\n {\r\n if (key == null)\r\n {\r\n throw new NullPointerException();\r\n }\r\n if (value == null)\r\n {\r\n helperObjects.remove(key);\r\n }\r\n else\r\n {\r\n helperObjects.put(key, value);\r\n }\r\n }",
"@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }",
"@Test\n public void keySetTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.keySet());\n }",
"@Override\n public V put(K key, V value) {\n if (!containsKey(key)) {\n keys.add(key);\n }\n\n return super.put(key, value);\n }",
"public void set(String newKey)\n\t{\n\t\tthis.Key = newKey;\n\t}",
"public void setValue(K key, V value);",
"public Value set(Value key, Value value) {\n\t\tif (get(key) != null)\n\t\t\tput(key, value);\n\t\telse if (parent != null)\n\t\t\tparent.put(key, value);\n\t\telse\n\t\t\tput(key, value);\n\t\treturn value;\n\t}",
"final void set(String key, String value) {\n set(key, value, false);\n }",
"void put(String key, Object obj);",
"public void set(Object key, Object value) {\n if(attributes == null)\n attributes = new HashMap<>();\n attributes.put(key, value);\n }",
"private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}",
"void put(String key, Object value);",
"Object put(Object key, Object value) throws NullPointerException;",
"public void testNormalKeySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkKeySet(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"@Override\n public synchronized Object put(Object key, Object value) {\n if (value instanceof String) {\n value = ((String) value).trim();\n }\n String strkey = key.toString();\n if (this.ignoreCase) {\n this.keyMap.put(strkey.toLowerCase(), strkey);\n }\n return super.put(strkey, value);\n }",
"@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }",
"public void testSet(){\n stringRedisTemplate.opsForSet().add(\"set-key\",\"a\",\"b\",\"c\");\n //srem set-key c d\n stringRedisTemplate.opsForSet().remove(\"set-key\",\"c\",\"d\");\n stringRedisTemplate.opsForSet().remove(\"set-key\",\"c\",\"d\");\n //scard set-key\n stringRedisTemplate.opsForSet().size(\"set-key\");\n //smembers set-key\n stringRedisTemplate.opsForSet().members(\"set-key\");\n //smove set-key set-key2 a\n stringRedisTemplate.opsForSet().move(\"set-key\",\"a\",\"set-key2\");\n stringRedisTemplate.opsForSet().move(\"set-key\",\"c\",\"set-key2\");\n\n //sadd skey1 a b c d\n stringRedisTemplate.opsForSet().add(\"skey1\",\"a\",\"b\",\"c\",\"d\");\n //sadd skey2 c d e f\n stringRedisTemplate.opsForSet().add(\"skey2\",\"c\",\"d\",\"e\",\"f\");\n //sdiff skey1 skey2 //存在与skey1中不存在与skey2中, a b\n stringRedisTemplate.opsForSet().difference(\"skey1\",\"skey2\");\n //sinter skey1 skey2 // c d\n stringRedisTemplate.opsForSet().intersect(\"skey1\",\"skey2\");\n //sunion skey1 skey2 // a b c d e f\n stringRedisTemplate.opsForSet().union(\"skey1\",\"skey2\");\n }",
"protected abstract void put(K key, V value);",
"protected abstract void _set(String key, Object obj, Date expires);",
"Set getLocalKeySet();",
"void setObjectKey(String objectKey);",
"String set(K key, V value, SetOption setOption, long expirationTime, TimeUnit timeUnit);",
"public Object putTransient(Object key, Object value);",
"public JbootVoModel set(String key, Object value) {\n super.put(key, value);\n return this;\n }",
"public abstract void Put(WriteOptions options, Slice key, Slice value) throws IOException, BadFormatException, DecodeFailedException;",
"public void set(String key, Object value) {\r\n\t\tthis.context.setValue(key, value);\r\n\t}",
"public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}",
"@Override\r\n\tpublic void putObject(Object key, Object value) {\n\t\t\r\n\t}",
"public MapVS(SetVS<T> keys, Map<K, V> entries) {\n this.keys = keys;\n this.entries = entries;\n this.concreteHash = computeConcreteHash();\n }",
"void put(Object indexedKey, Object key);",
"public abstract V put(K key, V value);",
"void setKey(K key);",
"@Override\n\tpublic void put(S key, T val) {\n\t\t\n\t}",
"public void set(String key, Object value)\n {\n if (value == null) remove(key);\n else if (value instanceof Map)\n {\n DataSection section = createSection(key);\n Map map = (Map) value;\n for (Object k : map.keySet())\n {\n section.set(k.toString(), map.get(k));\n }\n }\n else\n {\n data.put(key, value);\n if (!keys.contains(key)) keys.add(key);\n }\n }",
"@Override\n public void put(K key, V value) {\n root = put(root, key, value);\n }",
"public void attach(Object key, Object value);",
"public static interface SetFilter extends KeyValueFilter {\r\n\t\tObject put(String name, Object value);\r\n\t}",
"public void testCache() {\n MethodKey m = new MethodKey(\"aclass\", \"amethod\", new Object[]{1, \"fads\", new Object()});\n String mValue = \"my fancy value\";\n MethodKey m1 = new MethodKey(\"aclass\", \"amethod1\", new Object[]{1, \"fads\", new Object()});\n String mValue1 = \"my fancy value1\";\n MethodKey m2 = new MethodKey(\"aclass\", \"amethod2\", new Object[]{1, \"fads\", new Object()});\n String mValue2 = \"my fancy value2\";\n\n GenericCache.setValue(m, mValue);\n GenericCache.setValue(m1, mValue1);\n GenericCache.setValue(m2, mValue2);\n\n assertEquals(GenericCache.getValue(m), mValue);\n assertEquals(GenericCache.getValue(m1), mValue1);\n assertEquals(GenericCache.getValue(m2), mValue2);\n }",
"void put(K key, V value);",
"void put(K key, V value);",
"public void set(K key, V value)\n {\n // If there are too many entries, expand the table.\n if (this.size > (this.buckets.length * LOAD_FACTOR))\n {\n expand();\n } // if there are too many entries\n // Find out where the key belongs.\n int index = this.find(key);\n // Create a new association list, if necessary.\n if (buckets[index] == null)\n {\n this.buckets[index] = new AssociationList<K, V>();\n } // if (buckets[index] == null)\n // Add the entry.\n AssociationList<K, V> bucket = this.get(index);\n int oldsize = bucket.size;\n bucket.set(key, value);\n // Update the size\n this.size += bucket.size - oldsize;\n }",
"@Override\n public void put(K key, V value) {\n root = putHelper(key,value,root);\n }",
"public void setKey(K newKey) {\n this.key = newKey;\n }",
"@Override\n\tpublic void set(K key, List<V> value) {\n\t\t\n\t}",
"public OwnMap() {\n super();\n keySet = new OwnSet();\n }",
"public void setKey (K k) {\n key = k;\n }",
"public void setItemCollection(HashMap<String, Item> copy ){\n \titemCollection.putAll(copy);\r\n }",
"public void put(Key key, Value val);",
"public void setValue(String key, Object value)\n {\n if (value != null)\n {\n if (otherDetails == null)\n {\n otherDetails = new Hashtable();\n }\n\n otherDetails.put(key, value);\n }\n }",
"ISObject put(String key, ISObject stuff) throws UnexpectedIOException;",
"public void put(Comparable key, Stroke stroke) {\n/* 120 */ ParamChecks.nullNotPermitted(key, \"key\");\n/* 121 */ this.store.put(key, stroke);\n/* */ }",
"public void set(R key, List<S> value){\n map.remove(key);\n map.put(key, value);\n }",
"public V put(K key, V value) throws InvalidKeyException;",
"@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127625049L), 88,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"18fa817e-9d24-4344-a79a-ab19db23016c\", -15,\n \"7b9ca8ca-2f09-4496-b67e-f3a146e5c741\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127627362L));\n ApiKey apikey2 = apikey1.clone();\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"public final void set(final String key, final Object value) {\n try {\n synchronized (jo) {\n if (value == null) {\n jo.remove(key);\n } else {\n jo.put(key, value);\n }\n }\n } catch (JSONException e) {\n }\n }",
"@Test\n public void testPutAll_Existing() {\n Map<String, String> toAdd = fillMap(1, 10, \"\", \"Old \");\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10, \"\", \"New \");\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n for (String k : toAdd.keySet()) {\n String old = toAdd.get(k);\n String upd = toUpdate.get(k);\n\n verify(helper).fireReplace(entry(k, old), entry(k, upd));\n }\n verifyNoMoreInteractions(helper);\n }",
"public T set(T obj);",
"V put(K key, V value);",
"public boolean put(String key, String value);",
"void put(String key, String value) throws StorageException, ValidationException, KeyValueStoreException;",
"public void set(R key, Collection<S> value){\n map.remove(key);\n map.put(key, Collections.synchronizedList(Sugar.listFromCollections(value)));\n }",
"@Before\r\n public void test_change(){\r\n HashTable<String,String> table = new HashTable<>(1);\r\n MySet<String> s = (MySet<String>) table.keySet();\r\n table.put(\"AA\",\"BB\");\r\n table.put(\"AA\",\"CC\");\r\n assertTrue(s.contains(\"AA\"));\r\n table.remove(\"AA\");\r\n assertFalse(s.contains(\"AA\"));\r\n }",
"public void put(String key, Object value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}",
"public boolean put( KEY key, OBJECT object );",
"boolean setValue(String type, String key, String value);",
"public Set<V> put(K key, Collection<V> set) {\n // Remove any possibly existing prior association with the key\n Set<V> result = remove(key);\n\n // Note: The second argument is effectless, as we cannot encounter item type errors here\n NavigableSet<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n SetTrieNode currentNode = superRootNode;\n while(it.hasNext()) {\n V v = it.next();\n\n SetTrieNode nextNode = currentNode.nextValueToChild == null ? null : currentNode.nextValueToChild.get(v);\n if(nextNode == null) {\n nextNode = new SetTrieNode(nextId++, currentNode, v);\n if(currentNode.nextValueToChild == null) {\n currentNode.nextValueToChild = new TreeMap<>(comparator);\n }\n currentNode.nextValueToChild.put(v, nextNode);\n }\n currentNode = nextNode;\n }\n\n if(currentNode.keyToSet == null) {\n currentNode.keyToSet = new HashMap<>();\n }\n\n currentNode.keyToSet.put(key, navSet);\n\n keyToNode.put(key, currentNode);\n\n return result;\n }",
"public K setKey(K key);",
"Set keySet(final TCServerMap map) throws AbortedOperationException;",
"@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() {\n\t\tLongOpenHashSet c;\n\t\ttry {\n\t\t\tc = (LongOpenHashSet) super.clone();\n\t\t} catch (CloneNotSupportedException cantHappen) {\n\t\t\tthrow new InternalError();\n\t\t}\n\t\tc.key = key.clone();\n\t\tc.state = state.clone();\n\t\treturn c;\n\t}",
"boolean canSet(String key);",
"@Test\n public void testBackdoorModificationSameKey()\n {\n testBackdoorModificationSameKey(this);\n }",
"public IDataKey clone() {\n return new IDataKey(this);\n }",
"public abstract void copyFrom(KeyedString src);",
"@Override\n public V put(K key, V value) {\n if ((key == null) || (value == null)) {\n logger.warn(\"NULL key or value key = \" + key + \". value = \" + value);\n System.out.println(StringUtils.join(Thread.currentThread().getStackTrace(), \"\\n\"));\n return null;\n }\n\n // If this map is supposed to be case insensitive, uppercase the key before putting it\n // in the map\n if (caseInsensitive && key instanceof String) {\n return super.put(((K) key.toString().toUpperCase()), value);\n } else {\n return super.put(key, value);\n }\n }",
"public void set(String key, String value){\n\t\tif(first == null){\n\t\t\tfirst = new ListMapEntry(key, value);\n\t\t}\n\t\tListMapEntry temp = first;\n\t\tListMapEntry prev = null;\n\t\twhile(temp!=null && !temp.getKey().equals(key)){\n\t\t\tprev = temp;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\tif(temp==null){\n\t\t\tprev.setNext(new ListMapEntry(key, value));\n\t\t}\n\t\telse{\n\t\t\ttemp.setValue(value);\n\t\t}\n\t}",
"V put(final K key, final V value);",
"public void set(String key, Object obj) {\n options.put(key, obj);\n }",
"boolean put(K key, V value);",
"@Override\n\tpublic void put(Object key, Object val) {\n\t\tif(st[hash(key)].size()>=k)\n\t\t\tst[hash(key)].clear();\n\t\tst[hash(key)].put(key, st[hash(key)].size());\n\t}",
"protected abstract boolean _setIfAbsent(String key, Object value, Date expires);",
"@Override\n public void putValue(String key, Object value) {\n\n }",
"public DelegateAbstractHashMap(AbstractHashSet set) {\n\t\t\tsuper();\n\t\t\tthis.set = set;\n\t\t}",
"public void changeKey(String key, Object newValue){\n try {\n myJSON.put(key, newValue);\n writeToFile();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void put(String key, T value);",
"@Override\r\n public V put(K key, V value){\r\n \r\n // Declare a temporay node and instantiate it with the key and\r\n // previous value of that key\r\n TreeNode<K, V> tempNode = new TreeNode<>(key, get(key));\r\n \r\n // Call overloaded put function to either place a new node\r\n // in the tree or update the exisiting value for the key\r\n root = put(root, key, value);\r\n \r\n // Return the previous value of the key through the temporary node\r\n return tempNode.getValue();\r\n }",
"String setKey(String newKey);",
"public void set(String key, String value) {\n if (key.indexOf('=') != -1 || key.indexOf(';') != -1) {\n Log.e(TAG, \"Key \\\"\" + key + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n if (value.indexOf('=') != -1 || value.indexOf(';') != -1) {\n Log.e(TAG, \"Value \\\"\" + value + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n\n mMap.put(key, value);\n }",
"@Test\n public void testPutAll_ExistingNoChange() {\n Map<String, String> toAdd = fillMap(1, 10);\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10);\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n verifyZeroInteractions(helper);\n }"
] | [
"0.6440425",
"0.6415443",
"0.6145525",
"0.61172885",
"0.609467",
"0.60810256",
"0.60422385",
"0.5990364",
"0.59736174",
"0.59564006",
"0.58394885",
"0.58277106",
"0.5790857",
"0.5705316",
"0.57027704",
"0.56880087",
"0.5686415",
"0.56781363",
"0.5608639",
"0.5590083",
"0.5582245",
"0.5570489",
"0.5560049",
"0.55530703",
"0.5549463",
"0.5533705",
"0.55286086",
"0.55116004",
"0.54972124",
"0.54910856",
"0.54829353",
"0.54679686",
"0.5431868",
"0.54273665",
"0.54224724",
"0.5413962",
"0.54104",
"0.53787935",
"0.53772664",
"0.53748906",
"0.53747004",
"0.53570825",
"0.5350402",
"0.5340595",
"0.5330211",
"0.5321594",
"0.52932364",
"0.5285382",
"0.52825433",
"0.52648",
"0.5258141",
"0.5257998",
"0.5257998",
"0.5256669",
"0.5256548",
"0.5242394",
"0.5237798",
"0.5234187",
"0.522877",
"0.52269787",
"0.522518",
"0.52182424",
"0.52167994",
"0.52009475",
"0.5195212",
"0.5188795",
"0.5183071",
"0.51826215",
"0.5177528",
"0.517711",
"0.51760465",
"0.51758975",
"0.51740146",
"0.5170327",
"0.5136484",
"0.5132591",
"0.5129853",
"0.51292944",
"0.51247597",
"0.5121954",
"0.5120632",
"0.51204467",
"0.5104378",
"0.51039904",
"0.5101876",
"0.5099534",
"0.50989676",
"0.5092156",
"0.5074713",
"0.5070289",
"0.50656843",
"0.50632787",
"0.50518346",
"0.5028556",
"0.5023309",
"0.5022976",
"0.5020225",
"0.50197893",
"0.501666",
"0.50151473",
"0.5015003"
] | 0.0 | -1 |
Internal implementation, normal users should not use it. | public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "ShardSerialId", this.ShardSerialId);
this.setParamSimple(map, prefix + "ShardInstanceId", this.ShardInstanceId);
this.setParamSimple(map, prefix + "Status", this.Status);
this.setParamSimple(map, prefix + "StatusDesc", this.StatusDesc);
this.setParamSimple(map, prefix + "CreateTime", this.CreateTime);
this.setParamSimple(map, prefix + "Memory", this.Memory);
this.setParamSimple(map, prefix + "Storage", this.Storage);
this.setParamSimple(map, prefix + "LogDisk", this.LogDisk);
this.setParamSimple(map, prefix + "NodeCount", this.NodeCount);
this.setParamSimple(map, prefix + "StorageUsage", this.StorageUsage);
this.setParamSimple(map, prefix + "ProxyVersion", this.ProxyVersion);
this.setParamSimple(map, prefix + "ShardMasterZone", this.ShardMasterZone);
this.setParamArraySimple(map, prefix + "ShardSlaveZones.", this.ShardSlaveZones);
this.setParamSimple(map, prefix + "Cpu", this.Cpu);
this.setParamArrayObj(map, prefix + "NodesInfo.", this.NodesInfo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }",
"protected Problem() {/* intentionally empty block */}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n public int retroceder() {\n return 0;\n }",
"protected Doodler() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"@Override\r\n\tpublic void init() {}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void apply() {\n }",
"private TestsResultQueueEntry() {\n\t\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"protected void initialize() {}",
"protected void initialize() {}",
"private final void i() {\n }",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"protected void h() {}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private Unescaper() {\n\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"private ArraySetHelper() {\n\t\t// nothing\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n public void init() {}",
"private Util() { }",
"@Override public int describeContents() { return 0; }",
"public void method_4270() {}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"protected abstract Set method_1559();",
"@Override\n public void init() {\n\n }",
"protected void init() {\n // to override and use this method\n }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private TedCorrigendumHandler() {\n throw new AssertionError();\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"protected boolean func_70041_e_() { return false; }",
"@Override\n public void preprocess() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"private void getStatus() {\n\t\t\n\t}",
"protected void additionalProcessing() {\n\t}",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void selfValidate() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"private void assignment() {\n\n\t\t\t}"
] | [
"0.6257116",
"0.6217437",
"0.60246235",
"0.59824973",
"0.59655595",
"0.59334373",
"0.5920432",
"0.5834765",
"0.5781523",
"0.57761115",
"0.57761115",
"0.57761115",
"0.57761115",
"0.57761115",
"0.57761115",
"0.57749873",
"0.57062346",
"0.57006085",
"0.5652159",
"0.56490135",
"0.56490135",
"0.5640775",
"0.5636917",
"0.5635465",
"0.5617799",
"0.5613309",
"0.5607817",
"0.5607817",
"0.5605086",
"0.5597423",
"0.5556962",
"0.55472577",
"0.5538812",
"0.55305433",
"0.55288607",
"0.5526449",
"0.5524714",
"0.5518564",
"0.55170316",
"0.55170316",
"0.550795",
"0.5504592",
"0.55031306",
"0.54972404",
"0.5493789",
"0.5486226",
"0.5486226",
"0.54847646",
"0.54847646",
"0.54711646",
"0.54674447",
"0.546662",
"0.54586977",
"0.544855",
"0.5444965",
"0.544317",
"0.5429975",
"0.5429664",
"0.5429482",
"0.54279464",
"0.54241985",
"0.542281",
"0.5420858",
"0.54123694",
"0.5412074",
"0.5410766",
"0.5408059",
"0.540333",
"0.53937393",
"0.5392882",
"0.5392882",
"0.5382206",
"0.5382206",
"0.5377548",
"0.5373096",
"0.53721726",
"0.5368332",
"0.53679043",
"0.5362409",
"0.53597933",
"0.5358802",
"0.5358423",
"0.5356307",
"0.5356307",
"0.5356307",
"0.53554654",
"0.53544265",
"0.5354126",
"0.535266",
"0.53522533",
"0.5352177",
"0.5351466",
"0.5350312",
"0.53346914",
"0.53346705",
"0.533321",
"0.5332513",
"0.53318125",
"0.53312534",
"0.5331247",
"0.5327465"
] | 0.0 | -1 |
Constructor de la clase. | public Chatbot(int seed)
{
// La mercancia es independiente de la personalidad del chatbot.
merchandise = " Escudo Rubi: 1500 flurios \n Espadon Escarlata: 1750 flurios \n Tomo de Combustion Espontanea: 1000 flurios \n Piedra Draconica Celeste: 2500 flurios \n Pocion de recuperacion: 250 flurios.\n Si quieres saber algo acerca de algun articulo solo tienes que preguntarlo.\n";
// Lezalith - Personalidad: Servicial y carismatica.
if ((seed % 2) == 0)
{
name = "Lezalith";
genericGreeting = "Hola aventurero, en que puedo ayudarte?";
morningGreeting = "El sol despunta y tu preparandote para la batalla. Compra algo para que no tengas problemas a lo largo del dia!";
afternoonGreeting = "Buenas tardes aventurero, necesitas equipamiento?";
eveningGreeting = "Buenas noches aventurero; ya estamos por cerrar, pero siempre puedo atender a una persona mas. Que necesitas?";
buyingResponses = new String[2];
buyingResponses[0] = "Conque quieres comprar algo huh? Te mostrare lo que tenemos a disponible:";
buyingResponses[1] = "Excelente, mira estos articulos por favor.";
articlesInfo = new String[5];
articlesInfo[0] = "El Escudo Rubi es un escudo emblematico de nuestro pais. Su leyenda se remonta a los origenes de la ciudad de Flur. No entrare en detalles, pero la leyenda cuenta que un viajero repelio una horda completa de esqueletos y que su escudo permanecio inmaculado tras semejante derroche de valentia.\nEl escudo rubi no esta creado a partir de rubi, contrario a lo que se piensa popularmente, sino de piedra draconica rojiza que se asemeja a los rubies.\nEsta cualidad le permite repeler incluso las llamaradas de algunas criaturas sin que el portador sufra herida alguna.";
articlesInfo[1] = "El Espadon Escarlata que vendemos aqui es una replica muy precisa del espadon descrito en la leyenda de Ruhium, el Sanguinario. Se cuenta que este hombre, de origenes inciertos, llego un dia a Flur con la intencion de arrasarla tal cual un vil bandido.\n Pero basto con ver los hermosos prados que rodean la ciudad, y oir el melodico fluir de los riachuelos cercanos para que se esfumara cualquier pensamiento que no fuese vivir y proteger estos lares.\n Su espadon, una hoja descomunal, que habia adquirido un color escarlata en su hoja por tanta sangre que un dia derramo; se convirtio en un simbolo de quietud y paz mental para nosotros.";
articlesInfo[2] = "El Tomo de Combustion Espontanea es uno de los hechizos basicos que aprenden los estudiantes de la escuela magica de la piromancia. A pesar de ser un hechizo de primerizos, es una herramienta muy util para todo el mundo. Requiere poco poder magico y solo se compone de tres versos, pero su efectividad es aterradora. Consiste en un hechizo capaz de prender en llamas a cualquier objetivo que este en tu campo de vision y en un radio de 15 metros. El objetivo continuara ardiendo hasta que su cuerpo de reduzca a cenizas, pero el fuego se disipara si pierdes al objetivo de vista o si las condiciones ambientales no permitan la combustion.";
articlesInfo[3] = "Los dragones poseen ciertas cualidades especiales que el resto de las especies no. Estas cualidades dependen del dragon, y usualmente puede distinguirseles por el color de las escamas. A medida que los dragones crecen, sus cuerpos producen una cristalizacion de la energia vital que irradia de su cuerpo. Cada cierto tiempo, los dragones expulsan de su cuerpo esta cristalizacion a modo de desecho y es lo que nosotros conocemos por piedra draconica. El color de la piedra coincide con el de las escamas del dragon que sintetizo esa piedra, y la piedra posee las mismas cualidades extraordinarias que este ultimo. En particular, la piedra de dragon celeste es una gema que expulsa un torrente de rayos a voluntad; pero requiere que su portador la cargue con energia magica para desatar su terrible poder.";
articlesInfo[4] = "La vieja y confiable pocion de recuperacion ha sacado de apuros tanto a principiantes como a expertos del mundo de las armas. Esta compuesta de muchos ingredientes regenerativos que apresuran enormemente tu regeneracion natural. ";
buyingArticles = new String[5];
buyingArticles[0] = "Compraras un Escudo Rubi? Muy bien, son 1500 flurios. Tus enemigos flaquearan en voluntad al ver que ninguno de sus ataques lograra atravesar tu defensa.";
buyingArticles[1] = "Iras por el Espadon Escarlata, huh? Buena eleccion, son 1750 flurios. Siento lastima por esas pobres bestias que se atrevan a enfrentarte.";
buyingArticles[2] = "Te convencio el Tomo Magico? El precio es de 1000 flurios. Una ganga, no crees?. Tus enemigos no sabran que los hizo arder en llamas.";
buyingArticles[3] = "Son 2500 flurios por la Piedra Draconica. Una vez que logres cargarla, desataras un cataclismo en el campo de batalla. Recuerda usarla con prudencia.";
buyingArticles[4] = "Son 250 flurios por la Pocion. Hay que ser precavidos, verdad?";
notEnough = "Al parecer no tiene suficiente dinero. Por favor, trate de comprar algo que pueda permitirse con su dinero";
sellingResponse = "Lo siento, en esta tienda no compramos a nuestros clientes. La tienda vecina se arruino un dia que llego un aventurero con 6 millones de huesos de monstruos. El pobre vendedor tuvo que comprarselos todos, y todo por seguir esa ridicula politica.";
rumours = new String[3];
rumours[0] = "La expedicion que salio hace unas semanas en busqueda del dragon maligno no ha vuelto aun. Temo que hayan fracasado en su objetivo.";
rumours[1] = "La caravana que suple mis articulos lleva 4 dias de retraso. Los habran asaltado goblins o algo?.";
rumours[2] = "La ciudad esta muy ajetreada estos dias. Todos temen un asalto nocturno de parte de los dragones anti-pactianos.";
misheard = new String[3];
misheard[0] = "Lo siento, creo que no puedo comprender algunas de las palabras que usas viajero. Podrias reformularme eso que has dicho?";
misheard[1] = "Creo que no he escuchado bien, que has dicho?";
misheard[2] = "Lamento no conocer el lenguaje de un modo tan habil como vos, pero es necesario que te rebajes a mi nivel para que nos entendamos.\nPodrias describir eso con palabras mas cercanas a mi entendimiento?";
farewell = "Buena suerte, en realidad no la necesitas porque te has equipado aqui hahaha.";
}
// Roxane - Personalidad: Agresiva y perezosa.
else
{
name = "Roxane";
genericGreeting = "*suspiro* Hola aventurero, echale el ojo a las existencias y avisame cuando vayas a comprar algo, si?";
morningGreeting = "Buenos dias aventurero. No te sientes somnoliento? Deberias volver a tu cama y dejarme dormir.";
afternoonGreeting = "Buenas tardes, date una vuelta por la tienda y llevate algo, quieres?";
eveningGreeting = "Ya esta oscureciendo. Apresurate en comprar o te dejare dentro.";
buyingResponses = new String[2];
buyingResponses[0] = "Esta bien. Puedes escoger cualquier objeto de entre los que aqui se encuentran: ";
buyingResponses[1] = "Si quieres comprar tendras que conformarte con lo que tenemos. Hay problemas en las rutas comerciales, asi que no hay mucha variedad.";
articlesInfo = new String[5];
articlesInfo[0] = "El Escudo Rubi que aqui vendemos es una replica exacta del legendario escudo de la famosa epica narrada todas las noches en los bares de Flur. El escudo que portaba el defensor de Flur salvaguardo a nuestro heroe de los infinitos golpes de las furibundas hordas de monstruos que azotaban nuestra ciudad.\nNo pienses mal de el por ser una replica. Podria ser mejor que el original, pues posee propiedades magicas que lo vuelven aun mas impenetrable para cualquier ataque que desafie la fortaleza de este escudo.";
articlesInfo[1] = "Ruhium, el Sanguinario, blandio una espada como esta hace decadas. Era un hombre temido por todo el mundo que, enamorado de la belleza de nuestra ciudad y la quietud de sus alrededores, hizo de este lugar su hogar y lo defendio de los muchos invasores que asediaron Flur en esa epoca.\nVer el espadon de Ruhium en batalla, era como ver la hoz de la muerte sesgando las vidas de sus adversarios. Eso no ha cambiado hasta el dia de hoy, pues nuestro Espadon Escarlata no tiene motivos para palidecer ante su modelo: El espadon de Rihium.";
articlesInfo[2] = "Ese tomo es el que estudian los principiantes de la piromancia. Puedes comprarlo si te apetece, pero a tu edad tal vez debas practicarlo en privado. Los estudiantes se reiran de ti si te ven lanzando ese hechizo tan simple. ";
articlesInfo[3] = "Mi hermana explica esto con mayor precision, pero en pocas palabras, esta piedra puede almacenar grandes cantidades de energia magica y liberarla en forma de rayos. Se obtiene a partir de la cristalizacion magica del dragon de escamas celestes.";
articlesInfo[4] = "No hay mucho que explicar, verdad? El nombre lo dice todo. Ultimamente hemos vendido muchas de estas a algunos jovenes. Tal vez pueden generar adiccion...";
buyingArticles = new String[5];
buyingArticles[0] = "Te llevas el Escudo Rubi? Son 1500 flurios a cambio de una defensa inexpugnable. Una ganga, no?";
buyingArticles[1] = "Compraras el Espadon? Bueno, desde hoy no hay enemigo que pueda resistir tu furia. Pobres bestias. Son 1750 flurios";
buyingArticles[2] = "Quieres iniciarte en el mundo de la magia? Una vez que domines los conocimientos arcanos, bastara una palabra de tus labios para que cualquier enemigo caiga a tus pies. Son 1000 flurios, por favor.";
buyingArticles[3] = "Esa piedra de costara 2500 flurios. No se para que la quieres si no pareces poder cargarla de energia magica. Pero bueno, eres libre de desperdiciar tu dinero.";
buyingArticles[4] = "Son 250 flurios por la pocion. Estoy pensando seriamente en subir el precio de estas cosas, dada la alta demanda ultimamente, asi que compra todas las que puedas ahora que estan baratas.";
notEnough = "Sin dinero, no hay objeto; asi de simple. Compra otro objeto o vete.";
sellingResponse = "Quieres llevarnos a la bancarrota? No se en que mundo las tiendas podrian comprar toda la basura que traen los aventureros desde afuera de la ciudad.";
rumours = new String[3];
rumours[0] = "Con el pacto de proteccion mutua entre humanos y dragones roto, ya no hay nada que garantice nuestra seguridad. Es mas, los mismos dragones anti pactianos son una amenaza presente.";
rumours[1] = "Al parecer, los estudiantes de las escuelas magicas ya no pueden salir al bosque a buscar ingredientes para pociones. Ultimamente las bestias abundan fuera de la ciudad.";
rumours[2] = "El explorador en jefe del gremio ha organizado una nueva expedicion hacia el pico sagrado. Dicen que un dragon muy sabio vive alli, y podria ayudarnos a entender porque los dragones han deshecho el pacto de proteccion mutua.";
misheard = new String[3];
misheard[0] = "Que palabras mas raras utilizas, no te he entendido nada.";
misheard[1] = "Crees que podrias decirme eso en palabras normales?";
misheard[2] = "...";
farewell = "Adios, aventurero. Sal en silencio por favor, intentare seguir durmiendo.";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"public CyanSus() {\n\n }",
"public Pasien() {\r\n }",
"public Clade() {}",
"public Chauffeur() {\r\n\t}",
"public AntrianPasien() {\r\n\r\n }",
"public Lanceur() {\n\t}",
"public Curso() {\r\n }",
"public SlanjePoruke() {\n }",
"public PSRelation()\n {\n }",
"public Carrera(){\n }",
"public Cohete() {\n\n\t}",
"public Coche() {\n super();\n }",
"public Pitonyak_09_02() {\r\n }",
"public Alojamiento() {\r\n\t}",
"public CSSTidier() {\n\t}",
"private TMCourse() {\n\t}",
"public Trening() {\n }",
"public Odontologo() {\n }",
"private Instantiation(){}",
"public Libro() {\r\n }",
"public Phl() {\n }",
"public Cgg_jur_anticipo(){}",
"public TTau() {}",
"public Anschrift() {\r\n }",
"public Caso_de_uso () {\n }",
"public Kullanici() {}",
"public prueba()\r\n {\r\n }",
"protected Asignatura()\r\n\t{}",
"public Corso() {\n\n }",
"public Chick() {\n\t}",
"public Rol() {}",
"public Achterbahn() {\n }",
"public Orbiter() {\n }",
"public Classe() {\r\n }",
"public Supercar() {\r\n\t\t\r\n\t}",
"public JSFOla() {\n }",
"public _355() {\n\n }",
"public DetArqueoRunt () {\r\n\r\n }",
"public Livro() {\n\n\t}",
"public Excellon ()\n {}",
"public Aritmetica(){ }",
"public Tbdtokhaihq3() {\n super();\n }",
"public Carrinho() {\n\t\tsuper();\n\t}",
"public Tigre() {\r\n }",
"public EnsembleLettre() {\n\t\t\n\t}",
"public Demo() {\n\t\t\n\t}",
"public SgaexpedbultoImpl()\n {\n }",
"public TebakNusantara()\n {\n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public Mitarbeit() {\r\n }",
"public Tbdcongvan36() {\n super();\n }",
"public TCubico(){}",
"public Vehiculo() {\r\n }",
"public Plato(){\n\t\t\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public Mannschaft() {\n }",
"public Troco() {\n }",
"public Postoj() {}",
"public Aanbieder() {\r\n\t\t}",
"public Propuestas() {}",
"public ExamMB() {\n }",
"public RptPotonganGaji() {\n }",
"public Lotto2(){\n\t\t\n\t}",
"public NhanVien()\n {\n }",
"public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public Catelog() {\n super();\n }",
"public AirAndPollen() {\n\n\t}",
"public Soil()\n\t{\n\n\t}",
"public YonetimliNesne() {\n }",
"public Data() {\n \n }",
"public Nota() {\n }",
"public Exercicio(){\n \n }",
"public Mueble() {\n }",
"public Magazzino() {\r\n }",
"public ChaCha()\n\t{\n\t\tsuper();\n\t}",
"public Aktie() {\n }",
"defaultConstructor(){}",
"private BaseDatos() {\n }",
"public Chant(){}",
"public Data() {\n }",
"public Data() {\n }",
"public Gasto() {\r\n\t}",
"protected Approche() {\n }",
"public OOP_207(){\n\n }",
"public Funcionario() {\r\n\t\t\r\n\t}",
"public Basic() {}",
"public Valvula(){}",
"public Documento() {\n\n\t}",
"public Tarifa() {\n ;\n }",
"public lo() {}",
"public Parameters() {\n\t}",
"public Busca(){\n }",
"public Contato() {\n }",
"private UsineJoueur() {}",
"public Goodsinfo() {\n super();\n }",
"public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }",
"public OVChipkaart() {\n\n }",
"public Manusia() {}",
"public RngObject() {\n\t\t\n\t}"
] | [
"0.84580785",
"0.81139696",
"0.7603627",
"0.76031476",
"0.75563073",
"0.7515485",
"0.74785274",
"0.7436049",
"0.74332494",
"0.74311197",
"0.7430948",
"0.74177736",
"0.7370177",
"0.7365857",
"0.73601496",
"0.73450327",
"0.7335323",
"0.73073775",
"0.72908056",
"0.7259841",
"0.7257748",
"0.7243833",
"0.72344744",
"0.7231109",
"0.722034",
"0.7210602",
"0.7202647",
"0.719993",
"0.7193855",
"0.719301",
"0.7192006",
"0.71909136",
"0.7189283",
"0.7179012",
"0.71655405",
"0.7155643",
"0.71544135",
"0.7149727",
"0.7144198",
"0.71414334",
"0.7140405",
"0.7123694",
"0.7114449",
"0.7111108",
"0.7096381",
"0.7090758",
"0.7087455",
"0.70732546",
"0.7066759",
"0.70656174",
"0.70648134",
"0.70340466",
"0.7018028",
"0.7015307",
"0.6996834",
"0.69958615",
"0.69939303",
"0.6991412",
"0.6984692",
"0.6969748",
"0.69651026",
"0.69508624",
"0.6949569",
"0.694798",
"0.6947178",
"0.6945473",
"0.69304425",
"0.6929997",
"0.6929647",
"0.692958",
"0.6908922",
"0.69049567",
"0.69046646",
"0.6901431",
"0.6901069",
"0.68977046",
"0.6895693",
"0.6892395",
"0.6881771",
"0.6870322",
"0.6868335",
"0.68674976",
"0.68674976",
"0.68665916",
"0.6850802",
"0.6848637",
"0.68481374",
"0.68477064",
"0.6847628",
"0.6842764",
"0.6833532",
"0.68304944",
"0.68302435",
"0.6827183",
"0.68269277",
"0.68268436",
"0.6826527",
"0.6822714",
"0.68224186",
"0.681717",
"0.6816487"
] | 0.0 | -1 |
/ Method is for running ONLY the calculator | public static void main(String[] args) {
BaseCalc calc = new BaseCalc();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void operation(char operator){\n if(initialised == false){\n calc.setNum1(Double.parseDouble(txtBox.getText()));\n operatorPressed = true;\n } else { \n calc.setNum2(Double.parseDouble(txtBox.getText()));\n Decimal();\n calc.setNum1(calc.getAnswer());\n txtBox.setText(Double.toString(calc.getAnswer()));\n }\n \n calc.setOperator(operator);\n\n operatorPressed = true;\n initialised = true;\n \n }",
"public void operation() {\n\t\t\n\t\tswitch(calculation){\n\t\t\tcase 1:\n\t\t\t\ttotal = num + Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\ttotal = num - Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\ttotal = num * Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\ttotal = num / (Double.parseDouble(textField.getText()));\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t}",
"public void control()\n {\n if(this.listOperator.contains(this.operator))\n {\n\n if(this.operator.equals(\"=\")) // If the operator is \"=\"\n {\n // We ask to the model to display the result\n this.calc.getResult();\n }\n else // Else, we give the operator to the model\n {\n this.calc.setOperator(this.operator);\n }\n }\n \n // If the number is ok\n if(this.number.matches(\"^[0-9.]+$\"))\n {\n this.calc.setNumber(this.number);\n }\n\n this.operator = \"\";\n this.number = \"\";\n }",
"public static void main(String[] args) {\n Calculator calc=new Calculator();\r\n double operand1,operand2,result=0;\r\n operand1=calc.getOperand1();\r\n operand2=calc.getOperand2();\r\n String op;\r\n op=calc.getOperator();\r\n try\r\n {\r\n \r\n switch(op)\r\n {\r\n case \"+\": Add add=new Add();\r\n result=add.doOperation(operand1, operand2);\r\n break;\r\n case \"-\": Subract sub=new Subract();\r\n result=sub.doOperation(operand1, operand2);\r\n break;\r\n case \"*\": Multiply mul=new Multiply();\r\n result=mul.doOperation(operand1, operand2);\r\n break;\r\n case \"/\": Division div =new Division();\r\n if(operand2==0)\r\n {\r\n \tthrow new ArithmeticException();\r\n }\r\n result=div.doOperation(operand1, operand2);\r\n break;\r\n default: throw new Exception(\"Invalid operation\");\r\n }\r\n \r\n\t }\r\n catch(ArithmeticException e)\r\n {\r\n \t System.out.println(e);\r\n \t \r\n }\r\n \r\n catch(Exception e)\r\n {\r\n \t System.out.println(e);\r\n \t \r\n } \r\n finally\r\n {\r\n \t System.exit(0);\r\n }\r\n System.out.print(result);\r\n \r\n}",
"public abstract void execute(InputCalc input, Calculator calculator);",
"public void Calculation(){\n if(Symbol.equals(\"+\"))\n {\n AnswerHalf = AnswerHalf + ButtonValue;\n }\n else if(Symbol.equals(\"-\"))\n {\n AnswerHalf = AnswerHalf - ButtonValue;\n }\n else if(Symbol.equals(\"*\"))\n {\n AnswerHalf = AnswerHalf * ButtonValue;\n }\n else if(Symbol.equals(\"/\"))\n {\n AnswerHalf = AnswerHalf/ButtonValue;\n }\n printAnswer = Double.toString(AnswerHalf);\n AfterEqual = 1;\n SymbolMark = 0;\n c = 0;\n AfterAnswer = 0;\n TFCalcBox.setText(printAnswer);\n }",
"public static void main(String[] args){\n\t\tSimpleCalculator calc = new SimpleCalculator();\n\t\tboolean a=true;\n\t\tdouble number = 0.0;\n\t\tString checker = \"\";\n\t\twhile(a){\n\t\t\tSystem.out.println(\"Result: \" + number);\n\t\t\tSystem.out.println(\"Enter an operation or 'q' to end the program.\");\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\ttry{\n\t\t\t\tchecker= scan.next();\n\t\t\t\tif (checker.equals(\"q\")){\n\t\t\t\t\ta=false;\n\t\t\t\t}\n\t\t\t\telse if (!checker.equals(\"+\")&& !checker.equals(\"-\")&& !checker.equals(\"*\") && !checker.equals(\"/\")&&\n\t\t\t\t\t\t!checker.equals(\"%\")){\n\t\t\t\t\tthrow new UnknownOperatorException();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(UnknownOperatorException e){\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\tif(a&&(checker.equals(\"+\")|| checker.equals(\"-\")|| checker.equals(\"*\") || checker.equals(\"/\")||\n\t\t\t\t\tchecker.equals(\"%\"))){\n\t\t\t\ttry{\n\t\t\t\t\tSystem.out.println(\"Please enter a number: \");\n\t\t\t\t\tnumber= scan.nextDouble();\n\t\t\t\t\tif (checker.equals(\"/\")&&(number==0)){\n\t\t\t\t\t\tthrow new ArithmeticException();\n\t\t\t\t\t}\n\t\t\t\t\tcalc.calcSetter(number, checker);\n\t\t\t\t\tnumber =calc.CalcLogic();\n\t\t\t\t}\n\t\t\t\tcatch(InputMismatchException exceptionObj){\n\t\t\t\t\tSystem.out.println(\"That is not a number! Please try again!\");\n\t\t\t\t\tScanner scan2 = new Scanner(System.in);\n\t\t\t\t\tnumber = scan2.nextDouble();\n\t\t\t\t}\n\t\t\t\tcatch(ArithmeticException e){\n\t\t\t\t\tSystem.out.println(\"Cannot divide by zero!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public void actionPerformed(ActionEvent e) {\n if (_startNumber) { // Error: needed number, not operator\n //... In this state we're expecting a number, but got an operator.\n actionClear();\n _display.setText(\"ERROR - No operator\");\n } else {\n //... We're expecting an operator.\n _startNumber = true; // Next thing must be a number\n try {\n // Get value from display field, convert, do prev op\n // If this is the first op, _previousOp will be =.\n String displayText = _display.getText();\n \n if (_previousOp.equals(\"=\")) {\n _logic.setTotal(displayText);\n } else if (_previousOp.equals(\"+\")) {\n _logic.add(displayText);\n } else if (_previousOp.equals(\"-\")) {\n _logic.subtract(displayText);\n } else if (_previousOp.equals(\"*\")) {\n _logic.multiply(displayText);\n } else if (_previousOp.equals(\"/\")) {\n _logic.divide(displayText);\n } else if (_previousOp.equals(\"AND\")) {\n _logic.and(displayText);\n } else if (_previousOp.equals(\"OR\")) {\n _logic.or(displayText);\n } else if (_previousOp.equals(\"XOR\")) {\n _logic.xor(displayText);\n } else if (_previousOp.equals(\"NOR\")) {\n _logic.nor(displayText);\n } else if (_previousOp.equals(\"NAND\")) {\n _logic.nand(displayText);\n }\n \n _display.setText(\"\" + _logic.getTotalString());\n \n } catch (NumberFormatException ex) {\n actionClear();\n _display.setText(\"Error\");\n }\n \n //... set _previousOp for the next operator.\n _previousOp = e.getActionCommand();\n }//endif _startNumber\n }",
"@Override\n public void onClick(View v) {\n if(operator_inserted==true && !curr.substring(curr.length()-1,curr.length()).equals(\" \")){\n\n\n String [] tokens = curr.split(\" \");\n switch(tokens[1].charAt(0)){\n\n case '+':\n res = Double.toString(Double.parseDouble(tokens[0]) + Double.parseDouble(tokens[2]));\n break;\n case '-':\n res = Double.toString(Double.parseDouble(tokens[0]) - Double.parseDouble(tokens[2]));\n break;\n case '/':\n res = Double.toString(Double.parseDouble(tokens[0]) / Double.parseDouble(tokens[2]));\n break;\n case '*':\n res = Double.toString(Double.parseDouble(tokens[0]) * Double.parseDouble(tokens[2]));\n break;\n\n }\n resNum();\n }\n }",
"@Override\n public void onClick(View v) {\n if (expression.equals(\"\")) {\n\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(\"Enter an Expression\");\n return;\n }\n\n /* Clear the operands and operators lists. */\n operands.clear();\n operators.clear();\n /* Temporary holder used to get each operand from the expression. */\n String operand = \"\";\n\n /* Loop through the input expression and get each operator and operand and\n insert them in to the ArrayLists.\n NEEDS UPDATE TO HANDLE NEGATIVE NUMBERS.\n */\n try {\n for (int i = 0; i < expression.length(); i++) {\n\n /* If an operator is found, add the operator and current operand to lists. */\n if (Character.toString(expression.charAt(i)).equals(\"+\") || Character.toString(expression.charAt(i)).equals(\"-\") || Character.toString(expression.charAt(i)).equals(\"*\")) {\n\n operators.add(Character.toString(expression.charAt(i)));\n operands.add(operand);\n operand = \"\";\n } else {\n\n operand += Character.toString(expression.charAt(i));\n }\n }\n } catch(Exception E) {\n\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(\"Invalid Expression Format\");\n answer = \"\";\n expression = \"\";\n operands.clear();\n operators.clear();\n return;\n }\n\n /* Add the operand from the end of the expression. */\n operands.add(operand);\n\n answer = \"\";\n\n /* Get the select radio button (dec, hex, or bin). */\n int selectedRadioButton = calculatorRadioGroup.getCheckedRadioButtonId();\n boolean validFlag = true;\n\n try{\n\n /* Switch on the selected button. */\n switch(selectedRadioButton) {\n\n case R.id.calcDec:\n for (int i = 0; i < operands.size(); i++) {\n\n /* Validate to confirm decimal input is correct. */\n if (Validator.validateDec(operands.get(i)))\n continue;\n else\n validFlag = false;\n }\n\n /* If input is valid, call evaluate function and set answer. */\n if (validFlag)\n answer = evaluate(operators, operands);\n else\n answer = \"Invalid Dec Input\";\n break;\n\n\n case R.id.calcHex:\n\n /* Validate hex input. */\n for (int i = 0; i < operands.size(); i++) {\n\n if (Validator.validateHex(operands.get(i)))\n continue;\n else\n validFlag = false;\n }\n\n if (validFlag) {\n\n /* Call convert to convert the operand list from hex to decimal. */\n convert(\"h\");\n /* Evaluate with the converted operands. */\n answer = evaluate(operators, operands);\n /* Convert answer back to hex. */\n answer = Converter.decToHex(answer).toUpperCase();\n }\n\n else\n answer = \"Invalid Hex Input\";\n\n break;\n\n case R.id.calcBin:\n\n for (int i = 0; i < operands.size(); i++) {\n\n if (Validator.validateBinary(operands.get(i)))\n continue;\n else\n validFlag = false;\n }\n\n if (validFlag) {\n\n /* Call to convert operands to binary. */\n convert(\"b\");\n /* Evaluate with decimal operands. */\n answer = evaluate(operators, operands);\n /* Convert back to decimal. */\n answer = Converter.decToBin(answer).toUpperCase();\n }\n\n else\n answer = \"Invalid Bin Input\";\n\n break;\n }\n } catch(Exception e) {\n\n\n answer = \"Invalid Expression\";\n }\n\n /* Output the answer to the screen. */\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(answer);\n\n answer = \"\";\n expression = \"\";\n operands.clear();\n operators.clear();\n\n }",
"public void calculate() {\n\n InputHelper inputHelper = new InputHelper();\n String firstNumber = inputHelper.getInput(\"Write first number: \");\n String secondNumber = inputHelper.getInput(\"Write second number: \");\n String action = inputHelper.getInput(\"What action you want to do ( + - * /): \");\n\n while (!firstNumber.equals(\"0\") || !secondNumber.equals(\"0\") || !action.equals(\"0\")) {\n try {\n switch (action) {\n case \"+\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) + Double.valueOf(secondNumber)));\n break;\n case \"-\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) - Double.valueOf(secondNumber)));\n break;\n case \"*\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) * Double.valueOf(secondNumber)));\n break;\n case \"/\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) / Double.valueOf(secondNumber)));\n break;\n default:\n System.out.println(\"You've entered a wrong action!\");\n }\n } catch (NumberFormatException e) {\n System.out.println(\"You've entered not a number!\");\n }\n\n firstNumber = inputHelper.getInput(\"Write first number: \");\n secondNumber = inputHelper.getInput(\"Write second number: \");\n action = inputHelper.getInput(\"What action you want to do ( + - * /): \");\n\n }\n }",
"public static void main(String[] args) {\n Scanner scn =new Scanner(System.in);\n boolean b=true;\n while(b)\n {\n \n char ch=scn.next().charAt(0);\n \n if(ch=='+'||ch=='-'||ch=='*'||ch=='/'||ch=='%')\n {\n\t int N1 =scn.nextInt();\n\t int N2 =scn.nextInt();\n\t calculator(ch,N1,N2);\n }\n else if(ch!='X'&&ch=='x')\n\t {System.out.println(\"try again\");}\n else\n\tbreak;\n }\n }",
"@Override\n\tpublic void calcul() {\n\t\tif(this.operateur.equals(\"\"))\n\t\t\tthis.result = Double.parseDouble(this.operande);\n\t\telse {\n\t\t\tif(!this.operande.equals(\"\")) {\n\t\t\t\tif(this.operateur.equals(\"+\")) {\n\t\t\t\t\tthis.result += Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operande.equals(\"-\")) {\n\t\t\t\t\tthis.result -= Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operateur.equals(\"*\"))\n\t\t\t\t\tthis.result *= Double.parseDouble(this.operande); \n\t\t\t\tif(this.operateur.equals(\"/\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tthis.result /= Double.parseDouble(this.operande);\n\t\t\t\t\t}catch(ArithmeticException e){\n\t\t\t\t\t\tthis.result = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.operande = \"\";\n\t\tnotifyObserver(String.valueOf(this.result));\n\t}",
"private void finalCalculation()\n {\n // Variables for computational tasks during this part alone\n double result = 0;\n String stringOperator = \"\";\n String stringValue1 = \"\";\n String stringValue2 = \"\";\n\n try\n {\n // If an operator has previously been assigned, ignore key press\n if(values.size() == 0 || isOperator(values.get(values.size()-1).toString()) || !hasOperator)\n {\n return;\n }\n \n\n // Calculate the total value\n for(Iterator<String> i = values.iterator(); i.hasNext();)\n {\n // Get text\n String item = i.next();\n \n // If it is an operator\n if(isOperator(item))\n {\n // Calculate previous values and add to value1 - then set latest operator\n if(!\"\".equals(stringOperator))\n {\n // Calculate previously stored\n result = calculate(Double.parseDouble(stringValue1), Double.parseDouble(stringValue2), stringOperator);\n stringValue1 = result + \"\"; // Add calculated value as first result\n stringValue2 = \"\";\n }\n stringOperator = item;\n }\n else\n {\n // If no operator has previously been assigned, just append values to first value\n if(\"\".equals(stringOperator))\n {\n // Append values on eachother\n stringValue1 = stringValue1 + item;\n }\n else\n {\n // Operator have been assigned, which means we already have a value1 - add to string value 2 instead\n stringValue2 = stringValue2 + item;\n }\n }\n \n // If this is our last loop, calculate total and add into result\n if(!i.hasNext())\n {\n result = calculate(Double.parseDouble(stringValue1), Double.parseDouble(stringValue2), stringOperator);\n } \n }\n \n // Output results\n textOutput.setText(result + \"\");\n \n // Clear stored values\n values.clear();\n \n // Reset\n reset = true;\n hasOperator = false;\n \n }\n catch(Exception ex)\n {\n // Output results\n textOutput.setText(0 + \"\");\n \n // Clear stored values\n values.clear();\n \n // Reset\n reset = true;\n hasOperator = false;\n } \n }",
"public void arithmeticAddition(Operator operatorType, Operator clickedOperator) {\n switch (operatorType) {\n case ADDITION, SUBTRACT -> {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n case MULTIPLY, DIVIDE -> {\n if (numberStored[1] != 0) {\n double subResult = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n operatorAssigned = Operator.NON;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n case POW -> {\n double exp = Double.parseDouble(mainLabel.getText());\n double result = Math.pow(numberStored[2], exp);\n numberStored[2] = 0;\n\n if (numberStored[1] != 0) {\n // This code below should be finalized.\n double subResult = basicCalculation(numberStored[1], result, operatorBfPow);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n operatorAssigned = Operator.NON;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], result, operatorBfPow);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n operatorBfPow = Operator.NON;\n }\n default -> numberStored[0] = Double.parseDouble(mainLabel.getText());\n }\n }",
"public void actionPerformed (ActionEvent ae){\n \n //displays the digit pressed and sets value needed to modify operand\n if (ae.getActionCommand().equals(\"1\")){\n addDigit(1);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"2\")){\n addDigit(2);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"3\")){\n addDigit(3);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"4\")){\n addDigit(4);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"5\")){\n addDigit(5);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"6\")){\n addDigit(6);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"7\")){\n addDigit(7);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"8\")){\n addDigit(8);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"9\")){\n addDigit(9);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"0\")){\n addDigit(0);\n clearFlag = false;\n }\n \n //Handles if the user selects an operation:\n //Set the right operand to be modified next, selects operation,\n //sets display to be cleared, adds a tooltip to the display\n if (ae.getActionCommand().equals(\"+\")){\n isLeft = false;\n operation = 0;\n clearFlag = true;\n output.setToolTipText(left + \" +\");\n }\n else if (ae.getActionCommand().equals(\"-\")){\n isLeft = false;\n operation = 1;\n clearFlag = true;\n output.setToolTipText(left + \" -\");\n }\n else if (ae.getActionCommand().equals(\"*\")){\n isLeft = false;\n operation = 2;\n clearFlag = true;\n output.setToolTipText(left + \" *\");\n }\n else if (ae.getActionCommand().equals(\"/\")){\n isLeft = false;\n operation = 3;\n clearFlag = true;\n output.setToolTipText(left + \" /\");\n }\n \n //When \"C\" is pressed the display is cleared and operands are set to zero\n if (ae.getActionCommand().equals(\"C\")){\n //Checks if the control key is pressed and cycles through displays\n if ((ae.getModifiers() & ActionEvent.CTRL_MASK) == ActionEvent.CTRL_MASK){\n count ++;\n switch (count % 3){\n case 1:\n dispContents = output.getText();\n output.setText(\"(c) 2011 Alex Mendez\"); break;\n case 2:\n output.setText(\"version 0.1\"); break;\n case 0:\n output.setText(dispContents);\n dispContents = \"\"; break;\n }\n }\n else{\n left = 0;\n right = 0;\n isLeft = true;\n operation = 99;\n clearFlag = true;\n output.setText(\"0\");\n }\n }\n \n //Calls \"Calculate\" method if \"=\" key is pressed, prepares calculator for another operation\n if (ae.getActionCommand().equals(\"=\")){\n left = calculate(left, right, operation);\n right = 0;\n isLeft = false;\n operation = 99;\n output.setText(\"\" + left);\n output.setToolTipText(\"\" + left);\n }\n }",
"private void calculate() {\n\t\tif (!parseText()) {\n\t\t\t// TODO : error handling\n\t\t}\n\t\tswitch(operator) {\n\t\t\tcase 0: // addition\n\t\t\t\tans = num1 + num2;\n\t\t\t\tbreak;\n\t\t\tcase 1: // subtraction\n\t\t\t\tans = num1 - num2;\n\t\t\t\tbreak;\n\t\t\tcase 2: // multiplication\n\t\t\t\tans = num1 * num2;\n\t\t\t\tbreak;\n\t\t\tcase 3: // division\n\t\t\t\tif (num2 != 0)\n\t\t\t\t\tans = num1 / num2;\n\t\t\t\telse\n\t\t\t\t\tans = 0;\n\t\t\t\tbreak;\n\t\t\tcase 4: // MOD\n\t\t\t\tans = (int)num1%(int)num2;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tdisplayText.setText(String.valueOf(ans));\n\t\toperator = -1;\n\t\tans = 0;\n\t\tnum1 = 0;\n\t\tnum2 = 0;\n\t}",
"@Override\r\n public void onClick(View v) {\r\n if(!firstValue.isEmpty() &&\r\n !operand.isEmpty() &&\r\n !etDisplay.getText().toString().isEmpty()) {\r\n if( calc(firstValue, operand, etDisplay.getText().toString() )){\r\n etDisplay.setText(result);\r\n tvFirst.setText(\"\");\r\n firstValue = \"\";\r\n operand = \"\";\r\n }\r\n }\r\n }",
"public Calculator() {\n initComponents();\n setResizable(false);\n \n NumListener numListener = new Calculator.NumListener();\n numButton0.addActionListener(numListener);\n numButton1.addActionListener(numListener);\n numButton2.addActionListener(numListener);\n numButton3.addActionListener(numListener);\n numButton4.addActionListener(numListener);\n numButton5.addActionListener(numListener);\n numButton6.addActionListener(numListener);\n numButton7.addActionListener(numListener);\n numButton8.addActionListener(numListener);\n numButton9.addActionListener(numListener);\n pointButton.addActionListener(numListener);\n \n OpListener opListener = new Calculator.OpListener();\n plusButton.addActionListener(opListener);\n minButton.addActionListener(opListener);\n multButton.addActionListener(opListener);\n divButton.addActionListener(opListener);\n sqrtButton.addActionListener(opListener);\n eqButton.addActionListener(opListener);\n signButton.addActionListener(opListener);\n \n ClearListener clearListener = new ClearListener();\n cButton.addActionListener(clearListener);\n ceButton.addActionListener(clearListener);\n }",
"public Calculator()\r\n {\r\n //Creating Choice group list\r\n options = new ChoiceGroup(\"Main Form\",Choice.EXCLUSIVE);\r\n options.append(\"ADDITION\",null);\r\n options.append(\"SUBTRACTION\",null);\r\n options.append(\"MULTIPLICATION\",null);\r\n options.append(\"DIVISION\",null);\r\n \r\n display = Display.getDisplay(this);\r\n \r\n //Creating Forms\r\n main = new Form(\"MAIN FORM\");\r\n ChoiceGroupAppend=main.append(options);\r\n operation = new Form(\"OPERATION\");\r\n \r\n //Initializing different command buttons \r\n exit = new Command(\"EXIT\",Command.EXIT,0);\r\n select = new Command(\"SELECT\",Command.OK,0);\r\n back = new Command(\"BACK\",Command.BACK,0);\r\n result = new Command(\"RESULT\",Command.OK,0);\r\n clear = new Command(\"CLEAR\",Command.OK,0);\r\n //Adding command buttons to different forms\r\n main.addCommand(exit);\r\n main.addCommand(select);\r\n operation.addCommand(result);\r\n operation.addCommand(back);\r\n operation.addCommand(clear);\r\n main.setCommandListener(this);\r\n operation.setCommandListener(this);\r\n \r\n display.setCurrent(main);\r\n }",
"private void calculate () {\n try {\n char[] expression = expressionView.getText().toString().trim().toCharArray();\n String temp = expressionView.getText().toString().trim();\n for (int i = 0; i < expression.length; i++) {\n if (expression[i] == '\\u00D7')\n expression[i] = '*';\n if (expression[i] == '\\u00f7')\n expression[i] = '/';\n if (expression[i] == '√')\n expression[i] = '²';\n }\n if (expression.length > 0) {\n Balan balan = new Balan();\n double realResult = balan.valueMath(String.copyValueOf(expression));\n int naturalResult;\n String finalResult;\n if (realResult % 1 == 0) {\n naturalResult = (int) Math.round(realResult);\n finalResult = String.valueOf(naturalResult);\n } else\n finalResult = String.valueOf(realResult);\n String error = balan.getError();\n // check error\n if (error != null) {\n mIsError = true;\n resultView.setText(error);\n if (error == \"Error div 0\")\n resultView.setText(\"Math Error\");\n } else { // show result\n expressionView.setText(temp);\n resultView.setText(finalResult);\n }\n }\n } catch (Exception e) {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }",
"private double operation(char operand, double num1, double num2){\r\n\t\t\tdouble result;\r\n\t\t\tCalculatorImpl ci = new CalculatorImpl();\r\n\t\t\tswitch(operand){\r\n\t\t\tcase PLUS : result = ci.getAddition(num1, num2);break;\r\n\t\t\tcase MINUS : result = ci.getSubtraction(num1, num2);break;\r\n\t\t\tcase MULTI : result = ci.getMultification(num1, num2);break;\r\n\t\t\tcase DIVIDE : result = ci.getDivision(num1, num2);break;\r\n\t\t\tdefault : result=0.0;break;\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}",
"@Override\npublic void actionPerformed(ActionEvent ae) {\nObject obj = ae.getSource(); \n\nif(obj == myCalcView.getJbt_one()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"1\"); \n}else if(obj == myCalcView.getJbt_two()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"2\"); \n}else if(obj == myCalcView.getJbt_plus()){ \n v1 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1 : \"+v1); \n op = \"+\"; \n myCalcView.getJtf_result().setText(\"\"); \n}else if(obj == myCalcView.getJbt_equals()){ \n v2 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1:\"+v1 +\"-> v2 : \"+v2+\" op : \"+op); \n String result = calcurate(v1,v2,op); \n myCalcView.getJtf_result().setText(result); \n}else if(obj == myCalcView.getJbt_clear()){ \n myCalcView.getJtf_result().setText(\"\"); \n} \n}",
"public Calculator() {\r\n\t\tthis.operator = new Addition();\r\n\t}",
"@FXML\n private void handleBtnOperators(ActionEvent event) {\n if (testForNewNumber) {\n testForNewNumber = false;\n }\n //TODO DONE erst null-prüfen, dann Inhalt\n //TODO DONE nach Fehlermeldung muss weitergerechnet werden können (9/0 -> Fehlermeldung)\n try {\n if ((txtFldDisplay.getText() != null) && (txtFldDisplay.getText() != \" \")) {\n if (myResult.getOperator() != null && myResult.getOperator() != \"=\") {\n myResult.setNumber2(Double.valueOf(txtFldDisplay.getText()));\n\n myResult.setNumber1(myResult.operateNumbers());\n myResult.setNumber2(0.0);\n } //TODO DONE nur spezielle Exception abfangen\n else {\n myResult.setNumber1(Double.valueOf(txtFldDisplay.getText()));\n }\n }\n\n myResult.setOperator(((Button) event.getSource()).getText());\n txtFldDisplay.setText(\" \");\n } catch (ArithmeticException e) {\n txtFldDisplay.setText(\"ArithmeticException: \" + e);\n myResult.setNumber1(0.0);\n myResult.setNumber2(0.0);\n testForNewNumber = true;\n myResult.setOperator(\"=\");\n\n }\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( input_symbol == '+' || input_symbol == '-' || input_symbol == '*' || input_symbol == '/'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// get result(String)\n\t\t\t\t\t\t\t\tget_result = txt_showresult.getText();\n\t\t\t\t\t\t\t\tresult = Double.parseDouble(get_result);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcalculate_equal();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public static void operations() {\n System.out.println(\"Enter two numbers\");\n double a = getNumber();\n double b = getNumber();\n\n System.out.println(\"Enter operations (as one string)\");\n String input = scanner.nextLine();\n\n if (input.contains(\"+\")) {\n System.out.println(\"Sum: \" + sum(a, b));\n }\n if (input.contains(\"-\")) {\n System.out.println(\"Difference: \" + diff(a, b));\n }\n if (input.contains(\"*\")) {\n System.out.println(\"Product: \" + multi(a, b));\n }\n if (input.contains(\"/\")) {\n System.out.println(\"Fraction: \" + div(a, b));\n }\n }",
"public void actionPerformed(ActionEvent e) {\n if (e.getSource() == btn1) {\n display.setText(display.getText() + \"1\");\n } else if (e.getSource() == btn2) {\n display.setText(display.getText() + \"2\");\n } else if (e.getSource() == btn3) {\n display.setText(display.getText() + \"3\");\n } else if (e.getSource() == btnPlus) {\n display.setText(display.getText() + \"+\");\n } else if (e.getSource() == btn4) {\n display.setText(display.getText() + \"4\");\n } else if (e.getSource() == btn5) {\n display.setText(display.getText() + \"5\");\n } else if (e.getSource() == btn6) {\n display.setText(display.getText() + \"6\");\n } else if (e.getSource() == btnMinus) {\n display.setText(display.getText() + \"-\");\n } else if (e.getSource() == btn7) {\n display.setText(display.getText() + \"7\");\n } else if (e.getSource() == btn8) {\n display.setText(display.getText() + \"8\");\n } else if (e.getSource() == btn9) {\n display.setText(display.getText() + \"9\");\n } else if (e.getSource() == btnMultiply) {\n display.setText(display.getText() + \"*\");\n } else if (e.getSource() == btn0) {\n display.setText(display.getText() + \"0\");\n } else if (e.getSource() == btnDivide) {\n display.setText(display.getText() + \"/\");\n } else if (e.getSource() == btnEqual) {\n String input = display.getText();\n String output = \"\";\n try {\n output = performCalculation(input);\n } catch (Exception ex) {\n output = \"ERROR\";\n }\n display.setText(output);\n } else if (e.getSource() == btnClear) {\n display.setText(\"\");\n }\n }",
"private void subOperands() {\n\n\t\tif (text_Operand3.getText().isEmpty()) {\n\t\t\ttext_Operand3.setText(\"5\");\n\t\t}\n\t\tif (text_Operand4.getText().isEmpty()) {\n\t\t\ttext_Operand4.setText(\"5\");\n\t\t}\n\n\t\t/*\n\t\t * It will pass the value to the bussiness logic so trhat the further logics can\n\t\t * be performed on them.\n\t\t */\n\n\t\tif (conversionIsRequired(comboBox1.getSelectionModel().getSelectedItem(),\n\t\t\t\tcomboBox2.getSelectionModel().getSelectedItem())) {\n\t\t\tdouble op1 = Double.parseDouble(text_Operand1.getText());\n\t\t\tdouble op1et = Double.parseDouble(text_Operand3.getText());\n\t\t\tperform.setOperand1(String.valueOf(op1 * theFactor));\n\t\t\tperform.setOperand3(String.valueOf(op1et * theFactor));\n\t\t} else {\n\t\t\tAlert a = new Alert(AlertType.WARNING);\n\t\t\ta.setContentText(\"Subtraction Not Possible\");\n\t\t\ta.show();\n\t\t\treturn;\n\t\t}\n\t\tcomboBoxRes.getSelectionModel().select(comboBox2.getSelectionModel().getSelectedItem());\n\t\t// Check to see if both operands are defined and valid\n\t\tif (binaryOperandIssues()) // If there are issues with the operands, return\n\t\t\treturn; // without doing the computation\n\n\t\t// If the operands are defined and valid, request the business logic method to\n\t\t// do the Subtraction and return the\n\t\t// result as a String. If there is a problem with the actual computation, an\n\t\t// empty string is returned\n\t\tString theAnswer = perform.subtraction(); // Call the business logic Subtract method\n\t\tlabel_errResult.setText(\"\"); // Reset any result error messages from before\n\t\tString theAnswer1 = perform.subtraction1(); // Call the business logic Subtract method\n\t\tlabel_errResulterr.setText(\"\"); // Reset any result error messages from before\n\t\tif (theAnswer.length() > 0 || theAnswer1.length() > 0) { // Check the returned String to see if it is okay\n\t\t\ttext_Result.setText(theAnswer); // If okay, display it in the result field and\n\t\t\tlabel_Result.setText(\"Difference\"); // change the title of the field to \"Subtraction\".\n\t\t\ttext_Resulterr.setText(theAnswer1); // If okay, display it in the result field\n\t\t\tlabel_Result.setLayoutX(60);\n\t\t\tlabel_Result.setLayoutY(345);\n\t\t} else { // Some error occurred while doing the Subtraction.\n\t\t\ttext_Result.setText(\"\"); // Do not display a result if there is an error.\n\t\t\tlabel_Result.setText(\"Result\"); // Reset the result label if there is an error.\n\t\t\tlabel_errResult.setText(perform.getResultErrorMessage()); // Display the error message.\n\t\t\ttext_Resulterr.setText(\"\"); // Do not display a result if there is an error.\n\t\t\tlabel_errResulterr.setText(perform.getResulterrErrorMessage()); // Display the error message.\n\t\t}\n\n\t}",
"public static int calculator(int num1, int num2, String operator) {\n\n int result = 0;\n if (operator.equals(\"+\")) {\n result = num1 + num2;\n\n } else if (operator.equals(\"-\")) {\n result = num1 - num2;\n\n } else if (operator.equals(\"/\")) {\n if (num1 != 0 && num2 == 0) {\n System.out.println(\"the operation is not possible because one number if zero\");\n throw new IllegalArgumentException(\"error: you tried to divide by 0\");\n }\n result = num1 / num2;\n\n } else if (operator.equals(\"*\")) {\n result = num1 * num2;\n\n } else {\n throw new IllegalArgumentException(\"error: unknown operator: \" + operator);\n }\n\n return result;\n }",
"public Calculator() {\r\n\t\tsuper();\r\n\t}",
"@Test\n\t@Category (WrongPlace.class)\n\t// long running test in the unit test section\n\tpublic void orderOfOperations() {\n\t\tCalculator c = new Calculator();\n\t\tc.press(\"1\");\n\t\tc.press(\"+\");\n\t\tc.press(\"2\");\n\t\tc.press(\"*\");\n\t\tc.press(\"4\");\n\t\tc.press(\"=\");\n\t\tString result = c.getDisplay();\n\t\tassertEquals(result, \"9\");\n\t}",
"private void addOperands() {\n\n\t\tif (text_Operand3.getText().isEmpty()) {\n\t\t\ttext_Operand3.setText(\"5\");\n\t\t}\n\t\tif (text_Operand4.getText().isEmpty()) {\n\t\t\ttext_Operand4.setText(\"5\");\n\t\t}\n\n\t\t/*\n\t\t * It will pass the value to the bussiness logic so trhat the further logics can\n\t\t * be performed on them.\n\t\t */\n\n\t\tif (conversionIsRequired(comboBox1.getSelectionModel().getSelectedItem(),\n\t\t\t\tcomboBox2.getSelectionModel().getSelectedItem())) {\n\t\t\tdouble op1 = Double.parseDouble(text_Operand1.getText());\n\t\t\tdouble op1et = Double.parseDouble(text_Operand3.getText());\n\t\t\tperform.setOperand1(String.valueOf(op1 * theFactor));\n\t\t\tperform.setOperand3(String.valueOf(op1et * theFactor));\n\t\t} else {\n\t\t\tAlert a = new Alert(AlertType.WARNING);\n\t\t\ta.setContentText(\"Addition Not Possible\");\n\t\t\ta.show();\n\t\t\treturn;\n\t\t}\n\n\t\tcomboBoxRes.getSelectionModel().select(comboBox2.getSelectionModel().getSelectedItem());\n\t\t// Check to see if both operands are defined and valid\n\t\tif (binaryOperandIssues()) // If there are issues with the operands, return\n\t\t\treturn; // without doing the computation\n\n\t\t// If the operands are defined and valid, request the business logic method to\n\t\t// do the addition and return the\n\t\t// result as a String. If there is a problem with the actual computation, an\n\t\t// empty string is returned\n\t\tString theAnswer = perform.addition(); // Call the business logic add method\n\t\tlabel_errResult.setText(\"\"); // Reset any result error messages from before\n\t\tString theAnswer1 = perform.addition1(); // Call the business logic add method\n\t\tlabel_errResulterr.setText(\"\"); // Reset any result error messages from before\n\t\tif (theAnswer.length() > 0 || theAnswer1.length() > 0) { // Check the returned String to see if it is okay\n\t\t\ttext_Result.setText(theAnswer); // If okay, display it in the result field and\n\t\t\tlabel_Result.setText(\"Sum\"); // change the title of the field to \"Sum\".\n\t\t\ttext_Resulterr.setText(theAnswer1); // If okay, display it in the result field.\n\t\t\tlabel_Result.setLayoutX(100);\n\t\t\tlabel_Result.setLayoutY(345);\n\t\t} else { // Some error occurred while doing the addition.\n\t\t\ttext_Result.setText(\"\"); // Do not display a result if there is an error.\n\t\t\tlabel_Result.setText(\"Result\"); // Reset the result label if there is an error.\n\t\t\tlabel_errResult.setText(perform.getResultErrorMessage()); // Display the error message.\n\t\t\ttext_Resulterr.setText(\"\"); // Do not display a result if there is an error.\n\t\t\tlabel_errResulterr.setText(perform.getResulterrErrorMessage()); // Display the error message.\n\t\t}\n\t}",
"public void OnOperatorButtonClick (View v) {\n try {\n Button b = (Button) v;\n if (!mIsCalculating) {\n expressionView.setText(resultView.getText().toString() + \" \" + b.getText());\n mIsTyping = false;\n mIsCalculating = true;\n } else if (mIsTyping) {\n expressionView.setText(expressionView.getText() + \" \" + resultView.getText());\n calculate();\n expressionView.setText(expressionView.getText() + \" \" + b.getText());\n mIsTyping = false;\n }\n } catch (Exception e) {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }",
"public Calculator () {\n\t\ttotal = 0; // not needed - included for clarity\n\t\thistory = \"0\";\n\t}",
"public void arithmeticMultiplication(Operator operatorType, Operator clickedOperator) {\n switch (operatorType) {\n case ADDITION, SUBTRACT -> {\n if (numberStored[1] == 0) {\n operatorAssigned = operatorType;\n numberStored[1] = Double.parseDouble(mainLabel.getText());\n } else {\n //numberStored[1] = numberStored[1] / Double.parseDouble(mainLabel.getText());\n numberStored[1] = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), clickedOperator);\n mainLabel.setText(Double.toString(hasNegSign(numberStored[1])));\n }\n }\n case MULTIPLY, DIVIDE -> {\n if (numberStored[1] != 0) {\n //numberStored[1] = numberStored[1] / Double.parseDouble(mainLabel.getText());\n numberStored[1] = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[1]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n case POW -> {\n double exp = Double.parseDouble(mainLabel.getText());\n double result = Math.pow(numberStored[2], exp);\n numberStored[2] = 0;\n\n if (numberStored[1] != 0) {\n numberStored[1] = basicCalculation(numberStored[1], result, operatorBfPow);\n mainLabel.setText(Double.toString(numberStored[1]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], result, operatorBfPow);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n operatorBfPow = Operator.NON;\n }\n default -> numberStored[0] = Double.parseDouble(mainLabel.getText());\n }\n }",
"public static void main(String[] args) {\n\n System.out.println(\"------------------------------------\");\n //making a simple console calculator\n Scanner sc = new Scanner(System.in);\n double x, y;\n double result = 0;\n\n System.out.println(\"1. Addition\");\n System.out.println(\"2. Subtraction\");\n System.out.println(\"3. Multiplying\");\n System.out.println(\"4. Division\"); //HW\n System.out.print(\"Enter the operation: \");\n int operation = sc.nextInt();\n\n System.out.print(\"Enter first number: \");\n x = sc.nextInt();\n System.out.print(\"Enter second number: \");\n y = sc.nextInt();\n\n //simple\n if (operation == 1) {\n result = x + y;\n } else if (operation == 2) {\n result = x - y;\n } else if (operation == 3) {\n result = x * y;\n } else if (operation == 4 && y != 0) {\n result = x / y;\n } else {\n System.out.println(\"Wrong operation!\");\n }\n \n System.out.println(\"Result: \" + result);\n }",
"public void CalcMethod1(String S){\n if(AfterEqual == 1)\n {\n //After Pressing the equal button when pressed action button...\n AnswerHalf = AnswerHalf;\n }\n //After Pressing the number button when pressed action button...\n else\n {\n String ButtonNo = Save1[0];\n for(int n = 1;n<c;n++){\n ButtonNo = ButtonNo + Save1[n];\n }\n ButtonValue = Double.parseDouble(ButtonNo);\n if(SymbolMark>0)\n {\n if(Symbol.equals(\"+\"))\n {\n AnswerHalf = AnswerHalf + ButtonValue;\n }\n else if(Symbol.equals(\"-\"))\n {\n AnswerHalf = AnswerHalf - ButtonValue;\n }\n else if(Symbol.equals(\"*\"))\n {\n AnswerHalf = AnswerHalf * ButtonValue;\n }\n else if(Symbol.equals(\"/\"))\n {\n AnswerHalf = AnswerHalf / ButtonValue;\n }\n }\n else\n {\n AnswerHalf = ButtonValue;\n }\n }\n SymbolMark++;\n Symbol = S;\n c = 0;\n }",
"public boolean formResult()\r\n {\r\n if (operator.equals(\"+\") && validOperands())\r\n {\r\n add();\r\n }\r\n else if (operator.equals(\"-\") && validOperands())\r\n {\r\n subtract();\r\n }\r\n else if (operator.equals(\"\\u00D7\") && validOperands())\r\n {\r\n multiply();\r\n }\r\n else if (operator.equals(\"\\u00F7\") && validOperands())\r\n {\r\n String[] test = rightOperand.split(\"\\\\+|-\");\r\n \r\n if (test[0].equals(\"0\")) {\r\n clear();\r\n return false;\r\n }\r\n divide();\r\n }\r\n return true;\r\n }",
"public int operation(int number1,int number2,String operator)",
"public static void main(String[] args) {\n\n Scanner tc = new Scanner(System.in);\n\n double a, b, c = 0;\n String soma = \"+\";\n String subtração = \"-\";\n String multiplicação = \"*\";\n String divisão = \"/\";\n String potência = \"^\";\n String raiz = \"~\";\n String operação = \"\";\n System.out.println(\"Qual operação deseja fazer ?\");\n operação = tc.nextLine();\n System.out.println(\"insira um numero ó mortal\");\n a = tc.nextDouble();\n System.out.println(\"insira um numero ó mortal\");\n b = tc.nextDouble();\n ;\n if (operação == null ? soma == null : operação.equals(soma)) {\n c = a + b;\n System.out.println(\"o resultado é \" + c);\n } else if (operação == null ? subtração == null : operação.equals(subtração)) {\n c = a - b;\n System.out.println(\"o resultado é \" + c);\n } else if (operação == null ? multiplicação == null : operação.equals(multiplicação)) {\n c = a * b;\n System.out.println(\"o resultado é \" + c);\n }\n else \n c = a/b;\n \n System.out.println(\"o resultado é \" + c);\n }",
"public void tinhtoan() {\n\t\t/*so1= Double.parseDouble(txtInput.getText().toString());\n\t\tcurResult=\"\";*/\n\t\ttry {\n\t\t\t\n\t\t\tDouble inNum = Double.parseDouble(simple.ThayDoi_Phay(curResult));\n\t\t\tcurResult = \"0\";\n\t\t\tif (pheptoan == ' ') {\n\t\t\t\tresult = inNum; //nhan gia tri vao result\n\t\t\t} else if (pheptoan == '+') {\n\t\t\t\tresult += inNum;\n\t\t\t\t//tinhtoan();\n\t\t\t\t//pheptoan = '+';\n\t\t\t\t//curResult=\"\";\n\t\t\t} else if (pheptoan == '-') {\n\t\t\t\t\n\t\t\t\tresult -= inNum;\n\n\t\t\t} else if (pheptoan == '*') {\n\t\t\t\tresult *= inNum;\n\n\t\t\t} else if (pheptoan == '/') {\n\t\t\t\tif(result==0){\n\n\t\t\t\t}else{\n\t\t\t\t\tresult /= inNum;\n\t\t\t\t}\n\t\t\t} else if (pheptoan == '=') {\n\t\t\t//\tToast.makeText(this.getContext(), \"Press C to continue...\", Toast.LENGTH_SHORT).show();\n\t\t\t\t// Keep the result for the next operation\\\n\t\t\t}\n\t\t\ttxtInput.setText(simple.LamTronSoFloat(result));\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"TAG\",\"Loi o Calculator.class->tinhtoan\" + e.getMessage());\n\t\t}\n\t\t\n\n\t}",
"private static void executeProgram() throws IllegalArgumentException {\n\t\twhile(true) {\n\t\t\tcalculateRoot();\n\t\t\tsc = new Scanner(System.in);\n\t\t\tSystem.out.print(\"Do you want to enter another equation? :\");\n\t\t\tString answer = sc.next();\n\t\t\tif(answer.equalsIgnoreCase(\"no\")) {\n\t\t\t\tSystem.out.println(\"Good bye!!!\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t\thistory = \"\" + 0;\r\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\t\t\t\tdflt=0;\r\n\r\n\t\t\t\toperator='*';\r\n\t\t\t\ttf2.setText(\"X\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tansStri=\"\"+ans;\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='+';\r\n\t\t\t\ttf2.setText(\"+\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}",
"public void operator() {\n while (keepOperational) {\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"\\nInput:\\n\");\n String input = scanner.nextLine();\n\n /** delegate the input - all for enabling unit testing */\n operate(input);\n }\n }",
"private static String evaluate(ArrayList<String> operators, ArrayList<String> operands) {\n\n /* Check for valid input. There should be one more operand than operator. */\n if (operands.size() != operators.size()+1)\n return \"Invalid Input\";\n\n String current;\n int value;\n int numMultiply = 0;\n int numAdd = 0;\n int currentOperator = 0;\n\n /* Get the number of multiplications in the operators list. */\n for (int i = 0; i < operators.size(); i++) {\n\n if (operators.get(i).equals(\"*\"))\n numMultiply++;\n }\n\n /* Get the number of addition and subtraction in the operators list. */\n for (int i = 0; i < operators.size(); i++) {\n\n if (operators.get(i).equals(\"-\") || operators.get(i).equals(\"+\"))\n numAdd++;\n }\n\n /* Evaluate multiplications first, from left to right. */\n while (numMultiply > 0){\n\n current = operators.get(currentOperator);\n if (current.equals(\"*\")) {\n\n /* When multiplication is found in the operators, get the associative operands from the operands list.\n Associative operands are found in the operands list at indexes current operator and current operator + 1.\n */\n value = Integer.parseInt(operands.get(currentOperator)) * Integer.parseInt(operands.get(currentOperator+1));\n\n /* Remove the operands and the operator since they have been evaluated and add the evaluated answer back in the operands. */\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n\n numMultiply--;\n }\n else\n currentOperator++;\n }\n\n currentOperator = 0;\n\n /* Next evaluate the addition and subtraction, from left to right. */\n while (numAdd > 0){\n current = operators.get(currentOperator);\n if (current.equals(\"+\")) {\n\n value = Integer.parseInt(operands.get(currentOperator)) + Integer.parseInt(operands.get(currentOperator+1));\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n numAdd--;\n }\n\n else if (current.equals(\"-\")) {\n\n value = Integer.parseInt(operands.get(currentOperator)) - Integer.parseInt(operands.get(currentOperator+1));\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n numAdd--;\n }\n else\n currentOperator++;\n }\n\n /* When all the operations have been evaluated, the final answer will be in the first element of the operands list. */\n return operands.get(0);\n }",
"public static void main(String[] args) {\n\t\tScanner num= new Scanner(System.in);\n\t\tSystem.out.println(\"Enter Your First Number=\");\n\t\tint a =num.nextInt();\n\t\t\n//\t\tSystem.out.println(\"Yoour Number is =\"+a);\n\t\tSystem.out.println(\"Enter Your Second Number=\");\n\t\tint b =num.nextInt();\n\t\tSystem.out.println(\"Enter Your Operation=\");\n\t\tnum.nextLine();\n\t\tchar operation=num.nextLine().charAt(0);\n\t\tint result=0;\n\t\t\n\t\tswitch(operation) {\n\t\tcase '+':\n\t\t\tresult =a+b;\n\t\t\tbreak;\n\t\tcase '-':\n\t\t\tresult =a-b;\n\t\t\tbreak;\n\t\tcase '*':\n\t\t\tresult =a*b;\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tresult =a/b;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Enter Value Are Invalid\");\n\t\t}\n\t\tSystem.out.println(\"Answer For Your Operation \"+ result);\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t}",
"public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t}",
"public static void main(String[] args) {\n while (true) {\n System.out.println(\"1. Normal Calculator\");\n System.out.println(\"2. BMI Calculator\");\n System.out.println(\"3. Exit\");\n System.out.print(\"Enter your choice: \");\n int choice = CheckInput.checkInputIntLimit(1, 3);\n\n switch (choice) {\n case 1:\n NomalCal nc = new NomalCal();\n double memory = 0,\n number;\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.addCal(number);\n while (true) {\n\n System.out.print(\"Enter operator: \");\n String operator = CheckInputOperator.checkInputOperator();\n\n if (operator.equalsIgnoreCase(\"+\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.addCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"-\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.subCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"*\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.mulCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"/\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.divCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"^\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.powCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"=\")) {\n System.out.println(\"Result: \" + memory);\n return;\n }\n }\n case 2:\n IBMCal.BMICalculator();\n break;\n case 3:\n return;\n }\n }\n\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Welcome to the calculator. What operation would you like to do?(+,-,*,/)\");\n\t\tString answer = input.next();\n\t\t\n\t\tif (answer.equals(\"add\") || answer.equals(\"Add\") || answer.equals(\"+\")) \n\t\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to add?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat add1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number you want to add\");\n\t\t\t\tfloat add2 = input.nextFloat();\n\t\t\t\t\n\t\t\t\tfloat addanswer = add1 + add2;\n\t\t\t\tSystem.out.println(addanswer);\n\t\t\t\t}\n\t\telse if(answer.equals(\"minus\") || answer.equals(\"-\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to subtract?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat sub1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number\");\n\t\t\t\tfloat sub2 = input.nextFloat();\n\t\t\t\t\t\n\t\t\t\tfloat subanswer = sub1 - sub2;\n\t\t\t\tSystem.out.println(subanswer);\n\t\t\t}\n\t\telse if(answer.equals(\"multiply\") || answer.equals(\"x\") || answer.equals(\"*\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to multiply?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat mul1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number\");\n\t\t\t\tfloat mul2 = input.nextFloat();\n\t\t\t\t\n\t\t\t\tfloat mulanswer = mul1 * mul2;\n\t\t\t\tSystem.out.println(mulanswer);\n\t\t\t}\n\t\telse if(answer.equals(\"divide\") || answer.equals(\"/\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to divide?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat div1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number\");\n\t\t\t\tfloat div2 = input.nextFloat();\n\t\t\t\t\n\t\t\t\tfloat divanswer = div1 / div2;\n\t\t\t\tSystem.out.println(divanswer);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Please try again.\");\n\t\t\t}\n\t\tinput.close();\n\t\t}",
"public static int calc(int num1, int num2,double number1, double number2, String operation){\n\n int result=-1;\n double result1 =-1;\n\t\t\tswitch (operation){\n case \"+\":\n result = num1+num2;\n result1 = number1 + number2;\n break;\n case \"-\":\n result = num1-num2;\n break;\n case \"*\":\n result = num1*num2;\n break;\n default:\n System.out.println(\"wrong\");\n }\n return result;\n }",
"@Override\n public void addNumbers() {\n calculator.add(2, 2);\n }",
"private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }",
"@Override\n\tpublic void calc() {\n\t\tcalculated = true;\n\t\tanswer=operand1-operand2;\n\t}",
"public static void main(String[] args)\n {\n// Here we declare necessary variables and initialize the scanner:\n double firstNumber, secondNumber, total;\n String operator;\n Scanner myScanner = new Scanner(System.in); //This statement initializes a scanner called my scanner, and enables it to accept input from the user.\n//\n//\n//\n// Here we ask the user to input the numbers and operator.\nSystem.out.println(\"What is the first number?\");\nfirstNumber = myScanner.nextDouble(); //This statement assigns the number that the user inputs to the variable firstNumber.\nSystem.out.println(\"What is the second number?\");\nsecondNumber = myScanner.nextDouble(); //This statement assigns the number that the user inputs to the variable secondNumber.\nSystem.out.println(\"What operator would you like to use (choose between +,-,*,/?\");\noperator = myScanner.next(); //This statement assigns the string that the user inputs to the variable operator.\n//\n//\n//\n// Here we start the switch statement:\n switch (operator) //This tells the computer what to do for each of the 4 possible operators, and if the operator that was inputted isn't one of those for, it tells the user that it can't perform the operation.\n {\n case \"+\": //This case assigns total the value of the sum, and then prints that out.\n {\n total=firstNumber+secondNumber;\n System.out.println(\"The total is: \" + total);\n break;\n }\n case \"-\": //This case assigns total the value of the difference, and then prints that out.\n {\n total=firstNumber-secondNumber;\n System.out.println(\"The total is: \" + total);\n break;\n }\n case \"*\": //This case assigns total the value of the multiplication, and then prints that out.\n {\n total=firstNumber*secondNumber;\n System.out.println(\"The total is: \" + total);\n break;\n } \n case \"/\": //This case assigns total the value of the division, and then prints that out.\n {\n total=firstNumber/secondNumber;\n System.out.println(\"The total is: \" + total);\n break;\n }\n default: //This case prints out that the user did not select an appropriate operator.\n {\n System.out.println(\"Illegal Operator.\");\n break;\n }\n \n }\n }",
"public double calculate(double num1, double num2, String operator)\n {\n switch(operator)\n {\n case \"+\":\n return num1 + num2;\n case \"-\":\n return num1 - num2;\n case \"*\":\n return num1 * num2;\n case \"/\":\n // This if statement prevents the creation of black holes. You are welcome, earth.\n if(num2 == 0)\n {\n return 0;\n }\n return num1 / num2;\n case \"%\":\n return num1 % num2;\n default:\n // Error\n System.out.println(\"Undefined operator pressed: \" + operator);\n return 0;\n }\n }",
"private void equate()\n\t{\n\t\t\tif(Fun == Function.ADD)\n\t\t\t{\t\t\t\n\t\t\t\tresult = calc.sum ( );\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end ADD condition\n\t\t\t\n\t\t\telse if(Fun == Function.SUBTRACT)\n\t\t\t{\n\t\t\t\tresult = calc.subtract ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end SUBTRACT condition\n\t\t\t\n\t\t\telse if (Fun == Function.MULTIPLY)\n\t\t\t{\n\t\t\t\tresult = calc.multiply ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}//end MULTIPLY condition\n\t\t\t\n\t\t\telse if (Fun == Function.DIVIDE)\n\t\t\t{\n\t\t\t\tresult = calc.divide ();\n\t\t\t\tupdateText();\n\t\t\t\tsetLeftValue();\n\t\t\t\tFun = null;\n\t\t\t}\n\t\t\t\t\n\t}",
"private int performCalculation (int num1, int num2, String operator){\n int result;\n if (operator.equals(\"+\")){\n try{\n result= Math.addExact(num2,num1);\n return result;\n }\n catch (ArithmeticException e){ //catches integer overflow and returns the integer max value.\n return Integer.MAX_VALUE;\n }\n }\n else if (operator.equals(\"-\")){\n try{\n result= Math.subtractExact(num2, num1);\n return result;\n }\n catch (ArithmeticException e){ //catches integer underflow and returns the integer min value.\n return Integer.MIN_VALUE;\n }\n }\n else if (operator.equals(\"/\")){\n return num2 / num1;\n }\n else if (operator.equals(\"*\")){\n try{\n result= Math.multiplyExact(num2, num1);\n return result;\n }\n catch (ArithmeticException e){ \n if (num1 < 0 && num2 >0 || num2<0 && num1>0){ //catches integer underflow and returns the integer min value.\n return Integer.MIN_VALUE;\n }\n else{\n return Integer.MAX_VALUE; //Catches integer overflow and returns integer max value.\n } \n }\n }\n else if (operator.equals(\"^\")){\n try{\n double tempResult= Math.pow((int)num2, (int)num1);\n result = (int) tempResult;\n return result;\n }\n catch (ArithmeticException e){ //Catches integer overflow and returns integer max value.\n return Integer.MAX_VALUE;\n }\n \n }\n else if (operator.equals(\"%\")){\n return num2%num1;\n }\n return 0;\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n\n operatorToPerform[PLUS] = false;\n operatorToPerform[MINUS] = false;\n operatorToPerform[MULTIPLY] = false;\n operatorToPerform[DIVIDE] = false;\n\n operatorButtonClicked[PLUS] = false;\n operatorButtonClicked[MINUS] = false;\n operatorButtonClicked[MULTIPLY] = false;\n operatorButtonClicked[DIVIDE] = false;\n\n storedValue = 0;\n numberOnDisplay = 0;\n\n display = findViewById(R.id.display);\n btn_1 = findViewById(R.id.btn_1);\n btn_2 = findViewById(R.id.btn_2);\n btn_3 = findViewById(R.id.btn_3);\n btn_4 = findViewById(R.id.btn_4);\n btn_5 = findViewById(R.id.btn_5);\n btn_6 = findViewById(R.id.btn_6);\n btn_7 = findViewById(R.id.btn_7);\n btn_8 = findViewById(R.id.btn_8);\n btn_9 = findViewById(R.id.btn_9);\n btn_0 = findViewById(R.id.btn_0);\n btn_c = findViewById(R.id.btn_c);\n btn_ce = findViewById(R.id.btn_ce);\n btn_bs = findViewById(R.id.btn_bs);\n btn_divide = findViewById(R.id.btn_divide);\n btn_multiply = findViewById(R.id.btn_multiply);\n btn_plus = findViewById(R.id.btn_plus);\n btn_minus = findViewById(R.id.btn_minus);\n btn_sign = findViewById(R.id.btn_sign);\n btn_enter = findViewById(R.id.btn_enter);\n btn_point = findViewById(R.id.btn_point);\n\n display.setOnClickListener(this);\n btn_1.setOnClickListener(this);\n btn_2.setOnClickListener(this);\n btn_3.setOnClickListener(this);\n btn_4.setOnClickListener(this);\n btn_5.setOnClickListener(this);\n btn_6.setOnClickListener(this);\n btn_7.setOnClickListener(this);\n btn_8.setOnClickListener(this);\n btn_9.setOnClickListener(this);\n btn_0.setOnClickListener(this);\n btn_c.setOnClickListener(this);\n btn_ce.setOnClickListener(this);\n btn_bs.setOnClickListener(this);\n btn_divide.setOnClickListener(this);\n btn_multiply.setOnClickListener(this);\n btn_plus.setOnClickListener(this);\n btn_minus.setOnClickListener(this);\n btn_sign.setOnClickListener(this);\n btn_enter.setOnClickListener(this);\n btn_point.setOnClickListener(this);\n\n Typeface typeface = ResourcesCompat.getFont(this, R.font.ds_digi);\n display.setTypeface(typeface);\n\n\n\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='/';\r\n\t\t\t\ttf2.setText(\"/\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}",
"@Test\r\n\t\tpublic void testCompileAllOperators() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 6\\nb = 6\\nc = a + (b * 4)\\nd = c / 3\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"opt_div\") && elementText.contains(\"opt_mult\") &! elementText.contains(\"opt_minus\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}",
"public void OnNumberButtonClick_land(View v) {\n try {\n Button b = (Button) v;\n expressionView.setText(expressionView.getText().toString() + b.getText());\n calculate();\n isOperator=false;\n }catch (Exception e)\n {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }",
"public interface CalcModel {\n\t/**\n\t * Adds a listener to the model.\n\t * \n\t * @param l\n\t * listener to ad\n\t */\n\tvoid addCalcValueListener(CalcValueListener l);\n\n\t/**\n\t * Removes a listener from the model.\n\t * \n\t * @param l\n\t * listener to remove\n\t */\n\tvoid removeCalcValueListener(CalcValueListener l);\n\n\t/**\n\t * Returns a string representation of the current value in the calculator.\n\t * \n\t * @return string representation of the current value\n\t */\n\tString toString();\n\n\t/**\n\t * Returns a current value in calculator.\n\t * \n\t * @return current value in calculator\n\t */\n\tdouble getValue();\n\n\t/**\n\t * Sets the current value of the calculator to the given one.\n\t * \n\t * @param value\n\t * value to set\n\t */\n\tvoid setValue(double value);\n\n\t/**\n\t * Clears the current value in the calculator (sets it to 0).\n\t */\n\tvoid clear();\n\n\t/**\n\t * Clears the current value (sets it to 0), clears the active operand and clears\n\t * the pending binary operator.\n\t */\n\tvoid clearAll();\n\n\t/**\n\t * Swaps the sign of the current value in the calculator.\n\t */\n\tvoid swapSign();\n\n\t/**\n\t * Inserts a decimal point into the current number if one already doesn't exist.\n\t */\n\tvoid insertDecimalPoint();\n\n\t/**\n\t * Inserts a digit into the current number at the right most position.\n\t * \n\t * @param digit\n\t * new digit to be inserted\n\t */\n\tvoid insertDigit(int digit);\n\n\t/**\n\t * Checks if the active operand is set.\n\t * \n\t * @return true if active operand is set, false otherwise\n\t */\n\tboolean isActiveOperandSet();\n\n\t/**\n\t * Returns the active operand if it is set.\n\t * \n\t * @return active operand\n\t * @throws IllegalStateException\n\t * if active operand isn't set\n\t */\n\tdouble getActiveOperand();\n\n\t/**\n\t * Sets the active operand.\n\t * \n\t * @param activeOperand\n\t * a value to set as an active operand\n\t */\n\tvoid setActiveOperand(double activeOperand);\n\n\t/**\n\t * Clears the active operand.\n\t */\n\tvoid clearActiveOperand();\n\n\t/**\n\t * Returns pending binary operation.\n\t * \n\t * @return pending binary operation or null if it is not set\n\t */\n\tDoubleBinaryOperator getPendingBinaryOperation();\n\n\t/**\n\t * Sets pending binary operation.\n\t * \n\t * @param op\n\t * binary operator to set\n\t */\n\tvoid setPendingBinaryOperation(DoubleBinaryOperator op);\n}",
"view2() {\n Scanner input = new Scanner(System.in);\n Scanner StringInput = new Scanner(System.in);\n System.out.println(\"Calculator\");\n System.out.println(\"Enter the numbers you would like to operate on in order.\");\n System.out.print(\"Enter the first number: \");\n float first = StringInput.nextInt();\n System.out.print(\"which operation would you like to perform? ( Enter +, -, *, or / ) \");\n String operator = input.nextLine();\n System.out.print(\"Enter the second number: \");\n float second = input.nextInt();\n\n setFirstNumber(first);\n setOperator(operator);\n setSecondNumber(second);\n input.close();\n }",
"public void updateOperations() {\n String temp = \"\";\n \n if (chkBoxOperators[0].isSelected()) temp += PLUS;\n if (chkBoxOperators[1].isSelected()) temp += MINUS;\n if (chkBoxOperators[2].isSelected()) temp += TIMES;\n if (chkBoxOperators[3].isSelected()) temp += DIVIDE;\n \n charOperators = temp.toCharArray();\n if (temp.indexOf(currentOperator) == -1) setNewNumbers();\n \n }",
"private Calculator() {\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString str = e.getActionCommand();\n\t\tString ans = resultField.getText();\n\t\tString ans2 = resultField2.getText();\n\t\tdouble result;\n\t\t\n\t\tif(str ==\"0\" || str ==\"1\" || str == \"2\"|| str== \"3\" ||\n\t\t\t\tstr == \"4\"|| str == \"5\" || str == \"6\" || str == \"7\"|| str == \"8\" || str == \"9\" || str ==\".\"){\n\t\t resultField.setText(ans + str);\n\t\t resultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"+\" || str == \"-\" || str == \"*\" || str == \"/\")\n\t\t{\n\t\t\toper = ans;\n\t\t\top = str;\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"x^2\"){\n\t\t\tresultField.setText(\"\"+Double.parseDouble(ans)*Double.parseDouble(ans));\n\t\t\tresultField2.setText(ans2 + \"^2\");\n\t\t}\n\t\tif(str == \"sqrt\")\n\t\t{\n\t\t\tresultField.setText(\"\"+Math.sqrt(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(ans2 + \"^1/2\");\n\t\t}\n\t\tif(str == \"1/X\")\n\t\t{\n\t\t\tresultField.setText(\"\"+1/(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(\"1/(\" + ans2 + \")\");\n\t\t}\n\t\tif(str==\"+/-\")\n\t\t{\n\t\t\tresultField.setText(\"\"+-1*(Double.parseDouble(ans)));\n\t\t\tresultField.setText(\"-1*(\"+ans2+\")\");\n\t\t}\n\n\t\tif(str==\"=\")\n\t\t{\n\t\t\tchar c=op.charAt(0);\n\t\t\tswitch(c)\n\t\t\t{\n\t\t\tcase '+':\n\t\t\t\tresult=Double.parseDouble(oper) + Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tresult=Double.parseDouble(oper) - Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '*':\n\t\t\t\tresult=Double.parseDouble(oper) * Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tresult=Double.parseDouble(oper) / Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(str == \"C\")\n\t\t{\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(\"\");\n\t\t}\n\t\t\n\t\tif(str == \"Backspace\")\n\t\t{\n\t\t\tString temp=resultField.getText();\n\t\t\ttemp=temp.substring(0,temp.length()-1);\n\t\t\tresultField.setText(temp);\n\t\t\tString temp2=resultField2.getText();\n\t\t\ttemp2 = temp2.substring(0,temp2.length()-1);\n\t\t\tresultField2.setText(temp2);\n\t\t\t\n\t\t}\n\n\t}",
"public void actionPerformed(ActionEvent e){\r\n\t\tObject source=e.getSource();\r\n\r\n\t\t//the code for our mini calculator\r\n if(source==btn0){\r\n\r\n\t display = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"0\");\r\n\t\t else textField.setText(\"0\");\r\n\r\n\t\t}\r\n\t\tif (source==btn1) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"1\");\r\n\t\t else textField.setText(\"1\");\r\n\t\t}\r\n\t\tif (source==btn2) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"2\");\r\n\t\t else textField.setText(\"2\");\r\n\t\t\t\r\n\t\t}\r\n\t\tif (source==btn3) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"3\");\r\n\t\t else textField.setText(\"3\");\r\n\t\t}\r\n\t\tif (source==btn4) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"4\");\r\n\t\t else textField.setText(\"4\");\r\n\t\t}\r\n\t\tif (source==btn5) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"5\");\r\n\t\t else textField.setText(\"5\");\r\n\t\t}\r\n\t\tif (source==btn6) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"6\");\r\n\t\t else textField.setText(\"6\");\r\n\t\t}\r\n\t\tif (source==btn7) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"7\");\r\n\t\t else textField.setText(\"7\");\r\n\t\t}\r\n\t\tif (source==btn8) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"8\");\r\n\t\t else textField.setText(\"8\");\r\n\t\t}\r\n\t\tif (source==btn9) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"9\");\r\n\t\t else textField.setText(\"9\");\r\n\t\t}\r\n\t\tif (source==btnClear) {\r\n\r\n\t\t\tString s = textField.getText().toString();\r\n s = s.substring(0, s.length() - 1);\r\n textField.setText(s);\r\n if(textField.getText().equals(\"\"))\r\n textField.setText(\"0\"); \t\r\n\t\t}\r\n\t\tif (source==btnVirgule) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\ttextField.setText(display + \".\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(source==btnBackToMenu){\r\n\r\n\t\t\tMainFrame panel = new MainFrame();\r\n\t\t\tpanel.setSize(470,300);\r\n\t\t\tpanel.setVisible(true);\r\n\t\t\tpanel.setResizable(false);\r\n\t\t\tpanel.setLocation(400,250);\r\n\t\t\tdispose();\r\n\t\t}\r\n\r\n\t\tif(source==btnWithdraw){\r\n\t\t\t//here put the code for the Withdraw\r\n\r\n\t\t\tString conString = \"jdbc:mysql://localhost/atm\";\r\n\t\t String username = \"root\";\r\n\t\t String password = \"1234glody\";\r\n\t\t\t\r\n\t\t\tLogin log=new Login();\r\n\r\n String myUserId = log.getUserId();\r\n\t\t\tString myCardNumber=log.getCardNumber();\r\n\t\t\tString myPinNumber=log.getPinNumber();\r\n\t\t\tString myUserName=log.getUsername();\r\n\r\n\t\t\tdouble amount=Double.parseDouble(textField.getText());\r\n\r\n\t\t\tif (myUserId !=\"\") {\r\n\r\n\t\t\t\ttry{\r\n\r\n\t\t\t\t\t\tConnection con = DriverManager.getConnection(conString, username, password);\r\n\t\t\t\t\t\tStatement stmt = con.createStatement();\r\n\t\t\t\t\t\tResultSet rs = stmt.executeQuery(\"SELECT * FROM user_account WHERE id_user='\"+myUserId+\"'\");\r\n\t \r\n\t while(rs.next()){\r\n\r\n\t rsUserId=rs.getString(1);\r\n\t\t\t\t\t\trsUsername=rs.getString(2);\r\n\t\t\t\t\t\trsCardNumber=rs.getString(3);\r\n\t\t\t\t\t\trsPinNumber=rs.getString(4);\r\n\t\t\t\t\t\trsBalance = rs.getDouble(5);\r\n\t\t\t\t }\r\n\r\n\t\t\t\t if(rsUserId.equals(myUserId)){\r\n\r\n\t\t\t\t \t if(amount >=10){\r\n\r\n\t\t\t\t \t \tif (rsBalance > amount) {\r\n\r\n\t\t\t\t \t \t try{\r\n\r\n\t\t\t\t\t\t \t \tPreparedStatement pstmt = con.prepareStatement(\"INSERT INTO withdraw (amount , date_withdraw , id_user , action) VALUE (?,?,?,?)\");\r\n\r\n\t\t\t\t\t\t \t \tshort c = 0;\r\n\r\n\t\t\t\t\t\t \t \tpstmt.setDouble(++c, amount);\r\n\t\t\t\t\t\t \t \tpstmt.setString(++c, myDate);\r\n\t\t\t\t\t\t \t \tpstmt.setString(++c, rsUserId);\r\n\t\t\t\t\t\t \t \tpstmt.setString(++c, \"withdraw\");\r\n\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t \t \tpstmt.executeUpdate();\r\n\r\n\t\t\t\t\t\t \t \tPreparedStatement pstmt2= con.prepareStatement(\"UPDATE user_account SET balance = balance-'\"+amount+\"' WHERE id_user='\"+myUserId+\"'\");\r\n\r\n\t\t\t\t\t\t \t \tpstmt2.executeUpdate();\r\n\r\n\t\t\t JOptionPane.showMessageDialog(null,\"Your withdraw was saved Successfully\",\"Success\",JOptionPane.INFORMATION_MESSAGE);\r\n\r\n\t\t\t display=\"\";\r\n\t\t\t\t\t\t \t \t}\r\n\t\t\t\t\t \t \tcatch(SQLException err2){\r\n\r\n\t\t\t\t\t \t \t System.out.println(err2.getMessage());\r\n\t\t\t\t\t\t\t System.exit(0);\t\r\n\t\t\t\t\t \t \t}\r\n\t\t\t\t \t \t\t \r\n\t\t\t\t \t \t}\r\n\t\t\t\t \t \telse{\r\n\r\n\t\t\t\t \t \tJOptionPane.showMessageDialog(null,\"Your balance is below the value of your Withdraw!! \",\"Withdraw impossible\",JOptionPane.ERROR_MESSAGE);\t\r\n\t\t\t\t \t \t}\r\n\r\n\t\t\t\t \t }\r\n\t\t\t\t \t else{\r\n\r\n\t\t\t\t \t \tJOptionPane.showMessageDialog(null,\"Please a valid amount (above 9 rwf)\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n\r\n\t\t\t\t \t }\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\r\n\t\t\t\t\t JOptionPane.showMessageDialog(null,\"Login First please!!!\",\"Error\",JOptionPane.ERROR_MESSAGE);\t\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t stmt.close();\r\n\r\n\r\n\t\t\t\t\t}catch(SQLException err){\r\n\r\n\t\t\t\t\t\tSystem.out.println(err.getMessage());\r\n\t\t\t\t\t\tSystem.exit(0);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\r\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Login First please!!!\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public static void main(String[] args)\r\n\t{\n\t\tdouble num1;\r\n\t\tdouble num2;\r\n\t\t\r\n\t\t// Define a new variable that holds the character that represents the operator\r\n\t\tchar operator;\r\n\t\t\r\n\t\tdouble answer = 0.0;\r\n\t\t\r\n\t\t// Declare a new Scanner object called eval and set it to take in to the console input\r\n\t\tScanner eval = new Scanner(System.in);\r\n\t\t\r\n\t\t// Prompt the user for the 1st number\r\n\t\tSystem.out.println(\"Enter the 1st number: \");\r\n\t\t// Set num1 to the next double value the user enters\r\n\t\tnum1 = eval.nextDouble();\r\n\t\t\r\n\t\t// Prompt the user for the operator\r\n\t\tSystem.out.println(\"Enter the operator: \");\r\n\t\t// Set operator to the character the user wants\r\n\t\toperator = eval.next().charAt(0);\r\n\t\t\t\t\r\n\t\t// Prompt the user for the 2nd number\r\n\t\tSystem.out.println(\"Enter the 2nd number: \");\r\n\t\t// Set num2 to the next double value the user enters\r\n\t\tnum2 = eval.nextDouble();\r\n\t\t\r\n\t\t\t\t\r\n\t\t// Close the eval to prevent memory leakage\r\n\t\teval.close();\r\n\t\t\r\n\t\t// Take different actions depending on the operator passed to the function\r\n\t\tswitch(operator)\r\n\t\t{\r\n\t\t\t// If the operator is a +\r\n\t\t\tcase '+':\r\n\t\t\t\tanswer = num1 + num2;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t// If the operator is a -\r\n\t\t\tcase '-':\r\n\t\t\t\tanswer = num1 - num2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t// If the operator is a *\r\n\t\t\tcase '*':\r\n\t\t\t\tanswer = num1 * num2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t// If the operator is a /\r\n\t\t\tcase '/':\r\n\t\t\t\tanswer = num1 / num2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Output the 2 values, the operator and result to the user\r\n\t\tSystem.out.println(\"Answer: \" + num1 + \" \" + operator + \" \" + num2 + \" = \" + answer);\r\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='-';\r\n\t\t\t\ttf2.setText(\"-\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}",
"private String compute(String equ,String op)\n {\n String equation = equ;\n Pattern mdPattern = Pattern.compile(\"(\\\\d+([.]\\\\d+)*)(([\"+op+\"]))(\\\\d+([.]\\\\d+)*)\");\n Matcher matcher\t\t= mdPattern.matcher(equation);\n while(matcher.find())\n {\n String[] arr = null;\n double ans = 0;\n String eq = matcher.group(0);//get form x*y\n if(eq.contains(op))\n {\n arr = eq.split(\"\\\\\"+op);//make arr\n if(op.equals(\"*\"))\n ans = Double.valueOf(arr[0])*Double.valueOf(arr[1]);//compute\n if(op.equals(\"/\"))\n ans = Double.valueOf(arr[0])/Double.valueOf(arr[1]);//compute\n if(op.equals(\"+\"))\n ans = Double.valueOf(arr[0])+Double.valueOf(arr[1]);//compute\n if(op.equals(\"-\"))\n ans = Double.valueOf(arr[0])-Double.valueOf(arr[1]);//compute\n }\n\n equation = matcher.replaceFirst(String.valueOf(ans));//replace in equation\n matcher = mdPattern.matcher(equation);//look for more matches\n }\n return equation;\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tString oper1 = operando1.getText();\n\t\t\t\tString oper2 = operando2.getText();\n\t\t\t\tint num1 = Integer.parseInt(oper1);\n\t\t\t\tint num2 = Integer.parseInt(oper2);\n\t\t\t\tint resul = num1 / num2;\n\t\t\t\tString total = String.valueOf(resul);\n\t\t\t\tresultado.setText(total);\n\t\t\t}",
"public static double operation(int num1,int num2,int operation){\r\n \r\n int result =0 ;\r\n switch(operation){\r\n case 1:\r\n result=num1+num2;\r\n break;\r\n case 2:\r\n result=num1-num2;\r\n break;\r\n case 3:\r\n result=num1*num2;\r\n break;\r\n case 4:\r\n result=num1/num2;\r\n break;\r\n }\r\n return result ;\r\n \r\n}",
"private void calculate() {\n try {\n String result = \"\";\n switch (mCalculationType) {\n case CONSUMPTION_L_100_KM:\n result = calculateL100Km();\n break;\n case CONSUMPTION_KM_L:\n case CONSUMPTION_MPG:\n result = calculateDistancePerAmount();\n break;\n default:\n makeToast(getResourceString(R.string.err_no_calc_type));\n }\n\n showResult(result);\n } catch (NumberFormatException e) {\n catcher();\n }\n }",
"public static void main(String[] args) {\n\t\tScanner input=new Scanner (System.in);\n\t\tint n1, n2,result;\n\t\tchar operator;\n\t\t\t\t\t\n\t\t\t\n\t\tSystem.out.println(\"Please enter first numbers:\");\n\t\t\n\t\tn1=input.nextInt();\n\t\t\n\n\t\tSystem.out.println(\"Please enter first number: \");\t\t\n\t\tn2=input.nextInt();\n\t\t\n\t\tSystem.out.println(\"Please enter one of the operators that you want to do with these two numbers: +,-,* or /: \");\n\t\t\n\t\toperator=input.next().charAt(0);\n\t\t\n\t\tresult=0;\n\t\t\n\t\tswitch (operator) {\n\t\tcase '+':\n\t\t\tresult=n1+n2;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '-':\n\t\t\tresult=n1-n2;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '*':\n\t\t\tresult=n1*n2;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '/':\n\t\t result=n1/n2;\n\t\t break;\n\t\tdefault:\n\t\t System.out.println(\"You have enetered the wrong operator\");\n\t\t \n\t\t}\n\t\t// if the result was not calculated I do not want to see below message\n\t\tif (result!=0) {\n\t\t\tSystem.out.println(\"The result of your operation is \"+result);\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\t\n\t\t}",
"public String calculate() {\r\n\t\t\r\n\t\tif(\"\".equals(firstNumber.toString()) || \"\".equals(secondNumber.toString())) {\r\n\t\t\tclear();\r\n\t\t\treturn \"0\";\r\n\t\t}\r\n\t\t\r\n\t\tif (\"\".equals(operator)) {\r\n\t\t\tif (getOperand().length() == 0) {\r\n\t\t\t\tclear();\r\n\t\t\t\treturn \"0\";\r\n\t\t\t}\r\n\t\t\tresult = getOperand().toString();\r\n\t\t}\r\n\r\n\t\tif (\"+\".equals(operator)) {\r\n\t\t\tresult = Double.toString(Double.parseDouble(firstNumber.toString())\r\n\t\t\t\t\t+ Double.parseDouble(secondNumber.toString()));\r\n\t\t}\r\n\r\n\t\tif (\"-\".equals(operator)) {\r\n\t\t\tresult = Double.toString(Double.parseDouble(firstNumber.toString())\r\n\t\t\t\t\t- Double.parseDouble(secondNumber.toString()));\r\n\t\t}\r\n\r\n\t\tif (\"*\".equals(operator)) {\r\n\t\t\tresult = Double.toString(Double.parseDouble(firstNumber.toString())\r\n\t\t\t\t\t* Double.parseDouble(secondNumber.toString()));\r\n\t\t}\r\n\r\n\t\tif (\"/\".equals(operator)) {\r\n\t\t\tif (\"0\".equals(secondNumber.toString())) {\r\n\t\t\t\tclear();\r\n\t\t\t\treturn \"Division by zero\";\r\n\t\t\t}\r\n\t\t\tresult = Double.toString(Double.parseDouble(firstNumber.toString())\r\n\t\t\t\t\t/ Double.parseDouble(secondNumber.toString()));\r\n\t\t}\r\n\r\n\t\tclear();\r\n\t\treturn filter(result);\r\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tString oper1 = operando1.getText();\n\t\t\t\tString oper2 = operando2.getText();\n\t\t\t\tint num1 = Integer.parseInt(oper1);\n\t\t\t\tint num2 = Integer.parseInt(oper2);\n\t\t\t\tint resul = num1 - num2;\n\t\t\t\tString total = String.valueOf(resul);\n\t\t\t\tresultado.setText(total);\n\t\t\t}",
"private void mpyOperands() {\n\t\tif (text_Operand3.getText().isEmpty()) {\n\t\t\ttext_Operand3.setText(\"5\");\n\t\t}\n\t\tif (text_Operand4.getText().isEmpty()) {\n\t\t\ttext_Operand4.setText(\"5\");\n\t\t}\n\n\t\t/*\n\t\t * It will pass the value to the bussiness logic so trhat the further logics can\n\t\t * be performed on them.\n\t\t */\n\n\t\tif (conversionIsRequired(comboBox1.getSelectionModel().getSelectedItem(),\n\t\t\t\tcomboBox2.getSelectionModel().getSelectedItem())) {\n\t\t\tdouble op1 = Double.parseDouble(text_Operand1.getText());\n\t\t\tdouble op1et = Double.parseDouble(text_Operand3.getText());\n\t\t\tperform.setOperand1(String.valueOf(op1 * theFactor));\n\t\t\tperform.setOperand3(String.valueOf(op1et * theFactor));\n\t\t}\n\t\t// Check to see if both operands are\n\t\tif (binaryOperandIssues()) // If there are issues with the operands, return\n\t\t\treturn; // without doing the computation\n\n\t\t// If the operands are defined and valid, request the business logic method to\n\t\t// do the Multiplication and return the\n\t\t// result as a String. If there is a problem with the actual computation, an\n\t\t// empty string is returned\n\t\tString theAnswer = perform.multiplication(); // Call the business logic product method\n\t\tString theAnswer1 = perform.multiplication1(); // Call the business logic Product method\n\t\tlabel_errResult.setText(\"\"); // Reset any result error messages from before\n\t\tlabel_errResulterr.setText(\"\"); // Reset any result error messages from before\n\t\tif (theAnswer.length() > 0 || theAnswer1.length() > 0) { // Check the returned String to see if it is okay\n\t\t\ttext_Result.setText(theAnswer); // If okay, display it in the result field and\n\t\t\ttext_Resulterr.setText(theAnswer1);\n\t\t\tlabel_Result.setText(\"Product\"); // change the title of the field to \"Product\".\n\t\t\tlabel_Result.setLayoutX(80);\n\t\t\tlabel_Result.setLayoutY(345);\n\t\t\tcomboBoxRes.getSelectionModel().select(comboBox2.getSelectionModel().getSelectedItem() + \"x\"\n\t\t\t\t\t+ comboBox1.getSelectionModel().getSelectedItem());\n\t\t} else { // Some error occurred while doing the Multiplication.\n\t\t\ttext_Result.setText(\"\"); // Do not display a result if there is an error.\n\t\t\ttext_Resulterr.setText(\"\"); // Do not display a result if there is an error.\n\t\t\tlabel_Result.setText(\"Result\"); // Reset the result label if there is an error.\n\t\t\tlabel_errResult.setText(perform.getResultErrorMessage()); // Display the error message.\n\t\t\tlabel_errResulterr.setText(perform.getResulterrErrorMessage()); // Display the error message.\n\t\t}\n\n\t}",
"public static void main(String[] args) {\nScanner scan = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter first number:\");\n\t\t\n\t\tdouble num1 = scan.nextDouble();\n\t\t \n\t\tSystem.out.println(\"Enter second number:\");\n\t\t\n\t\tdouble num2 = scan.nextDouble();\n\t\t \n\t\tSystem.out.println(\"Select operator: +, -, *, /, %\");\n\t\tString operator = scan.next();\n\t\t \n\t\t switch(operator) {\n\t\t \n\t\t case (\"+\"):\n\t\t\t System.out.println(\"result: \" +(num1+num2));\n\t\t break;\n\t\t case (\"-\"):\n\t\t\t System.out.println(\"result: \" +(num1-num2));\n\t\t break;\n\t\t case (\"*\"):\n\t\t\t System.out.println(\"result: \" +(num1*num2));\n\t\t break;\n\t\t case (\"/\"):\n\t\t\t System.out.println(\"result: \" + (num1/num2));\n\t\t break;\n\t\t case (\"%\"):\n\t\t\t System.out.println(\"result: \" + (num1%num2));\n\t\t break;\n\t\t default:\n\t\t\t System.out.println(\"impossible\");\n\t\t \n\t\t }\n\t\t \n\t\t \n\t}",
"public Calculator() {\n initComponents();\n \n }",
"@Override\n\tpublic String execute() throws Exception {\n\t\tdouble num1 = Double.parseDouble(getModel().getNum1());\n\t\tdouble num2 = Double.parseDouble(getModel().getNum2());\n\t\tdouble result = getModel().getResult();\n\t\tString tip = getModel().getTip();\n\t\tswitch(getModel().getOp()) {\n\t\t\tcase \"+\":\n\t\t\t\tresult = num1 + num2; break;\n\t\t\tcase \"-\":\n\t\t\t\tresult = num1 - num2; break;\n\t\t\tcase \"*\":\n\t\t\t\tresult = num1 * num2; break;\n\t\t\tcase \"/\":\n\t\t\t\tif(num2 == 0) {\n\t\t\t\t\ttip=\"除数不能为0,请重新输入!\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tresult = num1 / num2; break;\n\t\t}\n\t\t\n\t\tActionContext.getContext().getSession().put(\"tip\", tip);\n\t\tActionContext.getContext().getSession().put(\"result\", result);\n\t\treturn SUCCESS;\n\t}",
"private String calculate (double num1, double num2, String operator){\r\n \r\n double value;\r\n switch(operator){\r\n case \"+\":\r\n value = num1 + num2;\r\n break;\r\n case \"-\":\r\n value = num1 - num2;\r\n break;\r\n case \"*\":\r\n value = num1 * num2;\r\n break;\r\n case \"/\":\r\n value = num1/num2;\r\n break;\r\n default:\r\n throw new IllegalArgumentException();\r\n \r\n }\r\n String result = value + \"\";\r\n return result;\r\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n\n btnCalc = (Button) findViewById(R.id.btnEquals);\n btnPeriod = (Button) findViewById(R.id.btnPeriod);\n btnZero = (Button) findViewById(R.id.btn0);\n btnOne = (Button) findViewById(R.id.btn1);\n btnTwo = (Button) findViewById(R.id.btn2);\n btnThree = (Button) findViewById(R.id.btn3);\n btnFour = (Button) findViewById(R.id.btn4);\n btnFive = (Button) findViewById(R.id.btn5);\n btnSix = (Button) findViewById(R.id.btn6);\n btnSeven = (Button) findViewById(R.id.btn7);\n btnEight = (Button) findViewById(R.id.btn8);\n btnNine = (Button) findViewById(R.id.btn9);\n btnCE = (Button) findViewById(R.id.btnAC);\n btnDivide = (Button) findViewById(R.id.btnDivide);\n btnMultiply = (Button) findViewById(R.id.btnMultiply);\n btnAdd = (Button) findViewById(R.id.btnAdd);\n btnMinus = (Button) findViewById(R.id.btnMinus);\n txtOutput = (TextView) findViewById(R.id.txtScreen);\n btnPlusMinus = (Button) findViewById(R.id.btnPlusminus);\n btnBack = (Button) findViewById(R.id.btnBack);\n\n final OnClickListener oclCalc = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum != null){\n strSecondNum = strNumber.replace(strFirstNum + \" \", \"\");\n strSecondNum = strSecondNum.replace(\"-\", \"\");\n strSecondNum = strSecondNum.replace(\"+\", \"\");\n strSecondNum = strSecondNum.replace(\"÷\", \"\");\n strSecondNum = strSecondNum.replace(\"x\", \"\");\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n txtOutput.setText(strNumber);\n strFirstNum = strNumber;\n strSecondNum = null;\n }\n }\n };\n\n OnClickListener oclMinus = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum == null && strSecondNum == null){\n strFirstNum = strNumber;\n Calcobj.TypeMath = 1;\n strNumber = strNumber + \" - \";\n txtOutput.setText(strNumber);\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n if(strSecondNum.equals(\"\")){\n strSecondNum = null;\n }\n }else if (strSecondNum == null){\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n }else{\n try{\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n strFirstNum = strNumber;\n Calcobj.TypeMath = 1;\n strNumber = strNumber + \" - \";\n txtOutput.setText(strNumber);\n strSecondNum = null;\n }catch(Exception e){\n strFirstNum = null;\n strSecondNum = null;\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }\n }\n\n }\n };\n\n OnClickListener oclAdd = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum == null && strSecondNum == null){\n strFirstNum = strNumber;\n Calcobj.TypeMath = 2;\n strNumber = strNumber + \" + \";\n txtOutput.setText(strNumber);\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n if(strSecondNum.equals(\"\")){\n strSecondNum = null;\n }\n }else if (strSecondNum == null){\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n }else{\n try{\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n strFirstNum = strNumber;\n Calcobj.TypeMath = 2;\n strNumber = strNumber + \" + \";\n txtOutput.setText(strNumber);\n strSecondNum = null;\n }catch(Exception e){\n strFirstNum = null;\n strSecondNum = null;\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }\n }\n\n }\n };\n\n OnClickListener oclMultiply = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum == null && strSecondNum == null){\n strFirstNum = strNumber;\n Calcobj.TypeMath = 3;\n strNumber = strNumber + \" x \";\n txtOutput.setText(strNumber);\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n if(strSecondNum.equals(\"\")){\n strSecondNum = null;\n }\n }else if (strSecondNum == null){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");\n strSecondNum = strSecondNum.replace(\"x\",\"\");\n txtOutput.setText(strNumber);\n }else{\n try{\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n strFirstNum = strNumber;\n Calcobj.TypeMath = 3;\n strNumber = strNumber + \" x \";\n txtOutput.setText(strNumber);\n strSecondNum = null;\n }catch(Exception e){\n strFirstNum = null;\n strSecondNum = null;\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }\n }\n\n }\n };\n\n\n OnClickListener oclDivide = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum == null && strSecondNum == null){\n strFirstNum = strNumber;\n Calcobj.TypeMath = 4;\n strNumber = strNumber + \" ÷ \";\n txtOutput.setText(strNumber);\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n if(strSecondNum.equals(\"\")){\n strSecondNum = null;\n }\n }else if (strSecondNum == null){\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n }else{\n try{\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n strFirstNum = strNumber;\n Calcobj.TypeMath = 4;\n strNumber = strNumber + \" ÷ \";\n txtOutput.setText(strNumber);\n strSecondNum = null;\n }catch(Exception e){\n strFirstNum = null;\n strSecondNum = null;\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }\n }\n\n }\n };\n\n\n OnClickListener oclPlusMinus = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.startsWith(\"-\")){\n strNumber = strNumber.substring(1);\n txtOutput.setText(strNumber);\n }else {\n strNumber = \"-\" + strNumber;\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclPeriod = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(!strNumber.contains(\".\")){\n strNumber = strNumber + \".\";\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclBack = new OnClickListener(){\n @Override\n public void onClick(View v) {\n if (strNumber != null && strNumber.length() > 1) {\n rephrase = strNumber.substring(0, strNumber.length() - 1);\n strNumber = rephrase;\n txtOutput.setText(strNumber);\n\n if(!strNumber.contains(\"-\")||!strNumber.contains(\"+\")||!strNumber.contains(\"÷\")||!strNumber.contains(\"x\")){\n intMathType = 0;\n strFirstNum = null;\n strSecondNum = null;\n }\n\n }else{\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n strFirstNum = null;\n intMathType = 0;\n }\n }\n\n };\n OnClickListener oclClear = new OnClickListener() {\n @Override\n public void onClick(View v) {\n strNumber = \"0\";\n strFirstNum = null;\n strSecondNum = null;\n Calcobj.TypeMath = 0;\n txtOutput.setText(strNumber);\n }\n };\n\n OnClickListener oclZero = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"0\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"0\";\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclOne = new OnClickListener() {\n @Override\n\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"1\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"1\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber = strNumber + \"1\";\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclTwo = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"2\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"2\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"2\";\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclThree = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"3\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"3\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"3\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclFour = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"4\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"4\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"4\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclFive = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"5\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"5\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"5\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclSix = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"6\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"6\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"6\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclSeven = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"7\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"7\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"7\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclEight = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"8\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"8\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"8\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclNine = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"9\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"9\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"9\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n btnCalc.setOnClickListener(oclCalc);\n btnBack.setOnClickListener(oclBack);\n btnPlusMinus.setOnClickListener(oclPlusMinus);\n btnCE.setOnClickListener(oclClear);\n btnZero.setOnClickListener(oclZero);\n btnOne.setOnClickListener(oclOne);\n btnTwo.setOnClickListener(oclTwo);\n btnThree.setOnClickListener(oclThree);\n btnFour.setOnClickListener(oclFour);\n btnFive.setOnClickListener(oclFive);\n btnSix.setOnClickListener(oclSix);\n btnSeven.setOnClickListener(oclSeven);\n btnEight.setOnClickListener(oclEight);\n btnNine.setOnClickListener(oclNine);\n btnPeriod.setOnClickListener(oclPeriod);\n btnMinus.setOnClickListener(oclMinus);\n btnAdd.setOnClickListener(oclAdd);\n btnDivide.setOnClickListener(oclDivide);\n btnMultiply.setOnClickListener(oclMultiply);\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tString oper1 = operando1.getText();\n\t\t\t\tString oper2 = operando2.getText();\n\t\t\t\tint num1 = Integer.parseInt(oper1);\n\t\t\t\tint num2 = Integer.parseInt(oper2);\n\t\t\t\tint resul = num1 + num2;\n\t\t\t\tString total = String.valueOf(resul);\n\t\t\t\tresultado.setText(total);\n\t\t\t}",
"public void action(CalculatorDisplay display){\n\t\tdisplay.setOperator(this);\n\t}",
"double getActiveOperand();",
"public interface Calculator {\n public int exec(int a, int b);\n}",
"protected void operation(String op) {\n \tint value;\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tint second = stack.pop();\n \t // handles when only one value in stack\n \t\tif (stack.empty()) {\n \t\t\tif (op.equals(\"+\")) {\n \t\t\t\tstack.push(second);\n \t\t\t}\n \t\t\telse if (op.equals(\"-\")) {\n \t\t\t\tcurrent = second *-1;\n \t\t\t\tstack.push(current);\n \t\t\t\tshow(stack.peek());\n \t\t\t\tcurrent = 0;\n \t\t\t}\n \t\t\telse if (op.equals(\"*\")) {\n \t\t\t\tstack.push(0);\n \t\t\t\tshow(stack.peek());\n \t\t\t}\n \t\t\telse {\n \t\t\t\tstack.push(0);\n \t\t\t\tshow(stack.peek());\n \t\t\t}\n \t\t}\n \t // handles the other cases\n \t\telse {\n \t\t\tif (op.equals(\"+\")) {\n \t\t\t\tvalue = second + stack.pop();\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse if (op.equals(\"-\")) {\n \t\t\t\tvalue = stack.pop() - second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse if (op.equals(\"*\")) {\n \t\t\t\tvalue = stack.pop() * second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tvalue = stack.pop() / second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t}\n \t}\n }",
"@Test\n\tvoid testBasicCalculatorII() {\n\t\tassertEquals(7, new BasicCalculatorII().calculate(\"3+2*2\"));\n\t\tassertEquals(1, new BasicCalculatorII().calculate(\" 3/2 \"));\n\t\tassertEquals(5, new BasicCalculatorII().calculate(\" 3+5 / 2 \"));\n\t}",
"public Calculator()\n {\n \n }",
"private void processOperator(String operator){\n if (numStack.size() <2){\n System.out.println(\"Stack underflow.\");\n }\n else if (dividingByZero(operator)){\n System.out.println(\"Divide by 0.\"); \n }\n else{\n int num1 = numStack.pop();\n int num2 = numStack.pop();\n int result = performCalculation(num1, num2, operator);\n numStack.push(result);\n }\n\n }",
"private void initialize() {\n\t\tframe = new JFrame(\"Simple Calculator By Sakib\");\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"cal.png\")));\n\t\ttextField = new JTextField();\n\t\ttextField.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\ttextField.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\ttextField.setBounds(0, 0, 444, 65);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t\tfinal JButton btn7 = new JButton(\"7\");\n\t\tbtn7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn7.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\ttextField.setText(btn7.getText()) ;\t\n\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn7.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn7.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn7.setBounds(0, 64, 115, 50);\n\t\tframe.getContentPane().add(btn7);\n\t\t\n\t\tfinal JButton btn8 = new JButton(\"8\");\n\t\tbtn8.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn8.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\t\ttextField.setText(btn8.getText()) ;\t\t\n\t\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn8.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn8.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn8.setBounds(113, 64, 115, 50);\n\t\tframe.getContentPane().add(btn8);\n\t\tfinal JButton btn9 = new JButton(\"9\");\n\t\tbtn9.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn9.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\t\ttextField.setText(btn9.getText()) ;\t\n\t\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn9.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn9.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn9.setBounds(227, 64, 104, 50);\n\t\tframe.getContentPane().add(btn9);\n\t\t\n\t\tfinal JButton btnP = new JButton(\"+\");\n\t\tbtnP.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(textField.getText().length()==0)\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\telse {\n\t\t\t\tfirstnum=Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tOperation=\"+\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnP.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtnP.setBounds(330, 64, 114, 50);\n\t\tframe.getContentPane().add(btnP);\n\t\t//\n\t\tfinal JButton btn4 = new JButton(\"4\");\n\t\tbtn4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn4.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\t\ttextField.setText(btn4.getText()) ;\t\n\t\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn4.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn4.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn4.setBounds(0, 110, 115, 50);\n\t\tframe.getContentPane().add(btn4);\n\t\t\n\t\tfinal JButton btn5 = new JButton(\"5\");\n\t\tbtn5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn5.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\t\ttextField.setText(btn5.getText()) ;\t\n\t\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn5.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn5.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn5.setBounds(113, 110, 115, 50);\n\t\tframe.getContentPane().add(btn5);\n\t\tfinal JButton btn6 = new JButton(\"6\");\n\t\tbtn6.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn6.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\t\ttextField.setText(btn6.getText()) ;\t\n\t\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn6.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn6.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn6.setBounds(227, 110, 104, 50);\n\t\tframe.getContentPane().add(btn6);\n\t\t\n\t\tfinal JButton btnS = new JButton(\"-\");\n\t\tbtnS.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(textField.getText().length()==0)\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\telse {\n\t\t\t\tfirstnum=Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tOperation=\"-\";\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnS.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtnS.setBounds(330, 110, 114, 50);\n\t\tframe.getContentPane().add(btnS);\n\t\t//\n\t\tfinal JButton btn1 = new JButton(\"1\");\n\t\tbtn1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn1.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\t\ttextField.setText(btn1.getText()) ;\t\n\t\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn1.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn1.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn1.setBounds(0, 158, 115, 50);\n\t\tframe.getContentPane().add(btn1);\n\t\t\n\t\tfinal JButton btn2 = new JButton(\"2\");\n\t\tbtn2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn2.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\t\ttextField.setText(btn2.getText()) ;\t\n\t\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn2.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn2.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn2.setBounds(113, 158, 115, 50);\n\t\tframe.getContentPane().add(btn2);\n\t\tfinal JButton btn3 = new JButton(\"3\");\n\t\tbtn3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn3.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\t\ttextField.setText(btn3.getText()) ;\t\t\n\t\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn3.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn3.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn3.setBounds(227, 158, 104, 50);\n\t\tframe.getContentPane().add(btn3);\n\t\t\n\t\tfinal JButton btnM = new JButton(\"*\");\n\t\tbtnM.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(textField.getText().length()==0)\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\telse {\n\t\t\t\tfirstnum=Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tOperation=\"*\";\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnM.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtnM.setBounds(330, 158, 114, 50);\n\t\tframe.getContentPane().add(btnM);\n\t\t//\n\t\tfinal JButton btn0 = new JButton(\"0\");\n\t\tbtn0.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(Flag==false)\n\t\t\t\t{\n\t\t\t\t\ttextField.setText(btn0.getText() );\n\t\t\t\t\tFlag=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString G=textField.getText();\n\t\t\t\t\tif(G.equals(\"0\"))\n\t\t\t\t\t\ttextField.setText(btn0.getText()) ;\t\n\t\t\t\t\telse {\n\t\t\t\tString Number=textField.getText()+ btn0.getText();\n\t\t\t\ttextField.setText(Number );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtn0.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtn0.setBounds(0, 206, 115, 66);\n\t\tframe.getContentPane().add(btn0);\n\t\t\n\t\tfinal JButton btnC = new JButton(\"C\");\n\t\tbtnC.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\ttextField.setText(\"\");\n\t\t\t}\n\t\t});\n\t\tbtnC.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtnC.setBounds(113, 206, 115, 66);\n\t\tframe.getContentPane().add(btnC);\n\t\tJButton btnE = new JButton(\"=\");\n\t\tbtnE.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(textField.getText().length()==0) {\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\tsecondnum=Double.parseDouble(textField.getText());\n\t\t\t\tif(Operation==\"+\")\n\t\t\t\t{\n\t\t\t\t\tint Result=(int) (firstnum+secondnum);\n\t\t\t\t\tAnswer=Integer.toString(Result);\n\t\t\t\t\ttextField.setText(Answer);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Operation==\"-\")\n\t\t\t\t{\n\t\t\t\t\tint Result=(int) (firstnum-secondnum);\n\t\t\t\t\tAnswer=Integer.toString(Result);\n\t\t\t\t\ttextField.setText(Answer);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Operation==\"*\")\n\t\t\t\t{\n\t\t\t\t\tint Result=(int) (firstnum*secondnum);\n\t\t\t\t\tAnswer=Integer.toString(Result);\n\t\t\t\t\ttextField.setText(Answer);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Operation==\"/\")\n\t\t\t\t{\n\t\t\t\t\tresult=firstnum/secondnum;\n\t\t\t\t\tAnswer=Double.toString(result);\n\t\t\t\t\ttextField.setText(Answer);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tFlag=false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnE.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtnE.setBounds(227, 206, 104, 66);\n\t\tframe.getContentPane().add(btnE);\n\t\t\n\t\tfinal JButton btnD = new JButton(\"/\");\n\t\tbtnD.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(textField.getText().length()==0)\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\telse {\n\t\t\t\tfirstnum=Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tOperation=\"/\";\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnD.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tbtnD.setBounds(330, 206, 114, 66);\n\t\tframe.getContentPane().add(btnD);\n\t}",
"@Override\n public void onClick(View v) {\n dot_inserted = false;\n\n /*check for validation if curr is empty*/\n if(curr.isEmpty()){\n /*check if the last digit is a dot and remove it*/\n if(curr.substring(curr.length()-1, curr.length()).equals(\".\")){\n del();\n }\n }\n\n /*check fr validation if operator is inserted is equal to false then append the operator to curr*/\n if(operator_inserted == false){\n curr = curr + \"+\";\n operator_inserted = true;\n }\n displayNum();\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n int t=0;\n String s=e.getActionCommand();\n if(s.equals(\"+\")||s.equals(\"-\")||s.equals(\"*\")||s.equals(\"/\")) {\n input+=\" \"+s+\" \"; //如果碰到运算符,就在运算符前后分别加一个空格,\n //为后面的分解字符串做准备\n\n }else if(s.equals(\"清零\")) {\n input=\"\";\n }else if(s.equals(\"退格\")) {\n if((input.charAt(input.length()-1))==' ') { //检测字符串的最后一个字符是否为空格,\n input=input.substring(0,input.length()-3);//如果是则删除末尾3个字符,否则删除\n //1个字符\n }else {\n input=input.substring(0,input.length()-1);\n }\n }\n else if(s.equals(\"=\")) {\n input=compute(input);\n jt.setText(input);\n input=\"\";\n t=1;\n }\n else\n input += s;\n if(t==0) {\n jt.setText(input);\n }\n }",
"private void Operation(String operator, String x, String y){\n\t\tswitch(operator){\r\n\t\t\tcase \"+\":\r\n\t\t\t\tSystem.out.print(\"Result: \" + addition(x, y));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"-\":\r\n\t\t\t\tSystem.out.print(\"Result: \" + substraction(x, y));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"*\":\r\n\t\t\t\tSystem.out.print(\"Result: \" + multiplication(x, y));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/\":\r\n\t\t\t\tSystem.out.print(\"Result: \" + division(x, y));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\tnotOperation = true;\r\n\r\n\t\t}\r\n\t}",
"@Override\n public ExtensionResult doCalculate(ExtensionRequest extensionRequest) {\n String result = \"Maaf Kak. ada kesalahan :( Mohon dicek lagi inputannya!\";\n String operasi = getEasyMapValueByName(extensionRequest, \"hitung\");\n operasi = operasi.replaceAll(\"\\\\s+\", \"\");\n operasi = operasi.replaceAll(\"multiply\", \"*\");\n operasi = operasi.replaceAll(\"Multiply\", \"*\");\n operasi = operasi.replaceAll(\"bagi\", \"/\");\n operasi = operasi.replaceAll(\"Bagi\", \"/\");\n String[] arr = operasi.split(\"(?<=[-+*/])|(?=[-+*/])\");\n double res = 0;\n try {\n\n //ubah - jadi + dan merubah next index jd angka negatif\n for (int i = 0; i < arr.length; i++) {\n if (arr[i].equals(\"-\")) {\n arr[i] = \"+\";\n arr[i + 1] = \"-\" + arr[i + 1];\n }\n }\n\n //temporary\n List<String> temp = new ArrayList<>();\n for (String obj : arr) {\n temp.add(obj);\n }\n\n if (operasi.contains(\"*\")) {\n //perkalian\n for (int i = 1; i < temp.size(); i++) {\n if (temp.get(i).equals(\"*\")) {\n double angka1 = new Double(temp.get(i - 1));\n double angka2 = new Double(temp.get(i + 1));\n String operator = temp.get(i);\n double hasil = calculate(angka1, operator, angka2);\n\n temp.remove(i);\n temp.remove(i);\n temp.set(i - 1, hasil + \"\");\n i--;\n }\n }\n }\n if (operasi.contains(\"/\")) {\n //pembagian\n for (int i = 1; i < temp.size(); i++) {\n if (temp.get(i).equals(\"/\")) {\n double angka1 = new Double(temp.get(i - 1));\n double angka2 = new Double(temp.get(i + 1));\n String operator = temp.get(i);\n double hasil = calculate(angka1, operator, angka2);\n\n temp.remove(i);\n temp.remove(i);\n temp.set(i - 1, hasil + \"\");\n i--;\n }\n }\n }\n\n //menjumlahkan semua angka\n for (int i = 0; i < temp.size(); i += 2) {\n double d = new Double(temp.get(i));\n res = res + d;\n }\n result = \"Hasilnya \" + res + \" Kak.\";\n } catch (Exception e) {\n\n }\n ExtensionResult extensionResult = new ExtensionResult();\n extensionResult.setAgent(false);\n extensionResult.setRepeat(false);\n extensionResult.setSuccess(true);\n extensionResult.setNext(true);\n Map<String, String> output = new HashMap<>();\n\n output.put(OUTPUT, result);\n extensionResult.setValue(output);\n return extensionResult;\n }",
"public static void main(String[] args) {\n\t\tScanner input=new Scanner(System.in);\n\t\tdouble a,b,result;\n\t\tchar operation;\n\t\tSystem.out.println(\"PLease enter a first number\");\n\t\ta=input.nextDouble();\n\t\tSystem.out.println(\"Please enter a second number\");\n\t\tb=input.nextDouble();\n\t\tSystem.out.println(\"PLease tell us what kind of operation you want to use (+,-,*,/)\");\n\t\toperation=input.next().charAt(0);\n\t\t\n\t\tswitch(operation) {\n\t\t case '+':\n\t\t \tresult=a+b;\n\t\t \tbreak;\n\t\t case '-':\n\t\t \tresult=a-b;\n\t\t \tbreak;\n\t\t case'*':\n\t\t \tresult=a*b;\n\t\t \tbreak;\n\t\t case '/':\n\t\t \tresult=a/b;\n\t\t \tbreak;\n\t\t \tdefault:\n\t\t \t\tresult=0;\n\t\t \t\tSystem.out.println(\"Invalid input\");\n\t\t}System.out.println(\"The result is \"+ a+ operation+b+\"=\"+ result);\n \n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args){\n Scanner input = new Scanner(System.in);\n int result = 0;\n\n System.out.print(\"Enter three integer number : \");\n String num = input.nextLine();\n\n String [] operand = num.split(\" \");\n int x = Integer.parseInt(operand[0]);\n int y = Integer.parseInt(operand[1]);\n int z = Integer.parseInt(operand[2]);\n\n System.out.print(\"Enter two operand : \");\n String operator = input.nextLine();\n\n String [] op = operator.split(\" \");\n String a = op[0];\n String b = op[1];\n\n int temp = 0;\n\n for(int i = 0; i< op.length; i++){\n if(a.equals(\"X\") || a.equals(\"D\") || a.equals(\"M\") || b.equals(\"X\") || b.equals(\"D\") || b.equals(\"M\")){\n\n if(a.equals(\"X\") || b.equals(\"X\")){\n if(a.equals(\"X\")){\n if(i == 0) temp = x*y;\n else result = temp * x;\n a = \"\";\n }\n else if(b.equals(\"X\")){\n if(i == 0) temp = y*z;\n else result = temp * z;\n b = \"\";\n }\n }\n\n else if(a.equals(\"D\") || b.equals(\"D\")){\n if(a.equals(\"D\")){\n if(i==0) temp = x/y;\n else result = x/temp;\n a = \"\";\n }\n else if(b.equals(\"D\")){\n if(i == 0) temp = y/z;\n else result = temp / z;\n b = \"\";\n }\n }\n\n else if(a.equals(\"M\") || b.equals(\"M\")){\n if(a.equals(\"M\")){\n if(i == 0)temp = x % y;\n else result = x % temp;\n a = \"\";\n }\n\n else if(b.equals(\"M\")) {\n if(i == 0) temp = y % z;\n else result = temp % z;\n b = \"\";\n }\n }\n\n } else{\n if(a.equals(\"A\")){\n if(b.equals(\"A\")) result = x+y+z;\n else if(b.equals(\"S\")) result = x+y-z;\n else result = temp + x;\n }\n\n else if(b.equals(\"A\")){\n if(a.equals(\"A\")) result = x+y+z;\n else if(a.equals(\"S\")) result = x-y+z;\n else result = temp + z;\n }\n }\n }\n System.out.println(x + \" \" + op[0] + \" \" + y + \" \" + op[1] + \" \" + z + \" = \" + result);\n\n }",
"public void performEvaluation(){\n if(validateExp(currentExp)){\n try {\n Double result = symbols.eval(currentExp);\n currentExp = Double.toString(result);\n calculationResult.onExpressionChange(currentExp,true);\n count=0;\n }catch (SyntaxException e) {\n calculationResult.onExpressionChange(\"Invalid Input\",false);\n e.printStackTrace();\n }\n }\n\n }"
] | [
"0.7271144",
"0.7176208",
"0.6987805",
"0.69577837",
"0.6817363",
"0.6780476",
"0.6765292",
"0.67175955",
"0.6714473",
"0.6679081",
"0.66555876",
"0.66535366",
"0.6641523",
"0.6609151",
"0.6606186",
"0.659105",
"0.65727794",
"0.6566841",
"0.65463376",
"0.6543473",
"0.6541423",
"0.65331024",
"0.651218",
"0.6494325",
"0.6492931",
"0.6487943",
"0.6474913",
"0.6472224",
"0.63918346",
"0.63908607",
"0.6380948",
"0.63635826",
"0.6351323",
"0.63508",
"0.6345272",
"0.6338924",
"0.6331298",
"0.63211566",
"0.6308579",
"0.6281586",
"0.6276735",
"0.62721306",
"0.62642974",
"0.6244284",
"0.6239058",
"0.622457",
"0.62022364",
"0.61914873",
"0.6191426",
"0.6191338",
"0.6188362",
"0.6184355",
"0.6178435",
"0.61662644",
"0.6152271",
"0.6145234",
"0.61428237",
"0.6137716",
"0.6136198",
"0.6128742",
"0.6123153",
"0.6122753",
"0.61194396",
"0.611461",
"0.61131305",
"0.6109037",
"0.6099902",
"0.60977966",
"0.6097434",
"0.60730404",
"0.607228",
"0.60676074",
"0.6065466",
"0.60547674",
"0.6043419",
"0.60417336",
"0.6038277",
"0.60252637",
"0.6019202",
"0.6017181",
"0.5998578",
"0.5997844",
"0.5993715",
"0.59937084",
"0.5992586",
"0.5978413",
"0.5974588",
"0.597338",
"0.5965497",
"0.59539044",
"0.5947752",
"0.59428185",
"0.5934316",
"0.59335566",
"0.59311545",
"0.5929868",
"0.59220624",
"0.5913507",
"0.59060836",
"0.589471",
"0.58921343"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<AlmacenDTO> listarEntrada() {
List<AlmacenDTO> data = new ArrayList<AlmacenDTO>();
AlmacenDTO obj = null;
Connection cn = null;
PreparedStatement pstm = null;
ResultSet rs = null;
try {
cn = new MySqlDbConexion().getConexion();
String sql = "select me.codigo_entrada,p.nombre_producto,me.cantidad_entrada,me.fecha_entrada\r\n" +
"from material_entrada me inner join producto p on me.codigo_producto=p.codigo_producto";
pstm = cn.prepareStatement(sql);
rs = pstm.executeQuery();
while (rs.next()) {
obj = new AlmacenDTO();
obj.setCodigo_entrada(rs.getInt(1));
obj.setNombre_producto(rs.getString(2));
obj.setCantidad_entrada(rs.getInt(3));
obj.setFecha_entrada(rs.getDate(4));
data.add(obj);
}
} catch (Exception e) {
e.printStackTrace();
}
return data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int insertarEntrada(AlmacenDTO obj) {
int rs=-1;
Connection con=null;
PreparedStatement pst=null;
try {
con=new MySqlDbConexion().getConexion();
String sql="insert into MATERIAL_ENTRADA values (null,?,?,?)";
pst=con.prepareStatement(sql);
pst.setInt(1,obj.getCodigo_producto());
pst.setInt(2,obj.getCantidad_entrada());
pst.setDate(3,obj.getFecha_entrada());
rs=pst.executeUpdate();
}
catch(Exception e) {
System.out.println("Error en la Sentencia"+e.getMessage());
}
finally {
try {
if(pst!=null) pst.close();
if(con!=null) con.close();
}
catch (SQLException e) {
System.out.println("Error al cerrar");
}
}
return rs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<AlmacenDTO> listarSalida() {
List<AlmacenDTO> data = new ArrayList<AlmacenDTO>();
AlmacenDTO obj = null;
Connection cn = null;
PreparedStatement pstm = null;
ResultSet rs = null;
try {
cn = new MySqlDbConexion().getConexion();
String sql = "select me.codigo_salida,p.nombre_producto,me.cantidad_salida,me.fecha_salida\r\n" +
"from material_salida me inner join producto p on me.codigo_producto=p.codigo_producto";
pstm = cn.prepareStatement(sql);
rs = pstm.executeQuery();
while (rs.next()) {
obj = new AlmacenDTO();
obj.setCodigo_salida(rs.getInt(1));
obj.setNombre_producto(rs.getString(2));
obj.setCantidad_salida(rs.getInt(3));
obj.setFecha_salida(rs.getDate(4));
data.add(obj);
}
} catch (Exception e) {
e.printStackTrace();
}
return data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int insertarSalida(AlmacenDTO obj) {
int rs=-1;
Connection con=null;
PreparedStatement pst=null;
try {
con=new MySqlDbConexion().getConexion();
String sql="insert into MATERIAL_SALIDA values (null,?,?,?)";
pst=con.prepareStatement(sql);
pst.setInt(1,obj.getCodigo_producto());
pst.setInt(2,obj.getCantidad_salida());
pst.setDate(3,obj.getFecha_salida());
rs=pst.executeUpdate();
}
catch(Exception e) {
System.out.println("Error en la Sentencia"+e.getMessage());
}
finally {
try {
if(pst!=null) pst.close();
if(con!=null) con.close();
}
catch (SQLException e) {
System.out.println("Error al cerrar");
}
}
return rs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Do a null check to confirm that we have not already instantiated the map. | private boolean setUpMapIfNeeded() {
if (mMap == null) {
// Try to obtain the map from the SupportMapFragment.
mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
.getMap();
if (mMap == null) {
Log.e(TAG, "Can not find map");
return false;
}
// Check if we were successful in obtaining the map.
if (mMap != null) {
setUpMap();
}
}
if (bCurrentPos!= null)
bCurrentPos.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
goCurrentLocation(mMap);
}
});
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setUpMapIfNeeded() {\n if (map == null) {\n map = fragMap.getMap();\n if (map != null) {\n setUpMap();\n }\n }\n }",
"private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }",
"private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t\t.findFragmentById(R.id.map1)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\tsetUpMap();\n\t\t\t}\n\t\t}\n\t}",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\r\n // Try to obtain the map from the SupportMapFragment.\r\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\r\n .getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (mMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }",
"public void setInstanceOfMapForTesting(){\n instanceOfMap = null;\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n \tmMap = ((com.google.android.gms.maps.MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n \t// Check if we were successful in obtaining the map.\n \tif (mMap != null) {\n \t\tmakeMarkers();\n \t\tloadMarkersFromParse();\n \t}\n }\n \n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMapFragment = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_show_place_info_map));\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }",
"private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n mMap.setOnMarkerDragListener(this);\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }",
"public Map() {\n\t\t//intially empty\n\t}",
"private void setUpMapIfNeeded() {\n \tif (mMap == null) {\r\n \t\t//Instanciamos el objeto mMap a partir del MapFragment definido bajo el Id \"map\"\r\n \t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t// Chequeamos si se ha obtenido correctamente una referencia al objeto GoogleMap\r\n \t\tif (mMap != null) {\r\n \t\t\t// El objeto GoogleMap ha sido referenciado correctamente\r\n \t\t\t//ahora podemos manipular sus propiedades\r\n \t\t\t//Seteamos el tipo de mapa\r\n \t\t\tmMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n \t\t\t//Activamos la capa o layer MyLocation\r\n \t\t\tmMap.setMyLocationEnabled(true);\r\n \t\t\t\r\n \t\t\tAgregarPuntos();\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }",
"private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\tlogger.info(\"map is null\");\n\t\t\tlogger.debug(\"maps is null\");\n\t\t\tSystem.out.println(\"map is null\");\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\taddMarker(markerLatLng);\n\t\t\t\t \n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\t\n\t\t\t// Creating an instance of MarkerOptions\n addMarker(markerLatLng);\n \n\t\t\n\t\t}\n\t}",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n\t\t\t\t\tsetUpMap();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n }\n }",
"private void setUpMapIfNeeded() {\n if ( googleMap == null) {\r\n\r\n // Try to obtain the map from the SupportMapFragment.\r\n googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.routesMap)).getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (googleMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapView2))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap( lat, longi, \"ISS/ NUS\");\n }\n }\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n setUpMap();\n\n }\n });\n }\n }\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n setUpMap();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"@SuppressLint(\"NewApi\")\n\tprivate GoogleMap setUpMapIfNeeded() {\n\t\tif (googleMap == null) {\n\n\t\t\tgoogleMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t\t.findFragmentById(R.id.map)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (googleMap != null) {\n\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n\t\t\t}\n\t\t}\n\t\treturn googleMap;\n\t}",
"private void initilizeMap() {\n\t\tif (googleMap == null) {\n\t\t\tgoogleMap = ((MapFragment) getFragmentManager().findFragmentById(\n\t\t\t\t\tR.id.map)).getMap();\n\n\t\t\tif (googleMap == null) {\n\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public boolean onLocalMapNotFound() {\n // non implementato\n return false;\n }",
"private boolean checkReady() {\n if (mMap == null) {\n Toast.makeText(this, \"Map not ready!\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }",
"@Override\n public boolean isEmpty() {\n return map.isEmpty();\n }",
"public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Log.i(TAG, \"Yes, we have a google map...\");\n setUpMap();\n } else {\n // means that Google Service is not available\n form.dispatchErrorOccurredEvent(this, \"setUpMapIfNeeded\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n }\n\n }\n }",
"@Test\n public void initializeTest()\n {\n assertEquals(0, map.size());\n }",
"@Test\n\tvoid testVerticesAndEdgesIntanceVariableNotNull() {\n\t\tAssertions.assertNotNull(map);\n\n\t}",
"public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }",
"private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"boolean hasMapID();",
"public void setUp()\n {\n map = new Map(5, 5, null);\n }",
"@Override\n\tpublic boolean isEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"@Override\n\tpublic boolean isEmpty() \n\t{\n\t\treturn this.map.isEmpty();\n\t}",
"@Test\n public void test1 ()\n {\n MyMap m = new MyMap();\n assertEquals(0, m.size());\n assertNull(m.get(\"a\"));\n }",
"public void testNormalPutNullValues()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkPutNullValues(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}",
"public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}",
"public MapManager() {\n myList = null;\n scrabbleList = null;\n }",
"private static void mapCheck(){\n\t\tfor(int x = 0; x < Params.world_width; x = x + 1){\n\t\t\tfor(int y = 0; y < Params.world_height; y = y + 1){\n\t\t\t\tif(map[x][y] > 1){\n\t\t\t\t\t//System.out.println(\"Encounter Missing. Position: (\" + x + \",\" + y + \").\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n /***** Sets up the map if it is possible to do so *****/\n public boolean setUpMapIfNeeded() {\n super.setUpMapIfNeeded();\n if (mMap != null) {\n //Shows history popover on marker clicks\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n showPopup(getContentFromMarker(marker), marker.getTitle());\n return true;\n }\n });\n return true;\n } else {\n return false;\n }\n }",
"public abstract void createMap();",
"boolean hasSimpleMap();",
"@Before\n public void initialize()\n {\n map = new MapAdapter();\n }",
"@Test\n\tvoid testEdgesNull() {\n\t\tmap.put(\"Boston\", null);\n\t\tAssertions.assertNull(map.get(\"Boston\"));\n\n\t}",
"@Test\n @DisplayName(\"nothing happens when attempting to add a null entry\")\n void nothingHappensWhenAddingANewEntry() {\n assertThat(identityMap.add((JsonObject) null), is(nullValue()));\n }",
"public void verifyMap() {\r\n // TODO: implement test to ensure that map is the same as confirmed if\r\n // its values were converted into collections.\r\n }",
"public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }",
"public Map() {\n\n\t\t}",
"@Override\n public MapLocation getMap() {\n return null;\n }",
"public boolean isEmpty() {\n return map.isEmpty();\n }",
"protected MapImpl() {\n }",
"MAP createMAP();",
"@Test\n public void fillMapIdAndCoordinateWithAttributeNull() {\n //Given\n \n String pathnameCityPlanXml = \"./ressources/fichiersTestXml/petitPlanMissingAttribute.xml\";\n Reseau resNoTronconValid = parser.parseCityPlan(pathnameCityPlanXml);\n Map map = new Map();\n \n // When\n \n map.fillMapIdAndCoordinate(resNoTronconValid);\n \n // Then\n \n assertNotNull(map);\n assertNull(map.getMapId());\n assertNull(map.getCoordinates());\n \n }",
"public static java.util.Map singletonMap(java.lang.Object arg0, java.lang.Object arg1)\n { return null; }",
"public abstract void createEmptyMap(Game game, boolean[][] landMap);",
"public abstract void createEmptyMap(Game game, boolean[][] landMap);",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif(map!=null)\n\t\t{\n\t\t\tsetup();\n\t\t}\n\t}",
"public static java.util.Map synchronizedMap(java.util.Map arg0)\n { return null; }",
"public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}",
"private void checkReverseMap() throws ApplicationException {\n if (reverseMap == null) {\n reverseMap = Data.makeReverseMap(networkIds);\n }\n }",
"public boolean isEmpty() {\n return map.isEmpty();\n }",
"public boolean isEmpty() {\r\n return this.map.isEmpty();\r\n }",
"public OwnMap() {\n super();\n keySet = new OwnSet();\n }",
"@Test\n public void testCreateHazardousMap2() {\n Map safeMap = safeCreator.createMap('s',mapSize);\n int size = safeMap.getSize();\n String type = safeMap.getType();\n assertEquals(10,size);\n assertEquals(\"Safe\",type);\n }",
"protected WumpusMap() {\n\t\t\n\t}",
"public boolean isEmpty( Map<?, ?> map ){\n if( map == null || map.isEmpty() ){\n return true;\n }\n return false;\n }",
"@Before\n public void setUp() throws Exception {\n labRat = (LinkedMap) makeEmptyMap();\n }",
"public boolean isEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"public static <K, V> Reference2ObjectMap<K, V> emptyMap() {\n/* 178 */ return EMPTY_MAP;\n/* */ }",
"public boolean\tisEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"@Test\n\tvoid testEdgesNotNull() {\n\t\tmap.put(\"Boston\", new LinkedHashSet<String>());\n\t\tAssertions.assertNotNull(map.get(\"Boston\"));\n\n\t}",
"public final synchronized boolean isEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"private void createMapView() {\n try {\n if (null == mMap) {\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();\n\n /**\n * If the map is still null after attempted initialisation,\n * show an error to the user\n */\n if (null == mMap) {\n Toast.makeText(getApplicationContext(),\n \"Error creating map\", Toast.LENGTH_SHORT).show();\n }\n }\n } catch (NullPointerException exception) {\n Log.e(\"mapApp\", exception.toString());\n }\n }",
"@Test\r\n\tpublic void testMapValidation() {\r\n\t\tAssert.assertEquals(true,mapdata.contains(worldmap.getContinents()));\r\n\t\t\n\t\tAssert.assertEquals(true,mapdata.contains(worldmap.getTerritories()));\r\n\t}",
"public MapTile() {}",
"private void intializeMap() {\n\n if (googleMap == null) {\n\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n\n\n // getPlacesMarkers();\n }\n }",
"@Test\n public void fillMapIdAndCoordinateWithBaliseMissing() {\n //Given\n String pathnameXml = \"./ressources/fichiersTestXml/petitPlanMissingBalise.xml\";\n Reseau resAttributeNull = parser.parseCityPlan(pathnameXml);\n assertNotNull(resAttributeNull);\n assertNull(resAttributeNull.getNoeud());\n Map map = new Map();\n \n // When\n \n map.fillMapIdAndCoordinate(resAttributeNull);\n \n // Then\n \n assertNotNull(map);\n assertNull(map.getMapId());\n assertNull(map.getCoordinates());\n }",
"private void initMap() {\n Log.wtf(TAG, \"initMap() has been instantiated\");\n\n Log.d(TAG, \"initMap: initializing the map...\");\n try {\n MapsInitializer.initialize(getActivity().getApplicationContext());\n } catch (Exception e) {\n e.printStackTrace();\n }\n mMapView.getMapAsync(this);\n }",
"public boolean isEmpty(){\n\t\tfor(int i = 0; i < hashMap.length; i++){\n\t\t\tif(hashMap[i]!=null){\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t\treturn(true);\n\t}",
"public boolean isNativeMaps() {\n return internalNative != null;\n }",
"private static void testMap(final OurMap<Integer, String> map) {\n System.out.printf(\"%n%s%n\", map.getClass());\n assert map.size() == 0;\n assert !map.containsKey(117);\n assert !map.containsKey(-2);\n assert map.get(117) == null;\n assert map.put(117, \"A\") == null;\n assert map.containsKey(117);\n assert map.get(117).equals(\"A\");\n assert map.put(17, \"B\") == null;\n assert map.size() == 2;\n assert map.containsKey(17);\n assert map.get(117).equals(\"A\");\n assert map.get(17).equals(\"B\");\n assert map.put(117, \"C\").equals(\"A\");\n assert map.containsKey(117);\n assert map.get(117).equals(\"C\");\n assert map.size() == 2;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n assert map.remove(117).equals(\"C\");\n assert !map.containsKey(117);\n assert map.get(117) == null;\n assert map.size() == 1;\n assert map.putIfAbsent(17, \"D\").equals(\"B\");\n assert map.get(17).equals(\"B\");\n assert map.size() == 1;\n assert map.containsKey(17);\n assert map.putIfAbsent(217, \"E\") == null;\n assert map.get(217).equals(\"E\");\n assert map.size() == 2;\n assert map.containsKey(217);\n assert map.putIfAbsent(34, \"F\") == null;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n }",
"public static java.util.Map unmodifiableMap(java.util.Map arg0)\n { return null; }",
"@Test\n public void test_ProcessedMapExists() {\n try {\n Class<?> clazz = Class.forName(ENV_PROCESSED_MAP_NAME);\n Method method = clazz.getDeclaredMethod(ENV_PROCESSED_MAP_METHOD);\n method.setAccessible(true);\n HashMap<String, String> mappings = (HashMap<String, String>) method.invoke(null);\n\n Assert.assertEquals(\"There are only 3 keys, so something went wrong\", 3, mappings.size());\n } catch (Exception ex) {\n ex.printStackTrace();\n fail(ex.getMessage());\n }\n }"
] | [
"0.6955925",
"0.6913731",
"0.6830662",
"0.682812",
"0.67842364",
"0.6771816",
"0.67221147",
"0.66862106",
"0.66731143",
"0.66731143",
"0.66731143",
"0.6671271",
"0.66408885",
"0.65998966",
"0.65788347",
"0.6572352",
"0.6562833",
"0.6547767",
"0.6538817",
"0.6522924",
"0.650995",
"0.6487882",
"0.6473735",
"0.6453581",
"0.6451312",
"0.6412517",
"0.63973033",
"0.6392068",
"0.6361693",
"0.6347104",
"0.6339484",
"0.63322616",
"0.63250107",
"0.6313424",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.62964624",
"0.629498",
"0.6286423",
"0.6274828",
"0.62188363",
"0.6205088",
"0.62019926",
"0.61959976",
"0.61526346",
"0.61411333",
"0.61040384",
"0.6091332",
"0.60781455",
"0.6056953",
"0.6047018",
"0.6046134",
"0.6041073",
"0.60389465",
"0.6018008",
"0.60118794",
"0.59846354",
"0.5984563",
"0.59341854",
"0.59329224",
"0.592073",
"0.59179986",
"0.59179986",
"0.58989406",
"0.58942145",
"0.58854073",
"0.5884424",
"0.5879043",
"0.5867608",
"0.5862053",
"0.58619124",
"0.5852979",
"0.585242",
"0.58272684",
"0.5826394",
"0.5819281",
"0.5819158",
"0.58085835",
"0.57969147",
"0.57789713",
"0.57761306",
"0.57718915",
"0.57638395",
"0.5736773",
"0.57295346",
"0.57248676",
"0.5705494",
"0.57037956",
"0.56884867",
"0.5684736"
] | 0.61415684 | 55 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.72461367",
"0.7201596",
"0.7195268",
"0.7177002",
"0.71069986",
"0.7039653",
"0.70384306",
"0.70115715",
"0.7010647",
"0.69803435",
"0.6945406",
"0.69389313",
"0.6933442",
"0.69172275",
"0.69172275",
"0.6890826",
"0.6883689",
"0.687515",
"0.6874831",
"0.68615955",
"0.68615955",
"0.68615955",
"0.68615955",
"0.68522274",
"0.6846375",
"0.68189865",
"0.68165565",
"0.68124795",
"0.6812267",
"0.6812267",
"0.68056566",
"0.6800461",
"0.6797465",
"0.6790805",
"0.6789039",
"0.6787885",
"0.6782993",
"0.67597246",
"0.67570525",
"0.6747535",
"0.6743268",
"0.6743268",
"0.6740546",
"0.67395175",
"0.67256093",
"0.6723954",
"0.6722248",
"0.6722248",
"0.6720444",
"0.67118156",
"0.6706721",
"0.6704184",
"0.66993994",
"0.66988564",
"0.669681",
"0.66943884",
"0.66860807",
"0.668306",
"0.668306",
"0.6682587",
"0.668012",
"0.6678661",
"0.6676379",
"0.6668044",
"0.66669863",
"0.66628903",
"0.6657356",
"0.6657356",
"0.6657356",
"0.66565585",
"0.665397",
"0.665397",
"0.665397",
"0.66525495",
"0.66518986",
"0.66496557",
"0.6648199",
"0.6646489",
"0.66462386",
"0.6646177",
"0.6645531",
"0.66453475",
"0.66446036",
"0.66438025",
"0.6642411",
"0.6641632",
"0.6638948",
"0.6634394",
"0.66336566",
"0.6632082",
"0.66315377",
"0.66315377",
"0.66315377",
"0.6628936",
"0.6627818",
"0.6627061",
"0.66256744",
"0.6623986",
"0.661993",
"0.6618369",
"0.6618369"
] | 0.0 | -1 |
/ renamed from: a | private static final Account m22607a(IBinder iBinder) {
scb scb;
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.common.internal.IAccountAccessor");
if (queryLocalInterface instanceof scb) {
scb = (scb) queryLocalInterface;
} else {
scb = new sbz(iBinder);
}
return rzw.m34723a(scb);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] | 0.0 | -1 |
/ renamed from: a | public final Account mo17822a() {
return m22607a(this.f30231e);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] | 0.0 | -1 |
/ renamed from: a | public final void mo17823a(Collection collection) {
this.f30232f = (Scope[]) collection.toArray(new Scope[collection.size()]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] | 0.0 | -1 |
todo: timestamp necessary? pauses task and returns time from when to resume | public String pause(final String id) {
log.debug("Pause task[%s]", id);
try {
final FullResponseHolder response = submitRequestWithEmptyContent(
id,
HttpMethod.POST,
"pause",
null,
true
);
final HttpResponseStatus responseStatus = response.getStatus();
final String responseContent = response.getContent();
if (responseStatus.equals(HttpResponseStatus.OK)) {
log.info("Task [%s] paused successfully", id);
return deserialize(responseContent, String.class);
} else if (responseStatus.equals(HttpResponseStatus.ACCEPTED)) {
// The task received the pause request, but its status hasn't been changed yet.
while (true) {
final PubSubIndexTaskRunner.Status status = getStatus(id);
if (status == PubSubIndexTaskRunner.Status.PAUSED) {
return getCurrentTimestamp(id, true);
}
final Duration delay = newRetryPolicy().getAndIncrementRetryDelay();
if (delay == null) {
throw new ISE(
"Task [%s] failed to change its status from [%s] to [%s], aborting",
id,
status,
PubSubIndexTaskRunner.Status.PAUSED
);
} else {
final long sleepTime = delay.getMillis();
log.info(
"Still waiting for task [%s] to change its status to [%s]; will try again in [%s]",
id,
PubSubIndexTaskRunner.Status.PAUSED,
new Duration(sleepTime).toString()
);
Thread.sleep(sleepTime);
}
}
} else {
throw new ISE(
"Pause request for task [%s] failed with response [%s] : [%s]",
id,
responseStatus,
responseContent
);
}
} catch (NoTaskLocationException e) {
log.error("Exception [%s] while pausing Task [%s]", e.getMessage(), id);
return "";
} catch (IOException | InterruptedException e) {
throw new RE(e, "Exception [%s] while pausing Task [%s]", e.getMessage(), id);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resume()\r\n {\n timerStart(); // ...Restarts the update timer.\r\n }",
"public void resume() {}",
"public void resume()\r\n {\r\n\t timer.start();\r\n }",
"void resume();",
"void resume();",
"void resume();",
"public void resume();",
"@Override\n\tpublic void pause() {\n\t\tstopTask();\n\t}",
"public void pauseMyTask() {\n pause = true;\n }",
"@Override\n public void resume() { }",
"@Override\n public void resume() {\n }",
"public void resume() throws NotYetPausedException;",
"@Override\n public void resume() {\n }",
"@Override\n public void resume() {\n }",
"@Override\n public void resume() {\n }",
"protected void resumeAfter(long seconds) {\n task.resumeAfter(seconds);\n }",
"public abstract void resume();",
"@Override\r\n public void resume() {\n }",
"@Override\r\n public void resume() {\n }",
"@Override\r\n public void resume() {\n }",
"public void resume() {\n }",
"@Override\n public void resume() {\n\n }",
"@Override\n public void resume() {\n\n }",
"@Override\n public void resume() {\n\n }",
"public void pause() {\n executor.submit(new Runnable() {\n public void run() {\n resume = false;\n pauseNoWait();\n }\n });\n }",
"protected abstract boolean resume();",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"public void pause() {\n cancelCallback();\n mStartTimeMillis *= -1;\n }",
"@Override\n public void resume() {\n \n }",
"@Override\n\tpublic void resume() {\n\t}",
"@Override\n\tpublic void resume() {\n\t}",
"@Override\n\tpublic void resume() {\n\t}",
"@Override\n\tpublic void resume() {\n\t}",
"@Override\n\tpublic void resume() {\n\t}",
"@Override\r\n public void resume() {\r\n\r\n }",
"DurationTracker timeSpentTaskWait();",
"@Override\n\t\tpublic void resume() {\n\t\t \n\t\t}",
"@Override\r\n\tpublic void resume() {\n\t}",
"@Override\n public void resume() {\n \n }",
"@Override\n public void resume() {\n // Not used\n }",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\n\tpublic void resume() \n\t{\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume()\n\t{\n\n\t}",
"@Override\n T resume();",
"@Override\r\n\tpublic void resume() {\n\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\r\n\t}"
] | [
"0.6877578",
"0.68712705",
"0.6816398",
"0.67645425",
"0.67645425",
"0.67645425",
"0.6717443",
"0.666609",
"0.66002154",
"0.65592444",
"0.6484822",
"0.64609873",
"0.64556223",
"0.64556223",
"0.64556223",
"0.64383423",
"0.6434319",
"0.6428111",
"0.6428111",
"0.6428111",
"0.64236426",
"0.6417448",
"0.6417448",
"0.6417448",
"0.64145803",
"0.64007795",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6398218",
"0.6394934",
"0.6389427",
"0.6382226",
"0.6382226",
"0.6382226",
"0.6382226",
"0.6382226",
"0.6374795",
"0.6368848",
"0.6360083",
"0.6356733",
"0.63492167",
"0.63138336",
"0.63048476",
"0.63048476",
"0.63048476",
"0.63048476",
"0.63048476",
"0.63048476",
"0.63048476",
"0.63048476",
"0.63048476",
"0.63048476",
"0.62971914",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.629166",
"0.62713885",
"0.623499",
"0.62342817",
"0.62342817",
"0.62342817",
"0.62342817",
"0.62342817",
"0.62342817",
"0.62342817"
] | 0.0 | -1 |
All below query are same. Derived quries | List<Menu> findByHotelHotelName(String hotelName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testDAM31201001() {\n // In this test case the where clause is specified in a common sql shared in multiple queries.\n testDAM30505001();\n }",
"public void testProductInstanceAttributeQuery() {\n\n String\tsql\t= \"SELECT p.M_Product_ID, p.Discontinued, p.Value, p.Name, BOM_Qty_Available(p.M_Product_ID,?) AS QtyAvailable, bomQtyList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd, BOM_Qty_OnHand(p.M_Product_ID,?) AS QtyOnHand, BOM_Qty_Reserved(p.M_Product_ID,?) AS QtyReserved, BOM_Qty_Ordered(p.M_Product_ID,?) AS QtyOrdered, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin, bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit, pa.IsInstanceAttribute FROM M_Product p INNER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID) LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID) WHERE p.IsSummary='N' AND p.IsActive='Y' AND pr.IsActive='Y' AND pr.M_PriceList_Version_ID=? AND EXISTS (SELECT * FROM M_Storage s INNER JOIN M_AttributeSetInstance asi ON (s.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) WHERE s.M_Product_ID=p.M_Product_ID AND asi.SerNo LIKE '33' AND asi.Lot LIKE '33' AND asi.M_Lot_ID=101 AND TRUNC(asi.GuaranteeDate)<TO_DATE('2003-10-16','YYYY-MM-DD') AND asi.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=103 AND Value LIKE '33') AND (M_Attribute_ID=102 AND M_AttributeValue_ID=106))) AND p.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=101 AND M_AttributeValue_ID=105) AND (M_Attribute_ID=100 AND M_AttributeValue_ID=102)) AND p.AD_Client_ID IN(0,11) AND p.AD_Org_ID IN(0,11,12) ORDER BY QtyAvailable DESC, Margin DESC\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[M_AttributeInstance|M_Storage=s,M_AttributeSetInstance=asi|M_AttributeInstance|M_Product=p,M_ProductPrice=pr,M_AttributeSet=pa|3]\", fixture.toString());\n }",
"@Override\n @Test\n public void testQuery_advancedRankingWithJoin() throws Exception { }",
"protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) {\r\n }",
"private MetaSparqlRequest createQueryMT2() {\n\t\treturn createQueryMT1();\n\t}",
"@Test\n public void testPlan3() {\n CalciteAssert.that().with(FOODMART_CLONE).query(\"select \\\"store\\\".\\\"store_country\\\" as \\\"c0\\\", sum(\\\"inventory_fact_1997\\\".\\\"supply_time\\\") as \\\"m0\\\" from \\\"store\\\" as \\\"store\\\", \\\"inventory_fact_1997\\\" as \\\"inventory_fact_1997\\\" where \\\"inventory_fact_1997\\\".\\\"store_id\\\" = \\\"store\\\".\\\"store_id\\\" group by \\\"store\\\".\\\"store_country\\\"\").planContains(\" left.join(right, new org.apache.calcite.linq4j.function.Function1() {\\n\");\n }",
"private void montaQuery(Publicacao object, Query q) {\t\t\n\t}",
"public void testQuery() throws Exception {\n DummyApprovalRequest req1 = new DummyApprovalRequest(reqadmin, null, caid, SecConst.EMPTY_ENDENTITYPROFILE, false);\n DummyApprovalRequest req2 = new DummyApprovalRequest(admin1, null, caid, SecConst.EMPTY_ENDENTITYPROFILE, false);\n DummyApprovalRequest req3 = new DummyApprovalRequest(admin2, null, 3, 2, false);\n\n approvalSessionRemote.addApprovalRequest(admin1, req1, gc);\n approvalSessionRemote.addApprovalRequest(admin1, req2, gc);\n approvalSessionRemote.addApprovalRequest(admin1, req3, gc);\n\n // Make som queries\n Query q1 = new Query(Query.TYPE_APPROVALQUERY);\n q1.add(ApprovalMatch.MATCH_WITH_APPROVALTYPE, BasicMatch.MATCH_TYPE_EQUALS, \"\" + req1.getApprovalType());\n\n List result = approvalSessionRemote.query(admin1, q1, 0, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 2 && result.size() <= 3);\n\n result = approvalSessionRemote.query(admin1, q1, 1, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 1 && result.size() <= 3);\n\n result = approvalSessionRemote.query(admin1, q1, 0, 1, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() == 1);\n\n Query q2 = new Query(Query.TYPE_APPROVALQUERY);\n q2.add(ApprovalMatch.MATCH_WITH_STATUS, BasicMatch.MATCH_TYPE_EQUALS, \"\" + ApprovalDataVO.STATUS_WAITINGFORAPPROVAL, Query.CONNECTOR_AND);\n q2.add(ApprovalMatch.MATCH_WITH_REQUESTADMINCERTSERIALNUMBER, BasicMatch.MATCH_TYPE_EQUALS, reqadmincert.getSerialNumber().toString(16));\n\n result = approvalSessionRemote.query(admin1, q1, 1, 3, \"cAId=\" + caid, \"(endEntityProfileId=\" + SecConst.EMPTY_ENDENTITYPROFILE + \")\");\n assertTrue(\"Result size \" + result.size(), result.size() >= 1 && result.size() <= 3);\n\n // Remove the requests\n int id1 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req1.generateApprovalId()).iterator().next()).getId();\n int id2 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req2.generateApprovalId()).iterator().next()).getId();\n int id3 = ((ApprovalDataVO) approvalSessionRemote.findApprovalDataVO(admin1, req3.generateApprovalId()).iterator().next()).getId();\n approvalSessionRemote.removeApprovalRequest(admin1, id1);\n approvalSessionRemote.removeApprovalRequest(admin1, id2);\n approvalSessionRemote.removeApprovalRequest(admin1, id3);\n }",
"@Override\r\n\t\t\tpublic double matchingItems(Query query) {\n\t\t\t\treturn 0;\r\n\t\t\t}",
"public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}",
"protected abstract Object calcJoinRow();",
"@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}",
"default List<Source> representativeTypicalityQuery(Set<Source> resultSet, Set<String> domain){\n return representativeTypicalityQuery(5/*optimization: 5 most typical are enough*/, resultSet, domain);\n }",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"SELECT * FROM join SELECT * FROM as SELECT * FROM on SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .SELECT * FROM = SELECT * FROM .SELECT * FROM and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null and SELECT * FROM .null = SELECT * FROM .null\");\n assertTrue(boolean0);\n }",
"@Test\n public void testQueryMore3() throws Exception {\n testQueryMore(false, false);\n }",
"@Test\n public void testQueryOnHeterogenousObjects() throws Exception {\n DefaultQueryService.TEST_QUERY_HETEROGENEOUS_OBJECTS = true;\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n for (int i = 0; i < 5; ++i) {\n Portfolio p = new Portfolio(i + 1);\n region.put(i + 1, p);\n }\n\n for (int i = 5; i < 10; ++i) {\n region.put(i + 1, i + 1);\n }\n String queryStr =\n \"Select distinct * from \" + SEPARATOR + \"portfolio1 pf1 where pf1.getID() > 3\";\n Query q = qs.newQuery(queryStr);\n SelectResults rs = (SelectResults) q.execute();\n assertEquals(2, rs.size());\n Iterator itr = rs.iterator();\n while (itr.hasNext()) {\n Portfolio p = (Portfolio) itr.next();\n assertTrue(p == region.get(4) || p == region.get(5));\n }\n\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID()\", SEPARATOR + \"portfolio1 pf\");\n QueryObserver old = QueryObserverHolder.setInstance(new QueryObserverAdapter() {\n private boolean indexUsed = false;\n\n @Override\n public void beforeIndexLookup(Index index, int oper, Object key) {\n indexUsed = true;\n }\n\n @Override\n public void endQuery() {\n assertTrue(indexUsed);\n }\n });\n\n rs = (SelectResults) q.execute();\n assertEquals(2, rs.size());\n itr = rs.iterator();\n while (itr.hasNext()) {\n Portfolio p = (Portfolio) itr.next();\n assertTrue(p == region.get(4) || p == region.get(5));\n }\n qs.removeIndex(i1);\n\n queryStr = \"Select distinct * from \" + SEPARATOR + \"portfolio1 pf1 where pf1.pkid > '3'\";\n q = qs.newQuery(queryStr);\n rs = (SelectResults) q.execute();\n assertEquals(2, rs.size());\n itr = rs.iterator();\n while (itr.hasNext()) {\n Portfolio p = (Portfolio) itr.next();\n assertTrue(p == region.get(4) || p == region.get(5));\n }\n\n i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.pkid\", SEPARATOR + \"portfolio1 pf\");\n QueryObserverHolder.setInstance(new QueryObserverAdapter() {\n private boolean indexUsed = false;\n\n @Override\n public void beforeIndexLookup(Index index, int oper, Object key) {\n indexUsed = true;\n }\n\n @Override\n public void endQuery() {\n assertTrue(indexUsed);\n }\n });\n\n rs = (SelectResults) q.execute();\n assertEquals(2, rs.size());\n itr = rs.iterator();\n while (itr.hasNext()) {\n Portfolio p = (Portfolio) itr.next();\n assertTrue(p == region.get(4) || p == region.get(5));\n }\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"@Test\n public void testQueryMore4() throws Exception {\n testQueryMore(true, false);\n }",
"@Override\n\tpublic boolean hasSubquery() {\n\t\treturn false;\n\t}",
"@Test\n public void testHeterogeneousSegmentFilterConditionLimit() throws SqlParseException {\n\n val project = \"heterogeneous_segment\";\n // val dfId = \"747f864b-9721-4b97-acde-0aa8e8656cba\"\n // val seg1Id = \"8892fa3f-f607-4eec-8159-7c5ae2f16942\"\n // val seg2Id = \"d75a822c-788a-4592-a500-cf20186dded1\"\n // val seg3Id = \"54eaf96d-6146-45d2-b94e-d5d187f89919\"\n // val seg4Id = \"411f40b9-a80a-4453-90a9-409aac6f7632\"\n // val seg5Id = \"a8318597-cb75-416f-8eb8-96ea285dd2b4\"\n // \n val sql = \"with T1 as (select cal_dt, trans_id \\n\" + \"from test_kylin_fact inner join test_account \\n\"\n + \"on test_kylin_fact.seller_id = test_account.account_id \\n\"\n + \"where cal_dt between date'2012-01-01' and date'2012-01-03'\\n\" + \"group by cal_dt, trans_id)\\n\";\n\n {\n val sqlWithTooManyOrs = sql + \" select * from T1 where \" + \"(cal_dt='2012-01-01' and trans_id = 1) or \\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 2) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 3) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 4) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 5) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 6) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 7) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 8) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 9) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 10) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 12) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 13) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 14) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 15) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 16) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 17) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 18) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 19) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 20)\";\n val contexts = OlapContextTestUtil.getOlapContexts(project, sqlWithTooManyOrs);\n Assert.assertEquals(\n \">=(DEFAULT.TEST_KYLIN_FACT.CAL_DT, 2012-01-01),<=(DEFAULT.TEST_KYLIN_FACT.CAL_DT, 2012-01-03)\",\n contexts.get(0).getExpandedFilterConditions().stream().map(RexNode::toString)\n .collect(Collectors.joining(\",\")));\n }\n\n {\n val sqlWithFilter = sql + \" select * from T1 where \" + \"(cal_dt='2012-01-01' and trans_id = 1) or \\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 2) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 3) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 4) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 5) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 6) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 7) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 8) or\\n\" + \"(cal_dt='2012-01-01' and trans_id = 9) or\\n\"\n + \"(cal_dt='2012-01-01' and trans_id = 10)\";\n val contexts = OlapContextTestUtil.getOlapContexts(project, sqlWithFilter);\n Assert.assertNotEquals(\n \">=(DEFAULT.TEST_KYLIN_FACT.CAL_DT, 2012-01-01),<=(DEFAULT.TEST_KYLIN_FACT.CAL_DT, 2012-01-03)\",\n contexts.get(0).getExpandedFilterConditions().stream().map(RexNode::toString)\n .collect(Collectors.joining(\",\")));\n }\n\n }",
"@Test\n public void complex_subQuery() {\n NumberPath<BigDecimal> sal = Expressions.numberPath(BigDecimal.class, \"sal\");\n // alias for the subquery\n PathBuilder<BigDecimal> sq = new PathBuilder<BigDecimal>(BigDecimal.class, \"sq\");\n // query execution\n query().from(query().from(Constants.employee).select(Constants.employee.salary.add(Constants.employee.salary).add(Constants.employee.salary).as(sal)).as(sq)).select(sq.get(sal).avg(), sq.get(sal).min(), sq.get(sal).max()).fetch();\n }",
"@Test\n public void testSqlExistsBasedJoin() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Map<Car, Set<Garage>> results = new LinkedHashMap<Car, Set<Garage>>();\n for (Car car : cars.retrieve(carsQuery)) {\n Query<Garage> garagesWhichServiceThisCarInDublin\n = and(equal(Garage.BRANDS_SERVICED, car.name), equal(Garage.LOCATION, \"Dublin\"));\n for (Garage garage : garages.retrieve(garagesWhichServiceThisCarInDublin)) {\n Set<Garage> garagesWhichCanServiceThisCar = results.get(car);\n if (garagesWhichCanServiceThisCar == null) {\n garagesWhichCanServiceThisCar = new LinkedHashSet<Garage>();\n results.put(car, garagesWhichCanServiceThisCar);\n }\n garagesWhichCanServiceThisCar.add(garage);\n }\n }\n\n assertEquals(\"join results should contain 2 cars\", 2, results.size());\n Assert.assertTrue(\"join results should contain car1\", results.containsKey(car1));\n Assert.assertTrue(\"join results should contain car4\", results.containsKey(car4));\n\n assertEquals(\"join results for car1\", asSet(garage3, garage4), results.get(car1));\n assertEquals(\"join results for car4\", asSet(garage2), results.get(car4));\n }",
"private SelectOnConditionStep<Record> commonTestItemDslSelect() {\n\t\treturn dsl.select().from(TEST_ITEM).join(TEST_ITEM_RESULTS).on(TEST_ITEM.ITEM_ID.eq(TEST_ITEM_RESULTS.RESULT_ID));\n\t}",
"@Test\n public void twoColumns_and_projection() {\n for (Tuple row : query().from(Constants.survey).select(Constants.survey.id, Constants.survey.name, new QIdName(Constants.survey.id, Constants.survey.name)).fetch()) {\n Assert.assertEquals(3, row.size());\n Assert.assertEquals(Integer.class, row.get(0, Object.class).getClass());\n Assert.assertEquals(String.class, row.get(1, Object.class).getClass());\n Assert.assertEquals(IdName.class, row.get(2, Object.class).getClass());\n }\n }",
"public static void main(String args[]){\n String sql = \"select * from TBLS limit 2\";\n String sqlComplex = \"select testpartition.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from testpartition join format_ on (testpartition.filename=format_.s) \" +\n \"join title on (testpartition.filename=title.s) \" +\n \"join identifier on (testpartition.filename=identifier.s) \" +\n \"join id on (testpartition.filename=id.s) \" +\n \"join date_ on (testpartition.filename=date_.s) \" +\n \"where testpartition.gid0=1 and testpartition.sid=2 and testpartition.fid<100000 and testpartition.pfid=0\";\n String sqlOriginal = \"select idTable.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from idTable join format_ on (idTable.filename=format_.s) \" +\n \"join title on (idTable.filename=title.s) \" +\n \"join identifier on (idTable.filename=identifier.s) \" +\n \"join id on (idTable.filename=id.s) \" +\n \"join date_ on (idTable.filename=date_.s) \" +\n \"where idTable.gid0=1 and idTable.sid=2 and idTable.fid<100000\";\n\n QueryRewrite my = new QueryRewrite(sqlOriginal);\n String sqlRewrite = my.rewrite();\n System.out.println(sqlRewrite);\n\n\n }",
"@Test\n public void testSelectTrimFamilyWithParameters()\n {\n\n testQuery(\n \"SELECT\\n\"\n + \"TRIM(BOTH ? FROM ?),\\n\"\n + \"TRIM(TRAILING ? FROM ?),\\n\"\n + \"TRIM(? FROM ?),\\n\"\n + \"TRIM(TRAILING FROM ?),\\n\"\n + \"TRIM(?),\\n\"\n + \"BTRIM(?),\\n\"\n + \"BTRIM(?, ?),\\n\"\n + \"LTRIM(?),\\n\"\n + \"LTRIM(?, ?),\\n\"\n + \"RTRIM(?),\\n\"\n + \"RTRIM(?, ?),\\n\"\n + \"COUNT(*)\\n\"\n + \"FROM foo\",\n ImmutableList.of(\n Druids.newTimeseriesQueryBuilder()\n .dataSource(CalciteTests.DATASOURCE1)\n .intervals(querySegmentSpec(Filtration.eternity()))\n .granularity(Granularities.ALL)\n .aggregators(aggregators(new CountAggregatorFactory(\"a0\")))\n .postAggregators(\n expressionPostAgg(\"p0\", \"'foo'\"),\n expressionPostAgg(\"p1\", \"'xfoo'\"),\n expressionPostAgg(\"p2\", \"'foo'\"),\n expressionPostAgg(\"p3\", \"' foo'\"),\n expressionPostAgg(\"p4\", \"'foo'\"),\n expressionPostAgg(\"p5\", \"'foo'\"),\n expressionPostAgg(\"p6\", \"'foo'\"),\n expressionPostAgg(\"p7\", \"'foo '\"),\n expressionPostAgg(\"p8\", \"'foox'\"),\n expressionPostAgg(\"p9\", \"' foo'\"),\n expressionPostAgg(\"p10\", \"'xfoo'\")\n )\n .context(QUERY_CONTEXT_DEFAULT)\n .build()\n ),\n ImmutableList.of(\n new Object[]{\"foo\", \"xfoo\", \"foo\", \" foo\", \"foo\", \"foo\", \"foo\", \"foo \", \"foox\", \" foo\", \"xfoo\", 6L}\n ),\n ImmutableList.of(\n new SqlParameter(SqlType.VARCHAR, \"x\"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \"x\"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \" \"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \"x\"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \"x\"),\n new SqlParameter(SqlType.VARCHAR, \" foo \"),\n new SqlParameter(SqlType.VARCHAR, \"xfoox\"),\n new SqlParameter(SqlType.VARCHAR, \"x\")\n )\n );\n }",
"public long executeSQL04() {\n long count = records.stream().filter(x -> x.getSource().equals(\"b\")).filter(x -> !x.getDestination().equals(\"f\")\n && !x.getDestination().equals(\"h\")).filter(x -> x.getType().equals(\"n\")).filter(x -> x.getCustoms().equals(\"n\")).count();\n System.out.println(\"SQL 4: \" + count);\n return count;\n }",
"@Test\n\tpublic void testQuery1() {\n\t}",
"private void getSelectStatements()\n\t{\n\t\tString[] sqlIn = new String[] {m_sqlOriginal};\n\t\tString[] sqlOut = null;\n\t\ttry\n\t\t{\n\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\tthrow new IllegalArgumentException(m_sqlOriginal);\n\t\t}\n\t\t//\ta sub-query was found\n\t\twhile (sqlIn.length != sqlOut.length)\n\t\t{\n\t\t\tsqlIn = sqlOut;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\t\tthrow new IllegalArgumentException(sqlOut.length + \": \"+ m_sqlOriginal);\n\t\t\t}\n\t\t}\n\t\tm_sql = sqlOut;\n\t\t/** List & check **\n\t\tfor (int i = 0; i < m_sql.length; i++)\n\t\t{\n\t\t\tif (m_sql[i].indexOf(\"SELECT \",2) != -1)\n\t\t\t\tlog.log(Level.SEVERE, \"#\" + i + \" Has embedded SQL - \" + m_sql[i]);\n\t\t\telse\n\t\t\t\tlog.fine(\"#\" + i + \" - \" + m_sql[i]);\n\t\t}\n\t\t/** **/\n\t}",
"@Test\n public void testQueryMore1() throws Exception {\n testQueryMore(true, true);\n }",
"public Query advancedQuery() \n {\n return null;\n }",
"@Test\n public void testQueryMore2() throws Exception {\n testQueryMore(false, true);\n }",
"public abstract long mo20901UQ();",
"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 }",
"public aql k()\r\n/* 114: */ {\r\n/* 115:126 */ return aql.b;\r\n/* 116: */ }",
"public void testRawQuery() {\n Random random = new Random();\n ContentValues values1 = makeServiceStateValues(random, mBaseDb);\n final long row1 = mBaseDb.insert(TBL_SERVICE_STATE, null, values1);\n ContentValues values2 = makeServiceStateValues(random, mBaseDb);\n final long row2 = mBaseDb.insert(TBL_SERVICE_STATE, null, values2);\n\n // query tuple\n ServiceStateTable table = new ServiceStateTable();\n String sql = \"SELECT * FROM \" + TBL_SERVICE_STATE + \" WHERE \" + COL_ID + \" = ?\";\n String[] selectionArgs = { String.valueOf(row1) };\n List<ServiceStateTuple> tuples = table.rawQuery(mTestContext, sql, selectionArgs);\n\n // verify values\n assertNotNull(tuples);\n // klocwork\n if (tuples == null) return;\n assertFalse(tuples.isEmpty());\n assertEquals(1, tuples.size());\n ServiceStateTuple tuple = tuples.get(0);\n assertValuesTuple(row1, values1, tuple);\n }",
"private MetaSparqlRequest createQueryMT3() {\n\t\t\treturn createQueryMT1();\n\t\t}",
"@Override\n\tpublic void queryData() {\n\t\t\n\t}",
"@Test\n\tpublic void facetNarrowBysResultInCorrectProductCounts() {\n\t}",
"@Override\n @Test\n public void testQuery_invalidAdvancedRankingWithChildrenRankingSignals() throws Exception { }",
"String limitSubquery();",
"@Override\n public void func_104112_b() {\n \n }",
"private void addQueries(String query){\n ArrayList <String> idsFullSet = new ArrayList <String>(searchIDs);\n while(idsFullSet.size() > 0){\n ArrayList <String> idsSmallSet = new ArrayList <String>(); \n if(debugMode) {\n System.out.println(\"\\t Pmids not used in query available : \" + idsFullSet.size());\n }\n idsSmallSet.addAll(idsFullSet.subList(0,Math.min(getSearchIdsLimit(), idsFullSet.size())));\n idsFullSet.removeAll(idsSmallSet);\n String idsConstrain =\"\";\n idsConstrain = idsConstrain(idsSmallSet);\n addQuery(query,idsConstrain);\n }\n }",
"public void testGetVersion() {\n // create some sample data\n pm.currentTransaction().begin();\n VersionedPCPoint pt1 = new VersionedPCPoint(1, 2);\n pm.makePersistent(pt1);\n pm.currentTransaction().commit();\n Object id = pm.getObjectId(pt1);\n\n try {\n // query 1\n List<Long> expectedResult1 = Arrays.asList(Long.valueOf(1));\n\n JDOQLTypedQuery<VersionedPCPoint> query = getPM().newJDOQLTypedQuery(VersionedPCPoint.class);\n QVersionedPCPoint cand = QVersionedPCPoint.candidate();\n query.result(false, cand.jdoVersion());\n\n QueryElementHolder<VersionedPCPoint> holder =\n new QueryElementHolder<>(\n /*UNIQUE*/ null,\n /*RESULT*/ \"JDOHelper.getVersion(this)\",\n /*INTO*/ null,\n /*FROM*/ VersionedPCPoint.class,\n /*EXCLUDE*/ null,\n /*WHERE*/ null,\n /*VARIABLES*/ null,\n /*PARAMETERS*/ null,\n /*IMPORTS*/ null,\n /*GROUP BY*/ null,\n /*ORDER BY*/ null,\n /*FROM*/ null,\n /*TO*/ null,\n /*JDOQLTyped*/ query,\n /*paramValues*/ null);\n\n executeAPIQuery(ASSERTION_FAILED, holder, expectedResult1);\n executeSingleStringQuery(ASSERTION_FAILED, holder, expectedResult1);\n // executeJDOQLTypedQuery(ASSERTION_FAILED, holder, Long.class, expectedResult1);\n\n // query 2\n List<VersionedPCPoint> expectedResult2 =\n getExpectedResult(false, VersionedPCPoint.class, \"x == 1\");\n\n query = getPM().newJDOQLTypedQuery(VersionedPCPoint.class);\n cand = QVersionedPCPoint.candidate();\n Expression<Object> ver = query.parameter(\"ver\", Object.class);\n query.filter(cand.jdoVersion().eq(ver));\n\n Map<String, Object> paramValues = new HashMap<>();\n paramValues.put(\"ver\", Long.valueOf(1));\n\n holder =\n new QueryElementHolder<>(\n /*UNIQUE*/ null,\n /*RESULT*/ null,\n /*INTO*/ null,\n /*FROM*/ VersionedPCPoint.class,\n /*EXCLUDE*/ null,\n /*WHERE*/ \"JDOHelper.getVersion(this) == ver\",\n /*VARIABLES*/ null,\n /*PARAMETERS*/ \"Long ver\",\n /*IMPORTS*/ null,\n /*GROUP BY*/ null,\n /*ORDER BY*/ null,\n /*FROM*/ null,\n /*TO*/ null,\n /*JDOQLTyped*/ query,\n /*paramValues*/ paramValues);\n\n executeAPIQuery(ASSERTION_FAILED, holder, expectedResult2);\n executeSingleStringQuery(ASSERTION_FAILED, holder, expectedResult2);\n executeJDOQLTypedQuery(ASSERTION_FAILED, holder, expectedResult2);\n\n } finally {\n pm.currentTransaction().begin();\n pm.deletePersistent(pm.getObjectById(id));\n pm.currentTransaction().commit();\n }\n }",
"public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }",
"@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test Criteria Query with Projection with Address 04\")\n public void testCriteriaQueryWithProjectionWithAddress04()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n List<Long> addresses = null;\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n Transaction transaction = null;\n try {\n transaction = session.beginTransaction();\n\n CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();\n CriteriaQuery<Long> criteriaQuery = criteriaBuilder.createQuery(Long.class);\n Root<SBAddress04> root = criteriaQuery.from(SBAddress04.class);\n\n criteriaQuery.select(criteriaBuilder.count(root));\n\n Query query = session.createQuery(criteriaQuery);\n\n addresses = query.list();\n\n transaction.commit();\n\n addresses.forEach(System.out::println);\n\n } catch (Exception e) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n\n } catch (Throwable throwable) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Address : \" + addresses.size());\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }",
"public Query() {\n\n// oriToRwt = new HashMap();\n// oriToRwt.put(); // TODO\n }",
"@Test\n public void projection_and_twoColumns() {\n for (Tuple row : query().from(Constants.survey).select(new QIdName(Constants.survey.id, Constants.survey.name), Constants.survey.id, Constants.survey.name).fetch()) {\n Assert.assertEquals(3, row.size());\n Assert.assertEquals(IdName.class, row.get(0, Object.class).getClass());\n Assert.assertEquals(Integer.class, row.get(1, Object.class).getClass());\n Assert.assertEquals(String.class, row.get(2, Object.class).getClass());\n }\n }",
"public void testProductAttributeQuery() {\n\n String\tsql\t= \"SELECT p.M_Product_ID, p.Discontinued, p.Value, p.Name, BOM_Qty_Available(p.M_Product_ID,?) AS QtyAvailable, bomQtyList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd, BOM_Qty_OnHand(p.M_Product_ID,?) AS QtyOnHand, BOM_Qty_Reserved(p.M_Product_ID,?) AS QtyReserved, BOM_Qty_Ordered(p.M_Product_ID,?) AS QtyOrdered, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin, bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit, pa.IsInstanceAttribute FROM M_Product p INNER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID) LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID) WHERE p.IsSummary='N' AND p.IsActive='Y' AND pr.IsActive='Y' AND pr.M_PriceList_Version_ID=? AND p.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=100 AND M_AttributeValue_ID=101)) ORDER BY QtyAvailable DESC, Margin DESC\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[M_AttributeInstance|M_Product=p,M_ProductPrice=pr,M_AttributeSet=pa|1]\", fixture.toString());\n }",
"@Test\n @Ignore\n public void testReplaceCommonSubexpression() throws Exception {\n\n checkPlanning( ProjectRemoveRule.INSTANCE, \"select d1.deptno from (select * from dept) d1, (select * from dept) d2\" );\n }",
"@Test\n public void example13 () throws Exception {\n Map<String, Stmt> inputs = example2setup();\n conn.setNamespace(\"ex\", \"http://example.org/people/\");\n conn.setNamespace(\"ont\", \"http://example.org/ontology/\");\n String prefix = \"PREFIX ont: \" + \"<http://example.org/ontology/>\\n\";\n \n String queryString = \"select ?s ?p ?o where { ?s ?p ?o} \";\n TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"SELECT result:\", inputs.values(),\n statementSet(tupleQuery.evaluate()));\n \n assertTrue(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"Alice\\\" } \").evaluate());\n assertFalse(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"NOT Alice\\\" } \").evaluate());\n \n queryString = \"construct {?s ?p ?o} where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery constructQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Construct result\",\n mapKeep(new String[] {\"an\"}, inputs).values(),\n statementSet(constructQuery.evaluate()));\n \n queryString = \"describe ?s where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery describeQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Describe result\",\n mapKeep(new String[] {\"an\", \"at\"}, inputs).values(),\n statementSet(describeQuery.evaluate()));\n }",
"@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test HQL Query with Criteria Query for Multiple where with Address 04\")\n public void testHQLQueryWithCriteriaQueryForMultipleWhereWithAddress04()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n List<SBAddress04> addresses = null;\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n Transaction transaction = null;\n try {\n transaction = session.beginTransaction();\n\n CriteriaBuilder criteriaBuilder = session.getCriteriaBuilder();\n CriteriaQuery<SBAddress04> criteriaQuery = criteriaBuilder.createQuery(SBAddress04.class);\n Root<SBAddress04> root = criteriaQuery.from(SBAddress04.class);\n\n// criteriaQuery.select(root)\n// .where(criteriaBuilder.equal(root.get(\"address04Zip\"),\"292000\"))\n// .where(criteriaBuilder.like(root.get(\"address04City\"),\"Hikkaduwa\"));\n\n Predicate[] predicates = new Predicate[2];\n predicates[0] = criteriaBuilder.equal(root.get(\"address04Zip\"),\"292000\");\n predicates[1] = criteriaBuilder.like(root.get(\"address04City\"),\"Hikkaduwa\");\n\n //AND\n// criteriaQuery.select(root)\n// .where(predicates);\n\n //OR\n// criteriaQuery.select(root)\n// .where(criteriaBuilder.or(predicates[0],predicates[1]));\n\n //AND\n criteriaQuery.select(root)\n .where(criteriaBuilder.and(predicates[0],predicates[1]));\n\n Query query = session.createQuery(criteriaQuery);\n\n addresses = query.list();\n\n transaction.commit();\n\n addresses.forEach(address -> System.out.println(\"Added Address : \" + address.getAddress04Street()));\n } catch (Exception e) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n\n } catch (Throwable throwable) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Address : \" + addresses.size());\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }",
"@Override\r\n\t\t\tpublic double matchingItems(Query query, Set<Document> documents,\r\n\t\t\t\t\tint docsPerQuery) {\n\t\t\t\treturn 0;\r\n\t\t\t}",
"public static void main(String[] args) {\n\t\tString queryHql = \"select Map(a.id,a.name,b.brandId,b.productId) from ShopBrand as a,SysProductType b where a.id=b.aid \";\n\n\t\tString tableStatement = StringUtils.substringBetween(queryHql, \"from\",\n\t\t\t\t\"where\");\n\t\tString mappingStatement = StringUtils.substringBetween(queryHql, \"Map\",\n\t\t\t\t\"from\");\n\t\tmappingStatement = StringUtils.replaceOnce(mappingStatement, \"(\", \"\");\n\n\t\tSet<String> estimateTransformFields = Sets.newHashSet();\n\t\tfor (String t : Splitter.on(\",\").split(mappingStatement)) {\n\t\t\tt = t.trim();\n\t\t\testimateTransformFields.add(Splitter.on(\"as\").trimResults()\n\t\t\t\t\t.omitEmptyStrings().limit(2).splitToList(t).get(0));\n\t\t}\n\n\t\tboolean hasAlias = true;\n\t\tString singleEntityName = \"\";\n\t\tSet<String> estimateTableNames = Sets.newHashSet();\n\t\tBiMap<String, String> entityName2aliasBimap = HashBiMap.create();\n\t\tString separator;\n\t\tList<String> tList;\n\t\tfor (String t : Splitter.on(\",\").split(tableStatement)) {\n\t\t\tt = t.trim();\n\t\t\tif (t.contains(\"as\")) {\n\t\t\t\tseparator = \"as\";\n\t\t\t} else {\n\t\t\t\tseparator = \" \";\n\t\t\t}\n\t\t\ttList = Splitter.on(separator).trimResults().omitEmptyStrings()\n\t\t\t\t\t.limit(2).splitToList(t);\n\n\t\t\tif (tList.size() == 1) {\n\t\t\t\tsingleEntityName = tList.get(0);\n\t\t\t\thasAlias = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tentityName2aliasBimap.put(tList.get(0), tList.get(1));\n\t\t\testimateTableNames.add(Splitter.on(separator).trimResults()\n\t\t\t\t\t.omitEmptyStrings().limit(2).splitToList(t).get(0));\n\t\t}\n\t\tBiMap<String, String> alias2EntityNameBimap = entityName2aliasBimap\n\t\t\t\t.inverse();\n\n\t\tlogger.info(\"estimateTransformFields is:{}\", estimateTransformFields);\n\t\tlogger.info(\"estimateTableNames is:{}\", estimateTableNames);\n\t\tlogger.info(\"entityName2aliasBimap is:{}\", entityName2aliasBimap);\n\n\t\tMap<String, Set<String>> estimateResultMap = Maps.newHashMap();\n\t\tString tmpAlias;\n\t\tString tmpFiledNameWithoutAlias;\n\t\tString tmpEntityName;\n\t\tif (hasAlias) {\n\t\t\tfor (String field : estimateTransformFields) {\n\t\t\t\ttmpAlias = field.substring(0, 1);\n\t\t\t\ttmpFiledNameWithoutAlias = field.substring(2);\n\t\t\t\ttmpEntityName = alias2EntityNameBimap.get(tmpAlias);\n\t\t\t\tif (estimateResultMap.get(tmpEntityName) != null) {\n\t\t\t\t\testimateResultMap.get(tmpEntityName)\n\t\t\t\t\t\t\t.add(tmpFiledNameWithoutAlias);\n\t\t\t\t} else {\n\t\t\t\t\testimateResultMap.put(tmpEntityName,\n\t\t\t\t\t\t\tSets.newHashSet(tmpFiledNameWithoutAlias));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\testimateResultMap.put(singleEntityName, estimateTransformFields);\n\t\t}\n\t\tlogger.info(\"estimateResultMap is:{}\", estimateResultMap);\n\t}",
"private RunQueriesEx setupQueries() {\n RunQueriesEx queries = new RunQueriesEx();\n \n //for each column in our table, update one of our lists\n for(int i = 0; i < this.dataTable.getColumnCount(); i++) {\n this.updateList(i);\n }\n \n updateEmptyLists(); //pads any lists that didn't get updates with empty strings\n \n //add a new query for each row in the table\n for(int i = 0; i < this.dataTable.getRowCount(); i++) {\n queries.add(this.createQueryFromRow(i));\n }\n \n return queries;\n }",
"private InternalQuery<G> setupCores(final InternalQuery<G> query) {\n\t\tfinal Iterator<Variable<G>> undistVarIterator = query.getUndistVars()\n\t\t\t\t.iterator();\n\t\tif (!undistVarIterator.hasNext()) {\n\t\t\treturn query;\n\t\t}\n\t\tfinal DisjointSet<Object> coreVertices = new DisjointSet<Object>();\n\t\tfinal List<QueryAtom<G>> toRemove = new ArrayList<QueryAtom<G>>();\n\n\t\tfinal InternalQuery<G> transformedQuery = query\n\t\t\t\t.apply(new ResultBindingImpl<G>());\n\n\t\twhile (undistVarIterator.hasNext()) {\n\t\t\tfinal Term<G> a = undistVarIterator.next();\n\n\t\t\tcoreVertices.add(a);\n\n\t\t\tfor (final QueryAtom<G> atom : query.findAtoms(\n\t\t\t\t\tQueryPredicate.PropertyValue, null, a, null)) {\n\t\t\t\tcoreVertices.add(atom);\n\t\t\t\tcoreVertices.union(a, atom);\n\n\t\t\t\tfinal Term<G> a2 = atom.getArguments().get(2);\n\t\t\t\tif (query.getUndistVars().contains(a2)) {\n\t\t\t\t\tcoreVertices.add(a2);\n\t\t\t\t\tcoreVertices.union(a, a2);\n\t\t\t\t}\n\t\t\t\ttransformedQuery.remove(atom);\n\t\t\t}\n\t\t\tfor (final QueryAtom<G> atom : query.findAtoms(\n\t\t\t\t\tQueryPredicate.PropertyValue, null, null, a)) {\n\t\t\t\tcoreVertices.add(atom);\n\t\t\t\tcoreVertices.union(a, atom);\n\n\t\t\t\tfinal Term<G> a2 = atom.getArguments().get(0);\n\t\t\t\tif (query.getUndistVars().contains(a2)) {\n\t\t\t\t\tcoreVertices.add(a2);\n\t\t\t\t\tcoreVertices.union(a, a2);\n\t\t\t\t}\n\t\t\t\ttransformedQuery.remove(atom);\n\t\t\t}\n\n\t\t\tfor (final QueryAtom<G> atom : query.findAtoms(QueryPredicate.Type,\n\t\t\t\t\tnull, a)) {\n\t\t\t\tcoreVertices.add(atom);\n\t\t\t\tcoreVertices.union(a, atom);\n\t\t\t\ttransformedQuery.remove(atom);\n\t\t\t}\n\t\t}\n\n\t\tfinal Map<Variable<G>, Set<G>> map = new HashMap<Variable<G>, Set<G>>();\n\t\tfinal Map<Variable<G>, InternalQuery<G>> map2 = new HashMap<Variable<G>, InternalQuery<G>>();\n\n\t\tfor (final Set<Object> set : coreVertices.getEquivalenceSets()) {\n\t\t\tfinal InternalQuery<G> coreQuery = new QueryImpl<G>(kb);\n\t\t\tfor (final Object a : set) {\n\t\t\t\tif (a instanceof QueryAtom) {\n\t\t\t\t\tfinal QueryAtom<G> queryAtom = (QueryAtom<G>) a;\n\t\t\t\t\ttransformedQuery.remove(queryAtom);\n\t\t\t\t\tcoreQuery.add(queryAtom);\n\t\t\t\t\tfor (final Term<G> t : queryAtom.getArguments()) {\n\t\t\t\t\t\tif (query.getDistVars().contains(t)) {\n\t\t\t\t\t\t\tcoreQuery.addDistVar(t.asVariable());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (final Variable<G> distVar : coreQuery.getDistVars()) {\n\t\t\t\tSet<G> s = map.get(distVar);\n\t\t\t\tInternalQuery<G> s2 = map2.get(distVar);\n\n\t\t\t\tif (s == null) {\n\t\t\t\t\ts = new HashSet<G>();\n\t\t\t\t\tmap.put(distVar, s);\n\t\t\t\t}\n\n\t\t\t\tif (s2 == null) {\n\t\t\t\t\tmap2.put(distVar, coreQuery.apply(Collections\n\t\t\t\t\t\t\t.<Variable<G>, Term<G>> emptyMap()));\n\t\t\t\t} else {\n\t\t\t\t\tfor (final QueryAtom<G> atom : coreQuery.getAtoms()) {\n\t\t\t\t\t\ts2.add(atom);\n\t\t\t\t\t}\n\n\t\t\t\t\ts2.addDistVar(distVar);\n\t\t\t\t\ts2.addResultVar(distVar);\n\t\t\t\t}\n\n\t\t\t\ts.add(coreQuery.rollUpTo(distVar, new HashSet<Term<G>>()));\n\t\t\t}\n\t\t}\n\n\t\tfor (final Variable<G> var : map.keySet()) {\n\t\t\ttransformedQuery\n\t\t\t\t\t.Core(var, f.wrap(f.objectIntersectionOf(map.get(var))),\n\t\t\t\t\t\t\tmap2.get(var));\n\t\t\ttransformedQuery.addDistVar(var);\n\t\t\ttransformedQuery.addResultVar(var);\n\t\t}\n\n\t\treturn transformedQuery;\n\t}",
"public PhysicalOperator getOperator(RAQuery query, SimpleSGBD sgbd) {\n\t\tif(query instanceof ProjectionQuery){\n\t\t\tProjectionQuery queryP = (ProjectionQuery) query;\n\t\t\tRAQuery subQuery = queryP.getSubQuery();\n\t\t\tString[] attributes = queryP.getProjectedAttributesNames();\n\t\t\tif (subQuery instanceof RelationNameQuery){\n\t\t\t\tRelationNameQuery rNameQuery = (RelationNameQuery) subQuery;\n\t\t\t\tSequentialAccessOnARelationOperator saonaro = new SequentialAccessOnARelationOperator(sgbd, rNameQuery.getRelationName());\n\t\t\t\tProjectionOperator opP = new ProjectionOperator(saonaro, attributes);\n\t\t\t\treturn opP;\n\t\t\t}\n\t\t} \n\t\t\n\t\tif(query instanceof SelectionQuery){\n\t\t\tSelectionQuery queryP = (SelectionQuery) query;\n\t\t\tRAQuery subQuery = queryP.getSubQuery();\n\t\t\tString attributeName = queryP.getAttributeName();\n\t\t\tString value = queryP.getConstantValue();\n\t\t\tif (subQuery instanceof RelationNameQuery){\n\t\t\t\tRelationNameQuery rNameQuery = (RelationNameQuery) subQuery;\n\t\t\t\tSequentialAccessOnARelationOperator saonaro = new SequentialAccessOnARelationOperator(sgbd, rNameQuery.getRelationName());\n\t\t\t\tSelectionOperator sOp = new SelectionOperator(saonaro, attributeName, value);\n\t\t\t\treturn sOp;\n\t\t\t}\n\t\t} \n\t\t\n\t\tif(query instanceof JoinQuery){\n\t\t\tJoinQuery joinQuery = (JoinQuery) query;\n\t\t\tRAQuery subQuery1 = joinQuery.getLeftSubQuery();\n\t\t\tRAQuery subQuery2 = joinQuery.getRightSubQuery();\n\t\t\t\n\t\t\tif(subQuery1 instanceof RelationNameQuery && subQuery2 instanceof RelationNameQuery){\n\t\t\t\tRelationNameQuery rNameQuery1 = (RelationNameQuery) subQuery1;\n\t\t\t\tSequentialAccessOnARelationOperator saonaro1 = new SequentialAccessOnARelationOperator(sgbd, rNameQuery1.getRelationName());\n\t\t\t\tRelationNameQuery rNameQuery2 = (RelationNameQuery) subQuery2;\n\t\t\t\tSequentialAccessOnARelationOperator saonaro2 = new SequentialAccessOnARelationOperator(sgbd, rNameQuery2.getRelationName());\n\t\t\t\tJoinOperator jOp = new JoinOperator(saonaro1, saonaro2);\n\t\t\t\treturn jOp;\n\t\t\t}\n\t\t}\n\t\t\tthrow new UnsupportedOperationException(\"not yet implemented\");\n\t\t\n\t}",
"@Override\n\tpublic void visit(AnalyticExpression arg0) {\n\t\t\n\t}",
"@Test\n public void testMixedJoin3() throws Exception {\n String sql = \"SELECT * FROM g1, g2 inner join g3 on g2.a=g3.a\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g1\");\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, 2, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_INNER);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g2\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g3\");\n\n Node criteriaNode = verify(jpNode, JoinPredicate.JOIN_CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.EQ.name());\n\n Node leftExpression = verify(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(leftExpression, Symbol.NAME_PROP_NAME, \"g2.a\");\n\n Node rightExpression = verify(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(rightExpression, Symbol.NAME_PROP_NAME, \"g3.a\");\n \n verifySql(\"SELECT * FROM g1, g2 INNER JOIN g3 ON g2.a = g3.a\", fileNode);\n }",
"public void testNormalQueries()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkQuery(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n rdbmsVendorID);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"public abstract Statement queryToRetrieveData();",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n \tprivate <X, C extends Collection<E>, E> AbstractExpression<X> getExpression(CriteriaBuilderImpl cb, Object q, Tree exprDef, Class<X> javaType) {\n \t\tif ((exprDef.getType() == JpqlParser.Equals_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Not_Equals_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Greater_Than_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Greater_Or_Equals_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Less_Than_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Less_Or_Equals_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.BETWEEN)) {\n \n \t\t\tfinal AbstractExpression<X> left;\n \t\t\tfinal AbstractExpression<X> right;\n \n \t\t\tif ((exprDef.getChild(0).getType() == JpqlParser.ST_SUBQUERY) || (exprDef.getChild(1).getType() == JpqlParser.ST_SUBQUERY)) {\n \t\t\t\t// left side is sub query\n \t\t\t\tif (exprDef.getChild(0).getType() == JpqlParser.ST_SUBQUERY) {\n \t\t\t\t\tright = this.getExpression(cb, q, exprDef.getChild(1), null);\n \t\t\t\t\tleft = (AbstractExpression<X>) this.constructSubquery(cb, q, exprDef.getChild(0), right.getJavaType());\n \n \t\t\t\t\t// right side is sub query\n \t\t\t\t}\n \t\t\t\telse if (exprDef.getChild(1).getType() == JpqlParser.ST_SUBQUERY) {\n \t\t\t\t\tleft = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\t\t\tright = (AbstractExpression<X>) this.constructSubquery(cb, q, exprDef.getChild(1), left.getJavaType());\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tthrow new PersistenceException(\"Both sides of the comparison cannot be sub query, line \" + exprDef.getLine() + \":\"\n \t\t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tfinal Tree leftExpr = exprDef.getChild(0);\n \t\t\t\tfinal Tree rightExpr = exprDef.getChild(1);\n \n \t\t\t\tif ((leftExpr.getType() == JpqlParser.Named_Parameter) || (leftExpr.getType() == JpqlParser.Ordinal_Parameter)) {\n \t\t\t\t\tleft = (AbstractExpression<X>) this.getExpression(cb, q, rightExpr, null);\n \t\t\t\t\tright = (AbstractExpression<X>) this.getExpression(cb, q, leftExpr, left.getJavaType());\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tleft = this.getExpression(cb, q, leftExpr, null);\n \t\t\t\t\tright = (AbstractExpression<X>) this.getExpression(cb, q, rightExpr, left.getJavaType());\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tswitch (exprDef.getType()) {\n \t\t\t\tcase JpqlParser.Equals_Operator:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.equal(left, right);\n \n \t\t\t\tcase JpqlParser.Not_Equals_Operator:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.notEqual(left, right);\n \n \t\t\t\tcase JpqlParser.Greater_Than_Operator:\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(left.getJavaType())) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.greaterThan((Expression<Comparable>) left, (Expression<Comparable>) right);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.gt((Expression<? extends Number>) left, (Expression<? extends Number>) right);\n \t\t\t\t\t}\n \n \t\t\t\tcase JpqlParser.Greater_Or_Equals_Operator:\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(left.getJavaType())) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.greaterThanOrEqualTo((Expression<Comparable>) left, (Expression<Comparable>) right);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.ge((Expression<? extends Number>) left, (Expression<? extends Number>) right);\n \t\t\t\t\t}\n \n \t\t\t\tcase JpqlParser.Less_Than_Operator:\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(left.getJavaType())) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.lessThan((Expression<Comparable>) left, (Expression<Comparable>) right);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.lt((Expression<? extends Number>) left, (Expression<? extends Number>) right);\n \t\t\t\t\t}\n \n \t\t\t\tcase JpqlParser.Less_Or_Equals_Operator:\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(left.getJavaType())) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.lessThanOrEqualTo((Expression<Comparable>) left, (Expression<Comparable>) right);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.le((Expression<? extends Number>) left, (Expression<? extends Number>) right);\n \t\t\t\t\t}\n \t\t\t\tcase JpqlParser.BETWEEN:\n \t\t\t\t\tfinal AbstractExpression<?> right2 = this.getExpression(cb, q, exprDef.getChild(2), left.getJavaType());\n \n \t\t\t\t\tfinal PredicateImpl between = cb.between((AbstractExpression) left, (AbstractExpression) right, (AbstractExpression) right2);\n \t\t\t\t\tif (exprDef.getChildCount() == 4) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) between.not();\n \t\t\t\t\t}\n \n \t\t\t\t\treturn (AbstractExpression<X>) between;\n \t\t\t}\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.LIKE) {\n \t\t\tfinal AbstractExpression<String> inner = this.getExpression(cb, q, exprDef.getChild(0), String.class);\n \t\t\tfinal AbstractExpression<String> pattern = this.getExpression(cb, q, exprDef.getChild(1), String.class);\n \n \t\t\tif ((exprDef.getChildCount() > 2) && (exprDef.getChild(2).getType() == JpqlParser.STRING_LITERAL)) {\n \t\t\t\tfinal Expression<Character> escape = this.getExpression(cb, q, exprDef.getChild(2), Character.class);\n \n \t\t\t\tif (exprDef.getChild(exprDef.getChildCount() - 1).getType() == JpqlParser.NOT) {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.notLike(inner, pattern, escape);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.like(inner, pattern, escape);\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tif (exprDef.getChild(exprDef.getChildCount() - 1).getType() == JpqlParser.NOT) {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.notLike(inner, pattern);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.like(inner, pattern);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.ST_IN) {\n \t\t\tAbstractExpression<X> left = null;\n \n \t\t\tif ((exprDef.getChild(0).getType() != JpqlParser.Named_Parameter) && (exprDef.getChild(0).getType() != JpqlParser.Ordinal_Parameter)) {\n \t\t\t\tleft = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\t}\n \n \t\t\tfinal List<AbstractExpression<X>> expressions = Lists.newArrayList();\n \n \t\t\tfinal Tree inDefs = exprDef.getChild(1);\n \t\t\tif ((inDefs.getType() == JpqlParser.Ordinal_Parameter) || (inDefs.getType() == JpqlParser.Ordinal_Parameter)) {\n \t\t\t\treturn (AbstractExpression<X>) left.in(this.getExpression(cb, q, inDefs, left.getJavaType()));\n \t\t\t}\n \n \t\t\tif (inDefs.getType() == JpqlParser.ST_SUBQUERY) {\n \t\t\t\tfinal SubqueryImpl<? extends X> subquery = this.constructSubquery(cb, q, inDefs, left.getJavaType());\n \n \t\t\t\treturn (AbstractExpression<X>) left.in(subquery);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tfor (int i = 0; i < inDefs.getChildCount(); i++) {\n \t\t\t\t\texpressions.add((AbstractExpression<X>) this.getExpression(cb, q, inDefs.getChild(i), left != null ? left.getJavaType() : null));\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (left == null) {\n \t\t\t\tleft = (AbstractExpression<X>) this.getExpression(cb, q, exprDef.getChild(0), expressions.get(0).getJavaType());\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) left.in(expressions);\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.ST_NULL) {\n \t\t\tfinal AbstractExpression<Object> expr = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\tif (exprDef.getChildCount() == 2) {\n \t\t\t\treturn (AbstractExpression<X>) cb.isNotNull(expr);\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) cb.isNull(expr);\n \t\t}\n \n \t\t// identification variable\n \t\tif (exprDef.getType() == JpqlParser.ID) {\n \t\t\treturn (AbstractExpression<X>) this.getAliased(q, exprDef.getText());\n \t\t}\n \n \t\t// single valued state field expression\n \t\tif (exprDef.getType() == JpqlParser.ST_PARENTED) {\n \t\t\tAbstractSelection<?> expression = this.getAliased(q, exprDef.getChild(0).getText());\n \n \t\t\tfinal Qualified qualified = new Qualified(exprDef.getChild(1));\n \t\t\tfinal Iterator<String> i = qualified.getSegments().iterator();\n \t\t\twhile (i.hasNext()) {\n \t\t\t\tfinal String segment = i.next();\n \n \t\t\t\tif (expression instanceof ParentPath) {\n \t\t\t\t\texpression = ((ParentPath<?, ?>) expression).getExpression(segment);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tthrow new PersistenceException(\"Cannot dereference: \" + segment + \", line \" + exprDef.getLine() + \":\" + exprDef.getCharPositionInLine());\n \t\t\t\t}\n \n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) expression;\n \t\t}\n \n \t\t// negation\n \t\tif (exprDef.getType() == JpqlParser.ST_NEGATION) {\n \t\t\treturn (AbstractExpression<X>) cb.neg(this.<Number, Collection<Object>, Object> getExpression(cb, q, exprDef.getChild(0), null));\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.Named_Parameter) {\n \t\t\treturn cb.parameter(javaType, exprDef.getText().substring(1));\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.Ordinal_Parameter) {\n \t\t\tfinal String strPos = exprDef.getText().substring(1);\n \n \t\t\ttry {\n \t\t\t\tfinal int position = Integer.parseInt(strPos);\n \n \t\t\t\tAbstractParameterExpressionImpl<X> parameter = null;\n \n \t\t\t\tObject q2 = q;\n \n \t\t\t\twhile (q2 instanceof SubqueryImpl) {\n \t\t\t\t\tq2 = ((SubqueryImpl<?>) q2).getParent();\n \t\t\t\t}\n \n \t\t\t\tif (q2 instanceof CriteriaQueryImpl) {\n \t\t\t\t\tparameter = (AbstractParameterExpressionImpl<X>) ((CriteriaQueryImpl<?>) q2).getParameter(position);\n \t\t\t\t}\n \t\t\t\telse if (q2 instanceof CriteriaDeleteImpl) {\n \t\t\t\t\tparameter = (AbstractParameterExpressionImpl<X>) ((CriteriaDeleteImpl<?>) q2).getParameter(position);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tparameter = (AbstractParameterExpressionImpl<X>) ((CriteriaUpdateImpl<?>) q2).getParameter(position);\n \t\t\t\t}\n \n \t\t\t\tif (parameter == null) {\n \t\t\t\t\tparameter = new ParameterExpressionImpl<X>((BaseQueryImpl<?>) q2, this.metamodel.type(javaType), javaType, position);\n \t\t\t\t}\n \n \t\t\t\treturn parameter;\n \n \t\t\t}\n \t\t\tcatch (final NumberFormatException e) {\n \t\t\t\tthrow new PersistenceException(\"Invalid ordinal query parameter declaration: \" + strPos);\n \t\t\t}\n \t\t}\n \n \t\t// arithmetic operation\n \t\tif ((exprDef.getType() == JpqlParser.Plus_Sign) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Minus_Sign) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Multiplication_Sign) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Division_Sign)) {\n \n \t\t\tfinal AbstractExpression<Number> left = this.getExpression(cb, q, exprDef.getChild(0), Number.class);\n \t\t\tfinal AbstractExpression<? extends Number> right = this.getExpression(cb, q, exprDef.getChild(1), left.getJavaType());\n \n \t\t\tswitch (exprDef.getType()) {\n \t\t\t\tcase JpqlParser.Plus_Sign:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.sum(left, right);\n \n \t\t\t\tcase JpqlParser.Minus_Sign:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.diff(left, right);\n \n \t\t\t\tcase JpqlParser.Multiplication_Sign:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.prod(left, right);\n \n \t\t\t\tcase JpqlParser.Division_Sign:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.quot(left, right);\n \t\t\t}\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.ST_BOOLEAN) {\n \t\t\treturn (AbstractExpression<X>) this.getExpression(cb, q, exprDef, Boolean.class);\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.NUMERIC_LITERAL) {\n \t\t\treturn (AbstractExpression<X>) new SimpleConstantExpression<Long>(this.metamodel.createBasicType(Long.class), Long.valueOf(exprDef.getText()));\n \t\t}\n \n \t\t// string literal\n \t\tif (exprDef.getType() == JpqlParser.STRING_LITERAL) {\n \t\t\tif (javaType == Character.class) {\n \t\t\t\treturn (AbstractExpression<X>) new SimpleConstantExpression<Character>(this.metamodel.type(Character.class), //\n \t\t\t\t\texprDef.getText().substring(1, 2).toCharArray()[0]);\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) new SimpleConstantExpression<String>(this.metamodel.type(String.class), //\n \t\t\t\texprDef.getText().substring(1, exprDef.getText().length() - 1));\n \t\t}\n \n \t\t// functions returning string\n \t\tif ((exprDef.getType() == JpqlParser.UPPER) //\n \t\t\t|| (exprDef.getType() == JpqlParser.LOWER) //\n \t\t\t|| (exprDef.getType() == JpqlParser.SUBSTRING)) {\n \n \t\t\tfinal AbstractExpression<String> argument = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\tswitch (exprDef.getType()) {\n \t\t\t\tcase JpqlParser.UPPER:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.upper(argument);\n \n \t\t\t\tcase JpqlParser.LOWER:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.lower(argument);\n \n \t\t\t\tcase JpqlParser.SUBSTRING:\n \t\t\t\t\tfinal AbstractExpression<Integer> start = this.getExpression(cb, q, exprDef.getChild(1), Integer.class);\n \t\t\t\t\tfinal AbstractExpression<Integer> end = exprDef.getChildCount() == 3 ? //\n \t\t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(2), Integer.class) : null;\n \n \t\t\t\t\treturn (AbstractExpression<X>) new SubstringExpression(argument, start, end);\n \t\t\t}\n \t\t}\n \n \t\t// concat function\n \t\tif (exprDef.getType() == JpqlParser.CONCAT) {\n \t\t\tfinal List<Expression<String>> arguments = Lists.newArrayList();\n \t\t\tfor (int i = 0; i < exprDef.getChildCount(); i++) {\n \t\t\t\targuments.add(this.getExpression(cb, q, exprDef.getChild(i), String.class));\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) new ConcatExpression(arguments.toArray(new Expression[arguments.size()]));\n \t\t}\n \n \t\t// trim function\n \t\tif (exprDef.getType() == JpqlParser.TRIM) {\n \t\t\tTrimspec trimspec = null;\n \t\t\tExpression<Character> trimChar = null;\n \t\t\tExpression<String> inner = null;\n \n \t\t\tint i = 0;\n \t\t\tfinal int type = exprDef.getChild(i).getType();\n \n \t\t\t// trim spec\n \t\t\tif (type == JpqlParser.BOTH) {\n \t\t\t\ttrimspec = Trimspec.BOTH;\n \t\t\t\ti++;\n \t\t\t}\n \t\t\telse if (type == JpqlParser.LEADING) {\n \t\t\t\ttrimspec = Trimspec.LEADING;\n \t\t\t\ti++;\n \t\t\t}\n \t\t\telse if (type == JpqlParser.TRAILING) {\n \t\t\t\ttrimspec = Trimspec.TRAILING;\n \t\t\t\ti++;\n \t\t\t}\n \n \t\t\tif (exprDef.getChildCount() > (i + 1)) {\n \t\t\t\ttrimChar = this.getExpression(cb, q, exprDef.getChild(i), Character.class);\n \t\t\t\tinner = this.getExpression(cb, q, exprDef.getChild(i + 1), String.class);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tinner = this.getExpression(cb, q, exprDef.getChild(i), String.class);\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) new TrimExpression(trimspec, trimChar, inner);\n \t\t}\n \n \t\t// type functions\n \t\tif ((exprDef.getType() == JpqlParser.TYPE) || (exprDef.getType() == JpqlParser.ST_ENTITY_TYPE)) {\n \t\t\tswitch (exprDef.getType()) {\n \t\t\t\tcase JpqlParser.TYPE:\n \t\t\t\t\tfinal AbstractExpression<?> inner = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\t\t\treturn (AbstractExpression<X>) ((AbstractPath<?>) inner).type();\n \n \t\t\t\tcase JpqlParser.ST_ENTITY_TYPE:\n \t\t\t\t\tfinal EntityTypeImpl<?> entity = this.getEntity(exprDef.getChild(0).getText());\n \t\t\t\t\tif (entity.getRootType().getInheritanceType() == null) {\n \t\t\t\t\t\tthrow new PersistenceException(\"Entity does not have inheritence: \" + entity.getName() + \", line \" + exprDef.getLine() + \":\"\n \t\t\t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t\t\t}\n \n \t\t\t\t\treturn (AbstractExpression<X>) new SimpleConstantExpression<String>(null, entity.getDiscriminatorValue());\n \t\t\t}\n \t\t}\n \n \t\t// date time functions\n \t\tswitch (exprDef.getType()) {\n \t\t\tcase JpqlParser.CURRENT_DATE:\n \t\t\t\treturn (AbstractExpression<X>) cb.currentDate();\n \n \t\t\tcase JpqlParser.CURRENT_TIME:\n \t\t\t\treturn (AbstractExpression<X>) cb.currentTime();\n \n \t\t\tcase JpqlParser.CURRENT_TIMESTAMP:\n \t\t\t\treturn (AbstractExpression<X>) cb.currentTimestamp();\n \n \t\t\tcase JpqlParser.SECOND:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.SECOND, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.MINUTE:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.MINUTE, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.HOUR:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.HOUR, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.DAY:\n \t\t\tcase JpqlParser.DAYOFMONTH:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.DAYOFMONTH,\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.DAYOFWEEK:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.DAYOFWEEK, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.DAYOFYEAR:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.DAYOFYEAR, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.MONTH:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.MONTH, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.WEEK:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.WEEK, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.YEAR:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.YEAR, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \t\t}\n \n \t\t// arithmetic functions\n \t\tswitch (exprDef.getType()) {\n \t\t\tcase JpqlParser.ABS:\n \t\t\t\treturn (AbstractExpression<X>) cb.abs(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \n \t\t\tcase JpqlParser.SQRT:\n \t\t\t\treturn (AbstractExpression<X>) cb.sqrt(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \n \t\t\tcase JpqlParser.MOD:\n \t\t\t\treturn (AbstractExpression<X>) cb.mod(//\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(0), Integer.class), //\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(1), Integer.class));\n \n \t\t\tcase JpqlParser.LOCATE:\n \t\t\t\tif (exprDef.getChildCount() == 3) {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.locate(//\n \t\t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(0), String.class), //\n \t\t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(1), String.class), //\n \t\t\t\t\t\tthis.getExpression(cb, q, exprDef, Integer.class));\n \t\t\t\t}\n \n \t\t\t\treturn (AbstractExpression<X>) cb.locate(//\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(0), String.class), //\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(1), String.class));\n \n \t\t\tcase JpqlParser.LENGTH:\n \t\t\t\treturn (AbstractExpression<X>) cb.length(this.getExpression(cb, q, exprDef.getChild(0), String.class));\n \t\t}\n \n \t\t// aggregate functions\n \t\tswitch (exprDef.getType()) {\n \t\t\tcase JpqlParser.AVG:\n \t\t\t\treturn (AbstractExpression<X>) cb.avg(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \t\t\tcase JpqlParser.SUM:\n \t\t\t\treturn (AbstractExpression<X>) cb.sum(this.getExpression(cb, q, exprDef.getChild(0), Long.class));\n \t\t\tcase JpqlParser.MAX:\n \t\t\t\treturn (AbstractExpression<X>) cb.max(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \t\t\tcase JpqlParser.MIN:\n \t\t\t\treturn (AbstractExpression<X>) cb.min(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \t\t}\n \n \t\t// count function\n \t\tif (exprDef.getType() == JpqlParser.COUNT) {\n \t\t\tif (exprDef.getChildCount() == 2) {\n \t\t\t\treturn (AbstractExpression<X>) new CountExpression(this.getExpression(cb, q, exprDef.getChild(1), null), true);\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) new CountExpression(this.getExpression(cb, q, exprDef.getChild(0), null), false);\n \t\t}\n \n \t\t// all or any operator\n \t\tif (exprDef.getType() == JpqlParser.ST_ALL_OR_ANY) {\n \t\t\t// all, any, some expressions\n \t\t\tswitch (exprDef.getChild(0).getType()) {\n \t\t\t\tcase JpqlParser.ALL:\n \t\t\t\t\treturn new AllAnyExpression<X>(true, this.constructSubquery(cb, q, exprDef.getChild(1), javaType));\n \n \t\t\t\tcase JpqlParser.ANY:\n \t\t\t\tcase JpqlParser.SOME:\n \t\t\t\t\treturn new AllAnyExpression<X>(false, this.constructSubquery(cb, q, exprDef.getChild(1), javaType));\n \t\t\t}\n \t\t}\n \n \t\t// exists operator\n \t\tif (exprDef.getType() == JpqlParser.EXISTS) {\n \t\t\treturn (AbstractExpression<X>) new ExistsExpression(this.constructSubquery(cb, q, exprDef.getChild(0), javaType));\n \t\t}\n \n \t\t// not operator\n \t\tif (exprDef.getType() == JpqlParser.NOT) {\n \t\t\tfinal Tree innerExpression = exprDef.getChild(0);\n \n \t\t\tfinal AbstractExpression<Boolean> expression = innerExpression.getType() == JpqlParser.LOR ? this.constructJunction(cb, q, innerExpression)\n \t\t\t\t: this.getExpression(cb, q, innerExpression, Boolean.class);\n \n \t\t\treturn (AbstractExpression<X>) new PredicateImpl(true, BooleanOperator.AND, expression);\n \t\t}\n \n \t\t// general case\n \t\tif (exprDef.getType() == JpqlParser.ST_GENERAL_CASE) {\n \t\t\tfinal CaseImpl<Object> caseExpr = cb.selectCase();\n \n \t\t\tfor (int i = 0; i < exprDef.getChildCount(); i++) {\n \t\t\t\tfinal Tree caseDef = exprDef.getChild(i);\n \n \t\t\t\tif (caseDef.getType() == JpqlParser.WHEN) {\n \t\t\t\t\tcaseExpr.when(this.constructJunction(cb, q, caseDef.getChild(0)), this.getExpression(cb, q, caseDef.getChild(1), null));\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tcaseExpr.otherwise(this.getExpression(cb, q, caseDef, null));\n \t\t\t\t}\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) caseExpr;\n \t\t}\n \n \t\t// simple case\n \t\tif (exprDef.getType() == JpqlParser.CASE) {\n \t\t\tfinal AbstractExpression<X> expression = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\tfinal SimpleCaseImpl<X, Object> caseExpr = cb.selectCase(expression);\n \n \t\t\tfor (int i = 1; i < exprDef.getChildCount(); i++) {\n \t\t\t\tfinal Tree caseDef = exprDef.getChild(i);\n \n \t\t\t\tif (caseDef.getType() == JpqlParser.WHEN) {\n \t\t\t\t\tfinal AbstractExpression<Object> result = this.getExpression(cb, q, caseDef.getChild(1), null);\n \n \t\t\t\t\tfinal AbstractExpression<X> condition;\n \n \t\t\t\t\tif (exprDef.getChild(0).getType() == JpqlParser.TYPE) {\n \t\t\t\t\t\tfinal EntityTypeImpl<Object> entity = this.getEntity(caseDef.getChild(0).getText());\n \n \t\t\t\t\t\tif (entity.getRootType().getInheritanceType() == null) {\n \t\t\t\t\t\t\tthrow new PersistenceException(\"Entity does not have inheritence: \" + entity.getName() + \", line \" + exprDef.getLine() + \":\"\n \t\t\t\t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tcondition = (AbstractExpression<X>) new SimpleConstantExpression<String>(null, entity.getDiscriminatorValue());\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tcondition = this.getExpression(cb, q, caseDef.getChild(0), null);\n \t\t\t\t\t}\n \n \t\t\t\t\tcaseExpr.when(condition, result);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tcaseExpr.otherwise(this.getExpression(cb, q, caseDef, null));\n \t\t\t\t}\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) caseExpr;\n \t\t}\n \n \t\t// nullif function\n \t\tif (exprDef.getType() == JpqlParser.NULLIF) {\n \t\t\tfinal AbstractExpression<X> left = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\tfinal AbstractExpression<?> right = this.getExpression(cb, q, exprDef.getChild(1), null);\n \n \t\t\treturn new NullIfExpression<X>(left, right);\n \t\t}\n \n \t\t// coalesce function\n \t\tif (exprDef.getType() == JpqlParser.ST_COALESCE) {\n \t\t\tfinal CoalesceExpression<X> coalesce = cb.coalesce();\n \t\t\tfor (int i = 0; i < exprDef.getChildCount(); i++) {\n \t\t\t\tcoalesce.value(this.getExpression(cb, q, exprDef.getChild(i), javaType));\n \t\t\t}\n \n \t\t\treturn coalesce;\n \t\t}\n \n \t\t// db func\n \t\tif (exprDef.getType() == JpqlParser.FUNC) {\n \t\t\tfinal List<AbstractExpression<?>> arguments = Lists.newArrayList();\n \t\t\tfinal String function = exprDef.getChild(0).getText();\n \n \t\t\tfor (int i = 1; i < exprDef.getChildCount(); i++) {\n \t\t\t\targuments.add(this.getExpression(cb, q, exprDef.getChild(i), null));\n \t\t\t}\n \n \t\t\treturn new FunctionExpression<X>((Class<X>) (javaType != null ? javaType : Object.class), //\n \t\t\t\tfunction, arguments.toArray(new Expression<?>[arguments.size()]));\n \t\t}\n \n \t\t// index expression\n \t\tif (exprDef.getType() == JpqlParser.INDEX) {\n \t\t\tfinal AbstractExpression<Object> expression = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\tif (expression instanceof ListJoinImpl) {\n \t\t\t\treturn (AbstractExpression<X>) ((ListJoinImpl<?, ?>) expression).index();\n \t\t\t}\n \n \t\t\tthrow new PersistenceException(\"Reference is not a list join, line \" + exprDef.getLine() + \":\" + exprDef.getCharPositionInLine());\n \t\t}\n \n \t\t// empty operation\n \t\tif (exprDef.getType() == JpqlParser.ST_EMPTY) {\n \t\t\tAbstractExpression<?> expression = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\tif (expression instanceof MapExpression) {\n \t\t\t\texpression = ((MapExpression<Map<?, ?>, ?, ?>) expression).values();\n \t\t\t}\n \n \t\t\tif (!(expression instanceof CollectionExpression<?, ?>)) {\n \t\t\t\tthrow new PersistenceException(\"Reference is not a collection, line \" + exprDef.getLine() + \":\" + exprDef.getCharPositionInLine());\n \t\t\t}\n \n \t\t\tif (exprDef.getChildCount() == 2) {\n \t\t\t\treturn (AbstractExpression<X>) cb.isNotEmpty((Expression<Collection<?>>) expression);\n \t\t\t}\n \t\t\telse {\n \t\t\t\treturn (AbstractExpression<X>) cb.isEmpty((Expression<Collection<?>>) expression);\n \t\t\t}\n \t\t}\n \n \t\t// member of operation\n \t\tif (exprDef.getType() == JpqlParser.ST_MEMBER) {\n \t\t\tfinal AbstractExpression<?> expression = this.getExpression(cb, q, exprDef.getChild(1), null);\n \t\t\tif (!(expression instanceof CollectionExpression)) {\n \t\t\t\tthrow new PersistenceException(\"Member of expression must evaluate to a collection expression, \" + exprDef.getLine() + \":\"\n \t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t}\n \n \t\t\tfinal CollectionExpression<C, E> collection = (CollectionExpression<C, E>) expression;\n \t\t\tfinal PluralAttributeImpl<?, C, E> attribute = (PluralAttributeImpl<?, C, E>) collection.getMapping().getAttribute();\n \n \t\t\tfinal AbstractExpression<E> elem = this.getExpression(cb, q, exprDef.getChild(0), attribute.getElementType().getJavaType());\n \n \t\t\tif (exprDef.getChildCount() == 3) {\n \t\t\t\treturn (AbstractExpression<X>) cb.isNotMember(elem, collection);\n \t\t\t}\n \t\t\telse {\n \t\t\t\treturn (AbstractExpression<X>) cb.isMember(elem, collection);\n \t\t\t}\n \t\t}\n \n \t\t// size operation\n \t\tif (exprDef.getType() == JpqlParser.SIZE) {\n \t\t\tfinal AbstractExpression<?> expression = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\tif (!(expression instanceof CollectionExpression)) {\n \t\t\t\tthrow new PersistenceException(\"Member of expression must evaluate to a collection expression, \" + exprDef.getLine() + \":\"\n \t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t}\n \n \t\t\tfinal CollectionExpression<C, E> collection = (CollectionExpression<C, E>) expression;\n \n \t\t\treturn (AbstractExpression<X>) cb.size(collection);\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.CAST) {\n \t\t\tfinal AbstractExpression<?> left = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\tClass<?> clazz = null;\n \n \t\t\tswitch (exprDef.getChild(1).getType()) {\n \t\t\t\tcase JpqlParser.BYTE:\n \t\t\t\t\tclazz = Byte.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.SHORT:\n \t\t\t\t\tclazz = Short.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.INT:\n \t\t\t\tcase JpqlParser.INTEGER:\n \t\t\t\t\tclazz = Integer.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.LONG:\n \t\t\t\t\tclazz = Long.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.FLOAT:\n \t\t\t\t\tclazz = Float.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.DOUBLE:\n \t\t\t\t\tclazz = Double.class;\n \t\t\t\t\tbreak;\n \t\t\t\tdefault:\n \t\t\t\t\tclazz = String.class;\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) cb.cast(left, clazz);\n \t\t}\n \n \t\tthrow new PersistenceException(\"Unhandled expression: \" + exprDef.toStringTree() + \", line \" + exprDef.getLine() + \":\"\n \t\t\t+ exprDef.getCharPositionInLine());\n \t}",
"@Test\n public void equals_SameBuyQuery_Test() {\n Assert.assertTrue(bq1.equals(bq0));\n }",
"private void checkInlineQueries() throws Exceptions.OsoException, Exceptions.InlineQueryFailedError {\n Ffi.Query nextQuery = ffiPolar.nextInlineQuery();\n while (nextQuery != null) {\n if (!new Query(nextQuery, host).hasMoreElements()) {\n String source = nextQuery.source();\n throw new Exceptions.InlineQueryFailedError(source);\n }\n nextQuery = ffiPolar.nextInlineQuery();\n }\n }",
"@Override\n protected Map<String, String> initializeCommonQueries() {\n Map<String, String> commonQueries = new HashMap<>();\n\n commonQueries.put(SELECT_ALL_QUERY_KEY, SELECT_ALL_QUERY);\n commonQueries.put(SELECT_BY_ID_QUERY_KEY, SELECT_BY_ID_QUERY);\n commonQueries.put(DELETE_BY_ID_QUERY_KEY, DELETE_BY_ID_QUERY);\n commonQueries.put(INSERT_ENTITY_QUERY_KEY, INSERT_ENTITY_QUERY);\n commonQueries.put(UPDATE_ENTITY_QUERY_KEY, UPDATE_ENTITY_QUERY);\n\n return commonQueries;\n }",
"protected Collection method_1554() {\n return this.method_1559();\n }",
"@Test\n public void sharedFilterEnsuresUniqueResults() {\n Filter filter = new Filter(\"test-filter\");\n final Dataset dataset1 = new Dataset(\"TEST1\", \"sql\", filter);\n final Dataset dataset2 = new Dataset(\"TEST2\", \"sql2\", filter); // shared same filter\n\n List<String> entry1 = new ArrayList<>();\n entry1.add(\"001\");\n entry1.add(\"aaa\");\n\n List<String> entry2 = new ArrayList<>();\n entry2.add(\"002\");\n entry2.add(\"bbb\");\n\n List<String> entry3 = new ArrayList<>();\n entry3.add(\"003\");\n entry3.add(\"ccc\");\n\n List<String> entry4 = new ArrayList<>();\n entry4.add(\"004\");\n entry4.add(\"ddd\");\n\n List<List<String>> queryResults1 = new ArrayList<>();\n queryResults1.add(entry1);\n queryResults1.add(entry2);\n queryResults1.add(entry3);\n queryResults1.add(entry4);\n\n List<String> entry5 = new ArrayList<>();\n entry5.add(\"005\"); // different\n entry5.add(\"eee\");\n\n List<String> entry6 = new ArrayList<>();\n entry6.add(\"002\"); // same\n entry6.add(\"bbb\");\n\n List<String> entry7 = new ArrayList<>();\n entry7.add(\"007\"); // different\n entry7.add(\"fff\");\n\n List<String> entry8 = new ArrayList<>();\n entry8.add(\"004\"); // same\n entry8.add(\"ddd\");\n\n List<List<String>> queryResults2 = new ArrayList<>();\n queryResults2.add(entry5);\n queryResults2.add(entry6);\n queryResults2.add(entry7);\n queryResults2.add(entry8);\n\n // given\n dataset1.populateCache(queryResults1, 200L);\n dataset2.populateCache(queryResults2, 300L);\n\n // when\n final List<String> result1 = dataset1.getCachedResult();\n final List<String> result2 = dataset1.getCachedResult();\n final List<String> result3 = dataset1.getCachedResult();\n final List<String> result4 = dataset1.getCachedResult();\n final List<String> result5 = dataset2.getCachedResult();\n final List<String> result6 = dataset2.getCachedResult();\n\n // then\n assertEquals(\"Wrong result 1\", entry1, result1); // first datset is as-is\n assertEquals(\"Wrong result 2\", entry2, result2); // first datset is as-is\n assertEquals(\"Wrong result 3\", entry3, result3); // first datset is as-is\n assertEquals(\"Wrong result 4\", entry4, result4); // first datset is as-is\n assertEquals(\"Wrong result 3\", entry5, result5); // second datset, not filtered out\n assertEquals(\"Wrong result 3\", entry7, result6); // second dataset, entry6 is filtered out\n\n // and\n try {\n dataset1.getCachedResult();\n fail(\"Expected to run out of data\");\n\n } catch (IllegalStateException ex) {\n assertEquals(\"Wrong error\", \"No more data available for dataset: TEST1\", ex.getMessage());\n }\n\n try {\n // entry7 should be filtered out, resulting in no more data\n dataset2.getCachedResult();\n fail(\"Expected to run out of data\");\n\n } catch (IllegalStateException ex) {\n assertEquals(\"Wrong error\", \"No more data available for dataset: TEST2\", ex.getMessage());\n }\n\n // and\n assertEquals(\"Wrong cache size\", Optional.of(4), dataset1.getMetrics().getCacheSize());\n assertEquals(\"Wrong timing\", Optional.of(200L), dataset1.getMetrics().getTimingMilliseconds());\n assertEquals(\"Wrong cache requested\", Optional.of(5), dataset1.getMetrics().getCacheRequested());\n assertEquals(\"Wrong filtered out\", Optional.empty(), dataset1.getMetrics().getFilteredOut());\n\n // and\n assertEquals(\"Wrong cache size\", Optional.of(4), dataset2.getMetrics().getCacheSize());\n assertEquals(\"Wrong timing\", Optional.of(300L), dataset2.getMetrics().getTimingMilliseconds());\n assertEquals(\"Wrong cache requested\", Optional.of(3), dataset2.getMetrics().getCacheRequested());\n assertEquals(\"Wrong filtered out\", Optional.of(2), dataset2.getMetrics().getFilteredOut());\n }",
"private void executeQueries5()\n\t{\n\t\tString hql = \"Select s.name from School as s INNER JOIN SchoolClass as sc on s.id = sc.school_id GROUP by s.name HAVING count(sc.school_id) >1 \";\n\t\tQuery query = session.createQuery(hql);\n\t\tList results = query.list();\n\n\t\tSystem.out.println(results);\n\t}",
"@Test\n public void testDAM31901001() {\n // in this case, there are different querirs used to generate the ids.\n // the database id is specified in the selectKey element\n testDAM30602001();\n }",
"public static void test1(){\n\t\tlong[] testCase=new long[]{2034912444,1511277043};\r\n\t\tList<String> rs=SearchWrapper.search( testCase[0], testCase[testCase.length-1]);\r\n\t\t\r\n\t}",
"@Test\n \tpublic void whereClauseDirectPointingRelation() {\n \t\tnode23.addJoin(new PointingRelation(node42, NAME, 1));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'p'\"),\n \t\t\t\tjoin(\"=\", \"_component23.name\", \"'\" + NAME + \"'\"),\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \n \t\t);\n \t}",
"public abstract void applyToQuery(DatabaseQuery theQuery, GenerationContext context);",
"@Test(timeout = 4000)\n public void test044() throws Throwable {\n String[] stringArray0 = new String[12];\n String string0 = SQLUtil.innerJoin(\".z$m\", stringArray0, \"\", \"h?%,\", stringArray0);\n assertEquals(\" as h?%, on .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null\", string0);\n }",
"@Test\n public void testSqlExistsMultiValuedNoForeignRestriction() {\n Query<Garage> garagesQuery = not(\n existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME\n )\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 1 result\", 1, results.size());\n assertTrue(\"results should contain garage6\", results.contains(garage6));\n }",
"SubQueryOperand createSubQueryOperand();",
"@Test\n \tpublic void whereClauseForNodeDirectDominance() {\n \t\tnode23.addJoin(new Dominance(node42, 1));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"=\", \"_rank23.pre\", \"_rank42.parent\")\n \t\t);\n \t}",
"@Test\n \tpublic void whereClauseForNodeSameSpan() {\n \t\tnode23.addJoin(new SameSpan(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"=\", \"_node23.left\", \"_node42.left\"),\n \t\t\t\tjoin(\"=\", \"_node23.right\", \"_node42.right\")\n \t\t);\n \t}",
"private static ArrayList<Integer> expressionEvaluator(Expression expression, Table tableToApplySelectionOn) throws IOException, ParseException {\n\t\t\n\t\t\n\t\t\n\t\t// this is the actual list of indices that stores the indices of the tuples that satisfy all the conditions\n\t\tArrayList<Integer> listOfIndices = new ArrayList<Integer>();\n\n\t\t// this Table contains the resultant table after applying selection operation\n\t\tTable resultantTable = new Table(tableToApplySelectionOn);\n\t\tresultantTable.tableName = \"resultTable\";\n\n\t\t// the following conditions are to evaluate the EQUAL expression\n\t\tif (expression instanceof EqualsTo) {\n\t\t\t// this extracts the equal to clause in the WHERE clause\n\t\t\tEqualsTo equalsExpression = (EqualsTo) expression;\n\t\t\t\n\t\t\t// this extracts the left and the right expressions in the equal to clause\n\t\t\tExpression leftExpression = ((Expression) equalsExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) equalsExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(equalsExpression, tableToApplySelectionOn);\n\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\t//System.out.println(tableToApplySelectionOn);\n\t\t\t\t//System.out.println(tableToApplySelectionOn.columnDescriptionList);\n\t\t\t\t//System.out.println(tableToApplySelectionOn.columnIndexMap);\n\t\t\t\t/*System.out.println(leftVal);\n\t\t\t\tSystem.out.println(tableToApplySelectionOn.columnIndexMap.get(leftVal));\n\t\t\t\t*/\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\t\t\t\t\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"string\") || type.equalsIgnoreCase(\"char\") || type.equalsIgnoreCase(\"varchar\")) {\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\tif (array[index].equals(rightArray[rightIndex])) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (array[index].equals(rightArray[rightIndex].substring(1,rightArray[rightIndex].length() - 1))) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) == Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0]) && Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1]) && Integer.parseInt(leftDate[2]) == Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\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} else if (expression instanceof NotEqualsTo) {\n\n\t\t\n\t\t\t\n\t\t\t// this extracts the equal to clause in the WHERE clause\n\t\t\tNotEqualsTo equalsExpression = (NotEqualsTo) expression;\n\t\t\t\n\t\t\t// this extracts the left and the right expressions in the equal to clause\n\t\t\tExpression leftExpression = ((Expression) equalsExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) equalsExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(equalsExpression, tableToApplySelectionOn);\n\n\t\t\t} else {\n\t\t\n\t\t\t\t\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\t\t\t\t\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"string\") || type.equalsIgnoreCase(\"char\") || type.equalsIgnoreCase(\"varchar\")) {\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\tif (!array[index].equals(rightArray[rightIndex])) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\tif (!array[index].equals(rightArray[rightIndex].substring(1,rightArray[rightIndex].length() - 1))) {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) != Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) != Integer.parseInt(rightDate[0]) && Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1]) && Integer.parseInt(leftDate[2]) != Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\n\t\telse if (expression instanceof GreaterThanEquals) {\n\t\t\t\n\t\t\tGreaterThanEquals greaterThanEqualsExpression = (GreaterThanEquals) expression;\n\t\t\tExpression leftExpression = ((Expression) greaterThanEqualsExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) greaterThanEqualsExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(greaterThanEqualsExpression, tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) >= Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) < Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) < Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) < Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*if(tableToApplySelectionOn.tableName.equalsIgnoreCase(\"lineitem\") && expression.toString().equals(\"lineitem.receiptdate >= date('1994-01-01')\")){\n\t\t\t\t\t//System.out.println(listOfIndices);\n\t\t\t\t\t}*/\n\t\t\t}\n\t\t} else if (expression instanceof GreaterThan) {\n\t\t\t\n\t\t\tGreaterThan greaterThanExpression = (GreaterThan) expression;\n\t\t\tExpression leftExpression = ((Expression) greaterThanExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) greaterThanExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(greaterThanExpression, tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) > Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) < Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) < Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) <= Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\telse if (expression instanceof MinorThan) {\n\t\t\tMinorThan minorThanExpression = (MinorThan) expression;\n\n\t\t\tExpression leftExpression = ((Expression) minorThanExpression.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) minorThanExpression.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression|| rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(minorThanExpression, tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) < Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) > Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) > Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) >= Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t/*if(tableToApplySelectionOn.tableName.equalsIgnoreCase(\"lineitem\") && expression.toString().equals(\"lineitem.commitdate < lineitem.receiptdate\")){\n\t\t\t\t\tSystem.out.println(listOfIndices);\n\t\t\t\t\t}*/\n\t\t\t}\n\t\t}\n\t\telse if (expression instanceof MinorThanEquals) {\n\t\t\t\n\t\t\tMinorThanEquals minorEqualsThan = (MinorThanEquals) expression;\n\t\t\tExpression leftExpression = ((Expression) minorEqualsThan.getLeftExpression());\n\t\t\tExpression rightExpression = ((Expression) minorEqualsThan.getRightExpression());\n\n\t\t\tif (leftExpression instanceof BinaryExpression || rightExpression instanceof BinaryExpression) {\n\t\t\t\tlistOfIndices = alegbricExpressionEvaluator(minorEqualsThan,tableToApplySelectionOn);\n\t\t\t} else {\n\t\t\t\tString leftVal = leftExpression.toString();\n\t\t\t\tString rightVal = rightExpression.toString();\n\t\t\t\tString type = tableToApplySelectionOn.columnDescriptionList.get(tableToApplySelectionOn.columnIndexMap.get(leftVal)).getColDataType().getDataType();\n\n\t\t\t\tString tuple = null;\n\t\t\t\tint tupleNo = 0;\n\n\t\t\t\twhile ((tuple = tableToApplySelectionOn.returnTuple()) != null) {\n\t\t\t\t\ttupleNo++;\n\t\t\t\t\tString array[] = tuple.split(\"\\\\|\");\n\t\t\t\t\tint index = tableToApplySelectionOn.columnIndexMap.get(leftVal);\n\n\t\t\t\t\tString[] rightArray = null;\n\t\t\t\t\tint rightIndex = 0;\n\n\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\trightIndex = tableToApplySelectionOn.columnIndexMap.get(rightVal);\n\t\t\t\t\t\trightArray = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trightArray = new String[1];\n\t\t\t\t\t\trightArray[0] = rightVal;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (type.equalsIgnoreCase(\"int\") || type.equalsIgnoreCase(\"decimal\")) {\n\n\t\t\t\t\t\tif (Double.parseDouble(array[index]) <= Double.parseDouble(rightArray[rightIndex])) {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (type.equalsIgnoreCase(\"date\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tString leftDate[] = array[index].split(\"-\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tString rightDate[] = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tableToApplySelectionOn.columnIndexMap.containsKey(rightVal)) {\n\t\t\t\t\t\t\trightDate = rightArray[rightIndex].split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\trightDate = rightArray[rightIndex].substring(6, rightArray[rightIndex].length() - 2).split(\"-\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif (Integer.parseInt(leftDate[0]) > Integer.parseInt(rightDate[0])) {\n\n\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[0]) == Integer.parseInt(rightDate[0])) {\n\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[1]) > Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t} else if (Integer.parseInt(leftDate[1]) == Integer.parseInt(rightDate[1])) {\n\t\t\t\t\t\t\t\tif (Integer.parseInt(leftDate[2]) > Integer.parseInt(rightDate[2])) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlistOfIndices.add(tupleNo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else if (expression instanceof AndExpression) {\n\t\t\t\n\t\t\tAndExpression andExpression = (AndExpression) expression;\n\t\t\tExpression leftVal = ((Expression) andExpression.getLeftExpression());\n\t\t\tExpression rightVal = ((Expression) andExpression.getRightExpression());\n\n\t\t\tArrayList<Integer> leftArr = expressionEvaluator(leftVal, tableToApplySelectionOn);\n\t\t\tArrayList<Integer> rightArr = expressionEvaluator(rightVal, tableToApplySelectionOn);\n\n\t\t\tArrayList<Integer> set = new ArrayList<Integer>();\n\t\t\tfor (int i : leftArr) {\n\t\t\t\tif (rightArr.contains(i)) {\n\t\t\t\t\tset.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlistOfIndices = set;\n\t\t}\n\n\t\telse if (expression instanceof OrExpression) {\n\t\t\t\n\t\t\t\n\t\t\tOrExpression orExpression = (OrExpression) expression;\n\t\t\tExpression leftVal = ((Expression) orExpression.getLeftExpression());\n\t\t\tExpression rightVal = ((Expression) orExpression.getRightExpression());\n\n\t\t\tArrayList<Integer> leftArr = expressionEvaluator(leftVal, tableToApplySelectionOn);\n\t\t\tArrayList<Integer> rightArr = expressionEvaluator(rightVal, tableToApplySelectionOn);\n\t\t\t\t\t\t\n\t\t\tTreeSet<Integer> set = new TreeSet<Integer>();\n\t\t\t\n\t\t\tfor (int i : leftArr) {\n\t\t\t\tset.add(i);\n\t\t\t}\n\t\t\tfor (int i : rightArr) {\n\t\t\t\tset.add(i);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i : set) {\n\t\t\t\tlistOfIndices.add(i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse if (expression instanceof Parenthesis){\n\t\t\t\n\t\t\tArrayList<Integer> expArr = expressionEvaluator(((Parenthesis)expression).getExpression(), tableToApplySelectionOn);\n\t\t\t\n\t\t\tfor(int i:expArr){\n\t\t\t\tlistOfIndices.add(i);\n\t\t\t}\n\t\t}\n\n\t\t\n\t\treturn listOfIndices;\n\t}",
"@Test(timeout = 4000)\n public void test119() throws Throwable {\n String[] stringArray0 = new String[4];\n String string0 = SQLUtil.innerJoin(\"create unique indextable %)vq\", stringArray0, \"create unique indextable %)vq\", \"drop table\", stringArray0);\n assertEquals(\"create unique indextable %)vq as drop table on create unique indextable %)vq.null = drop table.null and create unique indextable %)vq.null = drop table.null and create unique indextable %)vq.null = drop table.null and create unique indextable %)vq.null = drop table.null\", string0);\n }",
"@Test\n public void testMixedJoin2() throws Exception {\n String sql = \"SELECT * FROM g1 cross join (g2 cross join g3), g4, g5 cross join g6\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode1 = verify(fromNode, From.CLAUSES_REF_NAME, 1, JoinPredicate.ID);\n verifyJoin(jpNode1, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode1, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g1\");\n \n Node jpNode2 = verify(jpNode1, JoinPredicate.RIGHT_CLAUSE_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode2, JoinTypeTypes.JOIN_CROSS);\n \n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g2\");\n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g3\");\n\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 2, \"g4\");\n\n Node jpNode3 = verify(fromNode, From.CLAUSES_REF_NAME, 3, JoinPredicate.ID);\n verifyJoin(jpNode3, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g5\");\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g6\");\n \n verifySql(\"SELECT * FROM g1 CROSS JOIN (g2 CROSS JOIN g3), g4, g5 CROSS JOIN g6\", fileNode);\n }",
"@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test HQL Query for Multiple Select for Map and Pagination with Address 02\")\n public void testHQLQueryForMultipleSelectForMapAndPaginationWithAddress02()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n Transaction transaction = null;\n try {\n transaction = session.beginTransaction();\n\n Query query = session.createQuery(\n \"select new Map(address02Zip, address02Street) from SBAddress02 order by address02Street asc\");\n query.setFirstResult(5);\n query.setMaxResults(10);\n\n List<Map<String, String>> addressDetails = query.list();\n\n transaction.commit();\n\n System.out.println(addressDetails.size());\n\n String street = addressDetails\n .stream()\n .filter(address -> address.containsKey(\"1\"))\n .findFirst()\n .get()\n .get(\"1\");\n\n System.out.println(\"First Street : \" + street);\n\n List<String> streets = addressDetails\n .stream()\n .map(address -> address.get(\"1\"))\n .collect(Collectors.toList());\n\n streets.forEach(System.out::println);\n } catch (Exception e) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n } catch (Throwable throwable) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }",
"public pl.wcislo.sbql4j.java.model.runtime.Struct executeQuery() {\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Department> _ident_dept =\r\n dept;\r\n java.util.List<java.lang.Integer> _dotResult = new java.util.ArrayList<java.lang.Integer>();\r\n int _dotIndex = 0;\r\n\r\n for (pl.wcislo.sbql4j.examples.model.advanced.Department _dotEl : _ident_dept) {\r\n if (_dotEl == null) {\r\n continue;\r\n }\r\n\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Employee> _mth_getEmploysResult =\r\n _dotEl.getEmploys();\r\n java.lang.Integer _countResult = _mth_getEmploysResult.size();\r\n _dotResult.add(_countResult);\r\n _dotIndex++;\r\n }\r\n\r\n Number _min0 = null;\r\n\r\n for (Number _minEl0 : _dotResult) {\r\n _min0 = MathUtils.min(_min0, _minEl0);\r\n }\r\n\r\n java.lang.Integer _minResult = (java.lang.Integer) _min0;\r\n java.lang.Integer _asResult_minimum = _minResult;\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Department> _ident_dept1 =\r\n dept;\r\n java.util.List<java.lang.Integer> _dotResult1 = new java.util.ArrayList<java.lang.Integer>();\r\n int _dotIndex1 = 0;\r\n\r\n for (pl.wcislo.sbql4j.examples.model.advanced.Department _dotEl1 : _ident_dept1) {\r\n if (_dotEl1 == null) {\r\n continue;\r\n }\r\n\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Employee> _mth_getEmploysResult1 =\r\n _dotEl1.getEmploys();\r\n java.lang.Integer _countResult1 = _mth_getEmploysResult1.size();\r\n _dotResult1.add(_countResult1);\r\n _dotIndex1++;\r\n }\r\n\r\n java.lang.Double _avgResult = 0d;\r\n\r\n if ((_dotResult1 != null) && !_dotResult1.isEmpty()) {\r\n Number _avgSum1 = null;\r\n\r\n for (Number _avgEl1 : _dotResult1) {\r\n _avgSum1 = MathUtils.sum(_avgSum1, _avgEl1);\r\n }\r\n\r\n _avgResult = _avgSum1.doubleValue() / _dotResult1.size();\r\n }\r\n\r\n java.lang.Double _asResult_average = _avgResult;\r\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult = OperatorUtils.cartesianProductSS(_asResult_minimum,\r\n _asResult_average, \"minimum\", \"average\");\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Department> _ident_dept2 =\r\n dept;\r\n java.util.List<java.lang.Integer> _dotResult2 = new java.util.ArrayList<java.lang.Integer>();\r\n int _dotIndex2 = 0;\r\n\r\n for (pl.wcislo.sbql4j.examples.model.advanced.Department _dotEl2 : _ident_dept2) {\r\n if (_dotEl2 == null) {\r\n continue;\r\n }\r\n\r\n java.util.List<pl.wcislo.sbql4j.examples.model.advanced.Employee> _mth_getEmploysResult2 =\r\n _dotEl2.getEmploys();\r\n java.lang.Integer _countResult2 = _mth_getEmploysResult2.size();\r\n _dotResult2.add(_countResult2);\r\n _dotIndex2++;\r\n }\r\n\r\n Number _max0 = null;\r\n\r\n for (Number _maxEl0 : _dotResult2) {\r\n _max0 = MathUtils.max(_max0, _maxEl0);\r\n }\r\n\r\n java.lang.Integer _maxResult = (java.lang.Integer) _max0;\r\n java.lang.Integer _asResult_maximum = _maxResult;\r\n pl.wcislo.sbql4j.java.model.runtime.Struct _queryResult = OperatorUtils.cartesianProductSS(_commaResult,\r\n _asResult_maximum, \"\", \"maximum\");\r\n\r\n return _queryResult;\r\n }",
"private TupleList InDirectSelect(String[] p){\n TupleList tpl= new TupleList();\n String classname = p[3];\n String attrname = p[4];\n String crossname = p[2];\n String[] attrtype = new String[1];\n String[] con =new String[3];\n con[0] = p[6];\n con[1] = p[7];\n con[2] = p[8];\n\n int classid = 0;\n int crossid = 0;\n String crossattrtype = null;\n int crossattrid = 0;\n for(ClassTableItem item : classt.classTable){\n if(item.classname.equals(classname)){\n classid = item.classid;\n if(attrname.equals(item.attrname))\n attrtype[0]=item.attrtype;\n }\n if(item.classname.equals(crossname)){\n crossid = item.classid;\n if(item.attrname.equals(con[0])) {\n crossattrtype = item.attrtype;\n crossattrid = item.attrid;\n }\n }\n }\n\n for(ObjectTableItem item1:topt.objectTable){\n if(item1.classid == crossid){\n Tuple tuple = GetTuple(item1.blockid,item1.offset);\n if(Condition(crossattrtype,tuple,crossattrid,con[2])){\n for(BiPointerTableItem item3: biPointerT.biPointerTable){\n if(item1.tupleid == item3.objectid&&item3.deputyid == classid){\n for(ObjectTableItem item2: topt.objectTable){\n if(item2.tupleid == item3.deputyobjectid){\n Tuple ituple = GetTuple(item2.blockid,item2.offset);\n tpl.addTuple(ituple);\n }\n }\n }\n }\n\n }\n }\n\n }\n String[] name = new String[1];\n name[0] = attrname;\n int[] id = new int[1];\n id[0] = 0;\n PrintSelectResult(tpl,name,id,attrtype);\n return tpl;\n\n\n\n\n }",
"protected abstract Set method_1559();",
"private DbQuery() {}",
"@Test\n public void testWouter1() {\n long n = 7381783232223l; // too big for an int\n Compound term = new Compound(\"is\", new Term[]{new Variable(\"X\"), new Integer(n)});\n Map<String, Term>[] solutions = new Query(term).allSolutions();\n assertEquals(1, solutions.length);\n Map<String, Term> solution = solutions[0];\n assertTrue(solution.containsKey(\"X\"));\n Object result = solution.get(\"X\");\n assertTrue(result instanceof Integer);\n assertEquals(n, ((Integer) result).longValue());\n }",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"@Override\r\n public QueryResult.ResultQ1[] functionQ1() {\r\n QueryResult.ResultQ1[] res=null;\r\n ArrayList<QueryResult.ResultQ1> re=new ArrayList<QueryResult.ResultQ1>();\r\n String q = \"SELECT b.isbn,b.first_publish_year,p.publisher_id,p.publisher_name FROM book b, publisher p WHERE p.publisher_id = b.publisher_id AND b.page_count = (SELECT max(bo.page_count) FROM book bo ) ORDER BY b.isbn ASC\";\r\n try {\r\n Statement s = this.connection.createStatement();\r\n ResultSet r = s.executeQuery(q);\r\n while(r.next()){\r\n String is = r.getString(\"isbn\");\r\n String fpy= r.getString(\"first_publish_year\");\r\n int pc= r.getInt(\"publisher_id\");\r\n String pn=r.getString(\"publisher_name\");\r\n QueryResult.ResultQ1 qq = new QueryResult.ResultQ1(is,fpy,pc,pn);\r\n re.add(qq);\r\n \r\n \r\n }\r\n res=re.toArray(new QueryResult.ResultQ1[0]);\r\n s.close();\r\n \r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n \r\n return res;\r\n }",
"@Override\n\tpublic void queryPoints() {\n\n\t}",
"protected String getSql(MethylDbQuerier params, String chr) \n\tthrows Exception{\n\t\tString methTable = tablePrefix + chr;\n\t\t//String methTable = params.methylTablePrefix;\n\t\tString sql = String.format(\"select * from %s WHERE \", methTable);\n\t\tsql += \"ABaseRefUpperCase != '0'\";\n\t\tsql += \" AND BBaseRefUpperCase != '0'\";\n\t\t\n\t\tsql += \" AND (ACReads != 0 OR BCReads != 0)\";\n\t\tsql += \" AND (ATReads != 0 OR BTReads != 0)\";\n\t\t//sql += \" AND (ACReads + ATReads)/totalReads >= \" + minAlleleFreq;\n\t\t//sql += \" AND (BCReads + BTReads)/totalReads >= \" + minAlleleFreq;\n\t\t//sql += \" AND (ACReads + ATReads >= \" + minAlleleCount + \")\";\n\t\t//sql += \" AND (BCReads + BTReads >= \" + minAlleleCount + \")\";\n\t\tsql += \" AND aReadsOpposite/totalReadsOpposite <= \" + minOppoAFreq;\n\t\tif (Cpg){\n\t\t\tsql += \" AND nextBaseRefUpperCase = 'G'\";\n\t\t}\n\t\t\t\n\t\t//sql += \" GROUP BY chromPos \"; // If you don't do this, you get multiple instances of the same CpG if it overlaps multiple features.\n\t\tsql += \" ORDER BY chromPos,alleleChromPos ;\";\n\t\t\n\t\treturn sql;\n\t}",
"private void checkMeta( String adql, ColSpec[] colSpecs,\n StarTable table ) {\n\n /* Check column counts match. */\n int qCount = colSpecs.length;\n int rCount = table.getColumnCount();\n if ( qCount != rCount ) {\n String msg = new StringBuffer()\n .append( \"Query/result column count mismatch; \" )\n .append( qCount )\n .append( \" != \" )\n .append( rCount )\n .append( \" for \" )\n .append( adql )\n .toString();\n reporter_.report( ReportType.ERROR, \"NCOL\", msg );\n return;\n }\n int ncol = qCount;\n assert ncol == rCount;\n\n /* Check column names match. */\n for ( int ic = 0; ic < ncol; ic++ ) {\n ColSpec cspec = colSpecs[ ic ];\n ColumnInfo cinfo = table.getColumnInfo( ic );\n String qName = cspec.getResultName();\n String rName = cinfo.getName();\n if ( ! qName.equalsIgnoreCase( rName ) ) {\n String msg = new StringBuffer()\n .append( \"Query/result column name mismatch \" )\n .append( \"for column #\" )\n .append( ic )\n .append( \"; \" )\n .append( qName )\n .append( \" != \" )\n .append( rName )\n .append( \" for \" )\n .append( adql )\n .toString();\n reporter_.report( ReportType.ERROR, \"CNAM\", msg );\n }\n String columnId = rName.equalsIgnoreCase( qName )\n ? qName\n : \"#\" + ic;\n\n /* Check column types match. */\n String qType = cspec.getColumnMeta().getDataType();\n String rType =\n (String) cinfo.getAuxDatumValue( VOStarTable.DATATYPE_INFO,\n String.class );\n if ( ! CompareMetadataStage\n .compatibleDataTypes( qType, rType ) ) {\n String msg = new StringBuffer()\n .append( \"Query/result column type mismatch \" )\n .append( \" for column \" )\n .append( columnId )\n .append( \"; \" )\n .append( qType )\n .append( \" vs. \" )\n .append( rType )\n .append( \" for \" )\n .append( adql )\n .toString();\n reporter_.report( ReportType.ERROR, \"CTYP\", msg );\n }\n }\n }",
"@Test\n public void test() {\n manager.clear();\n TypedQuery<MasterEntity> query2 = manager.createQuery(\"select m from MasterEntity m join fetch m.ref\", MasterEntity.class);\n logger.debug(query2.getResultList().toString());\n// manager.clear();\n// CriteriaBuilder cb = manager.getCriteriaBuilder();\n// CriteriaQuery<MasterEntity> q = cb.createQuery(MasterEntity.class);\n// Root<MasterEntity> root = q.from(MasterEntity.class);\n// root.fetch(\"ref\");\n// manager.createQuery(q).getResultList();\n\n }",
"public static void test() {\n\t\t\n\t\tSystem.out.println(\"\\n\\n------------ TESTING CODE ASSIGNMENT 4D --------------\\n\\n\");\n\t\t\n\t\t\n\t\tEntityManagerFactory entityManagerFactory = PersistenceUtil.getEntityManagerFactory();\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\n\t\t\n\t\tentityManager.getTransaction().begin();\n\t\n\t\tSQLInterceptor.resetSelectCount();\n\t\t\n//\t\tSystem.out.println(\"Executing efficient query of task 2b:\");\n\t\tJPQLQueries jpqlQueries = new JPQLQueries(entityManager);\n\t\tjpqlQueries.getComputerUsage();\n\t\t\n\t\tSQLInterceptor.printSelectCount();\n\t\t\n\t\tentityManager.getTransaction().commit();\n\t\tentityManager.close();\n\t}",
"private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }",
"void doNestedNaturalJoin(WorkflowExpressionQuery e, NestedExpression nestedExpression, StringBuffer columns, StringBuffer where, StringBuffer whereComp, List values, List queries, StringBuffer orderBy) { // throws WorkflowStoreException {\n\n Object value;\n Field currentExpField;\n\n int numberOfExp = nestedExpression.getExpressionCount();\n\n for (int i = 0; i < numberOfExp; i++) { //ori\n\n //for (i = numberOfExp; i > 0; i--) { //reverse 1 of 3\n Expression expression = nestedExpression.getExpression(i); //ori\n\n //Expression expression = nestedExpression.getExpression(i - 1); //reverse 2 of 3\n if (!(expression.isNested())) {\n FieldExpression fieldExp = (FieldExpression) expression;\n\n FieldExpression fieldExpBeforeCurrent;\n queries.add(expression);\n\n int queryId = queries.size();\n\n if (queryId > 1) {\n columns.append(\" , \");\n }\n\n //do; OS_CURRENTSTEP AS a1 ....\n if (fieldExp.getContext() == Context.CURRENT_STEPS) {\n columns.append(currentTable + \" AS \" + 'a' + queryId);\n } else if (fieldExp.getContext() == Context.HISTORY_STEPS) {\n columns.append(historyTable + \" AS \" + 'a' + queryId);\n } else {\n columns.append(entryTable + \" AS \" + 'a' + queryId);\n }\n\n ///////// beginning of WHERE JOINS/s : //////////////////////////////////////////\n //do for first query; a1.ENTRY_ID = a1.ENTRY_ID\n if (queryId == 1) {\n where.append(\"a1\" + '.' + stepProcessId);\n where.append(\" = \");\n\n if (fieldExp.getContext() == Context.CURRENT_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else if (fieldExp.getContext() == Context.HISTORY_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else {\n where.append(\"a\" + queryId + '.' + entryId);\n }\n }\n\n //do; a1.ENTRY_ID = a2.ENTRY_ID\n if (queryId > 1) {\n fieldExpBeforeCurrent = (FieldExpression) queries.get(queryId - 2);\n\n if (fieldExpBeforeCurrent.getContext() == Context.CURRENT_STEPS) {\n where.append(\"a\" + (queryId - 1) + '.' + stepProcessId);\n } else if (fieldExpBeforeCurrent.getContext() == Context.HISTORY_STEPS) {\n where.append(\"a\" + (queryId - 1) + '.' + stepProcessId);\n } else {\n where.append(\"a\" + (queryId - 1) + '.' + entryId);\n }\n\n where.append(\" = \");\n\n if (fieldExp.getContext() == Context.CURRENT_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else if (fieldExp.getContext() == Context.HISTORY_STEPS) {\n where.append(\"a\" + queryId + '.' + stepProcessId);\n } else {\n where.append(\"a\" + queryId + '.' + entryId);\n }\n }\n\n ///////// end of LEFT JOIN : \"LEFT JOIN OS_CURRENTSTEP a1 ON a0.ENTRY_ID = a1.ENTRY_ID\n //\n //////// BEGINNING OF WHERE clause //////////////////////////////////////////////////\n value = fieldExp.getValue();\n currentExpField = fieldExp.getField();\n\n //if the Expression is negated and FieldExpression is \"EQUALS\", we need to negate that FieldExpression\n if (expression.isNegate()) {\n //do ; a2.STATUS !=\n whereComp.append(\"a\" + queryId + '.' + fieldName(fieldExp.getField()));\n\n switch (fieldExp.getOperator()) { //WHERE a1.STATUS !=\n case EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS NOT \");\n } else {\n whereComp.append(\" != \");\n }\n\n break;\n\n case NOT_EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS \");\n } else {\n whereComp.append(\" = \");\n }\n\n break;\n\n case GT:\n whereComp.append(\" < \");\n\n break;\n\n case LT:\n whereComp.append(\" > \");\n\n break;\n\n default:\n whereComp.append(\" != \");\n\n break;\n }\n\n switch (currentExpField) {\n case START_DATE:\n case FINISH_DATE:\n values.add(new Timestamp(((java.util.Date) value).getTime()));\n\n break;\n\n default:\n\n if (value == null) {\n values.add(null);\n } else {\n values.add(value);\n }\n\n break;\n }\n } else {\n //do; a1.OWNER =\n whereComp.append(\"a\" + queryId + '.' + fieldName(fieldExp.getField()));\n\n switch (fieldExp.getOperator()) { //WHERE a2.FINISH_DATE <\n case EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS \");\n } else {\n whereComp.append(\" = \");\n }\n\n break;\n\n case NOT_EQUALS:\n\n if (value == null) {\n whereComp.append(\" IS NOT \");\n } else {\n whereComp.append(\" <> \");\n }\n\n break;\n\n case GT:\n whereComp.append(\" > \");\n\n break;\n\n case LT:\n whereComp.append(\" < \");\n\n break;\n\n default:\n whereComp.append(\" = \");\n\n break;\n }\n\n switch (currentExpField) {\n case START_DATE:\n case FINISH_DATE:\n values.add(new Timestamp(((java.util.Date) value).getTime()));\n\n break;\n\n default:\n\n if (value == null) {\n values.add(null);\n } else {\n values.add(value);\n }\n\n break;\n }\n }\n\n //do; a1.OWNER = ? ... a2.STATUS != ?\n whereComp.append(\" ? \");\n\n //////// END OF WHERE clause////////////////////////////////////////////////////////////\n if ((e.getSortOrder() != WorkflowExpressionQuery.SORT_NONE) && (e.getOrderBy() != null)) {\n // System.out.println(\"ORDER BY ; queries.size() : \" + queries.size());\n orderBy.append(\" ORDER BY \");\n orderBy.append(\"a1\" + '.' + fieldName(e.getOrderBy()));\n\n if (e.getSortOrder() == WorkflowExpressionQuery.SORT_ASC) {\n orderBy.append(\" ASC\");\n } else if (e.getSortOrder() == WorkflowExpressionQuery.SORT_DESC) {\n orderBy.append(\" DESC\");\n }\n }\n } else {\n NestedExpression nestedExp = (NestedExpression) expression;\n\n where.append('(');\n\n doNestedNaturalJoin(e, nestedExp, columns, where, whereComp, values, queries, orderBy);\n\n where.append(')');\n }\n\n //add AND or OR clause between the queries\n if (i < (numberOfExp - 1)) { //ori\n\n //if (i > 1) { //reverse 3 of 3\n if (nestedExpression.getExpressionOperator() == LogicalOperator.AND) {\n where.append(\" AND \");\n whereComp.append(\" AND \");\n } else {\n where.append(\" OR \");\n whereComp.append(\" OR \");\n }\n }\n }\n }",
"@Test\n public void testProcessProjectionsAll() {\n PrestoSQLGenerator sqlGenerator = new PrestoSQLGenerator();\n StringBuilder query = new StringBuilder();\n QueryInfo queryInfo = QueryInfo.newBuilder().build();\n\n JdbcMetadataMapping jdbcMetadataMapping = mock(JdbcMetadataMapping.class);\n JdbcModel.JdbcTable table = mock(JdbcModel.JdbcTable.class);\n EdmEntitySet entitySet = mock(EdmEntitySet.class);\n EdmEntityType edmEntityType = mock(EdmEntityType.class);\n EdmType edmType = mock(EdmType.class);\n\n table.tableName = \"test_table\";\n when(jdbcMetadataMapping.getMappedTable(any(EdmEntitySet.class))).thenReturn(table);\n when(entitySet.getType()).thenReturn(edmEntityType);\n\n final EdmProperty prop_1 = EdmProperty.newBuilder(\"col_1\").setType(edmType).build();\n final EdmProperty prop_2 = EdmProperty.newBuilder(\"col_2\").setType(edmType).build();\n final EdmProperty prop_3 = EdmProperty.newBuilder(\"col_3\").setType(edmType).build();\n when(edmEntityType.getProperties()).thenReturn(Enumerable.create(ImmutableList.<EdmProperty>builder().\n add(prop_1).\n add(prop_2).\n add(prop_3).build()));\n\n JdbcModel.JdbcColumn jdbcColumn_1 = mock(JdbcModel.JdbcColumn.class);\n jdbcColumn_1.columnName = \"col_1\";\n when(jdbcMetadataMapping.getMappedColumn(prop_1)).thenReturn(jdbcColumn_1);\n\n JdbcModel.JdbcColumn jdbcColumn_2= mock(JdbcModel.JdbcColumn.class);\n jdbcColumn_2.columnName = \"col_2\";\n when(jdbcMetadataMapping.getMappedColumn(prop_2)).thenReturn(jdbcColumn_2);\n\n JdbcModel.JdbcColumn jdbcColumn_3 = mock(JdbcModel.JdbcColumn.class);\n jdbcColumn_3.columnName = \"col_3\";\n when(jdbcMetadataMapping.getMappedColumn(prop_3)).thenReturn(jdbcColumn_3);\n\n sqlGenerator.processProjections(jdbcMetadataMapping, entitySet, queryInfo, query);\n assertEquals(\"col_1 AS col_1,col_2 AS col_2,col_3 AS col_3 FROM test_table\", query.toString());\n }",
"@Test\n public void rangeAndCompactIndexesShouldReturnTheSameResults() {\n try {\n // CacheUtils.restartCache();\n if (!isInitDone) {\n isInitDone = true;\n }\n qs.removeIndexes();\n\n String[] queryStr =\n new String[] {\"Select status from \" + SEPARATOR + \"portfolio pf where status='active'\",\n \"Select pf.ID from \" + SEPARATOR + \"portfolio pf where pf.ID > 2 and pf.ID < 100\",\n \"Select * from \" + SEPARATOR + \"portfolio pf where pf.position1.secId > '2'\",};\n\n String[] queryFields = new String[] {\"status\", \"ID\", \"position1.secId\",};\n\n for (int i = 0; i < queryStr.length; i++) {\n // Clear indexes if any.\n qs.removeIndexes();\n\n // initialize region.\n region.clear();\n for (int k = 0; k < 10; k++) {\n region.put(\"\" + k, new Portfolio(k));\n }\n\n for (int j = 0; j < 1; j++) { // With different region size.\n // Update Region.\n for (int k = 0; k < (j * 100); k++) {\n region.put(\"\" + k, new Portfolio(k));\n }\n\n // Create compact index.\n IndexManager.TEST_RANGEINDEX_ONLY = false;\n index = (IndexProtocol) qs.createIndex(queryFields[i] + \"Index\", IndexType.FUNCTIONAL,\n queryFields[i], SEPARATOR + \"portfolio\");\n\n // Execute Query.\n SelectResults[][] rs = new SelectResults[1][2];\n Query query = qs.newQuery(queryStr[i]);\n rs[0][0] = (SelectResults) query.execute();\n\n // remove compact index.\n qs.removeIndexes();\n\n // Create Range Index.\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n index = (IndexProtocol) qs.createIndex(queryFields[i] + \"rIndex\", IndexType.FUNCTIONAL,\n queryFields[i], SEPARATOR + \"portfolio\");\n\n query = qs.newQuery(queryStr[i]);\n rs[0][1] = (SelectResults) query.execute();\n\n CacheUtils.log(\n \"#### rs1 size is : \" + (rs[0][0]).size() + \" rs2 size is : \" + (rs[0][1]).size());\n StructSetOrResultsSet ssORrs = new StructSetOrResultsSet();\n ssORrs.CompareQueryResultsWithoutAndWithIndexes(rs, 1, queryStr);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"Test failed due to exception=\" + e);\n } finally {\n IndexManager.TEST_RANGEINDEX_ONLY = false;\n isInitDone = false;\n CacheUtils.restartCache();\n }\n }",
"@Test(timeout = 4000)\n public void test042() throws Throwable {\n String[] stringArray0 = new String[5];\n String string0 = SQLUtil.innerJoin(\"alter materialized viewjcsh%4%|@v9\", stringArray0, \"create materialized viewjcsh%4%|@v9\", \"\", stringArray0);\n assertEquals(\"create materialized viewjcsh%4%|@v9 as on alter materialized viewjcsh%4%|@v9.null = .null and alter materialized viewjcsh%4%|@v9.null = .null and alter materialized viewjcsh%4%|@v9.null = .null and alter materialized viewjcsh%4%|@v9.null = .null and alter materialized viewjcsh%4%|@v9.null = .null\", string0);\n }",
"@Test\n public void test2() throws Exception {\n String query = \"A =LOAD 'file.txt' AS (a:(u,v), b, c);\" +\n \"B = FOREACH A GENERATE $0, b;\" +\n \"C = FILTER B BY \" + SIZE.class.getName() +\"(TOTUPLE(*)) > 5;\" +\n \"STORE C INTO 'empty';\"; \n LogicalPlan newLogicalPlan = buildPlan( query );\n\n Operator load = newLogicalPlan.getSources().get( 0 );\n Assert.assertTrue( load instanceof LOLoad );\n Operator fe1 = newLogicalPlan.getSuccessors( load ).get( 0 );\n Assert.assertTrue( fe1 instanceof LOForEach );\n Operator filter = newLogicalPlan.getSuccessors( fe1 ).get( 0 );\n Assert.assertTrue( filter instanceof LOFilter );\n Operator fe2 = newLogicalPlan.getSuccessors( filter ).get( 0 );\n Assert.assertTrue( fe2 instanceof LOForEach );\n }"
] | [
"0.57991016",
"0.54225165",
"0.5281627",
"0.52330065",
"0.519648",
"0.51907754",
"0.51642334",
"0.5155655",
"0.5114563",
"0.5112948",
"0.50837016",
"0.5079546",
"0.5068534",
"0.5046697",
"0.50263953",
"0.5013427",
"0.5010049",
"0.5010049",
"0.5010049",
"0.4988944",
"0.49712715",
"0.4969313",
"0.49217406",
"0.49087304",
"0.49043235",
"0.4879435",
"0.4875048",
"0.4872868",
"0.48655874",
"0.48548242",
"0.48506528",
"0.4850485",
"0.4850151",
"0.48492908",
"0.48476493",
"0.48465782",
"0.4839902",
"0.4834427",
"0.48299286",
"0.48255485",
"0.48164445",
"0.48120752",
"0.48035184",
"0.4787723",
"0.47871986",
"0.47857806",
"0.47806355",
"0.47757253",
"0.4762779",
"0.4762218",
"0.47566405",
"0.47541213",
"0.47453383",
"0.47415462",
"0.47407913",
"0.473471",
"0.47232684",
"0.47203583",
"0.471553",
"0.4714354",
"0.471383",
"0.47134542",
"0.47004783",
"0.4697714",
"0.46938956",
"0.4679868",
"0.4678183",
"0.46715948",
"0.46700996",
"0.46650642",
"0.46632615",
"0.46624756",
"0.46559513",
"0.46538225",
"0.46480477",
"0.46459627",
"0.46447742",
"0.46438807",
"0.4641676",
"0.46272632",
"0.4627137",
"0.46266872",
"0.46265343",
"0.46264407",
"0.46180344",
"0.46104887",
"0.46082038",
"0.45991513",
"0.45919117",
"0.45918658",
"0.45911834",
"0.4587945",
"0.4584574",
"0.45703104",
"0.4568415",
"0.4565567",
"0.45644248",
"0.45642418",
"0.45615005",
"0.4560721",
"0.45604038"
] | 0.0 | -1 |
Creates an empty value label. | @UiConstructor
public ValueLabel(Renderer<? super T> renderer) {
super(true);
this.renderer = renderer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LabelValueBean() {\r\n\t\tsuper(\"\", \"\");\r\n\t}",
"public LLabel() {\n this(\"\");\n }",
"private void checkLabelValue()\n\t{\n\t\tif(labelValue != null && !\"\".equals(labelValue))\n\t\t{\n\t\t\tlabelValue += \": \";\n\t\t}\n\t}",
"public Label(String name, Integer value)\n {\n this.name = name;\n this.value = value;\n this.size = null; // Size is nonsensical for addresses\n this.type = Type.VALUE;\n }",
"private BNode generateBlankNodeTermType(TermMap termMap, String value) {\n \t\tif (value == null)\n \t\t\treturn vf.createBNode();\n \t\telse\n \t\t\treturn vf.createBNode(value);\n \t}",
"public Label create() {\n\t\t\tgeneratedValue += 1;\n\t\t\treturn new Label(Type.GENERATED, generatedValue);\n\t\t}",
"@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}",
"public SimpleNodeLabel() {\n super();\n }",
"public BLabel()\n {\n this((String) null, WEST);\n }",
"public LabelFactory() {\n this(0);\n }",
"public Builder clearLabel() {\n \n label_ = getDefaultInstance().getLabel();\n onChanged();\n return this;\n }",
"public Label create(final int userValue) {\n\t\t\treturn new Label(Type.FIXED, userValue);\n\t\t}",
"@Override\n\t\t\tpublic String getLabel() {\n\t\t\t\treturn null;\n\t\t\t}",
"public HTMLLabel() {\n this(null);\n }",
"public Label(String name, Integer size, Type type)\n {\n this.name = name;\n this.value = null;\n this.size = size;\n this.type = type;\n }",
"@Test\n public void testConstructTaintFromNullLabel() {\n Integer label = null;\n Taint t = Taint.withLabel(label);\n assertTrue(t.isEmpty());\n }",
"public Label() {\n }",
"public Value label(String label) {\n this.label = label;\n return this;\n }",
"public static Tag emptyTag() {\n\t\treturn new Tag(NAME, \"\");\n\t}",
"public Value() {}",
"public EmptyType() {\n super(\"<EMPTY>\");\n }",
"public static Label createInputLabel(String lblValue) {\n\t\tLabel lbl = new Label(lblValue);\n\t\tlbl.setFont(Font.font(\"Arial\", FontWeight.SEMI_BOLD, 20));\n\t\treturn lbl;\n\t}",
"public Label() {\n\t\tthis(\"L\");\n\t}",
"Object getDefaultLabel() {\n return null;\n }",
"public LabelValueBean(String label, String value) {\n this.label = label;\n this.value = value;\n }",
"public void setLabel(Object value) {\n this.setValue(LABEL_PROPERTY_KEY, value);\n }",
"static <V> Value<V> empty() {\n return new ImmutableValue<>((V) null);\n }",
"@Override\r\n\tpublic JLabel createLabel() {\r\n\t\treturn new JLabel();\r\n\t}",
"private static Double mklabel(Double label) {\n\t\tDouble _label;\n\t\tif (label == 0) {\n\t\t\t_label = -1.0;\n\t\t} else {\n\t\t\t_label = 1.0;\n\t\t}\n\t\treturn _label;\n\t}",
"NullValue createNullValue();",
"NullValue createNullValue();",
"public JLabelOperator lblTheDatabaseNameIsEmpty() {\n if (_lblTheDatabaseNameIsEmpty==null) {\n _lblTheDatabaseNameIsEmpty = new JLabelOperator(this,\n Bundle.getStringTrimmed(\"org.netbeans.modules.derby.ui.Bundle\", \"ERR_DatabaseNameEmpty\"));\n }\n return _lblTheDatabaseNameIsEmpty;\n }",
"public void testCreateNull() {\n System.out.println(\"createNull\");// NOI18N\n \n PropertyValue result = PropertyValue.createNull();\n \n assertNotNull(result);\n assertEquals(result.getKind(),PropertyValue.Kind.NULL);\n }",
"private Value() {\n\t}",
"public Builder setLabel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n label_ = value;\n onChanged();\n return this;\n }",
"public void resetLabel(){\r\n if(sc!= null && sc.getProperties().getAttribute(\"Label\") != null){\r\n sc.getProperties().getAttribute(\"Label\").changeValue(\"\");\r\n }\r\n }",
"public Value(){}",
"public String label() {\n\t\treturn \"LABEL_\" + (labelCount++);\n\t}",
"public String none() {\n if (!this.styledValueElements.isDefault()) {\n this.styledValueElements = new ShiftedText(this.styledValue);\n this.value = this.styledValueElements.stringify();\n }\n return this.value;\n }",
"public static Node buildLiteral(final String label) {\n\t\treturn NodeFactory.createLiteral(label);\n\t}",
"public static Labels build() {\n\t\treturn new Labels(new ArrayMixedObject());\n\t}",
"public void setLabel(final String labelValue) {\n this.label = labelValue;\n }",
"public void setLabel(final String labelValue) {\n this.label = labelValue;\n }",
"public static Value makeObject(ObjectLabel v) {\n if (v == null)\n throw new NullPointerException();\n Value r = new Value();\n r.object_labels = newSet();\n r.object_labels.add(v);\n return canonicalize(r);\n }",
"public void setLabel(final String labelValue) {\n this.label = labelValue;\n }",
"public String getLabel() {\n return label == null ? StringUtils.EMPTY : label;\n }",
"void setNilLabel();",
"public Builder setNilValue(int value) {\n typeCase_ = 1;\n type_ = value;\n onChanged();\n return this;\n }",
"@Override\n\tpublic String toString() {\n\t\tString str = labelTemplate.toString();\n\t\tswitch (type) {\n\t\tcase SET: str += \":=\"; break;\n\t\tcase DISCARD: str += \"!=\"; break;\n\t\tcase ADD: str += \"+=\"; break;\n\t\t}\n\t\tstr += valueTemplate.toString();\n\t\treturn str;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"public static String choicelabel() {\n\t\treturn null;\n\t}",
"public LabelToken(String value, int line) {\n super(value, TokenType.LABEL, line);\n this.origin = -1;\n this.originOffset = 0;\n }",
"public BabbleValue() {}",
"public Node()\r\n {\r\n initialize(null);\r\n lbl = id;\r\n }",
"private String getLabel(int aValue) {\n\t\tif (fRadix == radix_Hex) {\n\t\t\treturn Format.toHexString(aValue);\n\t\t} else {\n\t\t\tif (fType == type_Float) {\n\t\t\t\treturn \"\" + (double)aValue;\n\t\t\t} else {\n\t\t\t\treturn \"\" + aValue;\n\t\t\t}\n\t\t}\n\t}",
"java.lang.String getLabel();",
"@Override public String toString() {\n return \"\" + \"Value=\" + Value; // NOI18N\n }",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"public String toString() {\n StringBuffer sb = new StringBuffer(\"LabelValueBean[\");\n sb.append(this.label);\n sb.append(\", \");\n sb.append(this.value);\n sb.append(\"]\");\n return (sb.toString());\n }",
"protected StringValue() {\r\n value = \"\";\r\n typeLabel = BuiltInAtomicType.STRING;\r\n }",
"public Value() {\n }",
"@Override\n\tpublic void fillDefault(Value v) {\n\n\t}",
"public void setLabel(Object v) \n {\n this.label = v;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn (\"\"+label);\n\t}",
"public CategoryBuilder()\n {\n fUpperInclusive = true;\n fValue = \"\";\n }",
"private void createStartingLabel() {\n \tcreateLabel(myResources.getString(\"title\"), 1, 0, TITLE_FONT);\n }",
"private Label createInitializingLabel(Composite parent)\n\t{\n\t\tLabel initializingMessageLabel = new Label(parent, SWT.NONE);\n\t\tinitializationFont = new Font(Display.getDefault(), new FontData(\"Arial\", 20,\n\t\t\t\tSWT.BOLD));\n\t\tinitializingMessageLabel.setFont(initializationFont);\n\t\tinitializingMessageLabel\n\t\t\t\t.setText(\"iDocIt! is initializing at the moment. Please wait ...\");\n\t\tinitializingMessageLabel.setBackground(Display.getDefault().getSystemColor(\n\t\t\t\tSWT.COLOR_WHITE));\n\t\tGridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).grab(true, true)\n\t\t\t\t.applyTo(initializingMessageLabel);\n\n\t\treturn initializingMessageLabel;\n\t}",
"@Test\n public void testConstructTaintFromNullTaint() {\n Taint other = null;\n Taint t = Taint.withLabel(other);\n assertTrue(t.isEmpty());\n }",
"static String newLabel() {\n return \"_\" + (nextLabel++);\n }",
"public DefaultAttribute( String upId, Value... vals )\n {\n // The value can be null, this is a valid value.\n if ( vals[0] == null )\n {\n add( new Value( ( String ) null ) );\n }\n else\n {\n for ( Value val : vals )\n {\n add( val );\n }\n }\n\n setUpId( upId );\n }",
"protected void labelClear(){\n N11.setText(null);N12.setText(null);N13.setText(null);N14.setText(null);\n N21.setText(null);N22.setText(null);N23.setText(null);N24.setText(null);\n N31.setText(null);N32.setText(null);N33.setText(null);N34.setText(null);\n N41.setText(null);N42.setText(null);N43.setText(null);N44.setText(null);\n n11.setText(null);n12.setText(null);n13.setText(null);n14.setText(null);\n n21.setText(null);n22.setText(null);n23.setText(null);n24.setText(null);\n n31.setText(null);n32.setText(null);n33.setText(null);n34.setText(null);\n n41.setText(null);n42.setText(null);n43.setText(null);n44.setText(null);\n G11.setText(null);G12.setText(null);G13.setText(null);G14.setText(null);\n G21.setText(null);G22.setText(null);G23.setText(null);G24.setText(null);\n G31.setText(null);G32.setText(null);G33.setText(null);G34.setText(null);\n G41.setText(null);G42.setText(null);G43.setText(null);G44.setText(null);\n g11.setText(null);g12.setText(null);g13.setText(null);g14.setText(null);\n g21.setText(null);g22.setText(null);g23.setText(null);g24.setText(null);\n g31.setText(null);g32.setText(null);g33.setText(null);g34.setText(null);\n g41.setText(null);g42.setText(null);g43.setText(null);g44.setText(null);\n E11.setText(null);E12.setText(null);E13.setText(null);E14.setText(null);\n E21.setText(null);E22.setText(null);E23.setText(null);E24.setText(null);\n E31.setText(null);E32.setText(null);E33.setText(null);E34.setText(null);\n E41.setText(null);E42.setText(null);E43.setText(null);E44.setText(null);\n e11.setText(null);e12.setText(null);e13.setText(null);e14.setText(null);\n e21.setText(null);e22.setText(null);e23.setText(null);e24.setText(null);\n e31.setText(null);e32.setText(null);e33.setText(null);e34.setText(null);\n e41.setText(null);e42.setText(null);e43.setText(null);e44.setText(null);\n }",
"@Test\n public void labelIsNotBlank() {\n propertyIsNot(\"\", null, CodeI18N.FIELD_NOT_BLANK, \"label property must not be blank\");\n }",
"com.google.protobuf.Value getDefaultValue();",
"String getDefaultValue();",
"String getDefaultValue();",
"public Label(NetworkTable nTable, int x, int y, Color color,\n Font font, double value) {\n super(nTable, \"\", x, y, 0, 0);\n this.color = color;\n this.font = font;\n this.value = value;\n lName = \"\";\n }",
"UndefinedLiteralExp createUndefinedLiteralExp();",
"private String makeLabel(String label)\n {\n \treturn label + \"$\" + Integer.toString(labelCount++);\n }",
"public PieBoundLabel(String label) {\n this(label, null, null);\n }",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"public DataPrimitive(String value) {\n\t\tsuper();\n\t\tif (value == null) {\n\t\t\tthis.value = \"\"; \n\t\t} else {\n\t\t\tthis.value = value;\n\t\t}\n\t}",
"public void setDefValLabel(String defValLabel) {\r\n this.defValLabelText = defValLabel;\r\n this.defValLabel.setText(this.defValLabelText);\r\n }",
"public void setCreationDefaultValues()\n {\n this.setDescription(this.getPropertyID()); // Warning: will be lower-case\n this.setDataType(\"\"); // defaults to \"String\"\n this.setValue(\"\"); // clear value\n //super.setRuntimeDefaultValues();\n }",
"public static DefaultExpression empty() { throw Extensions.todo(); }",
"private void createLabels() {\n addLabels(\"Dog Name:\", 160);\n addLabels(\"Weight:\", 180);\n addLabels(\"Food:\", 200);\n }",
"ReadOnlyStringProperty labelProperty();",
"public static Value makeUnknown() {\n return theUnknown;\n }",
"private static Text createPlaceholder() {\n Text result = new Text(\"No protocol data available.\");\n //noinspection HardCodedStringLiteral\n result.getStyleClass().add(\"normal\");\n return result;\n }",
"EmptyType createEmptyType();",
"public LabelToken(String value, int line, long origin, long originOffset) {\n super(value, TokenType.LABEL, line);\n if ((this.origin = origin) < 0)\n throw new IllegalArgumentException(\"Origin address cannot be negative\");\n if ((this.originOffset = originOffset) < 0)\n throw new IllegalArgumentException(\"Origin address offset cannot be negative\");\n }",
"public static TypedData unknownValue() {\n return UNKNOWN_INSTANCE;\n }",
"@Override\r\n public String toString() {\r\n return (value == null) ? \"\" : value;\r\n }",
"public abstract T newEmptyValue(long timeMillis);"
] | [
"0.702073",
"0.6608589",
"0.65852106",
"0.6529148",
"0.6497771",
"0.63607424",
"0.6281191",
"0.6281191",
"0.6281191",
"0.624562",
"0.6202586",
"0.61819357",
"0.6175813",
"0.6116183",
"0.6099655",
"0.60829306",
"0.6058069",
"0.603625",
"0.6016453",
"0.5956221",
"0.595286",
"0.593627",
"0.5924964",
"0.5886159",
"0.5870061",
"0.5866791",
"0.58165514",
"0.58076054",
"0.5767277",
"0.5751201",
"0.5750718",
"0.5741405",
"0.5741405",
"0.5703912",
"0.5684445",
"0.5678075",
"0.56662685",
"0.5629189",
"0.56194234",
"0.5611929",
"0.56068814",
"0.5605883",
"0.56034315",
"0.55956805",
"0.55956805",
"0.55906284",
"0.55836445",
"0.5579713",
"0.5561863",
"0.5560604",
"0.55322355",
"0.5514968",
"0.5514968",
"0.5514968",
"0.55137765",
"0.55121595",
"0.5493868",
"0.54912716",
"0.54681206",
"0.5445125",
"0.54443455",
"0.5443051",
"0.5443051",
"0.5443051",
"0.54416394",
"0.5428349",
"0.54261994",
"0.5425948",
"0.54163283",
"0.54104084",
"0.5408502",
"0.5373951",
"0.5373043",
"0.53680366",
"0.5356428",
"0.53447807",
"0.5342209",
"0.5334953",
"0.5325386",
"0.53252375",
"0.53252375",
"0.5323188",
"0.5320349",
"0.53192973",
"0.53115535",
"0.5305546",
"0.5305546",
"0.5304522",
"0.53044397",
"0.5293371",
"0.52931654",
"0.5285469",
"0.526598",
"0.526384",
"0.5244385",
"0.52413934",
"0.52298355",
"0.5226577",
"0.5225832",
"0.52215916"
] | 0.54922557 | 57 |
This constructor may be used by subclasses to explicitly use an existing element. This element must be either a or a element. | protected ValueLabel(Element element, Renderer<? super T> renderer) {
super(element);
this.renderer = renderer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Element() {\n\t}",
"public ElementObject(WebElement element) {\n // check null value\n super(0); //0 : Element is THERE\n this.element = element;\n this._originalStyle = element.getAttribute(\"style\");\n }",
"public WebElement() {}",
"@Override\n\tpublic void setElement(Element element) {\n\t\t\n\t}",
"@Override\n\tpublic Element newInstance() {\n\t\treturn null;\n\t}",
"public ElementObjectSupport(ContainerI c, Element element) {\r\n\t\tthis(c, null, element);\r\n\t}",
"Object create(Element element) throws IOException, SAXException, ParserConfigurationException;",
"public AbstractElement() {\n }",
"public Element(Element element) {\n\t\tElement src = element.clone();\n\n\t\tthis.attributes = src.attributes;\n\t\tthis.name = src.name;\n\t\tthis.defxmlns = src.defxmlns;\n\t\tthis.xmlns = src.xmlns;\n\t\tthis.children = src.children;\n\t}",
"public XmlElement() {\n }",
"Node(String e){\r\n this.element = e;\r\n }",
"public GenericElement() {\n\t}",
"public XMLElement() {\n this(new Properties(), false, true, true);\n }",
"public Element(String name) {\n\t\tsetName(name);\n\t}",
"public void setElement(Element element) {\n this.element = element;\n }",
"Element asElement();",
"Element createElement();",
"public void setElement(Element Element) {\n\t\telement = Element;\n\t}",
"protected XMLElement createAnotherElement() {\n return new XMLElement(this.conversionTable,\n this.skipLeadingWhitespace,\n false,\n this.ignoreCase);\n }",
"E createDefaultElement();",
"public void setElement (T element) {\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\r\n\t}",
"public BaseElement() {\n }",
"public void setElement(T element) {\n\t\tthis.element = element;\n\t}",
"public void setElement(String newElem) { element = newElem;}",
"public ElementoInicial() {\r\n\t\tsuper();\r\n\t}",
"public void setElement(T elem)\n {\n\n element = elem;\n }",
"public Node(T ele) {\r\n\t\t\tthis.ele = ele;\r\n\t\t}",
"protected abstract M createNewElement();",
"@objid (\"002ff058-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public Object visitElement(Element theElement) {\n return null;\n }",
"public LinkElement() { }",
"public Node(T element) {\n\t\tthis.element = element;\n\t\tthis.next = null;\n\t}",
"@Override\n\tpublic Element toElement() {\n\t\treturn null;\n\t}",
"protected SVGOMFETurbulenceElement() {\n\t}",
"public void setElement(Object e) {\n element = e;\n }",
"@Override void init(Element element) {\n String name = element.getTagName();\n if (name.equals(\"published\")) {\n this.published = element.getTextContent().trim();\n }\n else if (name.equals(\"content\")) {\n this.content = parseContent(element);\n }\n else {\n super.init(element);\n }\n }",
"public GongDomObject(Element object) throws InvalidTagException {\r\n super(object);\r\n }",
"public void setElement(String element) {\n this.element = element;\n }",
"public QueueNode(T element) {\n\t\t//TODO - fill in implementation\n\t\t//TODO - write unit tests\n\t}",
"public void setElement(E element) {\n\t\t\tthis.element = element;\n\t\t}",
"public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}",
"public TextInput(WebElement element) {\n super(element);\n }",
"public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}",
"public void setElement(WebElement element) {\n\t\t\r\n\t}",
"public XMLElement(String fullName)\n/* */ {\n/* 101 */ this(fullName, null, null, -1);\n/* */ }",
"public Node(E element) {\n this.left = null;\n this.right = null;\n this.height = 0;\n this.element = element;\n }",
"public AttributeSet(Object elem) {\n\n elements = new Hashtable(1, 1);\n elements.put(elem, elem);\n }",
"public Element(String name, String text) {\n\t\tsetName(name);\n\n\t\tif (text != null) {\n\t\t\taddText(text);\n\t\t}\n\t}",
"public NoLocationException(Element element) {\n\t\t_element = element;\n\t}",
"public RelationshipElement ()\n\t{\n\t\tthis(null, null);\n\t}",
"public Element() {\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tcolor = Color.gray;\r\n\t\thilite = true;\r\n\t}",
"@Override\n\tpublic Element getElement() {\n\t\treturn null;\n\t}",
"protected Article(OntologyElement element) {\n\t\tthis.element = element;\n\t\tthis.ontology = element.getOntology();\n\t}",
"XomNode appendElement(Element element) throws XmlBuilderException;",
"public void root(Element element)\n {\n }",
"public DPropertyElement() {\n super(null, null);\n }",
"ElementDefinition createElementDefinition();",
"protected StyleExtractor(OdfElement element) {\n\t\tmElement = element;\n\t}",
"public ContainerElement(Document document, ContainerElement parent, String nsUri, String localName) {\n/* 80 */ this.parent = parent;\n/* 81 */ this.document = document;\n/* 82 */ this.nsUri = nsUri;\n/* 83 */ this.startTag = new StartTag(this, nsUri, localName);\n/* 84 */ this.tail = this.startTag;\n/* */ \n/* 86 */ if (isRoot())\n/* 87 */ document.setFirstContent(this.startTag); \n/* */ }",
"public void setElement(E element)\n\t{\n\t\tthis.data = element;\n\t}",
"@Override\n public abstract void addToXmlElement(Element element);",
"private Node(E x) {\n\t\t\telement = x;\n\t\t\tnext = null;\n\t\t}",
"protected WebXStyleElementImpl() {\n }",
"public Element(Token token) {\n if (token != null) {\n this.beginLine = token.beginLine;\n this.endLine = token.endLine;\n this.beginColumn = token.beginColumn;\n this.endColumn = token.endColumn;\n }\n }",
"public BasicElementList() {\n\t}",
"protected Element el(String tag){\n\t\treturn doc.createElement(tag);\n\t}",
"private Node() {\n // Start empty.\n element = null;\n }",
"public Element(int someX, int someY, Color someColor) {\r\n\t\tx = someX;\r\n\t\ty = someY;\r\n\t\tcolor = someColor;\r\n\t\thilite = true;\r\n\t}",
"public Node(int element){\r\n this(element, null, null);\r\n }",
"HTMLElement createHTMLElement();",
"public XMLDocument addElement (XML element)\r\n\t{\r\n\t\tif (content == null)\r\n\t\t\tcontent = element;\r\n\t\telse\r\n\t\t\tcontent.addElement (element);\r\n\t\treturn (this);\r\n\t}",
"@Override\r\n public Element findElement()\r\n {\n return null;\r\n }",
"public View create(Element elem) {\n return null;\n }",
"public Header(DOMelement element){\n\t\tsuper(tag(Header.class),element);\n\t}",
"public Object caseElement(Element object) {\r\n\t\treturn null;\r\n\t}",
"ObjectElement createObjectElement();",
"protected Element el(String tag, Node i){\n\t\tElement e = doc.createElement(tag);\n\t\tif (i instanceof Attr) { \n\t\t\te.setAttributeNode((Attr)i);\n\t\t} else {\n\t\t\te.appendChild(i);\n\t\t}\n\t\treturn e;\n\t}",
"public ElementServiceImpl() {\n\t\tsuper();\n\t}",
"public Choices(Element element, Model model) {\n super(element, model);\n }",
"public Element(int beginLine, int endLine, int beginColumn, int endColumn) {\n this.beginLine = beginLine;\n this.endLine = endLine;\n this.beginColumn = beginColumn;\n this.endColumn = endColumn;\n }",
"public void setElement(String v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/element\",v);\n\t\t_Element=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}",
"Form addElement(Element element);",
"public static SVGElement buildElement(int aElementHandle, M2GDocument aDocument)\n {\n // Check native handle\n if (!M2GObject.checkHandle(aElementHandle) || (aDocument == null))\n {\n return null;\n }\n\n // Check if the element already exists\n SVGElement svgElement = aDocument.findLiveElement(new Integer(aElementHandle));\n if (svgElement != null)\n {\n return svgElement;\n }\n\n String typeName = M2GSVGElement.getElementTypeName(aElementHandle, aDocument);\n\n if (M2GSVGConstants.isRootElement(typeName))\n {\n svgElement = M2GSVGSVGElement.buildRootElement(aDocument);\n }\n else if (M2GSVGConstants.isLocatableElement(typeName))\n {\n svgElement = new M2GSVGLocatableElement(aElementHandle, aDocument);\n }\n else if (M2GSVGConstants.isAnimatableElement(typeName))\n {\n svgElement = new M2GSVGAnimationElement(aElementHandle, aDocument);\n }\n else\n {\n\n String id = M2GSVGElement._getStringTrait(\n M2GManager.getInstance().getSVGProxyHandle(),\n aElementHandle,\n M2GSVGConstants.AT_ID);\n if ((id != null) && id.equals(\"text_use_svg_default_font\"))\n {\n return buildElement(\n M2GSVGElement._getNextElementSibling(\n aDocument.getNativeSVGProxyHandle(), aElementHandle),\n aDocument);\n }\n else\n {\n svgElement = new M2GSVGElement(aElementHandle, aDocument);\n }\n }\n aDocument.registerLiveElement(svgElement, new Integer(aElementHandle));\n return svgElement;\n }",
"BElement createBElement();",
"public T caseElement(Element object) {\n\t\treturn null;\n\t}",
"public T caseElement(Element object) {\n\t\treturn null;\n\t}",
"public T caseElement(Element object) {\n\t\treturn null;\n\t}",
"private Doc(String documentElementName) {\n e = d.createElement(documentElementName);\n d.appendChild(e);\n }",
"public void newElement() {\r\n }",
"@Override\n public void setElementId(String arg0)\n {\n \n }",
"public Node<T> attach(T element) {\n // Sanity check.\n if (this.element == null) {\n this.element = element;\n } else {\n throw new IllegalArgumentException(\"There is already an element attached.\");\n }\n // Useful for chaining.\n return this;\n }",
"public ExtendedWorkObject(IElement element) {\r\n\t\tthis.element = element;\r\n\t\tthis.element.setWorkObject(this);\r\n\t}",
"public InteractionTarget(Element _element, int _type) {\n element = _element;\n type = _type;\n }",
"public SiacTCronopElem() {\n\t}",
"Object element();",
"Object element();",
"public ElementBean(ElementView elementView) {\n super(elementView);\n dao = new ElementDAO();\n this.elementView = elementView;\n }",
"private Element createXmlElementForUndefined(Undefined undefined, Document xmlDocument, Constraint constraint) {\n\t\tElement element = xmlDocument.createElement(XML_UNDEFINED);\n\t\treturn element;\n\t}",
"public LineView(Element elem) {\n super(elem);\n }",
"public void addElement(ThingNode element)\n\t{\n\t\tsuper.addElement(element);\n\t\telements.add(element);\n\t}",
"@Override\n public Builder unknownElement(VocabWord element) {\n super.unknownElement(element);\n return this;\n }",
"public TNode(E item, TNode<E> parent) {\r\n element = item;\r\n this.parent = parent;\r\n }"
] | [
"0.70573956",
"0.6995396",
"0.681529",
"0.68078965",
"0.6713484",
"0.66514236",
"0.6583302",
"0.654746",
"0.64980215",
"0.6490908",
"0.64513093",
"0.6443439",
"0.63976973",
"0.636328",
"0.6354255",
"0.6308885",
"0.62694913",
"0.6236374",
"0.6229554",
"0.6207725",
"0.61965287",
"0.6188763",
"0.6141798",
"0.6120199",
"0.60871947",
"0.6061265",
"0.6044396",
"0.5997262",
"0.59867936",
"0.5977258",
"0.5974029",
"0.59733737",
"0.5937838",
"0.5930158",
"0.5927704",
"0.59229124",
"0.58890134",
"0.58888245",
"0.58761406",
"0.58750415",
"0.5874334",
"0.5871032",
"0.58646226",
"0.58636",
"0.5851172",
"0.5845869",
"0.5843121",
"0.5836521",
"0.58359534",
"0.58213365",
"0.5795283",
"0.5793846",
"0.57937926",
"0.5758588",
"0.5753561",
"0.57362133",
"0.57222795",
"0.5710953",
"0.5701136",
"0.5689766",
"0.5686682",
"0.5667371",
"0.56571984",
"0.56482065",
"0.5647248",
"0.5634955",
"0.5625832",
"0.56214786",
"0.5608076",
"0.5606229",
"0.55815816",
"0.5577349",
"0.55641246",
"0.556101",
"0.55491817",
"0.55457705",
"0.5540553",
"0.55341655",
"0.55260795",
"0.55191535",
"0.55159545",
"0.5514481",
"0.55142",
"0.5513828",
"0.5513828",
"0.5513828",
"0.5506668",
"0.55065256",
"0.55050164",
"0.5502815",
"0.5483214",
"0.54789686",
"0.54776204",
"0.5428931",
"0.5428931",
"0.54200363",
"0.541502",
"0.5414427",
"0.5410113",
"0.54034686",
"0.5394645"
] | 0.0 | -1 |
Lista los Subproductos de la base de datos | public abstract List<Subproducto> listarSubproducto(EntityManager sesion, Subproducto subproducto); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}",
"public List<SubPrefeitura> listSelectSubPref() throws SQLException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n List<SubPrefeitura> subPref = new ArrayList<SubPrefeitura>();\r\n String sql = \"SELECT id_subprefeitura, sg_subprefeitura, nm_subprefeitura \"\r\n + \"FROM tbl_subprefeitura \"\r\n + \"ORDER BY nm_subprefeitura \";\r\n try {\r\n stmt = connection.prepareStatement(sql);\r\n rs = stmt.executeQuery(); \r\n while (rs.next()){\r\n SubPrefeitura subpref = new SubPrefeitura();\r\n subpref.setPkSubPrefeitura(rs.getInt(\"id_subprefeitura\"));\r\n subpref.setSgSbuPrefeitura(rs.getString(\"sg_subprefeitura\"));\r\n subpref.setNmSubPrefeitura(rs.getString(\"nm_subprefeitura\"));\r\n subPref.add(subpref);\r\n } \r\n stmt.execute();\r\n return subPref;\r\n } catch (SQLException e) {\r\n throw new RuntimeException(e);\r\n }finally{\r\n rs.close();\r\n stmt.close();\r\n connection.close();\r\n } \r\n }",
"public ArrayList<Producto> ListaProductos() {\n ArrayList<Producto> list = new ArrayList<Producto>();\n \n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto;\");\n while(result.next()) {\n Producto nuevo = new Producto();\n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n list.add(nuevo);\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return list;\n }",
"public List<SubProduct> getSubProducts(State state)\n\t{\n\t\tArrayList<SubProduct> subProduct = new ArrayList<SubProduct>();\n\t\tfor (int i = 0; i < dao.getSubProducts().size(); i++)\n\t\t{\n\t\t\tif (dao.getSubProducts().get(i).getState() == state)\n\t\t\t{\n\t\t\t\tsubProduct.add(dao.getSubProducts().get(i));\n\t\t\t}\n\t\t}\n\t\tCollections.sort(subProduct);\n\t\treturn subProduct;\n\t}",
"public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }",
"ArrayList<Product> ListOfProducts();",
"List<Product> getProductBySubCategory(String subCategory) throws DataBaseException;",
"List<Product> getProductsList();",
"List<Product> list();",
"public List<Produto> listar() {\n return manager.createQuery(\"select distinct (p) from Produto p\", Produto.class).getResultList();\n }",
"public Set<ProductBarcode> getProducts(boolean recursive);",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"public Collection<VistaProveedorDTO> buscarProveedorPorSubbodega(OrdenCompraContingenciaPedidoAsistidoVO parametrosBusqueda, Integer firstResult, Integer maxResult) ;",
"public List<Product> getProducts();",
"public List<Product> getProducts();",
"public void listarProducto() {\n }",
"public ArrayList<GroupProduct> getGroupProductList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupProduct> list = new ArrayList<GroupProduct>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupProduct.class);\n\t\t\tList<TblGroupProduct> groupproducts = cr.list();\n\t\t\tif (groupproducts.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupProduct> iterator = groupproducts.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupProduct tblgroupproduct = iterator.next();\n\t\t\t\t\tGroupProduct groupproduct = new GroupProduct();\n\t\t\t\t\tgroupproduct.convertFromTable(tblgroupproduct);\n\t\t\t\t\tlist.add(groupproduct);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}",
"public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }",
"public List<Product> list();",
"List<Subdivision> findAll();",
"public ArrayList getOrdenCartas();",
"public DAOTablaMenuProductos() {\r\n\t\trecursos = new ArrayList<Object>();\r\n\t}",
"public ArrayList<Product> getAllProducts(){\r\n\t\tArrayList<Product> prods = new ArrayList<Product>();\r\n\t\tIterator<Integer> productCodes = inventory.keySet().iterator();\r\n\t\twhile(productCodes.hasNext()) {\r\n\t\t\tint code = productCodes.next();\r\n\t\t\tfor(Product currProduct : Data.productArr) {\r\n\t\t\t\tif(currProduct.getID() == code) {\r\n\t\t\t\t\tprods.add(currProduct);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prods;\r\n\t}",
"public ArrayList<DataProducto> listarProductos(String nickName);",
"private static void VeureProductes (BaseDades bd) {\n ArrayList <Producte> llista = new ArrayList<Producte>();\n llista = bd.consultaPro(\"SELECT * FROM PRODUCTE\");\n if (llista != null)\n for (int i = 0; i<llista.size();i++) {\n Producte p = (Producte) llista.get(i);\n System.out.println(\"ID=>\"+p.getIdproducte()+\": \"\n +p.getDescripcio()+\"* Estoc: \"+p.getStockactual()\n +\"* Pvp: \"+p.getPvp()+\" Estoc Mínim: \"\n + p.getStockminim());\n }\n }",
"public ArrayList<Producto> getProductos() {\r\n return productos;\r\n }",
"public ArrayList<ProductoDTO> mostrartodos() {\r\n\r\n\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ArrayList<ProductoDTO> arr = new ArrayList();\r\n try {\r\n\r\n ps = conn.getConn().prepareStatement(SQL_READALL);\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arr.add(new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9)));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"error vuelva a intentar\");\r\n } finally {\r\n conn.cerrarconexion();\r\n\r\n }\r\n return arr;\r\n\r\n }",
"private List<Product> extractProducts() {\r\n\t\t//load products from hidden fields\r\n\t\tif (this.getListProduct() != null){\r\n\t\t\tfor(String p : this.getListProduct()){\r\n\t\t\t\tProduct product = new Product();\r\n\t\t\t\tproduct.setId(Long.valueOf(p));\r\n\t\t\t\tthis.products.add(product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.products;\r\n\t}",
"public static List<Product> getProductList() {\n\n ArrayList<Product> list = new ArrayList<>();\n\n //Creating Products\n Product product1 = new Product(1, \"Call of Duty 1\");\n Product product2 = new Product(2, \"Call of Duty 2\");\n Product product3 = new Product(3, \"Final Fantasy XVI\");\n Product product4 = new Product(5, \"Final Fantasy X\");\n Product product5 = new Product(6, \"XCOM\");\n Product product6 = new Product(7, \"Borderland 2\");\n Product product7 = new Product(8, \"Red Dead Redemption 2\");\n Product product8 = new Product(9, \"Uncharted: The Lost Legacy\");\n\n //Populating the ArrayList with Product objects\n list.add(product1);\n list.add(product2);\n list.add(product3);\n list.add(product4);\n list.add(product5);\n list.add(product6);\n list.add(product7);\n list.add(product8);\n\n return list;\n }",
"public List equPartSub(String conid, String sxValue){\r\n\t\tString sql = \"select e.sb_id, l.sb_mc, e.ggxh, e.dw, e.zs, e.dhsl, \"\r\n\t\t\t\t\t+\"e.sccj, e.dj, e.zj, e.jzh, g.gg_date \"\r\n\t\t\t\t\t+\"from equ_sbdh e, equ_list l, equ_get_goods g \"\r\n\t\t\t\t\t+\"where e.dh_id = g.ggid and e.sb_id = l.sb_id and \"\r\n\t\t\t\t\t+\"e.conid = '\" + conid + \"' and e.sx = '\" + sxValue + \"'\";\r\n\t\tSystem.out.println(\"sql = \"+sql);\r\n\t\tJdbcTemplate jdbc = JdbcUtil.getJdbcTemplate();\r\n\t\tList list = jdbc.queryForList(sql);\r\n\t\treturn list;\r\n\t}",
"public static ArrayList<obj_dos_campos> carga_tipo_producto() {\n ArrayList<obj_dos_campos> lista = new ArrayList<obj_dos_campos>();\n Connection c=null;\n try {\n c = conexion_odbc.Connexion_datos();\n Statement s = c.createStatement();\n ResultSet rs = s.executeQuery(\"select tip_prod_idn as data, tip_prod_nombre as label from tipo_producto order by tip_prod_nombre desc\");\n lista.add(new obj_dos_campos(\"0\",\"-- Seleccione --\"));\n while (rs.next()){\n lista.add(new obj_dos_campos(rs.getString(\"data\"),rs.getString(\"label\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n c.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return lista;\n }",
"public BaseDatosProductos iniciarProductos() {\n\t\tBaseDatosProductos baseDatosProductos = new BaseDatosProductos();\n\t\t// construcion datos iniciales \n\t\tProductos Manzanas = new Productos(1, \"Manzanas\", 8000.0, 65);\n\t\tProductos Limones = new Productos(2, \"Limones\", 2300.0, 15);\n\t\tProductos Granadilla = new Productos(3, \"Granadilla\", 2500.0, 38);\n\t\tProductos Arandanos = new Productos(4, \"Arandanos\", 9300.0, 55);\n\t\tProductos Tomates = new Productos(5, \"Tomates\", 2100.0, 42);\n\t\tProductos Fresas = new Productos(6, \"Fresas\", 4100.0, 3);\n\t\tProductos Helado = new Productos(7, \"Helado\", 4500.0, 41);\n\t\tProductos Galletas = new Productos(8, \"Galletas\", 500.0, 8);\n\t\tProductos Chocolates = new Productos(9, \"Chocolates\", 3500.0, 806);\n\t\tProductos Jamon = new Productos(10, \"Jamon\", 15000.0, 10);\n\n\t\t\n\n\t\tbaseDatosProductos.agregar(Manzanas);\n\t\tbaseDatosProductos.agregar(Limones);\n\t\tbaseDatosProductos.agregar(Granadilla);\n\t\tbaseDatosProductos.agregar(Arandanos);\n\t\tbaseDatosProductos.agregar(Tomates);\n\t\tbaseDatosProductos.agregar(Fresas);\n\t\tbaseDatosProductos.agregar(Helado);\n\t\tbaseDatosProductos.agregar(Galletas);\n\t\tbaseDatosProductos.agregar(Chocolates);\n\t\tbaseDatosProductos.agregar(Jamon);\n\t\treturn baseDatosProductos;\n\t\t\n\t}",
"public List<Product> getProductList(){\n List<Product> productList = mongoDbConnector.getProducts();\n return productList;\n }",
"@Override\r\n\tpublic List<Product> getallProducts() {\n\t\treturn dao.getallProducts();\r\n\t}",
"List<Product> retrieveProducts();",
"private static List <Produk> buatSampleData(){\n\t\tList <Produk> hasil = new ArrayList<Produk>();\n\t\t\n\t\tProduk p1 = new Produk();\n\t\tp1.setKode(\"P-001\");\n\t\tp1.setNama(\"Mouse Logitech\");\n\t\tp1.setHarga(\"150.000,00\");\n\t\thasil.add(p1);\n\t\t\n\t\tProduk p2 = new Produk();\n\t\tp2.setKode(\"P-002\");\n\t\tp2.setNama(\"USB Flashdisk 2 GB\");\n\t\tp2.setHarga(\"50.000,00\");\n\t\thasil.add(p2);\n\t\t\n\t\tProduk p3 = new Produk();\n\t\tp3.setKode(\"P-003\");\n\t\tp3.setNama(\"Laptop Acer\");\n\t\tp3.setHarga(\"10.000.000,00\");\n\t\thasil.add(p3);\n\t\t\n\t\tProduk p4 = new Produk();\n\t\tp4.setKode(\"P-004\");\n\t\tp4.setNama(\"Harddisk 500 GB\");\n\t\tp4.setHarga(\"800.000,00\");\n\t\thasil.add(p4);\n\t\t\n\t\tProduk p5 = new Produk();\n\t\tp5.setKode(\"P-005\");\n\t\tp5.setNama(\"Printer Canon IP1980\");\n\t\tp5.setHarga(\"600.000,00\");\n\t\thasil.add(p5);\n\t\t\n\t\tProduk p6 = new Produk();\n\t\tp6.setKode(\"P-006\");\n\t\tp6.setNama(\"Joystick\");\n\t\tp6.setHarga(\"60.000,00\");\n\t\thasil.add(p6);\n\t\t\n\t\tProduk p7 = new Produk();\n\t\tp7.setKode(\"P-007\");\n\t\tp7.setNama(\"Monitor LCD Acer\");\n\t\tp7.setHarga(\"2.000.000,00\");\n\t\thasil.add(p7);\n\t\t\n\t\treturn hasil;\n\t}",
"Product getPProducts();",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public static void llenarAlsuper(){\r\n Producto huevos = new Producto(\"huevos\", \"bachoco\", 56.90, 1);\r\n Nodo<Producto> ATemp = new Nodo(huevos);\r\n listaAlsuper.agregarNodo(ATemp);\r\n \r\n Producto chuletas = new Producto(\"chuletas\", \"Del Cero\", 84.90, 1);\r\n Nodo<Producto> ATemp2 = new Nodo(chuletas);\r\n listaAlsuper.agregarNodo(ATemp2);\r\n \r\n Producto carnemolida = new Producto(\"carne molida\", \"premium\", 79.90, 1);\r\n Nodo<Producto> ATemp3 = new Nodo(carnemolida);\r\n listaAlsuper.agregarNodo(ATemp3);\r\n \r\n Producto pollo = new Producto(\"pollo\", \"super pollo\", 59.90, 1);\r\n Nodo<Producto> ATemp4 = new Nodo(pollo);\r\n listaAlsuper.agregarNodo(ATemp4);\r\n \r\n Producto pescado = new Producto(\"pescado\", \"el pecesito\", 63.90, 1);\r\n Nodo<Producto> ATemp5 = new Nodo(pescado);\r\n listaAlsuper.agregarNodo(ATemp5);\r\n \r\n Producto atunagua = new Producto(\"atun en agua\", \"en agua\", 9.90, 1);\r\n Nodo<Producto> ATemp6 = new Nodo(atunagua);\r\n listaAlsuper.agregarNodo(ATemp6);\r\n \r\n Producto atunaceite = new Producto(\"atun en aceite\", \"en aceite\", 9.90, 1);\r\n Nodo<Producto> ATemp7 = new Nodo(atunaceite);\r\n listaAlsuper.agregarNodo(ATemp7);\r\n \r\n Producto leche = new Producto(\"leche\", \"nutri leche\", 14.90, 1);\r\n Nodo<Producto> ATemp8 = new Nodo(leche);\r\n listaAlsuper.agregarNodo(ATemp8);\r\n \r\n Producto arroz = new Producto(\"arroz\", \"mimarca\", 13.90, 1);\r\n Nodo<Producto> ATemp9 = new Nodo(arroz);\r\n listaAlsuper.agregarNodo(ATemp9);\r\n \r\n Producto frijol= new Producto(\"frijol\", \"pinto\", 16.90, 1);\r\n Nodo<Producto> ATemp10 = new Nodo(frijol);\r\n listaAlsuper.agregarNodo(ATemp10);\r\n \r\n Producto azucar = new Producto(\"azucar\", \"mimarca\", 17.90, 1);\r\n Nodo<Producto> ATemp11 = new Nodo(azucar);\r\n listaAlsuper.agregarNodo(ATemp11);\r\n \r\n Producto sal = new Producto(\"sal\", \"salada\", 10.90, 1);\r\n Nodo<Producto> ATemp12 = new Nodo(sal);\r\n listaAlsuper.agregarNodo(ATemp12);\r\n \r\n Producto pimienta = new Producto(\"pimienta\", \"pimi\", 3.90, 2);\r\n Nodo<Producto> ATemp13 = new Nodo(pimienta);\r\n listaAlsuper.agregarNodo(ATemp13);\r\n \r\n Producto limon = new Producto(\"limon\", \"verde\", 5.90, 0);\r\n Nodo<Producto> ATemp14 = new Nodo(limon);\r\n listaAlsuper.agregarNodo(ATemp14);\r\n \r\n Producto tomate = new Producto(\"tomate\", \"rojo\", 13.90, 0);\r\n Nodo<Producto> ATemp15 = new Nodo(tomate);\r\n listaAlsuper.agregarNodo(ATemp15);\r\n \r\n Producto zanahoria = new Producto(\"zanahoria\", \"goku\", 8.90, 0);\r\n Nodo<Producto> ATemp16 = new Nodo(zanahoria);\r\n listaAlsuper.agregarNodo(ATemp16);\r\n \r\n Producto papas = new Producto(\"papas\", \"ochoa\", 8.90, 0);\r\n Nodo<Producto> ATemp17 = new Nodo(papas);\r\n listaAlsuper.agregarNodo(ATemp17);\r\n \r\n Producto cebolla = new Producto(\"cebolla\", \"blanca\", 17.90, 1);\r\n Nodo<Producto> ATemp18 = new Nodo(cebolla);\r\n listaAlsuper.agregarNodo(ATemp18);\r\n \r\n Producto aceitecocina = new Producto(\"aceite de cocina\", \"123\", 29.90, 1);\r\n Nodo<Producto> ATemp19 = new Nodo(aceitecocina);\r\n listaAlsuper.agregarNodo(ATemp19);\r\n \r\n Producto panblanco = new Producto(\"pan blanco\", \"blanco\", 2.90, 1);\r\n Nodo<Producto> ATemp20 = new Nodo(panblanco);\r\n listaAlsuper.agregarNodo(ATemp20);\r\n \r\n Producto pan = new Producto(\"pan\", \"bimbo\", 39.90, 1);\r\n Nodo<Producto> ATemp21 = new Nodo(pan);\r\n listaAlsuper.agregarNodo(ATemp21);\r\n \r\n Producto zuko = new Producto(\"zuko\", \"zuko\", 4.90, 1);\r\n Nodo<Producto> ATemp22 = new Nodo(zuko);\r\n listaAlsuper.agregarNodo(ATemp22);\r\n \r\n Producto consome = new Producto(\"consome\", \"panchi\", 10.90, 2);\r\n Nodo<Producto> ATemp23 = new Nodo(consome);\r\n listaAlsuper.agregarNodo(ATemp23);\r\n \r\n Producto cereal = new Producto(\"cereal\", \"nesquik\", 40.90, 2);\r\n Nodo<Producto> ATemp24 = new Nodo(cereal);\r\n listaAlsuper.agregarNodo(ATemp24);\r\n \r\n Producto cereal2 = new Producto(\"cereal\", \"zucaritas\", 50.90, 2);\r\n Nodo<Producto> ATemp25 = new Nodo(cereal2);\r\n listaAlsuper.agregarNodo(ATemp25);\r\n \r\n Producto cereal3 = new Producto(\"cereal\", \"kellogs\", 35.90, 2);\r\n Nodo<Producto> ATemp26 = new Nodo(cereal3);\r\n listaAlsuper.agregarNodo(ATemp26);\r\n \r\n Producto chocomilk = new Producto(\"chocomilk\", \"pancho pantera\", 60.90, 2);\r\n Nodo<Producto> ATemp27 = new Nodo(chocomilk);\r\n listaAlsuper.agregarNodo(ATemp27);\r\n \r\n Producto apio = new Producto(\"apio\", \"pa el clamato\", 1.90, 0);\r\n Nodo<Producto> ATemp28 = new Nodo(cereal);\r\n listaAlsuper.agregarNodo(ATemp28);\r\n \r\n Producto chocomilk2 = new Producto(\"chocomilk\", \"el dinosaurio\", 15.90, 2);\r\n Nodo<Producto> ATemp29 = new Nodo(chocomilk2);\r\n listaAlsuper.agregarNodo(ATemp29);\r\n \r\n Producto chile = new Producto(\"chile\", \"amor\", 7.90, 0);\r\n Nodo<Producto> ATemp30 = new Nodo(chile);\r\n listaAlsuper.agregarNodo(ATemp30);\r\n \r\n Producto chilaca = new Producto(\"chilaca\", \"chihuahua\", 8.80, 0);\r\n Nodo<Producto> ATemp31 = new Nodo(chilaca);\r\n listaAlsuper.agregarNodo(ATemp30);\r\n \r\n Producto cafe= new Producto(\"cafe\", \"nescafe\",.90, 2);\r\n Nodo<Producto> ATemp32 = new Nodo(cafe);\r\n listaAlsuper.agregarNodo(ATemp32);\r\n \r\n Producto sopa = new Producto(\"sopa\", \"de coditos\", 4.90, 2);\r\n Nodo<Producto> ATemp33 = new Nodo(sopa);\r\n listaAlsuper.agregarNodo(ATemp33);\r\n \r\n Producto sopa2 = new Producto(\"sopa\", \"estrellas\", 3.90, 2);\r\n Nodo<Producto> ATemp34 = new Nodo(sopa2);\r\n listaAlsuper.agregarNodo(ATemp34);\r\n \r\n Producto sopa3 = new Producto(\"sopa\", \"moñitos\", 3.90, 2);\r\n Nodo<Producto> ATemp35 = new Nodo(sopa3);\r\n listaAlsuper.agregarNodo(ATemp35);\r\n \r\n Producto sopa4 = new Producto(\"sopa\", \"letras\", 3.90, 2);\r\n Nodo<Producto> ATemp36 = new Nodo(sopa4);\r\n listaAlsuper.agregarNodo(ATemp36);\r\n \r\n Producto pasta = new Producto(\"pasta\", \"spaguetti\", 15.90, 2);\r\n Nodo<Producto> ATemp37 = new Nodo(pasta);\r\n listaAlsuper.agregarNodo(ATemp37);\r\n \r\n Producto shampoo = new Producto(\"champu\", \"palmolive\", 36.90, 3);\r\n Nodo<Producto> ATemp38 = new Nodo(shampoo);\r\n listaAlsuper.agregarNodo(ATemp38);\r\n \r\n Producto desodorante = new Producto(\"desodorante\", \"old spice\", 50.90, 3);\r\n Nodo<Producto> ATemp39 = new Nodo(desodorante);\r\n listaAlsuper.agregarNodo(ATemp39);\r\n \r\n Producto jabontrastes = new Producto(\"jabon para los trastes\", \"salvo\", 40.90, 3);\r\n Nodo<Producto> ATemp40 = new Nodo(jabontrastes);\r\n listaAlsuper.agregarNodo(ATemp40);\r\n \r\n Producto jaboncuerpo = new Producto(\"jabon para el cuerpo\", \"jabonzote\", 6.90, 3);\r\n Nodo<Producto> ATemp41 = new Nodo(jaboncuerpo);\r\n listaAlsuper.agregarNodo(ATemp41);\r\n \r\n Producto rastrillo = new Producto(\"rastrillo\", \"gillette\", 60.90, 3);\r\n Nodo<Producto> ATemp42 = new Nodo(rastrillo);\r\n listaAlsuper.agregarNodo(ATemp42);\r\n \r\n Producto detergente = new Producto(\"detergente\", \"downy\", 38.90, 3);\r\n Nodo<Producto> ATemp43 = new Nodo(detergente);\r\n listaAlsuper.agregarNodo(ATemp43);\r\n \r\n Producto puredetomate = new Producto(\"pure de tomate\", \"tomax\", 9.90, 3);\r\n Nodo<Producto> ATemp44 = new Nodo(puredetomate);\r\n listaAlsuper.agregarNodo(ATemp44);\r\n \r\n Producto mole = new Producto(\"mole\", \"doña maria\", 25.90, 3);\r\n Nodo<Producto> ATemp45 = new Nodo(mole);\r\n listaAlsuper.agregarNodo(ATemp45);\r\n \r\n Producto papel = new Producto(\"papel\", \"petalo\", 6.90, 3);\r\n Nodo<Producto> ATemp46 = new Nodo(papel);\r\n listaAlsuper.agregarNodo(ATemp46);\r\n \r\n Producto servilletas = new Producto(\"servilletas\", \"mimarca\", 12.90, 3);\r\n Nodo<Producto> ATemp47 = new Nodo(servilletas);\r\n listaAlsuper.agregarNodo(ATemp47);\r\n \r\n Producto manzana = new Producto(\"manzanas\", \"roja\", 20.90, 0);\r\n Nodo<Producto> ATemp48 = new Nodo(manzana);\r\n listaAlsuper.agregarNodo(ATemp48);\r\n \r\n Producto platano = new Producto(\"platano\", \"meagarras\", 19.90, 0);\r\n Nodo<Producto> ATemp50 = new Nodo(platano);\r\n listaAlsuper.agregarNodo(ATemp50);\r\n \r\n Producto papaya = new Producto(\"papaya\", \"naranja\", 0.90, 0);\r\n Nodo<Producto> ATemp51 = new Nodo(papaya);\r\n listaAlsuper.agregarNodo(ATemp51);\r\n \r\n Producto pastadedientes = new Producto(\"pasta de dientes\", \"colgate\", 30.90, 0);\r\n Nodo<Producto> ATemp52 = new Nodo(pastadedientes);\r\n listaAlsuper.agregarNodo(ATemp52);\r\n \r\n Producto desodorante2 = new Producto(\"desodorante\", \"axe\", 50.90, 3);\r\n Nodo<Producto> ATemp53 = new Nodo(desodorante2);\r\n listaAlsuper.agregarNodo(ATemp53);\r\n \r\n Producto cremacuerpo = new Producto(\"crema\", \"real\", 30.90, 3);\r\n Nodo<Producto> ATemp54 = new Nodo(cremacuerpo);\r\n listaAlsuper.agregarNodo(ATemp54);\r\n \r\n Producto cremacomer = new Producto(\"crema\", \"lala\", 29.90, 2);\r\n Nodo<Producto> ATemp55 = new Nodo(cremacomer);\r\n listaAlsuper.agregarNodo(ATemp55);\r\n \r\n Producto cloro = new Producto(\"cloro\", \"cloralex\", 9.90, 3);\r\n Nodo<Producto> ATemp56 = new Nodo(cloro);\r\n listaAlsuper.agregarNodo(ATemp56);\r\n \r\n Producto pinol = new Producto(\"pinol\", \"pinol\", 28.90, 0);\r\n Nodo<Producto> ATemp57 = new Nodo(pinol);\r\n listaAlsuper.agregarNodo(ATemp57);\r\n \r\n Producto amonia = new Producto(\"amonia\", \"amonio\", 666.66, 3);\r\n Nodo<Producto> ATemp58 = new Nodo(amonia);\r\n listaAlsuper.agregarNodo(ATemp58);\r\n \r\n Producto tortillas = new Producto(\"tortillas\", \"caseras\", 18.90, 2);\r\n Nodo<Producto> ATemp59 = new Nodo(tortillas);\r\n listaAlsuper.agregarNodo(ATemp59);\r\n \r\n Producto winni = new Producto(\"winni\", \"chimex\", 30.90, 1);\r\n Nodo<Producto> ATemp60 = new Nodo(winni);\r\n listaAlsuper.agregarNodo(ATemp60);\r\n \r\n Producto salchicha = new Producto(\"salchicha\", \"chimex\", 60.90, 1);\r\n Nodo<Producto> ATemp61 = new Nodo(salchicha);\r\n listaAlsuper.agregarNodo(ATemp61);\r\n \r\n Producto jamon = new Producto(\"jamon\", \"chimex\", 70.90, 1);\r\n Nodo<Producto> ATemp63 = new Nodo(jamon);\r\n listaAlsuper.agregarNodo(ATemp63);\r\n \r\n Producto queso = new Producto(\"queso\", \"camargo\", 90.90, 1);\r\n Nodo<Producto> ATemp64 = new Nodo(queso);\r\n listaAlsuper.agregarNodo(ATemp64);\r\n \r\n Producto saladas = new Producto(\"saladas\", \"saladitas\", 15.90, 2);\r\n Nodo<Producto> ATemp65 = new Nodo(saladas);\r\n listaAlsuper.agregarNodo(ATemp65);\r\n \r\n Producto galletas = new Producto(\"galletas\", \"emperador\", 18.90, 2);\r\n Nodo<Producto> ATemp66 = new Nodo(galletas);\r\n listaAlsuper.agregarNodo(ATemp66);\r\n \r\n Producto lentejas = new Producto(\"lentejas\", \"mimarca\", 10.90, 2);\r\n Nodo<Producto> ATemp67 = new Nodo(lentejas);\r\n listaAlsuper.agregarNodo(ATemp67);\r\n \r\n Producto puredepapa = new Producto(\"pure de papa\", \"mi marca\", 20.90, 2);\r\n Nodo<Producto> ATemp68 = new Nodo(puredepapa);\r\n listaAlsuper.agregarNodo(ATemp68);\r\n \r\n Producto trapos = new Producto(\"trapos\", \"trapitos\", 15.90, 3);\r\n Nodo<Producto> ATemp69 = new Nodo(trapos);\r\n listaAlsuper.agregarNodo(ATemp69);\r\n \r\n Producto soda = new Producto(\"soda\", \"cocacola\", 31.90, 2);\r\n Nodo<Producto> ATemp70 = new Nodo(soda);\r\n listaAlsuper.agregarNodo(ATemp70);\r\n \r\n Producto jugo = new Producto(\"jugo\", \"jumex\",19.90, 2);\r\n Nodo<Producto> ATemp71 = new Nodo(jugo);\r\n listaAlsuper.agregarNodo(ATemp71);\r\n \r\n Producto cerbeza = new Producto(\"cerbeza\", \"indio\", 11.90, 2);\r\n Nodo<Producto> ATemp72 = new Nodo(cerbeza);\r\n listaAlsuper.agregarNodo(ATemp72);\r\n \r\n Producto hielo = new Producto(\"hielo\", \"pinguino\", 10.90, 2);\r\n Nodo<Producto> ATemp73 = new Nodo(hielo);\r\n listaAlsuper.agregarNodo(ATemp73);\r\n \r\n Producto salsa = new Producto(\"salsa\", \"maggi\", 60.90, 2);\r\n Nodo<Producto> ATemp74 = new Nodo(salsa);\r\n listaAlsuper.agregarNodo(ATemp74);\r\n \r\n Producto desechables = new Producto(\"desechables\", \"mimarca\", 10.90, 2);\r\n Nodo<Producto> ATemp75 = new Nodo(desechables);\r\n listaAlsuper.agregarNodo(ATemp75);\r\n \r\n Producto chicharo = new Producto(\"chicharo\", \"chicharo\", 10.90, 2);\r\n Nodo<Producto> ATemp76 = new Nodo(chicharo);\r\n listaAlsuper.agregarNodo(ATemp76);\r\n \r\n Producto elotes = new Producto(\"elotes\", \"elotin\", 2.90, 2);\r\n Nodo<Producto> ATemp77 = new Nodo(elotes);\r\n listaAlsuper.agregarNodo(ATemp77);\r\n \r\n Producto champiñones = new Producto(\"champiñones\", \"toat\", 14.90, 2);\r\n Nodo<Producto> ATemp78 = new Nodo(champiñones);\r\n listaAlsuper.agregarNodo(ATemp78);\r\n \r\n Producto sardina = new Producto(\"sardina\", \"sardinota\", 31.90, 2);\r\n Nodo<Producto> ATemp79 = new Nodo(sardina);\r\n listaAlsuper.agregarNodo(ATemp79);\r\n \r\n Producto hilodental = new Producto(\"hilo dental\", \"colgate\", 40.90, 3);\r\n Nodo<Producto> ATemp80 = new Nodo(hilodental);\r\n listaAlsuper.agregarNodo(ATemp80);\r\n \r\n Producto cepillodedientes = new Producto(\"cepillo de dientes\", \"colgate\", 25.90, 3);\r\n Nodo<Producto> ATemp81 = new Nodo(cepillodedientes);\r\n listaAlsuper.agregarNodo(ATemp81);\r\n \r\n Producto gel = new Producto(\"gel para el cabello\", \"ego\", 16.90, 3);\r\n Nodo<Producto> ATemp82 = new Nodo(gel);\r\n listaAlsuper.agregarNodo(ATemp82);\r\n \r\n Producto cera = new Producto(\"cera\", \"ego\", 47.90, 3);\r\n Nodo<Producto> ATemp83 = new Nodo(cera);\r\n listaAlsuper.agregarNodo(ATemp83);\r\n \r\n Producto aerosol = new Producto(\"aerosol\", \"paris\", 75.90, 3);\r\n Nodo<Producto> ATemp84 = new Nodo(aerosol);\r\n listaAlsuper.agregarNodo(ATemp84);\r\n \r\n Producto acondicionador = new Producto(\"acondicionador\", \"loreal paris\", 70.90, 3);\r\n Nodo<Producto> ATemp85 = new Nodo(acondicionador);\r\n listaAlsuper.agregarNodo(ATemp85);\r\n \r\n Producto cremaafeitar = new Producto(\"crema para afeitar\", \"yilet\", 40.90, 3);\r\n Nodo<Producto> ATemp86 = new Nodo(cremaafeitar);\r\n listaAlsuper.agregarNodo(ATemp86);\r\n }",
"public void afficherListe(){\n StringBuilder liste = new StringBuilder(\"\\n\");\n logger.info(\"OUTPUT\",\"\\nLes produits en vente sont:\");\n for (Aliment aliment : this.productList) { liste.append(\"\\t\").append(aliment).append(\"\\n\"); }\n logger.info(\"OUTPUT\", liste+\"\\n\");\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Profilo> getAll() {\r\n\t\t//Recupero la sessione da Hibernate\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\t//Creo la query usando il linguaggio HQL (Hibernate Query Language)\r\n\t\tQuery query = session.createQuery(\"FROM Vocelicenza\");\r\n\t\t\t\r\n\t\t//Restituisco la lista di Profili\r\n\t\treturn query.list();\r\n\t}",
"public ArrayList<rubro> obtenerTodoslosRubros() {\n ArrayList<rubro> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement pr = conn.prepareStatement(\"select id_rubro , nombre, descripcion, estado, ruta \\n\"\n + \" from rubros \");\n\n ResultSet rs = pr.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n boolean estado = rs.getBoolean(4);\n String ruta = rs.getString(5);\n\n rubro r = new rubro(id, nombre, estado, descripcion, ruta);\n\n lista.add(r);\n }\n\n rs.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n\n }",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"public ArrayList<GrupoProducto> consultarTodos(){\r\n ArrayList<GrupoProducto> grupoProducto = new ArrayList<>();\r\n for (int i = 0; i < listaGrupoProductos.size(); i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n grupoProducto.add(listaGrupoProductos.get(i));\r\n }\r\n }\r\n return grupoProducto;\r\n }",
"public Set<ProductBarcode> getProducts(boolean recursive)\r\n {\r\n assert(true);\r\n Set<ProductBarcode> barCodes = new TreeSet<ProductBarcode>();\r\n \tfor (ProductBarcode tProd : products)\r\n {\r\n barCodes.add(tProd);\r\n }\r\n if (recursive)\r\n {\r\n for (ProductContainer tGroup : groups)\r\n {\r\n barCodes.addAll(tGroup.getProducts(true));\r\n }\r\n }\r\n return barCodes;\r\n }",
"@Override\n\tpublic List<BeanDistrito> listar() {\n\t\tList<BeanDistrito> lista = new ArrayList<BeanDistrito>();\n\t\tBeanDistrito distrito = null;\n\t\tConnection con = MySQLDaoFactory.obtenerConexion();\n\t\ttry {\n\t\t\n\t\t\tString sql=\"SELECT * FROM t_distrito ORDER BY codDistrito\";\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\t\n\t\t\twhile(rs.next()){\n\t\t\t\tdistrito = new BeanDistrito();\n\t\t\t\tdistrito.setCodDistrito(rs.getInt(1));\n\t\t\t\tdistrito.setNombre(rs.getString(2));\n\t\t\t\t\n\t\t\t\tlista.add(distrito);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tcon.close();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn lista;\n\t}",
"public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }",
"public List<SubItem> getListaItems() {\n\t\tfecha = new Date();\n\t\tcargarDatosLogeado();\n\t\tTimestamp fecha_ahora = new Timestamp(fecha.getTime());\n\t\tList<SubItem> a = managergest.findItems();\n\t\tList<SubItem> l1 = new ArrayList<SubItem>();\n\t\tfor (SubItem t : a) {\n\t\t\tif (t.getItemGanadorDni() == null && t.getItemEstado().equals(\"A\")\n\t\t\t\t\t&& t.getItemFechaSubastaFin().after((fecha_ahora)))\n\t\t\t\tl1.add(t);\n\t\t}\n\t\treturn l1;\n\t}",
"@Override\r\n\tpublic List<Producto> getAll() throws Exception {\n\t\treturn productRepository.buscar();\r\n\t}",
"@Override\r\n\tpublic List<Product> findAllProductsByDescending() {\n\t\treturn productRepository.findAllProductsByDescending();\r\n\t}",
"private JList<ProductoAlmacen> crearListaProductos() {\n\n JList<ProductoAlmacen> lista = new JList<>(new Vector<>(almacen.getProductos()));\n\n lista.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\n\n lista.setCellRenderer(new DefaultListCellRenderer() {\n @Override\n public Component getListCellRendererComponent(JList<? extends Object> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n Component resultado = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\n ProductoAlmacen productoAlmacen = (ProductoAlmacen) value;\n\n String texto = String.format(\"%s (%d uds.)\", productoAlmacen.getProducto().getNombre(), productoAlmacen.getStock());\n this.setText(texto);\n\n return resultado;\n }\n });\n\n return lista;\n }",
"private void getAllProducts() {\n }",
"@GetMapping(\"/api/barang/{kodebarang}/subbarang\")\n public List<SubBarang> listSubBarang(@PathVariable String kodebarang){\n Barang barang = barangRepository.findBarangByKode(kodebarang);\n return subBarangRepository.findAllByBarangAndIsExistOrderByStatusSubBarangDesc(barang,true);\n }",
"public List<Producto> listar() throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idproducto, t.nombre_producto, t.imagen, t.idcategoria, t.idmarca, t.idmodelo, c.nombre as categoria, m.nombre as marca, d.nombre as modelo \"\n\t\t\t\t\t+ \" FROM conftbc_producto t INNER JOIN conftbc_categoria c on c.idcategoria = t.idcategoria\"\n\t\t\t\t\t+ \" INNER JOIN conftbc_marca m on m.idmarca = t.idmarca INNER JOIN conftbc_modelo d on d.idmodelo = t.idmodelo \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n\t\t\t\tCategoria categoria = new Categoria();\n\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n\t\t\t\tproducto.setCategoria(categoria);\n\t\t\t\tMarca marca = new Marca();\n\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n\t\t\t\tproducto.setMarca(marca);\n\t\t\t\tModelo modelo = new Modelo();\n\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}",
"public ArrayList<Rubro> getRubros() {\n ArrayList<CuentaCorriente> cuentaCorrientes = getCuentasCorrientesCollection();\n ArrayList<Rubro> rubros = new ArrayList<>();\n\n //Tengo que mergear todos los rubros\n for (CuentaCorriente cuentaCorriente : cuentaCorrientes) {\n for (Rubro rubroProveedor : cuentaCorriente.getProveedor().getRubros()) {\n //Si no tengo rubros inicialmente, agregas uno\n if (rubros.isEmpty()) {\n rubros.add(rubroProveedor);\n } else {\n boolean existe = false;\n //Tengo que mergear todos los productos de los rubros\n for (Rubro rubro : rubros) {\n if (rubroProveedor.getIdRubro() == rubro.getIdRubro()) {\n existe = true;\n //Es el mismo rubro\n for (Producto productoProveedor : rubroProveedor.getProductos()) {\n boolean noTieneProducto = true;\n //Quiero mergear los PPPP de cada producto igual\n for (Producto producto : rubro.getProductos()) {\n if (productoProveedor.getIdProducto() == producto.getIdProducto()) {\n List<PrecioProductoPorProveedor> precios = producto.getPreciosPorProveedor();\n precios.addAll(productoProveedor.getPreciosPorProveedor());\n producto.setPreciosPorProveedor(precios);\n noTieneProducto = false;\n }\n }\n //Si no encontre el producto, agrego\n if (noTieneProducto) {\n rubro.addProducto(productoProveedor);\n }\n }\n }\n }\n\n if (!existe) {\n rubros.add(rubroProveedor);\n }\n }\n }\n }\n\n return rubros;\n }",
"@Override\n\tpublic List<Subscribe> getSubList(int subAccountId) {\n\t\t\n\t\t\n\t\t\n\t\tList<Subscribe> subList= null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tSession session = sessionFactory.openSession();\n\t\t\tTypedQuery<Subscribe> query = session.createQuery(\"select s from Subscribe s where s.subscriber.kullaniciid= :subId\");\n\t\t\t\n\t\t\tquery.setParameter(\"subId\", subAccountId);\n\t\t\t\n\t\t\tsubList = query.getResultList();\n\t\t\t\n\t\t\n\t\t\t\n\t\t\tsession.close();\n\t\t\t\n\t\t\treturn subList;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\n\t\t\treturn subList;\n\t\t}\n\t\t\n\t\t\n\t\n\t}",
"public static List getAllPrices() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT cena FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n int naziv = result.getInt(\"cena\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }",
"private static void listaProdutosCadastrados() throws Exception {\r\n String nomeCategoria;\r\n ArrayList<Produto> lista = arqProdutos.toList();\r\n if (!lista.isEmpty()) {\r\n System.out.println(\"\\t** Lista dos produtos cadastrados **\\n\");\r\n }\r\n for (Produto p : lista) {\r\n if (p != null && p.getID() != -1) {\r\n nomeCategoria = getNomeCategoria(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (nomeCategoria != null) {\r\n System.out.println(\"Categoria: \" + nomeCategoria);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n System.out.println();\r\n Thread.sleep(500);\r\n }\r\n }\r\n }",
"public ListaPartidas recuperarPartidas() throws SQLException {\n ListaPartidas listaPartidas = null;\n try {\n getConexion();\n String consulta = \"SELECT MANOS.id_mano, CARTAS.valor, CARTAS.palo, JUGADORES.nombre, PARTIDAS.id_partida \" +\n \"FROM MANOS \" +\n \"LEFT JOIN PARTIDAS ON PARTIDAS.id_mano = MANOS.id_mano \" +\n \"LEFT JOIN CARTAS ON CARTAS.id_carta = MANOS.id_carta \" +\n \"LEFT JOIN JUGADORES ON JUGADORES.id_jug = PARTIDAS.id_jug \" +\n \"ORDER BY PARTIDAS.id_mano\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n // Compruebo que se han devuelto datos\n if (registros.next()) {\n // Inicializo el contenedor que se devolverá\n listaPartidas = new ListaPartidas();\n // Declaro e inicializo los objetos que servirán de buffer para añadir datos a cada partida\n LinkedList<Jugador> listaJugadores = new LinkedList<Jugador>();\n LinkedList<Mano> resultado = new LinkedList<Mano>();\n Mano mano = new Mano();\n // Variable que sirve para controlar cuando hay una nueva partida\n int numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n // Variable que sirve para controlar cuando hay una nueva mano\n int numMano = registros.getInt(\"MANOS.id_mano\");\n // Devuelvo el cursor del ResultSet a su posición inicial\n registros.beforeFirst();\n // Bucle encargado de añadir datos a los contenedores\n while (registros.next()) {\n // Declaración de variables\n String palo = registros.getString(\"CARTAS.palo\");\n String valor = registros.getString(\"CARTAS.valor\");\n String nombre = registros.getString(\"JUGADORES.nombre\");\n // Se crea una carta con el palo y el valor devuelto por la consulta SQL\n Carta carta = new Carta(palo, valor);\n // Agrego la carta a la mano\n mano.agregarCarta(carta);\n // Agrego jugadores al contenedor de jugadores controlando si hay duplicados\n if (!listaJugadores.contains(nombre) || listaJugadores.isEmpty()) {\n Jugador jugador = new Jugador(nombre);\n listaJugadores.add(jugador);\n }\n // Cuando hay una nueva mano, la añado al contenedor resultados y creo una nueva Mano\n if (numMano != registros.getInt(\"MANOS.id_mano\") || registros.isLast()) {\n numMano = registros.getInt(\"MANOS.id_mano\");\n mano.setPropietario(nombre);\n resultado.add(mano);\n mano = new Mano();\n }\n // Cuando hay una nueva partida, guardo un objeto Partida en el contenedor de partidas\n if (numPartida != registros.getInt(\"PARTIDAS.id_partida\") || registros.isLast()) {\n numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n Partida partida = new Partida(numPartida, listaJugadores, resultado);\n listaPartidas.agregarPartida(partida);\n // Reinicio los buffers de datos\n listaJugadores = new LinkedList<Jugador>();\n resultado = new LinkedList<Mano>();\n }\n }\n }\n } finally {\n closeConexion();\n }\n return listaPartidas;\n }",
"@Override\r\n\tpublic List prodAllseach() {\n\t\treturn adminDAO.seachProdAll();\r\n\t}",
"public static List<AddCollection> findAllProduct() {\n\t\treturn null;\n\t}",
"public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }",
"private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\n\t}",
"public void populateListaObjetos() {\n listaObjetos.clear();\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String tipo = null;\n if (selectedTipo.equals(\"submenu\")) {\n tipo = \"menu\";\n } else if (selectedTipo.equals(\"accion\")) {\n tipo = \"submenu\";\n }\n\n Criteria cObjetos = session.createCriteria(Tblobjeto.class);\n cObjetos.add(Restrictions.eq(\"tipoObjeto\", tipo));\n Iterator iteObjetos = cObjetos.list().iterator();\n while (iteObjetos.hasNext()) {\n Tblobjeto o = (Tblobjeto) iteObjetos.next();\n listaObjetos.add(new SelectItem(new Short(o.getIdObjeto()).toString(), o.getNombreObjeto(), \"\"));\n }\n } catch (HibernateException e) {\n //logger.throwing(getClass().getName(), \"populateListaObjetos\", e);\n } finally {\n session.close();\n }\n }",
"@Override\n\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"public List<Product> getProducts() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n List<Product> products = new ArrayList<>(); //creating an array\n String sql=\"select * from products order by product_id\"; //writing sql statement\n try {\n connection = db.getConnection();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) { //receive data from database\n products.add(new Product( resultSet.getInt(1), resultSet.getString(2), resultSet.getInt(3),\n resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),\n resultSet.getString(7), resultSet.getString(8))); //creating object of product and\n // inserting it into an array\n }\n return products; //return this array\n } catch (SQLException | ClassNotFoundException throwable) {\n throwable.printStackTrace();\n } finally {\n try {\n assert resultSet != null;\n resultSet.close();\n statement.close();\n connection.close();\n } catch (SQLException throwable) {\n throwable.printStackTrace();\n }\n }\n return null;\n }",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"public List<Tb_Prod_Painel_PromoBeans> getProdPainelTabelas(Integer terminal, String painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel in(\" + painel + \") order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal); \r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>(); \r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }",
"public String productList(ProductDetails p);",
"void showSublist()\n {\n System.out.println(subs);\n }",
"@Override\n\tpublic List<ProductVO> mainProductList(Integer cate_code_prt) {\n\t\treturn mapper.mainProductList(cate_code_prt);\n\t}",
"public List listarCategoriasForm() throws Exception {\n PreparedStatement ps = null;\n Connection conn = null;\n ResultSet rs = null;\n\n try {\n conn = this.conn;\n ps = conn.prepareStatement(\"select idRemedio, categoria from Remedios group by categoria order by categoria ASC \");\n rs = ps.executeQuery();\n List<Produto> list = new ArrayList<Produto>();\n while (rs.next()) {\n int idRemedio = rs.getInt(1);\n String categoria = rs.getString(2);\n list.add(new Produto(idRemedio, null, null, null,null, null, null, null, null, null, null, null, null, null, categoria, null));\n\n }\n return list;\n\n } catch (SQLException sqle) {\n throw new Exception(sqle);\n } finally {\n Conexao.closeConnection(conn, ps, rs);\n }\n }",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"List<Product> getAllProducts() throws DataBaseException;",
"public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }",
"private void getinterrogantes(){\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql = \"SELECT i FROM Interrogante i \"\n + \"WHERE i.estado='a' \";\n\n Query query = em.createQuery(jpql);\n List<Interrogante> listInterrogantes = query.getResultList();\n\n ArrayList<ListQuestion> arrayListQuestions = new ArrayList<>();\n for (Interrogante i : listInterrogantes){\n ListQuestion lq = new ListQuestion();\n lq.setIdinterrogante(i.getIdinterrogante());\n lq.setQuestion(i.getDescripcion());\n lq.setListParametros(getParametros(i.getIdinterrogante()));\n arrayListQuestions.add(lq);\n }\n\n this.ListQuestions = arrayListQuestions;\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n } \n \n }",
"public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }",
"public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria){\n ArrayList <Producto> productosEncontrados = new ArrayList<>();\n for(Producto cadaProducto : UtilidadJavaPop.getProductosTotales()){\n if(cadaProducto.getCategoria().equals(categoria) && !productosEncontrados.contains(cadaProducto)\n && !cadaProducto.getVendedor().getCorreo().equals(this.getCorreo())){\n productosEncontrados.add(cadaProducto);\n }\n }\n ArrayList<Producto>productosEncontradosOrdenado = getProductosOrdenados(productosEncontrados, this);\n return productosEncontradosOrdenado;\n \n }",
"public List listarCategorias() throws Exception {\n PreparedStatement ps = null;\n Connection conn = null;\n ResultSet rs = null;\n\n try {\n conn = this.conn;\n ps = conn.prepareStatement(\"select idRemedio,nome,categoria from Remedios order by nome ASC\");\n rs = ps.executeQuery();\n List<Produto> list = new ArrayList<Produto>();\n while (rs.next()) {\n Integer idRemedio = rs.getInt(1);\n String nome = rs.getString(2);\n String categoria = rs.getString(3);\n list.add(new Produto(idRemedio, nome, null, null, null, null,null, null, null, null, null, null, null, null, categoria, null));\n\n }\n return list;\n\n } catch (SQLException sqle) {\n throw new Exception(sqle);\n } finally {\n Conexao.closeConnection(conn, ps, rs);\n }\n }",
"List<SubCategory> getSubCategory(Category category) throws DataBaseException;",
"private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }",
"public List<Product> getAll() {\n List<Product> list = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + PRODUCT_TABLE;\n SQLiteDatabase database = this.getReadableDatabase();\n try (Cursor cursor = database.rawQuery(selectQuery, null)) {\n if (cursor.moveToFirst()) {\n do {\n int id = cursor.getInt(0);\n String name = cursor.getString(1);\n String url = cursor.getString(2);\n double current = cursor.getDouble(3);\n double change = cursor.getDouble(4);\n String date = cursor.getString(5);\n double initial = cursor.getDouble(6);\n Product item = new Product(name, url, current, change, date, initial, id);\n list.add(item);\n }\n while (cursor.moveToNext());\n }\n }\n return list;\n }",
"public ArrayList getCartas();",
"public List<MS> selectAllEntries() throws SQLException {\r\n Connection connection = super.getDataSource().getConnection();\r\n try {\r\n PreparedStatement pstmt = connection\r\n .prepareStatement(\"SELECT ID, NAME,\" + COMPONENT + \",TOTAL \"\r\n \t\t\t\t+ \"FROM ROOT\");\r\n ResultSet rs = pstmt.executeQuery();\r\n ArrayList<MS> list = new ArrayList<MS>();\r\n while (rs.next()) {\r\n MS ms = new MS();\r\n ms.setId(new Integer(rs.getInt(1)));\r\n \r\n ms.setSum(super.getSum(ms.getId()));\r\n \r\n \r\n ms.setName(rs.getString(2));\r\n ms.generateINumber();\r\n \r\n ms.setMs(rs.getInt(3));\r\n ms.setTotal(rs.getInt(4));\r\n list.add(ms);\r\n }\r\n Collections.sort(list);;\r\n return list;\r\n } finally {\r\n if (connection != null) {\r\n connection.close();\r\n }\r\n }\r\n }",
"private List<Pelicula> getLista() {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\tList<Pelicula> lista = null;\n\t\ttry {\n\t\t\tlista = new LinkedList<>();\n\n\t\t\tPelicula pelicula1 = new Pelicula();\n\t\t\tpelicula1.setId(1);\n\t\t\tpelicula1.setTitulo(\"Power Rangers\");\n\t\t\tpelicula1.setDuracion(120);\n\t\t\tpelicula1.setClasificacion(\"B\");\n\t\t\tpelicula1.setGenero(\"Aventura\");\n\t\t\tpelicula1.setFechaEstreno(formatter.parse(\"02-05-2017\"));\n\t\t\t// imagen=\"cinema.png\"\n\t\t\t// estatus=\"Activa\"\n\n\t\t\tPelicula pelicula2 = new Pelicula();\n\t\t\tpelicula2.setId(2);\n\t\t\tpelicula2.setTitulo(\"La bella y la bestia\");\n\t\t\tpelicula2.setDuracion(132);\n\t\t\tpelicula2.setClasificacion(\"A\");\n\t\t\tpelicula2.setGenero(\"Infantil\");\n\t\t\tpelicula2.setFechaEstreno(formatter.parse(\"20-05-2017\"));\n\t\t\tpelicula2.setImagen(\"bella.png\"); // Nombre del archivo de imagen\n\n\t\t\tPelicula pelicula3 = new Pelicula();\n\t\t\tpelicula3.setId(3);\n\t\t\tpelicula3.setTitulo(\"Contratiempo\");\n\t\t\tpelicula3.setDuracion(106);\n\t\t\tpelicula3.setClasificacion(\"B\");\n\t\t\tpelicula3.setGenero(\"Thriller\");\n\t\t\tpelicula3.setFechaEstreno(formatter.parse(\"28-05-2017\"));\n\t\t\tpelicula3.setImagen(\"contratiempo.png\"); // Nombre del archivo de imagen\n\n\t\t\tPelicula pelicula4 = new Pelicula();\n\t\t\tpelicula4.setId(4);\n\t\t\tpelicula4.setTitulo(\"Kong La Isla Calavera\");\n\t\t\tpelicula4.setDuracion(118);\n\t\t\tpelicula4.setClasificacion(\"B\");\n\t\t\tpelicula4.setGenero(\"Accion y Aventura\");\n\t\t\tpelicula4.setFechaEstreno(formatter.parse(\"06-06-2017\"));\n\t\t\tpelicula4.setImagen(\"kong.png\"); // Nombre del archivo de imagen\n\t\t\tpelicula4.setEstatus(\"Inactiva\"); // Esta pelicula estara inactiva\n\t\t\t\n\t\t\t// Agregamos los objetos Pelicula a la lista\n\t\t\tlista.add(pelicula1);\n\t\t\tlista.add(pelicula2);\n\t\t\tlista.add(pelicula3);\n\t\t\tlista.add(pelicula4);\n\n\t\t\treturn lista;\n\t\t} catch (ParseException e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"public List<Producto> getProductos(Producto producto) throws Exception {\n\t\treturn null;\n\t}",
"private void cargarProductos() {\r\n\t\tproductos = productoEJB.listarInventariosProductos();\r\n\r\n\t\tif (productos.size() == 0) {\r\n\r\n\t\t\tList<Producto> listaProductos = productoEJB.listarProductos();\r\n\r\n\t\t\tif (listaProductos.size() > 0) {\r\n\r\n\t\t\t\tMessages.addFlashGlobalWarn(\"Para realizar una venta debe agregar los productos a un inventario\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"public static ArrayList<Carta> getAll() {\r\n\r\n\t\tArrayList<Carta> lista = new ArrayList<Carta>();\r\n\t\tString sql = SQL_JOIN + \" ORDER BY cartas.nombre ASC;\";\r\n\r\n\t\tSystem.out.println(sql);\r\n\t\ttry (\r\n\r\n\t\t\t\tConnection con = ConnectionHelper.getConnection();\r\n\t\t\t\tPreparedStatement pst = con.prepareStatement(sql);\r\n\t\t\t\tResultSet rs = pst.executeQuery(); // lanza la consulta SQL y obtiene Resultados RS\r\n\r\n\t\t) {\r\n\r\n\t\t\tSystem.out.println(pst);\r\n\r\n\t\t\twhile (rs.next()) { // itero sobre los resultados de la consulta SQL\r\n\r\n\t\t\t\tCarta c = mapper(rs);\r\n\t\t\t\t// a�adir objeto al ArrayList\r\n\t\t\t\tlista.add(c);\r\n\r\n\t\t\t}\r\n\t\t\t// fin del bucle, ya no quedan mas lineas para leer\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn lista;\r\n\t}",
"@Override\r\n\tpublic ArrayList<Join> selectAll(Connection con) throws Exception {\n\t\tArrayList<Join> b = new ArrayList<>();\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rset = null;\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(SqlProducts.SelectAll);\r\n\t\t\trset = pstmt.executeQuery();\r\n\t\t\twhile(rset.next()) {\r\n\t\t\t\tString pname = rset.getString(\"PDNAME\");\r\n\t\t\t\tString psubname = rset.getString(\"PDSUBNAME\");\r\n\t\t\t\tString fname = rset.getString(\"FACNAME\");\r\n\t\t\t\tString floc = rset.getString(\"FACLOC\");\r\n\t\t\t\tb.add(new Join(pname, psubname,fname,floc));\r\n\t\t\t}\r\n\t\t}catch (SQLException e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tclose(pstmt);\r\n\t\t\t}\r\n\t\treturn b;\r\n\r\n\t}",
"@Override\n\tpublic List<ProductVo> selectAll() {\n\t\tList<ProductVo> list = sqlSession.selectList(\"product.selectAll\");\n\t\treturn list;\n\t}",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"List<transactionsProducts> purchasedProducts();",
"@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}",
"@Override\n\tpublic List<Veiculo> listar() {\n\t\treturn null;\n\t}",
"public List<SubTypeDocInfo> getReselladoInfo() throws GdibException{\n\n\t\tList<SubTypeDocInfo> res = null;\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\t\t\tconn = getDBConnection();\n\n\t\t\tif(conn != null){\n\t\t\t\tStringBuffer stb_SELECT = new StringBuffer();\n\n\t\t\t\tstb_SELECT.append(\"SELECT code_clasificacion, code_subtype, resealing FROM subtypedocinfo; \");\n\n\t\t\t\tps = conn.prepareStatement(stb_SELECT.toString());\n\t\t\t\tLOGGER.debug(\"getReselladoInfo :: SQL query :: \" + ps.toString());\n\t\t\t\trs = ps.executeQuery();\n\n\t\t\t\tres = new ArrayList<SubTypeDocInfo>();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tSubTypeDocInfo info = new SubTypeDocInfo(rs.getString(1), rs.getString(2));\n\t\t\t\t\tinfo.setResealing(rs.getString(3));\n\t\t\t\t\tres.add(info);\n\t\t\t\t}\n\n\t\t\t} else{\n\t\t\t\tthrow new GdibException(\"La conexion a la base de datos se ha generado nula.\");\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.error(\"Ha fallado la conexion con la bddd de alfresco. Error: \" + e.getMessage(),e);\n\t\t\tthrow new GdibException(\"Ha fallado la conexion con la bddd de alfresco. Error: \" + e.getMessage(),e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tps.close();\n\t\t\t\tconn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLOGGER.error(\"No se podido cerrar la conexion a base de datos.\");\n\t\t\t\tthrow new GdibException(\"No se podido cerrar la conexion a base de datos.\");\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}",
"public List<Talla> tallasProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Talla> lista = new ArrayList<Talla>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idtalla, t.nombre, t.observacion FROM conftbc_talla t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idcategoria = p.idcategoria WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tTalla talla = new Talla();\n\t\t\t\ttalla.setIdtalla(rs.getInt(\"idtalla\"));\n\t\t\t\ttalla.setNombre(rs.getString(\"nombre\"));\n\t\t\t\ttalla.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(talla);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}",
"@Override\n\t@Transactional(readOnly = true)\n\tpublic List<Producto> findAll() {\n\n\t\treturn (List<Producto>) productoDao.findAll();\n\t}"
] | [
"0.70116025",
"0.683584",
"0.67041373",
"0.6637824",
"0.6559707",
"0.6541507",
"0.64674515",
"0.6445422",
"0.6241787",
"0.61828333",
"0.6179217",
"0.6137582",
"0.6137582",
"0.6137582",
"0.61367935",
"0.6134282",
"0.6134282",
"0.6097833",
"0.6085966",
"0.6062517",
"0.6047812",
"0.6027465",
"0.6025494",
"0.60091597",
"0.60037464",
"0.59932023",
"0.5973077",
"0.5944099",
"0.5932633",
"0.592231",
"0.59219486",
"0.5920109",
"0.5897863",
"0.5891132",
"0.58891016",
"0.58782864",
"0.5877959",
"0.5877336",
"0.586334",
"0.586302",
"0.58555806",
"0.58530456",
"0.58229476",
"0.58063126",
"0.58004814",
"0.579683",
"0.5791035",
"0.57855546",
"0.5774114",
"0.5769355",
"0.5768819",
"0.5767786",
"0.57634693",
"0.57598007",
"0.57547814",
"0.5736578",
"0.57353354",
"0.5729253",
"0.5726842",
"0.5712432",
"0.5691373",
"0.5689034",
"0.56827664",
"0.5682725",
"0.5675703",
"0.56711125",
"0.56696355",
"0.5663738",
"0.5656761",
"0.5640312",
"0.5638886",
"0.56374115",
"0.5634857",
"0.5633521",
"0.5633012",
"0.5632756",
"0.56301546",
"0.56293243",
"0.5626958",
"0.56246376",
"0.562438",
"0.5623764",
"0.5613606",
"0.5601251",
"0.55943274",
"0.55816585",
"0.5575411",
"0.55724806",
"0.5561555",
"0.55588466",
"0.55587935",
"0.5552538",
"0.5551288",
"0.5550504",
"0.5549093",
"0.5545773",
"0.55397475",
"0.55395484",
"0.55386543",
"0.5537719"
] | 0.7174386 | 0 |
Registra un Subproducto en la base de datos | public abstract void registrarSubproducto(EntityManager sesion, Subproducto subproducto); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void registrarSolicitudOficioBien(SolicitudOficioBienDTO solicitudOficioBienDTO) {\n\n // Fecha solicitud\n solicitudOficioBienDTO.setFechaSolicitud(Calendar.getInstance().getTime());\n SolicitudOficioBien solicitudOficioBien = SolicitudOficioBienHelper.toLevel1Entity(solicitudOficioBienDTO,\n null);\n em.persist(solicitudOficioBien);\n solicitudOficioBienDTO.setId(solicitudOficioBien.getId());\n // Solicitud bien entidad\n for (SolicitudBienEntidadDTO solicitudBienEntidadDTO : solicitudOficioBienDTO.getSolicitudBienEntidadDTOs()) {\n solicitudBienEntidadDTO.setSolicitudOficioBienDTO(solicitudOficioBienDTO);\n registrarSolicitudBienEntidad(solicitudBienEntidadDTO);\n }\n }",
"@Override\n public void registrarPropiedad(Propiedad nuevaPropiedad, String pIdAgente) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"INSERT INTO PROPIEDAD (ID_PROPIEDAD, ID_AGENTE, MODALIDAD, \"\n + \"AREA_TERRENO, VALOR_METRO, VALOR_FISCAL, PROVINCIA, CANTON, DISTRITO, DIREXACTA, TIPO, \"\n + \"ESTADO, PRECIO) VALUES (\" + numFinca + \", '\" + pIdAgente + \"' , '\" + modalidad + \"',\" + \n area + \",\" + metro + \",\" + fiscal + \", '\" + provincia + \"' , '\" + canton + \"' , '\" + distrito \n + \"' , '\" + dirExacta + \"' , '\" + tipo + \"' , '\" + estado + \"', \" + precio + \")\");\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public abstract void actualizarSubproducto(EntityManager sesion, Subproducto subproducto);",
"private void registrarDatosBD(String nombre, String apellido, String usuario, String clave, String fnacim) {\n\t\tUsuario u = new Usuario(0, nombre, apellido, usuario, clave, fnacim, 0, 0);\n\t\t// 02. Registrar el obj usando la clase de gestion y guardando\n\t\tint ok = new GestionUsuarios().registrar(u);\n\n\t\t// salidas\n\t\tif (ok == 0) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Error al registrar\");\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(this, \"Registro OK\");\n\t\t}\n\t}",
"public void agregar(Producto producto) throws BusinessErrorHelper;",
"private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {\n miVehiculo = new Vehiculo(placa,tipo,color, numdoc);\n\n showProgressDialog();\n\n //empresavehiculo\n //1. actualizar el reference, empresavehiculo\n //2. mDatabase.child(\"ruc\").child(\"placa\").setValue\n\n mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n //\n setmDatabase(getDatabase().getReference(\"empresasvehiculos\"));\n //\n mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario(\"ruc\")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }",
"public void registrarReservaColectiva(ReservaColectiva reserva) throws Exception {\n\n\t\tDAOReserva dao= new DAOReserva();\n\n\t\ttry {\n\t\t\tthis.conn= darConexion();\n\t\t\tdao.setConn(conn);\n\t\t\tconn.commit();\n\t\t\tdao.registrarReservaColectiva(reserva);\n\t\t}catch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tconn.rollback();\n\t\t\tthrow sqlException;\n\t\t}catch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tconn.rollback();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void registrarSalida() {\n\n\t}",
"@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}",
"@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}",
"private void registrarBaseDatosRedis()\n {\n \tConexionBaseDatosRedis registrar = new ConexionBaseDatosRedis();\n \tregistrar.insertarDatos(categoriaPregunta, pregunta, respuesta.getRespuesta());\n\n }",
"public void registrarQuarto(Quarto vossoQuarto) {\n\t\t\n\n\t\ttry {\n\t\t\tStatement stm = conex.getConnection().createStatement();\n\t\t\tstm.executeUpdate(\"INSERT INTO quarto(tipo,metro,descricao) VALUES ('\"\n\t\t\t\t\t+ vossoQuarto.getTipo() + \"', \"\n\t\t\t\t\t+ vossoQuarto.getMetro() + \", '\"\n\t\t\t\t\t+ vossoQuarto.getDescricao() + \n \"')\"); \n \n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Feito Registro na Base de Dados\", \"Informativo\",\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\tstm.close();\n\t\t\tconex.desconectar();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Registro não realizado, verifique seu console para verificar o error informado\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}",
"private void registrarCoactivoOficioBien(CoactivoOficioBienDTO coactivoOficioBienDTO) {\n CoactivoOficioBien coactivoOficioBien = CoactivoOficioBienHelper.toLevel1Entity(coactivoOficioBienDTO, null);\n em.persist(coactivoOficioBien);\n }",
"private void registrarSolicitudBienEntidad(SolicitudBienEntidadDTO SolicitudBienEntidadDTO) {\n SolicitudBienEntidad solicitudBienEntidad = SolicitudBienEntidadHelper.toLevel1Entity(SolicitudBienEntidadDTO,\n null);\n em.persist(solicitudBienEntidad);\n }",
"public void registrar(JugadorXJugadorVO fila, DbConnection connection)\n\t\t\tthrows SQLException, ClassNotFoundException {\n\t\ttry {\n\t\t\tStatement statement = connection.getConnection().createStatement();\n\t\t\tstatement.executeUpdate(\"INSERT INTO jugadorxjugador VALUES ('\"\n\t\t\t\t\t+ fila.getId() + \"', '\" + fila.getId2() + \"')\");\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Se ha registrado Exitosamente\", \"Información\",\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\tstatement.close();\n//\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"No se pudo registrar al jugador\");\n\t\t}\n\t}",
"@RequestMapping(method=RequestMethod.POST, consumes=MediaType.APPLICATION_JSON_VALUE ,produces=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseEntity<Producto> registrar(@RequestBody Producto producto){\r\n\t\tdao.guardar(producto, producto.getId());\r\n\t\treturn new ResponseEntity<Producto>(producto, HttpStatus.OK);\r\n\t}",
"public void registrarReserva(Reserva reserva) throws Exception {\n\n\t\tDAOReserva dao= new DAOReserva();\n\n\t\ttry {\n\t\t\tthis.conn= darConexion();\n\t\t\tdao.setConn(conn);\n\t\t\tconn.commit();\n\t\t\tdao.registrarReserva(reserva);\n\t\t}catch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tconn.rollback();\n\t\t\tthrow sqlException;\n\t\t}catch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tconn.rollback();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t}",
"public void registrarProyecto(Proyecto proyecto) {\r\n\t\tproyectoServ.validarRegistro(proyecto);\r\n\t}",
"private void subirDispositivo(){\n DatabaseReference subir_data = db_reference.child(\"Dispositivo\");\n Map<String, String> dataDispositivo = new HashMap<String, String>();\n dataDispositivo.put(\"Evento\", etNombreCurso.getText().toString());\n dataDispositivo.put(\"Latitud1\", disp_Lat1);\n dataDispositivo.put(\"Longitud1\", disp_Long1);\n dataDispositivo.put(\"Latitud2\", disp_Lat2);\n dataDispositivo.put(\"Longitud2\", disp_Long2);\n subir_data.push().setValue(dataDispositivo);\n }",
"Boolean agregar(String userName, Long idProducto);",
"private void caricaRegistrazione() {\n\t\tfor(MovimentoEP movimentoEP : primaNota.getListaMovimentiEP()){\n\t\t\t\n\t\t\tif(movimentoEP.getRegistrazioneMovFin() == null) { //caso di prime note libere.\n\t\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"La prima nota non e' associata ad una registrazione.\"));\n\t\t\t}\n\t\t\t\n\t\t\tthis.registrazioneMovFinDiPartenza = registrazioneMovFinDad.findRegistrazioneMovFinById(movimentoEP.getRegistrazioneMovFin().getUid());\n\t\t\t\n\t\t}\n\t\t\n\t\tif(this.registrazioneMovFinDiPartenza.getMovimento() == null){\n\t\t\tthrow new BusinessException(\"Movimento non caricato.\");\n\t\t}\n\t\t\n\t}",
"private void registrarResidencia(Residencias residencia) {\n\t\t\t\t\t\t\t\t\n\t\tResidenciasobservaciones observacion = residencia.getResidenciasobservaciones();\t\n\t\t\t\t\n\t\tif(observacion==null) {\t\t\t\n\t\t\thibernateController.insertResidencia(residencia);\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\thibernateController.insertResidenciaObservacion(residencia, observacion);\t\t\n\t\t}\n\t\t\n\t\tupdateContent();\t\n\t\t\n\t}",
"public void registrar() {\n try {\r\n do {\r\n //totalUsuarios = this.registraUnUsuario(totalUsuarios);\r\n this.registraUnUsuario();\r\n } while (!this.salir());\r\n } catch (IOException e) {\r\n flujoSalida.println(\"Error de entrada/salida, finalizará la aplicación.\");\r\n }\r\n flujoSalida.println(\"Total usuarios registrados: \"+totalUsuarios);\r\n }",
"public abstract List<Subproducto> listarSubproducto(EntityManager sesion, Subproducto subproducto);",
"private DocumentoProcesoDTO registrarDocumentoSolicitudBien(EnumTipoDocumentoGenerado tipoDocGenerado,\n TrazabilidadProcesoDTO traza, OficioBienDTO oficioBienDTO, EnumTipoDocumentoProceso tipoDocProceso,\n String responsableGeneracion) throws CirculemosAlertaException {\n // Genera documento\n GeneraDocumentoDTO generaDocumento = new GeneraDocumentoDTO();\n generaDocumento.setFechaGeneracion(oficioBienDTO.getFechaGeneracion());\n generaDocumento.setIdTipoDocumentoGenerado(tipoDocGenerado);\n Object[] valoresParametros = { oficioBienDTO.getId() };\n generaDocumento.setValoresParametros(valoresParametros);\n Long idDocumento = iRDocumentosCirculemos.generarDocumento(generaDocumento);\n\n // Guarda el documento generado\n DocumentoProcesoDTO documentoProceso = new DocumentoProcesoDTO();\n documentoProceso.setNumeroDocumento(idDocumento);\n documentoProceso.setTrazabilidadProceso(traza);\n TipoDocumentoProcesoDTO tipoDocumento = new TipoDocumentoProcesoDTO();\n tipoDocumento.setId(tipoDocProceso.getValue());\n documentoProceso.setTipoDocumento(tipoDocumento);\n // Responsable de la generacion de los documentos\n documentoProceso.setResponsableGeneracion(responsableGeneracion);\n documentoProceso = iRFachadaProceso.registrarDocumento(documentoProceso);\n return documentoProceso;\n }",
"@Override\n\tpublic RegistroHuellasDigitalesDto registrarHuellaDigitalSistemaContribuyente(RegistroHuellasDigitalesDto pSolicitud) {\n\t\tLOG.info(\"Ingresando registrarHuellaDigitalSistemaContribuyente\"+pSolicitud.getCrc()+\" \"+pSolicitud.getArchivo()+ \" \");\n\t\tRegistroHuellasDigitalesDto vRespuesta = new RegistroHuellasDigitalesDto();\n\t\tvRespuesta.setOk(false);\n\t\ttry {\t\t\t\t\n\t\t\tValRegistroHuellaServiceImpl vValRegistroArchivo = new ValRegistroHuellaServiceImpl(mensajesDomain);\n\t\t\tvValRegistroArchivo.validarSolicitudRegistroHuellaDigital(pSolicitud);\t\n\t\t\tif (vValRegistroArchivo.isValido()) {\t\t\t\n\t\t\t\tSreArchivosTmp vResultadoArchivo = iArchivoTmpDomain.registrarArchivos(pSolicitud.getArchivo());\n\t\t\t\tSystem.out.println(\"Archivo registrado\"+vResultadoArchivo.getArchivoId());\n\t\t\t\tif (vResultadoArchivo.getArchivoId() !=null && vResultadoArchivo.getArchivoId() != null) {\n\t\t\t\t\tSreComponentesArchivosTmp vResultadoComponenteArchivo = iComponentesArchivosTmpDomain.registrarComponentesArchivos(pSolicitud.getUsuarioId(),vResultadoArchivo.getArchivoId(), pSolicitud.getMd5(),pSolicitud.getSha2(), pSolicitud.getCrc(),pSolicitud.getRutaArchivo(),pSolicitud.getNombre(),\"\");\n\t\t\t\t\tSystem.out.println(\"Datos recuperados \"+vResultadoComponenteArchivo.getComponenteArchivoTmpId());\n\t\t\t\tif (vResultadoComponenteArchivo.getComponenteArchivoTmpId() > 0 && vResultadoComponenteArchivo.getComponenteArchivoTmpId() != null) {\t\t\t\t\t\t\n\t\t\t\t\tboolean vResultadoCertificado = iComponentesCertificadosTmpDomain.registrarComponentesCertificados(pSolicitud.getTipoComponenteId(), vResultadoComponenteArchivo.getComponenteArchivoTmpId(), pSolicitud.getUsuarioId(),pSolicitud.getSistemaId());\n\t\t\t\t\tif (vResultadoCertificado) {\n\t\t\t\t\t\t\tLOG.info(\"Registro exitoso\");\n\t\t\t\t\t\t\tvRespuesta.setOk(true);\n\t\t\t\t\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.RECUPERACION_SOLICITUD_CERTIFICACION_EXITOSO));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tLOG.info(\"Registro NO exitoso\");\n\t\t\t\t\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.REGISTRO_SOLICITUD_CERTIFICACION_ERROR));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.REGISTRO_SOLICITUD_CERTIFICACION_ERROR));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.REGISTRO_SOLICITUD_CERTIFICACION_ERROR));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvRespuesta.setMensajes(vValRegistroArchivo.getMensajes());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogExcepcion.registrar(e, LOG, MethodSign.build(vRespuesta));\n\t\t\tLOG.info(\"Error al realizar el guardado de datos\");\n\t\t\tvRespuesta.addMensaje(mensajesDomain.getMensaje(EnumSubsistema.RECAUDACIONES,EnumFacturacionTipoMensaje.REGISTRO_SOLICITUD_CERTIFICACION_ERROR));\n\t\t}\n\t\tLOG.info(\"Saliendo registrarHuellaDigitalSistemaContribuyente vRespuesta={}\", vRespuesta);\n\t\treturn vRespuesta;\n\t}",
"public abstract Incidencia2 registrarIncidencia(Incidencia2 obj);",
"private static void registrarAuditoriaDetallesPresuTipoProyecto(Connexion connexion,PresuTipoProyecto presutipoproyecto)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getid_empresa().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getcodigo().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getnombre().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"public void agregarProducto(String producto){\n\t\tif (!this.existeProducto(producto)) {\n\t\t\tthis.compras.add(producto);\n\t\t}\n\t}",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"public static void registrarOperacionPrestamo(Usuario autor, long idPrestamo, Operacion operacion) throws DaoException {\r\n String msg = null;\r\n Prestamo prestamo = PrestamoDao.findPrestamoById(idPrestamo, null);\r\n Conexion con = null;\r\n try {\r\n HashMap<String, String> infoPrestamo;\r\n HashMap<String, Object> infoOperacion = new HashMap<String, Object>();\r\n infoOperacion.put(\"ID\", Consultas.darNumFilas(Operacion.NOMBRE_TABLA)+1);\r\n infoOperacion.put(\"FECHA\", Consultas.getCurrentDate());\r\n infoOperacion.put(\"TIPO\", operacion.getTipo());\r\n infoOperacion.put(\"ID_AUTOR\", autor.getId());\r\n\r\n \r\n con=new Conexion();\r\n switch (operacion.getTipo()) {\r\n case Operacion.PAGAR_CUOTA:\r\n PrestamoDao.registrarPagoCuota(prestamo,con);\r\n infoOperacion.put(\"MONTO\", prestamo.getValorCuota());\r\n infoOperacion.put(\"DESTINO\", \"0\");\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n \r\n break;\r\n case Operacion.PAGAR_CUOTA_EXTRAORDINARIA:\r\n \r\n //solo gasta lo necesario par apagar el prestamo\r\n if (operacion.getMonto()>prestamo.getCantidadRestante())\r\n {\r\n throw new DaoException(\"La cuota supera lo que debe\");\r\n }\r\n \r\n infoOperacion.put(\"MONTO\", operacion.getMonto());\r\n infoOperacion.put(\"DESTINO\",\"0\" );\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n PrestamoDao.registrarPagoCuotaExtraordinaria(prestamo,operacion,con);\r\n break;\r\n case Operacion.CERRAR:\r\n if (prestamo.getCantidadRestante() != 0) {\r\n throw new DaoException( \"El prestamo no se ha pagado completamente\");\r\n } else {\r\n \r\n Consultas.insertar(null, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n String sentenciaCerrar = \"UPDATE PRESTAMOS SET ESTADO='CERRADO' WHERE ID=\" + prestamo.getId();\r\n con.getConexion().prepareStatement(sentenciaCerrar).executeUpdate();\r\n \r\n }\r\n \r\n }\r\n \r\n Consultas.insertar(con, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(OperacionDao.class.getName()).log(Level.SEVERE, null, ex); \r\n con.rollback();\r\n throw new DaoException();\r\n }\r\n\r\n \r\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,GrupoBodega grupobodega,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(grupobodega.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(grupobodega.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!grupobodega.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(grupobodega.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, grupobodega.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////GrupoBodegaLogic.registrarAuditoriaDetallesGrupoBodega(connexion,grupobodega,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"private void ReservarCita(String horaini,String horafin)\n {\n progressDialog=new ProgressDialog(HorasCitasActivity.this);\n progressDialog.setTitle(\"Agregado horario\");\n progressDialog.setMessage(\"cargando...\");\n progressDialog.show();\n progressDialog.setCancelable(false);\n String key = referenceehoras.push().getKey();\n\n // para gaurar el nodo Citas\n // sadfsdfsdfsd1212sdss\n Horario objecita =new Horario(key,idespecialidad,horaini,horafin,nombreespecialidad );\n //HorarioAtencion\n // reference=FirebaseDatabase.getInstance().getReference(\"HorarioAtencion\");\n // referenceCitas= FirebaseDatabase.getInstance().getReference(\"CitasReservadas\").child(user_id);\n referenceehoras.child(key).setValue(objecita).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n Toast.makeText(HorasCitasActivity.this, \"Agregado\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(HorasCitasActivity.this, \"Error :\" +e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n });\n }",
"com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(CajaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,CajaDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(GrupoBodegaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,GrupoBodegaDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,PresuTipoProyecto presutipoproyecto,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(presutipoproyecto.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(presutipoproyecto.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!presutipoproyecto.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(presutipoproyecto.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PresuTipoProyectoDataAccess.TABLENAME, presutipoproyecto.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PresuTipoProyectoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PresuTipoProyectoLogic.registrarAuditoriaDetallesPresuTipoProyecto(connexion,presutipoproyecto,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public void registrarVenta(String fruta, String proteina, String grano, String almidon) {\n if(!this.sePuedePreparar(fruta, proteina, grano, almidon)) {\n throw new RuntimeException(\"Ingredientes insuficientes\");\n }\n \n Almuerzo almuerzo = new Almuerzo(this, fruta, proteina, grano, almidon);\n almuerzo.registrarVenta();\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,String sProcesoBusqueda,String sDetalleProcesoBusqueda,QueryWhereSelectParameters queryWhereSelectParameters,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tString sDetalleBusqueda=sDetalleProcesoBusqueda+Funciones.getDetalleBusqueda(queryWhereSelectParameters);\r\n\t\t\t\t\r\n\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoriaBusqueda(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, 0L, Constantes.SAUDITORIABUSCAR,sProcesoBusqueda,sUsuarioPC,sNamePC,sIPPC,new Date(),sDetalleBusqueda);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public String agregar(String trama) throws JsonProcessingException {\n\t\tString respuesta = \"\";\n\t\tRespuestaGeneralDto respuestaGeneral = new RespuestaGeneralDto();\n \t\tlogger.info(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n \t\t\t\t+ \", ProductoService.agregar trama entrante para agregar o actualizar producto: \" + trama);\n\t\ttry {\n\t\t\t/*\n\t\t\t * Se convierte el dato String a estructura json para ser manipulado en JAVA\n\t\t\t */\n\t\t\tJSONObject obj = new JSONObject(trama);\n\t\t\tProducto producto = new Producto();\n\t\t\t/*\n\t\t\t * use: es una bandera para identificar el tipo de solicitud a realizar:\n\t\t\t * use: 0 -> agregar un nuevo proudcto a la base de datos;\n\t\t\t * use: 1 -> actualizar un producto existente en la base de datos\n\t\t\t */\n\t\t\tString use = obj.getString(\"use\");\n\t\t\tif(use.equalsIgnoreCase(\"0\")) {\n\t\t\t\tString nombre = obj.getString(\"nombre\");\n\t\t\t\t/*\n\t\t\t\t * Se realiza una consulta por nombre a la base de datos a la tabla producto\n\t\t\t\t * para verificar que no existe un producto con el mismo nombre ingresado.\n\t\t\t\t */\n\t\t\t\tProducto productoBusqueda = productoDao.buscarPorNombre(nombre);\n\t\t\t\tif(productoBusqueda.getProductoId() == null) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Si no existe un producto con el mismo nombre pasa a crear el nuevo producto\n\t\t\t\t\t */\n\t\t\t\t\tproducto.setProductoNombre(nombre);\n\t\t\t\t\tproducto.setProductoCantidad(obj.getLong(\"cantidad\"));\n\t\t\t\t\tTipoProducto tipoProducto = tipoProductoDao.consultarPorId(obj.getLong(\"tipoProducto\"));\n\t\t\t\t\tproducto.setProductoTipoProducto(tipoProducto);\n\t\t\t\t\tproducto.setProductoPrecio(obj.getLong(\"precio\"));\n\t\t\t\t\tproducto.setProductoFechaRegistro(new Date());\n\t\t\t\t\tproductoDao.update(producto);\n\t\t\t\t\trespuestaGeneral.setTipoRespuesta(\"0\");\n\t\t\t\t\trespuestaGeneral.setRespuesta(\"Nuevo producto registrado con éxito.\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t\t */\n\t\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t\t}else {\n\t\t\t\t\t/*\n\t\t\t\t\t * Si existe un producto con el mismo nombre, se devolvera una excepcion,\n\t\t\t\t\t * para indicarle al cliente.\n\t\t\t\t\t */\n\t\t\t\t\trespuestaGeneral.setTipoRespuesta(\"1\");\n\t\t\t\t\trespuestaGeneral.setRespuesta(\"Ya existe un producto con el nombre ingresado.\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t\t */\n\t\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t/*\n\t\t\t\t * Se realiza una busqueda del producto registrado para actualizar\n\t\t\t\t * para implementar los datos que no van a ser reemplazados ni actualizados\n\t\t\t\t */\n\t\t\t\tProducto productoBuscar = productoDao.buscarPorId(obj.getLong(\"id\"));\n\t\t\t\tproducto.setProductoId(obj.getLong(\"id\"));\n\t\t\t\tproducto.setProductoNombre(obj.getString(\"nombre\"));\n\t\t\t\tproducto.setProductoCantidad(obj.getLong(\"cantidad\"));\n\t\t\t\tproducto.setProductoTipoProducto(productoBuscar.getProductoTipoProducto());\n\t\t\t\tproducto.setProductoPrecio(obj.getLong(\"precio\"));\n\t\t\t\tproducto.setProductoFechaRegistro(productoBuscar.getProductoFechaRegistro());\n\t\t\t\tproductoDao.update(producto);\n\t\t\t\trespuestaGeneral.setTipoRespuesta(\"0\");\n\t\t\t\trespuestaGeneral.setRespuesta(\"Producto actualizado con exito.\");\n\t\t\t\t/*\n\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t */\n\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t}\n\t\t\t/*\n\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t */\n\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t} catch (Exception e) {\n\t\t\t/*\n\t\t\t * En caso de un error, este se mostrara en los logs\n\t\t\t * Sera enviada la respuesta correspondiente al cliente.\n\t\t\t */\n\t\t\tlogger.error(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n\t\t\t\t\t+ \"ProductoService.agregar, \"\n\t\t\t\t\t+ \", descripcion: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\trespuestaGeneral.setTipoRespuesta(\"1\");\n\t\t\trespuestaGeneral.setRespuesta(\"Error al ingresar los datos, por favor intente mas tarde.\");\n\t\t\t/*\n\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t */\n\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t}\n \t\tlogger.info(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n \t\t\t\t+ \", ProductoService.agregar resultado de agregar/actualizar un producto: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"public Registrar_Producto() {\n this.setContentPane(fondo);\n initComponents();\n llenaArr();\n llenaCB();\n soloLetras(rp_tx_nombre);\n soloNumeros(rp_tx_cantidad);\n soloNumeros(rp_tx_precio);\n soloLetras(rp_tx_descripcion);\n }",
"public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }",
"public boolean añadirproducto(ProductoDTO c) {/* */\r\n try {\r\n\r\n try {\r\n try {\r\n PreparedStatement ps;\r\n ps = conn.getConn().prepareStatement(SQL_INSERT);\r\n ps.setInt(1, c.getId());\r\n ps.setString(2, c.getDescripcion());\r\n ps.setString(3, c.getFechaproducto());\r\n ps.setInt(4, c.getStock());\r\n ps.setInt(5, c.getPrecio());\r\n ps.setString(6, c.getNombre());\r\n ps.setString(7, c.getFechacaducidad());\r\n ps.setString(8, c.getFechaelaboracion());\r\n ps.setString(9, c.getNombrecategoria());\r\n\r\n if (ps.executeUpdate() > 0) {\r\n\r\n JOptionPane.showMessageDialog(null, \"Producto registrado correctamente\");\r\n return true;\r\n }\r\n } catch (MysqlDataTruncation ef) {\r\n JOptionPane.showMessageDialog(null, \"Formato de fecha debe ser MM/DD/AAAA\");\r\n }\r\n\r\n } catch (MySQLIntegrityConstraintViolationException e) {\r\n JOptionPane.showMessageDialog(null, \"codigo ya existe\");\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n JOptionPane.showMessageDialog(null, \"no se ha podido registrar\");\r\n return false;\r\n\r\n }",
"private static void registrarAuditoriaDetallesTarjetaCredito(Connexion connexion,TarjetaCredito tarjetacredito)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_empresa().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_sucursal().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_sucursal().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_sucursal().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDSUCURSAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_banco().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcodigo().equals(tarjetacredito.getTarjetaCreditoOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getnombre().equals(tarjetacredito.getTarjetaCreditoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getnombre_corto().equals(tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getnombre_corto();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getnombre_corto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getnombre_corto() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.NOMBRECORTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getdigito_valido().equals(tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getdigito_valido().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getdigito_valido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getdigito_valido().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.DIGITOVALIDO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getdigito_tarjeta().equals(tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getdigito_tarjeta().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getdigito_tarjeta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getdigito_tarjeta().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.DIGITOTARJETA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcomision().equals(tarjetacredito.getTarjetaCreditoOriginal().getcomision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcomision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcomision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcomision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcomision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.COMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getinteres().equals(tarjetacredito.getTarjetaCreditoOriginal().getinteres()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getinteres()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getinteres().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getinteres()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getinteres().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.INTERES,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getmonto_minimo().equals(tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getmonto_minimo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getmonto_minimo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getmonto_minimo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.MONTOMINIMO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getporcentaje_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getporcentaje_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getporcentaje_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getporcentaje_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.PORCENTAJERETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getcomision_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getcomision_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getcomision_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getcomision_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.COMISIONRETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_retencion_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_retencion_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_retencion_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_retencion_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESRETENCIONREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_pago_banco_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_pago_banco_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_pago_banco_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_pago_banco_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESPAGOBANCOREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getes_comision_redondeo().equals(tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getes_comision_redondeo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getes_comision_redondeo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getes_comision_redondeo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.ESCOMISIONREDONDEO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_tipo_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_tipo_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_tipo_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDTIPORETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_tipo_retencion_iva().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_tipo_retencion_iva().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_tipo_retencion_iva()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_tipo_retencion_iva().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDTIPORETENCIONIVA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable_comision().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_comision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable_comision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLECOMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_pago_banco().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_pago_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_pago_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_pago_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULAPAGOBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_cuenta_contable_diferencia().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_cuenta_contable_diferencia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_cuenta_contable_diferencia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_cuenta_contable_diferencia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDCUENTACONTABLEDIFERENCIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_retencion().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_retencion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_retencion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_retencion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULARETENCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(tarjetacredito.getIsNew()||!tarjetacredito.getid_formula_comision().equals(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=tarjetacredito.getTarjetaCreditoOriginal().getid_formula_comision().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(tarjetacredito.getid_formula_comision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=tarjetacredito.getid_formula_comision().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),TarjetaCreditoConstantesFunciones.IDFORMULACOMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();",
"@Override\n\tpublic void insertarServicio(Servicio nuevoServicio) {\n\t\tservicioDao= new ServicioDaoImpl();\n\t\tservicioDao.insertarServicio(nuevoServicio);\n\t\t\n\t\t\n\t}",
"private static void registrarAuditoriaDetallesValorPorUnidad(Connexion connexion,ValorPorUnidad valorporunidad)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_empresa().equals(valorporunidad.getValorPorUnidadOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_unidad().equals(valorporunidad.getValorPorUnidadOriginal().getid_unidad()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_unidad().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_unidad().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDUNIDAD,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getvalor().equals(valorporunidad.getValorPorUnidadOriginal().getvalor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getvalor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getvalor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.VALOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,TarjetaCredito tarjetacredito,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(tarjetacredito.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(tarjetacredito.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!tarjetacredito.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(tarjetacredito.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,TarjetaCreditoDataAccess.TABLENAME, tarjetacredito.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(TarjetaCreditoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////TarjetaCreditoLogic.registrarAuditoriaDetallesTarjetaCredito(connexion,tarjetacredito,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public RespuestaDTO registrarUsuario(Connection conexion, UsuarioDTO usuario) throws SQLException {\n PreparedStatement ps = null;\n ResultSet rs = null;\n int nRows = 0;\n StringBuilder cadSQL = null; //para crear el ddl \n RespuestaDTO registro = null;\n \n try {\n registro = new RespuestaDTO();\n System.out.println(\"usuario----\" + usuario.toStringJson());\n cadSQL = new StringBuilder();\n cadSQL.append(\" INSERT INTO usuario(usua_correo, usua_usuario,tius_id, usua_clave)\");\n cadSQL.append(\" VALUES (?, ?, ?, SHA2(?,256)) \");\n \n ps = conexion.prepareStatement(cadSQL.toString(), Statement.RETURN_GENERATED_KEYS);\n \n AsignaAtributoStatement.setString(1, usuario.getCorreo(), ps);// se envian los datos a los ?, el orden importa mucho\n AsignaAtributoStatement.setString(2, usuario.getUsuario(), ps);\n AsignaAtributoStatement.setString(3, usuario.getIdTipoUsuario(), ps);\n AsignaAtributoStatement.setString(4, usuario.getClave(), ps);\n \n nRows = ps.executeUpdate(); // ejecuta el proceso\n if (nRows > 0) { //nRows es el numero de filas que hubo de movimiento, es decir si hizo el registro, con este if se sabe\n rs = ps.getGeneratedKeys(); // esto se usa para capturar el id recien ingresado en caso de necesitarlo despues\n if (rs.next()) {\n registro.setRegistro(true);\n registro.setIdResgistrado(rs.getString(1)); // guardo el id en en este atributo del objeto\n\n }\n // cerramos los rs y ps\n ps.close();\n ps = null;\n rs.close();\n rs = null;\n }\n } catch (SQLException se) {\n LoggerMessage.getInstancia().loggerMessageException(se);\n return null;\n }\n return registro;\n }",
"protected void agregarUbicacion(){\n\n\n\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,PlantillaFactura plantillafactura,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(plantillafactura.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(plantillafactura.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!plantillafactura.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(plantillafactura.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,PlantillaFacturaDataAccess.TABLENAME, plantillafactura.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(PlantillaFacturaConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////PlantillaFacturaLogic.registrarAuditoriaDetallesPlantillaFactura(connexion,plantillafactura,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public void registraPart(Part part) throws RemoteException, PartRegistradaException;",
"@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"@Override\r\n\tpublic void guardarCambiosProducto(Producto producto) {\r\nconectar();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = miConexion.prepareStatement(ConstantesSql.GUARDAR_CAMBIOS_PRODUCTO);\r\n\t\t\tps.setString(1, producto.getNombre());\r\n\t\t\tps.setString(2, producto.getCantidad());;\r\n\t\t\tps.setString(3, producto.getPrecio());\r\n\t\t\tps.setString(6, producto.getOferta());\r\n\t\t\tps.setString(4, producto.getFechaCad());\r\n\t\t\tps.setString(5, producto.getProveedor());\r\n\t\t\tps.setString(7, producto.getComentario());\r\n\t\t\tps.setInt(8, producto.getId());\r\n\t\t\tps.execute();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error sql guardar producto\");\r\n\t\t}\r\n\t\t\r\n\t\tdesconectar();\r\n\t}",
"public void addServicio(String nombre_servicio, List<String> parametros){\n\t\t\n\t\tboolean exists = false;\n\t\t//Se comprueba si ya estaba registrado dicho servicio\n\t\tfor(InfoServicio is: infoServicios){\n\t\t\tif(is.getNombre_servicio().equalsIgnoreCase(\"nombre_servicio\")){\n\t\t\t\texists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!exists){\n\t\t\t//Es un servicio nuevo, se registra.\n\t\t\tInfoServicio is = new InfoServicio(nombre_servicio,parametros);\n\t\t\tinfoServicios.add(is);\n\t\t}\n\t\telse{\n\t\t\t//Servicio ya registrado, no se hace nada.\n\t\t\tSystem.err.println(\"ERROR: Servicio \" + nombre_servicio + \" ya registrado para \" + this.getNombre_servidor());\n\t\t}\n\t\t\n\t}",
"void addSubDevice(PhysicalDevice subDevice, String id);",
"public void guardarProductosEnVenta() {\n try {\n //Si hay datos los guardamos...\n \n /****** Serialización de los objetos ******/\n //Serialización de las productosEnVenta\n FileOutputStream archivo = new FileOutputStream(\"productosVentaCliente\"+this.getCorreo()+\".dat\");\n ObjectOutputStream guardar= new ObjectOutputStream(archivo);\n //guardamos el array de productosEnVenta\n guardar.writeObject(productosEnVenta);\n archivo.close();\n \n\n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }",
"private static void registrarAuditoriaDetallesPlantillaFactura(Connexion connexion,PlantillaFactura plantillafactura)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_empresa().equals(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getcodigo().equals(plantillafactura.getPlantillaFacturaOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getnombre().equals(plantillafactura.getPlantillaFacturaOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getdescripcion().equals(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getdescripcion();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getdescripcion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.DESCRIPCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getes_proveedor().equals(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getes_proveedor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getes_proveedor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.ESPROVEEDOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_aplicada().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_aplicada().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEAPLICADA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOSERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTEBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTESERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVABIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVASERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_gasto().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_gasto().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEGASTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"private static void registrarAuditoriaDetallesGrupoBodega(Connexion connexion,GrupoBodega grupobodega)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_empresa().equals(grupobodega.getGrupoBodegaOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getcodigo().equals(grupobodega.getGrupoBodegaOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getnombre().equals(grupobodega.getGrupoBodegaOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getruc().equals(grupobodega.getGrupoBodegaOriginal().getruc()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getruc()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getruc();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getruc()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getruc() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.RUC,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getdireccion().equals(grupobodega.getGrupoBodegaOriginal().getdireccion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getdireccion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getdireccion();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getdireccion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getdireccion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.DIRECCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.gettelefono().equals(grupobodega.getGrupoBodegaOriginal().gettelefono()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().gettelefono()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().gettelefono();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.gettelefono()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.gettelefono() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.TELEFONO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_pais().equals(grupobodega.getGrupoBodegaOriginal().getid_pais()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_pais().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_pais().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDPAIS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_ciudad().equals(grupobodega.getGrupoBodegaOriginal().getid_ciudad()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_ciudad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_ciudad().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_ciudad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_ciudad().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCIUDAD,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_centro_costo().equals(grupobodega.getGrupoBodegaOriginal().getid_centro_costo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_centro_costo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_centro_costo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_centro_costo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_centro_costo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCENTROCOSTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_empleado().equals(grupobodega.getGrupoBodegaOriginal().getid_empleado()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_empleado()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_empleado().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_empleado()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_empleado().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDEMPLEADO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getdescripcion().equals(grupobodega.getGrupoBodegaOriginal().getdescripcion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getdescripcion();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getdescripcion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.DESCRIPCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_inventario().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_inventario()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_inventario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_inventario().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_inventario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_inventario().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEINVENTARIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_costo().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_costo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_costo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLECOSTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_venta().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_venta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_venta().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_venta().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEVENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_descuento().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_descuento()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_descuento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_descuento().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_descuento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_descuento().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEDESCUENTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_devolucion().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_devolucion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_devolucion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_devolucion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_devolucion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_devolucion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEDEVOLUCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_debito().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_debito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_debito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_debito().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_debito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_debito().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEDEBITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_credito().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_credito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_credito().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_credito().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLECREDITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_produccion().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_produccion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_produccion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_produccion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_produccion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_produccion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEPRODUCCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_bonifica().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_bonifica()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_bonifica()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_bonifica().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_bonifica()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_bonifica().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLEBONIFICA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(grupobodega.getIsNew()||!grupobodega.getid_cuenta_contable_costo_bonifica().equals(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo_bonifica()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo_bonifica()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=grupobodega.getGrupoBodegaOriginal().getid_cuenta_contable_costo_bonifica().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(grupobodega.getid_cuenta_contable_costo_bonifica()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=grupobodega.getid_cuenta_contable_costo_bonifica().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),GrupoBodegaConstantesFunciones.IDCUENTACONTABLECOSTOBONIFICA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"public void salvarProdutos(Produto produto){\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,ValorPorUnidad valorporunidad,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(valorporunidad.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(valorporunidad.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!valorporunidad.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(valorporunidad.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ValorPorUnidadDataAccess.TABLENAME, valorporunidad.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ValorPorUnidadConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ValorPorUnidadLogic.registrarAuditoriaDetallesValorPorUnidad(connexion,valorporunidad,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public abstract void eliminarSubproducto(EntityManager sesion, Subproducto subproducto);",
"private static void registrarAuditoriaDetallesClienteArchivo(Connexion connexion,ClienteArchivo clientearchivo)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(clientearchivo.getIsNew()||!clientearchivo.getid_cliente().equals(clientearchivo.getClienteArchivoOriginal().getid_cliente()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(clientearchivo.getClienteArchivoOriginal().getid_cliente()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=clientearchivo.getClienteArchivoOriginal().getid_cliente().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(clientearchivo.getid_cliente()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=clientearchivo.getid_cliente().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ClienteArchivoConstantesFunciones.IDCLIENTE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(clientearchivo.getIsNew()||!clientearchivo.getid_tipo_archivo().equals(clientearchivo.getClienteArchivoOriginal().getid_tipo_archivo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(clientearchivo.getClienteArchivoOriginal().getid_tipo_archivo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=clientearchivo.getClienteArchivoOriginal().getid_tipo_archivo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(clientearchivo.getid_tipo_archivo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=clientearchivo.getid_tipo_archivo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ClienteArchivoConstantesFunciones.IDTIPOARCHIVO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(clientearchivo.getIsNew()||!clientearchivo.getnombre().equals(clientearchivo.getClienteArchivoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(clientearchivo.getClienteArchivoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=clientearchivo.getClienteArchivoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(clientearchivo.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=clientearchivo.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ClienteArchivoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(clientearchivo.getIsNew()||!clientearchivo.getarchivo().equals(clientearchivo.getClienteArchivoOriginal().getarchivo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(clientearchivo.getClienteArchivoOriginal().getarchivo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=clientearchivo.getClienteArchivoOriginal().getarchivo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(clientearchivo.getarchivo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=clientearchivo.getarchivo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ClienteArchivoConstantesFunciones.ARCHIVO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(clientearchivo.getIsNew()||!clientearchivo.getdescripcion().equals(clientearchivo.getClienteArchivoOriginal().getdescripcion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(clientearchivo.getClienteArchivoOriginal().getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=clientearchivo.getClienteArchivoOriginal().getdescripcion();\r\n\t\t\t\t}\r\n\t\t\t\tif(clientearchivo.getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=clientearchivo.getdescripcion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ClienteArchivoConstantesFunciones.DESCRIPCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"private void agregarProducto(HttpServletRequest request, HttpServletResponse response) throws SQLException {\n\t\tString codArticulo = request.getParameter(\"CArt\");\n\t\tString seccion = request.getParameter(\"seccion\");\n\t\tString nombreArticulo = request.getParameter(\"NArt\");\n\t\tSimpleDateFormat formatoFecha = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate fecha = null;\n\t\ttry {\n\t\t\tfecha = formatoFecha.parse(request.getParameter(\"fecha\"));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdouble precio = Double.parseDouble(request.getParameter(\"precio\"));\n\t\tString importado = request.getParameter(\"importado\");\n\t\tString paisOrigen = request.getParameter(\"POrig\");\n\t\t// Crear un objeto del tipo producto\n\t\tProducto producto = new Producto(codArticulo, seccion, nombreArticulo, precio, fecha, importado, paisOrigen);\n\t\t// Enviar el objeto al modelo e insertar el objeto producto en la BBDD\n\t\tmodeloProductos.agregarProducto(producto);\n\t\t// Volver al listado de productos\n\t\tobtenerProductos(request, response);\n\n\t}",
"@Override\n public void subirArchivo(ArchivoPOJO arch, int claveExp) throws Exception{\n Connection con = null;\n String sql = \"INSERT INTO Archivo VALUES (NULL,?,?,?,?);\";\n PreparedStatement ps = null;\n ConexionDB cc = new ConexionDB();\n try {\n con = cc.conectarMySQL();\n //stm = con.createStatement();\n ps = con.prepareStatement(sql);\n ps.setBytes(1, arch.getArchivo());\n ps.setInt(2, claveExp);\n ps.setString(3, arch.getTitulo());\n ps.setString(4, arch.getFechaEntrega().toString());\n ps.executeUpdate();\n } catch (SQLException e) {\n throw new Exception(\"Error en Clase ArchivoDAO, metodo \"\n + \"subirArchivo: \" + e.getMessage());\n }finally{\n try { if (ps != null) ps.close(); } catch (Exception e) {};\n try { if (con!= null) con.close(); } catch (Exception e) {};\n }\n }",
"public void agregar(Provincia provincia) throws BusinessErrorHelper;",
"private void registrarDetallesVenta() {\r\n\t\tdetalleEJB.registrarDetalleVenta(productosCompra, factura);\r\n\r\n\t\ttry {\r\n\r\n\t\t\taccion = \"Crear DetalleVenta\";\r\n\t\t\tString browserDetail = Faces.getRequest().getHeader(\"User-Agent\");\r\n\t\t\tauditoriaEJB.crearAuditoria(\"AuditoriaDetalleVenta\", accion, \"DT creada: \" + factura.getId(),\r\n\t\t\t\t\tsesion.getUser().getCedula(), browserDetail);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"@Override\n public void agregarSocio(String nombre, int dni, int codSocio) {\n }",
"public static Consumo insertConsumo(int cantidad_consumo,Date fecha_inicio,\n Producto producto,Servicio servicio){\n Consumo miConsumo = new Consumo(cantidad_consumo,fecha_inicio, \n producto, servicio);\n miConsumo.registrarConsumo();\n return miConsumo;\n }",
"public static Servicio insertServicio(String nombre_servicio,\n String descripcion_servicio, \n String nombre_tipo_servicio){\n \n /*Se definen valores para servicio y se agrega a la base de datos*/\n Servicio miServicio = new Servicio(nombre_servicio, \n descripcion_servicio,\n nombre_tipo_servicio);\n try {\n miServicio.registrarServicio();\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return miServicio;\n }",
"public static void registrarOrden(java.sql.Connection conexion, ArrayList<String> datos, String orden, InputStream archivo){\n try {\n PreparedStatement dp = crearDeclaracionPreparada(conexion, datos, orden); \n dp.setBlob(datos.size() + 1, archivo);\n dp.executeUpdate();\n //Ejecutamos la orden de tipo Query creada a partir de la orden y datos dados\n if(conexion.isClosed() == false)//si la conexion está abierta la cerramos\n conexion.close();\n } catch (SQLException ex) {\n System.out.println(\"\\n\\n\\n\"+ex); //Imprimimos el error en consola en caso de fallar \n } \n }",
"public void insert(Service servico){\n Database.servico.add(servico);\n }",
"public void registrarCompraIngrediente(String nombre, int cantidad, int precioCompra, int tipo) {\n //Complete\n }",
"private void registrarRecibo_() throws Exception {\t\n\t\t\n\t\tif (CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6()) != null) {\n\t\t\tString msg = \"CAJA BLOQUEADA POR USUARIO: \" + CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6());\n\t\t\tClients.showNotification(msg, Clients.NOTIFICATION_TYPE_ERROR, null, null, 0);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthis.nvoRecibo.setPos1(\"\");\n\t\tthis.nvoRecibo.setPos2(new Date());\n\t\tWindowPopup wp = new WindowPopup();\n\t\twp.setDato(this);\n\t\twp.setModo(WindowPopup.NUEVO);\n\t\twp.setHigth(\"300px\");\n\t\twp.setWidth(\"400px\");\n\t\twp.setCheckAC(new ValidadorRegistrarRecibo());\n\t\twp.setTitulo(\"Registrar Recibo de Pago\");\n\t\twp.show(ZUL_REGISTRAR_RECIBO);\n\t\tif (wp.isClickAceptar()) {\n\t\t\t\n\t\t\tif (CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6()) != null) {\n\t\t\t\tString msg = \"CAJA BLOQUEADA POR USUARIO: \" + CajaUtil.CAJAS_ABIERTAS.get(this.selectedItem.getPos6());\n\t\t\t\tClients.showNotification(msg, Clients.NOTIFICATION_TYPE_ERROR, null, null, 0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tString numeroRecibo = ((String) this.nvoRecibo.getPos1()).toUpperCase();\n\t\t\tDate fechaRecibo = (Date) this.nvoRecibo.getPos2();\n\t\t\tlong idOrdenPago = this.selectedItem.getId();\n\t\t\tString user = this.getLoginNombre();\n\t\t\tAssemblerRecibo.registrarReciboPago(numeroRecibo, fechaRecibo, idOrdenPago, user, false, false);\t\t\t\n\t\t\tthis.selectedItem = null;\n\t\t\tthis.mensajePopupTemporal(\"Recibo Registrado..\", 5000);\n\t\t}\t\n\t}",
"public void crearProductoSucursal(BProducto bProducto,\r\n\t\t\tBSucursal bSucursal, Connection conn, BUsuario usuario) throws SQLException {\n\t\tPreparedStatement pstm;\r\n\t\t\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"INSERT \\n\");\r\n\t\tsql.append(\"INTO fidelizacion.producto_sucursal \\n\");\r\n\t\tsql.append(\" ( \\n\");\r\n\t\tsql.append(\" sucursal_id , \\n\");\r\n\t\tsql.append(\" producto_id , \\n\");\r\n\t\tsql.append(\" stock , \\n\");\r\n\t\tsql.append(\" usuario_modificacion, \\n\");\r\n\t\tsql.append(\" fecha_creacion , \\n\");\r\n\t\tsql.append(\" fecha_modificacion , \\n\");\r\n\t\tsql.append(\" estado , \\n\");\r\n\t\tsql.append(\" usuario_creacion \\n\");\r\n\t\tsql.append(\" ) \\n\");\r\n\t\tsql.append(\" VALUES \\n\");\r\n\t\tsql.append(\" ( \\n\");\r\n\t\tsql.append(\" ? , \\n\");\r\n\t\tsql.append(\" ? , \\n\");\r\n\t\tsql.append(\" 0 , \\n\");\r\n\t\tsql.append(\" NULL , \\n\");\r\n\t\tsql.append(\" SYSDATE, \\n\");\r\n\t\tsql.append(\" NULL , \\n\");\r\n\t\tsql.append(\" 1 , \\n\");\r\n\t\tsql.append(\" ? \\n\");\r\n\t\tsql.append(\" )\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\tpstm.setInt(1,bSucursal.getCodigo());\r\n\t\tpstm.setInt(2,bProducto.getCodigo());\r\n\t\tpstm.setInt(3,usuario.getCodigo());\r\n\t\t\r\n\t\tpstm.executeUpdate();\r\n\t\r\n\t\tpstm.close();\r\n\t}",
"public GrupoProducto adicionar(GrupoProducto grupoProducto){\r\n grupoProducto.setId(listaGrupoProductos.size()+1);\r\n listaGrupoProductos.add(grupoProducto);\r\n return grupoProducto;\r\n }",
"@Override\n\tpublic void entregarProductos(AgenteSaab a, Oferta o) {\n\t\t\n\t}",
"public void setSubcodigo(java.lang.String subcodigo) {\n this.subcodigo = subcodigo;\n }",
"public void registrarPreguntaRespuesta() throws SolrServerException, IOException{\n \tregistrarBaseDatosRedis(); //Registra en la base de datos.\n \tregistrarEnWatson(); // Entrena el servicio de watson.\n }",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,DatoGeneralEmpleado datogeneralempleado,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(datogeneralempleado.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(datogeneralempleado.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!datogeneralempleado.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(datogeneralempleado.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,DatoGeneralEmpleadoDataAccess.TABLENAME, datogeneralempleado.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(DatoGeneralEmpleadoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////DatoGeneralEmpleadoLogic.registrarAuditoriaDetallesDatoGeneralEmpleado(connexion,datogeneralempleado,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"public static void registrarAuditoria(Connexion connexion,Long idUsuario,ClienteArchivo clientearchivo,String sUsuarioPC,String sNamePC,String sIPPC)throws Exception {\n\t\t\r\n\t\ttry {\r\n\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIA) {\r\n\t\t\t\tif(clientearchivo.getIsNew()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAINSERTAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(clientearchivo.getIsDeleted()) {\r\n\t\t\t\t\t/*if(!clientearchivo.getIsExpired()) {\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.RegistrarNuevaAuditoria(Constantes.getLOidSistemaActual(),idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.getSAuditoriaEliminarLogicamente(),\"\",sUsuarioPC,sNamePC,sIPPC,Timestamp.valueOf(Funciones.getStringMySqlCurrentDateTime()),\"\");\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t} else {*/\r\n\t\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAELIMINARFISICAMENTE,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t//}\r\n\t\t\t\t} else if(clientearchivo.getIsChanged()) {\r\n\t\t\t\t\t////auditoriaLogicAdditional.registrarNuevaAuditoria(Constantes.LIDSISTEMAACTUAL,idUsuario,ClienteArchivoDataAccess.TABLENAME, clientearchivo.getId(), Constantes.SAUDITORIAACTUALIZAR,\"\",sUsuarioPC,sNamePC,sIPPC,new Date(),\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(ClienteArchivoConstantesFunciones.ISCONAUDITORIADETALLE) {\r\n\t\t\t\t\t\t////ClienteArchivoLogic.registrarAuditoriaDetallesClienteArchivo(connexion,clientearchivo,auditoriaLogicAdditional.getAuditoria());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t\t\r\n\t}",
"private void agregarARegistro(int numeroCuenta){\n try{\n RegistroSerializado registro = new RegistroSerializado(\n numeroCuenta, \"Hay un registro de transacciones no asociado para ese numero de cliente...\");\n salRegistro.writeObject(registro);\n }\n catch(NoSuchElementException noSuchElementException){\n System.err.println(\"Entrada invalida. Intente de nuevo.\");\n }\n catch(IOException iOException){\n System.err.println(\"Error al escribir en el archivo. Terminado.\");\n System.exit(1);\n }\n }",
"@Override\n @Transactional\n public Producto save(Producto producto) {\n Presentacion presentacion = presentacionDao.findById(producto.getPresentacion().getId());\n producto.setPresentacion(presentacion);\n return productoDao.save(producto);\n }",
"@Override\n\t@Transactional\n\tpublic void registrarClientes(Cliente cliente) {\n\t\tclienteDao.registrarClientes(cliente);\n\t}",
"public void domicilioAgregar() {\r\n\t\tlog.info(\"Domicilio agregar \" + nuevoDomici.getDomicilio());\r\n\t\tboolean verifica = false;\r\n\t\tmensaje = null;\r\n\t\tnuevoDomici.setTbTipoCasa(objTipoCasaService.findTipoCasa(Tipocasanuevo));\r\n\t\tnuevoDomici.setDomicilio(domicilio);\r\n\t\tnuevoDomici.setReferencia(referencia);\r\n\t\tnuevoDomici.setTbUbigeo(objUbigeoService.findUbigeo(idUbigeo));\r\n\t\tlog.info(\"TIPO-CASA-NUEVO--->\"+nuevoDomici.getTbTipoCasa().getIdtipocasa());\r\n\t\tnuevoDomici.setNuevoD(1);\r\n\t\t//aqui ponfo el ID-Domicilio a la lista Domicilio temporalmente.\r\n\t\tnuevoDomici.setIddomiciliopersona(0);\r\n\t\tnuevoDomici.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(15));\r\n\t\t\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \"+ DomicilioPersonaList.get(i).getDomicilio() + \" \" + nuevoDomici.getDomicilio());\r\n\t\t\tif (DomicilioPersonaList.get(i).getDomicilio().equals(nuevoDomici.getDomicilio())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el Domicilio ya se encuentra registrado en la lista de domiclio cliente\";\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (DomicilioPersonaList.size() == 0) {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\tnuevoDomici.setItem(\"Por Agregar\");\r\n\t\t\t\tDomicilioPersonaList.add(nuevoDomici);\r\n\t\t\t\tlog.info(\"se agrego \"+ nuevoDomici.getDomicilio());\r\n\t\t\t\t}\r\n\t\t\tif (mensaje != null) {\r\n\t\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t\t}\r\n\t\t\tnuevoDomici = new DomicilioPersonaSie();\r\n\t\t}",
"public void salvar() throws Exception {\n if(stb == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n // Restrição provisória para aumentar a performance do programa\n if(stb.getIdSubTipoBanca() != -1)\n return;\n\n // Primeiro verifica se existe o subtipo de banca\n Transacao.consultar(\"SELECT idSubTipoBanca FROM subTipoBanca WHERE nome LIKE '\"+ stb.getNome() +\"'\");\n if(Transacao.getRs().first())\n stb.setIdSubTipoBanca(Transacao.getRs().getInt(\"idSubTipoBanca\"));\n\n String sql = \"\";\n\n if(stb.getIdSubTipoBanca() == -1)\n sql = \"INSERT INTO subTipoBanca VALUES(null, '\"+ stb.getNome() +\"')\";\n else\n sql = \"UPDATE subTipoBanca SET nome = '\"+ stb.getNome() +\"' WHERE idSubTipoBanca = \" + stb.getIdSubTipoBanca();\n\n \n Transacao.executar(sql);\n \n // Se foi uma inserção, deve trazer o id do subtipo para o objeto\n if(stb.getIdSubTipoBanca() == -1){\n Transacao.consultar(\"SELECT LAST_INSERT_ID() AS ultimo_id\");\n if(Transacao.getRs().first())\n stb.setIdSubTipoBanca(Transacao.getRs().getInt(\"ultimo_id\"));\n }\n }",
"public void insertar(Proceso p) {\n\t\tif (p == null) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.tllegada = p.tllegada;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.rrejecutada = p.rrejecutada;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\t\tint tamaņo = p.id.length();\n\t\tif (tamaņo == 1) {\n\t\t\tnuevo.id = p.id + \"1\";\n\t\t} else {\n\t\t\tchar id = p.id.charAt(0);\n\t\t\tint numeroId = Integer.parseInt(String.valueOf(p.id.charAt(1))) + 1;\n\t\t\tnuevo.id = String.valueOf(id) + String.valueOf(numeroId);\n\t\t}\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}",
"@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}",
"private void registrarAnexoExcepcion(RegistroRadicarExcepcionDTO registroRadicarExcepcionDTO)\n throws CirculemosAlertaException {\n logger.debug(\"CoactivoEJB.registrarAnexoExcepcion(RegistroRadicarExcepcionDTO)\");\n // Calculo de ruta: anno/mes/proceso\n String ruta = \"c2/anexosExcepcion/\" + Calendar.getInstance().get(Calendar.YEAR) + \"/\"\n + Calendar.getInstance().get(Calendar.MONTH) + \"/Proceso-\"\n + registroRadicarExcepcionDTO.getRadicarExcepcionDTO().getCoactivoDTO().getProceso().getId();\n\n for (RegistroArchivoExcepcionDTO registroArchivoExcepcionDTO : registroRadicarExcepcionDTO\n .getRegistroArchivoExcepcionDTOs()) {\n ArchivoExcepcion archivoExcepcion = new ArchivoExcepcion();\n archivoExcepcion.setFechaRegistro(Calendar.getInstance().getTime());\n archivoExcepcion.setNombreArchivo(registroArchivoExcepcionDTO.getArchivoTransportableDTO().getNombre());\n archivoExcepcion.setFalloExcepcion(registroArchivoExcepcionDTO.isFalloExcepcion());\n\n registroArchivoExcepcionDTO.getArchivoTransportableDTO().setRuta(ruta);\n OpcionGestorFileSystem ogfs = new OpcionGestorFileSystem();\n ogfs.setUbicacion(ruta);\n\n archivoExcepcion.setNumeroArchivo(irRepositorioArchivo.registrarDocumento(null,\n registroArchivoExcepcionDTO.getArchivoTransportableDTO(), ogfs));\n\n RadicarExcepcion radicarExcepcion = new RadicarExcepcion();\n radicarExcepcion.setIdRadicarExcepcion(\n registroRadicarExcepcionDTO.getRadicarExcepcionDTO().getIdRadicarExcepcion());\n archivoExcepcion.setRadicarExcepcion(radicarExcepcion);\n em.persist(archivoExcepcion);\n }\n\n }",
"@DirectMethod\r\n\tpublic String agregarNodosArbolIn(boolean bNvoHijo,//que si es nuevo hijo si dice false es padre\r\n\t\t\t\t\t\t\t\t\tString sRuta,//trae la clave de donde viene de la empresa raiz ala que se le metera el hijo\r\n\t\t\t\t\t\t\t\t\tint iIdEmpresaRaiz,//trae la clave de la empresa raiz ala que se le metera el hijo \r\n\t\t\t\t\t\t\t\t\tint iIdEmpresaHijo,//Id de la empresa \r\n\t\t\t\t\t\t\t\t\tdouble uMonto,//monto en flotante\r\n\t\t\t\t\t\t\t\t\tString nombreArbol,//trae un dato en blanco ''\r\n\t\t\t\t\t\t\t\t\t//String tipoValor,//trae el dato del combo tipodevalor \r\n\t\t\t\t\t\t\t\t\tint tipoOperacion,//treae el numero de la operacion\r\n\t\t\t\t\t\t\t\t\tint iIdEmpresaPadre){//trae el Id del padre ala que se insertara\r\n\r\n\t\t\r\n\t\t\r\n\r\n\t\tString sMsgUsuario = \"en nodos hojso angel\";\r\n\t\tif(!Utilerias.haveSession(WebContextManager.get()))\r\n\t\t\treturn sMsgUsuario;\r\n\t\ttry{\r\n\t\t\tBarridosFondeosService barridosFondeosService = (BarridosFondeosService) contexto.obtenerBean(\"barridosFondeosBusinessImpl\");\r\n\t\t\tsMsgUsuario = barridosFondeosService.agregarNodosArbolIn(bNvoHijo, sRuta, iIdEmpresaRaiz, \r\n\t\t\t\t\tiIdEmpresaHijo, uMonto, nombreArbol, tipoOperacion, iIdEmpresaPadre); \r\n\t\t}catch(Exception e){\r\n\t\t\tbitacora.insertarRegistro(new Date().toString() + \" \" + Bitacora.getStackTrace(e)\r\n\t\t\t\t\t+ \"P: BarridosFondeos C: BarridosFondeosAction M: agregarNodosArbolIn\");\r\n\t\t}return sMsgUsuario;\r\n\t}",
"@Transactional\r\n\r\n\t@Override\r\n\tpublic void insertar(Distrito distrito) {\n\t\tem.persist(distrito);\t\r\n\t}",
"public static void tambahPasienBaru(Pasien pasienBaru) {\r\n daftarPasien.add(pasienBaru);\r\n }",
"public void comprarProducto(Producto producto) throws Exception{\n try{\n if(this.productosEnVenta.contains(producto)){\n throw new suProducto();\n }\n producto.getVendedor().venderProducto(producto, this);\n producto.setComprador(this);\n this.productosComprados.add(producto);\n \n }catch(Exception e){\n throw e;\n } \n }",
"@Override\r\n\tpublic void salvar(Registro registro) {\n\t\t\r\n\t}",
"@Override\n public void agregarComentario(String pNumFinca, String pComentario) throws SQLException {\n Comentario comentario = new Comentario(pComentario, Integer.parseInt(pNumFinca));\n bdPropiedad.manipulationQuery(\"INSERT INTO COMENTARIO (ID_PROPIEDAD, COMENTARIO) VALUES (\" + \n comentario.getIdPropiedad() + \", '\" + comentario.getComentario() + \"')\");\n comentarios.add(comentario);\n }"
] | [
"0.6473067",
"0.64294624",
"0.6422371",
"0.6319224",
"0.63140106",
"0.63115835",
"0.6305015",
"0.62607867",
"0.6238294",
"0.6238294",
"0.6207064",
"0.6185826",
"0.6165606",
"0.6143596",
"0.60885936",
"0.5987958",
"0.5948233",
"0.5942524",
"0.59415406",
"0.59372663",
"0.5936212",
"0.5912222",
"0.5903732",
"0.5900156",
"0.58923346",
"0.5876371",
"0.5861747",
"0.5850019",
"0.5847995",
"0.5823229",
"0.5789603",
"0.57872176",
"0.5778089",
"0.5775411",
"0.5775071",
"0.57734674",
"0.57700396",
"0.57693934",
"0.57596457",
"0.5755877",
"0.57544196",
"0.57528824",
"0.57487386",
"0.57484126",
"0.574457",
"0.5739251",
"0.57361305",
"0.5721006",
"0.5720934",
"0.57188374",
"0.5717323",
"0.5715097",
"0.5707513",
"0.56929296",
"0.5688242",
"0.5676317",
"0.5672739",
"0.56676584",
"0.5666125",
"0.5660473",
"0.5647917",
"0.56468064",
"0.56456155",
"0.56367147",
"0.5633709",
"0.56222564",
"0.5615627",
"0.5609204",
"0.5608762",
"0.56040806",
"0.55961555",
"0.55897087",
"0.5588364",
"0.5557489",
"0.55549455",
"0.5553642",
"0.5538978",
"0.5536018",
"0.5528912",
"0.5527508",
"0.55269456",
"0.55267125",
"0.5520911",
"0.5508756",
"0.5507702",
"0.5506285",
"0.55044",
"0.54987496",
"0.54957825",
"0.548817",
"0.5484129",
"0.5474082",
"0.54685116",
"0.5463753",
"0.54613703",
"0.54611677",
"0.546003",
"0.54560655",
"0.54554826",
"0.545459"
] | 0.8132321 | 0 |
Actualiza un Subproducto en la base de datos | public abstract void actualizarSubproducto(EntityManager sesion, Subproducto subproducto); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void registrarSubproducto(EntityManager sesion, Subproducto subproducto);",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"public abstract List<Subproducto> listarSubproducto(EntityManager sesion, Subproducto subproducto);",
"private void actualizarSolicitudOficioBien(SolicitudOficioBienDTO solicitudOficioBienDTO) {\n em.merge(SolicitudOficioBienHelper.toLevel1Entity(solicitudOficioBienDTO, null));\n }",
"@Override\n public void subirArchivo(ArchivoPOJO arch, int claveExp) throws Exception{\n Connection con = null;\n String sql = \"INSERT INTO Archivo VALUES (NULL,?,?,?,?);\";\n PreparedStatement ps = null;\n ConexionDB cc = new ConexionDB();\n try {\n con = cc.conectarMySQL();\n //stm = con.createStatement();\n ps = con.prepareStatement(sql);\n ps.setBytes(1, arch.getArchivo());\n ps.setInt(2, claveExp);\n ps.setString(3, arch.getTitulo());\n ps.setString(4, arch.getFechaEntrega().toString());\n ps.executeUpdate();\n } catch (SQLException e) {\n throw new Exception(\"Error en Clase ArchivoDAO, metodo \"\n + \"subirArchivo: \" + e.getMessage());\n }finally{\n try { if (ps != null) ps.close(); } catch (Exception e) {};\n try { if (con!= null) con.close(); } catch (Exception e) {};\n }\n }",
"public abstract void eliminarSubproducto(EntityManager sesion, Subproducto subproducto);",
"@Override\r\n\tpublic void guardarCambiosProducto(Producto producto) {\r\nconectar();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = miConexion.prepareStatement(ConstantesSql.GUARDAR_CAMBIOS_PRODUCTO);\r\n\t\t\tps.setString(1, producto.getNombre());\r\n\t\t\tps.setString(2, producto.getCantidad());;\r\n\t\t\tps.setString(3, producto.getPrecio());\r\n\t\t\tps.setString(6, producto.getOferta());\r\n\t\t\tps.setString(4, producto.getFechaCad());\r\n\t\t\tps.setString(5, producto.getProveedor());\r\n\t\t\tps.setString(7, producto.getComentario());\r\n\t\t\tps.setInt(8, producto.getId());\r\n\t\t\tps.execute();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error sql guardar producto\");\r\n\t\t}\r\n\t\t\r\n\t\tdesconectar();\r\n\t}",
"@Override\n public void actualizarPropiedad(Propiedad nuevaPropiedad) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"UPDATE PROPIEDAD SET MODALIDAD = '\" + modalidad + \"', AREA_TERRENO \"\n + \"= \" + area + \", VALOR_METRO = \" + metro + \", VALOR_FISCAL = \"+ fiscal + \", PROVINCIA = '\" \n + provincia + \"', CANTON = '\" + canton + \"' , DISTRITO = '\" + distrito + \"', DIREXACTA = '\" \n + dirExacta + \"', ESTADO = '\" + estado + \"', PRECIO = \" + precio + \" WHERE ID_PROPIEDAD = \" \n + numFinca);\n bdPropiedad.manipulationQuery(\"DELETE FROM FOTOGRAFIA_PROPIEDAD WHERE ID_PROPIEDAD = \" + numFinca);\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void salvar() throws Exception {\n if(stb == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n // Restrição provisória para aumentar a performance do programa\n if(stb.getIdSubTipoBanca() != -1)\n return;\n\n // Primeiro verifica se existe o subtipo de banca\n Transacao.consultar(\"SELECT idSubTipoBanca FROM subTipoBanca WHERE nome LIKE '\"+ stb.getNome() +\"'\");\n if(Transacao.getRs().first())\n stb.setIdSubTipoBanca(Transacao.getRs().getInt(\"idSubTipoBanca\"));\n\n String sql = \"\";\n\n if(stb.getIdSubTipoBanca() == -1)\n sql = \"INSERT INTO subTipoBanca VALUES(null, '\"+ stb.getNome() +\"')\";\n else\n sql = \"UPDATE subTipoBanca SET nome = '\"+ stb.getNome() +\"' WHERE idSubTipoBanca = \" + stb.getIdSubTipoBanca();\n\n \n Transacao.executar(sql);\n \n // Se foi uma inserção, deve trazer o id do subtipo para o objeto\n if(stb.getIdSubTipoBanca() == -1){\n Transacao.consultar(\"SELECT LAST_INSERT_ID() AS ultimo_id\");\n if(Transacao.getRs().first())\n stb.setIdSubTipoBanca(Transacao.getRs().getInt(\"ultimo_id\"));\n }\n }",
"@Override\r\n\tpublic void atualizar(Tipo tipo) {\n String sql = \"update tipos_servicos set nome = ? \"\r\n + \"where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n \r\n stmt.setString(1, tipo.getNome());\r\n \r\n \r\n stmt.setInt(3, tipo.getId());\r\n \r\n stmt.executeUpdate();\r\n \r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}",
"@Override\n\tpublic void atualizar() {\n\t\t\n\t\t \n\t\t String idstring = id.getText();\n\t\t UUID idlong = UUID.fromString(idstring);\n\t\t \n\t\t PedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\tPedidoCompra.setId(idlong);\n\t\t\tPedidoCompra.setAtivo(true);\n//\t\t\tPedidoCompra.setNome(nome.getText());\n\t\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\t\tPedidoCompra.setSaldoinicial(saldoinicial.getText());\n\t\t\tPedidoCompra.setData(new Date());\n\t\t\tPedidoCompra.setIspago(false);\n\t\t\tPedidoCompra.setData_criacao(new Date());\n//\t\t\tPedidoCompra.setFornecedor(fornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\t\n\t\t\t\n\t\t\tgetservice().edit(PedidoCompra);\n\t\t\tupdateAlert(PedidoCompra);\n\t\t\tclearFields();\n\t\t\tdesligarLuz();\n\t\t\tloadEntityDetails();\n\t\t\tatualizar.setDisable(true);\n\t\t\tsalvar.setDisable(false);\n\t\t\t\n\t\t \n\t\t \n\t\tsuper.atualizar();\n\t}",
"public Producto actualizar(Producto producto) throws IWDaoException;",
"@PUT\n @JWTTokenNeeded\n @Consumes({MediaType.APPLICATION_JSON})\n @Produces({MediaType.APPLICATION_JSON})\n public Response update(EscenarioDTO entidad) {\n logger.log(Level.INFO, \"entidad:{0}\", entidad);\n \n try {\n \tConciliacion entidadPadreJPA = null;\n if (entidad.getIdConciliacion() != null) {\n entidadPadreJPA = padreDAO.find(entidad.getIdConciliacion());\n if (entidadPadreJPA == null) {\n throw new DataNotFoundException(Response.Status.NOT_FOUND.getReasonPhrase() + entidad.getIdConciliacion());\n }\n }\n //Hallar La entidad actual para actualizarla\n Escenario entidadJPA = managerDAO.find(entidad.getId());\n if (entidadJPA != null) {\n entidadJPA.setFechaActualizacion(Date.from(Instant.now()));\n entidadJPA.setNombre(entidad.getNombre() != null ? entidad.getNombre() : entidadJPA.getNombre());\n entidadJPA.setImpacto(entidad.getImpacto() != null ? entidad.getImpacto() : entidadJPA.getImpacto());\n entidadJPA.setDescripcion(entidad.getDescripcion() != null ? entidad.getDescripcion() : entidadJPA.getDescripcion());\n \n Boolean actualizarConciliacion = false;\n entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n \n Conciliacion conciliacionpadreactual = null;\n \n \n if (entidadJPA.getConciliacion() != null && !Objects.equals(entidadJPA.getConciliacion().getId(), entidad.getIdConciliacion())){\n actualizarConciliacion = true;\n conciliacionpadreactual = padreDAO.find(entidadJPA.getConciliacion().getId());\n }\n //entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n managerDAO.edit(entidadJPA);\n if (actualizarConciliacion){\n if ((entidadPadreJPA != null)) {\n entidadPadreJPA.addEscenario(entidadJPA);\n padreDAO.edit(entidadPadreJPA);\n conciliacionpadreactual.removeEscenario(entidadJPA);\n padreDAO.edit(conciliacionpadreactual);\n }\n }\n LogAuditoria logAud = new LogAuditoria(this.modulo, Constantes.Acciones.EDITAR.name(), Date.from(Instant.now()), entidad.getUsername(), entidadJPA.toString());\n logAuditoriaDAO.create(logAud);\n \n ResponseWrapper wraper = new ResponseWrapper(true,I18N.getMessage(\"escenario.update\", entidad.getNombre()) ,entidadJPA.toDTO());\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }\n \n ResponseWrapper wraper = new ResponseWrapper(false,I18N.getMessage(\"escenario.notfound\", entidad.getNombre()));\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }catch (Exception e) {\n \tif(e.getCause() != null && (e.getCause() instanceof DataAlreadyExistException || e.getCause() instanceof DataNotFoundException)) {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, e.getCause().getMessage(), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}else {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, I18N.getMessage(\"general.readerror\"), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}\n }\n }",
"@Override\n @Transactional\n public Producto save(Producto producto) {\n Presentacion presentacion = presentacionDao.findById(producto.getPresentacion().getId());\n producto.setPresentacion(presentacion);\n return productoDao.save(producto);\n }",
"private void actualizaProducto(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString codArticulo = request.getParameter(\"cArt\");\n\t\tString seccion = request.getParameter(\"seccion\");\n\t\tString nombreArticulo = request.getParameter(\"NArt\");\n\t\tSimpleDateFormat formatoFecha = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate fecha = null;\n\t\ttry {\n\t\t\tfecha = formatoFecha.parse(request.getParameter(\"fecha\"));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdouble precio = Double.parseDouble(request.getParameter(\"precio\"));\n\t\tString importado = request.getParameter(\"importado\");\n\t\tString paisOrigen = request.getParameter(\"POrig\");\n\n\t\t// Crear un objeto producto con la info del formulario\n\n\t\tProducto producto = new Producto(codArticulo, seccion, nombreArticulo, precio, fecha, importado, paisOrigen);\n\t\tSystem.out.println(\"el codArticulo es: \" + codArticulo + \" y los datos del producto\" + producto);\n\t\t// Actualizar la BBDD\n\t\tmodeloProductos.actualizarProducto(producto);\n\n\t\t// Volver al listado con la info actualizada\n\t\tobtenerProductos(request, response);\n\n\t}",
"private void subirDispositivo(){\n DatabaseReference subir_data = db_reference.child(\"Dispositivo\");\n Map<String, String> dataDispositivo = new HashMap<String, String>();\n dataDispositivo.put(\"Evento\", etNombreCurso.getText().toString());\n dataDispositivo.put(\"Latitud1\", disp_Lat1);\n dataDispositivo.put(\"Longitud1\", disp_Long1);\n dataDispositivo.put(\"Latitud2\", disp_Lat2);\n dataDispositivo.put(\"Longitud2\", disp_Long2);\n subir_data.push().setValue(dataDispositivo);\n }",
"public void salvarProdutos(Produto produto){\n }",
"private void salvarVenda(String nomeCliente, double precoFinal, double desconto ,String mesAnoAt,String dataCompra,String formaDePagamento) {\n\n\t\tFirebaseAuth autenticacion = configFireBase.getFireBaseAutenticacao();\n\n\t\tString idUsuario = Base64Custom.codificarBase64(autenticacion.getCurrentUser().getEmail());\n\t\tDatabaseReference VendaRef=mDatabase.child(\"vendas\");\n\n\n\t\tvenda.setIdVenda(VendaRef.push().getKey());\n\t\tvenda.setNomeCliente(nomeCliente);\n\t\tvenda.setValorTotal(precoFinal);\n\t\tvenda.setMesAno(mesAnoAt);\n\t\tvenda.setDesconto(desconto);\n\t\tvenda.setDataCompra(dataCompra);\n\t\tvenda.setLista(ListagemDeProdutosParaCompras.produtosSelecionados);\n\t\tvenda.setFormaDePagamento(formaDePagamento);\n\n\t\tmDatabase.child(\"armazenamento\").child(idUsuario).child(\"vendas\").child(venda.getIdVenda()).setValue(venda).addOnCompleteListener(new OnCompleteListener<Void>() {\n\n\t\t\t@Override\n\t\t\tpublic void onComplete(@NonNull Task<Void> task) {\n\n\t\t\t}\n\n\t\t});\n\n\t\tToast.makeText(CadastrarVendaActivity.this, \"Venda Realizada\", Toast.LENGTH_SHORT).show();\n\t\tstartActivity(new Intent(getApplicationContext(), ListagemDeVendasRealizadas.class));\n\t\tvenda.subtrairVendas();\n\n\t\tthis.finish();\n\t}",
"public void saveORUpdateObra(Obra obra) throws Exception;",
"public void actualizarUsuario(UsuarioDto dto){\n\t\tUsuario usuario = usuarioDao.load(dto.getId());\n\t\t\n\t\t// Seteo los valores a actualizar\n\t\tusuario.setNombre(dto.getNombre());\n\t\tusuario.setApellido(dto.getApellido());\n\t\t\n\t\t// Actualizo en la db\n\t\tusuarioDao.update(usuario);\n\t\t\n\t\tlog.info(\"Se actualizo el producto: \" + dto.getId());\n\t}",
"public boolean ModificarProducto(int id,String nom,String fab,int cant,int precio,String desc,int sucursal) {\n boolean status=false;\n int res =0;\n try {\n conectar(); \n res=state.executeUpdate(\"update producto set nombreproducto='\"+nom+\"', fabricante='\"+fab+\"',cantidad=\"+cant+\",precio=\"+precio+\",descripcion='\"+desc+\"',idsucursal=\"+sucursal+\" where idproducto=\"+id+\";\");\n if(res>=1)\n {\n status=true;\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return status;\n }",
"public void actualizarStock(Long idProducto, Long cantidad) {\n\t\t\n\t}",
"public RespuestaBD modificarRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismomismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioModificacion) {\n/* 437 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 440 */ String s = \"update wkf_detalle set servicio_inicio=\" + servicioInicio + \",\" + \" accion=\" + accion + \",\" + \" codigo_estado=\" + codigoEstado + \",\" + \" servicio_destino=\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \" nombre_procedimiento='\" + nombreProcedimiento + \"',\" + \" correo_destino='\" + correoDestino + \"',\" + \" enviar_solicitud='\" + enviar + \"',\" + \" ind_mismo_proveedor='\" + mismoProveedor + \"',\" + \" ind_mismo_cliente='\" + mismomismoCliente + \"',\" + \" estado='\" + estado + \"',\" + \" caracteristica=\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + \" valor_caracteristica=\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + \" caracteristica_correo=\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + \" metodo_seleccion_proveedor=\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + \" ind_correo_clientes=\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + \" enviar_hermana=\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + \" enviar_si_hermana_cerrada=\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + \" ind_cliente_inicial=\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \"\" + \" where\" + \" codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 465 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 467 */ catch (Exception e) {\n/* 468 */ e.printStackTrace();\n/* 469 */ Utilidades.writeError(\"FlujoDetalleDAO:modificarRegistro \", e);\n/* 470 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 472 */ return rta;\n/* */ }",
"public void guardarCambiosProducto(BProducto producto, BUsuario usuario, Connection conn)throws SQLException {\n\t\tPreparedStatement pstm;\r\n\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"UPDATE producto \\n\");\r\n\t\tsql.append(\"SET tipo_producto_id = ? , \\n\");\r\n\t\tsql.append(\" descripcion = ? , \\n\");\r\n\t\tsql.append(\" usuario_modificacion = ? , \\n\");\r\n\t\tsql.append(\" fecha_modificacion = SYSDATE, \\n\");\r\n\t\tsql.append(\" nombre = ?, \\n\");\r\n\t\tsql.append(\" codigo_imagen = ? \\n\");\r\n\t\tsql.append(\"WHERE producto_id = ?\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\t\r\n\t\tpstm.setInt(1,producto.getTipo().getCodigo());\r\n\t\tpstm.setString(2,producto.getDescripcion());\r\n\t\tpstm.setString(3,usuario.getLogin());\r\n\t\tpstm.setString(4,producto.getNombre());\r\n\t\tpstm.setInt(5,producto.getImagen().getCodigo());\r\n\t\tpstm.setInt(6,producto.getCodigo());\r\n\t\tpstm.executeUpdate();\r\n\t\t\r\n\t\tpstm.close();\r\n\t}",
"@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO asignarOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO asignarOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"asignarOrdenServicio\");\r\n ExpedienteGSMDTO retorno=expedienteDTO;\r\n try{\r\n //cambiarEstado expediente \r\n \tExpedienteGSMDTO expedCambioEstado=cambiarEstadoProceso(expedienteDTO.getIdExpediente(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getEstadoProceso().getIdEstadoProceso(),null,usuarioDTO);\r\n LOG.info(\"expedCambioEstado:\"+expedCambioEstado);\r\n //update expediente\r\n PghExpediente registroDAO = crud.find(expedienteDTO.getIdExpediente(), PghExpediente.class);\r\n registroDAO.setDatosAuditoria(usuarioDTO);\r\n if(expedienteDTO.getTramite()!=null){\r\n registroDAO.setIdTramite(new PghTramite(expedienteDTO.getTramite().getIdTramite()));\r\n }else if(expedienteDTO.getProceso()!=null){\r\n registroDAO.setIdProceso(new PghProceso(expedienteDTO.getProceso().getIdProceso()));\r\n }\r\n if(expedienteDTO.getObligacionTipo()!=null){\r\n registroDAO.setIdObligacionTipo(new PghObligacionTipo(expedienteDTO.getObligacionTipo().getIdObligacionTipo()));\r\n }\r\n if(expedienteDTO.getObligacionSubTipo()!=null && expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()!=null){\r\n registroDAO.setIdObligacionSubTipo(new PghObligacionSubTipo(expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()));\r\n }\r\n registroDAO.setIdUnidadSupervisada(new MdiUnidadSupervisada(expedienteDTO.getUnidadSupervisada().getIdUnidadSupervisada()));\r\n crud.update(registroDAO);\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(expedienteDTO.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty() || listPersonalDest.get(0).getIdPersonal()==null){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstado:\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(registroDAO);\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en asignarOrdenServicio\",e);\r\n ExpedienteException ex = new ExpedienteException(e.getMessage(), e);\r\n throw ex;\r\n }\r\n return retorno;\r\n }",
"public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }",
"private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {\n miVehiculo = new Vehiculo(placa,tipo,color, numdoc);\n\n showProgressDialog();\n\n //empresavehiculo\n //1. actualizar el reference, empresavehiculo\n //2. mDatabase.child(\"ruc\").child(\"placa\").setValue\n\n mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n //\n setmDatabase(getDatabase().getReference(\"empresasvehiculos\"));\n //\n mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario(\"ruc\")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }",
"public void salvaProduto(Produto produto){\n conecta = new Conecta();\n conecta.iniciaConexao();\n\n String sql = \"INSERT INTO `JoalheriaJoia`.`Produto` (`codigo`, `nome`, `valorCusto`, `valorVenda`, `idTipoJoia` , `quantidadeEstoque`) VALUES (?, ?, ?, ?, ?, ?);\";\n\n try {\n PreparedStatement pstm;\n pstm = conecta.getConexao().prepareStatement(sql); \n \n pstm.setString(1, produto.getCodigo());\n pstm.setString(2, produto.getNome());\n pstm.setFloat(3, produto.getValorCusto());\n pstm.setFloat(4, produto.getValorVenda());\n pstm.setInt(5, produto.getTipoJoia().getIdTipoJoia());\n pstm.setInt(6, produto.getQuantidadeEstoque());\n pstm.execute();\n } catch (SQLException ex) {\n Logger.getLogger(ProdutoDao.class.getName()).log(Level.SEVERE, null, ex);\n }\n conecta.fechaConexao(); \n \n }",
"public void salida(String k_idparqueadero) throws CaException {\n try {\n String strSQL = \"UPDATE servicio SET f_fycsalida=?, q_valorapagar=? WHERE k_idservicio =?\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n prepStmt.setDate(1, Date.valueOf(servicio.getF_fycsalida()));\n prepStmt.setInt(2, servicio.getQ_valorapagar());\n prepStmt.setInt(3, servicio.getK_idservicio());\n prepStmt.executeUpdate();\n prepStmt.close();\n ServiceLocator.getInstance().commit();\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo actualizar el servicio\" + e.getMessage());\n } finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n this.actualizarDatosSalida(String.valueOf(servicio.getK_idservicio()), k_idparqueadero);\n }",
"@Override\n\tpublic void altaProyecto(Proyecto proyecto) {\n\t\tproyectoRepo.save(proyecto);\n\t\t\n\t}",
"public void setIdproducto(int idproducto) {\r\n\t\tthis.idproducto = idproducto;\r\n\t}",
"@Override\n\tpublic void actualizar(Seccion seccion) {\n\n\t\tentity.getTransaction().begin();\n\t\tentity.merge(seccion);\n\t\tentity.getTransaction().commit();\n\n\t}",
"public void agregar(Producto producto) throws BusinessErrorHelper;",
"public void agregarDatosProductoText() {\n if (cantidadProducto != null && cantidadProducto > 0) {\n //agregando detalle a la Lista de Detalle\n listDetalle.add(new Detallefactura(null, this.producto.getCodBarra(),\n this.producto.getNombreProducto(), cantidadProducto, this.producto.getPrecioVenta(),\n this.producto.getPrecioVenta().multiply(new BigDecimal(cantidadProducto))));\n \n //Seteamos el producto al item del detalle\n //Accedemos al ultimo Item agregado a la lista\n listDetalle.get(listDetalle.size()-1).setCodProducto(producto);\n \n //Seteamos la factura al item del detalle\n //Accedemos al ultimo Item agregado a la lista \n // listDetalle.get(listDetalle.size()-1).setCodFactura(factura);\n \n cantidadProducto = null;\n //limpiamos la variable\n codigoBarra = \"\";\n //Invocamos al metodo que calcula el Total de la Venta para la factura\n totalFacturaVenta();\n\n //Actualizamos el componente ImputText\n RequestContext.getCurrentInstance().update(\"frmFactura:inputCodProducto\");\n //Mensaje de confirmacion de exito de la operacion \n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Correcto\", \"Producto agregado correctamente!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n } else {\n cantidadProducto = null;\n //limpiamos la variable\n codigoBarra = \"\";\n //Actualizamos el componente ImputText\n RequestContext.getCurrentInstance().update(\"frmFactura:inputCodProducto\");\n }\n\n }",
"private void registrarSolicitudOficioBien(SolicitudOficioBienDTO solicitudOficioBienDTO) {\n\n // Fecha solicitud\n solicitudOficioBienDTO.setFechaSolicitud(Calendar.getInstance().getTime());\n SolicitudOficioBien solicitudOficioBien = SolicitudOficioBienHelper.toLevel1Entity(solicitudOficioBienDTO,\n null);\n em.persist(solicitudOficioBien);\n solicitudOficioBienDTO.setId(solicitudOficioBien.getId());\n // Solicitud bien entidad\n for (SolicitudBienEntidadDTO solicitudBienEntidadDTO : solicitudOficioBienDTO.getSolicitudBienEntidadDTOs()) {\n solicitudBienEntidadDTO.setSolicitudOficioBienDTO(solicitudOficioBienDTO);\n registrarSolicitudBienEntidad(solicitudBienEntidadDTO);\n }\n }",
"@Override\n\tpublic void salvar() {\n\t\t\n\t\tPedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\n\t\tPedidoCompra.setAtivo(true);\n//\t\tPedidoCompra.setNome(nome.getText());\n\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\tPedidoCompra.setSaldoinicial(\"0.00\");\n\t\t\n\t\tPedidoCompra.setData(new Date());\n\t\tPedidoCompra.setIspago(false);\n\t\tPedidoCompra.setData_criacao(new Date());\n\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\n\t\tgetservice().save(PedidoCompra);\n\t\tsaveAlert(PedidoCompra);\n\t\tclearFields();\n\t\tdesligarLuz();\n\t\tloadEntityDetails();\n\t\tatualizar.setDisable(true);\n\t\tsalvar.setDisable(false);\n\t\t\n\t\tsuper.salvar();\n\t}",
"@Override\n\tpublic void updateEncuestaConExito() {\n\n\t}",
"public void encerraServico(Servico servico) throws SQLException {\r\n\r\n servico.setStatus(0);\r\n servico.setDtEncerramento(LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\")));\r\n\r\n System.out.println(servico.toString());\r\n update(servico);\r\n String sql = \"UPDATE solicitacoes SET em_chamado=4 WHERE servico_id_servico= \" + servico.getCell(0).getValue();\r\n\r\n stmt = conn.createStatement();\r\n stmt.execute(sql);\r\n stmt.close();\r\n\r\n }",
"private void SubirFotoUsuario(byte[] bDatos, String nombre)\n {\n // Si no hay datos, salimos\n if (bDatos == null)\treturn ;\n\n // Establecemos los parametros\n RequestParams params = new RequestParams();\n params.put(\"archivo\", new ByteArrayInputStream(bDatos), \"imagen.jpg\");\n params.put(\"directorio\", \"Usuarios\");\n params.put(\"nombre\", nombre);\n\n // Realizamos la petición\n cliente.post(getActivity(), Helpers.URLApi(\"subirimagen\"), params, new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n // Obtenemos el objeto JSON\n JSONObject objeto = Helpers.ResponseBodyToJSON(responseBody);\n\n // Si está OK\n if (objeto.isNull(\"Error\"))\n {\n // Si tenemos el Google Play Services\n if (GCMRegistrar.checkPlayServices(getActivity()))\n // Registramos el ID del Google Cloud Messaging\n GCMRegistrar.registrarGCM(getActivity());\n\n // Abrimos la ventana de los ofertas\n Helpers.LoadFragment(getActivity(), new Ofertas(), \"Ofertas\");\n }\n else\n {\n try {\n // Mostramos la ventana de error\n Helpers.MostrarError(getActivity(), objeto.getString(\"Error\"));\n }\n catch (Exception ex) { }\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n // Mostramos la ventana de error\n Helpers.MostrarError(getActivity(), getString(R.string.failuploadphoto));\n }\n });\n }",
"private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }",
"public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }",
"public void guardarProductosEnVenta() {\n try {\n //Si hay datos los guardamos...\n \n /****** Serialización de los objetos ******/\n //Serialización de las productosEnVenta\n FileOutputStream archivo = new FileOutputStream(\"productosVentaCliente\"+this.getCorreo()+\".dat\");\n ObjectOutputStream guardar= new ObjectOutputStream(archivo);\n //guardamos el array de productosEnVenta\n guardar.writeObject(productosEnVenta);\n archivo.close();\n \n\n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }",
"@Override\n public DatosIntercambio subirFichero(String nombreFichero,int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\n\n \t//AQUI HACE FALTA CONOCER LA IP PUERTO DEL ALMACEN\n \t//Enviamos los datos para que el servicio Datos almacene los metadatos \n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \t\n \t//aqui deberiamos haber combropado un mensaje de error si idCliente < 0 podriamos saber que ha habido error\n int idCliente = datos.almacenarFichero(nombreFichero,idSesionCliente);\n int idSesionRepo = datos.dimeRepositorio(idCliente);//sesion del repositorio\n Interfaz.imprime(\"Se ha agregado el fichero \" + nombreFichero + \" en el almacen de Datos\"); \n \n //Devolvemos la URL del servicioClOperador con la carpeta donde se guardara el tema\n DatosIntercambio di = new DatosIntercambio(idCliente , \"rmi://\" + direccionServicioClOperador + \":\" + puertoServicioClOperador + \"/cloperador/\"+ idSesionRepo);\n return di;\n }",
"public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }",
"public void alterar(Conserto conserto) throws SQLException{\r\n conecta = FabricaConexao.conexaoBanco();\r\n \r\n // CONSULTAR STATUS DO CARRO AQUI\r\n \r\n sql = \"update conserto set condataentrada=?, condatasaida=?, concarchassi=?, conoficodigo=? where concodigo=? \";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setDate(1, (Date) conserto.getDataEntrada());\r\n pstm.setDate(2, (Date) conserto.getDataSaida());\r\n pstm.setString(3, conserto.getCarro().getChassi());\r\n pstm.setInt(4, conserto.getOficina().getCodigo());\r\n pstm.setInt(5, conserto.getCodigo());\r\n pstm.execute();\r\n \r\n // ATUALIZAR STATUS DO CARRO\r\n \r\n System.out.println(\"Alterado\");\r\n FabricaConexao.fecharConexao();\r\n \r\n }",
"public String addProduct(Context pActividad,int pId, String pDescripcion,float pPrecio)\n {\n AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(pActividad, \"administracion\", null, 1);\n\n // con el objeto de la clase creado habrimos la conexion\n SQLiteDatabase db = admin.getWritableDatabase();\n try\n {\n // Comprobamos si el id ya existe\n Cursor filas = db.rawQuery(\"Select codigo from Articulos where codigo = \" + pId, null);\n if(filas.getCount()<=0)\n {\n //ingresamos los valores mediante, key-value asocioados a nuestra base de datos (tecnica muñeca rusa admin <- db <- registro)\n ContentValues registro = new ContentValues();\n registro.put(\"codigo\",pId);\n registro.put(\"descripcion\",pDescripcion);\n registro.put(\"precio\", pPrecio);\n\n //ahora insertamos este registro en la base de datos\n db.insert(\"Articulos\", null, registro);\n }\n else\n return \"El ID insertado ya existe\";\n }\n catch (Exception e)\n {\n return \"Error Añadiendo producto\";\n }\n finally\n {\n db.close();\n }\n return \"Producto Añadido Correctamente\";\n }",
"@Override\n public void update(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"UPDATE curso SET idprofesor = ?, nombrecurso = ?, claveprofesor = ?, clavealumno = ? WHERE idcurso = ?\");\n\n pstmt.setInt(1, entity.getIdProfesor());\n pstmt.setString(2, entity.getNombre());\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n pstmt.setInt(5, entity.getIdCurso());\n \n pstmt.executeUpdate();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"private void agregarProducto(HttpServletRequest request, HttpServletResponse response) throws SQLException {\n\t\tString codArticulo = request.getParameter(\"CArt\");\n\t\tString seccion = request.getParameter(\"seccion\");\n\t\tString nombreArticulo = request.getParameter(\"NArt\");\n\t\tSimpleDateFormat formatoFecha = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate fecha = null;\n\t\ttry {\n\t\t\tfecha = formatoFecha.parse(request.getParameter(\"fecha\"));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdouble precio = Double.parseDouble(request.getParameter(\"precio\"));\n\t\tString importado = request.getParameter(\"importado\");\n\t\tString paisOrigen = request.getParameter(\"POrig\");\n\t\t// Crear un objeto del tipo producto\n\t\tProducto producto = new Producto(codArticulo, seccion, nombreArticulo, precio, fecha, importado, paisOrigen);\n\t\t// Enviar el objeto al modelo e insertar el objeto producto en la BBDD\n\t\tmodeloProductos.agregarProducto(producto);\n\t\t// Volver al listado de productos\n\t\tobtenerProductos(request, response);\n\n\t}",
"@Override\r\n public boolean ActualizarDatosCliente() {\r\n try {\r\n puente.executeUpdate(\"UPDATE `cliente` SET `Nombre` = '\"+Nombre+\"', `Apellido` = '\"+Apellido+\"', `Telefono` = '\"+Telefono+\"', `Fecha_Nacimiento` = '\"+Fecha_Nacimiento+\"', `Email` = '\"+Email+\"', `Direccion` = '\"+Direccion+\"', `Ciudad` = '\"+Ciudad+\"' WHERE `cliente`.`Cedula` = '\"+Cedula+\"';\");\r\n listo = true;\r\n } catch (Exception e) {\r\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return listo;\r\n }",
"private void ReservarCita(String horaini,String horafin)\n {\n progressDialog=new ProgressDialog(HorasCitasActivity.this);\n progressDialog.setTitle(\"Agregado horario\");\n progressDialog.setMessage(\"cargando...\");\n progressDialog.show();\n progressDialog.setCancelable(false);\n String key = referenceehoras.push().getKey();\n\n // para gaurar el nodo Citas\n // sadfsdfsdfsd1212sdss\n Horario objecita =new Horario(key,idespecialidad,horaini,horafin,nombreespecialidad );\n //HorarioAtencion\n // reference=FirebaseDatabase.getInstance().getReference(\"HorarioAtencion\");\n // referenceCitas= FirebaseDatabase.getInstance().getReference(\"CitasReservadas\").child(user_id);\n referenceehoras.child(key).setValue(objecita).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n Toast.makeText(HorasCitasActivity.this, \"Agregado\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(HorasCitasActivity.this, \"Error :\" +e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n });\n }",
"@Override\n\tpublic void ativar(EntidadeDominio entidade) throws SQLException {\n\t\t\t\tPreparedStatement pst=null;\n\t\t\t\tLivro livro = (Livro)entidade;\t\t\n\t\t\t\ttry {\n\t\t\t\t\topenConnection();\n\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\t\t\tsql.append(\"UPDATE livro SET livStatus=?\");\n\t\t\t\t\tsql.append(\"WHERE idlivro=?\");\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\tpst.setString(1, \"ATIVADO\");\n\t\t\t\t\tpst.setInt(2, livro.getId());\n\t\t\t\t\tpst.executeUpdate();\t\t\t\n\t\t\t\t\tconnection.commit();\t\n\t\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SEGUNDA PARTE\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\topenConnection();\n\t\t\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t//FALTA COLOCAR EDITORA\t\t\n\t\t\t\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\t\t\t\tSystem.out.println(livro.getId());\n\t\t\t\t\t\t\tSystem.out.println(livro.getJustificativa());\n\t\t\t\t\t\t\tSystem.out.println(livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tsql.append(\"INSERT INTO justificativaativar (id_livro , justificativa, id_Ativar) VALUES (?,?,?)\");\t\t\n\t\t\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\t\t\tpst.setInt(1, livro.getId());\n\t\t\t\t\t\t\tpst.setString(2,livro.getJustificativa());\n\t\t\t\t\t\t\tpst.setInt(3,livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tpst.executeUpdate();\n\t\t\t\t\t\t\tconnection.commit();\t\t\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t\t\t}finally{\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t}",
"@Test\r\n public void updateCarritoDeComprasTest() {\r\n System.out.println(\"up voy\"+data);\r\n CarritoDeComprasEntity entity = data.get(0);\r\n PodamFactory factory = new PodamFactoryImpl();\r\n CarritoDeComprasEntity newEntity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n\r\n newEntity.setId(entity.getId());\r\n\r\n carritoDeComprasPersistence.update(newEntity);\r\n\r\n CarritoDeComprasEntity resp = em.find(CarritoDeComprasEntity.class, entity.getId());\r\n\r\n Assert.assertEquals(newEntity.getTotalCostDeCarritoCompras(), resp.getTotalCostDeCarritoCompras());\r\n \r\n }",
"@Test\n public void updateComentarioTest(){\n ComentarioEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n ComentarioEntity newEntity = factory.manufacturePojo(ComentarioEntity.class);\n newEntity.setId(entity.getId());\n comentarioPersistence.update(newEntity);\n \n ComentarioEntity respuesta = em.find(ComentarioEntity.class,entity.getId());\n \n Assert.assertEquals(respuesta.getNombreUsuario(), newEntity.getNombreUsuario());\n \n \n }",
"@Override\r\n\tpublic void salvar(Registro registro) {\n\t\t\r\n\t}",
"public void modificar() {\n try {\n if(!fecha.equals(null)){\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n \n calendar.setTime((Date) this.fecha);\n this.Selected.setApel_fecha_sesion(calendar.getTime());\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(2, Selected); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"1\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue modificada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.Selected = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n }else\n {\n addMessage(\"Es requerida la fecha\",1 );\n }\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al insertar el registro, contacte al administrador del sistema\", 1);\n }\n }",
"protected void agregarUbicacion(){\n\n\n\n }",
"private void actualizarInventarios() {\r\n\t\tfor (InventarioProducto inventarioProducto : inventariosEditar) {\r\n\t\t\tproductoEJB.editarInventarioProducto(inventarioProducto);\r\n\t\t}\r\n\t}",
"@Override\r\n public void editarCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la edicion\r\n entity.merge(cliente);//realiza la edicion.\r\n entity.getTransaction().commit();//finaliza la edicion\r\n }",
"public int actualizar(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"UPDATE conftbc_producto SET nombre_producto=?, imagen=?, idcategoria=?, idmarca=?, idmodelo=? WHERE idmodelo = ?\";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tps.setString(1,producto.getNombre());\n\t\t\tps.setString(2,producto.getImagen());\n\t\t\tps.setInt(3,producto.getCategoria().getIdcategoria());\n\t\t\tps.setInt(4, producto.getMarca().getIdmarca());\n\t\t\tps.setInt(5, producto.getModelo().getIdmodelo());\n\t\t\tps.setInt(6, producto.getModelo().getIdmodelo());// como el producto se originacuando se crea el modelo lo actualizamos por el modelo\n\t\t\tint rpta = ps.executeUpdate();\t\t\n\t\t\tthis.objCnx.confirmarDB();\n\t\t\treturn rpta;\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally {\t\t\t\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}",
"public void salvar() throws Exception {\n // Verifica se o bean existe\n if(b == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n // Primeiro salva o subtipo de banca\n new SubTipoBancaBD(b.getSubTipoBanca()).salvar();\n\n String sql = \"INSERT INTO banca (idBanca, idTipoBanca, idSubTipoBanca, descricao, ano, idCurriculoLattes, idLattes) \" +\n \"VALUES (null, \"+ b.getTipoBanca().getIdTipoBanca() +\", \"+ b.getSubTipoBanca().getIdSubTipoBanca() +\", \" +\n \"'\"+ b.getDescricao() +\"', \"+ b.getAno() +\", \"+ idCurriculoLattes + \" , \"+ b.getIdLattes() +\")\";\n\n\n Transacao.executar(sql);\n }",
"private void cambiarNombre(BaseDeDatos baseDeDatos, String nombre, Equipo equipo) {\r\n int equipoID = equipo.getId();\r\n String query = \"{ call datos_equipo.modificar_nombre(?,?) }\";\r\n baseDeDatos.update(query, equipoID, nombre);\r\n }",
"private static void registrarAuditoriaDetallesPresuTipoProyecto(Connexion connexion,PresuTipoProyecto presutipoproyecto)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getid_empresa().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getcodigo().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getnombre().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"public void actualizar(Especialiadad espe,JTextField txtcodigo){\r\n\t\r\n\t\t\tConnection con = null;\r\n\t\t\tStatement stmt=null;\r\n\t\t\tint result=0;\r\n\t\t\t//stmt=con.prepareStatement(\"UPDATE Especialiadad \"\r\n\t\t\t//\t\t+ \"SET Nombre =? )\"\r\n\t\t\t\t//\t+ \"WHERE Codigo = \r\n\t\t\t\r\n try\r\n {\r\n \tcon = ConexionBD.getConnection();\r\n \t stmt = con.createStatement();\r\n \t\t // result = stmt.executeUpdate();\r\n\r\n } catch (Exception e) {\r\n \t\t e.printStackTrace();\r\n \t\t} finally {\r\n \t\t\tConexionBD.close(con);\r\n \t\t}\r\n\t\r\n\t}",
"public void agregarDetalleProducto() {\n //Creamos instancia de ProductoDao\n ProductoDao productoDao = new ProductoDaoImp();\n try {\n //obtenemos la instancia del producto\n producto = productoDao.obtenerProductoPorCodigoBarra(productoSeleccionado);\n if (cantidadProductoDlg != null && cantidadProductoDlg > 0) {\n //agregando detalle a la Lista de Detalle\n listDetalle.add(new Detallefactura(null, this.producto.getCodBarra(),\n this.producto.getNombreProducto(), cantidadProductoDlg, this.producto.getPrecioVenta(),\n (this.producto.getPrecioVenta().multiply(new BigDecimal(cantidadProductoDlg)))));\n \n //Seteamos el producto al item del detalle\n //Accedemos al ultimo Item agregado a la lista\n listDetalle.get(listDetalle.size()-1).setCodProducto(producto);\n \n //Seteamos la factura al item del detalle\n //Accedemos al ultimo Item agregado a la lista \n // listDetalle.get(listDetalle.size()-1).setCodFactura(factura);\n \n //Limpiamos la variable 'cantidadProducto'\n cantidadProductoDlg = null;\n //Invocamos al metodo que calcula el Total de la Venta para la factura\n totalFacturaVenta();\n\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Correcto\", \"Producto agregado al detalle!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }else{\n //Limpiamos la variable 'cantidadProducto'\n cantidadProductoDlg = null;\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR , \"Incorrecto\", \"La cantidad es incorrecta!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic int update(Subordination entity) throws DBOperationException {\n\t\treturn 0;\n\t}",
"public void agregarMarcayPeso() {\n int id_producto = Integer.parseInt(TextCodProduct.getText());\n String Descripcion_prod = TextDescripcion.getText();\n double Costo_Venta_prod = Double.parseDouble(TextCostoproduc.getText());\n double Precio_prod = Double.parseDouble(TextPrecio.getText());\n int Codigo_proveedor = ((Proveedor) LitsadeProovedores.getSelectedItem()).getIdProveedor();\n double ivaproducto = Double.parseDouble(txtIvap.getText());\n Object tipodelproducto = jcboxTipoProducto.getSelectedItem();\n\n //Captura el tipo del producto\n //Se crea un nuevo objeto de tipo producto para hacer el llamado al decorador\n Producto p;\n //Switch para Ingresar al tipo de producto deseado \n switch ((String) tipodelproducto) {\n case \"Alimentos\":\n log(String.valueOf(tipodelproducto));\n //Creamos un nuevo producto de tipo en este caso comida y le enviamois\n //el id y el tipo de producto\n p = new Producto_tipo_comida(id_producto, (String) tipodelproducto);\n //el producto p , ahora tendra una adicion de marca del producto\n //ingreso\n p = new Marca_del_producto(p, id_producto, Descripcion_prod, Costo_Venta_prod, Precio_prod, ivaproducto, Costo_Venta_prod);\n p.getMarca_product();\n p.getPeso_product();\n //ingreso\n break;\n case \"Ropa\":\n p = new Producto_tipo_ropa(id_producto, (String) tipodelproducto);\n p = new Marca_del_producto(p, id_producto, Descripcion_prod, Costo_Venta_prod, Precio_prod, ivaproducto, Costo_Venta_prod);\n p.getMarca_product();\n p.getPeso_product();\n\n break;\n\n case \"Automotor\":\n p = new Producto_tipo_automotor(id_producto, (String) tipodelproducto);\n p = new Marca_del_producto(p, id_producto, Descripcion_prod, Costo_Venta_prod, Precio_prod, ivaproducto, Costo_Venta_prod);\n p.getMarca_product();\n p.getPeso_product();\n\n break;\n\n case \"Electronico\":\n p = new Producto_tipo_electronico(id_producto, (String) tipodelproducto);\n p = new Marca_del_producto(p, id_producto, Descripcion_prod, Costo_Venta_prod, Precio_prod, ivaproducto, Costo_Venta_prod);\n p.getMarca_product();\n p.getPeso_product();\n\n break;\n }\n\n }",
"public void AgregarVenta() {\r\n if (vista.jTcodigodebarras.equals(\"\")) {//C.P.M si el componete esta vacio es que no a insertado algun codigo a buscar\r\n JOptionPane.showMessageDialog(null, \"No has ingresado un codigo de barras\");//C.P.M se lo notificamos a el usuario\r\n } else {//C.P.M de lo contrario es que inserto algo y ay que buscarlo\r\n try {\r\n modelo.setCodigobarras(vista.jTcodigodebarras.getText());//C.P.M le mandamos el codigo a buscar a el modelo\r\n rs = modelo.Buscarcodigobarras();//C.P.M cachamos el resultado de la consulta\r\n if (rs.next() == true) {//C.P.M preguntamos si trai datos si es asi \r\n String nombre = rs.getString(\"nombre_producto\");//C.P.M obtenemos el nombre de el resultado\r\n float precio = Float.parseFloat(rs.getString(\"precio\"));//C.P.M obtenemos el precio\r\n String precioformato = format.format(precio);//C.P.M le damos el formato adecuado esta variable la utilizamos para enviarla a la vista\r\n float totalPro = Float.parseFloat(precioformato);//C.P.M cambiamos a flotante ya el precio con el formato adecuado\r\n String cant = JOptionPane.showInputDialog(null, \"Cantidad: \");//C.P.M preguntamos la cantidad del prducto\r\n float cantidad = Float.parseFloat(cant);//C.P.M convertimos a flotante la cantidad\r\n totalPro = totalPro * cantidad;//C.P.M obtenemos el total de ese producto multiplicando al cantidad por el precio\r\n total = Float.parseFloat(vista.jTtotal.getText());//C.P.M obtenemos el total de la venta \r\n total = totalPro + total;//C.P.M le sumamos el total del producto ingresado al total ya de la venta\r\n String totalaenviar = format.format(total);//C.P.M le damos el formato adecuado para enviar el nuevo total\r\n vista.jTtotal.setText(totalaenviar);//C.P.M le enviamos el nuevo total a la vista\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo de la tabla\r\n Object[] fila = new Object[3];//C.P.M creamos un areglo con el tamano de la nota\r\n fila[0] = cant;//C.P.M le agregamos la cantidad \r\n fila[1] = nombre;//C.P.M le agregamos el nombre\r\n fila[2] = precioformato;//C.P.M y el precio con el formato\r\n temp.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"No existe un artículo con dicho código\");\r\n }\r\n vista.jTcodigodebarras.setText(\"\");//C.P.M limpiamos el codigo de barras y le colocamos el foco\r\n vista.jTcodigodebarras.requestFocus();//C.P.M le colocamos el foco\r\n } catch (SQLException ex) {//C.P.M si ocurre un error le notificamos a el usuario\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al consultar el codigo de barras\");\r\n }\r\n }\r\n }",
"public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}",
"public Reserva updateReserva(Reserva reserva){\n /**\n * Verificar que el objeto auditorio recibido tenga un ID.\n */\n if (reserva.getIdReservation()!=null){\n /**\n * Verificar la existencia del objeto en BD.\n */\n Optional<Reserva> existeReserva = getReserva(reserva.getIdReservation());\n /**\n * Si el objeto existe en la BD, editarlo. Si no,retornarlo como\n * está.\n */\n if (!existeReserva.isEmpty()){\n /**\n * Si el objeto reserva tiene un valor startDate, asignarlo a\n * existeCliente.\n */\n if (reserva.getStartDate()!=null){\n existeReserva.get().setStartDate(reserva.getStartDate());\n }\n /**\n * Si el objeto cliente tiene un valor devolutionDate, asignarlo\n * a existeCliente.\n */\n if (reserva.getDevolutionDate()!=null){\n existeReserva.get().setDevolutionDate(reserva.getDevolutionDate());\n }\n /**\n * Si el objeto reserva tiene un valor status, asignarlo a\n * existeCliente.\n */\n if (reserva.getStatus()!=null){\n existeReserva.get().setStatus(reserva.getStatus());\n }\n /**\n * Si el objeto reserva tiene un valor audience, asignarlo\n * a existeCliente.\n */\n if (reserva.getAudience()!=null){\n existeReserva.get().setAudience(reserva.getAudience());\n }\n /**\n * Si el objeto reserva tiene un valor client, asignarlo\n * a existeCliente.\n */\n if (reserva.getClient()!=null){\n existeReserva.get().setClient(reserva.getClient());\n }\n /**\n * Devolver existeCliente con valores ajustados.\n */\n return repositorioReserva.save(existeReserva.get());\n } else {\n return reserva;\n }\n } else {\n return reserva;\n }\n }",
"@Override\r\n\tpublic void actualizarStockProductoSucursal(BProducto bProducto,\r\n\t\t\tBSucursal bSucursal, int cantidad,Connection conn, BUsuario usuario) throws SQLException {\n\t\tPreparedStatement pstm;\r\n\t\t\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"UPDATE fidelizacion.producto_sucursal ps \\n\");\r\n\t\tsql.append(\"SET ps.stock = (nvl(ps.stock,0) - ?), \\n\");\r\n\t\tsql.append(\" ps.usuario_modificacion = ? , \\n\");\r\n\t\tsql.append(\" ps.fecha_modificacion = SYSDATE \\n\");\r\n\t\tsql.append(\"WHERE ps.sucursal_id = ? \\n\");\r\n\t\tsql.append(\"AND ps.producto_id = ?\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\tpstm.setInt(1,cantidad);\r\n\t\tpstm.setString(2,usuario.getLogin());\r\n\t\tpstm.setInt(3,bSucursal.getCodigo());\r\n\t\tpstm.setInt(4,bProducto.getCodigo());\r\n\t\t\r\n\t\tpstm.executeUpdate();\r\n\t\r\n\t\tpstm.close();\r\n\t}",
"private void salvar() {\n setaCidadeBean();\n //Instanciamos o DAO\n CidadeDAO dao = new CidadeDAO();\n //verifica qual será a operação de peristência a ser realizada\n if (operacao == 1) {\n dao.inserir(cidadeBean);\n }\n if (operacao == 2) {\n dao.alterar(cidadeBean);\n }\n habilitaBotoesParaEdicao(false);\n reiniciaTela();\n }",
"public static void registrarOperacionPrestamo(Usuario autor, long idPrestamo, Operacion operacion) throws DaoException {\r\n String msg = null;\r\n Prestamo prestamo = PrestamoDao.findPrestamoById(idPrestamo, null);\r\n Conexion con = null;\r\n try {\r\n HashMap<String, String> infoPrestamo;\r\n HashMap<String, Object> infoOperacion = new HashMap<String, Object>();\r\n infoOperacion.put(\"ID\", Consultas.darNumFilas(Operacion.NOMBRE_TABLA)+1);\r\n infoOperacion.put(\"FECHA\", Consultas.getCurrentDate());\r\n infoOperacion.put(\"TIPO\", operacion.getTipo());\r\n infoOperacion.put(\"ID_AUTOR\", autor.getId());\r\n\r\n \r\n con=new Conexion();\r\n switch (operacion.getTipo()) {\r\n case Operacion.PAGAR_CUOTA:\r\n PrestamoDao.registrarPagoCuota(prestamo,con);\r\n infoOperacion.put(\"MONTO\", prestamo.getValorCuota());\r\n infoOperacion.put(\"DESTINO\", \"0\");\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n \r\n break;\r\n case Operacion.PAGAR_CUOTA_EXTRAORDINARIA:\r\n \r\n //solo gasta lo necesario par apagar el prestamo\r\n if (operacion.getMonto()>prestamo.getCantidadRestante())\r\n {\r\n throw new DaoException(\"La cuota supera lo que debe\");\r\n }\r\n \r\n infoOperacion.put(\"MONTO\", operacion.getMonto());\r\n infoOperacion.put(\"DESTINO\",\"0\" );\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n PrestamoDao.registrarPagoCuotaExtraordinaria(prestamo,operacion,con);\r\n break;\r\n case Operacion.CERRAR:\r\n if (prestamo.getCantidadRestante() != 0) {\r\n throw new DaoException( \"El prestamo no se ha pagado completamente\");\r\n } else {\r\n \r\n Consultas.insertar(null, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n String sentenciaCerrar = \"UPDATE PRESTAMOS SET ESTADO='CERRADO' WHERE ID=\" + prestamo.getId();\r\n con.getConexion().prepareStatement(sentenciaCerrar).executeUpdate();\r\n \r\n }\r\n \r\n }\r\n \r\n Consultas.insertar(con, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(OperacionDao.class.getName()).log(Level.SEVERE, null, ex); \r\n con.rollback();\r\n throw new DaoException();\r\n }\r\n\r\n \r\n }",
"public String update() throws Exception {\r\n\t\tlog.info(\"updateGeneral()\");\r\n\t\tlog.info(\" id cliente \" + objClienteSie.getIdcliente() + \" nombre \"\t+ objClienteSie.getNombrecliente());\r\n\r\n\t\tsetTipoDocumento(objClienteSie.getTbTipoDocumentoIdentidad().getIdtipodocumentoidentidad());\r\n\t\tlog.info(\"TIPO DE DOCUMENTO-DNI=1 -->\"+ objClienteSie.getTbTipoDocumentoIdentidad().getIdtipodocumentoidentidad());\r\n\r\n\t\t/*******DOMICILIO ES PARA EDITAR PARECE***********************/\r\n\t\tlog.info(\"buscar al momento que se hace editar -->\");\r\n\t\tobjDomicilio = objDomicilioService.buscarDomicilioXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\" --Id-- \" + objDomicilio.getIddomiciliopersona()+ \" --IdCLIENTE-- \" + objDomicilio.getIdcliente()+ \" --Ubicacion-- \"+ objDomicilio.getUbicacion() );\r\n\t\t\r\n\t\t/**********NUEVO DOMICILIO********************************/\r\n\t\tlog.info(\"Antes de llegar al objDomicilioNew---> \");\r\n\t\tobjDomicilioNew = objDomicilioService.buscarDomicilioXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\"despues de llegar al objDomicilioNew\"+ objDomicilioNew.getIdcliente());\r\n\t \r\n /*seteo domicilio*/\r\n\tif(objDomicilio!=null){\r\n\t\tif (objDomicilio.getTbUbigeo()!=null) {\r\n\t\tlog.info(\"Dentro del IF\");\t\r\n setIdDepartamento(objDomicilio.getTbUbigeo().getCoddepartamento());\r\n log.info(\"setIdDepartamento---> \"+ objDomicilio.getTbUbigeo().getCoddepartamento());\r\n comboManager.setIdDepartamento(idDepartamento);\r\n setIdProvincia(objDomicilio.getTbUbigeo().getCodprovincia());\r\n comboManager.setIdProvincia(idProvincia);\r\n setIdUbigeo1(objDomicilio.getTbUbigeo().getIdubigeo().toString());\r\n setIdDistrito(objDomicilio.getTbUbigeo().getCoddistrito());\t \r\n setTipo(objDomicilio.getTbTipoCasa().getIdtipocasa());\r\n log.info(\" tipo casa \"+objDomicilio.getTbTipoCasa().getIdtipocasa());\t \r\n objDomicilio.setTbEstadoGeneral(objDomicilio.getTbEstadoGeneral());\t \r\n\t\t}\r\n\telse{\r\n\t\tlog.info(\"Dentro del Else\");\r\n\t\t objDomicilio.setUbicacion(objDomicilio.getUbicacion());\r\n\t log.info(\"--UBICACION--\"+ objDomicilio.getUbicacion());\r\n\t setTipo(objDomicilio.getTbTipoCasa().getIdtipocasa());\r\n\t log.info(\" tipo casa \"+objDomicilio.getTbTipoCasa().getIdtipocasa());\t\t\t \t\t\t \r\n\t objDomicilio.setTbEstadoGeneral(objDomicilio.getTbEstadoGeneral());\r\n\t\t}\r\n \t} \r\n /*****************TELEFONO************************/\r\n \r\n\t\tTelefonoPersonaSie t = objTelefonoService.buscarTelefonoXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\" id \" + t.getIdtelefonopersona()+ \" numero Telefonico \" + t.getTelefono() );\r\n\t\t /***seteo teléfono***/\r\n TelefonoPersonaList = objTelefonoService.listarTelefonoEmpleadosXidcliente(objClienteSie.getIdcliente()); \r\n\tfor (int i = 0; i < TelefonoPersonaList.size(); i++) {\r\n \tTelefonoPersonaList.get(i).setItem(\"Agregado\");\r\n }\r\n\t\r\n\t\t/*******************NUEVO DOMICILIO***************************/\r\n\t\tDomicilioPersonaSie d = objDomicilioService.buscarDomicilioXIdcliente(objClienteSie.getIdcliente());\r\n\t\tlog.info(\"ID-DOMICILIO--> \"+ d.getIddomiciliopersona()+ \" DOMICILIO---> \" + d.getDomicilio());\r\n\t\t/*****Lista Domicilio***/\r\n\t\tDomicilioPersonaList = objDomicilioService.listarDomicilioCliente(objClienteSie.getIdcliente());\r\n\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\tDomicilioPersonaList.get(i).setItem(\"Agregado\");\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsetNewRecord(false);\r\n\t\treturn getViewMant();\r\n\t\t}",
"public void grabar(CalidadPcc o) {\n\t\ttry {\r\n\t\t\tem.getTransaction().begin();\r\n\t\t\tem.persist(o);\r\n\t\t\tem.getTransaction().commit();\r\n\t\t} finally {\r\n\t\t\tem.close();\r\n\t\t}\r\n\t}",
"private void iniciaTela() {\n try {\n tfCod.setText(String.valueOf(reservaCliDAO.getLastId()));\n desabilitaCampos(false);\n DefaultComboBoxModel modeloComboCliente;\n modeloComboCliente = new DefaultComboBoxModel(funDAO.getAll().toArray());\n cbFunc.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(quartoDAO.getAll().toArray());\n cbQuarto.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(cliDAO.getAll().toArray());\n cbCliente.setModel(modeloComboCliente);\n btSelect.setEnabled(false);\n verificaCampos();\n carregaTableReserva(reservaDAO.getAll());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void registrarOrden(java.sql.Connection conexion, ArrayList<String> datos, String orden, InputStream archivo){\n try {\n PreparedStatement dp = crearDeclaracionPreparada(conexion, datos, orden); \n dp.setBlob(datos.size() + 1, archivo);\n dp.executeUpdate();\n //Ejecutamos la orden de tipo Query creada a partir de la orden y datos dados\n if(conexion.isClosed() == false)//si la conexion está abierta la cerramos\n conexion.close();\n } catch (SQLException ex) {\n System.out.println(\"\\n\\n\\n\"+ex); //Imprimimos el error en consola en caso de fallar \n } \n }",
"@Override\n public void registrarPropiedad(Propiedad nuevaPropiedad, String pIdAgente) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"INSERT INTO PROPIEDAD (ID_PROPIEDAD, ID_AGENTE, MODALIDAD, \"\n + \"AREA_TERRENO, VALOR_METRO, VALOR_FISCAL, PROVINCIA, CANTON, DISTRITO, DIREXACTA, TIPO, \"\n + \"ESTADO, PRECIO) VALUES (\" + numFinca + \", '\" + pIdAgente + \"' , '\" + modalidad + \"',\" + \n area + \",\" + metro + \",\" + fiscal + \", '\" + provincia + \"' , '\" + canton + \"' , '\" + distrito \n + \"' , '\" + dirExacta + \"' , '\" + tipo + \"' , '\" + estado + \"', \" + precio + \")\");\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void actualizarUsuario(Long idUsr,String nick,String nombres,String pass){\n\t\t\t\t\t //buscamos el objeto que debe ser actualizado:\n\t\t\t\t\t Usuario u = findbyIdUsuario(idUsr);\n\t\t\t\t\t em.getTransaction().begin();\n\t\t\t\t\t // no se actualiza la clave primaria, en este caso solo la descripcion\n\t\t\t\t\t u.setNick(nick);\n\t\t\t\t\t u.setNombres(nombres);\n\t\t\t\t\t u.setPass(pass);\n\t\t\t\t\t em.merge(u);\n\t\t\t\t\t em.getTransaction().commit();\n\t\t\t\t }",
"@Override\n public void update(Entidad e) throws CRUDException {\n\n Boleto newBol = (Boleto) e;\n Boleto oldBol = em.find(Boleto.class, newBol.getId());\n\n Optional op = Optional.ofNullable(oldBol);\n if (op.isPresent()) {\n\n op = Optional.ofNullable(oldBol.getIdNotaDebitoTransaccion());\n if (op.isPresent()) {\n //actualizamos la descripcion de la Transaccion de la Nota de Debito\n NotaDebitoTransaccion ndt = em.find(NotaDebitoTransaccion.class, oldBol.getIdNotaDebitoTransaccion());\n ndt.setDescripcion(createDescription(newBol));\n em.merge(ndt);\n }\n\n //Actualiza la descripcion del Ingreso de Caja\n op = Optional.ofNullable(oldBol.getIdIngresoCajaTransaccion());\n if (op.isPresent()) {\n IngresoTransaccion it = em.find(IngresoTransaccion.class, oldBol.getIdIngresoCajaTransaccion());\n it.setDescripcion(createDescription(newBol));\n em.merge(it);\n }\n\n //Actualiza el comprobante Contable\n op = Optional.ofNullable(oldBol.getIdLibro());\n if (op.isPresent()) {\n ComprobanteContable cc = em.find(ComprobanteContable.class, oldBol.getIdLibro());\n cc.setConcepto(createDescription(newBol));\n em.merge(cc);\n }\n\n }\n\n super.update(e); //To change body of generated methods, choose Tools | Templates.\n }",
"public void insercionMasiva() {\r\n\t\tif (!precondInsert())\r\n\t\t\treturn;\r\n\t\tUploadItem fileItem = seleccionUtilFormController.crearUploadItem(\r\n\t\t\t\tfName, uFile.length, cType, uFile);\r\n\t\ttry {\r\n\t\t\tlLineasArch = FileUtils.readLines(fileItem.getFile(), \"ISO-8859-1\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Error al subir el archivo\");\r\n\t\t}\r\n\r\n\t\tStringBuilder cadenaSalida = new StringBuilder();\r\n\t\tString estado = \"EXITO\";\r\n\t\tcantidadLineas = 0;\r\n\t\t//Ciclo para contar la cantdad de adjudicados o seleccionados que se reciben\r\n\t\tfor (String linea : lLineasArch) {\r\n\t\t\tcantidadLineas++;\r\n\t\t\tif(cantidadLineas > 1){\r\n\t\t\t\tseleccionados++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Condicion para verificar si la cantidad de seleccionados es mayor a la cantidad de vacancias (en cuyo caso se procede a abortar el proceso e imprimir\r\n\t\t//un mensaje de error) o verificar si esta es menor (se imprime el mensaje pero se continua)\r\n\t\t\r\n\t\tif(seleccionados > concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\testado = \"FRACASO\";\r\n\t\t\tcadenaSalida.append(estado + \" - CANTIDAD DE AJUDICADOS ES SUPERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\telse if(seleccionados < concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\tcadenaSalida.append(\"ADVERTENCIA - CANTIDAD DE ADJUDICADOS ES INFERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\tseleccionados = 0;\r\n\t\t\r\n\t\tif(!estado.equals(\"FRACASO\")){\r\n\r\n\t\tcantidadLineas = 0;\r\n\t\tfor (String linea : lLineasArch) {\r\n\r\n\t\t\tcantidadLineas++;\r\n\t\t\testado = \"EXITO\";\r\n\t\t\tString observacion = \"\";\r\n\t\t\tFilaPostulante fp = new FilaPostulante(linea);\r\n\t\t\tList<Persona> lista = null;\r\n\t\t\tif (cantidadLineas > 1 && fp != null && fp.valido) {\r\n\t\t\t\t//Verifica si la persona leida en el registro del archivo CSV existe en la Tabla Persona\r\n\t\t\t\tString sqlPersona = \"select * from general.persona where persona.documento_identidad = '\"+fp.getDocumento()+ \"'\";\r\n\t\t\t\tQuery q1 = em.createNativeQuery(sqlPersona, Persona.class);\r\n\t\t\t\tPersona personaLocal = new Persona();\r\n\t\t\t\tint banderaEncontroPersonas = 0;\r\n\t\t\t\t//Si existe, se almacena el registro de la tabla\r\n\t\t\t\tif(!q1.getResultList().isEmpty()){\r\n\t\t\t\t\tlista = q1.getResultList();\r\n\t\t\t\t\tif (compararNomApe(lista.get(0).getNombres(), removeCadenasEspeciales(fp.getNombres()))\r\n\t\t\t\t\t\t\t&& compararNomApe(lista.get(0).getApellidos(), removeCadenasEspeciales(fp.getApellidos())) ) {\r\n\t\t\t\t\t\t\tbanderaEncontroPersonas = 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\t\tobservacion += \" PERSONA NO REGISTRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\tobservacion += \" PERSONA NO REGITRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t}\r\n\t\t\t\t//Verificamos que la persona figure en la lista corta como seleccionado\r\n\t\t\t\tif(!estado.equals(\"FRACASO\")){\r\n\t\t\t\t\tint banderaExisteEnListaCorta = 0;\t\t\t\t\t\r\n\t\t\t\t\tint i=0;\r\n\t\t\t\t\tif (banderaEncontroPersonas == 1) {\r\n\t\t\t\t\t\twhile(i<lista.size()){\r\n\t\t\t\t\t\t\tpersonaLocal = (Persona) lista.get(i);\r\n\t\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\t\tList<EvalReferencialPostulante> listaEvalRefPost = p.getResultList();\r\n\t\t\t\t\t\t\tif (!listaEvalRefPost.isEmpty()) {\r\n\t\t\t\t\t\t\t\tbanderaExisteEnListaCorta = 1;\r\n\t\t\t\t\t\t\t\ti = lista.size();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (banderaExisteEnListaCorta == 0) {\r\n\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\tobservacion += \" NO SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t} else if (banderaExisteEnListaCorta == 1){\r\n\t\t\t\t\t\tobservacion += \" SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\tEvalReferencialPostulante auxEvalReferencialPostulante = (EvalReferencialPostulante) p.getResultList().get(0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Validaciones para actualizaciones\r\n\t\t\t\t\t\t//Bandera indicadora de actualizaciones hechas\r\n\t\t\t\t\t\tint bandera = 0;\r\n\t\t\t\t\t\tif(auxEvalReferencialPostulante.getSelAdjudicado() == null){\r\n\t\t\t\t\t\t\testado = \"EXITO\";\r\n\t\t\t\t\t\t\tauxEvalReferencialPostulante.setSelAdjudicado(true);;\r\n\t\t\t\t\t\t\tbandera = 1;\r\n\t\t\t\t\t\t\tem.merge(auxEvalReferencialPostulante);\r\n\t\t\t\t\t\t\tem.flush();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tagregarEstadoMotivo(linea, estado, observacion, cadenaSalida);\r\n\t\t\t}\r\n\t\t\tif (cantidadLineas > 1 && !fp.valido) {\r\n\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\tcadenaSalida\r\n\t\t\t\t\t\t.append(estado\r\n\t\t\t\t\t\t\t\t+ \" - ARCHIVO INGRESADO CON MENOS CAMPOS DE LOS NECESARIOS. DATOS INCORRECTOS EN ALGUNA COLUMNA.\");\r\n\t\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\r\n\t\t\t// FIN FOR\r\n\t\t}\r\n\t\t//FIN IF\r\n\t\t}\r\n\t\tif (lLineasArch.isEmpty()) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Archivo inválido\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf2 = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\r\n\t\t\tString nArchivo = sdf2.format(new Date()) + \"_\" + fName;\r\n\t\t\tString direccion = System.getProperty(\"jboss.home.dir\") + System.getProperty(\"file.separator\") + \"temp\" + System.getProperty(\"file.separator\");\r\n\t\t\tFile archSalida = new File(direccion + nArchivo);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileUtils\r\n\t\t\t\t\t\t.writeStringToFile(archSalida, cadenaSalida.toString());\r\n\t\t\t\tif (archSalida.length() > 0) {\r\n\t\t\t\t\tstatusMessages.add(Severity.INFO, \"Insercion Exitosa\");\r\n\t\t\t\t}\r\n\t\t\t\tJasperReportUtils.respondFile(archSalida, nArchivo, false,\r\n\t\t\t\t\t\t\"application/vnd.ms-excel\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tstatusMessages.add(Severity.ERROR, \"IOException\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static void registrarAuditoriaDetallesValorPorUnidad(Connexion connexion,ValorPorUnidad valorporunidad)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_empresa().equals(valorporunidad.getValorPorUnidadOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_unidad().equals(valorporunidad.getValorPorUnidadOriginal().getid_unidad()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_unidad().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_unidad().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDUNIDAD,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getvalor().equals(valorporunidad.getValorPorUnidadOriginal().getvalor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getvalor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getvalor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.VALOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}",
"void actualizar(Prestamo prestamo);",
"@Override\n\tpublic Producto buscarIdProducto(Integer codigo) {\n\t\treturn productoDao.editarProducto(codigo);\n\t}",
"public void actualizarPodio() {\r\n\t\tordenarXPuntaje();\r\n\t\tint tam = datos.size();\r\n\t\traizPodio = datos.get(tam-1);\r\n\t\traizPodio.setIzq(datos.get(tam-2));\r\n\t\traizPodio.setDer(datos.get(tam-3));\r\n\t}",
"private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}",
"private void registrarCoactivoOficioBien(CoactivoOficioBienDTO coactivoOficioBienDTO) {\n CoactivoOficioBien coactivoOficioBien = CoactivoOficioBienHelper.toLevel1Entity(coactivoOficioBienDTO, null);\n em.persist(coactivoOficioBien);\n }",
"public void darDeAltaProducto(Producto producto) throws SQLException {\n\t\tDataProducto dp = new DataProducto();\n\t\tdp.updateBajaLogica(producto);\n\t}",
"public void GuardarSerologia(RecepcionSero obj)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n session.saveOrUpdate(obj);\n }",
"public void procesarRespuestaServidor(RutinaG rutina) {\n\n bdHelperRutinas = new BdHelperRutinas(context, BD_Rutinas);\n bdHelperRutinas.openBd();\n ContentValues registro = prepararRegistroRutina(rutina);\n bdHelperRutinas.insertTabla(DataBaseManagerRutinas.TABLE_NAME, registro);\n bdHelperRutinas.closeBd();\n }",
"@Override\n\tpublic void update(Unidade obj) {\n\n\t}",
"public String agregar(String trama) throws JsonProcessingException {\n\t\tString respuesta = \"\";\n\t\tRespuestaGeneralDto respuestaGeneral = new RespuestaGeneralDto();\n \t\tlogger.info(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n \t\t\t\t+ \", ProductoService.agregar trama entrante para agregar o actualizar producto: \" + trama);\n\t\ttry {\n\t\t\t/*\n\t\t\t * Se convierte el dato String a estructura json para ser manipulado en JAVA\n\t\t\t */\n\t\t\tJSONObject obj = new JSONObject(trama);\n\t\t\tProducto producto = new Producto();\n\t\t\t/*\n\t\t\t * use: es una bandera para identificar el tipo de solicitud a realizar:\n\t\t\t * use: 0 -> agregar un nuevo proudcto a la base de datos;\n\t\t\t * use: 1 -> actualizar un producto existente en la base de datos\n\t\t\t */\n\t\t\tString use = obj.getString(\"use\");\n\t\t\tif(use.equalsIgnoreCase(\"0\")) {\n\t\t\t\tString nombre = obj.getString(\"nombre\");\n\t\t\t\t/*\n\t\t\t\t * Se realiza una consulta por nombre a la base de datos a la tabla producto\n\t\t\t\t * para verificar que no existe un producto con el mismo nombre ingresado.\n\t\t\t\t */\n\t\t\t\tProducto productoBusqueda = productoDao.buscarPorNombre(nombre);\n\t\t\t\tif(productoBusqueda.getProductoId() == null) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Si no existe un producto con el mismo nombre pasa a crear el nuevo producto\n\t\t\t\t\t */\n\t\t\t\t\tproducto.setProductoNombre(nombre);\n\t\t\t\t\tproducto.setProductoCantidad(obj.getLong(\"cantidad\"));\n\t\t\t\t\tTipoProducto tipoProducto = tipoProductoDao.consultarPorId(obj.getLong(\"tipoProducto\"));\n\t\t\t\t\tproducto.setProductoTipoProducto(tipoProducto);\n\t\t\t\t\tproducto.setProductoPrecio(obj.getLong(\"precio\"));\n\t\t\t\t\tproducto.setProductoFechaRegistro(new Date());\n\t\t\t\t\tproductoDao.update(producto);\n\t\t\t\t\trespuestaGeneral.setTipoRespuesta(\"0\");\n\t\t\t\t\trespuestaGeneral.setRespuesta(\"Nuevo producto registrado con éxito.\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t\t */\n\t\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t\t}else {\n\t\t\t\t\t/*\n\t\t\t\t\t * Si existe un producto con el mismo nombre, se devolvera una excepcion,\n\t\t\t\t\t * para indicarle al cliente.\n\t\t\t\t\t */\n\t\t\t\t\trespuestaGeneral.setTipoRespuesta(\"1\");\n\t\t\t\t\trespuestaGeneral.setRespuesta(\"Ya existe un producto con el nombre ingresado.\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t\t */\n\t\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t/*\n\t\t\t\t * Se realiza una busqueda del producto registrado para actualizar\n\t\t\t\t * para implementar los datos que no van a ser reemplazados ni actualizados\n\t\t\t\t */\n\t\t\t\tProducto productoBuscar = productoDao.buscarPorId(obj.getLong(\"id\"));\n\t\t\t\tproducto.setProductoId(obj.getLong(\"id\"));\n\t\t\t\tproducto.setProductoNombre(obj.getString(\"nombre\"));\n\t\t\t\tproducto.setProductoCantidad(obj.getLong(\"cantidad\"));\n\t\t\t\tproducto.setProductoTipoProducto(productoBuscar.getProductoTipoProducto());\n\t\t\t\tproducto.setProductoPrecio(obj.getLong(\"precio\"));\n\t\t\t\tproducto.setProductoFechaRegistro(productoBuscar.getProductoFechaRegistro());\n\t\t\t\tproductoDao.update(producto);\n\t\t\t\trespuestaGeneral.setTipoRespuesta(\"0\");\n\t\t\t\trespuestaGeneral.setRespuesta(\"Producto actualizado con exito.\");\n\t\t\t\t/*\n\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t */\n\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t}\n\t\t\t/*\n\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t */\n\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t} catch (Exception e) {\n\t\t\t/*\n\t\t\t * En caso de un error, este se mostrara en los logs\n\t\t\t * Sera enviada la respuesta correspondiente al cliente.\n\t\t\t */\n\t\t\tlogger.error(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n\t\t\t\t\t+ \"ProductoService.agregar, \"\n\t\t\t\t\t+ \", descripcion: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\trespuestaGeneral.setTipoRespuesta(\"1\");\n\t\t\trespuestaGeneral.setRespuesta(\"Error al ingresar los datos, por favor intente mas tarde.\");\n\t\t\t/*\n\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t */\n\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t}\n \t\tlogger.info(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n \t\t\t\t+ \", ProductoService.agregar resultado de agregar/actualizar un producto: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"public void setProducto(com.monitor.webService.VoProducto producto) {\r\n this.producto = producto;\r\n }",
"@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"public void iniciarBatalha() {\r\n\t\trede.iniciarPartidaRede();\r\n\t}",
"public void anadirObjetoRecolectable (ObjetoRecolectable pObjeto){\n\t\tif (pObjeto instanceof ObjetoClave){\n\t\t\tthis.anadirObjetoClave((ObjetoClave)pObjeto);\n\t\t}\n\t\telse if (pObjeto instanceof PiezaArmadura){\n\t\t\tthis.actualizarArmadura((PiezaArmadura)pObjeto);\n\t\t}\n\t}",
"public void actualizar_registro() {\n try {\n iC.nombre = fecha;\n\n String [] data = txtidReg.getText().toString().split(\":\");\n Long id = Long.parseLong(data[1].trim());\n\n int conteo1 = Integer.parseInt(cap_1.getText().toString());\n int conteo2 = Integer.parseInt(cap_2.getText().toString());\n int conteoT = Integer.parseInt(cap_ct.getText().toString());\n\n conteoTab cl = iC.oneId(id);\n\n conteoTab c = new conteoTab();\n\n c.setFecha(cl.getFecha());\n c.setEstado(cl.getEstado());\n c.setIdConteo(cl.getIdConteo());\n c.setIdSiembra(cl.getIdSiembra());\n c.setCama(cl.getCama());\n c.setIdBloque(cl.getIdBloque());\n c.setBloque(cl.getBloque());\n c.setIdVariedad(cl.getIdVariedad());\n c.setVariedad(cl.getVariedad());\n c.setCuadro(cl.getCuadro());\n c.setConteo1(conteo1);\n c.setConteo4(conteo2);\n c.setTotal(conteoT);\n c.setPlantas(cl.getPlantas());\n c.setArea(cl.getArea());\n c.setCuadros(cl.getCuadros());\n c.setIdUsuario(cl.getIdUsuario());\n if(cl.getEstado().equals(\"0\")) {\n iC.update(id, c);\n }else{\n Toast.makeText(this, \"El registro no se puede actualizar por que ya ha sido enviado\", Toast.LENGTH_LONG).show();\n }\n\n Intent i = new Intent(this,ActivityDetalles.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n }catch (Exception ex){\n Toast.makeText(this, \"exception al actualizar el registro \\n \\n\"+ex.toString(), Toast.LENGTH_SHORT).show();\n }\n }",
"public void saveProduct(View view) {\n String name = this.name.getText().toString();\n String desc = this.desc.getText().toString();\n String ref = this.ref.getText().toString();\n // Validamos que los campos del form no esten vacios\n if (name.equals(\"\")) {\n this.name.setError(\"Campo obligatorio\");\n } else if (desc.equals(\"\")) {\n this.desc.setError(\"Campo obligatorio\");\n } else if (ref.equals(\"\")) {\n this.ref.setError(\"Campo obligatorio\");\n } else {\n progressDialog.setTitle(\"Cargando...\");\n progressDialog.setMessage(\"Subiendo producto\");\n progressDialog.setCancelable(false);\n progressDialog.show();\n // Creamos un producto y le asignamos los valores del formulario\n final Product product = new Product();\n product.setId(UUID.randomUUID().toString());\n product.setName(name.toLowerCase());\n product.setDescription(desc);\n product.setRef(ref);\n // Si la uri de la imagen no esta vacia, guardamos la imagen en el store de la base de datos\n if (uriImage != null) {\n final StorageReference filePath = storageReference.child(\"images\").child(uriImage.getLastPathSegment());\n filePath.putFile(uriImage).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n // Si se ha subido la imagen correctamente, sacamos la url de descarga y se la setteamos a nuestro producto, y guardamos el producto en la base de datos\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n filePath.getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n String downloadUrl = task.getResult().toString();\n product.setImage(downloadUrl);\n databaseReference.child(\"productos\").child(product.getId()).setValue(product);\n progressDialog.dismiss();\n Intent mainActivityView = new Intent(AddProduct.this, MainActivity.class);\n AddProduct.this.startActivity(mainActivityView);\n Toast.makeText(AddProduct.this, \"¡Producto guardado con éxito!\", Toast.LENGTH_LONG).show();\n }\n });\n }\n });\n }\n }\n }",
"public void mudaQuantidadeAprovada(PedidoProduto pedidoProduto) {\n String sql = \"UPDATE pedidosprodutos SET QuantidadeAprovada=? WHERE Id=?\";\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, pedidoProduto.getQuantidadeAprovada());\n stmt.setInt(2, pedidoProduto.getId());\n stmt.execute();\n connFac.closeAll(rs, stmt, st, conn);\n } catch(SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n throw new RuntimeException(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n }\n }",
"public void setProducto(Long producto) {\n this.producto.set(producto);\n }",
"public void ModificarPrestamo(PrestamoFila pf) {\n this.conexion.ConectarBD();\n String consulta = \"update prestamos set IdSocio = ?, IdLibro = ?, FechaInicio = ?, FechaFin = ? where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del update\n this.pstm.setInt(1, pf.getIdSocio());\n this.pstm.setInt(2, pf.getIdLibro());\n this.pstm.setDate(3, new java.sql.Date(pf.getFechaInicio().getTime()));\n this.pstm.setDate(4, new java.sql.Date(pf.getFechaFin().getTime()));\n this.pstm.setInt(5, pf.getIdPrestamo());\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al modificar un Prestamo.\\n\"+e.toString());\n \n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n \n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD(); \n }"
] | [
"0.71605414",
"0.6420588",
"0.63913023",
"0.6346628",
"0.6295262",
"0.6270896",
"0.61532617",
"0.61507475",
"0.6043073",
"0.59752876",
"0.59724647",
"0.59678155",
"0.59532696",
"0.5952605",
"0.5921748",
"0.59196466",
"0.59062093",
"0.5867303",
"0.5866218",
"0.5846038",
"0.5837013",
"0.58356375",
"0.5819348",
"0.5817737",
"0.58102727",
"0.58073264",
"0.58037186",
"0.5802426",
"0.5779461",
"0.5750122",
"0.57482636",
"0.5741792",
"0.5741019",
"0.5731734",
"0.5730374",
"0.5722889",
"0.5715855",
"0.570249",
"0.5699443",
"0.5697577",
"0.56749326",
"0.56695473",
"0.56694156",
"0.565946",
"0.5655088",
"0.56528014",
"0.56456643",
"0.563742",
"0.563055",
"0.5625586",
"0.5604239",
"0.56040484",
"0.5601843",
"0.5601706",
"0.5598891",
"0.5588324",
"0.5586805",
"0.5584566",
"0.5576485",
"0.5572164",
"0.5566211",
"0.5560664",
"0.5560579",
"0.5556523",
"0.5543735",
"0.55396235",
"0.55282235",
"0.5524952",
"0.5523119",
"0.55221033",
"0.55196816",
"0.5518148",
"0.5514753",
"0.55135596",
"0.5513236",
"0.55090994",
"0.5508755",
"0.5507925",
"0.55068564",
"0.55029505",
"0.5502881",
"0.5501294",
"0.5498771",
"0.5498705",
"0.5497555",
"0.5493654",
"0.5488769",
"0.54886895",
"0.54871994",
"0.54867786",
"0.54836524",
"0.54835725",
"0.5483443",
"0.548322",
"0.54789555",
"0.5478851",
"0.5475551",
"0.5474757",
"0.547407",
"0.5473475"
] | 0.7920868 | 0 |
Elimina un Subproducto en la base de datos | public abstract void eliminarSubproducto(EntityManager sesion, Subproducto subproducto); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void eliminar(Producto producto) throws BusinessErrorHelper;",
"public void eliminaBD() {\r\n CBD.openConexion();\r\n //------Reune los datos de producto con id--------------//\r\n String A = CBD.getInveID(II.lblid.getText());\r\n String B[] = A.split(\",\");\r\n //------Reune los datos de producto con id--------------//\r\n //------Verifica si la cantidad es 0--------------//\r\n if (Integer.parseInt(B[5]) == 0) {\r\n //------Elimina--------------//\r\n if(CBD.deleteDBProd(\"[ID PRODUCTO]\", B[7])){\r\n JOptionPane.showMessageDialog(II, \"Producto eliminado\");\r\n }else{\r\n JOptionPane.showMessageDialog(II, \"Error producto no pudo ser eliminado\");\r\n }\r\n //------Elimina--------------//\r\n } else {\r\n JOptionPane.showMessageDialog(II, \"No puedes eliminar un producto si su existencia es mayor a 0\");\r\n }\r\n CBD.closeConexion();\r\n }",
"public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }",
"public void eliminar(Producto producto) throws IWDaoException;",
"@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}",
"public void eliminarDatos(EstructuraContratosDatDTO estructuraNominaSelect) {\n\t\t\n\t}",
"@Override\r\n\tpublic void eliminar(Long idRegistro) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void remover(Tipo tipo) {\n String sql = \"delete from tipos_servicos where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, tipo.getId());\r\n \r\n stmt.execute();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}",
"public void eliminar() throws RollbackException, SystemException, HeuristicRollbackException, HeuristicMixedException {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n String id = FacesUtil.getRequestParameter(\"idObj\");\n Tblobjeto o = (Tblobjeto) session.load(Tblobjeto.class, Short.parseShort(id));\n try {\n tx = (Transaction) session.beginTransaction();\n session.delete(o);\n tx.commit();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Informacion:\", \"Registro eliminado satisfactoriamente\"));\n } catch (HibernateException e) {\n tx.rollback();\n\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Un error ha ocurrido:\", e.getCause().getMessage()));\n } finally {\n session.close();\n populateTreeTable();\n UsuarioBean u = (UsuarioBean) FacesUtil.getBean(\"usuarioBean\");\n u.populateSubMenu();\n }\n }",
"@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}",
"public String eliminaSubAccertamento(){\n\t\t//informazioni per debug:\n\t\tsetMethodName(\"eliminaSubAccertamento\");\n\t\tdebug(methodName, \"uid da annullare--> \"+getUidSubDaEliminare());\n\t\t\n\t\tif(null!=model.getListaSubaccertamenti() && !model.getListaSubaccertamenti().isEmpty()){\n\t\t\t\n\t\t\t//itero la lista dei sub\n\t\t\tfor (int i = 0; i < model.getListaSubaccertamenti().size(); i++) {\n\t\t\t\tSubAccertamento sub = model.getListaSubaccertamenti().get(i);\n\t\t\t\t//se trovo il sub in questione:\n\t\t\t\tif(sub.getUid() == Integer.valueOf(getUidSubDaEliminare())){\n\t\t\t\t\t//lo rimuovo\n\t\t\t\t\tmodel.getListaSubaccertamenti().remove(i);\n\t\t\t\t} \t \n\t\t\t}\n\t\t\t//setto la nuova lista con il sub rimosso:\n\t\t\tmodel.setListaSubaccertamenti(model.getListaSubaccertamenti());\n\t\t\t\n\t\t\t//Fix per SIOPE JIRA SIAC-3913:\n\t\t\tAggiornaAccertamento requestAggiorna = convertiModelPerChiamataServizioAggiornaAccertamenti(true);\n\t\t\trequestAggiorna.getAccertamento().setCodSiope(model.getAccertamentoInAggiornamento().getCodSiope());\n\t\t\t//\n\t\t\t\n\t\t\t//chiamo il servizio di aggiorna che non avendo piu' quel sub in lista lo eliminera':\n\t\t\tAggiornaAccertamentoResponse response =\tmovimentoGestionService.aggiornaAccertamento(requestAggiorna);\n\t\t\t\n\t\t\t//analizzo l'esito del servizio:\n\t\t\tif(!response.isFallimento() && response.getAccertamento()!= null ){\n\t\t\t\t//Ottimizzazione richiamo ai servizi\n\t\t\t\tmodel.setAccertamentoRicaricatoDopoInsOAgg(response.getAccertamento());\n\t\t\t}else{\n\t\t\t\taddErrori(response.getErrori());\n\t\t\t\treturn INPUT;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//ricarico i dati:\n\t\tricaricaSubAccertamenti(true);\n\t\treturn SUCCESS;\n\t}",
"@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}",
"public void eliminar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.remove(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }",
"public void eliminar(Provincia provincia) throws BusinessErrorHelper;",
"@Override\n\tpublic boolean eliminar(Connection connection, Object DetalleSolicitud) {\n\t\tString query = \"DELETE FROM detallesolicitudes WHERE sysPK = ?\";\n\t\ttry {\t\n\t\t\tDetalleSolicitud detalleSolicitud = (DetalleSolicitud)DetalleSolicitud;\n\t\t\tPreparedStatement preparedStatement = (PreparedStatement) connection.prepareStatement(query);\n\t\t\tpreparedStatement.setInt(1, detalleSolicitud.getSysPk());\n\t\t\tpreparedStatement.execute();\n\t\t\treturn true;\n\t\t} catch (SQLException e) {\n\t\t\tNotificacion.dialogoException(e);\n\t\t\treturn false;\n\t\t}//FIN TRY/CATCH\t\n\t}",
"public void removerCarro() {\n\n if (carrosCadastrados.size() > 0) {//verifica se existem carros cadastrados\n listarCarros();\n System.out.println(\"Digite o id do carro que deseja excluir\");\n int idCarro = verifica();\n for (int i = 0; i < carrosCadastrados.size(); i++) {\n if (carrosCadastrados.get(i).getId() == idCarro) {\n if (carrosCadastrados.get(i).getEstado()) {//para verificar se o querto está sendo ocupado\n System.err.println(\"O carrp está sendo utilizado por um hospede nesse momento\");\n } else {\n carrosCadastrados.remove(i);\n System.err.println(\"cadastro removido\");\n }\n }\n\n }\n } else {\n System.err.println(\"Não existem carros cadastrados\");\n }\n }",
"public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }",
"@Override\n public void eliminarPropiedad(String pIdPropiedad) {\n try {\n bdPropiedad.manipulationQuery(\"DELETE FROM PROPIEDAD WHERE ID_PROPIEDAD = '\" + pIdPropiedad + \"'\");\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void eliminarProducto(HttpServletRequest request, HttpServletResponse response) {\n\t\tString codArticulo = request.getParameter(\"cArticulo\");\n\t\t// Borrar producto de la BBDD\n\t\ttry {\n\t\t\tmodeloProductos.borrarProducto(codArticulo);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Volver al listado con la info actualizada\n\t\tobtenerProductos(request, response);\n\n\t}",
"@Override\n\tpublic void eliminar(Seccion seccion) {\n\t\tentity.getTransaction().begin();\n\t\tentity.remove(seccion);\n\t\tentity.getTransaction().commit();\n\t}",
"public void EliminarPrestamo(Integer idPrestamo) {\n this.conexion.ConectarBD();\n String consulta = \"delete from prestamos where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del delete\n this.pstm.setInt(1, idPrestamo);\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al eliminar un Prestamo.\\n\"+e.toString());\n //System.out.println(\"Error al eliminar un Libro.\");\n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n //e.printStackTrace();\n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD();\n }",
"public RespuestaBD eliminarRegistro(int codigoFlujo, int secuencia) {\n/* 296 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 299 */ String s = \"delete from wkf_detalle where codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* 304 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 306 */ catch (Exception e) {\n/* 307 */ e.printStackTrace();\n/* 308 */ Utilidades.writeError(\"FlujoDetalleDAO:eliminarRegistro \", e);\n/* 309 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 311 */ return rta;\n/* */ }",
"public boolean EliminarProducto(int id) {\n boolean status=false;\n int res =0;\n try {\n conectar();\n res=state.executeUpdate(\"delete from producto where idproducto=\"+id+\";\");\n \n if(res>=1){\n status=true;\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return status;\n }",
"public void elimina(Long id) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n // Busca un conocido usando su llave primaria.\n\n final Conocido modelo = em.find(Conocido.class, id);\n\n if (modelo != null) {\n\n /* Si la referencia no es nula, significa que el modelo se encontró la\n\n * referencia no es nula y se elimina. */\n\n em.remove(modelo);\n\n }\n\n tx.commit();\n\n } finally {\n\n em.close();\n\n }\n\n }",
"@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}",
"protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tZonSecciData zonSecci = new ZonSecciData();\n\t\t\tzonSecci.setId(new Integer(claves.nextToken()));\n\t\t\t//zonSecci.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(zonSecci);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad ZonSecci\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad ZonSecci\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"ZonSecciLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}",
"@Override\n public void excluir(Pessoa pessoa) {\n String sql = \"DELETE FROM pessoa WHERE uuid=?\";\n try {\n this.conexao = Conexao.abrirConexao();\n PreparedStatement statement = conexao.prepareStatement(sql);\n statement.setLong(1, pessoa.getId());\n statement.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(PessoasJDBC.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n Conexao.fecharConexao(conexao);\n }\n\n }",
"public void eliminar(TipoDocumento tpDocu) {\n try {\n boolean verificarReLaboraldEnTpDocu = servReLaboral.buscarRegistroPorTpDocumento(tpDocu);\n if (verificarReLaboraldEnTpDocu) {\n MensajesFaces.informacion(\"No se puede eliminar\", \"Existen Datos Relacionados\");\n } else {\n servtpDocumento.eliminarTipoDocumento(tpDocu);\n tipoDocumento = new TipoDocumento();\n MensajesFaces.informacion(\"Eliminado\", \"Exitoso\");\n }\n } catch (Exception e) {\n MensajesFaces.advertencia(\"Error al eliminar\", \"detalle\" + e);\n }\n }",
"private static void removerProduto() throws Exception {\r\n int id;\r\n boolean erro, result;\r\n System.out.println(\"\\t** Remover produto **\\n\");\r\n System.out.print(\"ID do produto a ser removido: \");\r\n id = read.nextInt();\r\n if (indice_Produto_Cliente.lista(id).length != 0) {\r\n System.out.println(\"Esse produto não pode ser removido pois foi comprado por algum Cliente!\");\r\n } else {\r\n do {\r\n erro = false;\r\n System.out.println(\"\\nRemover produto?\");\r\n System.out.print(\"1 - SIM\\n2 - NÂO\\nR: \");\r\n switch (read.nextByte()) {\r\n case 1:\r\n result = arqProdutos.remover(id - 1);\r\n if (result) {\r\n System.out.println(\"Removido com sucesso!\");\r\n } else {\r\n System.out.println(\"Produto não encontrado!\");\r\n }\r\n break;\r\n case 2:\r\n System.out.println(\"\\nOperação Cancelada!\");\r\n break;\r\n default:\r\n System.out.println(\"\\nOpção Inválida!\\n\");\r\n erro = true;\r\n break;\r\n }\r\n } while (erro);\r\n }\r\n }",
"public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }",
"public void eliminarProyecto(int id) {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tplantilla.delete(\"http://localhost:5000/proyectos/\" + id);\n\t\t}",
"public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }",
"protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tCobGrupoUsuarCobraData cobGrupoUsuarCobra = new CobGrupoUsuarCobraData();\n\t\t\tcobGrupoUsuarCobra.setId(new Long(claves.nextToken()));\n\t\t\t//cobGrupoUsuarCobra.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(cobGrupoUsuarCobra);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"CobGrupoUsuarCobraLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}",
"public boolean eliminar(){\n\t\tString query = \"DELETE FROM Almacen WHERE Id_Producto = \"+this.getId();\n\t\tif(updateQuery(query)){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"void eliminarPedidosUsuario(String idUsuario);",
"@Override\n\tpublic void excluir(Produto entidade) {\n\n\t}",
"private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }",
"public void sepulsaeliminar(View view) {\n\t\tif(posicionArrayList !=-1) {\n\t\t\tarrayList.get(posicionArrayList);\n\n\t\t\tfinal DatabaseReference referenciaUseraBorrar=FirebaseDatabase.getInstance().getReference(\"users\").child(arrayList.get(posicionArrayList));\n\n\t\t\treferenciaUseraBorrar.removeValue(); //Elimina el campo del User de la BD\n\t\t\tarrayList.remove(posicionArrayList); //Elimina la posición correspondiente del ArrayList\n\t\t\tarrayAdapter.notifyDataSetChanged(); //Función que actualiza el arrayAdapter y lo dibuja de nuevo.\n\t\t\tToast.makeText(getApplicationContext(),\"Usuario Cuidador eliminado\",Toast.LENGTH_LONG).show();\n\n\t\t}else{\n\t\t\tToast.makeText(getApplicationContext(),\"No se ha seleccionado ningún elemento\",Toast.LENGTH_LONG).show();\n\t\t}\n\t}",
"@Transactional\r\n\t@Override\r\n\tpublic void eliminar(int idDistrito) {\n\t\tDistrito distrito = new Distrito();\r\n\t\tdistrito = em.getReference(Distrito.class, idDistrito);\r\n\t\tem.remove(distrito);\t\r\n\t}",
"@Override\n\tpublic void eliminar(Object T) {\n\t\tSeccion seccionE= (Seccion)T;\n\t\tif(seccionE!=null){\n\t\t\ttry{\n\t\t\tString insertTableSQL = \"update seccion set estatus=?\" +\"where codigo=? and estatus='A'\";\n\t\t\tPreparedStatement preparedStatement = conexion.prepareStatement(insertTableSQL);\n\t\t\tpreparedStatement.setString(1, \"I\");\n\t\t\tpreparedStatement.setString(2, seccionE.getCodigo());\n\t\t\tpreparedStatement.executeUpdate();\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"No se elimino el registro\");\n\t\t}\n\t\tSystem.out.println(\"Eliminacion exitosa\");\n\t}\n\n\t}",
"@Transactional\n void remove(DataRistorante risto);",
"@Override\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino el usuario de la bd\");\n\t}",
"@Override\n public void eliminarElemento(Object elemento) {\n database.delete(elemento);\n }",
"@Override\n\tpublic void remover(int idServico) throws SQLException {\n\t\t\n\t}",
"@Override\r\n\tpublic void remove(int codigoLivro) throws BaseDadosException {\n\t\t\r\n\t}",
"public void localizarEremoverProdutoCodigo(Prateleira prat){\r\n //instacia um auxiliar para procura\r\n Produto mockup = new Produto();\r\n int Codigo = Integer.parseInt(JOptionPane.showInputDialog(null,\"Forneca o codigo do produto a ser removido\" ));\r\n mockup.setCodigo(Codigo); \r\n \r\n //informa que caso encontre o produto remova o da arraylist\r\n boolean resultado = prat.getPrateleira().remove(mockup);\r\n if(resultado){\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" Removido\");\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" não encontrado\");\r\n }\r\n }",
"public void deleteIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENTDEL);\r\n\t\t\t\r\n\t\t\tpstmt.setString(1, i.getGiocatore());\r\n\t\t\tpstmt.setInt(2, i.getTorneo());\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tpstmt.execute();\r\n\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t}\r\n\r\n\t\t\tcon.close();\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n public void elminarVehiculo(String placa) {\n Connection conn = null;\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"delete from vehiculo where veh_placa=?\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setString(1, placa);\r\n int rowsDelete = statement.executeUpdate();\r\n if(rowsDelete > 0){\r\n JOptionPane.showMessageDialog(null, \"Registro eliminado de manera correcta\");\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(VehiculoDAOJDBCImpl.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"private void eliminar(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n Connection con = null;//Objeto para la conexion\r\n Statement sentencia = null;//Objeto para definir y ejecutar las consultas sql\r\n int resultado = 0;//resultado de las filas borradas sql\r\n String sql = \"\";\r\n try {\r\n\r\n //ESTABLECER CONEXION\r\n con = conBD.getCConexion();\r\n System.out.println(\"Conectado a BD...\");\r\n\r\n //OBTENER EL DATO A ELIMINAR\r\n String emailUsuario = request.getParameter(\"ID\");\r\n\r\n //Definición de Sentencia SQL\r\n sql = \"DELETE FROM USUARIOS WHERE semail='\" + emailUsuario + \"'\";\r\n\r\n //Ejecutar sentencia\r\n sentencia = con.createStatement();\r\n resultado = sentencia.executeUpdate(sql);\r\n System.out.println(\"Borrado exitoso !\");\r\n request.setAttribute(\"mensaje\", \"Registro borrado exitosamente !\");\r\n //cerrar la conexion\r\n //con.close();\r\n\r\n //listar de nuevo los datos\r\n todos(request, response);\r\n\r\n } catch (SQLException ex) {\r\n System.out.println(\"No se ha podido establecer la conexión, o el SQL esta mal formado \" + sql);\r\n request.getRequestDispatcher(\"/Error.jsp\").forward(request, response);\r\n }\r\n }",
"@Test\n\tpublic void eliminar() {\n\t\tGestionarComicPOJO gestionarComicPOJO = new GestionarComicPOJO();\n\t\tgestionarComicPOJO.agregarComicDTOLista(gestionarComicPOJO.crearComicDTO(\"1\", \"Dragon Ball Yamcha\",\n\t\t\t\t\"Planeta Comic\", TematicaEnum.AVENTURAS.name(), \"Manga Shonen\", 144, new BigDecimal(2100),\n\t\t\t\t\"Dragon Garow Lee\", Boolean.FALSE, LocalDate.now(), EstadoEnum.ACTIVO.name(), 20l));\n\t\tgestionarComicPOJO.agregarComicDTOLista(gestionarComicPOJO.crearComicDTO(\"2\", \"Captain America Corps 1-5 USA\",\n\t\t\t\t\"Panini Comics\", TematicaEnum.FANTASTICO.name(), \"BIBLIOTECA MARVEL\", 128, new BigDecimal(5000),\n\t\t\t\t\"Phillippe Briones, Roger Stern\", Boolean.FALSE, LocalDate.now(), EstadoEnum.ACTIVO.name(), 5l));\n\t\tgestionarComicPOJO.agregarComicDTOLista(gestionarComicPOJO.crearComicDTO(\"3\",\n\t\t\t\t\"The Spectacular Spider-Man v2 USA\", \"Panini Comics\", TematicaEnum.FANTASTICO.name(), \"MARVEL COMICS\",\n\t\t\t\t208, new BigDecimal(6225), \"Straczynski,Deodato Jr.,Barnes,Eaton\", Boolean.TRUE, LocalDate.now(),\n\t\t\t\tEstadoEnum.INACTIVO.name(), 0l));\n\n\t\tint tamañoAnterior = gestionarComicPOJO.getListaComics().size();\n\t\tgestionarComicPOJO.eliminarComicDTO(\"1\");\n\t\tAssert.assertEquals(gestionarComicPOJO.getListaComics().size(), tamañoAnterior - 1);\n\t}",
"private void eliminar() {\n\n int row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n int men = JOptionPane.showConfirmDialog(null, \"Estas seguro que deceas eliminar el registro?\", \"pregunta\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\n if (men == JOptionPane.YES_OPTION) {\n try {\n cdao.eliminar(cvo);\n cvo.setId_cliente(row);\n } catch (Exception e) {\n System.out.println(\"Mensaje eliminar\" + e.getMessage());\n }\n }\n }",
"private void excluirAction() {\r\n Integer i = daoPedido.excluir(this.pedidoVO);\r\n\r\n if (i != null && i > 0) {\r\n msg = activity.getString(R.string.SUCCESS_excluido, pedidoVO.toString());\r\n Toast.makeText(activity, msg + \"(\" + i + \")\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"DB_INFO\", \"Sucesso ao Alterar: \" + this.pedidoVO.toString());\r\n\r\n// this.adapter.remove(this.pedidoVO);\r\n this.refreshData(2);\r\n } else {\r\n msg = activity.getString(R.string.ERROR_excluir, pedidoVO.toString());\r\n Toast.makeText(activity, msg, Toast.LENGTH_SHORT).show();\r\n Log.e(\"DB_INFO\", \"Erro ao Excluir: \" + this.pedidoVO.toString());\r\n }\r\n }",
"@Override\n\tpublic void eliminar() {\n\t\t\n\t}",
"@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}",
"@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}",
"@Override\n\tpublic void eliminar() {\n\n\t}",
"public void borrar(Especialiadad espe,JTextField txtcodigo ){\r\n\t\tConnection con = null;\r\n\t\tStatement stmt = null;\r\n\t\tint result = 0;\r\n\t\t\r\n\t\tSystem.out.println(txtcodigo.getText());\r\n\t\tString sql = \"DELETE FROM Especialiadad \"\r\n\t\t\t\t+ \"WHERE codigo = \"+ txtcodigo.getText();\r\n\t\t\t\t\r\n\t\ttry {\r\n\t\t\tcon = ConexionBD.getConnection();\r\n\t\t stmt = con.createStatement();\r\n\t\t result = stmt.executeUpdate(sql);\r\n\t\t//\tPreparedStatement ps= con.prepareStatement(sql);\r\n\t\t // ps.setInt(1, espe.getCodigo());\r\n\t\t // ps.setString(2, espe.getNombre());\r\n\t\t \t\t \r\n\t\t \r\n\t\t// ps.executeUpdate();\r\n\t\t \r\n\t\t} catch (Exception e) {\r\n\t\t e.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tConexionBD.close(con);\r\n\t\t}\r\n\t\t}",
"public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;",
"public void borrarTodo(){\n diccionario.clear();\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Command\n\tpublic void eliminar(@BindingParam(\"documento\") TipoDocumento documentoSeleccionada){\n\n\t\tif (documentoSeleccionada == null) {\n\t\t\tClients.showNotification(\"Seleccione una opción de la lista.\");\n\t\t\treturn; \n\t\t}\n\n\t\tMessagebox.show(\"Desea eliminar el registro seleccionado?\", \"Confirmación de Eliminación\", Messagebox.YES | Messagebox.NO, Messagebox.QUESTION, new EventListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\tif (event.getName().equals(\"onYes\")) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().getTransaction().begin();\n\t\t\t\t\t\tdocumentoSeleccionada.setEstado(\"I\");\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().merge(documentoSeleccionada);\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().getTransaction().commit();;\n\t\t\t\t\t\t// Actualiza la lista\n\t\t\t\t\t\t//BindUtils.postGlobalCommand(null, null, \"Categoria.buscarPorPatron\", null);\n\t\t\t\t\t\tbuscar();\n\t\t\t\t\t\tClients.showNotification(\"Transaccion ejecutada con exito.\");\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().getTransaction().rollback();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t}",
"public int eliminar(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"DELETE FROM conftbc_producto WHERE idmodelo = ?\";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tps.setInt(1,producto.getModelo().getIdmodelo());\n\t\t\tint rpta = ps.executeUpdate();\t\t\n\t\t\tthis.objCnx.confirmarDB();\n\t\t\treturn rpta;\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally {\t\t\t\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}",
"void deleteSub();",
"public String vistaEliminar(String codaloja, String codactiv) {Alojamiento alojbusc = alojamientoService.find(codaloja);\n// Actividad actbusc = actividadService.find(codactiv);\n// Alojamiento_actividad aloact = new Alojamiento_actividad();\n// Alojamiento_actividad_PK aloact_pk = new Alojamiento_actividad_PK();\n// aloact_pk.setActividad(actbusc);\n// aloact_pk.setAlojamiento(alojbusc);\n// aloact.setId(aloact_pk);\n// \n// actividadAlojamientoService.remove(aloact);\n// \n// \n// \n return \"eliminarAsignacion\";\n }",
"@Override\r\n\tpublic boolean delete(Pilote obj) {\r\n\t\tboolean succes=true;\r\n\t\tString req = \"delete from \" + TABLE + \" where numPil= ?\" + \";\";\r\n\t\tPreparedStatement pst;\r\n\t\ttry {\r\n\t\t\tpst = Connexion.getInstance().prepareStatement(req);\r\n\t\t\tpst.setInt(1, obj.getNumPil());\r\n\t\t\tpst.executeUpdate();\r\n\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tsucces=false;\r\n\t\t\tSystem.out.println(\"Echec de la tentative delete pilote : \" + e.getMessage()) ;\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn succes;\r\n\t}",
"public static void eliminarEstudiante(String Nro_de_ID) {\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion Establecida\");\r\n Statement sentencia = conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"delete from estudiante where Nro_de_ID = '\" + Nro_de_ID + \"'\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n }",
"void eliminar(PK id);",
"@Override\n public boolean eliminar(T dato) {\n if (esVacio())\n return (false); \n super.setRaiz(buscarAS(dato));\n int cmp = ((Comparable)dato).compareTo(super.getRaiz().getInfo()); \n //Si se encontro el elemento\n if (cmp==0){\n if (super.getRaiz().getIzq()==null){\n super.setRaiz(super.getRaiz().getDer());\n } \n else {\n NodoBin<T> x = super.getRaiz().getDer();\n super.setRaiz(super.getRaiz().getIzq());\n super.setRaiz(biselar(super.getRaiz(), dato));\n super.getRaiz().setDer(x);\n }\n return (true);\n }\n //El dato no fue encontrado\n return (false);\n }",
"public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }",
"@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}",
"public boolean eliminarproducto(ProductoDTO c) {\r\n \r\n try {\r\n PreparedStatement ps;\r\n ps = conn.getConn().prepareStatement(SQL_DELETE);\r\n ps.setInt(1, c.getId());\r\n\r\n if (ps.executeUpdate() > 0) {\r\n\r\n JOptionPane.showMessageDialog(null, \"Prudcto eliminado exitosamente\");\r\n return true;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n JOptionPane.showMessageDialog(null, \"No se ha podido registrar\");\r\n return false;\r\n\r\n }",
"@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }",
"public VistaBorrar() throws SQLException {\n initComponents();\n Conexion.getInstance();\n \n llenarTabla();\n \n //jTable1.setModel(defaultTableModel);\n //controladorListar = new ControladorListar();\n //ArrayList<Pelicula> listPelicula=controladorListar.getListadoPeliculaEliminar();\n //Object[] fila=new Object[2];\n //for(int x=0; x<listPelicula.size(); x++){\n // fila[0]=listPelicula.get(x).getCodigo();\n // fila[1]=listPelicula.get(x).getNombre();\n // defaultTableModel.addRow(fila);\n \n }",
"@DELETE\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@Path(\"eliminarPrestamo\")\n\tpublic String eliminarPrestamo(\n\t\t@QueryParam(\"idObjeto\")int idObj, \n\t\t@QueryParam(\"usuario\")String usuario) {\n\ttry {\n\t\t//objetoBL.eliminarObjeto(usuario, idObjeto);//Se llama el metodo desde objetoBL\n\t\tprestamoBL.eliminarPrestamo(idObj, usuario);\n\t}catch(ExceptionController e) {\n\t\tlog.error(\"Error al eliminar objeto\");\n\t\te.getMessage();\n\t}\n\tString json = new Gson().toJson(\"listo\");\n\treturn json;\n\t}",
"public void remove(Aluno a) {\n\t\ttry {\n\t\t\tConnection con = DBUtil.getInstance().getConnection();\n\t\t\tPreparedStatement stmt = con.prepareStatement(\"DELETE FROM Aluno WHERE idAluno = ? \");\n\t\t\tstmt.setInt(1, a.getNumero());\n\t\t\tstmt.executeUpdate();\n\t\t\tJOptionPane.showMessageDialog(null,\"Removido com sucesso!\");\n\t\t} \n\t\tcatch(com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Numero ja existe\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\t catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Erro no Sql, verifique a senha, ou o banco\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n\n\t\t\t}\n\n\t\t}",
"public void deleteTbagendamento() {\n\n if (agendamentoLogic.removeTbagendamento(tbagendamentoSelected)) {\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento removido com sucesso.\");\n listTbagendamentos = agendamentoLogic.findAllTbagendamentoFromCurrentDay();\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falha ao remover agendamento.\");\n }\n\n }",
"@Override\n public boolean excluirRegistro() {\n this.produto.excluir();\n return true;\n }",
"public void eliminarProductoCliente(Producto producto) throws Exception{\n try{\n if(!productosEnVenta.contains(producto)){\n throw new productoNoRegistrado();\n }\n productosEnVenta.remove(producto);\n UtilidadJavaPop.eliminarProducto(producto);\n \n \n }catch(productoNoRegistrado pNR){\n throw pNR;\n }catch(NullPointerException npe){\n throw npe;\n }catch(Exception e){\n throw e;\n }\n \n }",
"public void vaciarCarrito() {\r\n String sentSQL = \"DELETE from carrito\";\r\n try {\r\n Statement st = conexion.createStatement();\r\n st.executeUpdate(sentSQL);\r\n st.close();\r\n LOG.log(Level.INFO,\"Carrito vaciado\");\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n \tLOG.log(Level.WARNING,e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"public void eliminar(Long id) throws AppException;",
"public void eliminarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdGrado(17);\n \tString respuesta = negocio.eliminarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }",
"public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);",
"public void eliminarVenta(int codVenta) throws Exception {\n if (this.ventas.containsKey(codVenta)) {\r\n this.ventas.remove(codVenta);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"La Venta no Existe\");\r\n }\r\n //return retorno;\r\n }",
"void eliminarPedido(UUID idPedido);",
"@Override\r\n\tpublic void excluir(Evento evento) {\n\t\trepository.delete(evento);\r\n\t}",
"public void eliminar(DetalleArmado detallearmado);",
"Boolean remover(String userName, Long idProducto);",
"public void eliminarUsuario(Long idUsuario);",
"public String eliminar()\r\n/* 121: */ {\r\n/* 122: */ try\r\n/* 123: */ {\r\n/* 124:149 */ this.servicioDimensionContable.eliminar(this.dimensionContable);\r\n/* 125:150 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_eliminar\"));\r\n/* 126:151 */ cargarDatos();\r\n/* 127: */ }\r\n/* 128: */ catch (Exception e)\r\n/* 129: */ {\r\n/* 130:153 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_eliminar\"));\r\n/* 131:154 */ LOG.error(\"ERROR AL ELIMINAR DATOS\", e);\r\n/* 132: */ }\r\n/* 133:156 */ return \"\";\r\n/* 134: */ }",
"void eliminar(Long id);",
"public void eliminarMensaje(InfoMensaje m) throws Exception;",
"@Override\n public void deletePartida(String idPartida) {\n template.opsForHash().delete(idPartida, \"jugador1\");\n template.opsForHash().delete(idPartida, \"jugador2\");\n template.opsForSet().remove(\"partidas\",idPartida);\n }",
"@Override\r\n\tpublic void excluir(int id) throws Exception {\n\t\t\r\n\t}",
"public void eliminarDatosEnEntidad(String entidad, ArrayList entidadencontrada)\r\n\t{\r\n\t\tif(entidad.equalsIgnoreCase(\"Rol\"))\r\n\t\t{\r\n\t\t\tRol encontrado = (Rol)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t RolBD.eliminar(encontrado.getIdrol(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Prueba\"))\r\n\t\t{\r\n\t\t\tPrueba encontrado = (Prueba)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \tString nombrepru = encontrado.getNombre();\r\n\t \tif(nombrepru.equalsIgnoreCase(\"Vacante Exclusivo\") || nombrepru.equalsIgnoreCase(\"Vacante Multiple\") || nombrepru.equalsIgnoreCase(\"Prueba Libre\"))\r\n\t \t{\r\n\t \t\tJOptionPane.showMessageDialog(this,\"La prueba \"+nombrepru+\" no puede ser eliminada por ser parte importante de la base del conocimiento.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\ttry\r\n\t\t\t {\r\n\t\t\t Conector conector = new Conector();\r\n\t\t\t conector.iniciarConexionBaseDatos();\r\n\t\t\t PruebaBD.eliminar(encontrado.getIdprueba(), conector);\r\n\t\t\t conector.terminarConexionBaseDatos();\r\n\t\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t\t }\r\n\t\t\t catch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t\t}\r\n\t \t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Pregunta\"))\r\n\t\t{\r\n\t\t\tPregunta encontrado = (Pregunta)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t PreguntaBD.eliminar(encontrado.getIdpregunta(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Escala\"))\r\n\t\t{\r\n\t\t\tEscala encontrado = (Escala)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t EscalaBD.eliminar(encontrado.getIdescala(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Competencia\"))\r\n\t\t{\r\n\t\t\tCompetencia encontrado = (Competencia)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t CompetenciaBD.eliminar(encontrado.getIdcompetencia(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Caracteristica\"))\r\n\t\t{\r\n\t\t\tCaracteristica encontrado = (Caracteristica)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t CaracteristicaBD.eliminar(encontrado.getIdcaracteristica(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t}",
"public void eliminarUsuario(String id) throws BLException;",
"public void delete(Amministratore a){\r\n\tEntityManagerFactory emf= Persistence.createEntityManagerFactory(\"esercitazione-unit\");\r\n\tthis.em= emf.createEntityManager();\r\n\tEntityTransaction et= em.getTransaction();\r\n\tet.begin();\r\n\tem.remove(em.contains(a)? a: em.merge(a));\r\n\tet.commit();\r\n\tem.close();\r\n\temf.close();\r\n\t}",
"public void excluirConta(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException ;",
"@Override\r\n\tpublic void eliminar() {\n\t\ttab_nivel_funcion_programa.eliminar();\r\n\t\t\r\n\t}",
"@Override\n\tpublic void delete(int codigo) {\n\t\tSystem.out.println(\"Borra el empleado con \" + codigo + \" en la BBDD.\");\n\t}",
"@Override\n\tpublic int delete(Subordination entity) throws DBOperationException {\n\t\tPreparedStatement statement = null;\n\t\tint result;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(SUBORDINATION_DELETE_ID);\n\t\t\tstatement.setInt(1, entity.getId());\n\t\t\tresult = statement.executeUpdate();\n\t\t\tstatement.close();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DBOperationException(\"Subordination not deleted. DB error.\", e);\n\t\t} \n\t\treturn result;\n\t}",
"public void eliminar_datos_de_tabla(String tabla_a_eliminar){\n try {\n Class.forName(\"org.postgresql.Driver\");\n Connection conexion = DriverManager.getConnection(cc);\n Statement comando = conexion.createStatement();\n //Verificar dependiendo del tipo de tabla lleva o no comillas\n \n String sql=\"delete from \\\"\"+tabla_a_eliminar+\"\\\"\";\n \n comando.executeUpdate(sql);\n \n comando.close();\n conexion.close();\n } catch(ClassNotFoundException | SQLException e) {\n System.out.println(e.getMessage());\n }\n }"
] | [
"0.71182114",
"0.7061118",
"0.6992356",
"0.6954352",
"0.69071454",
"0.6896218",
"0.6832707",
"0.6825208",
"0.6805964",
"0.68047345",
"0.6746262",
"0.6715274",
"0.6713356",
"0.67106104",
"0.6632105",
"0.663209",
"0.6621044",
"0.6615705",
"0.66148865",
"0.661238",
"0.6597068",
"0.6585431",
"0.65695465",
"0.656926",
"0.6539311",
"0.65314865",
"0.65189034",
"0.65113914",
"0.650689",
"0.65027463",
"0.6497284",
"0.6488009",
"0.6479514",
"0.64730835",
"0.6463228",
"0.6432412",
"0.6430886",
"0.64297503",
"0.6411472",
"0.6410327",
"0.6402312",
"0.6393409",
"0.639194",
"0.6385994",
"0.6375728",
"0.6370405",
"0.6368773",
"0.6368209",
"0.63623977",
"0.6360585",
"0.6354182",
"0.6353119",
"0.6331729",
"0.63307035",
"0.63307035",
"0.63239884",
"0.632276",
"0.6321358",
"0.631925",
"0.6310476",
"0.6308902",
"0.630682",
"0.6303757",
"0.6298672",
"0.629418",
"0.6292803",
"0.6290075",
"0.6286421",
"0.62750995",
"0.62746376",
"0.6269719",
"0.6269352",
"0.626319",
"0.6262291",
"0.62576425",
"0.62562937",
"0.6248868",
"0.6246948",
"0.6243572",
"0.6241743",
"0.6237282",
"0.62333983",
"0.62155205",
"0.62134427",
"0.621053",
"0.6207374",
"0.6207285",
"0.6203628",
"0.6201181",
"0.61983585",
"0.6197603",
"0.6192589",
"0.6192286",
"0.61908096",
"0.618943",
"0.6188353",
"0.6187115",
"0.61825776",
"0.61720264",
"0.61671704"
] | 0.7989711 | 0 |
Gets the "Get_Status_All_Monitors" element | public net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors getGetStatusAllMonitors()
{
synchronized (monitor())
{
check_orphaned();
net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors target = null;
target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().find_element_user(GETSTATUSALLMONITORS$0, 0);
if (target == null)
{
return null;
}
return target;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors addNewGetStatusAllMonitors()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors target = null;\r\n target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().add_element_user(GETSTATUSALLMONITORS$0);\r\n return target;\r\n }\r\n }",
"public void setGetStatusAllMonitors(net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors getStatusAllMonitors)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors target = null;\r\n target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().find_element_user(GETSTATUSALLMONITORS$0, 0);\r\n if (target == null)\r\n {\r\n target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().add_element_user(GETSTATUSALLMONITORS$0);\r\n }\r\n target.set(getStatusAllMonitors);\r\n }\r\n }",
"int getMonitors();",
"com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetMonitors();",
"@GetMapping()\n @ApiOperation(value = \"Get all monitors for the authenticated user\")\n public List<BaseMonitor> getAllMonitors(Principal principal) {\n User user = userRepository.findUserByUsername(principal.getName());\n return monitorRepository.findAllByUser(user);\n }",
"public List<TorrentStatus> status() {\n torrent_status_vector v = alert.getStatus();\n int size = (int) v.size();\n\n List<TorrentStatus> l = new ArrayList<>(size);\n for (int i = 0; i < size; i++) {\n l.add(new TorrentStatus(v.get(i)));\n }\n\n return l;\n }",
"public java.util.List<MonitoringOutput> getMonitoringOutputs() {\n return monitoringOutputs;\n }",
"public String getMonitoringState() {\n StringBuilder sb = new StringBuilder();\n sb.append(queueManager.getMonitoringInfo());\n return sb.toString();\n }",
"public List<String> getBroadcastStatus() {\n\t\treturn null;\n\t}",
"public boolean[] getStatus()\n {\n\t return online;\n }",
"public String getStatus()\n\t\t{\n\t\t\tElement statusElement = XMLUtils.findChild(mediaElement, STATUS_ELEMENT_NAME);\n\t\t\treturn statusElement == null ? null : statusElement.getTextContent();\n\t\t}",
"public static void getWatch() {\n for ( String nodeId : getNodes() ){\n Wearable.MessageApi.sendMessage(\n mGoogleApiClient, nodeId, \"GET_WATCH\", new byte[0]).setResultCallback(\n new ResultCallback<MessageApi.SendMessageResult>() {\n @Override\n public void onResult(MessageApi.SendMessageResult sendMessageResult) {\n if (!sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"Failed to send message with status code: \"\n + sendMessageResult.getStatus().getStatusCode());\n } else if (sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"onResult successful!\");\n }\n }\n }\n );\n }\n }",
"public static void monitoring(){\n\t\tWebSelector.click(Xpath.monitoring);\n\t}",
"public static void getLightStatus()\n\t{\n\t\ttry\n\t\t{\n\t\t\tArrayList<NameValuePair> nameValuePairs1 = new ArrayList<NameValuePair>();\n\t\t\tnameValuePairs1.add(new BasicNameValuePair(\"userID\",String.valueOf(Thermo_main.userID)));\n\t\t\tString httpPoststring = \"http://\"+Thermo_main.ip_addr_server+\"/getLightStatus_java.php\";\n\t\t\t\n\t\t\t//String httpPostSetString = \"http://\"+Thermo_main.ip_addr_server+\"/setEnergy.php\";\n\t\t\t//Thermo_main.help.setResult(nameValuePairs1, httpPostSetString);\n\t\t\t\n\t\t\tString result = Thermo_main.help.getResult(nameValuePairs1,httpPoststring);\n\t\t\tJSONArray array = new JSONArray(result);\n\n\t\t\tfor(int n =0; n< array.length(); n++)\n\t\t\t{\n\t\t\t\tJSONObject objLight = array.getJSONObject(n);\n\t\t\t\troom_new.add(objLight.getInt(\"room\")); \n\t\t\t\tlight_status_new.add(objLight.getString(\"light_status\"));\n\t\t\t\tdimmer_status_new.add(objLight.getString(\"dimmer_status\"));\n\t\t\t}\n\t\t}catch(Exception e) {}\n\t}",
"@GET\n\t@Path(\"/status\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getStatus() {\n\t\treturn new JSONObject().put(\"currFloor\", Constants.currFloor).put(\"movingState\", Constants.movingState).toString();\n\t}",
"public java.util.List<entities.Torrent.NodeReplicationStatus> getNodeStatusListList() {\n if (nodeStatusListBuilder_ == null) {\n return java.util.Collections.unmodifiableList(nodeStatusList_);\n } else {\n return nodeStatusListBuilder_.getMessageList();\n }\n }",
"String getSwstatus();",
"List<TopicStatus> getAll();",
"public List<Monitor> retrieveMonitorsForServer(ServerDetail serverDetail) {\n List<Monitor> monitors = new ArrayList<Monitor>();\n ArrayList<Class> monitorClasses = (ArrayList<Class>) availableMonitors.getMonitorList();\n try{\n for (Class klass: monitorClasses){\n Monitor obj = (Monitor) klass.newInstance();\n // Set default variables for Monitors\n obj.serverDetail = serverDetail;\n obj.realtimeThoth = realTimeThoth;\n obj.shrankThoth = historicalDataThoth;\n obj.mailer = mailer;\n monitors.add(obj);\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n return monitors;\n }",
"public java.util.List<String> getStatuses() {\n return statuses;\n }",
"public String getAllRunningServices() {\n return \"\";\n }",
"public java.util.List<java.lang.Integer>\n getStatusList() {\n return status_;\n }",
"List<StatusListener> mo9950b();",
"public String getAvailableMetrics(\n\t\t\tString serviceId,\n\t\t\tString monitoredElementID) throws EpsException {\n\n\t\tResponse response = client.target(getBaseUri())\n\t\t\t\t.path(GET_DATA_LASTX_PATH)\n\t\t\t\t.resolveTemplate(\"serviceId\", serviceId)\n\t\t\t\t.queryParam(\"monitoredElementID\", monitoredElementID)\n\t\t\t\t.request(MediaType.APPLICATION_XML)\n\t\t\t\t.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML)\n\t\t\t\t.get();\n\n\t\tprocessResponseStatus(response);\n\n\t\tString result = response.readEntity(String.class);\n\n\t\tLOG.info(ln + \"getAvailableMetrics '{}'. Response: '{}'\", serviceId, result);\n\n\t\treturn result;\n\t}",
"java.util.List<entities.Torrent.NodeReplicationStatus>\n getNodeStatusListList();",
"public MonitorType getMonitorType() {\n return monitorType;\n }",
"public com.isurveysoft.www.servicesv5.Result[] getScreenResults() {\n return screenResults;\n }",
"@GET\n @Path(\"/status\")\n @Produces(MediaType.TEXT_PLAIN)\n public String status() {\n Device device = getDevice();\n try {\n StreamingSession session = transportService.getSession(device.getId());\n return \"Status device:[\" + device.getId() + \"]\" + \" session [\" + session.toString() + \"]\";\n } catch (UnknownSessionException e) {\n return e.getMessage();\n }\n }",
"java.util.List<online_info>\n getInfoList();",
"public java.util.List<entities.Torrent.NodeReplicationStatus.Builder>\n getNodeStatusListBuilderList() {\n return getNodeStatusListFieldBuilder().getBuilderList();\n }",
"public ArrayList<StatusInfo> getStatusInfoList() {\n return this.statusInfoList;\n }",
"public Integer getMonitorNum() {\n return monitorNum;\n }",
"public List<String> getCommandStatus() {\n\t\tList<Device> devices = DeviceClientSingleton.getDeviceList();\r\n\t\tList<String> commandStatus = new ArrayList<String>();\r\n\t\tfor (int i = 0; i < devices.size(); i++) {\r\n\t\t\tString deviceData = DeviceClientSingleton.getDeviceData(devices.get(i).getDeviceId());\r\n\t\t\tcommandStatus.add(deviceData);\r\n\t\t\tif ((!deviceData.equals(\"\")) && (!deviceData.equals(\" \"))) {\r\n\t\t\t\tDeviceClientSingleton.removeDeviceData(devices.get(i).getDeviceId());\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn commandStatus;\r\n\t}",
"@Override\n public List<Report> getStatusList(){\n List<Report> statusList = null;\n statusList = adminMapper.getStatusList();\n return statusList;\n }",
"public String getStatus() {\r\n if (status == null)\r\n status = cells.get(7).findElement(By.tagName(\"div\")).getText();\r\n return status;\r\n }",
"public List<TestNotification> GetByStatus() {\n\t\treturn null;\n\t}",
"public List<StatusEntry> status() \n \tthrows CorruptObjectException, IOException {\n \t\treturn status(false, false);\n \t}",
"public org.apache.xmlbeans.XmlInt xgetStatus()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(STATUS$12, 0);\n return target;\n }\n }",
"public String getCurrentStatusMessage()\n {\n OperationSetPresence presenceOpSet\n = protocolProvider.getOperationSet(OperationSetPresence.class);\n\n return presenceOpSet.getCurrentStatusMessage();\n }",
"public String getMonitorName() {\n return this.monitorName;\n }",
"private String getTstatStatusMessage() {\n\n String thStatusMsg = null;\n WebElement modeDialog = getElement(getDriver(), By.cssSelector(MODEL_DIALOG), TINY_TIMEOUT);\n if (modeDialog.isDisplayed()) {\n WebElement modeMessage = getElementBySubElement(getDriver(), modeDialog,\n By.className(ERROR_MODEBOX), TINY_TIMEOUT);\n thStatusMsg = getElementBySubElement(getDriver(), modeMessage,\n By.className(MODEL_LABEL), TINY_TIMEOUT).getText();\n setLogString(\"Location status message:\" + thStatusMsg, true, CustomLogLevel.HIGH);\n }\n return thStatusMsg;\n }",
"boolean isMonitoringEnabled();",
"org.apache.xmlbeans.XmlString xgetStatus();",
"public List<WatchRecord> getWatchList() throws Exception {\r\n List<WatchRecord> watchList = new Vector<WatchRecord>();\r\n List<WatchRecordXML> chilluns = this.getChildren(\"watch\", WatchRecordXML.class);\r\n for (WatchRecordXML wr : chilluns) {\r\n watchList.add(new WatchRecord(wr.getPageKey(), wr.getLastSeen()));\r\n }\r\n return watchList;\r\n }",
"String[] getAllStatus() {\n String[] toReturn = new String[allStates.length];\n for (int i = 0; i < toReturn.length; i++) {\n toReturn[i] = context.getString(allStates[i]);\n }\n return toReturn;\n }",
"public String getSTATUS() {\r\n return STATUS;\r\n }",
"public String getSTATUS() {\r\n return STATUS;\r\n }",
"public String getSTATUS() {\r\n return STATUS;\r\n }",
"public String getSTATUS() {\r\n return STATUS;\r\n }",
"public String getSTATUS() {\r\n return STATUS;\r\n }",
"@GetMapping(\"/{monitor_id}/status\")\n @ApiOperation(value = \"Status of the monitor with give monitor id. If monitor id is not valid then returns null\")\n public MonitorLog getMonitorStatus(@PathVariable(\"monitor_id\") long monitorId, Principal principal) {\n return monitorLogRepository.findTopByMonitorIdAndUsernameOrderByCreationTimeDesc(monitorId,\n principal.getName());\n }",
"public MonitoredElementMonitoringSnapshot getMonitoringData(String serviceId) throws EpsException {\n\n\t\tResponse response = client.target(getBaseUri())\n\t\t\t\t.path(DATA_PATH)\n\t\t\t\t.resolveTemplate(\"serviceId\", serviceId)\n\t\t\t\t.request(MediaType.APPLICATION_XML)\n\t\t\t\t.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_XML)\n\t\t\t\t.get();\n\n\t\tprocessResponseStatus(response);\n\n\t\tMonitoredElementMonitoringSnapshot result = response.readEntity(MonitoredElementMonitoringSnapshot.class);\n\n\t\tLOG.info(ln + \"getMonitoringData '{}'. Response: '{}'\", serviceId, result);\n\n\t\treturn result;\n\t}",
"@java.lang.Override\n public java.util.List<entities.Torrent.NodeReplicationStatus> getNodeStatusListList() {\n return nodeStatusList_;\n }",
"public Object getMonitor() {\n\t\treturn this.monitor;\n\t}",
"public List<Events> getAllSystemEventsListForAll();",
"public java.util.List<? extends entities.Torrent.NodeReplicationStatusOrBuilder>\n getNodeStatusListOrBuilderList() {\n if (nodeStatusListBuilder_ != null) {\n return nodeStatusListBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(nodeStatusList_);\n }\n }",
"public static String getAll() {\n Result r = new Result();\n int status = 0;\n if((status = doGetList(r)) != 200) return \"Error from server \"+ status;\n return r.getValue();\n }",
"public java.util.List<java.lang.Integer>\n getStatusList() {\n return java.util.Collections.unmodifiableList(status_);\n }",
"public Collection<MetricInfo> listMetrics() {\n if (!registeredMetrics.isEmpty()) {\n return registeredMetrics.values();\n }\n return null;\n }",
"public List<Invoke> getNotification() {\n return getInvoke();\n }",
"public ServerStatus[] getServerStatus() {\r\n ServerStatus[] toReturn = new ServerStatus[0];\r\n\r\n String[] paramFields = {\"item_delimiter\", \"value_delimiter\"};\r\n SocketMessage request = new SocketMessage(\"admin\", \"server_status\",\r\n SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\", paramFields);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"value_delimiter\", VALUE_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0201\", \"couldn't get server status\");\r\n } else {\r\n wrapError(\"APIL_0201\", \"couldn't get server status\");\r\n }\r\n return toReturn;\r\n } else {\r\n String serversString = response.getValue(\"servers\");\r\n StringTokenizer tokenizer = new StringTokenizer(serversString, ITEM_DELIMITER);\r\n toReturn = new ServerStatus[tokenizer.countTokens()];\r\n try {\r\n for (int i = 0; i < toReturn.length; i++) {\r\n String itemString = tokenizer.nextToken();\r\n StringTokenizer itemTokenizer = new StringTokenizer(itemString, VALUE_DELIMITER);\r\n String ip = itemTokenizer.nextToken();\r\n String portString = itemTokenizer.nextToken();\r\n String aliveString = itemTokenizer.nextToken();\r\n String timeString = itemTokenizer.nextToken();\r\n int port = Integer.parseInt(portString.trim());\r\n boolean alive = \"y\".equals(aliveString);\r\n long time = Tools.parseTime(timeString.trim());\r\n toReturn[i] = new ServerStatus(ip, port, time, alive);\r\n }\r\n } catch (Exception e) {\r\n setError(\"APIL_0202\", \"error in parsing status string: \" + serversString);\r\n return new ServerStatus[0];\r\n }\r\n }\r\n\r\n return toReturn;\r\n }",
"public String getLstStatus() {\n return lstStatus;\n }",
"public java.lang.String getDOCKSListResult() {\r\n return localDOCKSListResult;\r\n }",
"public Integer getSmsStatus() {\r\n return smsStatus;\r\n }",
"public String getUiStatus() {\n\t\tif (switchInfo.getType().compareTo(\"thermostat\") == 0) {\r\n\t\t\ttry {\r\n\t\t\t\tDouble tmp = new Double((String) myISY.getCurrValue(myISY.getNodes().get(switchInfo.getSwitchAddress()),\r\n\t\t\t\t\t\tInsteonConstants.DEVICE_STATUS));\r\n\t\t\t\ttmp = tmp / 2;\r\n\t\t\t\treturn tmp.toString();\r\n\t\t\t} catch (NoDeviceException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (NullPointerException e) {\r\n\t\t\t}\r\n\t\t} else if ((switchInfo.getType().compareTo(\"light\") == 0)\r\n\t\t\t\t|| (switchInfo.getType().compareTo(\"circulator\") == 0)) {\r\n\t\t\ttry {\r\n\t\t\t\tDouble tmp = new Double((String) myISY.getCurrValue(myISY.getNodes().get(switchInfo.getSwitchAddress()),\r\n\t\t\t\t\t\tInsteonConstants.DEVICE_STATUS));\r\n\t\t\t\ttmp = tmp / 255 * 100;\r\n\t\t\t\tif (tmp == 0)\r\n\t\t\t\t\treturn \"OFF\";\r\n\t\t\t\telse if (tmp == 100)\r\n\t\t\t\t\treturn \"ON\";\r\n\t\t\t\treturn \"ON \" + tmp + \"%\";\r\n\t\t\t} catch (NoDeviceException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (NullPointerException e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}",
"@Override\n public CompositeData getAllMonitorCompositeData() {\n return allMonitorCompositeData;\n }",
"public List<Device> getRunningDevices();",
"public static ArrayList<Display> getDisplays() { return displays; }",
"public int getStatus()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(STATUS$12, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }",
"public void getSystemStatus() throws Exception\r\n\t{\r\n\t\tsystemDump.delete(0, systemDump.length());\r\n\r\n\t\tboolean needAlarm = memoryLogging();\r\n\r\n\t\tif (Database.appDatasource != null)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Database connection status: \\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number database connection\\t\\t\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number busy database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumBusyConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumIdleConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumUnclosedOrphanedConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tString queueWarningMessage = \"\";\r\n\r\n\t\tsystemDump.append(\"\\r\\n\");\r\n\t\tsystemDump.append(\"Local queue status: \\r\\n\");\r\n\r\n\t\tfor (String key : QueueFactory.localQueues.keySet())\r\n\t\t{\r\n\t\t\tLocalQueue localQueue = QueueFactory.getLocalQueue(key);\r\n\r\n\t\t\tsystemDump.append(\"Local queue (\");\r\n\t\t\tsystemDump.append(key);\r\n\t\t\tsystemDump.append(\"): \");\r\n\t\t\tsystemDump.append(localQueue.getSize());\r\n\r\n\t\t\tif (localQueue.getMaxSize() > 0)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"/\");\r\n\t\t\t\tsystemDump.append(localQueue.getMaxSize());\r\n\t\t\t}\r\n\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\t\tif (QueueFactory.getTotalLocalPending() > 0)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"Total pending counter : \");\r\n\t\t\tsystemDump.append(QueueFactory.getTotalLocalPending());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tif (queueDispatcherEnable)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Remote queue status: \\r\\n\");\r\n\r\n\t\t\tQueueSession session = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tsession = getQueueSession();\r\n\r\n\t\t\t\tfor (int j = 0; j < externalQueues.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (externalQueues[j].equals(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tString queueName = externalQueues[j];\r\n\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tQueue checkQueue = QueueFactory.getQueue(queueName);\r\n\r\n\t\t\t\t\t\tint size = QueueFactory.getQueueSize(session, checkQueue);\r\n\r\n\t\t\t\t\t\tQueueFactory.queueSnapshot.put(queueName, new Integer(size));\r\n\r\n\t\t\t\t\t\tsystemDump.append(\"Total command request for \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\" : \");\r\n\t\t\t\t\t\tsystemDump.append(size);\r\n\t\t\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\t\t\tqueueWarningMessage += queueWarning(checkQueue, queueName, size);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsystemDump.append(\"Error occur when get size of queue \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\": \");\r\n\t\t\t\t\t\tsystemDump.append(e.getMessage());\r\n\r\n\t\t\t\t\t\tlogMonitor(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"Can not get remote queue size: \");\r\n\t\t\t\tsystemDump.append(e.getMessage());\r\n\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\tlogMonitor(e);\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tQueueFactory.closeQueue(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"WARNING: Disk space is running low\");\r\n\t\t}\r\n\t\tif (!queueWarningMessage.equals(\"\"))\r\n\t\t{\r\n\t\t\tneedAlarm = true;\r\n\t\t\tsystemDump.append(queueWarningMessage);\r\n\t\t}\r\n\r\n\t\tlogMonitor(systemDump);\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsendInstanceAlarm(\"system-resource\", systemDump.toString());\r\n\t\t}\r\n\t}",
"void getDevicesCurrentlyOnline(String deviceType, AsyncCallback<List<String>> callback);",
"public List<Status> selectAllStatuts(){\n\treturn statusDao.findAll();\n\t}",
"@GetMapping(\"/statuts\")\n public List<Status> selectAllStatuts(){\n \treturn serviceStatut.selectAllStatuts();\n }",
"java.util.List<io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin> \n getActionLogList();",
"@ApiOperation(\"查询传感器的信息\")\n @GetMapping(\"alldata\")\n //PageParam pageParam\n public Result<List<Sensordetail>> allsensorinf() {\n return Result.createBySuccess(sensorDetailMapper.selectAll());\n }",
"public Integer getEwStatus() {\n return ewStatus;\n }",
"public Integer getEwStatus() {\n return ewStatus;\n }",
"public Iterator<PresenceStatus> getSupportedStatusSet()\n {\n return parentProvider.getJabberStatusEnum().getSupportedStatusSet();\n }",
"java.util.List<java.lang.Integer> getStatusList();",
"public interface DeviceGatewayMonitorJMXMBean {\n\t/**\n\t * @return current tunnel connection count\n\t */\n\tint getTunnelConnectionCount();\n\n\t/**\n\t * @return heartbeat request times in last second\n\t */\n\tlong getHeartbeatCount();\n\n\t/**\n\t * @return list message request times in last second\n\t */\n\tlong getListRequestCount();\n\n\t/**\n\t * @return list message request successful times in last second\n\t */\n\tlong getListSuccessCount();\n\n\t/**\n\t * @return list message service unavailable times in last second\n\t */\n\tlong getListServiceUnavailableCount();\n\n\t/**\n\t * @return register request times in last second\n\t */\n\tlong getRegisterRequestCount();\n\n\t/**\n\t * @return register request successful times in last second\n\t */\n\tlong getRegisterSuccessCount();\n\n\t/**\n\t * @return register service unavailable times in last second\n\t */\n\tlong getRegisterServiceUnavailableCount();\n\n\t/**\n\t * @return auth request times in last second\n\t */\n\tlong getAuthRequestCount();\n\n\t/**\n\t * @return auth request successful times in last second\n\t */\n\tlong getAuthSuccessCount();\n\n\t/**\n\t * @return auth service unavailable times in last second\n\t */\n\tlong getAuthServiceUnavailableCount();\n\n\t/**\n\t * @return count request times in last second\n\t */\n\tlong getCountRequestCount();\n\n\t/**\n\t * @return count request successful times in last second\n\t */\n\tlong getCountSuccessCount();\n\n\t/**\n\t * @return Count service unavailable times in last second\n\t */\n\tlong getCountServiceUnavailableCount();\n\n\t/**\n\t * @return update request times in last second\n\t */\n\tlong getUpdateRequestCount();\n\n\t/**\n\t * @return update request successful times in last second\n\t */\n\tlong getUpdateSuccessCount();\n\n\t/**\n\t * @return update service unavailable times in last second\n\t */\n\tlong getUpdateServiceUnavailableCount();\n\n\t/**\n\t * @return bind request times in last second\n\t */\n\tlong getBindRequestCount();\n\n\t/**\n\t * @return bind request successful times in last second\n\t */\n\tlong getBindSuccessCount();\n\n\t/**\n\t * @return bind service unavailable times in last second\n\t */\n\tlong getBindServiceUnavailableCount();\n\n\t/**\n\t * @return unbind request times in last second\n\t */\n\tlong getUnbindRequestCount();\n\n\t/**\n\t * @return unbind request successful times in last second\n\t */\n\tlong getUnbindSuccessCount();\n\n\t/**\n\t * @return unbind service unavailable times in last second\n\t */\n\tlong getUnbindServiceUnavailableCount();\n\n\t/**\n\t * @return list message request times in last second\n\t */\n\tlong getAckListRequestCount();\n\n\t/**\n\t * @return list message request successful times in last second\n\t */\n\tlong getAckListSuccessCount();\n\n\t/**\n\t * @return list message service unavailable times in last second\n\t */\n\tlong getAckListServiceUnavailableCount();\n}",
"StatusItem getReconcileStatus();",
"public String getStatus() {\n return getProperty(Property.STATUS);\n }",
"public String getAllertText(){\n return driver.findElement(statusAllert).getText();\n }",
"public String getlbr_NFeStatus();",
"org.landxml.schema.landXML11.Station xgetStaStart();",
"public String getXmlStatus() {\n String msg = \"<object_status idobj=\\\"\" + codObjeto + \"\\\" \";\n msg += \" status=\\\"\" + status + \"\\\" tag=\\\"\" + tag + \"\\\" \";\n msg += \" flagInventario=\\\"\" + flagInventario + \"\\\" \";\n msg += \" iduser=\\\"\" + codUser + \"\\\"\";\n msg += \" posx=\\\"\" + posX + \"\\\" posy=\\\"\" + posY + \"\\\">\";\n msg += \"</object_status>\";\n return msg;\n }",
"public String showStatus();",
"@GetMapping(\"findALlRMS\")\n public String findAllRms(){\n return JSONObject.toJSONString(recordmaService.queryAll(null));\n }",
"public DefaultCniNetworkDetailedStatus detailedStatus() {\n return this.innerProperties() == null ? null : this.innerProperties().detailedStatus();\n }",
"public java.lang.String getObjectStatus() throws java.rmi.RemoteException;",
"@CalledByNative\n private static void getMeasurementApiStatus() {\n ThreadUtils.assertOnBackgroundThread();\n\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {\n AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0);\n return;\n }\n if (ContextUtils.getApplicationContext().checkPermission(\n PERMISSION_ACCESS_ADSERVICES_ATTRIBUTION, Process.myPid(), Process.myUid())\n != PackageManager.PERMISSION_GRANTED) {\n // Permission may not be granted when embedded as WebView.\n AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0);\n return;\n }\n MeasurementManagerFutures mm =\n MeasurementManagerFutures.from(ContextUtils.getApplicationContext());\n if (mm == null) {\n AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0);\n return;\n }\n\n ListenableFuture<Integer> future = null;\n try {\n future = mm.getMeasurementApiStatusAsync();\n } catch (IllegalStateException ex) {\n // An illegal state exception may be thrown for some versions of the underlying\n // Privacy Sandbox SDK.\n Log.i(TAG, \"Failed to get measurement API status\", ex);\n }\n\n if (future == null) {\n AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0);\n return;\n }\n\n Futures.addCallback(future, new FutureCallback<Integer>() {\n @Override\n public void onSuccess(Integer status) {\n AttributionOsLevelManagerJni.get().onMeasurementStateReturned(status);\n }\n @Override\n public void onFailure(Throwable thrown) {\n Log.w(TAG, \"Failed to get measurement API status\", thrown);\n AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0);\n }\n }, ContextUtils.getApplicationContext().getMainExecutor());\n }",
"public String getLiveNodes()\n {\n return ssProxy.getLiveNodes();\n }",
"public AsyncResult<IQ> requestAllMessages() {\r\n return xmppSession.query(IQ.get(new OfflineMessage(true, false)));\r\n }",
"@Override\n\tpublic int getMaxNumMonitors() {\n\t\treturn getMaxNumMonitors(this.rootMonitor);\n\t}",
"boolean isMonitoring();",
"boolean isMonitoring();",
"public String status() {\n\t\tString output = \"+OK \" + mails.size() + \" \" + getSize();\n\t\treturn output;\n\t}",
"public PvaClientNTMultiMonitor createNTMonitor()\n {\n return createNTMonitor(\"value,alarm,timeStamp\");\n }",
"public List<String> getWindowsList() {\r\n\t\treturn new ArrayList<String>();\r\n\t}",
"public PresenceStatus getStatus() {\n return null;\n }"
] | [
"0.67841905",
"0.66541517",
"0.66477853",
"0.65655464",
"0.5590826",
"0.556456",
"0.5558022",
"0.54877955",
"0.5479991",
"0.53925776",
"0.53846973",
"0.53568435",
"0.531806",
"0.5304602",
"0.52993435",
"0.5295831",
"0.5285412",
"0.52651507",
"0.52359074",
"0.5214346",
"0.5199751",
"0.5174927",
"0.51743495",
"0.51264715",
"0.51215327",
"0.511037",
"0.5101995",
"0.50904924",
"0.5083295",
"0.5071268",
"0.50667316",
"0.5064226",
"0.50576776",
"0.50520617",
"0.5037963",
"0.50229293",
"0.50150806",
"0.4985673",
"0.49758843",
"0.4967537",
"0.49449039",
"0.4933243",
"0.49326542",
"0.49313924",
"0.4927811",
"0.49182397",
"0.49182397",
"0.49182397",
"0.49182397",
"0.49182397",
"0.4905608",
"0.49043036",
"0.4897354",
"0.4897169",
"0.48966253",
"0.4895589",
"0.48894566",
"0.4886981",
"0.4883704",
"0.48802426",
"0.48752037",
"0.48623082",
"0.48575324",
"0.485422",
"0.48512247",
"0.48424178",
"0.48415053",
"0.4833412",
"0.482957",
"0.48248306",
"0.4806881",
"0.4805547",
"0.4803769",
"0.480327",
"0.47810075",
"0.47748455",
"0.47748455",
"0.47730672",
"0.47590524",
"0.47549453",
"0.47526205",
"0.4749326",
"0.47469166",
"0.4745553",
"0.4742975",
"0.47416714",
"0.4736896",
"0.47346455",
"0.47331858",
"0.47291622",
"0.4727106",
"0.47266614",
"0.4723627",
"0.47131562",
"0.47088104",
"0.47088104",
"0.47072017",
"0.47071967",
"0.4698768",
"0.46964002"
] | 0.81778216 | 0 |
Sets the "Get_Status_All_Monitors" element | public void setGetStatusAllMonitors(net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors getStatusAllMonitors)
{
synchronized (monitor())
{
check_orphaned();
net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors target = null;
target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().find_element_user(GETSTATUSALLMONITORS$0, 0);
if (target == null)
{
target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().add_element_user(GETSTATUSALLMONITORS$0);
}
target.set(getStatusAllMonitors);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors getGetStatusAllMonitors()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors target = null;\r\n target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().find_element_user(GETSTATUSALLMONITORS$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"public net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors addNewGetStatusAllMonitors()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors target = null;\r\n target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().add_element_user(GETSTATUSALLMONITORS$0);\r\n return target;\r\n }\r\n }",
"void setMonitors(int monitors);",
"void xsetMonitors(com.microsoft.schemas.office.x2006.digsig.STPositiveInteger monitors);",
"int getMonitors();",
"public static void monitoring(){\n\t\tWebSelector.click(Xpath.monitoring);\n\t}",
"public void setOffline() {\r\n \t for (Utente u: utenti) { \r\n \t\t u.setStatus(\"OFFLINE\");\r\n \t }\r\n }",
"@GetMapping()\n @ApiOperation(value = \"Get all monitors for the authenticated user\")\n public List<BaseMonitor> getAllMonitors(Principal principal) {\n User user = userRepository.findUserByUsername(principal.getName());\n return monitorRepository.findAllByUser(user);\n }",
"private void changeArmStatusOfAllDevices(String xml, String armStatus)\n\t\t\tthrows ParserConfigurationException, SAXException, IOException {\n\t\tQueue<KeyValuePair> queue = IMonitorUtil.extractCommandsQueueFromXml(xml);\n\t\tString imvgId = IMonitorUtil.commandId(queue, Constants.IMVG_ID);\n\t\tDeviceManager deviceManager = new DeviceManager();\n//\t\tdeviceManager.updateAllDevicesArmStatus(imvgId, armStatus);\n\t\t\n\t\tdeviceManager.updateCurrentModeForCustomer(imvgId, armStatus);\n\t\tdeviceManager.updateArmStatusForAllDevicesOfCustomer(imvgId, armStatus);\n\t}",
"public void Changed(List<Sensor> sensors, int monitorCount, int sensorCount) throws java.rmi.RemoteException;",
"com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetMonitors();",
"public void refreshAll(){\n\t\tNodeController.getNodeController().refreshHubVMintrfces();\n\t\tdraw(canvas, contextMenu);\n\t\tConfigFile.writeOutput(outputConfig);\n\t}",
"public void addMonitors() {\n\t\t// get graphics environment\n\t\tGraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();\n\t\tGraphicsDevice[] graphicsDevices = graphicsEnvironment.getScreenDevices();\n\t\t// let user choose on which screen to show the capturer, only if more than one is connected\n\t\tif (graphicsDevices.length > 1) {\n\t\t\tbuttonPanel.removeAll();\n\t\t\tJLabel screenLabel = new JLabel(getResourceMap().getString(\"screenLabel.text\"));\n\t\t\tbuttonPanel.add(screenLabel, \"wrap, grow, span\");\n\t\t\t// create buttongroup for selecting monitor\n\t\t\tButtonGroup screenButtonGroup = new ButtonGroup();\n\t\t\tInteger defaultMonitorId = videoCapturerFactory.getMonitorIdForComponent(selectedVideoCapturerName);\n\t\t\t// get the default monitor id for this capturer\n\t\t\tfor (GraphicsDevice graphicsDevice : graphicsDevices) {\n\t\t\t\tString monitorIdString = graphicsDevice.getIDstring();\n\t\t\t\tDisplayMode displayMode = graphicsDevice.getDisplayMode();\n\t\t\t\t// final Rectangle position = graphicsDevice.getDefaultConfiguration().getBounds();\n\t\t\t\tString resolution = displayMode.getWidth() + \"x\" + displayMode.getHeight();\n\t\t\t\tJToggleButton button = new JToggleButton(\"<html><center>\" + monitorIdString + \"<br>\" + resolution + \"</center></html>\");\n\t\t\t\tmonitorIdString = monitorIdString.substring(monitorIdString.length() - 1);\n\t\t\t\tbutton.setActionCommand(monitorIdString);\n\t\t\t\tbutton.addActionListener(new ActionListener() {\n\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tAbstractButton source = (AbstractButton) e.getSource();\n\t\t\t\t\t\tString monitorId = source.getActionCommand();\n\t\t\t\t\t\t// TODO pass position here instead of monitor id..\n\t\t\t\t\t\tfirePropertyChange(SelfContained.MONITOR_ID, selectedMonitorId, selectedMonitorId = monitorId);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\tbutton.setBackground(Color.WHITE);\n\t\t\t\t// set default screen selection\n\t\t\t\tint monitorId = Integer.parseInt(monitorIdString);\n\t\t\t\tif (defaultMonitorId != null && defaultMonitorId == monitorId) {\n\t\t\t\t\tbutton.setSelected(true);\n\t\t\t\t\tscreenButtonGroup.setSelected(button.getModel(), true);\n\t\t\t\t} else {\n\t\t\t\t\tscreenButtonGroup.setSelected(button.getModel(), false);\n\t\t\t\t}\n\t\t\t\tscreenButtonGroup.add(button);\n\t\t\t\tbuttonPanel.add(button, \"height 70!, width 70::, grow\");\n\t\t\t}\n\t\t\tscreenLabel.setVisible(true);\n\t\t\tbuttonPanel.setVisible(true);\n\t\t}\n\t}",
"protected void parametersStatusesWrite_EM(boolean machineBusy) {//todo unimplement?\n if (!machineBusy) {\n for (Parameters.Group.ParameterIn parameterIn : parametrization.parameterInArrayList) {\n if (parameterIn != null) {\n parameterIn.updateStatus();\n }\n }\n } else {\n for (Parameters.Group hatch : parametrization.groups) {\n if (hatch != null && hatch.updateWhileRunning) {\n for (Parameters.Group.ParameterIn in : hatch.parameterIn) {\n if (in != null) {\n in.updateStatus();\n }\n }\n }\n }\n }\n for (Parameters.Group.ParameterOut parameterOut : parametrization.parameterOutArrayList) {\n if (parameterOut != null) {\n parameterOut.updateStatus();\n }\n }\n }",
"@Override\n @IcalProperty(pindex = PropertyInfoIndex.VALARM,\n jname = \"alarm\",\n adderName = \"alarm\",\n eventProperty = true,\n todoProperty = true)\n public void setAlarms(final Set<BwAlarm> val) {\n alarms = val;\n }",
"public List<Monitor> retrieveMonitorsForServer(ServerDetail serverDetail) {\n List<Monitor> monitors = new ArrayList<Monitor>();\n ArrayList<Class> monitorClasses = (ArrayList<Class>) availableMonitors.getMonitorList();\n try{\n for (Class klass: monitorClasses){\n Monitor obj = (Monitor) klass.newInstance();\n // Set default variables for Monitors\n obj.serverDetail = serverDetail;\n obj.realtimeThoth = realTimeThoth;\n obj.shrankThoth = historicalDataThoth;\n obj.mailer = mailer;\n monitors.add(obj);\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n return monitors;\n }",
"public static void getWatch() {\n for ( String nodeId : getNodes() ){\n Wearable.MessageApi.sendMessage(\n mGoogleApiClient, nodeId, \"GET_WATCH\", new byte[0]).setResultCallback(\n new ResultCallback<MessageApi.SendMessageResult>() {\n @Override\n public void onResult(MessageApi.SendMessageResult sendMessageResult) {\n if (!sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"Failed to send message with status code: \"\n + sendMessageResult.getStatus().getStatusCode());\n } else if (sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"onResult successful!\");\n }\n }\n }\n );\n }\n }",
"public DescribeMonitorResult withStatus(String status) {\n setStatus(status);\n return this;\n }",
"protected static void setAllMonsters(ArrayList<Monster> listMonsters) {\n allMonsters = listMonsters;\n }",
"@Override\n public void setSysMonitorEnabled(boolean enabled) {\n sysMonitorEnabled = enabled;\n }",
"public List<TorrentStatus> status() {\n torrent_status_vector v = alert.getStatus();\n int size = (int) v.size();\n\n List<TorrentStatus> l = new ArrayList<>(size);\n for (int i = 0; i < size; i++) {\n l.add(new TorrentStatus(v.get(i)));\n }\n\n return l;\n }",
"private void refreshLights(){\n\n if (this.selectedTrain.getLights() == 1){ this.lightsOnRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == 0){ this.lightsOffRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == -1){ this.lightsFailureRadioButton.setSelected(true); }\n }",
"private void fillMonitorsMetricsMap() {\n\t\tmonitorsMetricsMap=new HashMap<>();\n\t\tmonitorsMetricsMap.put(\"RR<sub>TOT</sub>\", new String[] {rosetta.MDC_RESP_RATE.VALUE, \"MDC_DIM_RESP_PER_MIN\"});\n\t\tmonitorsMetricsMap.put(\"EtCO<sub>2</sub>\", new String[] {rosetta.MDC_AWAY_CO2_ET.VALUE, rosetta.MDC_DIM_MMHG.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PEAK</sub>\", new String[] {rosetta.MDC_PRESS_AWAY_INSP_PEAK.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PLAT</sub>\", new String[] {rosetta.MDC_PRESS_RESP_PLAT.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"PEEP\", new String[] {\"ICE_PEEP\", rosetta.MDC_DIM_CM_H2O.VALUE});\t//TODO: Confirm there is no MDC_ for PEEP\n\t\tmonitorsMetricsMap.put(\"FiO<sub>2</sub>%\", new String[] {\"ICE_FIO2\", rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\tmonitorsMetricsMap.put(\"Leak %\", new String[] {rosetta.MDC_VENT_VOL_LEAK.VALUE, rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\t\n\t\t//Leak %\n\t}",
"public void setMonitored(boolean monitored) {\n this.monitored = monitored;\n }",
"@Override\n public CompositeData getAllMonitorCompositeData() {\n return allMonitorCompositeData;\n }",
"public void refresh() {\n if (this.monitorApiKey.length() == 0) {\n return;\n }\n String params =\n String.format(\"api_key=%s&format=xml&custom_uptime_ratios=1-7-30-365\", this.monitorApiKey);\n byte[] xml = loadPageWithRetries(params);\n Match doc;\n try {\n doc = $(new ByteArrayInputStream(xml));\n } catch (SAXException | IOException e) {\n throw new CouldNotRefresh(e);\n }\n String[] customRatios = doc.find(\"monitor\").attr(\"custom_uptime_ratio\").split(\"-\");\n this.last24HoursUptimeRatio = customRatios[0];\n this.last7DaysUptimeRatio = customRatios[1];\n this.last30DaysUptimeRatio = customRatios[2];\n this.last365DaysUptimeRatio = customRatios[3];\n }",
"public static void getStatus() {\n\t\ttry {\n\t\t\tint i = 1;\n\t\t\tList<Object[]>serverDetails = ServerStatus.getServerDetails();\n\t\t\tfor (Object[] servers:serverDetails){\n\t\t\t\tServerStatus.verifyServerStatus(i,(String)servers[0], (String)servers[1], (String)servers[2]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public static void updateStatusBar(){\n\t\tstatus.setText(\"Sensors: \"+Sensor.idToSensor.size()+(TurnController.getInstance().getCurrentTurn()!=null?\", Turn: \"+TurnController.getInstance().getCurrentTurn().turn:\"\"));\n\t}",
"final void refreshCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"refreshCheckBoxes\");\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n this.chkMsdtSelection.get(msdt).setSelected(false);\r\n } else {\r\n this.chkMsdtSelection.get(msdt).setSelected(true);\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"refreshCheckBoxes\");\r\n }",
"@IcalProperty(pindex = PropertyInfoIndex.REQUEST_STATUS,\n adderName = \"requestStatus\",\n jname = \"requestStatus\",\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true)\n public void setRequestStatuses(final Set<BwRequestStatus> val) {\n requestStatuses = val;\n }",
"public void updateAllSummaries() {\r\n for (WjrClassItem classItem : classItems.values()) {\r\n classItem.updateSummary(this);\r\n }\r\n root.updateSummary(this);\r\n }",
"protected void refreshAll() {\n refreshProperties();\n\t}",
"public static void getLightStatus()\n\t{\n\t\ttry\n\t\t{\n\t\t\tArrayList<NameValuePair> nameValuePairs1 = new ArrayList<NameValuePair>();\n\t\t\tnameValuePairs1.add(new BasicNameValuePair(\"userID\",String.valueOf(Thermo_main.userID)));\n\t\t\tString httpPoststring = \"http://\"+Thermo_main.ip_addr_server+\"/getLightStatus_java.php\";\n\t\t\t\n\t\t\t//String httpPostSetString = \"http://\"+Thermo_main.ip_addr_server+\"/setEnergy.php\";\n\t\t\t//Thermo_main.help.setResult(nameValuePairs1, httpPostSetString);\n\t\t\t\n\t\t\tString result = Thermo_main.help.getResult(nameValuePairs1,httpPoststring);\n\t\t\tJSONArray array = new JSONArray(result);\n\n\t\t\tfor(int n =0; n< array.length(); n++)\n\t\t\t{\n\t\t\t\tJSONObject objLight = array.getJSONObject(n);\n\t\t\t\troom_new.add(objLight.getInt(\"room\")); \n\t\t\t\tlight_status_new.add(objLight.getString(\"light_status\"));\n\t\t\t\tdimmer_status_new.add(objLight.getString(\"dimmer_status\"));\n\t\t\t}\n\t\t}catch(Exception e) {}\n\t}",
"public void statusChanged() {\n\t\tif(!net.getArray().isEmpty()) {\n\t\t\tigraj.setEnabled(true);\n\t\t}else\n\t\t\tigraj.setEnabled(false);\n\t\t\n\t\tupdateKvota();\n\t\tupdateDobitak();\n\t}",
"private void setOneAllChecks() {\r\n\r\n checkIman.setEnabled(true);\r\n checkBonferroni.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n checkHochberg.setEnabled(true);\r\n checkHommel.setEnabled(true);\r\n checkHolland.setEnabled(true);\r\n checkRom.setEnabled(true);\r\n checkFinner.setEnabled(true);\r\n checkLi.setEnabled(true);\r\n\r\n }",
"List<StatusListener> mo9950b();",
"public void refresh() {\n/* 93 */ if (!this.initialized)\n/* 94 */ return; synchronized (this.o) {\n/* */ \n/* 96 */ this.wanService = null;\n/* 97 */ this.router = null;\n/* 98 */ this.upnpService.getControlPoint().search();\n/* */ } \n/* */ }",
"public void setAlarms()\n\t{\n\t\tSharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n\t\tAlarmManager alarm = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\t\t\n\t\tSet<String> set;\n\t\tset=sp.getStringSet(\"lowattnotifs\", null);\n\t\tif(set!=null)\n\t\t{\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, 19);\n\t\t\tcal.set(Calendar.MINUTE, 0);\n\t\t\tcal.set(Calendar.SECOND, 0);\n\t\t\t\n\t\t\tIntent attintent = new Intent(this, Monitor.class);\n\t\t\tattintent.putExtra(\"attordate\", 0);\n\t\t\tPendingIntent attpintent = PendingIntent.getService(this, 0, attintent, 0);\n\t\t\t\n\t\t\talarm.cancel(attpintent);\t\t//cancel all alarms for attendance reminders\n\t\t\t\n\t\t\t//check if set contains these days\n\t\t\tfor(int i=0; i<7; i++)\n\t\t\t{\n\t\t\t\tif(set.contains(String.valueOf(i)))\n\t\t\t\t{\n\t\t\t\t\tcal.set(Calendar.DAY_OF_WEEK, i);\n\t\t\t\t\talarm.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), attpintent);\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Set for day: \"+i, Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void updateAllFoldersTreeSet() throws MessagingException {\n\n Folder[] allFoldersArray = this.store.getDefaultFolder().list(\"*\");\n TreeSet<Folder> allFoldersTreeSet =\n new TreeSet<Folder>(new FolderByFullNameComparator());\n\n for(int ii = 0; ii < allFoldersArray.length; ii++) {\n\n allFoldersTreeSet.add(allFoldersArray[ii]);\n }\n\n this.allFolders = allFoldersTreeSet;\n }",
"public void setMonitorNum(Integer monitorNum) {\n this.monitorNum = monitorNum;\n }",
"List<TopicStatus> getAll();",
"@Override\n @IcalProperty(pindex = PropertyInfoIndex.SUMMARY,\n jname = \"summary\",\n adderName = \"summary\",\n analyzed = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setSummaries(final Set<BwString> val) {\n summaries = val;\n }",
"public void threadStatusLog() {\n LogUtils.logger(TAG, \"All Run Thread Size : \" + threadControl.size() +\n \"\\nAll Run Thread : \" + threadControl);\n\n }",
"@Override\n\tpublic void refreshAll(boolean b) {\n\t\t\n\t}",
"public void startMonitoring(int secondsToMonitor) {\n\t for(int i = 0; i< secondsToMonitor; i++) {\n\t \t// launch the monitoring of the main page and extract two list, one with sold out the other one for available\n\t \t// First one is sold out, second one is available\n\t \tString date = timer.getDate();\n\t \tList<Element> listsOfArticle = monitorMainPage();\n\t \tList<ArticleGeneral> allArticles = extractAllArticle(listsOfArticle);\n\t \tList <Article> articles = processAllArticles(allArticles);\n\t \tboolean isCSVOut = csvFIleCreator.createCSVofAllArticles(articles, date);\n\t \trssmain.rssStart();\n\t \t// get sleepTime\n\t\t try {\n\t\t \tRandom r = new Random();\n\t\t \tint sleepTime = VALEURMIN + r.nextInt(VALEURMAX - VALEURMIN);\n\t\t \tSystem.out.println(\"run number\" + i + \" \" + sleepTime + \" seconds to sleep\");\n\t\t\t\tTimeUnit.SECONDS.sleep(sleepTime);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t }\n\t}",
"public void loadStatus() {\r\n\r\n\t\ttry {\r\n\t\t\tRemoteOffice objRemoteOffice = Application.UNITY_CLIENT_APPLICATION.getreRemoteOffice();\r\n\t\t\tif (objRemoteOffice != null) {\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"Going to load the status of the components from broadworks.\");\r\n\r\n\t\t\t\tboolean isActive = objRemoteOffice.isActive();\r\n\t\t\t\tString phnumber = objRemoteOffice.getPhoneNumber();\r\n\t\t\t\tobjRemoteOfficeEnableJCheckBox.setSelected(isActive);\r\n\t\t\t\tobjRemoteOfficeJTextField.setText(phnumber);\r\n\r\n\t\t\t\tif (objRemoteOfficeEnableJCheckBox.isSelected()) {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(true);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tobjRemoteOfficeJTextField.setEnabled(false);\r\n\t\t\t\t\tobjRemoteOfficeJLabel.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status loaded successfully\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tlogTrace(this.getClass().getName(), \"loadStaus()\", \"component status not loaded successfully\");\r\n\t\t}\r\n\t}",
"private void updateRoadStatus() {\n for (Road r : e.getRoadDirectory().getRoadList()) {\n if (destination.toLowerCase().contains(r.getRoadName().toLowerCase())) {\n roadNamejTextField.setText(r.getRoadName());\n }\n break;\n }\n for (Sensor data : e.getSensorDataDirectory().getSensorDataList()) {\n if (destination.toLowerCase().contains(data.getSensorStreetName().toLowerCase())) {\n roadStatusjTextField.setText(data.getSensorRoadStatus());\n weatherjTextField.setText(data.getSensorWeatherStatus());\n trafficjTextField.setText(data.getSensorTraffic());\n break;\n }\n }\n }",
"public void mDeptLocationSelectedStatuses() {\n PersistenceManager pm = PMF.get().getPersistenceManager();\n Query q = pm.newQuery(Tracking.class, \"alertId == \" + alertId + \" && type == 'locstat' \");\n q.setOrdering(\"timeStamp desc\");\n List<Tracking> tracks = (List<Tracking>) pm.newQuery(q).execute(); \n Map<Long, Long> mDeptLocationSelectedStatuses = new HashMap<Long, Long>();\n for (Tracking t : tracks) {\n if (t.getlocationId() != null) {\n if (!mDeptLocationSelectedStatuses.containsKey(t.getlocationId())) {\n mDeptLocationSelectedStatuses.put(t.getlocationId(), t.gettypeId());\n }\n }\n }\n System.out.println(\"Exit: mDeptLocationSelectedStatuses\");\n }",
"private void startSensors() {\n for (MonitoredSensor sensor : mSensors) {\n sensor.startListening();\n }\n }",
"public void setMonitoredResourceBytes(ByteString value) {\n checkByteStringIsUtf8(value);\n this.monitoredResource_ = value.toStringUtf8();\n }",
"private void pollAllWatchersOfThisTile() {\n/* 1287 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 1291 */ if (vz.getWatcher() instanceof Player)\n/* */ {\n/* 1293 */ if (!vz.getWatcher().hasLink())\n/* */ {\n/* */ \n/* */ \n/* 1297 */ removeWatcher(vz);\n/* */ }\n/* */ }\n/* */ }\n/* 1301 */ catch (Exception e) {\n/* */ \n/* 1303 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }",
"private void writeMonitors(BufferedWriter bw, ArrayList<String> usedNamesMonitors) throws IOException {\n\t\tif (!isAlreadyWrittenToCPN()) {\n\t\t\tIterator transitions = this.getTransitions().iterator();\n\t\t\twhile (transitions.hasNext()) {\n\t\t\t\tColoredTransition transition = (ColoredTransition) transitions.next();\n\t\t\t\tif (transition.getSubpage() == null) {\n\t\t\t\t\tif (this.getIdentifier().equals(\"Environment\") &&\n\t\t\t\t\t\t\ttransition.getIdentifier().equals(\"Clean-up\")) {\n\t\t\t\t\t\t// don't write a monitor for this transition\n\t\t\t\t\t} else if (transition.getIdentifier().equals(\"Init\")) {\n\t\t\t\t\t\t// write the initialisation monitor for this transition\n\t\t\t\t\t\ttransition.writeInitMonitor(bw);\n\t\t\t\t\t\tusedNamesMonitors.add(\"Init\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// write the monitor for this transition\n\t\t\t\t\t\ttransition.writeLoggingMonitor(bw, usedNamesMonitors);\n\t\t\t\t\t}\n\t\t\t\t} else { // there exists a subpage\n\t\t\t\t\ttransition.getSubpage().writeMonitors(bw, usedNamesMonitors);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.pnWrittenToCPN = true;\n\t\t}\n\t}",
"protected void updateAll() {\n for (String key : listenerMap.keySet()) {\n updateValueForKey(key, true);\n }\n }",
"private void writeSecondLevelMonitors() {}",
"@GetMapping(\"/statuts\")\n public List<Status> selectAllStatuts(){\n \treturn serviceStatut.selectAllStatuts();\n }",
"private void fillStatusList() {\n StatusList = new ArrayList<>();\n StatusList.add(new StatusItem(\"Single\"));\n StatusList.add(new StatusItem(\"Married\"));\n }",
"@Test(timeout = 4000)\n public void test090() throws Throwable {\n DBUtil.resetMonitors();\n }",
"public msg_onboard_computer_status() {\n msgid = MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS;\n }",
"public List<Status> selectAllStatuts(){\n\treturn statusDao.findAll();\n\t}",
"public void clickVeteranServiceAll() {\n rbVeteranServiceAll.click();\n }",
"public java.util.List<MonitoringOutput> getMonitoringOutputs() {\n return monitoringOutputs;\n }",
"public Builder addAllNodeStatusList(\n java.lang.Iterable<? extends entities.Torrent.NodeReplicationStatus> values) {\n if (nodeStatusListBuilder_ == null) {\n ensureNodeStatusListIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, nodeStatusList_);\n onChanged();\n } else {\n nodeStatusListBuilder_.addAllMessages(values);\n }\n return this;\n }",
"public void setSldAll(org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty sldAll)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty)get_store().find_element_user(SLDALL$6, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty)get_store().add_element_user(SLDALL$6);\n }\n target.set(sldAll);\n }\n }",
"public void setAlarmStatus(AlarmStatus status) {\n securityRepository.setAlarmStatus(status);\n statusListeners.forEach(sl -> sl.notify(status));\n }",
"void setTaskmonitorrecordArray(noNamespace.TaskmonitorrecordDocument.Taskmonitorrecord[] taskmonitorrecordArray);",
"@Override\n public List<Report> getStatusList(){\n List<Report> statusList = null;\n statusList = adminMapper.getStatusList();\n return statusList;\n }",
"public void resetSerivceStatus() {\n totalWaitTime = BigInteger.ZERO;\n totalTravelTime = BigInteger.ZERO;\n totalTravelDistance = BigDecimal.ZERO;\n passengersServed = BigInteger.ZERO;\n }",
"protected void clearStatus() throws LRException\n\t{\n\t\tgetBackground();\n\t\tbackground.clearStatus();\n\t}",
"public void setSiteStatus(SiteStatus value) { _siteStatus = value; }",
"public synchronized final void setStatus(int sts) {\n\t\tm_status = sts;\n\t\tnotifyAll();\n\t}",
"private void refreshNodeList() {\n if (UnderNet.router.status.equals(InterfaceStatus.STARTED)) {\n //Using connected and cached nodes if the router has started.\n ArrayList<Node> nodesToList = UnderNet.router.getConnectedNodes();\n for (Node cachedNode :\n EntryNodeCache.cachedNodes) {\n boolean canAdd = true;\n for (Node connectedNode : UnderNet.router.getConnectedNodes()) {\n if (cachedNode.getAddress().equals(connectedNode.getAddress())) {\n canAdd = false;\n }\n }\n if (canAdd) {\n nodesToList.add(cachedNode);\n }\n }\n nodeList.setListData(nodesToList.toArray());\n } else {\n //Using cached nodes if the router isn't online.\n nodeList.setListData(EntryNodeCache.cachedNodes.toArray());\n }\n }",
"public void alertMonitor(Sensor sensor) throws RemoteException;",
"public void executeMonitorsConcurrently(ServerDetail serverDetail) throws InterruptedException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException, ClassNotFoundException {\n List<Monitor> monitorList = retrieveMonitorsForServer(serverDetail);\n if (monitorList.size() == 0) {\n System.out.println(\"No monitors found for server (\" + serverDetail.getName() + \") port(\" + serverDetail.getPort() + \") coreName(\" + serverDetail.getCore() + \"). Skipping ...\");\n\n } else {\n System.out.println(\"Found \"+monitorList.size()+\" monitor/s for server (\" + serverDetail.getName() + \") port(\" + serverDetail.getPort() + \") coreName(\" + serverDetail.getCore() + \")\");\n List<Future<MonitorResult>> futures = new ArrayList<Future<MonitorResult>>();\n // Create a pool of threads, numberOfMonitors max jobs will execute in parallel\n ExecutorService monitorsThreadPool = Executors.newFixedThreadPool(monitorList.size());\n for (Monitor monitor : monitorList) {\n futures.add(monitorsThreadPool.submit(monitor));\n }\n\n for (Future f : futures) {\n try {\n // Check if all the threads are finished.\n MonitorResult monitorResult = (MonitorResult) f.get(); // TODO\n } catch (ExecutionException e) {\n System.out.println(\"Exception in executeMonitorsConcurrently, while checking the threads status\");\n e.getCause().printStackTrace();\n }\n }\n }\n System.out.println(\"Finished monitoring server (\" + serverDetail.getName() + \") port(\" + serverDetail.getPort() + \") coreName(\" + serverDetail.getCore() + \")\");\n }",
"public void setIdMonitor(int idMonitor) {\n this.idMonitor = idMonitor;\n }",
"public void setShowAllClusters(boolean showAllClusters) {\n this.showAllClusters = showAllClusters;\n getPrefs().putBoolean(\"RectangularClusterTracker.showAllClusters\", showAllClusters);\n }",
"public void setAllUpdateFlags() {\n\t}",
"private void setStreamMediaAddressList(){\n\n if (mCallBack != null){\n mCallBack.onGetServerAddressListCompleted(mServerAddressList);\n }\n }",
"public void setAllR(int AllR){\n\t\tthis.AllR=AllR;\n\t}",
"public PvaClientNTMultiMonitor createNTMonitor()\n {\n return createNTMonitor(\"value,alarm,timeStamp\");\n }",
"public void setAllLeds(int red, int green, int blue)\n {\n // Verify service is connected\n assertService();\n \n try {\n \tmLedService.setAllLeds(mBinder, red, green, blue);\n } catch (RemoteException e) {\n Log.e(TAG, \"setAllLeds failed\");\n }\n }",
"public void setTray(ArrayList<Tile> newTray){ this.tray = newTray; }",
"void clearAllLists() {\n this.pm10Sensors.clear();\n this.tempSensors.clear();\n this.humidSensors.clear();\n }",
"private void setLightStatus() {\n if (mCmd.equals(MSG_ON)) {\n setLighIsOn(true);\n } else {\n setLighIsOn(false);\n }\n }",
"public void emptyBox()\n {\n this.notifications = new TreeSet<>();\n this.setUpdated();\n }",
"public static void setMaxNumMonitors(final int maxMonitors, final ProfileMonitor rootMonitor) {\n\t\tMonitorFactoryInterface factory = getMonitorFactory(rootMonitor.getLabel());\n\t\tfactory.setMaxNumMonitors(maxMonitors);\n\t}",
"public void getSystemStatus() throws Exception\r\n\t{\r\n\t\tsystemDump.delete(0, systemDump.length());\r\n\r\n\t\tboolean needAlarm = memoryLogging();\r\n\r\n\t\tif (Database.appDatasource != null)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Database connection status: \\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number database connection\\t\\t\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number busy database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumBusyConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumIdleConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumUnclosedOrphanedConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tString queueWarningMessage = \"\";\r\n\r\n\t\tsystemDump.append(\"\\r\\n\");\r\n\t\tsystemDump.append(\"Local queue status: \\r\\n\");\r\n\r\n\t\tfor (String key : QueueFactory.localQueues.keySet())\r\n\t\t{\r\n\t\t\tLocalQueue localQueue = QueueFactory.getLocalQueue(key);\r\n\r\n\t\t\tsystemDump.append(\"Local queue (\");\r\n\t\t\tsystemDump.append(key);\r\n\t\t\tsystemDump.append(\"): \");\r\n\t\t\tsystemDump.append(localQueue.getSize());\r\n\r\n\t\t\tif (localQueue.getMaxSize() > 0)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"/\");\r\n\t\t\t\tsystemDump.append(localQueue.getMaxSize());\r\n\t\t\t}\r\n\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\t\tif (QueueFactory.getTotalLocalPending() > 0)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"Total pending counter : \");\r\n\t\t\tsystemDump.append(QueueFactory.getTotalLocalPending());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tif (queueDispatcherEnable)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Remote queue status: \\r\\n\");\r\n\r\n\t\t\tQueueSession session = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tsession = getQueueSession();\r\n\r\n\t\t\t\tfor (int j = 0; j < externalQueues.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (externalQueues[j].equals(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tString queueName = externalQueues[j];\r\n\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tQueue checkQueue = QueueFactory.getQueue(queueName);\r\n\r\n\t\t\t\t\t\tint size = QueueFactory.getQueueSize(session, checkQueue);\r\n\r\n\t\t\t\t\t\tQueueFactory.queueSnapshot.put(queueName, new Integer(size));\r\n\r\n\t\t\t\t\t\tsystemDump.append(\"Total command request for \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\" : \");\r\n\t\t\t\t\t\tsystemDump.append(size);\r\n\t\t\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\t\t\tqueueWarningMessage += queueWarning(checkQueue, queueName, size);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsystemDump.append(\"Error occur when get size of queue \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\": \");\r\n\t\t\t\t\t\tsystemDump.append(e.getMessage());\r\n\r\n\t\t\t\t\t\tlogMonitor(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"Can not get remote queue size: \");\r\n\t\t\t\tsystemDump.append(e.getMessage());\r\n\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\tlogMonitor(e);\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tQueueFactory.closeQueue(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"WARNING: Disk space is running low\");\r\n\t\t}\r\n\t\tif (!queueWarningMessage.equals(\"\"))\r\n\t\t{\r\n\t\t\tneedAlarm = true;\r\n\t\t\tsystemDump.append(queueWarningMessage);\r\n\t\t}\r\n\r\n\t\tlogMonitor(systemDump);\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsendInstanceAlarm(\"system-resource\", systemDump.toString());\r\n\t\t}\r\n\t}",
"public void reevaluateStatusBarVisibility() {\n if (updateStatusBarVisibilityLocked(getDisplayPolicy().adjustSystemUiVisibilityLw(this.mLastStatusBarVisibility))) {\n this.mWmService.mWindowPlacerLocked.requestTraversal();\n }\n }",
"public void startRefresh() {\n SmartDashboard.putNumber(\"Ele P\", 0.0);\n SmartDashboard.putNumber(\"Ele I\", 0.0);\n SmartDashboard.putNumber(\"Ele D\", 0.0);\n SmartDashboard.putNumber(\"Ele Set\", 0.0);\n }",
"private void clearDownloadListStatus() {\r\n /* reset ip waittimes only for local ips */\r\n ProxyController.getInstance().removeIPBlockTimeout(null, true);\r\n /* reset temp unavailble times for all ips */\r\n ProxyController.getInstance().removeHostBlockedTimeout(null, false);\r\n for (final DownloadLink link : DownloadController.getInstance().getAllDownloadLinks()) {\r\n /*\r\n * do not reset if link is offline, finished , already exist or pluginerror (because only plugin updates can fix this)\r\n */\r\n link.getLinkStatus().resetStatus(LinkStatus.ERROR_FATAL | LinkStatus.ERROR_PLUGIN_DEFECT | LinkStatus.ERROR_ALREADYEXISTS, LinkStatus.ERROR_FILE_NOT_FOUND, LinkStatus.FINISHED);\r\n }\r\n }",
"public void setOnline() {\n if (this.shutdownButton.isSelected() == false) {\n this.online = true;\n this.statusLed.setStatus(\"ok\");\n this.updateOscilloscopeData();\n }\n }",
"void visitElement_statuses(org.w3c.dom.Element element) { // <statuses>\n // element.getValue();\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 if (nodeElement.getTagName().equals(\"status\")) {\n visitElement_status(nodeElement);\n }\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 }",
"@Override\n public void setRunningStatus(TwitterFilterStream.StreamStatus s) {\n if (s == TwitterFilterStream.StreamStatus.ENABLED) {\n startStopButton1.setIcon(stop);\n startStopButton1.setText(\"Stop\");\n startStopButton2.setIcon(stop);\n startStopButton2.setText(\"Stop\");\n enterKeywordTextField.setEnabled(false);\n enterRunTextField.setEnabled(false);\n removeKeywordsButton.setEnabled(false);\n clearAllKeywordsButton.setEnabled(false);\n removeAllMarkersButton.setEnabled(false);\n removeTwitterMarkersButton.setEnabled(false);\n twitterKeysMenuItem.setEnabled(false);\n databaseKeysMenuItem.setEnabled(false);\n addLangButton.setEnabled(false);\n removeLangButton.setEnabled(false);\n databaseKeysInputDialog.setVisible(false);\n twitterKeysInputDialog.setVisible(false);\n } else if (s == TwitterFilterStream.StreamStatus.DISABLED) {\n startStopButton1.setIcon(start);\n startStopButton1.setText(\"Start\");\n startStopButton1.setEnabled(true);\n startStopButton2.setIcon(start);\n startStopButton2.setText(\"Start\");\n startStopButton2.setEnabled(true);\n enterKeywordTextField.setEnabled(true);\n enterRunTextField.setEnabled(true);\n removeKeywordsButton.setEnabled(true);\n clearAllKeywordsButton.setEnabled(true);\n removeAllMarkersButton.setEnabled(true);\n removeTwitterMarkersButton.setEnabled(true);\n twitterKeysMenuItem.setEnabled(true);\n databaseKeysMenuItem.setEnabled(true);\n addLangButton.setEnabled(true);\n removeLangButton.setEnabled(true);\n } else {\n startStopButton1.setIcon(stop);\n startStopButton1.setText(\"Processing\");\n startStopButton1.setEnabled(false);\n startStopButton2.setIcon(stop);\n startStopButton2.setText(\"Processing\");\n startStopButton2.setEnabled(false);\n }\n }",
"public void setOffline() {\n if (this.shutdownButton.isSelected() == false) {\n this.online = false;\n this.statusLed.setStatus(\"warning\");\n this.setOutputPower(0);\n this.channel.updateOutput();\n }\n }",
"public java.util.List<String> getStatuses() {\n return statuses;\n }",
"public static void setAllCustomers(ObservableList<Customers> allCustomers) {\n Customers.allCustomers = allCustomers;\n System.out.println(\"The query has successfully applied all customers to the list\");\n }",
"private void initData() {\n boolean monitoring = (boolean) SPUtils.get(this,SPUtils.SP_MONITOR_MONITORING,false);\n boolean boot = (boolean) SPUtils.get(this,SPUtils.SP_MONITOR_BOOT,false);\n\n sw_boot.setChecked(boot);\n sw_speed_noti.setChecked(monitoring);\n if (!monitoring){\n sw_boot.setEnabled(false);\n }else {\n if(!ServiceUtils.isServiceRunning(this,NetMonitorService.class.getName())){\n startMonitorService();\n }\n }\n\n }",
"public void setStable() {\n this.unstable = false;\n this.unstableTimeline.stop();\n this.statusLed.setFastBlink(false);\n if (this.shutdownButton.isSelected() == true) {\n this.statusLed.setStatus(\"off\");\n } else if (this.offlineButton.isSelected() == true) {\n this.statusLed.setStatus(\"warning\");\n } else {\n this.statusLed.setStatus(\"ok\");\n } \n }",
"void resetStatus();",
"public void setStatuses(java.util.Collection<String> statuses) {\n if (statuses == null) {\n this.statuses = null;\n return;\n }\n\n this.statuses = new java.util.ArrayList<String>(statuses);\n }",
"void startStatisticsMonitor();"
] | [
"0.7174716",
"0.67003983",
"0.6100221",
"0.6058732",
"0.570422",
"0.54947543",
"0.5300116",
"0.51170295",
"0.51094764",
"0.51089126",
"0.51051974",
"0.51004237",
"0.5036607",
"0.49582255",
"0.4955893",
"0.4920768",
"0.48917714",
"0.48238775",
"0.48205617",
"0.48118287",
"0.47534865",
"0.47198448",
"0.4718574",
"0.4710523",
"0.46867597",
"0.4643799",
"0.46378314",
"0.4637287",
"0.46223378",
"0.4614815",
"0.46011403",
"0.45947585",
"0.45937413",
"0.45860243",
"0.4579284",
"0.45576096",
"0.45479262",
"0.45462608",
"0.454528",
"0.453739",
"0.45372605",
"0.45239386",
"0.45232695",
"0.45226356",
"0.44959536",
"0.4494927",
"0.44918573",
"0.44689295",
"0.4465422",
"0.44650635",
"0.44624946",
"0.4452661",
"0.44466853",
"0.44404325",
"0.44311237",
"0.4430948",
"0.44172633",
"0.44144386",
"0.44125396",
"0.4410111",
"0.4408484",
"0.44084606",
"0.44056436",
"0.4401814",
"0.4395196",
"0.4387028",
"0.4386181",
"0.43854332",
"0.43778238",
"0.4377124",
"0.4369334",
"0.4365467",
"0.43640488",
"0.43630913",
"0.436219",
"0.43551376",
"0.4353111",
"0.43492705",
"0.43445733",
"0.4343499",
"0.4342049",
"0.43399274",
"0.43398654",
"0.4339379",
"0.4337417",
"0.43315786",
"0.43278238",
"0.43263477",
"0.4324195",
"0.43141043",
"0.43119413",
"0.4311921",
"0.43102327",
"0.4308148",
"0.4307571",
"0.4303622",
"0.4302393",
"0.4298722",
"0.4297693",
"0.42969352"
] | 0.802591 | 0 |
Appends and returns a new empty "Get_Status_All_Monitors" element | public net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors addNewGetStatusAllMonitors()
{
synchronized (monitor())
{
check_orphaned();
net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors target = null;
target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().add_element_user(GETSTATUSALLMONITORS$0);
return target;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors getGetStatusAllMonitors()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors target = null;\r\n target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().find_element_user(GETSTATUSALLMONITORS$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"public void setGetStatusAllMonitors(net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors getStatusAllMonitors)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors target = null;\r\n target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().find_element_user(GETSTATUSALLMONITORS$0, 0);\r\n if (target == null)\r\n {\r\n target = (net.ip_label.ws.ws_datametrie_php.GetStatusAllMonitorsDocument.GetStatusAllMonitors)get_store().add_element_user(GETSTATUSALLMONITORS$0);\r\n }\r\n target.set(getStatusAllMonitors);\r\n }\r\n }",
"public static void getWatch() {\n for ( String nodeId : getNodes() ){\n Wearable.MessageApi.sendMessage(\n mGoogleApiClient, nodeId, \"GET_WATCH\", new byte[0]).setResultCallback(\n new ResultCallback<MessageApi.SendMessageResult>() {\n @Override\n public void onResult(MessageApi.SendMessageResult sendMessageResult) {\n if (!sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"Failed to send message with status code: \"\n + sendMessageResult.getStatus().getStatusCode());\n } else if (sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"onResult successful!\");\n }\n }\n }\n );\n }\n }",
"int getMonitors();",
"public static void monitoring(){\n\t\tWebSelector.click(Xpath.monitoring);\n\t}",
"public List<TorrentStatus> status() {\n torrent_status_vector v = alert.getStatus();\n int size = (int) v.size();\n\n List<TorrentStatus> l = new ArrayList<>(size);\n for (int i = 0; i < size; i++) {\n l.add(new TorrentStatus(v.get(i)));\n }\n\n return l;\n }",
"public List<Monitor> retrieveMonitorsForServer(ServerDetail serverDetail) {\n List<Monitor> monitors = new ArrayList<Monitor>();\n ArrayList<Class> monitorClasses = (ArrayList<Class>) availableMonitors.getMonitorList();\n try{\n for (Class klass: monitorClasses){\n Monitor obj = (Monitor) klass.newInstance();\n // Set default variables for Monitors\n obj.serverDetail = serverDetail;\n obj.realtimeThoth = realTimeThoth;\n obj.shrankThoth = historicalDataThoth;\n obj.mailer = mailer;\n monitors.add(obj);\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n return monitors;\n }",
"private void fillStatusList() {\n StatusList = new ArrayList<>();\n StatusList.add(new StatusItem(\"Single\"));\n StatusList.add(new StatusItem(\"Married\"));\n }",
"private void writeSecondLevelMonitors() {}",
"public static ArrayList<ArrayList<String>> getFullWaitlist() {\r\n con = DBConnection.getConnection();\r\n waitlist.clear();\r\n try {\r\n PreparedStatement getAll = con.prepareStatement(\"Select * from Waitlist order by DATE, TIMESTAMP\");\r\n ResultSet res = getAll.executeQuery();\r\n\r\n WaitlistQueries.getArrayListResult(res);\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return waitlist;\r\n }",
"List<StatusListener> mo9950b();",
"public DescribeMonitorResult withStatus(String status) {\n setStatus(status);\n return this;\n }",
"public net.opengis.gml.x32.StringOrRefType addNewStatus()\n {\n synchronized (monitor())\n {\n check_orphaned();\n net.opengis.gml.x32.StringOrRefType target = null;\n target = (net.opengis.gml.x32.StringOrRefType)get_store().add_element_user(STATUS$0);\n return target;\n }\n }",
"public PvaClientNTMultiMonitor createNTMonitor()\n {\n return createNTMonitor(\"value,alarm,timeStamp\");\n }",
"public Builder clearNodeStatusList() {\n if (nodeStatusListBuilder_ == null) {\n nodeStatusList_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n nodeStatusListBuilder_.clear();\n }\n return this;\n }",
"public void addMonitors() {\n\t\t// get graphics environment\n\t\tGraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();\n\t\tGraphicsDevice[] graphicsDevices = graphicsEnvironment.getScreenDevices();\n\t\t// let user choose on which screen to show the capturer, only if more than one is connected\n\t\tif (graphicsDevices.length > 1) {\n\t\t\tbuttonPanel.removeAll();\n\t\t\tJLabel screenLabel = new JLabel(getResourceMap().getString(\"screenLabel.text\"));\n\t\t\tbuttonPanel.add(screenLabel, \"wrap, grow, span\");\n\t\t\t// create buttongroup for selecting monitor\n\t\t\tButtonGroup screenButtonGroup = new ButtonGroup();\n\t\t\tInteger defaultMonitorId = videoCapturerFactory.getMonitorIdForComponent(selectedVideoCapturerName);\n\t\t\t// get the default monitor id for this capturer\n\t\t\tfor (GraphicsDevice graphicsDevice : graphicsDevices) {\n\t\t\t\tString monitorIdString = graphicsDevice.getIDstring();\n\t\t\t\tDisplayMode displayMode = graphicsDevice.getDisplayMode();\n\t\t\t\t// final Rectangle position = graphicsDevice.getDefaultConfiguration().getBounds();\n\t\t\t\tString resolution = displayMode.getWidth() + \"x\" + displayMode.getHeight();\n\t\t\t\tJToggleButton button = new JToggleButton(\"<html><center>\" + monitorIdString + \"<br>\" + resolution + \"</center></html>\");\n\t\t\t\tmonitorIdString = monitorIdString.substring(monitorIdString.length() - 1);\n\t\t\t\tbutton.setActionCommand(monitorIdString);\n\t\t\t\tbutton.addActionListener(new ActionListener() {\n\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tAbstractButton source = (AbstractButton) e.getSource();\n\t\t\t\t\t\tString monitorId = source.getActionCommand();\n\t\t\t\t\t\t// TODO pass position here instead of monitor id..\n\t\t\t\t\t\tfirePropertyChange(SelfContained.MONITOR_ID, selectedMonitorId, selectedMonitorId = monitorId);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\tbutton.setBackground(Color.WHITE);\n\t\t\t\t// set default screen selection\n\t\t\t\tint monitorId = Integer.parseInt(monitorIdString);\n\t\t\t\tif (defaultMonitorId != null && defaultMonitorId == monitorId) {\n\t\t\t\t\tbutton.setSelected(true);\n\t\t\t\t\tscreenButtonGroup.setSelected(button.getModel(), true);\n\t\t\t\t} else {\n\t\t\t\t\tscreenButtonGroup.setSelected(button.getModel(), false);\n\t\t\t\t}\n\t\t\t\tscreenButtonGroup.add(button);\n\t\t\t\tbuttonPanel.add(button, \"height 70!, width 70::, grow\");\n\t\t\t}\n\t\t\tscreenLabel.setVisible(true);\n\t\t\tbuttonPanel.setVisible(true);\n\t\t}\n\t}",
"public List<WatchRecord> getWatchList() throws Exception {\r\n List<WatchRecord> watchList = new Vector<WatchRecord>();\r\n List<WatchRecordXML> chilluns = this.getChildren(\"watch\", WatchRecordXML.class);\r\n for (WatchRecordXML wr : chilluns) {\r\n watchList.add(new WatchRecord(wr.getPageKey(), wr.getLastSeen()));\r\n }\r\n return watchList;\r\n }",
"private void populateStatus() {\n\t\t\n\t\tstatusList.add(new Status(MainActivity.profileUrls[1], \"Mohamed\", \"14 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[4], \"Ahmed Adel\", \"10 minutes ago\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[0], \"Manar\", \"Yesterday, 5:08 PM\"));\n\t\tstatusList.add(new Status(MainActivity.profileUrls[5], \"Ramadan\", \"Today, 10:30 AM\"));\n\t\t\n\t}",
"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 java.util.List<entities.Torrent.NodeReplicationStatus> getNodeStatusListList() {\n if (nodeStatusListBuilder_ == null) {\n return java.util.Collections.unmodifiableList(nodeStatusList_);\n } else {\n return nodeStatusListBuilder_.getMessageList();\n }\n }",
"@GetMapping()\n @ApiOperation(value = \"Get all monitors for the authenticated user\")\n public List<BaseMonitor> getAllMonitors(Principal principal) {\n User user = userRepository.findUserByUsername(principal.getName());\n return monitorRepository.findAllByUser(user);\n }",
"private void fillMonitorsMetricsMap() {\n\t\tmonitorsMetricsMap=new HashMap<>();\n\t\tmonitorsMetricsMap.put(\"RR<sub>TOT</sub>\", new String[] {rosetta.MDC_RESP_RATE.VALUE, \"MDC_DIM_RESP_PER_MIN\"});\n\t\tmonitorsMetricsMap.put(\"EtCO<sub>2</sub>\", new String[] {rosetta.MDC_AWAY_CO2_ET.VALUE, rosetta.MDC_DIM_MMHG.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PEAK</sub>\", new String[] {rosetta.MDC_PRESS_AWAY_INSP_PEAK.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PLAT</sub>\", new String[] {rosetta.MDC_PRESS_RESP_PLAT.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"PEEP\", new String[] {\"ICE_PEEP\", rosetta.MDC_DIM_CM_H2O.VALUE});\t//TODO: Confirm there is no MDC_ for PEEP\n\t\tmonitorsMetricsMap.put(\"FiO<sub>2</sub>%\", new String[] {\"ICE_FIO2\", rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\tmonitorsMetricsMap.put(\"Leak %\", new String[] {rosetta.MDC_VENT_VOL_LEAK.VALUE, rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\t\n\t\t//Leak %\n\t}",
"public entities.Torrent.NodeReplicationStatus.Builder addNodeStatusListBuilder() {\n return getNodeStatusListFieldBuilder().addBuilder(\n entities.Torrent.NodeReplicationStatus.getDefaultInstance());\n }",
"private void refreshNodeList() {\n if (UnderNet.router.status.equals(InterfaceStatus.STARTED)) {\n //Using connected and cached nodes if the router has started.\n ArrayList<Node> nodesToList = UnderNet.router.getConnectedNodes();\n for (Node cachedNode :\n EntryNodeCache.cachedNodes) {\n boolean canAdd = true;\n for (Node connectedNode : UnderNet.router.getConnectedNodes()) {\n if (cachedNode.getAddress().equals(connectedNode.getAddress())) {\n canAdd = false;\n }\n }\n if (canAdd) {\n nodesToList.add(cachedNode);\n }\n }\n nodeList.setListData(nodesToList.toArray());\n } else {\n //Using cached nodes if the router isn't online.\n nodeList.setListData(EntryNodeCache.cachedNodes.toArray());\n }\n }",
"private static void showsExtendAndQueryParameters() {\n\n\t\tQuery<BugReport> queryNoneAssigned = Ebean.createQuery(BugReport.class,\n\t\t\t\"assignedStatusCount\");\n\t\tqueryNoneAssigned.setParameter(\"status\", \"NEW\");\n\t\tqueryNoneAssigned.setParameter(\"count\", 0);\n\t\tqueryNoneAssigned.where().isNotNull(\"assigned.id\");\n\n\t\tList<BugReport> newBugsAssigned = queryNoneAssigned.findList();\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\n\t\tfor (BugReport bugReport : newBugsAssigned) {\n\t\t\tInteger userId = bugReport.getAssigned().getId();\n\t\t\tint count = bugReport.getCount();\n\t\t\tString status = bugReport.getStatus().getCode();\n\n\t\t\tSystem.out.println(\" new bugs assigned: \" + count + \" to \" + userId + \" as \" + status);\n\t\t}\n\t}",
"org.hl7.fhir.ObservationStatus addNewStatus();",
"default Promise<List<String>> findAllNodesWithStatus(HealthStatus queryStatus) {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n\n }",
"public static void getLightStatus()\n\t{\n\t\ttry\n\t\t{\n\t\t\tArrayList<NameValuePair> nameValuePairs1 = new ArrayList<NameValuePair>();\n\t\t\tnameValuePairs1.add(new BasicNameValuePair(\"userID\",String.valueOf(Thermo_main.userID)));\n\t\t\tString httpPoststring = \"http://\"+Thermo_main.ip_addr_server+\"/getLightStatus_java.php\";\n\t\t\t\n\t\t\t//String httpPostSetString = \"http://\"+Thermo_main.ip_addr_server+\"/setEnergy.php\";\n\t\t\t//Thermo_main.help.setResult(nameValuePairs1, httpPostSetString);\n\t\t\t\n\t\t\tString result = Thermo_main.help.getResult(nameValuePairs1,httpPoststring);\n\t\t\tJSONArray array = new JSONArray(result);\n\n\t\t\tfor(int n =0; n< array.length(); n++)\n\t\t\t{\n\t\t\t\tJSONObject objLight = array.getJSONObject(n);\n\t\t\t\troom_new.add(objLight.getInt(\"room\")); \n\t\t\t\tlight_status_new.add(objLight.getString(\"light_status\"));\n\t\t\t\tdimmer_status_new.add(objLight.getString(\"dimmer_status\"));\n\t\t\t}\n\t\t}catch(Exception e) {}\n\t}",
"com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetMonitors();",
"public ArrayList findAllRoomsWSummary(){\n List <Room> allRooms= roomRepository.findAll();\n System.out.println(\"All rooms is:\");\n System.out.println(allRooms.toString());\n//Set an array list that contains all the data to return to the client\n ArrayList<RoomSummaryMap> dataToReturnToClient = new ArrayList<>();\n\n for (Room room : allRooms) {\n// If there is no associated msg, assign an empty array to the lastMsg.\n if(room.getAssociated_messages().size()<1){\n System.out.println(\"size is less than 1\");\n RoomSummaryMap mapObject= new RoomSummaryMap(room.getId(),room.getName(),\n room.getImage(),\n room.getCreatedBy(),\n room.getAssociated_messages(), \"\");\n System.out.println(\"map object is:\");\n System.out.println(mapObject);\n\n dataToReturnToClient.add(mapObject);\n\n continue;\n }\n System.out.println(\"Size is more than 1\");\n// Else, add the last msg\n String lasMsgObjId=\n room.getAssociated_messages().get(room.getAssociated_messages().size()-1).toString();\n//Query the db for this message\n Message messageInstance= messageService.findbyId(lasMsgObjId);\n dataToReturnToClient.add(new RoomSummaryMap(room.getId(),room.getName(),\n room.getImage(),\n room.getCreatedBy(),\n room.getAssociated_messages(), messageInstance.getMessage()));\n }\n\n System.out.println(\"data to return to client inside room service\");\n System.out.println(dataToReturnToClient);\n return dataToReturnToClient;\n }",
"@Override\n public List<Report> getStatusList(){\n List<Report> statusList = null;\n statusList = adminMapper.getStatusList();\n return statusList;\n }",
"public org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty addNewSldAll()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty)get_store().add_element_user(SLDALL$6);\n return target;\n }\n }",
"public void emptyBox()\n {\n this.notifications = new TreeSet<>();\n this.setUpdated();\n }",
"public BrokersStatus()\r\n {\r\n brokers = new ArrayList<BrokerStatus>();\r\n }",
"public Builder addNodeStatusList(entities.Torrent.NodeReplicationStatus value) {\n if (nodeStatusListBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureNodeStatusListIsMutable();\n nodeStatusList_.add(value);\n onChanged();\n } else {\n nodeStatusListBuilder_.addMessage(value);\n }\n return this;\n }",
"Set<AlertDto> getNewAlerts(String msisdn);",
"public java.util.List<entities.Torrent.NodeReplicationStatus.Builder>\n getNodeStatusListBuilderList() {\n return getNodeStatusListFieldBuilder().getBuilderList();\n }",
"private List<String> needRefresh(){\n\t\treturn null;\n\t}",
"List<TopicStatus> getAll();",
"public Builder addNodeStatusList(\n entities.Torrent.NodeReplicationStatus.Builder builderForValue) {\n if (nodeStatusListBuilder_ == null) {\n ensureNodeStatusListIsMutable();\n nodeStatusList_.add(builderForValue.build());\n onChanged();\n } else {\n nodeStatusListBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public static void main(List<String> header, List<String> items, Integer itemCount, String folder) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd' 'HH:mm:ss.SSS\");\n String nowDate =sdf.format(new Date());\n\n ///Calculate a ship date (2 days from current?)\n Date date = new Date();\n long twoDaysFromNowTime = date.getTime();\n twoDaysFromNowTime = twoDaysFromNowTime +\n (1000 * 60 * 60 * 24 * 2);\n Date twoDaysFromNow = new Date(twoDaysFromNowTime);\n String twoDate =sdf.format(twoDaysFromNow);\n\n // Create a random number for Tracking reference\n long randomnumber = System.currentTimeMillis();\n String trkRef = String.valueOf(randomnumber);\n trkRef = (\"TRKNO\" +trkRef);\n\n for(int i = 0; i < header.size(); i++) {\n System.out.println(\"itemCount from XML \" +itemCount);\n }\n\n try {\n\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n // root elements **FIXED VALUE**\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Update_WCS_OrderStatus\");\n doc.appendChild(rootElement);\n\n // Control **CONTROL NODE**\n Element control = doc.createElement(\"ControlArea\");\n rootElement.appendChild(control);\n\n // verb **FIXED VALUE**\n Element verb = doc.createElement(\"Verb\");\n verb.appendChild(doc.createTextNode(\"Update\"));\n control.appendChild(verb);\n\n // noun **FIXED VALUE**\n Element noun = doc.createElement(\"Noun\");\n noun.appendChild(doc.createTextNode(\"WCS_OrderStatus\"));\n control.appendChild(noun);\n\n // DataArea **CONTROL NODE**\n Element dataarea = doc.createElement(\"DataArea\");\n dataarea.appendChild(doc.createTextNode(\"\"));\n rootElement.appendChild(dataarea);\n\n // Order Status **CONTROL NODE**\n Element orderstatus = doc.createElement(\"OrderStatus\");\n orderstatus.appendChild(doc.createTextNode(\"\"));\n dataarea.appendChild(orderstatus);\n\n//** Order Status Header elements **/\n // Order Status Header **CONTROL NODE**\n Element orderstatusheader = doc.createElement(\"OrderStatusHeader\");\n orderstatusheader.appendChild(doc.createTextNode(\"\"));\n orderstatus.appendChild(orderstatusheader);\n\n /** Order Number **DYNAMIC VALUE**\n **/\n Element ordernumber = doc.createElement(\"OrderNumber\");\n ordernumber.appendChild(doc.createTextNode(header.get(0)));\n orderstatusheader.appendChild(ordernumber);\n ordernumber.setAttribute(\"type\", \"ByWCS\");\n\n /** Total Header Pricing\n * (Currency) **DYNAMIC VALUES**\n **/\n Element totalpriceinfoheader = doc.createElement(\"TotalPriceInfo\");\n orderstatusheader.appendChild(totalpriceinfoheader);\n totalpriceinfoheader.setAttribute(\"currency\", (header.get(1)));\n\n /** Total Net Price **DYNAMIC VALUES**\n **/\n Element totalnetpriceheader = doc.createElement(\"TotalNetPrice\");\n totalnetpriceheader.appendChild(doc.createTextNode(header.get(2)));\n totalpriceinfoheader.appendChild(totalnetpriceheader);\n\n /** Total Ship Price **DYNAMIC VALUES**\n **/\n Element totalshippingpriceheader = doc.createElement(\"TotalShippingPrice\");\n totalshippingpriceheader.appendChild(doc.createTextNode(header.get(3)));\n totalpriceinfoheader.appendChild(totalshippingpriceheader);\n\n /** Total Selling Price **DYNAMIC VALUES**\n **/\n Element totalsellingpriceheader = doc.createElement(\"TotalSellingPrice\");\n totalsellingpriceheader.appendChild(doc.createTextNode(header.get(4))); totalpriceinfoheader.appendChild(totalsellingpriceheader);\n\n // Order Status **FIXED VALUE**\n Element headerstatus = doc.createElement(\"Status\");\n headerstatus.appendChild(doc.createTextNode(\"S\"));\n orderstatusheader.appendChild(headerstatus);\n\n // Order Date **RUNTIME VARIABLE**\n Element placeddate = doc.createElement(\"PlacedDate\");\n placeddate.appendChild(doc.createTextNode(nowDate));\n orderstatusheader.appendChild(placeddate);\n\n // The 4 Blank customer fields ** FIXED **/\n Element cf1 = doc.createElement(\"CustomerField\");\n orderstatusheader.appendChild(cf1);\n Element cf2 = doc.createElement(\"CustomerField\");\n orderstatusheader.appendChild(cf2);\n Element cf3 = doc.createElement(\"CustomerField\");\n orderstatusheader.appendChild(cf3);\n Element cf4 = doc.createElement(\"CustomerField\");\n orderstatusheader.appendChild(cf4);\n\n//** Order Status Item elements **/\n int itemArrayCount = 0;\n for (int i = 0; i < itemCount; i++) {\n // Order Status Item **CONTROL NODE**\n Element orderstatusitem = doc.createElement(\"OrderStatusItem\");\n orderstatusitem.appendChild(doc.createTextNode(\"\"));\n orderstatus.appendChild(orderstatusitem);\n\n // Item Number WCS Value that cannot be got at. Fixed to '9999999' for now.\n Element itemnumber = doc.createElement(\"ItemNumber\");\n itemnumber.appendChild(doc.createTextNode(items.get(0 + itemArrayCount)));\n orderstatusitem.appendChild(itemnumber);\n itemnumber.setAttribute(\"type\", \"ByWCS\");\n\n /** Product Number By Merchant (SKU) **DYNAMIC VALUES**\n **/\n Element productnumberbymerchant = doc.createElement(\"ProductNumberByMerchant\");\n productnumberbymerchant.appendChild(doc.createTextNode(items.get(1 + itemArrayCount)));\n orderstatusitem.appendChild(productnumberbymerchant);\n\n // Quantity Info **CONTROL NODE**\n Element quantityinfo = doc.createElement(\"QuantityInfo\");\n orderstatusitem.appendChild(quantityinfo);\n\n /** Shipped Quantity **DYNAMIC VALUES**\n **/\n Element shippedquantity = doc.createElement(\"ShippedQuantity\");\n String itemQty = String.valueOf(items.get(2 + itemArrayCount).split(\"\\\\.\")[0]);\n shippedquantity.appendChild(doc.createTextNode(itemQty));\n quantityinfo.appendChild(shippedquantity);\n\n /** Total Item Pricing\n * (Currency) **DYNAMIC VALUE**\n **/\n Element totalpriceinfoitem = doc.createElement(\"TotalPriceInfo\");\n orderstatusitem.appendChild(totalpriceinfoitem);\n totalpriceinfoitem.setAttribute(\"currency\", (header.get(1 )));\n\n /** Item Price **DYNAMIC VALUE**\n **/\n Element totalnetpriceitem = doc.createElement(\"TotalNetPrice\");\n totalnetpriceitem.appendChild(doc.createTextNode(items.get(3 + itemArrayCount)));\n totalpriceinfoitem.appendChild(totalnetpriceitem);\n\n // Shipping Price **FIXED VALUE**\n Element totalshippingpriceitem = doc.createElement(\"TotalShippingPrice\");\n totalshippingpriceitem.appendChild(doc.createTextNode(\"0.00\"));\n totalpriceinfoitem.appendChild(totalshippingpriceitem);\n\n /** Item Price **DYNAMIC VALUE**\n **/\n Element totalsellingpriceitem = doc.createElement(\"TotalSellingPrice\");\n totalsellingpriceitem.appendChild(doc.createTextNode(items.get(3 + itemArrayCount)));\n totalpriceinfoitem.appendChild(totalsellingpriceitem);\n\n // Item status **FIXED VALUE**\n Element itemstatus = doc.createElement(\"Status\");\n itemstatus.appendChild(doc.createTextNode(\"S\"));\n orderstatusitem.appendChild(itemstatus);\n\n // Shipping Info **CONTROL NODE**\n Element shippinginfo = doc.createElement(\"ShippingInfo\");\n orderstatusitem.appendChild(shippinginfo);\n\n // Ship Date **RUN TIME VARIABLE**\n Element shippeddate = doc.createElement(\"ActualShipDate\");\n shippeddate.appendChild(doc.createTextNode(twoDate));\n shippinginfo.appendChild(shippeddate);\n\n // Ship Date **RUN TIME VARIABLE**\n Element trackingreference = doc.createElement(\"TrackingReference\");\n trackingreference.appendChild(doc.createTextNode(trkRef));\n orderstatusitem.appendChild(trackingreference);\n\n // Carrier **FIXED VALUE**\n Element carreier = doc.createElement(\"Carrier\");\n carreier.appendChild(doc.createTextNode(\"PNT\"));\n orderstatusitem.appendChild(carreier);\n itemArrayCount = (i+1) * 4;\n }\n\n // write the content into xml file\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, \"Update_WCS_OrderStatus_30.dtd\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"7\");\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(new File(\"Q:/Testing/Results/\" +folder+ \"/OR03_\"+header.get(0) +\".xml\"));\n\n // Output to console for testing\n //StreamResult result = new StreamResult(System.out);\n\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException pce) {\n pce.printStackTrace();\n } catch (TransformerException tfe) {\n tfe.printStackTrace();\n }\n }",
"void visitElement_statuses(org.w3c.dom.Element element) { // <statuses>\n // element.getValue();\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 if (nodeElement.getTagName().equals(\"status\")) {\n visitElement_status(nodeElement);\n }\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 }",
"java.util.List<online_info>\n getInfoList();",
"public void clear() {\n synchronized (mLock) {\n mNumStartRangingCalls = 0;\n mOverallStatusHistogram.clear();\n mPerPeerTypeInfo[PEER_AP] = new PerPeerTypeInfo();\n mPerPeerTypeInfo[PEER_AWARE] = new PerPeerTypeInfo();\n }\n }",
"public void getSystemStatus() throws Exception\r\n\t{\r\n\t\tsystemDump.delete(0, systemDump.length());\r\n\r\n\t\tboolean needAlarm = memoryLogging();\r\n\r\n\t\tif (Database.appDatasource != null)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Database connection status: \\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number database connection\\t\\t\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number busy database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumBusyConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumIdleConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumUnclosedOrphanedConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tString queueWarningMessage = \"\";\r\n\r\n\t\tsystemDump.append(\"\\r\\n\");\r\n\t\tsystemDump.append(\"Local queue status: \\r\\n\");\r\n\r\n\t\tfor (String key : QueueFactory.localQueues.keySet())\r\n\t\t{\r\n\t\t\tLocalQueue localQueue = QueueFactory.getLocalQueue(key);\r\n\r\n\t\t\tsystemDump.append(\"Local queue (\");\r\n\t\t\tsystemDump.append(key);\r\n\t\t\tsystemDump.append(\"): \");\r\n\t\t\tsystemDump.append(localQueue.getSize());\r\n\r\n\t\t\tif (localQueue.getMaxSize() > 0)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"/\");\r\n\t\t\t\tsystemDump.append(localQueue.getMaxSize());\r\n\t\t\t}\r\n\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\t\tif (QueueFactory.getTotalLocalPending() > 0)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"Total pending counter : \");\r\n\t\t\tsystemDump.append(QueueFactory.getTotalLocalPending());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tif (queueDispatcherEnable)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Remote queue status: \\r\\n\");\r\n\r\n\t\t\tQueueSession session = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tsession = getQueueSession();\r\n\r\n\t\t\t\tfor (int j = 0; j < externalQueues.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (externalQueues[j].equals(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tString queueName = externalQueues[j];\r\n\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tQueue checkQueue = QueueFactory.getQueue(queueName);\r\n\r\n\t\t\t\t\t\tint size = QueueFactory.getQueueSize(session, checkQueue);\r\n\r\n\t\t\t\t\t\tQueueFactory.queueSnapshot.put(queueName, new Integer(size));\r\n\r\n\t\t\t\t\t\tsystemDump.append(\"Total command request for \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\" : \");\r\n\t\t\t\t\t\tsystemDump.append(size);\r\n\t\t\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\t\t\tqueueWarningMessage += queueWarning(checkQueue, queueName, size);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsystemDump.append(\"Error occur when get size of queue \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\": \");\r\n\t\t\t\t\t\tsystemDump.append(e.getMessage());\r\n\r\n\t\t\t\t\t\tlogMonitor(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"Can not get remote queue size: \");\r\n\t\t\t\tsystemDump.append(e.getMessage());\r\n\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\tlogMonitor(e);\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tQueueFactory.closeQueue(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"WARNING: Disk space is running low\");\r\n\t\t}\r\n\t\tif (!queueWarningMessage.equals(\"\"))\r\n\t\t{\r\n\t\t\tneedAlarm = true;\r\n\t\t\tsystemDump.append(queueWarningMessage);\r\n\t\t}\r\n\r\n\t\tlogMonitor(systemDump);\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsendInstanceAlarm(\"system-resource\", systemDump.toString());\r\n\t\t}\r\n\t}",
"public void startMonitoring(int secondsToMonitor) {\n\t for(int i = 0; i< secondsToMonitor; i++) {\n\t \t// launch the monitoring of the main page and extract two list, one with sold out the other one for available\n\t \t// First one is sold out, second one is available\n\t \tString date = timer.getDate();\n\t \tList<Element> listsOfArticle = monitorMainPage();\n\t \tList<ArticleGeneral> allArticles = extractAllArticle(listsOfArticle);\n\t \tList <Article> articles = processAllArticles(allArticles);\n\t \tboolean isCSVOut = csvFIleCreator.createCSVofAllArticles(articles, date);\n\t \trssmain.rssStart();\n\t \t// get sleepTime\n\t\t try {\n\t\t \tRandom r = new Random();\n\t\t \tint sleepTime = VALEURMIN + r.nextInt(VALEURMAX - VALEURMIN);\n\t\t \tSystem.out.println(\"run number\" + i + \" \" + sleepTime + \" seconds to sleep\");\n\t\t\t\tTimeUnit.SECONDS.sleep(sleepTime);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t }\n\t}",
"int getNodeStatusListCount();",
"public void refresh() {\n/* 93 */ if (!this.initialized)\n/* 94 */ return; synchronized (this.o) {\n/* */ \n/* 96 */ this.wanService = null;\n/* 97 */ this.router = null;\n/* 98 */ this.upnpService.getControlPoint().search();\n/* */ } \n/* */ }",
"public void addMainSWInfo() {\r\n\r\n DocumentBuilderFactory mainExciterSWFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder mainExciterSWBuilder = null;\r\n\r\n try { mainExciterSWBuilder = mainExciterSWFactory.newDocumentBuilder(); }\r\n catch (ParserConfigurationException e) { e.printStackTrace(); }\r\n\r\n Document mainExciterSWDocument = null;\r\n try { mainExciterSWDocument = mainExciterSWBuilder.parse(new File(\"pa_exciter_control.xml\")); }\r\n catch (SAXException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }\r\n\r\n mainExciterSW.getItems().clear();\r\n NodeList SWNodeList = mainExciterSWDocument.getDocumentElement().getChildNodes();\r\n\r\n for (int j = 0; j < SWNodeList.getLength(); j++) {\r\n Node SWNode = SWNodeList.item(j);\r\n if (SWNode.getNodeType() == SWNode.ELEMENT_NODE) {\r\n Element swElement = (Element) SWNode;\r\n\r\n SWPIDDESCRIPTION = swElement.getElementsByTagName(\"PIDDESCRIPTION\").item(0).getChildNodes().item(0).getNodeValue();\r\n\r\n if(SWPIDDESCRIPTION.equals(\"MODULE PA WIDEBAND (TYPE D)(47-750MHz)\"))\r\n break;\r\n mainExciterSW.getItems().add(SWPIDDESCRIPTION);\r\n }\r\n }\r\n }",
"private void updateDevicesList() {\n\n netDevicesPanel.removeAll();\n\n netManager.getRecentlySeenDevices().forEach(device -> {\n netDevicesPanel.add(new DevicePanel(device));\n });\n\n netDevicesPanel.revalidate();\n netDevicesPanel.repaint();\n }",
"public List<OFPortStatisticsReply> getSwitchStatistics(long switchId, OFStatisticsType statType) {\n\t\t\t List<OFPortStatisticsReply> values = new ArrayList<OFPortStatisticsReply>();\n\t\t\t statsReply = new ArrayList<OFStatistics>();\n\t\t\t sw = floodlightProvider.getSwitches().get(switchId);\n\t\t\t //System.out.print(\"Value of \"+sw);\n\t\t\t System.out.println(\"+++++++++ENTERED FIU+++++++++\");\n\t\t\t if (sw != null) {\n\t\t\t \tSystem.out.println(\"+++++++++ENTERED FIU IF CONDITION+++++++++\");\n\t\t\t OFStatisticsRequest req = new OFStatisticsRequest();\n\t\t \tSystem.out.println(\"Switch ID IS++++++++++++++++\"+switchId);\n\t\t\t req.setStatisticType(statType);\n\t\t\t int requestLength = req.getLengthU();\n\t\t\t if (statType == OFStatisticsType.PORT) {\n\t\t\t OFPortStatisticsRequest specificReq = new OFPortStatisticsRequest();\n\t\t\t specificReq.setPortNumber((short)OFPort.OFPP_ALL.getValue());\n\t\t\t \tSystem.out.println(\"Values of port are++++++++++++\"+(short)OFPort.OFPP_ALL.getValue());\n\t\t\t req.setStatistics(Collections.singletonList((OFStatistics)specificReq));\n\t\t\t requestLength += specificReq.getLength();\n\t\t\t }\n\t\t\t req.setLengthU(requestLength);\n\t\t\t \n\t\t\t \n\t\t\t statsQueryXId = sw.getNextTransactionId();\n\t\t\t System.out.println(\"++++ID IS++++\"+statsQueryXId);\n\t\t\t try {\n\t\t\t //future = sw.getStatistics(req);\n\t\t\t // values = future.get(10, TimeUnit.SECONDS);\n\t\t\t \tsw.sendStatsQuery(req, statsQueryXId, this);\n\t\t\t \tSystem.out.println(\"JUST SENT STATS QUERY++++++++++++++++++++\"+req+\"---TO---\"+converter.convertDPID(sw.getId()));\n\n\t\t\t \twaiting = true;\n\t\t\t \t// Wait for the reply, sleep for 10ms then check\n\t\t\t \twhile(waiting){\n\t\t\t \t\ttry {\n\t\t\t \t\tThread.sleep(100);\n\t\t\t\t \tSystem.out.println(\"We are waiting++++++++++++\");\n\n\t\t\t \t\t} catch (InterruptedException e) {\n\t\t\t \t\t// TODO Auto-generated catch block\n\t\t\t \t\te.printStackTrace();\n\t\t\t \t\t}\n\t\t\t \t\t}\n \t\n\t\t\t // Cast OFPortStatistics to OFPortStatisticsReply\n\t\t\t for(OFStatistics stat : statsReply){\n\t\t\t \tvalues.add((OFPortStatisticsReply) stat);\n\t\t\t \t}\n\t\t\t \tSystem.out.println(\"Values are++++++++++++\"+values);\n\t\t\t \treturn values;\n\t\t\t \t} catch (IOException e) {\n\t\t\t \t// TODO Auto-generated catch block\n\t\t\t \te.printStackTrace();\n\t\t\t \t}\n\t\t\t }\n\t\t\t \t// Return empty list\n\t\t\t \treturn values;\n\t\t\t \t}",
"private void addDefaultMonitoredPools() {\n\t\tfor (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) {\n\t\t\tif (pool.isUsageThresholdSupported()) {\n\t\t\t\tmonitoredPools.add(pool);\n\t\t\t\tif (CoreMoSyncPlugin.getDefault().isDebugging()) {\n\t\t\t\t\tCoreMoSyncPlugin.trace(\"Monitoring memory pool {0}\", pool.getName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private List<String> getStatusmessage(String xml) throws PrepException{\n\n boolean validate = false;\n\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n dbf.setValidating(validate);\n dbf.setNamespaceAware(true);\n dbf.setIgnoringElementContentWhitespace(true);\n\n Document doc = null;\n String statusmessage = \"\";\n\n List<String> exceptions = new ArrayList();\n\n\n\n try {\n DocumentBuilder builder = dbf.newDocumentBuilder();\n doc = builder.parse(new InputSource(new StringReader(xml)));\n NodeList nodeMatches = doc.getElementsByTagName(\"statusmessage\");\n Node statusmsgNode = nodeMatches.item(0); //should be only one <statusmessage> element\n NodeList immediateNodes = statusmsgNode.getChildNodes();\n\n Node textNode = immediateNodes.item(0); //text\n exceptions.add(textNode.getNodeValue());\n\n if(!textNode.getNodeValue().equalsIgnoreCase(\"ok\")){\n statusmessage += textNode.getNodeValue();\n statusmessage += \"<exceptions>\";\n\n Node exceptionsNode = immediateNodes.item(1); //exceptions element node\n NodeList exceptionsList = exceptionsNode.getChildNodes();\n for(int i=0; i<exceptionsList.getLength(); i++){\n Node exceptionNode = exceptionsList.item(i);\n Node textContent = exceptionNode.getFirstChild();\n statusmessage += \"<exception>\";\n exceptions.add(textContent.getNodeValue());\n statusmessage += textContent.getNodeValue();\n statusmessage += \"</exception>\";\n }\n statusmessage += \"</exceptions>\";\n }\n\n } catch (SAXException e) {\n throw new PrepException(\"SAXException in MTPrep.getStatusmessage() :\"+e);\n } catch (ParserConfigurationException e) {\n throw new PrepException(\"ParserConfigurationException in MTPrep.getStatusmessage() :\"+e);\n } catch (IOException e) {\n throw new PrepException(\"IOException in MTPrep.getStatusmessage() :\"+e);\n }\n return exceptions;\n }",
"java.util.List<entities.Torrent.NodeReplicationStatus>\n getNodeStatusListList();",
"void startStatisticsMonitor();",
"@java.lang.Override\n public int getNodeStatusListCount() {\n return nodeStatusList_.size();\n }",
"public M csrtStatusNull(){if(this.get(\"csrtStatusNot\")==null)this.put(\"csrtStatusNot\", \"\");this.put(\"csrtStatus\", null);return this;}",
"public void clearUpToDateStatus() {\n\t\tif(upToDateIds != null) {\n\t\t\tSystem.out.println(\"Clearing Up To Date Status.\");\n\t\t\tupToDateIds.clear();\n\t\t}\n\t}",
"public static void localchangelist(){\r\n\t\t \r\n\t\t\r\n\t\tList<ChangeLocationApplication> l = ChangeLocationApplication.find(\"Locationchangetype =? AND isApproved is false order by timestamp desc\",\"CHANGELOCATIONALONE\").fetch();\r\n\t\t\r\n\t\tSystem.out.println(\"Location Change Applications\"+ l);\r\n\t\t\r\n\t\trender(l);\r\n\t}",
"@GET\n \t@Path(\"/getAllConceptStatus\")\n \t@Produces({MediaType.APPLICATION_JSON})\n \tpublic ExtJsonFormLoadData<List<GenericStatusView>> getAllConceptStatus() throws BusinessException {\n \t\tList<GenericStatusView> listOfStatus = new ArrayList<GenericStatusView>();\n \t\t\n \t\ttry {\n \t\t\tResourceBundle res = ResourceBundle.getBundle(\"labels\", new EncodedControl(\"UTF-8\"));\n \t\t\tString availableStatusIds[] = res.getString(\"concept-status\").split(\",\");\n \t\t\t\n \t\t\tif (\"\".equals(availableStatusIds[0])) {\n \t\t\t\t//Ids of status for concepts are not set correctly\n \t\t\t\tthrow new BusinessException(\"Error with property file - check values of identifier concept status\", \"check-values-of-concept-status\");\n \t\t\t}\n \t\t\t\n \t for (String id : availableStatusIds) {\n \t \tGenericStatusView conceptStatusView = new GenericStatusView();\n\t \tconceptStatusView.setStatus(Integer.valueOf(id));\n \t \t\n \t \tString label = res.getString(\"concept-status[\"+ id +\"]\");\n \t \tif (label.isEmpty()) {\n \t \t\t//Labels of status are not set correctly\n \t \t\tthrow new BusinessException(\"Error with property file - check values of identifier concept status\", \"check-values-of-concept-status\");\n \t\t\t\t} else {\n \t\t\t\t\tconceptStatusView.setStatusLabel(label);\n \t\t\t\t}\n \t \tlistOfStatus.add(conceptStatusView);\n \t\t\t}\n \t\t} catch (MissingResourceException e) {\n \t\t\tthrow new BusinessException(\"Error with property file - check values of concept status\", \"check-values-of-concept-status\", e);\n \t\t}\n \t\tExtJsonFormLoadData<List<GenericStatusView>> result = new ExtJsonFormLoadData<List<GenericStatusView>>(listOfStatus);\n result.setTotal((long) listOfStatus.size());\n \t\treturn result;\n \t}",
"public Builder clearStatus() {\n status_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }",
"public void refresh() {\n if (this.monitorApiKey.length() == 0) {\n return;\n }\n String params =\n String.format(\"api_key=%s&format=xml&custom_uptime_ratios=1-7-30-365\", this.monitorApiKey);\n byte[] xml = loadPageWithRetries(params);\n Match doc;\n try {\n doc = $(new ByteArrayInputStream(xml));\n } catch (SAXException | IOException e) {\n throw new CouldNotRefresh(e);\n }\n String[] customRatios = doc.find(\"monitor\").attr(\"custom_uptime_ratio\").split(\"-\");\n this.last24HoursUptimeRatio = customRatios[0];\n this.last7DaysUptimeRatio = customRatios[1];\n this.last30DaysUptimeRatio = customRatios[2];\n this.last365DaysUptimeRatio = customRatios[3];\n }",
"@CrossOrigin(origins = \"*\")\n @GetMapping(\"/buildings/statistics/{building_id}\")\n public @ResponseBody\n Iterable<List<String>> buildingStatistic(@PathVariable final long building_id,\n @RequestParam final String sensor_type) {\n List<List<String>> res = new ArrayList<>();\n List<String> list;\n // list includes floor number, number of sensors, sensor type, status, install time and maintenance time\n Building building = buildingService.getBuildingByBuildingId(building_id);\n List<Floor> floorList= floorService.getFloorByBuildingID(building_id);\n if (sensor_type.equals(\"ALL\")) {\n for (int i = 0; i < Integer.valueOf(building.getNum_of_floors()); i++) {\n Floor floor = floorList.get(i);\n list = new ArrayList<>();\n list.add(\"Floor \" + String.valueOf(floor.getFloor_number()));\n int numOfSensor = floorService.countSensorByFloorID(floor.getId(), floor.getBuilding_id());\n list.add(String.valueOf(numOfSensor));\n int open, closed, maintain;\n open = floorService.countSensorsByFlooridNStatus(floor.getId(), building_id, \"open\");\n closed = floorService.countSensorsByFlooridNStatus(floor.getId(), building_id, \"closed\");\n maintain = floorService.countSensorsByFlooridNStatus(floor.getId (), building_id, \"maintaining\");\n list.add(String.valueOf(open));\n list.add(String.valueOf(closed));\n list.add(String.valueOf(maintain));\n Date install = sensorService.latestInstallTime(floor.getId(), building_id);\n Date maintainTime = sensorService.latestMaintenanceTime(floor.getId(),building_id);\n if (install == null) list.add(\"0000-00-00 00:00:00\");\n else list.add(String.valueOf(install));\n if (maintainTime == null) list.add(\"0000-00-00 00:00:00\");\n else list.add(String.valueOf(maintainTime));\n res.add(list);\n }\n } else {\n List<Sensor> sensors = sensorService.findSensorByBuildingID(building_id);\n HashSet<String> set = new HashSet<>();\n for (Sensor sensor: sensors) {\n set.add(sensor.getType().toUpperCase());\n }\n if (!set.contains(sensor_type)) return new ArrayList<>();\n else {\n for (int i = 0; i < Integer.valueOf(building.getNum_of_floors()); i++) {\n Floor floor = floorList.get(i);\n list = new ArrayList<>();\n list.add(\"Floor \" + String.valueOf(floor.getFloor_number()));\n int numOfSensor = floorService.countSensorsByFlooridNType(floor.getId(), floor.getBuilding_id(),sensor_type);\n list.add(String.valueOf(numOfSensor));\n int open, closed, maintain;\n open = floorService.countSensorsByTypeNStatus(floor.getId(), building_id, sensor_type, \"open\");\n closed = floorService.countSensorsByTypeNStatus(floor.getId(), building_id, sensor_type, \"closed\");\n maintain = floorService.countSensorsByTypeNStatus(floor.getId(), building_id, sensor_type, \"maintaining\");\n list.add(String.valueOf(open));\n list.add(String.valueOf(closed));\n list.add(String.valueOf(maintain));\n Date install = sensorService.latestInstallTime(floor.getId(), building_id);\n Date maintainTime = sensorService.latestMaintenanceTime(floor.getId(), building_id);\n if (install == null) list.add(\"0000-00-00 00:00:00\");\n else list.add(String.valueOf(install));\n if (maintainTime == null) list.add(\"0000-00-00 00:00:00\");\n else list.add(String.valueOf(maintainTime));\n res.add(list);\n }\n }\n }\n return res;\n }",
"public List<String> getBroadcastStatus() {\n\t\treturn null;\n\t}",
"private void showServices()\n {\n // Remove all of the items from the listField.\n _treeField.deleteAll();\n \n // Get a copy of the ServiceRouting class.\n ServiceRouting serviceRouting = ServiceRouting.getInstance();\n \n // Add in our new items by trolling through the ServiceBook API.\n ServiceBook sb = ServiceBook.getSB();\n ServiceRecord[] records = sb.getRecords();\n \n if( records == null ) \n {\n return;\n }\n \n int rootNode = _treeField.addChildNode( 0, \"Service Records\" );\n \n int numRecords = records.length;\n \n for( int i = 0; i < numRecords; i++ ) \n {\n String name = records[i].getName();\n String description = records[i].getDescription();\n \n if( description == null || description.length() == 0 ) \n {\n description = \"No description available\" ;\n }\n \n String uid = records[i].getUid();\n boolean serialBypass = serviceRouting.isSerialBypassActive( uid );\n\n int newParentNode = _treeField.addChildNode( rootNode, name );\n _treeField.addChildNode( newParentNode, description );\n _treeField.addChildNode( newParentNode, uid );\n _treeField.addChildNode( newParentNode, serialBypass ? \"Serial Bypass: Connected\" : \"Serial Bypass: Disconnected\");\n \n // Perform the check for the Desktop SerialRecord.\n if( name != null && name.equals( \"Desktop\" )) \n {\n _desktopUID = uid;\n }\n }\n \n _treeField.setCurrentNode( rootNode ); // Set the root as the starting point.\n }",
"public static ArrayList<HashMap<String, String>> getUnseenMessagesFromApplianceStatus() {\r\n\t\t// System.out.println(\"CustomerBAL.getUnseenMessagesFromApplianceStatus()\");\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\ttry (Connection connection = Connect.getConnection();) {\r\n\t\t\tif (connection != null) {\r\n\t\t\t\tCallableStatement prepareCall = connection\r\n\t\t\t\t\t\t.prepareCall(\"{CALL get_unseen_messages_from_appliance_status()}\");\r\n\t\t\t\tResultSet resultSet = prepareCall.executeQuery();\r\n\t\t\t\t// End Stored Procedure\r\n\t\t\t\twhile (resultSet.next()) {\r\n\t\t\t\t\tHashMap<String, String> map = new HashMap<>();\r\n\t\t\t\t\tmap.put(\"messageId\",\r\n\t\t\t\t\t\t\tString.valueOf(resultSet.getInt(\"msg_id\")));\r\n\t\t\t\t\tmap.put(\"messageFrom\", resultSet.getString(\"msg_from\"));\r\n\r\n\t\t\t\t\tPrettyTime prettyTime = new PrettyTime();\r\n\t\t\t\t\tString messageTime = prettyTime.format(new Date(resultSet\r\n\t\t\t\t\t\t\t.getTimestamp(\"msg_date\").getTime()));\r\n\t\t\t\t\t// System.out.println(prettyTime);\r\n\t\t\t\t\tmap.put(\"messageDate\", messageTime);\r\n\r\n\t\t\t\t\tmap.put(\"applianceId\",\r\n\t\t\t\t\t\t\tString.valueOf(resultSet.getInt(\"appliance_id\")));\r\n\t\t\t\t\tlist.add(map);\r\n\t\t\t\t}\r\n\t\t\t\t// resultSet.close();\r\n\t\t\t\t// prepareCall.close();\r\n\t\t\t\t// connection.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\r\n\t}",
"private void collectMetricsInfo() {\n // Retrieve a list of all references to registered metric services\n ServiceReference[] metricsList = null;\n try {\n metricsList = bc.getServiceReferences(null, SREF_FILTER_METRIC);\n } catch (InvalidSyntaxException e) {\n logError(INVALID_FILTER_SYNTAX);\n }\n \n // Retrieve information about all registered metrics found\n if ((metricsList != null) && (metricsList.length > 0)) {\n \n for (int nextMetric = 0;\n nextMetric < metricsList.length;\n nextMetric++) {\n \n ServiceReference sref_metric = metricsList[nextMetric];\n MetricInfo metric_info = getMetricInfo(sref_metric);\n \n // Add this metric's info to the list\n if (metric_info != null) {\n registeredMetrics.put(\n metric_info.getServiceID(),\n metric_info);\n }\n }\n }\n else {\n logInfo(\"No pre-existing metrics were found!\");\n }\n }",
"org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList addNewServiceConfigurationList();",
"public Builder clearSwstatus() {\n\n swstatus_ = getDefaultInstance().getSwstatus();\n onChanged();\n return this;\n }",
"private void refreshList() {\n\t\t\t\tlist.clear();\n\t\t\t\tGetChildrenBuilder childrenBuilder = client.getChildren();\n\t\t\t\ttry {\n\t\t\t\t\tList<String> listdir = childrenBuilder.forPath(servicezoopath);\n\t\t\t\t\tfor (String string : listdir) {\n\t\t\t\t\t\tbyte[] data = client.getData().forPath(servicezoopath + \"/\" + string);\n\t\t\t\t\t\tlist.add(new String(data));\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"public List<StatusEntry> status() \n \tthrows CorruptObjectException, IOException {\n \t\treturn status(false, false);\n \t}",
"java.util.List<io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin> \n getActionLogList();",
"public int getNodeStatusListCount() {\n if (nodeStatusListBuilder_ == null) {\n return nodeStatusList_.size();\n } else {\n return nodeStatusListBuilder_.getCount();\n }\n }",
"void xsetMonitors(com.microsoft.schemas.office.x2006.digsig.STPositiveInteger monitors);",
"public java.util.List<MonitoringOutput> getMonitoringOutputs() {\n return monitoringOutputs;\n }",
"public interface MonitorConstants extends com.msi.tough.utils.Constants {\n\tpublic static final String EMPTYSTRING = \"\";\n\t// XML Namespace\n\tpublic static final String ATTRIBUTE_XMLNS = \"xmlns\";\n\tpublic static final String NAMESPACE = \"http://monitoring.amazonaws.com/doc/2010-08-01/\";\n\t// monitor metrics names\n\tpublic final static String CPU_UTILIZATION_COMMAND = \"CPUUtilization\";\n\tpublic final static String NETWORK_IN_COMMAND = \"NetworkIn\";\n\tpublic final static String NETWORK_OUT_COMMAND = \"NetworkOut\";\n\tpublic final static String DISK_WRITE_OPS_COMMAND = \"DiskWriteOps\";\n\tpublic final static String DISK_READ_OPS_COMMAND = \"DiskReadOps\";\n\tpublic final static String DISK_READ_BYTES_COMMAND = \"DiskReadBytes\";\n\tpublic final static String DISK_WRITE_BYTES_COMMAND = \"DiskWriteBytes\";\n\t// unit types\n\tpublic final static String PERCENT_UNIT = \"Percent\";\n\tpublic final static String SECOND_UNIT = \"Seconds\";\n\tpublic final static String BYTE_UNIT = \"Bytes\";\n\tpublic final static String BIT_UNIT = \"Bits\";\n\tpublic final static String COUNT_UNIT = \"Count\";\n\tpublic final static String BITS_PER_SECOND_UNIT = \"Bits/Second\";\n\tpublic final static String COUNT_PER_SECOND_UNIT = \"Count/Second\";\n\tpublic final static String NONE_UNIT = \"None\";\n\t// aggregate statistics\n\tpublic final static String AVERAGE = \"Average\";\n\tpublic final static String SUM = \"Sum\";\n\tpublic final static String MINIMUM = \"Minimum\";\n\tpublic final static String MAXIMUM = \"Maximum\";\n\tpublic final static String SAMPLE_COUNT = \"SampleCount\";\n\t// Request and Response Node Names\n\tpublic final static String NODE_MEMBER = \"member\";\n\tpublic final static String NODE_GETMETRICSTATICSRESULT = \"GetMetricStatisticsResult\";\n\tpublic final static String NODE_LISTMETRICSRESULT = \"ListMetricsResult\";\n\tpublic final static String NODE_METRICS = \"Metrics\";\n\tpublic final static String NODE_DIMENSIONS = \"Dimensions\";\n\tpublic final static String NODE_DIMENSION = \"Dimension\";\n\tpublic final static String NODE_METRIC = \"Metric\";\n\tpublic final static String NODE_METRICNAME = \"MetricName\";\n\tpublic final static String NODE_NAMESPACE = \"Namespace\";\n\tpublic final static String NODE_NAME = \"Name\";\n\tpublic final static String NODE_VALUE = \"Value\";\n\tpublic final static String NODE_NEXTTOKEN = \"NextToken\";\n\tpublic final static String NODE_ACTIONPREFIX = \"ActionPrefix\";\n\tpublic final static String NODE_ALARMNAMEPREFIX = \"AlarmNamePrefix\";\n\tpublic final static String NODE_ALARMNAMES = \"AlarmNames\";\n\tpublic final static String NODE_MAXRECORDS = \"MaxRecords\";\n\tpublic final static String NODE_TIMESTAMP = \"Timestamp\";\n\tpublic static final String DEFAULTMAXRECORDS = \"10\";\n\tpublic final static String NODE_STATEVALUE = \"StateValue\";\n\tpublic final static String NODE_ACTIONSENABLED = \"ActionsEnabled\";\n\tpublic final static String NODE_ALARMACTIONS = \"AlarmActions\";\n\tpublic final static String NODE_ALARMARN = \"AlarmArn\";\n\tpublic final static String NODE_ALARMCONFIGURATIONUPDATEDTIMESTAMP = \"AlarmConfigurationUpdatedTimestamp\";\n\tpublic final static String NODE_ALARMDESCRIPTION = \"AlarmDescription\";\n\tpublic final static String NODE_ALARMNAME = \"AlarmName\";\n\tpublic final static String NODE_COMPARISONOPERATOR = \"ComparisonOperator\";\n\tpublic final static String NODE_EVALUATIONPERIODS = \"EvaluationPeriods\";\n\tpublic final static String NODE_INSUFFICIENTDATAACTIONS = \"InsufficientDataActions\";\n\tpublic static final String NODE_INSUFFICIENTDATAACTION = \"InsufficientDataAction\";\n\tpublic final static String NODE_OKACTIONS = \"OKActions\";\n\tpublic final static String NODE_PERIOD = \"Period\";\n\tpublic final static String NODE_STATEREASON = \"StateReason\";\n\tpublic final static String NODE_STATEREASONDATA = \"StateReasonData\";\n\tpublic final static String NODE_STATEUPDATEDTIMESTAMP = \"StateUpdatedTimestamp\";\n\tpublic final static String NODE_STATISTIC = \"Statistic\";\n\tpublic final static String NODE_THRESHOLD = \"Threshold\";\n\tpublic final static String NODE_UNIT = \"Unit\";\n\tpublic final static String NODE_STARTTIME = \"StartTime\";\n\tpublic final static String NODE_ENDTIME = \"EndTime\";\n\tpublic static final String NODE_METRICALARMS = \"MetricAlarms\";\n\tpublic static final String NODE_METRICALARM = \"MetricAlarm\";\n\tpublic static final String NODE_DESCRIBEALARMS = \"DescribeAlarms\";\n public static final String NODE_DESCRIBEALARMSRESPONSE = \"DescribeAlarmsResponse\";\n public static final String NODE_DESCRIBEALARMSRESULT = \"DescribeAlarmsResult\";\n public static final String NODE_DESCRIBEALARMHISTORYRESPONSE =\n \"DescribeAlarmHistoryResponse\";\n public static final String NODE_DESCRIBEALARMHISTORYRESULT =\n \"DescribeAlarmHistoryResult\";\n public static final String NODE_DESCRIBEALARMSFORMETRICRESPONSE =\n \"DescribeAlarmsForMetricResponse\";\n public static final String NODE_DESCRIBEALARMSFORMETRICRESULT =\n \"DescribeAlarmsForMetricResult\";\n\tpublic static final String NODE_DESCRIBEALARMHISTORY = \"DescribeAlarmHistory\";\n\tpublic static final String NODE_ALARMACTION = \"AlarmAction\";\n\tpublic static final String NODE_OKACTION = \"OkAction\";\n\tpublic static final String NODE_ALARMHISTORYITEMDATA = \"HistoryData\";\n\tpublic static final String NODE_ALARMHISTORYITEMTYPE = \"HistoryItemType\";\n\tpublic static final String NODE_ALARMHISTORYITEMSUMMARY = \"HistorySummary\";\n\tpublic static final String NODE_ALARMHISTORYITEMTIMESTAMP = NODE_TIMESTAMP;\n\tpublic static final String NODE_ALARMHISTORYITEMS = \"AlarmHistoryItems\";\n\tpublic static final String NODE_ALARMHISTORYITEM = \"AlarmHistoryItem\";\n\tpublic static final String NODE_DESCRIBEALARMSMETRIC = \"DescribeAlarmsForMetric\";\n public static final String NODE_LISTMEMBER = \"member\";\n\n\tpublic static final String AS_TOPIC = \"ASTopic\";\n\n\t// Internal Actions\n\tpublic static final String NODE_SERVICE_HEALTH_EVENT = \"ServiceHealthEvent\";\n\tpublic static final String NODE_SERVICE_HEALTH_EVENT_ID = \"ServiceHealthEventID\";\n\tpublic static final String NODE_SERVICE_HEALTH_SERVICE = \"ServiceHealthEventService\";\n\tpublic static final String NODE_SERVICE_HEALTH_SERVICE_ABBREVIATION = \"ServiceHealthEventServiceAbbreviation\";\n\tpublic static final String NODE_SERVICE_HEALTH_EVENT_DESCRIPTION = \"ServiceHealthEventDescription\";\n\tpublic static final String NODE_SERVICE_HEALTH_EVENT_STATUS = \"ServiceHealthEventStatus\";\n\tpublic static final String NODE_SERVICE_HEALTH_REGION = \"ServiceHealthEventRegion\";\n\tpublic static final String NODE_SERVICE_HEALTH_AVAILABILITY_ZONE = \"ServiceHealthEventAvailabilityZone\";\n\tpublic static final String NODE_SERVICE_HEALTH_TIMESTAMP = \"ServiceHealthEventTimestamp\";\n\n public static final Boolean NOT_ENABLED = false;\n\n // ARNS\n public static final Arn ARN_AUTOMATE =\n new Arn(\"arn:aws:automate::ec2:\");\n public static final Arn ARN_STOP =\n new Arn(\"arn:aws:automate::ec2:stop\");\n public static final Arn ARN_TERMINATE =\n new Arn(\"arn:aws:automate::ec2:terminate\");\n}",
"public JzChronicstatusExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }",
"public ArrayList<Recording> getAll() {\r\n synchronized (lastUpdate) {\r\n if (System.currentTimeMillis() - lastUpdate > 60000) {\r\n update();\r\n }\r\n }\r\n return recordings;\r\n }",
"public com.autodesk.ws.avro.Call.Builder clearStatus() {\n status = null;\n fieldSetFlags()[8] = false;\n return this;\n }",
"private static boolean create() {\n if (removed) return false;\n else if (tag != null) return true;\n else {\n tag = DOM.getElementById(STATUS_TAG_NAME);\n if (tag != null) {\n return true;\n } else {\n removed = true;\n return false;\n }\n } \n }",
"public void startRefresh() {\n SmartDashboard.putNumber(\"Ele P\", 0.0);\n SmartDashboard.putNumber(\"Ele I\", 0.0);\n SmartDashboard.putNumber(\"Ele D\", 0.0);\n SmartDashboard.putNumber(\"Ele Set\", 0.0);\n }",
"public List<Events> getAllSystemEventsListForAll();",
"public static String addToStatistics(){\n\t\tString addedStats = Start.addToStatistics();\n\t\t//add\n\t\t//e.g.: addedStats += MyReport();\n\t\treturn addedStats;\n\t}",
"private void clearStatus() {\n \n status_ = getDefaultInstance().getStatus();\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStatus() {\n\n status_ = 0;\n onChanged();\n return this;\n }",
"public HashMap<String, HashMap<String, ArrayList<HashMap<String, HashMap<String, String>>>>> getStatus(String region) throws IOException {\r\n String currentData;\r\n\r\n try {\r\n baseURL = StaticData.buildURL(region);\r\n currentData = getUrlData();\r\n networkOK = true;\r\n }\r\n catch(UnknownHostException e) {\r\n currentData = \"\";\r\n networkOK = false;\r\n throw e;\r\n }\r\n \r\n JsonElement jelem = new JsonParser().parse(currentData);\r\n JsonObject jobj = jelem.getAsJsonObject();\r\n JsonArray servicesArr = jobj.getAsJsonArray(\"services\");\r\n JsonArray incidentsArr;\r\n JsonArray updatesArr;\r\n \r\n String service, status;\r\n HashMap<String, HashMap<String, ArrayList<HashMap<String, HashMap<String, String>>>>> statusInfo = new HashMap();\r\n HashMap<String, ArrayList<HashMap<String, HashMap<String, String>>>> statusValues = new HashMap();\r\n ArrayList<HashMap<String, HashMap<String, String>>> services = new ArrayList();\r\n HashMap<String, HashMap<String, String>> incidents = new HashMap();\r\n HashMap<String, String> content = new HashMap();\r\n\r\n for(int i = 0; i < servicesArr.size(); i++) {\r\n jobj = servicesArr.get(i).getAsJsonObject();\r\n \r\n service = formatOutput(jobj.get(\"name\").toString());\r\n status = formatOutput(jobj.get(\"status\").toString()); \r\n\r\n incidentsArr = jobj.getAsJsonArray(\"incidents\");\r\n \r\n // If there are any incidents, store them.\r\n if(incidentsArr.size() > 0) {\r\n // Get each incident.\r\n for(int j = 0; j < incidentsArr.size(); j++) {\r\n jobj = incidentsArr.get(j).getAsJsonObject();\r\n updatesArr = jobj.getAsJsonArray(\"updates\");\r\n \r\n // Get information for each update.\r\n if(updatesArr.size() > 0) {\r\n for(int k = 0; k < updatesArr.size(); k++) {\r\n jobj = updatesArr.get(k).getAsJsonObject();\r\n\r\n // Add id\r\n content.put(\"id\", formatOutput(jobj.get(\"id\").toString()));\r\n // Add severity\r\n content.put(\"severity\", formatOutput(jobj.get(\"severity\").toString()));\r\n // Add updated_at\r\n content.put(\"updated_at\", formatOutput(jobj.get(\"updated_at\").toString()));\r\n // Add content\r\n content.put(\"content\", formatOutput(jobj.get(\"content\").toString()));\r\n \r\n incidents.put(service, (HashMap)content.clone());\r\n services.add((HashMap)incidents.clone());\r\n }\r\n }\r\n }\r\n }\r\n \r\n Collections.reverse(services); // Flip incidents ArrayList to have the newest first.\r\n statusValues.put(status, (ArrayList)services.clone());\r\n services.clear(); // Make sure old incidents aren't copied if current service has no incidents.\r\n statusInfo.put(service, (HashMap)statusValues.clone());\r\n statusValues.clear(); // Make sure old statuses aren't copied if current service has no incidents.\r\n }\r\n \r\n return statusInfo;\r\n }",
"void firePresenceStatusChanged(Presence presence)\n {\n if(storeEvents && storedPresences != null)\n {\n storedPresences.add(presence);\n return;\n }\n\n try\n {\n Jid userID = presence.getFrom().asBareJid();\n OperationSetMultiUserChat mucOpSet =\n parentProvider.getOperationSet(\n OperationSetMultiUserChat.class);\n if(mucOpSet != null)\n {\n List<ChatRoom> chatRooms\n = mucOpSet.getCurrentlyJoinedChatRooms();\n for(ChatRoom chatRoom : chatRooms)\n {\n if(chatRoom.getName().equals(userID.toString()))\n {\n userID = presence.getFrom();\n break;\n }\n }\n }\n\n if (logger.isDebugEnabled())\n logger.debug(\"Received a status update for buddy=\" + userID);\n\n // all contact statuses that are received from all its resources\n // ordered by priority(higher first) and those with equal\n // priorities order with the one that is most connected as\n // first\n TreeSet<Presence> userStats = statuses.get(userID);\n if(userStats == null)\n {\n userStats = new TreeSet<>(new Comparator<Presence>()\n {\n public int compare(Presence o1, Presence o2)\n {\n int res = o2.getPriority() - o1.getPriority();\n\n // if statuses are with same priorities\n // return which one is more available\n // counts the JabberStatusEnum order\n if(res == 0)\n {\n res = jabberStatusToPresenceStatus(\n o2, parentProvider).getStatus()\n - jabberStatusToPresenceStatus(\n o1, parentProvider).getStatus();\n // We have run out of \"logical\" ways to order\n // the presences inside the TreeSet. We have\n // make sure we are consinstent with equals.\n // We do this by comparing the unique resource\n // names. If this evaluates to 0 again, then we\n // can safely assume this presence object\n // represents the same resource and by that the\n // same client.\n if(res == 0)\n {\n res = o1.getFrom().compareTo(\n o2.getFrom());\n }\n }\n\n return res;\n }\n });\n statuses.put(userID, userStats);\n }\n else\n {\n Resourcepart resource = presence.getFrom().getResourceOrEmpty();\n\n // remove the status for this resource\n // if we are online we will update its value with the new\n // status\n for (Iterator<Presence> iter = userStats.iterator();\n iter.hasNext();)\n {\n Presence p = iter.next();\n if (p.getFrom().getResourceOrEmpty().equals(resource))\n {\n iter.remove();\n }\n }\n }\n\n if(!jabberStatusToPresenceStatus(presence, parentProvider)\n .equals(\n parentProvider\n .getJabberStatusEnum()\n .getStatus(JabberStatusEnum.OFFLINE)))\n {\n userStats.add(presence);\n }\n\n Presence currentPresence;\n if (userStats.size() == 0)\n {\n currentPresence = presence;\n\n /*\n * We no longer have statuses for userID so it doesn't make\n * sense to retain (1) the TreeSet and (2) its slot in the\n * statuses Map.\n */\n statuses.remove(userID);\n }\n else\n currentPresence = userStats.first();\n\n ContactJabberImpl sourceContact\n = ssContactList.findContactById(userID);\n\n if (sourceContact == null)\n {\n logger.warn(\"No source contact found for id=\" + userID);\n return;\n }\n\n // statuses may be the same and only change in status message\n sourceContact.setStatusMessage(currentPresence.getStatus());\n\n updateContactStatus(\n sourceContact,\n jabberStatusToPresenceStatus(\n currentPresence, parentProvider));\n }\n catch (IllegalStateException | IllegalArgumentException ex)\n {\n logger.error(\"Failed changing status\", ex);\n }\n }",
"public void receiveResultget_Screenings_List(\n com.xteam.tourismpay.PFTMXStub.Get_Screenings_ListResponse result) {\n }",
"public ServerStatus[] getServerStatus() {\r\n ServerStatus[] toReturn = new ServerStatus[0];\r\n\r\n String[] paramFields = {\"item_delimiter\", \"value_delimiter\"};\r\n SocketMessage request = new SocketMessage(\"admin\", \"server_status\",\r\n SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\", paramFields);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"value_delimiter\", VALUE_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0201\", \"couldn't get server status\");\r\n } else {\r\n wrapError(\"APIL_0201\", \"couldn't get server status\");\r\n }\r\n return toReturn;\r\n } else {\r\n String serversString = response.getValue(\"servers\");\r\n StringTokenizer tokenizer = new StringTokenizer(serversString, ITEM_DELIMITER);\r\n toReturn = new ServerStatus[tokenizer.countTokens()];\r\n try {\r\n for (int i = 0; i < toReturn.length; i++) {\r\n String itemString = tokenizer.nextToken();\r\n StringTokenizer itemTokenizer = new StringTokenizer(itemString, VALUE_DELIMITER);\r\n String ip = itemTokenizer.nextToken();\r\n String portString = itemTokenizer.nextToken();\r\n String aliveString = itemTokenizer.nextToken();\r\n String timeString = itemTokenizer.nextToken();\r\n int port = Integer.parseInt(portString.trim());\r\n boolean alive = \"y\".equals(aliveString);\r\n long time = Tools.parseTime(timeString.trim());\r\n toReturn[i] = new ServerStatus(ip, port, time, alive);\r\n }\r\n } catch (Exception e) {\r\n setError(\"APIL_0202\", \"error in parsing status string: \" + serversString);\r\n return new ServerStatus[0];\r\n }\r\n }\r\n\r\n return toReturn;\r\n }",
"public OFMeterConfigStatsRequest buildMeterConfigRquest() {\n\t\t\treturn factory.buildMeterConfigStatsRequest().setMeterId(OFMeterSerializerVer13.ALL_VAL).build();\n\t\t}",
"public void initialStatus()\r\n\t{\r\n\t\tSystem.out.println(\"--------- The Current Status of Each Elevator ------\");\t\r\n\t\t\r\n\t\tfor(int i =0;i<numberOfElevators; i++)\r\n\t\t{\r\n\t\t\tElevator temp = new Elevator();\r\n\t\t\ttemp.setElevatorNumber(i);\r\n\t\t\tinitialElevatorFloor = (int)(Math.random()*((55-0)+1)); \r\n\t\t\ttemp.setCurrentFloor(initialElevatorFloor);\r\n\t\t\tavailableElevadors.add(temp);\r\n\t\t\tSystem.out.println(\" Elevator no.\" + temp.getElevatorNumber()+\" The current Floor \" + temp.getCurrentFloor());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}"
] | [
"0.6301528",
"0.6089693",
"0.5160867",
"0.50829875",
"0.50353396",
"0.49871862",
"0.49533135",
"0.491432",
"0.48217082",
"0.4814093",
"0.4797922",
"0.47753015",
"0.47616467",
"0.47497275",
"0.47019032",
"0.46962386",
"0.46942368",
"0.46521142",
"0.46514726",
"0.46390653",
"0.46334872",
"0.46317467",
"0.4631061",
"0.46245554",
"0.46174443",
"0.4605411",
"0.460186",
"0.45550376",
"0.4548969",
"0.45445818",
"0.45225936",
"0.45193365",
"0.45063722",
"0.45060486",
"0.44862127",
"0.4447759",
"0.44415694",
"0.44390404",
"0.4438567",
"0.44366518",
"0.4410044",
"0.43945453",
"0.43940997",
"0.43814042",
"0.43772024",
"0.4370303",
"0.4369536",
"0.43688163",
"0.43617427",
"0.43568695",
"0.43487963",
"0.43415442",
"0.4336197",
"0.43139648",
"0.4313133",
"0.43023476",
"0.42869148",
"0.4286695",
"0.42771715",
"0.42699432",
"0.42599854",
"0.42581353",
"0.42574978",
"0.42567655",
"0.42508495",
"0.42494643",
"0.42470035",
"0.42342082",
"0.42242706",
"0.42235854",
"0.4223132",
"0.42226934",
"0.42016983",
"0.42013675",
"0.42002258",
"0.41988087",
"0.41968873",
"0.41955265",
"0.41952968",
"0.4194608",
"0.41935658",
"0.41933408",
"0.41911924",
"0.41889772",
"0.41871452",
"0.41871452",
"0.41871452",
"0.41871452",
"0.41871452",
"0.41871452",
"0.41871452",
"0.41852954",
"0.41852954",
"0.41852954",
"0.4182099",
"0.41798207",
"0.4176894",
"0.41733012",
"0.4170922",
"0.41670644"
] | 0.7456745 | 0 |
Implementation of the WigedEdge Algorithm for ring primitives, described in DIGEST Part 2, Annex C2.4.3. Given a row from the ring primitive table, navigate the ring and edge primitive tables to construct the edge information associated with the specified ring. | public int traverseRing(int faceId, int startEdgeId, VPFPrimitiveData.PrimitiveInfo[] edgeInfoArray,
EdgeTraversalListener listener)
{
// 1. Determine which face primitive to construct.
// The face is determined for us by the selection of a row in the face primitive table.
// 2. Identify the start edge.
// Select the row in the ring primitive table which is associated with the face primitive. Then select the row
// in the edge primitive table which corresponds to the ring primitive. Essentially, we follow the face to a
// ring, and the ring to a starting edge.
// 3. Follow the edge network until we arrive back at the starting edge, or the data does not specify a next
// edge. Travel in the direction according to which side of the edge (left or right) the face belongs to. If we
// reach an auxiliary edge (face is both left and right of the edge), then travel to the next edge which does
// not cause us to backtrack.
int count = 0;
int prevEdgeId;
int curEdgeId = -1;
int nextEdgeId = startEdgeId;
do
{
prevEdgeId = curEdgeId;
curEdgeId = nextEdgeId;
if (listener != null)
{
listener.nextEdge(count, curEdgeId, this.getMustReverseCoordinates(faceId, prevEdgeId, curEdgeId,
edgeInfoArray));
}
count++;
}
while ((nextEdgeId = this.nextEdgeId(faceId, prevEdgeId, curEdgeId, edgeInfoArray)) > 0
&& (nextEdgeId != startEdgeId));
return count;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addEdge(int u, int v, double w) {\n\t\t\n\t}",
"public Edge<E, V> getUnderlyingEdge();",
"Edge getEdge();",
"double getEdgeWeight();",
"E getEdge(int id);",
"private void findEdges(){\n int pixel,x,y;\n int color;\n double gx,gy,magnitude;\n double magnitudes[][] = new double[size-2][size-2];\n double angles[][] = new double[size-2][size-2];\n int directions[][] = new int[size-2][size-2];\n //give numbers to the edge kernel\n int edgeKernelX[][] = new int[][]{{-1, 0, 1},\n {-2, 0, 2},\n {-1, 0, 1}};\n int edgeKernelY[][] = new int[][]{{-1, -2, -1},\n { 0, 0, 0},\n { 1, 2, 1}};\n //march the image\n for (int i = 1; i < size-1; i++) {\n for (int j = 1; j < size-1; j++) {\n //reset color\n gx = gy = 0;\n //march pixels inside kernel\n for (int k = 0; k < 3; k++) {\n for (int l = 0; l < 3; l++) {\n //get gray color from pixel\n x = j + l - 1; \n y = i + k - 1;\n pixel = imageKerneled.getRGB(x,y);\n //multiply the rgb by the number in kernel\n color = ((pixel) & 0xff);\n gx += color * edgeKernelX[k][l];\n gy += color * edgeKernelY[k][l];\n }\n }\n //get magnitude for the edge ( Gxy = sqrt(x^2+y^2) )\n magnitude = (int)Math.round(Math.sqrt((gx*gx)+(gy*gy) ) );\n magnitudes[i-1][j-1] = magnitude;\n //get angle for the edge ( A = arctan Gy/Gx )\n angles[i-1][j-1] = Math.atan(gy/gx);\n }\n }\n //get bigger magnitud for rule of 3 because are magnitudes above 255\n double bigger = magnitudes[0][0]; int sizeMinus2 = size-2;\n for (int i = 0; i < sizeMinus2; i++) {\n for (int j = 0; j < sizeMinus2; j++) {\n if(magnitudes[i][j] > bigger) bigger = magnitudes[i][j];\n }\n }\n //rule of 3 to make all magnitudes below 255\n for (int i = 0; i < sizeMinus2; i++) {\n for (int j = 0; j < sizeMinus2; j++) {\n magnitudes[i][j] = magnitudes[i][j] * 255 / bigger;\n }\n }\n //set the borders black because there are no magnitudes there\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(0,i,Color.BLACK.getRGB());}\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(size-1,i,Color.BLACK.getRGB());}\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(i,0,Color.BLACK.getRGB());}\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(i,size-1,Color.BLACK.getRGB());}\n //set the magnitudes in the image\n double degrees;\n double max=0,min=0;\n for (int i = 0; i < sizeMinus2; i++) {\n for (int j = 0; j < sizeMinus2; j++) {\n //paint black the NaN and 0r angles\n magnitude = magnitudes[i][j];\n if(Double.isNaN(angles[i][j]) || angles[i][j]==0){\n imageKerneled2.setRGB(j+1,i+1,Color.BLACK.getRGB());\n }\n else{\n //convert radians to dregrees for HSB (Hue goes from 0 to 360)\n degrees = Math.toDegrees(angles[i][j]); \n //convert degrees in scale from -90,90 to 0,360 for HSBtoRGB with a rule of 3\n degrees = degrees * 360 / 90; \n //convert degrees in scale from 0,360 to 0,1 for HSBtoRGB with a rule of 3\n degrees /= 360;\n /*if want angles with colors: \n //convert magnitud in scale from 0,255 to 0,1 for HSBtoRGB with a rule of 3\n magnitude /= 255;\n Color c = new Color(Color.HSBtoRGB((float)degrees,1.0f,(float)magnitude));*/\n Color c = new Color((int)magnitude,(int)magnitude,(int)magnitude);\n imageKerneled2.setRGB(j+1,i+1,c.getRGB());\n /*set direction for pixel\n east-west: 0 = 0 - 22, 158-202, 338-360\n northeast-southwest: 1 = 23 - 67, 203-247 \n north-south: 2 = 68 -112, 248-292 \n northeast-southeast: 3 = 113-157, 293-337 */\n if((degrees>=0 && degrees<=22) || (degrees>=158 && degrees<=202) || (degrees>=338 && degrees<=360)){\n directions[i][j] = 0;\n }else if((degrees>=23 && degrees<=67) || (degrees>=203 && degrees<=247)){\n directions[i][j] = 1;\n }else if((degrees>=68 && degrees<=112) || (degrees>=248 && degrees<=292)){\n directions[i][j] = 2;\n }else if((degrees>=113 && degrees<=157) || (degrees>=293 && degrees<=337)){\n directions[i][j] = 3;\n }\n }\n }\n }\n copyKerneled2ToKerneled();\n System.out.println(\"Finished sobel edge detector\");\n //here starts the canny edge detector\n int comparedMagnitudes[] = new int [3];\n for (int i = 1; i < size-1; i++) {\n for (int j = 1; j < size-1; j++) {\n //get magnitude of current pixel and neighbors from direction\n comparedMagnitudes[0] = (imageKerneled.getRGB(j,i)) & 0xff;\n switch(directions[i-1][j-1]){\n case 0: \n comparedMagnitudes[1] = (imageKerneled.getRGB(j-1,i)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j+1,i)) & 0xff;\n break;\n case 1:\n comparedMagnitudes[1] = (imageKerneled.getRGB(j+1,i+1)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j-1,i-1)) & 0xff;\n break;\n case 2:\n comparedMagnitudes[1] = (imageKerneled.getRGB(j,i-1)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j,i+1)) & 0xff;\n break;\n case 3:\n comparedMagnitudes[1] = (imageKerneled.getRGB(j-1,i+1)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j+1,i-1)) & 0xff;\n break;\n }\n if(comparedMagnitudes[0]<comparedMagnitudes[1] \n || comparedMagnitudes[0]<comparedMagnitudes[2]\n || comparedMagnitudes[0]<30){\n imageKerneled2.setRGB(j,i,Color.BLACK.getRGB());\n }\n }\n }\n /*for (int i = 1; i < size-1; i++) {\n for (int j = 1; j < size-1; j++) {\n color = (imageKerneled2.getRGB(j,i)) & 0xff;\n if(color > 0){\n imageKerneled2.setRGB(j,i,Color.WHITE.getRGB());\n }\n }\n }*/\n copyKerneled2ToKerneled();\n System.out.println(\"Finished canny edge detector\");\n }",
"void buildRoad(EdgeLocation edge, boolean free);",
"boolean addEdge(V v, V w);",
"private static void createEdgeTables() {\n\t\tString line = null;\n\t\tString[] tmpArray;\n\n\t\tfor (int i = 0; i < Data.AmountEdges; i++) {\n\t\t\tline = Fileread.getLine();\n\t\t\ttmpArray = line.split(\" \");\n\t\t\tData.source[i] = Integer.parseInt(tmpArray[0]);\n\t\t\tData.target[i] = Integer.parseInt(tmpArray[1]);\n\t\t\tData.weight[i] = Integer.parseInt(tmpArray[2]);\n\t\t}\n\t}",
"boolean addEdge(V v, V w, double weight);",
"public static native int getEdgeDetection(int pin) throws RuntimeException;",
"public void addEdge(int start, int end, double weight);",
"@Override\n\tpublic Squarelotron leftRightFlip(int ring) {\n\t\tint[] array = numbers();\n\t\t//converts the array into a new Squarelotron\n\t\tSquarelotron copySquarelotron = makeSquarelotron(array);\n\t\tint[][] newSquarelotron = copySquarelotron.squarelotron;\n\t\t//finds length of squarelotron and takes the square root\n\t\tint length = array.length;\n\t\tdouble sqrtLength = Math.sqrt(length);\n\t\tint size =(int) sqrtLength;\n\n\t\t//starts at the ring-1 [so for ring 1, this is [0], for ring 2 [1], etc.] goes until j = the length of current row minus the ring\n\t\t//therefore if the ring is one and the current row is 0, it finds the length of [0] and then subtracts one; for example\n\t\t//if the squarelotron is a 5x5 with input of ring 1 the starting point would be 0 and ending point of j would be 4, advances by 1\n\t\tfor(int j = 0; j <= size-2*ring; j++){\n\t\t\t//assigns number to the first row and first index so if the ring is 1, [0][0] and then iterates\n\t\t\t//the second iteration would be [0][1], the third [0][2], etc. For example if it is the second ring: first iteration \n\t\t\t//[1][1], second->[1][2]\n\t\t\tint number = newSquarelotron[ring-1+j][ring-1];\n\t\t\t//matrix = 3x3, size = 3, index max =2, [0][0]->[0]\n\t\t\tnewSquarelotron[ring-1+j][ring-1]=newSquarelotron[ring-1+j][size-ring];\n\t\t\t//sets the [0][4] to [0][0] for the first iteration\n\t\t\tnewSquarelotron[ring-1+j][size-ring] = number;\n\t\t}\n\t\t//the following method flips the non-1st and last parts of the rings needs to only go half way\n\t\t\t\t//example size 7x7, ring 1; i = 1 ends 7-2=5 or for 8x8: ring1 starts at i=1 ends at 8-2=6 or for 5x5 5-2=3\n\t\tfor(int i = 0; i <=(size-2*ring); i++){\n\t\t\t//left side\n\t\t\t//using example 5x5: 1st iteration -> [1][0], i=2, 2nd iteration [2][0] , 3rd:i=3 [3][0]\n\t\t\tint numberLft = this.squarelotron[ring-1][ring+i-1];\n\t\t\t//for 5x5:[1][0]=[1][4]. [2][0]=[2][4], i=3: [3][0]=[3][4]\n\t\t\tnewSquarelotron[ring-1][ring+i-1] = this.squarelotron[ring-1][size-ring-i];\n\t\t\t//example:1st iteration ->[1][4]=[1][0], 2nd:[2][4]=\n\t\t\tnewSquarelotron[ring-1][size-ring-i] = numberLft;\n\t\t\tint numberBot = this.squarelotron[size-ring][ring+i-1];\n\t\t\tnewSquarelotron[size-ring][ring+i-1]= this.squarelotron[size-ring][size-ring-i];\n\t\t\tnewSquarelotron[size-ring][size-ring-i] = numberBot;\n\t\t\t\t}\n\t\t\n\t\t\n\t\tcopySquarelotron.squarelotron = newSquarelotron;\n\t\treturn copySquarelotron;\n\t}",
"public void addEdge(StubEdge e) {\n }",
"void addEdge(int source, int destination, int weight);",
"VertexType getOtherVertexFromEdge( EdgeType r, VertexType oneVertex );",
"void addEdge(int x, int y);",
"private RoutingEdge extractRoutingEdgeFromRS(ResultSet resultSet) {\n\n\t\tRoutingEdge routingEdge = new RoutingEdge();\n\n\t\ttry {\n\n\t\t\troutingEdge.setId(resultSet.getInt(\"id\"));\n\t\t\t\n\t\t\troutingEdge.setFloorID(resultSet.getInt(\"FloorId\"));\n\t\t\troutingEdge.setSource(resultSet.getInt(\"Source\"));\n\t\t\troutingEdge.setTarget(resultSet.getInt(\"Target\"));\n\t\t\troutingEdge.setWeight(resultSet.getInt(\"Weight\"));\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn routingEdge;\n\t}",
"int getReverseEdgeKey();",
"uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge getEdge(int index);",
"protected void processEdge(Edge e) {\n\t}",
"private static void InitializeEdges()\n {\n edges = new ArrayList<Edge>();\n\n for (int i = 0; i < Size -1; i++)\n {\n for (int j = 0; j < Size; j++)\n {\n edges.add(new Edge(cells[i][j].Point, cells[i + 1][ j].Point));\n edges.add(new Edge(cells[j][i].Point, cells[j][ i + 1].Point));\n }\n }\n\n for (Edge e : edges)\n {\n if ((e.A.X - e.B.X) == -1)\n {\n e.Direction = Edge.EdgeDirection.Vertical;\n }\n else\n {\n e.Direction = Edge.EdgeDirection.Horizontal;\n }\n }\n }",
"boolean containsEdge(V v, V w);",
"@Override\n\t/*\n\t * \tThis method performs the Upside-Down Flip of the squarelotron, as described above,\n\t\tand returns the new squarelotron. The original squarelotron should not be modified\n\t\t(we will check for this).(non-Javadoc)\n\t * @see squarelotron.SquarelotronMethods#upsideDownFlip(int)\n\t */\n\tpublic Squarelotron upsideDownFlip(int ring) {\n\t\tint[] array = numbers();\n\t\t//converts the array into a new Squarelotron\n\t\tSquarelotron copySquarelotron = makeSquarelotron(array);\n\t\t//copies the 2D array associated with the Squarelotron \n\t\tint[][] newSquarelotron = copySquarelotron.squarelotron;\n\t\t//finds length of squarelotron and takes the square root\n\t\tint length = array.length;\n\t\tdouble sqrtLength = Math.sqrt(length);\n\t\tint size =(int) sqrtLength;\n\t\t//this loop takes the first and last rows and flips their numbers\n\t\t//starts at the ring-1 [so for ring 1, this is [0], for ring 2 [1], etc.] goes until j = the length of current row minus the ring\n\t\t//therefore if the ring is one and the current row is 0, it finds the length of [0] and then subtracts one; for example\n\t\t//if the squarelotron is a 5x5 with input of ring 1 the starting point would be 0 and ending point of j would be 4, advances by 1\n\t\tfor(int j = ring-1; j <= newSquarelotron[ring-1].length - ring; j++){\n\t\t\t//assigns number to the first row and first index so if the ring is 1, [0][0] and then iterates\n\t\t\t//the second iteration would be [0][1], the third [0][2], etc. For example if it is the second ring: first iteration \n\t\t\t//[1][1], second->[1][2]\n\t\t\tint number = newSquarelotron[ring-1][j];\n\t\t\t//selects example: r 1 [0][0] and sets it equal to (if 5x5) [4][0], second iteration, [4][1]\n\t\t\tnewSquarelotron[ring-1][j]=newSquarelotron[size-ring][j];\n\t\t\t//sets the [4][0] to [0][0] for the first iteration\n\t\t\tnewSquarelotron[size-ring][j] = number;\n\t\t}\n\t\t\n\t\t//the following method flips the non-1st and last parts of the rings needs to only go half way\n\t\t//example size 7x7, ring 1; i = 1 ends at 7-1=5/2 =2 or for 8x8: ring1 starts at i=1 ends at 8-2=6/2=3\n\t\tfor(int i = ring; i <=(size-2)/2; i++){\n\t\t\t//left side\n\t\t\t//using example 7x7: 1st iteration -> [1][0], i=2, 2nd iteration [2][0] \n\t\t\tint numberLft = newSquarelotron[i][ring-1];\n\t\t\t//example: 1st iteration ->[1][0] = [5][0], 2nd iteration -> [2][0]=[4][0], 3rd->[3][0]=[3][0] (wouldnt happen in 7x7)\n\t\t\t//example 8x8 ring 1: 1st->[1][0]=[6][0], [2][0]=[5][0],[3][0]=[4][0]; [i ends at 3]\n\t\t\tnewSquarelotron[i][ring-1] = newSquarelotron[size-i-ring][ring-1];\n\t\t\t//example:1st iteration ->[5][0]=[1][0], second[4][0]=[2],no third\n\t\t\tnewSquarelotron[size-ring-i][ring-1] = numberLft;\n\t\t\t//right side\n\t\t\t//7x7/ring=1: 1st iteration [1][6],2nd:[2][6]\n\t\t\tint numberRt = newSquarelotron[i][size-ring];\n\t\t\tnewSquarelotron[i][size-ring] = newSquarelotron[size-i-ring][size-ring];\n\t\t\t//1st:7-1-1=[5][6]=[1][6]\n\t\t\tnewSquarelotron[size-i-ring][size-ring] = numberRt;\n\t\t}\n\t\t//outputs the new Squarelotron with the new 2D array\n\t\tcopySquarelotron.squarelotron = newSquarelotron;\n\t\treturn copySquarelotron;\n\t\t\n\t}",
"public void buildEdges(){\n\t\tfor(Entry<HexLocation, TerrainHex> entry : hexes.entrySet()){\n\t\t\t\n\t\t\tEdgeLocation edgeLoc1 = new EdgeLocation(entry.getKey(), EdgeDirection.NorthWest);\n\t\t\tEdge edge1 = new Edge(edgeLoc1);\n\t\t\tedges.put(edgeLoc1, edge1);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc2 = new EdgeLocation(entry.getKey(), EdgeDirection.North);\n\t\t\tEdge edge2 = new Edge(edgeLoc2);\n\t\t\tedges.put(edgeLoc2, edge2);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc3 = new EdgeLocation(entry.getKey(), EdgeDirection.NorthEast);\n\t\t\tEdge edge3 = new Edge(edgeLoc3);\n\t\t\tedges.put(edgeLoc3, edge3);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc4 = new EdgeLocation(entry.getKey(), EdgeDirection.SouthEast);\n\t\t\tEdge edge4 = new Edge(edgeLoc4);\n\t\t\tedges.put(edgeLoc4, edge4);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc5 = new EdgeLocation(entry.getKey(), EdgeDirection.South);\n\t\t\tEdge edge5 = new Edge(edgeLoc5);\n\t\t\tedges.put(edgeLoc5, edge5);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc6 = new EdgeLocation(entry.getKey(), EdgeDirection.SouthWest);\n\t\t\tEdge edge6 = new Edge(edgeLoc6);\n\t\t\tedges.put(edgeLoc6, edge6);\n\t\t}\n\t}",
"public void treeEdge(Edge e) {}",
"TEdge createTEdge();",
"public static WedgeRelation getWedgeRelation(\n S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2) {\n // There are 6 possible edge orderings at a shared vertex (all\n // of these orderings are circular, i.e. abcd == bcda):\n //\n // (1) a2 b2 b0 a0: A contains B\n // (2) a2 a0 b0 b2: B contains A\n // (3) a2 a0 b2 b0: A and B are disjoint\n // (4) a2 b0 a0 b2: A and B intersect in one wedge\n // (5) a2 b2 a0 b0: A and B intersect in one wedge\n // (6) a2 b0 b2 a0: A and B intersect in two wedges\n //\n // We do not distinguish between 4, 5, and 6.\n // We pay extra attention when some of the edges overlap. When edges\n // overlap, several of these orderings can be satisfied, and we take\n // the most specific.\n if (a0.equalsPoint(b0) && a2.equalsPoint(b2)) {\n return WedgeRelation.WEDGE_EQUALS;\n }\n\n if (orderedCCW(a0, a2, b2, ab1)) {\n // The cases with this vertex ordering are 1, 5, and 6,\n // although case 2 is also possible if a2 == b2.\n if (orderedCCW(b2, b0, a0, ab1)) {\n return WedgeRelation.WEDGE_PROPERLY_CONTAINS;\n }\n\n // We are in case 5 or 6, or case 2 if a2 == b2.\n if (a2.equalsPoint(b2)) {\n return WedgeRelation.WEDGE_IS_PROPERLY_CONTAINED;\n } else {\n return WedgeRelation.WEDGE_PROPERLY_OVERLAPS;\n }\n }\n\n // We are in case 2, 3, or 4.\n if (orderedCCW(a0, b0, b2, ab1)) {\n return WedgeRelation.WEDGE_IS_PROPERLY_CONTAINED;\n }\n if (orderedCCW(a0, b0, a2, ab1)) {\n return WedgeRelation.WEDGE_IS_DISJOINT;\n } else {\n return WedgeRelation.WEDGE_PROPERLY_OVERLAPS;\n }\n }",
"void addEdge(int v, int w) {\n adj [v].add(w);\n }",
"public Enumeration edges();",
"public void createEdges() {\n \tfor(String key : ways.keySet()) {\n \t Way way = ways.get(key);\n \t if(way.canDrive()) {\n \t\tArrayList<String> refs = way.getRefs();\n \t\t\t\n \t\tif(refs.size() > 0) {\n \t\t GPSNode prev = (GPSNode) this.getNode(refs.get(0));\n \t\t drivableNodes.add(prev);\n \t\t \n \t\t GPSNode curr = null;\n \t\t for(int i = 1; i <refs.size(); i++) {\n \t\t\tcurr = (GPSNode) this.getNode(refs.get(i));\n \t\t\tif(curr == null || prev == null)\n \t\t\t continue;\n \t\t\telse {\n \t\t\t double distance = calcDistance(curr.getLatitude(), curr.getLongitude(),\n \t\t\t\t prev.getLatitude(), prev.getLongitude());\n\n \t\t\t GraphEdge edge = new GraphEdge(prev, curr, distance, way.id);\n \t\t\t prev.addEdge(edge);\n \t\t\t curr.addEdge(edge);\n \t\t\t \n \t\t\t drivableNodes.add(curr);\n \t\t\t prev = curr;\n \t\t\t}\n \t\t }\t\n \t\t}\n \t }\n \t}\n }",
"private void updateEdgeInfor(int index, int preWordIndex, String word, String preWord) {\n \tif (index == preWordIndex || word == preWord)\n \t\treturn;\n if (!nodes.get(index).inlinks.containsKey(preWordIndex))\n nodes.get(index).inlinks.put(preWordIndex, 1);\n else {\n \tint vOld = nodes.get(index).inlinks.get(preWordIndex);\n \tnodes.get(index).inlinks.put(preWordIndex, vOld + 1);\n }\n if (!nodes.get(preWordIndex).outlinks.containsKey(index))\n nodes.get(preWordIndex).outlinks.put(index, 1);\n else {\n \tint vOld = nodes.get(preWordIndex).outlinks.get(index);\n \tnodes.get(preWordIndex).outlinks.put(index, vOld + 1);\n }\n nodes.get(index).inlinkCount++;\n nodes.get(preWordIndex).outlinkCount++;\n }",
"public void addEdge(int v, int w){\n //add w to the queue of v\n adj[v].enqueue(w);\n //add v to the queue of w\n adj[w].enqueue(v);\n //update Edge number;\n E++;\n }",
"public void generateAdjList(int row, int col) {\n\t\tBoardCell originCell = this.getCell(row, col);\t\t\t\t\t\t\t\t\t\t// Creates a temporary cell called originCell for convenience\n\t\tBoardCell testCell;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// another temporary cell called testCell\n\t\tif(originCell.getInitial() != 'W' && !originCell.isRoomCenter()) {\t\t\t\t\t// Checks for cells that are in rooms and are not centers\n\t\t\treturn;\n\t\t}\n\t\tif(originCell.getInitial() != 'W' && originCell.isRoomCenter()) {\t\t\t\t\t// Checks for cells that are in rooms and are centers\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tSet<BoardCell> doors = roomMap.get(originCell.getInitial()).getDoors();\t\t\t// grabs all the doors for a certain room\n\t\t\tSystem.out.println(doors.size());\n\t\t\tfor (Iterator<BoardCell> it = doors.iterator(); it.hasNext();) {\t\t\t\t// iterates through the set of doors\n\t\t\t\ttestCell = it.next();\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sets test cell to be the next door in the set of doors\n\t\t\t\toriginCell.addAdj(this.getCell(testCell.getRow(),testCell.getCol()));\t\t// all doors are adjacent to the room center\n\t\t\t}\n\t\t\tif(roomMap.get(originCell.getInitial()).isSecretPassage()) {\t\t\t\t\t// determines if that room has a secret passage\n\t\t\t\tCharacter passage = roomMap.get(originCell.getInitial()).getSecretPassage();// creates a temporary char that is equal to the initial of the originCell's secret passage room\n\t\t\t\tBoardCell passageCell = roomMap.get(passage).getCenterCell();\t\t\t\t// creates a temporary cell that is equal to the center of the room \n\t\t\t\toriginCell.addAdj(this.getCell(passageCell.getRow(), passageCell.getCol()));// adds the corresponding cell from the board to the adjacency set\t\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\telse if(originCell.getInitial() == 'W' && !originCell.isDoorway()) {\t\t\t\t// checks if the originCell is a walkway but not a doorway\n\t\t\tif(row > 0) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Makes sure the cell has a cell above it to avoid null pointer exceptions\n\t\t\t\ttestCell = this.getCell(row-1, col);\t\t\t\t\t\t\t\t\t\t// initializes the test cell to the cell in that location\n\t\t\t\tif(testCell.getInitial() == 'W'){\t\t\t\t\t\t\t\t\t\t\t// Since non-door walkways can only be adjacent to walkways, if the test cell is a walkway...\n\t\t\t\t\toriginCell.addAdj(testCell);\t\t\t\t\t\t\t\t\t\t\t// add it to the adjacency set\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(col > 0) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Makes sure the cell has a cell to the left to avoid null pointer exceptions\n\t\t\t\ttestCell = this.getCell(row, col-1);\t\t\t\t\t\t\t\t\t\t// initializes the test cell to the cell in that location\n\t\t\t\tif(testCell.getInitial() == 'W'){\t\t\t\t\t\t\t\t\t\t\t// Since non-door walkways can only be adjacent to walkways, if the test cell is a walkway...\n\t\t\t\t\toriginCell.addAdj(testCell);\t\t\t\t\t\t\t\t\t\t\t// add it to the adjacency set\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(row < this.getNumRows()-1) {\t\t\t\t\t\t\t\t\t\t\t\t\t// Makes sure the cell has a cell below it to avoid null pointer exceptions\n\t\t\t\ttestCell = this.getCell(row+1, col);\t\t\t\t\t\t\t\t\t\t// initializes the test cell to the cell in that location\n\t\t\t\tif(testCell.getInitial() == 'W'){\t\t\t\t\t\t\t\t\t\t\t// Since non-door walkways can only be adjacent to walkways, if the test cell is a walkway...\n\t\t\t\t\toriginCell.addAdj(testCell);\t\t\t\t\t\t\t\t\t\t\t// add it to the adjacency set\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(col < this.getNumColumns()-1) {\t\t\t\t\t\t\t\t\t\t\t\t// Makes sure the cell has a cell to the right to avoid null pointer exceptions\n\t\t\t\ttestCell = this.getCell(row, col+1);\t\t\t\t\t\t\t\t\t\t// initializes the test cell to the cell in that location\n\t\t\t\tif(testCell.getInitial() == 'W'){\t\t\t\t\t\t\t\t\t\t\t// Since non-door walkways can only be adjacent to walkways, if the test cell is a walkway...\n\t\t\t\t\toriginCell.addAdj(testCell);\t\t\t\t\t\t\t\t\t\t\t// add it to the adjacency set\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\t\n\t\t}\n\t\telse if(originCell.getInitial() == 'W' && originCell.isDoorway()) {\t\t\t\t\t// checks to see if the cell is a doorway\n\t\t\tif(row > 0) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Makes sure the cell has a cell above it to avoid null pointer exceptions\n\t\t\t\ttestCell = this.getCell(row-1, col);\t\t\t\t\t\t\t\t\t\t// initializes the test cell to the cell in that location\n\t\t\t\tif(originCell.getDoorDirection() == DoorDirection.UP)\t\t\t\t\t\t// checks to see if the door direction is up\n\t\t\t\t\toriginCell.addAdj(roomMap.get(testCell.getInitial()).getCenterCell());\t// adds the center of the room corresponding to the character of the test cell to the adjacency list\n\t\t\t\telse if(testCell.getInitial() == 'W')\t\t\t\t\t\t\t\t\t\t// otherwise, if the test cell above is a walkway...\n\t\t\t\t\toriginCell.addAdj(testCell);\t\t\t\t\t\t\t\t\t\t\t// add it to the adjacency set\n\t\t\t}\n\t\t\tif(col > 0) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Makes sure the cell has a cell top the left to avoid null pointer exceptions\n\t\t\t\ttestCell = this.getCell(row, col-1);\t\t\t\t\t\t\t\t\t\t// initializes the test cell to the cell in that location\n\t\t\t\tif(originCell.getDoorDirection() == DoorDirection.LEFT)\t\t\t\t\t\t// checks to see if the door direction is left\n\t\t\t\t\toriginCell.addAdj(roomMap.get(testCell.getInitial()).getCenterCell());\t// adds the center of the room corresponding to the character of the test cell to the adjacency list\n\t\t\t\telse if(testCell.getInitial() == 'W')\t\t\t\t\t\t\t\t\t\t// otherwise, if the test cell above is a walkway...\n\t\t\t\t\toriginCell.addAdj(testCell);\t\t\t\t\t\t\t\t\t\t\t// add it to the adjacency set\n\t\t\t}\n\t\t\tif(row < this.getNumRows()-1) {\t\t\t\t\t\t\t\t\t\t\t\t\t// Makes sure the cell has a cell below it to avoid null pointer exceptions\n\t\t\t\ttestCell = this.getCell(row+1, col);\t\t\t\t\t\t\t\t\t\t// initializes the test cell to the cell in that location\n\t\t\t\tif(originCell.getDoorDirection() == DoorDirection.DOWN)\t\t\t\t\t\t// checks to see if the door direction is down\n\t\t\t\t\toriginCell.addAdj(roomMap.get(testCell.getInitial()).getCenterCell());\t// adds the center of the room corresponding to the character of the test cell to the adjacency list\n\t\t\t\telse if(testCell.getInitial() == 'W')\t\t\t\t\t\t\t\t\t\t// otherwise, if the test cell above is a walkway...\n\t\t\t\t\toriginCell.addAdj(testCell);\t\t\t\t\t\t\t\t\t\t\t// add it to the adjacency set\n\t\t\t}\n\t\t\tif(col < this.getNumColumns()-1) {\t\t\t\t\t\t\t\t\t\t\t\t// Makes sure the cell has a cell to the right to avoid null pointer exceptions\n\t\t\t\ttestCell = this.getCell(row, col+1);\t\t\t\t\t\t\t\t\t\t// initializes the test cell to the cell in that location\n\t\t\t\tif(originCell.getDoorDirection() == DoorDirection.RIGHT)\t\t\t\t\t// checks to see if the door direction is right\n\t\t\t\t\toriginCell.addAdj(roomMap.get(testCell.getInitial()).getCenterCell());\t// adds the center of the room corresponding to the character of the test cell to the adjacency list\n\t\t\t\telse if(testCell.getInitial() == 'W')\t\t\t\t\t\t\t\t\t\t// otherwise, if the test cell above is a walkway...\n\t\t\t\t\toriginCell.addAdj(testCell);\t\t\t\t\t\t\t\t\t\t\t// add it to the adjacency set\n\t\t\t}\n\t\t\treturn;\t\n\t\t}\n\t\treturn;\n\t}",
"List<WeightedEdge<Vertex>> neighbors(Vertex v);",
"public static void wallsAndGates(int[][] rooms) {\n if (rooms.length == 0 || rooms[0].length == 0) {\n return;\n }\n\n int m = rooms.length;\n int n = rooms[0].length;\n\n Queue<int[]> queue = new LinkedList();\n boolean[][] visited = new boolean[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n if (rooms[i][j] == 0) {\n queue.add(new int[] {i, j});\n }\n }\n }\n\n int level = 1;\n while (!queue.isEmpty()) {\n int size = queue.size();\n for (int i = 0; i < size; i++) {\n int[] cur = queue.poll();\n int currow = cur[0];\n int curcol = cur[1];\n\n int row;\n int col;\n\n //up\n row = currow-1;\n col = curcol;\n if (row >= 0) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n\n //down\n row = currow+1;\n if (row < m) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n\n //left\n row = currow;\n col = curcol-1;\n if (col >= 0) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n\n //right\n row = currow;\n col = curcol + 1;\n if (col < n) {\n if (rooms[row][col] == Integer.MAX_VALUE && !visited[row][col]) {\n visited[row][col] = true;\n rooms[row][col] = level;\n queue.add(new int[] {row, col});\n }\n }\n }\n level++;\n }\n\n }",
"void addEdge(int v,int w)\n {\n adj[v].add(w);\n adj[w].add(v);\n }",
"public static void insertEdge(Edge edge,Context context) {\n DatabaseContext dbContext = new DatabaseContext(context);\n SQLiteHelper helper = new SQLiteHelper(dbContext,\"BLEdevice.db\");\n helper.insertEdge(edge);\n // Log.e(\"insertEdge\", \"edge cout = \" +coutEdge(context));\n }",
"public interface WedgeProcessor {\n /**\n * A wedge processor's test method accepts two edge chains A=(a0,a1,a2) and B=(b0,b1,b2) where\n * a1==b1, and returns either -1, 0, or 1 to indicate the relationship between the region to the\n * left of A and the region to the left of B.\n */\n int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2);\n }",
"private void createEdges() {\n int edgeSize = windowSize - 1;\n BufferedImage edgedImage = new BufferedImage(image.getWidth() + edgeSize, image.getHeight() + edgeSize, BufferedImage.TYPE_INT_ARGB);\n int[] edgeData = ((DataBufferInt) edgedImage.getRaster().getDataBuffer()).getData();\n\n // set every pixels in edged image to -1 to use for checking unassigned pixels when filling edges\n for (int i = 0; i < edgeData.length; i++) {\n edgeData[i] = -1;\n }\n\n // draw original image onto center of edged image\n edgedImage.getGraphics().drawImage(image, edgeSize/2, edgeSize/2, null);\n edgedImage.getGraphics().dispose();\n\n\n //TODO - get this working after program works to improve speed\n// byte[] edgedData = ((DataBufferByte) edgedImage.getRaster().getDataBuffer()).getData();\n// byte[] originalData = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();\n//\n // copy image into larger, edged image. currently not working,\n// for (int i = windowSize / 2 * 3, originalI = 0; i < image.getHeight() - windowSize / 2; i++, originalI++) {\n// for (int j = windowSize / 2 * 3, originalJ = 0; j < image.getWidth() - windowSize / 2; j++, originalJ++) {\n// edgedData[i + j * edgedImage.getWidth()] = originalData[originalI + originalJ * image.getWidth()];\n// }\n// }\n\n image = edgedImage;\n fillEdges();\n }",
"private List<Polygon2D> getDistrictsInRing(List<Voter> voters, Point2D innerVertex, Point2D outerVertex, int repPerDistrict, int party) {\n \t\tList<Polygon2D> results = new ArrayList<Polygon2D>();\n \t\tdouble step = 0.1;\n \t\tint dist_num = repPerDistrict == 3 ? 20 : 22;\n \t\tPolygon2D outerTri = getTriByVertex(outerVertex);\n \t\tPolygon2D innerTri = getTriByVertex(innerVertex);\n \t\tPoint2D currIn = innerVertex;\n \t\tPoint2D currOut = outerVertex;\n \t\tdouble lenRate = (outerVertex.getY()/2 - 250 * Math.sqrt(3) / 3) / (innerVertex.getY()/2 - 250 * Math.sqrt(3) / 3);\n \t\tint total_population = Run.countInclusion(voters, outerTri) - Run.countInclusion(voters, innerTri);\n \t\tboolean gmable = true;\n \t\tdouble popRate = 0;\n \t\tfor(int i = 0; i < 3; i++) {\n \t\t\tSystem.out.println(\"Edge: \" + Integer.toString(i));\n\t \t\twhile(results.size() < dist_num-1) {\n\t \t\t\tSystem.out.println(gmable);\n\t \t\t\tPolygon2D p;\n\t \t\t\tif(i == 1)\n\t \t\t\t\tp = findDist(currIn, currOut, innerTri.getPoints().get(i), innerTri.getPoints().get((i+1)%3),\n\t \t\t\t\t\touterTri.getPoints().get(i), outerTri.getPoints().get((i+1)%3), step, lenRate, voters, true, repPerDistrict, party, gmable, popRate);\n\t \t\t\telse\n\t \t\t\t\tp = findDist(currIn, currOut, innerTri.getPoints().get(i), innerTri.getPoints().get((i+1)%3),\n\t\t \t\t\t\t\touterTri.getPoints().get(i), outerTri.getPoints().get((i+1)%3), step, lenRate, voters, false, repPerDistrict, party, gmable, popRate);\n\t \t\t\tif(p == null) {\n\t \t\t\t\tif(i == 0) {\n\t \t\t\t\t\tSystem.out.println(\"1111\");\n\t \t\t\t\t\tp = findDistAtCorner(currIn, currOut, innerTri.getPoints().get(1), innerTri.getPoints().get(2),\n\t \t\t\t\t\t\touterTri.getPoints().get(1), outerTri.getPoints().get(2), step, lenRate, voters, true, repPerDistrict, party, gmable, popRate);\n\t \t\t\t\t\tif(p == null) {\n\t \t\t\t\t\t\tSystem.out.println(\"3333\");\n\t \t\t\t\t\t\tp = findDistAtTwoCorners(currIn, currOut, innerTri.getPoints().get(1), innerTri.getPoints().get(2), innerTri.getPoints().get(0),\n\t \t\t\t\t\t\touterTri.getPoints().get(1), outerTri.getPoints().get(2), outerTri.getPoints().get(0), step, lenRate, voters, repPerDistrict, party, gmable, popRate);\n\t \t\t\t\t\t\t i++;\n\t \t\t\t\t\t}\n\t \t\t\t\t\ttotal_population -= Run.countInclusion(voters, p);\n\t \t \t\t\t\tresults.add(p);\n\t \t \t\t\t\tif(gmable) {\n\t \t \t\t\t\t\tgmable = isGerryManderable(total_population, dist_num - results.size());\n\t \t \t\t\t\t\tif(!gmable)\n\t \t \t\t\t\t\t\tpopRate = (double)total_population/(dist_num - results.size());\n\t \t \t\t\t\t}\n\t \t\t\t\t\tcurrIn = p.getPoints().get(p.getPoints().size()-1);\n\t\t \t \t\t\tcurrOut = p.getPoints().get(p.getPoints().size()-2);\n\t\t \t \t\t\tSystem.out.println(\"Polygon num: \" + Integer.toString(results.size()));\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t}\n\t \t\t\t\telse if(i == 1) {\n\t \t\t\t\t\tSystem.out.println(\"2222\");\n\t \t\t\t\t\tp = findDistAtCorner(currIn, currOut, innerTri.getPoints().get(2), innerTri.getPoints().get(0),\n\t\t \t\t\t\t\t\touterTri.getPoints().get(2), outerTri.getPoints().get(0), step, lenRate, voters, false, repPerDistrict, party, gmable, popRate);\n\t \t\t\t\t\tSystem.out.println(Run.countInclusion(voters, p));\n\t \t\t\t\t\ttotal_population -= Run.countInclusion(voters, p);\n\t\t \t\t\t\tresults.add(p);\n\t\t \t\t\t\tif(gmable) {\n \t \t\t\t\t\t\tgmable = isGerryManderable(total_population, dist_num - results.size());\n \t \t\t\t\t\t\tif(!gmable)\n\t \t \t\t\t\t\t\tpopRate = (double)total_population/(dist_num - results.size());\n\t\t \t\t\t\t}\n\t\t\t\t \t\tcurrIn = p.getPoints().get(5);\n\t\t\t\t \t\tcurrOut = p.getPoints().get(4);\n\t\t\t\t \t\tSystem.out.println(\"Polygon num: \" + Integer.toString(results.size()));\n\t\t\t\t \t\tbreak;\n\t \t\t\t\t}\n\t \t\t\t}\n \t\t\t\tcurrIn = p.getPoints().get(p.getPoints().size()-1);\n\t \t\t\tcurrOut = p.getPoints().get(p.getPoints().size()-2);\n\t \t\t\tSystem.out.println(Run.countInclusion(voters, p));\n\t \t\t\ttotal_population -= Run.countInclusion(voters, p);\n\t \t\t\tresults.add(p);\n\t \t\t\tif(gmable) {\n\t\t\t\t\t\tgmable = isGerryManderable(total_population, dist_num - results.size());\n\t\t\t\t\t\tif(!gmable)\n \t\t\t\t\t\tpopRate = (double)total_population/(dist_num - results.size());\n\t\t\t\t}\n\t \t\t\tSystem.out.println(\"Polygon num: \" + Integer.toString(results.size()));\n\t \t\t}\n \t\t}\n \t\t// We do not check population in the last polygon of a ring now. It should be a limitation for gerrymandering\n \t\tPolygon2D p = new Polygon2D();\n \t\tp.append(currIn);\n \t\tp.append(currOut);\n \t\tif(currIn.getX() > 500 && currIn.getY() > innerTri.getPoints().get(1).getY()) {\n \t\t\tp.append(outerTri.getPoints().get(1));\n \t\t\tp.append(outerTri.getPoints().get(2));\n \t\t\tp.append(outerTri.getPoints().get(0));\n \t\t\tp.append(innerTri.getPoints().get(0));\n \t\t\tp.append(innerTri.getPoints().get(2));\n \t\t\tp.append(innerTri.getPoints().get(1));\n \t\t}\n \t\telse if(currIn.getY() == innerTri.getPoints().get(1).getY()) {\n \t\t\tp.append(outerTri.getPoints().get(2));\n \t\t\tp.append(outerTri.getPoints().get(0));\n \t\tp.append(innerTri.getPoints().get(0));\n \t\tp.append(innerTri.getPoints().get(2));\n \t\t}\n \t\telse {\n \t\t\tp.append(outerTri.getPoints().get(0));\n \t\tp.append(innerTri.getPoints().get(0));\n \t\t}\n \t\tresults.add(p);\n \t\tSystem.out.println(\"Polygon num: \" + Integer.toString(results.size()));\n \t\treturn results;\n }",
"private BBlock makeEdge(Stmt pstmt, BBlock pblock) {\n //##53 Stmt nextStmt;\n\n // Fukuda 2005.07.07\n Stmt nextStmt;\n // Fukuda 2005.07.07\n Stmt nextStmt1;\n LabeledStmt lastStmt;\n Label l;\n IfStmt stmtIF;\n LoopStmt stmtLOOP;\n SwitchStmt stmtSWITCH;\n Stmt loopInitPart; //##53\n BBlock loopInitBlock; //##53\n BBlock currBlock;\n BBlock thenBlock;\n BBlock elseBlock;\n BBlock LabelBlock;\n BBlock bodyBlock;\n BBlock stepBlock;\n BBlock loopbackBlock;\n BBlock CondInitBlock;\n BBlock endBlock;\n BBlock defaultBlock;\n BBlock switchBlock;\n LabelBlock = null;\n BBlock lLoopStepBlock; //##70\n\n int lop;\n nextStmt = pstmt;\n currBlock = pblock;\n lGlobalNextStmt = nextStmt; //##70\n\n flow.dbg(5, \"\\nmakeEdge\", \"to stmt= \" + pstmt + \" from B\" + pblock); //##53\n\n while (nextStmt != null) {\n lop = nextStmt.getOperator();\n flow.dbg(5, \"\\nMakeEdge\", \"nextStmt = \" + nextStmt +\n \" nextToNext \" + ioRoot.toStringObject(nextStmt.getNextStmt())\n + \" lGlobalNextStmt \" + lGlobalNextStmt); //##53 //##70\n\n switch (lop) {\n case HIR.OP_IF:\n stmtIF = (IfStmt) nextStmt;\n thenBlock = makeEdge(stmtIF.getThenPart(), currBlock);\n elseBlock = makeEdge(stmtIF.getElsePart(), currBlock);\n LabelBlock = (BBlock) fResults.getBBlockForLabel(stmtIF.getEndLabel());\n\n //\t\t\t\tLabelBlock =stmtIF.getEndLabel().getBBlock();\n addEdge(thenBlock, LabelBlock);\n addEdge(elseBlock, LabelBlock);\n //##53 currBlock = LabelBlock;\n //##53 nextStmt = nextStmt.getNextStmt();\n //##53 BEGIN\n LabeledStmt lIfEnd = (LabeledStmt)stmtIF.getChild(4);\n flow.dbg(6, \" \", \"if-end \" + lIfEnd.toStringShort());\n if (lIfEnd.getStmt() != null)\n currBlock = makeEdge(lIfEnd.getStmt(), LabelBlock);\n else\n currBlock = LabelBlock;\n nextStmt = getNextStmtSeeingAncestor(stmtIF);\n flow.dbg(6, \" next-of-if \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n //##53 END\n\n break;\n\n case HIR.OP_LABELED_STMT:\n LabelBlock = (BBlock) fResults.getBBlockForLabel(((LabeledStmt) nextStmt).getLabel());\n addEdge(currBlock, LabelBlock);\n currBlock = LabelBlock;\n nextStmt1 = ((LabeledStmt) nextStmt).getStmt();\n\n if (nextStmt1 == null) {\n //##53 nextStmt = nextStmt.getNextStmt();\n nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n flow.dbg(6, \" next-of-labeledSt \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n } else {\n nextStmt = nextStmt1;\n }\n lGlobalNextStmt = nextStmt; //##70\n\n break;\n\n case HIR.OP_SWITCH:\n\n int CaseCount;\n stmtSWITCH = (SwitchStmt) nextStmt;\n CaseCount = stmtSWITCH.getCaseCount();\n\n for (int i = 0; i < CaseCount; i++) {\n //\t\t\t\t\tLabelBlock=stmtSWITCH.getCaseLabel(i).getBBlock();\n LabelBlock = (BBlock) fResults.getBBlockForLabel(stmtSWITCH.getCaseLabel(\n i));\n addEdge(currBlock, LabelBlock);\n }\n\n //\t\t\t\tLabelBlock=stmtSWITCH.getDefaultLabel().getBBlock();\n defaultBlock = (BBlock) fResults.getBBlockForLabel(stmtSWITCH.getDefaultLabel());\n endBlock = (BBlock) fResults.getBBlockForLabel(stmtSWITCH.getEndLabel());\n if (defaultBlock == null)\n addEdge(currBlock, endBlock);\n else\n addEdge(currBlock, defaultBlock);\n bodyBlock = makeEdge(stmtSWITCH.getBodyStmt(), currBlock);\n\n //\t\t\t\tendBlock=stmtSWITCH.getEndLabel().getBBlock();\n addEdge(bodyBlock, endBlock);\n //##53 currBlock = endBlock;\n //##53 nextStmt = nextStmt.getNextStmt();\n //##53 BEGIN\n LabeledStmt lSwitchEnd = (LabeledStmt)stmtSWITCH.getChild(4);\n flow.dbg(6, \" \", \"switch-end \" + lSwitchEnd.toStringShort());\n if (lSwitchEnd.getStmt() != null)\n currBlock = makeEdge(lSwitchEnd.getStmt(), endBlock);\n else\n currBlock = endBlock;\n nextStmt = getNextStmtSeeingAncestor(stmtSWITCH);\n flow.dbg(6, \" next-of-switch \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n //##53 END\n\n break;\n\n case HIR.OP_WHILE:\n case HIR.OP_FOR:\n case HIR.OP_INDEXED_LOOP:\n case HIR.OP_UNTIL:\n stmtLOOP = (LoopStmt) nextStmt;\n l = stmtLOOP.getLoopBackLabel();\n\n //\t\t\t\tloopbackBlock = (BBlock)fResults.getBBlockForLabel( l);\n loopbackBlock = (BBlock) fResults.getBBlockForLabel(l);\n lLoopStepBlock = (BBlock) fResults.getBBlockForLabel(stmtLOOP.getLoopStepLabel()); //##70\n //\t\t\t\tendBlock = stmtLOOP.getLoopEndLabel().getBBlock();\n endBlock = (BBlock) fResults.getBBlockForLabel(stmtLOOP.getLoopEndLabel());\n flow.dbg(6, \"Loop\", \"backBlock \" + loopbackBlock + \" stepLabel \" +\n stmtLOOP.getLoopStepLabel() + \" stepBlock \" +\n lLoopStepBlock + \" endBlock \" + endBlock); //##70\n /* //##53\n CondInitBlock = makeEdge(stmtLOOP.getConditionalInitPart(),\n currBlock);\n\n if (CondInitBlock == currBlock) {\n addEdge(currBlock, loopbackBlock);\n bodyBlock = makeEdge(stmtLOOP.getLoopBodyPart(),\n loopbackBlock);\n\n //\t\t\t\t\t\tcurrBlock.getSuccEdge(loopbackBlock).flagBox().setFlag(Edge.LOOP_BACK_EDGE, true); //## Tan //##9\n } else {\n bodyBlock = makeEdge(stmtLOOP.getLoopBodyPart(),\n CondInitBlock);\n addEdge(CondInitBlock, endBlock);\n }\n */ //##53\n //##53 BEGIN\n loopInitPart = stmtLOOP.getLoopInitPart();\n // loopInitPart may contain jump-to-loopBodyPart to implement\n // conditional initiation.\n // Make edge from currBlock to LoopInitPart.\n flow.dbg(6, \" make-edge to loop-init part from \" + currBlock ); //##70\n loopInitBlock = makeEdge(loopInitPart, currBlock);\n // How about loopInitBlock to loopBackBlock ?\n // Add edge from currBlock to loopBackBlock ?\n flow.dbg(6, \" add-edge to loop-back block from \" + currBlock + \" initBlock \" + loopInitBlock); //##70\n addEdge(currBlock, loopbackBlock);\n // Make edge from loopbackBlock to loop-body part.\n flow.dbg(6, \" make-edge to loop-body part from loop-back block \" + loopbackBlock ); //##70\n bodyBlock = makeEdge(stmtLOOP.getLoopBodyPart(),\n loopbackBlock);\n //##53 END\n l = stmtLOOP.getLoopStepLabel();\n\n if (l != null) {\n stepBlock = (BBlock) fResults.getBBlockForLabel(l);\n\n //\t\t\t\t\t\taddEdge(bodyBlock,stepBlock);\n if (stepBlock != null) {\n // How about from bodyBlock to stepBlock ?\n // The label of step block is attached at the end of body block.\n if (bodyBlock != stepBlock) {\n flow.dbg(5, \" add edge\", \"from loop-body part \" + bodyBlock\n + \" to stepBlock \" + stepBlock); //##70\n addEdge(bodyBlock, stepBlock);\n }\n // Make edge from stepBlock to loopbackBlock.\n flow.dbg(5, \" add edge\", \"from loop-step block \" + stepBlock\n + \" to loop-back block \" + loopbackBlock); //##70\n addEdge(stepBlock, loopbackBlock);\n stepBlock.getSuccEdge(loopbackBlock).flagBox().setFlag(Edge.LOOP_BACK_EDGE,\n true); //## Tan //##9\n // Make edge from stepBlock to loop-step part.\n flow.dbg(5, \" make-edge to loop-step part from stepBlock \" + stepBlock); //##70\n BBlock lStepBlock2 = makeEdge(stmtLOOP.getLoopStepPart(),\n stepBlock); //##53\n } else {\n flow.dbg(4, \" stepBlock of \" + stmtLOOP + \" is null\"); //##70\n if (bodyBlock != null) { // no step part (or merged with the body)\n // Add edge from bodyBlock to loopbackBlock.\n flow.dbg(5, \" add edge from bodyBlock \" + bodyBlock + \" to loop-back block \" + loopbackBlock); //##70\n addEdge(bodyBlock, loopbackBlock);\n bodyBlock.getSuccEdge(loopbackBlock).flagBox().setFlag(Edge.\n LOOP_BACK_EDGE,\n true); //## Tan //##9\n }\n else {\n //System.out.println(\"Returned or Jumped\");//\n }\n }\n\n if (stmtLOOP.getLoopEndCondition() == (Exp) null) {\n // Add edge from loopbackBlock to endBlock.\n addEdge(loopbackBlock, endBlock);\n } else if (stepBlock != null) {\n // End condition is not null.\n // Add edge from stepBlock to endBlock.\n // How about stepBlock to end-condition part ?\n addEdge(stepBlock, endBlock);\n } else {\n // End condition is not null and\n // stepBlock is null.\n // Add edge from bodyBlock to endBlock.\n // How about bodyBlock to end-condition block ?\n addEdge(bodyBlock, endBlock);\n }\n } else {\n // No loop-step label.\n // Add edge from bodyBlock to loopbackBlock.\n addEdge(bodyBlock, loopbackBlock);\n // Add edge from loopbackBlock to endBlock.\n addEdge(loopbackBlock, endBlock);\n }\n\n //##53 currBlock = endBlock;\n //##53 nextStmt = nextStmt.getNextStmt();\n //##53 BEGIN\n LabeledStmt lLoopEnd = (LabeledStmt)stmtLOOP.getChild(7);\n flow.dbg(6, \" \", \"loop-end \" + lLoopEnd.toStringShort());\n if (lLoopEnd.getStmt() != null) {\n currBlock = makeEdge(lLoopEnd.getStmt(), endBlock);\n }else\n currBlock = endBlock;\n flow.dbg(5, \" get next statement\", \"of loop \" + stmtLOOP.toStringShort());\n nextStmt = getNextStmtSeeingAncestor(stmtLOOP);\n flow.dbg(6, \" next-of-loop \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n //##53 END\n\n break;\n\n case HIR.OP_RETURN:\n currBlock = null;\n //##53 nextStmt = nextStmt.getNextStmt();\n nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n flow.dbg(6, \" next-of-return \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n break;\n\n case HIR.OP_JUMP:\n l = ((JumpStmt) nextStmt).getLabel();\n LabelBlock = (BBlock) fResults.getBBlockForLabel(l);\n addEdge(currBlock, LabelBlock);\n currBlock = null;\n //##53 nextStmt = nextStmt.getNextStmt();\n nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n flow.dbg(6, \" next-of-jump \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n break;\n\n case HIR.OP_BLOCK:\n currBlock = makeEdge(((BlockStmt) nextStmt).getFirstStmt(),\n currBlock); //## Fukuda 020322\n //##53 nextStmt = ((BlockStmt) nextStmt).getNextStmt(); //## Fukuda 020322\n //global nextStmt ??\n //##70 nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n nextStmt = getNextStmtSeeingAncestor(lGlobalNextStmt); //##70\n flow.dbg(6, \" next-of-block \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n break;\n\n default:\n // Non-control statement.\n //##53 nextStmt = nextStmt.getNextStmt();\n nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n flow.dbg(6, \" next-of-default \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n }\n } // end of while\n flow.dbg(5, \" return \" + currBlock + \" for \" + pstmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n return currBlock;\n }",
"private Edge createEdge(String row) {\n String[] columns = row.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n return Edge.fromCsv(columns);\n }",
"public native MagickImage edgeImage(double raduis) throws MagickException;",
"void addEdge(int v,int w)\n {\n adj[v].add(w);\n }",
"public SimpleEdge getEdge() {\n return edge;\n }",
"private List<Integer> getCells(Edge e) {\r\n\t\treturn getCells(e.getMBR());\r\n\t}",
"public interface IHyperEdge<V extends IVertex> extends IGObject {\n /**\n * Add vertex to the edge\n *\n * @param v Vertex to add\n * @return Vertex added to the edge, <code>null</code> upon failure\n */\n public V addVertex(V v);\n\n /**\n * Add collection of vertices to the edge\n *\n * @param vs Collection of vertices to add\n * @return Collection of vertices added to the edge, <code>null</code> if no vertex was added\n */\n public Collection<V> addVertices(Collection<V> vs);\n\n /**\n * Remove vertex from the edge\n *\n * @param v Vertex to remove\n * @return Vertex that was removed, <code>null</code> upon failure\n */\n public V removeVertex(V v);\n\n /**\n * Remove collection of vertices from the edge\n *\n * @param vs Collection of vertices to remove\n * @return Collection of vertices removed from the edge, <code>null</code> if no vertex was removed\n */\n public Collection<V> removeVertices(Collection<V> vs);\n\n /**\n * Check if the edge connects vertex\n *\n * @param v Vertex to check\n * @return <code>true</code> if the edge connects vertex, <code>false<code> otherwise\n */\n public boolean connectsVertex(V v);\n\n /**\n * Check if the edge connects vertices\n *\n * @param v Collection of vertices to check\n * @return <code>true</code> if the edge connects all the vertices, <code>false<code> otherwise\n */\n public boolean connectsVertices(Collection<V> vs);\n\n /**\n * Get other vertices than the one proposed\n *\n * @param v Vertex proposed\n * @return Collection of other vertices of the edge\n */\n public Collection<V> getOtherVertices(V v);\n\n /**\n * Get other vertices than the ones in the collection proposed\n *\n * @param vs Collection of vertices proposed\n * @return Collection of other vertices of the edge\n */\n public Collection<V> getOtherVertices(Collection<V> vs);\n\n\n /**\n * Get vertices of the edge\n *\n * @return Collection of the edge vertices\n */\n public Collection<V> getVertices();\n\n /**\n * Destroy the edge, unlink from the graph\n */\n public void destroy();\n}",
"public void Build() {\n OCCwrapJavaJNI.ShapeFix_EdgeConnect_Build(swigCPtr, this);\n }",
"public double getEdge()\n {\n return this.edge;\n }",
"void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}",
"public EdgeWeightedDigraph(int V, int[] Vf, int[] Vt, int E, int[] W) \n {\n this(V);\n online = new boolean[V];\n if (E < 0) throw new RuntimeException(\"Number of edges must be nonnegative\");\n for (int i = 0; i < E; i++) \n {\n int v = Vf[i];\n int w = Vt[i];\n double weight = W[i];\n //Add inverse of each edge we are adding\n DirectedEdge e = new DirectedEdge(v, w, weight, true);\n DirectedEdge eInv = new DirectedEdge(w,v,weight, true);\n addEdge(e);\n addEdge(eInv);\n \n }\n //Initialize array of vertex status\n for(int j = 0; j < V; j++)\n {\n \tonline[j] = true;\n }\n }",
"public void crossEdge(Edge e) {}",
"public void addEdge(int v, int w) {\r\n\t\t\tadj[v].add(w);\r\n\t\t\tadj[w].add(v);\r\n\t\t\tE++;\r\n\t\t}",
"void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}",
"void addEdge(int v, int w) {\n\t\tadj[v].add(w);\n\t}",
"public void addEdge(int v, int w) {\r\n adj[v].add(w);\r\n E++;\r\n }",
"void addEdge(int v, int w)\n {\n adj[v].add(w);\n }",
"boolean addEdge(E edge);",
"String getIdEdge();",
"public static int[][] getEdgeMatrix() {\n\t\treturn edge;\n\t}",
"public T caseEdge(Edge object) {\n\t\treturn null;\n\t}",
"public void addedge(String fro, String to, int wt) {\r\n Edge e = new Edge(fro, to, wt);\r\n\r\n\r\n Set<String> keys = graph.keySet();\r\n// Object[] arr = keys.toArray();\r\n int f = 0;\r\n if(graph.containsKey(fro)&&graph.containsKey(to))\r\n {\r\n\r\n int[] bb2 = new int[2000];\r\n for(int zz=0;zz<5000;zz++){\r\n\r\n\r\n ArrayList<Integer> abcd = new ArrayList<>();\r\n abcd.add(zz);\r\n\r\n if(zz<2500)\r\n zz++;\r\n else\r\n zz++;\r\n\r\n bb2[zz%500]=zz;\r\n\r\n\r\n int qq= 5000;\r\n\r\n qq--;\r\n\r\n String nnn = \"aaa aa\";\r\n nnn+=\"df\";\r\n\r\n\r\n }\r\n\r\n }\r\n else\r\n {\r\n\r\n\r\n System.out.println(\"some vertices are not present\");\r\n return;\r\n }\r\n for ( String y : keys) {\r\n if (fro.compareTo(y) == 0) {\r\n f = 1;\r\n ArrayList<Edge> ee =graph.get(y);\r\n\r\n\r\n ee.add(e);\r\n }\r\n\r\n\r\n }\r\n if (f == 0) {}\r\n }",
"public void testContainsEdgeEdge( ) {\n init( );\n\n //TODO Implement containsEdge().\n }",
"private SumoEdge getEdge(String id) {\n\t\treturn idToEdge.get(id);\n\t}",
"@Test\n\t\tpublic void boardEdgeTests() {\n\t\t\t//Testing a walkway space that is on the top edge of the board and is next to a door that points in its direction (\n\t\t\tSet<BoardCell> testList = board.getAdjList(0, 17);\n\t\t\tassertEquals(3, testList.size());\n\t\t\tassertTrue(testList.contains(board.getCellAt(0, 16)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(0, 18)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(1, 17)));\n\t\t\t//Testing a walkway space on the bottom edge of the board that is near a room space\n\t\t\ttestList = board.getAdjList(20, 5);\n\t\t\tassertEquals(2, testList.size());\n\t\t\tassertTrue(testList.contains(board.getCellAt(19, 5)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(20, 6)));\n\t\t\t//Testing walkway a space on the left edge of the board that is surrounded by 3 other walkway spaces\n\t\t\ttestList = board.getAdjList(5, 0);\n\t\t\tassertEquals(3, testList.size());\n\t\t\tassertTrue(testList.contains(board.getCellAt(4, 0)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(6, 0)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(5, 1)));\n\t\t\t//Testing a room space in the bottom right corner\n\t\t\ttestList = board.getAdjList(20, 21);\n\t\t\tassertEquals(0, testList.size());\n\n\t\t}",
"public abstract void addEdge(Point p, Direction dir);",
"@Override\n\tpublic Squarelotron inverseDiagonalFlip(int ring) {\n\t\tint[] array = numbers();\n\t\t//converts the array into a new Squarelotron\n\t\tSquarelotron copySquarelotron = makeSquarelotron(array);\n\t\tint[][] newSquarelotron = copySquarelotron.squarelotron;\n\t\t//finds length of squarelotron and takes the square root\n\t\tint length = array.length;\n\t\tdouble sqrtLength = Math.sqrt(length);\n\t\tint size =(int) sqrtLength;\n\t\t//loops through and flips with the inverse diagonal\n\t\tfor(int i = ring-1; i <= (size-ring); i++){\n\t\t\tint numberRt = newSquarelotron[ring-1][i];\n\t\t\tnewSquarelotron[ring-1][i] = newSquarelotron[size-i-1][size-ring];\n\t\t\tnewSquarelotron[size-i-1][size-ring]=numberRt;\n\t\t}\n\t\tfor(int i = ring; i <= (size-ring); i++){\n\t\t\tint numberLft = newSquarelotron[i][ring-1];\n\t\t\tnewSquarelotron[i][ring-1] = newSquarelotron[size-ring][size-i-1];\n\t\t\tnewSquarelotron[size-ring][size-i-1]=numberLft;\n\t\t}\n\t\tcopySquarelotron.squarelotron = newSquarelotron;\n\t\treturn copySquarelotron;\n\t}",
"void add(Edge edge);",
"void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}",
"public abstract void map(Edge queryEdge, Edge graphEdge);",
"List<CyEdge> getInternalEdgeList();",
"public abstract String getEdgeSymbol(int vertexIndex, int otherVertexIndex);",
"private Edge derive(Edge edge, RelationGraph[] operands) {\n int time = edge.getTime();\n int length = edge.getDerivationLength();\n for (RelationGraph g : operands) {\n Edge e = g.get(edge);\n if (e == null) {\n return null;\n }\n time = Math.max(time, e.getTime());\n length = Math.max(length, e.getDerivationLength());\n }\n return edge.with(time, length);\n }",
"EdgeLayout createEdgeLayout();",
"public void addEdge(int start, int end);",
"private String edgesLeavingVertexToString() {\n \n //make empty string\n String s = \"\";\n \n //for loop to go through all vertices; \n for (int j = 0; j < arrayOfVertices.length; j++) {\n \n //if it has any edges...\n if (arrayOfVertices[j].getDegree() > 0) {\n \n //go through its edges\n for (int k = 0; k < arrayOfVertices[j].getDegree(); k++) {\n \n //declare an array list\n ArrayList<Vertex> newArrayList = \n arrayOfVertices[j].getAdjacent();\n \n //add to string: the vertex itself + space + edge + line break\n s += j + \" \" + newArrayList.get(k).getID() + \"\\n\"; \n \n } \n } \n }\n \n //add -1, -1 after all the edges\n s += \"-1 -1\";\n \n return s; \n }",
"protected abstract Object calcJoinRow();",
"private void createFloor2Connections(IndoorVertex stairs, IndoorVertex elevator)\n {\n armesConnectionNorth = new IndoorVertex(building, new XYPos(1000, 151.19), 2);\n armesConnectionSouth = new IndoorVertex(building, new XYPos(1000, 158.75), 2);\n IndoorVertex rm239_fac_science = new IndoorVertex(building, new XYPos(1030.24, 97.11), 2);\n IndoorVertex _30_151 = new IndoorVertex(building, new XYPos(1030.24, 151.19), 2);\n IndoorVertex _30_179 = new IndoorVertex(building, new XYPos(1030.24, 179.65), 2);\n exit = new IndoorVertex(building, new XYPos(1030.24, 188.41), 2);\n IndoorVertex rm211_library = new IndoorVertex(building, new XYPos(1080.25, 173.29), 2);\n IndoorVertex _44_160 = new IndoorVertex(building, new XYPos(1044.19, 160.49), 2);\n IndoorVertex _44_173 = new IndoorVertex(building, new XYPos(1044.19, 173.29), 2);\n IndoorVertex _30_173 = new IndoorVertex(building, new XYPos(1030.24, 173.29), 2);\n IndoorVertex _30_158 = new IndoorVertex(building, new XYPos(1030.24, 158.75), 2);\n IndoorVertex _44_154 = new IndoorVertex(building, new XYPos(1044.19, 154.1), 2);\n IndoorVertex _30_154 = new IndoorVertex(building, new XYPos(1030.24, 154.1), 2);\n\n //Rooms\n ArrayList<IndoorVertex> rm211 = new ArrayList<>();\n rm211.add(rm211_library);\n\n rooms.put(\"211\", rm211);\n\n ArrayList<IndoorVertex> rm239 = new ArrayList<>();\n rm239.add(rm239_fac_science);\n\n rooms.put(\"239\", rm239);\n\n //Connections to other points\n connectVertex(armesConnectionSouth, _30_158);\n connectVertex(armesConnectionNorth, _30_151);\n connectVertex(_30_151, rm239_fac_science);\n connectVertex(_30_151, _30_154);\n connectVertex(_30_154, _44_154);\n connectVertex(_30_154, _30_158);\n connectVertex(_30_158, _44_154);\n connectVertex(_30_158, _44_160);\n connectVertex(_30_158, _30_173);\n connectVertex(_30_173, _44_173);\n connectVertex(_30_173, _30_179);\n connectVertex(_30_179, exit);\n connectVertex(_44_154, elevator);\n connectVertex(_44_154, _44_160);\n connectVertex(_44_160, stairs);\n connectVertex(_44_160, _44_173);\n connectVertex(_44_173, rm211_library);\n\n }",
"int nextcwedge(int edge, int face) {\n switch (edge) {\n case LB:\n return (face == L) ? LF : BN;\n case LT:\n return (face == L) ? LN : TF;\n case LN:\n return (face == L) ? LB : TN;\n case LF:\n return (face == L) ? LT : BF;\n case RB:\n return (face == R) ? RN : BF;\n case RT:\n return (face == R) ? RF : TN;\n case RN:\n return (face == R) ? RT : BN;\n case RF:\n return (face == R) ? RB : TF;\n case BN:\n return (face == B) ? RB : LN;\n case BF:\n return (face == B) ? LB : RF;\n case TN:\n return (face == T) ? LT : RN;\n case TF:\n return (face == T) ? RT : LF;\n }\n System.err.println(\"nextcwedge: should not be here...\");\n return 0;\n }",
"private Shape createEdge() {\n\t\tEdge edge = (Edge)shapeFactory.getShape(ShapeFactory.EDGE);\n\t\tEdgeLabel edgeLabel = (EdgeLabel) shapeFactory.getShape(ShapeFactory.EDGE_LABEL);\n\t\tedgeLabel.setEdge(edge);\n\t\tedge.setEdgeLabel(edgeLabel);\n\t\tshapes.add(edgeLabel);\n\t\tadd(edgeLabel);\n\t\treturn edge;\n\t}",
"private void relax(int x, int y, double[][] energyTo, int[] edgeTo) {\n if (width() == 1) {\n for (int i = 0; i < height(); i++)\n edgeTo[i] = 0;\n } else {\n if (x == 0) {\n if (y < height-1) {\n if (energyTo[x][y+1] >= energyTo[x][y] + energy[x][y+1]) {\n energyTo[x][y+1] = energyTo[x][y] + energy[x][y+1];\n }\n if (energyTo[x+1][y+1] >= energyTo[x][y] + energy[x+1][y+1]) {\n energyTo[x+1][y+1] = energyTo[x][y] + energy[x+1][y+1];\n }\n }\n } else if (x == width-1) {\n if (y < height-1) {\n if (energyTo[x][y+1] >= energyTo[x][y] + energy[x][y+1]) {\n energyTo[x][y+1] = energyTo[x][y] + energy[x][y+1];\n }\n if (energyTo[x-1][y+1] >= energyTo[x][y] + energy[x-1][y+1]) {\n energyTo[x-1][y+1] = energyTo[x][y] + energy[x-1][y+1];\n }\n }\n } else {\n if (y < height-1) {\n if (energyTo[x][y+1] >= energyTo[x][y] + energy[x][y+1]) {\n energyTo[x][y+1] = energyTo[x][y] + energy[x][y+1];\n }\n if (energyTo[x-1][y+1] >= energyTo[x][y] + energy[x-1][y+1]) {\n energyTo[x-1][y+1] = energyTo[x][y] + energy[x-1][y+1];\n }\n if (energyTo[x+1][y+1] >= energyTo[x][y] + energy[x+1][y+1]) {\n energyTo[x+1][y+1] = energyTo[x][y] + energy[x+1][y+1];\n }\n }\n }\n }\n }",
"public static GraphEdge createGraphEdgeForEdge() {\n GraphEdge graphEdge = new GraphEdge();\n\n for (int i = 0; i < 2; i++) {\n GraphNode childNode = new GraphNode();\n childNode.setPosition(AccuracyTestHelper.createPoint(20 * i, 10));\n childNode.setSize(AccuracyTestHelper.createDimension(40, 12));\n graphEdge.addContained(childNode);\n }\n graphEdge.addWaypoint(AccuracyTestHelper.createDiagramInterchangePoint(100, 100));\n graphEdge.addWaypoint(AccuracyTestHelper.createDiagramInterchangePoint(250, 200));\n\n // create a Relationship\n Relationship relationship = new IncludeImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(relationship);\n\n graphEdge.setSemanticModel(semanticModel);\n\n return graphEdge;\n }",
"public HashMap<String, Edge> getEdgeList () {return edgeList;}",
"public Edge findEdgeById(int id) throws SQLException {\n\t\treturn rDb.findEdgeById(id);\n\t}",
"private int createWEdges() {\n\t\tint scaler = 5; // Adjusts the number of edges in W\n\t\tint count = 0;\n\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\tfor (int j = 0; j < this.randomGen(scaler); j++) {\n\t\t\t\tint neighbor = this.randomGen(this.numWVertices - 1);\n\t\t\t\tif (i != neighbor) {\n\t\t\t\t\tthis.vertices.get(i).addNeighbor(this.vertices.get(neighbor));\n\t\t\t\t\tthis.vertices.get(neighbor).addNeighbor(this.vertices.get(i));\n\t\t\t\t\tcount++;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"@Override\n public double getEdgeWeight() {\n return edgeWeight;\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic static void Relaxation(Object o, Iterable<Point2i> ring) {\n\t\tContext context = (Context) ContextUtils.getContext(o);\n\t\tGrid grid = (Grid) context.getProjection(\"grid-space\");\n\t\tContinuousSpace space = (ContinuousSpace) context.getProjection(\"continuous-space\");\n\n\t\t// Loop on ring boxes\n\t\tfor(Point2i p: ring) {\n\n\t\t\tfor (Object a1: grid.getObjectsAt(p.getX(), p.getY())) {\n\t\t\t\tfor (Object a2: grid.getObjectsAt(p.getX(), p.getY())) {\n\t\t\t\t\tif(!(a1 instanceof VEColi) || !(a2 instanceof VEColi) || a1.equals(a2)) continue;\n\t\t\t\t\tif( Agent.collided( (VEColi) a1, (VEColi) a2, 0.1) ) {\n\n\t\t\t\t\t\t//Teniendo en cuenta que la bacteria a1 es el centro de coordenadas tiene los puntos A1, B1, C1, D1\n\t\t\t\t\t\tdouble xA1 = - (( (VEColi) a1).getLength())/2; \n\t\t\t\t\t\tdouble yA1 = (( (VEColi) a1).getWidth())/2;\n\t\t\t\t\t\tdouble xB1 = - (( (VEColi) a1).getLength())/2;\n\t\t\t\t\t\tdouble yB1 = - (( (VEColi) a1).getWidth())/2;\n\t\t\t\t\t\tdouble xC1 = (( (VEColi) a1).getLength())/2;\n\t\t\t\t\t\tdouble yC1 = - (( (VEColi) a1).getWidth())/2;\n\t\t\t\t\t\tdouble xD1 = (( (VEColi) a1).getLength())/2;\n\t\t\t\t\t\tdouble yD1 = (( (VEColi) a1).getWidth())/2;\n\n\n\t\t\t\t\t\t//Angulo entre bacteria a1 y bacteria a2\n\t\t\t\t\t\tdouble alpha1 = Math.toRadians(Angle.convheading(((VEColi) a1).getHeading())); //angulo de a1 en radianes\n\t\t\t\t\t\tdouble alpha2 = Math.toRadians(Angle.convheading(((VEColi) a2).getHeading())); //angulo de a2 en radianes\n\t\t\t\t\t\tdouble alpha = alpha1 - alpha2;\n\t\t\t\t\t\t\n\t\t\t\t\t\tNdPoint a1Location = space.getLocation(a1); //Posicion de la celula a1.\n\t\t\t\t\t\tdouble xa1 = a1Location.getX();\n\t\t\t\t\t\tdouble ya1 = a1Location.getY();\n\t\t\t\t\t\tNdPoint a2Location = space.getLocation(a2); //Posicion de la celula a2.\n\t\t\t\t\t\tdouble xa2 = a2Location.getX();\n\t\t\t\t\t\tdouble ya2 = a2Location.getY();\n\n\t\t\t\t\t\t//double xG2 = Math.cos(alpha) * (xa2 - xa1) + Math.sin(alpha) * (ya2 - ya1);\n\t\t\t\t\t\t//Dado que el centro de G1 con el cambio de coordenadas esta en (0,0).\n\t\t\t\t\t\tdouble xG2 = Math.cos(alpha) * xa2 + Math.sin(alpha) * ya2;\n\t\t\t\t\t\tdouble yG2 = -Math.sin(alpha) * xa2 + Math.cos(alpha) * ya2;\n\n\t\t\t\t\t\t// Puntos de la Bacteria a2 A2,B2,C2,D2 teniendo en cuenta que el origen de coordenadas esta en el centro de la Bacteria1.\n\t\t\t\t\t\tdouble xA2 = xG2 - ( ((VEColi) a2).getLength()/2) * Math.cos( alpha ) - ( (( (VEColi) a2).getWidth())/2 * Math.sin( alpha ));\n\t\t\t\t\t\tdouble yA2 = yG2 - ( ((VEColi) a2).getLength()/2) * Math.sin( alpha ) + ( (( (VEColi) a2).getWidth())/2 * Math.cos( alpha ));\n\n\t\t\t\t\t\tdouble xB2 = xG2 - ( ((VEColi) a2).getLength()/2) * Math.cos( alpha ) + ( (( (VEColi) a2).getWidth())/2 * Math.sin( alpha ));\n\t\t\t\t\t\tdouble yB2 = yG2 - ( ((VEColi) a2).getLength()/2) * Math.sin( alpha ) - ( (( (VEColi) a2).getWidth())/2 * Math.cos( alpha ));\n\n\t\t\t\t\t\tdouble xC2 = xG2 + ( ((VEColi) a2).getLength()/2) * Math.cos( alpha ) + ( (( (VEColi) a2).getWidth())/2 * Math.sin( alpha ));\n\t\t\t\t\t\tdouble yC2 = yG2 + ( ((VEColi) a2).getLength()/2) * Math.sin( alpha ) - ( (( (VEColi) a2).getWidth())/2 * Math.cos( alpha ));\n\n\t\t\t\t\t\tdouble xD2 = xG2 + ( ((VEColi) a2).getLength()/2) * Math.cos( alpha ) - ( (( (VEColi) a2).getWidth())/2 * Math.sin( alpha ));\n\t\t\t\t\t\tdouble yD2 = yG2 + ( ((VEColi) a2).getLength()/2) * Math.sin( alpha ) + ( (( (VEColi) a2).getWidth())/2 * Math.cos( alpha ));\n\n\t\t\t\t\t\t//Voy a ver donde se encuentra la bacteria 2 con respecto a la bacteria 1 para poder hacer el cambio.\n\t\t\t\t\t\tboolean cambio = false;\n\t\t\t\t\t\tint caso = 0;\n\t\t\t\t\t\tif( xG2 > 0 && yG2 > 0 && alpha > 0 ){\n\t\t\t\t\t\t\tcambio = false;\n\t\t\t\t\t\t\tcaso = 1;\n\t\t\t\t\t\t}else if( xG2 > 0 && yG2 > 0 && alpha < 0 ) {\n\t\t\t\t\t\t\t//Caso 2. Simetria respecto al EJE X. \n\t\t\t\t\t\t\tyA2 = -yA2;\n\t\t\t\t\t\t\tyB2 = -yB2;\n\t\t\t\t\t\t\tyC2 = -yC2;\n\t\t\t\t\t\t\tyD2 = -yD2;\n\t\t\t\t\t\t\tcambio = true;\n\t\t\t\t\t\t\tcaso = 2; //Me encuentro en el caso2.\n\t\t\t\t\t\t} else if(xG2 < 0 && yG2 > 0 && alpha > 0) {\n\t\t\t\t\t\t\tcambio = false;\n\t\t\t\t\t\t\tcaso = 3;\n\t\t\t\t\t\t}else if( xG2 < 0 && yG2 > 0 && alpha < 0 ) {\n\t\t\t\t\t\t\t//Caso 4. Simetria respecto al EJE Y.\n\t\t\t\t\t\t\txA2 = -xA2;\n\t\t\t\t\t\t\txB2 = -xB2;\n\t\t\t\t\t\t\txC2 = -xC2;\n\t\t\t\t\t\t\txD2 = -xD2;\n\t\t\t\t\t\t\tcambio = true;\n\t\t\t\t\t\t\tcaso = 4; //Me encuentro en el caso4.\n\t\t\t\t\t\t} else if( xG2 < 0 && yG2 < 0 && alpha > 0 ) {\n\t\t\t\t\t\t\t//Caso 5. Simetria respecto al EJE X y al EJE Y.\n\t\t\t\t\t\t\txA2 = -xA2;\n\t\t\t\t\t\t\txB2 = -xB2;\n\t\t\t\t\t\t\txC2 = -xC2;\n\t\t\t\t\t\t\txD2 = -xD2;\n\t\t\t\t\t\t\tyA2 = -yA2;\n\t\t\t\t\t\t\tyB2 = -yB2;\n\t\t\t\t\t\t\tyC2 = -yC2;\n\t\t\t\t\t\t\tyD2 = -yD2;\n\t\t\t\t\t\t\tcambio = true;\n\t\t\t\t\t\t\tcaso = 5;\n\t\t\t\t\t\t} else if( xG2 < 0 && yG2 < 0 && alpha < 0 ) {\n\t\t\t\t\t\t\t//Caso 6. Simetria respecto al EJE X.\n\t\t\t\t\t\t\tyA2 = -yA2;\n\t\t\t\t\t\t\tyB2 = -yB2;\n\t\t\t\t\t\t\tyC2 = -yC2;\n\t\t\t\t\t\t\tyD2 = -yD2;\n\t\t\t\t\t\t\tcambio = true;\n\t\t\t\t\t\t\tcaso = 6; //Me encuentro en el caso5.\n\n\t\t\t\t\t\t} else if( xG2 > 0 && yG2 < 0 && alpha > 0 ){\n\t\t\t\t\t\t\tcambio = false;\n\t\t\t\t\t\t\tcaso = 7;\n\t\t\t\t\t\t} else if( xG2 > 0 && yG2 < 0 && alpha < 0 ) {\n\t\t\t\t\t\t\t//Caso 8. Simetria respecto al EJE Y.\n\t\t\t\t\t\t\txA2 = -xA2;\n\t\t\t\t\t\t\txB2 = -xB2;\n\t\t\t\t\t\t\txC2 = -xC2;\n\t\t\t\t\t\t\txD2 = -xD2;\n\t\t\t\t\t\t\tcambio = true;\n\t\t\t\t\t\t\tcaso = 8; //Me encuentro en el caso8.\n\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\tPoint2D.Double A1 = new Point2D.Double(xA1, yA1);\n\t\t\t\t\t\tPoint2D.Double B1 = new Point2D.Double(xB1, yB1);\n\t\t\t\t\t\tPoint2D.Double C1 = new Point2D.Double(xC1, yC1);\n\t\t\t\t\t\tPoint2D.Double D1 = new Point2D.Double(xD1, yD1);\n\t\t\t\t\t\tPoint2D.Double A2 = new Point2D.Double(xA2, yA2);\n\t\t\t\t\t\tPoint2D.Double B2 = new Point2D.Double(xB2, yB2);\n\t\t\t\t\t\tPoint2D.Double C2 = new Point2D.Double(xC2, yC2);\n\t\t\t\t\t\tPoint2D.Double D2 = new Point2D.Double(xD2, yD2);\n\n\n\t\t\t\t\t\tPoint2D.Double P = interseccion(A1,D1,A2,B2);\n\t\t\t\t\t\tPoint2D.Double Q = interseccion(A1,D1,B2,C2);\n\t\t\t\t\t\tPoint2D.Double R = interseccion(C1,D1,B2,C2);\n\t\t\t\t\t\tPoint2D.Double S = interseccion(C1,D1,A2,B2);\n\t\t\t\t\t\tPoint2D.Double T = interseccion(A1,B1,A2,B2);\n\t\t\t\t\t\tPoint2D.Double U = interseccion(A1,B1,B2,C2);\n\t\t\t\t\t\tPoint2D.Double V = interseccion(A1,D1,A2,D2);\n\t\t\t\t\t\tPoint2D.Double W = interseccion(A1,B1,A2,D2);\n\t\t\t\t\t\tPoint2D.Double X = interseccion(B1,C1,A2,B2);\n\t\t\t\t\t\tPoint2D.Double Y = interseccion(B1,C1,B2,C2);\n\t\t\t\t\t\tPoint2D.Double Z = interseccion(C1,D1,A2,D2);\n\t\t\t\t\t\tPoint2D.Double N = interseccion(B1,C1,A2,D2);\n\n\n\t\t\t\t\t\tdouble solapamiento = 0.01 ;\n\t\t\t\t\t\tPoint2D.Double baricentro = new Point2D.Double(0,0);\n\n\t\t\t\t\t\tif( yA2>yA1 && yB1<yB2 && yB2<yA1) {\n\t\t\t\t\t\t\tif( P.getX() < xA1) {\n\t\t\t\t\t\t\t\tif(xB2 < xA1) {\n\t\t\t\t\t\t\t\t\t//*** Caso 1 ***\n\t\t\t\t\t\t\t\t\t//Calculo el area de UA1Q\n\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + calculateArea(U,A1,Q);\n\t\t\t\t\t\t\t\t\t//Calculo el baricentro\n\t\t\t\t\t\t\t\t\tbaricentro = getBar(U,A1,Q);\n\t\t\t\t\t\t\t\t} else if(xB2 > xA1) {\n\t\t\t\t\t\t\t\t\t//*** Caso 2 ***\n\t\t\t\t\t\t\t\t\t//Calculo el area de TA1B2 + A1QB2\n\t\t\t\t\t\t\t\t\tdouble areaTA1B2 = calculateArea(T,A1,B2);\n\t\t\t\t\t\t\t\t\tdouble areaA1QB2 = calculateArea(A1,Q,B2);\n\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaTA1B2 + areaA1QB2;\n\t\t\t\t\t\t\t\t\t//Calculo el baricentro\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(T,A1,B2);\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(A1,Q,B2);\n\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX() + bar2.getX()))/solapamiento, (solapamiento * (bar1.getY() + bar2.getY()))/solapamiento);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(P.getX() > xA1) {\n\t\t\t\t\t\t\t\tif(xB2 > xD1) {\n\t\t\t\t\t\t\t\t\t//*** Caso 3 ***\n\t\t\t\t\t\t\t\t\t//Calculo el area de PD1S\n\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + calculateArea(P,D1,S);\n\t\t\t\t\t\t\t\t\t//Calculo el baricentro\n\t\t\t\t\t\t\t\t\tbaricentro = getBar(P,D1,S);\n\t\t\t\t\t\t\t\t} else if(xB2 < xD1) {\n\t\t\t\t\t\t\t\t\tif( Q.getX() < xD1 ) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 4 ***\n\t\t\t\t\t\t\t\t\t\t//Calculo el area de PB2Q\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + calculateArea(P,B2,Q);\n\t\t\t\t\t\t\t\t\t\t//Calculo el baricentro\n\t\t\t\t\t\t\t\t\t\tbaricentro = getBar(P,B2,Q);\n\t\t\t\t\t\t\t\t\t} else if( Q.getX() > xD1 ) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 5 ***\n\t\t\t\t\t\t\t\t\t\t//Calculo el area de PB2D1 y B2RD1\n\t\t\t\t\t\t\t\t\t\tdouble areaPB2D1 = solapamiento + calculateArea(P,B2,D1);\n\t\t\t\t\t\t\t\t\t\tdouble areaB2RD1 = solapamiento + calculateArea(B2,R,D1);\n\t\t\t\t\t\t\t\t\t\tsolapamiento = areaPB2D1 + areaB2RD1;\n\t\t\t\t\t\t\t\t\t\t//Calculo el baricentro\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(P,B2,D1);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(B2,R,D1);\n\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX() + bar2.getX()))/solapamiento, (solapamiento * (bar1.getY() + bar2.getY()))/solapamiento);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if( yB1<yA2 && yA2 < yA1 && yB1<yB2 && yB2<yA1 ){\n\t\t\t\t\t\t\tif(xC1 > xB2) {\n\t\t\t\t\t\t\t\tif(xA2<xA1) {\n\t\t\t\t\t\t\t\t\t//*** Caso 6 ***\n\t\t\t\t\t\t\t\t\t//Calcular el area de TWV + TVB2 + VB2Q\n\t\t\t\t\t\t\t\t\tdouble areaTWV = calculateArea(T,W,V);\n\t\t\t\t\t\t\t\t\tdouble areaTVB2 = calculateArea(T,V,B2);\n\t\t\t\t\t\t\t\t\tdouble areaVB2Q = calculateArea(V,B2,Q);\n\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaTWV + areaTVB2 + areaVB2Q;\n\t\t\t\t\t\t\t\t\t//Calculo el baricentro\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(T,W,V);\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(T,V,B2);\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(V,B2,Q);\n\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()))/solapamiento);\n\t\t\t\t\t\t\t\t} else if(xA2>xA1) {\n\t\t\t\t\t\t\t\t\tif(Q.getX() < xD1) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 7 ***\n\t\t\t\t\t\t\t\t\t\t//Calcular el area de A2VB2 + VB2Q\n\t\t\t\t\t\t\t\t\t\tdouble areaA2VB2 = calculateArea(A2,V,B2);\n\t\t\t\t\t\t\t\t\t\tdouble areaVB2Q = calculateArea(V,B2,Q);\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaA2VB2 + areaVB2Q;\n\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(A2,V,B2);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(V,B2,Q);\n\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX() + bar2.getX()))/solapamiento, (solapamiento * (bar1.getY() + bar2.getY()))/solapamiento);\n\t\t\t\t\t\t\t\t\t} else if(Q.getX() > xD1) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 8 ***\n\t\t\t\t\t\t\t\t\t\t//Calcular el area de VA2B2 + B2VD1 + D1RB2\n\t\t\t\t\t\t\t\t\t\tdouble areaVA2B2 = calculateArea(V,A2,B2);\n\t\t\t\t\t\t\t\t\t\tdouble areaB2VD1 = calculateArea(B2,V,D1);\n\t\t\t\t\t\t\t\t\t\tdouble areaD1RB2 = calculateArea(D1,R,B2);\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaVA2B2 + areaB2VD1 + areaD1RB2;\n\n\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(V,A2,B2);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(B2,V,D1);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(D1,R,B2);\n\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()))/solapamiento);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(xC1 < xB2) {\n\t\t\t\t\t\t\t\tif( V.getX() < xD1 ) {\n\t\t\t\t\t\t\t\t\t//*** Caso 9 ***\n\t\t\t\t\t\t\t\t\t//Calcular el area de A2VD1 + A2SD1\n\t\t\t\t\t\t\t\t\tdouble areaA2VD1 = calculateArea(A2,V,D1);\n\t\t\t\t\t\t\t\t\tdouble areaA2SD1 = calculateArea(A2,S,D1);\n\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaA2VD1 + areaA2SD1;\n\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(A2,V,D1);\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(A2,S,D1);\n\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX() + bar2.getX()))/solapamiento, (solapamiento * (bar1.getY() + bar2.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t} else if( V.getX() > xD1 ) {\n\t\t\t\t\t\t\t\t\t//*** Caso 10 ***\n\t\t\t\t\t\t\t\t\t//Calcular el area de ZA2S\n\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + calculateArea(Z,A2,S);\n\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\tbaricentro = getBar(Z,A2,S);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if( yB1<yA2 && yA2<yA1 && yB2<yB1) {\n\t\t\t\t\t\t\tif(xA2 > xA1) {\n\t\t\t\t\t\t\t\tif(Y.getX()<xC1) {\n\t\t\t\t\t\t\t\t\tif(Q.getX() < xD1) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 11 ***\n\t\t\t\t\t\t\t\t\t\t//Calcular el area de XA2V + XVQ + XYQ\n\t\t\t\t\t\t\t\t\t\tdouble areaXA2V = calculateArea(X,A2,V);\n\t\t\t\t\t\t\t\t\t\tdouble areaXVQ = calculateArea(X,V,Q);\n\t\t\t\t\t\t\t\t\t\tdouble areaXYQ = calculateArea(X,Y,Q);\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaXA2V + areaXVQ + areaXYQ;\n\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(X,A2,V);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(X,V,Q);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(X,Y,Q);\n\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t\t} else if(Q.getX() > xD1) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 12 ***\n\t\t\t\t\t\t\t\t\t\t//Calcular el area de A2XV + XVY + VD1Y + YD1R\n\t\t\t\t\t\t\t\t\t\tdouble areaA2XV = calculateArea(A2,X,V);\n\t\t\t\t\t\t\t\t\t\tdouble areaXVY = calculateArea(X,V,Y);\n\t\t\t\t\t\t\t\t\t\tdouble areaVD1Y = calculateArea(V,D1,Y);\n\t\t\t\t\t\t\t\t\t\tdouble areaYD1R = calculateArea(Y,D1,R);\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaA2XV + areaXVY + areaVD1Y + areaYD1R;\n\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(A2,X,V);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(X,V,Y);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(V,D1,Y);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar4 = getBar(Y,D1,R);\n\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()+bar4.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()+bar4.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if(Y.getX()>xC1) {\n\t\t\t\t\t\t\t\t\tif(X.getX() < xC1) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 13***\n\t\t\t\t\t\t\t\t\t\t//Calcular el area de VA2X + VXD1 + D1XC1\n\t\t\t\t\t\t\t\t\t\tdouble areaVA2X = calculateArea(V,A2,X);\n\t\t\t\t\t\t\t\t\t\tdouble areaVXD1 = calculateArea(V,X,D1);\n\t\t\t\t\t\t\t\t\t\tdouble areaD1XC1 = calculateArea(D1,X,C1);\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaVA2X + areaVXD1 + areaD1XC1;\n\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(V,A2,X);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(V,X,D1);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(D1,X,C1);\n\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t\t} else if(X.getX() > xC1) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 10 ***\n\t\t\t\t\t\t\t\t\t\t//Calcular el area de ZA2S\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + calculateArea(Z,A2,S);\n\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\tbaricentro = getBar(Z,A2,S);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(xA2 < xA1) {\n\t\t\t\t\t\t\t\tif(X.getX() < xB1) {\n\t\t\t\t\t\t\t\t\t//*** Caso 14 ***\n\t\t\t\t\t\t\t\t\t//Calcular el area de VWB1 + B1VY + VYQ\n\t\t\t\t\t\t\t\t\tdouble areaVWB1 = calculateArea(V,W,B1);\n\t\t\t\t\t\t\t\t\tdouble areaB1VY = calculateArea(B1,V,Y);\n\t\t\t\t\t\t\t\t\tdouble areaVYQ = calculateArea(V,Y,Q);\n\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaVWB1 + areaB1VY + areaVYQ;\n\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(V,W,B1);\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(B1,V,Y);\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(V,Y,Q);\n\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()))/solapamiento);\n\n\n\t\t\t\t\t\t\t\t} else if (X.getX() > xB1) {\n\t\t\t\t\t\t\t\t\tif(V.getX() < xA1) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 15 ***\n\t\t\t\t\t\t\t\t\t\t//Calcular el area de TA1Q + TQX + QXY\n\t\t\t\t\t\t\t\t\t\tdouble areaTA1Q = calculateArea(T,A1,Q);\n\t\t\t\t\t\t\t\t\t\tdouble areaTQX = calculateArea(T,Q,X);\n\t\t\t\t\t\t\t\t\t\tdouble areaQXY = calculateArea(Q,X,Y);\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaTA1Q + areaTQX + areaQXY;\n\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(T,A1,Q);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(T,Q,X);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(Q,X,Y);\n\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t\t} else if( V.getX() > xA1 ) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 16 ***\n\t\t\t\t\t\t\t\t\t\t//Calcular el area de XA2V + XVQ + XYQ\n\t\t\t\t\t\t\t\t\t\tdouble areaXA2V = calculateArea(X,A2,V);\n\t\t\t\t\t\t\t\t\t\tdouble areaXVQ = calculateArea(X,V,Q);\n\t\t\t\t\t\t\t\t\t\tdouble areaXYQ = calculateArea(X,Y,Q);\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaXA2V + areaXVQ + areaXYQ;\n\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(X,A2,V);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(X,V,Q);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(X,Y,Q);\n\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if( yA2<yB1 && yB2<yB1) {\n\t\t\t\t\t\t\tif(Y.getX() > xC1) {\n\t\t\t\t\t\t\t\t//*** Caso 17 ***\n\t\t\t\t\t\t\t\t//Calcular el area de NC1V + VC1D1\n\t\t\t\t\t\t\t\tdouble areaNC1V = calculateArea(N,C1,V);\n\t\t\t\t\t\t\t\tdouble areaVC1D1 = calculateArea(V,C1,D1);\n\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaNC1V + areaVC1D1; \n\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(N,C1,V);\n\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(V,C1,D1);\n\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX() + bar2.getX()))/solapamiento, (solapamiento * (bar1.getY() + bar2.getY()))/solapamiento);\n\n\n\t\t\t\t\t\t\t} else if(Y.getX() < xC1) {\n\t\t\t\t\t\t\t\tif(Q.getX() > xD1) {\n\t\t\t\t\t\t\t\t\t//*** Caso 18 ***\n\t\t\t\t\t\t\t\t\t//Calcular el area de NVR + NRY + VD1R\n\t\t\t\t\t\t\t\t\tdouble areaNVR = calculateArea(N,V,R);\n\t\t\t\t\t\t\t\t\tdouble areaNRY = calculateArea(N,R,Y);\n\t\t\t\t\t\t\t\t\tdouble areaVD1R = calculateArea(V,D1,R);\n\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaNVR + areaNRY + areaVD1R;\n\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(N,V,R);\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(N,R,Y);\n\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(V,D1,R);\n\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t} else if(Q.getX() < xD1) {\n\t\t\t\t\t\t\t\t\tif(xA2 < xB1) {\n\t\t\t\t\t\t\t\t\t\t//*** Caso 19 ***\n\t\t\t\t\t\t\t\t\t\t//Calcular el area de NVY + VYQ\n\t\t\t\t\t\t\t\t\t\tdouble areaNVY = calculateArea(N,V,Y);\n\t\t\t\t\t\t\t\t\t\tdouble areaVYQ = calculateArea(V,Y,Q);\n\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaNVY + areaVYQ;\n\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro \n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(N,V,Y);\n\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(V,Y,Q);\n\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX() + bar2.getX()))/solapamiento, (solapamiento * (bar1.getY() + bar2.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t\t} else if(xA2 > xB1) {\n\t\t\t\t\t\t\t\t\t\tif(V.getX() > xA1) {\n\t\t\t\t\t\t\t\t\t\t\t//*** Caso 20 ***\n\t\t\t\t\t\t\t\t\t\t\t//Calcular WB1Y + WVY + VYQ\n\t\t\t\t\t\t\t\t\t\t\tdouble areaWB1Y = calculateArea(W,B1,Y);\n\t\t\t\t\t\t\t\t\t\t\tdouble areaWVY = calculateArea(W,V,Y);\n\t\t\t\t\t\t\t\t\t\t\tdouble areaVYQ = calculateArea(Y,V,Q);\n\t\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaWB1Y + areaWVY + areaVYQ;\n\t\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(W,B1,Y);\n\t\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(W,V,Y);\n\t\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar3 = getBar(Y,V,Q);\n\t\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX()+bar2.getX()+bar3.getX()))/solapamiento, (solapamiento * (bar1.getY()+bar2.getY()+bar3.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t\t\t} else if(V.getX() < xA1) {\n\t\t\t\t\t\t\t\t\t\t\t//*** Caso 21 ***\n\t\t\t\t\t\t\t\t\t\t\t//Calcular el area de A1YB1 + A1YQ\n\t\t\t\t\t\t\t\t\t\t\tdouble areaA1YB1 = calculateArea(A1,Y,B1);\n\t\t\t\t\t\t\t\t\t\t\tdouble areaA1YQ = calculateArea(A1,Y,Q);\n\t\t\t\t\t\t\t\t\t\t\tsolapamiento = solapamiento + areaA1YB1 + areaA1YQ;\n\t\t\t\t\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(A1,Y,B1);\n\t\t\t\t\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(A1,Y,Q);\n\t\t\t\t\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX() + bar2.getX()))/solapamiento, (solapamiento * (bar1.getY() + bar2.getY()))/solapamiento);\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if(yA2 < yA1 && yB2 < yB1 && Y.getX() > xC1 && V.getX() > xD1) {\n\t\t\t\t\t\t\t//*** Caso 22 ***\n\t\t\t\t\t\t\t//Calcular el area de XA2Z + XC1Z\n\t\t\t\t\t\t\tdouble areaXA2Z = calculateArea(X,A2,Z);\n\t\t\t\t\t\t\tdouble areaXC1Z = calculateArea(X,C1,Z);\n\t\t\t\t\t\t\tsolapamiento = solapamiento + areaXA2Z + areaXC1Z;\n\t\t\t\t\t\t\t//Calcular el baricentro\n\t\t\t\t\t\t\tPoint2D.Double bar1 = getBar(X,A2,Z);\n\t\t\t\t\t\t\tPoint2D.Double bar2 = getBar(X,C1,Z);\n\t\t\t\t\t\t\tbaricentro.setLocation((solapamiento * (bar1.getX() + bar2.getX()))/solapamiento, (solapamiento * (bar1.getY() + bar2.getY()))/solapamiento);\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tdouble m1 = ((VEColi) a1).getMass();\n\t\t\t\t\t\tdouble m2 = ((VEColi) a2).getMass();\n\t\t\t\t\t\tdouble ba1 = ((VEColi) a1).getLength();\n\t\t\t\t\t\tdouble ha1 = ((VEColi) a1).getWidth();\n\t\t\t\t\t\tdouble lambdaG = 0.01;\n\t\t\t\t\t\tdouble lambdaD = 0.005; //0.025\n\t\t\t\t\t\tdouble k1 = (m2/m1)*lambdaD;\n\t\t\t\t\t\tdouble k2 = ( m2/m1 ) * (1/ (Math.pow(ba1, 2) + Math.pow(ha1, 2)))*lambdaG;\n\n\t\t\t\t\t\tdouble D = k1 * Math.sqrt(solapamiento);\n\t\t\t\t\t\tdouble G = k2 * solapamiento;\n\n\t\t\t\t\t\tdouble newHeading = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/**Estudio los casos en los que he hecho un movimiento simetrico anteriormente\n\t\t\t\t\t\tpara ver como será el giro del angulo con el nuevo posicionamiento.**/\n\t\t\t\t\t\tif(cambio) {\n\t\t\t\t\t\t\tif(caso == 2) {\n\t\t\t\t\t\t\t\tif(baricentro.getX() * baricentro.getY() > 0 ){\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() - G;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if(caso == 4) {\n\t\t\t\t\t\t\t\tif(baricentro.getX() * baricentro.getY() > 0 ){\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() + G;\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() - G;\n\n\t\t\t\t\t\t\t} else if(caso == 5) {\n\t\t\t\t\t\t\t\tif(baricentro.getX() * baricentro.getY() > 0){\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() - G;\n\t\t\t\t\t\t\t\t} else \n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() + G;\n\t\t\t\t\t\t\t} else if(caso == 6) {\n\t\t\t\t\t\t\t\tif(baricentro.getX() * baricentro.getY() > 0)\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() - G;\n\t\t\t\t\t\t\t} else if(caso == 8) {\n\t\t\t\t\t\t\t\tif(baricentro.getX() * baricentro.getY() > 0)\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() - G;\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() + G;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(caso == 1) {\n\t\t\t\t\t\t\t\tif(baricentro.getX() * baricentro.getY() > 0 ){\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() - G;\n\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() + G;\n\n\t\t\t\t\t\t\t} else if(caso == 3){\n\t\t\t\t\t\t\t\tif(baricentro.getX() * baricentro.getY() < 0 )\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() + G;\n\t\t\t\t\t\t\t} else if(caso == 7) {\n\t\t\t\t\t\t\t\tif(baricentro.getX() * baricentro.getY() < 0 )\n\t\t\t\t\t\t\t\t\tnewHeading = ((VEColi) a1).getHeading() - G;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t/*Movimiento lo consideramos descomponiendolo en dos partes\n\t\t\t\t\t\t * \t1.Un desplazamiento de la bacteria en la direccion que une el centro de gravedad de las dos bacterias.\n\t\t\t\t\t\t * \t2.Un giro que se determina segun la geometria del sistema.\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\t//Giro la bacteria.\n\t\t\t\t\t\t((VEColi) a1).setHeading( ((VEColi) a1).getHeading() + newHeading );\n\t\t\t\t\t\t//Lo movemos en la direccion del vector que va del centro de la bacteria 2 a la bacteria 1.\n\t\t\t\t\t\t//Desplazo la bacteria.\n\t\t\t\t\t\t\n\t\t\t\t\t\tdouble t = Math.sqrt(Math.pow(xG2, 2) + Math.pow(yG2,2));\n\t\t\t\t\t\tif(t != 0) {\n\t\t\t\t\t\t\txG2 = xG2 /t;\n\t\t\t\t\t\t\tyG2 = yG2 /t;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tspace.moveTo(((VEColi) a1), space.getLocation(((VEColi) a1)).getX() + xG2*D, space.getLocation(((VEColi) a1)).getY() + yG2*D,0); \n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"void addEdge(SimpleVertex vertexOne, SimpleVertex vertexTwo, int weight) {\n\n\t\tSimpleEdge edge = new SimpleEdge(vertexOne, vertexTwo);\n\t\tedge.weight = weight;\n\t\t// edgeList.add(edge);\n\t\t// System.out.println(edge);\n\t\tvertexOne.neighborhood.add(edge);\n\n\t}",
"public interface Edge<NodeType extends Comparable<NodeType>,\n WeightType extends Comparable<WeightType>> \n\textends Comparable<Edge<NodeType,WeightType>> {\n\n\t/**\n\t * @return The description of the edge.\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * @param desc The description of the edge.\n\t */\n\tpublic void setDescription(String desc);\n\n\t/**\n\t * @return The source node of this edge.\n\t */\n\tpublic NodeType getSourceNode();\n\n\t/**\n\t * @return The target node of this edge.\n\t */\n\tpublic NodeType getTargetNode();\n\n\t/**\n\t * @return The weight of this edge.\n\t */\n\tpublic WeightType getWeight();\n}",
"public Edge(int w, int s, int e) {\n\t\tweight = w;\n\t\tstartVertex = s;\n\t\tendVertex = e;\n\t}",
"@Override\n\tpublic Squarelotron mainDiagonalFlip(int ring) {\n\t\tint[] array = numbers();\n\t\t//converts the array into a new Squarelotron\n\t\tSquarelotron copySquarelotron = makeSquarelotron(array);\n\t\tint[][] newSquarelotron = copySquarelotron.squarelotron;\n\t\t//finds length of squarelotron and takes the square root\n\t\tint length = array.length;\n\t\tdouble sqrtLength = Math.sqrt(length);\n\t\tint size =(int) sqrtLength;\n\t\t//loops through and flips along the main diagonal\n\t\tfor(int i = ring; i <= (size-ring); i++){\n\t\t\tint numberRt = newSquarelotron[ring-1][i];\n\t\t\tnewSquarelotron[ring-1][i] = newSquarelotron[i][ring-1];\n\t\t\tnewSquarelotron[i][ring-1]=numberRt;\n\t\t\tint numberLft = newSquarelotron[i][size-ring];\n\t\t\tnewSquarelotron[i][size-ring]= newSquarelotron[size-ring][i];\n\t\t\tnewSquarelotron[size-ring][i]=numberLft;\n\t\t}\n\t\tcopySquarelotron.squarelotron = newSquarelotron;\n\t\treturn copySquarelotron;\n\t}",
"public void neighhbors(Village vertex) {\n\t\tIterable<Edge> neighbors = g.getNeighbors(vertex);\n\t\tSystem.out.println(\"------------\");\n\t\tSystem.out.println(\"vertex: \" + vertex.getName());\n\t\tfor(Edge e : neighbors) {\n\t\t\tSystem.out.println(\"edge: \" + e.getName());\n\t\t\tSystem.out.println(\"transit: \" + e.getTransit() + \" color: \" + e.getColor());\n\t\t}\n\t}",
"private LinkedList<Cell> findAugmentedPath(int row, LinkedList<Cell> head){\n LinkedList<Cell> resultPoints = new LinkedList<>();\n for (int j = 0; j < cols; j++) {\n if(j != chosenInRow[row] && source[row][j] == 0) {\n int chosenRowForJ = chosenInCol[j];\n\n if(head.contains(new Cell(chosenRowForJ, j)))\n continue;\n\n resultPoints.add(new Cell(row, j));\n if(chosenRowForJ < 0)\n return resultPoints;\n\n resultPoints.add(new Cell(chosenRowForJ, j));\n head.addAll(resultPoints);\n\n LinkedList<Cell> tail = findAugmentedPath(chosenRowForJ, head);\n if(tail.isEmpty()) {\n resultPoints.remove(resultPoints.getLast());\n resultPoints.remove(resultPoints.getLast());\n continue;\n }\n resultPoints.addAll(tail);\n return resultPoints;\n }\n }\n return resultPoints;\n }",
"public void fillAdjacencyMap(ColEdge[] edges) {\n for (ColEdge edge : edges) {\n edgeMake(edge.u - 1, edge.v - 1);\n }\n\n }",
"public EdgesRecord() {\n super(Edges.EDGES);\n }",
"public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }",
"private static native long createStructuredEdgeDetection_0(String model, long howToGetFeatures_nativeObj);",
"private double[] getNeighbors(double[] row) {\n\n double[] neighbors = {0};\n return neighbors;\n }",
"public void addEdge(int v, int w)\n { \n adj[v].add(w);\n adj[w].add(v);\n }"
] | [
"0.51621413",
"0.5121186",
"0.50913644",
"0.50900203",
"0.5009268",
"0.49927512",
"0.49796632",
"0.49270245",
"0.49202362",
"0.49171767",
"0.49167398",
"0.48032606",
"0.478707",
"0.4779425",
"0.47648638",
"0.4735723",
"0.4674462",
"0.46732274",
"0.4666861",
"0.46635005",
"0.4644964",
"0.4641466",
"0.46413177",
"0.46405002",
"0.46402976",
"0.46266657",
"0.46241978",
"0.46102715",
"0.46021053",
"0.4601554",
"0.45856583",
"0.45622438",
"0.45583215",
"0.45531043",
"0.45510262",
"0.45464677",
"0.45412433",
"0.45392656",
"0.45257628",
"0.4524451",
"0.45225027",
"0.45180312",
"0.45109394",
"0.4506645",
"0.45047683",
"0.44912598",
"0.44886738",
"0.44860235",
"0.44662923",
"0.44643575",
"0.44631687",
"0.4456553",
"0.44547048",
"0.44534865",
"0.44526514",
"0.44526514",
"0.44491926",
"0.44488195",
"0.4445153",
"0.44445634",
"0.4441148",
"0.44344294",
"0.4431808",
"0.44311967",
"0.4427032",
"0.44226944",
"0.44165444",
"0.44154963",
"0.44154233",
"0.441293",
"0.44083416",
"0.4401948",
"0.4395609",
"0.4390182",
"0.43899837",
"0.43810144",
"0.4374014",
"0.43724984",
"0.43719408",
"0.43701482",
"0.43695033",
"0.4360453",
"0.43544444",
"0.43509674",
"0.4350787",
"0.43496686",
"0.43476757",
"0.4346934",
"0.43435687",
"0.43360493",
"0.4333958",
"0.43297303",
"0.4328812",
"0.43279058",
"0.43277165",
"0.43250063",
"0.4323821",
"0.43210414",
"0.4310021",
"0.43034452"
] | 0.5427724 | 0 |
The next edge depends on which side of this edge (left or right) the face belongs to. If the face is on the left side of this edge, we travel to the left edge, and visa versa. However if this is an auxiliary edge (face is both left and right of the edge), then travel to the next edge which does not cause us to backtrack. | protected int nextEdgeId(int faceId, int prevEdgeId, int curEdgeId, VPFPrimitiveData.PrimitiveInfo[] edgeInfoArray)
{
Orientation o = this.getOrientation(faceId, curEdgeId, edgeInfoArray);
if (o == null)
{
return -1;
}
switch (o)
{
case LEFT:
return getEdgeInfo(edgeInfoArray, curEdgeId).getLeftEdge();
case RIGHT:
return getEdgeInfo(edgeInfoArray, curEdgeId).getRightEdge();
case LEFT_AND_RIGHT:
return (prevEdgeId > 0) ? this.auxiliaryNextEdgeId(prevEdgeId, curEdgeId, edgeInfoArray) : -1;
default:
return -1;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int nextcwedge(int edge, int face) {\n switch (edge) {\n case LB:\n return (face == L) ? LF : BN;\n case LT:\n return (face == L) ? LN : TF;\n case LN:\n return (face == L) ? LB : TN;\n case LF:\n return (face == L) ? LT : BF;\n case RB:\n return (face == R) ? RN : BF;\n case RT:\n return (face == R) ? RF : TN;\n case RN:\n return (face == R) ? RT : BN;\n case RF:\n return (face == R) ? RB : TF;\n case BN:\n return (face == B) ? RB : LN;\n case BF:\n return (face == B) ? LB : RF;\n case TN:\n return (face == T) ? LT : RN;\n case TF:\n return (face == T) ? RT : LF;\n }\n System.err.println(\"nextcwedge: should not be here...\");\n return 0;\n }",
"int otherface(int edge, int face) {\n int other = leftface[edge];\n return face == other ? rightface[edge] : other;\n }",
"private void firstFaceEdge_fromBottomFace(int pos) {\n Algorithm algo = new Algorithm();\n Log.d(tag, \"Edge piece from bottom face\");\n\n /**\n * Piece is not aligned yet.\n * Rotate bottom face\n * */\n if (pos != EDGE_BOTTOM_NEAR) {\n Direction dir = pos == EDGE_BOTTOM_LEFT ?\n Direction.COUNTER_CLOCKWISE : Direction.CLOCKWISE;\n Rotation rot = new Rotation(Axis.Y_AXIS, dir, INNER);\n algo.addStep(rot);\n if (pos == EDGE_BOTTOM_FAR) {\n algo.addStep(rot);\n }\n }\n // Front face twice\n Rotation rot = new Rotation(Axis.Z_AXIS, Direction.COUNTER_CLOCKWISE, OUTER);\n algo.addStep(rot);\n algo.addStep(rot);\n setAlgo(algo);\n }",
"public void followEdge(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge to \" + e + \" not exist.\");\r\n\t}",
"public E getPrevEdge()\r\n/* */ {\r\n/* 178 */ return (E)this.prevEdge;\r\n/* */ }",
"static int getNextFace(int face, R2Vector exit, int axis, S2Point n, int targetFace) {\n // We return the face that is adjacent to the exit point along the given\n // axis. If line AB exits *exactly* through a corner of the face, there are\n // two possible next faces. If one is the \"target face\" containing B, then\n // we guarantee that we advance to that face directly.\n //\n // The three conditions below check that (1) AB exits approximately through\n // a corner, (2) the adjacent face along the non-exit axis is the target\n // face, and (3) AB exits *exactly* through the corner. (The sumEquals()\n // code checks whether the dot product of (u,v,1) and \"n\" is exactly zero.)\n if (Math.abs(exit.get(1 - axis)) == 1\n && S2Projections.getUVWFace(face, 1 - axis, exit.get(1 - axis) > 0 ? 1 : 0) == targetFace\n && sumEquals(exit.x * n.x, exit.y * n.y, -n.z)) {\n return targetFace;\n }\n\n // Otherwise return the face that is adjacent to the exit point in the\n // direction of the exit axis.\n return S2Projections.getUVWFace(face, axis, exit.get(axis) > 0 ? 1 : 0);\n }",
"void transitionToNextEdge(double residualMove) {\n\n\t\t// update the counter for where the index on the path is\n\t\tindexOnPath += pathDirection;\n\n\t\t// check to make sure the Agent has not reached the end of the path already\n\t\t// depends on where you're going!\n\t\tif ((pathDirection > 0 && indexOnPath >= path.size()) || (pathDirection < 0 && indexOnPath < 0)) {\n\t\t\treachedDestination = true;\n\t\t\tindexOnPath -= pathDirection; // make sure index is correct\n\t\t\treturn;\n\t\t}\n\n\t\t// move to the next edge in the path\n\t\tEdgeGraph edge = (EdgeGraph) path.get(indexOnPath).getEdge();\n\t\tsetupEdge(edge);\n\t\tspeed = progress(residualMove);\n\t\tcurrentIndex += speed;\n\n\t\t// check to see if the progress has taken the current index beyond its goal\n\t\t// given the direction of movement. If so, proceed to the next edge\n\t\tif (linkDirection == 1 && currentIndex > endIndex) transitionToNextEdge(currentIndex - endIndex);\n\t\telse if (linkDirection == -1 && currentIndex < startIndex) transitionToNextEdge(startIndex - currentIndex);\n\t}",
"public void followEdgeInReverse(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge from \" + e + \" does not exist.\");\r\n\t}",
"private void firstFaceEdge_fromLowerLayer(int pos) {\n Log.d(tag, \"Edge piece from lower layer\");\n Algorithm algorithm = new Algorithm();\n\n // the white should be on one of the sides, not front or back\n if (pos == EDGE_BOTTOM_NEAR || pos == EDGE_BOTTOM_FAR) {\n algorithm.addStep(Axis.Y_AXIS, Direction.CLOCKWISE, INNER);\n }\n\n if (pos <= EDGE_BOTTOM_LEFT) {\n algorithm.addStep(Axis.X_AXIS, Direction.CLOCKWISE, INNER);\n algorithm.addStep(Axis.Z_AXIS, Direction.CLOCKWISE, OUTER);\n if (mTopSquares.get(EDGE_TOP_LEFT).getColor() == mTopColor &&\n mLeftSquares.get(FIRST_ROW_CENTER).getColor() ==\n mLeftSquares.get(CENTER).getColor()) {\n algorithm.addStep(Axis.X_AXIS, Direction.COUNTER_CLOCKWISE, INNER);\n }\n } else {\n algorithm.addStep(Axis.X_AXIS, Direction.CLOCKWISE, OUTER);\n algorithm.addStep(Axis.Z_AXIS, Direction.COUNTER_CLOCKWISE, OUTER);\n if (mTopSquares.get(EDGE_TOP_RIGHT).getColor() == mTopColor &&\n mRightSquares.get(FIRST_ROW_CENTER).getColor() ==\n mRightSquares.get(CENTER).getColor()) {\n\n algorithm.addStep(Axis.X_AXIS, Direction.COUNTER_CLOCKWISE, OUTER);\n }\n }\n setAlgo(algorithm);\n }",
"public Vertex moveDown() {\n for (Edge e : current.outEdges) {\n move(e.to.y == current.y + 1, e);\n }\n return current;\n }",
"private Direction followLeftWall(View v) {\n\t\t//try to find the left wall again at the turning wall corner\n\t\tif(!hasLeftWall(v)){\n\t\t\tturnLeft(v);\n\t\t}\n\t\t//if blocked, see if there is a way to the left. If there is, turn left. Otherwise, turn clockwise.\n\t\twhile(isBlocked(v)){\n\t\t\tif(!hasLeftWall(v)){\n\t\t\t\tturnLeft(v);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tturnClockwise();\n\t\t\t}\n\t\t}\n\t\t//if the square has been visited before and the facing direction was the exit direction,\n\t\t//try a different exit direction.\n\t\tSquare toBeRemoved = null;\n\t\tfor(Square s: visited){\n\t\t\tif(s.equals(current) && (facingDirection == s.getExit())){\n\t\t\t\ttoBeRemoved = s;\n\t\t\t\tturnClockwise();\n\t\t\t\tcaliberated = false; //now we should recaliberate after turning to a new direction.\n\t\t\t}\n\t\t}\n\t\tvisited.remove(toBeRemoved);\n\t\tmemorization(facingDirection);\n\t\treturn facingDirection;\n\t}",
"private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }",
"private Side nextSide(final Cell cell, final Side prev) {\n return secondSide(cell, prev);\n }",
"protected void nextDirection()\n {\n if (this.lastKeyDirection == Canvas.LEFT)\n {\n this.lastKeyDirection = keyDirection = Canvas.RIGHT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n else if (this.lastKeyDirection == Canvas.RIGHT)\n {\n this.lastKeyDirection = keyDirection = Canvas.LEFT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n }",
"private void splitEdgeDetection() {\n\t\tif(!currentlyDetecting)\n {\n detectRisingEdge();\n }else{//if currentlyDetecting is true, then we are looking for a falling edge\n detectFallingEdge();\n }\n\t}",
"private void faceBackwards(){\n\t\tturnLeft();\n\t\tturnLeft();\n\t}",
"boolean reachedEdge() {\n\t\treturn this.x > parent.width - 30;// screen width including the size of\n\t\t\t\t\t\t\t\t\t\t\t// the image\n\t}",
"public Integer next() {\n int next = fringe.pop();\n List list = neighbors(next);\n for(Object a : list){\n currentInDegree[(int)a]--;\n if(currentInDegree[(int)a]==0){\n fringe.push((int)a);\n }\n }\n return next;\n }",
"public Queue<Vertex> next() {\n\n Vertex u = lov.dequeue();\n for (Edge e : u.outEdges) {\n if (!e.to.visited) {\n cameFromEdge.put(e.to.toIdentifier(), e.from);\n if (e.to.x == MazeWorld.width - 1 && e.to.y == MazeWorld.height - 1) {\n reconstruct(cameFromEdge, e.to);\n lov = new Queue<Vertex>();\n }\n else {\n e.to.visited = true;\n lov.enqueue(e.to);\n }\n }\n }\n return lov;\n }",
"public Stack<Vertex> next() {\n Vertex u = lov.pop();\n for (Edge e : u.outEdges) {\n if (!e.to.visited) {\n cameFromEdge.put(e.to.toIdentifier(), e.from);\n if (e.to.x == MazeWorld.width - 1 && e.to.y == MazeWorld.height - 1) {\n reconstruct(cameFromEdge, e.to);\n lov = new Stack<Vertex>();\n }\n else {\n lov.push(u);\n e.to.visited = true;\n lov.push(e.to);\n break;\n }\n }\n }\n return lov;\n }",
"public boolean isFallingEdge()\n {\n return !currentlyDetecting && previouslyDetecting;\n }",
"public void crossEdge(Edge e) {}",
"public int traverseRing(int faceId, int startEdgeId, VPFPrimitiveData.PrimitiveInfo[] edgeInfoArray,\n EdgeTraversalListener listener)\n {\n // 1. Determine which face primitive to construct.\n // The face is determined for us by the selection of a row in the face primitive table.\n\n // 2. Identify the start edge.\n // Select the row in the ring primitive table which is associated with the face primitive. Then select the row\n // in the edge primitive table which corresponds to the ring primitive. Essentially, we follow the face to a\n // ring, and the ring to a starting edge.\n\n // 3. Follow the edge network until we arrive back at the starting edge, or the data does not specify a next\n // edge. Travel in the direction according to which side of the edge (left or right) the face belongs to. If we\n // reach an auxiliary edge (face is both left and right of the edge), then travel to the next edge which does\n // not cause us to backtrack.\n\n int count = 0;\n int prevEdgeId;\n int curEdgeId = -1;\n int nextEdgeId = startEdgeId;\n\n do\n {\n prevEdgeId = curEdgeId;\n curEdgeId = nextEdgeId;\n\n if (listener != null)\n {\n listener.nextEdge(count, curEdgeId, this.getMustReverseCoordinates(faceId, prevEdgeId, curEdgeId,\n edgeInfoArray));\n }\n\n count++;\n }\n while ((nextEdgeId = this.nextEdgeId(faceId, prevEdgeId, curEdgeId, edgeInfoArray)) > 0\n && (nextEdgeId != startEdgeId));\n\n return count;\n }",
"VertexType getOtherVertexFromEdge( EdgeType r, VertexType oneVertex );",
"public double getDirectionFace();",
"public DCEL_Edge getConnectingEdge(Cell c) {\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tIterator<DCEL_Edge> it = (Iterator<DCEL_Edge>) face.edges().iterator();\n\n\t\twhile (it.hasNext()) {\n\n\t\t\tDCEL_Edge e = it.next();\n\n\t\t\tif ((e.getLeftFace().equals(this.face) && e.getRightFace().equals(\n\t\t\t\t\tc.face))\n\t\t\t\t\t|| (e.getLeftFace().equals(c.face) && e.getRightFace()\n\t\t\t\t\t\t\t.equals(this.face))) {\n\n\t\t\t\treturn e;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.err\n\t\t\t\t.println(\"Edge Not Found-Error: This should not have happened\");\n\t\treturn null;\n\t}",
"public void checkIfAtEdge() {\n\t\tif(x<=0){\n\t\t\tx=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y<=0){\n\t\t\ty=1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(x>=GameSystem.GAME_WIDTH-collisionWidth){\n\t\t\tx=GameSystem.GAME_WIDTH-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\tif(y>=GameSystem.GAME_HEIGHT-collisionWidth){\n\t\t\ty=GameSystem.GAME_HEIGHT-collisionHeight-1;\n\t\t\tatEdge=true;\n\t\t\tmoving=false;\n\t\t}\n\t\telse{\n\t\t\tatEdge=false;\n\t\t}\n\t\t\n\t}",
"@Override\n protected KPMPSolution nextNeighbour() {\n List<KPMPSolutionWriter.PageEntry> edgePartition = bestSolution.getEdgePartition().stream().map(KPMPSolutionWriter.PageEntry::clone).collect(toCollection(ArrayList::new));\n KPMPSolution neighbourSolution = new KPMPSolution(bestSolution.getSpineOrder(), edgePartition, bestSolution.getNumberOfPages());\n edge = edgePartition.get(index);\n originalPageIndex = edge.page;\n newPageIndex = pageCounter;\n edgePartition.get(index).page = newPageIndex;\n index++;\n numberOfIterations++;\n return neighbourSolution;\n }",
"public Vertex moveRight() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x + 1, e);\n }\n return current;\n }",
"public Vertex moveLeft() {\n for (Edge e : current.outEdges) {\n move(e.to.x == current.x - 1, e);\n }\n return current;\n }",
"void setupEdge(EdgeGraph edge) {\n\n\t\tif (UserParameters.socialInteraction) updateCrowdness(edge);\n\t\tcurrentEdge = edge;\n\t\t//transform GeomPlanarGraphEdge in Linestring\n\t\tLineString line = edge.getLine();\n\t\t//index the Linestring\n\t\tsegment = new LengthIndexedLine(line);\n\t\tstartIndex = segment.getStartIndex();\n\t\tendIndex = segment.getEndIndex();\n\t\tlinkDirection = 1;\n\n\t\t// check to ensure that Agent is moving in the right direction (direction)\n\t\tdouble distanceToStart = line.getStartPoint().distance(agentLocation.geometry);\n\t\tdouble distanceToEnd = line.getEndPoint().distance(agentLocation.geometry);\n\n\t\tif (distanceToStart <= distanceToEnd) {\n\t\t\t// closer to start\n\t\t\tcurrentIndex = startIndex;\n\t\t\tlinkDirection = 1;\n\t\t}\n\t\telse if (distanceToEnd < distanceToStart) {\n\t\t\t// closer to end\n\t\t\tcurrentIndex = endIndex;\n\t\t\tlinkDirection = -1;\n\t\t}\n\n\t}",
"public void loopThroughEdge()\n {\n int margin = 2;\n\n if (getX() < margin) //left side\n { \n setLocation(getWorld().getWidth()+ margin, getY());\n }\n else if (getX() > getWorld().getWidth() - margin) //right side\n {\n setLocation(margin, getY());\n }\n\n if (getY() < margin) //top side\n { \n setLocation(getX(), getWorld().getHeight() - margin);\n }\n else if(getY() > getWorld().getHeight() - margin) //bottom side\n { \n setLocation(getX(), margin);\n }\n }",
"void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }",
"public boolean isRisingEdge()\n {\n return currentlyDetecting && !previouslyDetecting;\n }",
"public void updateDirectionFace();",
"public void goToNext() {\r\n\t\tif (curr == null)\r\n\t\t\treturn;\r\n\t\tprev = curr;\r\n\t\tcurr = curr.link;\r\n\t}",
"@Override\n\tpublic void goForward() {\n\t\t// check side and move the according room and side\n\t\tif (side.equals(\"hRight\")) {\n\t\t\tthis.side = \"bFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"hFront\")) {\n\t\t\tthis.side = \"mFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"bLeft\")) {\n\t\t\tthis.side = \"rLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(4);\n\n\t\t} else if (side.equals(\"rBack\")) {\n\t\t\tthis.side = \"bBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"bBack\")) {\n\t\t\tthis.side = \"hLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else if (side.equals(\"kBack\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"lLeft\")) {\n\t\t\tthis.side = \"kRight\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(6);\n\n\t\t} else if (side.equals(\"lBack\")) {\n\t\t\tthis.side = \"mBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"mFront\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"mBack\")) {\n\t\t\tthis.side = \"hBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else {\n\t\t\trandomRoom();\n\t\t\tSystem.out.println(\"Entered Wormhole!\");\n\t\t\tSystem.out.println(\"Location was chosen at random\");\n\t\t\tSystem.out.println(\"New location is: \" + room + \" room and \" + side.substring(1) + \" side\");\n\n\t\t}\n\t}",
"final public edge rev_edge(final edge e) {\r\n return rev_edge_v3(e);\r\n }",
"public boolean getFace() {\n return this.faceUp;\n }",
"private Loc nextPoint(Loc l, String direction) {\n\t\tif (direction.equals(\"down\")) {\n\t\t\t// Is at bottom?\n\t\t\t// System.out.println(\"p.getx= \" + l.row);\n\t\t\tif (l.row >= matrixHeight - 1) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Loc(l.row + 1, l.col);\n\t\t} else if (direction.equals(\"left\")) {\n\t\t\tif (l.col <= 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Loc(l.row, l.col - 1);\n\t\t} else { // right\n\t\t\tif (l.col >= matrixWidth - 1) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Loc(l.row, l.col + 1);\n\t\t}\n\t}",
"private Cell nextNotVisitedCell(Cell current) {\n if (current.isValidDirection(LEFT) && !cells[current.col - 1][current.row].visited)\n return cells[current.col - 1][current.row];\n\n // Check whether the right cell is visited, if there is one.\n if (current.isValidDirection(RIGHT) && !cells[current.col + 1][current.row].visited)\n return cells[current.col + 1][current.row];\n\n // Check whether the cell above is visited, if there is one.\n if (current.isValidDirection(UPWARD) && !cells[current.col][current.row - 1].visited)\n return cells[current.col][current.row - 1];\n\n // Check whether the cell below is visited, if there is one.\n if (current.isValidDirection(DOWNWARD) && !cells[current.col][current.row + 1].visited)\n return cells[current.col][current.row + 1];\n\n return null;\n }",
"public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }",
"public abstract boolean getEdge(Point a, Point b);",
"public FAVertex next(FAVertex v, String mark){\n\t\tfor(FAEdge edge : edges)\n\t\t\tif(getVertex(edge.getStart())==v&&edge.getCharacter().equals(mark))\n\t\t\t\treturn getVertex(edge.getEnd());\n\t\treturn null;\n\t}",
"public int getEdgeCurrentSlice(int edge) throws EdgeOutOfRangeException\n {\n return currentPage;\n }",
"Edge getEdge();",
"protected int getGraphLeft() {\r\n\t\treturn leftEdge;\r\n\t}",
"private Side secondSide(final Cell cell, final Side prev) {\n switch (cell.getCellNdx()) {\n case 8:\n case 12:\n case 14:\n return LEFT;\n case 1:\n case 9:\n case 13:\n return BOTTOM;\n case 2:\n case 3:\n case 11:\n return RIGHT;\n case 4:\n case 6:\n case 7:\n return TOP;\n case 5:\n if (prev == null) {\n if (LOGGER.isErrorEnabled()) {\n LOGGER.atError().addArgument(cell).log(\"cell '{}' switch case 5, prev is null\");\n }\n throw new IllegalStateException(\"cell \" + cell + \" prev is null\");\n }\n switch (prev) {\n case LEFT:\n return cell.isFlipped() ? BOTTOM : TOP;\n case RIGHT:\n return cell.isFlipped() ? TOP : BOTTOM;\n default:\n final String m = \"Saddle w/ no connected neighbour; Cell = \" + cell + \", previous side = \" + prev;\n throw new IllegalStateException(m);\n }\n case 10:\n if (prev == null) {\n if (LOGGER.isErrorEnabled()) {\n LOGGER.atError().addArgument(cell).log(\"cell '{}' switch case 5, prev is null\");\n }\n throw new IllegalStateException(\"cell \" + cell + \" prev is null\");\n }\n switch (prev) {\n case BOTTOM:\n return cell.isFlipped() ? RIGHT : LEFT;\n case TOP:\n return cell.isFlipped() ? LEFT : RIGHT;\n default:\n final String m = \"Saddle w/ no connected neighbour; Cell = \" + cell + \", previous side = \" + prev;\n throw new IllegalStateException(m);\n }\n default:\n final String m = \"Attempt to use a trivial Cell as a node: \" + cell;\n throw new IllegalStateException(m);\n }\n }",
"public int lancer() {\n int side;\n do {\n side = r.nextInt(this.getNbFaces() + 1);\n } while (side == last_value);\n last_value = side;\n\n return side;\n }",
"public abstract boolean putEdge(Edge incomingEdge);",
"public abstract boolean isNextVisited();",
"public void addEdge(Edge e) {\n int v = e.either();\n int w = e.other(v);\n adj[v].add(e);\n adj[w].add(e);\n E++;\n }",
"private static Side firstSide(final Cell cell, final Side prev) {\n switch (cell.getCellNdx()) {\n case 1:\n case 3:\n case 7:\n return LEFT;\n case 2:\n case 6:\n case 14:\n return BOTTOM;\n case 4:\n case 11:\n case 12:\n case 13:\n return RIGHT;\n case 8:\n case 9:\n return TOP;\n case 5:\n if (prev == null) {\n if (LOGGER.isErrorEnabled()) {\n LOGGER.atError().addArgument(cell).log(\"cell '{}' switch case 5, prev is null\");\n }\n throw new IllegalStateException(\"cell \" + cell + \" prev is null\");\n }\n switch (prev) {\n case LEFT:\n return RIGHT;\n case RIGHT:\n return LEFT;\n default:\n throw new NoSaddlePointException(cell, prev);\n }\n case 10:\n if (prev == null) {\n if (LOGGER.isErrorEnabled()) {\n LOGGER.atError().addArgument(cell).log(\"cell '{}' switch case 5, prev is null\");\n }\n throw new IllegalStateException(\"cell \" + cell + \" prev is null\");\n }\n switch (prev) {\n case BOTTOM:\n return TOP;\n case TOP:\n return BOTTOM;\n default:\n throw new NoSaddlePointException(cell, prev);\n }\n default:\n final String m = \"Attempt to use a trivial cell as a start node: \" + cell;\n throw new IllegalStateException(m);\n }\n }",
"public int flow(Edge e) {\n\t\tif(mcg!=null)\n\t\t{\n\t\t\treturn mcg.flow(e);\n\t\t}\n\t\treturn 0;\n\t}",
"@Override\n\t\tpublic void OnSingleFingerEdgeIn(MotionEvent ev, int direction) {\n\t\t\tLog.i(TAG, \"OnSingleFingerEdgeIn = \" + direction);\n\t\t\tmScroller.forceFinished(true);\n\t\t}",
"public void checkIsFrogAtTheEdge() {\n\t\tif (getY()<0 || getY()>800) {\n\t\t\tsetY(FrogPositionY);\t\n\t\t}\n\t\tif (getX()<-20) {\n\t\t\tmove(movementX*2, 0);\n\t\t} else if (getX()>600) {\n\t\t\tmove(-movementX*2, 0);\n\t\t}\n\t\tif (getY()<130 && ! ((getIntersectingObjects(End.class).size() >= 1))) {\n\t\t\tmove(0, movementY*2);\n\t\t\t\n\t\t}\n\t}",
"@Override\n public void onLeftDetect(FaceDetectionResult faceResult) {\n leftResult = null;\n if (faceResult != null) {\n leftResult = faceResult;\n\n if (face2 != null) {\n Bitmap nBmp = face2.copy(Bitmap.Config.ARGB_8888, true);\n if (nBmp != null) {\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n if (leftResult != null) {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, leftResult.getFeature());\n } else {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n }\n }\n } else {\n if (face2 != null) {\n Bitmap nBmp = face2.copy(Bitmap.Config.ARGB_8888, true);\n if (nBmp != null) {\n int w = nBmp.getWidth();\n int h = nBmp.getHeight();\n int s = (w * 32 + 31) / 32 * 4;\n ByteBuffer buff = ByteBuffer.allocate(s * h);\n nBmp.copyPixelsToBuffer(buff);\n if (leftResult != null) {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, leftResult.getFeature());\n } else {\n FaceLockHelper.DetectRightFace(buff.array(), w, h, null);\n }\n }\n }\n }\n calcMatch();\n }",
"public int case1(AVLNode node, int bottomLeftEdge) {\n\t\tchar sideOfNode = node.parentSide();\n\t\tif (sideOfNode == 'N') {\n\t\t\tnode.setSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (node.getParent().getHeight() - node.getHeight() == 1) {\n\t\t\tnode.setSize();\n\t\t\tnode.updateSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (sideOfNode == 'L') {\n\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\tif (rightEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 1;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // rightEdge == 2\n\t\t\t\tif (bottomLeftEdge == 1) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 2, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getRight(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t} else { // sideOfNode == 'R'\n\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\tif (leftEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 2;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // leftEdge == 2\n\t\t\t\tif (bottomLeftEdge == 2) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 1, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getLeft(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void rotateToFallingEdge(boolean counterClockwise) {\n\t\t//the robot will facing the wall at the beginning, so rotate until\n\t\t//its not facing a wall\n\t\twhile(getDistanceData() < WALL_DIS + WIDTH) {\n\t\t\tnav.rotate(counterClockwise);\n\t\t}\n\t\tSound.beep();\n\t\t//then rotate the robot to falling a rising edge (facing the wall)\n\t\twhile(getDistanceData() > WALL_DIS+WIDTH) {\n\t\t\tnav.rotate(counterClockwise);\n\t\t}\n\t}",
"public int checkEdgeDirection(Object src, Object dest)\n\t{\t\t\n\t\tif(this.map.get(src).contains(dest) && !this.map.get(dest).contains(src))\n\t\t\treturn 1;\n\t\telse if(this.map.get(src).contains(dest) && this.map.get(dest).contains(src))\n\t\t\treturn 2;\n\t\treturn 0;\n\t}",
"private void dfs(int vertex, int parent, int currentE) {\n System.out.println(\"Going from \" + parent + \" to \" + vertex);\n currentE++;\n assert g.isDirected();\n if (!lowLink.containsKey(vertex)) {\n lowLink.put(vertex, currentE);\n } else {\n if (parent >= 0) {\n if (lowLink.get(vertex) < lowLink.get(parent)) { //We've been there\n lowLink.put(parent, lowLink.get(vertex));\n }\n }\n return;\n }\n\n //Remove backward edge\n g.removeEdge(vertex, parent);\n\n for (var head : g.getHeads(vertex)) {\n dfs(head, vertex, currentE);\n if (lowLink.get(head) < lowLink.get(vertex)) {\n lowLink.put(vertex, lowLink.get(head));\n }\n // Apply bridge criteria:\n // lowlink(head) > e(tail)\n if (lowLink.get(head) > currentE) {\n bridges.add(new Graph.Edge(vertex, head));\n }\n }\n }",
"public Location next(boolean leftPressed, boolean rightPressed, boolean upPressed, boolean downPressed){\n\n\t\t// first, find out where we are now, and if we're making a footstep noise.\n\t\t// (footstep noises happen when the avatar moves from one nearest grid reference to a another)\n\t\tGridRef nearestGR = getNearestSpace();\n\t\tif (nearestGR.equals(previousGR)){\n\t\t\tfootstep = false;\n\t\t} else {\n\t\t\tfootstep = true;\n\t\t}\n\t\t// update 'previousGR' value.\n\t\tpreviousGR = nearestGR;\n\n\t\tint targetX = currentLoc.x;\n\t\tint targetY = currentLoc.y;\n\t\t\n\t\tif (leftPressed){\n\t\t\ttargetX -= topSpeed;\n\t\t\tcurrentDir = Direction.LEFT;\n\t\t}\n\t\tif (rightPressed){\n\t\t\ttargetX += topSpeed;\n\t\t\tcurrentDir = Direction.RIGHT;\n\t\t}\n\t\tif (upPressed){\n\t\t\ttargetY -= topSpeed;\n\t\t\tcurrentDir = Direction.UP;\n\t\t}\n\t\tif (downPressed){\n\t\t\ttargetY += topSpeed;\n\t\t\tcurrentDir = Direction.DOWN;\n\t\t}\n\n\t\ttargetLoc = new Location(targetX, targetY);\n\n\t\treturn targetLoc;\n\t}",
"boolean turnFaceDown();",
"public boolean onSide(int face) {\n for (int i = 0; i <= 5; i++) {\n if ((i - 3 == face && i < 3) || (i - 2 == face && i >= 3)) {\n for (int j : allColors[i]) {\n if (j == loc) {\n return true;\n }\n }\n }\n }\n return false;\n }",
"@Override\n public boolean onRecurse(DefaultGraph graph, int cycleStart,\n int cycleSecond, int lastVertex, int current, int currentFaces,\n int edgesLeft, int edgesInCurrentCycle)\n {\n int girth = graph.getGirth();\n \n /* Minimum number of edges needed to finnish current cycle. */\n int neededInCurrent;\n if(edgesInCurrentCycle >= girth) {\n if(graph.hasEdge(current, cycleStart))\n neededInCurrent = 1;\n else\n neededInCurrent = 2;\n } else {\n neededInCurrent = girth - edgesInCurrentCycle;\n }\n \n /* Simple bounding based on edges left/current number of faces. The\n * +1 is the cycle we're currently working on. */\n int estimate = currentFaces + 1 + (edgesLeft - neededInCurrent) / girth;\n \n /* If we are not going to get higher than our previous result, we can\n * bound. Note that we add 1 to our previous result, this is because\n * either all results will be even, or all results will be odd. */\n if(estimate <= previousResult + 1) {\n return false;\n }\n \n /*float depth = (float) edgesLeft / (float) graph.getNumberOfEdges();\n if(previousResult >= 0 && current < 0 &&\n estimate * 0.8f <= previousResult && depth >= 0.3f) {\n if(graph.estimate() <= previousResult) {\n return false;\n }\n }*/\n \n return true;\n }",
"protected int auxiliaryNextEdgeId(int prevEdgeId, int curEdgeId,\n VPFPrimitiveData.PrimitiveInfo[] edgeInfoArray)\n {\n\n VPFPrimitiveData.EdgeInfo prevInfo = getEdgeInfo(edgeInfoArray, prevEdgeId);\n VPFPrimitiveData.EdgeInfo curInfo = getEdgeInfo(edgeInfoArray, curEdgeId);\n\n // Previous edge is adjacent to starting node.\n if (curInfo.getStartNode() == prevInfo.getStartNode() || curInfo.getStartNode() == prevInfo.getEndNode())\n {\n return (curInfo.getRightEdge() != curEdgeId) ? curInfo.getRightEdge() : curInfo.getLeftEdge();\n }\n // Previous edge is adjacent to ending node.\n else if (curInfo.getEndNode() == prevInfo.getStartNode() || curInfo.getEndNode() == prevInfo.getEndNode())\n {\n return (curInfo.getLeftEdge() != curEdgeId) ? curInfo.getLeftEdge() : curInfo.getRightEdge();\n }\n // Edges are not actually adjacent. This should never happen, but we check anyway.\n else\n {\n return -1;\n }\n }",
"public Vertex moveUp() {\n for (Edge e : current.outEdges) {\n move(e.to.y == current.y - 1, e);\n }\n return current;\n }",
"@Test\n public void forcingDirectionDoesNotMeanWeCannotUseEdgeAtAll() {\n int north = graph.edge(1, 0).setDistance(1).set(speedEnc, 10, 10).getEdge();\n int south = graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10).getEdge();\n graph.edge(2, 5).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(5, 4).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(4, 3).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(3, 2).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(1, 0).setDistance(1).set(speedEnc, 10, 0);\n graph.edge(0, 6).setDistance(1).set(speedEnc, 10, 0);\n int targetEdge = graph.edge(6, 7).setDistance(1).set(speedEnc, 10, 0).getEdge();\n assertPath(calcPath(1, 7, north, targetEdge), 0.3, 3, 300, nodes(1, 0, 6, 7));\n assertPath(calcPath(1, 7, south, targetEdge), 0.9, 9, 900, nodes(1, 2, 5, 4, 3, 2, 1, 0, 6, 7));\n }",
"public void addEdge(Edge edge){\n \n synchronized(vertexes){\n Long start = edge.getStart();\n Vertex sVertex = vertexes.get(start);\n if(sVertex != null){\n sVertex.addEdge(edge, true);\n }\n// if undirected graph then adds edge to the finish vertex too \n if(!edge.isDirected()){\n Long finish = edge.getFinish();\n Vertex fVertex = vertexes.get(finish);\n if(fVertex != null){\n fVertex.addEdge(edge, false);\n }\n }\n }\n \n }",
"protected void next() {\n\t\t// Next node\n\t\tnode = path.remove(0);\n\t\ttransition(NavigatorState.ROTATE_TO);\n\t}",
"void downgradeLastEdge();",
"boolean addEdge(E edge);",
"public void gotoNext(){\r\n if(curr == null){\r\n return;\r\n }\r\n prev = curr;\r\n curr = curr.link;\r\n }",
"public Vertex getNext() {\n\t\treturn next;\n\t}",
"protected void processEdge(Edge e) {\n\t}",
"public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}",
"public Bearing getLeftNeighbour() {\n return this == N || this == S ? W : N;\n }",
"protected boolean getMustReverseCoordinates(int faceId, int prevEdgeId, int curEdgeId,\n VPFPrimitiveData.PrimitiveInfo[] edgeInfo)\n {\n\n Orientation o = this.getOrientation(faceId, curEdgeId, edgeInfo);\n if (o == null)\n {\n return false;\n }\n\n switch (o)\n {\n case LEFT:\n return true;\n case RIGHT:\n return false;\n case LEFT_AND_RIGHT:\n return (prevEdgeId > 0) && this.auxiliaryMustReverseCoordinates(prevEdgeId, curEdgeId, edgeInfo);\n default:\n return false;\n }\n }",
"private void goForwardOne() \n {\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n m_source_.setIndex(m_source_.getIndex() + 1);\n }\n else {\n // we are in the buffer, buffer offset will never be 0 here\n m_bufferOffset_ ++;\n }\n }",
"public RBNode nextNode (RBNode x){\r\n\t\t// there are three cases: \r\n\t\t// next node is above x; it is below x; there is no next node\r\n\t\t\r\n\t\t// Case 1: next node is below\r\n\t\tif (x.right != nil) return treeMinimum(x.right);\r\n\t\t\r\n\t\t// Case 2,3: next node is above or there is no next node\r\n\t\telse return firstRightAncestor(x); // returns nil if none exists\r\n\t}",
"public void checkEdge()\n {\n if(getX() < 10 || getX() > getWorld().getWidth() - 10)\n {\n speed *= -1;\n }\n }",
"public boolean addEdge(Edge e) {\n return g.addNode(e.getSrc())&&g.addNode(e.getDst())&&g.addEdge(e.getSrc(),e.getDst());\n }",
"public boolean onHorizontalEdge() {\n\t\treturn horizontal != Side.None;\n\t}",
"public abstract void addEdge(Point p, Direction dir);",
"public abstract boolean hasEdge(int from, int to);",
"private void checkFlipDirection()\n\t{\n\t\tif (currentFloor == 0) //Are we at the bottom?\n\t\t\tcurrentDirection = Direction.UP; //Then we must go up\n\t\tif (currentFloor == (ElevatorSystem.getNumberOfFloors() - 1)) //Are we at the top?\n\t\t\tcurrentDirection = Direction.DOWN; //Then we must go down\n\t}",
"public void addEdge(DirectedEdge edge){\r\n\t\tmEdgeList.offer(edge);\r\n\t\t\r\n\t\tint src=edge.from();\r\n\t\tint dest = edge.to();\r\n\t\t\r\n\t\tmVisitStatus.put(src,false);\r\n\t\tmVisitStatus.put(dest,false);\r\n\t\t\r\n\t\tmVertexList.add(src);\r\n\t\tmVertexList.add(dest);\r\n\t\t\r\n\t\t/* Forward Edge */\r\n\t\tList<DirectedEdge> edgeList = adjList.get(src);\r\n\t\tif(edgeList==null)\r\n\t\t\tedgeList = new ArrayList<DirectedEdge>();\r\n\t\t\r\n\t\tedgeList.add(edge);\r\n\t\tadjList.put(src, edgeList);\r\n\t}",
"public Vertex next() {\n nodeIndex++;\n return iterV[nodeIndex];\n }",
"public Edge<E, V> getUnderlyingEdge();",
"public Edge(){\n\t\tvertices = null;\n\t\tnext = this;\n\t\tprev = this;\n\t\tpartner = null;\n\t\tweight = 0;\n\t}",
"private static Orientation next(Orientation o, boolean clockwise)\n\t{\n\t\tswitch(o)\n\t\t{\n\t\tcase UP:\n\t\t\treturn clockwise ? Orientation.RIGHT : Orientation.LEFT;\n\t\tcase LEFT:\n\t\t\treturn clockwise ? Orientation.UP : Orientation.DOWN;\n\t\tcase DOWN:\n\t\t\treturn clockwise ? Orientation.LEFT : Orientation.RIGHT;\n\t\tcase RIGHT:\n\t\t\treturn clockwise ? Orientation.DOWN : Orientation.UP;\n\t\tdefault: \n\t\t\treturn Orientation.UP; // normally, cannot be reached but otherwise error\n\t\t}\n\t}",
"private Position adjacentPosition(Direction direction, GameObject gameObject) {\n\n switch (direction) {\n case UP:\n return new Position(gameObject.getPosition().getCol(), gameObject.getPosition().getRow() - 1);\n case DOWN:\n return new Position(gameObject.getPosition().getCol(), gameObject.getPosition().getRow() + 1);\n case LEFT:\n return new Position(gameObject.getPosition().getCol() - 1, gameObject.getPosition().getRow());\n case RIGHT:\n return new Position(gameObject.getPosition().getCol() + 1, gameObject.getPosition().getRow());\n default:\n System.out.println(\"something very bad happened!\");\n return null;\n }\n }",
"public boolean getFallingEdge(int button) {\n\t\tboolean oldVal = getButtonState(button, oldButtons);\n\t\tboolean currentVal = getButtonState(button, currentButtons);\n\t\tif (oldVal == true && currentVal == false) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isBackedge() {\n\t\treturn isBackEdge;\r\n\t}",
"public void addEdge(Edge e)\r\n\t{\n\t\tint v = e.either(), w = e.other(v);\r\n\t\tadj[v].add(e);\r\n\t\tadj[w].add(e);\r\n\t}",
"public Point nextCorner( Point startingPoint, Point destinationPoint,\n Wall destinationWall ) throws DataException {\n\n if ( this == destinationWall ) {\n return destinationPoint;\n }\n\n if ( null == nextCornerPoint || null == previousCornerPoint ) {\n throw new DataException( \"Cannot find abutting wall.\" );\n }\n\n if ( nextCornerPoint.equals( startingPoint ) ) {\n return previousCornerPoint;\n }\n\n if ( previousCornerPoint.equals( startingPoint ) ) {\n return nextCornerPoint;\n }\n\n// Double destination = startingPoint.distance( destinationPoint );\n Double nextCorner = destinationPoint.distance( nextCornerPoint );\n Double previousCorner = destinationPoint.distance( previousCornerPoint );\n\n// if ( destination <= nextCorner || destination <= previousCorner ) {\n// System.out.println( \". Returning destination \" + destinationPoint.toString() );\n// return destinationPoint;\n// }\n// else\n// if ( nextCorner < previousCorner && ! nextCornerPoint.equals( startingPoint ) ) {\n if ( nextCorner < previousCorner ) {\n return nextCornerPoint;\n }\n else\n// if ( ! previousCornerPoint.equals( startingPoint ) )\n {\n return previousCornerPoint;\n }\n// else {\n// System.out.println( \". Returning next \" + nextCornerPoint.toString() + \" by default.\");\n// return nextCornerPoint;\n// }\n }",
"public void addEdge(edge_type edge) {\n //first make sure the from and to nodes exist within the graph\n assert (edge.getFrom() < nextNodeIndex) && (edge.getTo() < nextNodeIndex) :\n \"<SparseGraph::AddEdge>: invalid node index\";\n\n //make sure both nodes are active before adding the edge\n if ((nodeVector.get(edge.getTo()).getIndex() != invalid_node_index)\n && (nodeVector.get(edge.getFrom()).getIndex() != invalid_node_index)) {\n //add the edge, first making sure it is unique\n if (isEdgeNew(edge.getFrom(), edge.getTo())) {\n edgeListVector.get(edge.getFrom()).add(edge);\n }\n\n //if the graph is undirected we must add another connection in the opposite\n //direction\n if (!isDirectedGraph) {\n //check to make sure the edge is unique before adding\n if (isEdgeNew(edge.getTo(), edge.getFrom())) {\n GraphEdge reversedEdge = new GraphEdge(edge.getTo(),edge.getFrom(),edge.getCost());\n edgeListVector.get(edge.getTo()).add(reversedEdge);\n }\n }\n }\n }",
"public void flip(){\n this.faceDown = !this.faceDown;\n }",
"private MapCell nextCell(MapCell cell) {\r\n\t\t\r\n\t\t//This is an array that holds the possible neighbouring tiles.\r\n\t\tMapCell[] potentialCells = {null,null,null,null};\r\n\t\t\r\n\t\t//This variable is an indicator. If it remains -1, that means no possible neighbouring tiles were found.\r\n\t\tint next = -1; \r\n\t\t\t\r\n\t\t//If the cell is a north road, check that its neighbour to the north is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another north road.\r\n\t\tif(cell.getNeighbour(0)!=null && cell.isNorthRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(0).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(0).isIntersection()||cell.getNeighbour(0).isDestination()||cell.getNeighbour(0).isNorthRoad()) {\r\n\r\n\t\t\t\t\t//Add the north neighbour to the array of potential next tiles.\r\n\t\t\t\t\tpotentialCells[0] = cell.getNeighbour(0);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the cell is an east road, check that its neighbour to the east is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another east road.\r\n\t\t} else if (cell.getNeighbour(1)!=null && cell.isEastRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(1).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(1).isIntersection()||cell.getNeighbour(1).isDestination()||cell.getNeighbour(1).isEastRoad()) {\r\n\r\n\t\t\t\t\t//Add the east neighbour to the potential next tiles.\r\n\t\t\t\t\tpotentialCells[1] = cell.getNeighbour(1);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the cell is a south road, check that its neighbour to the south is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another south road.\r\n\t\t} else if (cell.getNeighbour(2)!=null && cell.isSouthRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(2).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(2).isIntersection()||cell.getNeighbour(2).isDestination()||cell.getNeighbour(2).isSouthRoad()) {\r\n\r\n\t\t\t\t\t//Add the south neighbour to the potential next tiles.\r\n\t\t\t\t\tpotentialCells[2] = cell.getNeighbour(2);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the cell is a west road, check that its neighbour to the west is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another west road.\r\n\t\t} else if (cell.getNeighbour(3)!=null && cell.isWestRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(3).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(3).isIntersection()||cell.getNeighbour(3).isDestination()||cell.getNeighbour(3).isWestRoad()) {\r\n\r\n\t\t\t\t\t//Add the west neighbour to the potential next tiles.\r\n\t\t\t\t\tpotentialCells[3] = cell.getNeighbour(3);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the current cell is an intersection, go through all 4 of its potential neighbours.\r\n\t\t} else {\r\n\r\n\t\t\tfor(int i = 0; i<4; i++) {\r\n\r\n\t\t\t\t//Check that the neighbour isn't null or marked.\r\n\t\t\t\tif(cell.getNeighbour(i)!=null) {\r\n\r\n\t\t\t\t\tif(!cell.getNeighbour(i).isMarked()) {\r\n\r\n\t\t\t\t\t\t//Check to see if the neighbour is either an intersection, or a one-way road in the proper orientation to\r\n\t\t\t\t\t\t//continue the path.\r\n\t\t\t\t\t\tif(cell.getNeighbour(i).isIntersection()||cell.getNeighbour(i).isDestination()||(i==0\r\n\t\t\t\t\t\t\t\t&&cell.getNeighbour(i).isNorthRoad())||(i==1&&cell.getNeighbour(i).isEastRoad())||(i==2\r\n\t\t\t\t\t\t\t\t&&cell.getNeighbour(i).isSouthRoad())||(i==3&&cell.getNeighbour(i).isWestRoad())) {\r\n\r\n\t\t\t\t\t\t\t//Add the tile to the possible next tiles.\r\n\t\t\t\t\t\t\tpotentialCells[i] = cell.getNeighbour(i);\r\n\t\t\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t//If no tiles were found, return null.\r\n\t\tif(next == -1) {\r\n\r\n\t\t\treturn null;\r\n\r\n\t\t//Otherwise, select one (or one of) the next possible tiles and return it.\r\n\t\t} else {\r\n\r\n\t\t\tfor(int i = 3; i >= 0; i--) {\r\n\r\n\t\t\t\tif(potentialCells[i]!=null) {\r\n\r\n\t\t\t\t\tnext = i;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn potentialCells[next];\r\n\r\n\t\t}\r\n\t\t\r\n\t}",
"public int getLeftEdge() {\n return leftEdge;\n }"
] | [
"0.6942914",
"0.67072076",
"0.6269912",
"0.61737525",
"0.6120763",
"0.60295045",
"0.6011182",
"0.59854364",
"0.59812564",
"0.59121555",
"0.5892761",
"0.57722116",
"0.5751568",
"0.5744439",
"0.57236344",
"0.5685684",
"0.5639437",
"0.5636093",
"0.5620802",
"0.55934775",
"0.5572503",
"0.55659467",
"0.5564499",
"0.5551361",
"0.55158603",
"0.55153435",
"0.54980063",
"0.54946965",
"0.54901534",
"0.547953",
"0.5473018",
"0.54294175",
"0.5398752",
"0.5398677",
"0.53701",
"0.5359989",
"0.535227",
"0.53497523",
"0.5343915",
"0.528853",
"0.52592474",
"0.524093",
"0.52399534",
"0.5228786",
"0.52037853",
"0.519632",
"0.5186416",
"0.51848775",
"0.51846415",
"0.51801115",
"0.51734394",
"0.51674277",
"0.5166792",
"0.51587766",
"0.5149645",
"0.5132842",
"0.513099",
"0.5129766",
"0.5128841",
"0.5128313",
"0.5128243",
"0.5127285",
"0.5126729",
"0.51223147",
"0.51050466",
"0.510314",
"0.51031053",
"0.50996107",
"0.5096549",
"0.50946754",
"0.50941354",
"0.5092033",
"0.5089195",
"0.5071157",
"0.50634205",
"0.506212",
"0.50576603",
"0.50570464",
"0.5052383",
"0.5047174",
"0.5046964",
"0.5040408",
"0.5031982",
"0.5030881",
"0.50293005",
"0.50203675",
"0.501539",
"0.50135106",
"0.4981948",
"0.49816704",
"0.49753767",
"0.49745947",
"0.4969954",
"0.49692518",
"0.49638185",
"0.49597654",
"0.4946617",
"0.4946035",
"0.49401814",
"0.49376643"
] | 0.5912875 | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.